import * as Context from "effect/Context"; import * as Effect from "effect/Effect"; import * as Layer from "effect/Layer"; import * as Redacted from "effect/Redacted"; import * as HttpClient from "effect/unstable/http/HttpClient"; import { PrismaEnvironment } from "./PrismaEnvironment.ts"; import type { App, AccelerateRegion, AppCreateInput, AppDeploymentTarget, AppUpdateInput, BackupListResponse, Branch, BranchCreateInput, BranchUpdateInput, Bucket, BucketCreateInput, BucketKey, BucketKeyCreateInput, BucketKeyWithSecret, BuildLogsQuery, BuildLogsRequest, ConnectionCreateInput, CurrentPrincipal, CustomDomain, CustomDomainCreateInput, CustomDomainCreateResult, DataResponse, Database, DatabaseConnection, DatabaseConnectionCreateInput, DatabaseConnectionWithOptionalSecrets, DatabaseConnectionWithSecrets, DatabaseCreateInput, DatabaseUpdateInput, DatabaseUsage, Deployment, DeploymentCreateInput, DeploymentCreateResult, DeploymentListItem, DeploymentLogsQuery, DeploymentLogsRequest, EnvironmentVariable, EnvironmentVariableCreateInput, EnvironmentVariableUpdateInput, Integration, PrismaBranchIdFilter, PrismaSecretConnection, Project, ProjectCreateInput, ProjectDatabaseCreateInput, ProjectTransferInput, ProjectUpdateInput, PostgresRegion, PromoteAppResult, RollbackAppResult, Region, RestoreDatabaseInput, RestoredDatabase, ScmInstallIntent, ScmInstallIntentCreateInput, ScmInstallation, ScmRepository, SourceRepository, SourceRepositoryCreateInput, StartDeploymentResult, Workspace } from "./Types.ts"; type Method = "GET" | "POST" | "PATCH" | "DELETE"; declare const PrismaApiError_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & { readonly _tag: "PrismaApiError"; } & Readonly; export declare class PrismaApiError extends PrismaApiError_base<{ method: Method; path: string; status: number; message: string; /** Raw response bodies may contain credentials and are always redacted. */ body?: Redacted.Redacted; }> { } declare const PrismaApiDecodeError_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & { readonly _tag: "PrismaApiDecodeError"; } & Readonly; export declare class PrismaApiDecodeError extends PrismaApiDecodeError_base<{ method: Method; path: string; /** Byte length is retained for diagnostics without retaining response data. */ bodyLength: number; message: string; }> { } export interface PrismaManagementClient { listWorkspaces(query?: PaginationQuery): Effect.Effect; getWorkspace(id: string): Effect.Effect; getCurrentPrincipal(): Effect.Effect; listRegions(query?: RegionListQuery): Effect.Effect; listPostgresRegions(): Effect.Effect; listAccelerateRegions(): Effect.Effect; listProjects(query?: PaginationQuery): Effect.Effect; getProject(id: string): Effect.Effect; createProject(input: ProjectCreateInput): Effect.Effect; updateProject(id: string, input: ProjectUpdateInput): Effect.Effect; deleteProject(id: string): Effect.Effect; transferProject(id: string, input: ProjectTransferInput): Effect.Effect; listDatabases(query?: DatabaseListQuery): Effect.Effect; listProjectDatabases(projectId: string, query?: PaginationQuery): Effect.Effect; getDatabase(id: string): Effect.Effect; createDatabase(input: DatabaseCreateInput): Effect.Effect; createProjectDatabase(projectId: string, input: ProjectDatabaseCreateInput): Effect.Effect; updateDatabase(id: string, input: DatabaseUpdateInput): Effect.Effect; deleteDatabase(id: string): Effect.Effect; listBackups(databaseId: string, query?: BackupListQuery): Effect.Effect; restoreDatabase(targetDatabaseId: string, input: RestoreDatabaseInput): Effect.Effect; getDatabaseUsage(databaseId: string, query?: DatabaseUsageQuery): Effect.Effect; listConnections(query?: ConnectionListQuery): Effect.Effect; listDatabaseConnections(databaseId: string, query?: PaginationQuery): Effect.Effect; getConnection(id: string): Effect.Effect; createConnection(input: ConnectionCreateInput): Effect.Effect; createDatabaseConnection(databaseId: string, input: DatabaseConnectionCreateInput): Effect.Effect; deleteConnection(id: string): Effect.Effect; rotateConnection(id: string): Effect.Effect; listBranches(projectId: string, query?: BranchListQuery): Effect.Effect; getBranch(id: string): Effect.Effect; createBranch(projectId: string, input: BranchCreateInput): Effect.Effect; updateBranch(id: string, input: BranchUpdateInput): Effect.Effect; deleteBranch(id: string): Effect.Effect; listBuckets(query?: BucketListQuery): Effect.Effect; getBucket(id: string): Effect.Effect; createBucket(input: BucketCreateInput): Effect.Effect; deleteBucket(id: string): Effect.Effect; listBucketKeys(bucketId: string, query?: PaginationQuery): Effect.Effect; createBucketKey(bucketId: string, input: BucketKeyCreateInput): Effect.Effect; deleteBucketKey(bucketId: string, keyId: string): Effect.Effect; getCustomDomain(id: string): Effect.Effect; deleteCustomDomain(id: string): Effect.Effect; retryCustomDomain(id: string): Effect.Effect; listApps(query?: AppListQuery): Effect.Effect; getApp(id: string): Effect.Effect; createApp(input: AppCreateInput): Effect.Effect; updateApp(id: string, input: AppUpdateInput): Effect.Effect; deleteApp(id: string): Effect.Effect; promoteApp(id: string, target: AppDeploymentTarget): Effect.Effect; rollbackApp(id: string, target: AppDeploymentTarget): Effect.Effect; listAppDomains(appId: string): Effect.Effect; createAppDomain(appId: string, input: CustomDomainCreateInput): Effect.Effect; listAppDeployments(appId: string, query?: PaginationQuery): Effect.Effect; createAppDeployment(appId: string, input?: DeploymentCreateInput): Effect.Effect; getDeployment(id: string): Effect.Effect; deleteDeployment(id: string): Effect.Effect; startDeployment(id: string): Effect.Effect; stopDeployment(id: string): Effect.Effect; getDeploymentLogsRequest(id: string, query?: DeploymentLogsQuery): Effect.Effect; getBuildLogsRequest(buildId: string, query?: BuildLogsQuery): Effect.Effect; listEnvironmentVariables(query?: EnvironmentVariableListQuery): Effect.Effect; getEnvironmentVariable(id: string): Effect.Effect; createEnvironmentVariable(input: EnvironmentVariableCreateInput): Effect.Effect; updateEnvironmentVariable(id: string, input: EnvironmentVariableUpdateInput): Effect.Effect; deleteEnvironmentVariable(id: string): Effect.Effect; listIntegrations(query: IntegrationListQuery): Effect.Effect; listWorkspaceIntegrations(workspaceId: string, query?: PaginationQuery): Effect.Effect; getIntegration(id: string): Effect.Effect; deleteIntegration(id: string): Effect.Effect; revokeWorkspaceIntegration(workspaceId: string, clientId: string): Effect.Effect; listScmInstallations(query: { workspaceId: string; cursor?: string | null; limit?: number; }): Effect.Effect; createScmInstallIntent(input: ScmInstallIntentCreateInput): Effect.Effect; listScmInstallationRepositories(installationId: string, query?: PaginationQuery): Effect.Effect; listSourceRepositories(query: SourceRepositoryListQuery): Effect.Effect; getSourceRepository(id: string): Effect.Effect; createSourceRepository(input: SourceRepositoryCreateInput): Effect.Effect; deleteSourceRepository(id: string): Effect.Effect; } declare const PrismaClient_base: Context.ServiceClass; export declare class PrismaClient extends PrismaClient_base { } export interface PaginationQuery { cursor?: string | null; limit?: number; } export interface BackupListQuery { limit?: number; } export interface DatabaseUsageQuery { startDate?: string; endDate?: string; } export interface RegionListQuery { product?: "postgres" | "accelerate"; } export interface DatabaseListQuery extends PaginationQuery { projectId?: string; branchId?: PrismaBranchIdFilter; branchGitName?: string; } export interface ConnectionListQuery extends PaginationQuery { databaseId?: string; } export interface BranchListQuery extends PaginationQuery { gitName?: string; gitNameContains?: string; } export interface BucketListQuery extends PaginationQuery { projectId?: string; branchId?: PrismaBranchIdFilter; branchGitName?: string; } export interface AppListQuery extends PaginationQuery { projectId?: string; branchId?: PrismaBranchIdFilter; branchGitName?: string; } export type { BuildLogsQuery, BuildLogsRequest, DeploymentLogsQuery, DeploymentLogsRequest, }; export interface EnvironmentVariableListQuery extends PaginationQuery { projectId?: string; class?: "production" | "preview"; key?: string; branchId?: string; } export interface IntegrationListQuery extends PaginationQuery { workspaceId: string; } export interface SourceRepositoryListQuery extends PaginationQuery { projectId: string; } /** Response from the flat `POST /v1/databases` operation. */ export interface DatabaseCreateResult extends Omit { connections: DatabaseConnectionWithOptionalSecrets[]; } /** Response from `POST /v1/projects/{projectId}/databases`. */ export interface ProjectDatabaseCreateResult extends Omit { status: "provisioning" | "ready"; region: { id: string; name: string; }; } export interface ProjectCreateDatabaseResult extends Omit { } export interface ProjectCreateResult extends Project { database: ProjectCreateDatabaseResult | null; } export declare const isNotFound: (error: unknown) => boolean; export declare const isConflict: (error: unknown) => boolean; export declare const extractConnectionSecrets: (connection: DatabaseConnection | DatabaseConnectionWithOptionalSecrets | DatabaseConnectionWithSecrets | undefined | null) => PrismaSecretConnection; export declare const requestBody: (response: DataResponse) => T; export declare const PrismaClientLive: Layer.Layer; //# sourceMappingURL=Client.d.ts.map