@fusebase/fusebase-gate-sdk 2.2.2-sdk.3 → 2.2.2-sdk.32
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 +100 -0
- package/dist/apis/BillingApi.js +135 -0
- package/dist/apis/IsolatedStoresApi.d.ts +436 -0
- package/dist/apis/IsolatedStoresApi.js +499 -0
- package/dist/apis/NotesApi.d.ts +3 -3
- package/dist/apis/NotesApi.js +3 -3
- 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 +2 -0
- package/dist/index.js +5 -1
- package/dist/types/billing/billing.d.ts +110 -0
- package/dist/types/billing/billing.js +13 -0
- package/dist/types/index.d.ts +3 -1
- package/dist/types/index.js +2 -0
- package/dist/types/isolated-store/isolated-store.d.ts +574 -0
- package/dist/types/isolated-store/isolated-store.js +89 -0
- package/dist/types/note/note.d.ts +3 -3
- package/dist/types/org-user/org-user.d.ts +7 -0
- package/dist/types/shared/enums.d.ts +1 -1
- package/dist/types/shared/enums.js +1 -1
- 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.32.md +9 -0
- package/release-notes/latest.md +4 -80
- package/release-notes/2.2.2-sdk.3.md +0 -85
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Billing API
|
|
3
|
+
*
|
|
4
|
+
* Generated from contract introspection
|
|
5
|
+
* Domain: billing
|
|
6
|
+
*/
|
|
7
|
+
import type { Client } from "../runtime/transport";
|
|
8
|
+
import type { orgIdInPathRequired, StripeCheckoutLinkRequestContract, StripeCheckoutLinkResponseContract, StripeModeMutationResponseContract, StripeModeUpdateRequestContract, StripeOauthLookupRequestContract, StripeOauthLookupResponseContract, StripePaymentStateRequestContract, StripePaymentStateResponseContract, StripeProductCreateRequestContract, StripeProductDeleteRequestContract, StripeProductDeleteResponseContract, StripeProductFindRequestContract, StripeProductLookupResponseContract, StripeProductMutationResponseContract } from "../types";
|
|
9
|
+
export declare class BillingApi {
|
|
10
|
+
private client;
|
|
11
|
+
constructor(client: Client);
|
|
12
|
+
/**
|
|
13
|
+
* Create Stripe product
|
|
14
|
+
* Creates a Stripe payment or subscription product/link for the organization.
|
|
15
|
+
*/
|
|
16
|
+
createStripeProduct(params: {
|
|
17
|
+
path: {
|
|
18
|
+
orgId: orgIdInPathRequired;
|
|
19
|
+
};
|
|
20
|
+
headers?: Record<string, string>;
|
|
21
|
+
body: StripeProductCreateRequestContract;
|
|
22
|
+
}): Promise<StripeProductMutationResponseContract>;
|
|
23
|
+
/**
|
|
24
|
+
* Delete Stripe product
|
|
25
|
+
* Marks a Stripe product/link as deleted for the supplied kind and kindId.
|
|
26
|
+
*/
|
|
27
|
+
deleteStripeProduct(params: {
|
|
28
|
+
path: {
|
|
29
|
+
orgId: orgIdInPathRequired;
|
|
30
|
+
};
|
|
31
|
+
headers?: Record<string, string>;
|
|
32
|
+
body: StripeProductDeleteRequestContract;
|
|
33
|
+
}): Promise<StripeProductDeleteResponseContract>;
|
|
34
|
+
/**
|
|
35
|
+
* Find Stripe product
|
|
36
|
+
* Returns the Stripe product/link matching the supplied filters, or null when nothing matches.
|
|
37
|
+
*/
|
|
38
|
+
findStripeProduct(params: {
|
|
39
|
+
path: {
|
|
40
|
+
orgId: orgIdInPathRequired;
|
|
41
|
+
};
|
|
42
|
+
headers?: Record<string, string>;
|
|
43
|
+
body?: StripeProductFindRequestContract;
|
|
44
|
+
}): Promise<StripeProductLookupResponseContract>;
|
|
45
|
+
/**
|
|
46
|
+
* Get Stripe OAuth connection
|
|
47
|
+
* Returns the Stripe OAuth connection for the organization, or null when no connected Stripe account matches the lookup.
|
|
48
|
+
*/
|
|
49
|
+
getStripeOauth(params: {
|
|
50
|
+
path: {
|
|
51
|
+
orgId: orgIdInPathRequired;
|
|
52
|
+
};
|
|
53
|
+
headers?: Record<string, string>;
|
|
54
|
+
body?: StripeOauthLookupRequestContract;
|
|
55
|
+
}): Promise<StripeOauthLookupResponseContract>;
|
|
56
|
+
/**
|
|
57
|
+
* Get Stripe payment link
|
|
58
|
+
* Creates or retrieves the Stripe checkout URL that the buyer should be redirected to for payment.
|
|
59
|
+
*/
|
|
60
|
+
getStripePaymentLink(params: {
|
|
61
|
+
path: {
|
|
62
|
+
orgId: orgIdInPathRequired;
|
|
63
|
+
};
|
|
64
|
+
headers?: Record<string, string>;
|
|
65
|
+
body: StripeCheckoutLinkRequestContract;
|
|
66
|
+
}): Promise<StripeCheckoutLinkResponseContract>;
|
|
67
|
+
/**
|
|
68
|
+
* Get Stripe payment state
|
|
69
|
+
* Returns the latest webhook-backed payment state for the supplied buyer and Stripe product identity.
|
|
70
|
+
*/
|
|
71
|
+
getStripePaymentState(params: {
|
|
72
|
+
path: {
|
|
73
|
+
orgId: orgIdInPathRequired;
|
|
74
|
+
};
|
|
75
|
+
headers?: Record<string, string>;
|
|
76
|
+
body: StripePaymentStateRequestContract;
|
|
77
|
+
}): Promise<StripePaymentStateResponseContract>;
|
|
78
|
+
/**
|
|
79
|
+
* Update Stripe mode
|
|
80
|
+
* Switches the connected Stripe account between test and live mode without copying Stripe products or prices.
|
|
81
|
+
*/
|
|
82
|
+
updateStripeMode(params: {
|
|
83
|
+
path: {
|
|
84
|
+
orgId: orgIdInPathRequired;
|
|
85
|
+
};
|
|
86
|
+
headers?: Record<string, string>;
|
|
87
|
+
body: StripeModeUpdateRequestContract;
|
|
88
|
+
}): Promise<StripeModeMutationResponseContract>;
|
|
89
|
+
/**
|
|
90
|
+
* Update Stripe product
|
|
91
|
+
* Replaces a Stripe product by marking the existing record deleted for the same kind and kindId, then creating a new one.
|
|
92
|
+
*/
|
|
93
|
+
updateStripeProduct(params: {
|
|
94
|
+
path: {
|
|
95
|
+
orgId: orgIdInPathRequired;
|
|
96
|
+
};
|
|
97
|
+
headers?: Record<string, string>;
|
|
98
|
+
body: StripeProductCreateRequestContract;
|
|
99
|
+
}): Promise<StripeProductMutationResponseContract>;
|
|
100
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Billing API
|
|
4
|
+
*
|
|
5
|
+
* Generated from contract introspection
|
|
6
|
+
* Domain: billing
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.BillingApi = void 0;
|
|
10
|
+
class BillingApi {
|
|
11
|
+
constructor(client) {
|
|
12
|
+
this.client = client;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Create Stripe product
|
|
16
|
+
* Creates a Stripe payment or subscription product/link for the organization.
|
|
17
|
+
*/
|
|
18
|
+
async createStripeProduct(params) {
|
|
19
|
+
return this.client.request({
|
|
20
|
+
method: "POST",
|
|
21
|
+
path: "/:orgId/billing/stripe/products",
|
|
22
|
+
pathParams: params.path,
|
|
23
|
+
headers: params.headers,
|
|
24
|
+
body: params.body,
|
|
25
|
+
opId: "createStripeProduct",
|
|
26
|
+
expectedContentType: "application/json",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Delete Stripe product
|
|
31
|
+
* Marks a Stripe product/link as deleted for the supplied kind and kindId.
|
|
32
|
+
*/
|
|
33
|
+
async deleteStripeProduct(params) {
|
|
34
|
+
return this.client.request({
|
|
35
|
+
method: "DELETE",
|
|
36
|
+
path: "/:orgId/billing/stripe/products",
|
|
37
|
+
pathParams: params.path,
|
|
38
|
+
headers: params.headers,
|
|
39
|
+
body: params.body,
|
|
40
|
+
opId: "deleteStripeProduct",
|
|
41
|
+
expectedContentType: "application/json",
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Find Stripe product
|
|
46
|
+
* Returns the Stripe product/link matching the supplied filters, or null when nothing matches.
|
|
47
|
+
*/
|
|
48
|
+
async findStripeProduct(params) {
|
|
49
|
+
return this.client.request({
|
|
50
|
+
method: "POST",
|
|
51
|
+
path: "/:orgId/billing/stripe/products/find",
|
|
52
|
+
pathParams: params.path,
|
|
53
|
+
headers: params.headers,
|
|
54
|
+
body: params.body,
|
|
55
|
+
opId: "findStripeProduct",
|
|
56
|
+
expectedContentType: "application/json",
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get Stripe OAuth connection
|
|
61
|
+
* Returns the Stripe OAuth connection for the organization, or null when no connected Stripe account matches the lookup.
|
|
62
|
+
*/
|
|
63
|
+
async getStripeOauth(params) {
|
|
64
|
+
return this.client.request({
|
|
65
|
+
method: "POST",
|
|
66
|
+
path: "/:orgId/billing/stripe/oauth/find",
|
|
67
|
+
pathParams: params.path,
|
|
68
|
+
headers: params.headers,
|
|
69
|
+
body: params.body,
|
|
70
|
+
opId: "getStripeOauth",
|
|
71
|
+
expectedContentType: "application/json",
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Get Stripe payment link
|
|
76
|
+
* Creates or retrieves the Stripe checkout URL that the buyer should be redirected to for payment.
|
|
77
|
+
*/
|
|
78
|
+
async getStripePaymentLink(params) {
|
|
79
|
+
return this.client.request({
|
|
80
|
+
method: "POST",
|
|
81
|
+
path: "/:orgId/billing/stripe/payment-link",
|
|
82
|
+
pathParams: params.path,
|
|
83
|
+
headers: params.headers,
|
|
84
|
+
body: params.body,
|
|
85
|
+
opId: "getStripePaymentLink",
|
|
86
|
+
expectedContentType: "application/json",
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Get Stripe payment state
|
|
91
|
+
* Returns the latest webhook-backed payment state for the supplied buyer and Stripe product identity.
|
|
92
|
+
*/
|
|
93
|
+
async getStripePaymentState(params) {
|
|
94
|
+
return this.client.request({
|
|
95
|
+
method: "POST",
|
|
96
|
+
path: "/:orgId/billing/stripe/payment-state",
|
|
97
|
+
pathParams: params.path,
|
|
98
|
+
headers: params.headers,
|
|
99
|
+
body: params.body,
|
|
100
|
+
opId: "getStripePaymentState",
|
|
101
|
+
expectedContentType: "application/json",
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Update Stripe mode
|
|
106
|
+
* Switches the connected Stripe account between test and live mode without copying Stripe products or prices.
|
|
107
|
+
*/
|
|
108
|
+
async updateStripeMode(params) {
|
|
109
|
+
return this.client.request({
|
|
110
|
+
method: "PUT",
|
|
111
|
+
path: "/:orgId/billing/stripe/mode",
|
|
112
|
+
pathParams: params.path,
|
|
113
|
+
headers: params.headers,
|
|
114
|
+
body: params.body,
|
|
115
|
+
opId: "updateStripeMode",
|
|
116
|
+
expectedContentType: "application/json",
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Update Stripe product
|
|
121
|
+
* Replaces a Stripe product by marking the existing record deleted for the same kind and kindId, then creating a new one.
|
|
122
|
+
*/
|
|
123
|
+
async updateStripeProduct(params) {
|
|
124
|
+
return this.client.request({
|
|
125
|
+
method: "PUT",
|
|
126
|
+
path: "/:orgId/billing/stripe/products",
|
|
127
|
+
pathParams: params.path,
|
|
128
|
+
headers: params.headers,
|
|
129
|
+
body: params.body,
|
|
130
|
+
opId: "updateStripeProduct",
|
|
131
|
+
expectedContentType: "application/json",
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
exports.BillingApi = BillingApi;
|
|
@@ -0,0 +1,436 @@
|
|
|
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 { ApplyIsolatedStoreSqlMigrationsRequestContract, ApplyIsolatedStoreSqlMigrationsResponseContract, CountIsolatedStoreNoSqlDocumentsRequestContract, CountIsolatedStoreNoSqlDocumentsResponseContract, CreateIsolatedStoreCheckpointRequestContract, CreateIsolatedStoreCheckpointResponseContract, CreateIsolatedStoreNoSqlCollectionRequestContract, CreateIsolatedStoreNoSqlCollectionResponseContract, CreateIsolatedStoreRequestContract, CreateIsolatedStoreResponseContract, DeleteIsolatedStoreNoSqlDocumentResponseContract, DeleteIsolatedStoreResponseContract, DeleteIsolatedStoreStageResponseContract, GetIsolatedStoreSqlMigrationStatusRequestContract, ImportIsolatedStoreNoSqlDocumentsRequestContract, ImportIsolatedStoreNoSqlDocumentsResponseContract, InitIsolatedStoreStageRequestContract, InitIsolatedStoreStageResponseContract, IsolatedStoreIdInPathRequired, IsolatedStoreListResponseContract, IsolatedStoreNoSqlCollectionNameInPathRequired, IsolatedStoreNoSqlDocumentIdInPathRequired, IsolatedStoreNoSqlDocumentResponseContract, IsolatedStoreNoSqlListCollectionsResponseContract, IsolatedStoreNoSqlStatsResponseContract, IsolatedStoreResponseContract, IsolatedStoreRevisionIdInPathRequired, IsolatedStoreRevisionListResponseContract, IsolatedStoreSqlBatchInsertRequestContract, IsolatedStoreSqlBatchInsertResponseContract, IsolatedStoreSqlCountRequestContract, IsolatedStoreSqlCountResponseContract, IsolatedStoreSqlDeleteRequestContract, IsolatedStoreSqlDeleteResponseContract, IsolatedStoreSqlDescribeTableResponseContract, IsolatedStoreSqlExecuteRequestContract, IsolatedStoreSqlExecuteResponseContract, IsolatedStoreSqlImportRequestContract, IsolatedStoreSqlImportResponseContract, IsolatedStoreSqlInsertRequestContract, IsolatedStoreSqlInsertResponseContract, IsolatedStoreSqlListTablesResponseContract, IsolatedStoreSqlMigrationStatusContract, IsolatedStoreSqlQueryRequestContract, IsolatedStoreSqlQueryResponseContract, IsolatedStoreSqlSchemaNameInQueryOptional, IsolatedStoreSqlSelectRequestContract, IsolatedStoreSqlSelectResponseContract, IsolatedStoreSqlStatsResponseContract, IsolatedStoreSqlTableNameInPathRequired, IsolatedStoreSqlUpdateRequestContract, IsolatedStoreSqlUpdateResponseContract, IsolatedStoreStageInPathRequired, IsolatedStoreStageListResponseContract, ListIsolatedStoresClientIdInQueryOptional, orgIdInPathRequired, PutIsolatedStoreNoSqlDocumentRequestContract, PutIsolatedStoreNoSqlDocumentResponseContract, QueryIsolatedStoreNoSqlDocumentsRequestContract, QueryIsolatedStoreNoSqlDocumentsResponseContract, RestoreIsolatedStoreRevisionResponseContract } from "../types";
|
|
9
|
+
export declare class IsolatedStoresApi {
|
|
10
|
+
private client;
|
|
11
|
+
constructor(client: Client);
|
|
12
|
+
/**
|
|
13
|
+
* Apply SQL migrations
|
|
14
|
+
* 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.
|
|
15
|
+
*/
|
|
16
|
+
applyIsolatedStoreSqlMigrations(params: {
|
|
17
|
+
path: {
|
|
18
|
+
orgId: orgIdInPathRequired;
|
|
19
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
20
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
21
|
+
};
|
|
22
|
+
headers?: Record<string, string>;
|
|
23
|
+
body: ApplyIsolatedStoreSqlMigrationsRequestContract;
|
|
24
|
+
}): Promise<ApplyIsolatedStoreSqlMigrationsResponseContract>;
|
|
25
|
+
/**
|
|
26
|
+
* Batch insert rows
|
|
27
|
+
* 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).
|
|
28
|
+
*/
|
|
29
|
+
batchInsertIsolatedStoreSqlRows(params: {
|
|
30
|
+
path: {
|
|
31
|
+
orgId: orgIdInPathRequired;
|
|
32
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
33
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
34
|
+
};
|
|
35
|
+
headers?: Record<string, string>;
|
|
36
|
+
body: IsolatedStoreSqlBatchInsertRequestContract;
|
|
37
|
+
}): Promise<IsolatedStoreSqlBatchInsertResponseContract>;
|
|
38
|
+
/**
|
|
39
|
+
* Count isolated store NoSQL documents
|
|
40
|
+
* 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.
|
|
41
|
+
*/
|
|
42
|
+
countIsolatedStoreNoSqlDocuments(params: {
|
|
43
|
+
path: {
|
|
44
|
+
orgId: orgIdInPathRequired;
|
|
45
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
46
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
47
|
+
};
|
|
48
|
+
headers?: Record<string, string>;
|
|
49
|
+
body: CountIsolatedStoreNoSqlDocumentsRequestContract;
|
|
50
|
+
}): Promise<CountIsolatedStoreNoSqlDocumentsResponseContract>;
|
|
51
|
+
/**
|
|
52
|
+
* Count rows
|
|
53
|
+
* Counts rows in a postgres table using simple structured filters. Useful for pagination without writing raw SQL.
|
|
54
|
+
*/
|
|
55
|
+
countIsolatedStoreSqlRows(params: {
|
|
56
|
+
path: {
|
|
57
|
+
orgId: orgIdInPathRequired;
|
|
58
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
59
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
60
|
+
};
|
|
61
|
+
headers?: Record<string, string>;
|
|
62
|
+
body: IsolatedStoreSqlCountRequestContract;
|
|
63
|
+
}): Promise<IsolatedStoreSqlCountResponseContract>;
|
|
64
|
+
/**
|
|
65
|
+
* Create isolated store
|
|
66
|
+
* Registers a low-level store and binds it to the organization scope plus a isolated source scope such as app or app_feature.
|
|
67
|
+
*/
|
|
68
|
+
createIsolatedStore(params: {
|
|
69
|
+
path: {
|
|
70
|
+
orgId: orgIdInPathRequired;
|
|
71
|
+
};
|
|
72
|
+
headers?: Record<string, string>;
|
|
73
|
+
body: CreateIsolatedStoreRequestContract;
|
|
74
|
+
}): Promise<CreateIsolatedStoreResponseContract>;
|
|
75
|
+
/**
|
|
76
|
+
* Create isolated store checkpoint
|
|
77
|
+
* 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.
|
|
78
|
+
*/
|
|
79
|
+
createIsolatedStoreCheckpoint(params: {
|
|
80
|
+
path: {
|
|
81
|
+
orgId: orgIdInPathRequired;
|
|
82
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
83
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
84
|
+
};
|
|
85
|
+
headers?: Record<string, string>;
|
|
86
|
+
body: CreateIsolatedStoreCheckpointRequestContract;
|
|
87
|
+
}): Promise<CreateIsolatedStoreCheckpointResponseContract>;
|
|
88
|
+
/**
|
|
89
|
+
* Create isolated store NoSQL collection
|
|
90
|
+
* Creates a collection for a nosql/mongodb_atlas isolated store stage. Collection names use safe identifiers with letters, numbers, and underscores.
|
|
91
|
+
*/
|
|
92
|
+
createIsolatedStoreNoSqlCollection(params: {
|
|
93
|
+
path: {
|
|
94
|
+
orgId: orgIdInPathRequired;
|
|
95
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
96
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
97
|
+
};
|
|
98
|
+
headers?: Record<string, string>;
|
|
99
|
+
body: CreateIsolatedStoreNoSqlCollectionRequestContract;
|
|
100
|
+
}): Promise<CreateIsolatedStoreNoSqlCollectionResponseContract>;
|
|
101
|
+
/**
|
|
102
|
+
* Delete isolated store
|
|
103
|
+
* 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.
|
|
104
|
+
*/
|
|
105
|
+
deleteIsolatedStore(params: {
|
|
106
|
+
path: {
|
|
107
|
+
orgId: orgIdInPathRequired;
|
|
108
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
109
|
+
};
|
|
110
|
+
headers?: Record<string, string>;
|
|
111
|
+
}): Promise<DeleteIsolatedStoreResponseContract>;
|
|
112
|
+
/**
|
|
113
|
+
* Delete isolated store NoSQL document
|
|
114
|
+
* Deletes a document by `_id` from a nosql/mongodb_atlas isolated store stage.
|
|
115
|
+
*/
|
|
116
|
+
deleteIsolatedStoreNoSqlDocument(params: {
|
|
117
|
+
path: {
|
|
118
|
+
orgId: orgIdInPathRequired;
|
|
119
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
120
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
121
|
+
collectionName: IsolatedStoreNoSqlCollectionNameInPathRequired;
|
|
122
|
+
documentId: IsolatedStoreNoSqlDocumentIdInPathRequired;
|
|
123
|
+
};
|
|
124
|
+
headers?: Record<string, string>;
|
|
125
|
+
}): Promise<DeleteIsolatedStoreNoSqlDocumentResponseContract>;
|
|
126
|
+
/**
|
|
127
|
+
* Delete rows
|
|
128
|
+
* Deletes rows from a postgres table using structured filters. Filterless deletes are blocked unless allowAll=true is explicitly set.
|
|
129
|
+
*/
|
|
130
|
+
deleteIsolatedStoreSqlRows(params: {
|
|
131
|
+
path: {
|
|
132
|
+
orgId: orgIdInPathRequired;
|
|
133
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
134
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
135
|
+
};
|
|
136
|
+
headers?: Record<string, string>;
|
|
137
|
+
body: IsolatedStoreSqlDeleteRequestContract;
|
|
138
|
+
}): Promise<IsolatedStoreSqlDeleteResponseContract>;
|
|
139
|
+
/**
|
|
140
|
+
* Delete isolated store stage
|
|
141
|
+
* 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.
|
|
142
|
+
*/
|
|
143
|
+
deleteIsolatedStoreStage(params: {
|
|
144
|
+
path: {
|
|
145
|
+
orgId: orgIdInPathRequired;
|
|
146
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
147
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
148
|
+
};
|
|
149
|
+
headers?: Record<string, string>;
|
|
150
|
+
}): Promise<DeleteIsolatedStoreStageResponseContract>;
|
|
151
|
+
/**
|
|
152
|
+
* Describe isolated store SQL table
|
|
153
|
+
* Returns postgres column metadata for a single table in the selected isolated store stage instance.
|
|
154
|
+
*/
|
|
155
|
+
describeIsolatedStoreSqlTable(params: {
|
|
156
|
+
path: {
|
|
157
|
+
orgId: orgIdInPathRequired;
|
|
158
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
159
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
160
|
+
tableName: IsolatedStoreSqlTableNameInPathRequired;
|
|
161
|
+
};
|
|
162
|
+
query?: {
|
|
163
|
+
schemaName?: IsolatedStoreSqlSchemaNameInQueryOptional;
|
|
164
|
+
};
|
|
165
|
+
headers?: Record<string, string>;
|
|
166
|
+
}): Promise<IsolatedStoreSqlDescribeTableResponseContract>;
|
|
167
|
+
/**
|
|
168
|
+
* Run writable SQL statement
|
|
169
|
+
* 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.
|
|
170
|
+
*/
|
|
171
|
+
executeIsolatedStoreSql(params: {
|
|
172
|
+
path: {
|
|
173
|
+
orgId: orgIdInPathRequired;
|
|
174
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
175
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
176
|
+
};
|
|
177
|
+
headers?: Record<string, string>;
|
|
178
|
+
body: IsolatedStoreSqlExecuteRequestContract;
|
|
179
|
+
}): Promise<IsolatedStoreSqlExecuteResponseContract>;
|
|
180
|
+
/**
|
|
181
|
+
* Get isolated store
|
|
182
|
+
* Returns a single isolated store by store global id within the organization scope.
|
|
183
|
+
*/
|
|
184
|
+
getIsolatedStore(params: {
|
|
185
|
+
path: {
|
|
186
|
+
orgId: orgIdInPathRequired;
|
|
187
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
188
|
+
};
|
|
189
|
+
headers?: Record<string, string>;
|
|
190
|
+
}): Promise<IsolatedStoreResponseContract>;
|
|
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
|
+
getIsolatedStoreNoSqlDocument(params: {
|
|
196
|
+
path: {
|
|
197
|
+
orgId: orgIdInPathRequired;
|
|
198
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
199
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
200
|
+
collectionName: IsolatedStoreNoSqlCollectionNameInPathRequired;
|
|
201
|
+
documentId: IsolatedStoreNoSqlDocumentIdInPathRequired;
|
|
202
|
+
};
|
|
203
|
+
headers?: Record<string, string>;
|
|
204
|
+
}): Promise<IsolatedStoreNoSqlDocumentResponseContract>;
|
|
205
|
+
/**
|
|
206
|
+
* Get NoSQL stats
|
|
207
|
+
* Returns collection-level stats for the selected isolated Mongo stage, including collection names, document counts, and storage-size hints when available.
|
|
208
|
+
*/
|
|
209
|
+
getIsolatedStoreNoSqlStats(params: {
|
|
210
|
+
path: {
|
|
211
|
+
orgId: orgIdInPathRequired;
|
|
212
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
213
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
214
|
+
};
|
|
215
|
+
headers?: Record<string, string>;
|
|
216
|
+
}): Promise<IsolatedStoreNoSqlStatsResponseContract>;
|
|
217
|
+
/**
|
|
218
|
+
* Get SQL migration status
|
|
219
|
+
* 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.
|
|
220
|
+
*/
|
|
221
|
+
getIsolatedStoreSqlMigrationStatus(params: {
|
|
222
|
+
path: {
|
|
223
|
+
orgId: orgIdInPathRequired;
|
|
224
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
225
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
226
|
+
};
|
|
227
|
+
headers?: Record<string, string>;
|
|
228
|
+
body: GetIsolatedStoreSqlMigrationStatusRequestContract;
|
|
229
|
+
}): Promise<IsolatedStoreSqlMigrationStatusContract>;
|
|
230
|
+
/**
|
|
231
|
+
* Get SQL stats
|
|
232
|
+
* Returns table-level stats for the selected isolated postgres stage, including tables, columns, row counts, and relation-size hints.
|
|
233
|
+
*/
|
|
234
|
+
getIsolatedStoreSqlStats(params: {
|
|
235
|
+
path: {
|
|
236
|
+
orgId: orgIdInPathRequired;
|
|
237
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
238
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
239
|
+
};
|
|
240
|
+
headers?: Record<string, string>;
|
|
241
|
+
}): Promise<IsolatedStoreSqlStatsResponseContract>;
|
|
242
|
+
/**
|
|
243
|
+
* Import NDJSON documents
|
|
244
|
+
* 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.
|
|
245
|
+
*/
|
|
246
|
+
importIsolatedStoreNoSqlDocuments(params: {
|
|
247
|
+
path: {
|
|
248
|
+
orgId: orgIdInPathRequired;
|
|
249
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
250
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
251
|
+
};
|
|
252
|
+
headers?: Record<string, string>;
|
|
253
|
+
body: ImportIsolatedStoreNoSqlDocumentsRequestContract;
|
|
254
|
+
}): Promise<ImportIsolatedStoreNoSqlDocumentsResponseContract>;
|
|
255
|
+
/**
|
|
256
|
+
* Import CSV or TSV rows
|
|
257
|
+
* 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.
|
|
258
|
+
*/
|
|
259
|
+
importIsolatedStoreSqlRows(params: {
|
|
260
|
+
path: {
|
|
261
|
+
orgId: orgIdInPathRequired;
|
|
262
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
263
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
264
|
+
};
|
|
265
|
+
headers?: Record<string, string>;
|
|
266
|
+
body: IsolatedStoreSqlImportRequestContract;
|
|
267
|
+
}): Promise<IsolatedStoreSqlImportResponseContract>;
|
|
268
|
+
/**
|
|
269
|
+
* Initialize isolated store stage
|
|
270
|
+
* 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.
|
|
271
|
+
*/
|
|
272
|
+
initIsolatedStoreStage(params: {
|
|
273
|
+
path: {
|
|
274
|
+
orgId: orgIdInPathRequired;
|
|
275
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
276
|
+
};
|
|
277
|
+
headers?: Record<string, string>;
|
|
278
|
+
body: InitIsolatedStoreStageRequestContract;
|
|
279
|
+
}): Promise<InitIsolatedStoreStageResponseContract>;
|
|
280
|
+
/**
|
|
281
|
+
* Insert row
|
|
282
|
+
* Inserts a single row into a postgres table and optionally returns selected columns.
|
|
283
|
+
*/
|
|
284
|
+
insertIsolatedStoreSqlRow(params: {
|
|
285
|
+
path: {
|
|
286
|
+
orgId: orgIdInPathRequired;
|
|
287
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
288
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
289
|
+
};
|
|
290
|
+
headers?: Record<string, string>;
|
|
291
|
+
body: IsolatedStoreSqlInsertRequestContract;
|
|
292
|
+
}): Promise<IsolatedStoreSqlInsertResponseContract>;
|
|
293
|
+
/**
|
|
294
|
+
* List isolated store NoSQL collections
|
|
295
|
+
* Lists collections for a nosql/mongodb_atlas isolated store stage. The same contract can be backed by a local isolated Mongo server in development.
|
|
296
|
+
*/
|
|
297
|
+
listIsolatedStoreNoSqlCollections(params: {
|
|
298
|
+
path: {
|
|
299
|
+
orgId: orgIdInPathRequired;
|
|
300
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
301
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
302
|
+
};
|
|
303
|
+
headers?: Record<string, string>;
|
|
304
|
+
}): Promise<IsolatedStoreNoSqlListCollectionsResponseContract>;
|
|
305
|
+
/**
|
|
306
|
+
* List isolated store revisions
|
|
307
|
+
* Returns version checkpoints for a specific isolated store stage instance.
|
|
308
|
+
*/
|
|
309
|
+
listIsolatedStoreRevisions(params: {
|
|
310
|
+
path: {
|
|
311
|
+
orgId: orgIdInPathRequired;
|
|
312
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
313
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
314
|
+
};
|
|
315
|
+
headers?: Record<string, string>;
|
|
316
|
+
}): Promise<IsolatedStoreRevisionListResponseContract>;
|
|
317
|
+
/**
|
|
318
|
+
* List isolated stores
|
|
319
|
+
* 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.
|
|
320
|
+
*/
|
|
321
|
+
listIsolatedStores(params: {
|
|
322
|
+
path: {
|
|
323
|
+
orgId: orgIdInPathRequired;
|
|
324
|
+
};
|
|
325
|
+
query?: {
|
|
326
|
+
clientId?: ListIsolatedStoresClientIdInQueryOptional;
|
|
327
|
+
};
|
|
328
|
+
headers?: Record<string, string>;
|
|
329
|
+
}): Promise<IsolatedStoreListResponseContract>;
|
|
330
|
+
/**
|
|
331
|
+
* List isolated store SQL tables
|
|
332
|
+
* Returns postgres tables and views for the requested isolated store stage instance. Token access must include the matching isolated_store_stage_instance resource scope.
|
|
333
|
+
*/
|
|
334
|
+
listIsolatedStoreSqlTables(params: {
|
|
335
|
+
path: {
|
|
336
|
+
orgId: orgIdInPathRequired;
|
|
337
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
338
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
339
|
+
};
|
|
340
|
+
query?: {
|
|
341
|
+
schemaName?: IsolatedStoreSqlSchemaNameInQueryOptional;
|
|
342
|
+
};
|
|
343
|
+
headers?: Record<string, string>;
|
|
344
|
+
}): Promise<IsolatedStoreSqlListTablesResponseContract>;
|
|
345
|
+
/**
|
|
346
|
+
* List isolated store stages
|
|
347
|
+
* Returns stage instances for the selected isolated store. MVP uses separate stage instances for dev and prod.
|
|
348
|
+
*/
|
|
349
|
+
listIsolatedStoreStages(params: {
|
|
350
|
+
path: {
|
|
351
|
+
orgId: orgIdInPathRequired;
|
|
352
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
353
|
+
};
|
|
354
|
+
headers?: Record<string, string>;
|
|
355
|
+
}): Promise<IsolatedStoreStageListResponseContract>;
|
|
356
|
+
/**
|
|
357
|
+
* Put isolated store NoSQL document
|
|
358
|
+
* 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.
|
|
359
|
+
*/
|
|
360
|
+
putIsolatedStoreNoSqlDocument(params: {
|
|
361
|
+
path: {
|
|
362
|
+
orgId: orgIdInPathRequired;
|
|
363
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
364
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
365
|
+
collectionName: IsolatedStoreNoSqlCollectionNameInPathRequired;
|
|
366
|
+
documentId: IsolatedStoreNoSqlDocumentIdInPathRequired;
|
|
367
|
+
};
|
|
368
|
+
headers?: Record<string, string>;
|
|
369
|
+
body: PutIsolatedStoreNoSqlDocumentRequestContract;
|
|
370
|
+
}): Promise<PutIsolatedStoreNoSqlDocumentResponseContract>;
|
|
371
|
+
/**
|
|
372
|
+
* Query isolated store NoSQL documents
|
|
373
|
+
* 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.
|
|
374
|
+
*/
|
|
375
|
+
queryIsolatedStoreNoSqlDocuments(params: {
|
|
376
|
+
path: {
|
|
377
|
+
orgId: orgIdInPathRequired;
|
|
378
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
379
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
380
|
+
};
|
|
381
|
+
headers?: Record<string, string>;
|
|
382
|
+
body: QueryIsolatedStoreNoSqlDocumentsRequestContract;
|
|
383
|
+
}): Promise<QueryIsolatedStoreNoSqlDocumentsResponseContract>;
|
|
384
|
+
/**
|
|
385
|
+
* Run read-only SQL query
|
|
386
|
+
* Runs a single read-only SQL statement against the postgres binding of the selected isolated store stage instance.
|
|
387
|
+
*/
|
|
388
|
+
queryIsolatedStoreSql(params: {
|
|
389
|
+
path: {
|
|
390
|
+
orgId: orgIdInPathRequired;
|
|
391
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
392
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
393
|
+
};
|
|
394
|
+
headers?: Record<string, string>;
|
|
395
|
+
body: IsolatedStoreSqlQueryRequestContract;
|
|
396
|
+
}): Promise<IsolatedStoreSqlQueryResponseContract>;
|
|
397
|
+
/**
|
|
398
|
+
* Restore isolated store revision
|
|
399
|
+
* 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.
|
|
400
|
+
*/
|
|
401
|
+
restoreIsolatedStoreRevision(params: {
|
|
402
|
+
path: {
|
|
403
|
+
orgId: orgIdInPathRequired;
|
|
404
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
405
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
406
|
+
revisionId: IsolatedStoreRevisionIdInPathRequired;
|
|
407
|
+
};
|
|
408
|
+
headers?: Record<string, string>;
|
|
409
|
+
}): Promise<RestoreIsolatedStoreRevisionResponseContract>;
|
|
410
|
+
/**
|
|
411
|
+
* Select rows
|
|
412
|
+
* Reads rows from a postgres table using simple filters, sort, limit and offset. This is the primary low-overhead runtime read surface.
|
|
413
|
+
*/
|
|
414
|
+
selectIsolatedStoreSqlRows(params: {
|
|
415
|
+
path: {
|
|
416
|
+
orgId: orgIdInPathRequired;
|
|
417
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
418
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
419
|
+
};
|
|
420
|
+
headers?: Record<string, string>;
|
|
421
|
+
body: IsolatedStoreSqlSelectRequestContract;
|
|
422
|
+
}): Promise<IsolatedStoreSqlSelectResponseContract>;
|
|
423
|
+
/**
|
|
424
|
+
* Update rows
|
|
425
|
+
* Updates rows in a postgres table using structured filters. Filterless updates are blocked unless allowAll=true is explicitly set.
|
|
426
|
+
*/
|
|
427
|
+
updateIsolatedStoreSqlRows(params: {
|
|
428
|
+
path: {
|
|
429
|
+
orgId: orgIdInPathRequired;
|
|
430
|
+
storeId: IsolatedStoreIdInPathRequired;
|
|
431
|
+
stage: IsolatedStoreStageInPathRequired;
|
|
432
|
+
};
|
|
433
|
+
headers?: Record<string, string>;
|
|
434
|
+
body: IsolatedStoreSqlUpdateRequestContract;
|
|
435
|
+
}): Promise<IsolatedStoreSqlUpdateResponseContract>;
|
|
436
|
+
}
|