@xata.io/client 0.9.0 → 0.10.1

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.ts CHANGED
@@ -138,6 +138,12 @@ declare type ListBranchesResponse = {
138
138
  displayName: string;
139
139
  branches: Branch[];
140
140
  };
141
+ declare type ListGitBranchesResponse = {
142
+ mapping: {
143
+ gitBranch: string;
144
+ xataBranch: string;
145
+ }[];
146
+ };
141
147
  declare type Branch = {
142
148
  name: string;
143
149
  createdAt: DateTime;
@@ -186,7 +192,7 @@ declare type Table = {
186
192
  */
187
193
  declare type Column = {
188
194
  name: string;
189
- type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object';
195
+ type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object' | 'datetime';
190
196
  link?: {
191
197
  table: string;
192
198
  };
@@ -382,6 +388,7 @@ type schemas_WorkspaceMembers = WorkspaceMembers;
382
388
  type schemas_InviteKey = InviteKey;
383
389
  type schemas_ListDatabasesResponse = ListDatabasesResponse;
384
390
  type schemas_ListBranchesResponse = ListBranchesResponse;
391
+ type schemas_ListGitBranchesResponse = ListGitBranchesResponse;
385
392
  type schemas_Branch = Branch;
386
393
  type schemas_BranchMetadata = BranchMetadata;
387
394
  type schemas_DBBranch = DBBranch;
@@ -434,6 +441,7 @@ declare namespace schemas {
434
441
  schemas_InviteKey as InviteKey,
435
442
  schemas_ListDatabasesResponse as ListDatabasesResponse,
436
443
  schemas_ListBranchesResponse as ListBranchesResponse,
444
+ schemas_ListGitBranchesResponse as ListGitBranchesResponse,
437
445
  schemas_Branch as Branch,
438
446
  schemas_BranchMetadata as BranchMetadata,
439
447
  schemas_DBBranch as DBBranch,
@@ -1010,6 +1018,163 @@ declare type DeleteDatabaseVariables = {
1010
1018
  * Delete a database and all of its branches and tables permanently.
1011
1019
  */
1012
1020
  declare const deleteDatabase: (variables: DeleteDatabaseVariables) => Promise<undefined>;
1021
+ declare type GetGitBranchesMappingPathParams = {
1022
+ dbName: DBName;
1023
+ workspace: string;
1024
+ };
1025
+ declare type GetGitBranchesMappingError = ErrorWrapper<{
1026
+ status: 400;
1027
+ payload: BadRequestError;
1028
+ } | {
1029
+ status: 401;
1030
+ payload: AuthError;
1031
+ }>;
1032
+ declare type GetGitBranchesMappingVariables = {
1033
+ pathParams: GetGitBranchesMappingPathParams;
1034
+ } & FetcherExtraProps;
1035
+ /**
1036
+ * Lists all the git branches in the mapping, and their associated Xata branches.
1037
+ *
1038
+ * Example response:
1039
+ *
1040
+ * ```json
1041
+ * {
1042
+ * "mappings": [
1043
+ * {
1044
+ * "gitBranch": "main",
1045
+ * "xataBranch": "main"
1046
+ * },
1047
+ * {
1048
+ * "gitBranch": "gitBranch1",
1049
+ * "xataBranch": "xataBranch1"
1050
+ * }
1051
+ * {
1052
+ * "gitBranch": "xataBranch2",
1053
+ * "xataBranch": "xataBranch2"
1054
+ * }
1055
+ * ]
1056
+ * }
1057
+ * ```
1058
+ */
1059
+ declare const getGitBranchesMapping: (variables: GetGitBranchesMappingVariables) => Promise<ListGitBranchesResponse>;
1060
+ declare type AddGitBranchesEntryPathParams = {
1061
+ dbName: DBName;
1062
+ workspace: string;
1063
+ };
1064
+ declare type AddGitBranchesEntryError = ErrorWrapper<{
1065
+ status: 400;
1066
+ payload: BadRequestError;
1067
+ } | {
1068
+ status: 401;
1069
+ payload: AuthError;
1070
+ }>;
1071
+ declare type AddGitBranchesEntryResponse = {
1072
+ warning?: string;
1073
+ };
1074
+ declare type AddGitBranchesEntryRequestBody = {
1075
+ gitBranch: string;
1076
+ xataBranch: BranchName;
1077
+ };
1078
+ declare type AddGitBranchesEntryVariables = {
1079
+ body: AddGitBranchesEntryRequestBody;
1080
+ pathParams: AddGitBranchesEntryPathParams;
1081
+ } & FetcherExtraProps;
1082
+ /**
1083
+ * Adds an entry to the mapping of git branches to Xata branches. The git branch and the Xata branch must be present in the body of the request. If the Xata branch doesn't exist, a 400 error is returned.
1084
+ *
1085
+ * If the git branch is already present in the mapping, the old entry is overwritten, and a warning message is included in the response. If the git branch is added and didn't exist before, the response code is 204. If the git branch existed and it was overwritten, the response code is 201.
1086
+ *
1087
+ * Example request:
1088
+ *
1089
+ * ```json
1090
+ * // POST https://tutorial-ng7s8c.xata.sh/dbs/demo/gitBranches
1091
+ * {
1092
+ * "gitBranch": "fix/bug123",
1093
+ * "xataBranch": "fix_bug"
1094
+ * }
1095
+ * ```
1096
+ */
1097
+ declare const addGitBranchesEntry: (variables: AddGitBranchesEntryVariables) => Promise<AddGitBranchesEntryResponse>;
1098
+ declare type RemoveGitBranchesEntryPathParams = {
1099
+ dbName: DBName;
1100
+ workspace: string;
1101
+ };
1102
+ declare type RemoveGitBranchesEntryQueryParams = {
1103
+ gitBranch: string;
1104
+ };
1105
+ declare type RemoveGitBranchesEntryError = ErrorWrapper<{
1106
+ status: 400;
1107
+ payload: BadRequestError;
1108
+ } | {
1109
+ status: 401;
1110
+ payload: AuthError;
1111
+ }>;
1112
+ declare type RemoveGitBranchesEntryVariables = {
1113
+ pathParams: RemoveGitBranchesEntryPathParams;
1114
+ queryParams: RemoveGitBranchesEntryQueryParams;
1115
+ } & FetcherExtraProps;
1116
+ /**
1117
+ * Removes an entry from the mapping of git branches to Xata branches. The name of the git branch must be passed as a query parameter. If the git branch is not found, the endpoint returns a 404 status code.
1118
+ *
1119
+ * Example request:
1120
+ *
1121
+ * ```json
1122
+ * // DELETE https://tutorial-ng7s8c.xata.sh/dbs/demo/gitBranches?gitBranch=fix%2Fbug123
1123
+ * ```
1124
+ */
1125
+ declare const removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables) => Promise<undefined>;
1126
+ declare type ResolveBranchPathParams = {
1127
+ dbName: DBName;
1128
+ workspace: string;
1129
+ };
1130
+ declare type ResolveBranchQueryParams = {
1131
+ gitBranch?: string;
1132
+ fallbackBranch?: string;
1133
+ };
1134
+ declare type ResolveBranchError = ErrorWrapper<{
1135
+ status: 400;
1136
+ payload: BadRequestError;
1137
+ } | {
1138
+ status: 401;
1139
+ payload: AuthError;
1140
+ }>;
1141
+ declare type ResolveBranchResponse = {
1142
+ branch: string;
1143
+ reason: {
1144
+ code: 'FOUND_IN_MAPPING' | 'BRANCH_EXISTS' | 'FALLBACK_BRANCH' | 'DEFAULT_BRANCH';
1145
+ message: string;
1146
+ };
1147
+ };
1148
+ declare type ResolveBranchVariables = {
1149
+ pathParams: ResolveBranchPathParams;
1150
+ queryParams?: ResolveBranchQueryParams;
1151
+ } & FetcherExtraProps;
1152
+ /**
1153
+ * In order to resolve the database branch, the following algorithm is used:
1154
+ * * if the `gitBranch` was provided and is found in the [git branches mapping](/api-reference/dbs/db_name/gitBranches), the associated Xata branch is returned
1155
+ * * else, if a Xata branch with the exact same name as `gitBranch` exists, return it
1156
+ * * else, if `fallbackBranch` is provided and a branch with that name exists, return it
1157
+ * * else, return the default branch of the DB (`main` or the first branch)
1158
+ *
1159
+ * Example call:
1160
+ *
1161
+ * ```json
1162
+ * // GET https://tutorial-ng7s8c.xata.sh/dbs/demo/dbs/demo/resolveBranch?gitBranch=test&fallbackBranch=tsg
1163
+ * ```
1164
+ *
1165
+ * Example response:
1166
+ *
1167
+ * ```json
1168
+ * {
1169
+ * "branch": "main",
1170
+ * "reason": {
1171
+ * "code": "DEFAULT_BRANCH",
1172
+ * "message": "Default branch for this database (main)"
1173
+ * }
1174
+ * }
1175
+ * ```
1176
+ */
1177
+ declare const resolveBranch: (variables: ResolveBranchVariables) => Promise<ResolveBranchResponse>;
1013
1178
  declare type GetBranchDetailsPathParams = {
1014
1179
  dbBranchName: DBBranchName;
1015
1180
  workspace: string;
@@ -1750,7 +1915,11 @@ declare type QueryTableVariables = {
1750
1915
  * "link": {
1751
1916
  * "table": "users"
1752
1917
  * }
1753
- * }
1918
+ * },
1919
+ * {
1920
+ * "name": "foundedDate",
1921
+ * "type": "datetime"
1922
+ * },
1754
1923
  * ]
1755
1924
  * },
1756
1925
  * {
@@ -1897,7 +2066,8 @@ declare type QueryTableVariables = {
1897
2066
  * "version": 0
1898
2067
  * },
1899
2068
  * "name": "first team",
1900
- * "code": "A1"
2069
+ * "code": "A1",
2070
+ * "foundedDate": "2020-03-04T10:43:54.32Z"
1901
2071
  * }
1902
2072
  * }
1903
2073
  * ```
@@ -1912,7 +2082,7 @@ declare type QueryTableVariables = {
1912
2082
  * `$none`, etc.
1913
2083
  *
1914
2084
  * All operators start with an `$` to differentiate them from column names
1915
- * (which are not allowed to start with an dollar sign).
2085
+ * (which are not allowed to start with a dollar sign).
1916
2086
  *
1917
2087
  * #### Exact matching and control operators
1918
2088
  *
@@ -2113,7 +2283,7 @@ declare type QueryTableVariables = {
2113
2283
  * }
2114
2284
  * ```
2115
2285
  *
2116
- * #### Numeric ranges
2286
+ * #### Numeric or datetime ranges
2117
2287
  *
2118
2288
  * ```json
2119
2289
  * {
@@ -2125,7 +2295,18 @@ declare type QueryTableVariables = {
2125
2295
  * }
2126
2296
  * }
2127
2297
  * ```
2128
- *
2298
+ * Date ranges support the same operators, with the date using the format defined in
2299
+ * [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339):
2300
+ * ```json
2301
+ * {
2302
+ * "filter": {
2303
+ * "<column_name>": {
2304
+ * "$gt": "2019-10-12T07:20:50.52Z",
2305
+ * "$lt": "2021-10-12T07:20:50.52Z"
2306
+ * }
2307
+ * }
2308
+ * }
2309
+ * ```
2129
2310
  * The supported operators are `$gt`, `$lt`, `$ge`, `$le`.
2130
2311
  *
2131
2312
  * #### Negations
@@ -2447,6 +2628,10 @@ declare const operationsByTag: {
2447
2628
  getDatabaseList: (variables: GetDatabaseListVariables) => Promise<ListDatabasesResponse>;
2448
2629
  createDatabase: (variables: CreateDatabaseVariables) => Promise<CreateDatabaseResponse>;
2449
2630
  deleteDatabase: (variables: DeleteDatabaseVariables) => Promise<undefined>;
2631
+ getGitBranchesMapping: (variables: GetGitBranchesMappingVariables) => Promise<ListGitBranchesResponse>;
2632
+ addGitBranchesEntry: (variables: AddGitBranchesEntryVariables) => Promise<AddGitBranchesEntryResponse>;
2633
+ removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables) => Promise<undefined>;
2634
+ resolveBranch: (variables: ResolveBranchVariables) => Promise<ResolveBranchResponse>;
2450
2635
  };
