@xata.io/client 0.20.2 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -24,6 +24,7 @@ declare class SimpleCache implements CacheImpl {
24
24
 
25
25
  declare type AttributeDictionary = Record<string, string | number | boolean | undefined>;
26
26
  declare type TraceFunction = <T>(name: string, fn: (options: {
27
+ name?: string;
27
28
  setAttributes: (attrs: AttributeDictionary) => void;
28
29
  }) => T, options?: AttributeDictionary) => Promise<T>;
29
30
 
@@ -36,12 +37,13 @@ declare type XataPluginOptions = {
36
37
  trace?: TraceFunction;
37
38
  };
38
39
 
39
- declare type FetchImpl = (url: string, init?: {
40
+ declare type RequestInit = {
40
41
  body?: string;
41
42
  headers?: Record<string, string>;
42
43
  method?: string;
43
44
  signal?: any;
44
- }) => Promise<{
45
+ };
46
+ declare type Response = {
45
47
  ok: boolean;
46
48
  status: number;
47
49
  url: string;
@@ -49,7 +51,9 @@ declare type FetchImpl = (url: string, init?: {
49
51
  headers?: {
50
52
  get(name: string): string | null;
51
53
  };
52
- }>;
54
+ };
55
+ declare type FetchImpl = (url: string, init?: RequestInit) => Promise<Response>;
56
+
53
57
  declare type WorkspaceApiUrlBuilder = (path: string, pathParams: Partial<Record<string, string | number>>) => string;
54
58
  declare type FetcherExtraProps = {
55
59
  endpoint: 'controlPlane' | 'dataPlane';
@@ -61,6 +65,7 @@ declare type FetcherExtraProps = {
61
65
  signal?: AbortSignal;
62
66
  clientID?: string;
63
67
  sessionID?: string;
68
+ clientName?: string;
64
69
  fetchOptions?: Record<string, unknown>;
65
70
  };
66
71
 
@@ -73,6 +78,7 @@ declare type ControlPlaneFetcherExtraProps = {
73
78
  signal?: AbortSignal;
74
79
  clientID?: string;
75
80
  sessionID?: string;
81
+ clientName?: string;
76
82
  };
77
83
  declare type ErrorWrapper$1<TError> = TError | {
78
84
  status: 'unknown';
@@ -1259,25 +1265,25 @@ declare type SummaryExpressionList = {
1259
1265
  * We currently support several aggregation functions. Not all functions can be run on all column
1260
1266
  * types.
1261
1267
  *
1262
- * - `count` is used to count the number of records in each group. Use `{"count": "*"}` to count
1263
- * all columns present, otherwise `{"count": "<column_path>"}` to count the number of non-null
1264
- * values are present at column path.
1268
+ * - `count` is used to count the number of records in each group. Use `{"count": "*"}` to count
1269
+ * all columns present, otherwise `{"count": "<column_path>"}` to count the number of non-null
1270
+ * values are present at column path.
1265
1271
  *
1266
- * Count can be used on any column type, and always returns an int.
1272
+ * Count can be used on any column type, and always returns an int.
1267
1273
  *
1268
- * - `min` calculates the minimum value in each group. `min` is compatible with most types;
1269
- * string, multiple, text, email, int, float, and datetime. It returns a value of the same
1270
- * type as operated on. This means that `{"lowest_latency": {"min": "latency"}}` where
1271
- * `latency` is an int, will always return an int.
1274
+ * - `min` calculates the minimum value in each group. `min` is compatible with most types;
1275
+ * string, multiple, text, email, int, float, and datetime. It returns a value of the same
1276
+ * type as operated on. This means that `{"lowest_latency": {"min": "latency"}}` where
1277
+ * `latency` is an int, will always return an int.
1272
1278
  *
1273
- * - `max` calculates the maximum value in each group. `max` shares the same compatibility as
1274
- * `min`.
1279
+ * - `max` calculates the maximum value in each group. `max` shares the same compatibility as
1280
+ * `min`.
1275
1281
  *
1276
- * - `sum` adds up all values in a group. `sum` can be run on `int` and `float` types, and will
1277
- * return a value of the same type as requested.
1282
+ * - `sum` adds up all values in a group. `sum` can be run on `int` and `float` types, and will
1283
+ * return a value of the same type as requested.
1278
1284
  *
1279
- * - `average` averages all values in a group. `average` can be run on `int` and `float` types, and
1280
- * always returns a float.
1285
+ * - `average` averages all values in a group. `average` can be run on `int` and `float` types, and
1286
+ * always returns a float.
1281
1287
  *
1282
1288
  * @example {"count":"deleted_at"}
1283
1289
  * @x-go-type xbquery.Summary
@@ -1486,6 +1492,10 @@ declare type ValueBooster$1 = {
1486
1492
  * The factor with which to multiply the score of the record.
1487
1493
  */
1488
1494
  factor: number;
1495
+ /**
1496
+ * Only apply this booster to the records for which the provided filter matches.
1497
+ */
1498
+ ifMatchesFilter?: FilterExpression;
1489
1499
  };
1490
1500
  /**
1491
1501
  * Boost records based on the value of a numeric column.
@@ -1499,6 +1509,24 @@ declare type NumericBooster$1 = {
1499
1509
  * The factor with which to multiply the value of the column before adding it to the item score.
1500
1510
  */
1501
1511
  factor: number;
1512
+ /**
1513
+ * Modifier to be applied to the column value, before being multiplied with the factor. The possible values are:
1514
+ * - none (default).
1515
+ * - log: common logarithm (base 10)
1516
+ * - log1p: add 1 then take the common logarithm. This ensures that the value is positive if the
1517
+ * value is between 0 and 1.
1518
+ * - ln: natural logarithm (base e)
1519
+ * - ln1p: add 1 then take the natural logarithm. This ensures that the value is positive if the
1520
+ * value is between 0 and 1.
1521
+ * - square: raise the value to the power of two.
1522
+ * - sqrt: take the square root of the value.
1523
+ * - reciprocal: reciprocate the value (if the value is `x`, the reciprocal is `1/x`).
1524
+ */
1525
+ modifier?: 'none' | 'log' | 'log1p' | 'ln' | 'ln1p' | 'square' | 'sqrt' | 'reciprocal';
1526
+ /**
1527
+ * Only apply this booster to the records for which the provided filter matches.
1528
+ */
1529
+ ifMatchesFilter?: FilterExpression;
1502
1530
  };
1503
1531
  /**
1504
1532
  * Boost records based on the value of a datetime column. It is configured via "origin", "scale", and "decay". The further away from the "origin",
@@ -1525,6 +1553,10 @@ declare type DateBooster$1 = {
1525
1553
  * The decay factor to expect at "scale" distance from the "origin".
1526
1554
  */
1527
1555
  decay: number;
1556
+ /**
1557
+ * Only apply this booster to the records for which the provided filter matches.
1558
+ */
1559
+ ifMatchesFilter?: FilterExpression;
1528
1560
  };
1529
1561
  declare type FilterList = FilterExpression | FilterExpression[];
1530
1562
  declare type FilterColumn = FilterColumnIncludes | FilterPredicate | FilterList;
@@ -1604,6 +1636,25 @@ declare type PageConfig = {
1604
1636
  */
1605
1637
  offset?: number;
1606
1638
  };
1639
+ /**
1640
+ * Pagination settings for the search endpoints.
1641
+ */
1642
+ declare type SearchPageConfig = {
1643
+ /**
1644
+ * Set page size.
1645
+ *
1646
+ * @default 25
1647
+ * @maximum 200
1648
+ */
1649
+ size?: number;
1650
+ /**
1651
+ * Use offset to skip entries. To skip pages set offset to a multiple of size.
1652
+ *
1653
+ * @default 0
1654
+ * @maximum 800
1655
+ */
1656
+ offset?: number;
1657
+ };
1607
1658
  /**
1608
1659
  * @example name
1609
1660
  * @example email
@@ -1685,7 +1736,7 @@ declare type AggResponse$1 = (number | null) | {
1685
1736
  /**
1686
1737
  * A transaction operation
1687
1738
  */
1688
- declare type TransactionOperation = {
1739
+ declare type TransactionOperation$1 = {
1689
1740
  insert: TransactionInsertOp;
1690
1741
  } | {
1691
1742
  update: TransactionUpdateOp;
@@ -1927,6 +1978,7 @@ declare type DataPlaneFetcherExtraProps = {
1927
1978
  signal?: AbortSignal;
1928
1979
  clientID?: string;
1929
1980
  sessionID?: string;
1981
+ clientName?: string;
1930
1982
  };
1931
1983
  declare type ErrorWrapper<TError> = TError | {
1932
1984
  status: 'unknown';
@@ -2586,7 +2638,7 @@ declare type BranchTransactionError = ErrorWrapper<{
2586
2638
  payload: SimpleError;
2587
2639
  }>;
2588
2640
  declare type BranchTransactionRequestBody = {
2589
- operations: TransactionOperation[];
2641
+ operations: TransactionOperation$1[];
2590
2642
  };
2591
2643
  declare type BranchTransactionVariables = {
2592
2644
  body: BranchTransactionRequestBody;
@@ -4276,20 +4328,25 @@ declare type QueryTableVariables = {
4276
4328
  *
4277
4329
  * #### Working with arrays
4278
4330
  *
4279
- * To test that an array contains a value, use `$includes`.
4331
+ * To test that an array contains a value, use `$includesAny`.
4280
4332
  *
4281
4333
  * ```json
4282
4334
  * {
4283
4335
  * "filter": {
4284
4336
  * "<array_name>": {
4285
- * "$includes": "value"
4337
+ * "$includesAny": "value"
4286
4338
  * }
4287
4339
  * }
4288
4340
  * }
4289
4341
  * ```
4290
4342
  *
4291
- * The `$includes` operator accepts a custom predicate that will check if any
4292
- * array values matches the predicate. For example a complex predicate can include
4343
+ * ##### `includesAny`
4344
+ *
4345
+ * The `$includesAny` operator accepts a custom predicate that will check if
4346
+ * any value in the array column matches the predicate. The `$includes` operator is a
4347
+ * synonym for the `$includesAny` operator.
4348
+ *
4349
+ * For example a complex predicate can include
4293
4350
  * the `$all` , `$contains` and `$endsWith` operators:
4294
4351
  *
4295
4352
  * ```json
@@ -4307,11 +4364,26 @@ declare type QueryTableVariables = {
4307
4364
  * }
4308
4365
  * ```
4309
4366
  *
4310
- * The `$includes` all operator succeeds if any column in the array matches the
4311
- * predicate. The `$includesAll` operator succeeds if all array items match the
4312
- * predicate. The `$includesNone` operator succeeds if no array item matches the
4313
- * predicate. The `$includes` operator is a synonym for the `$includesAny`
4314
- * operator.
4367
+ * ##### `includesNone`
4368
+ *
4369
+ * The `$includesNone` operator succeeds if no array item matches the
4370
+ * predicate.
4371
+ *
4372
+ * ```json
4373
+ * {
4374
+ * "filter": {
4375
+ * "settings.labels": {
4376
+ * "$includesNone": [{ "$contains": "label" }]
4377
+ * }
4378
+ * }
4379
+ * }
4380
+ * ```
4381
+ * The above matches if none of the array values contain the string "label".
4382
+ *
4383
+ * ##### `includesAll`
4384
+ *
4385
+ * The `$includesAll` operator succeeds if all array items match the
4386
+ * predicate.
4315
4387
  *
4316
4388
  * Here is an example of using the `$includesAll` operator:
4317
4389
  *
@@ -4325,7 +4397,7 @@ declare type QueryTableVariables = {
4325
4397
  * }
4326
4398
  * ```
4327
4399
  *
4328
- * The above matches if all label values contain the string "labels".
4400
+ * The above matches if all array values contain the string "label".
4329
4401
  *
4330
4402
  * ### Sorting
4331
4403
  *
@@ -4512,6 +4584,7 @@ declare type SearchBranchRequestBody = {
4512
4584
  fuzziness?: FuzzinessExpression;
4513
4585
  prefix?: PrefixExpression;
4514
4586
  highlight?: HighlightExpression;
4587
+ page?: SearchPageConfig;
4515
4588
  };
4516
4589
  declare type SearchBranchVariables = {
4517
4590
  body: SearchBranchRequestBody;
@@ -4556,6 +4629,7 @@ declare type SearchTableRequestBody = {
4556
4629
  filter?: FilterExpression;
4557
4630
  highlight?: HighlightExpression;
4558
4631
  boosters?: BoosterExpression[];
4632
+ page?: SearchPageConfig;
4559
4633
  };
4560
4634
  declare type SearchTableVariables = {
4561
4635
  body: SearchTableRequestBody;
@@ -4955,12 +5029,12 @@ type schemas_FilterPredicateRangeOp = FilterPredicateRangeOp;
4955
5029
  type schemas_FilterRangeValue = FilterRangeValue;
4956
5030
  type schemas_FilterValue = FilterValue;
4957
5031
  type schemas_PageConfig = PageConfig;
5032
+ type schemas_SearchPageConfig = SearchPageConfig;
4958
5033
  type schemas_ColumnsProjection = ColumnsProjection;
4959
5034
  type schemas_RecordMeta = RecordMeta;
4960
5035
  type schemas_RecordID = RecordID;
4961
5036
  type schemas_TableRename = TableRename;
4962
5037
  type schemas_RecordsMetadata = RecordsMetadata;
4963
- type schemas_TransactionOperation = TransactionOperation;
4964
5038
  type schemas_TransactionInsertOp = TransactionInsertOp;
4965
5039
  type schemas_TransactionUpdateOp = TransactionUpdateOp;
4966
5040
  type schemas_TransactionDeleteOp = TransactionDeleteOp;
@@ -5059,13 +5133,14 @@ declare namespace schemas {
5059
5133
  schemas_FilterRangeValue as FilterRangeValue,
5060
5134
  schemas_FilterValue as FilterValue,
5061
5135
  schemas_PageConfig as PageConfig,
5136
+ schemas_SearchPageConfig as SearchPageConfig,
5062
5137
  schemas_ColumnsProjection as ColumnsProjection,
5063
5138
  schemas_RecordMeta as RecordMeta,
5064
5139
  schemas_RecordID as RecordID,
5065
5140
  schemas_TableRename as TableRename,
5066
5141
  schemas_RecordsMetadata as RecordsMetadata,
5067
5142
  AggResponse$1 as AggResponse,
5068
- schemas_TransactionOperation as TransactionOperation,
5143
+ TransactionOperation$1 as TransactionOperation,
5069
5144
  schemas_TransactionInsertOp as TransactionInsertOp,
5070
5145
  schemas_TransactionUpdateOp as TransactionUpdateOp,
5071
5146
  schemas_TransactionDeleteOp as TransactionDeleteOp,
@@ -5100,6 +5175,7 @@ interface XataApiClientOptions {
5100
5175
  apiKey?: string;
5101
5176
  host?: HostProvider;
5102
5177
  trace?: TraceFunction;
5178
+ clientName?: string;
5103
5179
  }
5104
5180
  declare class XataApiClient {
5105
5181
  #private;
@@ -5424,7 +5500,7 @@ declare class RecordsApi {
5424
5500
  region: string;
5425
5501
  database: DBName;
5426
5502
  branch: BranchName;
5427
- operations: TransactionOperation[];
5503
+ operations: TransactionOperation$1[];
5428
5504
  }): Promise<TransactionSuccess>;
5429
5505
  }
5430
5506
  declare class SearchAndFilterApi {
@@ -5677,6 +5753,9 @@ declare type RequiredBy<T, K extends keyof T> = T & {
5677
5753
  [P in K]-?: NonNullable<T[P]>;
5678
5754
  };
5679
5755
  declare type GetArrayInnerType<T extends readonly any[]> = T[number];
5756
+ declare type FunctionKeys<T> = {
5757
+ [K in keyof T]: T[K] extends (...args: any) => any ? K : never;
5758
+ }[keyof T];
5680
5759
  declare type SingleOrArray<T> = T | T[];
5681
5760
  declare type Dictionary<T> = Record<string, T>;
5682
5761
  declare type OmitBy<T, K extends keyof T> = T extends any ? Omit<T, K> : never;
@@ -5692,6 +5771,13 @@ declare type AtLeastOne<T, U = {
5692
5771
  [K in keyof T]: Pick<T, K>;
5693
5772
  }> = Partial<T> & U[keyof U];
5694
5773
  declare type ExactlyOne<T> = AtMostOne<T> & AtLeastOne<T>;
5774
+ declare type Fn = (...args: any[]) => any;
5775
+ declare type NarrowRaw<A> = (A extends [] ? [] : never) | (A extends Narrowable ? A : never) | {
5776
+ [K in keyof A]: A[K] extends Fn ? A[K] : NarrowRaw<A[K]>;
5777
+ };
5778
+ declare type Narrowable = string | number | bigint | boolean;
5779
+ declare type Try<A1, A2, Catch = never> = A1 extends A2 ? A1 : Catch;
5780
+ declare type Narrow<A> = Try<A, [], NarrowRaw<A>>;
5695
5781
 
5696
5782
  declare type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | DataProps<O> | NestedColumns<O, RecursivePath>;
5697
5783
  declare type WildcardColumns<O> = Values<{
@@ -5923,27 +6009,71 @@ declare type DateBooster = {
5923
6009
  };
5924
6010
  declare type NumericBooster = {
5925
6011
  factor: number;
6012
+ /**
6013
+ * Modifier to be applied to the column value, before being multiplied with the factor. The possible values are:
6014
+ * - none (default).
6015
+ * - log: common logarithm (base 10)
6016
+ * - log1p: add 1 then take the common logarithm. This ensures that the value is positive if the
6017
+ * value is between 0 and 1.
6018
+ * - ln: natural logarithm (base e)
6019
+ * - ln1p: add 1 then take the natural logarithm. This ensures that the value is positive if the
6020
+ * value is between 0 and 1.
6021
+ * - square: raise the value to the power of two.
6022
+ * - sqrt: take the square root of the value.
6023
+ * - reciprocal: reciprocate the value (if the value is `x`, the reciprocal is `1/x`).
6024
+ */
6025
+ modifier?: 'none' | 'log' | 'log1p' | 'ln' | 'ln1p' | 'square' | 'sqrt' | 'reciprocal';
5926
6026
  };
5927
6027
  declare type ValueBooster<T extends string | number | boolean> = {
5928
6028
  value: T;
5929
6029
  factor: number;
6030
+ /**
6031
+ * Modifier to be applied to the column value, before being multiplied with the factor. The possible values are:
6032
+ * - none (default).
6033
+ * - log: common logarithm (base 10)
6034
+ * - log1p: add 1 then take the common logarithm. This ensures that the value is positive if the
6035
+ * value is between 0 and 1.
6036
+ * - ln: natural logarithm (base e)
6037
+ * - ln1p: add 1 then take the natural logarithm. This ensures that the value is positive if the
6038
+ * value is between 0 and 1.
6039
+ * - square: raise the value to the power of two.
6040
+ * - sqrt: take the square root of the value.
6041
+ * - reciprocal: reciprocate the value (if the value is `x`, the reciprocal is `1/x`).
6042
+ */
6043
+ modifier?: 'none' | 'log' | 'log1p' | 'ln' | 'ln1p' | 'square' | 'sqrt' | 'reciprocal';
5930
6044
  };
5931
6045
  declare type Boosters<O extends XataRecord> = Values<{
5932
6046
  [K in SelectableColumn<O>]: NonNullable<ValueAtColumn<O, K>> extends Date ? {
5933
6047
  dateBooster: {
5934
6048
  column: K;
6049
+ /**
6050
+ * Only apply this booster to the records for which the provided filter matches.
6051
+ */
6052
+ ifMatchesFilter?: Filter<O>;
5935
6053
  } & DateBooster;
5936
6054
  } : NonNullable<ValueAtColumn<O, K>> extends number ? ExclusiveOr<{
5937
6055
  numericBooster?: {
5938
6056
  column: K;
6057
+ /**
6058
+ * Only apply this booster to the records for which the provided filter matches.
6059
+ */
6060
+ ifMatchesFilter?: Filter<O>;
5939
6061
  } & NumericBooster;
5940
6062
  }, {
5941
6063
  valueBooster?: {
5942
6064
  column: K;
6065
+ /**
6066
+ * Only apply this booster to the records for which the provided filter matches.
6067
+ */
6068
+ ifMatchesFilter?: Filter<O>;
5943
6069
  } & ValueBooster<number>;
5944
6070
  }> : NonNullable<ValueAtColumn<O, K>> extends string | boolean ? {
5945
6071
  valueBooster: {
5946
6072
  column: K;
6073
+ /**
6074
+ * Only apply this booster to the records for which the provided filter matches.
6075
+ */
6076
+ ifMatchesFilter?: Filter<O>;
5947
6077
  } & ValueBooster<NonNullable<ValueAtColumn<O, K>>>;
5948
6078
  } : never;
5949
6079
  }>;
@@ -5975,6 +6105,7 @@ declare type SearchOptions<Schemas extends Record<string, BaseData>, Tables exte
5975
6105
  boosters?: Boosters<Schemas[Model] & XataRecord>[];
5976
6106
  };
5977
6107
  }>>;
6108
+ page?: SearchPageConfig;
5978
6109
  };
5979
6110
  declare type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
5980
6111
  all: <Tables extends StringKeys<Schemas>>(query: string, options?: SearchOptions<Schemas, Tables>) => Promise<Values<{
@@ -5990,7 +6121,7 @@ declare type SearchPluginResult<Schemas extends Record<string, BaseData>> = {
5990
6121
  declare class SearchPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
5991
6122
  #private;
5992
6123
  private db;
5993
- constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Schemas.Table[]);
6124
+ constructor(db: SchemaPluginResult<Schemas>, schemaTables?: Table[]);
5994
6125
  build({ getFetchProps }: XataPluginOptions): SearchPluginResult<Schemas>;
5995
6126
  }
5996
6127
  declare type SearchXataRecord<Record extends XataRecord> = Omit<Record, 'getMetadata'> & {
@@ -7098,6 +7229,8 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
7098
7229
  highlight?: HighlightExpression;
7099
7230
  filter?: Filter<Record>;
7100
7231
  boosters?: Boosters<Record>[];
7232
+ page?: SearchPageConfig;
7233
+ target?: TargetColumn<Record>[];
7101
7234
  }): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
7102
7235
  /**
7103
7236
  * Aggregates records in the table.
@@ -7224,6 +7357,8 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
7224
7357
  highlight?: HighlightExpression;
7225
7358
  filter?: Filter<Record>;
7226
7359
  boosters?: Boosters<Record>[];
7360
+ page?: SearchPageConfig;
7361
+ target?: TargetColumn<Record>[];
7227
7362
  }): Promise<any>;
7228
7363
  aggregate<Expression extends Dictionary<AggregationExpression<Record>>>(aggs?: Expression, filter?: Filter<Record>): Promise<any>;
7229
7364
  query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
@@ -7399,10 +7534,91 @@ declare type SchemaPluginResult<Schemas extends Record<string, XataRecord>> = {
7399
7534
  };
7400
7535
  declare class SchemaPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
7401
7536
  #private;
7402
- constructor(schemaTables?: Schemas.Table[]);
7537
+ constructor(schemaTables?: Table[]);
7403
7538
  build(pluginOptions: XataPluginOptions): SchemaPluginResult<Schemas>;
7404
7539
  }
7405
7540
 
7541
+ declare type TransactionOperation<Schemas extends Record<string, BaseData>, Tables extends StringKeys<Schemas>> = {
7542
+ insert: Values<{
7543
+ [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
7544
+ table: Model;
7545
+ } & InsertTransactionOperation<Schemas[Model] & XataRecord>;
7546
+ }>;
7547
+ } | {
7548
+ update: Values<{
7549
+ [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
7550
+ table: Model;
7551
+ } & UpdateTransactionOperation<Schemas[Model] & XataRecord>;
7552
+ }>;
7553
+ } | {
7554
+ delete: Values<{
7555
+ [Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
7556
+ table: Model;
7557
+ } & DeleteTransactionOperation;
7558
+ }>;
7559
+ };
7560
+ declare type InsertTransactionOperation<O extends XataRecord> = {
7561
+ record: Partial<EditableData<O>>;
7562
+ ifVersion?: number;
7563
+ createOnly?: boolean;
7564
+ };
7565
+ declare type UpdateTransactionOperation<O extends XataRecord> = {
7566
+ id: string;
7567
+ fields: Partial<EditableData<O>>;
7568
+ ifVersion?: number;
7569
+ upsert?: boolean;
7570
+ };
7571
+ declare type DeleteTransactionOperation = {
7572
+ id: string;
7573
+ };
7574
+ declare type TransactionOperationSingleResult<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operation extends TransactionOperation<Schema, Table>> = Operation extends {
7575
+ insert: {
7576
+ table: Table;
7577
+ record: {
7578
+ id: infer Id;
7579
+ };
7580
+ };
7581
+ } ? {
7582
+ operation: 'insert';
7583
+ id: Id;
7584
+ rows: number;
7585
+ } : Operation extends {
7586
+ insert: {
7587
+ table: Table;
7588
+ };
7589
+ } ? {
7590
+ operation: 'insert';
7591
+ id: string;
7592
+ rows: number;
7593
+ } : Operation extends {
7594
+ update: {
7595
+ table: Table;
7596
+ id: infer Id;
7597
+ };
7598
+ } ? {
7599
+ operation: 'update';
7600
+ id: Id;
7601
+ rows: number;
7602
+ } : Operation extends {
7603
+ delete: {
7604
+ table: Table;
7605
+ };
7606
+ } ? {
7607
+ operation: 'delete';
7608
+ rows: number;
7609
+ } : never;
7610
+ declare type TransactionOperationResults<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operations extends TransactionOperation<Schema, Table>[]> = Operations extends [infer Head, ...infer Rest] ? Head extends TransactionOperation<Schema, Table> ? Rest extends TransactionOperation<Schema, Table>[] ? [TransactionOperationSingleResult<Schema, Table, Head>, ...TransactionOperationResults<Schema, Table, Rest>] : never : never : [];
7611
+ declare type TransactionResults<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operations extends TransactionOperation<Schema, Table>[]> = {
7612
+ results: TransactionOperationResults<Schema, Table, Operations>;
7613
+ };
7614
+
7615
+ declare type TransactionPluginResult<Schemas extends Record<string, XataRecord>> = {
7616
+ run: <Tables extends StringKeys<Schemas>, Operations extends TransactionOperation<Schemas, Tables>[]>(operations: Narrow<Operations>) => Promise<TransactionResults<Schemas, Tables, Operations>>;
7617
+ };
7618
+ declare class TransactionPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
7619
+ build({ getFetchProps }: XataPluginOptions): TransactionPluginResult<Schemas>;
7620
+ }
7621
+
7406
7622
  declare type BranchStrategyValue = string | undefined | null;
7407
7623
  declare type BranchStrategyBuilder = () => BranchStrategyValue | Promise<BranchStrategyValue>;
7408
7624
  declare type BranchStrategy = BranchStrategyValue | BranchStrategyBuilder;
@@ -7416,12 +7632,14 @@ declare type BaseClientOptions = {
7416
7632
  cache?: CacheImpl;
7417
7633
  trace?: TraceFunction;
7418
7634
  enableBrowser?: boolean;
7635
+ clientName?: string;
7419
7636
  };
7420
7637
  declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins | undefined) => ClientConstructor<Plugins>;
7421
7638
  interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
7422
7639
  new <Schemas extends Record<string, XataRecord> = {}>(options?: Partial<BaseClientOptions>, schemaTables?: readonly BaseSchema[]): Omit<{
7423
7640
  db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
7424
7641
  search: Awaited<ReturnType<SearchPlugin<Schemas>['build']>>;
7642
+ transactions: Awaited<ReturnType<TransactionPlugin<Schemas>['build']>>;
7425
7643
  }, keyof Plugins> & {
7426
7644
  [Key in StringKeys<NonNullable<Plugins>>]: Awaited<ReturnType<NonNullable<Plugins>[Key]['build']>>;
7427
7645
  } & {
@@ -7443,6 +7661,9 @@ declare class Serializer {
7443
7661
  }
7444
7662
  declare const serialize: <T>(data: T) => string;
7445
7663
  declare const deserialize: <T>(json: string) => T;
7664
+ declare type SerializerResult<T> = T extends Record<string, any> ? Omit<{
7665
+ [K in keyof T]: SerializerResult<T[K]>;
7666
+ }, FunctionKeys<T>> : T;
7446
7667
 
7447
7668
  declare type BranchResolutionOptions = {
7448
7669
  databaseURL?: string;
@@ -7533,11 +7754,11 @@ declare type WorkerRunnerConfig = {
7533
7754
  workspace: string;
7534
7755
  worker: string;
7535
7756
  };
7536
- declare function buildWorkerRunner<XataClient>(config: WorkerRunnerConfig): <WorkerFunction extends (ctx: XataWorkerContext<XataClient>, ...args: any[]) => any>(name: string, _worker: WorkerFunction) => (...args: RemoveFirst<Parameters<WorkerFunction>>) => Promise<Awaited<ReturnType<WorkerFunction>>>;
7757
+ declare function buildWorkerRunner<XataClient>(config: WorkerRunnerConfig): <WorkerFunction extends (ctx: XataWorkerContext<XataClient>, ...args: any[]) => any>(name: string, _worker: WorkerFunction) => (...args: RemoveFirst<Parameters<WorkerFunction>>) => Promise<SerializerResult<Awaited<ReturnType<WorkerFunction>>>>;
7537
7758
 
7538
7759
  declare class XataError extends Error {
7539
7760
  readonly status: number;
7540
7761
  constructor(message: string, status: number);
7541
7762
  }
7542
7763
 
7543
- export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, AggregateTableError, AggregateTablePathParams, AggregateTableRequestBody, AggregateTableVariables, ApiExtraProps, ApplyBranchSchemaEditError, ApplyBranchSchemaEditPathParams, ApplyBranchSchemaEditRequestBody, ApplyBranchSchemaEditVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BranchTransactionError, BranchTransactionPathParams, BranchTransactionRequestBody, BranchTransactionVariables, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, ColumnsByValue, CompareBranchSchemasError, CompareBranchSchemasPathParams, CompareBranchSchemasVariables, CompareBranchWithUserSchemaError, CompareBranchWithUserSchemaPathParams, CompareBranchWithUserSchemaRequestBody, CompareBranchWithUserSchemaVariables, CompareMigrationRequestError, CompareMigrationRequestPathParams, CompareMigrationRequestVariables, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchResponse, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateMigrationRequestError, CreateMigrationRequestPathParams, CreateMigrationRequestRequestBody, CreateMigrationRequestResponse, CreateMigrationRequestVariables, CreateTableError, CreateTablePathParams, CreateTableResponse, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DEPRECATEDcreateDatabaseError, DEPRECATEDcreateDatabasePathParams, DEPRECATEDcreateDatabaseRequestBody, DEPRECATEDcreateDatabaseResponse, DEPRECATEDcreateDatabaseVariables, DEPRECATEDdeleteDatabaseError, DEPRECATEDdeleteDatabasePathParams, DEPRECATEDdeleteDatabaseResponse, DEPRECATEDdeleteDatabaseVariables, DEPRECATEDgetDatabaseListError, DEPRECATEDgetDatabaseListPathParams, DEPRECATEDgetDatabaseListVariables, DEPRECATEDgetDatabaseMetadataError, DEPRECATEDgetDatabaseMetadataPathParams, DEPRECATEDgetDatabaseMetadataVariables, DEPRECATEDupdateDatabaseMetadataError, DEPRECATEDupdateDatabaseMetadataPathParams, DEPRECATEDupdateDatabaseMetadataRequestBody, DEPRECATEDupdateDatabaseMetadataVariables, DeleteBranchError, DeleteBranchPathParams, DeleteBranchResponse, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseResponse, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableResponse, 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, GetBranchSchemaHistoryError, GetBranchSchemaHistoryPathParams, GetBranchSchemaHistoryRequestBody, GetBranchSchemaHistoryResponse, GetBranchSchemaHistoryVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetDatabaseMetadataError, GetDatabaseMetadataPathParams, GetDatabaseMetadataVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetMigrationRequestError, GetMigrationRequestIsMergedError, GetMigrationRequestIsMergedPathParams, GetMigrationRequestIsMergedResponse, GetMigrationRequestIsMergedVariables, GetMigrationRequestPathParams, GetMigrationRequestVariables, GetRecordError, GetRecordPathParams, GetRecordQueryParams, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, HostProvider, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, Link, ListMigrationRequestsCommitsError, ListMigrationRequestsCommitsPathParams, ListMigrationRequestsCommitsRequestBody, ListMigrationRequestsCommitsResponse, ListMigrationRequestsCommitsVariables, ListRegionsError, ListRegionsPathParams, ListRegionsVariables, MergeMigrationRequestError, MergeMigrationRequestPathParams, MergeMigrationRequestVariables, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, PreviewBranchSchemaEditError, PreviewBranchSchemaEditPathParams, PreviewBranchSchemaEditRequestBody, PreviewBranchSchemaEditResponse, PreviewBranchSchemaEditVariables, Query, QueryMigrationRequestsError, QueryMigrationRequestsPathParams, QueryMigrationRequestsRequestBody, QueryMigrationRequestsResponse, QueryMigrationRequestsVariables, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RecordArray, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, ResolveBranchError, ResolveBranchPathParams, ResolveBranchQueryParams, ResolveBranchResponse, ResolveBranchVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaInference, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SearchTableError, SearchTablePathParams, SearchTableRequestBody, SearchTableVariables, SearchXataRecord, SelectableColumn, SelectedPick, Serializer, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, SummarizeTableError, SummarizeTablePathParams, SummarizeTableRequestBody, SummarizeTableVariables, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateBranchSchemaError, UpdateBranchSchemaPathParams, UpdateBranchSchemaVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateDatabaseMetadataError, UpdateDatabaseMetadataPathParams, UpdateDatabaseMetadataRequestBody, UpdateDatabaseMetadataVariables, UpdateMigrationRequestError, UpdateMigrationRequestPathParams, UpdateMigrationRequestRequestBody, UpdateMigrationRequestVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberInviteError, UpdateWorkspaceMemberInvitePathParams, UpdateWorkspaceMemberInviteRequestBody, UpdateWorkspaceMemberInviteVariables, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, branchTransaction, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, dEPRECATEDcreateDatabase, dEPRECATEDdeleteDatabase, dEPRECATEDgetDatabaseList, dEPRECATEDgetDatabaseMetadata, dEPRECATEDupdateDatabaseMetadata, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, previewBranchSchemaEdit, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, summarizeTable, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };
7764
+ export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, AggregateTableError, AggregateTablePathParams, AggregateTableRequestBody, AggregateTableVariables, ApiExtraProps, ApplyBranchSchemaEditError, ApplyBranchSchemaEditPathParams, ApplyBranchSchemaEditRequestBody, ApplyBranchSchemaEditVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BranchTransactionError, BranchTransactionPathParams, BranchTransactionRequestBody, BranchTransactionVariables, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, ColumnsByValue, CompareBranchSchemasError, CompareBranchSchemasPathParams, CompareBranchSchemasVariables, CompareBranchWithUserSchemaError, CompareBranchWithUserSchemaPathParams, CompareBranchWithUserSchemaRequestBody, CompareBranchWithUserSchemaVariables, CompareMigrationRequestError, CompareMigrationRequestPathParams, CompareMigrationRequestVariables, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchResponse, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateMigrationRequestError, CreateMigrationRequestPathParams, CreateMigrationRequestRequestBody, CreateMigrationRequestResponse, CreateMigrationRequestVariables, CreateTableError, CreateTablePathParams, CreateTableResponse, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DEPRECATEDcreateDatabaseError, DEPRECATEDcreateDatabasePathParams, DEPRECATEDcreateDatabaseRequestBody, DEPRECATEDcreateDatabaseResponse, DEPRECATEDcreateDatabaseVariables, DEPRECATEDdeleteDatabaseError, DEPRECATEDdeleteDatabasePathParams, DEPRECATEDdeleteDatabaseResponse, DEPRECATEDdeleteDatabaseVariables, DEPRECATEDgetDatabaseListError, DEPRECATEDgetDatabaseListPathParams, DEPRECATEDgetDatabaseListVariables, DEPRECATEDgetDatabaseMetadataError, DEPRECATEDgetDatabaseMetadataPathParams, DEPRECATEDgetDatabaseMetadataVariables, DEPRECATEDupdateDatabaseMetadataError, DEPRECATEDupdateDatabaseMetadataPathParams, DEPRECATEDupdateDatabaseMetadataRequestBody, DEPRECATEDupdateDatabaseMetadataVariables, DeleteBranchError, DeleteBranchPathParams, DeleteBranchResponse, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseResponse, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableResponse, 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, GetBranchSchemaHistoryError, GetBranchSchemaHistoryPathParams, GetBranchSchemaHistoryRequestBody, GetBranchSchemaHistoryResponse, GetBranchSchemaHistoryVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetDatabaseMetadataError, GetDatabaseMetadataPathParams, GetDatabaseMetadataVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetMigrationRequestError, GetMigrationRequestIsMergedError, GetMigrationRequestIsMergedPathParams, GetMigrationRequestIsMergedResponse, GetMigrationRequestIsMergedVariables, GetMigrationRequestPathParams, GetMigrationRequestVariables, GetRecordError, GetRecordPathParams, GetRecordQueryParams, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, HostProvider, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, Link, ListMigrationRequestsCommitsError, ListMigrationRequestsCommitsPathParams, ListMigrationRequestsCommitsRequestBody, ListMigrationRequestsCommitsResponse, ListMigrationRequestsCommitsVariables, ListRegionsError, ListRegionsPathParams, ListRegionsVariables, MergeMigrationRequestError, MergeMigrationRequestPathParams, MergeMigrationRequestVariables, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, PreviewBranchSchemaEditError, PreviewBranchSchemaEditPathParams, PreviewBranchSchemaEditRequestBody, PreviewBranchSchemaEditResponse, PreviewBranchSchemaEditVariables, Query, QueryMigrationRequestsError, QueryMigrationRequestsPathParams, QueryMigrationRequestsRequestBody, QueryMigrationRequestsResponse, QueryMigrationRequestsVariables, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RecordArray, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, ResolveBranchError, ResolveBranchPathParams, ResolveBranchQueryParams, ResolveBranchResponse, ResolveBranchVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaInference, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SearchTableError, SearchTablePathParams, SearchTableRequestBody, SearchTableVariables, SearchXataRecord, SelectableColumn, SelectedPick, Serializer, SerializerResult, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, SummarizeTableError, SummarizeTablePathParams, SummarizeTableRequestBody, SummarizeTableVariables, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateBranchSchemaError, UpdateBranchSchemaPathParams, UpdateBranchSchemaVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateDatabaseMetadataError, UpdateDatabaseMetadataPathParams, UpdateDatabaseMetadataRequestBody, UpdateDatabaseMetadataVariables, UpdateMigrationRequestError, UpdateMigrationRequestPathParams, UpdateMigrationRequestRequestBody, UpdateMigrationRequestVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberInviteError, UpdateWorkspaceMemberInvitePathParams, UpdateWorkspaceMemberInviteRequestBody, UpdateWorkspaceMemberInviteVariables, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, branchTransaction, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, dEPRECATEDcreateDatabase, dEPRECATEDdeleteDatabase, dEPRECATEDgetDatabaseList, dEPRECATEDgetDatabaseMetadata, dEPRECATEDupdateDatabaseMetadata, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, previewBranchSchemaEdit, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, summarizeTable, updateBranchMetadata, updateBranchSchema, updateColumn, updateDatabaseMetadata, updateMigrationRequest, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };