@fusebase/fusebase-gate-sdk 2.2.2-sdk.19 → 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.
@@ -0,0 +1,372 @@
1
+ /**
2
+ * IsolatedStores API
3
+ *
4
+ * Generated from contract introspection
5
+ * Domain: isolated-stores
6
+ */
7
+ import type { Client } from "../runtime/transport";
8
+ import type { CountIsolatedStoreNoSqlDocumentsRequestContract, CountIsolatedStoreNoSqlDocumentsResponseContract, CreateIsolatedStoreCheckpointRequestContract, CreateIsolatedStoreCheckpointResponseContract, CreateIsolatedStoreNoSqlCollectionRequestContract, CreateIsolatedStoreNoSqlCollectionResponseContract, CreateIsolatedStoreRequestContract, CreateIsolatedStoreResponseContract, DeleteIsolatedStoreNoSqlDocumentResponseContract, DeleteIsolatedStoreStageResponseContract, ImportIsolatedStoreNoSqlDocumentsRequestContract, ImportIsolatedStoreNoSqlDocumentsResponseContract, InitIsolatedStoreStageRequestContract, InitIsolatedStoreStageResponseContract, IsolatedStoreIdInPathRequired, IsolatedStoreListResponseContract, IsolatedStoreNoSqlCollectionNameInPathRequired, IsolatedStoreNoSqlDocumentIdInPathRequired, IsolatedStoreNoSqlDocumentResponseContract, IsolatedStoreNoSqlListCollectionsResponseContract, IsolatedStoreResponseContract, IsolatedStoreRevisionIdInPathRequired, IsolatedStoreRevisionListResponseContract, IsolatedStoreSqlBatchInsertRequestContract, IsolatedStoreSqlBatchInsertResponseContract, IsolatedStoreSqlCountRequestContract, IsolatedStoreSqlCountResponseContract, IsolatedStoreSqlDeleteRequestContract, IsolatedStoreSqlDeleteResponseContract, IsolatedStoreSqlDescribeTableResponseContract, IsolatedStoreSqlExecuteRequestContract, IsolatedStoreSqlExecuteResponseContract, IsolatedStoreSqlImportRequestContract, IsolatedStoreSqlImportResponseContract, IsolatedStoreSqlInsertRequestContract, IsolatedStoreSqlInsertResponseContract, IsolatedStoreSqlListTablesResponseContract, IsolatedStoreSqlQueryRequestContract, IsolatedStoreSqlQueryResponseContract, IsolatedStoreSqlSchemaNameInQueryOptional, IsolatedStoreSqlSelectRequestContract, IsolatedStoreSqlSelectResponseContract, IsolatedStoreSqlTableNameInPathRequired, IsolatedStoreSqlUpdateRequestContract, IsolatedStoreSqlUpdateResponseContract, IsolatedStoreStageInPathRequired, IsolatedStoreStageListResponseContract, orgIdInPathRequired, PutIsolatedStoreNoSqlDocumentRequestContract, PutIsolatedStoreNoSqlDocumentResponseContract, QueryIsolatedStoreNoSqlDocumentsRequestContract, QueryIsolatedStoreNoSqlDocumentsResponseContract, RestoreIsolatedStoreRevisionResponseContract } from "../types";
9
+ export declare class IsolatedStoresApi {
10
+ private client;
11
+ constructor(client: Client);
12
+ /**
13
+ * Batch insert rows
14
+ * 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).
15
+ */
16
+ batchInsertIsolatedStoreSqlRows(params: {
17
+ path: {
18
+ orgId: orgIdInPathRequired;
19
+ storeId: IsolatedStoreIdInPathRequired;
20
+ stage: IsolatedStoreStageInPathRequired;
21
+ };
22
+ headers?: Record<string, string>;
23
+ body: IsolatedStoreSqlBatchInsertRequestContract;
24
+ }): Promise<IsolatedStoreSqlBatchInsertResponseContract>;
25
+ /**
26
+ * Count isolated store NoSQL documents
27
+ * 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.
28
+ */
29
+ countIsolatedStoreNoSqlDocuments(params: {
30
+ path: {
31
+ orgId: orgIdInPathRequired;
32
+ storeId: IsolatedStoreIdInPathRequired;
33
+ stage: IsolatedStoreStageInPathRequired;
34
+ };
35
+ headers?: Record<string, string>;
36
+ body: CountIsolatedStoreNoSqlDocumentsRequestContract;
37
+ }): Promise<CountIsolatedStoreNoSqlDocumentsResponseContract>;
38
+ /**
39
+ * Count rows
40
+ * Counts rows in a postgres table using simple structured filters. Useful for pagination without writing raw SQL.
41
+ */
42
+ countIsolatedStoreSqlRows(params: {
43
+ path: {
44
+ orgId: orgIdInPathRequired;
45
+ storeId: IsolatedStoreIdInPathRequired;
46
+ stage: IsolatedStoreStageInPathRequired;
47
+ };
48
+ headers?: Record<string, string>;
49
+ body: IsolatedStoreSqlCountRequestContract;
50
+ }): Promise<IsolatedStoreSqlCountResponseContract>;
51
+ /**
52
+ * Create isolated store
53
+ * Registers a low-level store and binds it to the organization scope plus a isolated source scope such as app or app_feature.
54
+ */
55
+ createIsolatedStore(params: {
56
+ path: {
57
+ orgId: orgIdInPathRequired;
58
+ };
59
+ headers?: Record<string, string>;
60
+ body: CreateIsolatedStoreRequestContract;
61
+ }): Promise<CreateIsolatedStoreResponseContract>;
62
+ /**
63
+ * Create isolated store checkpoint
64
+ * 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.
65
+ */
66
+ createIsolatedStoreCheckpoint(params: {
67
+ path: {
68
+ orgId: orgIdInPathRequired;
69
+ storeId: IsolatedStoreIdInPathRequired;
70
+ stage: IsolatedStoreStageInPathRequired;
71
+ };
72
+ headers?: Record<string, string>;
73
+ body: CreateIsolatedStoreCheckpointRequestContract;
74
+ }): Promise<CreateIsolatedStoreCheckpointResponseContract>;
75
+ /**
76
+ * Create isolated store NoSQL collection
77
+ * Creates a collection for a nosql/mongodb_atlas isolated store stage. Collection names use safe identifiers with letters, numbers, and underscores.
78
+ */
79
+ createIsolatedStoreNoSqlCollection(params: {
80
+ path: {
81
+ orgId: orgIdInPathRequired;
82
+ storeId: IsolatedStoreIdInPathRequired;
83
+ stage: IsolatedStoreStageInPathRequired;
84
+ };
85
+ headers?: Record<string, string>;
86
+ body: CreateIsolatedStoreNoSqlCollectionRequestContract;
87
+ }): Promise<CreateIsolatedStoreNoSqlCollectionResponseContract>;
88
+ /**
89
+ * Delete isolated store NoSQL document
90
+ * Deletes a document by `_id` from a nosql/mongodb_atlas isolated store stage.
91
+ */
92
+ deleteIsolatedStoreNoSqlDocument(params: {
93
+ path: {
94
+ orgId: orgIdInPathRequired;
95
+ storeId: IsolatedStoreIdInPathRequired;
96
+ stage: IsolatedStoreStageInPathRequired;
97
+ collectionName: IsolatedStoreNoSqlCollectionNameInPathRequired;
98
+ documentId: IsolatedStoreNoSqlDocumentIdInPathRequired;
99
+ };
100
+ headers?: Record<string, string>;
101
+ }): Promise<DeleteIsolatedStoreNoSqlDocumentResponseContract>;
102
+ /**
103
+ * Delete rows
104
+ * Deletes rows from a postgres table using structured filters. Filterless deletes are blocked unless allowAll=true is explicitly set.
105
+ */
106
+ deleteIsolatedStoreSqlRows(params: {
107
+ path: {
108
+ orgId: orgIdInPathRequired;
109
+ storeId: IsolatedStoreIdInPathRequired;
110
+ stage: IsolatedStoreStageInPathRequired;
111
+ };
112
+ headers?: Record<string, string>;
113
+ body: IsolatedStoreSqlDeleteRequestContract;
114
+ }): Promise<IsolatedStoreSqlDeleteResponseContract>;
115
+ /**
116
+ * Delete isolated store stage
117
+ * 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.
118
+ */
119
+ deleteIsolatedStoreStage(params: {
120
+ path: {
121
+ orgId: orgIdInPathRequired;
122
+ storeId: IsolatedStoreIdInPathRequired;
123
+ stage: IsolatedStoreStageInPathRequired;
124
+ };
125
+ headers?: Record<string, string>;
126
+ }): Promise<DeleteIsolatedStoreStageResponseContract>;
127
+ /**
128
+ * Describe isolated store SQL table
129
+ * Returns postgres column metadata for a single table in the selected isolated store stage instance.
130
+ */
131
+ describeIsolatedStoreSqlTable(params: {
132
+ path: {
133
+ orgId: orgIdInPathRequired;
134
+ storeId: IsolatedStoreIdInPathRequired;
135
+ stage: IsolatedStoreStageInPathRequired;
136
+ tableName: IsolatedStoreSqlTableNameInPathRequired;
137
+ };
138
+ query?: {
139
+ schemaName?: IsolatedStoreSqlSchemaNameInQueryOptional;
140
+ };
141
+ headers?: Record<string, string>;
142
+ }): Promise<IsolatedStoreSqlDescribeTableResponseContract>;
143
+ /**
144
+ * Run writable SQL statement
145
+ * Runs a single SQL statement with execute access against the postgres binding of the selected isolated store stage instance.
146
+ */
147
+ executeIsolatedStoreSql(params: {
148
+ path: {
149
+ orgId: orgIdInPathRequired;
150
+ storeId: IsolatedStoreIdInPathRequired;
151
+ stage: IsolatedStoreStageInPathRequired;
152
+ };
153
+ headers?: Record<string, string>;
154
+ body: IsolatedStoreSqlExecuteRequestContract;
155
+ }): Promise<IsolatedStoreSqlExecuteResponseContract>;
156
+ /**
157
+ * Get isolated store
158
+ * Returns a single isolated store by store global id within the organization scope.
159
+ */
160
+ getIsolatedStore(params: {
161
+ path: {
162
+ orgId: orgIdInPathRequired;
163
+ storeId: IsolatedStoreIdInPathRequired;
164
+ };
165
+ headers?: Record<string, string>;
166
+ }): Promise<IsolatedStoreResponseContract>;
167
+ /**
168
+ * Get isolated store NoSQL document
169
+ * Gets a document by `_id` from a nosql/mongodb_atlas isolated store stage. The document identity comes from the `documentId` path parameter.
170
+ */
171
+ getIsolatedStoreNoSqlDocument(params: {
172
+ path: {
173
+ orgId: orgIdInPathRequired;
174
+ storeId: IsolatedStoreIdInPathRequired;
175
+ stage: IsolatedStoreStageInPathRequired;
176
+ collectionName: IsolatedStoreNoSqlCollectionNameInPathRequired;
177
+ documentId: IsolatedStoreNoSqlDocumentIdInPathRequired;
178
+ };
179
+ headers?: Record<string, string>;
180
+ }): Promise<IsolatedStoreNoSqlDocumentResponseContract>;
181
+ /**
182
+ * Import NDJSON documents
183
+ * 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.
184
+ */
185
+ importIsolatedStoreNoSqlDocuments(params: {
186
+ path: {
187
+ orgId: orgIdInPathRequired;
188
+ storeId: IsolatedStoreIdInPathRequired;
189
+ stage: IsolatedStoreStageInPathRequired;
190
+ };
191
+ headers?: Record<string, string>;
192
+ body: ImportIsolatedStoreNoSqlDocumentsRequestContract;
193
+ }): Promise<ImportIsolatedStoreNoSqlDocumentsResponseContract>;
194
+ /**
195
+ * Import CSV or TSV rows
196
+ * 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.
197
+ */
198
+ importIsolatedStoreSqlRows(params: {
199
+ path: {
200
+ orgId: orgIdInPathRequired;
201
+ storeId: IsolatedStoreIdInPathRequired;
202
+ stage: IsolatedStoreStageInPathRequired;
203
+ };
204
+ headers?: Record<string, string>;
205
+ body: IsolatedStoreSqlImportRequestContract;
206
+ }): Promise<IsolatedStoreSqlImportResponseContract>;
207
+ /**
208
+ * Initialize isolated store stage
209
+ * 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.
210
+ */
211
+ initIsolatedStoreStage(params: {
212
+ path: {
213
+ orgId: orgIdInPathRequired;
214
+ storeId: IsolatedStoreIdInPathRequired;
215
+ };
216
+ headers?: Record<string, string>;
217
+ body: InitIsolatedStoreStageRequestContract;
218
+ }): Promise<InitIsolatedStoreStageResponseContract>;
219
+ /**
220
+ * Insert row
221
+ * Inserts a single row into a postgres table and optionally returns selected columns.
222
+ */
223
+ insertIsolatedStoreSqlRow(params: {
224
+ path: {
225
+ orgId: orgIdInPathRequired;
226
+ storeId: IsolatedStoreIdInPathRequired;
227
+ stage: IsolatedStoreStageInPathRequired;
228
+ };
229
+ headers?: Record<string, string>;
230
+ body: IsolatedStoreSqlInsertRequestContract;
231
+ }): Promise<IsolatedStoreSqlInsertResponseContract>;
232
+ /**
233
+ * List isolated store NoSQL collections
234
+ * Lists collections for a nosql/mongodb_atlas isolated store stage. The same contract can be backed by a local isolated Mongo server in development.
235
+ */
236
+ listIsolatedStoreNoSqlCollections(params: {
237
+ path: {
238
+ orgId: orgIdInPathRequired;
239
+ storeId: IsolatedStoreIdInPathRequired;
240
+ stage: IsolatedStoreStageInPathRequired;
241
+ };
242
+ headers?: Record<string, string>;
243
+ }): Promise<IsolatedStoreNoSqlListCollectionsResponseContract>;
244
+ /**
245
+ * List isolated store revisions
246
+ * Returns version checkpoints for a specific isolated store stage instance.
247
+ */
248
+ listIsolatedStoreRevisions(params: {
249
+ path: {
250
+ orgId: orgIdInPathRequired;
251
+ storeId: IsolatedStoreIdInPathRequired;
252
+ stage: IsolatedStoreStageInPathRequired;
253
+ };
254
+ headers?: Record<string, string>;
255
+ }): Promise<IsolatedStoreRevisionListResponseContract>;
256
+ /**
257
+ * List isolated stores
258
+ * Returns the isolated store registry for the organization. This is a control-plane endpoint behind FEATURE_FLAGS=isolated_stores.
259
+ */
260
+ listIsolatedStores(params: {
261
+ path: {
262
+ orgId: orgIdInPathRequired;
263
+ };
264
+ headers?: Record<string, string>;
265
+ }): Promise<IsolatedStoreListResponseContract>;
266
+ /**
267
+ * List isolated store SQL tables
268
+ * Returns postgres tables and views for the requested isolated store stage instance. Token access must include the matching isolated_store_stage_instance resource scope.
269
+ */
270
+ listIsolatedStoreSqlTables(params: {
271
+ path: {
272
+ orgId: orgIdInPathRequired;
273
+ storeId: IsolatedStoreIdInPathRequired;
274
+ stage: IsolatedStoreStageInPathRequired;
275
+ };
276
+ query?: {
277
+ schemaName?: IsolatedStoreSqlSchemaNameInQueryOptional;
278
+ };
279
+ headers?: Record<string, string>;
280
+ }): Promise<IsolatedStoreSqlListTablesResponseContract>;
281
+ /**
282
+ * List isolated store stages
283
+ * Returns stage instances for the selected isolated store. MVP uses separate stage instances for dev and prod.
284
+ */
285
+ listIsolatedStoreStages(params: {
286
+ path: {
287
+ orgId: orgIdInPathRequired;
288
+ storeId: IsolatedStoreIdInPathRequired;
289
+ };
290
+ headers?: Record<string, string>;
291
+ }): Promise<IsolatedStoreStageListResponseContract>;
292
+ /**
293
+ * Put isolated store NoSQL document
294
+ * 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.
295
+ */
296
+ putIsolatedStoreNoSqlDocument(params: {
297
+ path: {
298
+ orgId: orgIdInPathRequired;
299
+ storeId: IsolatedStoreIdInPathRequired;
300
+ stage: IsolatedStoreStageInPathRequired;
301
+ collectionName: IsolatedStoreNoSqlCollectionNameInPathRequired;
302
+ documentId: IsolatedStoreNoSqlDocumentIdInPathRequired;
303
+ };
304
+ headers?: Record<string, string>;
305
+ body: PutIsolatedStoreNoSqlDocumentRequestContract;
306
+ }): Promise<PutIsolatedStoreNoSqlDocumentResponseContract>;
307
+ /**
308
+ * Query isolated store NoSQL documents
309
+ * 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.
310
+ */
311
+ queryIsolatedStoreNoSqlDocuments(params: {
312
+ path: {
313
+ orgId: orgIdInPathRequired;
314
+ storeId: IsolatedStoreIdInPathRequired;
315
+ stage: IsolatedStoreStageInPathRequired;
316
+ };
317
+ headers?: Record<string, string>;
318
+ body: QueryIsolatedStoreNoSqlDocumentsRequestContract;
319
+ }): Promise<QueryIsolatedStoreNoSqlDocumentsResponseContract>;
320
+ /**
321
+ * Run read-only SQL query
322
+ * Runs a single read-only SQL statement against the postgres binding of the selected isolated store stage instance.
323
+ */
324
+ queryIsolatedStoreSql(params: {
325
+ path: {
326
+ orgId: orgIdInPathRequired;
327
+ storeId: IsolatedStoreIdInPathRequired;
328
+ stage: IsolatedStoreStageInPathRequired;
329
+ };
330
+ headers?: Record<string, string>;
331
+ body: IsolatedStoreSqlQueryRequestContract;
332
+ }): Promise<IsolatedStoreSqlQueryResponseContract>;
333
+ /**
334
+ * Restore isolated store revision
335
+ * 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.
336
+ */
337
+ restoreIsolatedStoreRevision(params: {
338
+ path: {
339
+ orgId: orgIdInPathRequired;
340
+ storeId: IsolatedStoreIdInPathRequired;
341
+ stage: IsolatedStoreStageInPathRequired;
342
+ revisionId: IsolatedStoreRevisionIdInPathRequired;
343
+ };
344
+ headers?: Record<string, string>;
345
+ }): Promise<RestoreIsolatedStoreRevisionResponseContract>;
346
+ /**
347
+ * Select rows
348
+ * Reads rows from a postgres table using simple filters, sort, limit and offset. This is the primary low-overhead runtime read surface.
349
+ */
350
+ selectIsolatedStoreSqlRows(params: {
351
+ path: {
352
+ orgId: orgIdInPathRequired;
353
+ storeId: IsolatedStoreIdInPathRequired;
354
+ stage: IsolatedStoreStageInPathRequired;
355
+ };
356
+ headers?: Record<string, string>;
357
+ body: IsolatedStoreSqlSelectRequestContract;
358
+ }): Promise<IsolatedStoreSqlSelectResponseContract>;
359
+ /**
360
+ * Update rows
361
+ * Updates rows in a postgres table using structured filters. Filterless updates are blocked unless allowAll=true is explicitly set.
362
+ */
363
+ updateIsolatedStoreSqlRows(params: {
364
+ path: {
365
+ orgId: orgIdInPathRequired;
366
+ storeId: IsolatedStoreIdInPathRequired;
367
+ stage: IsolatedStoreStageInPathRequired;
368
+ };
369
+ headers?: Record<string, string>;
370
+ body: IsolatedStoreSqlUpdateRequestContract;
371
+ }): Promise<IsolatedStoreSqlUpdateResponseContract>;
372
+ }