2451
2636
  branch: {
2452
2637
  getBranchList: (variables: GetBranchListVariables) => Promise<ListBranchesResponse>;
@@ -2542,6 +2727,10 @@ declare class DatabaseApi {
2542
2727
  getDatabaseList(workspace: WorkspaceID): Promise<ListDatabasesResponse>;
2543
2728
  createDatabase(workspace: WorkspaceID, dbName: DBName, options?: CreateDatabaseRequestBody): Promise<CreateDatabaseResponse>;
2544
2729
  deleteDatabase(workspace: WorkspaceID, dbName: DBName): Promise<void>;
2730
+ getGitBranchesMapping(workspace: WorkspaceID, dbName: DBName): Promise<ListGitBranchesResponse>;
2731
+ addGitBranchesEntry(workspace: WorkspaceID, dbName: DBName, body: AddGitBranchesEntryRequestBody): Promise<AddGitBranchesEntryResponse>;
2732
+ removeGitBranchesEntry(workspace: WorkspaceID, dbName: DBName, gitBranch: string): Promise<void>;
2733
+ resolveBranch(workspace: WorkspaceID, dbName: DBName, gitBranch: string): Promise<ResolveBranchResponse>;
2545
2734
  }
2546
2735
  declare class BranchApi {
2547
2736
  private extraProps;
@@ -2603,7 +2792,7 @@ declare type RequiredBy<T, K extends keyof T> = T & {
2603
2792
  };
2604
2793
  declare type GetArrayInnerType<T extends readonly any[]> = T[number];
2605
2794
  declare type SingleOrArray<T> = T | T[];
2606
- declare type Dictionary<T> = Record<string, T>;
2795
+ declare type OmitBy<T, K extends keyof T> = T extends any ? Omit<T, K> : never;
2607
2796
 
2608
2797
  declare type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | DataProps<O> | NestedColumns<O, RecursivePath>;
2609
2798
  declare type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = XataRecord & UnionToIntersection<Values<{
@@ -2798,13 +2987,21 @@ declare type SortFilterBase<T extends XataRecord> = {
2798
2987
  [Key in StringKeys<T>]: SortDirection;
2799
2988
  };
2800
2989
 
2801
- declare type QueryOptions<T extends XataRecord> = {
2802
- page?: PaginationOptions;
2990
+ declare type BaseOptions<T extends XataRecord> = {
2803
2991
  columns?: NonEmptyArray<SelectableColumn<T>>;
2992
+ cache?: number;
2993
+ };
2994
+ declare type CursorQueryOptions = {
2995
+ pagination?: CursorNavigationOptions & OffsetNavigationOptions;
2996
+ filter?: never;
2997
+ sort?: never;
2998
+ };
2999
+ declare type OffsetQueryOptions<T extends XataRecord> = {
3000
+ pagination?: OffsetNavigationOptions;
2804
3001
  filter?: FilterExpression;
2805
3002
  sort?: SortFilter<T> | SortFilter<T>[];
2806
- cache?: number;
2807
3003
  };
3004
+ declare type QueryOptions<T extends XataRecord> = BaseOptions<T> & (CursorQueryOptions | OffsetQueryOptions<T>);
2808
3005
  /**
2809
3006
  * Query objects contain the information of all filters, sorting, etc. to be included in the database query.
2810
3007
  *
@@ -2873,19 +3070,23 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
2873
3070
  */
2874
3071
  select<K extends SelectableColumn<Record>>(columns: NonEmptyArray<K>): Query<Record, SelectedPick<Record, NonEmptyArray<K>>>;
2875
3072
  getPaginated(): Promise<Page<Record, Result>>;
2876
- getPaginated(options: Omit<QueryOptions<Record>, 'columns'>): Promise<Page<Record, Result>>;
3073
+ getPaginated(options: OmitBy<QueryOptions<Record>, 'columns'>): Promise<Page<Record, Result>>;
2877
3074
  getPaginated<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<Page<Record, SelectedPick<Record, typeof options['columns']>>>;
2878
3075
  [Symbol.asyncIterator](): AsyncIterableIterator<Result>;
2879
- getIterator(chunk: number): AsyncGenerator<Result[]>;
2880
- getIterator(chunk: number, options: Omit<QueryOptions<Record>, 'columns' | 'page'>): AsyncGenerator<Result[]>;
2881
- getIterator<Options extends RequiredBy<Omit<QueryOptions<Record>, 'page'>, 'columns'>>(chunk: number, options: Options): AsyncGenerator<SelectedPick<Record, typeof options['columns']>[]>;
3076
+ getIterator(): AsyncGenerator<Result[]>;
3077
+ getIterator(options: OmitBy<QueryOptions<Record>, 'columns' | 'pagination'> & {
3078
+ batchSize?: number;
3079
+ }): AsyncGenerator<Result[]>;
3080
+ getIterator<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'> & {
3081
+ batchSize?: number;
3082
+ }>(options: Options): AsyncGenerator<SelectedPick<Record, typeof options['columns']>[]>;
2882
3083
  /**
2883
3084
  * Performs the query in the database and returns a set of results.
2884
3085
  * @param options Additional options to be used when performing the query.
2885
3086
  * @returns An array of records from the database.
2886
3087
  */
2887
3088
  getMany(): Promise<Result[]>;
2888
- getMany(options: Omit<QueryOptions<Record>, 'columns'>): Promise<Result[]>;
3089
+ getMany(options: OmitBy<QueryOptions<Record>, 'columns'>): Promise<Result[]>;
2889
3090
  getMany<Options extends RequiredBy<QueryOptions<Record>, 'columns'>>(options: Options): Promise<SelectedPick<Record, typeof options['columns']>[]>;
2890
3091
  /**
2891
3092
  * Performs the query in the database and returns all the results.
@@ -2893,17 +3094,21 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
2893
3094
  * @param options Additional options to be used when performing the query.
2894
3095
  * @returns An array of records from the database.
2895
3096
  */
2896
- getAll(chunk?: number): Promise<Result[]>;
2897
- getAll(chunk: number | undefined, options: Omit<QueryOptions<Record>, 'columns' | 'page'>): Promise<Result[]>;
2898
- getAll<Options extends RequiredBy<Omit<QueryOptions<Record>, 'page'>, 'columns'>>(chunk: number | undefined, options: Options): Promise<SelectedPick<Record, typeof options['columns']>[]>;
3097
+ getAll(): Promise<Result[]>;
3098
+ getAll(options: OmitBy<QueryOptions<Record>, 'columns' | 'pagination'> & {
3099
+ batchSize?: number;
3100
+ }): Promise<Result[]>;
3101
+ getAll<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'> & {
3102
+ batchSize?: number;
3103
+ }>(options: Options): Promise<SelectedPick<Record, typeof options['columns']>[]>;
2899
3104
  /**
2900
3105
  * Performs the query in the database and returns the first result.
2901
3106
  * @param options Additional options to be used when performing the query.
2902
3107
  * @returns The first record that matches the query, or null if no record matched the query.
2903
3108
  */
2904
3109
  getFirst(): Promise<Result | null>;
2905
- getFirst(options: Omit<QueryOptions<Record>, 'columns' | 'page'>): Promise<Result | null>;
2906
- getFirst<Options extends RequiredBy<Omit<QueryOptions<Record>, 'page'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, typeof options['columns']> | null>;
3110
+ getFirst(options: OmitBy<QueryOptions<Record>, 'columns' | 'pagination'>): Promise<Result | null>;
3111
+ getFirst<Options extends RequiredBy<OmitBy<QueryOptions<Record>, 'pagination'>, 'columns'>>(options: Options): Promise<SelectedPick<Record, typeof options['columns']> | null>;
2907
3112
  /**
2908
3113
  * Builds a new query object adding a cache TTL in milliseconds.
2909
3114
  * @param ttl The cache TTL in milliseconds.
@@ -2993,14 +3198,11 @@ declare type OffsetNavigationOptions = {
2993
3198
  size?: number;
2994
3199
  offset?: number;
2995
3200
  };
2996
- declare type PaginationOptions = CursorNavigationOptions & OffsetNavigationOptions;
2997
3201
  declare const PAGINATION_MAX_SIZE = 200;
2998
3202
  declare const PAGINATION_DEFAULT_SIZE = 200;
2999
3203
  declare const PAGINATION_MAX_OFFSET = 800;
3000
3204
  declare const PAGINATION_DEFAULT_OFFSET = 0;
3001
3205
 
3002
- declare type TableLink = string[];
3003
- declare type LinkDictionary = Dictionary<TableLink[]>;
3004
3206
  /**
3005
3207
  * Common interface for performing operations on a table.
3006
3208
  */
@@ -3106,7 +3308,6 @@ declare class RestRepository<Data extends BaseData, Record extends XataRecord =
3106
3308
  db: SchemaPluginResult<any>;
3107
3309
  constructor(options: {
3108
3310
  table: string;
3109
- links?: LinkDictionary;
3110
3311
  db: SchemaPluginResult<any>;
3111
3312
  pluginOptions: XataPluginOptions;
3112
3313
  });
@@ -3202,7 +3403,6 @@ declare const includesAny: <T>(value: T) => ArrayFilter<T>;
3202
3403
 
3203
3404
  declare type SchemaDefinition = {
3204
3405
  table: string;
3205
- links?: LinkDictionary;
3206
3406
  };
3207
3407
  declare type SchemaPluginResult<Schemas extends Record<string, BaseData>> = {
3208
3408
  [Key in keyof Schemas]: Repository<Schemas[Key]>;
@@ -3211,9 +3411,8 @@ declare type SchemaPluginResult<Schemas extends Record<string, BaseData>> = {
3211
3411
  };
3212
3412
  declare class SchemaPlugin<Schemas extends Record<string, BaseData>> extends XataPlugin {
3213
3413
  #private;
3214
- private links?;
3215
3414
  private tableNames?;
3216
- constructor(links?: LinkDictionary | undefined, tableNames?: string[] | undefined);
3415
+ constructor(tableNames?: string[] | undefined);
3217
3416
  build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
3218
3417
  }
3219
3418
 
@@ -3235,8 +3434,7 @@ declare type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
3235
3434
  declare class SearchPlugin<Schemas extends Record<string, BaseData>> extends XataPlugin {
3236
3435
  #private;
3237
3436
  private db;
3238
- private links;
3239
- constructor(db: SchemaPluginResult<Schemas>, links: LinkDictionary);
3437
+ constructor(db: SchemaPluginResult<Schemas>);
3240
3438
  build({ getFetchProps }: XataPluginOptions): SearchPluginResult<Schemas>;
3241
3439
  }
3242
3440
  declare type SearchXataRecord = XataRecord & {
@@ -3259,7 +3457,7 @@ declare type BaseClientOptions = {
3259
3457
  };
3260
3458
  declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins | undefined) => ClientConstructor<Plugins>;
3261
3459
  interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
3262
- new <Schemas extends Record<string, BaseData> = {}>(options?: Partial<BaseClientOptions>, links?: LinkDictionary): Omit<{
3460
+ new <Schemas extends Record<string, BaseData> = {}>(options?: Partial<BaseClientOptions>, tables?: string[]): Omit<{
3263
3461
  db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
3264
3462
  search: Awaited<ReturnType<SearchPlugin<Schemas>['build']>>;
3265
3463
  }, keyof Plugins> & {
@@ -3286,4 +3484,4 @@ declare class XataError extends Error {
3286
3484
  constructor(message: string, status: number);
3287
3485
  }
3288
3486
 
3289
- export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, BaseClient, BaseClientOptions, BaseData, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsResponse, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateTableError, CreateTablePathParams, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DeleteBranchError, DeleteBranchPathParams, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableVariables, DeleteUserAPIKeyError, DeleteUserAPIKeyPathParams, DeleteUserAPIKeyVariables, DeleteUserError, DeleteUserVariables, DeleteWorkspaceError, DeleteWorkspacePathParams, DeleteWorkspaceVariables, EditableData, ExecuteBranchMigrationPlanError, ExecuteBranchMigrationPlanPathParams, ExecuteBranchMigrationPlanRequestBody, ExecuteBranchMigrationPlanVariables, FetchImpl, FetcherExtraProps, GetBranchDetailsError, GetBranchDetailsPathParams, GetBranchDetailsVariables, GetBranchListError, GetBranchListPathParams, GetBranchListVariables, GetBranchMetadataError, GetBranchMetadataPathParams, GetBranchMetadataVariables, GetBranchMigrationHistoryError, GetBranchMigrationHistoryPathParams, GetBranchMigrationHistoryRequestBody, GetBranchMigrationHistoryResponse, GetBranchMigrationHistoryVariables, GetBranchMigrationPlanError, GetBranchMigrationPlanPathParams, GetBranchMigrationPlanVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetRecordError, GetRecordPathParams, GetRecordRequestBody, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordResponse, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, LinkDictionary, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationOptions, PaginationQueryMeta, Query, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SelectableColumn, SelectedPick, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addTableColumn, buildClient, bulkInsertTableRecords, cancelWorkspaceMemberInvite, contains, createBranch, createDatabase, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, endsWith, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseURL, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isIdentifiable, isNot, isXataRecord, le, lt, lte, notExists, operationsByTag, pattern, queryTable, removeWorkspaceMember, resendWorkspaceMemberInvite, searchBranch, setTableSchema, startsWith, updateBranchMetadata, updateColumn, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberRole, upsertRecordWithID };
3487
+ export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, BaseClient, BaseClientOptions, BaseData, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsResponse, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateTableError, CreateTablePathParams, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DeleteBranchError, DeleteBranchPathParams, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableVariables, DeleteUserAPIKeyError, DeleteUserAPIKeyPathParams, DeleteUserAPIKeyVariables, DeleteUserError, DeleteUserVariables, DeleteWorkspaceError, DeleteWorkspacePathParams, DeleteWorkspaceVariables, EditableData, ExecuteBranchMigrationPlanError, ExecuteBranchMigrationPlanPathParams, ExecuteBranchMigrationPlanRequestBody, ExecuteBranchMigrationPlanVariables, FetchImpl, FetcherExtraProps, GetBranchDetailsError, GetBranchDetailsPathParams, GetBranchDetailsVariables, GetBranchListError, GetBranchListPathParams, GetBranchListVariables, GetBranchMetadataError, GetBranchMetadataPathParams, GetBranchMetadataVariables, GetBranchMigrationHistoryError, GetBranchMigrationHistoryPathParams, GetBranchMigrationHistoryRequestBody, GetBranchMigrationHistoryResponse, GetBranchMigrationHistoryVariables, GetBranchMigrationPlanError, GetBranchMigrationPlanPathParams, GetBranchMigrationPlanVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetRecordError, GetRecordPathParams, GetRecordRequestBody, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordResponse, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, Query, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, ResolveBranchError, ResolveBranchPathParams, ResolveBranchQueryParams, ResolveBranchResponse, ResolveBranchVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SelectableColumn, SelectedPick, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, buildClient, bulkInsertTableRecords, cancelWorkspaceMemberInvite, contains, createBranch, createDatabase, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, endsWith, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseURL, getGitBranchesMapping, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isIdentifiable, isNot, isXataRecord, le, lt, lte, notExists, operationsByTag, pattern, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, setTableSchema, startsWith, updateBranchMetadata, updateColumn, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberRole, upsertRecordWithID };