@fusebase/fusebase-gate-sdk 2.2.2-sdk.3 → 2.2.2-sdk.30

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,499 @@
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
+ * Apply SQL migrations
16
+ * Workflow: call `getIsolatedStoreSqlMigrationStatus` with the **same** bundle, confirm `canApply` and expected `pendingCount`, then apply. Applies pending postgres migrations from an ordered bundle into the selected stage database. For prod, gate creates a checkpoint automatically before applying pending migrations. Applied history must match the bundle prefix exactly; drift returns HTTP 409 with `data.issues` (version/name/checksum, journal vs bundle). Optional `dryRun: true` performs the same prefix + optimistic-lock checks as apply but does not run SQL or write the journal (returns `dryRun: true` and the computed status). Optional `expectedLastAppliedVersion` / `expectedLastAppliedChecksum` reject with HTTP 409 before migrations run when the journal tail changed since the client's last status snapshot. Never change name, checksum, or sql for migrations already in the journal — ship fixes as new higher versions (see MCP prompt isolatedSqlMigrationDiscipline). MCP clients often cap tool_call JSON body size (on the order of a few thousand characters); the request includes full SQL text for every bundle version cumulatively, so large bundles may fail or truncate in chat-only MCP. Keep canonical SQL plus a manifest for apply from SDK, CLI, or any non-MCP caller without a tight body-size limit.
17
+ */
18
+ async applyIsolatedStoreSqlMigrations(params) {
19
+ return this.client.request({
20
+ method: "POST",
21
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/migrations/apply",
22
+ pathParams: params.path,
23
+ headers: params.headers,
24
+ body: params.body,
25
+ opId: "applyIsolatedStoreSqlMigrations",
26
+ expectedContentType: "application/json",
27
+ });
28
+ }
29
+ /**
30
+ * Batch insert rows
31
+ * 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).
32
+ */
33
+ async batchInsertIsolatedStoreSqlRows(params) {
34
+ return this.client.request({
35
+ method: "POST",
36
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/rows/batch-insert",
37
+ pathParams: params.path,
38
+ headers: params.headers,
39
+ body: params.body,
40
+ opId: "batchInsertIsolatedStoreSqlRows",
41
+ expectedContentType: "application/json",
42
+ });
43
+ }
44
+ /**
45
+ * Count isolated store NoSQL documents
46
+ * 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.
47
+ */
48
+ async countIsolatedStoreNoSqlDocuments(params) {
49
+ return this.client.request({
50
+ method: "POST",
51
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/nosql/count-documents",
52
+ pathParams: params.path,
53
+ headers: params.headers,
54
+ body: params.body,
55
+ opId: "countIsolatedStoreNoSqlDocuments",
56
+ expectedContentType: "application/json",
57
+ });
58
+ }
59
+ /**
60
+ * Count rows
61
+ * Counts rows in a postgres table using simple structured filters. Useful for pagination without writing raw SQL.
62
+ */
63
+ async countIsolatedStoreSqlRows(params) {
64
+ return this.client.request({
65
+ method: "POST",
66
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/rows/count",
67
+ pathParams: params.path,
68
+ headers: params.headers,
69
+ body: params.body,
70
+ opId: "countIsolatedStoreSqlRows",
71
+ expectedContentType: "application/json",
72
+ });
73
+ }
74
+ /**
75
+ * Create isolated store
76
+ * Registers a low-level store and binds it to the organization scope plus a isolated source scope such as app or app_feature.
77
+ */
78
+ async createIsolatedStore(params) {
79
+ return this.client.request({
80
+ method: "POST",
81
+ path: "/:orgId/isolated-stores",
82
+ pathParams: params.path,
83
+ headers: params.headers,
84
+ body: params.body,
85
+ opId: "createIsolatedStore",
86
+ expectedContentType: "application/json",
87
+ });
88
+ }
89
+ /**
90
+ * Create isolated store checkpoint
91
+ * 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.
92
+ */
93
+ async createIsolatedStoreCheckpoint(params) {
94
+ return this.client.request({
95
+ method: "POST",
96
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/checkpoints",
97
+ pathParams: params.path,
98
+ headers: params.headers,
99
+ body: params.body,
100
+ opId: "createIsolatedStoreCheckpoint",
101
+ expectedContentType: "application/json",
102
+ });
103
+ }
104
+ /**
105
+ * Create isolated store NoSQL collection
106
+ * Creates a collection for a nosql/mongodb_atlas isolated store stage. Collection names use safe identifiers with letters, numbers, and underscores.
107
+ */
108
+ async createIsolatedStoreNoSqlCollection(params) {
109
+ return this.client.request({
110
+ method: "POST",
111
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/nosql/collections",
112
+ pathParams: params.path,
113
+ headers: params.headers,
114
+ body: params.body,
115
+ opId: "createIsolatedStoreNoSqlCollection",
116
+ expectedContentType: "application/json",
117
+ });
118
+ }
119
+ /**
120
+ * Delete isolated store
121
+ * Deletes every stage instance for the store (same behavior as deleteIsolatedStoreStage per stage, including optional drop of auto-provisioned databases), then removes the store registry row and its org/source scope links. Use this to remove the whole store in one call instead of deleting each stage separately.
122
+ */
123
+ async deleteIsolatedStore(params) {
124
+ return this.client.request({
125
+ method: "DELETE",
126
+ path: "/:orgId/isolated-stores/:storeId",
127
+ pathParams: params.path,
128
+ headers: params.headers,
129
+ opId: "deleteIsolatedStore",
130
+ expectedContentType: "application/json",
131
+ });
132
+ }
133
+ /**
134
+ * Delete isolated store NoSQL document
135
+ * Deletes a document by `_id` from a nosql/mongodb_atlas isolated store stage.
136
+ */
137
+ async deleteIsolatedStoreNoSqlDocument(params) {
138
+ return this.client.request({
139
+ method: "DELETE",
140
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/nosql/collections/:collectionName/documents/:documentId",
141
+ pathParams: params.path,
142
+ headers: params.headers,
143
+ opId: "deleteIsolatedStoreNoSqlDocument",
144
+ expectedContentType: "application/json",
145
+ });
146
+ }
147
+ /**
148
+ * Delete rows
149
+ * Deletes rows from a postgres table using structured filters. Filterless deletes are blocked unless allowAll=true is explicitly set.
150
+ */
151
+ async deleteIsolatedStoreSqlRows(params) {
152
+ return this.client.request({
153
+ method: "POST",
154
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/rows/delete",
155
+ pathParams: params.path,
156
+ headers: params.headers,
157
+ body: params.body,
158
+ opId: "deleteIsolatedStoreSqlRows",
159
+ expectedContentType: "application/json",
160
+ });
161
+ }
162
+ /**
163
+ * Delete isolated store stage
164
+ * 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. After deletion the stage no longer appears in listIsolatedStoreStages; recreate it with initIsolatedStoreStage using the same stage name.
165
+ */
166
+ async deleteIsolatedStoreStage(params) {
167
+ return this.client.request({
168
+ method: "DELETE",
169
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage",
170
+ pathParams: params.path,
171
+ headers: params.headers,
172
+ opId: "deleteIsolatedStoreStage",
173
+ expectedContentType: "application/json",
174
+ });
175
+ }
176
+ /**
177
+ * Describe isolated store SQL table
178
+ * Returns postgres column metadata for a single table in the selected isolated store stage instance.
179
+ */
180
+ async describeIsolatedStoreSqlTable(params) {
181
+ return this.client.request({
182
+ method: "GET",
183
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/tables/:tableName",
184
+ pathParams: params.path,
185
+ query: params.query,
186
+ headers: params.headers,
187
+ opId: "describeIsolatedStoreSqlTable",
188
+ expectedContentType: "application/json",
189
+ });
190
+ }
191
+ /**
192
+ * Run writable SQL statement
193
+ * Runs a single raw DML statement with execute access against the postgres binding of the selected isolated store stage instance. Only INSERT, UPDATE, and DELETE are allowed on this privileged escape hatch. DDL and schema changes are blocked here and must go through applyIsolatedStoreSqlMigrations so the stage migration journal (fusebase_schema_migrations) stays authoritative.
194
+ */
195
+ async executeIsolatedStoreSql(params) {
196
+ return this.client.request({
197
+ method: "POST",
198
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/execute",
199
+ pathParams: params.path,
200
+ headers: params.headers,
201
+ body: params.body,
202
+ opId: "executeIsolatedStoreSql",
203
+ expectedContentType: "application/json",
204
+ });
205
+ }
206
+ /**
207
+ * Get isolated store
208
+ * Returns a single isolated store by store global id within the organization scope.
209
+ */
210
+ async getIsolatedStore(params) {
211
+ return this.client.request({
212
+ method: "GET",
213
+ path: "/:orgId/isolated-stores/:storeId",
214
+ pathParams: params.path,
215
+ headers: params.headers,
216
+ opId: "getIsolatedStore",
217
+ expectedContentType: "application/json",
218
+ });
219
+ }
220
+ /**
221
+ * Get isolated store NoSQL document
222
+ * Gets a document by `_id` from a nosql/mongodb_atlas isolated store stage. The document identity comes from the `documentId` path parameter.
223
+ */
224
+ async getIsolatedStoreNoSqlDocument(params) {
225
+ return this.client.request({
226
+ method: "GET",
227
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/nosql/collections/:collectionName/documents/:documentId",
228
+ pathParams: params.path,
229
+ headers: params.headers,
230
+ opId: "getIsolatedStoreNoSqlDocument",
231
+ expectedContentType: "application/json",
232
+ });
233
+ }
234
+ /**
235
+ * Get NoSQL stats
236
+ * Returns collection-level stats for the selected isolated Mongo stage, including collection names, document counts, and storage-size hints when available.
237
+ */
238
+ async getIsolatedStoreNoSqlStats(params) {
239
+ return this.client.request({
240
+ method: "GET",
241
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/nosql/stats",
242
+ pathParams: params.path,
243
+ headers: params.headers,
244
+ opId: "getIsolatedStoreNoSqlStats",
245
+ expectedContentType: "application/json",
246
+ });
247
+ }
248
+ /**
249
+ * Get SQL migration status
250
+ * Compares an ordered SQL migration bundle with the migration journal stored inside the selected postgres stage database. Returns applied migrations, pending migrations, drift issues when the applied history no longer matches the bundle prefix, and `canApply` / `structuredIssues` for automation. Prefer calling this immediately before `applyIsolatedStoreSqlMigrations` with the same bundle. Optional request fields `expectedLastAppliedVersion` / `expectedLastAppliedChecksum` (same semantics as apply) reject with HTTP 409 when the live journal tail disagrees — useful as a cheap preflight without sending `dryRun` on apply. Load MCP prompt isolatedSqlMigrationDiscipline (required with isolatedSql/isolated groups) before interpreting drift — do not edit applied migration metadata or the journal to force a match.
251
+ */
252
+ async getIsolatedStoreSqlMigrationStatus(params) {
253
+ return this.client.request({
254
+ method: "POST",
255
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/migrations/status",
256
+ pathParams: params.path,
257
+ headers: params.headers,
258
+ body: params.body,
259
+ opId: "getIsolatedStoreSqlMigrationStatus",
260
+ expectedContentType: "application/json",
261
+ });
262
+ }
263
+ /**
264
+ * Get SQL stats
265
+ * Returns table-level stats for the selected isolated postgres stage, including tables, columns, row counts, and relation-size hints.
266
+ */
267
+ async getIsolatedStoreSqlStats(params) {
268
+ return this.client.request({
269
+ method: "GET",
270
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/stats",
271
+ pathParams: params.path,
272
+ headers: params.headers,
273
+ opId: "getIsolatedStoreSqlStats",
274
+ expectedContentType: "application/json",
275
+ });
276
+ }
277
+ /**
278
+ * Import NDJSON documents
279
+ * 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.
280
+ */
281
+ async importIsolatedStoreNoSqlDocuments(params) {
282
+ return this.client.request({
283
+ method: "POST",
284
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/nosql/import-documents",
285
+ pathParams: params.path,
286
+ headers: params.headers,
287
+ body: params.body,
288
+ opId: "importIsolatedStoreNoSqlDocuments",
289
+ expectedContentType: "application/json",
290
+ });
291
+ }
292
+ /**
293
+ * Import CSV or TSV rows
294
+ * 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.
295
+ */
296
+ async importIsolatedStoreSqlRows(params) {
297
+ return this.client.request({
298
+ method: "POST",
299
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/rows/import",
300
+ pathParams: params.path,
301
+ headers: params.headers,
302
+ body: params.body,
303
+ opId: "importIsolatedStoreSqlRows",
304
+ expectedContentType: "application/json",
305
+ });
306
+ }
307
+ /**
308
+ * Initialize isolated store stage
309
+ * 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.
310
+ */
311
+ async initIsolatedStoreStage(params) {
312
+ return this.client.request({
313
+ method: "POST",
314
+ path: "/:orgId/isolated-stores/:storeId/stages",
315
+ pathParams: params.path,
316
+ headers: params.headers,
317
+ body: params.body,
318
+ opId: "initIsolatedStoreStage",
319
+ expectedContentType: "application/json",
320
+ });
321
+ }
322
+ /**
323
+ * Insert row
324
+ * Inserts a single row into a postgres table and optionally returns selected columns.
325
+ */
326
+ async insertIsolatedStoreSqlRow(params) {
327
+ return this.client.request({
328
+ method: "POST",
329
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/rows/insert",
330
+ pathParams: params.path,
331
+ headers: params.headers,
332
+ body: params.body,
333
+ opId: "insertIsolatedStoreSqlRow",
334
+ expectedContentType: "application/json",
335
+ });
336
+ }
337
+ /**
338
+ * List isolated store NoSQL collections
339
+ * Lists collections for a nosql/mongodb_atlas isolated store stage. The same contract can be backed by a local isolated Mongo server in development.
340
+ */
341
+ async listIsolatedStoreNoSqlCollections(params) {
342
+ return this.client.request({
343
+ method: "GET",
344
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/nosql/collections",
345
+ pathParams: params.path,
346
+ headers: params.headers,
347
+ opId: "listIsolatedStoreNoSqlCollections",
348
+ expectedContentType: "application/json",
349
+ });
350
+ }
351
+ /**
352
+ * List isolated store revisions
353
+ * Returns version checkpoints for a specific isolated store stage instance.
354
+ */
355
+ async listIsolatedStoreRevisions(params) {
356
+ return this.client.request({
357
+ method: "GET",
358
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/revisions",
359
+ pathParams: params.path,
360
+ headers: params.headers,
361
+ opId: "listIsolatedStoreRevisions",
362
+ expectedContentType: "application/json",
363
+ });
364
+ }
365
+ /**
366
+ * List isolated stores
367
+ * Returns the isolated store registry for the organization. Optional query `clientId` limits results to stores whose `app` source scope `sourceId` matches (same identifier as the token `client` scope for app-owned stores). Omit or leave empty to list all org stores. This is a control-plane endpoint behind FEATURE_FLAGS=isolated_stores.
368
+ */
369
+ async listIsolatedStores(params) {
370
+ return this.client.request({
371
+ method: "GET",
372
+ path: "/:orgId/isolated-stores",
373
+ pathParams: params.path,
374
+ query: params.query,
375
+ headers: params.headers,
376
+ opId: "listIsolatedStores",
377
+ expectedContentType: "application/json",
378
+ });
379
+ }
380
+ /**
381
+ * List isolated store SQL tables
382
+ * Returns postgres tables and views for the requested isolated store stage instance. Token access must include the matching isolated_store_stage_instance resource scope.
383
+ */
384
+ async listIsolatedStoreSqlTables(params) {
385
+ return this.client.request({
386
+ method: "GET",
387
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/tables",
388
+ pathParams: params.path,
389
+ query: params.query,
390
+ headers: params.headers,
391
+ opId: "listIsolatedStoreSqlTables",
392
+ expectedContentType: "application/json",
393
+ });
394
+ }
395
+ /**
396
+ * List isolated store stages
397
+ * Returns stage instances for the selected isolated store. MVP uses separate stage instances for dev and prod.
398
+ */
399
+ async listIsolatedStoreStages(params) {
400
+ return this.client.request({
401
+ method: "GET",
402
+ path: "/:orgId/isolated-stores/:storeId/stages",
403
+ pathParams: params.path,
404
+ headers: params.headers,
405
+ opId: "listIsolatedStoreStages",
406
+ expectedContentType: "application/json",
407
+ });
408
+ }
409
+ /**
410
+ * Put isolated store NoSQL document
411
+ * 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.
412
+ */
413
+ async putIsolatedStoreNoSqlDocument(params) {
414
+ return this.client.request({
415
+ method: "PUT",
416
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/nosql/collections/:collectionName/documents/:documentId",
417
+ pathParams: params.path,
418
+ headers: params.headers,
419
+ body: params.body,
420
+ opId: "putIsolatedStoreNoSqlDocument",
421
+ expectedContentType: "application/json",
422
+ });
423
+ }
424
+ /**
425
+ * Query isolated store NoSQL documents
426
+ * 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.
427
+ */
428
+ async queryIsolatedStoreNoSqlDocuments(params) {
429
+ return this.client.request({
430
+ method: "POST",
431
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/nosql/query-documents",
432
+ pathParams: params.path,
433
+ headers: params.headers,
434
+ body: params.body,
435
+ opId: "queryIsolatedStoreNoSqlDocuments",
436
+ expectedContentType: "application/json",
437
+ });
438
+ }
439
+ /**
440
+ * Run read-only SQL query
441
+ * Runs a single read-only SQL statement against the postgres binding of the selected isolated store stage instance.
442
+ */
443
+ async queryIsolatedStoreSql(params) {
444
+ return this.client.request({
445
+ method: "POST",
446
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/query",
447
+ pathParams: params.path,
448
+ headers: params.headers,
449
+ body: params.body,
450
+ opId: "queryIsolatedStoreSql",
451
+ expectedContentType: "application/json",
452
+ });
453
+ }
454
+ /**
455
+ * Restore isolated store revision
456
+ * 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.
457
+ */
458
+ async restoreIsolatedStoreRevision(params) {
459
+ return this.client.request({
460
+ method: "POST",
461
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/revisions/:revisionId/restore",
462
+ pathParams: params.path,
463
+ headers: params.headers,
464
+ opId: "restoreIsolatedStoreRevision",
465
+ expectedContentType: "application/json",
466
+ });
467
+ }
468
+ /**
469
+ * Select rows
470
+ * Reads rows from a postgres table using simple filters, sort, limit and offset. This is the primary low-overhead runtime read surface.
471
+ */
472
+ async selectIsolatedStoreSqlRows(params) {
473
+ return this.client.request({
474
+ method: "POST",
475
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/rows/select",
476
+ pathParams: params.path,
477
+ headers: params.headers,
478
+ body: params.body,
479
+ opId: "selectIsolatedStoreSqlRows",
480
+ expectedContentType: "application/json",
481
+ });
482
+ }
483
+ /**
484
+ * Update rows
485
+ * Updates rows in a postgres table using structured filters. Filterless updates are blocked unless allowAll=true is explicitly set.
486
+ */
487
+ async updateIsolatedStoreSqlRows(params) {
488
+ return this.client.request({
489
+ method: "POST",
490
+ path: "/:orgId/isolated-stores/:storeId/stages/:stage/sql/rows/update",
491
+ pathParams: params.path,
492
+ headers: params.headers,
493
+ body: params.body,
494
+ opId: "updateIsolatedStoreSqlRows",
495
+ expectedContentType: "application/json",
496
+ });
497
+ }
498
+ }
499
+ exports.IsolatedStoresApi = IsolatedStoresApi;
@@ -23,7 +23,7 @@ export declare class NotesApi {
23
23
  }): Promise<CreateWorkspaceNoteResponseContract>;
