@fluxbase/sdk 2026.1.1-rc.7 → 2026.1.1-rc.9
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 +62 -56
- package/dist/index.d.ts +62 -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
|
|
@@ -1670,6 +1674,8 @@ interface AuthConfig {
|
|
|
1670
1674
|
require_email_verification: boolean;
|
|
1671
1675
|
/** Whether magic link authentication is enabled */
|
|
1672
1676
|
magic_link_enabled: boolean;
|
|
1677
|
+
/** Whether password login is enabled for app users */
|
|
1678
|
+
password_login_enabled: boolean;
|
|
1673
1679
|
/** Whether MFA/2FA is available (always true, users opt-in) */
|
|
1674
1680
|
mfa_available: boolean;
|
|
1675
1681
|
/** Minimum password length requirement */
|
|
@@ -1692,7 +1698,7 @@ interface AuthConfig {
|
|
|
1692
1698
|
/**
|
|
1693
1699
|
* Auth state change events
|
|
1694
1700
|
*/
|
|
1695
|
-
type AuthChangeEvent =
|
|
1701
|
+
type AuthChangeEvent = "SIGNED_IN" | "SIGNED_OUT" | "TOKEN_REFRESHED" | "USER_UPDATED" | "PASSWORD_RECOVERY" | "MFA_CHALLENGE_VERIFIED";
|
|
1696
1702
|
/**
|
|
1697
1703
|
* Callback for auth state changes
|
|
1698
1704
|
*/
|
|
@@ -1722,7 +1728,7 @@ interface FunctionInvokeOptions {
|
|
|
1722
1728
|
* HTTP method to use
|
|
1723
1729
|
* @default 'POST'
|
|
1724
1730
|
*/
|
|
1725
|
-
method?:
|
|
1731
|
+
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
1726
1732
|
/**
|
|
1727
1733
|
* Namespace of the function to invoke
|
|
1728
1734
|
* If not provided, the first function with the given name is used (alphabetically by namespace)
|
|
@@ -1792,7 +1798,7 @@ interface EdgeFunctionExecution {
|
|
|
1792
1798
|
id: string;
|
|
1793
1799
|
function_id: string;
|
|
1794
1800
|
trigger_type: string;
|
|
1795
|
-
status:
|
|
1801
|
+
status: "success" | "error";
|
|
1796
1802
|
status_code?: number;
|
|
1797
1803
|
duration_ms?: number;
|
|
1798
1804
|
result?: string;
|
|
@@ -1852,7 +1858,7 @@ interface SyncError {
|
|
|
1852
1858
|
/** Error message */
|
|
1853
1859
|
error: string;
|
|
1854
1860
|
/** Operation that failed */
|
|
1855
|
-
action:
|
|
1861
|
+
action: "create" | "update" | "delete" | "bundle";
|
|
1856
1862
|
}
|
|
1857
1863
|
/**
|
|
1858
1864
|
* Result of a function sync operation
|
|
@@ -1951,7 +1957,7 @@ interface UpdateJobFunctionRequest {
|
|
|
1951
1957
|
/**
|
|
1952
1958
|
* Job execution status
|
|
1953
1959
|
*/
|
|
1954
|
-
type JobStatus =
|
|
1960
|
+
type JobStatus = "pending" | "running" | "completed" | "failed" | "cancelled" | "timeout";
|
|
1955
1961
|
/**
|
|
1956
1962
|
* Job execution record
|
|
1957
1963
|
*/
|
|
@@ -2017,7 +2023,7 @@ interface JobStats {
|
|
|
2017
2023
|
interface JobWorker {
|
|
2018
2024
|
id: string;
|
|
2019
2025
|
hostname: string;
|
|
2020
|
-
status:
|
|
2026
|
+
status: "active" | "idle" | "dead";
|
|
2021
2027
|
current_jobs: number;
|
|
2022
2028
|
total_completed: number;
|
|
2023
2029
|
started_at: string;
|
|
@@ -2094,7 +2100,7 @@ interface Migration {
|
|
|
2094
2100
|
up_sql: string;
|
|
2095
2101
|
down_sql?: string;
|
|
2096
2102
|
version: number;
|
|
2097
|
-
status:
|
|
2103
|
+
status: "pending" | "applied" | "failed" | "rolled_back";
|
|
2098
2104
|
created_by?: string;
|
|
2099
2105
|
applied_by?: string;
|
|
2100
2106
|
created_at: string;
|
|
@@ -2126,8 +2132,8 @@ interface UpdateMigrationRequest {
|
|
|
2126
2132
|
interface MigrationExecution {
|
|
2127
2133
|
id: string;
|
|
2128
2134
|
migration_id: string;
|
|
2129
|
-
action:
|
|
2130
|
-
status:
|
|
2135
|
+
action: "apply" | "rollback";
|
|
2136
|
+
status: "success" | "failed";
|
|
2131
2137
|
duration_ms?: number;
|
|
2132
2138
|
error_message?: string;
|
|
2133
2139
|
logs?: string;
|
|
@@ -2197,7 +2203,7 @@ interface SyncMigrationsResult {
|
|
|
2197
2203
|
/**
|
|
2198
2204
|
* AI provider type
|
|
2199
2205
|
*/
|
|
2200
|
-
type AIProviderType =
|
|
2206
|
+
type AIProviderType = "openai" | "azure" | "ollama";
|
|
2201
2207
|
/**
|
|
2202
2208
|
* AI provider configuration
|
|
2203
2209
|
*/
|
|
@@ -2332,12 +2338,12 @@ interface SyncChatbotsResult {
|
|
|
2332
2338
|
/**
|
|
2333
2339
|
* AI chat message role
|
|
2334
2340
|
*/
|
|
2335
|
-
type AIChatMessageRole =
|
|
2341
|
+
type AIChatMessageRole = "user" | "assistant" | "system" | "tool";
|
|
2336
2342
|
/**
|
|
2337
2343
|
* AI chat message for WebSocket
|
|
2338
2344
|
*/
|
|
2339
2345
|
interface AIChatClientMessage {
|
|
2340
|
-
type:
|
|
2346
|
+
type: "start_chat" | "message" | "cancel";
|
|
2341
2347
|
chatbot?: string;
|
|
2342
2348
|
namespace?: string;
|
|
2343
2349
|
conversation_id?: string;
|
|
@@ -2348,7 +2354,7 @@ interface AIChatClientMessage {
|
|
|
2348
2354
|
* AI chat server message
|
|
2349
2355
|
*/
|
|
2350
2356
|
interface AIChatServerMessage {
|
|
2351
|
-
type:
|
|
2357
|
+
type: "chat_started" | "progress" | "content" | "query_result" | "done" | "error" | "cancelled";
|
|
2352
2358
|
conversation_id?: string;
|
|
2353
2359
|
message_id?: string;
|
|
2354
2360
|
chatbot?: string;
|
|
@@ -2380,7 +2386,7 @@ interface AIConversation {
|
|
|
2380
2386
|
user_id?: string;
|
|
2381
2387
|
session_id?: string;
|
|
2382
2388
|
title?: string;
|
|
2383
|
-
status:
|
|
2389
|
+
status: "active" | "archived";
|
|
2384
2390
|
turn_count: number;
|
|
2385
2391
|
total_prompt_tokens: number;
|
|
2386
2392
|
total_completion_tokens: number;
|
|
@@ -2444,7 +2450,7 @@ interface AIUserUsageStats {
|
|
|
2444
2450
|
*/
|
|
2445
2451
|
interface AIUserMessage {
|
|
2446
2452
|
id: string;
|
|
2447
|
-
role:
|
|
2453
|
+
role: "user" | "assistant";
|
|
2448
2454
|
content: string;
|
|
2449
2455
|
timestamp: string;
|
|
2450
2456
|
query_results?: AIUserQueryResult[];
|
|
@@ -2545,7 +2551,7 @@ interface UpdateKnowledgeBaseRequest {
|
|
|
2545
2551
|
/**
|
|
2546
2552
|
* Document status
|
|
2547
2553
|
*/
|
|
2548
|
-
type DocumentStatus =
|
|
2554
|
+
type DocumentStatus = "pending" | "processing" | "indexed" | "failed";
|
|
2549
2555
|
/**
|
|
2550
2556
|
* Document in a knowledge base
|
|
2551
2557
|
*/
|
|
@@ -2796,7 +2802,7 @@ interface RPCProcedure extends RPCProcedureSummary {
|
|
|
2796
2802
|
/**
|
|
2797
2803
|
* RPC execution status
|
|
2798
2804
|
*/
|
|
2799
|
-
type RPCExecutionStatus =
|
|
2805
|
+
type RPCExecutionStatus = "pending" | "running" | "completed" | "failed" | "cancelled" | "timeout";
|
|
2800
2806
|
/**
|
|
2801
2807
|
* RPC execution record
|
|
2802
2808
|
*/
|
|
@@ -2928,7 +2934,7 @@ interface RPCExecutionFilters {
|
|
|
2928
2934
|
* - cosine: Cosine distance - lower is more similar (1 - cosine similarity)
|
|
2929
2935
|
* - inner_product: Negative inner product - lower is more similar
|
|
2930
2936
|
*/
|
|
2931
|
-
type VectorMetric =
|
|
2937
|
+
type VectorMetric = "l2" | "cosine" | "inner_product";
|
|
2932
2938
|
/**
|
|
2933
2939
|
* Options for vector similarity ordering
|
|
2934
2940
|
*/
|
|
@@ -3002,11 +3008,11 @@ interface VectorSearchResult<T = Record<string, unknown>> {
|
|
|
3002
3008
|
/**
|
|
3003
3009
|
* Log level for execution logs
|
|
3004
3010
|
*/
|
|
3005
|
-
type ExecutionLogLevel =
|
|
3011
|
+
type ExecutionLogLevel = "debug" | "info" | "warn" | "error";
|
|
3006
3012
|
/**
|
|
3007
3013
|
* Execution type for log subscriptions
|
|
3008
3014
|
*/
|
|
3009
|
-
type ExecutionType =
|
|
3015
|
+
type ExecutionType = "function" | "job" | "rpc";
|
|
3010
3016
|
/**
|
|
3011
3017
|
* Execution log event received from realtime subscription
|
|
3012
3018
|
*/
|
|
@@ -3042,15 +3048,15 @@ interface ExecutionLogConfig {
|
|
|
3042
3048
|
/**
|
|
3043
3049
|
* Branch status
|
|
3044
3050
|
*/
|
|
3045
|
-
type BranchStatus =
|
|
3051
|
+
type BranchStatus = "creating" | "ready" | "migrating" | "error" | "deleting" | "deleted";
|
|
3046
3052
|
/**
|
|
3047
3053
|
* Branch type
|
|
3048
3054
|
*/
|
|
3049
|
-
type BranchType =
|
|
3055
|
+
type BranchType = "main" | "preview" | "persistent";
|
|
3050
3056
|
/**
|
|
3051
3057
|
* Data clone mode when creating a branch
|
|
3052
3058
|
*/
|
|
3053
|
-
type DataCloneMode =
|
|
3059
|
+
type DataCloneMode = "schema_only" | "full_clone" | "seed_data";
|
|
3054
3060
|
/**
|
|
3055
3061
|
* Database branch information
|
|
3056
3062
|
*/
|
|
@@ -3144,7 +3150,7 @@ interface BranchActivity {
|
|
|
3144
3150
|
/** Action performed */
|
|
3145
3151
|
action: string;
|
|
3146
3152
|
/** Activity status */
|
|
3147
|
-
status:
|
|
3153
|
+
status: "success" | "failed" | "pending";
|
|
3148
3154
|
/** Additional details */
|
|
3149
3155
|
details?: Record<string, unknown>;
|
|
3150
3156
|
/** 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
|
|
@@ -1670,6 +1674,8 @@ interface AuthConfig {
|
|
|
1670
1674
|
require_email_verification: boolean;
|
|
1671
1675
|
/** Whether magic link authentication is enabled */
|
|
1672
1676
|
magic_link_enabled: boolean;
|
|
1677
|
+
/** Whether password login is enabled for app users */
|
|
1678
|
+
password_login_enabled: boolean;
|
|
1673
1679
|
/** Whether MFA/2FA is available (always true, users opt-in) */
|
|
1674
1680
|
mfa_available: boolean;
|
|
1675
1681
|
/** Minimum password length requirement */
|
|
@@ -1692,7 +1698,7 @@ interface AuthConfig {
|
|
|
1692
1698
|
/**
|
|
1693
1699
|
* Auth state change events
|
|
1694
1700
|
*/
|
|
1695
|
-
type AuthChangeEvent =
|
|
1701
|
+
type AuthChangeEvent = "SIGNED_IN" | "SIGNED_OUT" | "TOKEN_REFRESHED" | "USER_UPDATED" | "PASSWORD_RECOVERY" | "MFA_CHALLENGE_VERIFIED";
|
|
1696
1702
|
/**
|
|
1697
1703
|
* Callback for auth state changes
|
|
1698
1704
|
*/
|
|
@@ -1722,7 +1728,7 @@ interface FunctionInvokeOptions {
|
|
|
1722
1728
|
* HTTP method to use
|
|
1723
1729
|
* @default 'POST'
|
|
1724
1730
|
*/
|
|
1725
|
-
method?:
|
|
1731
|
+
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
1726
1732
|
/**
|
|
1727
1733
|
* Namespace of the function to invoke
|
|
1728
1734
|
* If not provided, the first function with the given name is used (alphabetically by namespace)
|
|
@@ -1792,7 +1798,7 @@ interface EdgeFunctionExecution {
|
|
|
1792
1798
|
id: string;
|
|
1793
1799
|
function_id: string;
|
|
1794
1800
|
trigger_type: string;
|
|
1795
|
-
status:
|
|
1801
|
+
status: "success" | "error";
|
|
1796
1802
|
status_code?: number;
|
|
1797
1803
|
duration_ms?: number;
|
|
1798
1804
|
result?: string;
|
|
@@ -1852,7 +1858,7 @@ interface SyncError {
|
|
|
1852
1858
|
/** Error message */
|
|
1853
1859
|
error: string;
|
|
1854
1860
|
/** Operation that failed */
|
|
1855
|
-
action:
|
|
1861
|
+
action: "create" | "update" | "delete" | "bundle";
|
|
1856
1862
|
}
|
|
1857
1863
|
/**
|
|
1858
1864
|
* Result of a function sync operation
|
|
@@ -1951,7 +1957,7 @@ interface UpdateJobFunctionRequest {
|
|
|
1951
1957
|
/**
|
|
1952
1958
|
* Job execution status
|
|
1953
1959
|
*/
|
|
1954
|
-
type JobStatus =
|
|
1960
|
+
type JobStatus = "pending" | "running" | "completed" | "failed" | "cancelled" | "timeout";
|
|
1955
1961
|
/**
|
|
1956
1962
|
* Job execution record
|
|
1957
1963
|
*/
|
|
@@ -2017,7 +2023,7 @@ interface JobStats {
|
|
|
2017
2023
|
interface JobWorker {
|
|
2018
2024
|
id: string;
|
|
2019
2025
|
hostname: string;
|
|
2020
|
-
status:
|
|
2026
|
+
status: "active" | "idle" | "dead";
|
|
2021
2027
|
current_jobs: number;
|
|
2022
2028
|
total_completed: number;
|
|
2023
2029
|
started_at: string;
|
|
@@ -2094,7 +2100,7 @@ interface Migration {
|
|
|
2094
2100
|
up_sql: string;
|
|
2095
2101
|
down_sql?: string;
|
|
2096
2102
|
version: number;
|
|
2097
|
-
status:
|
|
2103
|
+
status: "pending" | "applied" | "failed" | "rolled_back";
|
|
2098
2104
|
created_by?: string;
|
|
2099
2105
|
applied_by?: string;
|
|
2100
2106
|
created_at: string;
|
|
@@ -2126,8 +2132,8 @@ interface UpdateMigrationRequest {
|
|
|
2126
2132
|
interface MigrationExecution {
|
|
2127
2133
|
id: string;
|
|
2128
2134
|
migration_id: string;
|
|
2129
|
-
action:
|
|
2130
|
-
status:
|
|
2135
|
+
action: "apply" | "rollback";
|
|
2136
|
+
status: "success" | "failed";
|
|
2131
2137
|
duration_ms?: number;
|
|
2132
2138
|
error_message?: string;
|
|
2133
2139
|
logs?: string;
|
|
@@ -2197,7 +2203,7 @@ interface SyncMigrationsResult {
|
|
|
2197
2203
|
/**
|
|
2198
2204
|
* AI provider type
|
|
2199
2205
|
*/
|
|
2200
|
-
type AIProviderType =
|
|
2206
|
+
type AIProviderType = "openai" | "azure" | "ollama";
|
|
2201
2207
|
/**
|
|
2202
2208
|
* AI provider configuration
|
|
2203
2209
|
*/
|
|
@@ -2332,12 +2338,12 @@ interface SyncChatbotsResult {
|
|
|
2332
2338
|
/**
|
|
2333
2339
|
* AI chat message role
|
|
2334
2340
|
*/
|
|
2335
|
-
type AIChatMessageRole =
|
|
2341
|
+
type AIChatMessageRole = "user" | "assistant" | "system" | "tool";
|
|
2336
2342
|
/**
|
|
2337
2343
|
* AI chat message for WebSocket
|
|
2338
2344
|
*/
|
|
2339
2345
|
interface AIChatClientMessage {
|
|
2340
|
-
type:
|
|
2346
|
+
type: "start_chat" | "message" | "cancel";
|
|
2341
2347
|
chatbot?: string;
|
|
2342
2348
|
namespace?: string;
|
|
2343
2349
|
conversation_id?: string;
|
|
@@ -2348,7 +2354,7 @@ interface AIChatClientMessage {
|
|
|
2348
2354
|
* AI chat server message
|
|
2349
2355
|
*/
|
|
2350
2356
|
interface AIChatServerMessage {
|
|
2351
|
-
type:
|
|
2357
|
+
type: "chat_started" | "progress" | "content" | "query_result" | "done" | "error" | "cancelled";
|
|
2352
2358
|
conversation_id?: string;
|
|
2353
2359
|
message_id?: string;
|
|
2354
2360
|
chatbot?: string;
|
|
@@ -2380,7 +2386,7 @@ interface AIConversation {
|
|
|
2380
2386
|
user_id?: string;
|
|
2381
2387
|
session_id?: string;
|
|
2382
2388
|
title?: string;
|
|
2383
|
-
status:
|
|
2389
|
+
status: "active" | "archived";
|
|
2384
2390
|
turn_count: number;
|
|
2385
2391
|
total_prompt_tokens: number;
|
|
2386
2392
|
total_completion_tokens: number;
|
|
@@ -2444,7 +2450,7 @@ interface AIUserUsageStats {
|
|
|
2444
2450
|
*/
|
|
2445
2451
|
interface AIUserMessage {
|
|
2446
2452
|
id: string;
|
|
2447
|
-
role:
|
|
2453
|
+
role: "user" | "assistant";
|
|
2448
2454
|
content: string;
|
|
2449
2455
|
timestamp: string;
|
|
2450
2456
|
query_results?: AIUserQueryResult[];
|
|
@@ -2545,7 +2551,7 @@ interface UpdateKnowledgeBaseRequest {
|
|
|
2545
2551
|
/**
|
|
2546
2552
|
* Document status
|
|
2547
2553
|
*/
|
|
2548
|
-
type DocumentStatus =
|
|
2554
|
+
type DocumentStatus = "pending" | "processing" | "indexed" | "failed";
|
|
2549
2555
|
/**
|
|
2550
2556
|
* Document in a knowledge base
|
|
2551
2557
|
*/
|
|
@@ -2796,7 +2802,7 @@ interface RPCProcedure extends RPCProcedureSummary {
|
|
|
2796
2802
|
/**
|
|
2797
2803
|
* RPC execution status
|
|
2798
2804
|
*/
|
|
2799
|
-
type RPCExecutionStatus =
|
|
2805
|
+
type RPCExecutionStatus = "pending" | "running" | "completed" | "failed" | "cancelled" | "timeout";
|
|
2800
2806
|
/**
|
|
2801
2807
|
* RPC execution record
|
|
2802
2808
|
*/
|
|
@@ -2928,7 +2934,7 @@ interface RPCExecutionFilters {
|
|
|
2928
2934
|
* - cosine: Cosine distance - lower is more similar (1 - cosine similarity)
|
|
2929
2935
|
* - inner_product: Negative inner product - lower is more similar
|
|
2930
2936
|
*/
|
|
2931
|
-
type VectorMetric =
|
|
2937
|
+
type VectorMetric = "l2" | "cosine" | "inner_product";
|
|
2932
2938
|
/**
|
|
2933
2939
|
* Options for vector similarity ordering
|
|
2934
2940
|
*/
|
|
@@ -3002,11 +3008,11 @@ interface VectorSearchResult<T = Record<string, unknown>> {
|
|
|
3002
3008
|
/**
|
|
3003
3009
|
* Log level for execution logs
|
|
3004
3010
|
*/
|
|
3005
|
-
type ExecutionLogLevel =
|
|
3011
|
+
type ExecutionLogLevel = "debug" | "info" | "warn" | "error";
|
|
3006
3012
|
/**
|
|
3007
3013
|
* Execution type for log subscriptions
|
|
3008
3014
|
*/
|
|
3009
|
-
type ExecutionType =
|
|
3015
|
+
type ExecutionType = "function" | "job" | "rpc";
|
|
3010
3016
|
/**
|
|
3011
3017
|
* Execution log event received from realtime subscription
|
|
3012
3018
|
*/
|
|
@@ -3042,15 +3048,15 @@ interface ExecutionLogConfig {
|
|
|
3042
3048
|
/**
|
|
3043
3049
|
* Branch status
|
|
3044
3050
|
*/
|
|
3045
|
-
type BranchStatus =
|
|
3051
|
+
type BranchStatus = "creating" | "ready" | "migrating" | "error" | "deleting" | "deleted";
|
|
3046
3052
|
/**
|
|
3047
3053
|
* Branch type
|
|
3048
3054
|
*/
|
|
3049
|
-
type BranchType =
|
|
3055
|
+
type BranchType = "main" | "preview" | "persistent";
|
|
3050
3056
|
/**
|
|
3051
3057
|
* Data clone mode when creating a branch
|
|
3052
3058
|
*/
|
|
3053
|
-
type DataCloneMode =
|
|
3059
|
+
type DataCloneMode = "schema_only" | "full_clone" | "seed_data";
|
|
3054
3060
|
/**
|
|
3055
3061
|
* Database branch information
|
|
3056
3062
|
*/
|
|
@@ -3144,7 +3150,7 @@ interface BranchActivity {
|
|
|
3144
3150
|
/** Action performed */
|
|
3145
3151
|
action: string;
|
|
3146
3152
|
/** Activity status */
|
|
3147
|
-
status:
|
|
3153
|
+
status: "success" | "failed" | "pending";
|
|
3148
3154
|
/** Additional details */
|
|
3149
3155
|
details?: Record<string, unknown>;
|
|
3150
3156
|
/** User who performed the action */
|