@powerlines/plugin-prisma 0.2.242 → 0.2.244

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.
@@ -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,6 +387,17 @@ 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
@@ -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,6 +387,17 @@ 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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-prisma",
3
- "version": "0.2.242",
3
+ "version": "0.2.244",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to generate project code and a Prisma client from a Prisma schema (PSL).",
6
6
  "repository": {
@@ -379,15 +379,15 @@
379
379
  "defu": "^6.1.4",
380
380
  "fp-ts": "^2.16.11",
381
381
  "jiti": "^2.6.1",
382
- "powerlines": "^0.38.55",
382
+ "powerlines": "^0.38.57",
383
383
  "prisma-util": "^2.1.1",
384
384
  "ts-pattern": "^5.9.0"
385
385
  },
386
386
  "devDependencies": {
387
- "@powerlines/plugin-hey-api": "^0.1.242",
388
- "@powerlines/plugin-plugin": "^0.12.239",
389
- "@types/node": "^25.3.0"
387
+ "@powerlines/plugin-hey-api": "^0.1.244",
388
+ "@powerlines/plugin-plugin": "^0.12.241",
389
+ "@types/node": "^25.3.1"
390
390
  },
391
391
  "publishConfig": { "access": "public" },
392
- "gitHead": "2213dc873f7fb5530ee697a86105eddcd21e0150"
392
+ "gitHead": "eb3dbd19bd153aa5a988bce09a1cf05d985cb04b"
393
393
  }