@fluxbase/sdk 2026.1.1-rc.7 → 2026.1.1-rc.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +60 -56
- package/dist/index.d.ts +60 -56
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -96,8 +96,8 @@ interface AuthResponse {
|
|
|
96
96
|
*/
|
|
97
97
|
interface Factor {
|
|
98
98
|
id: string;
|
|
99
|
-
type:
|
|
100
|
-
status:
|
|
99
|
+
type: "totp" | "phone";
|
|
100
|
+
status: "verified" | "unverified";
|
|
101
101
|
created_at: string;
|
|
102
102
|
updated_at: string;
|
|
103
103
|
friendly_name?: string;
|
|
@@ -115,7 +115,7 @@ interface TOTPSetup {
|
|
|
115
115
|
*/
|
|
116
116
|
interface TwoFactorSetupResponse {
|
|
117
117
|
id: string;
|
|
118
|
-
type:
|
|
118
|
+
type: "totp";
|
|
119
119
|
totp: TOTPSetup;
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
@@ -163,7 +163,7 @@ interface FluxbaseError extends Error {
|
|
|
163
163
|
code?: string;
|
|
164
164
|
details?: unknown;
|
|
165
165
|
}
|
|
166
|
-
type HttpMethod =
|
|
166
|
+
type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD";
|
|
167
167
|
interface RequestOptions {
|
|
168
168
|
method: HttpMethod;
|
|
169
169
|
headers?: Record<string, string>;
|
|
@@ -189,7 +189,7 @@ interface PostgrestResponse<T> {
|
|
|
189
189
|
* - 'planned': Uses PostgreSQL's query planner estimate (faster, less accurate)
|
|
190
190
|
* - 'estimated': Uses statistics-based estimate (fastest, least accurate)
|
|
191
191
|
*/
|
|
192
|
-
type CountType =
|
|
192
|
+
type CountType = "exact" | "planned" | "estimated";
|
|
193
193
|
/**
|
|
194
194
|
* Options for select queries (Supabase-compatible)
|
|
195
195
|
*/
|
|
@@ -205,19 +205,19 @@ interface SelectOptions {
|
|
|
205
205
|
*/
|
|
206
206
|
head?: boolean;
|
|
207
207
|
}
|
|
208
|
-
type FilterOperator =
|
|
208
|
+
type FilterOperator = "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "like" | "ilike" | "is" | "in" | "cs" | "cd" | "ov" | "sl" | "sr" | "nxr" | "nxl" | "adj" | "not" | "fts" | "plfts" | "wfts" | "st_intersects" | "st_contains" | "st_within" | "st_dwithin" | "st_distance" | "st_touches" | "st_crosses" | "st_overlaps" | "between" | "not.between" | "vec_l2" | "vec_cos" | "vec_ip";
|
|
209
209
|
interface QueryFilter {
|
|
210
210
|
column: string;
|
|
211
211
|
operator: FilterOperator;
|
|
212
212
|
value: unknown;
|
|
213
213
|
}
|
|
214
|
-
type OrderDirection =
|
|
214
|
+
type OrderDirection = "asc" | "desc";
|
|
215
215
|
interface OrderBy {
|
|
216
216
|
column: string;
|
|
217
217
|
direction: OrderDirection;
|
|
218
|
-
nulls?:
|
|
218
|
+
nulls?: "first" | "last";
|
|
219
219
|
/** Vector operator for similarity ordering (vec_l2, vec_cos, vec_ip) */
|
|
220
|
-
vectorOp?:
|
|
220
|
+
vectorOp?: "vec_l2" | "vec_cos" | "vec_ip";
|
|
221
221
|
/** Vector value for similarity ordering */
|
|
222
222
|
vectorValue?: number[];
|
|
223
223
|
}
|
|
@@ -243,7 +243,7 @@ interface UpsertOptions {
|
|
|
243
243
|
defaultToNull?: boolean;
|
|
244
244
|
}
|
|
245
245
|
interface RealtimeMessage {
|
|
246
|
-
type:
|
|
246
|
+
type: "subscribe" | "unsubscribe" | "heartbeat" | "broadcast" | "presence" | "ack" | "error" | "postgres_changes" | "access_token";
|
|
247
247
|
channel?: string;
|
|
248
248
|
event?: string;
|
|
249
249
|
schema?: string;
|
|
@@ -260,7 +260,7 @@ interface RealtimeMessage {
|
|
|
260
260
|
token?: string;
|
|
261
261
|
}
|
|
262
262
|
interface PostgresChangesConfig {
|
|
263
|
-
event:
|
|
263
|
+
event: "INSERT" | "UPDATE" | "DELETE" | "*";
|
|
264
264
|
schema: string;
|
|
265
265
|
table: string;
|
|
266
266
|
filter?: string;
|
|
@@ -271,7 +271,7 @@ interface PostgresChangesConfig {
|
|
|
271
271
|
*/
|
|
272
272
|
interface RealtimePostgresChangesPayload<T = unknown> {
|
|
273
273
|
/** Event type (Supabase-compatible field name) */
|
|
274
|
-
eventType:
|
|
274
|
+
eventType: "INSERT" | "UPDATE" | "DELETE" | "*";
|
|
275
275
|
/** Database schema */
|
|
276
276
|
schema: string;
|
|
277
277
|
/** Table name */
|
|
@@ -290,7 +290,7 @@ interface RealtimePostgresChangesPayload<T = unknown> {
|
|
|
290
290
|
*/
|
|
291
291
|
interface RealtimeChangePayload {
|
|
292
292
|
/** @deprecated Use eventType instead */
|
|
293
|
-
type:
|
|
293
|
+
type: "INSERT" | "UPDATE" | "DELETE";
|
|
294
294
|
schema: string;
|
|
295
295
|
table: string;
|
|
296
296
|
/** @deprecated Use 'new' instead */
|
|
@@ -324,7 +324,7 @@ interface PresenceState {
|
|
|
324
324
|
* Realtime presence payload structure
|
|
325
325
|
*/
|
|
326
326
|
interface RealtimePresencePayload {
|
|
327
|
-
event:
|
|
327
|
+
event: "sync" | "join" | "leave";
|
|
328
328
|
key?: string;
|
|
329
329
|
newPresences?: PresenceState[];
|
|
330
330
|
leftPresences?: PresenceState[];
|
|
@@ -338,7 +338,7 @@ type PresenceCallback = (payload: RealtimePresencePayload) => void;
|
|
|
338
338
|
* Broadcast message structure
|
|
339
339
|
*/
|
|
340
340
|
interface BroadcastMessage {
|
|
341
|
-
type:
|
|
341
|
+
type: "broadcast";
|
|
342
342
|
event: string;
|
|
343
343
|
payload: unknown;
|
|
344
344
|
}
|
|
@@ -556,7 +556,7 @@ interface ChunkedUploadSession {
|
|
|
556
556
|
/** Array of completed chunk indices (0-indexed) */
|
|
557
557
|
completedChunks: number[];
|
|
558
558
|
/** Session status */
|
|
559
|
-
status:
|
|
559
|
+
status: "active" | "completing" | "completed" | "aborted" | "expired";
|
|
560
560
|
/** Session expiration time */
|
|
561
561
|
expiresAt: string;
|
|
562
562
|
/** Session creation time */
|
|
@@ -564,11 +564,11 @@ interface ChunkedUploadSession {
|
|
|
564
564
|
}
|
|
565
565
|
interface ShareFileOptions {
|
|
566
566
|
userId: string;
|
|
567
|
-
permission:
|
|
567
|
+
permission: "read" | "write";
|
|
568
568
|
}
|
|
569
569
|
interface FileShare {
|
|
570
570
|
user_id: string;
|
|
571
|
-
permission:
|
|
571
|
+
permission: "read" | "write";
|
|
572
572
|
created_at: string;
|
|
573
573
|
}
|
|
574
574
|
interface BucketSettings {
|
|
@@ -699,7 +699,7 @@ interface SAMLSession {
|
|
|
699
699
|
/** Session creation time */
|
|
700
700
|
created_at: string;
|
|
701
701
|
}
|
|
702
|
-
type OTPType =
|
|
702
|
+
type OTPType = "signup" | "invite" | "magiclink" | "recovery" | "email_change" | "sms" | "phone_change" | "email";
|
|
703
703
|
interface SignInWithOtpCredentials {
|
|
704
704
|
email?: string;
|
|
705
705
|
phone?: string;
|
|
@@ -721,7 +721,7 @@ interface VerifyOtpParams {
|
|
|
721
721
|
};
|
|
722
722
|
}
|
|
723
723
|
interface ResendOtpParams {
|
|
724
|
-
type:
|
|
724
|
+
type: "signup" | "sms" | "email";
|
|
725
725
|
email?: string;
|
|
726
726
|
phone?: string;
|
|
727
727
|
options?: {
|
|
@@ -755,7 +755,7 @@ interface ReauthenticateResponse {
|
|
|
755
755
|
nonce: string;
|
|
756
756
|
}
|
|
757
757
|
interface SignInWithIdTokenCredentials {
|
|
758
|
-
provider:
|
|
758
|
+
provider: "google" | "apple";
|
|
759
759
|
token: string;
|
|
760
760
|
nonce?: string;
|
|
761
761
|
options?: {
|
|
@@ -828,7 +828,7 @@ interface ListUsersOptions {
|
|
|
828
828
|
exclude_admins?: boolean;
|
|
829
829
|
search?: string;
|
|
830
830
|
limit?: number;
|
|
831
|
-
type?:
|
|
831
|
+
type?: "app" | "dashboard";
|
|
832
832
|
}
|
|
833
833
|
interface InviteUserRequest {
|
|
834
834
|
email: string;
|
|
@@ -967,7 +967,7 @@ interface Invitation {
|
|
|
967
967
|
}
|
|
968
968
|
interface CreateInvitationRequest {
|
|
969
969
|
email: string;
|
|
970
|
-
role:
|
|
970
|
+
role: "dashboard_admin" | "dashboard_user";
|
|
971
971
|
expiry_duration?: number;
|
|
972
972
|
}
|
|
973
973
|
interface CreateInvitationResponse {
|
|
@@ -1043,7 +1043,7 @@ interface CustomSetting {
|
|
|
1043
1043
|
id: string;
|
|
1044
1044
|
key: string;
|
|
1045
1045
|
value: Record<string, unknown>;
|
|
1046
|
-
value_type:
|
|
1046
|
+
value_type: "string" | "number" | "boolean" | "json";
|
|
1047
1047
|
description?: string;
|
|
1048
1048
|
editable_by: string[];
|
|
1049
1049
|
metadata?: Record<string, unknown>;
|
|
@@ -1129,7 +1129,7 @@ interface SESSettings {
|
|
|
1129
1129
|
*/
|
|
1130
1130
|
interface EmailSettings {
|
|
1131
1131
|
enabled: boolean;
|
|
1132
|
-
provider:
|
|
1132
|
+
provider: "smtp" | "sendgrid" | "mailgun" | "ses";
|
|
1133
1133
|
from_address?: string;
|
|
1134
1134
|
from_name?: string;
|
|
1135
1135
|
reply_to_address?: string;
|
|
@@ -1177,7 +1177,7 @@ interface UpdateAppSettingsRequest {
|
|
|
1177
1177
|
/**
|
|
1178
1178
|
* Email template type
|
|
1179
1179
|
*/
|
|
1180
|
-
type EmailTemplateType =
|
|
1180
|
+
type EmailTemplateType = "magic_link" | "verify_email" | "reset_password" | "invite_user";
|
|
1181
1181
|
/**
|
|
1182
1182
|
* Email template structure
|
|
1183
1183
|
*/
|
|
@@ -1226,7 +1226,7 @@ interface EmailSettingOverride {
|
|
|
1226
1226
|
*/
|
|
1227
1227
|
interface EmailProviderSettings {
|
|
1228
1228
|
enabled: boolean;
|
|
1229
|
-
provider:
|
|
1229
|
+
provider: "smtp" | "sendgrid" | "mailgun" | "ses";
|
|
1230
1230
|
from_address: string;
|
|
1231
1231
|
from_name: string;
|
|
1232
1232
|
smtp_host: string;
|
|
@@ -1251,7 +1251,7 @@ interface EmailProviderSettings {
|
|
|
1251
1251
|
*/
|
|
1252
1252
|
interface UpdateEmailProviderSettingsRequest {
|
|
1253
1253
|
enabled?: boolean;
|
|
1254
|
-
provider?:
|
|
1254
|
+
provider?: "smtp" | "sendgrid" | "mailgun" | "ses";
|
|
1255
1255
|
from_address?: string;
|
|
1256
1256
|
from_name?: string;
|
|
1257
1257
|
smtp_host?: string;
|
|
@@ -1373,6 +1373,8 @@ interface AuthSettings {
|
|
|
1373
1373
|
password_require_special: boolean;
|
|
1374
1374
|
session_timeout_minutes: number;
|
|
1375
1375
|
max_sessions_per_user: number;
|
|
1376
|
+
disable_dashboard_password_login: boolean;
|
|
1377
|
+
disable_app_password_login: boolean;
|
|
1376
1378
|
/** Settings overridden by environment variables (read-only, cannot be modified via API) */
|
|
1377
1379
|
_overrides?: Record<string, SettingOverride>;
|
|
1378
1380
|
}
|
|
@@ -1390,6 +1392,8 @@ interface UpdateAuthSettingsRequest {
|
|
|
1390
1392
|
password_require_special?: boolean;
|
|
1391
1393
|
session_timeout_minutes?: number;
|
|
1392
1394
|
max_sessions_per_user?: number;
|
|
1395
|
+
disable_dashboard_password_login?: boolean;
|
|
1396
|
+
disable_app_password_login?: boolean;
|
|
1393
1397
|
}
|
|
1394
1398
|
/**
|
|
1395
1399
|
* Response after updating authentication settings
|
|
@@ -1483,7 +1487,7 @@ interface ListTablesResponse {
|
|
|
1483
1487
|
/**
|
|
1484
1488
|
* Impersonation type
|
|
1485
1489
|
*/
|
|
1486
|
-
type ImpersonationType =
|
|
1490
|
+
type ImpersonationType = "user" | "anon" | "service";
|
|
1487
1491
|
/**
|
|
1488
1492
|
* Target user information for impersonation
|
|
1489
1493
|
*/
|
|
@@ -1577,11 +1581,11 @@ interface ListImpersonationSessionsResponse {
|
|
|
1577
1581
|
* - inside: Resize to fit within target, only scale down
|
|
1578
1582
|
* - outside: Resize to be at least as large as target
|
|
1579
1583
|
*/
|
|
1580
|
-
type ImageFitMode =
|
|
1584
|
+
type ImageFitMode = "cover" | "contain" | "fill" | "inside" | "outside";
|
|
1581
1585
|
/**
|
|
1582
1586
|
* Output format for image transformations
|
|
1583
1587
|
*/
|
|
1584
|
-
type ImageFormat =
|
|
1588
|
+
type ImageFormat = "webp" | "jpg" | "png" | "avif";
|
|
1585
1589
|
/**
|
|
1586
1590
|
* Options for on-the-fly image transformations
|
|
1587
1591
|
* Applied to storage downloads via query parameters
|
|
@@ -1605,7 +1609,7 @@ interface TransformOptions {
|
|
|
1605
1609
|
* - turnstile: Cloudflare's invisible CAPTCHA
|
|
1606
1610
|
* - cap: Self-hosted proof-of-work CAPTCHA (https://capjs.js.org/)
|
|
1607
1611
|
*/
|
|
1608
|
-
type CaptchaProvider =
|
|
1612
|
+
type CaptchaProvider = "hcaptcha" | "recaptcha_v3" | "turnstile" | "cap";
|
|
1609
1613
|
/**
|
|
1610
1614
|
* Public CAPTCHA configuration returned from the server
|
|
1611
1615
|
* Used by clients to know which CAPTCHA provider to load
|
|
@@ -1692,7 +1696,7 @@ interface AuthConfig {
|
|
|
1692
1696
|
/**
|
|
1693
1697
|
* Auth state change events
|
|
1694
1698
|
*/
|
|
1695
|
-
type AuthChangeEvent =
|
|
1699
|
+
type AuthChangeEvent = "SIGNED_IN" | "SIGNED_OUT" | "TOKEN_REFRESHED" | "USER_UPDATED" | "PASSWORD_RECOVERY" | "MFA_CHALLENGE_VERIFIED";
|
|
1696
1700
|
/**
|
|
1697
1701
|
* Callback for auth state changes
|
|
1698
1702
|
*/
|
|
@@ -1722,7 +1726,7 @@ interface FunctionInvokeOptions {
|
|
|
1722
1726
|
* HTTP method to use
|
|
1723
1727
|
* @default 'POST'
|
|
1724
1728
|
*/
|
|
1725
|
-
method?:
|
|
1729
|
+
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
1726
1730
|
/**
|
|
1727
1731
|
* Namespace of the function to invoke
|
|
1728
1732
|
* If not provided, the first function with the given name is used (alphabetically by namespace)
|
|
@@ -1792,7 +1796,7 @@ interface EdgeFunctionExecution {
|
|
|
1792
1796
|
id: string;
|
|
1793
1797
|
function_id: string;
|
|
1794
1798
|
trigger_type: string;
|
|
1795
|
-
status:
|
|
1799
|
+
status: "success" | "error";
|
|
1796
1800
|
status_code?: number;
|
|
1797
1801
|
duration_ms?: number;
|
|
1798
1802
|
result?: string;
|
|
@@ -1852,7 +1856,7 @@ interface SyncError {
|
|
|
1852
1856
|
/** Error message */
|
|
1853
1857
|
error: string;
|
|
1854
1858
|
/** Operation that failed */
|
|
1855
|
-
action:
|
|
1859
|
+
action: "create" | "update" | "delete" | "bundle";
|
|
1856
1860
|
}
|
|
1857
1861
|
/**
|
|
1858
1862
|
* Result of a function sync operation
|
|
@@ -1951,7 +1955,7 @@ interface UpdateJobFunctionRequest {
|
|
|
1951
1955
|
/**
|
|
1952
1956
|
* Job execution status
|
|
1953
1957
|
*/
|
|
1954
|
-
type JobStatus =
|
|
1958
|
+
type JobStatus = "pending" | "running" | "completed" | "failed" | "cancelled" | "timeout";
|
|
1955
1959
|
/**
|
|
1956
1960
|
* Job execution record
|
|
1957
1961
|
*/
|
|
@@ -2017,7 +2021,7 @@ interface JobStats {
|
|
|
2017
2021
|
interface JobWorker {
|
|
2018
2022
|
id: string;
|
|
2019
2023
|
hostname: string;
|
|
2020
|
-
status:
|
|
2024
|
+
status: "active" | "idle" | "dead";
|
|
2021
2025
|
current_jobs: number;
|
|
2022
2026
|
total_completed: number;
|
|
2023
2027
|
started_at: string;
|
|
@@ -2094,7 +2098,7 @@ interface Migration {
|
|
|
2094
2098
|
up_sql: string;
|
|
2095
2099
|
down_sql?: string;
|
|
2096
2100
|
version: number;
|
|
2097
|
-
status:
|
|
2101
|
+
status: "pending" | "applied" | "failed" | "rolled_back";
|
|
2098
2102
|
created_by?: string;
|
|
2099
2103
|
applied_by?: string;
|
|
2100
2104
|
created_at: string;
|
|
@@ -2126,8 +2130,8 @@ interface UpdateMigrationRequest {
|
|
|
2126
2130
|
interface MigrationExecution {
|
|
2127
2131
|
id: string;
|
|
2128
2132
|
migration_id: string;
|
|
2129
|
-
action:
|
|
2130
|
-
status:
|
|
2133
|
+
action: "apply" | "rollback";
|
|
2134
|
+
status: "success" | "failed";
|
|
2131
2135
|
duration_ms?: number;
|
|
2132
2136
|
error_message?: string;
|
|
2133
2137
|
logs?: string;
|
|
@@ -2197,7 +2201,7 @@ interface SyncMigrationsResult {
|
|
|
2197
2201
|
/**
|
|
2198
2202
|
* AI provider type
|
|
2199
2203
|
*/
|
|
2200
|
-
type AIProviderType =
|
|
2204
|
+
type AIProviderType = "openai" | "azure" | "ollama";
|
|
2201
2205
|
/**
|
|
2202
2206
|
* AI provider configuration
|
|
2203
2207
|
*/
|
|
@@ -2332,12 +2336,12 @@ interface SyncChatbotsResult {
|
|
|
2332
2336
|
/**
|
|
2333
2337
|
* AI chat message role
|
|
2334
2338
|
*/
|
|
2335
|
-
type AIChatMessageRole =
|
|
2339
|
+
type AIChatMessageRole = "user" | "assistant" | "system" | "tool";
|
|
2336
2340
|
/**
|
|
2337
2341
|
* AI chat message for WebSocket
|
|
2338
2342
|
*/
|
|
2339
2343
|
interface AIChatClientMessage {
|
|
2340
|
-
type:
|
|
2344
|
+
type: "start_chat" | "message" | "cancel";
|
|
2341
2345
|
chatbot?: string;
|
|
2342
2346
|
namespace?: string;
|
|
2343
2347
|
conversation_id?: string;
|
|
@@ -2348,7 +2352,7 @@ interface AIChatClientMessage {
|
|
|
2348
2352
|
* AI chat server message
|
|
2349
2353
|
*/
|
|
2350
2354
|
interface AIChatServerMessage {
|
|
2351
|
-
type:
|
|
2355
|
+
type: "chat_started" | "progress" | "content" | "query_result" | "done" | "error" | "cancelled";
|
|
2352
2356
|
conversation_id?: string;
|
|
2353
2357
|
message_id?: string;
|
|
2354
2358
|
chatbot?: string;
|
|
@@ -2380,7 +2384,7 @@ interface AIConversation {
|
|
|
2380
2384
|
user_id?: string;
|
|
2381
2385
|
session_id?: string;
|
|
2382
2386
|
title?: string;
|
|
2383
|
-
status:
|
|
2387
|
+
status: "active" | "archived";
|
|
2384
2388
|
turn_count: number;
|
|
2385
2389
|
total_prompt_tokens: number;
|
|
2386
2390
|
total_completion_tokens: number;
|
|
@@ -2444,7 +2448,7 @@ interface AIUserUsageStats {
|
|
|
2444
2448
|
*/
|
|
2445
2449
|
interface AIUserMessage {
|
|
2446
2450
|
id: string;
|
|
2447
|
-
role:
|
|
2451
|
+
role: "user" | "assistant";
|
|
2448
2452
|
content: string;
|
|
2449
2453
|
timestamp: string;
|
|
2450
2454
|
query_results?: AIUserQueryResult[];
|
|
@@ -2545,7 +2549,7 @@ interface UpdateKnowledgeBaseRequest {
|
|
|
2545
2549
|
/**
|
|
2546
2550
|
* Document status
|
|
2547
2551
|
*/
|
|
2548
|
-
type DocumentStatus =
|
|
2552
|
+
type DocumentStatus = "pending" | "processing" | "indexed" | "failed";
|
|
2549
2553
|
/**
|
|
2550
2554
|
* Document in a knowledge base
|
|
2551
2555
|
*/
|
|
@@ -2796,7 +2800,7 @@ interface RPCProcedure extends RPCProcedureSummary {
|
|
|
2796
2800
|
/**
|
|
2797
2801
|
* RPC execution status
|
|
2798
2802
|
*/
|
|
2799
|
-
type RPCExecutionStatus =
|
|
2803
|
+
type RPCExecutionStatus = "pending" | "running" | "completed" | "failed" | "cancelled" | "timeout";
|
|
2800
2804
|
/**
|
|
2801
2805
|
* RPC execution record
|
|
2802
2806
|
*/
|
|
@@ -2928,7 +2932,7 @@ interface RPCExecutionFilters {
|
|
|
2928
2932
|
* - cosine: Cosine distance - lower is more similar (1 - cosine similarity)
|
|
2929
2933
|
* - inner_product: Negative inner product - lower is more similar
|
|
2930
2934
|
*/
|
|
2931
|
-
type VectorMetric =
|
|
2935
|
+
type VectorMetric = "l2" | "cosine" | "inner_product";
|
|
2932
2936
|
/**
|
|
2933
2937
|
* Options for vector similarity ordering
|
|
2934
2938
|
*/
|
|
@@ -3002,11 +3006,11 @@ interface VectorSearchResult<T = Record<string, unknown>> {
|
|
|
3002
3006
|
/**
|
|
3003
3007
|
* Log level for execution logs
|
|
3004
3008
|
*/
|
|
3005
|
-
type ExecutionLogLevel =
|
|
3009
|
+
type ExecutionLogLevel = "debug" | "info" | "warn" | "error";
|
|
3006
3010
|
/**
|
|
3007
3011
|
* Execution type for log subscriptions
|
|
3008
3012
|
*/
|
|
3009
|
-
type ExecutionType =
|
|
3013
|
+
type ExecutionType = "function" | "job" | "rpc";
|
|
3010
3014
|
/**
|
|
3011
3015
|
* Execution log event received from realtime subscription
|
|
3012
3016
|
*/
|
|
@@ -3042,15 +3046,15 @@ interface ExecutionLogConfig {
|
|
|
3042
3046
|
/**
|
|
3043
3047
|
* Branch status
|
|
3044
3048
|
*/
|
|
3045
|
-
type BranchStatus =
|
|
3049
|
+
type BranchStatus = "creating" | "ready" | "migrating" | "error" | "deleting" | "deleted";
|
|
3046
3050
|
/**
|
|
3047
3051
|
* Branch type
|
|
3048
3052
|
*/
|
|
3049
|
-
type BranchType =
|
|
3053
|
+
type BranchType = "main" | "preview" | "persistent";
|
|
3050
3054
|
/**
|
|
3051
3055
|
* Data clone mode when creating a branch
|
|
3052
3056
|
*/
|
|
3053
|
-
type DataCloneMode =
|
|
3057
|
+
type DataCloneMode = "schema_only" | "full_clone" | "seed_data";
|
|
3054
3058
|
/**
|
|
3055
3059
|
* Database branch information
|
|
3056
3060
|
*/
|
|
@@ -3144,7 +3148,7 @@ interface BranchActivity {
|
|
|
3144
3148
|
/** Action performed */
|
|
3145
3149
|
action: string;
|
|
3146
3150
|
/** Activity status */
|
|
3147
|
-
status:
|
|
3151
|
+
status: "success" | "failed" | "pending";
|
|
3148
3152
|
/** Additional details */
|
|
3149
3153
|
details?: Record<string, unknown>;
|
|
3150
3154
|
/** User who performed the action */
|
package/dist/index.d.ts
CHANGED
|
@@ -96,8 +96,8 @@ interface AuthResponse {
|
|
|
96
96
|
*/
|
|
97
97
|
interface Factor {
|
|
98
98
|
id: string;
|
|
99
|
-
type:
|
|
100
|
-
status:
|
|
99
|
+
type: "totp" | "phone";
|
|
100
|
+
status: "verified" | "unverified";
|
|
101
101
|
created_at: string;
|
|
102
102
|
updated_at: string;
|
|
103
103
|
friendly_name?: string;
|
|
@@ -115,7 +115,7 @@ interface TOTPSetup {
|
|
|
115
115
|
*/
|
|
116
116
|
interface TwoFactorSetupResponse {
|
|
117
117
|
id: string;
|
|
118
|
-
type:
|
|
118
|
+
type: "totp";
|
|
119
119
|
totp: TOTPSetup;
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
@@ -163,7 +163,7 @@ interface FluxbaseError extends Error {
|
|
|
163
163
|
code?: string;
|
|
164
164
|
details?: unknown;
|
|
165
165
|
}
|
|
166
|
-
type HttpMethod =
|
|
166
|
+
type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD";
|
|
167
167
|
interface RequestOptions {
|
|
168
168
|
method: HttpMethod;
|
|
169
169
|
headers?: Record<string, string>;
|
|
@@ -189,7 +189,7 @@ interface PostgrestResponse<T> {
|
|
|
189
189
|
* - 'planned': Uses PostgreSQL's query planner estimate (faster, less accurate)
|
|
190
190
|
* - 'estimated': Uses statistics-based estimate (fastest, least accurate)
|
|
191
191
|
*/
|
|
192
|
-
type CountType =
|
|
192
|
+
type CountType = "exact" | "planned" | "estimated";
|
|
193
193
|
/**
|
|
194
194
|
* Options for select queries (Supabase-compatible)
|
|
195
195
|
*/
|
|
@@ -205,19 +205,19 @@ interface SelectOptions {
|
|
|
205
205
|
*/
|
|
206
206
|
head?: boolean;
|
|
207
207
|
}
|
|
208
|
-
type FilterOperator =
|
|
208
|
+
type FilterOperator = "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "like" | "ilike" | "is" | "in" | "cs" | "cd" | "ov" | "sl" | "sr" | "nxr" | "nxl" | "adj" | "not" | "fts" | "plfts" | "wfts" | "st_intersects" | "st_contains" | "st_within" | "st_dwithin" | "st_distance" | "st_touches" | "st_crosses" | "st_overlaps" | "between" | "not.between" | "vec_l2" | "vec_cos" | "vec_ip";
|
|
209
209
|
interface QueryFilter {
|
|
210
210
|
column: string;
|
|
211
211
|
operator: FilterOperator;
|
|
212
212
|
value: unknown;
|
|
213
213
|
}
|
|
214
|
-
type OrderDirection =
|
|
214
|
+
type OrderDirection = "asc" | "desc";
|
|
215
215
|
interface OrderBy {
|
|
216
216
|
column: string;
|
|
217
217
|
direction: OrderDirection;
|
|
218
|
-
nulls?:
|
|
218
|
+
nulls?: "first" | "last";
|
|
219
219
|
/** Vector operator for similarity ordering (vec_l2, vec_cos, vec_ip) */
|
|
220
|
-
vectorOp?:
|
|
220
|
+
vectorOp?: "vec_l2" | "vec_cos" | "vec_ip";
|
|
221
221
|
/** Vector value for similarity ordering */
|
|
222
222
|
vectorValue?: number[];
|
|
223
223
|
}
|
|
@@ -243,7 +243,7 @@ interface UpsertOptions {
|
|
|
243
243
|
defaultToNull?: boolean;
|
|
244
244
|
}
|
|
245
245
|
interface RealtimeMessage {
|
|
246
|
-
type:
|
|
246
|
+
type: "subscribe" | "unsubscribe" | "heartbeat" | "broadcast" | "presence" | "ack" | "error" | "postgres_changes" | "access_token";
|
|
247
247
|
channel?: string;
|
|
248
248
|
event?: string;
|
|
249
249
|
schema?: string;
|
|
@@ -260,7 +260,7 @@ interface RealtimeMessage {
|
|
|
260
260
|
token?: string;
|
|
261
261
|
}
|
|
262
262
|
interface PostgresChangesConfig {
|
|
263
|
-
event:
|
|
263
|
+
event: "INSERT" | "UPDATE" | "DELETE" | "*";
|
|
264
264
|
schema: string;
|
|
265
265
|
table: string;
|
|
266
266
|
filter?: string;
|
|
@@ -271,7 +271,7 @@ interface PostgresChangesConfig {
|
|
|
271
271
|
*/
|
|
272
272
|
interface RealtimePostgresChangesPayload<T = unknown> {
|
|
273
273
|
/** Event type (Supabase-compatible field name) */
|
|
274
|
-
eventType:
|
|
274
|
+
eventType: "INSERT" | "UPDATE" | "DELETE" | "*";
|
|
275
275
|
/** Database schema */
|
|
276
276
|
schema: string;
|
|
277
277
|
/** Table name */
|
|
@@ -290,7 +290,7 @@ interface RealtimePostgresChangesPayload<T = unknown> {
|
|
|
290
290
|
*/
|
|
291
291
|
interface RealtimeChangePayload {
|
|
292
292
|
/** @deprecated Use eventType instead */
|
|
293
|
-
type:
|
|
293
|
+
type: "INSERT" | "UPDATE" | "DELETE";
|
|
294
294
|
schema: string;
|
|
295
295
|
table: string;
|
|
296
296
|
/** @deprecated Use 'new' instead */
|
|
@@ -324,7 +324,7 @@ interface PresenceState {
|
|
|
324
324
|
* Realtime presence payload structure
|
|
325
325
|
*/
|
|
326
326
|
interface RealtimePresencePayload {
|
|
327
|
-
event:
|
|
327
|
+
event: "sync" | "join" | "leave";
|
|
328
328
|
key?: string;
|
|
329
329
|
newPresences?: PresenceState[];
|
|
330
330
|
leftPresences?: PresenceState[];
|
|
@@ -338,7 +338,7 @@ type PresenceCallback = (payload: RealtimePresencePayload) => void;
|
|
|
338
338
|
* Broadcast message structure
|
|
339
339
|
*/
|
|
340
340
|
interface BroadcastMessage {
|
|
341
|
-
type:
|
|
341
|
+
type: "broadcast";
|
|
342
342
|
event: string;
|
|
343
343
|
payload: unknown;
|
|
344
344
|
}
|
|
@@ -556,7 +556,7 @@ interface ChunkedUploadSession {
|
|
|
556
556
|
/** Array of completed chunk indices (0-indexed) */
|
|
557
557
|
completedChunks: number[];
|
|
558
558
|
/** Session status */
|
|
559
|
-
status:
|
|
559
|
+
status: "active" | "completing" | "completed" | "aborted" | "expired";
|
|
560
560
|
/** Session expiration time */
|
|
561
561
|
expiresAt: string;
|
|
562
562
|
/** Session creation time */
|
|
@@ -564,11 +564,11 @@ interface ChunkedUploadSession {
|
|
|
564
564
|
}
|
|
565
565
|
interface ShareFileOptions {
|
|
566
566
|
userId: string;
|
|
567
|
-
permission:
|
|
567
|
+
permission: "read" | "write";
|
|
568
568
|
}
|
|
569
569
|
interface FileShare {
|
|
570
570
|
user_id: string;
|
|
571
|
-
permission:
|
|
571
|
+
permission: "read" | "write";
|
|
572
572
|
created_at: string;
|
|
573
573
|
}
|
|
574
574
|
interface BucketSettings {
|
|
@@ -699,7 +699,7 @@ interface SAMLSession {
|
|
|
699
699
|
/** Session creation time */
|
|
700
700
|
created_at: string;
|
|
701
701
|
}
|
|
702
|
-
type OTPType =
|
|
702
|
+
type OTPType = "signup" | "invite" | "magiclink" | "recovery" | "email_change" | "sms" | "phone_change" | "email";
|
|
703
703
|
interface SignInWithOtpCredentials {
|
|
704
704
|
email?: string;
|
|
705
705
|
phone?: string;
|
|
@@ -721,7 +721,7 @@ interface VerifyOtpParams {
|
|
|
721
721
|
};
|
|
722
722
|
}
|
|
723
723
|
interface ResendOtpParams {
|
|
724
|
-
type:
|
|
724
|
+
type: "signup" | "sms" | "email";
|
|
725
725
|
email?: string;
|
|
726
726
|
phone?: string;
|
|
727
727
|
options?: {
|
|
@@ -755,7 +755,7 @@ interface ReauthenticateResponse {
|
|
|
755
755
|
nonce: string;
|
|
756
756
|
}
|
|
757
757
|
interface SignInWithIdTokenCredentials {
|
|
758
|
-
provider:
|
|
758
|
+
provider: "google" | "apple";
|
|
759
759
|
token: string;
|
|
760
760
|
nonce?: string;
|
|
761
761
|
options?: {
|
|
@@ -828,7 +828,7 @@ interface ListUsersOptions {
|
|
|
828
828
|
exclude_admins?: boolean;
|
|
829
829
|
search?: string;
|
|
830
830
|
limit?: number;
|
|
831
|
-
type?:
|
|
831
|
+
type?: "app" | "dashboard";
|
|
832
832
|
}
|
|
833
833
|
interface InviteUserRequest {
|
|
834
834
|
email: string;
|
|
@@ -967,7 +967,7 @@ interface Invitation {
|
|
|
967
967
|
}
|
|
968
968
|
interface CreateInvitationRequest {
|
|
969
969
|
email: string;
|
|
970
|
-
role:
|
|
970
|
+
role: "dashboard_admin" | "dashboard_user";
|
|
971
971
|
expiry_duration?: number;
|
|
972
972
|
}
|
|
973
973
|
interface CreateInvitationResponse {
|
|
@@ -1043,7 +1043,7 @@ interface CustomSetting {
|
|
|
1043
1043
|
id: string;
|
|
1044
1044
|
key: string;
|
|
1045
1045
|
value: Record<string, unknown>;
|
|
1046
|
-
value_type:
|
|
1046
|
+
value_type: "string" | "number" | "boolean" | "json";
|
|
1047
1047
|
description?: string;
|
|
1048
1048
|
editable_by: string[];
|
|
1049
1049
|
metadata?: Record<string, unknown>;
|
|
@@ -1129,7 +1129,7 @@ interface SESSettings {
|
|
|
1129
1129
|
*/
|
|
1130
1130
|
interface EmailSettings {
|
|
1131
1131
|
enabled: boolean;
|
|
1132
|
-
provider:
|
|
1132
|
+
provider: "smtp" | "sendgrid" | "mailgun" | "ses";
|
|
1133
1133
|
from_address?: string;
|
|
1134
1134
|
from_name?: string;
|
|
1135
1135
|
reply_to_address?: string;
|
|
@@ -1177,7 +1177,7 @@ interface UpdateAppSettingsRequest {
|
|
|
1177
1177
|
/**
|
|
1178
1178
|
* Email template type
|
|
1179
1179
|
*/
|
|
1180
|
-
type EmailTemplateType =
|
|
1180
|
+
type EmailTemplateType = "magic_link" | "verify_email" | "reset_password" | "invite_user";
|
|
1181
1181
|
/**
|
|
1182
1182
|
* Email template structure
|
|
1183
1183
|
*/
|
|
@@ -1226,7 +1226,7 @@ interface EmailSettingOverride {
|
|
|
1226
1226
|
*/
|
|
1227
1227
|
interface EmailProviderSettings {
|
|
1228
1228
|
enabled: boolean;
|
|
1229
|
-
provider:
|
|
1229
|
+
provider: "smtp" | "sendgrid" | "mailgun" | "ses";
|
|
1230
1230
|
from_address: string;
|
|
1231
1231
|
from_name: string;
|
|
1232
1232
|
smtp_host: string;
|
|
@@ -1251,7 +1251,7 @@ interface EmailProviderSettings {
|
|
|
1251
1251
|
*/
|
|
1252
1252
|
interface UpdateEmailProviderSettingsRequest {
|
|
1253
1253
|
enabled?: boolean;
|
|
1254
|
-
provider?:
|
|
1254
|
+
provider?: "smtp" | "sendgrid" | "mailgun" | "ses";
|
|
1255
1255
|
from_address?: string;
|
|
1256
1256
|
from_name?: string;
|
|
1257
1257
|
smtp_host?: string;
|
|
@@ -1373,6 +1373,8 @@ interface AuthSettings {
|
|
|
1373
1373
|
password_require_special: boolean;
|
|
1374
1374
|
session_timeout_minutes: number;
|
|
1375
1375
|
max_sessions_per_user: number;
|
|
1376
|
+
disable_dashboard_password_login: boolean;
|
|
1377
|
+
disable_app_password_login: boolean;
|
|
1376
1378
|
/** Settings overridden by environment variables (read-only, cannot be modified via API) */
|
|
1377
1379
|
_overrides?: Record<string, SettingOverride>;
|
|
1378
1380
|
}
|
|
@@ -1390,6 +1392,8 @@ interface UpdateAuthSettingsRequest {
|
|
|
1390
1392
|
password_require_special?: boolean;
|
|
1391
1393
|
session_timeout_minutes?: number;
|
|
1392
1394
|
max_sessions_per_user?: number;
|
|
1395
|
+
disable_dashboard_password_login?: boolean;
|
|
1396
|
+
disable_app_password_login?: boolean;
|
|
1393
1397
|
}
|
|
1394
1398
|
/**
|
|
1395
1399
|
* Response after updating authentication settings
|
|
@@ -1483,7 +1487,7 @@ interface ListTablesResponse {
|
|
|
1483
1487
|
/**
|
|
1484
1488
|
* Impersonation type
|
|
1485
1489
|
*/
|
|
1486
|
-
type ImpersonationType =
|
|
1490
|
+
type ImpersonationType = "user" | "anon" | "service";
|
|
1487
1491
|
/**
|
|
1488
1492
|
* Target user information for impersonation
|
|
1489
1493
|
*/
|
|
@@ -1577,11 +1581,11 @@ interface ListImpersonationSessionsResponse {
|
|
|
1577
1581
|
* - inside: Resize to fit within target, only scale down
|
|
1578
1582
|
* - outside: Resize to be at least as large as target
|
|
1579
1583
|
*/
|
|
1580
|
-
type ImageFitMode =
|
|
1584
|
+
type ImageFitMode = "cover" | "contain" | "fill" | "inside" | "outside";
|
|
1581
1585
|
/**
|
|
1582
1586
|
* Output format for image transformations
|
|
1583
1587
|
*/
|
|
1584
|
-
type ImageFormat =
|
|
1588
|
+
type ImageFormat = "webp" | "jpg" | "png" | "avif";
|
|
1585
1589
|
/**
|
|
1586
1590
|
* Options for on-the-fly image transformations
|
|
1587
1591
|
* Applied to storage downloads via query parameters
|
|
@@ -1605,7 +1609,7 @@ interface TransformOptions {
|
|
|
1605
1609
|
* - turnstile: Cloudflare's invisible CAPTCHA
|
|
1606
1610
|
* - cap: Self-hosted proof-of-work CAPTCHA (https://capjs.js.org/)
|
|
1607
1611
|
*/
|
|
1608
|
-
type CaptchaProvider =
|
|
1612
|
+
type CaptchaProvider = "hcaptcha" | "recaptcha_v3" | "turnstile" | "cap";
|
|
1609
1613
|
/**
|
|
1610
1614
|
* Public CAPTCHA configuration returned from the server
|
|
1611
1615
|
* Used by clients to know which CAPTCHA provider to load
|
|
@@ -1692,7 +1696,7 @@ interface AuthConfig {
|
|
|
1692
1696
|
/**
|
|
1693
1697
|
* Auth state change events
|
|
1694
1698
|
*/
|
|
1695
|
-
type AuthChangeEvent =
|
|
1699
|
+
type AuthChangeEvent = "SIGNED_IN" | "SIGNED_OUT" | "TOKEN_REFRESHED" | "USER_UPDATED" | "PASSWORD_RECOVERY" | "MFA_CHALLENGE_VERIFIED";
|
|
1696
1700
|
/**
|
|
1697
1701
|
* Callback for auth state changes
|
|
1698
1702
|
*/
|
|
@@ -1722,7 +1726,7 @@ interface FunctionInvokeOptions {
|
|
|
1722
1726
|
* HTTP method to use
|
|
1723
1727
|
* @default 'POST'
|
|
1724
1728
|
*/
|
|
1725
|
-
method?:
|
|
1729
|
+
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
1726
1730
|
/**
|
|
1727
1731
|
* Namespace of the function to invoke
|
|
1728
1732
|
* If not provided, the first function with the given name is used (alphabetically by namespace)
|
|
@@ -1792,7 +1796,7 @@ interface EdgeFunctionExecution {
|
|
|
1792
1796
|
id: string;
|
|
1793
1797
|
function_id: string;
|
|
1794
1798
|
trigger_type: string;
|
|
1795
|
-
status:
|
|
1799
|
+
status: "success" | "error";
|
|
1796
1800
|
status_code?: number;
|
|
1797
1801
|
duration_ms?: number;
|
|
1798
1802
|
result?: string;
|
|
@@ -1852,7 +1856,7 @@ interface SyncError {
|
|
|
1852
1856
|
/** Error message */
|
|
1853
1857
|
error: string;
|
|
1854
1858
|
/** Operation that failed */
|
|
1855
|
-
action:
|
|
1859
|
+
action: "create" | "update" | "delete" | "bundle";
|
|
1856
1860
|
}
|
|
1857
1861
|
/**
|
|
1858
1862
|
* Result of a function sync operation
|
|
@@ -1951,7 +1955,7 @@ interface UpdateJobFunctionRequest {
|
|
|
1951
1955
|
/**
|
|
1952
1956
|
* Job execution status
|
|
1953
1957
|
*/
|
|
1954
|
-
type JobStatus =
|
|
1958
|
+
type JobStatus = "pending" | "running" | "completed" | "failed" | "cancelled" | "timeout";
|
|
1955
1959
|
/**
|
|
1956
1960
|
* Job execution record
|
|
1957
1961
|
*/
|
|
@@ -2017,7 +2021,7 @@ interface JobStats {
|
|
|
2017
2021
|
interface JobWorker {
|
|
2018
2022
|
id: string;
|
|
2019
2023
|
hostname: string;
|
|
2020
|
-
status:
|
|
2024
|
+
status: "active" | "idle" | "dead";
|
|
2021
2025
|
current_jobs: number;
|
|
2022
2026
|
total_completed: number;
|
|
2023
2027
|
started_at: string;
|
|
@@ -2094,7 +2098,7 @@ interface Migration {
|
|
|
2094
2098
|
up_sql: string;
|
|
2095
2099
|
down_sql?: string;
|
|
2096
2100
|
version: number;
|
|
2097
|
-
status:
|
|
2101
|
+
status: "pending" | "applied" | "failed" | "rolled_back";
|
|
2098
2102
|
created_by?: string;
|
|
2099
2103
|
applied_by?: string;
|
|
2100
2104
|
created_at: string;
|
|
@@ -2126,8 +2130,8 @@ interface UpdateMigrationRequest {
|
|
|
2126
2130
|
interface MigrationExecution {
|
|
2127
2131
|
id: string;
|
|
2128
2132
|
migration_id: string;
|
|
2129
|
-
action:
|
|
2130
|
-
status:
|
|
2133
|
+
action: "apply" | "rollback";
|
|
2134
|
+
status: "success" | "failed";
|
|
2131
2135
|
duration_ms?: number;
|
|
2132
2136
|
error_message?: string;
|
|
2133
2137
|
logs?: string;
|
|
@@ -2197,7 +2201,7 @@ interface SyncMigrationsResult {
|
|
|
2197
2201
|
/**
|
|
2198
2202
|
* AI provider type
|
|
2199
2203
|
*/
|
|
2200
|
-
type AIProviderType =
|
|
2204
|
+
type AIProviderType = "openai" | "azure" | "ollama";
|
|
2201
2205
|
/**
|
|
2202
2206
|
* AI provider configuration
|
|
2203
2207
|
*/
|
|
@@ -2332,12 +2336,12 @@ interface SyncChatbotsResult {
|
|
|
2332
2336
|
/**
|
|
2333
2337
|
* AI chat message role
|
|
2334
2338
|
*/
|
|
2335
|
-
type AIChatMessageRole =
|
|
2339
|
+
type AIChatMessageRole = "user" | "assistant" | "system" | "tool";
|
|
2336
2340
|
/**
|
|
2337
2341
|
* AI chat message for WebSocket
|
|
2338
2342
|
*/
|
|
2339
2343
|
interface AIChatClientMessage {
|
|
2340
|
-
type:
|
|
2344
|
+
type: "start_chat" | "message" | "cancel";
|
|
2341
2345
|
chatbot?: string;
|
|
2342
2346
|
namespace?: string;
|
|
2343
2347
|
conversation_id?: string;
|
|
@@ -2348,7 +2352,7 @@ interface AIChatClientMessage {
|
|
|
2348
2352
|
* AI chat server message
|
|
2349
2353
|
*/
|
|
2350
2354
|
interface AIChatServerMessage {
|
|
2351
|
-
type:
|
|
2355
|
+
type: "chat_started" | "progress" | "content" | "query_result" | "done" | "error" | "cancelled";
|
|
2352
2356
|
conversation_id?: string;
|
|
2353
2357
|
message_id?: string;
|
|
2354
2358
|
chatbot?: string;
|
|
@@ -2380,7 +2384,7 @@ interface AIConversation {
|
|
|
2380
2384
|
user_id?: string;
|
|
2381
2385
|
session_id?: string;
|
|
2382
2386
|
title?: string;
|
|
2383
|
-
status:
|
|
2387
|
+
status: "active" | "archived";
|
|
2384
2388
|
turn_count: number;
|
|
2385
2389
|
total_prompt_tokens: number;
|
|
2386
2390
|
total_completion_tokens: number;
|
|
@@ -2444,7 +2448,7 @@ interface AIUserUsageStats {
|
|
|
2444
2448
|
*/
|
|
2445
2449
|
interface AIUserMessage {
|
|
2446
2450
|
id: string;
|
|
2447
|
-
role:
|
|
2451
|
+
role: "user" | "assistant";
|
|
2448
2452
|
content: string;
|
|
2449
2453
|
timestamp: string;
|
|
2450
2454
|
query_results?: AIUserQueryResult[];
|
|
@@ -2545,7 +2549,7 @@ interface UpdateKnowledgeBaseRequest {
|
|
|
2545
2549
|
/**
|
|
2546
2550
|
* Document status
|
|
2547
2551
|
*/
|
|
2548
|
-
type DocumentStatus =
|
|
2552
|
+
type DocumentStatus = "pending" | "processing" | "indexed" | "failed";
|
|
2549
2553
|
/**
|
|
2550
2554
|
* Document in a knowledge base
|
|
2551
2555
|
*/
|
|
@@ -2796,7 +2800,7 @@ interface RPCProcedure extends RPCProcedureSummary {
|
|
|
2796
2800
|
/**
|
|
2797
2801
|
* RPC execution status
|
|
2798
2802
|
*/
|
|
2799
|
-
type RPCExecutionStatus =
|
|
2803
|
+
type RPCExecutionStatus = "pending" | "running" | "completed" | "failed" | "cancelled" | "timeout";
|
|
2800
2804
|
/**
|
|
2801
2805
|
* RPC execution record
|
|
2802
2806
|
*/
|
|
@@ -2928,7 +2932,7 @@ interface RPCExecutionFilters {
|
|
|
2928
2932
|
* - cosine: Cosine distance - lower is more similar (1 - cosine similarity)
|
|
2929
2933
|
* - inner_product: Negative inner product - lower is more similar
|
|
2930
2934
|
*/
|
|
2931
|
-
type VectorMetric =
|
|
2935
|
+
type VectorMetric = "l2" | "cosine" | "inner_product";
|
|
2932
2936
|
/**
|
|
2933
2937
|
* Options for vector similarity ordering
|
|
2934
2938
|
*/
|
|
@@ -3002,11 +3006,11 @@ interface VectorSearchResult<T = Record<string, unknown>> {
|
|
|
3002
3006
|
/**
|
|
3003
3007
|
* Log level for execution logs
|
|
3004
3008
|
*/
|
|
3005
|
-
type ExecutionLogLevel =
|
|
3009
|
+
type ExecutionLogLevel = "debug" | "info" | "warn" | "error";
|
|
3006
3010
|
/**
|
|
3007
3011
|
* Execution type for log subscriptions
|
|
3008
3012
|
*/
|
|
3009
|
-
type ExecutionType =
|
|
3013
|
+
type ExecutionType = "function" | "job" | "rpc";
|
|
3010
3014
|
/**
|
|
3011
3015
|
* Execution log event received from realtime subscription
|
|
3012
3016
|
*/
|
|
@@ -3042,15 +3046,15 @@ interface ExecutionLogConfig {
|
|
|
3042
3046
|
/**
|
|
3043
3047
|
* Branch status
|
|
3044
3048
|
*/
|
|
3045
|
-
type BranchStatus =
|
|
3049
|
+
type BranchStatus = "creating" | "ready" | "migrating" | "error" | "deleting" | "deleted";
|
|
3046
3050
|
/**
|
|
3047
3051
|
* Branch type
|
|
3048
3052
|
*/
|
|
3049
|
-
type BranchType =
|
|
3053
|
+
type BranchType = "main" | "preview" | "persistent";
|
|
3050
3054
|
/**
|
|
3051
3055
|
* Data clone mode when creating a branch
|
|
3052
3056
|
*/
|
|
3053
|
-
type DataCloneMode =
|
|
3057
|
+
type DataCloneMode = "schema_only" | "full_clone" | "seed_data";
|
|
3054
3058
|
/**
|
|
3055
3059
|
* Database branch information
|
|
3056
3060
|
*/
|
|
@@ -3144,7 +3148,7 @@ interface BranchActivity {
|
|
|
3144
3148
|
/** Action performed */
|
|
3145
3149
|
action: string;
|
|
3146
3150
|
/** Activity status */
|
|
3147
|
-
status:
|
|
3151
|
+
status: "success" | "failed" | "pending";
|
|
3148
3152
|
/** Additional details */
|
|
3149
3153
|
details?: Record<string, unknown>;
|
|
3150
3154
|
/** User who performed the action */
|