alchemy 0.73.1 → 0.74.0

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 (96) hide show
  1. package/bin/alchemy.js +3311 -4413
  2. package/bin/alchemy.ts +2 -0
  3. package/bin/commands/configure.ts +4 -1
  4. package/bin/commands/util.ts +510 -0
  5. package/lib/cloudflare/bound.d.ts +1 -1
  6. package/lib/cloudflare/bound.d.ts.map +1 -1
  7. package/lib/cloudflare/miniflare/miniflare-worker-proxy.d.ts.map +1 -1
  8. package/lib/cloudflare/miniflare/miniflare-worker-proxy.js +6 -14
  9. package/lib/cloudflare/miniflare/miniflare-worker-proxy.js.map +1 -1
  10. package/lib/cloudflare/miniflare/remote-binding-proxy.d.ts.map +1 -1
  11. package/lib/cloudflare/miniflare/remote-binding-proxy.js +12 -4
  12. package/lib/cloudflare/miniflare/remote-binding-proxy.js.map +1 -1
  13. package/lib/cloudflare/tanstack-start/tanstack-start.d.ts.map +1 -1
  14. package/lib/cloudflare/tanstack-start/tanstack-start.js +8 -1
  15. package/lib/cloudflare/tanstack-start/tanstack-start.js.map +1 -1
  16. package/lib/cloudflare/vite/plugin.d.ts.map +1 -1
  17. package/lib/cloudflare/vite/plugin.js +23 -9
  18. package/lib/cloudflare/vite/plugin.js.map +1 -1
  19. package/lib/planetscale/branch.d.ts +6 -0
  20. package/lib/planetscale/branch.d.ts.map +1 -1
  21. package/lib/planetscale/branch.js +2 -1
  22. package/lib/planetscale/branch.js.map +1 -1
  23. package/lib/planetscale/database.d.ts +6 -0
  24. package/lib/planetscale/database.d.ts.map +1 -1
  25. package/lib/planetscale/database.js +2 -1
  26. package/lib/planetscale/database.js.map +1 -1
  27. package/lib/planetscale/password.d.ts +6 -0
  28. package/lib/planetscale/password.d.ts.map +1 -1
  29. package/lib/planetscale/password.js +2 -1
  30. package/lib/planetscale/password.js.map +1 -1
  31. package/lib/planetscale/role.d.ts +6 -0
  32. package/lib/planetscale/role.d.ts.map +1 -1
  33. package/lib/planetscale/role.js +2 -1
  34. package/lib/planetscale/role.js.map +1 -1
  35. package/lib/prisma-postgres/api/client.gen.d.ts +13 -0
  36. package/lib/prisma-postgres/api/client.gen.d.ts.map +1 -0
  37. package/lib/prisma-postgres/api/client.gen.js +6 -0
  38. package/lib/prisma-postgres/api/client.gen.js.map +1 -0
  39. package/lib/prisma-postgres/api/sdk.gen.d.ts +120 -0
  40. package/lib/prisma-postgres/api/sdk.gen.d.ts.map +1 -0
  41. package/lib/prisma-postgres/api/sdk.gen.js +219 -0
  42. package/lib/prisma-postgres/api/sdk.gen.js.map +1 -0
  43. package/lib/prisma-postgres/api/types.gen.d.ts +957 -0
  44. package/lib/prisma-postgres/api/types.gen.d.ts.map +1 -0
  45. package/lib/prisma-postgres/api/types.gen.js +2 -0
  46. package/lib/prisma-postgres/api/types.gen.js.map +1 -0
  47. package/lib/prisma-postgres/api.d.ts +29 -0
  48. package/lib/prisma-postgres/api.d.ts.map +1 -0
  49. package/lib/prisma-postgres/api.js +49 -0
  50. package/lib/prisma-postgres/api.js.map +1 -0
  51. package/lib/prisma-postgres/connection.d.ts +87 -0
  52. package/lib/prisma-postgres/connection.d.ts.map +1 -0
  53. package/lib/prisma-postgres/connection.js +73 -0
  54. package/lib/prisma-postgres/connection.js.map +1 -0
  55. package/lib/prisma-postgres/database.d.ts +104 -0
  56. package/lib/prisma-postgres/database.d.ts.map +1 -0
  57. package/lib/prisma-postgres/database.js +88 -0
  58. package/lib/prisma-postgres/database.js.map +1 -0
  59. package/lib/prisma-postgres/index.d.ts +5 -0
  60. package/lib/prisma-postgres/index.d.ts.map +1 -0
  61. package/lib/prisma-postgres/index.js +5 -0
  62. package/lib/prisma-postgres/index.js.map +1 -0
  63. package/lib/prisma-postgres/project.d.ts +69 -0
  64. package/lib/prisma-postgres/project.d.ts.map +1 -0
  65. package/lib/prisma-postgres/project.js +62 -0
  66. package/lib/prisma-postgres/project.js.map +1 -0
  67. package/lib/prisma-postgres/workspace.d.ts +18 -0
  68. package/lib/prisma-postgres/workspace.d.ts.map +1 -0
  69. package/lib/prisma-postgres/workspace.js +21 -0
  70. package/lib/prisma-postgres/workspace.js.map +1 -0
  71. package/lib/util/http.d.ts +5 -2
  72. package/lib/util/http.d.ts.map +1 -1
  73. package/lib/util/http.js +71 -26
  74. package/lib/util/http.js.map +1 -1
  75. package/package.json +9 -1
  76. package/src/cloudflare/bound.ts +3 -1
  77. package/src/cloudflare/miniflare/miniflare-worker-proxy.ts +10 -13
  78. package/src/cloudflare/miniflare/remote-binding-proxy.ts +12 -4
  79. package/src/cloudflare/tanstack-start/tanstack-start.ts +9 -1
  80. package/src/cloudflare/vite/plugin.ts +24 -10
  81. package/src/planetscale/branch.ts +9 -1
  82. package/src/planetscale/database.ts +9 -1
  83. package/src/planetscale/password.ts +9 -1
  84. package/src/planetscale/role.ts +9 -1
  85. package/src/prisma-postgres/api/client.gen.ts +27 -0
  86. package/src/prisma-postgres/api/sdk.gen.ts +437 -0
  87. package/src/prisma-postgres/api/types.gen.ts +1096 -0
  88. package/src/prisma-postgres/api.ts +79 -0
  89. package/src/prisma-postgres/connection.ts +154 -0
  90. package/src/prisma-postgres/database.ts +178 -0
  91. package/src/prisma-postgres/index.ts +4 -0
  92. package/src/prisma-postgres/project.ts +131 -0
  93. package/src/prisma-postgres/workspace.ts +27 -0
  94. package/src/util/http.ts +79 -33
  95. package/workers/cloudflare-state-store.js +1 -1
  96. package/workers/tunnel-proxy.js +1 -1
