export type ClientOptions = { baseUrl: `${string}://${string}` | (string & {}); }; export type DeleteDatabaseConnectionStringData = { body?: never; path: { id: string; }; query?: never; url: "/v1/connections/{id}"; }; export type DeleteDatabaseConnectionStringErrors = { /** * Missing or invalid authorization token. */ 401: { error: { code: string; message: string; }; }; /** * Database with the given ID was not found. */ 404: { error: { code: string; message: string; }; }; }; export type DeleteDatabaseConnectionStringError = DeleteDatabaseConnectionStringErrors[keyof DeleteDatabaseConnectionStringErrors]; export type DeleteDatabaseConnectionStringResponses = { /** * Deleted the database connection string. */ 204: void; }; export type DeleteDatabaseConnectionStringResponse = DeleteDatabaseConnectionStringResponses[keyof DeleteDatabaseConnectionStringResponses]; export type DeleteDatabaseData = { body?: never; path: { databaseId: string; }; query?: never; url: "/v1/databases/{databaseId}"; }; export type DeleteDatabaseErrors = { /** * Missing or invalid authorization token. */ 401: { error: { code: string; message: string; }; }; /** * Cannot delete the default environment. */ 403: { error: { code: string; message: string; }; }; /** * Database with the given ID was not found. */ 404: { error: { code: string; message: string; }; }; }; export type DeleteDatabaseError = DeleteDatabaseErrors[keyof DeleteDatabaseErrors]; export type DeleteDatabaseResponses = { /** * Deleted the database successfully. */ 204: void; }; export type DeleteDatabaseResponse = DeleteDatabaseResponses[keyof DeleteDatabaseResponses]; export type GetDatabaseData = { body?: never; path: { databaseId: string; }; query?: never; url: "/v1/databases/{databaseId}"; }; export type GetDatabaseErrors = { /** * Missing or invalid authorization token. */ 401: { error: { code: string; message: string; }; }; /** * Database with the given ID was not found. */ 404: { error: { code: string; message: string; }; }; }; export type GetDatabaseError = GetDatabaseErrors[keyof GetDatabaseErrors]; export type GetDatabaseResponses = { /** * Returned the database with the given ID. */ 200: { data: { id: string; type: "database"; name: string; status: "failure" | "provisioning" | "ready" | "recovering"; createdAt: string; isDefault: boolean; project: { id: string; name: string; }; region: { id: string; name: string; } | null; }; }; }; export type GetDatabaseResponse = GetDatabaseResponses[keyof GetDatabaseResponses]; export type ListDatabaseConnectionsData = { body?: never; path: { databaseId: string; }; query?: { cursor?: string | null; limit?: number; }; url: "/v1/databases/{databaseId}/connections"; }; export type ListDatabaseConnectionsErrors = { /** * Missing or invalid authorization token. */ 401: { error: { code: string; message: string; }; }; }; export type ListDatabaseConnectionsError = ListDatabaseConnectionsErrors[keyof ListDatabaseConnectionsErrors]; export type ListDatabaseConnectionsResponses = { /** * Returned all connections for the given database. */ 200: { data: Array<{ id: string; type: "connection"; name: string; createdAt: string; database: { id: string; name: string; }; }>; pagination: { nextCursor: string | null; hasMore: boolean; }; }; }; export type ListDatabaseConnectionsResponse = ListDatabaseConnectionsResponses[keyof ListDatabaseConnectionsResponses]; export type CreateDatabaseConnectionStringData = { body?: { name: string; }; path: { databaseId: string; }; query?: never; url: "/v1/databases/{databaseId}/connections"; }; export type CreateDatabaseConnectionStringErrors = { /** * Missing or invalid authorization token. */ 401: { error: { code: string; message: string; }; }; /** * Database with the given ID was not found. */ 404: { error: { code: string; message: string; }; }; }; export type CreateDatabaseConnectionStringError = CreateDatabaseConnectionStringErrors[keyof CreateDatabaseConnectionStringErrors]; export type CreateDatabaseConnectionStringResponses = { /** * Created a new connection string for the database. */ 200: { data: { id: string; type: "connection"; name: string; createdAt: string; connectionString: string; database: { id: string; name: string; }; host: string | null; pass: string | null; user: string | null; }; }; }; export type CreateDatabaseConnectionStringResponse = CreateDatabaseConnectionStringResponses[keyof CreateDatabaseConnectionStringResponses]; export type ListBackupsData = { body?: never; path: { databaseId: string; }; query?: { limit?: number; }; url: "/v1/databases/{databaseId}/backups"; }; export type ListBackupsErrors = { /** * Missing or invalid authorization token. */ 401: { error: { code: string; message: string; }; }; /** * Database with the given ID was not found. */ 404: { error: { code: string; message: string; }; }; /** * Remote database backups are not supported */ 422: { error: { code: string; message: string; }; }; }; export type ListBackupsError = ListBackupsErrors[keyof ListBackupsErrors]; export type ListBackupsResponses = { /** * Returned backups for the given database. */ 200: { data: Array<{ id: string; backupType: "full" | "incremental"; createdAt: string; size?: number; status: "running" | "completed" | "failed" | "unknown"; type?: "backup"; }>; meta: { backupRetentionDays: number; }; pagination: { hasMore: boolean; limit: number | null; }; }; }; export type ListBackupsResponse = ListBackupsResponses[keyof ListBackupsResponses]; export type GetDatabaseUsageMetricsData = { body?: never; path: { databaseId: string; }; query?: { /** * Start date for metrics query. Defaults to start of current month if not provided. */ startDate?: string; /** * End date for metrics query. Will be set to end of day if a future date is provided. Defaults to current date if not provided. */ endDate?: string; }; url: "/v1/databases/{databaseId}/usage"; }; export type GetDatabaseUsageMetricsErrors = { /** * Invalid request parameters */ 400: { error: { code: string; message: string; }; }; /** * Missing or invalid authorization token. */ 401: { error: { code: string; message: string; }; }; /** * Database with the given ID was not found. */ 404: { error: { code: string; message: string; }; }; /** * Error occurred while fetching metrics */ 500: { error: { code: string; message: string; }; }; }; export type GetDatabaseUsageMetricsError = GetDatabaseUsageMetricsErrors[keyof GetDatabaseUsageMetricsErrors]; export type GetDatabaseUsageMetricsResponses = { /** * Returned usage metrics for the given database. */ 200: { period: { start: string; end: string; }; metrics: { operations: { used: number; unit: "ops"; }; storage: { used: number; unit: "GiB"; }; }; generatedAt: string; }; }; export type GetDatabaseUsageMetricsResponse = GetDatabaseUsageMetricsResponses[keyof GetDatabaseUsageMetricsResponses]; export type ListProjectsData = { body?: never; path?: never; query?: { cursor?: string | null; limit?: number; }; url: "/v1/projects"; }; export type ListProjectsErrors = { /** * Missing or invalid authorization token. */ 401: { error: { code: string; message: string; }; }; }; export type ListProjectsError = ListProjectsErrors[keyof ListProjectsErrors]; export type ListProjectsResponses = { /** * Returns the list of projects. */ 200: { data: Array<{ id: string; type: "project"; name: string; createdAt: string; workspace: { id: string; name: string; }; }>; pagination: { nextCursor: string | null; hasMore: boolean; }; }; }; export type ListProjectsResponse = ListProjectsResponses[keyof ListProjectsResponses]; export type CreateProjectWithPostgresDatabaseData = { body?: { createDatabase?: boolean; name?: string; region?: "us-east-1" | "us-west-1" | "eu-west-3" | "eu-central-1" | "ap-northeast-1" | "ap-southeast-1"; }; path?: never; query?: never; url: "/v1/projects"; }; export type CreateProjectWithPostgresDatabaseErrors = { /** * Missing or invalid authorization token. */ 401: { error: { code: string; message: string; }; }; }; export type CreateProjectWithPostgresDatabaseError = CreateProjectWithPostgresDatabaseErrors[keyof CreateProjectWithPostgresDatabaseErrors]; export type CreateProjectWithPostgresDatabaseResponses = { /** * New project created. */ 201: { data: { id: string; type: "project"; name: string; createdAt: string; workspace: { id: string; name: string; }; database: { id: string; type: "database"; name: string; status: "provisioning" | "ready"; createdAt: string; isDefault: boolean; region: { id: string; name: string; }; apiKeys: Array<{ id: string; type: "connection"; name: string; createdAt: string; connectionString: string; }>; connectionString: string | null; directConnection: { host: string; pass: string; user: string; } | null; } | null; }; }; }; export type CreateProjectWithPostgresDatabaseResponse = CreateProjectWithPostgresDatabaseResponses[keyof CreateProjectWithPostgresDatabaseResponses]; export type DeleteProjectData = { body?: never; path: { id: string; }; query?: never; url: "/v1/projects/{id}"; }; export type DeleteProjectErrors = { /** * Project cannot be deleted due to existing dependencies. */ 400: { error: { code: string; message: string; }; }; /** * Unauthorized */ 401: { error: { code: string; message: string; }; }; /** * Project with the specified ID was not found */ 404: { error: { code: string; message: string; }; }; }; export type DeleteProjectError = DeleteProjectErrors[keyof DeleteProjectErrors]; export type DeleteProjectResponses = { /** * Project deleted. */ 204: void; }; export type DeleteProjectResponse = DeleteProjectResponses[keyof DeleteProjectResponses]; export type GetProjectData = { body?: never; path: { id: string; }; query?: never; url: "/v1/projects/{id}"; }; export type GetProjectErrors = { /** * Missing or invalid authorization token. */ 401: { error: { code: string; message: string; }; }; /** * Project with the specified ID was not found. */ 404: { error: { code: string; message: string; }; }; }; export type GetProjectError = GetProjectErrors[keyof GetProjectErrors]; export type GetProjectResponses = { /** * Project retrieved. */ 200: { data: { id: string; type: "project"; name: string; createdAt: string; workspace: { id: string; name: string; }; }; }; }; export type GetProjectResponse = GetProjectResponses[keyof GetProjectResponses]; export type TransferProjectData = { body?: { recipientAccessToken: string; }; path: { id: string; }; query?: never; url: "/v1/projects/{id}/transfer"; }; export type TransferProjectErrors = { /** * Missing or invalid authorization token. */ 401: { error: { code: string; message: string; }; }; /** * Project with the given ID was not found. */ 404: { error: { code: string; message: string; }; }; }; export type TransferProjectError = TransferProjectErrors[keyof TransferProjectErrors]; export type TransferProjectResponses = { /** * Project transferred */ 204: void; }; export type TransferProjectResponse = TransferProjectResponses[keyof TransferProjectResponses]; export type ListDatabasesData = { body?: never; path: { projectId: string; }; query?: { cursor?: string | null; limit?: number; }; url: "/v1/projects/{projectId}/databases"; }; export type ListDatabasesErrors = { /** * Missing or invalid authorization token. */ 401: { error: { code: string; message: string; }; }; /** * Project with the given ID was not found. */ 404: { error: { code: string; message: string; }; }; }; export type ListDatabasesError = ListDatabasesErrors[keyof ListDatabasesErrors]; export type ListDatabasesResponses = { /** * Returned the databases for the given project ID. */ 200: { data: Array<{ id: string; type: "database"; name: string; status: "failure" | "provisioning" | "ready" | "recovering"; createdAt: string; isDefault: boolean; project: { id: string; name: string; }; region: { id: string; name: string; } | null; }>; pagination: { nextCursor: string | null; hasMore: boolean; }; }; }; export type ListDatabasesResponse = ListDatabasesResponses[keyof ListDatabasesResponses]; export type CreateDatabaseData = { body?: { region?: "us-east-1" | "us-west-1" | "eu-west-3" | "eu-central-1" | "ap-northeast-1" | "ap-southeast-1"; name?: string; isDefault?: boolean; fromDatabase?: { id: string; backupId?: string; }; }; path: { projectId: string; }; query?: never; url: "/v1/projects/{projectId}/databases"; }; export type CreateDatabaseErrors = { /** * The request is invalid due to missing or invalid parameters. */ 400: { error: { code: string; message: string; }; }; /** * Missing or invalid authorization token. */ 401: { error: { code: string; message: string; }; }; /** * Project does not belong to the service token’s workspace. */ 403: { error: { code: string; message: string; }; }; }; export type CreateDatabaseError = CreateDatabaseErrors[keyof CreateDatabaseErrors]; export type CreateDatabaseResponses = { /** * Created a new database for the project. */ 201: { data: { id: string; type: "database"; name: string; status: "provisioning" | "ready"; createdAt: string; isDefault: boolean; project: { id: string; name: string; }; region: { id: string; name: string; }; apiKeys: Array<{ id: string; type: "connection"; name: string; createdAt: string; connectionString: string; }>; connectionString: string | null; directConnection: { host: string; pass: string; user: string; } | null; }; }; }; export type CreateDatabaseResponse = CreateDatabaseResponses[keyof CreateDatabaseResponses]; export type ListIntegrationsData = { body?: never; path: { workspaceId: string; }; query?: { cursor?: string | null; limit?: number; }; url: "/v1/workspaces/{workspaceId}/integrations"; }; export type ListIntegrationsErrors = { /** * Missing or invalid authorization token. */ 401: { error: { code: string; message: string; }; }; /** * Workspace with the given ID was not found. */ 404: { error: { code: string; message: string; }; }; }; export type ListIntegrationsError = ListIntegrationsErrors[keyof ListIntegrationsErrors]; export type ListIntegrationsResponses = { /** * Returned the integrations for the given workspace ID. */ 200: { data: Array<{ id: string; createdAt: string; scopes: Array; client: { id: string; name: string; createdAt: string; }; createdByUser: { id: string; email: string; displayName: string | null; }; }>; pagination: { nextCursor: string | null; hasMore: boolean; }; }; }; export type ListIntegrationsResponse = ListIntegrationsResponses[keyof ListIntegrationsResponses]; export type RevokeIntegrationTokensData = { body?: never; path: { clientId: string; workspaceId: string; }; query?: never; url: "/v1/workspaces/{workspaceId}/integrations/{clientId}"; }; export type RevokeIntegrationTokensErrors = { /** * Missing or invalid authorization token. */ 401: { error: { code: string; message: string; }; }; /** * Integration with the given client ID was not found. */ 404: { error: { code: string; message: string; }; }; }; export type RevokeIntegrationTokensError = RevokeIntegrationTokensErrors[keyof RevokeIntegrationTokensErrors]; export type RevokeIntegrationTokensResponses = { /** * Revoked the integration tokens. */ 204: void; }; export type RevokeIntegrationTokensResponse = RevokeIntegrationTokensResponses[keyof RevokeIntegrationTokensResponses]; export type GetPrismaPostgresRegionsData = { body?: never; path?: never; query?: never; url: "/v1/regions/postgres"; }; export type GetPrismaPostgresRegionsErrors = { /** * Missing or invalid authorization token. */ 401: { error: { code: string; message: string; }; }; }; export type GetPrismaPostgresRegionsError = GetPrismaPostgresRegionsErrors[keyof GetPrismaPostgresRegionsErrors]; export type GetPrismaPostgresRegionsResponses = { /** * Returns all available regions for Prisma Postgres. */ 200: { data: Array<{ id: string; type: "region"; name: string; status: "available" | "unavailable"; }>; }; }; export type GetPrismaPostgresRegionsResponse = GetPrismaPostgresRegionsResponses[keyof GetPrismaPostgresRegionsResponses]; export type GetPrismaAccelerateRegionsData = { body?: never; path?: never; query?: never; url: "/v1/regions/accelerate"; }; export type GetPrismaAccelerateRegionsErrors = { /** * Missing or invalid authorization token. */ 401: { error: { code: string; message: string; }; }; }; export type GetPrismaAccelerateRegionsError = GetPrismaAccelerateRegionsErrors[keyof GetPrismaAccelerateRegionsErrors]; export type GetPrismaAccelerateRegionsResponses = { /** * Returns all available regions for Prisma Accelerate. */ 200: { data: Array<{ id: string; type: "region"; name: string; }>; }; }; export type GetPrismaAccelerateRegionsResponse = GetPrismaAccelerateRegionsResponses[keyof GetPrismaAccelerateRegionsResponses]; export type ListWorkspacesData = { body?: never; path?: never; query?: { cursor?: string | null; limit?: number; }; url: "/v1/workspaces"; }; export type ListWorkspacesErrors = { /** * Missing or invalid authorization token. */ 401: { error: { code: string; message: string; }; }; }; export type ListWorkspacesError = ListWorkspacesErrors[keyof ListWorkspacesErrors]; export type ListWorkspacesResponses = { /** * Returns the list of workspaces the current token can access. */ 200: { data: Array<{ id: string; type: "workspace"; name: string; createdAt: string; }>; pagination: { nextCursor: string | null; hasMore: boolean; }; }; }; export type ListWorkspacesResponse = ListWorkspacesResponses[keyof ListWorkspacesResponses]; //# sourceMappingURL=types.gen.d.ts.map