elioria-sst-x
    Preparing search index...

    Implements

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

    The db value.

    • Generated

      Returns the result of findById.

      Parameters

      • id: string

        The id value.

      Returns Promise<Tenant | null>

      The function result.

      Objective: In module packages/db/src/repositories/tenant.repository.ts, retrieve data through findById.

      Behavior: Async; accepts id; returns a value; invokes this.db.select().from(tenants).where(eq(tenants.id, id)).lim.

    • Generated

      Returns the result of findExpiredTrials.

      Returns Promise<Tenant[]>

      The function result.

      Objective: In module packages/db/src/repositories/tenant.repository.ts, retrieve data through findExpiredTrials.

      Behavior: Async; returns a value; invokes this.db .select() .from(tenants) .where.

    • Generated

      Updates data through updateEnvironment.

      Parameters

      • id: string

        The id value.

      • data: {
            authorizedBy?: string;
            dataPolicy?: "synthetic_only" | "real_allowed";
            environment: "trial" | "suspended" | "test" | "production";
        }

        The data value.

      Returns Promise<Tenant | null>

      The function result.

      Objective: In module packages/db/src/repositories/tenant.repository.ts, change data through updateEnvironment.

      Behavior: Async; accepts id and data; returns a value; invokes this.db.update(tenants).set(patch).where(eq(tenants.id, id)).

    • Generated

      Updates data through updateStatus.

      Parameters

      • id: string

        The id value.

      • status: TenantStatus

        The status value.

      • Optionalplan: PlanKey

        The plan value.

      Returns Promise<void>

      The function result.

      Objective: In module packages/db/src/repositories/tenant.repository.ts, change data through updateStatus.

      Behavior: Async; accepts id and status and plan; returns a value; invokes this.db.update(tenants).set(update).where.

    • Generated

      Updates data through updateStripeInfo.

      Parameters

      • id: string

        The id value.

      • data: {
            plan: PlanKey;
            status: TenantStatus;
            stripeCustomerId: string;
            stripeSubscriptionId: string;
        }

        The data value.

      Returns Promise<void>

      The function result.

      Objective: In module packages/db/src/repositories/tenant.repository.ts, change data through updateStripeInfo.

      Behavior: Async; accepts id and data; returns a value; invokes this.db .update(tenants) .set({ stripeCustomerId: data.strip.