@ragable/sdk 0.6.19 → 0.6.21

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.mts CHANGED
@@ -313,6 +313,26 @@ type PostgrestResult<T> = {
313
313
  data: null;
314
314
  error: RagableError;
315
315
  };
316
+ /** Discriminated result for easier TypeScript narrowing than `{ data, error }` after destructuring. */
317
+ type RagableResult<T, E = RagableError> = {
318
+ ok: true;
319
+ value: T;
320
+ } | {
321
+ ok: false;
322
+ error: E;
323
+ };
324
+ declare function toRagableResult<T>(r: PostgrestResult<T>): RagableResult<T>;
325
+ /**
326
+ * Narrows a {@link PostgrestResult} after an `if (result.error)` guard.
327
+ * Prefer checking `result.error` on the result object (not destructured `{ data, error }`)
328
+ * so TypeScript narrows `data` automatically; use this when you need a throw or assertion.
329
+ */
330
+ declare function assertPostgrestSuccess<T>(r: PostgrestResult<T>): asserts r is {
331
+ data: T;
332
+ error: null;
333
+ };
334
+ /** Returns `data` or throws `RagableError` / the failure case. */
335
+ declare function unwrapPostgrest<T>(r: PostgrestResult<T>): T;
316
336
  declare function asPostgrestResponse<T>(fn: () => Promise<T>): Promise<PostgrestResult<T>>;
317
337
  type FilterOp = "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "like" | "ilike" | "is" | "in";
