@fusebase/fusebase-gate-sdk 2.2.2-sdk.2 → 2.2.2-sdk.20
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.
- package/dist/apis/BillingApi.d.ts +89 -0
- package/dist/apis/BillingApi.js +120 -0
- package/dist/apis/IsolatedStoresApi.d.ts +372 -0
- package/dist/apis/IsolatedStoresApi.js +426 -0
- package/dist/apis/NotesApi.d.ts +73 -0
- package/dist/apis/NotesApi.js +88 -0
- package/dist/apis/OrgUsersApi.d.ts +1 -1
- package/dist/apis/OrgUsersApi.js +1 -1
- package/dist/apis/SystemApi.d.ts +8 -1
- package/dist/apis/SystemApi.js +13 -0
- package/dist/extras/fetchWithRetry.js +6 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -1
- package/dist/types/billing/billing.d.ts +102 -0
- package/dist/types/billing/billing.js +13 -0
- package/dist/types/index.d.ts +4 -1
- package/dist/types/index.js +3 -0
- package/dist/types/isolated-store/isolated-store.d.ts +415 -0
- package/dist/types/isolated-store/isolated-store.js +75 -0
- package/dist/types/note/note.d.ts +59 -0
- package/dist/types/note/note.js +7 -0
- package/dist/types/org-user/org-user.d.ts +7 -0
- package/dist/types/system/system.d.ts +8 -0
- package/dist/types/token/token.d.ts +11 -0
- package/package.json +1 -1
- package/release-notes/2.2.2-sdk.20.md +9 -0
- package/release-notes/latest.md +3 -3
- package/release-notes/2.2.2-sdk.2.md +0 -9
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* IsolatedStores API
|
|
4
|
+
*
|
|
5
|
+
* Generated from contract introspection
|
|
6
|
+
* Domain: isolated-stores
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.IsolatedStoresApi = void 0;
|
|
10
|
+
class IsolatedStoresApi {
|
|
11
|
+
constructor(client) {
|
|
12
|
+
this.client = client;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Batch insert rows
|
|
16
|
+
* Inserts multiple rows into a postgres table with a shared column set. Row cap per request is floor(65535 / columnCount) (Postgres bind-parameter limit). For very large loads use importIsolatedStoreSqlRows (COPY FROM STDIN).
|
|
17
|
+
*/
|
|
18
|
+
async batchInsertIsolatedStoreSqlRows(params) {
|
|
19
|
+
return this.client.request({
|
|
20
|
+
method: "POST",
|
|
21
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/rows/batch-insert",
|
|
22
|
+
pathParams: params.path,
|
|
23
|
+
headers: params.headers,
|
|
24
|
+
body: params.body,
|
|
25
|
+
opId: "batchInsertIsolatedStoreSqlRows",
|
|
26
|
+
expectedContentType: "application/json",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Count isolated store NoSQL documents
|
|
31
|
+
* Counts documents in a nosql/mongodb_atlas isolated store stage using the same portable filter operators as query: eq, ne, gt, gte, lt, lte, in, and exists.
|
|
32
|
+
*/
|
|
33
|
+
async countIsolatedStoreNoSqlDocuments(params) {
|
|
34
|
+
return this.client.request({
|
|
35
|
+
method: "POST",
|
|
36
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/nosql/count-documents",
|
|
37
|
+
pathParams: params.path,
|
|
38
|
+
headers: params.headers,
|
|
39
|
+
body: params.body,
|
|
40
|
+
opId: "countIsolatedStoreNoSqlDocuments",
|
|
41
|
+
expectedContentType: "application/json",
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Count rows
|
|
46
|
+
* Counts rows in a postgres table using simple structured filters. Useful for pagination without writing raw SQL.
|
|
47
|
+
*/
|
|
48
|
+
async countIsolatedStoreSqlRows(params) {
|
|
49
|
+
return this.client.request({
|
|
50
|
+
method: "POST",
|
|
51
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/rows/count",
|
|
52
|
+
pathParams: params.path,
|
|
53
|
+
headers: params.headers,
|
|
54
|
+
body: params.body,
|
|
55
|
+
opId: "countIsolatedStoreSqlRows",
|
|
56
|
+
expectedContentType: "application/json",
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Create isolated store
|
|
61
|
+
* Registers a low-level store and binds it to the organization scope plus a isolated source scope such as app or app_feature.
|
|
62
|
+
*/
|
|
63
|
+
async createIsolatedStore(params) {
|
|
64
|
+
return this.client.request({
|
|
65
|
+
method: "POST",
|
|
66
|
+
path: "/:orgId/isolated-stores",
|
|
67
|
+
pathParams: params.path,
|
|
68
|
+
headers: params.headers,
|
|
69
|
+
body: params.body,
|
|
70
|
+
opId: "createIsolatedStore",
|
|
71
|
+
expectedContentType: "application/json",
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Create isolated store checkpoint
|
|
76
|
+
* Creates a new revision marker for the selected stage instance. For sql/postgres stages, gate also creates a physical pg_dump snapshot; for nosql/mongodb_atlas stages, gate creates a physical mongodump archive. The resulting file URL is stored in snapshotRef; a caller-provided snapshotRef is preserved in revision metadata as an external reference.
|
|
77
|
+
*/
|
|
78
|
+
async createIsolatedStoreCheckpoint(params) {
|
|
79
|
+
return this.client.request({
|
|
80
|
+
method: "POST",
|
|
81
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/checkpoints",
|
|
82
|
+
pathParams: params.path,
|
|
83
|
+
headers: params.headers,
|
|
84
|
+
body: params.body,
|
|
85
|
+
opId: "createIsolatedStoreCheckpoint",
|
|
86
|
+
expectedContentType: "application/json",
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Create isolated store NoSQL collection
|
|
91
|
+
* Creates a collection for a nosql/mongodb_atlas isolated store stage. Collection names use safe identifiers with letters, numbers, and underscores.
|
|
92
|
+
*/
|
|
93
|
+
async createIsolatedStoreNoSqlCollection(params) {
|
|
94
|
+
return this.client.request({
|
|
95
|
+
method: "POST",
|
|
96
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/nosql/collections",
|
|
97
|
+
pathParams: params.path,
|
|
98
|
+
headers: params.headers,
|
|
99
|
+
body: params.body,
|
|
100
|
+
opId: "createIsolatedStoreNoSqlCollection",
|
|
101
|
+
expectedContentType: "application/json",
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Delete isolated store NoSQL document
|
|
106
|
+
* Deletes a document by `_id` from a nosql/mongodb_atlas isolated store stage.
|
|
107
|
+
*/
|
|
108
|
+
async deleteIsolatedStoreNoSqlDocument(params) {
|
|
109
|
+
return this.client.request({
|
|
110
|
+
method: "DELETE",
|
|
111
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/nosql/collections/:collectionName/documents/:documentId",
|
|
112
|
+
pathParams: params.path,
|
|
113
|
+
headers: params.headers,
|
|
114
|
+
opId: "deleteIsolatedStoreNoSqlDocument",
|
|
115
|
+
expectedContentType: "application/json",
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Delete rows
|
|
120
|
+
* Deletes rows from a postgres table using structured filters. Filterless deletes are blocked unless allowAll=true is explicitly set.
|
|
121
|
+
*/
|
|
122
|
+
async deleteIsolatedStoreSqlRows(params) {
|
|
123
|
+
return this.client.request({
|
|
124
|
+
method: "POST",
|
|
125
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/rows/delete",
|
|
126
|
+
pathParams: params.path,
|
|
127
|
+
headers: params.headers,
|
|
128
|
+
body: params.body,
|
|
129
|
+
opId: "deleteIsolatedStoreSqlRows",
|
|
130
|
+
expectedContentType: "application/json",
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Delete isolated store stage
|
|
135
|
+
* Removes the stage instance and its revisions. When the stage was auto-provisioned on the isolated Postgres or isolated Mongo server, gate also drops the provisioned database after registry rows are removed.
|
|
136
|
+
*/
|
|
137
|
+
async deleteIsolatedStoreStage(params) {
|
|
138
|
+
return this.client.request({
|
|
139
|
+
method: "DELETE",
|
|
140
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage",
|
|
141
|
+
pathParams: params.path,
|
|
142
|
+
headers: params.headers,
|
|
143
|
+
opId: "deleteIsolatedStoreStage",
|
|
144
|
+
expectedContentType: "application/json",
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Describe isolated store SQL table
|
|
149
|
+
* Returns postgres column metadata for a single table in the selected isolated store stage instance.
|
|
150
|
+
*/
|
|
151
|
+
async describeIsolatedStoreSqlTable(params) {
|
|
152
|
+
return this.client.request({
|
|
153
|
+
method: "GET",
|
|
154
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/tables/:tableName",
|
|
155
|
+
pathParams: params.path,
|
|
156
|
+
query: params.query,
|
|
157
|
+
headers: params.headers,
|
|
158
|
+
opId: "describeIsolatedStoreSqlTable",
|
|
159
|
+
expectedContentType: "application/json",
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Run writable SQL statement
|
|
164
|
+
* Runs a single SQL statement with execute access against the postgres binding of the selected isolated store stage instance.
|
|
165
|
+
*/
|
|
166
|
+
async executeIsolatedStoreSql(params) {
|
|
167
|
+
return this.client.request({
|
|
168
|
+
method: "POST",
|
|
169
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/execute",
|
|
170
|
+
pathParams: params.path,
|
|
171
|
+
headers: params.headers,
|
|
172
|
+
body: params.body,
|
|
173
|
+
opId: "executeIsolatedStoreSql",
|
|
174
|
+
expectedContentType: "application/json",
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Get isolated store
|
|
179
|
+
* Returns a single isolated store by store global id within the organization scope.
|
|
180
|
+
*/
|
|
181
|
+
async getIsolatedStore(params) {
|
|
182
|
+
return this.client.request({
|
|
183
|
+
method: "GET",
|
|
184
|
+
path: "/:orgId/isolated-stores/:storeId",
|
|
185
|
+
pathParams: params.path,
|
|
186
|
+
headers: params.headers,
|
|
187
|
+
opId: "getIsolatedStore",
|
|
188
|
+
expectedContentType: "application/json",
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Get isolated store NoSQL document
|
|
193
|
+
* Gets a document by `_id` from a nosql/mongodb_atlas isolated store stage. The document identity comes from the `documentId` path parameter.
|
|
194
|
+
*/
|
|
195
|
+
async getIsolatedStoreNoSqlDocument(params) {
|
|
196
|
+
return this.client.request({
|
|
197
|
+
method: "GET",
|
|
198
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/nosql/collections/:collectionName/documents/:documentId",
|
|
199
|
+
pathParams: params.path,
|
|
200
|
+
headers: params.headers,
|
|
201
|
+
opId: "getIsolatedStoreNoSqlDocument",
|
|
202
|
+
expectedContentType: "application/json",
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Import NDJSON documents
|
|
207
|
+
* Imports newline-delimited JSON documents into a Mongo collection. Use this bulk path for large seed or migration-style writes instead of per-document tool calls.
|
|
208
|
+
*/
|
|
209
|
+
async importIsolatedStoreNoSqlDocuments(params) {
|
|
210
|
+
return this.client.request({
|
|
211
|
+
method: "POST",
|
|
212
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/nosql/import-documents",
|
|
213
|
+
pathParams: params.path,
|
|
214
|
+
headers: params.headers,
|
|
215
|
+
body: params.body,
|
|
216
|
+
opId: "importIsolatedStoreNoSqlDocuments",
|
|
217
|
+
expectedContentType: "application/json",
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Import CSV or TSV rows
|
|
222
|
+
* Imports CSV or TSV payloads into a postgres table using server-side COPY FROM STDIN. Use this bulk path for large seeds or migrations instead of repeated row inserts. Max UTF-8 payload size defaults to 64MiB (override ISOLATED_SQL_IMPORT_MAX_PAYLOAD_BYTES; hard cap 256MiB); split larger files across multiple calls.
|
|
223
|
+
*/
|
|
224
|
+
async importIsolatedStoreSqlRows(params) {
|
|
225
|
+
return this.client.request({
|
|
226
|
+
method: "POST",
|
|
227
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/rows/import",
|
|
228
|
+
pathParams: params.path,
|
|
229
|
+
headers: params.headers,
|
|
230
|
+
body: params.body,
|
|
231
|
+
opId: "importIsolatedStoreSqlRows",
|
|
232
|
+
expectedContentType: "application/json",
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Initialize isolated store stage
|
|
237
|
+
* Creates a stage instance. For postgres and mongodb_atlas, gate can auto-provision a dedicated stage database when the corresponding isolated server is configured; otherwise an explicit bindingConfig is required.
|
|
238
|
+
*/
|
|
239
|
+
async initIsolatedStoreStage(params) {
|
|
240
|
+
return this.client.request({
|
|
241
|
+
method: "POST",
|
|
242
|
+
path: "/:orgId/isolated-stores/:storeId/stages",
|
|
243
|
+
pathParams: params.path,
|
|
244
|
+
headers: params.headers,
|
|
245
|
+
body: params.body,
|
|
246
|
+
opId: "initIsolatedStoreStage",
|
|
247
|
+
expectedContentType: "application/json",
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Insert row
|
|
252
|
+
* Inserts a single row into a postgres table and optionally returns selected columns.
|
|
253
|
+
*/
|
|
254
|
+
async insertIsolatedStoreSqlRow(params) {
|
|
255
|
+
return this.client.request({
|
|
256
|
+
method: "POST",
|
|
257
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/rows/insert",
|
|
258
|
+
pathParams: params.path,
|
|
259
|
+
headers: params.headers,
|
|
260
|
+
body: params.body,
|
|
261
|
+
opId: "insertIsolatedStoreSqlRow",
|
|
262
|
+
expectedContentType: "application/json",
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* List isolated store NoSQL collections
|
|
267
|
+
* Lists collections for a nosql/mongodb_atlas isolated store stage. The same contract can be backed by a local isolated Mongo server in development.
|
|
268
|
+
*/
|
|
269
|
+
async listIsolatedStoreNoSqlCollections(params) {
|
|
270
|
+
return this.client.request({
|
|
271
|
+
method: "GET",
|
|
272
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/nosql/collections",
|
|
273
|
+
pathParams: params.path,
|
|
274
|
+
headers: params.headers,
|
|
275
|
+
opId: "listIsolatedStoreNoSqlCollections",
|
|
276
|
+
expectedContentType: "application/json",
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* List isolated store revisions
|
|
281
|
+
* Returns version checkpoints for a specific isolated store stage instance.
|
|
282
|
+
*/
|
|
283
|
+
async listIsolatedStoreRevisions(params) {
|
|
284
|
+
return this.client.request({
|
|
285
|
+
method: "GET",
|
|
286
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/revisions",
|
|
287
|
+
pathParams: params.path,
|
|
288
|
+
headers: params.headers,
|
|
289
|
+
opId: "listIsolatedStoreRevisions",
|
|
290
|
+
expectedContentType: "application/json",
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* List isolated stores
|
|
295
|
+
* Returns the isolated store registry for the organization. This is a control-plane endpoint behind FEATURE_FLAGS=isolated_stores.
|
|
296
|
+
*/
|
|
297
|
+
async listIsolatedStores(params) {
|
|
298
|
+
return this.client.request({
|
|
299
|
+
method: "GET",
|
|
300
|
+
path: "/:orgId/isolated-stores",
|
|
301
|
+
pathParams: params.path,
|
|
302
|
+
headers: params.headers,
|
|
303
|
+
opId: "listIsolatedStores",
|
|
304
|
+
expectedContentType: "application/json",
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* List isolated store SQL tables
|
|
309
|
+
* Returns postgres tables and views for the requested isolated store stage instance. Token access must include the matching isolated_store_stage_instance resource scope.
|
|
310
|
+
*/
|
|
311
|
+
async listIsolatedStoreSqlTables(params) {
|
|
312
|
+
return this.client.request({
|
|
313
|
+
method: "GET",
|
|
314
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/tables",
|
|
315
|
+
pathParams: params.path,
|
|
316
|
+
query: params.query,
|
|
317
|
+
headers: params.headers,
|
|
318
|
+
opId: "listIsolatedStoreSqlTables",
|
|
319
|
+
expectedContentType: "application/json",
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* List isolated store stages
|
|
324
|
+
* Returns stage instances for the selected isolated store. MVP uses separate stage instances for dev and prod.
|
|
325
|
+
*/
|
|
326
|
+
async listIsolatedStoreStages(params) {
|
|
327
|
+
return this.client.request({
|
|
328
|
+
method: "GET",
|
|
329
|
+
path: "/:orgId/isolated-stores/:storeId/stages",
|
|
330
|
+
pathParams: params.path,
|
|
331
|
+
headers: params.headers,
|
|
332
|
+
opId: "listIsolatedStoreStages",
|
|
333
|
+
expectedContentType: "application/json",
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Put isolated store NoSQL document
|
|
338
|
+
* Upserts a document by `_id` into a nosql/mongodb_atlas isolated store stage. The `documentId` path parameter is the source of truth for `_id` and overrides any `_id` inside the body document.
|
|
339
|
+
*/
|
|
340
|
+
async putIsolatedStoreNoSqlDocument(params) {
|
|
341
|
+
return this.client.request({
|
|
342
|
+
method: "PUT",
|
|
343
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/nosql/collections/:collectionName/documents/:documentId",
|
|
344
|
+
pathParams: params.path,
|
|
345
|
+
headers: params.headers,
|
|
346
|
+
body: params.body,
|
|
347
|
+
opId: "putIsolatedStoreNoSqlDocument",
|
|
348
|
+
expectedContentType: "application/json",
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Query isolated store NoSQL documents
|
|
353
|
+
* Queries documents from a nosql/mongodb_atlas isolated store stage using portable filters, sort and pagination. Supported operators are eq, ne, gt, gte, lt, lte, in, and exists. Default limit is 100, max limit is 500, max filters is 20, and max sort fields is 5.
|
|
354
|
+
*/
|
|
355
|
+
async queryIsolatedStoreNoSqlDocuments(params) {
|
|
356
|
+
return this.client.request({
|
|
357
|
+
method: "POST",
|
|
358
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/nosql/query-documents",
|
|
359
|
+
pathParams: params.path,
|
|
360
|
+
headers: params.headers,
|
|
361
|
+
body: params.body,
|
|
362
|
+
opId: "queryIsolatedStoreNoSqlDocuments",
|
|
363
|
+
expectedContentType: "application/json",
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Run read-only SQL query
|
|
368
|
+
* Runs a single read-only SQL statement against the postgres binding of the selected isolated store stage instance.
|
|
369
|
+
*/
|
|
370
|
+
async queryIsolatedStoreSql(params) {
|
|
371
|
+
return this.client.request({
|
|
372
|
+
method: "POST",
|
|
373
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/query",
|
|
374
|
+
pathParams: params.path,
|
|
375
|
+
headers: params.headers,
|
|
376
|
+
body: params.body,
|
|
377
|
+
opId: "queryIsolatedStoreSql",
|
|
378
|
+
expectedContentType: "application/json",
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Restore isolated store revision
|
|
383
|
+
* Restores a sql/postgres or nosql/mongodb_atlas stage from a previously created physical file snapshot. For auto-provisioned dedicated stage databases, gate recreates or clears the target database before running pg_restore or mongorestore. Only file:// snapshotRef values are restorable in MVP.
|
|
384
|
+
*/
|
|
385
|
+
async restoreIsolatedStoreRevision(params) {
|
|
386
|
+
return this.client.request({
|
|
387
|
+
method: "POST",
|
|
388
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/revisions/:revisionId/restore",
|
|
389
|
+
pathParams: params.path,
|
|
390
|
+
headers: params.headers,
|
|
391
|
+
opId: "restoreIsolatedStoreRevision",
|
|
392
|
+
expectedContentType: "application/json",
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Select rows
|
|
397
|
+
* Reads rows from a postgres table using simple filters, sort, limit and offset. This is the primary low-overhead runtime read surface.
|
|
398
|
+
*/
|
|
399
|
+
async selectIsolatedStoreSqlRows(params) {
|
|
400
|
+
return this.client.request({
|
|
401
|
+
method: "POST",
|
|
402
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/rows/select",
|
|
403
|
+
pathParams: params.path,
|
|
404
|
+
headers: params.headers,
|
|
405
|
+
body: params.body,
|
|
406
|
+
opId: "selectIsolatedStoreSqlRows",
|
|
407
|
+
expectedContentType: "application/json",
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Update rows
|
|
412
|
+
* Updates rows in a postgres table using structured filters. Filterless updates are blocked unless allowAll=true is explicitly set.
|
|
413
|
+
*/
|
|
414
|
+
async updateIsolatedStoreSqlRows(params) {
|
|
415
|
+
return this.client.request({
|
|
416
|
+
method: "POST",
|
|
417
|
+
path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/rows/update",
|
|
418
|
+
pathParams: params.path,
|
|
419
|
+
headers: params.headers,
|
|
420
|
+
body: params.body,
|
|
421
|
+
opId: "updateIsolatedStoreSqlRows",
|
|
422
|
+
expectedContentType: "application/json",
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
exports.IsolatedStoresApi = IsolatedStoresApi;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notes API
|
|
3
|
+
*
|
|
4
|
+
* Generated from contract introspection
|
|
5
|
+
* Domain: notes
|
|
6
|
+
*/
|
|
7
|
+
import type { Client } from "../runtime/transport";
|
|
8
|
+
import type { CreateWorkspaceNoteFolderRequestContract, CreateWorkspaceNoteFolderResponseContract, CreateWorkspaceNoteRequestContract, CreateWorkspaceNoteResponseContract, orgIdInPathRequired, WorkspaceIdInPathRequired, WorkspaceNoteContentResponseContract, WorkspaceNoteFolderListResponseContract, WorkspaceNoteIdInPathRequired, WorkspaceNoteListResponseContract, WorkspaceNoteParentIdInQueryOptional } from "../types";
|
|
9
|
+
export declare class NotesApi {
|
|
10
|
+
private client;
|
|
11
|
+
constructor(client: Client);
|
|
12
|
+
/**
|
|
13
|
+
* Create workspace note
|
|
14
|
+
* Creates a note in the requested workspace. When parentId is omitted, gate uses `default`. Optional initial text or html can be appended after creation.
|
|
15
|
+
*/
|
|
16
|
+
createWorkspaceNote(params: {
|
|
17
|
+
path: {
|
|
18
|
+
orgId: orgIdInPathRequired;
|
|
19
|
+
workspaceId: WorkspaceIdInPathRequired;
|
|
20
|
+
};
|
|
21
|
+
headers?: Record<string, string>;
|
|
22
|
+
body: CreateWorkspaceNoteRequestContract;
|
|
23
|
+
}): Promise<CreateWorkspaceNoteResponseContract>;
|
|
24
|
+
/**
|
|
25
|
+
* Create workspace note folder
|
|
26
|
+
* Creates a folder in the requested workspace. When parentId is omitted, gate uses `default`.
|
|
27
|
+
*/
|
|
28
|
+
createWorkspaceNoteFolder(params: {
|
|
29
|
+
path: {
|
|
30
|
+
orgId: orgIdInPathRequired;
|
|
31
|
+
workspaceId: WorkspaceIdInPathRequired;
|
|
32
|
+
};
|
|
33
|
+
headers?: Record<string, string>;
|
|
34
|
+
body: CreateWorkspaceNoteFolderRequestContract;
|
|
35
|
+
}): Promise<CreateWorkspaceNoteFolderResponseContract>;
|
|
36
|
+
/**
|
|
37
|
+
* Read workspace note
|
|
38
|
+
* Returns the note title, parent metadata, and md content for the requested workspace note.
|
|
39
|
+
*/
|
|
40
|
+
getWorkspaceNote(params: {
|
|
41
|
+
path: {
|
|
42
|
+
orgId: orgIdInPathRequired;
|
|
43
|
+
workspaceId: WorkspaceIdInPathRequired;
|
|
44
|
+
noteId: WorkspaceNoteIdInPathRequired;
|
|
45
|
+
};
|
|
46
|
+
headers?: Record<string, string>;
|
|
47
|
+
}): Promise<WorkspaceNoteContentResponseContract>;
|
|
48
|
+
/**
|
|
49
|
+
* List workspace note folders
|
|
50
|
+
* Returns non-portal note folders for the requested workspace.
|
|
51
|
+
*/
|
|
52
|
+
listWorkspaceNoteFolders(params: {
|
|
53
|
+
path: {
|
|
54
|
+
orgId: orgIdInPathRequired;
|
|
55
|
+
workspaceId: WorkspaceIdInPathRequired;
|
|
56
|
+
};
|
|
57
|
+
headers?: Record<string, string>;
|
|
58
|
+
}): Promise<WorkspaceNoteFolderListResponseContract>;
|
|
59
|
+
/**
|
|
60
|
+
* List workspace notes
|
|
61
|
+
* Returns non-portal notes for the requested workspace and parent folder. When parentId is omitted, gate defaults to the workspace default folder id `default`.
|
|
62
|
+
*/
|
|
63
|
+
listWorkspaceNotes(params: {
|
|
64
|
+
path: {
|
|
65
|
+
orgId: orgIdInPathRequired;
|
|
66
|
+
workspaceId: WorkspaceIdInPathRequired;
|
|
67
|
+
};
|
|
68
|
+
query?: {
|
|
69
|
+
parentId?: WorkspaceNoteParentIdInQueryOptional;
|
|
70
|
+
};
|
|
71
|
+
headers?: Record<string, string>;
|
|
72
|
+
}): Promise<WorkspaceNoteListResponseContract>;
|
|
73
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Notes API
|
|
4
|
+
*
|
|
5
|
+
* Generated from contract introspection
|
|
6
|
+
* Domain: notes
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.NotesApi = void 0;
|
|
10
|
+
class NotesApi {
|
|
11
|
+
constructor(client) {
|
|
12
|
+
this.client = client;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Create workspace note
|
|
16
|
+
* Creates a note in the requested workspace. When parentId is omitted, gate uses `default`. Optional initial text or html can be appended after creation.
|
|
17
|
+
*/
|
|
18
|
+
async createWorkspaceNote(params) {
|
|
19
|
+
return this.client.request({
|
|
20
|
+
method: "POST",
|
|
21
|
+
path: "/:orgId/workspaces/:workspaceId/notes",
|
|
22
|
+
pathParams: params.path,
|
|
23
|
+
headers: params.headers,
|
|
24
|
+
body: params.body,
|
|
25
|
+
opId: "createWorkspaceNote",
|
|
26
|
+
expectedContentType: "application/json",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Create workspace note folder
|
|
31
|
+
* Creates a folder in the requested workspace. When parentId is omitted, gate uses `default`.
|
|
32
|
+
*/
|
|
33
|
+
async createWorkspaceNoteFolder(params) {
|
|
34
|
+
return this.client.request({
|
|
35
|
+
method: "POST",
|
|
36
|
+
path: "/:orgId/workspaces/:workspaceId/notes/folders",
|
|
37
|
+
pathParams: params.path,
|
|
38
|
+
headers: params.headers,
|
|
39
|
+
body: params.body,
|
|
40
|
+
opId: "createWorkspaceNoteFolder",
|
|
41
|
+
expectedContentType: "application/json",
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Read workspace note
|
|
46
|
+
* Returns the note title, parent metadata, and md content for the requested workspace note.
|
|
47
|
+
*/
|
|
48
|
+
async getWorkspaceNote(params) {
|
|
49
|
+
return this.client.request({
|
|
50
|
+
method: "GET",
|
|
51
|
+
path: "/:orgId/workspaces/:workspaceId/notes/:noteId",
|
|
52
|
+
pathParams: params.path,
|
|
53
|
+
headers: params.headers,
|
|
54
|
+
opId: "getWorkspaceNote",
|
|
55
|
+
expectedContentType: "application/json",
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* List workspace note folders
|
|
60
|
+
* Returns non-portal note folders for the requested workspace.
|
|
61
|
+
*/
|
|
62
|
+
async listWorkspaceNoteFolders(params) {
|
|
63
|
+
return this.client.request({
|
|
64
|
+
method: "GET",
|
|
65
|
+
path: "/:orgId/workspaces/:workspaceId/notes/folders",
|
|
66
|
+
pathParams: params.path,
|
|
67
|
+
headers: params.headers,
|
|
68
|
+
opId: "listWorkspaceNoteFolders",
|
|
69
|
+
expectedContentType: "application/json",
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* List workspace notes
|
|
74
|
+
* Returns non-portal notes for the requested workspace and parent folder. When parentId is omitted, gate defaults to the workspace default folder id `default`.
|
|
75
|
+
*/
|
|
76
|
+
async listWorkspaceNotes(params) {
|
|
77
|
+
return this.client.request({
|
|
78
|
+
method: "GET",
|
|
79
|
+
path: "/:orgId/workspaces/:workspaceId/notes",
|
|
80
|
+
pathParams: params.path,
|
|
81
|
+
query: params.query,
|
|
82
|
+
headers: params.headers,
|
|
83
|
+
opId: "listWorkspaceNotes",
|
|
84
|
+
expectedContentType: "application/json",
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
exports.NotesApi = NotesApi;
|
|
@@ -11,7 +11,7 @@ export declare class OrgUsersApi {
|
|
|
11
11
|
constructor(client: Client);
|
|
12
12
|
/**
|
|
13
13
|
* Add user to organization
|
|
14
|
-
* Invites a user into the organization. Without workspaceId it performs an org invite. With workspaceId it performs a workspace-aware invite and can resolve `default` to the organization's default workspace. Requires org.members.write and org access.
|
|
14
|
+
* Invites a user into the organization. Without workspaceId it performs an org invite. With workspaceId it performs a workspace-aware invite and can resolve `default` to the organization's default workspace. For org-only instant client onboarding, send orgRole=`client` with autoConfirmClientInvite=`true`. A successful write does not prove that the current session already has org access; confirm access with getMyOrgAccess. Requires org.members.write and org access.
|
|
15
15
|
*/
|
|
16
16
|
addOrgUser(params: {
|
|
17
17
|
path: {
|
package/dist/apis/OrgUsersApi.js
CHANGED
|
@@ -13,7 +13,7 @@ class OrgUsersApi {
|
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Add user to organization
|
|
16
|
-
* Invites a user into the organization. Without workspaceId it performs an org invite. With workspaceId it performs a workspace-aware invite and can resolve `default` to the organization's default workspace. Requires org.members.write and org access.
|
|
16
|
+
* Invites a user into the organization. Without workspaceId it performs an org invite. With workspaceId it performs a workspace-aware invite and can resolve `default` to the organization's default workspace. For org-only instant client onboarding, send orgRole=`client` with autoConfirmClientInvite=`true`. A successful write does not prove that the current session already has org access; confirm access with getMyOrgAccess. Requires org.members.write and org access.
|
|
17
17
|
*/
|
|
18
18
|
async addOrgUser(params) {
|
|
19
19
|
return this.client.request({
|
package/dist/apis/SystemApi.d.ts
CHANGED
|
@@ -5,10 +5,17 @@
|
|
|
5
5
|
* Domain: system
|
|
6
6
|
*/
|
|
7
7
|
import type { Client } from "../runtime/transport";
|
|
8
|
-
import type { ResolveOperationPermissionsRequestContract, ResolveOperationPermissionsResponseContract } from "../types";
|
|
8
|
+
import type { ListPermissionCatalogResponseContract, ResolveOperationPermissionsRequestContract, ResolveOperationPermissionsResponseContract } from "../types";
|
|
9
9
|
export declare class SystemApi {
|
|
10
10
|
private client;
|
|
11
11
|
constructor(client: Client);
|
|
12
|
+
/**
|
|
13
|
+
* List all registered permissions
|
|
14
|
+
* Return the full permission catalog registered by the current service, including platform base permissions and service-owned permissions.
|
|
15
|
+
*/
|
|
16
|
+
listPermissionCatalog(params: {
|
|
17
|
+
headers?: Record<string, string>;
|
|
18
|
+
}): Promise<ListPermissionCatalogResponseContract>;
|
|
12
19
|
/**
|
|
13
20
|
* Resolve required permissions for operations
|
|
14
21
|
* Return the unique required permissions for a list of operation identifiers. Supports exact operation ids and sanitized MCP tool names. Public operations contribute no permission.
|
package/dist/apis/SystemApi.js
CHANGED
|
@@ -11,6 +11,19 @@ class SystemApi {
|
|
|
11
11
|
constructor(client) {
|
|
12
12
|
this.client = client;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* List all registered permissions
|
|
16
|
+
* Return the full permission catalog registered by the current service, including platform base permissions and service-owned permissions.
|
|
17
|
+
*/
|
|
18
|
+
async listPermissionCatalog(params) {
|
|
19
|
+
return this.client.request({
|
|
20
|
+
method: "GET",
|
|
21
|
+
path: "/system/permissions/catalog",
|
|
22
|
+
headers: params.headers,
|
|
23
|
+
opId: "listPermissionCatalog",
|
|
24
|
+
expectedContentType: "application/json",
|
|
25
|
+
});
|
|
26
|
+
}
|
|
14
27
|
/**
|
|
15
28
|
* Resolve required permissions for operations
|
|
16
29
|
* Return the unique required permissions for a list of operation identifiers. Supports exact operation ids and sanitized MCP tool names. Public operations contribute no permission.
|
|
@@ -27,7 +27,12 @@ function createFetchWithRetry(baseFetch, { retries = 3, backoffMs = defaultBacko
|
|
|
27
27
|
? backoffMs(attempt, lastResponse, lastError)
|
|
28
28
|
: backoffMs;
|
|
29
29
|
if (wait > 0) {
|
|
30
|
-
|
|
30
|
+
const reason = lastError instanceof Error
|
|
31
|
+
? lastError.message
|
|
32
|
+
: lastResponse != null
|
|
33
|
+
? `HTTP ${lastResponse.status} (retryable response)`
|
|
34
|
+
: "unknown error";
|
|
35
|
+
console.log(`Waiting ${wait}ms before next attempt #${attempt}, ${reason}`);
|
|
31
36
|
await sleep(wait);
|
|
32
37
|
}
|
|
33
38
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,8 +6,11 @@
|
|
|
6
6
|
export * from "./runtime";
|
|
7
7
|
export * from "./types";
|
|
8
8
|
export { AccessApi } from "./apis/AccessApi";
|
|
9
|
+
export { BillingApi } from "./apis/BillingApi";
|
|
9
10
|
export { EmailsApi } from "./apis/EmailsApi";
|
|
10
11
|
export { HealthApi } from "./apis/HealthApi";
|
|
12
|
+
export { IsolatedStoresApi } from "./apis/IsolatedStoresApi";
|
|
13
|
+
export { NotesApi } from "./apis/NotesApi";
|
|
11
14
|
export { OrgUsersApi } from "./apis/OrgUsersApi";
|
|
12
15
|
export { PortalsApi } from "./apis/PortalsApi";
|
|
13
16
|
export { SystemApi } from "./apis/SystemApi";
|