pgbeam 0.1.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.
@@ -0,0 +1,328 @@
1
+ /**
2
+ * Generated by scripts/generate-maps.ts — do not edit manually.
3
+ * Run: pnpm --filter pgbeam generate
4
+ */ const operationsByTag = {
5
+ account: {
6
+ exportAccountData: {
7
+ method: "GET",
8
+ path: "/v1/account/export"
9
+ }
10
+ },
11
+ usage: {
12
+ getOrganizationActivity: {
13
+ method: "GET",
14
+ path: "/v1/organizations/{org_id}/activity"
15
+ },
16
+ listPlans: {
17
+ method: "GET",
18
+ path: "/v1/plans"
19
+ },
20
+ getOrganizationPlan: {
21
+ method: "GET",
22
+ path: "/v1/organizations/{org_id}/plan"
23
+ },
24
+ getProjectInsights: {
25
+ method: "GET",
26
+ path: "/v1/projects/{project_id}/insights"
27
+ },
28
+ getOrganizationUsage: {
29
+ method: "GET",
30
+ path: "/v1/organizations/{org_id}/usage"
31
+ },
32
+ getProjectUsage: {
33
+ method: "GET",
34
+ path: "/v1/projects/{project_id}/usage"
35
+ }
36
+ },
37
+ catalog: {
38
+ listQueryCatalog: {
39
+ method: "GET",
40
+ path: "/v1/projects/{project_id}/databases/{database_id}/catalog"
41
+ },
42
+ updateCacheRule: {
43
+ method: "PUT",
44
+ path: "/v1/projects/{project_id}/databases/{database_id}/catalog/{query_hash}/cache-rule"
45
+ }
46
+ },
47
+ databases: {
48
+ listDatabases: {
49
+ method: "GET",
50
+ path: "/v1/projects/{project_id}/databases"
51
+ },
52
+ createDatabase: {
53
+ method: "POST",
54
+ path: "/v1/projects/{project_id}/databases"
55
+ },
56
+ getDatabase: {
57
+ method: "GET",
58
+ path: "/v1/projects/{project_id}/databases/{database_id}"
59
+ },
60
+ updateDatabase: {
61
+ method: "PATCH",
62
+ path: "/v1/projects/{project_id}/databases/{database_id}"
63
+ },
64
+ deleteDatabase: {
65
+ method: "DELETE",
66
+ path: "/v1/projects/{project_id}/databases/{database_id}"
67
+ },
68
+ testDatabaseConnection: {
69
+ method: "POST",
70
+ path: "/v1/projects/{project_id}/databases/{database_id}/test-connection"
71
+ }
72
+ },
73
+ domains: {
74
+ listCustomDomains: {
75
+ method: "GET",
76
+ path: "/v1/projects/{project_id}/domains"
77
+ },
78
+ createCustomDomain: {
79
+ method: "POST",
80
+ path: "/v1/projects/{project_id}/domains"
81
+ },
82
+ deleteCustomDomain: {
83
+ method: "DELETE",
84
+ path: "/v1/projects/{project_id}/domains/{domain_id}"
85
+ },
86
+ verifyCustomDomain: {
87
+ method: "POST",
88
+ path: "/v1/projects/{project_id}/domains/{domain_id}/verify"
89
+ }
90
+ },
91
+ health: {
92
+ getHealth: {
93
+ method: "GET",
94
+ path: "/v1/health"
95
+ }
96
+ },
97
+ onboarding: {
98
+ getOnboardingProgress: {
99
+ method: "GET",
100
+ path: "/v1/organizations/{org_id}/onboarding"
101
+ },
102
+ updateOnboardingProgress: {
103
+ method: "PATCH",
104
+ path: "/v1/organizations/{org_id}/onboarding"
105
+ }
106
+ },
107
+ projects: {
108
+ listProjects: {
109
+ method: "GET",
110
+ path: "/v1/projects"
111
+ },
112
+ createProject: {
113
+ method: "POST",
114
+ path: "/v1/projects"
115
+ },
116
+ getProject: {
117
+ method: "GET",
118
+ path: "/v1/projects/{project_id}"
119
+ },
120
+ updateProject: {
121
+ method: "PATCH",
122
+ path: "/v1/projects/{project_id}"
123
+ },
124
+ deleteProject: {
125
+ method: "DELETE",
126
+ path: "/v1/projects/{project_id}"
127
+ },
128
+ getProjectMetrics: {
129
+ method: "GET",
130
+ path: "/v1/projects/{project_id}/metrics"
131
+ }
132
+ },
133
+ regions: {
134
+ listRegions: {
135
+ method: "GET",
136
+ path: "/v1/regions"
137
+ }
138
+ },
139
+ replicas: {
140
+ listReplicas: {
141
+ method: "GET",
142
+ path: "/v1/databases/{database_id}/replicas"
143
+ },
144
+ createReplica: {
145
+ method: "POST",
146
+ path: "/v1/databases/{database_id}/replicas"
147
+ },
148
+ deleteReplica: {
149
+ method: "DELETE",
150
+ path: "/v1/databases/{database_id}/replicas/{replica_id}"
151
+ }
152
+ },
153
+ waitlist: {
154
+ joinWaitlist: {
155
+ method: "POST",
156
+ path: "/v1/waitlist"
157
+ }
158
+ }
159
+ };
160
+ const operationsByPath = {
161
+ "GET /v1/account/export": {
162
+ method: "GET",
163
+ path: "/v1/account/export",
164
+ operationId: "exportAccountData"
165
+ },
166
+ "GET /v1/organizations/{org_id}/activity": {
167
+ method: "GET",
168
+ path: "/v1/organizations/{org_id}/activity",
169
+ operationId: "getOrganizationActivity"
170
+ },
171
+ "GET /v1/plans": {
172
+ method: "GET",
173
+ path: "/v1/plans",
174
+ operationId: "listPlans"
175
+ },
176
+ "GET /v1/organizations/{org_id}/plan": {
177
+ method: "GET",
178
+ path: "/v1/organizations/{org_id}/plan",
179
+ operationId: "getOrganizationPlan"
180
+ },
181
+ "GET /v1/projects/{project_id}/databases/{database_id}/catalog": {
182
+ method: "GET",
183
+ path: "/v1/projects/{project_id}/databases/{database_id}/catalog",
184
+ operationId: "listQueryCatalog"
185
+ },
186
+ "PUT /v1/projects/{project_id}/databases/{database_id}/catalog/{query_hash}/cache-rule": {
187
+ method: "PUT",
188
+ path: "/v1/projects/{project_id}/databases/{database_id}/catalog/{query_hash}/cache-rule",
189
+ operationId: "updateCacheRule"
190
+ },
191
+ "GET /v1/projects/{project_id}/databases": {
192
+ method: "GET",
193
+ path: "/v1/projects/{project_id}/databases",
194
+ operationId: "listDatabases"
195
+ },
196
+ "POST /v1/projects/{project_id}/databases": {
197
+ method: "POST",
198
+ path: "/v1/projects/{project_id}/databases",
199
+ operationId: "createDatabase"
200
+ },
201
+ "GET /v1/projects/{project_id}/databases/{database_id}": {
202
+ method: "GET",
203
+ path: "/v1/projects/{project_id}/databases/{database_id}",
204
+ operationId: "getDatabase"
205
+ },
206
+ "PATCH /v1/projects/{project_id}/databases/{database_id}": {
207
+ method: "PATCH",
208
+ path: "/v1/projects/{project_id}/databases/{database_id}",
209
+ operationId: "updateDatabase"
210
+ },
211
+ "DELETE /v1/projects/{project_id}/databases/{database_id}": {
212
+ method: "DELETE",
213
+ path: "/v1/projects/{project_id}/databases/{database_id}",
214
+ operationId: "deleteDatabase"
215
+ },
216
+ "POST /v1/projects/{project_id}/databases/{database_id}/test-connection": {
217
+ method: "POST",
218
+ path: "/v1/projects/{project_id}/databases/{database_id}/test-connection",
219
+ operationId: "testDatabaseConnection"
220
+ },
221
+ "GET /v1/projects/{project_id}/domains": {
222
+ method: "GET",
223
+ path: "/v1/projects/{project_id}/domains",
224
+ operationId: "listCustomDomains"
225
+ },
226
+ "POST /v1/projects/{project_id}/domains": {
227
+ method: "POST",
228
+ path: "/v1/projects/{project_id}/domains",
229
+ operationId: "createCustomDomain"
230
+ },
231
+ "DELETE /v1/projects/{project_id}/domains/{domain_id}": {
232
+ method: "DELETE",
233
+ path: "/v1/projects/{project_id}/domains/{domain_id}",
234
+ operationId: "deleteCustomDomain"
235
+ },
236
+ "POST /v1/projects/{project_id}/domains/{domain_id}/verify": {
237
+ method: "POST",
238
+ path: "/v1/projects/{project_id}/domains/{domain_id}/verify",
239
+ operationId: "verifyCustomDomain"
240
+ },
241
+ "GET /v1/health": {
242
+ method: "GET",
243
+ path: "/v1/health",
244
+ operationId: "getHealth"
245
+ },
246
+ "GET /v1/projects/{project_id}/insights": {
247
+ method: "GET",
248
+ path: "/v1/projects/{project_id}/insights",
249
+ operationId: "getProjectInsights"
250
+ },
251
+ "GET /v1/organizations/{org_id}/onboarding": {
252
+ method: "GET",
253
+ path: "/v1/organizations/{org_id}/onboarding",
254
+ operationId: "getOnboardingProgress"
255
+ },
256
+ "PATCH /v1/organizations/{org_id}/onboarding": {
257
+ method: "PATCH",
258
+ path: "/v1/organizations/{org_id}/onboarding",
259
+ operationId: "updateOnboardingProgress"
260
+ },
261
+ "GET /v1/projects": {
262
+ method: "GET",
263
+ path: "/v1/projects",
264
+ operationId: "listProjects"
265
+ },
266
+ "POST /v1/projects": {
267
+ method: "POST",
268
+ path: "/v1/projects",
269
+ operationId: "createProject"
270
+ },
271
+ "GET /v1/projects/{project_id}": {
272
+ method: "GET",
273
+ path: "/v1/projects/{project_id}",
274
+ operationId: "getProject"
275
+ },
276
+ "PATCH /v1/projects/{project_id}": {
277
+ method: "PATCH",
278
+ path: "/v1/projects/{project_id}",
279
+ operationId: "updateProject"
280
+ },
281
+ "DELETE /v1/projects/{project_id}": {
282
+ method: "DELETE",
283
+ path: "/v1/projects/{project_id}",
284
+ operationId: "deleteProject"
285
+ },
286
+ "GET /v1/projects/{project_id}/metrics": {
287
+ method: "GET",
288
+ path: "/v1/projects/{project_id}/metrics",
289
+ operationId: "getProjectMetrics"
290
+ },
291
+ "GET /v1/regions": {
292
+ method: "GET",
293
+ path: "/v1/regions",
294
+ operationId: "listRegions"
295
+ },
296
+ "GET /v1/databases/{database_id}/replicas": {
297
+ method: "GET",
298
+ path: "/v1/databases/{database_id}/replicas",
299
+ operationId: "listReplicas"
300
+ },
301
+ "POST /v1/databases/{database_id}/replicas": {
302
+ method: "POST",
303
+ path: "/v1/databases/{database_id}/replicas",
304
+ operationId: "createReplica"
305
+ },
306
+ "DELETE /v1/databases/{database_id}/replicas/{replica_id}": {
307
+ method: "DELETE",
308
+ path: "/v1/databases/{database_id}/replicas/{replica_id}",
309
+ operationId: "deleteReplica"
310
+ },
311
+ "GET /v1/organizations/{org_id}/usage": {
312
+ method: "GET",
313
+ path: "/v1/organizations/{org_id}/usage",
314
+ operationId: "getOrganizationUsage"
315
+ },
316
+ "GET /v1/projects/{project_id}/usage": {
317
+ method: "GET",
318
+ path: "/v1/projects/{project_id}/usage",
319
+ operationId: "getProjectUsage"
320
+ },
321
+ "POST /v1/waitlist": {
322
+ method: "POST",
323
+ path: "/v1/waitlist",
324
+ operationId: "joinWaitlist"
325
+ }
326
+ };
327
+
328
+ export { operationsByPath, operationsByTag };
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "pgbeam",
3
+ "version": "0.1.0",
4
+ "description": "TypeScript SDK for the PgBeam API — globally distributed PostgreSQL proxy platform",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": {
9
+ "import": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ }
13
+ },
14
+ "./operations": {
15
+ "import": {
16
+ "types": "./dist/operations.d.ts",
17
+ "default": "./dist/operations.js"
18
+ }
19
+ }
20
+ },
21
+ "main": "./dist/index.js",
22
+ "types": "./dist/index.d.ts",
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "files": [
27
+ "dist"
28
+ ],
29
+ "keywords": [
30
+ "pgbeam",
31
+ "postgresql",
32
+ "postgres",
33
+ "proxy",
34
+ "connection-pooling",
35
+ "query-caching",
36
+ "sdk",
37
+ "api-client"
38
+ ],
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "git+https://github.com/sferadev/pgbeam.git",
42
+ "directory": "frontend/packages/sdk"
43
+ },
44
+ "homepage": "https://pgbeam.app",
45
+ "scripts": {
46
+ "generate": "kubb generate && node --import tsx scripts/generate-maps.ts",
47
+ "build": "bunchee",
48
+ "prepublishOnly": "pnpm build"
49
+ },
50
+ "devDependencies": {
51
+ "@kubb/cli": "catalog:",
52
+ "@kubb/core": "catalog:",
53
+ "@kubb/plugin-oas": "catalog:",
54
+ "@kubb/plugin-ts": "catalog:",
55
+ "@pgbeam/config": "workspace:*",
56
+ "@types/js-yaml": "catalog:",
57
+ "bunchee": "catalog:",
58
+ "js-yaml": "catalog:",
59
+ "tsx": "catalog:",
60
+ "typescript": "catalog:"
61
+ }
62
+ }