@powerlines/plugin-prisma 0.2.243 → 0.2.245

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/api/client/client.gen.d.cts +7 -0
  2. package/dist/api/client/client.gen.d.cts.map +1 -0
  3. package/dist/api/client/client.gen.d.mts +7 -0
  4. package/dist/api/client/client.gen.d.mts.map +1 -0
  5. package/dist/api/client/client.gen.mjs +2 -1
  6. package/dist/api/client/client.gen.mjs.map +1 -0
  7. package/dist/api/client/index.d.cts +8 -0
  8. package/dist/api/client/index.d.mts +8 -0
  9. package/dist/api/client/types.gen.d.cts +131 -0
  10. package/dist/api/client/types.gen.d.cts.map +1 -0
  11. package/dist/api/client/types.gen.d.mts +131 -0
  12. package/dist/api/client/types.gen.d.mts.map +1 -0
  13. package/dist/api/client/utils.gen.d.cts +44 -0
  14. package/dist/api/client/utils.gen.d.cts.map +1 -0
  15. package/dist/api/client/utils.gen.d.mts +44 -0
  16. package/dist/api/client/utils.gen.d.mts.map +1 -0
  17. package/dist/api/client/utils.gen.mjs +2 -1
  18. package/dist/api/client/utils.gen.mjs.map +1 -0
  19. package/dist/api/client.gen.d.cts +19 -0
  20. package/dist/api/client.gen.d.cts.map +1 -0
  21. package/dist/api/client.gen.d.mts +19 -0
  22. package/dist/api/client.gen.d.mts.map +1 -0
  23. package/dist/api/client.gen.mjs +2 -1
  24. package/dist/api/client.gen.mjs.map +1 -0
  25. package/dist/api/core/auth.gen.d.cts +24 -0
  26. package/dist/api/core/auth.gen.d.cts.map +1 -0
  27. package/dist/api/core/auth.gen.d.mts +24 -0
  28. package/dist/api/core/auth.gen.d.mts.map +1 -0
  29. package/dist/api/core/auth.gen.mjs +2 -1
  30. package/dist/api/core/auth.gen.mjs.map +1 -0
  31. package/dist/api/core/bodySerializer.gen.d.cts +32 -0
  32. package/dist/api/core/bodySerializer.gen.d.cts.map +1 -0
  33. package/dist/api/core/bodySerializer.gen.d.mts +32 -0
  34. package/dist/api/core/bodySerializer.gen.d.mts.map +1 -0
  35. package/dist/api/core/bodySerializer.gen.mjs +2 -1
  36. package/dist/api/core/bodySerializer.gen.mjs.map +1 -0
  37. package/dist/api/core/params.gen.d.cts +49 -0
  38. package/dist/api/core/params.gen.d.cts.map +1 -0
  39. package/dist/api/core/params.gen.d.mts +49 -0
  40. package/dist/api/core/params.gen.d.mts.map +1 -0
  41. package/dist/api/core/params.gen.mjs +2 -1
  42. package/dist/api/core/params.gen.mjs.map +1 -0
  43. package/dist/api/core/pathSerializer.gen.d.cts +56 -0
  44. package/dist/api/core/pathSerializer.gen.d.cts.map +1 -0
  45. package/dist/api/core/pathSerializer.gen.d.mts +56 -0
  46. package/dist/api/core/pathSerializer.gen.d.mts.map +1 -0
  47. package/dist/api/core/pathSerializer.gen.mjs +2 -1
  48. package/dist/api/core/pathSerializer.gen.mjs.map +1 -0
  49. package/dist/api/core/queryKeySerializer.gen.d.cts +23 -0
  50. package/dist/api/core/queryKeySerializer.gen.d.cts.map +1 -0
  51. package/dist/api/core/queryKeySerializer.gen.d.mts +23 -0
  52. package/dist/api/core/queryKeySerializer.gen.d.mts.map +1 -0
  53. package/dist/api/core/queryKeySerializer.gen.mjs +2 -1
  54. package/dist/api/core/queryKeySerializer.gen.mjs.map +1 -0
  55. package/dist/api/core/serverSentEvents.gen.d.cts +91 -0
  56. package/dist/api/core/serverSentEvents.gen.d.cts.map +1 -0
  57. package/dist/api/core/serverSentEvents.gen.d.mts +91 -0
  58. package/dist/api/core/serverSentEvents.gen.d.mts.map +1 -0
  59. package/dist/api/core/serverSentEvents.gen.mjs +2 -1
  60. package/dist/api/core/serverSentEvents.gen.mjs.map +1 -0
  61. package/dist/api/core/types.gen.d.cts +80 -0
  62. package/dist/api/core/types.gen.d.cts.map +1 -0
  63. package/dist/api/core/types.gen.d.mts +80 -0
  64. package/dist/api/core/types.gen.d.mts.map +1 -0
  65. package/dist/api/core/utils.gen.d.cts +34 -0
  66. package/dist/api/core/utils.gen.d.cts.map +1 -0
  67. package/dist/api/core/utils.gen.d.mts +34 -0
  68. package/dist/api/core/utils.gen.d.mts.map +1 -0
  69. package/dist/api/core/utils.gen.mjs +2 -1
  70. package/dist/api/core/utils.gen.mjs.map +1 -0
  71. package/dist/api/sdk.gen.cjs +154 -6
  72. package/dist/api/sdk.gen.d.cts +226 -0
  73. package/dist/api/sdk.gen.d.cts.map +1 -0
  74. package/dist/api/sdk.gen.d.mts +226 -0
  75. package/dist/api/sdk.gen.d.mts.map +1 -0
  76. package/dist/api/sdk.gen.mjs +156 -7
  77. package/dist/api/sdk.gen.mjs.map +1 -0
  78. package/dist/api/types.gen.d.cts +2365 -0
  79. package/dist/api/types.gen.d.cts.map +1 -0
  80. package/dist/api/types.gen.d.mts +2365 -0
  81. package/dist/api/types.gen.d.mts.map +1 -0
  82. package/dist/helpers/get-schema.d.cts +14 -0
  83. package/dist/helpers/get-schema.d.cts.map +1 -0
  84. package/dist/helpers/get-schema.d.mts +14 -0
  85. package/dist/helpers/get-schema.d.mts.map +1 -0
  86. package/dist/helpers/get-schema.mjs +2 -1
  87. package/dist/helpers/get-schema.mjs.map +1 -0
  88. package/dist/helpers/index.d.cts +4 -0
  89. package/dist/helpers/index.d.mts +4 -0
  90. package/dist/helpers/prisma-postgres.d.cts +65 -0
  91. package/dist/helpers/prisma-postgres.d.cts.map +1 -0
  92. package/dist/helpers/prisma-postgres.d.mts +65 -0
  93. package/dist/helpers/prisma-postgres.d.mts.map +1 -0
  94. package/dist/helpers/prisma-postgres.mjs +2 -1
  95. package/dist/helpers/prisma-postgres.mjs.map +1 -0
  96. package/dist/helpers/schema-creator.d.cts +21 -0
  97. package/dist/helpers/schema-creator.d.cts.map +1 -0
  98. package/dist/helpers/schema-creator.d.mts +21 -0
  99. package/dist/helpers/schema-creator.d.mts.map +1 -0
  100. package/dist/helpers/schema-creator.mjs +2 -1
  101. package/dist/helpers/schema-creator.mjs.map +1 -0
  102. package/dist/index.cjs +18 -24
  103. package/dist/index.d.cts +24 -0
  104. package/dist/index.d.cts.map +1 -0
  105. package/dist/index.d.mts +24 -0
  106. package/dist/index.d.mts.map +1 -0
  107. package/dist/index.mjs +16 -21
  108. package/dist/index.mjs.map +1 -0
  109. package/dist/types/index.d.cts +3 -0
  110. package/dist/types/index.d.mts +3 -0
  111. package/dist/types/plugin.d.cts +91 -0
  112. package/dist/types/plugin.d.cts.map +1 -0
  113. package/dist/types/plugin.d.mts +91 -0
  114. package/dist/types/plugin.d.mts.map +1 -0
  115. package/dist/types/prisma.d.cts +85 -0
  116. package/dist/types/prisma.d.cts.map +1 -0
  117. package/dist/types/prisma.d.mts +85 -0
  118. package/dist/types/prisma.d.mts.map +1 -0
  119. package/package.json +8 -7
