@sovaria/sdk 0.0.0-stage → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +248 -2
- package/dist/analytics.d.ts +92 -0
- package/dist/analytics.js +236 -0
- package/dist/client.d.ts +146 -0
- package/dist/client.js +583 -0
- package/dist/collections.d.ts +255 -0
- package/dist/collections.js +569 -0
- package/dist/complete-api.d.ts +54 -0
- package/dist/complete-api.js +71 -0
- package/dist/crashes.d.ts +111 -0
- package/dist/crashes.js +244 -0
- package/dist/crypto.d.ts +37 -0
- package/dist/crypto.js +189 -0
- package/dist/errors.d.ts +40 -0
- package/dist/errors.js +258 -0
- package/dist/firestore.d.ts +239 -0
- package/dist/firestore.js +431 -0
- package/dist/generated.d.ts +2462 -0
- package/dist/generated.js +1962 -0
- package/dist/inapp.d.ts +52 -0
- package/dist/inapp.js +48 -0
- package/dist/index.d.ts +3562 -0
- package/dist/index.js +3018 -0
- package/dist/offline.d.ts +92 -0
- package/dist/offline.js +575 -0
- package/dist/passkeys.d.ts +17 -0
- package/dist/passkeys.js +76 -0
- package/dist/perf.d.ts +76 -0
- package/dist/perf.js +212 -0
- package/dist/remote-config.d.ts +87 -0
- package/dist/remote-config.js +182 -0
- package/dist/types.d.ts +102 -0
- package/dist/types.js +1 -0
- package/dist/webpush.d.ts +46 -0
- package/dist/webpush.js +99 -0
- package/package.json +74 -4
|
@@ -0,0 +1,2462 @@
|
|
|
1
|
+
import type { JsonObject, JsonValue, RequestOptions } from './index.js';
|
|
2
|
+
type Request = <T>(method: string, path: string, options?: RequestOptions) => Promise<T>;
|
|
3
|
+
type Scope = () => {
|
|
4
|
+
orgId?: string;
|
|
5
|
+
projectId?: string;
|
|
6
|
+
envId?: string;
|
|
7
|
+
} | undefined;
|
|
8
|
+
/** Every Sovaria API operation, grouped by module. */
|
|
9
|
+
export declare function createGeneratedApi(request: Request, scope: Scope): {
|
|
10
|
+
ai: {
|
|
11
|
+
/** Model-gateway routes, the models they may use, plan limits and cache size. `GET /api/v1/sovariq/gateway` */
|
|
12
|
+
gatewayOverview: () => Promise<JsonValue>;
|
|
13
|
+
/** Create or change a route: models in order (fallbacks), retry_on, cache {enabled, ttl_s}, access, daily_requests_per_user. `PUT /api/v1/sovariq/gateway/routes/{name}` */
|
|
14
|
+
saveGatewayRoute: (args: {
|
|
15
|
+
name: string;
|
|
16
|
+
body: JsonObject;
|
|
17
|
+
}) => Promise<JsonValue>;
|
|
18
|
+
/** Delete a route (refused while an agent uses it). `DELETE /api/v1/sovariq/gateway/routes/{name}` */
|
|
19
|
+
deleteGatewayRoute: (args: {
|
|
20
|
+
name: string;
|
|
21
|
+
}) => Promise<JsonValue>;
|
|
22
|
+
/** One completion on a route: the first model that answers (fallbacks), or the cache. `POST /api/v1/sovariq/gateway/{route}/complete` */
|
|
23
|
+
gatewayComplete: (args: {
|
|
24
|
+
route: string;
|
|
25
|
+
messages: JsonValue;
|
|
26
|
+
system?: JsonValue;
|
|
27
|
+
maxTokens?: JsonValue;
|
|
28
|
+
cache?: JsonValue;
|
|
29
|
+
}) => Promise<JsonValue>;
|
|
30
|
+
/** Requests, errors, fallbacks, cache hits, tokens and latency per model and route. `GET /api/v1/sovariq/gateway/usage` */
|
|
31
|
+
gatewayUsage: (args?: {
|
|
32
|
+
days?: JsonValue;
|
|
33
|
+
}) => Promise<JsonValue>;
|
|
34
|
+
/** Drop every cached model response of the project. `POST /api/v1/sovariq/gateway/cache/clear` */
|
|
35
|
+
clearGatewayCache: () => Promise<JsonValue>;
|
|
36
|
+
/** An agent's published version and kept versions. `GET /api/v1/sovariq/agents/{agent_id}/versions` */
|
|
37
|
+
listAgentVersions: (args: {
|
|
38
|
+
agentId: string;
|
|
39
|
+
}) => Promise<JsonValue>;
|
|
40
|
+
/** Publish the agent's draft as its next version. `POST /api/v1/sovariq/agents/{agent_id}/versions` */
|
|
41
|
+
publishAgentVersion: (args: {
|
|
42
|
+
agentId: string;
|
|
43
|
+
note?: JsonValue;
|
|
44
|
+
}) => Promise<JsonValue>;
|
|
45
|
+
/** One version's definition (secrets hidden). `GET /api/v1/sovariq/agents/{agent_id}/versions/{version}` */
|
|
46
|
+
getAgentVersion: (args: {
|
|
47
|
+
agentId: string;
|
|
48
|
+
version: string;
|
|
49
|
+
}) => Promise<JsonValue>;
|
|
50
|
+
/** What changed between two versions (or a version and the draft). `GET /api/v1/sovariq/agents/{agent_id}/versions/compare` */
|
|
51
|
+
compareAgentVersions: (args: {
|
|
52
|
+
agentId: string;
|
|
53
|
+
a: JsonValue;
|
|
54
|
+
b?: JsonValue;
|
|
55
|
+
}) => Promise<JsonValue>;
|
|
56
|
+
/** Republish an older version as a new version and make it the draft. `POST /api/v1/sovariq/agents/{agent_id}/versions/{version}/rollback` */
|
|
57
|
+
rollbackAgentVersion: (args: {
|
|
58
|
+
agentId: string;
|
|
59
|
+
version: string;
|
|
60
|
+
note?: JsonValue;
|
|
61
|
+
}) => Promise<JsonValue>;
|
|
62
|
+
};
|
|
63
|
+
analytics: {
|
|
64
|
+
/** DAU, WAU, MAU, events, new users, top events, platforms and countries over the last days (capped by analytics.retention_days). `GET /api/v1/analytics/overview` */
|
|
65
|
+
overview: (args?: {
|
|
66
|
+
days?: JsonValue;
|
|
67
|
+
}) => Promise<JsonValue>;
|
|
68
|
+
/** Event names with counts over the last days. `GET /api/v1/analytics/events` */
|
|
69
|
+
listEvents: (args?: {
|
|
70
|
+
days?: JsonValue;
|
|
71
|
+
}) => Promise<JsonValue>;
|
|
72
|
+
/** Daily count and distinct users of one event, and its common properties. `GET /api/v1/analytics/events/{name}/trend` */
|
|
73
|
+
eventTrend: (args: {
|
|
74
|
+
name: string;
|
|
75
|
+
days?: JsonValue;
|
|
76
|
+
}) => Promise<JsonValue>;
|
|
77
|
+
/** Ordered funnel: users who did each step after the previous one within window_hours of step 1 (steps: [{name, where?}]). `POST /api/v1/analytics/funnel` */
|
|
78
|
+
funnel: (args: {
|
|
79
|
+
steps: JsonValue;
|
|
80
|
+
windowHours?: JsonValue;
|
|
81
|
+
days?: JsonValue;
|
|
82
|
+
}) => Promise<JsonValue>;
|
|
83
|
+
/** Retention cohorts by first activity (or start_event), share active (or doing return_event) in each later week or day. `GET /api/v1/analytics/retention` */
|
|
84
|
+
retention: (args?: {
|
|
85
|
+
startEvent?: JsonValue;
|
|
86
|
+
returnEvent?: JsonValue;
|
|
87
|
+
period?: JsonValue;
|
|
88
|
+
periods?: JsonValue;
|
|
89
|
+
}) => Promise<JsonValue>;
|
|
90
|
+
/** Recently seen app users with their properties (q: prefix of user key or id). `GET /api/v1/analytics/users` */
|
|
91
|
+
listUsers: (args?: {
|
|
92
|
+
q?: JsonValue;
|
|
93
|
+
limit?: JsonValue;
|
|
94
|
+
}) => Promise<JsonValue>;
|
|
95
|
+
/** One app user: profile, consent and their latest events. `GET /api/v1/analytics/users/{user_key}` */
|
|
96
|
+
getUser: (args: {
|
|
97
|
+
userKey: string;
|
|
98
|
+
limit?: JsonValue;
|
|
99
|
+
}) => Promise<JsonValue>;
|
|
100
|
+
/** Erase one app user's analytics (events, properties, activity) and record that they opted out. `DELETE /api/v1/analytics/users/{user_key}` */
|
|
101
|
+
eraseUser: (args: {
|
|
102
|
+
userKey: string;
|
|
103
|
+
}) => Promise<JsonValue>;
|
|
104
|
+
/** Newest events received (debug view), optionally since an ISO time. `GET /api/v1/analytics/live` */
|
|
105
|
+
live: (args?: {
|
|
106
|
+
since?: JsonValue;
|
|
107
|
+
limit?: JsonValue;
|
|
108
|
+
}) => Promise<JsonValue>;
|
|
109
|
+
/** Analytics events accepted and dropped this month, and the plan's limits. `GET /api/v1/analytics/usage` */
|
|
110
|
+
usage: () => Promise<JsonValue>;
|
|
111
|
+
/** Project analytics settings (require consent) and whether staff turned analytics off. `GET /api/v1/analytics/settings` */
|
|
112
|
+
getSettings: () => Promise<JsonValue>;
|
|
113
|
+
/** Require consent: only app users who said yes (PUT /analytics/v1/consent) are recorded. `PUT /api/v1/analytics/settings` */
|
|
114
|
+
putSettings: (args: {
|
|
115
|
+
requireConsent: JsonValue;
|
|
116
|
+
}) => Promise<JsonValue>;
|
|
117
|
+
};
|
|
118
|
+
attestation: {
|
|
119
|
+
/** App attestation settings, credentials (metadata only), debug tokens and the last 7 days. `GET /api/v1/projects/{project_id}/attestation` */
|
|
120
|
+
getConfig: (args?: {
|
|
121
|
+
projectId?: string;
|
|
122
|
+
}) => Promise<JsonValue>;
|
|
123
|
+
/** Set mode (off | monitor | enforce), tokenTtlSeconds, providers, playIntegrity, appAttest. `PUT /api/v1/projects/{project_id}/attestation` */
|
|
124
|
+
updateConfig: (args: {
|
|
125
|
+
projectId?: string;
|
|
126
|
+
body: JsonObject;
|
|
127
|
+
}) => Promise<JsonValue>;
|
|
128
|
+
/** Google service account for Play Integrity (encrypted, write-only). `PUT /api/v1/projects/{project_id}/attestation/credentials/google` */
|
|
129
|
+
setGoogleCredentials: (args: {
|
|
130
|
+
projectId?: string;
|
|
131
|
+
serviceAccount: JsonValue;
|
|
132
|
+
}) => Promise<JsonValue>;
|
|
133
|
+
/** Apple key with DeviceCheck enabled (encrypted, write-only). `PUT /api/v1/projects/{project_id}/attestation/credentials/apple` */
|
|
134
|
+
setAppleCredentials: (args: {
|
|
135
|
+
projectId?: string;
|
|
136
|
+
p8: JsonValue;
|
|
137
|
+
keyId: JsonValue;
|
|
138
|
+
teamId: JsonValue;
|
|
139
|
+
}) => Promise<JsonValue>;
|
|
140
|
+
/** Remove the google or apple attestation credentials. `DELETE /api/v1/projects/{project_id}/attestation/credentials/{which}` */
|
|
141
|
+
deleteCredentials: (args: {
|
|
142
|
+
projectId?: string;
|
|
143
|
+
which: string;
|
|
144
|
+
}) => Promise<JsonValue>;
|
|
145
|
+
/** Create a debug token for simulators and CI (shown once). `POST /api/v1/projects/{project_id}/attestation/debug-tokens` */
|
|
146
|
+
createDebugToken: (args?: {
|
|
147
|
+
projectId?: string;
|
|
148
|
+
name?: JsonValue;
|
|
149
|
+
}) => Promise<JsonValue>;
|
|
150
|
+
/** Delete a debug token. `DELETE /api/v1/projects/{project_id}/attestation/debug-tokens/{token_id}` */
|
|
151
|
+
deleteDebugToken: (args: {
|
|
152
|
+
projectId?: string;
|
|
153
|
+
tokenId: string;
|
|
154
|
+
}) => Promise<JsonValue>;
|
|
155
|
+
/** One-time challenge to bind attestation evidence to (anon key). `POST /api/v1/attest/challenge` */
|
|
156
|
+
challenge: () => Promise<JsonValue>;
|
|
157
|
+
/** Exchange Play Integrity / App Attest / DeviceCheck / debug evidence for an attestation token. `POST /api/v1/attest/exchange` */
|
|
158
|
+
exchange: (args: {
|
|
159
|
+
provider: JsonValue;
|
|
160
|
+
appId?: JsonValue;
|
|
161
|
+
challenge?: JsonValue;
|
|
162
|
+
token?: JsonValue;
|
|
163
|
+
keyId?: JsonValue;
|
|
164
|
+
attestation?: JsonValue;
|
|
165
|
+
assertion?: JsonValue;
|
|
166
|
+
development?: JsonValue;
|
|
167
|
+
}) => Promise<JsonValue>;
|
|
168
|
+
};
|
|
169
|
+
auth: {
|
|
170
|
+
/** Confirm an email verification token. `POST /api/v1/auth/verify-email/confirm` */
|
|
171
|
+
confirmVerificationEmail: (args: {
|
|
172
|
+
token: JsonValue;
|
|
173
|
+
}) => Promise<JsonValue>;
|
|
174
|
+
/** `DELETE /api/v1/auth/mfa` */
|
|
175
|
+
disableMfa: (args: {
|
|
176
|
+
totpCode: JsonValue;
|
|
177
|
+
}) => Promise<JsonValue>;
|
|
178
|
+
/** `POST /api/v1/auth/mfa/enroll` */
|
|
179
|
+
enrollMfa: () => Promise<JsonValue>;
|
|
180
|
+
/** `GET /api/v1/auth/mfa/status` */
|
|
181
|
+
getMfaStatus: () => Promise<JsonValue>;
|
|
182
|
+
/** `GET /api/v1/auth/providers/config` */
|
|
183
|
+
getProvidersConfig: () => Promise<JsonValue>;
|
|
184
|
+
/** `GET /api/v1/auth/sessions/config` */
|
|
185
|
+
getSessionsConfig: () => Promise<JsonValue>;
|
|
186
|
+
/** `GET /api/v1/auth/product-users` */
|
|
187
|
+
listConsoleProductUsers: () => Promise<JsonValue>;
|
|
188
|
+
/** `GET /api/v1/auth/sessions` */
|
|
189
|
+
listSessions: () => Promise<JsonValue>;
|
|
190
|
+
/** `POST /api/v1/auth/sessions/revoke-others` */
|
|
191
|
+
revokeOtherSessions: () => Promise<JsonValue>;
|
|
192
|
+
/** `DELETE /api/v1/auth/sessions/{session_id}` */
|
|
193
|
+
revokeSession: (args: {
|
|
194
|
+
sessionId: string;
|
|
195
|
+
}) => Promise<JsonValue>;
|
|
196
|
+
/** Trigger a verification email for the authenticated user. `POST /api/v1/auth/verify-email/send` */
|
|
197
|
+
sendVerificationEmail: () => Promise<JsonValue>;
|
|
198
|
+
/** `PUT /api/v1/auth/providers/config` */
|
|
199
|
+
updateProvidersConfig: (args: {
|
|
200
|
+
body: JsonObject;
|
|
201
|
+
}) => Promise<JsonValue>;
|
|
202
|
+
/** `PUT /api/v1/auth/sessions/config` */
|
|
203
|
+
updateSessionsConfig: (args: {
|
|
204
|
+
body: JsonObject;
|
|
205
|
+
}) => Promise<JsonValue>;
|
|
206
|
+
/** Devices the signed-in user is signed in on (current = this one). `GET /api/v1/auth/devices` */
|
|
207
|
+
listDevices: () => Promise<JsonValue>;
|
|
208
|
+
/** Sign one device out: its sessions end and push tokens are removed. `DELETE /api/v1/auth/devices/{device_id}` */
|
|
209
|
+
signOutDevice: (args: {
|
|
210
|
+
deviceId: string;
|
|
211
|
+
}) => Promise<JsonValue>;
|
|
212
|
+
/** Registration options for a new passkey for the signed-in user. `POST /api/v1/auth/passkeys/register/start` */
|
|
213
|
+
passkeyRegisterStart: (args?: {
|
|
214
|
+
name?: JsonValue;
|
|
215
|
+
}) => Promise<JsonValue>;
|
|
216
|
+
/** Save a passkey from the authenticator's WebAuthn JSON. `POST /api/v1/auth/passkeys/register/finish` */
|
|
217
|
+
passkeyRegisterFinish: (args: {
|
|
218
|
+
credential: JsonValue;
|
|
219
|
+
name?: JsonValue;
|
|
220
|
+
}) => Promise<JsonValue>;
|
|
221
|
+
/** Passkey sign-in options: challenge_id and options. `POST /api/v1/auth/passkeys/authenticate/start` */
|
|
222
|
+
passkeyAuthenticateStart: (args?: {
|
|
223
|
+
userId?: JsonValue;
|
|
224
|
+
}) => Promise<JsonValue>;
|
|
225
|
+
/** Verify a signed passkey challenge and return a session. `POST /api/v1/auth/passkeys/authenticate/finish` */
|
|
226
|
+
passkeyAuthenticateFinish: (args: {
|
|
227
|
+
challengeId: JsonValue;
|
|
228
|
+
credential: JsonValue;
|
|
229
|
+
}) => Promise<JsonValue>;
|
|
230
|
+
/** The signed-in user's passkeys. `GET /api/v1/auth/passkeys` */
|
|
231
|
+
listPasskeys: () => Promise<JsonValue>;
|
|
232
|
+
/** Remove one of the signed-in user's passkeys. `DELETE /api/v1/auth/passkeys/{passkey_id}` */
|
|
233
|
+
deletePasskey: (args: {
|
|
234
|
+
passkeyId: string;
|
|
235
|
+
}) => Promise<JsonValue>;
|
|
236
|
+
};
|
|
237
|
+
billing: {
|
|
238
|
+
/** `POST /api/v1/invoices/{org_id}/build` */
|
|
239
|
+
buildInvoice: (args?: {
|
|
240
|
+
orgId?: string;
|
|
241
|
+
period?: JsonValue;
|
|
242
|
+
}) => Promise<JsonValue>;
|
|
243
|
+
/** `POST /api/v1/accounts/{account_id}/cancel` */
|
|
244
|
+
cancelAccount: (args: {
|
|
245
|
+
accountId: string;
|
|
246
|
+
}) => Promise<JsonValue>;
|
|
247
|
+
/** `POST /api/v1/billing/checkout` */
|
|
248
|
+
checkout: (args: {
|
|
249
|
+
body: JsonObject;
|
|
250
|
+
}) => Promise<JsonValue>;
|
|
251
|
+
/** `GET /api/v1/accounts/{account_id}` */
|
|
252
|
+
getAccount: (args: {
|
|
253
|
+
accountId: string;
|
|
254
|
+
}) => Promise<JsonValue>;
|
|
255
|
+
/** `GET /api/v1/billing/accounts/{account_id}/overage` */
|
|
256
|
+
getAccountOverage: (args: {
|
|
257
|
+
accountId: string;
|
|
258
|
+
}) => Promise<JsonValue>;
|
|
259
|
+
/** `GET /api/v1/billing/accounts/{account_id}/overage-prefs` */
|
|
260
|
+
getAccountOveragePrefs: (args: {
|
|
261
|
+
accountId: string;
|
|
262
|
+
}) => Promise<JsonValue>;
|
|
263
|
+
/** The org's overage switches (one setting for the whole org) `GET /api/v1/billing/orgs/{org_id}/overage-prefs` */
|
|
264
|
+
getOrgOveragePrefs: (args?: {
|
|
265
|
+
orgId?: string;
|
|
266
|
+
}) => Promise<JsonValue>;
|
|
267
|
+
/** `GET /api/v1/compute/{org_id}` */
|
|
268
|
+
getCompute: (args?: {
|
|
269
|
+
orgId?: string;
|
|
270
|
+
period?: JsonValue;
|
|
271
|
+
}) => Promise<JsonValue>;
|
|
272
|
+
/** `GET /api/v1/billing/fx` */
|
|
273
|
+
getFx: () => Promise<JsonValue>;
|
|
274
|
+
/** `GET /api/v1/billing/invoices/open` */
|
|
275
|
+
getOpenInvoice: () => Promise<JsonValue>;
|
|
276
|
+
/** `GET /api/v1/billing/overage/{org_id}` */
|
|
277
|
+
getOverage: (args?: {
|
|
278
|
+
orgId?: string;
|
|
279
|
+
}) => Promise<JsonValue>;
|
|
280
|
+
/** Fetch a billing plan by name. `GET /api/v1/plans/{name}` */
|
|
281
|
+
getPlan: (args: {
|
|
282
|
+
name: string;
|
|
283
|
+
}) => Promise<JsonValue>;
|
|
284
|
+
/** `GET /api/v1/billing/provider` */
|
|
285
|
+
getProvider: () => Promise<JsonValue>;
|
|
286
|
+
/** Fetch the active subscription for an organisation. `GET /api/v1/subscriptions/{org_id}` */
|
|
287
|
+
getSubscription: (args?: {
|
|
288
|
+
orgId?: string;
|
|
289
|
+
}) => Promise<JsonValue>;
|
|
290
|
+
/** Fetch usage counters for an organisation. `GET /api/v1/usage/{org_id}` */
|
|
291
|
+
getUsage: (args?: {
|
|
292
|
+
orgId?: string;
|
|
293
|
+
period?: JsonValue;
|
|
294
|
+
}) => Promise<JsonValue>;
|
|
295
|
+
/** Fetch historical usage for an organisation. `GET /api/v1/usage/{org_id}/history` */
|
|
296
|
+
getUsageHistory: (args?: {
|
|
297
|
+
orgId?: string;
|
|
298
|
+
months?: JsonValue;
|
|
299
|
+
}) => Promise<JsonValue>;
|
|
300
|
+
/** `GET /api/v1/invoices/{org_id}` */
|
|
301
|
+
listInvoices: (args?: {
|
|
302
|
+
orgId?: string;
|
|
303
|
+
}) => Promise<JsonValue>;
|
|
304
|
+
/** List public billing plans. `GET /api/v1/plans` */
|
|
305
|
+
listPlans: () => Promise<JsonValue>;
|
|
306
|
+
/** List subscriptions visible to the authenticated caller. `GET /api/v1/subscriptions` */
|
|
307
|
+
listSubscriptions: () => Promise<JsonValue>;
|
|
308
|
+
/** `POST /api/v1/billing/invoices/{org_id}/{period}/pay` */
|
|
309
|
+
payInvoice: (args: {
|
|
310
|
+
orgId?: string;
|
|
311
|
+
period: string;
|
|
312
|
+
}) => Promise<JsonValue>;
|
|
313
|
+
/** `POST /api/v1/billing/razorpay/create-order` */
|
|
314
|
+
razorpayCreateOrder: (args: {
|
|
315
|
+
body: JsonObject;
|
|
316
|
+
}) => Promise<JsonValue>;
|
|
317
|
+
/** `POST /api/v1/billing/razorpay/verify-payment` */
|
|
318
|
+
razorpayVerifyPayment: (args: {
|
|
319
|
+
body: JsonObject;
|
|
320
|
+
}) => Promise<JsonValue>;
|
|
321
|
+
/** `POST /api/v1/accounts/{account_id}/resume` */
|
|
322
|
+
resumeAccount: (args: {
|
|
323
|
+
accountId: string;
|
|
324
|
+
}) => Promise<JsonValue>;
|
|
325
|
+
/** `PUT /api/v1/billing/accounts/{account_id}/overage-prefs` */
|
|
326
|
+
setAccountOveragePrefs: (args: {
|
|
327
|
+
accountId: string;
|
|
328
|
+
services: JsonValue;
|
|
329
|
+
}) => Promise<JsonValue>;
|
|
330
|
+
/** Change the org's overage switches (org owners and admins) `PUT /api/v1/billing/orgs/{org_id}/overage-prefs` */
|
|
331
|
+
setOrgOveragePrefs: (args: {
|
|
332
|
+
orgId?: string;
|
|
333
|
+
services: JsonValue;
|
|
334
|
+
}) => Promise<JsonValue>;
|
|
335
|
+
/** Add-ons on the billing account: price, paid units, what renews, paid-through date, and the autopay mandate `GET /api/v1/accounts/{account_id}/addons` */
|
|
336
|
+
listAccountAddons: (args: {
|
|
337
|
+
accountId: string;
|
|
338
|
+
}) => Promise<JsonValue>;
|
|
339
|
+
/** Start paying for more add-on units (prorated to the period end); they count once the payment is verified `POST /api/v1/accounts/{account_id}/addons/{addon_id}/checkout` */
|
|
340
|
+
addonCheckout: (args: {
|
|
341
|
+
accountId: string;
|
|
342
|
+
addonId: string;
|
|
343
|
+
quantity: JsonValue;
|
|
344
|
+
projectId?: JsonValue;
|
|
345
|
+
}) => Promise<JsonValue>;
|
|
346
|
+
/** How many units renew at the period end (0 cancels); paid units keep working until then `PUT /api/v1/accounts/{account_id}/addons/{addon_id}/renewal` */
|
|
347
|
+
setAddonRenewal: (args: {
|
|
348
|
+
accountId: string;
|
|
349
|
+
addonId: string;
|
|
350
|
+
renewQuantity: JsonValue;
|
|
351
|
+
}) => Promise<JsonValue>;
|
|
352
|
+
/** Older switch: lowering schedules at the period end; more units than are paid for answer 402 (use addonCheckout) `POST /api/v1/accounts/{account_id}/addons/{addon_id}` */
|
|
353
|
+
setAccountAddon: (args: {
|
|
354
|
+
accountId: string;
|
|
355
|
+
addonId: string;
|
|
356
|
+
enabled: JsonValue;
|
|
357
|
+
quantity?: JsonValue;
|
|
358
|
+
}) => Promise<JsonValue>;
|
|
359
|
+
/** Renew automatically (true) or end the plan with the paid period (false) `POST /api/v1/accounts/{account_id}/autopay` */
|
|
360
|
+
setAccountAutopay: (args: {
|
|
361
|
+
accountId: string;
|
|
362
|
+
enabled: JsonValue;
|
|
363
|
+
}) => Promise<JsonValue>;
|
|
364
|
+
/** Start a ₹1 (refunded) authorisation that saves a card or UPI mandate for automatic renewals `POST /api/v1/accounts/{account_id}/autopay/setup` */
|
|
365
|
+
autopaySetup: (args: {
|
|
366
|
+
accountId: string;
|
|
367
|
+
customerEmail?: JsonValue;
|
|
368
|
+
name?: JsonValue;
|
|
369
|
+
}) => Promise<JsonValue>;
|
|
370
|
+
/** Remove the saved mandate; renewals become invoices to pay by hand `DELETE /api/v1/accounts/{account_id}/autopay/mandate` */
|
|
371
|
+
removeAutopayMandate: (args: {
|
|
372
|
+
accountId: string;
|
|
373
|
+
}) => Promise<JsonValue>;
|
|
374
|
+
/** Add-on prices (USD per month per unit) and the plans each is sold on, as staff set them. `GET /api/v1/plans/addons` */
|
|
375
|
+
billingListAddonPrices: () => Promise<JsonValue>;
|
|
376
|
+
};
|
|
377
|
+
builds: {
|
|
378
|
+
/** Check an app build Sovariq wrote (title, description, migration {name, up_sql, down_sql}, policies [{id, spl}], functions [{name, runtime, files}], tests [rules test cases]) against the project — nothing changes: the migration is dry-run up, down and up again, rules are simulated, rules tests run with the build's rules. Returns the build id and the report. `POST /api/v1/fn/builds/check` */
|
|
379
|
+
check: (args: {
|
|
380
|
+
build: JsonValue;
|
|
381
|
+
}) => Promise<JsonValue>;
|
|
382
|
+
/** Recent app builds of the project: title, status (checked, failed, pr_opened), each check's result and the pull request. `GET /api/v1/fn/builds` */
|
|
383
|
+
list: (args?: {
|
|
384
|
+
limit?: JsonValue;
|
|
385
|
+
}) => Promise<JsonValue>;
|
|
386
|
+
/** One app build: its files (the bundle), the check report and the pull request. `GET /api/v1/fn/builds/{build_id}` */
|
|
387
|
+
get: (args: {
|
|
388
|
+
buildId: string;
|
|
389
|
+
}) => Promise<JsonValue>;
|
|
390
|
+
/** Check the build again and open it as a pull request on the project's linked GitHub repository (one commit on a new branch; dev.app_build_prs_month). GitHub needs repository access: connect it with repository access or pass a token with repo scope. `POST /api/v1/fn/builds/{build_id}/pull-request` */
|
|
391
|
+
pullRequest: (args: {
|
|
392
|
+
buildId: string;
|
|
393
|
+
token?: JsonValue;
|
|
394
|
+
}) => Promise<JsonValue>;
|
|
395
|
+
/** Forget an app build (its pull request, if opened, stays on GitHub). `DELETE /api/v1/fn/builds/{build_id}` */
|
|
396
|
+
delete: (args: {
|
|
397
|
+
buildId: string;
|
|
398
|
+
}) => Promise<JsonValue>;
|
|
399
|
+
};
|
|
400
|
+
byok: {
|
|
401
|
+
/** Your organization's own encryption key (Enterprise): whether it's on, the key, its data key version, whether it is usable now, what it covers, and setup (Sovaria's AWS principal and the key policy statement). `GET /api/v1/byok` */
|
|
402
|
+
get: () => Promise<JsonValue>;
|
|
403
|
+
/** Use your AWS KMS key (its ARN) for the organization's storage files and backups. Checked end to end first (wrap, unwrap, a file written and read with it). Organization owners. `PUT /api/v1/byok` */
|
|
404
|
+
set: (args: {
|
|
405
|
+
provider?: JsonValue;
|
|
406
|
+
keyRef: JsonValue;
|
|
407
|
+
}) => Promise<JsonValue>;
|
|
408
|
+
/** A new data key version under the same KMS key; older versions stay to decrypt what they encrypted. Organization owners. `POST /api/v1/byok/rotate` */
|
|
409
|
+
rotate: () => Promise<JsonValue>;
|
|
410
|
+
/** Ask your KMS now whether Sovaria can still use the key. `POST /api/v1/byok/check` */
|
|
411
|
+
check: () => Promise<JsonValue>;
|
|
412
|
+
/** Rewrite the organization's existing storage files under its key (in the background; progress in byok.get). Organization owners. `POST /api/v1/byok/reencrypt-storage` */
|
|
413
|
+
reencryptStorage: () => Promise<JsonValue>;
|
|
414
|
+
};
|
|
415
|
+
compliance: {
|
|
416
|
+
/** Compliance overview for an organization (owners and admins): audit-log check, encryption, backups, access, regions. `GET /api/v1/org/{org_id}/compliance` */
|
|
417
|
+
overview: (args?: {
|
|
418
|
+
orgId?: string;
|
|
419
|
+
projectId?: JsonValue;
|
|
420
|
+
}) => Promise<JsonValue>;
|
|
421
|
+
};
|
|
422
|
+
crashes: {
|
|
423
|
+
/** App crash issues of the project (grouped reports from sov.crashes), newest first, filtered by status, release, app environment, platform or text, with a 24-hour trend and the plan's limits. `GET /api/v1/crashes/issues` */
|
|
424
|
+
listIssues: (args?: {
|
|
425
|
+
status?: JsonValue;
|
|
426
|
+
limit?: JsonValue;
|
|
427
|
+
release?: JsonValue;
|
|
428
|
+
environment?: JsonValue;
|
|
429
|
+
platform?: JsonValue;
|
|
430
|
+
q?: JsonValue;
|
|
431
|
+
sort?: JsonValue;
|
|
432
|
+
handled?: JsonValue;
|
|
433
|
+
}) => Promise<JsonValue>;
|
|
434
|
+
/** One crash issue: sample report (stack, breadcrumbs, device, release) and its last 50 reports. `GET /api/v1/crashes/issues/{fingerprint}` */
|
|
435
|
+
getIssue: (args: {
|
|
436
|
+
fingerprint: string;
|
|
437
|
+
}) => Promise<JsonValue>;
|
|
438
|
+
/** Mark a crash issue open, resolved (reopens if it happens again) or ignored. `POST /api/v1/crashes/issues/{fingerprint}/status` */
|
|
439
|
+
setIssueStatus: (args: {
|
|
440
|
+
fingerprint: string;
|
|
441
|
+
status: JsonValue;
|
|
442
|
+
}) => Promise<JsonValue>;
|
|
443
|
+
/** Crash reports, release-health sessions and debug-file storage used this month, and the plan's limits. `GET /api/v1/crashes/usage` */
|
|
444
|
+
usage: () => Promise<JsonValue>;
|
|
445
|
+
/** Crash events over time (hourly up to 2 days, else daily) and the releases, app environments and platforms seen. `GET /api/v1/crashes/trends` */
|
|
446
|
+
trends: (args?: {
|
|
447
|
+
days?: JsonValue;
|
|
448
|
+
release?: JsonValue;
|
|
449
|
+
environment?: JsonValue;
|
|
450
|
+
platform?: JsonValue;
|
|
451
|
+
}) => Promise<JsonValue>;
|
|
452
|
+
/** Release health: sessions, crash-free sessions and users, and adoption per release. `GET /api/v1/crashes/releases` */
|
|
453
|
+
releases: (args?: {
|
|
454
|
+
days?: JsonValue;
|
|
455
|
+
environment?: JsonValue;
|
|
456
|
+
platform?: JsonValue;
|
|
457
|
+
limit?: JsonValue;
|
|
458
|
+
}) => Promise<JsonValue>;
|
|
459
|
+
/** Uploaded source maps, ProGuard/R8 mappings and Apple symbols, and the storage used. `GET /api/v1/crashes/debug-files` */
|
|
460
|
+
listDebugFiles: (args?: {
|
|
461
|
+
kind?: JsonValue;
|
|
462
|
+
release?: JsonValue;
|
|
463
|
+
}) => Promise<JsonValue>;
|
|
464
|
+
/** Delete one debug file (frames of that release stay as they were stored). `DELETE /api/v1/crashes/debug-files/{file_id}` */
|
|
465
|
+
deleteDebugFile: (args: {
|
|
466
|
+
fileId: string;
|
|
467
|
+
}) => Promise<JsonValue>;
|
|
468
|
+
};
|
|
469
|
+
data: {
|
|
470
|
+
/** Add a column to an existing table. `POST /api/v1/data/rel/column/add` */
|
|
471
|
+
addColumn: (args: {
|
|
472
|
+
tableName: JsonValue;
|
|
473
|
+
columnName: JsonValue;
|
|
474
|
+
dataType: JsonValue;
|
|
475
|
+
isNullable?: JsonValue;
|
|
476
|
+
isUnique?: JsonValue;
|
|
477
|
+
defaultValue?: JsonValue;
|
|
478
|
+
}) => Promise<JsonValue>;
|
|
479
|
+
/** Add a foreign-key relation. `POST /api/v1/data/rel/foreign-key/add` */
|
|
480
|
+
addForeignKey: (args: {
|
|
481
|
+
tableName: JsonValue;
|
|
482
|
+
columnName: JsonValue;
|
|
483
|
+
referencedTable: JsonValue;
|
|
484
|
+
referencedColumn: JsonValue;
|
|
485
|
+
}) => Promise<JsonValue>;
|
|
486
|
+
/** Start a table transaction and receive tx/snapshot IDs. `POST /api/v1/data/rel/transaction/begin` */
|
|
487
|
+
beginTransaction: () => Promise<JsonValue>;
|
|
488
|
+
/** Commit a previously opened table transaction. `POST /api/v1/data/rel/transaction/commit` */
|
|
489
|
+
commitTransaction: (args: {
|
|
490
|
+
txid: JsonValue;
|
|
491
|
+
}) => Promise<JsonValue>;
|
|
492
|
+
/** Drop a column from a table. `POST /api/v1/data/rel/column/drop` */
|
|
493
|
+
dropColumn: (args: {
|
|
494
|
+
tableName: JsonValue;
|
|
495
|
+
columnName: JsonValue;
|
|
496
|
+
}) => Promise<JsonValue>;
|
|
497
|
+
/** Drop a foreign-key relation. `POST /api/v1/data/rel/foreign-key/drop` */
|
|
498
|
+
dropForeignKey: (args: {
|
|
499
|
+
tableName: JsonValue;
|
|
500
|
+
columnName: JsonValue;
|
|
501
|
+
referencedTable: JsonValue;
|
|
502
|
+
referencedColumn: JsonValue;
|
|
503
|
+
}) => Promise<JsonValue>;
|
|
504
|
+
/** Drop a relational table. `POST /api/v1/data/rel/drop` */
|
|
505
|
+
dropTable: (args: {
|
|
506
|
+
tableName: JsonValue;
|
|
507
|
+
}) => Promise<JsonValue>;
|
|
508
|
+
/** `POST /api/v1/data/rel/transaction/rollback` */
|
|
509
|
+
rollbackTransaction: (args: {
|
|
510
|
+
txid: JsonValue;
|
|
511
|
+
}) => Promise<JsonValue>;
|
|
512
|
+
/** Tables that keep history (versions, oldest, retention) and the plan's db.history_* limits. `GET /api/v1/data/rel/history` */
|
|
513
|
+
tableHistory: () => Promise<JsonValue>;
|
|
514
|
+
/** Turn a table's history on (every row version kept; read with sov_as_of(NULL::table, time)) or off (versions dropped). `POST /api/v1/data/rel/history` */
|
|
515
|
+
setTableHistory: (args: {
|
|
516
|
+
tableName: JsonValue;
|
|
517
|
+
enabled: JsonValue;
|
|
518
|
+
keepDays?: JsonValue;
|
|
519
|
+
}) => Promise<JsonValue>;
|
|
520
|
+
/** The schema as one short line per table: columns with types, keys, →references, allowed values, indexes and owner-only rows. tables (comma-separated) expands only those in a big schema; since=<version> answers unchanged when nothing changed. `GET /api/v1/data/rel/schema/digest` */
|
|
521
|
+
schemaDigest: (args?: {
|
|
522
|
+
tables?: JsonValue;
|
|
523
|
+
maxChars?: JsonValue;
|
|
524
|
+
since?: JsonValue;
|
|
525
|
+
}) => Promise<JsonValue>;
|
|
526
|
+
/** Create or extend tables from one declarative plan ([{name, columns, patterns, unique, indexes}]; columns as objects or short form like "status text!='draft' in(draft|live)" or "customer_id →customers cascade"). Checked first (422 lists every problem, nothing changes), then applied as one reversible migration and verified. dry_run returns the SQL without applying. `POST /api/v1/data/rel/schema/plan` */
|
|
527
|
+
applySchemaPlan: (args: {
|
|
528
|
+
tables: JsonValue;
|
|
529
|
+
dryRun?: JsonValue;
|
|
530
|
+
name?: JsonValue;
|
|
531
|
+
}) => Promise<JsonValue>;
|
|
532
|
+
/** Apply a migration and record it in the project's history, in one transaction (all or nothing). down_sql makes it reversible; the same version with the same SQL again does nothing, with different SQL it is refused (409). `POST /api/v1/data/rel/migrations/apply` */
|
|
533
|
+
applyMigration: (args: {
|
|
534
|
+
name: JsonValue;
|
|
535
|
+
upSql: JsonValue;
|
|
536
|
+
downSql?: JsonValue;
|
|
537
|
+
version?: JsonValue;
|
|
538
|
+
}) => Promise<JsonValue>;
|
|
539
|
+
/** Run a migration inside a transaction and roll it back: whether it would apply. Nothing is kept. `POST /api/v1/data/rel/migrations/dry-run` */
|
|
540
|
+
dryRunMigration: (args: {
|
|
541
|
+
name: JsonValue;
|
|
542
|
+
upSql: JsonValue;
|
|
543
|
+
downSql?: JsonValue;
|
|
544
|
+
}) => Promise<JsonValue>;
|
|
545
|
+
/** Check several migrations ([{name, up_sql}], up to 500 and 5 MB of SQL) in order inside one transaction that is rolled back, so later ones see what earlier ones create. Returns status dry_run_ok, or failed with failed.index, name and error for the first that fails. `POST /api/v1/data/rel/migrations/dry-run-sequence` */
|
|
546
|
+
dryRunMigrations: (args: {
|
|
547
|
+
migrations: JsonValue;
|
|
548
|
+
}) => Promise<JsonValue>;
|
|
549
|
+
/** Undo the most recent migration with its down SQL (or version, with force when it isn't the latest). `POST /api/v1/data/rel/migrations/rollback` */
|
|
550
|
+
rollbackMigration: (args?: {
|
|
551
|
+
version?: JsonValue;
|
|
552
|
+
force?: JsonValue;
|
|
553
|
+
}) => Promise<JsonValue>;
|
|
554
|
+
/** Drop every user table and forget the migration history, in one transaction (what `sov db reset` runs). dry_run lists what would be dropped. `POST /api/v1/data/rel/migrations/reset` */
|
|
555
|
+
resetMigrations: (args?: {
|
|
556
|
+
dryRun?: JsonValue;
|
|
557
|
+
}) => Promise<JsonValue>;
|
|
558
|
+
/** Run a document pipeline: where, aggregate, distinct, sort, offset, limit, select, remove_fields, sample. `POST /api/v1/data/doc/_pipeline/{collection}` */
|
|
559
|
+
docPipeline: (args: {
|
|
560
|
+
collection: string;
|
|
561
|
+
stages: JsonValue;
|
|
562
|
+
collectionGroup?: JsonValue;
|
|
563
|
+
}) => Promise<JsonValue>;
|
|
564
|
+
/** How two environments' databases differ (to_env '' = production): migrations to deploy and only in the target, and the tables, columns, indexes, constraints and row policies that would be added, changed or dropped. Read-only. `GET /api/v1/data/rel/schema/diff` */
|
|
565
|
+
schemaDiff: (args: {
|
|
566
|
+
fromEnv: JsonValue;
|
|
567
|
+
toEnv?: JsonValue;
|
|
568
|
+
}) => Promise<JsonValue>;
|
|
569
|
+
/** Deploy a branch (or staging environment) into production, or into a staging environment with to_env_id: its migrations, functions, policies and project settings, all checked first with nothing written (dry_run=true returns only the check). from_name/to_name label the commit. accept_violations deploys even when production's access simulation finds new write access (deploys into staging aren't simulated). `POST /api/v1/data/rel/migrations/promote` */
|
|
570
|
+
promoteEnvironment: (args: {
|
|
571
|
+
fromEnvId: JsonValue;
|
|
572
|
+
toEnvId?: JsonValue;
|
|
573
|
+
fromName?: JsonValue;
|
|
574
|
+
toName?: JsonValue;
|
|
575
|
+
dryRun?: JsonValue;
|
|
576
|
+
acceptViolations?: JsonValue;
|
|
577
|
+
}) => Promise<JsonValue>;
|
|
578
|
+
};
|
|
579
|
+
deadLetters: {
|
|
580
|
+
/** Background runs that ran out of tries (trigger events, async calls, schedules), kept for the plan's fn.dead_letter_days. `GET /api/v1/fn/dead-letters` */
|
|
581
|
+
list: (args?: {
|
|
582
|
+
functionName?: JsonValue;
|
|
583
|
+
triggerId?: JsonValue;
|
|
584
|
+
limit?: JsonValue;
|
|
585
|
+
offset?: JsonValue;
|
|
586
|
+
}) => Promise<JsonValue>;
|
|
587
|
+
/** Run a dead-lettered event again (on the function's live version). `POST /api/v1/fn/dead-letters/{invocation_id}/replay` */
|
|
588
|
+
replay: (args: {
|
|
589
|
+
invocationId: string;
|
|
590
|
+
}) => Promise<JsonValue>;
|
|
591
|
+
/** Replay up to 100 dead letters at once; returns replayed and failed ids. `POST /api/v1/fn/dead-letters/replay` */
|
|
592
|
+
replayMany: (args: {
|
|
593
|
+
ids: JsonValue;
|
|
594
|
+
}) => Promise<JsonValue>;
|
|
595
|
+
/** Discard a dead letter for good. `DELETE /api/v1/fn/dead-letters/{invocation_id}` */
|
|
596
|
+
discard: (args: {
|
|
597
|
+
invocationId: string;
|
|
598
|
+
}) => Promise<JsonValue>;
|
|
599
|
+
};
|
|
600
|
+
distribution: {
|
|
601
|
+
/** Tester builds, groups, testers, usage and the plan's limits. `GET /api/v1/projects/{project_id}/distribution` */
|
|
602
|
+
overview: (args?: {
|
|
603
|
+
projectId?: string;
|
|
604
|
+
}) => Promise<JsonValue>;
|
|
605
|
+
/** Start a tester build upload: returns the release and a signed upload URL (PUT the .apk/.aab/.ipa there, then finalize). `POST /api/v1/projects/{project_id}/distribution/releases` */
|
|
606
|
+
createRelease: (args: {
|
|
607
|
+
projectId?: string;
|
|
608
|
+
filename: JsonValue;
|
|
609
|
+
sizeBytes: JsonValue;
|
|
610
|
+
notes?: JsonValue;
|
|
611
|
+
groups?: JsonValue;
|
|
612
|
+
env?: JsonValue;
|
|
613
|
+
gitRef?: JsonValue;
|
|
614
|
+
appId?: JsonValue;
|
|
615
|
+
notify?: JsonValue;
|
|
616
|
+
}) => Promise<JsonValue>;
|
|
617
|
+
/** Read the uploaded build (package/bundle id, version, build, minimum OS), share it with its groups and email their testers. `POST /api/v1/projects/{project_id}/distribution/releases/{release_id}/finalize` */
|
|
618
|
+
finalizeRelease: (args: {
|
|
619
|
+
projectId?: string;
|
|
620
|
+
releaseId: string;
|
|
621
|
+
}) => Promise<JsonValue>;
|
|
622
|
+
/** Change a build's notes or groups. `PATCH /api/v1/projects/{project_id}/distribution/releases/{release_id}` */
|
|
623
|
+
updateRelease: (args: {
|
|
624
|
+
projectId?: string;
|
|
625
|
+
releaseId: string;
|
|
626
|
+
notes?: JsonValue;
|
|
627
|
+
groups?: JsonValue;
|
|
628
|
+
}) => Promise<JsonValue>;
|
|
629
|
+
/** Delete a tester build and its file. `DELETE /api/v1/projects/{project_id}/distribution/releases/{release_id}` */
|
|
630
|
+
deleteRelease: (args: {
|
|
631
|
+
projectId?: string;
|
|
632
|
+
releaseId: string;
|
|
633
|
+
}) => Promise<JsonValue>;
|
|
634
|
+
/** Add testers by email to groups and send them install links. `POST /api/v1/projects/{project_id}/distribution/testers` */
|
|
635
|
+
addTesters: (args: {
|
|
636
|
+
projectId?: string;
|
|
637
|
+
emails: JsonValue;
|
|
638
|
+
groups?: JsonValue;
|
|
639
|
+
sendInvite?: JsonValue;
|
|
640
|
+
}) => Promise<JsonValue>;
|
|
641
|
+
/** Remove a tester; their install links stop working at once. `DELETE /api/v1/projects/{project_id}/distribution/testers/{tester_id}` */
|
|
642
|
+
removeTester: (args: {
|
|
643
|
+
projectId?: string;
|
|
644
|
+
testerId: string;
|
|
645
|
+
}) => Promise<JsonValue>;
|
|
646
|
+
/** Send a tester a new install link (older links stop working). `POST /api/v1/projects/{project_id}/distribution/testers/{tester_id}/invite` */
|
|
647
|
+
resendInvite: (args: {
|
|
648
|
+
projectId?: string;
|
|
649
|
+
testerId: string;
|
|
650
|
+
}) => Promise<JsonValue>;
|
|
651
|
+
/** Delete a tester group. `DELETE /api/v1/projects/{project_id}/distribution/groups/{name}` */
|
|
652
|
+
deleteGroup: (args: {
|
|
653
|
+
projectId?: string;
|
|
654
|
+
name: string;
|
|
655
|
+
}) => Promise<JsonValue>;
|
|
656
|
+
};
|
|
657
|
+
e2ee: {
|
|
658
|
+
/** Create (or fetch) the active e2ee channel key. `POST /api/v1/rt/e2ee/keys/bootstrap` */
|
|
659
|
+
bootstrapKey: (args: {
|
|
660
|
+
channel: JsonValue;
|
|
661
|
+
ttlSeconds?: JsonValue;
|
|
662
|
+
forceNew?: JsonValue;
|
|
663
|
+
}) => Promise<JsonValue>;
|
|
664
|
+
/** Get the active e2ee key for a channel, wrapped for ``client_public_key``. `GET /api/v1/rt/e2ee/keys/active/{channel}` */
|
|
665
|
+
getActiveKey: (args: {
|
|
666
|
+
channel: string;
|
|
667
|
+
clientPublicKey?: JsonValue;
|
|
668
|
+
}) => Promise<JsonValue>;
|
|
669
|
+
/** Get key material by channel/key_id, wrapped for ``client_public_key``. `GET /api/v1/rt/e2ee/keys/{channel}/{key_id}` */
|
|
670
|
+
getKey: (args: {
|
|
671
|
+
channel: string;
|
|
672
|
+
keyId: string;
|
|
673
|
+
clientPublicKey?: JsonValue;
|
|
674
|
+
}) => Promise<JsonValue>;
|
|
675
|
+
/** List key metadata for a channel. `GET /api/v1/rt/e2ee/keys/{channel}` */
|
|
676
|
+
listKeys: (args: {
|
|
677
|
+
channel: string;
|
|
678
|
+
}) => Promise<JsonValue>;
|
|
679
|
+
/** Revoke an active or historical channel key. `POST /api/v1/rt/e2ee/keys/revoke` */
|
|
680
|
+
revokeKey: (args: {
|
|
681
|
+
channel: JsonValue;
|
|
682
|
+
keyId?: JsonValue;
|
|
683
|
+
reason?: JsonValue;
|
|
684
|
+
}) => Promise<JsonValue>;
|
|
685
|
+
/** Rotate e2ee key material for a channel. `POST /api/v1/rt/e2ee/keys/rotate` */
|
|
686
|
+
rotateKey: (args: {
|
|
687
|
+
channel: JsonValue;
|
|
688
|
+
ttlSeconds?: JsonValue;
|
|
689
|
+
}) => Promise<JsonValue>;
|
|
690
|
+
};
|
|
691
|
+
embeddings: {
|
|
692
|
+
/** The project's embedding model, who pays (managed | own_key), dimensions and list price. `GET /api/v1/embeddings/settings` */
|
|
693
|
+
getSettings: () => Promise<JsonValue>;
|
|
694
|
+
/** Use the project's own provider key: provider (openai | gemini | openai_compatible), model, dimensions, base_url, api_key. Tested before it is saved. `PUT /api/v1/embeddings/settings` */
|
|
695
|
+
setSettings: (args: {
|
|
696
|
+
body: JsonObject;
|
|
697
|
+
}) => Promise<JsonValue>;
|
|
698
|
+
/** Go back to Sovaria's managed embedding model. `DELETE /api/v1/embeddings/settings` */
|
|
699
|
+
clearSettings: () => Promise<JsonValue>;
|
|
700
|
+
/** Texts, tokens and estimated cost per month, model and who paid. `GET /api/v1/embeddings/usage` */
|
|
701
|
+
usage: (args?: {
|
|
702
|
+
months?: JsonValue;
|
|
703
|
+
}) => Promise<JsonValue>;
|
|
704
|
+
};
|
|
705
|
+
experiments: {
|
|
706
|
+
/** A/B experiments of an environment and the plan's limits. `GET /api/v1/projects/{project_id}/experiments` */
|
|
707
|
+
listExperiments: (args?: {
|
|
708
|
+
projectId?: string;
|
|
709
|
+
env?: JsonValue;
|
|
710
|
+
}) => Promise<JsonValue>;
|
|
711
|
+
/** Create an experiment on a parameter: variants [{name, value, weight}], control, condition?, exposure_pct?, goal {type, event|sql, value_prop?}, min_sample?. `POST /api/v1/projects/{project_id}/experiments` */
|
|
712
|
+
createExperiment: (args: {
|
|
713
|
+
projectId?: string;
|
|
714
|
+
name: JsonValue;
|
|
715
|
+
param: JsonValue;
|
|
716
|
+
variants: JsonValue;
|
|
717
|
+
control?: JsonValue;
|
|
718
|
+
condition?: JsonValue;
|
|
719
|
+
exposurePct?: JsonValue;
|
|
720
|
+
goal: JsonValue;
|
|
721
|
+
minSample?: JsonValue;
|
|
722
|
+
description?: JsonValue;
|
|
723
|
+
env?: JsonValue;
|
|
724
|
+
}) => Promise<JsonValue>;
|
|
725
|
+
/** One experiment (by id or name). `GET /api/v1/projects/{project_id}/experiments/{ref}` */
|
|
726
|
+
getExperiment: (args: {
|
|
727
|
+
projectId?: string;
|
|
728
|
+
ref: string;
|
|
729
|
+
env?: JsonValue;
|
|
730
|
+
}) => Promise<JsonValue>;
|
|
731
|
+
/** Change an experiment: weights and exposure while running (assigned units keep their variant); anything while draft. `PATCH /api/v1/projects/{project_id}/experiments/{ref}` */
|
|
732
|
+
updateExperiment: (args: {
|
|
733
|
+
projectId?: string;
|
|
734
|
+
ref: string;
|
|
735
|
+
variants?: JsonValue;
|
|
736
|
+
control?: JsonValue;
|
|
737
|
+
exposurePct?: JsonValue;
|
|
738
|
+
goal?: JsonValue;
|
|
739
|
+
minSample?: JsonValue;
|
|
740
|
+
description?: JsonValue;
|
|
741
|
+
env?: JsonValue;
|
|
742
|
+
}) => Promise<JsonValue>;
|
|
743
|
+
/** Delete a draft or stopped experiment. `DELETE /api/v1/projects/{project_id}/experiments/{ref}` */
|
|
744
|
+
deleteExperiment: (args: {
|
|
745
|
+
projectId?: string;
|
|
746
|
+
ref: string;
|
|
747
|
+
env?: JsonValue;
|
|
748
|
+
}) => Promise<JsonValue>;
|
|
749
|
+
/** Start an experiment (publishes a config version with it). `POST /api/v1/projects/{project_id}/experiments/{ref}/start` */
|
|
750
|
+
startExperiment: (args: {
|
|
751
|
+
projectId?: string;
|
|
752
|
+
ref: string;
|
|
753
|
+
env?: JsonValue;
|
|
754
|
+
}) => Promise<JsonValue>;
|
|
755
|
+
/** Stop an experiment (optionally naming the winner). `POST /api/v1/projects/{project_id}/experiments/{ref}/stop` */
|
|
756
|
+
stopExperiment: (args: {
|
|
757
|
+
projectId?: string;
|
|
758
|
+
ref: string;
|
|
759
|
+
winner?: JsonValue;
|
|
760
|
+
env?: JsonValue;
|
|
761
|
+
}) => Promise<JsonValue>;
|
|
762
|
+
/** Per-variant results: z-test or Welch with 95% intervals, sample-ratio check, winner once every variant has min_sample units. `GET /api/v1/projects/{project_id}/experiments/{ref}/results` */
|
|
763
|
+
results: (args: {
|
|
764
|
+
projectId?: string;
|
|
765
|
+
ref: string;
|
|
766
|
+
env?: JsonValue;
|
|
767
|
+
}) => Promise<JsonValue>;
|
|
768
|
+
/** Make a variant (the winner by default) the parameter's default, end the experiment and publish. `POST /api/v1/projects/{project_id}/experiments/{ref}/rollout` */
|
|
769
|
+
rollout: (args: {
|
|
770
|
+
projectId?: string;
|
|
771
|
+
ref: string;
|
|
772
|
+
variant?: JsonValue;
|
|
773
|
+
env?: JsonValue;
|
|
774
|
+
}) => Promise<JsonValue>;
|
|
775
|
+
};
|
|
776
|
+
functions: {
|
|
777
|
+
/** `DELETE /api/v1/fn/functions/{function_name}` */
|
|
778
|
+
delete: (args: {
|
|
779
|
+
functionName: string;
|
|
780
|
+
}) => Promise<JsonValue>;
|
|
781
|
+
/** `GET /api/v1/fn/functions/{function_name}` */
|
|
782
|
+
get: (args: {
|
|
783
|
+
functionName: string;
|
|
784
|
+
projectId?: JsonValue;
|
|
785
|
+
}) => Promise<JsonValue>;
|
|
786
|
+
/** `GET /api/v1/fn/functions/{function_name}/bindings` */
|
|
787
|
+
getBindings: (args: {
|
|
788
|
+
functionName: string;
|
|
789
|
+
}) => Promise<JsonValue>;
|
|
790
|
+
/** `GET /api/v1/fn/functions/{function_name}/policy` */
|
|
791
|
+
getPolicy: (args: {
|
|
792
|
+
functionName: string;
|
|
793
|
+
}) => Promise<JsonValue>;
|
|
794
|
+
/** `GET /api/v1/fn/functions/{function_name}/source` */
|
|
795
|
+
getSource: (args: {
|
|
796
|
+
functionName: string;
|
|
797
|
+
projectId?: JsonValue;
|
|
798
|
+
}) => Promise<JsonValue>;
|
|
799
|
+
/** `POST /api/v1/fn/github/commit` */
|
|
800
|
+
githubCommit: (args: {
|
|
801
|
+
body: JsonObject;
|
|
802
|
+
}) => Promise<JsonValue>;
|
|
803
|
+
/** `POST /api/v1/fn/github/import` */
|
|
804
|
+
githubImport: (args: {
|
|
805
|
+
body: JsonObject;
|
|
806
|
+
}) => Promise<JsonValue>;
|
|
807
|
+
/** Get status for an async Forge invocation id. `GET /api/v1/fn/invocations/{invocation_id}` */
|
|
808
|
+
invocationStatus: (args: {
|
|
809
|
+
invocationId: string;
|
|
810
|
+
projectId?: JsonValue;
|
|
811
|
+
}) => Promise<JsonValue>;
|
|
812
|
+
/** List Forge functions with active version and queue summary. `GET /api/v1/fn/functions` */
|
|
813
|
+
list: (args?: {
|
|
814
|
+
projectId?: JsonValue;
|
|
815
|
+
limit?: JsonValue;
|
|
816
|
+
offset?: JsonValue;
|
|
817
|
+
}) => Promise<JsonValue>;
|
|
818
|
+
/** Diff two simulation invocation outputs. `GET /api/v1/fn/{function_name}/history/simulation-diff` */
|
|
819
|
+
simulationDiff: (args: {
|
|
820
|
+
functionName: string;
|
|
821
|
+
projectId?: JsonValue;
|
|
822
|
+
leftInvocationId?: JsonValue;
|
|
823
|
+
rightInvocationId?: JsonValue;
|
|
824
|
+
}) => Promise<JsonValue>;
|
|
825
|
+
/** Get forge deployment status by deploy id. `GET /api/v1/fn/{deploy_id}/status` */
|
|
826
|
+
status: (args: {
|
|
827
|
+
deployId: string;
|
|
828
|
+
projectId?: JsonValue;
|
|
829
|
+
}) => Promise<JsonValue>;
|
|
830
|
+
/** `PATCH /api/v1/fn/functions/{function_name}` */
|
|
831
|
+
update: (args: {
|
|
832
|
+
functionName: string;
|
|
833
|
+
body: JsonObject;
|
|
834
|
+
projectId?: JsonValue;
|
|
835
|
+
}) => Promise<JsonValue>;
|
|
836
|
+
/** `PUT /api/v1/fn/functions/{function_name}/bindings` */
|
|
837
|
+
updateBindings: (args: {
|
|
838
|
+
functionName: string;
|
|
839
|
+
bindings: JsonValue;
|
|
840
|
+
}) => Promise<JsonValue>;
|
|
841
|
+
/** `PUT /api/v1/fn/functions/{function_name}/policy` */
|
|
842
|
+
updatePolicy: (args: {
|
|
843
|
+
functionName: string;
|
|
844
|
+
policy: JsonObject;
|
|
845
|
+
}) => Promise<JsonValue>;
|
|
846
|
+
/** List deployment versions for a Forge function. `GET /api/v1/fn/{function_name}/versions` */
|
|
847
|
+
versions: (args: {
|
|
848
|
+
functionName: string;
|
|
849
|
+
projectId?: JsonValue;
|
|
850
|
+
limit?: JsonValue;
|
|
851
|
+
offset?: JsonValue;
|
|
852
|
+
}) => Promise<JsonValue>;
|
|
853
|
+
/** Preview environments of the linked GitHub repository's open pull requests: PR number and title, status (creating, deploying, ready, partial, error), API URL, functions and migrations applied. `GET /api/v1/fn/github/previews` */
|
|
854
|
+
listGithubPreviews: () => Promise<JsonValue>;
|
|
855
|
+
/** A function's own memory, timeout and minimum-instances settings, what it runs with (effective) and the plan's maximums. `GET /api/v1/fn/functions/{function_name}/limits` */
|
|
856
|
+
getFunctionLimits: (args: {
|
|
857
|
+
functionName: string;
|
|
858
|
+
}) => Promise<JsonValue>;
|
|
859
|
+
/** Lower a function's timeout or memory (never above the plan; null = plan maximum) and set its minimum instances: pre-started sandboxes kept for it so its calls start warm (plan fn.min_instances; left out = unchanged). `PUT /api/v1/fn/functions/{function_name}/limits` */
|
|
860
|
+
setFunctionLimits: (args: {
|
|
861
|
+
functionName: string;
|
|
862
|
+
timeoutSec?: JsonValue;
|
|
863
|
+
memoryMb?: JsonValue;
|
|
864
|
+
minInstances?: JsonValue;
|
|
865
|
+
}) => Promise<JsonValue>;
|
|
866
|
+
};
|
|
867
|
+
governance: {
|
|
868
|
+
/** `GET /api/v1/governance/admin/databases` */
|
|
869
|
+
adminDatabases: () => Promise<JsonValue>;
|
|
870
|
+
/** `GET /api/v1/governance/tenants/{org_id}` */
|
|
871
|
+
getTenant: (args?: {
|
|
872
|
+
orgId?: string;
|
|
873
|
+
}) => Promise<JsonValue>;
|
|
874
|
+
/** `GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/connection` */
|
|
875
|
+
getTenantDatabaseConnection: (args?: {
|
|
876
|
+
orgId?: string;
|
|
877
|
+
projectId?: string;
|
|
878
|
+
}) => Promise<JsonValue>;
|
|
879
|
+
/** `GET /api/v1/governance/hosts` */
|
|
880
|
+
listHosts: (args?: {
|
|
881
|
+
regionId?: JsonValue;
|
|
882
|
+
}) => Promise<JsonValue>;
|
|
883
|
+
/** `GET /api/v1/governance/regions` */
|
|
884
|
+
listRegions: () => Promise<JsonValue>;
|
|
885
|
+
/** `GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/backups` */
|
|
886
|
+
listTenantDatabaseBackups: (args?: {
|
|
887
|
+
orgId?: string;
|
|
888
|
+
projectId?: string;
|
|
889
|
+
limit?: JsonValue;
|
|
890
|
+
}) => Promise<JsonValue>;
|
|
891
|
+
/** `GET /api/v1/governance/tenants/{org_id}/databases` */
|
|
892
|
+
listTenantDatabases: (args?: {
|
|
893
|
+
orgId?: string;
|
|
894
|
+
}) => Promise<JsonValue>;
|
|
895
|
+
/** `GET /api/v1/governance/tenants` */
|
|
896
|
+
listTenants: () => Promise<JsonValue>;
|
|
897
|
+
/** `GET /api/v1/governance/metrics/overview` */
|
|
898
|
+
metricsOverview: () => Promise<JsonValue>;
|
|
899
|
+
/** `PATCH /api/v1/governance/hosts/{host_id}` */
|
|
900
|
+
patchHost: (args: {
|
|
901
|
+
hostId: string;
|
|
902
|
+
body: JsonObject;
|
|
903
|
+
}) => Promise<JsonValue>;
|
|
904
|
+
/** `PATCH /api/v1/governance/regions/{region_id}` */
|
|
905
|
+
patchRegion: (args: {
|
|
906
|
+
regionId: string;
|
|
907
|
+
body: JsonObject;
|
|
908
|
+
}) => Promise<JsonValue>;
|
|
909
|
+
/** `POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/pause` */
|
|
910
|
+
pauseTenantDatabase: (args?: {
|
|
911
|
+
orgId?: string;
|
|
912
|
+
projectId?: string;
|
|
913
|
+
}) => Promise<JsonValue>;
|
|
914
|
+
/** `POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/resize` */
|
|
915
|
+
resizeTenantDatabase: (args: {
|
|
916
|
+
orgId?: string;
|
|
917
|
+
projectId?: string;
|
|
918
|
+
computeSize: JsonValue;
|
|
919
|
+
}) => Promise<JsonValue>;
|
|
920
|
+
/** `POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/resume` */
|
|
921
|
+
resumeTenantDatabase: (args?: {
|
|
922
|
+
orgId?: string;
|
|
923
|
+
projectId?: string;
|
|
924
|
+
}) => Promise<JsonValue>;
|
|
925
|
+
/** Reveal a database connection string (staff, with an active access grant). `POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/connection/reveal` */
|
|
926
|
+
revealTenantDatabaseConnection: (args: {
|
|
927
|
+
orgId?: string;
|
|
928
|
+
projectId?: string;
|
|
929
|
+
grantId: JsonValue;
|
|
930
|
+
}) => Promise<JsonValue>;
|
|
931
|
+
/** `POST /api/v1/governance/tenants/{org_id}/status` */
|
|
932
|
+
setTenantStatus: (args: {
|
|
933
|
+
orgId?: string;
|
|
934
|
+
status: JsonValue;
|
|
935
|
+
}) => Promise<JsonValue>;
|
|
936
|
+
/** `POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/backups` */
|
|
937
|
+
triggerTenantDatabaseBackup: (args?: {
|
|
938
|
+
orgId?: string;
|
|
939
|
+
projectId?: string;
|
|
940
|
+
}) => Promise<JsonValue>;
|
|
941
|
+
/** Read replicas of the project's dedicated database: status, connection string, lag behind the primary, plan limit. `GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/replicas` */
|
|
942
|
+
listDatabaseReplicas: (args?: {
|
|
943
|
+
orgId?: string;
|
|
944
|
+
projectId?: string;
|
|
945
|
+
}) => Promise<JsonValue>;
|
|
946
|
+
/** Start a streaming read replica (status provisioning until its base backup is done, then ready). `POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/replicas` */
|
|
947
|
+
createDatabaseReplica: (args?: {
|
|
948
|
+
orgId?: string;
|
|
949
|
+
projectId?: string;
|
|
950
|
+
}) => Promise<JsonValue>;
|
|
951
|
+
/** Remove a read replica and its copy of the data. `DELETE /api/v1/governance/tenants/{org_id}/databases/{project_id}/replicas/{replica_id}` */
|
|
952
|
+
deleteDatabaseReplica: (args: {
|
|
953
|
+
orgId?: string;
|
|
954
|
+
projectId?: string;
|
|
955
|
+
replicaId: string;
|
|
956
|
+
}) => Promise<JsonValue>;
|
|
957
|
+
/** What changed between two moments of the database — a backup id or "now" on each side: schema objects added, removed or changed (with a diff) and rows per table. `POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/compare` */
|
|
958
|
+
compareDatabaseMoments: (args: {
|
|
959
|
+
orgId?: string;
|
|
960
|
+
projectId?: string;
|
|
961
|
+
fromMoment: JsonValue;
|
|
962
|
+
toMoment?: JsonValue;
|
|
963
|
+
includePlatform?: JsonValue;
|
|
964
|
+
}) => Promise<JsonValue>;
|
|
965
|
+
/** Replace the project's database with a backup (dedicated databases): a safety backup is taken first, the backup loads beside production in one transaction and is swapped in; undo within 7 days. Org owners and admins. `POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/backups/{backup_id}/restore` */
|
|
966
|
+
restoreDatabaseBackup: (args: {
|
|
967
|
+
orgId?: string;
|
|
968
|
+
projectId?: string;
|
|
969
|
+
backupId: string;
|
|
970
|
+
confirm: JsonValue;
|
|
971
|
+
}) => Promise<JsonValue>;
|
|
972
|
+
/** Database restores of the project: status, the backup used, the safety backup and until when it can be undone. `GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/restores` */
|
|
973
|
+
listDatabaseRestores: (args?: {
|
|
974
|
+
orgId?: string;
|
|
975
|
+
projectId?: string;
|
|
976
|
+
}) => Promise<JsonValue>;
|
|
977
|
+
/** Put back the database exactly as it was right before a restore (within the undo window). `POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/restores/{restore_id}/undo` */
|
|
978
|
+
undoDatabaseRestore: (args: {
|
|
979
|
+
orgId?: string;
|
|
980
|
+
projectId?: string;
|
|
981
|
+
restoreId: string;
|
|
982
|
+
}) => Promise<JsonValue>;
|
|
983
|
+
/** Point-in-time recovery of the project's database: whether it is on, the earliest and latest moment that can be restored, base backups and archived WAL. `GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/backups/pitr` */
|
|
984
|
+
getPitrStatus: (args?: {
|
|
985
|
+
orgId?: string;
|
|
986
|
+
projectId?: string;
|
|
987
|
+
}) => Promise<JsonValue>;
|
|
988
|
+
/** Turn on point-in-time recovery (WAL archiving; Pro and higher). If the database needs one restart for it (a few seconds), it restarts only with restart=true; otherwise the answer says state=restart_required. `POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/pitr/enable` */
|
|
989
|
+
enablePitr: (args?: {
|
|
990
|
+
orgId?: string;
|
|
991
|
+
projectId?: string;
|
|
992
|
+
restart?: JsonValue;
|
|
993
|
+
}) => Promise<JsonValue>;
|
|
994
|
+
/** Stop point-in-time recovery archiving (no restart). What was archived stays restorable until it leaves the plan's window. `POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/pitr/disable` */
|
|
995
|
+
disablePitr: (args?: {
|
|
996
|
+
orgId?: string;
|
|
997
|
+
projectId?: string;
|
|
998
|
+
}) => Promise<JsonValue>;
|
|
999
|
+
/** Restore the project's database to a moment (ISO-8601 target_time). It is recovered in a new container beside production and checked; with confirm=true it is then swapped in (safety backup first, undo for 7 days). verify_only=true only checks the moment restores. Returns a job; poll get_restore_job. `POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/restore` */
|
|
1000
|
+
restoreDatabaseToTime: (args: {
|
|
1001
|
+
orgId?: string;
|
|
1002
|
+
projectId?: string;
|
|
1003
|
+
targetTime: JsonValue;
|
|
1004
|
+
confirm?: JsonValue;
|
|
1005
|
+
verifyOnly?: JsonValue;
|
|
1006
|
+
}) => Promise<JsonValue>;
|
|
1007
|
+
/** A database restore job (point-in-time or from a backup): status (running, done, verified, failed, undone), the step it is on, the moment, and until when it can be undone. `GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/backups/pitr/jobs/{job_id}` */
|
|
1008
|
+
getRestoreJob: (args: {
|
|
1009
|
+
orgId?: string;
|
|
1010
|
+
projectId?: string;
|
|
1011
|
+
jobId: string;
|
|
1012
|
+
}) => Promise<JsonValue>;
|
|
1013
|
+
/** Production plus the project's environments (staging ones and API versions): database status, what each database started with (database, copy_state) and its own API URL; limit is how many the plan allows. `GET /api/v1/governance/tenants/{org_id}/projects/{project_id}/environments` */
|
|
1014
|
+
listEnvironments: (args?: {
|
|
1015
|
+
orgId?: string;
|
|
1016
|
+
projectId?: string;
|
|
1017
|
+
}) => Promise<JsonValue>;
|
|
1018
|
+
/** Create a branch (kind=branch: a copy of the system to change, then deploy; plan env.branches) or an environment (kind=staging | version; plan env.staging_environments), each with its own database in the project's container. database: empty | schema (default: production's structure, no rows) | sample (plus up to sample_rows newest rows per table and every row they reference; plan env.branch_data, Pro and higher) | all (every row, up to env.branch_data_max_gb; Ultra and higher). Personal columns are masked unless mask=false (owners/admins, audited). Rows are copied as a job: poll get_environment_copy. protected (plan env.protection) and expires_in_days (deleted automatically) are optional. `POST /api/v1/governance/tenants/{org_id}/projects/{project_id}/environments` */
|
|
1019
|
+
createEnvironment: (args: {
|
|
1020
|
+
orgId?: string;
|
|
1021
|
+
projectId?: string;
|
|
1022
|
+
envId: JsonValue;
|
|
1023
|
+
name: JsonValue;
|
|
1024
|
+
kind?: JsonValue;
|
|
1025
|
+
label?: JsonValue;
|
|
1026
|
+
fromEnvId?: JsonValue;
|
|
1027
|
+
database?: JsonValue;
|
|
1028
|
+
sampleRows?: JsonValue;
|
|
1029
|
+
includeTables?: JsonValue;
|
|
1030
|
+
excludeTables?: JsonValue;
|
|
1031
|
+
mask?: JsonValue;
|
|
1032
|
+
maskAdd?: JsonValue;
|
|
1033
|
+
maskSkip?: JsonValue;
|
|
1034
|
+
protected?: JsonValue;
|
|
1035
|
+
expiresInDays?: JsonValue;
|
|
1036
|
+
}) => Promise<JsonValue>;
|
|
1037
|
+
/** What an environment's database started with and how its row copy is going: state copying | done | failed, tables and rows copied, masked columns, size, or why it failed. `GET /api/v1/governance/tenants/{org_id}/projects/{project_id}/environments/{env_id}/copy` */
|
|
1038
|
+
getEnvironmentCopy: (args: {
|
|
1039
|
+
orgId?: string;
|
|
1040
|
+
projectId?: string;
|
|
1041
|
+
envId: string;
|
|
1042
|
+
}) => Promise<JsonValue>;
|
|
1043
|
+
/** Delete an environment, its database (a backup is kept first), URL and Version history branch. Owners and admins; a protected environment is refused (ENVIRONMENT_PROTECTED). `DELETE /api/v1/governance/tenants/{org_id}/projects/{project_id}/environments/{env_id}` */
|
|
1044
|
+
deleteEnvironment: (args: {
|
|
1045
|
+
orgId?: string;
|
|
1046
|
+
projectId?: string;
|
|
1047
|
+
envId: string;
|
|
1048
|
+
}) => Promise<JsonValue>;
|
|
1049
|
+
/** The project's SQL statements (pg_stat_statements) by total time, average, calls, worst run or rows. `GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/query-insights` */
|
|
1050
|
+
queryInsights: (args?: {
|
|
1051
|
+
orgId?: string;
|
|
1052
|
+
projectId?: string;
|
|
1053
|
+
sort?: JsonValue;
|
|
1054
|
+
limit?: JsonValue;
|
|
1055
|
+
}) => Promise<JsonValue>;
|
|
1056
|
+
/** Clear this database's query statistics. `POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/query-insights/reset` */
|
|
1057
|
+
resetQueryInsights: (args?: {
|
|
1058
|
+
orgId?: string;
|
|
1059
|
+
projectId?: string;
|
|
1060
|
+
}) => Promise<JsonValue>;
|
|
1061
|
+
/** Indexes that would speed up the slowest statements, tested as hypothetical indexes (hypopg). `GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/index-advisor` */
|
|
1062
|
+
indexAdvisor: (args?: {
|
|
1063
|
+
orgId?: string;
|
|
1064
|
+
projectId?: string;
|
|
1065
|
+
queryid?: JsonValue;
|
|
1066
|
+
}) => Promise<JsonValue>;
|
|
1067
|
+
/** Index recommendations for one statement (only EXPLAINed, never run). `POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/index-advisor/query` */
|
|
1068
|
+
indexAdvisorForQuery: (args: {
|
|
1069
|
+
orgId?: string;
|
|
1070
|
+
projectId?: string;
|
|
1071
|
+
query: JsonValue;
|
|
1072
|
+
}) => Promise<JsonValue>;
|
|
1073
|
+
/** Build a recommended index with CREATE INDEX CONCURRENTLY (background; poll index_status). `POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/index-advisor/apply` */
|
|
1074
|
+
applyIndex: (args: {
|
|
1075
|
+
orgId?: string;
|
|
1076
|
+
projectId?: string;
|
|
1077
|
+
schema?: JsonValue;
|
|
1078
|
+
table: JsonValue;
|
|
1079
|
+
columns: JsonValue;
|
|
1080
|
+
}) => Promise<JsonValue>;
|
|
1081
|
+
/** Whether an index the advisor started is building, ready, failed or invalid. `GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/index-advisor/indexes/{index_name}` */
|
|
1082
|
+
indexStatus: (args: {
|
|
1083
|
+
orgId?: string;
|
|
1084
|
+
projectId?: string;
|
|
1085
|
+
indexName: string;
|
|
1086
|
+
}) => Promise<JsonValue>;
|
|
1087
|
+
/** Change an environment (owners and admins): kind staging | version (with label, e.g. v2), protected (plan env.protection: no delete, reset or restore until turned off), expires_in_days (deleted automatically after that many days; 0 clears it). `PATCH /api/v1/governance/tenants/{org_id}/projects/{project_id}/environments/{env_id}` */
|
|
1088
|
+
updateEnvironment: (args: {
|
|
1089
|
+
orgId?: string;
|
|
1090
|
+
projectId?: string;
|
|
1091
|
+
envId: string;
|
|
1092
|
+
kind?: JsonValue;
|
|
1093
|
+
label?: JsonValue;
|
|
1094
|
+
protected?: JsonValue;
|
|
1095
|
+
expiresInDays?: JsonValue;
|
|
1096
|
+
}) => Promise<JsonValue>;
|
|
1097
|
+
/** Make an environment's database again from the one it started from (its parent environment, else production) with the same data option; sample/all rows are copied again with the same masking. A backup is taken first; functions and policies are kept. `POST /api/v1/governance/tenants/{org_id}/projects/{project_id}/environments/{env_id}/reset` */
|
|
1098
|
+
resetEnvironment: (args: {
|
|
1099
|
+
orgId?: string;
|
|
1100
|
+
projectId?: string;
|
|
1101
|
+
envId: string;
|
|
1102
|
+
confirm: JsonValue;
|
|
1103
|
+
}) => Promise<JsonValue>;
|
|
1104
|
+
/** Put an environment's database back as it was at `at` (point-in-time, within db.pitr_retention_days; production is not touched). Runs as a job: poll get_environment_restore. `POST /api/v1/governance/tenants/{org_id}/projects/{project_id}/environments/{env_id}/restore` */
|
|
1105
|
+
restoreEnvironment: (args: {
|
|
1106
|
+
orgId?: string;
|
|
1107
|
+
projectId?: string;
|
|
1108
|
+
envId: string;
|
|
1109
|
+
at: JsonValue;
|
|
1110
|
+
confirm: JsonValue;
|
|
1111
|
+
}) => Promise<JsonValue>;
|
|
1112
|
+
/** How an environment restore is going: status running | done | failed, phase, recovered_to, error. `GET /api/v1/governance/tenants/{org_id}/projects/{project_id}/environments/{env_id}/restore/{restore_id}` */
|
|
1113
|
+
getEnvironmentRestore: (args: {
|
|
1114
|
+
orgId?: string;
|
|
1115
|
+
projectId?: string;
|
|
1116
|
+
envId: string;
|
|
1117
|
+
restoreId: string;
|
|
1118
|
+
}) => Promise<JsonValue>;
|
|
1119
|
+
/** Backup health: last good backup, failures since, recovery point (RPO) of daily backups and PITR, retention and on-demand limits with what was used. `GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/backups/health` */
|
|
1120
|
+
getBackupHealth: (args?: {
|
|
1121
|
+
orgId?: string;
|
|
1122
|
+
projectId?: string;
|
|
1123
|
+
}) => Promise<JsonValue>;
|
|
1124
|
+
/** Portable export bundles of the project (Postgres dump + migration metadata). `GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/exports` */
|
|
1125
|
+
listProjectExports: (args?: {
|
|
1126
|
+
orgId?: string;
|
|
1127
|
+
projectId?: string;
|
|
1128
|
+
limit?: JsonValue;
|
|
1129
|
+
}) => Promise<JsonValue>;
|
|
1130
|
+
/** Create a portable export bundle (download it with download_project_export). `POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/exports` */
|
|
1131
|
+
triggerProjectExport: (args?: {
|
|
1132
|
+
orgId?: string;
|
|
1133
|
+
projectId?: string;
|
|
1134
|
+
}) => Promise<JsonValue>;
|
|
1135
|
+
/** A compare job: running, failed (with error) or the full answer with status done. `GET /api/v1/governance/tenants/{org_id}/databases/{project_id}/compare/{compare_id}` */
|
|
1136
|
+
getCompare: (args: {
|
|
1137
|
+
orgId?: string;
|
|
1138
|
+
projectId?: string;
|
|
1139
|
+
compareId: string;
|
|
1140
|
+
}) => Promise<JsonValue>;
|
|
1141
|
+
/** Restore this project's backup (backup_id) or a moment (target_time) into an environment of the project (env_id) or another project (project_id) instead of replacing production. Owners/admins; confirm: true; counts as a rollback. `POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/restore-into` */
|
|
1142
|
+
restoreDatabaseInto: (args?: {
|
|
1143
|
+
orgId?: string;
|
|
1144
|
+
projectId?: string;
|
|
1145
|
+
envId?: JsonValue;
|
|
1146
|
+
targetProjectId?: JsonValue;
|
|
1147
|
+
backupId?: JsonValue;
|
|
1148
|
+
targetTime?: JsonValue;
|
|
1149
|
+
confirm?: JsonValue;
|
|
1150
|
+
reason?: JsonValue;
|
|
1151
|
+
}) => Promise<JsonValue>;
|
|
1152
|
+
/** Copy single tables from a backup or a moment into production as restored_<table>_<stamp> beside the live ones (nothing live changes). Owners/admins; counts as a rollback. `POST /api/v1/governance/tenants/{org_id}/databases/{project_id}/restore-tables` */
|
|
1153
|
+
restoreDatabaseTables: (args: {
|
|
1154
|
+
orgId?: string;
|
|
1155
|
+
projectId?: string;
|
|
1156
|
+
tables: JsonValue;
|
|
1157
|
+
backupId?: JsonValue;
|
|
1158
|
+
targetTime?: JsonValue;
|
|
1159
|
+
reason?: JsonValue;
|
|
1160
|
+
}) => Promise<JsonValue>;
|
|
1161
|
+
};
|
|
1162
|
+
history: {
|
|
1163
|
+
/** Create a Chrono commit. `POST /api/v1/chrono/commit` */
|
|
1164
|
+
commit: (args: {
|
|
1165
|
+
timeline?: JsonValue;
|
|
1166
|
+
message: JsonValue;
|
|
1167
|
+
author?: JsonValue;
|
|
1168
|
+
eventType?: JsonValue;
|
|
1169
|
+
}) => Promise<JsonValue>;
|
|
1170
|
+
/** Converge source timeline into target timeline. Branches that record an environment are refused (409 USE_DEPLOY): deploy them with promote_environment. `POST /api/v1/chrono/timelines/converge` */
|
|
1171
|
+
converge: (args: {
|
|
1172
|
+
target: JsonValue;
|
|
1173
|
+
source: JsonValue;
|
|
1174
|
+
author: JsonValue;
|
|
1175
|
+
message?: JsonValue;
|
|
1176
|
+
}) => Promise<JsonValue>;
|
|
1177
|
+
/** Name a point on a branch to go back to (timeline: main = production, or a branch's name; env_id: the environment checked out, '' = production). include_database also keeps a checkpoint of that branch's database (a backup taken now), so restoring brings the data back exactly. `POST /api/v1/chrono/snapshots/create` */
|
|
1178
|
+
createSnapshot: (args?: {
|
|
1179
|
+
message?: JsonValue;
|
|
1180
|
+
timeline?: JsonValue;
|
|
1181
|
+
envId?: JsonValue;
|
|
1182
|
+
includeDatabase?: JsonValue;
|
|
1183
|
+
}) => Promise<JsonValue>;
|
|
1184
|
+
/** Delete a timeline. `DELETE /api/v1/chrono/timelines/{name}` */
|
|
1185
|
+
deleteTimeline: (args: {
|
|
1186
|
+
name: string;
|
|
1187
|
+
}) => Promise<JsonValue>;
|
|
1188
|
+
/** Move a history-only branch to a commit. main and branches that record an environment only move forward (409 USE_RESTORE): use restore. `POST /api/v1/chrono/timelines/{name}/jump` */
|
|
1189
|
+
jumpTimeline: (args: {
|
|
1190
|
+
name: string;
|
|
1191
|
+
targetHex: JsonValue;
|
|
1192
|
+
}) => Promise<JsonValue>;
|
|
1193
|
+
/** Snapshots with their branch (timeline, env_id) and database checkpoint (database: kind, backup_id, at) when one was kept. timeline lists one branch's. `GET /api/v1/chrono/snapshots` */
|
|
1194
|
+
listSnapshots: (args?: {
|
|
1195
|
+
timeline?: JsonValue;
|
|
1196
|
+
}) => Promise<JsonValue>;
|
|
1197
|
+
/** Branches: name, head_hex, kind (production | environment | history) and env_id for an environment's branch. `GET /api/v1/chrono/timelines` */
|
|
1198
|
+
listTimelines: () => Promise<JsonValue>;
|
|
1199
|
+
/** Go back to a snapshot on its branch (confirm=true; review restore_snapshot_plan first): policies, settings, functions and buckets are put back with your own permissions; include_schema rolls back migrations since then and include_database puts the database back from the snapshot's checkpoint (or the closest backup before it). `POST /api/v1/chrono/snapshots/{snapshot_id}/restore` */
|
|
1200
|
+
restoreSnapshot: (args: {
|
|
1201
|
+
snapshotId: string;
|
|
1202
|
+
confirm?: JsonValue;
|
|
1203
|
+
includeDatabase?: JsonValue;
|
|
1204
|
+
includeSchema?: JsonValue;
|
|
1205
|
+
envId?: JsonValue;
|
|
1206
|
+
}) => Promise<JsonValue>;
|
|
1207
|
+
/** What restoring a snapshot puts back on its branch, change by change, with who would gain or lose access (writes nothing). `POST /api/v1/chrono/snapshots/{snapshot_id}/restore-plan` */
|
|
1208
|
+
restoreSnapshotPlan: (args: {
|
|
1209
|
+
snapshotId: string;
|
|
1210
|
+
envId?: JsonValue;
|
|
1211
|
+
}) => Promise<JsonValue>;
|
|
1212
|
+
/** Forget a snapshot (its commit stays in the history; its database checkpoint expires like a manual backup). `DELETE /api/v1/chrono/snapshots/{snapshot_id}` */
|
|
1213
|
+
deleteSnapshot: (args: {
|
|
1214
|
+
snapshotId: string;
|
|
1215
|
+
}) => Promise<JsonValue>;
|
|
1216
|
+
/** Spawn a new timeline from a source chronon. `POST /api/v1/chrono/timelines/spawn` */
|
|
1217
|
+
spawnTimeline: (args: {
|
|
1218
|
+
name: JsonValue;
|
|
1219
|
+
sourceHexId?: JsonValue;
|
|
1220
|
+
}) => Promise<JsonValue>;
|
|
1221
|
+
/** Fetch timeline history chronons. `GET /api/v1/chrono/timelines/{name}/history` */
|
|
1222
|
+
timelineHistory: (args: {
|
|
1223
|
+
name: string;
|
|
1224
|
+
limit?: JsonValue;
|
|
1225
|
+
offset?: JsonValue;
|
|
1226
|
+
}) => Promise<JsonValue>;
|
|
1227
|
+
/** Return timeline graph topology. `GET /api/v1/chrono/timelines/topology` */
|
|
1228
|
+
topology: (args?: {
|
|
1229
|
+
timeline?: JsonValue;
|
|
1230
|
+
limit?: JsonValue;
|
|
1231
|
+
}) => Promise<JsonValue>;
|
|
1232
|
+
/** Calculate variance between two chronons. `POST /api/v1/chrono/variance` */
|
|
1233
|
+
variance: (args: {
|
|
1234
|
+
oldChrononHex: JsonValue;
|
|
1235
|
+
newChrononHex: JsonValue;
|
|
1236
|
+
domainFilter?: JsonValue;
|
|
1237
|
+
}) => Promise<JsonValue>;
|
|
1238
|
+
/** What going back to `at` (a commit id or ISO time) on a branch means, change by change, for that branch's own environment (main = production): automated actions, manual ones, changes from other branches (left alone), the opt-in schema rollback and database restore, and the access preview. env_id is the environment you have checked out ('' = production); a mismatch is refused (ENV_MISMATCH). Writes nothing. `POST /api/v1/chrono/restore-plan` */
|
|
1239
|
+
restorePlan: (args: {
|
|
1240
|
+
at: JsonValue;
|
|
1241
|
+
timeline?: JsonValue;
|
|
1242
|
+
envId?: JsonValue;
|
|
1243
|
+
only?: JsonValue;
|
|
1244
|
+
includeDatabase?: JsonValue;
|
|
1245
|
+
includeSchema?: JsonValue;
|
|
1246
|
+
}) => Promise<JsonValue>;
|
|
1247
|
+
/** Apply the restore plan with your own permissions, in the branch's own environment: configuration first, then the schema rollback (include_schema), then the database (include_database). Waits briefly for the new commits: new_head, or recording=true while they are still arriving (poll the branch until its head moves past head_before). `POST /api/v1/chrono/restore` */
|
|
1248
|
+
restore: (args: {
|
|
1249
|
+
at: JsonValue;
|
|
1250
|
+
timeline?: JsonValue;
|
|
1251
|
+
envId?: JsonValue;
|
|
1252
|
+
only?: JsonValue;
|
|
1253
|
+
includeDatabase?: JsonValue;
|
|
1254
|
+
includeSchema?: JsonValue;
|
|
1255
|
+
confirm: JsonValue;
|
|
1256
|
+
}) => Promise<JsonValue>;
|
|
1257
|
+
/** What one commit changed (or how it differs from compare_to), item by item: policy, table, function, settings, bucket, with a summary in words and each item's previous version. `GET /api/v1/chrono/commits/{hex_id}/changes` */
|
|
1258
|
+
commitChanges: (args: {
|
|
1259
|
+
hexId: string;
|
|
1260
|
+
compareTo?: JsonValue;
|
|
1261
|
+
}) => Promise<JsonValue>;
|
|
1262
|
+
/** What undoing exactly one commit puts back on the branch's environment (writes nothing), with the schema rollback dry run when the commit applied a migration. `POST /api/v1/chrono/commits/{hex_id}/undo-plan` */
|
|
1263
|
+
undoPlan: (args: {
|
|
1264
|
+
hexId: string;
|
|
1265
|
+
timeline?: JsonValue;
|
|
1266
|
+
envId?: JsonValue;
|
|
1267
|
+
}) => Promise<JsonValue>;
|
|
1268
|
+
/** Undo one commit with your own permissions on the branch's environment; its migration's down SQL only with include_schema. `POST /api/v1/chrono/commits/{hex_id}/undo` */
|
|
1269
|
+
undo: (args: {
|
|
1270
|
+
hexId: string;
|
|
1271
|
+
confirm: JsonValue;
|
|
1272
|
+
timeline?: JsonValue;
|
|
1273
|
+
envId?: JsonValue;
|
|
1274
|
+
includeSchema?: JsonValue;
|
|
1275
|
+
}) => Promise<JsonValue>;
|
|
1276
|
+
/** Which Version history branch records which environment ({env_id, branch}). main is production's. `GET /api/v1/chrono/environments` */
|
|
1277
|
+
listEnvironmentBranches: () => Promise<JsonValue>;
|
|
1278
|
+
/** Give an environment its own Version history branch (spawned from main's head), for environments made before branches recorded them; returns the branch it has. `PUT /api/v1/chrono/environments/{env_id}` */
|
|
1279
|
+
bindEnvironment: (args: {
|
|
1280
|
+
envId: string;
|
|
1281
|
+
name: JsonValue;
|
|
1282
|
+
}) => Promise<JsonValue>;
|
|
1283
|
+
};
|
|
1284
|
+
knowledge: {
|
|
1285
|
+
/** Knowledge bases (RAG) with documents, chunks, tokens, the embedding model and estimated cost. `GET /api/v1/data/rel/vector/knowledge` */
|
|
1286
|
+
list: () => Promise<JsonValue>;
|
|
1287
|
+
/** Create a knowledge base: name, description, access (team | app_users), user_uploads, chunk_tokens. `POST /api/v1/data/rel/vector/knowledge` */
|
|
1288
|
+
create: (args: {
|
|
1289
|
+
body: JsonObject;
|
|
1290
|
+
}) => Promise<JsonValue>;
|
|
1291
|
+
/** Change a knowledge base's description, access or user_uploads. `PATCH /api/v1/data/rel/vector/knowledge/{name}` */
|
|
1292
|
+
update: (args: {
|
|
1293
|
+
name: string;
|
|
1294
|
+
body: JsonObject;
|
|
1295
|
+
}) => Promise<JsonValue>;
|
|
1296
|
+
/** Delete a knowledge base with all its documents. `DELETE /api/v1/data/rel/vector/knowledge/{name}` */
|
|
1297
|
+
delete: (args: {
|
|
1298
|
+
name: string;
|
|
1299
|
+
}) => Promise<JsonValue>;
|
|
1300
|
+
/** Documents the caller may read: title, source, chunks, tokens, status. `GET /api/v1/data/rel/vector/knowledge/{name}/documents` */
|
|
1301
|
+
listDocuments: (args: {
|
|
1302
|
+
name: string;
|
|
1303
|
+
limit?: JsonValue;
|
|
1304
|
+
offset?: JsonValue;
|
|
1305
|
+
}) => Promise<JsonValue>;
|
|
1306
|
+
/** Add or replace a document: text (+format), content_base64 + filename (PDF, DOCX, HTML, Markdown, TXT, CSV, JSON) or url; optional document_id, title, metadata. refresh_hours (url, team) fetches the page again on a schedule. `POST /api/v1/data/rel/vector/knowledge/{name}/documents` */
|
|
1307
|
+
addDocument: (args: {
|
|
1308
|
+
name: string;
|
|
1309
|
+
body: JsonObject;
|
|
1310
|
+
}) => Promise<JsonValue>;
|
|
1311
|
+
/** Remove a document (its owner or the team). `DELETE /api/v1/data/rel/vector/knowledge/{name}/documents/{document_id}` */
|
|
1312
|
+
deleteDocument: (args: {
|
|
1313
|
+
name: string;
|
|
1314
|
+
documentId: string;
|
|
1315
|
+
}) => Promise<JsonValue>;
|
|
1316
|
+
/** Passages for a question with numbered citations: query, k, mode (vector | keyword | hybrid), metadata_filter, document_ids (up to 50), rerank. Only passages the caller may read. `POST /api/v1/data/rel/vector/knowledge/{name}/search` */
|
|
1317
|
+
search: (args: {
|
|
1318
|
+
name: string;
|
|
1319
|
+
body: JsonObject;
|
|
1320
|
+
}) => Promise<JsonValue>;
|
|
1321
|
+
/** URL documents fetched again on a schedule (refresh_hours): next fetch, last error. `GET /api/v1/data/rel/vector/knowledge/{name}/sources` */
|
|
1322
|
+
listSources: (args: {
|
|
1323
|
+
name: string;
|
|
1324
|
+
}) => Promise<JsonValue>;
|
|
1325
|
+
};
|
|
1326
|
+
mcp: {
|
|
1327
|
+
/** AI assistants you connected over Sovaria's MCP server: the app, its organization and project, read-only or not, when it was connected and last used. `GET /api/v1/auth/mcp/connections` */
|
|
1328
|
+
listConnections: () => Promise<JsonValue>;
|
|
1329
|
+
/** Disconnect one of your AI assistants: its tokens stop working at once. `DELETE /api/v1/auth/mcp/connections/{grant_id}` */
|
|
1330
|
+
disconnect: (args: {
|
|
1331
|
+
grantId: string;
|
|
1332
|
+
}) => Promise<JsonValue>;
|
|
1333
|
+
/** Whether members may connect AI assistants to this organization, the MCP server URL, and (owners and admins) every member's connection. `GET /api/v1/org/{org_id}/mcp` */
|
|
1334
|
+
orgSettings: (args?: {
|
|
1335
|
+
orgId?: string;
|
|
1336
|
+
}) => Promise<JsonValue>;
|
|
1337
|
+
/** Allow or stop AI assistants for the organization (owners and admins). Turning it off ends every member's connection. `PUT /api/v1/org/{org_id}/mcp` */
|
|
1338
|
+
setOrgAllowed: (args: {
|
|
1339
|
+
orgId?: string;
|
|
1340
|
+
allowed: JsonValue;
|
|
1341
|
+
}) => Promise<JsonValue>;
|
|
1342
|
+
/** Disconnect a member's AI assistant from the organization (owners and admins). `DELETE /api/v1/org/{org_id}/mcp/connections/{grant_id}` */
|
|
1343
|
+
orgDisconnect: (args: {
|
|
1344
|
+
orgId?: string;
|
|
1345
|
+
grantId: string;
|
|
1346
|
+
}) => Promise<JsonValue>;
|
|
1347
|
+
};
|
|
1348
|
+
messaging: {
|
|
1349
|
+
/** Message templates of the project (push and/or email content with {{ variables }}). `GET /api/v1/projects/{project_id}/messaging/templates` */
|
|
1350
|
+
listTemplates: (args?: {
|
|
1351
|
+
projectId?: string;
|
|
1352
|
+
}) => Promise<JsonValue>;
|
|
1353
|
+
/** One message template. `GET /api/v1/projects/{project_id}/messaging/templates/{name}` */
|
|
1354
|
+
getTemplate: (args: {
|
|
1355
|
+
projectId?: string;
|
|
1356
|
+
name: string;
|
|
1357
|
+
}) => Promise<JsonValue>;
|
|
1358
|
+
/** Create or replace a template: push {title, body, image?, data?}, email {subject, html?, text?}; category transactional or marketing (marketing skips opted-out users and adds an unsubscribe link). `PUT /api/v1/projects/{project_id}/messaging/templates/{name}` */
|
|
1359
|
+
putTemplate: (args: {
|
|
1360
|
+
projectId?: string;
|
|
1361
|
+
name: string;
|
|
1362
|
+
description?: JsonValue;
|
|
1363
|
+
category?: JsonValue;
|
|
1364
|
+
push?: JsonValue;
|
|
1365
|
+
email?: JsonValue;
|
|
1366
|
+
}) => Promise<JsonValue>;
|
|
1367
|
+
/** Delete a message template. `DELETE /api/v1/projects/{project_id}/messaging/templates/{name}` */
|
|
1368
|
+
deleteTemplate: (args: {
|
|
1369
|
+
projectId?: string;
|
|
1370
|
+
name: string;
|
|
1371
|
+
}) => Promise<JsonValue>;
|
|
1372
|
+
/** Saved audiences: read-only SQL queries returning user_id (other columns become per-user variables). `GET /api/v1/projects/{project_id}/messaging/audiences` */
|
|
1373
|
+
listAudiences: (args?: {
|
|
1374
|
+
projectId?: string;
|
|
1375
|
+
}) => Promise<JsonValue>;
|
|
1376
|
+
/** One audience and its last count. `GET /api/v1/projects/{project_id}/messaging/audiences/{name}` */
|
|
1377
|
+
getAudience: (args: {
|
|
1378
|
+
projectId?: string;
|
|
1379
|
+
name: string;
|
|
1380
|
+
}) => Promise<JsonValue>;
|
|
1381
|
+
/** Create or replace an audience: a SELECT on the project database returning user_id (e.g. select user_id, first_name from profiles where plan = 'pro'). `PUT /api/v1/projects/{project_id}/messaging/audiences/{name}` */
|
|
1382
|
+
putAudience: (args: {
|
|
1383
|
+
projectId?: string;
|
|
1384
|
+
name: string;
|
|
1385
|
+
sql: JsonValue;
|
|
1386
|
+
description?: JsonValue;
|
|
1387
|
+
}) => Promise<JsonValue>;
|
|
1388
|
+
/** Delete an audience. `DELETE /api/v1/projects/{project_id}/messaging/audiences/{name}` */
|
|
1389
|
+
deleteAudience: (args: {
|
|
1390
|
+
projectId?: string;
|
|
1391
|
+
name: string;
|
|
1392
|
+
}) => Promise<JsonValue>;
|
|
1393
|
+
/** Run a saved audience: how many app users it reaches, columns and a sample of 10. `POST /api/v1/projects/{project_id}/messaging/audiences/{name}/preview` */
|
|
1394
|
+
previewAudience: (args: {
|
|
1395
|
+
projectId?: string;
|
|
1396
|
+
name: string;
|
|
1397
|
+
}) => Promise<JsonValue>;
|
|
1398
|
+
/** Try an audience query before saving it: app users reached, columns and a sample. `POST /api/v1/projects/{project_id}/messaging/audiences/preview` */
|
|
1399
|
+
previewSql: (args: {
|
|
1400
|
+
projectId?: string;
|
|
1401
|
+
sql: JsonValue;
|
|
1402
|
+
}) => Promise<JsonValue>;
|
|
1403
|
+
/** Send a template (or content {push, email}) to {user_ids | audience | sql | topic | all_users} on push and/or email, with variables; dry_run reports who would get it and renders a preview. send_at schedules it (timezone 'user' = that local time for each recipient). A durable job sends it; poll getSend. `POST /api/v1/projects/{project_id}/messaging/send` */
|
|
1404
|
+
send: (args: {
|
|
1405
|
+
projectId?: string;
|
|
1406
|
+
template?: JsonValue;
|
|
1407
|
+
content?: JsonValue;
|
|
1408
|
+
to: JsonValue;
|
|
1409
|
+
channels?: JsonValue;
|
|
1410
|
+
variables?: JsonValue;
|
|
1411
|
+
category?: JsonValue;
|
|
1412
|
+
dryRun?: JsonValue;
|
|
1413
|
+
sendAt?: JsonValue;
|
|
1414
|
+
timezone?: JsonValue;
|
|
1415
|
+
timezoneFallback?: JsonValue;
|
|
1416
|
+
track?: JsonValue;
|
|
1417
|
+
}) => Promise<JsonValue>;
|
|
1418
|
+
/** Recent sends with status and per-channel counts. `GET /api/v1/projects/{project_id}/messaging/sends` */
|
|
1419
|
+
listSends: (args?: {
|
|
1420
|
+
projectId?: string;
|
|
1421
|
+
limit?: JsonValue;
|
|
1422
|
+
}) => Promise<JsonValue>;
|
|
1423
|
+
/** One send: status (sending, done, failed) and counts per channel and outcome. `GET /api/v1/projects/{project_id}/messaging/sends/{send_id}` */
|
|
1424
|
+
getSend: (args: {
|
|
1425
|
+
projectId?: string;
|
|
1426
|
+
sendId: string;
|
|
1427
|
+
}) => Promise<JsonValue>;
|
|
1428
|
+
/** Delivery log: per recipient and channel, sent / failed / no_device / no_email / opted_out with an error code (never content). `GET /api/v1/projects/{project_id}/messaging/deliveries` */
|
|
1429
|
+
listDeliveries: (args?: {
|
|
1430
|
+
projectId?: string;
|
|
1431
|
+
sendId?: JsonValue;
|
|
1432
|
+
userId?: JsonValue;
|
|
1433
|
+
status?: JsonValue;
|
|
1434
|
+
limit?: JsonValue;
|
|
1435
|
+
offset?: JsonValue;
|
|
1436
|
+
}) => Promise<JsonValue>;
|
|
1437
|
+
/** Messages sent this month per channel and the plan's messaging limits. `GET /api/v1/projects/{project_id}/messaging/usage` */
|
|
1438
|
+
usage: (args?: {
|
|
1439
|
+
projectId?: string;
|
|
1440
|
+
}) => Promise<JsonValue>;
|
|
1441
|
+
/** Record an app user's marketing choice (channel push, email or all) from your own UI. `PUT /api/v1/projects/{project_id}/messaging/users/{user_id}/optouts` */
|
|
1442
|
+
setUserOptout: (args: {
|
|
1443
|
+
projectId?: string;
|
|
1444
|
+
userId: string;
|
|
1445
|
+
channel: JsonValue;
|
|
1446
|
+
optedOut: JsonValue;
|
|
1447
|
+
}) => Promise<JsonValue>;
|
|
1448
|
+
/** The signed-in app user's marketing preferences per channel. `GET /api/v1/messaging/preferences` */
|
|
1449
|
+
getPreferences: () => Promise<JsonValue>;
|
|
1450
|
+
/** The signed-in app user turns marketing push/email on or off: { marketing: { email: false } }. `PUT /api/v1/messaging/preferences` */
|
|
1451
|
+
setPreferences: (args: {
|
|
1452
|
+
marketing: JsonValue;
|
|
1453
|
+
}) => Promise<JsonValue>;
|
|
1454
|
+
/** Cancel a scheduled or running send (recipients not reached yet get nothing). `POST /api/v1/projects/{project_id}/messaging/sends/{send_id}/cancel` */
|
|
1455
|
+
cancelSend: (args: {
|
|
1456
|
+
projectId?: string;
|
|
1457
|
+
sendId: string;
|
|
1458
|
+
}) => Promise<JsonValue>;
|
|
1459
|
+
/** In-app messages of the project with impressions, clicks and dismissals. `GET /api/v1/projects/{project_id}/messaging/in-app` */
|
|
1460
|
+
listInApp: (args?: {
|
|
1461
|
+
projectId?: string;
|
|
1462
|
+
}) => Promise<JsonValue>;
|
|
1463
|
+
/** Create or replace an in-app message: content {title, body, image, layout, buttons}, trigger (app_open, screen:x, event:x), audience, window, max impressions per user. `PUT /api/v1/projects/{project_id}/messaging/in-app/{name}` */
|
|
1464
|
+
putInApp: (args: {
|
|
1465
|
+
projectId?: string;
|
|
1466
|
+
name: string;
|
|
1467
|
+
content: JsonValue;
|
|
1468
|
+
trigger?: JsonValue;
|
|
1469
|
+
audience?: JsonValue;
|
|
1470
|
+
status?: JsonValue;
|
|
1471
|
+
startsAt?: JsonValue;
|
|
1472
|
+
endsAt?: JsonValue;
|
|
1473
|
+
maxImpressions?: JsonValue;
|
|
1474
|
+
priority?: JsonValue;
|
|
1475
|
+
}) => Promise<JsonValue>;
|
|
1476
|
+
/** Delete an in-app message. `DELETE /api/v1/projects/{project_id}/messaging/in-app/{name}` */
|
|
1477
|
+
deleteInApp: (args: {
|
|
1478
|
+
projectId?: string;
|
|
1479
|
+
name: string;
|
|
1480
|
+
}) => Promise<JsonValue>;
|
|
1481
|
+
/** The signed-in app user opened (or clicked) a message they were sent (push data sov_send). `POST /api/v1/messaging/events` */
|
|
1482
|
+
trackEvent: (args: {
|
|
1483
|
+
sendId: JsonValue;
|
|
1484
|
+
channel?: JsonValue;
|
|
1485
|
+
kind?: JsonValue;
|
|
1486
|
+
}) => Promise<JsonValue>;
|
|
1487
|
+
/** In-app messages the signed-in app user should see now for a trigger. `GET /api/v1/messaging/in-app` */
|
|
1488
|
+
myInApp: (args?: {
|
|
1489
|
+
trigger?: JsonValue;
|
|
1490
|
+
limit?: JsonValue;
|
|
1491
|
+
}) => Promise<JsonValue>;
|
|
1492
|
+
/** Report an in-app message impression, click or dismissal. `POST /api/v1/messaging/in-app/{message_id}/events` */
|
|
1493
|
+
inAppEvent: (args: {
|
|
1494
|
+
messageId: string;
|
|
1495
|
+
kind: JsonValue;
|
|
1496
|
+
}) => Promise<JsonValue>;
|
|
1497
|
+
};
|
|
1498
|
+
mobile: {
|
|
1499
|
+
/** Registered iOS/Android apps (bundle/package ids, redirect URIs). `GET /api/v1/projects/{project_id}/mobile/apps` */
|
|
1500
|
+
listApps: (args?: {
|
|
1501
|
+
projectId?: string;
|
|
1502
|
+
}) => Promise<JsonValue>;
|
|
1503
|
+
/** Register an app: platform, bundle_id+team_id (iOS) or package_name+sha256_cert_fingerprints (Android), redirect_uris. `POST /api/v1/projects/{project_id}/mobile/apps` */
|
|
1504
|
+
createApp: (args: {
|
|
1505
|
+
projectId?: string;
|
|
1506
|
+
body: JsonObject;
|
|
1507
|
+
}) => Promise<JsonValue>;
|
|
1508
|
+
/** Change a registered app (name, ids, fingerprints, redirect URIs). `PATCH /api/v1/projects/{project_id}/mobile/apps/{app_id}` */
|
|
1509
|
+
updateApp: (args: {
|
|
1510
|
+
projectId?: string;
|
|
1511
|
+
appId: string;
|
|
1512
|
+
body: JsonObject;
|
|
1513
|
+
}) => Promise<JsonValue>;
|
|
1514
|
+
/** Remove a registered app. `DELETE /api/v1/projects/{project_id}/mobile/apps/{app_id}` */
|
|
1515
|
+
deleteApp: (args: {
|
|
1516
|
+
projectId?: string;
|
|
1517
|
+
appId: string;
|
|
1518
|
+
}) => Promise<JsonValue>;
|
|
1519
|
+
/** An app user's signed-in devices and push tokens. `GET /api/v1/projects/{project_id}/users/{user_id}/devices` */
|
|
1520
|
+
listUserDevices: (args: {
|
|
1521
|
+
projectId?: string;
|
|
1522
|
+
userId: string;
|
|
1523
|
+
}) => Promise<JsonValue>;
|
|
1524
|
+
/** Sign one of an app user's devices out (sessions and push tokens). `DELETE /api/v1/projects/{project_id}/users/{user_id}/devices/{device_id}` */
|
|
1525
|
+
revokeUserDevice: (args: {
|
|
1526
|
+
projectId?: string;
|
|
1527
|
+
userId: string;
|
|
1528
|
+
deviceId: string;
|
|
1529
|
+
}) => Promise<JsonValue>;
|
|
1530
|
+
};
|
|
1531
|
+
observability: {
|
|
1532
|
+
/** Requests, 4xx/5xx errors, latency (avg, p50, p95, p99) and bytes over time for the project, per gateway service. History by plan (obs.retention_days). `GET /api/v1/observability/metrics` */
|
|
1533
|
+
metrics: (args?: {
|
|
1534
|
+
hours?: JsonValue;
|
|
1535
|
+
service?: JsonValue;
|
|
1536
|
+
points?: JsonValue;
|
|
1537
|
+
byService?: JsonValue;
|
|
1538
|
+
}) => Promise<JsonValue>;
|
|
1539
|
+
/** Recent requests, newest first (method, path, status, duration, service, trace_id, env_id). after = live tail, before = older page. `GET /api/v1/observability/logs` */
|
|
1540
|
+
logs: (args?: {
|
|
1541
|
+
limit?: JsonValue;
|
|
1542
|
+
service?: JsonValue;
|
|
1543
|
+
status?: JsonValue;
|
|
1544
|
+
q?: JsonValue;
|
|
1545
|
+
after?: JsonValue;
|
|
1546
|
+
before?: JsonValue;
|
|
1547
|
+
source?: JsonValue;
|
|
1548
|
+
env?: JsonValue;
|
|
1549
|
+
}) => Promise<JsonValue>;
|
|
1550
|
+
/** Latency (p50, p95, p99) and 4xx/5xx per route (method + path with ids collapsed), busiest first; env = comma-separated environment ids (main = none named), default all; route adds that route's series. `GET /api/v1/observability/routes` */
|
|
1551
|
+
routes: (args?: {
|
|
1552
|
+
hours?: JsonValue;
|
|
1553
|
+
env?: JsonValue;
|
|
1554
|
+
route?: JsonValue;
|
|
1555
|
+
limit?: JsonValue;
|
|
1556
|
+
}) => Promise<JsonValue>;
|
|
1557
|
+
/** SLO alert rules with their state (ok, firing, no_data, paused), the plan limit (obs.alert_rules), the metric catalog and recent events. `GET /api/v1/observability/alerts` */
|
|
1558
|
+
alertsList: () => Promise<JsonValue>;
|
|
1559
|
+
/** Create an alert rule: metric latency_p95_ms, latency_p99_ms, error_rate (5xx %), function_failures or db_connections; threshold; window 5-60 min; optional route/function target; team email and/or a signed HTTPS webhook (signing_secret returned once). Owners and admins. `POST /api/v1/observability/alerts` */
|
|
1560
|
+
alertsCreate: (args: {
|
|
1561
|
+
metric: JsonValue;
|
|
1562
|
+
threshold: JsonValue;
|
|
1563
|
+
windowMinutes?: JsonValue;
|
|
1564
|
+
name?: JsonValue;
|
|
1565
|
+
target?: JsonValue;
|
|
1566
|
+
env?: JsonValue;
|
|
1567
|
+
minRequests?: JsonValue;
|
|
1568
|
+
email?: JsonValue;
|
|
1569
|
+
webhookUrl?: JsonValue;
|
|
1570
|
+
}) => Promise<JsonValue>;
|
|
1571
|
+
/** Change an alert rule (any create field) or pause/resume it ({enabled: false}). `PATCH /api/v1/observability/alerts/{rule_id}` */
|
|
1572
|
+
alertsUpdate: (args: {
|
|
1573
|
+
ruleId: string;
|
|
1574
|
+
body: JsonObject;
|
|
1575
|
+
}) => Promise<JsonValue>;
|
|
1576
|
+
/** Delete an alert rule. `DELETE /api/v1/observability/alerts/{rule_id}` */
|
|
1577
|
+
alertsDelete: (args: {
|
|
1578
|
+
ruleId: string;
|
|
1579
|
+
}) => Promise<JsonValue>;
|
|
1580
|
+
/** Measure the rule now (value, would_fire) and send an alert.test to its webhook. `POST /api/v1/observability/alerts/{rule_id}/test` */
|
|
1581
|
+
alertsTest: (args: {
|
|
1582
|
+
ruleId: string;
|
|
1583
|
+
}) => Promise<JsonValue>;
|
|
1584
|
+
/** Fired and resolved alerts, newest first. `GET /api/v1/observability/alerts/events` */
|
|
1585
|
+
alertsEvents: (args?: {
|
|
1586
|
+
limit?: JsonValue;
|
|
1587
|
+
}) => Promise<JsonValue>;
|
|
1588
|
+
};
|
|
1589
|
+
org: {
|
|
1590
|
+
/** `POST /api/v1/org/invites/accept` */
|
|
1591
|
+
acceptOrgInvite: (args: {
|
|
1592
|
+
token: JsonValue;
|
|
1593
|
+
}) => Promise<JsonValue>;
|
|
1594
|
+
/** Add a user as a member of an org/project node. `POST /api/v1/org/{org_id}/member` */
|
|
1595
|
+
addMember: (args: {
|
|
1596
|
+
orgId?: string;
|
|
1597
|
+
userId: JsonValue;
|
|
1598
|
+
role: JsonValue;
|
|
1599
|
+
}) => Promise<JsonValue>;
|
|
1600
|
+
/** Connect two DAPG nodes with a typed relationship. `POST /api/v1/edge` */
|
|
1601
|
+
createEdge: (args: {
|
|
1602
|
+
sourceNodeId: JsonValue;
|
|
1603
|
+
targetNodeId: JsonValue;
|
|
1604
|
+
relationType: JsonValue;
|
|
1605
|
+
role?: JsonValue;
|
|
1606
|
+
}) => Promise<JsonValue>;
|
|
1607
|
+
/** `POST /api/v1/org/{org_id}/invites` */
|
|
1608
|
+
createOrgInvite: (args: {
|
|
1609
|
+
orgId?: string;
|
|
1610
|
+
email: JsonValue;
|
|
1611
|
+
role: JsonValue;
|
|
1612
|
+
}) => Promise<JsonValue>;
|
|
1613
|
+
/** `DELETE /api/v1/org/{org_id}` */
|
|
1614
|
+
deleteOrg: (args?: {
|
|
1615
|
+
orgId?: string;
|
|
1616
|
+
}) => Promise<JsonValue>;
|
|
1617
|
+
/** `POST /api/v1/apikeys/ensure-defaults` */
|
|
1618
|
+
ensureDefaultApiKeys: () => Promise<JsonValue>;
|
|
1619
|
+
/** List child nodes attached by a relation (e.g. OWNS, HAS_ENV). `GET /api/v1/org/{parent_id}/children` */
|
|
1620
|
+
getChildren: (args: {
|
|
1621
|
+
parentId: string;
|
|
1622
|
+
relation?: JsonValue;
|
|
1623
|
+
}) => Promise<JsonValue>;
|
|
1624
|
+
/** Resolve a user's roles on a resource by walking the DAPG. `GET /api/v1/context/{user_id}/{resource_id}` */
|
|
1625
|
+
getContext: (args: {
|
|
1626
|
+
userId: string;
|
|
1627
|
+
resourceId: string;
|
|
1628
|
+
}) => Promise<JsonValue>;
|
|
1629
|
+
/** Fetch a single graph node by ID. `GET /api/v1/org/{node_id}` */
|
|
1630
|
+
getNode: (args: {
|
|
1631
|
+
nodeId: string;
|
|
1632
|
+
}) => Promise<JsonValue>;
|
|
1633
|
+
/** `GET /api/v1/org/{project_id}/ref` */
|
|
1634
|
+
getProjectRef: (args?: {
|
|
1635
|
+
projectId?: string;
|
|
1636
|
+
}) => Promise<JsonValue>;
|
|
1637
|
+
/** `GET /api/v1/project-settings` */
|
|
1638
|
+
getProjectSettings: () => Promise<JsonValue>;
|
|
1639
|
+
/** `GET /api/v1/roles/catalog` */
|
|
1640
|
+
getRoleCatalog: () => Promise<JsonValue>;
|
|
1641
|
+
/** `GET /api/v1/roles/matrix` */
|
|
1642
|
+
getRoleMatrix: () => Promise<JsonValue>;
|
|
1643
|
+
/** Whether the saved role matrix is enforced, and the plan's role allowance `GET /api/v1/roles/matrix/status` */
|
|
1644
|
+
getRoleMatrixStatus: () => Promise<JsonValue>;
|
|
1645
|
+
/** `GET /api/v1/apikeys` */
|
|
1646
|
+
listApiKeys: () => Promise<JsonValue>;
|
|
1647
|
+
/** List graph nodes; when provided, ``node_type`` filters by type. `GET /api/v1/org` */
|
|
1648
|
+
listNodes: (args?: {
|
|
1649
|
+
nodeType?: JsonValue;
|
|
1650
|
+
}) => Promise<JsonValue>;
|
|
1651
|
+
/** `GET /api/v1/org/{org_id}/members` */
|
|
1652
|
+
listOrgMembers: (args?: {
|
|
1653
|
+
orgId?: string;
|
|
1654
|
+
}) => Promise<JsonValue>;
|
|
1655
|
+
/** `DELETE /api/v1/org/{org_id}/member/{user_id}` */
|
|
1656
|
+
removeOrgMember: (args: {
|
|
1657
|
+
orgId?: string;
|
|
1658
|
+
userId: string;
|
|
1659
|
+
}) => Promise<JsonValue>;
|
|
1660
|
+
/** `DELETE /api/v1/apikeys/{key_id}` */
|
|
1661
|
+
revokeApiKey: (args: {
|
|
1662
|
+
keyId: string;
|
|
1663
|
+
}) => Promise<JsonValue>;
|
|
1664
|
+
/** `PUT /api/v1/org/{org_id}/plan` */
|
|
1665
|
+
setOrgPlan: (args: {
|
|
1666
|
+
orgId?: string;
|
|
1667
|
+
plan: JsonValue;
|
|
1668
|
+
}) => Promise<JsonValue>;
|
|
1669
|
+
/** `PUT /api/v1/org/{org_id}/member/{user_id}` */
|
|
1670
|
+
updateMemberRole: (args: {
|
|
1671
|
+
orgId?: string;
|
|
1672
|
+
userId: string;
|
|
1673
|
+
role: JsonValue;
|
|
1674
|
+
}) => Promise<JsonValue>;
|
|
1675
|
+
/** `PUT /api/v1/org/{org_id}` */
|
|
1676
|
+
updateOrg: (args: {
|
|
1677
|
+
orgId?: string;
|
|
1678
|
+
body: JsonObject;
|
|
1679
|
+
}) => Promise<JsonValue>;
|
|
1680
|
+
/** `PUT /api/v1/project-settings` */
|
|
1681
|
+
updateProjectSettings: (args: {
|
|
1682
|
+
settings: JsonValue;
|
|
1683
|
+
}) => Promise<JsonValue>;
|
|
1684
|
+
/** `PUT /api/v1/roles/matrix` */
|
|
1685
|
+
updateRoleMatrix: (args: {
|
|
1686
|
+
matrix: JsonValue;
|
|
1687
|
+
}) => Promise<JsonValue>;
|
|
1688
|
+
/** Hand the organization and its billing to another admin (owner only). 409 ONE_OWNED_ORG when they already own one. `POST /api/v1/org/{org_id}/transfer-ownership` */
|
|
1689
|
+
transferOrgOwnership: (args: {
|
|
1690
|
+
orgId?: string;
|
|
1691
|
+
newOwnerId: JsonValue;
|
|
1692
|
+
reason?: JsonValue;
|
|
1693
|
+
}) => Promise<JsonValue>;
|
|
1694
|
+
};
|
|
1695
|
+
perf: {
|
|
1696
|
+
/** Client performance: p50/p75/p95, count and web-vitals ratings per metric (or per page/screen with by=route). `GET /api/v1/perf/summary` */
|
|
1697
|
+
summary: (args?: {
|
|
1698
|
+
days?: JsonValue;
|
|
1699
|
+
kind?: JsonValue;
|
|
1700
|
+
release?: JsonValue;
|
|
1701
|
+
platform?: JsonValue;
|
|
1702
|
+
by?: JsonValue;
|
|
1703
|
+
limit?: JsonValue;
|
|
1704
|
+
}) => Promise<JsonValue>;
|
|
1705
|
+
/** One client metric's percentile over time. `GET /api/v1/perf/series` */
|
|
1706
|
+
series: (args: {
|
|
1707
|
+
kind: JsonValue;
|
|
1708
|
+
name: JsonValue;
|
|
1709
|
+
days?: JsonValue;
|
|
1710
|
+
route?: JsonValue;
|
|
1711
|
+
release?: JsonValue;
|
|
1712
|
+
platform?: JsonValue;
|
|
1713
|
+
q?: JsonValue;
|
|
1714
|
+
}) => Promise<JsonValue>;
|
|
1715
|
+
/** Raw client measurements (newest or slowest first), each with its trace id. `GET /api/v1/perf/samples` */
|
|
1716
|
+
samples: (args?: {
|
|
1717
|
+
kind?: JsonValue;
|
|
1718
|
+
name?: JsonValue;
|
|
1719
|
+
route?: JsonValue;
|
|
1720
|
+
traceId?: JsonValue;
|
|
1721
|
+
slowest?: JsonValue;
|
|
1722
|
+
days?: JsonValue;
|
|
1723
|
+
limit?: JsonValue;
|
|
1724
|
+
}) => Promise<JsonValue>;
|
|
1725
|
+
/** Client network time per route next to the gateway's server time for the same route. `GET /api/v1/perf/network` */
|
|
1726
|
+
network: (args?: {
|
|
1727
|
+
days?: JsonValue;
|
|
1728
|
+
env?: JsonValue;
|
|
1729
|
+
limit?: JsonValue;
|
|
1730
|
+
}) => Promise<JsonValue>;
|
|
1731
|
+
/** Client spans and the server trace for one trace id. `GET /api/v1/perf/traces/{trace_id}` */
|
|
1732
|
+
trace: (args: {
|
|
1733
|
+
traceId: string;
|
|
1734
|
+
}) => Promise<JsonValue>;
|
|
1735
|
+
/** Performance measurements accepted and dropped this month, and the plan's limits. `GET /api/v1/perf/usage` */
|
|
1736
|
+
usage: () => Promise<JsonValue>;
|
|
1737
|
+
};
|
|
1738
|
+
platform: {
|
|
1739
|
+
/** `POST /api/v1/auth/event-hooks` */
|
|
1740
|
+
createEventHook: (args: {
|
|
1741
|
+
body: JsonObject;
|
|
1742
|
+
}) => Promise<JsonValue>;
|
|
1743
|
+
/** `DELETE /api/v1/auth/event-hooks/{hook_id}` */
|
|
1744
|
+
deleteEventHook: (args: {
|
|
1745
|
+
hookId: string;
|
|
1746
|
+
}) => Promise<JsonValue>;
|
|
1747
|
+
/** `DELETE /api/v1/auth/github/connection-state` */
|
|
1748
|
+
disconnectGithub: (args?: {
|
|
1749
|
+
projectId?: JsonValue;
|
|
1750
|
+
}) => Promise<JsonValue>;
|
|
1751
|
+
/** `GET /healthz` */
|
|
1752
|
+
gatewayHealth: () => Promise<JsonValue>;
|
|
1753
|
+
/** Return aggregate gateway health for downstream engines. `GET /api/v1/system/engines/health` */
|
|
1754
|
+
getEnginesHealth: () => Promise<JsonValue>;
|
|
1755
|
+
/** `GET /api/v1/error-traces/{trace_id}` */
|
|
1756
|
+
getErrorTrace: (args: {
|
|
1757
|
+
traceId: string;
|
|
1758
|
+
}) => Promise<JsonValue>;
|
|
1759
|
+
/** `GET /api/v1/auth/github/connection-state` */
|
|
1760
|
+
getGithubConnectionState: (args?: {
|
|
1761
|
+
projectId?: JsonValue;
|
|
1762
|
+
}) => Promise<JsonValue>;
|
|
1763
|
+
/** `GET /api/v1/auth/event-hooks` */
|
|
1764
|
+
listEventHooks: () => Promise<JsonValue>;
|
|
1765
|
+
/** `PATCH /api/v1/error-traces/{trace_id}/resolved` */
|
|
1766
|
+
resolveErrorTrace: (args: {
|
|
1767
|
+
traceId: string;
|
|
1768
|
+
resolved: JsonValue;
|
|
1769
|
+
}) => Promise<JsonValue>;
|
|
1770
|
+
};
|
|
1771
|
+
policy: {
|
|
1772
|
+
/** Return current audit-entry count. `GET /api/v1/audit/count` */
|
|
1773
|
+
auditCount: () => Promise<JsonValue>;
|
|
1774
|
+
/** Verify audit hash-chain integrity. `GET /api/v1/audit/verify` */
|
|
1775
|
+
auditVerify: () => Promise<JsonValue>;
|
|
1776
|
+
/** Create and compile a policy. `POST /api/v1/policies/` */
|
|
1777
|
+
policyCreate: (args: {
|
|
1778
|
+
policyId: JsonValue;
|
|
1779
|
+
name: JsonValue;
|
|
1780
|
+
splSource: JsonValue;
|
|
1781
|
+
orgId: JsonValue;
|
|
1782
|
+
}) => Promise<JsonValue>;
|
|
1783
|
+
/** Delete (deactivate) a policy. `DELETE /api/v1/policies/{policy_id}` */
|
|
1784
|
+
policyDelete: (args: {
|
|
1785
|
+
policyId: string;
|
|
1786
|
+
}) => Promise<JsonValue>;
|
|
1787
|
+
/** Evaluate a policy against an explicit debug context. `POST /api/v1/policies/{policy_id}/evaluate` */
|
|
1788
|
+
policyEvaluate: (args: {
|
|
1789
|
+
policyId: string;
|
|
1790
|
+
context: JsonValue;
|
|
1791
|
+
}) => Promise<JsonValue>;
|
|
1792
|
+
/** Get a single policy by ID. `GET /api/v1/policies/{policy_id}` */
|
|
1793
|
+
policyGet: (args: {
|
|
1794
|
+
policyId: string;
|
|
1795
|
+
}) => Promise<JsonValue>;
|
|
1796
|
+
/** Return version history for a policy. `GET /api/v1/policies/{policy_id}/history` */
|
|
1797
|
+
policyHistory: (args: {
|
|
1798
|
+
policyId: string;
|
|
1799
|
+
}) => Promise<JsonValue>;
|
|
1800
|
+
/** List active policies visible in current tenant scope. `GET /api/v1/policies/` */
|
|
1801
|
+
policyList: () => Promise<JsonValue>;
|
|
1802
|
+
/** Rollback a policy to a historical version. `POST /api/v1/policies/{policy_id}/rollback` */
|
|
1803
|
+
policyRollback: (args: {
|
|
1804
|
+
policyId: string;
|
|
1805
|
+
version: JsonValue;
|
|
1806
|
+
}) => Promise<JsonValue>;
|
|
1807
|
+
/** List server-authoritative SPL templates. `GET /api/v1/policies/templates` */
|
|
1808
|
+
policyTemplates: () => Promise<JsonValue>;
|
|
1809
|
+
};
|
|
1810
|
+
push: {
|
|
1811
|
+
/** Which push providers are set up (never the keys). `GET /api/v1/projects/{project_id}/push/credentials` */
|
|
1812
|
+
getCredentials: (args?: {
|
|
1813
|
+
projectId?: string;
|
|
1814
|
+
}) => Promise<JsonValue>;
|
|
1815
|
+
/** Upload the Firebase service account JSON (encrypted, write-only). `PUT /api/v1/projects/{project_id}/push/credentials/fcm` */
|
|
1816
|
+
setFcmCredentials: (args: {
|
|
1817
|
+
projectId?: string;
|
|
1818
|
+
serviceAccount: JsonValue;
|
|
1819
|
+
}) => Promise<JsonValue>;
|
|
1820
|
+
/** Upload the APNs .p8 key (encrypted, write-only). `PUT /api/v1/projects/{project_id}/push/credentials/apns` */
|
|
1821
|
+
setApnsCredentials: (args: {
|
|
1822
|
+
projectId?: string;
|
|
1823
|
+
p8: JsonValue;
|
|
1824
|
+
keyId: JsonValue;
|
|
1825
|
+
teamId: JsonValue;
|
|
1826
|
+
bundleId: JsonValue;
|
|
1827
|
+
environment?: JsonValue;
|
|
1828
|
+
}) => Promise<JsonValue>;
|
|
1829
|
+
/** Remove FCM or APNs credentials. `DELETE /api/v1/projects/{project_id}/push/credentials/{provider}` */
|
|
1830
|
+
deleteCredentials: (args: {
|
|
1831
|
+
projectId?: string;
|
|
1832
|
+
provider: string;
|
|
1833
|
+
}) => Promise<JsonValue>;
|
|
1834
|
+
/** Push devices registered in the project (tokens are never returned). `GET /api/v1/projects/{project_id}/push/devices` */
|
|
1835
|
+
listDevices: (args?: {
|
|
1836
|
+
projectId?: string;
|
|
1837
|
+
userId?: JsonValue;
|
|
1838
|
+
limit?: JsonValue;
|
|
1839
|
+
before?: JsonValue;
|
|
1840
|
+
}) => Promise<JsonValue>;
|
|
1841
|
+
/** Send a push: to {user_ids|device_ids|topic}, notification {title, body, image}, data, badge, priority, ttl_seconds, dry_run. `POST /api/v1/projects/{project_id}/push/send` */
|
|
1842
|
+
send: (args: {
|
|
1843
|
+
projectId?: string;
|
|
1844
|
+
message: JsonObject;
|
|
1845
|
+
}) => Promise<JsonValue>;
|
|
1846
|
+
/** Recent sends (counts and error codes) and this month's total. `GET /api/v1/projects/{project_id}/push/sends` */
|
|
1847
|
+
listSends: (args?: {
|
|
1848
|
+
projectId?: string;
|
|
1849
|
+
limit?: JsonValue;
|
|
1850
|
+
}) => Promise<JsonValue>;
|
|
1851
|
+
/** Register the signed-in app user's push token (FCM or APNs). `POST /api/v1/push/devices` */
|
|
1852
|
+
registerDevice: (args: {
|
|
1853
|
+
token: JsonValue;
|
|
1854
|
+
platform: JsonValue;
|
|
1855
|
+
provider?: JsonValue;
|
|
1856
|
+
deviceId?: JsonValue;
|
|
1857
|
+
appId?: JsonValue;
|
|
1858
|
+
topics?: JsonValue;
|
|
1859
|
+
locale?: JsonValue;
|
|
1860
|
+
}) => Promise<JsonValue>;
|
|
1861
|
+
/** The signed-in app user's push tokens. `GET /api/v1/push/devices` */
|
|
1862
|
+
myDevices: () => Promise<JsonValue>;
|
|
1863
|
+
/** Subscribe a device to topics or unsubscribe it. `PATCH /api/v1/push/devices/{device_row_id}/topics` */
|
|
1864
|
+
updateTopics: (args: {
|
|
1865
|
+
deviceRowId: string;
|
|
1866
|
+
subscribe?: JsonValue;
|
|
1867
|
+
unsubscribe?: JsonValue;
|
|
1868
|
+
replace?: JsonValue;
|
|
1869
|
+
}) => Promise<JsonValue>;
|
|
1870
|
+
/** Remove one of the signed-in user's push devices. `DELETE /api/v1/push/devices/{device_row_id}` */
|
|
1871
|
+
deleteDevice: (args: {
|
|
1872
|
+
deviceRowId: string;
|
|
1873
|
+
}) => Promise<JsonValue>;
|
|
1874
|
+
/** Drop a push token (sign-out, notifications turned off). `POST /api/v1/push/devices/unregister` */
|
|
1875
|
+
unregisterToken: (args: {
|
|
1876
|
+
token: JsonValue;
|
|
1877
|
+
}) => Promise<JsonValue>;
|
|
1878
|
+
/** Create (or rotate) the project's web push VAPID keys; returns the public key. `POST /api/v1/projects/{project_id}/push/credentials/webpush` */
|
|
1879
|
+
setWebpushCredentials: (args?: {
|
|
1880
|
+
projectId?: string;
|
|
1881
|
+
subject?: JsonValue;
|
|
1882
|
+
rotate?: JsonValue;
|
|
1883
|
+
}) => Promise<JsonValue>;
|
|
1884
|
+
/** The project's VAPID public key for browsers (pushManager.subscribe applicationServerKey). `GET /api/v1/push/webpush-key` */
|
|
1885
|
+
webpushKey: () => Promise<JsonValue>;
|
|
1886
|
+
/** Cancel a queued or running large push send. `POST /api/v1/projects/{project_id}/push/sends/{send_id}/cancel` */
|
|
1887
|
+
cancelSend: (args: {
|
|
1888
|
+
projectId?: string;
|
|
1889
|
+
sendId: string;
|
|
1890
|
+
}) => Promise<JsonValue>;
|
|
1891
|
+
};
|
|
1892
|
+
queues: {
|
|
1893
|
+
/** Message queues of the project's environment with length and oldest message age, plus the plan's queue limits and usage. `GET /api/v1/queues` */
|
|
1894
|
+
list: () => Promise<JsonValue>;
|
|
1895
|
+
/** Create a queue: visibility_timeout_sec, max_reads + dead_letter_queue, retention_days, app_send (app users may send) and an optional consumer {function_name, enabled, batch_size, concurrency, visibility_timeout_sec, ack}. `POST /api/v1/queues` */
|
|
1896
|
+
create: (args: {
|
|
1897
|
+
name: JsonValue;
|
|
1898
|
+
description?: JsonValue;
|
|
1899
|
+
visibilityTimeoutSec?: JsonValue;
|
|
1900
|
+
maxReads?: JsonValue;
|
|
1901
|
+
deadLetterQueue?: JsonValue;
|
|
1902
|
+
retentionDays?: JsonValue;
|
|
1903
|
+
appSend?: JsonValue;
|
|
1904
|
+
consumer?: JsonValue;
|
|
1905
|
+
}) => Promise<JsonValue>;
|
|
1906
|
+
/** One queue with its settings, consumer binding and metrics. `GET /api/v1/queues/{queue_name}` */
|
|
1907
|
+
get: (args: {
|
|
1908
|
+
queueName: string;
|
|
1909
|
+
}) => Promise<JsonValue>;
|
|
1910
|
+
/** Change a queue's settings or consumer binding (only the fields sent change). `PATCH /api/v1/queues/{queue_name}` */
|
|
1911
|
+
update: (args: {
|
|
1912
|
+
queueName: string;
|
|
1913
|
+
settings: JsonObject;
|
|
1914
|
+
}) => Promise<JsonValue>;
|
|
1915
|
+
/** Delete a queue and all its messages. `DELETE /api/v1/queues/{queue_name}` */
|
|
1916
|
+
delete: (args: {
|
|
1917
|
+
queueName: string;
|
|
1918
|
+
}) => Promise<JsonValue>;
|
|
1919
|
+
/** Send one JSON message (delay: seconds before it can be read); returns msg_id. `POST /api/v1/queues/{queue_name}/send` */
|
|
1920
|
+
send: (args: {
|
|
1921
|
+
queueName: string;
|
|
1922
|
+
message: JsonValue;
|
|
1923
|
+
delay?: JsonValue;
|
|
1924
|
+
headers?: JsonValue;
|
|
1925
|
+
}) => Promise<JsonValue>;
|
|
1926
|
+
/** Send up to 100 messages at once; returns msg_ids in order. `POST /api/v1/queues/{queue_name}/send_batch` */
|
|
1927
|
+
sendBatch: (args: {
|
|
1928
|
+
queueName: string;
|
|
1929
|
+
messages: JsonValue;
|
|
1930
|
+
delay?: JsonValue;
|
|
1931
|
+
headers?: JsonValue;
|
|
1932
|
+
}) => Promise<JsonValue>;
|
|
1933
|
+
/** Read up to qty visible messages and hide them for vt seconds (default: the queue's); archive or delete each when done, or it reappears. `POST /api/v1/queues/{queue_name}/read` */
|
|
1934
|
+
read: (args: {
|
|
1935
|
+
queueName: string;
|
|
1936
|
+
qty?: JsonValue;
|
|
1937
|
+
vt?: JsonValue;
|
|
1938
|
+
}) => Promise<JsonValue>;
|
|
1939
|
+
/** Read and delete up to qty messages at once (at-most-once). `POST /api/v1/queues/{queue_name}/pop` */
|
|
1940
|
+
pop: (args: {
|
|
1941
|
+
queueName: string;
|
|
1942
|
+
qty?: JsonValue;
|
|
1943
|
+
}) => Promise<JsonValue>;
|
|
1944
|
+
/** Archive messages (kept for the retention period); returns the ids archived. `POST /api/v1/queues/{queue_name}/archive` */
|
|
1945
|
+
archive: (args: {
|
|
1946
|
+
queueName: string;
|
|
1947
|
+
msgIds: JsonValue;
|
|
1948
|
+
}) => Promise<JsonValue>;
|
|
1949
|
+
/** Delete messages; returns the ids deleted. `POST /api/v1/queues/{queue_name}/delete` */
|
|
1950
|
+
deleteMessages: (args: {
|
|
1951
|
+
queueName: string;
|
|
1952
|
+
msgIds: JsonValue;
|
|
1953
|
+
}) => Promise<JsonValue>;
|
|
1954
|
+
/** Hide a message for vt more seconds from now (0 = visible now). `POST /api/v1/queues/{queue_name}/set_vt` */
|
|
1955
|
+
setVt: (args: {
|
|
1956
|
+
queueName: string;
|
|
1957
|
+
msgId: JsonValue;
|
|
1958
|
+
vt: JsonValue;
|
|
1959
|
+
}) => Promise<JsonValue>;
|
|
1960
|
+
/** Delete every waiting message (and the archive with include_archived); returns how many. `POST /api/v1/queues/{queue_name}/purge` */
|
|
1961
|
+
purge: (args: {
|
|
1962
|
+
queueName: string;
|
|
1963
|
+
includeArchived?: JsonValue;
|
|
1964
|
+
}) => Promise<JsonValue>;
|
|
1965
|
+
/** Queue length, visible / in flight / delayed, oldest and newest message age, totals, archived and dead-lettered. `GET /api/v1/queues/{queue_name}/metrics` */
|
|
1966
|
+
metrics: (args: {
|
|
1967
|
+
queueName: string;
|
|
1968
|
+
}) => Promise<JsonValue>;
|
|
1969
|
+
/** Look at messages without reading them: state waiting, archived or dead. `GET /api/v1/queues/{queue_name}/messages` */
|
|
1970
|
+
messages: (args: {
|
|
1971
|
+
queueName: string;
|
|
1972
|
+
state?: JsonValue;
|
|
1973
|
+
limit?: JsonValue;
|
|
1974
|
+
before?: JsonValue;
|
|
1975
|
+
}) => Promise<JsonValue>;
|
|
1976
|
+
};
|
|
1977
|
+
realtime: {
|
|
1978
|
+
/** List active realtime channels. `GET /api/v1/rt/stream/channels` */
|
|
1979
|
+
channels: () => Promise<JsonValue>;
|
|
1980
|
+
/** Fetch presence for a realtime channel. `GET /api/v1/rt/stream/presence/{channel}` */
|
|
1981
|
+
presence: (args: {
|
|
1982
|
+
channel: string;
|
|
1983
|
+
}) => Promise<JsonValue>;
|
|
1984
|
+
/** Replay events for a realtime channel. `GET /api/v1/rt/stream/replay/{channel}` */
|
|
1985
|
+
replay: (args: {
|
|
1986
|
+
channel: string;
|
|
1987
|
+
after?: JsonValue;
|
|
1988
|
+
limit?: JsonValue;
|
|
1989
|
+
}) => Promise<JsonValue>;
|
|
1990
|
+
/** Subscribe a client ID to a realtime channel. `POST /api/v1/rt/stream/subscribe` */
|
|
1991
|
+
subscribe: (args: {
|
|
1992
|
+
channel: JsonValue;
|
|
1993
|
+
clientId: JsonValue;
|
|
1994
|
+
}) => Promise<JsonValue>;
|
|
1995
|
+
/** Unsubscribe a client ID from a realtime channel. `POST /api/v1/rt/stream/unsubscribe` */
|
|
1996
|
+
unsubscribe: (args: {
|
|
1997
|
+
channel: JsonValue;
|
|
1998
|
+
clientId: JsonValue;
|
|
1999
|
+
}) => Promise<JsonValue>;
|
|
2000
|
+
};
|
|
2001
|
+
remoteConfig: {
|
|
2002
|
+
/** Remote config draft of an environment: parameters, conditions, the published version and pending changes. `GET /api/v1/projects/{project_id}/config` */
|
|
2003
|
+
getDraft: (args?: {
|
|
2004
|
+
projectId?: string;
|
|
2005
|
+
env?: JsonValue;
|
|
2006
|
+
}) => Promise<JsonValue>;
|
|
2007
|
+
/** Create or change a parameter: type (bool|string|number|json), default, description, conditional [{condition, value}]. `PUT /api/v1/projects/{project_id}/config/params/{key}` */
|
|
2008
|
+
putParam: (args: {
|
|
2009
|
+
projectId?: string;
|
|
2010
|
+
key: string;
|
|
2011
|
+
type?: JsonValue;
|
|
2012
|
+
defaultValue?: JsonValue;
|
|
2013
|
+
description?: JsonValue;
|
|
2014
|
+
conditional?: JsonValue;
|
|
2015
|
+
env?: JsonValue;
|
|
2016
|
+
}) => Promise<JsonValue>;
|
|
2017
|
+
/** Delete a parameter from the draft. `DELETE /api/v1/projects/{project_id}/config/params/{key}` */
|
|
2018
|
+
deleteParam: (args: {
|
|
2019
|
+
projectId?: string;
|
|
2020
|
+
key: string;
|
|
2021
|
+
env?: JsonValue;
|
|
2022
|
+
}) => Promise<JsonValue>;
|
|
2023
|
+
/** Create or change a targeting condition: rules (attrs, semver, percent, users, audience), priority (lower wins first). `PUT /api/v1/projects/{project_id}/config/conditions/{name}` */
|
|
2024
|
+
putCondition: (args: {
|
|
2025
|
+
projectId?: string;
|
|
2026
|
+
name: string;
|
|
2027
|
+
rules: JsonValue;
|
|
2028
|
+
priority?: JsonValue;
|
|
2029
|
+
description?: JsonValue;
|
|
2030
|
+
env?: JsonValue;
|
|
2031
|
+
}) => Promise<JsonValue>;
|
|
2032
|
+
/** Delete a condition from the draft. `DELETE /api/v1/projects/{project_id}/config/conditions/{name}` */
|
|
2033
|
+
deleteCondition: (args: {
|
|
2034
|
+
projectId?: string;
|
|
2035
|
+
name: string;
|
|
2036
|
+
env?: JsonValue;
|
|
2037
|
+
}) => Promise<JsonValue>;
|
|
2038
|
+
/** The draft (or the published version) as a git-friendly template file. `GET /api/v1/projects/{project_id}/config/template` */
|
|
2039
|
+
getTemplate: (args?: {
|
|
2040
|
+
projectId?: string;
|
|
2041
|
+
env?: JsonValue;
|
|
2042
|
+
source?: JsonValue;
|
|
2043
|
+
}) => Promise<JsonValue>;
|
|
2044
|
+
/** Replace the draft from a template file {conditions, parameters}; prune removes what the file doesn't have. Nothing is published. `PUT /api/v1/projects/{project_id}/config/template` */
|
|
2045
|
+
putTemplate: (args?: {
|
|
2046
|
+
projectId?: string;
|
|
2047
|
+
conditions?: JsonValue;
|
|
2048
|
+
parameters?: JsonValue;
|
|
2049
|
+
env?: JsonValue;
|
|
2050
|
+
prune?: JsonValue;
|
|
2051
|
+
}) => Promise<JsonValue>;
|
|
2052
|
+
/** What publishing the draft (or a given template) would change against the published version. `POST /api/v1/projects/{project_id}/config/diff` */
|
|
2053
|
+
diff: (args?: {
|
|
2054
|
+
projectId?: string;
|
|
2055
|
+
template?: JsonValue;
|
|
2056
|
+
env?: JsonValue;
|
|
2057
|
+
}) => Promise<JsonValue>;
|
|
2058
|
+
/** How many recently seen users would get different values if the draft (or template) were published. `POST /api/v1/projects/{project_id}/config/preview` */
|
|
2059
|
+
preview: (args?: {
|
|
2060
|
+
projectId?: string;
|
|
2061
|
+
template?: JsonValue;
|
|
2062
|
+
env?: JsonValue;
|
|
2063
|
+
sample?: JsonValue;
|
|
2064
|
+
}) => Promise<JsonValue>;
|
|
2065
|
+
/** Publish the draft as the next immutable version (base_version: the version you reviewed; scheduled_at: publish later). `POST /api/v1/projects/{project_id}/config/publish` */
|
|
2066
|
+
publish: (args?: {
|
|
2067
|
+
projectId?: string;
|
|
2068
|
+
message?: JsonValue;
|
|
2069
|
+
baseVersion?: JsonValue;
|
|
2070
|
+
scheduledAt?: JsonValue;
|
|
2071
|
+
env?: JsonValue;
|
|
2072
|
+
}) => Promise<JsonValue>;
|
|
2073
|
+
/** Published (and scheduled) versions, newest first. `GET /api/v1/projects/{project_id}/config/versions` */
|
|
2074
|
+
listVersions: (args?: {
|
|
2075
|
+
projectId?: string;
|
|
2076
|
+
env?: JsonValue;
|
|
2077
|
+
limit?: JsonValue;
|
|
2078
|
+
}) => Promise<JsonValue>;
|
|
2079
|
+
/** One published version with its snapshot and template file. `GET /api/v1/projects/{project_id}/config/versions/{version}` */
|
|
2080
|
+
getVersion: (args: {
|
|
2081
|
+
projectId?: string;
|
|
2082
|
+
version: string;
|
|
2083
|
+
env?: JsonValue;
|
|
2084
|
+
}) => Promise<JsonValue>;
|
|
2085
|
+
/** Publish an older version again as a new version. `POST /api/v1/projects/{project_id}/config/rollback/{version}` */
|
|
2086
|
+
rollback: (args: {
|
|
2087
|
+
projectId?: string;
|
|
2088
|
+
version: string;
|
|
2089
|
+
message?: JsonValue;
|
|
2090
|
+
env?: JsonValue;
|
|
2091
|
+
}) => Promise<JsonValue>;
|
|
2092
|
+
/** Cancel a scheduled publish. `DELETE /api/v1/projects/{project_id}/config/schedules/{schedule_id}` */
|
|
2093
|
+
cancelSchedule: (args: {
|
|
2094
|
+
projectId?: string;
|
|
2095
|
+
scheduleId: string;
|
|
2096
|
+
env?: JsonValue;
|
|
2097
|
+
}) => Promise<JsonValue>;
|
|
2098
|
+
/** The values one user or device would get (context: user_id, anon_id, platform, app_version, country, language, attrs). `POST /api/v1/projects/{project_id}/config/evaluate` */
|
|
2099
|
+
evaluate: (args?: {
|
|
2100
|
+
projectId?: string;
|
|
2101
|
+
context?: JsonValue;
|
|
2102
|
+
source?: JsonValue;
|
|
2103
|
+
env?: JsonValue;
|
|
2104
|
+
}) => Promise<JsonValue>;
|
|
2105
|
+
};
|
|
2106
|
+
schedules: {
|
|
2107
|
+
/** Cron schedules of the project's environment, newest first (optionally of one function). `GET /api/v1/fn/schedules` */
|
|
2108
|
+
list: (args?: {
|
|
2109
|
+
functionName?: JsonValue;
|
|
2110
|
+
}) => Promise<JsonValue>;
|
|
2111
|
+
/** Create a cron schedule: target_type function (function_name, payload), http (target: url, method, headers, body) or sql (target: sql, params); cron_expression in timezone (IANA), overlap allow|skip, max_attempts, timeout_sec. Payload/target values may be {"$secret": NAME}. `POST /api/v1/fn/schedules` */
|
|
2112
|
+
create: (args: {
|
|
2113
|
+
cronExpression: JsonValue;
|
|
2114
|
+
functionName?: JsonValue;
|
|
2115
|
+
payload?: JsonValue;
|
|
2116
|
+
enabled?: JsonValue;
|
|
2117
|
+
name?: JsonValue;
|
|
2118
|
+
description?: JsonValue;
|
|
2119
|
+
timezone?: JsonValue;
|
|
2120
|
+
overlap?: JsonValue;
|
|
2121
|
+
maxAttempts?: JsonValue;
|
|
2122
|
+
timeoutSec?: JsonValue;
|
|
2123
|
+
targetType?: JsonValue;
|
|
2124
|
+
target?: JsonValue;
|
|
2125
|
+
}) => Promise<JsonValue>;
|
|
2126
|
+
/** One schedule: expression, timezone, readable summary, next and last run. `GET /api/v1/fn/schedules/{schedule_id}` */
|
|
2127
|
+
get: (args: {
|
|
2128
|
+
scheduleId: string;
|
|
2129
|
+
}) => Promise<JsonValue>;
|
|
2130
|
+
/** Change a schedule; only the fields sent change (payload null clears it; "[redacted]" values keep what is stored). `PATCH /api/v1/fn/schedules/{schedule_id}` */
|
|
2131
|
+
update: (args: {
|
|
2132
|
+
scheduleId: string;
|
|
2133
|
+
changes: JsonObject;
|
|
2134
|
+
}) => Promise<JsonValue>;
|
|
2135
|
+
/** Delete a schedule (its run history stays in the logs). `DELETE /api/v1/fn/schedules/{schedule_id}` */
|
|
2136
|
+
delete: (args: {
|
|
2137
|
+
scheduleId: string;
|
|
2138
|
+
}) => Promise<JsonValue>;
|
|
2139
|
+
/** Run history, newest first: status (incl. SKIPPED and MISSED slots), duration, error, attempts and the response preview of HTTP/SQL targets. `GET /api/v1/fn/schedules/{schedule_id}/runs` */
|
|
2140
|
+
runs: (args: {
|
|
2141
|
+
scheduleId: string;
|
|
2142
|
+
limit?: JsonValue;
|
|
2143
|
+
before?: JsonValue;
|
|
2144
|
+
}) => Promise<JsonValue>;
|
|
2145
|
+
/** Run a schedule now (its regular times don't change); returns the queued invocation id. `POST /api/v1/fn/schedules/{schedule_id}/run` */
|
|
2146
|
+
run: (args: {
|
|
2147
|
+
scheduleId: string;
|
|
2148
|
+
}) => Promise<JsonValue>;
|
|
2149
|
+
/** The next run times of a cron expression in a time zone, with a readable summary; nothing is saved. `POST /api/v1/fn/schedules/preview` */
|
|
2150
|
+
preview: (args: {
|
|
2151
|
+
cronExpression: JsonValue;
|
|
2152
|
+
timezone?: JsonValue;
|
|
2153
|
+
count?: JsonValue;
|
|
2154
|
+
}) => Promise<JsonValue>;
|
|
2155
|
+
};
|
|
2156
|
+
simulation: {
|
|
2157
|
+
/** Compare two simulation runs of the project: regressions, improvements and new failures. `GET /api/v1/sim/runs/{target_run_id}/compare/{baseline_run_id}` */
|
|
2158
|
+
compareRuns: (args: {
|
|
2159
|
+
targetRunId: string;
|
|
2160
|
+
baselineRunId: string;
|
|
2161
|
+
}) => Promise<JsonValue>;
|
|
2162
|
+
/** What a simulation would test (user types, resources, rules), redacted by what you may read; pass its manifest_id to a run. `POST /api/v1/sim/discover` */
|
|
2163
|
+
discover: () => Promise<JsonValue>;
|
|
2164
|
+
/** One simulation run with every case's result (history keeps no rule source or user ids). `GET /api/v1/sim/runs/{run_id}` */
|
|
2165
|
+
getRun: (args: {
|
|
2166
|
+
runId: string;
|
|
2167
|
+
}) => Promise<JsonValue>;
|
|
2168
|
+
/** The project's simulation runs, newest first; limit 1-100 (default 50) and offset page through them. `GET /api/v1/sim/runs` */
|
|
2169
|
+
listRuns: (args?: {
|
|
2170
|
+
limit?: JsonValue;
|
|
2171
|
+
offset?: JsonValue;
|
|
2172
|
+
}) => Promise<JsonValue>;
|
|
2173
|
+
/** Real simulation runs used and allowed today (UTC) and this month; reading it uses nothing. `GET /api/v1/sim/quota` */
|
|
2174
|
+
quota: () => Promise<JsonValue>;
|
|
2175
|
+
/** Outcomes the team marked as intended for this project (shown green on every run, left out of findings). `GET /api/v1/sim/intended` */
|
|
2176
|
+
listIntended: () => Promise<JsonValue>;
|
|
2177
|
+
/** Mark an outcome as intended (role, action, resource, outcome ALLOW or DENY, optional note); needs policies.write. Marking the same role/action/resource again replaces it. `POST /api/v1/sim/intended` */
|
|
2178
|
+
markIntended: (args: {
|
|
2179
|
+
role: JsonValue;
|
|
2180
|
+
action: JsonValue;
|
|
2181
|
+
resource: JsonValue;
|
|
2182
|
+
outcome: JsonValue;
|
|
2183
|
+
note?: JsonValue;
|
|
2184
|
+
}) => Promise<JsonValue>;
|
|
2185
|
+
/** Remove an intended-outcome mark; matching cases show as measured again. Needs policies.write. `DELETE /api/v1/sim/intended/{mark_id}` */
|
|
2186
|
+
unmarkIntended: (args: {
|
|
2187
|
+
markId: string;
|
|
2188
|
+
}) => Promise<JsonValue>;
|
|
2189
|
+
/** Callers, gateway checks, sign-in, resources and connectors of the project (platform defences as one 'Platform protection' node). `GET /api/v1/sim/topology` */
|
|
2190
|
+
topology: () => Promise<JsonValue>;
|
|
2191
|
+
/** Everything the project has, read from every engine: tables in every schema it created, collections, buckets, secrets (names only), functions with their schedules, queues, workflows and triggers, sign-in providers, hooks, webhooks, channels, edge limits, backups, environments, domains, policies and plan headroom. Cached a minute; redacted by the caller's permissions. `GET /api/v1/sim/inventory` */
|
|
2192
|
+
inventory: (args?: {
|
|
2193
|
+
include?: JsonValue;
|
|
2194
|
+
fresh?: JsonValue;
|
|
2195
|
+
}) => Promise<JsonValue>;
|
|
2196
|
+
/** The checks catalogue: what is wrong or at risk (database, functions, storage, sign-in, edge, plan headroom, settings above the plan, realtime, backups, integrations, design), worst first, each with a fix. severity keeps that level and worse. `GET /api/v1/sim/checks` */
|
|
2197
|
+
checks: (args?: {
|
|
2198
|
+
severity?: JsonValue;
|
|
2199
|
+
area?: JsonValue;
|
|
2200
|
+
fresh?: JsonValue;
|
|
2201
|
+
}) => Promise<JsonValue>;
|
|
2202
|
+
/** The architecture map: nodes by layer (clients, edge, identity, policies, services and data, async, external, resilience) with their status from the checks and the latest run, and the edges between them. `GET /api/v1/sim/graph` */
|
|
2203
|
+
graph: (args?: {
|
|
2204
|
+
fresh?: JsonValue;
|
|
2205
|
+
}) => Promise<JsonValue>;
|
|
2206
|
+
/** Every limit the project lives under, with its value and how it is counted. `GET /api/v1/sim/limits` */
|
|
2207
|
+
limits: () => Promise<JsonValue>;
|
|
2208
|
+
/** Run one integration flow under a programmed outcome: modelled (free, nothing sent) or sealed (real code path, recorded, one single-request check). `POST /api/v1/sim/integrations/run` */
|
|
2209
|
+
integrationRun: (args: {
|
|
2210
|
+
connectorId: JsonValue;
|
|
2211
|
+
flowId: JsonValue;
|
|
2212
|
+
outcome?: JsonValue;
|
|
2213
|
+
mode?: JsonValue;
|
|
2214
|
+
}) => Promise<JsonValue>;
|
|
2215
|
+
/** Judge the 14 security drills from the project's configuration (optionally with a what-if draft that is never saved). `POST /api/v1/sim/drills/run` */
|
|
2216
|
+
drillsRun: (args?: {
|
|
2217
|
+
drillIds?: JsonValue;
|
|
2218
|
+
overrides?: JsonValue;
|
|
2219
|
+
}) => Promise<JsonValue>;
|
|
2220
|
+
/** What a run's sealed send points would have sent (secrets masked; message bodies need settings.manage). `GET /api/v1/sim/runs/{run_id}/artifacts` */
|
|
2221
|
+
runArtifacts: (args: {
|
|
2222
|
+
runId: string;
|
|
2223
|
+
}) => Promise<JsonValue>;
|
|
2224
|
+
/** A project snapshot for offline simulation (sov simulate offline): tables, row policies, functions, every case with the rules' verdict. `POST /api/v1/sim/snapshot` */
|
|
2225
|
+
snapshot: (args?: {
|
|
2226
|
+
includeRows?: JsonValue;
|
|
2227
|
+
}) => Promise<JsonValue>;
|
|
2228
|
+
};
|
|
2229
|
+
storage: {
|
|
2230
|
+
/** `POST /api/v1/store/buckets` */
|
|
2231
|
+
createBucket: (args: {
|
|
2232
|
+
body: JsonObject;
|
|
2233
|
+
}) => Promise<JsonValue>;
|
|
2234
|
+
/** `DELETE /api/v1/store/buckets/{name}` */
|
|
2235
|
+
deleteBucket: (args: {
|
|
2236
|
+
name: string;
|
|
2237
|
+
}) => Promise<JsonValue>;
|
|
2238
|
+
/** `GET /api/v1/store/buckets/{name}` */
|
|
2239
|
+
getBucket: (args: {
|
|
2240
|
+
name: string;
|
|
2241
|
+
}) => Promise<JsonValue>;
|
|
2242
|
+
/** `GET /api/v1/store/buckets` */
|
|
2243
|
+
listBuckets: () => Promise<JsonValue>;
|
|
2244
|
+
/** `POST /api/v1/store/objects/move` */
|
|
2245
|
+
moveObject: (args: {
|
|
2246
|
+
fromPath: JsonValue;
|
|
2247
|
+
toPath: JsonValue;
|
|
2248
|
+
}) => Promise<JsonValue>;
|
|
2249
|
+
/** `PATCH /api/v1/store/buckets/{name}` */
|
|
2250
|
+
updateBucket: (args: {
|
|
2251
|
+
name: string;
|
|
2252
|
+
body: JsonObject;
|
|
2253
|
+
}) => Promise<JsonValue>;
|
|
2254
|
+
};
|
|
2255
|
+
templates: {
|
|
2256
|
+
/** App templates (SaaS, marketplace, chat): what each creates, the tables it adds and its steps. Project team only. `GET /api/v1/templates` */
|
|
2257
|
+
list: () => Promise<JsonValue>;
|
|
2258
|
+
/** One app template, including the SQL its migration runs. `GET /api/v1/templates/{name}` */
|
|
2259
|
+
get: (args: {
|
|
2260
|
+
name: string;
|
|
2261
|
+
}) => Promise<JsonValue>;
|
|
2262
|
+
/** Apply a template to the project: its migration (tables + row-level security), buckets and their rules, realtime — each step with your own permissions, stopping at the first refusal. dry_run checks for tables that already exist and changes nothing. Needs database.admin. `POST /api/v1/governance/tenants/{org_id}/projects/{project_id}/templates/{name}/apply` */
|
|
2263
|
+
apply: (args: {
|
|
2264
|
+
orgId?: string;
|
|
2265
|
+
projectId?: string;
|
|
2266
|
+
name: string;
|
|
2267
|
+
dryRun?: JsonValue;
|
|
2268
|
+
}) => Promise<JsonValue>;
|
|
2269
|
+
};
|
|
2270
|
+
traces: {
|
|
2271
|
+
/** The project's recent refused (4xx) and failed (5xx) requests, each with who refused it, why and what to do (kind: denied, failed or all). Project team only. `GET /api/v1/request-traces` */
|
|
2272
|
+
list: (args?: {
|
|
2273
|
+
kind?: JsonValue;
|
|
2274
|
+
before?: JsonValue;
|
|
2275
|
+
limit?: JsonValue;
|
|
2276
|
+
}) => Promise<JsonValue>;
|
|
2277
|
+
/** One request by its trace id (SovariaError.traceId, the X-Request-ID header): every hop — gateway checks, engine, SQL — and the explanation. `GET /api/v1/request-traces/{trace_id}` */
|
|
2278
|
+
get: (args: {
|
|
2279
|
+
traceId: string;
|
|
2280
|
+
}) => Promise<JsonValue>;
|
|
2281
|
+
};
|
|
2282
|
+
triggers: {
|
|
2283
|
+
/** Event triggers of the project's environment with the plan's trigger limits and the event sources. `GET /api/v1/fn/triggers` */
|
|
2284
|
+
list: (args?: {
|
|
2285
|
+
functionName?: JsonValue;
|
|
2286
|
+
}) => Promise<JsonValue>;
|
|
2287
|
+
/** Run a function when something happens: source db.document | db.row | auth.user | storage.object | realtime.message, event_types, resource (glob), subject_prefix, max_attempts. `POST /api/v1/fn/triggers` */
|
|
2288
|
+
create: (args: {
|
|
2289
|
+
functionName: JsonValue;
|
|
2290
|
+
source: JsonValue;
|
|
2291
|
+
eventTypes?: JsonValue;
|
|
2292
|
+
resource?: JsonValue;
|
|
2293
|
+
subjectPrefix?: JsonValue;
|
|
2294
|
+
name?: JsonValue;
|
|
2295
|
+
enabled?: JsonValue;
|
|
2296
|
+
maxAttempts?: JsonValue;
|
|
2297
|
+
}) => Promise<JsonValue>;
|
|
2298
|
+
/** One event trigger. `GET /api/v1/fn/triggers/{trigger_id}` */
|
|
2299
|
+
get: (args: {
|
|
2300
|
+
triggerId: string;
|
|
2301
|
+
}) => Promise<JsonValue>;
|
|
2302
|
+
/** Change an event trigger (only the fields sent change). `PATCH /api/v1/fn/triggers/{trigger_id}` */
|
|
2303
|
+
update: (args: {
|
|
2304
|
+
triggerId: string;
|
|
2305
|
+
changes: JsonObject;
|
|
2306
|
+
}) => Promise<JsonValue>;
|
|
2307
|
+
/** Delete an event trigger. `DELETE /api/v1/fn/triggers/{trigger_id}` */
|
|
2308
|
+
delete: (args: {
|
|
2309
|
+
triggerId: string;
|
|
2310
|
+
}) => Promise<JsonValue>;
|
|
2311
|
+
/** Queue one run with a sample event (counts as an invocation). `POST /api/v1/fn/triggers/{trigger_id}/test` */
|
|
2312
|
+
test: (args: {
|
|
2313
|
+
triggerId: string;
|
|
2314
|
+
}) => Promise<JsonValue>;
|
|
2315
|
+
};
|
|
2316
|
+
vector: {
|
|
2317
|
+
/** Delete an entire vector collection. `DELETE /api/v1/collections/{collection}` */
|
|
2318
|
+
deleteCollection: (args: {
|
|
2319
|
+
collection: string;
|
|
2320
|
+
}) => Promise<JsonValue>;
|
|
2321
|
+
/** Delete a record from a vector collection. `DELETE /api/v1/collections/{collection}/records/{record_id}` */
|
|
2322
|
+
deleteRecord: (args: {
|
|
2323
|
+
collection: string;
|
|
2324
|
+
recordId: string;
|
|
2325
|
+
}) => Promise<JsonValue>;
|
|
2326
|
+
/** Generate embeddings for one or more texts. `POST /api/v1/embed` */
|
|
2327
|
+
embed: (args: {
|
|
2328
|
+
texts: JsonValue;
|
|
2329
|
+
}) => Promise<JsonValue>;
|
|
2330
|
+
/** List vector collections in the current project scope. `GET /api/v1/collections` */
|
|
2331
|
+
listCollections: () => Promise<JsonValue>;
|
|
2332
|
+
/** Embed and upsert documents into a vector collection. `POST /api/v1/vectors/upsert` */
|
|
2333
|
+
upsert: (args: {
|
|
2334
|
+
collection: JsonValue;
|
|
2335
|
+
docs: JsonValue;
|
|
2336
|
+
}) => Promise<JsonValue>;
|
|
2337
|
+
/** Collection settings. app_search: true lets the project's apps (anon key, signed-in users) search it; they can never write or list it. `PATCH /api/v1/collections/{collection}` */
|
|
2338
|
+
setCollection: (args: {
|
|
2339
|
+
collection: string;
|
|
2340
|
+
appSearch?: JsonValue;
|
|
2341
|
+
}) => Promise<JsonValue>;
|
|
2342
|
+
/** Embed every stored text again with the project's current model (large collections need this after a model change). `POST /api/v1/collections/{collection}/reembed` */
|
|
2343
|
+
reembedCollection: (args: {
|
|
2344
|
+
collection: string;
|
|
2345
|
+
force?: JsonValue;
|
|
2346
|
+
}) => Promise<JsonValue>;
|
|
2347
|
+
/** Search a SQL table: mode vector (nearest embeddings), keyword (full text) or hybrid (both, reciprocal rank fusion). text is embedded with the project's model when no vector is given. ef_search / probes tune recall, rerank reorders with the managed reranker, filter_in matches any of several values. Only rows the caller may read. `POST /api/v1/data/rel/vector/search` */
|
|
2348
|
+
sqlSearch: (args: {
|
|
2349
|
+
tableName: JsonValue;
|
|
2350
|
+
columnName?: JsonValue;
|
|
2351
|
+
vector?: JsonValue;
|
|
2352
|
+
text?: JsonValue;
|
|
2353
|
+
mode?: JsonValue;
|
|
2354
|
+
textColumns?: JsonValue;
|
|
2355
|
+
language?: JsonValue;
|
|
2356
|
+
k?: JsonValue;
|
|
2357
|
+
metric?: JsonValue;
|
|
2358
|
+
select?: JsonValue;
|
|
2359
|
+
filter?: JsonValue;
|
|
2360
|
+
maxDistance?: JsonValue;
|
|
2361
|
+
metadataFilter?: JsonValue;
|
|
2362
|
+
metadataColumn?: JsonValue;
|
|
2363
|
+
filterIn?: JsonValue;
|
|
2364
|
+
efSearch?: JsonValue;
|
|
2365
|
+
probes?: JsonValue;
|
|
2366
|
+
rerank?: JsonValue;
|
|
2367
|
+
rerankCandidates?: JsonValue;
|
|
2368
|
+
}) => Promise<JsonValue>;
|
|
2369
|
+
/** Tables whose vector column Sovaria keeps embedded, rows embedded and waiting, last error, and the project's model. `GET /api/v1/data/rel/vector/auto` */
|
|
2370
|
+
sqlAutoStatus: () => Promise<JsonValue>;
|
|
2371
|
+
/** Keep a vector column (created if missing) filled with embeddings of the source columns; edited rows are embedded again automatically. rebuild re-embeds the whole table. language sets the keyword index's text search configuration (e.g. english). `POST /api/v1/data/rel/vector/auto` */
|
|
2372
|
+
sqlAutoEnable: (args: {
|
|
2373
|
+
tableName: JsonValue;
|
|
2374
|
+
columnName?: JsonValue;
|
|
2375
|
+
sourceColumns: JsonValue;
|
|
2376
|
+
rebuild?: JsonValue;
|
|
2377
|
+
language?: JsonValue;
|
|
2378
|
+
}) => Promise<JsonValue>;
|
|
2379
|
+
/** Stop keeping a table's vectors up to date (the column and its vectors stay). `DELETE /api/v1/data/rel/vector/auto/{table_name}` */
|
|
2380
|
+
sqlAutoDisable: (args: {
|
|
2381
|
+
tableName: string;
|
|
2382
|
+
}) => Promise<JsonValue>;
|
|
2383
|
+
/** Embed waiting rows now instead of on the next background pass (up to limit per table). `POST /api/v1/data/rel/vector/auto/sync` */
|
|
2384
|
+
sqlAutoSync: (args?: {
|
|
2385
|
+
tableName?: JsonValue;
|
|
2386
|
+
limit?: JsonValue;
|
|
2387
|
+
}) => Promise<JsonValue>;
|
|
2388
|
+
/** pgvector on the project database: available/enabled, vector columns, their indexes (method, metric, quantization, options, building/ready) and row estimates. Team only. `GET /api/v1/data/rel/vector/status` */
|
|
2389
|
+
sqlStatus: () => Promise<JsonValue>;
|
|
2390
|
+
/** Turn pgvector on (or off with enabled: false) for the project database. `POST /api/v1/data/rel/vector/enable` */
|
|
2391
|
+
sqlEnable: (args?: {
|
|
2392
|
+
enabled?: JsonValue;
|
|
2393
|
+
}) => Promise<JsonValue>;
|
|
2394
|
+
/** Create a documents table (id, content, metadata, embedding vector(n), optional owner_id with owner-only row policies) with an HNSW index. `POST /api/v1/data/rel/vector/tables` */
|
|
2395
|
+
sqlCreateTable: (args: {
|
|
2396
|
+
tableName: JsonValue;
|
|
2397
|
+
dimensions: JsonValue;
|
|
2398
|
+
ownerRows?: JsonValue;
|
|
2399
|
+
}) => Promise<JsonValue>;
|
|
2400
|
+
/** Add a vector(n) column to an existing table. `POST /api/v1/data/rel/vector/columns` */
|
|
2401
|
+
sqlAddColumn: (args: {
|
|
2402
|
+
tableName: JsonValue;
|
|
2403
|
+
columnName?: JsonValue;
|
|
2404
|
+
dimensions: JsonValue;
|
|
2405
|
+
}) => Promise<JsonValue>;
|
|
2406
|
+
/** HNSW (m, ef_construction) or IVFFlat (lists) index, cosine / l2 / inner_product; built CONCURRENTLY in the background by default; halfvec above 2,000 dimensions. `POST /api/v1/data/rel/vector/indexes` */
|
|
2407
|
+
sqlCreateIndex: (args: {
|
|
2408
|
+
tableName: JsonValue;
|
|
2409
|
+
columnName?: JsonValue;
|
|
2410
|
+
metric?: JsonValue;
|
|
2411
|
+
method?: JsonValue;
|
|
2412
|
+
m?: JsonValue;
|
|
2413
|
+
efConstruction?: JsonValue;
|
|
2414
|
+
lists?: JsonValue;
|
|
2415
|
+
concurrently?: JsonValue;
|
|
2416
|
+
}) => Promise<JsonValue>;
|
|
2417
|
+
/** Insert rows whose vector column is a number array; embed: true embeds rows without a vector in the request (automatic-embeddings tables, small batches). `POST /api/v1/data/rel/vector/rows` */
|
|
2418
|
+
sqlInsertRows: (args: {
|
|
2419
|
+
tableName: JsonValue;
|
|
2420
|
+
columnName?: JsonValue;
|
|
2421
|
+
rows: JsonValue;
|
|
2422
|
+
embed?: JsonValue;
|
|
2423
|
+
}) => Promise<JsonValue>;
|
|
2424
|
+
};
|
|
2425
|
+
workflows: {
|
|
2426
|
+
/** Start a durable workflow run of a function that uses context.step; key makes the start idempotent; max_attempts sets the tries per step (plan fn.trigger_max_attempts). `POST /api/v1/fn/workflows` */
|
|
2427
|
+
start: (args: {
|
|
2428
|
+
functionName: JsonValue;
|
|
2429
|
+
input?: JsonValue;
|
|
2430
|
+
key?: JsonValue;
|
|
2431
|
+
maxAttempts?: JsonValue;
|
|
2432
|
+
}) => Promise<JsonValue>;
|
|
2433
|
+
/** Workflow runs, newest first, with the plan's workflow limits. `GET /api/v1/fn/workflows` */
|
|
2434
|
+
list: (args?: {
|
|
2435
|
+
functionName?: JsonValue;
|
|
2436
|
+
status?: JsonValue;
|
|
2437
|
+
before?: JsonValue;
|
|
2438
|
+
limit?: JsonValue;
|
|
2439
|
+
}) => Promise<JsonValue>;
|
|
2440
|
+
/** One run: status, input, output or error, and every finished step with its result. `GET /api/v1/fn/workflows/{run_id}` */
|
|
2441
|
+
get: (args: {
|
|
2442
|
+
runId: string;
|
|
2443
|
+
}) => Promise<JsonValue>;
|
|
2444
|
+
/** Wake step.waitForSignal(name) with data (kept until the run waits for it). `POST /api/v1/fn/workflows/{run_id}/signal` */
|
|
2445
|
+
signal: (args: {
|
|
2446
|
+
runId: string;
|
|
2447
|
+
name: JsonValue;
|
|
2448
|
+
data?: JsonValue;
|
|
2449
|
+
}) => Promise<JsonValue>;
|
|
2450
|
+
/** Stop an unfinished run for good. `POST /api/v1/fn/workflows/{run_id}/cancel` */
|
|
2451
|
+
cancel: (args: {
|
|
2452
|
+
runId: string;
|
|
2453
|
+
}) => Promise<JsonValue>;
|
|
2454
|
+
/** Resume a failed run from its failed step; latest moves it to the live function version. `POST /api/v1/fn/workflows/{run_id}/retry` */
|
|
2455
|
+
retry: (args: {
|
|
2456
|
+
runId: string;
|
|
2457
|
+
latest?: JsonValue;
|
|
2458
|
+
}) => Promise<JsonValue>;
|
|
2459
|
+
};
|
|
2460
|
+
};
|
|
2461
|
+
export type GeneratedApi = ReturnType<typeof createGeneratedApi>;
|
|
2462
|
+
export {};
|