@xata.io/client 0.18.5 → 0.18.6

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
@@ -25,6 +25,8 @@ declare type FetcherExtraProps = {
25
25
  apiKey: string;
26
26
  trace: TraceFunction;
27
27
  signal?: AbortSignal;
28
+ clientID?: string;
29
+ sessionID?: string;
28
30
  };
29
31
  declare type ErrorWrapper<TError> = TError | {
30
32
  status: 'unknown';
@@ -548,6 +550,171 @@ declare type SummaryExpressionList = {
548
550
  * @x-go-type xbquery.Summary
549
551
  */
550
552
  declare type SummaryExpression = Record<string, any>;
553
+ /**
554
+ * The description of the aggregations you wish to receive.
555
+ *
556
+ * @example {"totalCount":{"count":"*"},"dailyActiveUsers":{"dateHistogram":{"column":"date","interval":"1d"},"aggs":{"uniqueUsers":{"uniqueCount":{"column":"userID"}}}}}
557
+ */
558
+ declare type AggExpressionMap = {
559
+ [key: string]: AggExpression;
560
+ };
561
+ /**
562
+ * The description of a single aggregation operation. It is an object with only one key-value pair.
563
+ * The key represents the aggreagtion type, while the value is an object with the configuration of
564
+ * the aggreagtion.
565
+ *
566
+ * @x-go-type xata.AggExpression
567
+ */
568
+ declare type AggExpression = {
569
+ count?: CountAgg;
570
+ } | {
571
+ sum?: SumAgg;
572
+ } | {
573
+ max?: MaxAgg;
574
+ } | {
575
+ min?: MinAgg;
576
+ } | {
577
+ average?: AverageAgg;
578
+ } | {
579
+ uniqueCount?: UniqueCountAgg;
580
+ } | {
581
+ dateHistogram?: DateHistogramAgg;
582
+ } | {
583
+ topValues?: TopValuesAgg;
584
+ } | {
585
+ numericHistogram?: NumericHistogramAgg;
586
+ };
587
+ /**
588
+ * Count the number of records with an optional filter.
589
+ */
590
+ declare type CountAgg = {
591
+ filter?: FilterExpression;
592
+ } | '*';
593
+ /**
594
+ * The sum of the numeric values in a particular column.
595
+ */
596
+ declare type SumAgg = {
597
+ /**
598
+ * The column on which to compute the sum. Must be a numeric type.
599
+ */
600
+ column: string;
601
+ };
602
+ /**
603
+ * The max of the numeric values in a particular column.
604
+ */
605
+ declare type MaxAgg = {
606
+ /**
607
+ * The column on which to compute the max. Must be a numeric type.
608
+ */
609
+ column: string;
610
+ };
611
+ /**
612
+ * The min of the numeric values in a particular column.
613
+ */
614
+ declare type MinAgg = {
615
+ /**
616
+ * The column on which to compute the min. Must be a numeric type.
617
+ */
618
+ column: string;
619
+ };
620
+ /**
621
+ * The average of the numeric values in a particular column.
622
+ */
623
+ declare type AverageAgg = {
624
+ /**
625
+ * The column on which to compute the average. Must be a numeric type.
626
+ */
627
+ column: string;
628
+ };
629
+ /**
630
+ * Count the number of distinct values in a particular column.
631
+ */
632
+ declare type UniqueCountAgg = {
633
+ /**
634
+ * The column from where to count the unique values.
635
+ */
636
+ column: string;
637
+ /**
638
+ * The threshold under which the unique count is exact. If the number of unique
639
+ * values in the column is higher than this threshold, the results are approximative.
640
+ * Maximum value is 40,000, default value is 3000.
641
+ */
642
+ precisionThreshold?: number;
643
+ };
644
+ /**
645
+ * Split data into buckets by a datetime column. Accepts sub-aggregations for each bucket.
646
+ */
647
+ declare type DateHistogramAgg = {
648
+ /**
649
+ * The column to use for bucketing. Must be of type datetime.
650
+ */
651
+ column: string;
652
+ /**
653
+ * The fixed interval to use when bucketing.
654
+ * It is fromatted as number + units, for example: `5d`, `20m`, `10s`.
655
+ *
656
+ * @pattern ^(\d+)(d|h|m|s|ms)$
657
+ */
658
+ interval?: string;
659
+ /**
660
+ * The calendar-aware interval to use when bucketing. Possible values are: `minute`,
661
+ * `hour`, `day`, `week`, `month`, `quarter`, `year`.
662
+ */
663
+ calendarInterval?: 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
664
+ /**
665
+ * The timezone to use for bucketing. By default, UTC is assumed.
666
+ * The accepted format is as an ISO 8601 UTC offset. For example: `+01:00` or
667
+ * `-08:00`.
668
+ *
669
+ * @pattern ^[+-][01]\d:[0-5]\d$
670
+ */
671
+ timezone?: string;
672
+ aggs?: AggExpressionMap;
673
+ };
674
+ /**
675
+ * Split data into buckets by the unique values in a column. Accepts sub-aggregations for each bucket.
676
+ * The top values as ordered by the number of records (`$count``) are returned.
677
+ */
678
+ declare type TopValuesAgg = {
679
+ /**
680
+ * The column to use for bucketing. Accepted types are `string`, `email`, `int`, `float`, or `bool`.
681
+ */
682
+ column: string;
683
+ aggs?: AggExpressionMap;
684
+ /**
685
+ * The maximum number of unique values to return.
686
+ *
687
+ * @default 10
688
+ * @maximum 1000
689
+ */
690
+ size?: number;
691
+ };
692
+ /**
693
+ * Split data into buckets by dynamic numeric ranges. Accepts sub-aggregations for each bucket.
694
+ */
695
+ declare type NumericHistogramAgg = {
696
+ /**
697
+ * The column to use for bucketing. Must be of numeric type.
698
+ */
699
+ column: string;
700
+ /**
701
+ * The numeric interval to use for bucketing. The resulting buckets will be ranges
702
+ * with this value as size.
703
+ *
704
+ * @minimum 0
705
+ */
706
+ interval: number;
707
+ /**
708
+ * By default the bucket keys start with 0 and then continue in `interval` steps. The bucket
709
+ * boundaries can be shiftend by using the offset option. For example, if the `interval` is 100,
710
+ * but you prefer the bucket boundaries to be `[50, 150), [150, 250), etc.`, you can set `offset`
711
+ * to 50.
712
+ *
713
+ * @default 0
714
+ */
715
+ offset?: number;
716
+ aggs?: AggExpressionMap;
717
+ };
551
718
  declare type HighlightExpression = {
552
719
  /**
553
720
  * Set to `false` to disable highlighting. By default it is `true`.
@@ -774,6 +941,46 @@ declare type RecordsMetadata = {
774
941
  more: boolean;
775
942
  };
776
943
  };
944
+ declare type AggResponse$1 = (number | null) | {
945
+ values: ({
946
+ $key: string | number;
947
+ $count: number;
948
+ } & {
949
+ [key: string]: AggResponse$1;
950
+ })[];
951
+ };
952
+ /**
953
+ * Metadata of databases
954
+ */
955
+ declare type CPDatabaseMetadata = {
956
+ /**
957
+ * The machine-readable name of a database
958
+ */
959
+ name: string;
960
+ /**
961
+ * Region where this database is hosted
962
+ */
963
+ region: string;
964
+ /**
965
+ * The time this database was created
966
+ */
967
+ createdAt: DateTime;
968
+ /**
969
+ * Metadata about the database for display in Xata user interfaces
970
+ */
971
+ ui?: {
972
+ /**
973
+ * The user-selected color for this database across interfaces
974
+ */
975
+ color?: string;
976
+ };
977
+ };
978
+ declare type CPListDatabasesResponse = {
979
+ /**
980
+ * A list of databases in a Xata workspace
981
+ */
982
+ databases?: CPDatabaseMetadata[];
983
+ };
777
984
  /**
778
985
  * Xata Table Record Metadata
779
986
  */
@@ -839,6 +1046,17 @@ type schemas_TargetExpression = TargetExpression;
839
1046
  type schemas_FilterExpression = FilterExpression;
840
1047
  type schemas_SummaryExpressionList = SummaryExpressionList;
841
1048
  type schemas_SummaryExpression = SummaryExpression;
1049
+ type schemas_AggExpressionMap = AggExpressionMap;
1050
+ type schemas_AggExpression = AggExpression;
1051
+ type schemas_CountAgg = CountAgg;
1052
+ type schemas_SumAgg = SumAgg;
1053
+ type schemas_MaxAgg = MaxAgg;
1054
+ type schemas_MinAgg = MinAgg;
1055
+ type schemas_AverageAgg = AverageAgg;
1056
+ type schemas_UniqueCountAgg = UniqueCountAgg;
1057
+ type schemas_DateHistogramAgg = DateHistogramAgg;
1058
+ type schemas_TopValuesAgg = TopValuesAgg;
1059
+ type schemas_NumericHistogramAgg = NumericHistogramAgg;
842
1060
  type schemas_HighlightExpression = HighlightExpression;
843
1061
  type schemas_BoosterExpression = BoosterExpression;
844
1062
  type schemas_FilterList = FilterList;
@@ -855,6 +1073,8 @@ type schemas_RecordMeta = RecordMeta;
855
1073
  type schemas_RecordID = RecordID;
856
1074
  type schemas_TableRename = TableRename;
857
1075
  type schemas_RecordsMetadata = RecordsMetadata;
1076
+ type schemas_CPDatabaseMetadata = CPDatabaseMetadata;
1077
+ type schemas_CPListDatabasesResponse = CPListDatabasesResponse;
858
1078
  declare namespace schemas {
859
1079
  export {
860
1080
  schemas_User as User,
@@ -915,6 +1135,17 @@ declare namespace schemas {
915
1135
  schemas_FilterExpression as FilterExpression,
916
1136
  schemas_SummaryExpressionList as SummaryExpressionList,
917
1137
  schemas_SummaryExpression as SummaryExpression,
1138
+ schemas_AggExpressionMap as AggExpressionMap,
1139
+ schemas_AggExpression as AggExpression,
1140
+ schemas_CountAgg as CountAgg,
1141
+ schemas_SumAgg as SumAgg,
1142
+ schemas_MaxAgg as MaxAgg,
1143
+ schemas_MinAgg as MinAgg,
1144
+ schemas_AverageAgg as AverageAgg,
1145
+ schemas_UniqueCountAgg as UniqueCountAgg,
1146
+ schemas_DateHistogramAgg as DateHistogramAgg,
1147
+ schemas_TopValuesAgg as TopValuesAgg,
1148
+ schemas_NumericHistogramAgg as NumericHistogramAgg,
918
1149
  schemas_HighlightExpression as HighlightExpression,
919
1150
  schemas_BoosterExpression as BoosterExpression,
920
1151
  ValueBooster$1 as ValueBooster,
@@ -934,6 +1165,9 @@ declare namespace schemas {
934
1165
  schemas_RecordID as RecordID,
935
1166
  schemas_TableRename as TableRename,
936
1167
  schemas_RecordsMetadata as RecordsMetadata,
1168
+ AggResponse$1 as AggResponse,
1169
+ schemas_CPDatabaseMetadata as CPDatabaseMetadata,
1170
+ schemas_CPListDatabasesResponse as CPListDatabasesResponse,
937
1171
  XataRecord$1 as XataRecord,
938
1172
  };
939
1173
  }
@@ -993,6 +1227,14 @@ declare type QueryResponse = {
993
1227
  declare type SummarizeResponse = {
994
1228
  summaries: Record<string, any>[];
995
1229
  };
1230
+ /**
1231
+ * @example {"aggs":{"dailyUniqueUsers":{"values":[{"key":"2022-02-22T22:22:22Z","uniqueUsers":134},{"key":"2022-02-23T22:22:22Z","uniqueUsers":90}]}}}
1232
+ */
1233
+ declare type AggResponse = {
1234
+ aggs?: {
1235
+ [key: string]: AggResponse$1;
1236
+ };
1237
+ };
996
1238
  declare type SearchResponse = {
997
1239
  records: XataRecord$1[];
998
1240
  warning?: string;
@@ -1018,6 +1260,7 @@ type responses_SchemaCompareResponse = SchemaCompareResponse;
1018
1260
  type responses_RecordUpdateResponse = RecordUpdateResponse;
1019
1261
  type responses_QueryResponse = QueryResponse;
1020
1262
  type responses_SummarizeResponse = SummarizeResponse;
1263
+ type responses_AggResponse = AggResponse;
1021
1264
  type responses_SearchResponse = SearchResponse;
1022
1265
  type responses_MigrationIdResponse = MigrationIdResponse;
1023
1266
  declare namespace responses {
@@ -1033,6 +1276,7 @@ declare namespace responses {
1033
1276
  responses_RecordUpdateResponse as RecordUpdateResponse,
1034
1277
  responses_QueryResponse as QueryResponse,
1035
1278
  responses_SummarizeResponse as SummarizeResponse,
1279
+ responses_AggResponse as AggResponse,
1036
1280
  responses_SearchResponse as SearchResponse,
1037
1281
  responses_MigrationIdResponse as MigrationIdResponse,
1038
1282
  };
@@ -4065,7 +4309,7 @@ declare type SummarizeTableError = ErrorWrapper<{
4065
4309
  payload: SimpleError;
4066
4310
  }>;
4067
4311
  declare type SummarizeTableRequestBody = {
4068
- filters?: FilterExpression;
4312
+ filter?: FilterExpression;
4069
4313
  columns?: ColumnsProjection;
4070
4314
  summaries?: SummaryExpressionList;
4071
4315
  sort?: SortExpression;
@@ -4110,7 +4354,7 @@ declare type SummarizeTableVariables = {
4110
4354
  * will count all rows in each group with non-null product names.
4111
4355
  * - Set `sort: [{"total_sales": "desc"}]` in order to bring the rows with
4112
4356
  * the highest total_sales field to the top.
4113
- * - Set `having: {"total_sales": {"$ge": 10}}` to only send back data
4357
+ * - Set `summariesFilter: {"total_sales": {"$ge": 10}}` to only send back data
4114
4358
  * with greater than or equal to 10 units.
4115
4359
  *
4116
4360
  * `columns`: tells Xata how to create each group. If you add `product_id`
@@ -4136,6 +4380,200 @@ declare type SummarizeTableVariables = {
4136
4380
  * possible to use `filter`.
4137
4381
  */
4138
4382
  declare const summarizeTable: (variables: SummarizeTableVariables, signal?: AbortSignal) => Promise<SummarizeResponse>;
4383
+ declare type AggregateTablePathParams = {
4384
+ /**
4385
+ * The DBBranchName matches the pattern `{db_name}:{branch_name}`.
4386
+ */
4387
+ dbBranchName: DBBranchName;
4388
+ /**
4389
+ * The Table name
4390
+ */
4391
+ tableName: TableName;
4392
+ workspace: string;
4393
+ };
4394
+ declare type AggregateTableError = ErrorWrapper<{
4395
+ status: 400;
4396
+ payload: BadRequestError;
4397
+ } | {
4398
+ status: 401;
4399
+ payload: AuthError;
4400
+ } | {
4401
+ status: 404;
4402
+ payload: SimpleError;
4403
+ }>;
4404
+ declare type AggregateTableRequestBody = {
4405
+ filter?: FilterExpression;
4406
+ aggs?: AggExpressionMap;
4407
+ };
4408
+ declare type AggregateTableVariables = {
4409
+ body?: AggregateTableRequestBody;
4410
+ pathParams: AggregateTablePathParams;
4411
+ } & FetcherExtraProps;
4412
+ /**
4413
+ * This endpoint allows you to run aggragations (analytics) on the data from one table.
4414
+ * While the summary endpoint is served from a transactional store and the results are strongly
4415
+ * consistent, the aggregate endpoint is served from our columnar store and the results are
4416
+ * only eventually consistent. On the other hand, the aggregate endpoint uses a
4417
+ * store that is more appropiate for analytics, makes use of approximative algorithms
4418
+ * (e.g for cardinality), and is generally faster and can do more complex aggregations.
4419
+ */
4420
+ declare const aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal) => Promise<AggResponse>;
4421
+ declare type CPGetDatabaseListPathParams = {
4422
+ /**
4423
+ * Workspace ID
4424
+ */
4425
+ workspaceId: WorkspaceID;
4426
+ };
4427
+ declare type CPGetDatabaseListError = ErrorWrapper<{
4428
+ status: 400;
4429
+ payload: BadRequestError;
4430
+ } | {
4431
+ status: 401;
4432
+ payload: AuthError;
4433
+ }>;
4434
+ declare type CPGetDatabaseListVariables = {
4435
+ pathParams: CPGetDatabaseListPathParams;
4436
+ } & FetcherExtraProps;
4437
+ /**
4438
+ * List all databases available in your Workspace.
4439
+ */
4440
+ declare const cPGetDatabaseList: (variables: CPGetDatabaseListVariables, signal?: AbortSignal) => Promise<CPListDatabasesResponse>;
4441
+ declare type CPCreateDatabasePathParams = {
4442
+ /**
4443
+ * Workspace ID
4444
+ */
4445
+ workspaceId: WorkspaceID;
4446
+ /**
4447
+ * The Database Name
4448
+ */
4449
+ dbName: DBName;
4450
+ };
4451
+ declare type CPCreateDatabaseError = ErrorWrapper<{
4452
+ status: 400;
4453
+ payload: BadRequestError;
4454
+ } | {
4455
+ status: 401;
4456
+ payload: AuthError;
4457
+ }>;
4458
+ declare type CPCreateDatabaseResponse = {
4459
+ /**
4460
+ * @minLength 1
4461
+ */
4462
+ databaseName?: string;
4463
+ branchName?: string;
4464
+ };
4465
+ declare type CPCreateDatabaseRequestBody = {
4466
+ /**
4467
+ * @minLength 1
4468
+ */
4469
+ branchName?: string;
4470
+ /**
4471
+ * @minLength 1
4472
+ */
4473
+ region: string;
4474
+ ui?: {
4475
+ color?: string;
4476
+ };
4477
+ metadata?: BranchMetadata;
4478
+ };
4479
+ declare type CPCreateDatabaseVariables = {
4480
+ body: CPCreateDatabaseRequestBody;
4481
+ pathParams: CPCreateDatabasePathParams;
4482
+ } & FetcherExtraProps;
4483
+ /**
4484
+ * Create Database with identifier name
4485
+ */
4486
+ declare const cPCreateDatabase: (variables: CPCreateDatabaseVariables, signal?: AbortSignal) => Promise<CPCreateDatabaseResponse>;
4487
+ declare type CPDeleteDatabasePathParams = {
4488
+ /**
4489
+ * Workspace ID
4490
+ */
4491
+ workspaceId: WorkspaceID;
4492
+ /**
4493
+ * The Database Name
4494
+ */
4495
+ dbName: DBName;
4496
+ };
4497
+ declare type CPDeleteDatabaseError = ErrorWrapper<{
4498
+ status: 400;
4499
+ payload: BadRequestError;
4500
+ } | {
4501
+ status: 401;
4502
+ payload: AuthError;
4503
+ } | {
4504
+ status: 404;
4505
+ payload: SimpleError;
4506
+ }>;
4507
+ declare type CPDeleteDatabaseVariables = {
4508
+ pathParams: CPDeleteDatabasePathParams;
4509
+ } & FetcherExtraProps;
4510
+ /**
4511
+ * Delete a database and all of its branches and tables permanently.
4512
+ */
4513
+ declare const cPDeleteDatabase: (variables: CPDeleteDatabaseVariables, signal?: AbortSignal) => Promise<undefined>;
4514
+ declare type CPGetCPDatabaseMetadataPathParams = {
4515
+ /**
4516
+ * Workspace ID
4517
+ */
4518
+ workspaceId: WorkspaceID;
4519
+ /**
4520
+ * The Database Name
4521
+ */
4522
+ dbName: DBName;
4523
+ };
4524
+ declare type CPGetCPDatabaseMetadataError = ErrorWrapper<{
4525
+ status: 400;
4526
+ payload: BadRequestError;
4527
+ } | {
4528
+ status: 401;
4529
+ payload: AuthError;
4530
+ } | {
4531
+ status: 404;
4532
+ payload: SimpleError;
4533
+ }>;
4534
+ declare type CPGetCPDatabaseMetadataVariables = {
4535
+ pathParams: CPGetCPDatabaseMetadataPathParams;
4536
+ } & FetcherExtraProps;
4537
+ /**
4538
+ * Retrieve metadata of the given database
4539
+ */
4540
+ declare const cPGetCPDatabaseMetadata: (variables: CPGetCPDatabaseMetadataVariables, signal?: AbortSignal) => Promise<CPDatabaseMetadata>;
4541
+ declare type CPUpdateCPDatabaseMetadataPathParams = {
4542
+ /**
4543
+ * Workspace ID
4544
+ */
4545
+ workspaceId: WorkspaceID;
4546
+ /**
4547
+ * The Database Name
4548
+ */
4549
+ dbName: DBName;
4550
+ };
4551
+ declare type CPUpdateCPDatabaseMetadataError = ErrorWrapper<{
4552
+ status: 400;
4553
+ payload: BadRequestError;
4554
+ } | {
4555
+ status: 401;
4556
+ payload: AuthError;
4557
+ } | {
4558
+ status: 404;
4559
+ payload: SimpleError;
4560
+ }>;
4561
+ declare type CPUpdateCPDatabaseMetadataRequestBody = {
4562
+ ui?: {
4563
+ /**
4564
+ * @minLength 1
4565
+ */
4566
+ color?: string;
4567
+ };
4568
+ };
4569
+ declare type CPUpdateCPDatabaseMetadataVariables = {
4570
+ body?: CPUpdateCPDatabaseMetadataRequestBody;
4571
+ pathParams: CPUpdateCPDatabaseMetadataPathParams;
4572
+ } & FetcherExtraProps;
4573
+ /**
4574
+ * Update the color of the selected database
4575
+ */
4576
+ declare const cPUpdateCPDatabaseMetadata: (variables: CPUpdateCPDatabaseMetadataVariables, signal?: AbortSignal) => Promise<CPDatabaseMetadata>;
4139
4577
  declare const operationsByTag: {
4140
4578
  users: {
4141
4579
  getUser: (variables: GetUserVariables, signal?: AbortSignal) => Promise<UserWithID>;
@@ -4225,6 +4663,14 @@ declare const operationsByTag: {
4225
4663
  searchTable: (variables: SearchTableVariables, signal?: AbortSignal) => Promise<SearchResponse>;
4226
4664
  searchBranch: (variables: SearchBranchVariables, signal?: AbortSignal) => Promise<SearchResponse>;
4227
4665
  summarizeTable: (variables: SummarizeTableVariables, signal?: AbortSignal) => Promise<SummarizeResponse>;
4666
+ aggregateTable: (variables: AggregateTableVariables, signal?: AbortSignal) => Promise<AggResponse>;
4667
+ };
4668
+ databases: {
4669
+ cPGetDatabaseList: (variables: CPGetDatabaseListVariables, signal?: AbortSignal) => Promise<CPListDatabasesResponse>;
4670
+ cPCreateDatabase: (variables: CPCreateDatabaseVariables, signal?: AbortSignal) => Promise<CPCreateDatabaseResponse>;
4671
+ cPDeleteDatabase: (variables: CPDeleteDatabaseVariables, signal?: AbortSignal) => Promise<undefined>;
4672
+ cPGetCPDatabaseMetadata: (variables: CPGetCPDatabaseMetadataVariables, signal?: AbortSignal) => Promise<CPDatabaseMetadata>;
4673
+ cPUpdateCPDatabaseMetadata: (variables: CPUpdateCPDatabaseMetadataVariables, signal?: AbortSignal) => Promise<CPDatabaseMetadata>;
4228
4674
  };
4229
4675
  };
4230
4676
 
@@ -4234,6 +4680,10 @@ declare type ProviderBuilder = {
4234
4680
  workspaces: string;
4235
4681
  };
4236
4682
  declare type HostProvider = HostAliases | ProviderBuilder;
4683
+ declare function getHostUrl(provider: HostProvider, type: keyof ProviderBuilder): string;
4684
+ declare function isHostProviderAlias(alias: HostProvider | string): alias is HostAliases;
4685
+ declare function isHostProviderBuilder(builder: HostProvider): builder is ProviderBuilder;
4686
+ declare function parseProviderString(provider?: string): HostProvider | null;
4237
4687
 
4238
4688
  interface XataApiClientOptions {
4239
4689
  fetch?: FetchImpl;
@@ -4332,6 +4782,7 @@ declare class RecordsApi {
4332
4782
  searchTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: SearchTableRequestBody): Promise<SearchResponse>;
4333
4783
  searchBranch(workspace: WorkspaceID, database: DBName, branch: BranchName, query: SearchBranchRequestBody): Promise<SearchResponse>;
4334
4784
  summarizeTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: SummarizeTableRequestBody): Promise<SummarizeResponse>;
4785
+ aggregateTable(workspace: WorkspaceID, database: DBName, branch: BranchName, tableName: TableName, query: AggregateTableRequestBody): Promise<AggResponse>;
4335
4786
  }
4336
4787
  declare class MigrationRequestsApi {
4337
4788
  private extraProps;
@@ -4374,13 +4825,28 @@ declare type RequiredBy<T, K extends keyof T> = T & {
4374
4825
  };
4375
4826
  declare type GetArrayInnerType<T extends readonly any[]> = T[number];
4376
4827
  declare type SingleOrArray<T> = T | T[];
4828
+ declare type Dictionary<T> = Record<string, T>;
4377
4829
  declare type OmitBy<T, K extends keyof T> = T extends any ? Omit<T, K> : never;
4378
4830
  declare type Without<T, U> = {
4379
4831
  [P in Exclude<keyof T, keyof U>]?: never;
4380
4832
  };
4381
4833
  declare type ExclusiveOr<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
4834
+ declare type Explode<T> = keyof T extends infer K ? K extends unknown ? {
4835
+ [I in keyof T]: I extends K ? T[I] : never;
4836
+ } : never : never;
4837
+ declare type AtMostOne<T> = Explode<Partial<T>>;
4838
+ declare type AtLeastOne<T, U = {
4839
+ [K in keyof T]: Pick<T, K>;
4840
+ }> = Partial<T> & U[keyof U];
4841
+ declare type ExactlyOne<T> = AtMostOne<T> & AtLeastOne<T>;
4382
4842
 
4383
4843
  declare type SelectableColumn<O, RecursivePath extends any[] = []> = '*' | 'id' | DataProps<O> | NestedColumns<O, RecursivePath>;
4844
+ declare type WildcardColumns<O> = Values<{
4845
+ [K in SelectableColumn<O>]: K extends `${string}*` ? K : never;
4846
+ }>;
4847
+ declare type ColumnsByValue<O, Value> = Values<{
4848
+ [K in SelectableColumn<O>]: ValueAtColumn<O, K> extends infer C ? C extends Value ? K extends WildcardColumns<O> ? never : K : never : never;
4849
+ }>;
4384
4850
  declare type SelectedPick<O extends XataRecord, Key extends SelectableColumn<O>[]> = XataRecord<O> & UnionToIntersection<Values<{
4385
4851
  [K in Key[number]]: NestedValueAtColumn<O, K> & XataRecord<O>;
4386
4852
  }>>;
@@ -4499,7 +4965,7 @@ declare type EditableData<O extends XataRecord> = Identifiable & Omit<{
4499
4965
  }
4500
4966
  */
4501
4967
  declare type PropertyAccessFilter<Record> = {
4502
- [key in SelectableColumn<Record>]?: NestedApiFilter<ValueAtColumn<Record, key>> | PropertyFilter<ValueAtColumn<Record, key>>;
4968
+ [key in ColumnsByValue<Record, any>]?: NestedApiFilter<ValueAtColumn<Record, key>> | PropertyFilter<ValueAtColumn<Record, key>>;
4503
4969
  };
4504
4970
  declare type PropertyFilter<T> = T | {
4505
4971
  $is: T;
@@ -4561,7 +5027,7 @@ declare type AggregatorFilter<T> = {
4561
5027
  * Example: { filter: { $exists: "settings" } }
4562
5028
  */
4563
5029
  declare type ExistanceFilter<Record> = {
4564
- [key in '$exists' | '$notExists']?: SelectableColumn<Record>;
5030
+ [key in '$exists' | '$notExists']?: ColumnsByValue<Record, any>;
4565
5031
  };
4566
5032
  declare type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFilter<Record> | ExistanceFilter<Record>;
4567
5033
  /**
@@ -4668,15 +5134,215 @@ declare type ExtractTables<Schemas extends Record<string, BaseData>, Tables exte
4668
5134
  table: infer Table;
4669
5135
  } ? ReturnTable<Table, Tables> : never;
4670
5136
 
5137
+ /**
5138
+ * The description of a single aggregation operation. The key represents the
5139
+ */
5140
+ declare type AggregationExpression<O extends XataRecord> = ExactlyOne<{
5141
+ count: CountAggregation<O>;
5142
+ sum: SumAggregation<O>;
5143
+ max: MaxAggregation<O>;
5144
+ min: MinAggregation<O>;
5145
+ average: AverageAggregation<O>;
5146
+ uniqueCount: UniqueCountAggregation<O>;
5147
+ dateHistogram: DateHistogramAggregation<O>;
5148
+ topValues: TopValuesAggregation<O>;
5149
+ numericHistogram: NumericHistogramAggregation<O>;
5150
+ }>;
5151
+ declare type AggregationResult<Record extends XataRecord, Expression extends Dictionary<AggregationExpression<Record>>> = {
5152
+ aggs: {
5153
+ [K in keyof Expression]: AggregationResultItem<Record, Expression[K]>;
5154
+ };
5155
+ };
5156
+ declare type AggregationExpressionType<T extends AggregationExpression<any>> = keyof T;
5157
+ declare type AggregationResultItem<Record extends XataRecord, Expression extends AggregationExpression<Record>> = AggregationExpressionType<Expression> extends infer Type ? Type extends keyof AggregationExpressionResultTypes ? AggregationExpressionResultTypes[Type] : never : never;
5158
+ /**
5159
+ * Count the number of records with an optional filter.
5160
+ */
5161
+ declare type CountAggregation<O extends XataRecord> = {
5162
+ filter?: Filter<O>;
5163
+ } | '*';
5164
+ /**
5165
+ * The sum of the numeric values in a particular column.
5166
+ */
5167
+ declare type SumAggregation<O extends XataRecord> = {
5168
+ /**
5169
+ * The column on which to compute the sum. Must be a numeric type.
5170
+ */
5171
+ column: ColumnsByValue<O, number>;
5172
+ };
5173
+ /**
5174
+ * The max of the numeric values in a particular column.
5175
+ */
5176
+ declare type MaxAggregation<O extends XataRecord> = {
5177
+ /**
5178
+ * The column on which to compute the max. Must be a numeric type.
5179
+ */
5180
+ column: ColumnsByValue<O, number>;
5181
+ };
5182
+ /**
5183
+ * The min of the numeric values in a particular column.
5184
+ */
5185
+ declare type MinAggregation<O extends XataRecord> = {
5186
+ /**
5187
+ * The column on which to compute the min. Must be a numeric type.
5188
+ */
5189
+ column: ColumnsByValue<O, number>;
5190
+ };
5191
+ /**
5192
+ * The average of the numeric values in a particular column.
5193
+ */
5194
+ declare type AverageAggregation<O extends XataRecord> = {
5195
+ /**
5196
+ * The column on which to compute the average. Must be a numeric type.
5197
+ */
5198
+ column: ColumnsByValue<O, number>;
5199
+ };
5200
+ /**
5201
+ * Count the number of distinct values in a particular column.
5202
+ */
5203
+ declare type UniqueCountAggregation<O extends XataRecord> = {
5204
+ /**
5205
+ * The column from where to count the unique values.
5206
+ */
5207
+ column: ColumnsByValue<O, any>;
5208
+ /**
5209
+ * The threshold under which the unique count is exact. If the number of unique
5210
+ * values in the column is higher than this threshold, the results are approximative.
5211
+ * Maximum value is 40,000, default value is 3000.
5212
+ */
5213
+ precisionThreshold?: number;
5214
+ };
5215
+ /**
5216
+ * Split data into buckets by a datetime column. Accepts sub-aggregations for each bucket.
5217
+ */
5218
+ declare type DateHistogramAggregation<O extends XataRecord> = {
5219
+ /**
5220
+ * The column to use for bucketing. Must be of type datetime.
5221
+ */
5222
+ column: ColumnsByValue<O, Date>;
5223
+ /**
5224
+ * The fixed interval to use when bucketing.
5225
+ * It is fromatted as number + units, for example: `5d`, `20m`, `10s`.
5226
+ *
5227
+ * @pattern ^(\d+)(d|h|m|s|ms)$
5228
+ */
5229
+ interval?: string;
5230
+ /**
5231
+ * The calendar-aware interval to use when bucketing. Possible values are: `minute`,
5232
+ * `hour`, `day`, `week`, `month`, `quarter`, `year`.
5233
+ */
5234
+ calendarInterval?: 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
5235
+ /**
5236
+ * The timezone to use for bucketing. By default, UTC is assumed.
5237
+ * The accepted format is as an ISO 8601 UTC offset. For example: `+01:00` or
5238
+ * `-08:00`.
5239
+ *
5240
+ * @pattern ^[+-][01]\d:[0-5]\d$
5241
+ */
5242
+ timezone?: string;
5243
+ aggs?: Dictionary<AggregationExpression<O>>;
5244
+ };
5245
+ /**
5246
+ * Split data into buckets by the unique values in a column. Accepts sub-aggregations for each bucket.
5247
+ * The top values as ordered by the number of records (`$count``) are returned.
5248
+ */
5249
+ declare type TopValuesAggregation<O extends XataRecord> = {
5250
+ /**
5251
+ * The column to use for bucketing. Accepted types are `string`, `email`, `int`, `float`, or `bool`.
5252
+ */
5253
+ column: ColumnsByValue<O, string | number | boolean>;
5254
+ aggs?: Dictionary<AggregationExpression<O>>;
5255
+ /**
5256
+ * The maximum number of unique values to return.
5257
+ *
5258
+ * @default 10
5259
+ * @maximum 1000
5260
+ */
5261
+ size?: number;
5262
+ };
5263
+ /**
5264
+ * Split data into buckets by dynamic numeric ranges. Accepts sub-aggregations for each bucket.
5265
+ */
5266
+ declare type NumericHistogramAggregation<O extends XataRecord> = {
5267
+ /**
5268
+ * The column to use for bucketing. Must be of numeric type.
5269
+ */
5270
+ column: ColumnsByValue<O, number>;
5271
+ /**
5272
+ * The numeric interval to use for bucketing. The resulting buckets will be ranges
5273
+ * with this value as size.
5274
+ *
5275
+ * @minimum 0
5276
+ */
5277
+ interval: number;
5278
+ /**
5279
+ * By default the bucket keys start with 0 and then continue in `interval` steps. The bucket
5280
+ * boundaries can be shiftend by using the offset option. For example, if the `interval` is 100,
5281
+ * but you prefer the bucket boundaries to be `[50, 150), [150, 250), etc.`, you can set `offset`
5282
+ * to 50.
5283
+ *
5284
+ * @default 0
5285
+ */
5286
+ offset?: number;
5287
+ aggs?: Dictionary<AggregationExpression<O>>;
5288
+ };
5289
+ declare type AggregationExpressionResultTypes = {
5290
+ count: number;
5291
+ sum: number | null;
5292
+ max: number | null;
5293
+ min: number | null;
5294
+ average: number | null;
5295
+ uniqueCount: number;
5296
+ dateHistogram: ComplexAggregationResult;
5297
+ topValues: ComplexAggregationResult;
5298
+ numericHistogram: ComplexAggregationResult;
5299
+ };
5300
+ declare type ComplexAggregationResult = {
5301
+ values: Array<{
5302
+ $key: string | number;
5303
+ $count: number;
5304
+ [key: string]: any;
5305
+ }>;
5306
+ };
5307
+
4671
5308
  declare type SortDirection = 'asc' | 'desc';
4672
- declare type SortFilterExtended<T extends XataRecord> = {
4673
- column: SelectableColumn<T>;
5309
+ declare type SortFilterExtended<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = {
5310
+ column: Columns;
4674
5311
  direction?: SortDirection;
4675
5312
  };
4676
- declare type SortFilter<T extends XataRecord> = SelectableColumn<T> | SortFilterExtended<T> | SortFilterBase<T>;
4677
- declare type SortFilterBase<T extends XataRecord> = {
4678
- [Key in StringKeys<T>]: SortDirection;
4679
- };
5313
+ declare type SortFilter<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = Columns | SortFilterExtended<T, Columns> | SortFilterBase<T, Columns>;
5314
+ declare type SortFilterBase<T extends XataRecord, Columns extends string = ColumnsByValue<T, any>> = Values<{
5315
+ [Key in Columns]: {
5316
+ [K in Key]: SortDirection;
5317
+ };
5318
+ }>;
5319
+
5320
+ declare type SummarizeExpression<O extends XataRecord> = ExactlyOne<{
5321
+ count: ColumnsByValue<O, any> | '*';
5322
+ }>;
5323
+ declare type SummarizeParams<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = {
5324
+ summaries?: Expression;
5325
+ summariesFilter?: SummarizeFilter<Record, Expression>;
5326
+ filter?: Filter<Record>;
5327
+ columns?: Columns;
5328
+ sort?: SummarizeSort<Record, Expression>;
5329
+ };
5330
+ declare type SummarizeResult<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = {
5331
+ summaries: SummarizeResultItem<Record, Expression, Columns>[];
5332
+ };
5333
+ declare type SummarizeExpressionResultTypes<Value> = {
5334
+ count: number;
5335
+ min: Value;
5336
+ max: Value;
5337
+ sum: number;
5338
+ avg: number;
5339
+ };
5340
+ declare type SummarizeSort<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>> = SingleOrArray<SortFilter<Record, SelectableColumn<Record> | StringKeys<Expression>>>;
5341
+ declare type SummarizeValuePick<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>> = {
5342
+ [K in StringKeys<Expression>]: StringKeys<Expression[K]> extends infer SummarizeOperation ? SummarizeOperation extends keyof Expression[K] ? Expression[K][SummarizeOperation] extends infer Column ? Column extends SelectableColumn<Record> ? SummarizeOperation extends keyof SummarizeExpressionResultTypes<any> ? SummarizeExpressionResultTypes<ValueAtColumn<Record, Column>>[SummarizeOperation] : never : never : never : never : never;
5343
+ };
5344
+ declare type SummarizeFilter<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>> = Filter<Record> & Filter<SummarizeValuePick<Record, Expression>>;
5345
+ declare type SummarizeResultItem<Record extends XataRecord, Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]> = SummarizeValuePick<Record, Expression> & SelectedPick<Record, Columns>;
4680
5346
 
4681
5347
  declare type BaseOptions<T extends XataRecord> = {
4682
5348
  columns?: SelectableColumn<T>[];
@@ -4690,7 +5356,7 @@ declare type CursorQueryOptions = {
4690
5356
  declare type OffsetQueryOptions<T extends XataRecord> = {
4691
5357
  pagination?: OffsetNavigationOptions;
4692
5358
  filter?: FilterExpression;
4693
- sort?: SortFilter<T> | SortFilter<T>[];
5359
+ sort?: SingleOrArray<SortFilter<T>>;
4694
5360
  };
4695
5361
  declare type QueryOptions<T extends XataRecord> = BaseOptions<T> & (CursorQueryOptions | OffsetQueryOptions<T>);
4696
5362
  /**
@@ -4703,7 +5369,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
4703
5369
  #private;
4704
5370
  readonly meta: PaginationQueryMeta;
4705
5371
  readonly records: RecordArray<Result>;
4706
- constructor(repository: Repository<Record> | null, table: {
5372
+ constructor(repository: RestRepository<Record> | null, table: {
4707
5373
  name: string;
4708
5374
  schema?: Table;
4709
5375
  }, data: Partial<QueryOptions<Record>>, rawParent?: Partial<QueryOptions<Record>>);
@@ -4766,7 +5432,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
4766
5432
  * @param direction The direction. Either ascending or descending.
4767
5433
  * @returns A new Query object.
4768
5434
  */
4769
- sort<F extends SelectableColumn<Record>>(column: F, direction?: SortDirection): Query<Record, Result>;
5435
+ sort<F extends ColumnsByValue<Record, any>>(column: F, direction?: SortDirection): Query<Record, Result>;
4770
5436
  /**
4771
5437
  * Builds a new query specifying the set of columns to be returned in the query response.
4772
5438
  * @param columns Array of column names to be returned by the query.
@@ -4902,6 +5568,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
4902
5568
  * @throws if there are no results.
4903
5569
  */
4904
5570
  getFirstOrThrow(options: OmitBy<QueryOptions<Record>, 'columns' | 'pagination'>): Promise<Result>;
5571
+ summarize<Expression extends Dictionary<SummarizeExpression<Record>>, Columns extends SelectableColumn<Record>[]>(params?: SummarizeParams<Record, Expression, Columns>): Promise<SummarizeResult<Record, Expression, Columns>>;
4905
5572
  /**
4906
5573
  * Builds a new query object adding a cache TTL in milliseconds.
4907
5574
  * @param ttl The cache TTL in milliseconds.
@@ -5461,6 +6128,13 @@ declare abstract class Repository<Record extends XataRecord> extends Query<Recor
5461
6128
  filter?: Filter<Record>;
5462
6129
  boosters?: Boosters<Record>[];
5463
6130
  }): Promise<SearchXataRecord<SelectedPick<Record, ['*']>>[]>;
6131
+ /**
6132
+ * Aggregates records in the table.
6133
+ * @param expression The aggregations to perform.
6134
+ * @param filter The filter to apply to the queried records.
6135
+ * @returns The requested aggregations.
6136
+ */
6137
+ abstract aggregate<Expression extends Dictionary<AggregationExpression<Record>>>(expression?: Expression, filter?: Filter<Record>): Promise<AggregationResult<Record, Expression>>;
5464
6138
  abstract query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
5465
6139
  }
5466
6140
  declare class RestRepository<Record extends XataRecord> extends Query<Record, SelectedPick<Record, ['*']>> implements Repository<Record> {
@@ -5534,7 +6208,9 @@ declare class RestRepository<Record extends XataRecord> extends Query<Record, Se
5534
6208
  filter?: Filter<Record>;
5535
6209
  boosters?: Boosters<Record>[];
5536
6210
  }): Promise<any>;
6211
+ aggregate<Expression extends Dictionary<AggregationExpression<Record>>>(aggs?: Expression, filter?: Filter<Record>): Promise<any>;
5537
6212
  query<Result extends XataRecord>(query: Query<Record, Result>): Promise<Page<Record, Result>>;
6213
+ summarizeTable<Result extends XataRecord>(query: Query<Record, Result>, summaries?: Dictionary<SummarizeExpression<Record>>, summariesFilter?: FilterExpression): Promise<SummarizeResponse>;
5538
6214
  }
5539
6215
 
5540
6216
  declare type BaseSchema = {
@@ -5648,11 +6324,11 @@ declare const le: <T extends ComparableType>(value: T) => ComparableTypeFilter<T
5648
6324
  /**
5649
6325
  * Operator to restrict results to only values that are not null.
5650
6326
  */
5651
- declare const exists: <T>(column: SelectableColumn<T, []>) => ExistanceFilter<T>;
6327
+ declare const exists: <T>(column?: ColumnsByValue<T, any> | undefined) => ExistanceFilter<T>;
5652
6328
  /**
5653
6329
  * Operator to restrict results to only values that are null.
5654
6330
  */
5655
- declare const notExists: <T>(column: SelectableColumn<T, []>) => ExistanceFilter<T>;
6331
+ declare const notExists: <T>(column?: ColumnsByValue<T, any> | undefined) => ExistanceFilter<T>;
5656
6332
  /**
5657
6333
  * Operator to restrict results to only values that start with the given prefix.
5658
6334
  */
@@ -5846,4 +6522,4 @@ declare class XataError extends Error {
5846
6522
  constructor(message: string, status: number);
5847
6523
  }
5848
6524
 
5849
- export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, ApplyBranchSchemaEditError, ApplyBranchSchemaEditPathParams, ApplyBranchSchemaEditRequestBody, ApplyBranchSchemaEditResponse, ApplyBranchSchemaEditVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, 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, DeleteBranchError, DeleteBranchPathParams, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, 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, 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, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, Link, ListMigrationRequestsCommitsError, ListMigrationRequestsCommitsPathParams, ListMigrationRequestsCommitsRequestBody, ListMigrationRequestsCommitsResponse, ListMigrationRequestsCommitsVariables, 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, UpdateBranchSchemaResponse, 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, applyBranchSchemaEdit, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, 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, getMigrationRequest, getMigrationRequestIsMerged, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listMigrationRequestsCommits, lt, lte, mergeMigrationRequest, notExists, operationsByTag, 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 };
6525
+ export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, AggregateTableError, AggregateTablePathParams, AggregateTableRequestBody, AggregateTableVariables, ApplyBranchSchemaEditError, ApplyBranchSchemaEditPathParams, ApplyBranchSchemaEditRequestBody, ApplyBranchSchemaEditResponse, ApplyBranchSchemaEditVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CPCreateDatabaseError, CPCreateDatabasePathParams, CPCreateDatabaseRequestBody, CPCreateDatabaseResponse, CPCreateDatabaseVariables, CPDeleteDatabaseError, CPDeleteDatabasePathParams, CPDeleteDatabaseVariables, CPGetCPDatabaseMetadataError, CPGetCPDatabaseMetadataPathParams, CPGetCPDatabaseMetadataVariables, CPGetDatabaseListError, CPGetDatabaseListPathParams, CPGetDatabaseListVariables, CPUpdateCPDatabaseMetadataError, CPUpdateCPDatabaseMetadataPathParams, CPUpdateCPDatabaseMetadataRequestBody, CPUpdateCPDatabaseMetadataVariables, 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, DeleteBranchError, DeleteBranchPathParams, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, 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, 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, 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, UpdateBranchSchemaResponse, 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, buildClient, buildWorkerRunner, bulkInsertTableRecords, cPCreateDatabase, cPDeleteDatabase, cPGetCPDatabaseMetadata, cPGetDatabaseList, cPUpdateCPDatabaseMetadata, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, createBranch, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, 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, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, 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 };