@@ -26,17 +26,80 @@ var PrismaClient = class PrismaClient extends HeyApiClient {
26
26
  PrismaClient.__registry.set(this, args?.key);
27
27
  }
28
28
  /**
29
- * Delete database connection string
29
+ * List connections
30
30
  *
31
- * Deletes the database connection string with the given ID.
31
+ * Returns all connections the actor has access to, with optional database filter.
32
32
  */
33
- deleteDatabaseConnectionString(options) {
33
+ listConnections(options) {
34
+ return (options?.client ?? this.client).get({
35
+ url: "/v1/connections",
36
+ ...options
37
+ });
38
+ }
39
+ /**
40
+ * Create connection
41
+ *
42
+ * Creates a new connection for the specified database.
43
+ */
44
+ createConnection(options) {
45
+ return (options?.client ?? this.client).post({
46
+ url: "/v1/connections",
47
+ ...options,
48
+ headers: {
49
+ "Content-Type": "application/json",
50
+ ...options?.headers
51
+ }
52
+ });
53
+ }
54
+ /**
55
+ * Delete connection
56
+ *
57
+ * Deletes the connection with the given ID.
58
+ */
59
+ deleteConnection(options) {
34
60
  return (options.client ?? this.client).delete({
35
61
  url: "/v1/connections/{id}",
36
62
  ...options
37
63
  });
38
64
  }
39
65
  /**
66
+ * Get connection
67
+ *
68
+ * Returns the connection with the given ID.
69
+ */
70
+ getConnection(options) {
71
+ return (options.client ?? this.client).get({
72
+ url: "/v1/connections/{id}",
73
+ ...options
74
+ });
75
+ }
76
+ /**
77
+ * List databases
78
+ *
79
+ * Returns all databases the token has access to. Optionally filter by project ID.
80
+ */
81
+ listDatabases(options) {
82
+ return (options?.client ?? this.client).get({
83
+ url: "/v1/databases",
84
+ ...options
85
+ });
86
+ }
87
+ /**
88
+ * Create database
89
+ *
90
+ * Creates a new database in the specified project.
91
+ */
92
+ createDatabase(options) {
93
+ return (options?.client ?? this.client).post({
94
+ url: "/v1/databases",
95
+ ...options,
96
+ headers: {
97
+ "Content-Type": "application/json",
98
+ ...options?.headers
99
+ }
100
+ });
101
+ }
102
+ /**
40
103
  * Delete database
41
104
  *
42
105
  * Deletes the database with the given ID.
@@ -59,6 +122,21 @@ var PrismaClient = class PrismaClient extends HeyApiClient {
59
122
  });
60
123
  }
61
124
  /**
125
+ * Update database
126
+ *
127
+ * Updates the database with the given ID.
128
+ */
129
+ updateDatabase(options) {
130
+ return (options.client ?? this.client).patch({
131
+ url: "/v1/databases/{databaseId}",
132
+ ...options,
133
+ headers: {
134
+ "Content-Type": "application/json",
135
+ ...options.headers
136
+ }
137
+ });
138
+ }
139
+ /**
62
140
  * Get list of database connections
63
141
  *
64
142
  * Returns all connections for the given database.
@@ -155,6 +233,21 @@ var PrismaClient = class PrismaClient extends HeyApiClient {
155
233
  });
156
234
  }
157
235
  /**
236
+ * Update project
237
+ *
238
+ * Updates the project with the given ID.
239
+ */
240
+ updateProject(options) {
241
+ return (options.client ?? this.client).patch({
242
+ url: "/v1/projects/{id}",
243
+ ...options,
244
+ headers: {
245
+ "Content-Type": "application/json",
246
+ ...options.headers
247
+ }
248
+ });
249
+ }
250
+ /**
158
251
  * Transfer project
159
252
  *
160
253
  * Transfer the project with the given ID to the new owner's workspace
@@ -174,7 +267,7 @@ var PrismaClient = class PrismaClient extends HeyApiClient {
174
267
  *
175
268
  * Returns databases for the given project.
176
269
  */
177
- listDatabases(options) {
270
+ listDatabases2(options) {
178
271
  return (options.client ?? this.client).get({
179
272
  url: "/v1/projects/{projectId}/databases",
180
273
  ...options
@@ -185,7 +278,7 @@ var PrismaClient = class PrismaClient extends HeyApiClient {
185
278
  *
186
279
  * Creates a new database for the given project.
187
280
  */
188
- createDatabase(options) {
281
+ createDatabase2(options) {
189
282
  return (options.client ?? this.client).post({
190
283
  url: "/v1/projects/{projectId}/databases",
191
284
  ...options,
@@ -198,9 +291,42 @@ var PrismaClient = class PrismaClient extends HeyApiClient {
198
291
  /**
199
292
  * Get list of integrations
200
293
  *
201
- * Returns integrations for the given workspace.
294
+ * Returns integrations filtered by workspace ID.
202
295
  */
203
296
  listIntegrations(options) {
297
+ return (options.client ?? this.client).get({
298
+ url: "/v1/integrations",
299
+ ...options
300
+ });
301
+ }
302
+ /**
303
+ * Delete integration
304
+ *
305
+ * Revokes the integration tokens by integration ID.
306
+ */
307
+ deleteIntegration(options) {
308
+ return (options.client ?? this.client).delete({
309
+ url: "/v1/integrations/{id}",
310
+ ...options
311
+ });
312
+ }
313
+ /**
314
+ * Get integration by ID
315
+ *
316
+ * Returns a single integration by its ID.
317
+ */
318
+ getIntegrationById(options) {
319
+ return (options.client ?? this.client).get({
320
+ url: "/v1/integrations/{id}",
321
+ ...options
322
+ });
323
+ }
324
+ /**
325
+ * Get list of integrations
326
+ *
327
+ * Returns integrations for the given workspace.
328
+ */
329
+ listIntegrations2(options) {
204
330
  return (options.client ?? this.client).get({
205
331
  url: "/v1/workspaces/{workspaceId}/integrations",
206
332
  ...options
@@ -218,6 +344,17 @@ var PrismaClient = class PrismaClient extends HeyApiClient {
218
344
  });
219
345
  }
220
346
  /**
347
+ * Get all regions
348
+ *
349
+ * Returns all available regions across products. Optionally filter by product.
350
+ */
351
+ getAllRegions(options) {
352
+ return (options?.client ?? this.client).get({
353
+ url: "/v1/regions",
354
+ ...options
355
+ });
356
+ }
357
+ /**
221
358
  * Get Prisma Postgres regions
222
359
  *
223
360
  * Returns all available regions for Prisma Postgres.
@@ -250,7 +387,19 @@ var PrismaClient = class PrismaClient extends HeyApiClient {
250
387
  ...options
251
388
  });
252
389
  }
390
+ /**
391
+ * Get workspace
392
+ *
393
+ * Returns the workspace with the given ID.
394
+ */
395
+ getWorkspace(options) {
396
+ return (options.client ?? this.client).get({
397
+ url: "/v1/workspaces/{id}",
398
+ ...options
399
+ });
400
+ }
253
401
  };
254
402
 
255
403
  //#endregion
256
- export { PrismaClient };
404
+ export { PrismaClient };
405
+ //# sourceMappingURL=sdk.gen.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdk.gen.mjs","names":[],"sources":["../../src/api/sdk.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport type { Client, Options as Options2, TDataShape } from './client';\nimport { client } from './client.gen';\nimport type { CreateConnectionData, CreateConnectionErrors, CreateConnectionResponses, CreateDatabase2Data, CreateDatabase2Errors, CreateDatabase2Responses, CreateDatabaseConnectionStringData, CreateDatabaseConnectionStringErrors, CreateDatabaseConnectionStringResponses, CreateDatabaseData, CreateDatabaseErrors, CreateDatabaseResponses, CreateProjectWithPostgresDatabaseData, CreateProjectWithPostgresDatabaseErrors, CreateProjectWithPostgresDatabaseResponses, DeleteConnectionData, DeleteConnectionErrors, DeleteConnectionResponses, DeleteDatabaseData, DeleteDatabaseErrors, DeleteDatabaseResponses, DeleteIntegrationData, DeleteIntegrationErrors, DeleteIntegrationResponses, DeleteProjectData, DeleteProjectErrors, DeleteProjectResponses, GetAllRegionsData, GetAllRegionsErrors, GetAllRegionsResponses, GetConnectionData, GetConnectionErrors, GetConnectionResponses, GetDatabaseData, GetDatabaseErrors, GetDatabaseResponses, GetDatabaseUsageMetricsData, GetDatabaseUsageMetricsErrors, GetDatabaseUsageMetricsResponses, GetIntegrationByIdData, GetIntegrationByIdErrors, GetIntegrationByIdResponses, GetPrismaAccelerateRegionsData, GetPrismaAccelerateRegionsErrors, GetPrismaAccelerateRegionsResponses, GetPrismaPostgresRegionsData, GetPrismaPostgresRegionsErrors, GetPrismaPostgresRegionsResponses, GetProjectData, GetProjectErrors, GetProjectResponses, GetWorkspaceData, GetWorkspaceErrors, GetWorkspaceResponses, ListBackupsData, ListBackupsErrors, ListBackupsResponses, ListConnectionsData, ListConnectionsErrors, ListConnectionsResponses, ListDatabaseConnectionsData, ListDatabaseConnectionsErrors, ListDatabaseConnectionsResponses, ListDatabases2Data, ListDatabases2Errors, ListDatabases2Responses, ListDatabasesData, ListDatabasesErrors, ListDatabasesResponses, ListIntegrations2Data, ListIntegrations2Errors, ListIntegrations2Responses, ListIntegrationsData, ListIntegrationsErrors, ListIntegrationsResponses, ListProjectsData, ListProjectsErrors, ListProjectsResponses, ListWorkspacesData, ListWorkspacesErrors, ListWorkspacesResponses, RevokeIntegrationTokensData, RevokeIntegrationTokensErrors, RevokeIntegrationTokensResponses, TransferProjectData, TransferProjectErrors, TransferProjectResponses, UpdateDatabaseData, UpdateDatabaseErrors, UpdateDatabaseResponses, UpdateProjectData, UpdateProjectErrors, UpdateProjectResponses } from './types.gen';\n\nexport type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {\n /**\n * You can provide a client instance returned by `createClient()` instead of\n * individual options. This might be also useful if you want to implement a\n * custom client.\n */\n client?: Client;\n /**\n * You can pass arbitrary values through the `meta` object. This can be\n * used to access values that aren't defined as part of the SDK function.\n */\n meta?: Record<string, unknown>;\n};\n\nclass HeyApiClient {\n protected client: Client;\n \n constructor(args?: {\n client?: Client;\n }) {\n this.client = args?.client ?? client;\n }\n}\n\nclass HeyApiRegistry<T> {\n private readonly defaultKey = 'default';\n \n private readonly instances: Map<string, T> = new Map();\n \n get(key?: string): T {\n const instance = this.instances.get(key ?? this.defaultKey);\n if (!instance) {\n throw new Error(`No SDK client found. Create one with \"new PrismaClient()\" to fix this error.`);\n }\n return instance;\n }\n \n set(value: T, key?: string): void {\n this.instances.set(key ?? this.defaultKey, value);\n }\n}\n\nexport class PrismaClient extends HeyApiClient {\n public static readonly __registry = new HeyApiRegistry<PrismaClient>();\n \n constructor(args?: {\n client?: Client;\n key?: string;\n }) {\n super(args);\n PrismaClient.__registry.set(this, args?.key);\n }\n \n /**\n * List connections\n *\n * Returns all connections the actor has access to, with optional database filter.\n */\n public listConnections<ThrowOnError extends boolean = true>(options?: Options<ListConnectionsData, ThrowOnError>) {\n return (options?.client ?? this.client).get<ListConnectionsResponses, ListConnectionsErrors, ThrowOnError>({ url: '/v1/connections', ...options });\n }\n \n /**\n * Create connection\n *\n * Creates a new connection for the specified database.\n */\n public createConnection<ThrowOnError extends boolean = true>(options?: Options<CreateConnectionData, ThrowOnError>) {\n return (options?.client ?? this.client).post<CreateConnectionResponses, CreateConnectionErrors, ThrowOnError>({\n url: '/v1/connections',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers\n }\n });\n }\n \n /**\n * Delete connection\n *\n * Deletes the connection with the given ID.\n */\n public deleteConnection<ThrowOnError extends boolean = true>(options: Options<DeleteConnectionData, ThrowOnError>) {\n return (options.client ?? this.client).delete<DeleteConnectionResponses, DeleteConnectionErrors, ThrowOnError>({ url: '/v1/connections/{id}', ...options });\n }\n \n /**\n * Get connection\n *\n * Returns the connection with the given ID.\n */\n public getConnection<ThrowOnError extends boolean = true>(options: Options<GetConnectionData, ThrowOnError>) {\n return (options.client ?? this.client).get<GetConnectionResponses, GetConnectionErrors, ThrowOnError>({ url: '/v1/connections/{id}', ...options });\n }\n \n /**\n * List databases\n *\n * Returns all databases the token has access to. Optionally filter by project ID.\n */\n public listDatabases<ThrowOnError extends boolean = true>(options?: Options<ListDatabasesData, ThrowOnError>) {\n return (options?.client ?? this.client).get<ListDatabasesResponses, ListDatabasesErrors, ThrowOnError>({ url: '/v1/databases', ...options });\n }\n \n /**\n * Create database\n *\n * Creates a new database in the specified project.\n */\n public createDatabase<ThrowOnError extends boolean = true>(options?: Options<CreateDatabaseData, ThrowOnError>) {\n return (options?.client ?? this.client).post<CreateDatabaseResponses, CreateDatabaseErrors, ThrowOnError>({\n url: '/v1/databases',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers\n }\n });\n }\n \n /**\n * Delete database\n *\n * Deletes the database with the given ID.\n */\n public deleteDatabase<ThrowOnError extends boolean = true>(options: Options<DeleteDatabaseData, ThrowOnError>) {\n return (options.client ?? this.client).delete<DeleteDatabaseResponses, DeleteDatabaseErrors, ThrowOnError>({ url: '/v1/databases/{databaseId}', ...options });\n }\n \n /**\n * Get database\n *\n * Returns the database with the given ID.\n */\n public getDatabase<ThrowOnError extends boolean = true>(options: Options<GetDatabaseData, ThrowOnError>) {\n return (options.client ?? this.client).get<GetDatabaseResponses, GetDatabaseErrors, ThrowOnError>({ url: '/v1/databases/{databaseId}', ...options });\n }\n \n /**\n * Update database\n *\n * Updates the database with the given ID.\n */\n public updateDatabase<ThrowOnError extends boolean = true>(options: Options<UpdateDatabaseData, ThrowOnError>) {\n return (options.client ?? this.client).patch<UpdateDatabaseResponses, UpdateDatabaseErrors, ThrowOnError>({\n url: '/v1/databases/{databaseId}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n });\n }\n \n /**\n * Get list of database connections\n *\n * Returns all connections for the given database.\n */\n public listDatabaseConnections<ThrowOnError extends boolean = true>(options: Options<ListDatabaseConnectionsData, ThrowOnError>) {\n return (options.client ?? this.client).get<ListDatabaseConnectionsResponses, ListDatabaseConnectionsErrors, ThrowOnError>({ url: '/v1/databases/{databaseId}/connections', ...options });\n }\n \n /**\n * Create database connection string\n *\n * Creates a new connection string for the given database.\n */\n public createDatabaseConnectionString<ThrowOnError extends boolean = true>(options: Options<CreateDatabaseConnectionStringData, ThrowOnError>) {\n return (options.client ?? this.client).post<CreateDatabaseConnectionStringResponses, CreateDatabaseConnectionStringErrors, ThrowOnError>({\n url: '/v1/databases/{databaseId}/connections',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n });\n }\n \n /**\n * Get list of backups\n *\n * Returns backups for the specified database.\n */\n public listBackups<ThrowOnError extends boolean = true>(options: Options<ListBackupsData, ThrowOnError>) {\n return (options.client ?? this.client).get<ListBackupsResponses, ListBackupsErrors, ThrowOnError>({ url: '/v1/databases/{databaseId}/backups', ...options });\n }\n \n /**\n * Get database usage metrics\n *\n * Returns usage metrics for the specified database.\n */\n public getDatabaseUsageMetrics<ThrowOnError extends boolean = true>(options: Options<GetDatabaseUsageMetricsData, ThrowOnError>) {\n return (options.client ?? this.client).get<GetDatabaseUsageMetricsResponses, GetDatabaseUsageMetricsErrors, ThrowOnError>({ url: '/v1/databases/{databaseId}/usage', ...options });\n }\n \n /**\n * Get list of projects\n *\n * Returns the list of projects the token has access to.\n */\n public listProjects<ThrowOnError extends boolean = true>(options?: Options<ListProjectsData, ThrowOnError>) {\n return (options?.client ?? this.client).get<ListProjectsResponses, ListProjectsErrors, ThrowOnError>({ url: '/v1/projects', ...options });\n }\n \n /**\n * Create project with a postgres database\n *\n * Creates a new project with a postgres database.\n */\n public createProjectWithPostgresDatabase<ThrowOnError extends boolean = true>(options?: Options<CreateProjectWithPostgresDatabaseData, ThrowOnError>) {\n return (options?.client ?? this.client).post<CreateProjectWithPostgresDatabaseResponses, CreateProjectWithPostgresDatabaseErrors, ThrowOnError>({\n url: '/v1/projects',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options?.headers\n }\n });\n }\n \n /**\n * Delete project\n *\n * Deletes the project with the given ID.\n */\n public deleteProject<ThrowOnError extends boolean = true>(options: Options<DeleteProjectData, ThrowOnError>) {\n return (options.client ?? this.client).delete<DeleteProjectResponses, DeleteProjectErrors, ThrowOnError>({ url: '/v1/projects/{id}', ...options });\n }\n \n /**\n * Get project\n *\n * Returns the project with the given ID.\n */\n public getProject<ThrowOnError extends boolean = true>(options: Options<GetProjectData, ThrowOnError>) {\n return (options.client ?? this.client).get<GetProjectResponses, GetProjectErrors, ThrowOnError>({ url: '/v1/projects/{id}', ...options });\n }\n \n /**\n * Update project\n *\n * Updates the project with the given ID.\n */\n public updateProject<ThrowOnError extends boolean = true>(options: Options<UpdateProjectData, ThrowOnError>) {\n return (options.client ?? this.client).patch<UpdateProjectResponses, UpdateProjectErrors, ThrowOnError>({\n url: '/v1/projects/{id}',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n });\n }\n \n /**\n * Transfer project\n *\n * Transfer the project with the given ID to the new owner's workspace\n */\n public transferProject<ThrowOnError extends boolean = true>(options: Options<TransferProjectData, ThrowOnError>) {\n return (options.client ?? this.client).post<TransferProjectResponses, TransferProjectErrors, ThrowOnError>({\n url: '/v1/projects/{id}/transfer',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n });\n }\n \n /**\n * Get list of databases\n *\n * Returns databases for the given project.\n */\n public listDatabases2<ThrowOnError extends boolean = true>(options: Options<ListDatabases2Data, ThrowOnError>) {\n return (options.client ?? this.client).get<ListDatabases2Responses, ListDatabases2Errors, ThrowOnError>({ url: '/v1/projects/{projectId}/databases', ...options });\n }\n \n /**\n * Create database\n *\n * Creates a new database for the given project.\n */\n public createDatabase2<ThrowOnError extends boolean = true>(options: Options<CreateDatabase2Data, ThrowOnError>) {\n return (options.client ?? this.client).post<CreateDatabase2Responses, CreateDatabase2Errors, ThrowOnError>({\n url: '/v1/projects/{projectId}/databases',\n ...options,\n headers: {\n 'Content-Type': 'application/json',\n ...options.headers\n }\n });\n }\n \n /**\n * Get list of integrations\n *\n * Returns integrations filtered by workspace ID.\n */\n public listIntegrations<ThrowOnError extends boolean = true>(options: Options<ListIntegrationsData, ThrowOnError>) {\n return (options.client ?? this.client).get<ListIntegrationsResponses, ListIntegrationsErrors, ThrowOnError>({ url: '/v1/integrations', ...options });\n }\n \n /**\n * Delete integration\n *\n * Revokes the integration tokens by integration ID.\n */\n public deleteIntegration<ThrowOnError extends boolean = true>(options: Options<DeleteIntegrationData, ThrowOnError>) {\n return (options.client ?? this.client).delete<DeleteIntegrationResponses, DeleteIntegrationErrors, ThrowOnError>({ url: '/v1/integrations/{id}', ...options });\n }\n \n /**\n * Get integration by ID\n *\n * Returns a single integration by its ID.\n */\n public getIntegrationById<ThrowOnError extends boolean = true>(options: Options<GetIntegrationByIdData, ThrowOnError>) {\n return (options.client ?? this.client).get<GetIntegrationByIdResponses, GetIntegrationByIdErrors, ThrowOnError>({ url: '/v1/integrations/{id}', ...options });\n }\n \n /**\n * Get list of integrations\n *\n * Returns integrations for the given workspace.\n */\n public listIntegrations2<ThrowOnError extends boolean = true>(options: Options<ListIntegrations2Data, ThrowOnError>) {\n return (options.client ?? this.client).get<ListIntegrations2Responses, ListIntegrations2Errors, ThrowOnError>({ url: '/v1/workspaces/{workspaceId}/integrations', ...options });\n }\n \n /**\n * Revoke integration tokens\n *\n * Revokes the integration tokens with the given client ID.\n */\n public revokeIntegrationTokens<ThrowOnError extends boolean = true>(options: Options<RevokeIntegrationTokensData, ThrowOnError>) {\n return (options.client ?? this.client).delete<RevokeIntegrationTokensResponses, RevokeIntegrationTokensErrors, ThrowOnError>({ url: '/v1/workspaces/{workspaceId}/integrations/{clientId}', ...options });\n }\n \n /**\n * Get all regions\n *\n * Returns all available regions across products. Optionally filter by product.\n */\n public getAllRegions<ThrowOnError extends boolean = true>(options?: Options<GetAllRegionsData, ThrowOnError>) {\n return (options?.client ?? this.client).get<GetAllRegionsResponses, GetAllRegionsErrors, ThrowOnError>({ url: '/v1/regions', ...options });\n }\n \n /**\n * Get Prisma Postgres regions\n *\n * Returns all available regions for Prisma Postgres.\n */\n public getPrismaPostgresRegions<ThrowOnError extends boolean = true>(options?: Options<GetPrismaPostgresRegionsData, ThrowOnError>) {\n return (options?.client ?? this.client).get<GetPrismaPostgresRegionsResponses, GetPrismaPostgresRegionsErrors, ThrowOnError>({ url: '/v1/regions/postgres', ...options });\n }\n \n /**\n * Get Prisma Accelerate regions\n *\n * Returns all available regions for Prisma Accelerate.\n */\n public getPrismaAccelerateRegions<ThrowOnError extends boolean = true>(options?: Options<GetPrismaAccelerateRegionsData, ThrowOnError>) {\n return (options?.client ?? this.client).get<GetPrismaAccelerateRegionsResponses, GetPrismaAccelerateRegionsErrors, ThrowOnError>({ url: '/v1/regions/accelerate', ...options });\n }\n \n /**\n * Get list of workspaces\n *\n * Returns the list of workspaces the current token can access.\n */\n public listWorkspaces<ThrowOnError extends boolean = true>(options?: Options<ListWorkspacesData, ThrowOnError>) {\n return (options?.client ?? this.client).get<ListWorkspacesResponses, ListWorkspacesErrors, ThrowOnError>({ url: '/v1/workspaces', ...options });\n }\n \n /**\n * Get workspace\n *\n * Returns the workspace with the given ID.\n */\n public getWorkspace<ThrowOnError extends boolean = true>(options: Options<GetWorkspaceData, ThrowOnError>) {\n return (options.client ?? this.client).get<GetWorkspaceResponses, GetWorkspaceErrors, ThrowOnError>({ url: '/v1/workspaces/{id}', ...options });\n }\n}\n"],"mappings":";;;AAoBA,IAAM,eAAN,MAAmB;CACf,AAAU;CAEV,YAAY,MAET;AACC,OAAK,SAAS,MAAM,UAAU;;;AAItC,IAAM,iBAAN,MAAwB;CACpB,AAAiB,aAAa;CAE9B,AAAiB,4BAA4B,IAAI,KAAK;CAEtD,IAAI,KAAiB;EACjB,MAAM,WAAW,KAAK,UAAU,IAAI,OAAO,KAAK,WAAW;AAC3D,MAAI,CAAC,SACD,OAAM,IAAI,MAAM,+EAA+E;AAEnG,SAAO;;CAGX,IAAI,OAAU,KAAoB;AAC9B,OAAK,UAAU,IAAI,OAAO,KAAK,YAAY,MAAM;;;AAIzD,IAAa,eAAb,MAAa,qBAAqB,aAAa;CAC3C,OAAuB,aAAa,IAAI,gBAA8B;CAEtE,YAAY,MAGT;AACC,QAAM,KAAK;AACX,eAAa,WAAW,IAAI,MAAM,MAAM,IAAI;;;;;;;CAQhD,AAAO,gBAAqD,SAAsD;AAC9G,UAAQ,SAAS,UAAU,KAAK,QAAQ,IAAmE;GAAE,KAAK;GAAmB,GAAG;GAAS,CAAC;;;;;;;CAQtJ,AAAO,iBAAsD,SAAuD;AAChH,UAAQ,SAAS,UAAU,KAAK,QAAQ,KAAsE;GAC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