import * as Redacted from "effect/Redacted"; import * as Provider from "../Provider.ts"; import { Resource } from "../Resource.ts"; import { PrismaClient } from "./Client.ts"; import type { Providers } from "./Providers.ts"; import type { PrismaRegionId } from "./Types.ts"; export interface ProjectProps { /** * Project display name. If omitted, Alchemy generates a stable physical name. */ name?: string; /** * Whether to create a default Prisma Postgres database with the project. * * @default true */ createDatabase?: boolean; /** * Region for the default database created with the project. * * When `createDatabase` is false, omitting this leaves the project's default * region unset. * * @default "us-east-1" when a default database is created */ region?: PrismaRegionId; /** * Opaque project settings passed through to the Management API. */ settings?: Record; /** * Rotate the adopted default database connection to recover its one-time * credentials. Prisma revokes the previous key on a best-effort basis and * rotation may interrupt existing consumers, so adoption leaves credentials * unset unless explicitly opted in. * * @default false */ rotateCredentialsOnAdopt?: boolean; } export interface Project extends Resource<"Prisma.Project", ProjectProps, { /** * Prisma project ID. */ projectId: string; /** * Prisma project display name. */ projectName: string; /** * Workspace ID that owns the project. */ workspaceId: string; /** * ISO timestamp when the project was created. */ createdAt: string; /** * Default Prisma Postgres region for the project, when available. */ defaultRegion: string | null; /** * Default database ID created with or discovered for the project. */ databaseId: string | undefined; /** * Default database connection ID, when a database exists. */ defaultConnectionId: string | undefined; /** * Direct Postgres connection string, redacted in state. */ directConnectionString: Redacted.Redacted | undefined; /** * Pooled Postgres connection string, redacted in state. */ pooledConnectionString: Redacted.Redacted | undefined; /** * Accelerate connection string, redacted in state. */ accelerateConnectionString: Redacted.Redacted | undefined; /** * Direct database host, when returned by Prisma. */ host: string | null | undefined; /** * Direct database username, when returned by Prisma. */ user: string | null | undefined; /** * Direct database password, redacted in state. */ password: Redacted.Redacted | undefined; }, never, Providers> { } /** * A Prisma project, optionally with a default Prisma Postgres database. * * A Project is the ownership boundary for its databases, branches, apps, and * repository link. Destroying this resource deletes the project and its * contained data. Set `createDatabase: false` when you want standalone * `Prisma.Database` resources with independent lifecycles. * * ### Creating a Project * **Example:** Project with a default database * ```typescript * const project = yield* Prisma.Project("app", { * name: "app", * region: "us-east-1", * }); * ``` * * **Example:** Project only * ```typescript * const project = yield* Prisma.Project("control-plane", { * createDatabase: false, * }); * ``` * * @resource */ export declare const Project: import("../Resource.ts").ResourceClass; export declare const ProjectProvider: () => import("effect/Layer").Layer, never, import("../AlchemyContext.ts").AlchemyContext | PrismaClient | import("../Stack.ts").Stack | import("../Stage.ts").Stage>; //# sourceMappingURL=Project.d.ts.map