24
24
  /**
25
25
  * Create workspace note folder
26
- * Creates a folder in the requested workspace. When parentId is omitted, gate uses `root`.
26
+ * Creates a folder in the requested workspace. When parentId is omitted, gate uses `default`.
27
27
  */
28
28
  createWorkspaceNoteFolder(params: {
29
29
  path: {
@@ -35,7 +35,7 @@ export declare class NotesApi {
35
35
  }): Promise<CreateWorkspaceNoteFolderResponseContract>;
36
36
  /**
37
37
  * Read workspace note
38
- * Returns the note title, parent metadata, and rendered html content for the requested workspace note.
38
+ * Returns the note title, parent metadata, and md content for the requested workspace note.
39
39
  */
40
40
  getWorkspaceNote(params: {
41
41
  path: {
@@ -58,7 +58,7 @@ export declare class NotesApi {
58
58
  }): Promise<WorkspaceNoteFolderListResponseContract>;
59
59
  /**
60
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 root folder id `root`.
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
62
  */
63
63
  listWorkspaceNotes(params: {
64
64
  path: {
@@ -28,7 +28,7 @@ class NotesApi {
28
28
  }
29
29
  /**
30
30
  * Create workspace note folder
31
- * Creates a folder in the requested workspace. When parentId is omitted, gate uses `root`.
31
+ * Creates a folder in the requested workspace. When parentId is omitted, gate uses `default`.
32
32
  */
33
33
  async createWorkspaceNoteFolder(params) {
34
34
  return this.client.request({
@@ -43,7 +43,7 @@ class NotesApi {
43
43
  }
44
44
  /**
45
45
  * Read workspace note
46
- * Returns the note title, parent metadata, and rendered html content for the requested workspace note.
46
+ * Returns the note title, parent metadata, and md content for the requested workspace note.
47
47
  */
48
48
  async getWorkspaceNote(params) {
49
49
  return this.client.request({
@@ -71,7 +71,7 @@ class NotesApi {
71
71
  }
72
72
  /**
73
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 root folder id `root`.
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
75
  */
76
76
  async listWorkspaceNotes(params) {
77
77
  return this.client.request({
@@ -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: {
@@ -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({
@@ -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.
@@ -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
- console.log(`Waiting ${wait}ms before next attempt #${attempt}, ${lastError instanceof Error ? lastError.message : "unknown error"}`);
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,10 @@
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";
11
13
  export { NotesApi } from "./apis/NotesApi";
12
14
  export { OrgUsersApi } from "./apis/OrgUsersApi";
13
15
  export { PortalsApi } from "./apis/PortalsApi";
package/dist/index.js CHANGED
@@ -19,15 +19,19 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
19
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
20
  };
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.WorkspacesApi = exports.TokensApi = exports.SystemApi = exports.PortalsApi = exports.OrgUsersApi = exports.NotesApi = exports.HealthApi = exports.EmailsApi = exports.AccessApi = void 0;
22
+ exports.WorkspacesApi = exports.TokensApi = exports.SystemApi = exports.PortalsApi = exports.OrgUsersApi = exports.NotesApi = exports.IsolatedStoresApi = exports.HealthApi = exports.EmailsApi = exports.BillingApi = exports.AccessApi = void 0;
23
23
  __exportStar(require("./runtime"), exports);
24
24
  __exportStar(require("./types"), exports);
25
25
  var AccessApi_1 = require("./apis/AccessApi");
26
26
  Object.defineProperty(exports, "AccessApi", { enumerable: true, get: function () { return AccessApi_1.AccessApi; } });
27
+ var BillingApi_1 = require("./apis/BillingApi");
28
+ Object.defineProperty(exports, "BillingApi", { enumerable: true, get: function () { return BillingApi_1.BillingApi; } });
27
29
  var EmailsApi_1 = require("./apis/EmailsApi");
28
30
  Object.defineProperty(exports, "EmailsApi", { enumerable: true, get: function () { return EmailsApi_1.EmailsApi; } });
29
31
  var HealthApi_1 = require("./apis/HealthApi");
30
32
  Object.defineProperty(exports, "HealthApi", { enumerable: true, get: function () { return HealthApi_1.HealthApi; } });
33
+ var IsolatedStoresApi_1 = require("./apis/IsolatedStoresApi");
34
+ Object.defineProperty(exports, "IsolatedStoresApi", { enumerable: true, get: function () { return IsolatedStoresApi_1.IsolatedStoresApi; } });
31
35
  var NotesApi_1 = require("./apis/NotesApi");
32
36
  Object.defineProperty(exports, "NotesApi", { enumerable: true, get: function () { return NotesApi_1.NotesApi; } });
33
37
  var OrgUsersApi_1 = require("./apis/OrgUsersApi");