elioria-sst-x
    Preparing search index...

    Implements

    Index
    db: PostgresJsDatabase<packages/db/src/schema> & {}

    The db value.

    • Generated

      Returns the result of findByHash.

      Parameters

      • keyHash: string

        The keyHash value.

      Returns Promise<ApiKey | null>

      The function result.

      Objective: In module packages/db/src/repositories/api-keys.repository.ts, retrieve data through findByHash.

      Behavior: Async; accepts keyHash; returns a value; invokes this.db.select().from(apiKeys).where(eq(apiKeys.keyHash, key.

    • Generated

      Returns the result of findByTenant.

      Parameters

      • tenantId: string

        The tenantId value.

      Returns Promise<ApiKey[]>

      The function result.

      Objective: In module packages/db/src/repositories/api-keys.repository.ts, retrieve data through findByTenant.

      Behavior: Async; accepts tenantId; returns a value; invokes this.db .select() .from(apiKeys) .where(eq(apiKeys.tenantId,.

    • Generated

      Executes revoke.

      Parameters

      • id: string

        The id value.

      Returns Promise<void>

      The function result.

      Objective: In module packages/db/src/repositories/api-keys.repository.ts, run revoke.

      Behavior: Async; accepts id; returns a value; invokes this.db.update(apiKeys).set({ isActive: false, updatedAt: ne.

    • Generated

      Updates data through updateLastUsed.

      Parameters

      • id: string

        The id value.

      Returns Promise<void>

      The function result.

      Objective: In module packages/db/src/repositories/api-keys.repository.ts, change data through updateLastUsed.

      Behavior: Async; accepts id; returns a value; invokes this.db .update(apiKeys) .set({ lastUsedAt: new Date(), upda.