318
338
  interface Filter {
@@ -590,7 +610,18 @@ declare class AuthBroadcastChannel {
590
610
  }
591
611
 
592
612
  type AuthChangeEvent = "INITIAL_SESSION" | "SIGNED_IN" | "SIGNED_OUT" | "TOKEN_REFRESHED" | "USER_UPDATED";
593
- interface AuthSession<U extends Record<string, unknown> = Record<string, unknown>> {
613
+ type AuthUserMetadata = Record<string, unknown>;
614
+ interface DefaultAuthUser<Metadata extends AuthUserMetadata = AuthUserMetadata> {
615
+ id: string;
616
+ email: string;
617
+ name: string | null;
618
+ status: "active" | "disabled" | (string & {});
619
+ metadata: Metadata;
620
+ createdAt?: string;
621
+ updatedAt?: string;
622
+ lastSignInAt?: string | null;
623
+ }
624
+ interface AuthSession<U extends object = DefaultAuthUser> {
594
625
  access_token: string;
595
626
  refresh_token: string;
596
627
  expires_in: number;
@@ -612,12 +643,31 @@ interface RagableAuthConfig {
612
643
  headers?: HeadersInit;
613
644
  auth?: AuthOptions;
614
645
  }
615
- type AuthListener<U extends Record<string, unknown>> = (event: AuthChangeEvent, session: AuthSession<U> | null) => void;
646
+ type AuthSignUpCredentials<Metadata extends AuthUserMetadata = AuthUserMetadata> = {
647
+ email: string;
648
+ password: string;
649
+ options?: {
650
+ data?: Partial<Metadata> & {
651
+ name?: string | null;
652
+ };
653
+ };
654
+ };
655
+ type AuthUpdateUserAttributes<Metadata extends AuthUserMetadata = AuthUserMetadata> = {
656
+ email?: string;
657
+ password?: string;
658
+ data?: Partial<Metadata> & {
659
+ name?: string | null;
660
+ };
661
+ };
662
+ type MetadataForUser<U extends object> = U extends {
663
+ metadata: infer Metadata;
664
+ } ? Metadata extends AuthUserMetadata ? Metadata : AuthUserMetadata : AuthUserMetadata;
665
+ type AuthListener<U extends object> = (event: AuthChangeEvent, session: AuthSession<U> | null) => void;
616
666
  interface Subscription {
617
667
  id: string;
618
668
  unsubscribe: () => void;
619
669
  }
620
- declare class RagableAuth<U extends Record<string, unknown> = Record<string, unknown>> {
670
+ declare class RagableAuth<U extends object = DefaultAuthUser> {
621
671
  private readonly fetchImpl;
622
672
  private readonly baseUrl;
623
673
  private readonly authGroupId;
@@ -638,13 +688,7 @@ declare class RagableAuth<U extends Record<string, unknown> = Record<string, unk
638
688
  constructor(config: RagableAuthConfig);
639
689
  private log;
640
690
  initialize(): Promise<AuthSession<U> | null>;
641
- signUp(credentials: {
642
- email: string;
643
- password: string;
644
- options?: {
645
- data?: Record<string, unknown>;
646
- };
647
- }): Promise<PostgrestResult<{
691
+ signUp(credentials: AuthSignUpCredentials<MetadataForUser<U>>): Promise<PostgrestResult<{
648
692
  user: U;
649
693
  session: AuthSession<U>;
650
694
  }>>;
@@ -680,9 +724,9 @@ declare class RagableAuth<U extends Record<string, unknown> = Record<string, unk
680
724
  updateUser(attributes: {
681
725
  email?: string;
682
726
  password?: string;
683
- data?: {
727
+ data?: (Partial<MetadataForUser<U>> & {
684
728
  name?: string | null;
685
- };
729
+ });
686
730
  }): Promise<PostgrestResult<{
687
731
  user: U;
688
732
  }>>;
@@ -692,11 +736,15 @@ declare class RagableAuth<U extends Record<string, unknown> = Record<string, unk
692
736
  };
693
737
  };
694
738
  getAccessToken(): string | null;
739
+ getValidAccessToken(): Promise<string | null>;
695
740
  getCurrentSession(): AuthSession<U> | null;
696
741
  register(body: {
697
742
  email: string;
698
743
  password: string;
699
744
  name?: string;
745
+ data?: Partial<MetadataForUser<U>> & {
746
+ name?: string | null;
747
+ };
700
748
  }): Promise<{
701
749
  user: U;
702
750
  accessToken: string;
@@ -723,8 +771,12 @@ declare class RagableAuth<U extends Record<string, unknown> = Record<string, unk
723
771
  user: U;
724
772
  }>;
725
773
  updateMe(body: {
774
+ email?: string;
726
775
  name?: string | null;
727
776
  password?: string;
777
+ data?: Partial<MetadataForUser<U>> & {
778
+ name?: string | null;
779
+ };
728
780
  }): Promise<{
729
781
  user: U;
730
782
  }>;
@@ -817,7 +869,7 @@ interface RagableBrowserClientOptions {
817
869
  auth?: AuthOptions;
818
870
  transport?: Partial<TransportOptions>;
819
871
  }
820
- interface BrowserAuthSession<AuthUser extends Record<string, unknown> = Record<string, unknown>> {
872
+ interface BrowserAuthSession<AuthUser extends object = DefaultAuthUser> {
821
873
  user: AuthUser;
822
874
  accessToken: string;
823
875
  refreshToken: string;
@@ -828,7 +880,7 @@ interface BrowserAuthTokens {
828
880
  refreshToken: string;
829
881
  expiresIn: string;
830
882
  }
831
- interface SupabaseCompatSession<AuthUser extends Record<string, unknown> = Record<string, unknown>> {
883
+ interface SupabaseCompatSession<AuthUser extends object = DefaultAuthUser> {
832
884
  access_token: string;
833
885
  refresh_token: string;
834
886
  expires_in: number;
@@ -836,17 +888,13 @@ interface SupabaseCompatSession<AuthUser extends Record<string, unknown> = Recor
836
888
  user: AuthUser;
837
889
  }
838
890
 
839
- declare class RagableBrowserAuthClient<AuthUser extends Record<string, unknown> = Record<string, unknown>> {
891
+ declare class RagableBrowserAuthClient<AuthUser extends object = DefaultAuthUser> {
840
892
  private readonly ragableAuth;
841
893
  constructor(_options: RagableBrowserClientOptions, ragableAuth?: RagableAuth<AuthUser> | null);
842
894
  private get auth();
843
- signUp(credentials: {
844
- email: string;
845
- password: string;
846
- options?: {
847
- data?: Record<string, unknown>;
848
- };
849
- }): Promise<PostgrestResult<{
895
+ signUp(credentials: AuthSignUpCredentials<AuthUser extends {
896
+ metadata: infer Metadata;
897
+ } ? Metadata extends AuthUserMetadata ? Metadata : AuthUserMetadata : AuthUserMetadata>): Promise<PostgrestResult<{
850
898
  user: AuthUser;
851
899
  session: SupabaseCompatSession<AuthUser>;
852
900
  }>>;
@@ -864,13 +912,9 @@ declare class RagableBrowserAuthClient<AuthUser extends Record<string, unknown>
864
912
  getUser(): Promise<PostgrestResult<{
865
913
  user: AuthUser;
866
914
  }>>;
867
- updateUser(attributes: {
868
- email?: string;
869
- password?: string;
870
- data?: {
871
- name?: string | null;
872
- };
873
- }): Promise<PostgrestResult<{
915
+ updateUser(attributes: AuthUpdateUserAttributes<AuthUser extends {
916
+ metadata: infer Metadata;
917
+ } ? Metadata extends AuthUserMetadata ? Metadata : AuthUserMetadata : AuthUserMetadata>): Promise<PostgrestResult<{
874
918
  user: AuthUser;
875
919
  }>>;
876
920
  signOut(_options?: {
@@ -882,6 +926,11 @@ declare class RagableBrowserAuthClient<AuthUser extends Record<string, unknown>
882
926
  email: string;
883
927
  password: string;
884
928
  name?: string;
929
+ data?: AuthUser extends {
930
+ metadata: infer Metadata;
931
+ } ? Metadata extends AuthUserMetadata ? Partial<Metadata> & {
932
+ name?: string | null;
933
+ } : Record<string, unknown> : Record<string, unknown>;
885
934
  }): Promise<BrowserAuthSession<AuthUser>>;
886
935
  login(body: {
887
936
  email: string;
@@ -894,8 +943,14 @@ declare class RagableBrowserAuthClient<AuthUser extends Record<string, unknown>
894
943
  user: AuthUser;
895
944
  }>;
896
945
  updateMe(body: {
946
+ email?: string;
897
947
  name?: string | null;
898
948
  password?: string;
949
+ data?: AuthUser extends {
950
+ metadata: infer Metadata;
951
+ } ? Metadata extends AuthUserMetadata ? Partial<Metadata> & {
952
+ name?: string | null;
953
+ } : Record<string, unknown> : Record<string, unknown>;
899
954
  }): Promise<{
900
955
  user: AuthUser;
901
956
  }>;
@@ -956,7 +1011,34 @@ interface BrowserCollectionDefinition {
956
1011
  createdAt: string;
957
1012
  updatedAt: string;
958
1013
  }
959
- type CollectionWhere<Row extends Record<string, unknown>> = Partial<Row> & Record<string, unknown>;
1014
+ /**
1015
+ * Prisma-style operator object for a single field (server-supported ops).
1016
+ * Typed loosely so schema-specific refinements can be added in app code.
1017
+ */
1018
+ type WhereOperatorObject = {
1019
+ eq?: unknown;
1020
+ neq?: unknown;
1021
+ gt?: number;
1022
+ gte?: number;
1023
+ lt?: number;
1024
+ lte?: number;
1025
+ in?: unknown;
1026
+ contains?: unknown;
1027
+ };
1028
+ /**
1029
+ * `where` filters: equality on values, or per-field operator objects.
1030
+ * Use `id`, `createdAt`, `updatedAt` to match the record envelope (DB columns), not `data` JSON
1031
+ * (unless you also have those keys in your JSON — prefer envelope keys for `id`).
1032
+ */
1033
+ type WhereInput<Row extends Record<string, unknown>> = {
1034
+ [K in keyof Row]?: Row[K] | WhereOperatorObject | null;
1035
+ } & {
1036
+ id?: string | WhereOperatorObject;
1037
+ createdAt?: string | WhereOperatorObject;
1038
+ updatedAt?: string | WhereOperatorObject;
1039
+ };
1040
+ /** @deprecated Use {@link WhereInput} — same shape. */
1041
+ type CollectionWhere<Row extends Record<string, unknown>> = WhereInput<Row>;
960
1042
  type CollectionFilter<Row extends Record<string, unknown>> = {
961
1043
  [Field in Extract<keyof Row, string>]: {
962
1044
  field: Field;
@@ -964,8 +1046,22 @@ type CollectionFilter<Row extends Record<string, unknown>> = {
964
1046
  value: Row[Field];
965
1047
  };
966
1048
  }[Extract<keyof Row, string>];
1049
+ type CollectionReturnMode = "envelope" | "flat";
1050
+ /**
1051
+ * One row: JSON fields at the top level, envelope fields under `meta`
1052
+ * (when using {@link BrowserCollectionApi.findMany} with `return: "flat"`).
1053
+ */
1054
+ type CollectionRowWithMeta<Row extends Record<string, unknown> = Record<string, unknown>> = Row & {
1055
+ meta: {
1056
+ id: string;
1057
+ createdAt: string;
1058
+ updatedAt: string;
1059
+ };
1060
+ };
1061
+ declare function collectionRecordToRowWithMeta<Row extends Record<string, unknown>>(record: BrowserCollectionRecord<Row>): CollectionRowWithMeta<Row>;
1062
+ declare function collectionRecordsToRowWithMeta<Row extends Record<string, unknown>>(records: BrowserCollectionRecord<Row>[]): CollectionRowWithMeta<Row>[];
967
1063
  type BrowserCollectionFindParams<Row extends Record<string, unknown> = Record<string, unknown>> = {
968
- where?: CollectionWhere<Row>;
1064
+ where?: WhereInput<Row>;
969
1065
  filters?: Array<{
970
1066
  field: Extract<keyof Row, string> | (string & {});
971
1067
  op?: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "contains";
@@ -973,24 +1069,69 @@ type BrowserCollectionFindParams<Row extends Record<string, unknown> = Record<st
973
1069
  } | CollectionFilter<Row>>;
974
1070
  limit?: number;
975
1071
  offset?: number;
976
- orderBy?: Extract<keyof Row, string> | (string & {});
1072
+ orderBy?: Extract<keyof Row, string> | "id" | "createdAt" | "updatedAt" | (string & {});
977
1073
  orderDirection?: "asc" | "desc";
1074
+ /**
1075
+ * - `envelope` (default): `Array<{ id, data, createdAt, updatedAt }>`
1076
+ * - `flat`: {@link CollectionRowWithMeta} — row fields at top level + `meta` for `id` / timestamps
1077
+ */
1078
+ return?: CollectionReturnMode;
978
1079
  };
1080
+ type CollectionRowData<Row extends Record<string, unknown> = Record<string, unknown>> = BrowserCollectionRowData<Row>;
1081
+ type RowD<Row extends Record<string, unknown>> = BrowserCollectionRowData<Row>;
979
1082
  declare class BrowserCollectionApi<Row extends Record<string, unknown> = Record<string, unknown>, Insert extends Record<string, unknown> = Row, Update extends Record<string, unknown> = Partial<Row>> {
980
1083
  private readonly database;
981
1084
  private readonly name;
982
1085
  private readonly databaseInstanceId?;
983
1086
  constructor(database: RagableBrowserDatabaseClient<any>, name: string, databaseInstanceId?: string | undefined);
984
- find: (whereOrParams?: CollectionWhere<BrowserCollectionRowData<Row>> | BrowserCollectionFindParams<BrowserCollectionRowData<Row>>) => Promise<PostgrestResult<BrowserCollectionRecord<BrowserCollectionRowData<Row>>[]>>;
985
- insert: (data: BrowserCollectionInsertData<Row, Insert>) => Promise<PostgrestResult<BrowserCollectionRecord<BrowserCollectionRowData<Row>>>>;
986
- update: (where: CollectionWhere<BrowserCollectionRowData<Row>>, patch: BrowserCollectionUpdateData<Row, Update>, options?: {
1087
+ private normalizeFindArgs;
1088
+ private requestFind;
1089
+ /**
1090
+ * Query collection rows. Prefer this over the deprecated `find` alias.
1091
+ * Use `return: "flat"` to get {@link CollectionRowWithMeta} without nested `.data`.
1092
+ */
1093
+ findMany: (whereOrParams?: WhereInput<RowD<Row>> | BrowserCollectionFindParams<RowD<Row>>) => Promise<PostgrestResult<BrowserCollectionRecord<RowD<Row>>[] | CollectionRowWithMeta<RowD<Row>>[]>>;
1094
+ /**
1095
+ * @deprecated Use {@link BrowserCollectionApi.findMany} — same behavior.
1096
+ */
1097
+ find: (whereOrParams?: WhereInput<RowD<Row>> | BrowserCollectionFindParams<RowD<Row>>) => Promise<PostgrestResult<BrowserCollectionRecord<RowD<Row>>[] | CollectionRowWithMeta<RowD<Row>>[]>>;
1098
+ /**
1099
+ * At most one row, `data` is the record or `null` if none match (not an error).
1100
+ */
1101
+ findFirst: (whereOrParams?: WhereInput<RowD<Row>> | Omit<BrowserCollectionFindParams<RowD<Row>>, "return">) => Promise<PostgrestResult<BrowserCollectionRecord<RowD<Row>> | null>>;
1102
+ /**
1103
+ * Lookup by primary key `id` (envelope). Equivalent to
1104
+ * `findFirst({ where: { id }, limit: 1 })` with a typed `where.id`.
1105
+ */
1106
+ findUnique: (args: {
1107
+ where: {
1108
+ id: string;
1109
+ } & Partial<WhereInput<RowD<Row>>>;
1110
+ }) => Promise<PostgrestResult<BrowserCollectionRecord<RowD<Row>> | null>>;
1111
+ insert: (data: BrowserCollectionInsertData<Row, Insert>) => Promise<PostgrestResult<BrowserCollectionRecord<RowD<Row>>>>;
1112
+ /**
1113
+ * Update rows matching `where` (JSON fields, plus envelope `id` / `createdAt` / `updatedAt`).
1114
+ */
1115
+ update: (where: WhereInput<RowD<Row>>, patch: BrowserCollectionUpdateData<Row, Update>, options?: {
1116
+ limit?: number;
1117
+ }) => Promise<PostgrestResult<BrowserCollectionRecord<RowD<Row>>[]>>;
1118
+ /**
1119
+ * Like {@link BrowserCollectionApi.update} but the success payload includes
1120
+ * `meta.count` (number of rows returned from the update, bounded by `limit`).
1121
+ */
1122
+ updateMany: (where: WhereInput<RowD<Row>>, patch: BrowserCollectionUpdateData<Row, Update>, options?: {
987
1123
  limit?: number;
988
- }) => Promise<PostgrestResult<BrowserCollectionRecord<BrowserCollectionRowData<Row>>[]>>;
989
- delete: (where: CollectionWhere<BrowserCollectionRowData<Row>>, options?: {
1124
+ }) => Promise<PostgrestResult<{
1125
+ records: BrowserCollectionRecord<RowD<Row>>[];
1126
+ meta: {
1127
+ count: number;
1128
+ };
1129
+ }>>;
1130
+ delete: (where: WhereInput<RowD<Row>>, options?: {
990
1131
  limit?: number;
991
1132
  }) => Promise<PostgrestResult<{
992
1133
  deleted: number;
993
- records: BrowserCollectionRecord<BrowserCollectionRowData<Row>>[];
1134
+ records: BrowserCollectionRecord<RowD<Row>>[];
994
1135
  }>>;
995
1136
  }
996
1137
  type BrowserCollections<Database extends RagableDatabase = DefaultRagableDatabase> = [keyof Database["public"]["Tables"]] extends [never] ? Record<string, BrowserCollectionApi<Record<string, unknown>>> : {
@@ -1117,7 +1258,7 @@ interface AgentPublicChatParams extends AgentChatParams {
1117
1258
  triggerSubtype?: string;
1118
1259
  triggerNodeId?: string;
1119
1260
  }
1120
- declare class RagableBrowser<Database extends RagableDatabase = DefaultRagableDatabase, AuthUser extends Record<string, unknown> = Record<string, unknown>> {
1261
+ declare class RagableBrowser<Database extends RagableDatabase = DefaultRagableDatabase, AuthUser extends object = DefaultAuthUser> {
1121
1262
  readonly agents: RagableBrowserAgentsClient;
1122
1263
  readonly auth: RagableBrowserAuthClient<AuthUser>;
1123
1264
  readonly database: RagableBrowserDatabaseClient<Database>;
@@ -1129,7 +1270,7 @@ declare class RagableBrowser<Database extends RagableDatabase = DefaultRagableDa
1129
1270
  from: <TableName extends RagableTableNames<Database>>(table: TableName, databaseInstanceId?: string) => PostgrestTableApi<Database, TableName>;
1130
1271
  destroy(): void;
1131
1272
  }
1132
- declare function createBrowserClient<Database extends RagableDatabase = DefaultRagableDatabase, AuthUser extends Record<string, unknown> = Record<string, unknown>>(options: RagableBrowserClientOptions): RagableBrowser<Database, AuthUser>;
1273
+ declare function createBrowserClient<Database extends RagableDatabase = DefaultRagableDatabase, AuthUser extends object = DefaultAuthUser>(options: RagableBrowserClientOptions): RagableBrowser<Database, AuthUser>;
1133
1274
  declare const createRagableBrowserClient: typeof createBrowserClient;
1134
1275
 
1135
1276
  /**
@@ -1204,7 +1345,7 @@ declare class Ragable {
1204
1345
  constructor(options: RagableClientOptions);
1205
1346
  }
1206
1347
  declare function createClient(options: RagableClientOptions): Ragable;
1207
- declare function createClient<Database extends RagableDatabase = DefaultRagableDatabase, AuthUser extends Record<string, unknown> = Record<string, unknown>>(options: RagableBrowserClientOptions): RagableBrowser<Database, AuthUser>;
1348
+ declare function createClient<Database extends RagableDatabase = DefaultRagableDatabase, AuthUser extends object = DefaultAuthUser>(options: RagableBrowserClientOptions): RagableBrowser<Database, AuthUser>;
1208
1349
  declare function createRagableServerClient(options: RagableClientOptions): Ragable;
1209
1350
 
1210
- export { type AgentChatMessage, type AgentChatParams, type AgentChatResult, type AgentPublicChatParams, type AgentStreamEvent, type AgentSummary, AgentsClient, AuthBroadcastChannel, type AuthBroadcastMessage, type AuthChangeEvent, type AuthOptions, type AuthSession, type BrowserAuthSession, type BrowserAuthTokens, BrowserCollectionApi, type BrowserCollectionDefinition, type BrowserCollectionFactory, type BrowserCollectionFindParams, type BrowserCollectionRecord, type BrowserCollections, type BrowserDataAuthMode, type BrowserRealtimeNotification, type BrowserRealtimeStatus, type BrowserRealtimeSubscribeParams, type BrowserRealtimeSubscription, type BrowserSqlExecParams, type BrowserSqlExecResult, type BrowserSqlQueryParams, type BrowserSqlQueryResult, type ColumnName, type ColumnValue, CookieStorageAdapter, DEFAULT_RAGABLE_API_BASE, type DefaultRagableDatabase, type FormatContextOptions, type HttpMethod, type Json, LocalStorageAdapter, MemoryStorageAdapter, type PostgRESTFetch, type PostgRESTFetchParams, PostgrestDeleteReturningBuilder, PostgrestDeleteRootBuilder, PostgrestInsertReturningBuilder, PostgrestInsertRootBuilder, PostgrestInsertSdkErrorReturning, PostgrestInsertSdkErrorRoot, type PostgrestResult, PostgrestSelectBuilder, PostgrestTableApi, PostgrestUpdateReturningBuilder, PostgrestUpdateRootBuilder, type PostgrestUpsertOptions, PostgrestUpsertReturningBuilder, PostgrestUpsertRootBuilder, type RagClientForPipeline, type RagPipeline, type RagPipelineOptions, Ragable, RagableAbortError, RagableAuth, type RagableAuthConfig, RagableBrowser, RagableBrowserAgentsClient, RagableBrowserAuthClient, type RagableBrowserClientOptions, RagableBrowserDatabaseClient, type RagableClientOptions, type RagableDatabase, RagableError, RagableNetworkError, RagableRequestClient, RagableSdkError, type RagableTableDefinition, type RagableTableNames, RagableTimeoutError, type RequestOptions, type RetrieveParams, type RetryOptions, type RunQuery, type SessionStorage, SessionStorageAdapter, type ShiftAddDocumentParams, ShiftClient, type ShiftCreateIndexParams, type ShiftEntry, type ShiftIndex, type ShiftIngestResponse, type ShiftListEntriesParams, type ShiftListEntriesResponse, type ShiftSearchParams, type ShiftSearchResult, type ShiftUpdateIndexParams, type ShiftUploadFileParams, type ShiftUploadableFile, type SseJsonEvent, type SupabaseCompatSession, type TableInsertRow, type TableRow, type TableUpdatePatch, type Tables, type TablesInsert, type TablesUpdate, Transport, type TransportOptions, type TransportRequest, asPostgrestResponse, bindFetch, createBrowserClient, createClient, createRagPipeline, createRagableBrowserClient, createRagableServerClient, detectStorage, effectiveDataAuth, extractErrorMessage, formatPostgrestError, formatRetrievalContext, formatSdkError, generateIdempotencyKey, normalizeBrowserApiBase, parseSseDataLine, parseTransportResponse, readSseStream };
1351
+ export { type AgentChatMessage, type AgentChatParams, type AgentChatResult, type AgentPublicChatParams, type AgentStreamEvent, type AgentSummary, AgentsClient, AuthBroadcastChannel, type AuthBroadcastMessage, type AuthChangeEvent, type AuthOptions, type AuthSession, type AuthSignUpCredentials, type AuthUpdateUserAttributes, type AuthUserMetadata, type BrowserAuthSession, type BrowserAuthTokens, BrowserCollectionApi, type BrowserCollectionDefinition, type BrowserCollectionFactory, type BrowserCollectionFindParams, type BrowserCollectionRecord, type BrowserCollections, type BrowserDataAuthMode, type BrowserRealtimeNotification, type BrowserRealtimeStatus, type BrowserRealtimeSubscribeParams, type BrowserRealtimeSubscription, type BrowserSqlExecParams, type BrowserSqlExecResult, type BrowserSqlQueryParams, type BrowserSqlQueryResult, type CollectionReturnMode, type CollectionRowData, type CollectionRowWithMeta, type CollectionWhere, type ColumnName, type ColumnValue, CookieStorageAdapter, DEFAULT_RAGABLE_API_BASE, type DefaultAuthUser, type DefaultRagableDatabase, type FormatContextOptions, type HttpMethod, type Json, LocalStorageAdapter, MemoryStorageAdapter, type PostgRESTFetch, type PostgRESTFetchParams, PostgrestDeleteReturningBuilder, PostgrestDeleteRootBuilder, PostgrestInsertReturningBuilder, PostgrestInsertRootBuilder, PostgrestInsertSdkErrorReturning, PostgrestInsertSdkErrorRoot, type PostgrestResult, PostgrestSelectBuilder, PostgrestTableApi, PostgrestUpdateReturningBuilder, PostgrestUpdateRootBuilder, type PostgrestUpsertOptions, PostgrestUpsertReturningBuilder, PostgrestUpsertRootBuilder, type RagClientForPipeline, type RagPipeline, type RagPipelineOptions, Ragable, RagableAbortError, RagableAuth, type RagableAuthConfig, RagableBrowser, RagableBrowserAgentsClient, RagableBrowserAuthClient, type RagableBrowserClientOptions, RagableBrowserDatabaseClient, type RagableClientOptions, type RagableDatabase, RagableError, RagableNetworkError, RagableRequestClient, type RagableResult, RagableSdkError, type RagableTableDefinition, type RagableTableNames, RagableTimeoutError, type RequestOptions, type RetrieveParams, type RetryOptions, type RunQuery, type SessionStorage, SessionStorageAdapter, type ShiftAddDocumentParams, ShiftClient, type ShiftCreateIndexParams, type ShiftEntry, type ShiftIndex, type ShiftIngestResponse, type ShiftListEntriesParams, type ShiftListEntriesResponse, type ShiftSearchParams, type ShiftSearchResult, type ShiftUpdateIndexParams, type ShiftUploadFileParams, type ShiftUploadableFile, type SseJsonEvent, type SupabaseCompatSession, type TableInsertRow, type TableRow, type TableUpdatePatch, type Tables, type TablesInsert, type TablesUpdate, Transport, type TransportOptions, type TransportRequest, type WhereInput, type WhereOperatorObject, asPostgrestResponse, assertPostgrestSuccess, bindFetch, collectionRecordToRowWithMeta, collectionRecordsToRowWithMeta, createBrowserClient, createClient, createRagPipeline, createRagableBrowserClient, createRagableServerClient, detectStorage, effectiveDataAuth, extractErrorMessage, formatPostgrestError, formatRetrievalContext, formatSdkError, generateIdempotencyKey, normalizeBrowserApiBase, parseSseDataLine, parseTransportResponse, readSseStream, toRagableResult, unwrapPostgrest };