@@ -0,0 +1,219 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ import { client } from "./client.gen.js";
3
+ class _HeyApiClient {
4
+ _client = client;
5
+ constructor(args) {
6
+ if (args?.client) {
7
+ this._client = args.client;
8
+ }
9
+ }
10
+ }
11
+ export class PrismaClient extends _HeyApiClient {
12
+ /**
13
+ * Delete database connection string
14
+ * Deletes the database connection string with the given ID.
15
+ */
16
+ deleteDatabaseConnectionString(options) {
17
+ return (options.client ?? this._client).delete({
18
+ url: "/v1/connections/{id}",
19
+ ...options,
20
+ });
21
+ }
22
+ /**
23
+ * Delete database
24
+ * Deletes the database with the given ID.
25
+ */
26
+ deleteDatabase(options) {
27
+ return (options.client ?? this._client).delete({
28
+ url: "/v1/databases/{databaseId}",
29
+ ...options,
30
+ });
31
+ }
32
+ /**
33
+ * Get database
34
+ * Returns the database with the given ID.
35
+ */
36
+ getDatabase(options) {
37
+ return (options.client ?? this._client).get({
38
+ url: "/v1/databases/{databaseId}",
39
+ ...options,
40
+ });
41
+ }
42
+ /**
43
+ * Get list of database connections
44
+ * Returns all connections for the given database.
45
+ */
46
+ listDatabaseConnections(options) {
47
+ return (options.client ?? this._client).get({
48
+ url: "/v1/databases/{databaseId}/connections",
49
+ ...options,
50
+ });
51
+ }
52
+ /**
53
+ * Create database connection string
54
+ * Creates a new connection string for the given database.
55
+ */
56
+ createDatabaseConnectionString(options) {
57
+ return (options.client ?? this._client).post({
58
+ url: "/v1/databases/{databaseId}/connections",
59
+ ...options,
60
+ headers: {
61
+ "Content-Type": "application/json",
62
+ ...options.headers,
63
+ },
64
+ });
65
+ }
66
+ /**
67
+ * Get list of backups
68
+ * Returns backups for the specified database.
69
+ */
70
+ listBackups(options) {
71
+ return (options.client ?? this._client).get({
72
+ url: "/v1/databases/{databaseId}/backups",
73
+ ...options,
74
+ });
75
+ }
76
+ /**
77
+ * Get database usage metrics
78
+ * Returns usage metrics for the specified database.
79
+ */
80
+ getDatabaseUsageMetrics(options) {
81
+ return (options.client ?? this._client).get({
82
+ url: "/v1/databases/{databaseId}/usage",
83
+ ...options,
84
+ });
85
+ }
86
+ /**
87
+ * Get list of projects
88
+ * Returns the list of projects the token has access to.
89
+ */
90
+ listProjects(options) {
91
+ return (options?.client ?? this._client).get({
92
+ url: "/v1/projects",
93
+ ...options,
94
+ });
95
+ }
96
+ /**
97
+ * Create project with a postgres database
98
+ * Creates a new project with a postgres database.
99
+ */
100
+ createProjectWithPostgresDatabase(options) {
101
+ return (options?.client ?? this._client).post({
102
+ url: "/v1/projects",
103
+ ...options,
104
+ headers: {
105
+ "Content-Type": "application/json",
106
+ ...options?.headers,
107
+ },
108
+ });
109
+ }
110
+ /**
111
+ * Delete project
112
+ * Deletes the project with the given ID.
113
+ */
114
+ deleteProject(options) {
115
+ return (options.client ?? this._client).delete({
116
+ url: "/v1/projects/{id}",
117
+ ...options,
118
+ });
119
+ }
120
+ /**
121
+ * Get project
122
+ * Returns the project with the given ID.
123
+ */
124
+ getProject(options) {
125
+ return (options.client ?? this._client).get({
126
+ url: "/v1/projects/{id}",
127
+ ...options,
128
+ });
129
+ }
130
+ /**
131
+ * Transfer project
132
+ * Transfer the project with the given ID to the new owner's workspace
133
+ */
134
+ transferProject(options) {
135
+ return (options.client ?? this._client).post({
136
+ url: "/v1/projects/{id}/transfer",
137
+ ...options,
138
+ headers: {
139
+ "Content-Type": "application/json",
140
+ ...options.headers,
141
+ },
142
+ });
143
+ }
144
+ /**
145
+ * Get list of databases
146
+ * Returns databases for the given project.
147
+ */
148
+ listDatabases(options) {
149
+ return (options.client ?? this._client).get({
150
+ url: "/v1/projects/{projectId}/databases",
151
+ ...options,
152
+ });
153
+ }
154
+ /**
155
+ * Create database
156
+ * Creates a new database for the given project.
157
+ */
158
+ createDatabase(options) {
159
+ return (options.client ?? this._client).post({
160
+ url: "/v1/projects/{projectId}/databases",
161
+ ...options,
162
+ headers: {
163
+ "Content-Type": "application/json",
164
+ ...options.headers,
165
+ },
166
+ });
167
+ }
168
+ /**
169
+ * Get list of integrations
170
+ * Returns integrations for the given workspace.
171
+ */
172
+ listIntegrations(options) {
173
+ return (options.client ?? this._client).get({
174
+ url: "/v1/workspaces/{workspaceId}/integrations",
175
+ ...options,
176
+ });
177
+ }
178
+ /**
179
+ * Revoke integration tokens
180
+ * Revokes the integration tokens with the given client ID.
181
+ */
182
+ revokeIntegrationTokens(options) {
183
+ return (options.client ?? this._client).delete({
184
+ url: "/v1/workspaces/{workspaceId}/integrations/{clientId}",
185
+ ...options,
186
+ });
187
+ }
188
+ /**
189
+ * Get Prisma Postgres regions
190
+ * Returns all available regions for Prisma Postgres.
191
+ */
192
+ getPrismaPostgresRegions(options) {
193
+ return (options?.client ?? this._client).get({
194
+ url: "/v1/regions/postgres",
195
+ ...options,
196
+ });
197
+ }
198
+ /**
199
+ * Get Prisma Accelerate regions
200
+ * Returns all available regions for Prisma Accelerate.
201
+ */
202
+ getPrismaAccelerateRegions(options) {
203
+ return (options?.client ?? this._client).get({
204
+ url: "/v1/regions/accelerate",
205
+ ...options,
206
+ });
207
+ }
208
+ /**
209
+ * Get list of workspaces
210
+ * Returns the list of workspaces the current token can access.
211
+ */
212
+ listWorkspaces(options) {
213
+ return (options?.client ?? this._client).get({
214
+ url: "/v1/workspaces",
215
+ ...options,
216
+ });
217
+ }
218
+ }
219
+ //# sourceMappingURL=sdk.gen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdk.gen.js","sourceRoot":"","sources":["../../../src/prisma-postgres/api/sdk.gen.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAOrD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AA8EzC,MAAM,aAAa;IACP,OAAO,GAAW,MAAM,CAAC;IAEnC,YAAY,IAEX;QACC,IAAI,IAAI,EAAE,MAAM,EAAE,CAAC;YACjB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAC7B,CAAC;IACH,CAAC;CACF;AAED,MAAM,OAAO,YAAa,SAAQ,aAAa;IAC7C;;;OAGG;IACI,8BAA8B,CACnC,OAAkE;QAElE,OAAO,CAAC,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAI5C;YACA,GAAG,EAAE,sBAAsB;YAC3B,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACI,cAAc,CACnB,OAAkD;QAElD,OAAO,CAAC,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO,CAAC,C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