@xata.io/client 0.28.3 → 0.29.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/.turbo/turbo-add-version.log +1 -1
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +20 -0
- package/dist/index.cjs +25 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +179 -44
- package/dist/index.mjs +25 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -100,6 +100,41 @@ type PgRollJobStatusResponse = {
|
|
100
100
|
* @pattern [a-zA-Z0-9_\-~]+
|
101
101
|
*/
|
102
102
|
type PgRollMigrationJobID = string;
|
103
|
+
type PgRollMigrationType = 'pgroll' | 'inferred';
|
104
|
+
type PgRollMigrationHistoryItem = {
|
105
|
+
/**
|
106
|
+
* The name of the migration
|
107
|
+
*/
|
108
|
+
name: string;
|
109
|
+
/**
|
110
|
+
* The pgroll migration that was applied
|
111
|
+
*/
|
112
|
+
migration: string;
|
113
|
+
/**
|
114
|
+
* The timestamp at which the migration was started
|
115
|
+
*
|
116
|
+
* @format date-time
|
117
|
+
*/
|
118
|
+
startedAt: string;
|
119
|
+
/**
|
120
|
+
* The name of the parent migration, if any
|
121
|
+
*/
|
122
|
+
parent?: string;
|
123
|
+
/**
|
124
|
+
* Whether the migration is completed or not
|
125
|
+
*/
|
126
|
+
done: boolean;
|
127
|
+
/**
|
128
|
+
* The type of the migration
|
129
|
+
*/
|
130
|
+
migrationType: PgRollMigrationType;
|
131
|
+
};
|
132
|
+
type PgRollMigrationHistoryResponse = {
|
133
|
+
/**
|
134
|
+
* The migrations that have been applied to the branch
|
135
|
+
*/
|
136
|
+
migrations: PgRollMigrationHistoryItem[];
|
137
|
+
};
|
103
138
|
/**
|
104
139
|
* @maxLength 255
|
105
140
|
* @minLength 1
|
@@ -174,7 +209,7 @@ type ColumnFile = {
|
|
174
209
|
};
|
175
210
|
type Column = {
|
176
211
|
name: string;
|
177
|
-
type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | '
|
212
|
+
type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'datetime' | 'vector' | 'file[]' | 'file' | 'json';
|
178
213
|
link?: ColumnLink;
|
179
214
|
vector?: ColumnVector;
|
180
215
|
file?: ColumnFile;
|
@@ -182,7 +217,6 @@ type Column = {
|
|
182
217
|
notNull?: boolean;
|
183
218
|
defaultValue?: string;
|
184
219
|
unique?: boolean;
|
185
|
-
columns?: Column[];
|
186
220
|
};
|
187
221
|
type RevLink = {
|
188
222
|
table: string;
|
@@ -1571,6 +1605,22 @@ type WorkspaceMembers = {
|
|
1571
1605
|
* @pattern ^ik_[a-zA-Z0-9]+
|
1572
1606
|
*/
|
1573
1607
|
type InviteKey = string;
|
1608
|
+
/**
|
1609
|
+
* Page size.
|
1610
|
+
*
|
1611
|
+
* @x-internal true
|
1612
|
+
* @default 25
|
1613
|
+
* @minimum 0
|
1614
|
+
*/
|
1615
|
+
type PageSize = number;
|
1616
|
+
/**
|
1617
|
+
* Page token
|
1618
|
+
*
|
1619
|
+
* @x-internal true
|
1620
|
+
* @maxLength 255
|
1621
|
+
* @minLength 24
|
1622
|
+
*/
|
1623
|
+
type PageToken = string;
|
1574
1624
|
/**
|
1575
1625
|
* @x-internal true
|
1576
1626
|
* @pattern [a-zA-Z0-9_-~:]+
|
@@ -1589,11 +1639,20 @@ type ClusterShortMetadata = {
|
|
1589
1639
|
*/
|
1590
1640
|
branches: number;
|
1591
1641
|
};
|
1642
|
+
/**
|
1643
|
+
* @x-internal true
|
1644
|
+
*/
|
1645
|
+
type PageResponse = {
|
1646
|
+
size: number;
|
1647
|
+
hasMore: boolean;
|
1648
|
+
token?: string;
|
1649
|
+
};
|
1592
1650
|
/**
|
1593
1651
|
* @x-internal true
|
1594
1652
|
*/
|
1595
1653
|
type ListClustersResponse = {
|
1596
1654
|
clusters: ClusterShortMetadata[];
|
1655
|
+
page: PageResponse;
|
1597
1656
|
};
|
1598
1657
|
/**
|
1599
1658
|
* @x-internal true
|
@@ -2559,6 +2618,16 @@ type ListClustersPathParams = {
|
|
2559
2618
|
*/
|
2560
2619
|
workspaceId: WorkspaceID;
|
2561
2620
|
};
|
2621
|
+
type ListClustersQueryParams = {
|
2622
|
+
/**
|
2623
|
+
* Page size
|
2624
|
+
*/
|
2625
|
+
page?: PageSize;
|
2626
|
+
/**
|
2627
|
+
* Page token
|
2628
|
+
*/
|
2629
|
+
token?: PageToken;
|
2630
|
+
};
|
2562
2631
|
type ListClustersError = ErrorWrapper$1<{
|
2563
2632
|
status: 400;
|
2564
2633
|
payload: BadRequestError;
|
@@ -2568,6 +2637,7 @@ type ListClustersError = ErrorWrapper$1<{
|
|
2568
2637
|
}>;
|
2569
2638
|
type ListClustersVariables = {
|
2570
2639
|
pathParams: ListClustersPathParams;
|
2640
|
+
queryParams?: ListClustersQueryParams;
|
2571
2641
|
} & ControlPlaneFetcherExtraProps;
|
2572
2642
|
/**
|
2573
2643
|
* List all clusters available in your Workspace.
|
@@ -3013,10 +3083,16 @@ type ApplyMigrationError = ErrorWrapper<{
|
|
3013
3083
|
payload: SimpleError$1;
|
3014
3084
|
}>;
|
3015
3085
|
type ApplyMigrationRequestBody = {
|
3016
|
-
|
3017
|
-
|
3086
|
+
/**
|
3087
|
+
* Migration name
|
3088
|
+
*/
|
3089
|
+
name?: string;
|
3090
|
+
operations: {
|
3091
|
+
[key: string]: any;
|
3092
|
+
}[];
|
3093
|
+
};
|
3018
3094
|
type ApplyMigrationVariables = {
|
3019
|
-
body
|
3095
|
+
body: ApplyMigrationRequestBody;
|
3020
3096
|
pathParams: ApplyMigrationPathParams;
|
3021
3097
|
} & DataPlaneFetcherExtraProps;
|
3022
3098
|
/**
|
@@ -3071,6 +3147,28 @@ type PgRollJobStatusVariables = {
|
|
3071
3147
|
pathParams: PgRollJobStatusPathParams;
|
3072
3148
|
} & DataPlaneFetcherExtraProps;
|
3073
3149
|
declare const pgRollJobStatus: (variables: PgRollJobStatusVariables, signal?: AbortSignal) => Promise<PgRollJobStatusResponse>;
|
3150
|
+
type PgRollMigrationHistoryPathParams = {
|
3151
|
+
/**
|
3152
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3153
|
+
*/
|
3154
|
+
dbBranchName: DBBranchName;
|
3155
|
+
workspace: string;
|
3156
|
+
region: string;
|
3157
|
+
};
|
3158
|
+
type PgRollMigrationHistoryError = ErrorWrapper<{
|
3159
|
+
status: 400;
|
3160
|
+
payload: BadRequestError$1;
|
3161
|
+
} | {
|
3162
|
+
status: 401;
|
3163
|
+
payload: AuthError$1;
|
3164
|
+
} | {
|
3165
|
+
status: 404;
|
3166
|
+
payload: SimpleError$1;
|
3167
|
+
}>;
|
3168
|
+
type PgRollMigrationHistoryVariables = {
|
3169
|
+
pathParams: PgRollMigrationHistoryPathParams;
|
3170
|
+
} & DataPlaneFetcherExtraProps;
|
3171
|
+
declare const pgRollMigrationHistory: (variables: PgRollMigrationHistoryVariables, signal?: AbortSignal) => Promise<PgRollMigrationHistoryResponse>;
|
3074
3172
|
type GetBranchListPathParams = {
|
3075
3173
|
/**
|
3076
3174
|
* The Database Name
|
@@ -4878,7 +4976,7 @@ type InsertRecordWithIDVariables = {
|
|
4878
4976
|
queryParams?: InsertRecordWithIDQueryParams;
|
4879
4977
|
} & DataPlaneFetcherExtraProps;
|
4880
4978
|
/**
|
4881
|
-
* By default, IDs are auto-generated when data is
|
4979
|
+
* By default, IDs are auto-generated when data is inserted into Xata. Sending a request to this endpoint allows us to insert a record with a pre-existing ID, bypassing the default automatic ID generation.
|
4882
4980
|
*/
|
4883
4981
|
declare const insertRecordWithID: (variables: InsertRecordWithIDVariables, signal?: AbortSignal) => Promise<RecordUpdateResponse>;
|
4884
4982
|
type UpdateRecordWithIDPathParams = {
|
@@ -6341,7 +6439,7 @@ type AggregateTableVariables = {
|
|
6341
6439
|
* While the summary endpoint is served from a transactional store and the results are strongly
|
6342
6440
|
* consistent, the aggregate endpoint is served from our columnar store and the results are
|
6343
6441
|
* only eventually consistent. On the other hand, the aggregate endpoint uses a
|
6344
|
-
* store that is more
|
6442
|
+
* store that is more appropriate for analytics, makes use of approximation algorithms
|
6345
6443
|
* (e.g for cardinality), and is generally faster and can do more complex aggregations.
|
6346
6444
|
*
|
6347
6445
|
* For usage, see the [API Guide](https://xata.io/docs/api-guide/aggregate).
|
@@ -6465,6 +6563,7 @@ declare const operationsByTag: {
|
|
6465
6563
|
applyMigration: (variables: ApplyMigrationVariables, signal?: AbortSignal | undefined) => Promise<PgRollApplyMigrationResponse>;
|
6466
6564
|
pgRollStatus: (variables: PgRollStatusVariables, signal?: AbortSignal | undefined) => Promise<PgRollJobStatusResponse>;
|
6467
6565
|
pgRollJobStatus: (variables: PgRollJobStatusVariables, signal?: AbortSignal | undefined) => Promise<PgRollJobStatusResponse>;
|
6566
|
+
pgRollMigrationHistory: (variables: PgRollMigrationHistoryVariables, signal?: AbortSignal | undefined) => Promise<PgRollMigrationHistoryResponse>;
|
6468
6567
|
getBranchList: (variables: GetBranchListVariables, signal?: AbortSignal | undefined) => Promise<ListBranchesResponse>;
|
6469
6568
|
getBranchDetails: (variables: GetBranchDetailsVariables, signal?: AbortSignal | undefined) => Promise<DBBranch>;
|
6470
6569
|
createBranch: (variables: CreateBranchVariables, signal?: AbortSignal | undefined) => Promise<CreateBranchResponse>;
|
@@ -6602,7 +6701,7 @@ declare const operationsByTag: {
|
|
6602
6701
|
};
|
6603
6702
|
};
|
6604
6703
|
|
6605
|
-
type HostAliases = 'production' | 'staging' | 'dev';
|
6704
|
+
type HostAliases = 'production' | 'staging' | 'dev' | 'local';
|
6606
6705
|
type ProviderBuilder = {
|
6607
6706
|
main: string;
|
6608
6707
|
workspaces: string;
|
@@ -6724,12 +6823,18 @@ type schemas_OAuthResponseType = OAuthResponseType;
|
|
6724
6823
|
type schemas_OAuthScope = OAuthScope;
|
6725
6824
|
type schemas_ObjectValue = ObjectValue;
|
6726
6825
|
type schemas_PageConfig = PageConfig;
|
6826
|
+
type schemas_PageResponse = PageResponse;
|
6827
|
+
type schemas_PageSize = PageSize;
|
6828
|
+
type schemas_PageToken = PageToken;
|
6727
6829
|
type schemas_PercentilesAgg = PercentilesAgg;
|
6728
6830
|
type schemas_PgRollApplyMigrationResponse = PgRollApplyMigrationResponse;
|
6729
6831
|
type schemas_PgRollJobStatus = PgRollJobStatus;
|
6730
6832
|
type schemas_PgRollJobStatusResponse = PgRollJobStatusResponse;
|
6731
6833
|
type schemas_PgRollJobType = PgRollJobType;
|
6834
|
+
type schemas_PgRollMigrationHistoryItem = PgRollMigrationHistoryItem;
|
6835
|
+
type schemas_PgRollMigrationHistoryResponse = PgRollMigrationHistoryResponse;
|
6732
6836
|
type schemas_PgRollMigrationJobID = PgRollMigrationJobID;
|
6837
|
+
type schemas_PgRollMigrationType = PgRollMigrationType;
|
6733
6838
|
type schemas_PrefixExpression = PrefixExpression;
|
6734
6839
|
type schemas_ProjectionConfig = ProjectionConfig;
|
6735
6840
|
type schemas_QueryColumnsProjection = QueryColumnsProjection;
|
@@ -6783,7 +6888,7 @@ type schemas_WorkspaceMembers = WorkspaceMembers;
|
|
6783
6888
|
type schemas_WorkspaceMeta = WorkspaceMeta;
|
6784
6889
|
type schemas_WorkspacePlan = WorkspacePlan;
|
6785
6890
|
declare namespace schemas {
|
6786
|
-
export type { schemas_APIKeyName as APIKeyName, schemas_AccessToken as AccessToken, schemas_AggExpression as AggExpression, schemas_AggExpressionMap as AggExpressionMap, AggResponse$1 as AggResponse, schemas_AuthorizationCodeRequest as AuthorizationCodeRequest, schemas_AuthorizationCodeResponse as AuthorizationCodeResponse, schemas_AutoscalingConfig as AutoscalingConfig, schemas_AverageAgg as AverageAgg, schemas_BoosterExpression as BoosterExpression, schemas_Branch as Branch, BranchMetadata$1 as BranchMetadata, schemas_BranchMigration as BranchMigration, BranchName$1 as BranchName, schemas_BranchOp as BranchOp, schemas_BranchWithCopyID as BranchWithCopyID, schemas_ClusterConfiguration as ClusterConfiguration, schemas_ClusterCreateDetails as ClusterCreateDetails, schemas_ClusterID as ClusterID, schemas_ClusterMetadata as ClusterMetadata, schemas_ClusterResponse as ClusterResponse, schemas_ClusterShortMetadata as ClusterShortMetadata, schemas_ClusterUpdateDetails as ClusterUpdateDetails, schemas_Column as Column, schemas_ColumnFile as ColumnFile, schemas_ColumnLink as ColumnLink, schemas_ColumnMigration as ColumnMigration, schemas_ColumnName as ColumnName, schemas_ColumnOpAdd as ColumnOpAdd, schemas_ColumnOpRemove as ColumnOpRemove, schemas_ColumnOpRename as ColumnOpRename, schemas_ColumnVector as ColumnVector, schemas_ColumnsProjection as ColumnsProjection, schemas_Commit as Commit, schemas_CountAgg as CountAgg, schemas_DBBranch as DBBranch, schemas_DBBranchName as DBBranchName, DBName$1 as DBName, schemas_DailyTimeWindow as DailyTimeWindow, schemas_DataInputRecord as DataInputRecord, schemas_DatabaseGithubSettings as DatabaseGithubSettings, schemas_DatabaseMetadata as DatabaseMetadata, DateBooster$1 as DateBooster, schemas_DateHistogramAgg as DateHistogramAgg, DateTime$1 as DateTime, schemas_FileAccessID as FileAccessID, schemas_FileItemID as FileItemID, schemas_FileName as FileName, schemas_FileResponse as FileResponse, schemas_FileSignature as FileSignature, schemas_FilterColumn as FilterColumn, schemas_FilterColumnIncludes as FilterColumnIncludes, schemas_FilterExpression as FilterExpression, schemas_FilterList as FilterList, schemas_FilterPredicate as FilterPredicate, schemas_FilterPredicateOp as FilterPredicateOp, schemas_FilterPredicateRangeOp as FilterPredicateRangeOp, schemas_FilterRangeValue as FilterRangeValue, schemas_FilterValue as FilterValue, schemas_FuzzinessExpression as FuzzinessExpression, schemas_HighlightExpression as HighlightExpression, schemas_InputFile as InputFile, schemas_InputFileArray as InputFileArray, schemas_InputFileEntry as InputFileEntry, schemas_InviteID as InviteID, schemas_InviteKey as InviteKey, schemas_ListBranchesResponse as ListBranchesResponse, schemas_ListClustersResponse as ListClustersResponse, schemas_ListDatabasesResponse as ListDatabasesResponse, schemas_ListGitBranchesResponse as ListGitBranchesResponse, schemas_ListRegionsResponse as ListRegionsResponse, schemas_MaintenanceConfig as MaintenanceConfig, schemas_MaxAgg as MaxAgg, schemas_MediaType as MediaType, schemas_MetricsDatapoint as MetricsDatapoint, schemas_MetricsLatency as MetricsLatency, schemas_Migration as Migration, schemas_MigrationColumnOp as MigrationColumnOp, schemas_MigrationObject as MigrationObject, schemas_MigrationOp as MigrationOp, schemas_MigrationRequest as MigrationRequest, schemas_MigrationRequestNumber as MigrationRequestNumber, MigrationStatus$1 as MigrationStatus, schemas_MigrationTableOp as MigrationTableOp, schemas_MinAgg as MinAgg, NumericBooster$1 as NumericBooster, schemas_NumericHistogramAgg as NumericHistogramAgg, schemas_OAuthAccessToken as OAuthAccessToken, schemas_OAuthClientID as OAuthClientID, schemas_OAuthClientPublicDetails as OAuthClientPublicDetails, schemas_OAuthResponseType as OAuthResponseType, schemas_OAuthScope as OAuthScope, schemas_ObjectValue as ObjectValue, schemas_PageConfig as PageConfig, schemas_PercentilesAgg as PercentilesAgg, schemas_PgRollApplyMigrationResponse as PgRollApplyMigrationResponse, schemas_PgRollJobStatus as PgRollJobStatus, schemas_PgRollJobStatusResponse as PgRollJobStatusResponse, schemas_PgRollJobType as PgRollJobType, schemas_PgRollMigrationJobID as PgRollMigrationJobID, schemas_PrefixExpression as PrefixExpression, schemas_ProjectionConfig as ProjectionConfig, schemas_QueryColumnsProjection as QueryColumnsProjection, schemas_RecordID as RecordID, schemas_RecordMeta as RecordMeta, schemas_RecordsMetadata as RecordsMetadata, schemas_Region as Region, schemas_RevLink as RevLink, schemas_Role as Role, schemas_SQLRecord as SQLRecord, schemas_Schema as Schema, schemas_SchemaEditScript as SchemaEditScript, schemas_SearchPageConfig as SearchPageConfig, schemas_SortExpression as SortExpression, schemas_SortOrder as SortOrder, schemas_StartedFromMetadata as StartedFromMetadata, schemas_SumAgg as SumAgg, schemas_SummaryExpression as SummaryExpression, schemas_SummaryExpressionList as SummaryExpressionList, schemas_Table as Table, schemas_TableMigration as TableMigration, schemas_TableName as TableName, schemas_TableOpAdd as TableOpAdd, schemas_TableOpRemove as TableOpRemove, schemas_TableOpRename as TableOpRename, schemas_TableRename as TableRename, schemas_TargetExpression as TargetExpression, schemas_TopValuesAgg as TopValuesAgg, schemas_TransactionDeleteOp as TransactionDeleteOp, schemas_TransactionError as TransactionError, schemas_TransactionFailure as TransactionFailure, schemas_TransactionGetOp as TransactionGetOp, schemas_TransactionInsertOp as TransactionInsertOp, TransactionOperation$1 as TransactionOperation, schemas_TransactionResultColumns as TransactionResultColumns, schemas_TransactionResultDelete as TransactionResultDelete, schemas_TransactionResultGet as TransactionResultGet, schemas_TransactionResultInsert as TransactionResultInsert, schemas_TransactionResultUpdate as TransactionResultUpdate, schemas_TransactionSuccess as TransactionSuccess, schemas_TransactionUpdateOp as TransactionUpdateOp, schemas_UniqueCountAgg as UniqueCountAgg, schemas_User as User, schemas_UserID as UserID, schemas_UserWithID as UserWithID, ValueBooster$1 as ValueBooster, schemas_WeeklyTimeWindow as WeeklyTimeWindow, schemas_Workspace as Workspace, schemas_WorkspaceID as WorkspaceID, schemas_WorkspaceInvite as WorkspaceInvite, schemas_WorkspaceMember as WorkspaceMember, schemas_WorkspaceMembers as WorkspaceMembers, schemas_WorkspaceMeta as WorkspaceMeta, schemas_WorkspacePlan as WorkspacePlan, XataRecord$1 as XataRecord };
|
6891
|
+
export type { schemas_APIKeyName as APIKeyName, schemas_AccessToken as AccessToken, schemas_AggExpression as AggExpression, schemas_AggExpressionMap as AggExpressionMap, AggResponse$1 as AggResponse, schemas_AuthorizationCodeRequest as AuthorizationCodeRequest, schemas_AuthorizationCodeResponse as AuthorizationCodeResponse, schemas_AutoscalingConfig as AutoscalingConfig, schemas_AverageAgg as AverageAgg, schemas_BoosterExpression as BoosterExpression, schemas_Branch as Branch, BranchMetadata$1 as BranchMetadata, schemas_BranchMigration as BranchMigration, BranchName$1 as BranchName, schemas_BranchOp as BranchOp, schemas_BranchWithCopyID as BranchWithCopyID, schemas_ClusterConfiguration as ClusterConfiguration, schemas_ClusterCreateDetails as ClusterCreateDetails, schemas_ClusterID as ClusterID, schemas_ClusterMetadata as ClusterMetadata, schemas_ClusterResponse as ClusterResponse, schemas_ClusterShortMetadata as ClusterShortMetadata, schemas_ClusterUpdateDetails as ClusterUpdateDetails, schemas_Column as Column, schemas_ColumnFile as ColumnFile, schemas_ColumnLink as ColumnLink, schemas_ColumnMigration as ColumnMigration, schemas_ColumnName as ColumnName, schemas_ColumnOpAdd as ColumnOpAdd, schemas_ColumnOpRemove as ColumnOpRemove, schemas_ColumnOpRename as ColumnOpRename, schemas_ColumnVector as ColumnVector, schemas_ColumnsProjection as ColumnsProjection, schemas_Commit as Commit, schemas_CountAgg as CountAgg, schemas_DBBranch as DBBranch, schemas_DBBranchName as DBBranchName, DBName$1 as DBName, schemas_DailyTimeWindow as DailyTimeWindow, schemas_DataInputRecord as DataInputRecord, schemas_DatabaseGithubSettings as DatabaseGithubSettings, schemas_DatabaseMetadata as DatabaseMetadata, DateBooster$1 as DateBooster, schemas_DateHistogramAgg as DateHistogramAgg, DateTime$1 as DateTime, schemas_FileAccessID as FileAccessID, schemas_FileItemID as FileItemID, schemas_FileName as FileName, schemas_FileResponse as FileResponse, schemas_FileSignature as FileSignature, schemas_FilterColumn as FilterColumn, schemas_FilterColumnIncludes as FilterColumnIncludes, schemas_FilterExpression as FilterExpression, schemas_FilterList as FilterList, schemas_FilterPredicate as FilterPredicate, schemas_FilterPredicateOp as FilterPredicateOp, schemas_FilterPredicateRangeOp as FilterPredicateRangeOp, schemas_FilterRangeValue as FilterRangeValue, schemas_FilterValue as FilterValue, schemas_FuzzinessExpression as FuzzinessExpression, schemas_HighlightExpression as HighlightExpression, schemas_InputFile as InputFile, schemas_InputFileArray as InputFileArray, schemas_InputFileEntry as InputFileEntry, schemas_InviteID as InviteID, schemas_InviteKey as InviteKey, schemas_ListBranchesResponse as ListBranchesResponse, schemas_ListClustersResponse as ListClustersResponse, schemas_ListDatabasesResponse as ListDatabasesResponse, schemas_ListGitBranchesResponse as ListGitBranchesResponse, schemas_ListRegionsResponse as ListRegionsResponse, schemas_MaintenanceConfig as MaintenanceConfig, schemas_MaxAgg as MaxAgg, schemas_MediaType as MediaType, schemas_MetricsDatapoint as MetricsDatapoint, schemas_MetricsLatency as MetricsLatency, schemas_Migration as Migration, schemas_MigrationColumnOp as MigrationColumnOp, schemas_MigrationObject as MigrationObject, schemas_MigrationOp as MigrationOp, schemas_MigrationRequest as MigrationRequest, schemas_MigrationRequestNumber as MigrationRequestNumber, MigrationStatus$1 as MigrationStatus, schemas_MigrationTableOp as MigrationTableOp, schemas_MinAgg as MinAgg, NumericBooster$1 as NumericBooster, schemas_NumericHistogramAgg as NumericHistogramAgg, schemas_OAuthAccessToken as OAuthAccessToken, schemas_OAuthClientID as OAuthClientID, schemas_OAuthClientPublicDetails as OAuthClientPublicDetails, schemas_OAuthResponseType as OAuthResponseType, schemas_OAuthScope as OAuthScope, schemas_ObjectValue as ObjectValue, schemas_PageConfig as PageConfig, schemas_PageResponse as PageResponse, schemas_PageSize as PageSize, schemas_PageToken as PageToken, schemas_PercentilesAgg as PercentilesAgg, schemas_PgRollApplyMigrationResponse as PgRollApplyMigrationResponse, schemas_PgRollJobStatus as PgRollJobStatus, schemas_PgRollJobStatusResponse as PgRollJobStatusResponse, schemas_PgRollJobType as PgRollJobType, schemas_PgRollMigrationHistoryItem as PgRollMigrationHistoryItem, schemas_PgRollMigrationHistoryResponse as PgRollMigrationHistoryResponse, schemas_PgRollMigrationJobID as PgRollMigrationJobID, schemas_PgRollMigrationType as PgRollMigrationType, schemas_PrefixExpression as PrefixExpression, schemas_ProjectionConfig as ProjectionConfig, schemas_QueryColumnsProjection as QueryColumnsProjection, schemas_RecordID as RecordID, schemas_RecordMeta as RecordMeta, schemas_RecordsMetadata as RecordsMetadata, schemas_Region as Region, schemas_RevLink as RevLink, schemas_Role as Role, schemas_SQLRecord as SQLRecord, schemas_Schema as Schema, schemas_SchemaEditScript as SchemaEditScript, schemas_SearchPageConfig as SearchPageConfig, schemas_SortExpression as SortExpression, schemas_SortOrder as SortOrder, schemas_StartedFromMetadata as StartedFromMetadata, schemas_SumAgg as SumAgg, schemas_SummaryExpression as SummaryExpression, schemas_SummaryExpressionList as SummaryExpressionList, schemas_Table as Table, schemas_TableMigration as TableMigration, schemas_TableName as TableName, schemas_TableOpAdd as TableOpAdd, schemas_TableOpRemove as TableOpRemove, schemas_TableOpRename as TableOpRename, schemas_TableRename as TableRename, schemas_TargetExpression as TargetExpression, schemas_TopValuesAgg as TopValuesAgg, schemas_TransactionDeleteOp as TransactionDeleteOp, schemas_TransactionError as TransactionError, schemas_TransactionFailure as TransactionFailure, schemas_TransactionGetOp as TransactionGetOp, schemas_TransactionInsertOp as TransactionInsertOp, TransactionOperation$1 as TransactionOperation, schemas_TransactionResultColumns as TransactionResultColumns, schemas_TransactionResultDelete as TransactionResultDelete, schemas_TransactionResultGet as TransactionResultGet, schemas_TransactionResultInsert as TransactionResultInsert, schemas_TransactionResultUpdate as TransactionResultUpdate, schemas_TransactionSuccess as TransactionSuccess, schemas_TransactionUpdateOp as TransactionUpdateOp, schemas_UniqueCountAgg as UniqueCountAgg, schemas_User as User, schemas_UserID as UserID, schemas_UserWithID as UserWithID, ValueBooster$1 as ValueBooster, schemas_WeeklyTimeWindow as WeeklyTimeWindow, schemas_Workspace as Workspace, schemas_WorkspaceID as WorkspaceID, schemas_WorkspaceInvite as WorkspaceInvite, schemas_WorkspaceMember as WorkspaceMember, schemas_WorkspaceMembers as WorkspaceMembers, schemas_WorkspaceMeta as WorkspaceMeta, schemas_WorkspacePlan as WorkspacePlan, XataRecord$1 as XataRecord };
|
6787
6892
|
}
|
6788
6893
|
|
6789
6894
|
type ApiExtraProps = Omit<FetcherExtraProps, 'endpoint'>;
|
@@ -7826,7 +7931,7 @@ type NestedValueAtColumn<O, Key extends SelectableColumn<O>> = Key extends `${in
|
|
7826
7931
|
} : unknown;
|
7827
7932
|
type ForwardNullable<T, R> = T extends NonNullable<T> ? R : R | null;
|
7828
7933
|
|
7829
|
-
declare const RecordColumnTypes: readonly ["bool", "int", "float", "string", "text", "email", "multiple", "link", "
|
7934
|
+
declare const RecordColumnTypes: readonly ["bool", "int", "float", "string", "text", "email", "multiple", "link", "datetime", "vector", "file[]", "file", "json"];
|
7830
7935
|
type Identifier = string;
|
7831
7936
|
/**
|
7832
7937
|
* Represents an identifiable record from the database.
|
@@ -8004,11 +8109,6 @@ type FilterValueAtColumn<Record, F> = NonNullable<ValueAtColumn<Record, F>> exte
|
|
8004
8109
|
"$is": "value",
|
8005
8110
|
"$any": [ "value1", "value2" ],
|
8006
8111
|
},
|
8007
|
-
"settings.plan": {"$any": ["free", "paid"]},
|
8008
|
-
"settings.plan": "free",
|
8009
|
-
"settings": {
|
8010
|
-
"plan": "free"
|
8011
|
-
},
|
8012
8112
|
}
|
8013
8113
|
}
|
8014
8114
|
*/
|
@@ -8052,8 +8152,8 @@ type ValueTypeFilters<T> = T | T extends string ? StringTypeFilter : T extends n
|
|
8052
8152
|
{
|
8053
8153
|
"filter": {
|
8054
8154
|
"$any": {
|
8055
|
-
"
|
8056
|
-
"
|
8155
|
+
"dark": true,
|
8156
|
+
"plan": "free"
|
8057
8157
|
}
|
8058
8158
|
},
|
8059
8159
|
}
|
@@ -8074,7 +8174,7 @@ type AggregatorFilter<T> = {
|
|
8074
8174
|
};
|
8075
8175
|
/**
|
8076
8176
|
* Existance filter
|
8077
|
-
* Example: { filter: { $exists: "
|
8177
|
+
* Example: { filter: { $exists: "dark" } }
|
8078
8178
|
*/
|
8079
8179
|
type ExistanceFilter<Record> = {
|
8080
8180
|
[key in '$exists' | '$notExists']?: FilterColumns<Record>;
|
@@ -9600,13 +9700,6 @@ type BaseSchema = {
|
|
9600
9700
|
link: {
|
9601
9701
|
table: string;
|
9602
9702
|
};
|
9603
|
-
} | {
|
9604
|
-
name: string;
|
9605
|
-
type: 'object';
|
9606
|
-
columns: {
|
9607
|
-
name: string;
|
9608
|
-
type: string;
|
9609
|
-
}[];
|
9610
9703
|
})[];
|
9611
9704
|
};
|
9612
9705
|
type SchemaInference<T extends readonly BaseSchema[]> = T extends never[] ? Record<string, Record<string, any>> : T extends readonly unknown[] ? T[number] extends {
|
@@ -9634,19 +9727,13 @@ type PropertyType<Tables, Properties, PropertyName extends PropertyKey> = Proper
|
|
9634
9727
|
link?: {
|
9635
9728
|
table: infer LinkedTable;
|
9636
9729
|
};
|
9637
|
-
columns?: infer ObjectColumns;
|
9638
9730
|
notNull?: infer NotNull;
|
9639
9731
|
} ? NotNull extends true ? {
|
9640
|
-
[K in PropertyName]: InnerType<Type,
|
9732
|
+
[K in PropertyName]: InnerType<Type, Tables, LinkedTable>;
|
9641
9733
|
} : {
|
9642
|
-
[K in PropertyName]?: InnerType<Type,
|
9734
|
+
[K in PropertyName]?: InnerType<Type, Tables, LinkedTable> | null;
|
9643
9735
|
} : never : never;
|
9644
|
-
type InnerType<Type,
|
9645
|
-
name: string;
|
9646
|
-
type: string;
|
9647
|
-
} ? UnionToIntersection<Values<{
|
9648
|
-
[K in ObjectColumns[number]['name']]: PropertyType<Tables, ObjectColumns[number], K>;
|
9649
|
-
}>> : never : never : Type extends 'link' ? TableType<Tables, LinkedTable> & XataRecord : never;
|
9736
|
+
type InnerType<Type, Tables, LinkedTable> = Type extends 'string' | 'text' | 'email' ? string : Type extends 'int' | 'float' ? number : Type extends 'bool' ? boolean : Type extends 'datetime' ? Date : Type extends 'multiple' ? string[] : Type extends 'vector' ? number[] : Type extends 'file' ? XataFile : Type extends 'file[]' ? XataArrayFile[] : Type extends 'json' ? JSONValue<any> : Type extends 'link' ? TableType<Tables, LinkedTable> & XataRecord : never;
|
9650
9737
|
|
9651
9738
|
/**
|
9652
9739
|
* Operator to restrict results to only values that are greater than the given value.
|
@@ -9806,15 +9893,46 @@ declare class FilesPlugin<Schemas extends Record<string, XataRecord>> extends Xa
|
|
9806
9893
|
}
|
9807
9894
|
|
9808
9895
|
type SQLQueryParams<T = any[]> = {
|
9896
|
+
/**
|
9897
|
+
* The SQL statement to execute.
|
9898
|
+
* @example
|
9899
|
+
* ```ts
|
9900
|
+
* const { records } = await xata.sql<TeamsRecord>({
|
9901
|
+
* statement: `SELECT * FROM teams WHERE name = $1`,
|
9902
|
+
* params: ['A name']
|
9903
|
+
* });
|
9904
|
+
* ```
|
9905
|
+
*
|
9906
|
+
* Be careful when using this with user input and use parametrized statements to avoid SQL injection.
|
9907
|
+
*/
|
9809
9908
|
statement: string;
|
9909
|
+
/**
|
9910
|
+
* The parameters to pass to the SQL statement.
|
9911
|
+
*/
|
9810
9912
|
params?: T;
|
9913
|
+
/**
|
9914
|
+
* The consistency level to use when executing the query.
|
9915
|
+
*/
|
9811
9916
|
consistency?: 'strong' | 'eventual';
|
9812
9917
|
};
|
9813
|
-
type SQLQuery = TemplateStringsArray | SQLQueryParams
|
9814
|
-
type
|
9918
|
+
type SQLQuery = TemplateStringsArray | SQLQueryParams;
|
9919
|
+
type SQLQueryResult<T> = {
|
9920
|
+
/**
|
9921
|
+
* The records returned by the query.
|
9922
|
+
*/
|
9815
9923
|
records: T[];
|
9924
|
+
/**
|
9925
|
+
* The columns metadata returned by the query.
|
9926
|
+
*/
|
9927
|
+
columns?: Record<string, {
|
9928
|
+
type_name: string;
|
9929
|
+
}>;
|
9930
|
+
/**
|
9931
|
+
* Optional warning message returned by the query.
|
9932
|
+
*/
|
9816
9933
|
warning?: string;
|
9817
|
-
}
|
9934
|
+
};
|
9935
|
+
type SQLPluginResult = <T>(query: SQLQuery, ...parameters: any[]) => Promise<SQLQueryResult<T>>;
|
9818
9936
|
declare class SQLPlugin extends XataPlugin {
|
9819
9937
|
build(pluginOptions: XataPluginOptions): SQLPluginResult;
|
9820
9938
|
}
|
@@ -9837,6 +9955,12 @@ type TransactionOperation<Schemas extends Record<string, BaseData>, Tables exten
|
|
9837
9955
|
table: Model;
|
9838
9956
|
} & DeleteTransactionOperation;
|
9839
9957
|
}>;
|
9958
|
+
} | {
|
9959
|
+
get: Values<{
|
9960
|
+
[Model in GetArrayInnerType<NonNullable<Tables[]>>]: {
|
9961
|
+
table: Model;
|
9962
|
+
} & GetTransactionOperation<Schemas[Model] & XataRecord>;
|
9963
|
+
}>;
|
9840
9964
|
};
|
9841
9965
|
type InsertTransactionOperation<O extends XataRecord> = {
|
9842
9966
|
record: Partial<EditableData<O>>;
|
@@ -9853,9 +9977,13 @@ type DeleteTransactionOperation = {
|
|
9853
9977
|
id: string;
|
9854
9978
|
failIfMissing?: boolean;
|
9855
9979
|
};
|
9856
|
-
type
|
9980
|
+
type GetTransactionOperation<O extends XataRecord> = {
|
9981
|
+
id: string;
|
9982
|
+
columns?: SelectableColumn<O>[];
|
9983
|
+
};
|
9984
|
+
type TransactionOperationSingleResult<Schema extends Record<string, BaseData>, Tables extends StringKeys<Schema>, Operation extends TransactionOperation<Schema, Tables>> = Operation extends {
|
9857
9985
|
insert: {
|
9858
|
-
table:
|
9986
|
+
table: Tables;
|
9859
9987
|
record: {
|
9860
9988
|
id: infer Id;
|
9861
9989
|
};
|
@@ -9866,7 +9994,7 @@ type TransactionOperationSingleResult<Schema extends Record<string, BaseData>, T
|
|
9866
9994
|
rows: number;
|
9867
9995
|
} : Operation extends {
|
9868
9996
|
insert: {
|
9869
|
-
table:
|
9997
|
+
table: Tables;
|
9870
9998
|
};
|
9871
9999
|
} ? {
|
9872
10000
|
operation: 'insert';
|
@@ -9874,7 +10002,7 @@ type TransactionOperationSingleResult<Schema extends Record<string, BaseData>, T
|
|
9874
10002
|
rows: number;
|
9875
10003
|
} : Operation extends {
|
9876
10004
|
update: {
|
9877
|
-
table:
|
10005
|
+
table: Tables;
|
9878
10006
|
id: infer Id;
|
9879
10007
|
};
|
9880
10008
|
} ? {
|
@@ -9883,12 +10011,19 @@ type TransactionOperationSingleResult<Schema extends Record<string, BaseData>, T
|
|
9883
10011
|
rows: number;
|
9884
10012
|
} : Operation extends {
|
9885
10013
|
delete: {
|
9886
|
-
table:
|
10014
|
+
table: Tables;
|
9887
10015
|
};
|
9888
10016
|
} ? {
|
9889
10017
|
operation: 'delete';
|
9890
10018
|
rows: number;
|
9891
|
-
} :
|
10019
|
+
} : Operation extends {
|
10020
|
+
get: {
|
10021
|
+
table: infer Table;
|
10022
|
+
};
|
10023
|
+
} ? Table extends Tables ? {
|
10024
|
+
operation: 'get';
|
10025
|
+
columns: SelectedPick<Schema[Table] & XataRecord, ['*']>;
|
10026
|
+
} : never : never;
|
9892
10027
|
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 : [];
|
9893
10028
|
type TransactionResults<Schema extends Record<string, BaseData>, Table extends StringKeys<Schema>, Operations extends TransactionOperation<Schema, Table>[]> = {
|
9894
10029
|
results: TransactionOperationResults<Schema, Table, Operations>;
|
@@ -9964,4 +10099,4 @@ declare class XataError extends Error {
|
|
9964
10099
|
constructor(message: string, status: number);
|
9965
10100
|
}
|
9966
10101
|
|
9967
|
-
export { type AcceptWorkspaceMemberInviteError, type AcceptWorkspaceMemberInvitePathParams, type AcceptWorkspaceMemberInviteVariables, type AddGitBranchesEntryError, type AddGitBranchesEntryPathParams, type AddGitBranchesEntryRequestBody, type AddGitBranchesEntryResponse, type AddGitBranchesEntryVariables, type AddTableColumnError, type AddTableColumnPathParams, type AddTableColumnVariables, type AggregateTableError, type AggregateTablePathParams, type AggregateTableRequestBody, type AggregateTableVariables, type ApiExtraProps, type ApplyBranchSchemaEditError, type ApplyBranchSchemaEditPathParams, type ApplyBranchSchemaEditRequestBody, type ApplyBranchSchemaEditVariables, type ApplyMigrationError, type ApplyMigrationPathParams, type ApplyMigrationRequestBody, type ApplyMigrationVariables, type AskOptions, type AskResult, type AskTableError, type AskTablePathParams, type AskTableRequestBody, type AskTableResponse, type AskTableSessionError, type AskTableSessionPathParams, type AskTableSessionRequestBody, type AskTableSessionResponse, type AskTableSessionVariables, type AskTableVariables, BaseClient, type BaseClientOptions, type BaseData, type BaseSchema, type BinaryFile, type BranchTransactionError, type BranchTransactionPathParams, type BranchTransactionRequestBody, type BranchTransactionVariables, type BulkInsertTableRecordsError, type BulkInsertTableRecordsPathParams, type BulkInsertTableRecordsQueryParams, type BulkInsertTableRecordsRequestBody, type BulkInsertTableRecordsVariables, type CacheImpl, type CancelWorkspaceMemberInviteError, type CancelWorkspaceMemberInvitePathParams, type CancelWorkspaceMemberInviteVariables, type ClientConstructor, type ColumnsByValue, type CompareBranchSchemasError, type CompareBranchSchemasPathParams, type CompareBranchSchemasRequestBody, type CompareBranchSchemasVariables, type CompareBranchWithUserSchemaError, type CompareBranchWithUserSchemaPathParams, type CompareBranchWithUserSchemaRequestBody, type CompareBranchWithUserSchemaVariables, type CompareMigrationRequestError, type CompareMigrationRequestPathParams, type CompareMigrationRequestVariables, type CopyBranchError, type CopyBranchPathParams, type CopyBranchRequestBody, type CopyBranchVariables, type CreateBranchError, type CreateBranchPathParams, type CreateBranchQueryParams, type CreateBranchRequestBody, type CreateBranchResponse, type CreateBranchVariables, type CreateClusterError, type CreateClusterPathParams, type CreateClusterVariables, type CreateDatabaseError, type CreateDatabasePathParams, type CreateDatabaseRequestBody, type CreateDatabaseResponse, type CreateDatabaseVariables, type CreateMigrationRequestError, type CreateMigrationRequestPathParams, type CreateMigrationRequestRequestBody, type CreateMigrationRequestResponse, type CreateMigrationRequestVariables, type CreateTableError, type CreateTablePathParams, type CreateTableResponse, type CreateTableVariables, type CreateUserAPIKeyError, type CreateUserAPIKeyPathParams, type CreateUserAPIKeyResponse, type CreateUserAPIKeyVariables, type CreateWorkspaceError, type CreateWorkspaceVariables, type CursorNavigationOptions, type DeleteBranchError, type DeleteBranchPathParams, type DeleteBranchResponse, type DeleteBranchVariables, type DeleteColumnError, type DeleteColumnPathParams, type DeleteColumnVariables, type DeleteDatabaseError, type DeleteDatabaseGithubSettingsError, type DeleteDatabaseGithubSettingsPathParams, type DeleteDatabaseGithubSettingsVariables, type DeleteDatabasePathParams, type DeleteDatabaseResponse, type DeleteDatabaseVariables, type DeleteFileError, type DeleteFileItemError, type DeleteFileItemPathParams, type DeleteFileItemVariables, type DeleteFilePathParams, type DeleteFileVariables, type DeleteOAuthAccessTokenError, type DeleteOAuthAccessTokenPathParams, type DeleteOAuthAccessTokenVariables, type DeleteRecordError, type DeleteRecordPathParams, type DeleteRecordQueryParams, type DeleteRecordVariables, type DeleteTableError, type DeleteTablePathParams, type DeleteTableResponse, type DeleteTableVariables, type DeleteTransactionOperation, type DeleteUserAPIKeyError, type DeleteUserAPIKeyPathParams, type DeleteUserAPIKeyVariables, type DeleteUserError, type DeleteUserOAuthClientError, type DeleteUserOAuthClientPathParams, type DeleteUserOAuthClientVariables, type DeleteUserVariables, type DeleteWorkspaceError, type DeleteWorkspacePathParams, type DeleteWorkspaceVariables, type DeserializedType, type DownloadDestination, type EditableData, type ExecuteBranchMigrationPlanError, type ExecuteBranchMigrationPlanPathParams, type ExecuteBranchMigrationPlanRequestBody, type ExecuteBranchMigrationPlanVariables, type FetchImpl, FetcherError, type FetcherExtraProps, type FileAccessError, type FileAccessPathParams, type FileAccessQueryParams, type FileAccessVariables, type FileUploadError, type FileUploadPathParams, type FileUploadQueryParams, type FileUploadVariables, FilesPlugin, type FilesPluginResult, type GetAuthorizationCodeError, type GetAuthorizationCodeQueryParams, type GetAuthorizationCodeVariables, type GetBranchDetailsError, type GetBranchDetailsPathParams, type GetBranchDetailsVariables, type GetBranchListError, type GetBranchListPathParams, type GetBranchListVariables, type GetBranchMetadataError, type GetBranchMetadataPathParams, type GetBranchMetadataVariables, type GetBranchMigrationHistoryError, type GetBranchMigrationHistoryPathParams, type GetBranchMigrationHistoryRequestBody, type GetBranchMigrationHistoryResponse, type GetBranchMigrationHistoryVariables, type GetBranchMigrationPlanError, type GetBranchMigrationPlanPathParams, type GetBranchMigrationPlanVariables, type GetBranchSchemaHistoryError, type GetBranchSchemaHistoryPathParams, type GetBranchSchemaHistoryRequestBody, type GetBranchSchemaHistoryResponse, type GetBranchSchemaHistoryVariables, type GetBranchStatsError, type GetBranchStatsPathParams, type GetBranchStatsResponse, type GetBranchStatsVariables, type GetClusterError, type GetClusterPathParams, type GetClusterVariables, type GetColumnError, type GetColumnPathParams, type GetColumnVariables, type GetDatabaseGithubSettingsError, type GetDatabaseGithubSettingsPathParams, type GetDatabaseGithubSettingsVariables, type GetDatabaseListError, type GetDatabaseListPathParams, type GetDatabaseListVariables, type GetDatabaseMetadataError, type GetDatabaseMetadataPathParams, type GetDatabaseMetadataVariables, type GetFileError, type GetFileItemError, type GetFileItemPathParams, type GetFileItemVariables, type GetFilePathParams, type GetFileVariables, type GetGitBranchesMappingError, type GetGitBranchesMappingPathParams, type GetGitBranchesMappingVariables, type GetMigrationRequestError, type GetMigrationRequestIsMergedError, type GetMigrationRequestIsMergedPathParams, type GetMigrationRequestIsMergedResponse, type GetMigrationRequestIsMergedVariables, type GetMigrationRequestPathParams, type GetMigrationRequestVariables, type GetRecordError, type GetRecordPathParams, type GetRecordQueryParams, type GetRecordVariables, type GetSchemaError, type GetSchemaPathParams, type GetSchemaResponse, type GetSchemaVariables, type GetTableColumnsError, type GetTableColumnsPathParams, type GetTableColumnsResponse, type GetTableColumnsVariables, type GetTableSchemaError, type GetTableSchemaPathParams, type GetTableSchemaResponse, type GetTableSchemaVariables, type GetUserAPIKeysError, type GetUserAPIKeysResponse, type GetUserAPIKeysVariables, type GetUserError, type GetUserOAuthAccessTokensError, type GetUserOAuthAccessTokensResponse, type GetUserOAuthAccessTokensVariables, type GetUserOAuthClientsError, type GetUserOAuthClientsResponse, type GetUserOAuthClientsVariables, type GetUserVariables, type GetWorkspaceError, type GetWorkspaceMembersListError, type GetWorkspaceMembersListPathParams, type GetWorkspaceMembersListVariables, type GetWorkspacePathParams, type GetWorkspaceVariables, type GetWorkspacesListError, type GetWorkspacesListResponse, type GetWorkspacesListVariables, type GrantAuthorizationCodeError, type GrantAuthorizationCodeVariables, type HostProvider, type Identifiable, type ImageTransformations, type InsertRecordError, type InsertRecordPathParams, type InsertRecordQueryParams, type InsertRecordVariables, type InsertRecordWithIDError, type InsertRecordWithIDPathParams, type InsertRecordWithIDQueryParams, type InsertRecordWithIDVariables, type InsertTransactionOperation, type InviteWorkspaceMemberError, type InviteWorkspaceMemberPathParams, type InviteWorkspaceMemberRequestBody, type InviteWorkspaceMemberVariables, type JSONData, type KeywordAskOptions, type Link, type ListClustersError, type ListClustersPathParams, type ListClustersVariables, type ListMigrationRequestsCommitsError, type ListMigrationRequestsCommitsPathParams, type ListMigrationRequestsCommitsRequestBody, type ListMigrationRequestsCommitsResponse, type ListMigrationRequestsCommitsVariables, type ListRegionsError, type ListRegionsPathParams, type ListRegionsVariables, type MergeMigrationRequestError, type MergeMigrationRequestPathParams, type MergeMigrationRequestVariables, type OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, type Paginable, type PaginationQueryMeta, type PgRollJobStatusError, type PgRollJobStatusPathParams, type PgRollJobStatusVariables, type PgRollStatusError, type PgRollStatusPathParams, type PgRollStatusVariables, type PreviewBranchSchemaEditError, type PreviewBranchSchemaEditPathParams, type PreviewBranchSchemaEditRequestBody, type PreviewBranchSchemaEditResponse, type PreviewBranchSchemaEditVariables, type PushBranchMigrationsError, type PushBranchMigrationsPathParams, type PushBranchMigrationsRequestBody, type PushBranchMigrationsVariables, type PutFileError, type PutFileItemError, type PutFileItemPathParams, type PutFileItemVariables, type PutFilePathParams, type PutFileVariables, Query, type QueryMigrationRequestsError, type QueryMigrationRequestsPathParams, type QueryMigrationRequestsRequestBody, type QueryMigrationRequestsResponse, type QueryMigrationRequestsVariables, type QueryTableError, type QueryTablePathParams, type QueryTableRequestBody, type QueryTableVariables, RecordArray, RecordColumnTypes, type RemoveGitBranchesEntryError, type RemoveGitBranchesEntryPathParams, type RemoveGitBranchesEntryQueryParams, type RemoveGitBranchesEntryVariables, type RemoveWorkspaceMemberError, type RemoveWorkspaceMemberPathParams, type RemoveWorkspaceMemberVariables, type RenameDatabaseError, type RenameDatabasePathParams, type RenameDatabaseRequestBody, type RenameDatabaseVariables, Repository, type ResendWorkspaceMemberInviteError, type ResendWorkspaceMemberInvitePathParams, type ResendWorkspaceMemberInviteVariables, type ResolveBranchError, type ResolveBranchPathParams, type ResolveBranchQueryParams, type ResolveBranchResponse, type ResolveBranchVariables, responses as Responses, RestRepository, SQLPlugin, type SQLPluginResult, type SQLQuery, type SQLQueryParams, type SchemaDefinition, type SchemaInference, SchemaPlugin, type SchemaPluginResult, schemas as Schemas, type SearchBranchError, type SearchBranchPathParams, type SearchBranchRequestBody, type SearchBranchVariables, type SearchOptions, SearchPlugin, type SearchPluginResult, type SearchTableError, type SearchTablePathParams, type SearchTableRequestBody, type SearchTableVariables, type SearchXataRecord, type SelectableColumn, type SelectableColumnWithObjectNotation, type SelectedPick, type SerializedString, Serializer, type SerializerResult, type SetTableSchemaError, type SetTableSchemaPathParams, type SetTableSchemaRequestBody, type SetTableSchemaVariables, SimpleCache, type SimpleCacheOptions, type SqlQueryError, type SqlQueryPathParams, type SqlQueryRequestBody, type SqlQueryVariables, type SummarizeTableError, type SummarizeTablePathParams, type SummarizeTableRequestBody, type SummarizeTableVariables, type TotalCount, type TransactionOperation, TransactionPlugin, type TransactionPluginResult, type TransactionResults, type UpdateBranchMetadataError, type UpdateBranchMetadataPathParams, type UpdateBranchMetadataVariables, type UpdateBranchSchemaError, type UpdateBranchSchemaPathParams, type UpdateBranchSchemaVariables, type UpdateClusterError, type UpdateClusterPathParams, type UpdateClusterVariables, type UpdateColumnError, type UpdateColumnPathParams, type UpdateColumnRequestBody, type UpdateColumnVariables, type UpdateDatabaseGithubSettingsError, type UpdateDatabaseGithubSettingsPathParams, type UpdateDatabaseGithubSettingsVariables, type UpdateDatabaseMetadataError, type UpdateDatabaseMetadataPathParams, type UpdateDatabaseMetadataRequestBody, type UpdateDatabaseMetadataVariables, type UpdateMigrationRequestError, type UpdateMigrationRequestPathParams, type UpdateMigrationRequestRequestBody, type UpdateMigrationRequestVariables, type UpdateOAuthAccessTokenError, type UpdateOAuthAccessTokenPathParams, type UpdateOAuthAccessTokenRequestBody, type UpdateOAuthAccessTokenVariables, type UpdateRecordWithIDError, type UpdateRecordWithIDPathParams, type UpdateRecordWithIDQueryParams, type UpdateRecordWithIDVariables, type UpdateTableError, type UpdateTablePathParams, type UpdateTableRequestBody, type UpdateTableVariables, type UpdateTransactionOperation, type UpdateUserError, type UpdateUserVariables, type UpdateWorkspaceError, type UpdateWorkspaceMemberInviteError, type UpdateWorkspaceMemberInvitePathParams, type UpdateWorkspaceMemberInviteRequestBody, type UpdateWorkspaceMemberInviteVariables, type UpdateWorkspaceMemberRoleError, type UpdateWorkspaceMemberRolePathParams, type UpdateWorkspaceMemberRoleRequestBody, type UpdateWorkspaceMemberRoleVariables, type UpdateWorkspacePathParams, type UpdateWorkspaceVariables, type UploadDestination, type UpsertRecordWithIDError, type UpsertRecordWithIDPathParams, type UpsertRecordWithIDQueryParams, type UpsertRecordWithIDVariables, type ValueAtColumn, type VectorAskOptions, type VectorSearchTableError, type VectorSearchTablePathParams, type VectorSearchTableRequestBody, type VectorSearchTableVariables, XataApiClient, type XataApiClientOptions, XataApiPlugin, type XataArrayFile, XataError, XataFile, XataPlugin, type XataPluginOptions, type XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, applyMigration, askTable, askTableSession, branchTransaction, buildClient, buildPreviewBranchName, buildProviderString, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, copyBranch, createBranch, createCluster, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteDatabaseGithubSettings, deleteFile, deleteFileItem, deleteOAuthAccessToken, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteUserOAuthClient, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, fileAccess, fileUpload, ge, getAPIKey, getAuthorizationCode, getBranch, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getCluster, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getFile, getFileItem, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getPreviewBranch, getRecord, getSchema, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getUserOAuthAccessTokens, getUserOAuthClients, getWorkspace, getWorkspaceMembersList, getWorkspacesList, grantAuthorizationCode, greaterEquals, greaterThan, greaterThanEquals, gt, gte, iContains, iPattern, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isValidExpandedColumn, isValidSelectableColumns, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listClusters, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, pgRollJobStatus, pgRollStatus, previewBranchSchemaEdit, pushBranchMigrations, putFile, putFileItem, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, renameDatabase, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, sqlQuery, startsWith, summarizeTable, transformImage, updateBranchMetadata, updateBranchSchema, updateCluster, updateColumn, updateDatabaseGithubSettings, updateDatabaseMetadata, updateMigrationRequest, updateOAuthAccessToken, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID, vectorSearchTable };
|
10102
|
+
export { type AcceptWorkspaceMemberInviteError, type AcceptWorkspaceMemberInvitePathParams, type AcceptWorkspaceMemberInviteVariables, type AddGitBranchesEntryError, type AddGitBranchesEntryPathParams, type AddGitBranchesEntryRequestBody, type AddGitBranchesEntryResponse, type AddGitBranchesEntryVariables, type AddTableColumnError, type AddTableColumnPathParams, type AddTableColumnVariables, type AggregateTableError, type AggregateTablePathParams, type AggregateTableRequestBody, type AggregateTableVariables, type ApiExtraProps, type ApplyBranchSchemaEditError, type ApplyBranchSchemaEditPathParams, type ApplyBranchSchemaEditRequestBody, type ApplyBranchSchemaEditVariables, type ApplyMigrationError, type ApplyMigrationPathParams, type ApplyMigrationRequestBody, type ApplyMigrationVariables, type AskOptions, type AskResult, type AskTableError, type AskTablePathParams, type AskTableRequestBody, type AskTableResponse, type AskTableSessionError, type AskTableSessionPathParams, type AskTableSessionRequestBody, type AskTableSessionResponse, type AskTableSessionVariables, type AskTableVariables, BaseClient, type BaseClientOptions, type BaseData, type BaseSchema, type BinaryFile, type BranchTransactionError, type BranchTransactionPathParams, type BranchTransactionRequestBody, type BranchTransactionVariables, type BulkInsertTableRecordsError, type BulkInsertTableRecordsPathParams, type BulkInsertTableRecordsQueryParams, type BulkInsertTableRecordsRequestBody, type BulkInsertTableRecordsVariables, type CacheImpl, type CancelWorkspaceMemberInviteError, type CancelWorkspaceMemberInvitePathParams, type CancelWorkspaceMemberInviteVariables, type ClientConstructor, type ColumnsByValue, type CompareBranchSchemasError, type CompareBranchSchemasPathParams, type CompareBranchSchemasRequestBody, type CompareBranchSchemasVariables, type CompareBranchWithUserSchemaError, type CompareBranchWithUserSchemaPathParams, type CompareBranchWithUserSchemaRequestBody, type CompareBranchWithUserSchemaVariables, type CompareMigrationRequestError, type CompareMigrationRequestPathParams, type CompareMigrationRequestVariables, type CopyBranchError, type CopyBranchPathParams, type CopyBranchRequestBody, type CopyBranchVariables, type CreateBranchError, type CreateBranchPathParams, type CreateBranchQueryParams, type CreateBranchRequestBody, type CreateBranchResponse, type CreateBranchVariables, type CreateClusterError, type CreateClusterPathParams, type CreateClusterVariables, type CreateDatabaseError, type CreateDatabasePathParams, type CreateDatabaseRequestBody, type CreateDatabaseResponse, type CreateDatabaseVariables, type CreateMigrationRequestError, type CreateMigrationRequestPathParams, type CreateMigrationRequestRequestBody, type CreateMigrationRequestResponse, type CreateMigrationRequestVariables, type CreateTableError, type CreateTablePathParams, type CreateTableResponse, type CreateTableVariables, type CreateUserAPIKeyError, type CreateUserAPIKeyPathParams, type CreateUserAPIKeyResponse, type CreateUserAPIKeyVariables, type CreateWorkspaceError, type CreateWorkspaceVariables, type CursorNavigationOptions, type DeleteBranchError, type DeleteBranchPathParams, type DeleteBranchResponse, type DeleteBranchVariables, type DeleteColumnError, type DeleteColumnPathParams, type DeleteColumnVariables, type DeleteDatabaseError, type DeleteDatabaseGithubSettingsError, type DeleteDatabaseGithubSettingsPathParams, type DeleteDatabaseGithubSettingsVariables, type DeleteDatabasePathParams, type DeleteDatabaseResponse, type DeleteDatabaseVariables, type DeleteFileError, type DeleteFileItemError, type DeleteFileItemPathParams, type DeleteFileItemVariables, type DeleteFilePathParams, type DeleteFileVariables, type DeleteOAuthAccessTokenError, type DeleteOAuthAccessTokenPathParams, type DeleteOAuthAccessTokenVariables, type DeleteRecordError, type DeleteRecordPathParams, type DeleteRecordQueryParams, type DeleteRecordVariables, type DeleteTableError, type DeleteTablePathParams, type DeleteTableResponse, type DeleteTableVariables, type DeleteTransactionOperation, type DeleteUserAPIKeyError, type DeleteUserAPIKeyPathParams, type DeleteUserAPIKeyVariables, type DeleteUserError, type DeleteUserOAuthClientError, type DeleteUserOAuthClientPathParams, type DeleteUserOAuthClientVariables, type DeleteUserVariables, type DeleteWorkspaceError, type DeleteWorkspacePathParams, type DeleteWorkspaceVariables, type DeserializedType, type DownloadDestination, type EditableData, type ExecuteBranchMigrationPlanError, type ExecuteBranchMigrationPlanPathParams, type ExecuteBranchMigrationPlanRequestBody, type ExecuteBranchMigrationPlanVariables, type FetchImpl, FetcherError, type FetcherExtraProps, type FileAccessError, type FileAccessPathParams, type FileAccessQueryParams, type FileAccessVariables, type FileUploadError, type FileUploadPathParams, type FileUploadQueryParams, type FileUploadVariables, FilesPlugin, type FilesPluginResult, type GetAuthorizationCodeError, type GetAuthorizationCodeQueryParams, type GetAuthorizationCodeVariables, type GetBranchDetailsError, type GetBranchDetailsPathParams, type GetBranchDetailsVariables, type GetBranchListError, type GetBranchListPathParams, type GetBranchListVariables, type GetBranchMetadataError, type GetBranchMetadataPathParams, type GetBranchMetadataVariables, type GetBranchMigrationHistoryError, type GetBranchMigrationHistoryPathParams, type GetBranchMigrationHistoryRequestBody, type GetBranchMigrationHistoryResponse, type GetBranchMigrationHistoryVariables, type GetBranchMigrationPlanError, type GetBranchMigrationPlanPathParams, type GetBranchMigrationPlanVariables, type GetBranchSchemaHistoryError, type GetBranchSchemaHistoryPathParams, type GetBranchSchemaHistoryRequestBody, type GetBranchSchemaHistoryResponse, type GetBranchSchemaHistoryVariables, type GetBranchStatsError, type GetBranchStatsPathParams, type GetBranchStatsResponse, type GetBranchStatsVariables, type GetClusterError, type GetClusterPathParams, type GetClusterVariables, type GetColumnError, type GetColumnPathParams, type GetColumnVariables, type GetDatabaseGithubSettingsError, type GetDatabaseGithubSettingsPathParams, type GetDatabaseGithubSettingsVariables, type GetDatabaseListError, type GetDatabaseListPathParams, type GetDatabaseListVariables, type GetDatabaseMetadataError, type GetDatabaseMetadataPathParams, type GetDatabaseMetadataVariables, type GetFileError, type GetFileItemError, type GetFileItemPathParams, type GetFileItemVariables, type GetFilePathParams, type GetFileVariables, type GetGitBranchesMappingError, type GetGitBranchesMappingPathParams, type GetGitBranchesMappingVariables, type GetMigrationRequestError, type GetMigrationRequestIsMergedError, type GetMigrationRequestIsMergedPathParams, type GetMigrationRequestIsMergedResponse, type GetMigrationRequestIsMergedVariables, type GetMigrationRequestPathParams, type GetMigrationRequestVariables, type GetRecordError, type GetRecordPathParams, type GetRecordQueryParams, type GetRecordVariables, type GetSchemaError, type GetSchemaPathParams, type GetSchemaResponse, type GetSchemaVariables, type GetTableColumnsError, type GetTableColumnsPathParams, type GetTableColumnsResponse, type GetTableColumnsVariables, type GetTableSchemaError, type GetTableSchemaPathParams, type GetTableSchemaResponse, type GetTableSchemaVariables, type GetTransactionOperation, type GetUserAPIKeysError, type GetUserAPIKeysResponse, type GetUserAPIKeysVariables, type GetUserError, type GetUserOAuthAccessTokensError, type GetUserOAuthAccessTokensResponse, type GetUserOAuthAccessTokensVariables, type GetUserOAuthClientsError, type GetUserOAuthClientsResponse, type GetUserOAuthClientsVariables, type GetUserVariables, type GetWorkspaceError, type GetWorkspaceMembersListError, type GetWorkspaceMembersListPathParams, type GetWorkspaceMembersListVariables, type GetWorkspacePathParams, type GetWorkspaceVariables, type GetWorkspacesListError, type GetWorkspacesListResponse, type GetWorkspacesListVariables, type GrantAuthorizationCodeError, type GrantAuthorizationCodeVariables, type HostProvider, type Identifiable, type ImageTransformations, type InsertRecordError, type InsertRecordPathParams, type InsertRecordQueryParams, type InsertRecordVariables, type InsertRecordWithIDError, type InsertRecordWithIDPathParams, type InsertRecordWithIDQueryParams, type InsertRecordWithIDVariables, type InsertTransactionOperation, type InviteWorkspaceMemberError, type InviteWorkspaceMemberPathParams, type InviteWorkspaceMemberRequestBody, type InviteWorkspaceMemberVariables, type JSONData, type KeywordAskOptions, type Link, type ListClustersError, type ListClustersPathParams, type ListClustersQueryParams, type ListClustersVariables, type ListMigrationRequestsCommitsError, type ListMigrationRequestsCommitsPathParams, type ListMigrationRequestsCommitsRequestBody, type ListMigrationRequestsCommitsResponse, type ListMigrationRequestsCommitsVariables, type ListRegionsError, type ListRegionsPathParams, type ListRegionsVariables, type MergeMigrationRequestError, type MergeMigrationRequestPathParams, type MergeMigrationRequestVariables, type OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, type Paginable, type PaginationQueryMeta, type PgRollJobStatusError, type PgRollJobStatusPathParams, type PgRollJobStatusVariables, type PgRollMigrationHistoryError, type PgRollMigrationHistoryPathParams, type PgRollMigrationHistoryVariables, type PgRollStatusError, type PgRollStatusPathParams, type PgRollStatusVariables, type PreviewBranchSchemaEditError, type PreviewBranchSchemaEditPathParams, type PreviewBranchSchemaEditRequestBody, type PreviewBranchSchemaEditResponse, type PreviewBranchSchemaEditVariables, type PushBranchMigrationsError, type PushBranchMigrationsPathParams, type PushBranchMigrationsRequestBody, type PushBranchMigrationsVariables, type PutFileError, type PutFileItemError, type PutFileItemPathParams, type PutFileItemVariables, type PutFilePathParams, type PutFileVariables, Query, type QueryMigrationRequestsError, type QueryMigrationRequestsPathParams, type QueryMigrationRequestsRequestBody, type QueryMigrationRequestsResponse, type QueryMigrationRequestsVariables, type QueryTableError, type QueryTablePathParams, type QueryTableRequestBody, type QueryTableVariables, RecordArray, RecordColumnTypes, type RemoveGitBranchesEntryError, type RemoveGitBranchesEntryPathParams, type RemoveGitBranchesEntryQueryParams, type RemoveGitBranchesEntryVariables, type RemoveWorkspaceMemberError, type RemoveWorkspaceMemberPathParams, type RemoveWorkspaceMemberVariables, type RenameDatabaseError, type RenameDatabasePathParams, type RenameDatabaseRequestBody, type RenameDatabaseVariables, Repository, type ResendWorkspaceMemberInviteError, type ResendWorkspaceMemberInvitePathParams, type ResendWorkspaceMemberInviteVariables, type ResolveBranchError, type ResolveBranchPathParams, type ResolveBranchQueryParams, type ResolveBranchResponse, type ResolveBranchVariables, responses as Responses, RestRepository, SQLPlugin, type SQLPluginResult, type SQLQuery, type SQLQueryParams, type SQLQueryResult, type SchemaDefinition, type SchemaInference, SchemaPlugin, type SchemaPluginResult, schemas as Schemas, type SearchBranchError, type SearchBranchPathParams, type SearchBranchRequestBody, type SearchBranchVariables, type SearchOptions, SearchPlugin, type SearchPluginResult, type SearchTableError, type SearchTablePathParams, type SearchTableRequestBody, type SearchTableVariables, type SearchXataRecord, type SelectableColumn, type SelectableColumnWithObjectNotation, type SelectedPick, type SerializedString, Serializer, type SerializerResult, type SetTableSchemaError, type SetTableSchemaPathParams, type SetTableSchemaRequestBody, type SetTableSchemaVariables, SimpleCache, type SimpleCacheOptions, type SqlQueryError, type SqlQueryPathParams, type SqlQueryRequestBody, type SqlQueryVariables, type SummarizeTableError, type SummarizeTablePathParams, type SummarizeTableRequestBody, type SummarizeTableVariables, type TotalCount, type TransactionOperation, TransactionPlugin, type TransactionPluginResult, type TransactionResults, type UpdateBranchMetadataError, type UpdateBranchMetadataPathParams, type UpdateBranchMetadataVariables, type UpdateBranchSchemaError, type UpdateBranchSchemaPathParams, type UpdateBranchSchemaVariables, type UpdateClusterError, type UpdateClusterPathParams, type UpdateClusterVariables, type UpdateColumnError, type UpdateColumnPathParams, type UpdateColumnRequestBody, type UpdateColumnVariables, type UpdateDatabaseGithubSettingsError, type UpdateDatabaseGithubSettingsPathParams, type UpdateDatabaseGithubSettingsVariables, type UpdateDatabaseMetadataError, type UpdateDatabaseMetadataPathParams, type UpdateDatabaseMetadataRequestBody, type UpdateDatabaseMetadataVariables, type UpdateMigrationRequestError, type UpdateMigrationRequestPathParams, type UpdateMigrationRequestRequestBody, type UpdateMigrationRequestVariables, type UpdateOAuthAccessTokenError, type UpdateOAuthAccessTokenPathParams, type UpdateOAuthAccessTokenRequestBody, type UpdateOAuthAccessTokenVariables, type UpdateRecordWithIDError, type UpdateRecordWithIDPathParams, type UpdateRecordWithIDQueryParams, type UpdateRecordWithIDVariables, type UpdateTableError, type UpdateTablePathParams, type UpdateTableRequestBody, type UpdateTableVariables, type UpdateTransactionOperation, type UpdateUserError, type UpdateUserVariables, type UpdateWorkspaceError, type UpdateWorkspaceMemberInviteError, type UpdateWorkspaceMemberInvitePathParams, type UpdateWorkspaceMemberInviteRequestBody, type UpdateWorkspaceMemberInviteVariables, type UpdateWorkspaceMemberRoleError, type UpdateWorkspaceMemberRolePathParams, type UpdateWorkspaceMemberRoleRequestBody, type UpdateWorkspaceMemberRoleVariables, type UpdateWorkspacePathParams, type UpdateWorkspaceVariables, type UploadDestination, type UpsertRecordWithIDError, type UpsertRecordWithIDPathParams, type UpsertRecordWithIDQueryParams, type UpsertRecordWithIDVariables, type ValueAtColumn, type VectorAskOptions, type VectorSearchTableError, type VectorSearchTablePathParams, type VectorSearchTableRequestBody, type VectorSearchTableVariables, XataApiClient, type XataApiClientOptions, XataApiPlugin, type XataArrayFile, XataError, XataFile, XataPlugin, type XataPluginOptions, type XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, applyMigration, askTable, askTableSession, branchTransaction, buildClient, buildPreviewBranchName, buildProviderString, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, copyBranch, createBranch, createCluster, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteDatabaseGithubSettings, deleteFile, deleteFileItem, deleteOAuthAccessToken, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteUserOAuthClient, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, fileAccess, fileUpload, ge, getAPIKey, getAuthorizationCode, getBranch, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getCluster, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getFile, getFileItem, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getPreviewBranch, getRecord, getSchema, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getUserOAuthAccessTokens, getUserOAuthClients, getWorkspace, getWorkspaceMembersList, getWorkspacesList, grantAuthorizationCode, greaterEquals, greaterThan, greaterThanEquals, gt, gte, iContains, iPattern, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isValidExpandedColumn, isValidSelectableColumns, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listClusters, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, pgRollJobStatus, pgRollMigrationHistory, pgRollStatus, previewBranchSchemaEdit, pushBranchMigrations, putFile, putFileItem, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, renameDatabase, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, sqlQuery, startsWith, summarizeTable, transformImage, updateBranchMetadata, updateBranchSchema, updateCluster, updateColumn, updateDatabaseGithubSettings, updateDatabaseMetadata, updateMigrationRequest, updateOAuthAccessToken, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID, vectorSearchTable };
|
package/dist/index.mjs
CHANGED
@@ -526,7 +526,7 @@ function defaultOnOpen(response) {
|
|
526
526
|
}
|
527
527
|
}
|
528
528
|
|
529
|
-
const VERSION = "0.
|
529
|
+
const VERSION = "0.29.0";
|
530
530
|
|
531
531
|
class ErrorWithCause extends Error {
|
532
532
|
constructor(message, options) {
|
@@ -589,6 +589,10 @@ const providers = {
|
|
589
589
|
dev: {
|
590
590
|
main: "https://api.dev-xata.dev",
|
591
591
|
workspaces: "https://{workspaceId}.{region}.dev-xata.dev"
|
592
|
+
},
|
593
|
+
local: {
|
594
|
+
main: "http://localhost:6001",
|
595
|
+
workspaces: "http://{workspaceId}.{region}.localhost:6001"
|
592
596
|
}
|
593
597
|
};
|
594
598
|
function isHostProviderAlias(alias) {
|
@@ -617,7 +621,8 @@ function parseWorkspacesUrlParts(url) {
|
|
617
621
|
const matches = {
|
618
622
|
production: url.match(/(?:https:\/\/)?([^.]+)(?:\.([^.]+))\.xata\.sh.*/),
|
619
623
|
staging: url.match(/(?:https:\/\/)?([^.]+)(?:\.([^.]+))\.staging-xata\.dev.*/),
|
620
|
-
dev: url.match(/(?:https:\/\/)?([^.]+)(?:\.([^.]+))\.dev-xata\.dev.*/)
|
624
|
+
dev: url.match(/(?:https:\/\/)?([^.]+)(?:\.([^.]+))\.dev-xata\.dev.*/),
|
625
|
+
local: url.match(/(?:https?:\/\/)?([^.]+)(?:\.([^.]+))\.localhost:(\d+)/)
|
621
626
|
};
|
622
627
|
const [host, match] = Object.entries(matches).find(([, match2]) => match2 !== null) ?? [];
|
623
628
|
if (!isHostProviderAlias(host) || !match)
|
@@ -716,7 +721,7 @@ async function fetch$1({
|
|
716
721
|
async ({ setAttributes }) => {
|
717
722
|
const baseUrl = buildBaseUrl({ method, endpoint, path, workspacesApiUrl, pathParams, apiUrl });
|
718
723
|
const fullUrl = resolveUrl(baseUrl, queryParams, pathParams);
|
719
|
-
const url = fullUrl.includes("localhost") ? fullUrl.replace(/^[^.]+\./, "http://") : fullUrl;
|
724
|
+
const url = fullUrl.includes("localhost") ? fullUrl.replace(/^[^.]+\.[^.]+\./, "http://") : fullUrl;
|
720
725
|
setAttributes({
|
721
726
|
[TraceAttributes.HTTP_URL]: url,
|
722
727
|
[TraceAttributes.HTTP_TARGET]: resolveUrl(path, queryParams, pathParams)
|
@@ -853,6 +858,7 @@ const pgRollJobStatus = (variables, signal) => dataPlaneFetch({
|
|
853
858
|
...variables,
|
854
859
|
signal
|
855
860
|
});
|
861
|
+
const pgRollMigrationHistory = (variables, signal) => dataPlaneFetch({ url: "/db/{dbBranchName}/pgroll/migrations", method: "get", ...variables, signal });
|
856
862
|
const getBranchList = (variables, signal) => dataPlaneFetch({
|
857
863
|
url: "/dbs/{dbName}",
|
858
864
|
method: "get",
|
@@ -1076,6 +1082,7 @@ const operationsByTag$2 = {
|
|
1076
1082
|
applyMigration,
|
1077
1083
|
pgRollStatus,
|
1078
1084
|
pgRollJobStatus,
|
1085
|
+
pgRollMigrationHistory,
|
1079
1086
|
getBranchList,
|
1080
1087
|
getBranchDetails,
|
1081
1088
|
createBranch,
|
@@ -1256,12 +1263,7 @@ const updateWorkspaceMemberInvite = (variables, signal) => controlPlaneFetch({ u
|
|
1256
1263
|
const cancelWorkspaceMemberInvite = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/invites/{inviteId}", method: "delete", ...variables, signal });
|
1257
1264
|
const acceptWorkspaceMemberInvite = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/invites/{inviteKey}/accept", method: "post", ...variables, signal });
|
1258
1265
|
const resendWorkspaceMemberInvite = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/invites/{inviteId}/resend", method: "post", ...variables, signal });
|
1259
|
-
const listClusters = (variables, signal) => controlPlaneFetch({
|
1260
|
-
url: "/workspaces/{workspaceId}/clusters",
|
1261
|
-
method: "get",
|
1262
|
-
...variables,
|
1263
|
-
signal
|
1264
|
-
});
|
1266
|
+
const listClusters = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/clusters", method: "get", ...variables, signal });
|
1265
1267
|
const createCluster = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/clusters", method: "post", ...variables, signal });
|
1266
1268
|
const getCluster = (variables, signal) => controlPlaneFetch({
|
1267
1269
|
url: "/workspaces/{workspaceId}/clusters/{clusterId}",
|
@@ -3290,7 +3292,6 @@ const RecordColumnTypes = [
|
|
3290
3292
|
"email",
|
3291
3293
|
"multiple",
|
3292
3294
|
"link",
|
3293
|
-
"object",
|
3294
3295
|
"datetime",
|
3295
3296
|
"vector",
|
3296
3297
|
"file[]",
|
@@ -4561,17 +4562,26 @@ function prepareParams(param1, param2) {
|
|
4561
4562
|
|
4562
4563
|
class SQLPlugin extends XataPlugin {
|
4563
4564
|
build(pluginOptions) {
|
4564
|
-
return async (
|
4565
|
-
|
4566
|
-
|
4565
|
+
return async (query, ...parameters) => {
|
4566
|
+
if (!isParamsObject(query) && (!isTemplateStringsArray(query) || !Array.isArray(parameters))) {
|
4567
|
+
throw new Error("Invalid usage of `xata.sql`. Please use it as a tagged template or with an object.");
|
4568
|
+
}
|
4569
|
+
const { statement, params, consistency } = prepareParams(query, parameters);
|
4570
|
+
const { records, warning, columns } = await sqlQuery({
|
4567
4571
|
pathParams: { workspace: "{workspaceId}", dbBranchName: "{dbBranch}", region: "{region}" },
|
4568
4572
|
body: { statement, params, consistency },
|
4569
4573
|
...pluginOptions
|
4570
4574
|
});
|
4571
|
-
return { records, warning };
|
4575
|
+
return { records, warning, columns };
|
4572
4576
|
};
|
4573
4577
|
}
|
4574
4578
|
}
|
4579
|
+
function isTemplateStringsArray(strings) {
|
4580
|
+
return Array.isArray(strings) && "raw" in strings && Array.isArray(strings.raw);
|
4581
|
+
}
|
4582
|
+
function isParamsObject(params) {
|
4583
|
+
return isObject(params) && "statement" in params;
|
4584
|
+
}
|
4575
4585
|
|
4576
4586
|
class TransactionPlugin extends XataPlugin {
|
4577
4587
|
build(pluginOptions) {
|
@@ -4804,5 +4814,5 @@ class XataError extends Error {
|
|
4804
4814
|
}
|
4805
4815
|
}
|
4806
4816
|
|
4807
|
-
export { BaseClient, FetcherError, FilesPlugin, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Query, RecordArray, RecordColumnTypes, Repository, RestRepository, SQLPlugin, SchemaPlugin, SearchPlugin, Serializer, SimpleCache, TransactionPlugin, XataApiClient, XataApiPlugin, XataError, XataFile, XataPlugin, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, applyMigration, askTable, askTableSession, branchTransaction, buildClient, buildPreviewBranchName, buildProviderString, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, copyBranch, createBranch, createCluster, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteDatabaseGithubSettings, deleteFile, deleteFileItem, deleteOAuthAccessToken, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteUserOAuthClient, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, fileAccess, fileUpload, ge, getAPIKey, getAuthorizationCode, getBranch, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getCluster, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getFile, getFileItem, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getPreviewBranch, getRecord, getSchema, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getUserOAuthAccessTokens, getUserOAuthClients, getWorkspace, getWorkspaceMembersList, getWorkspacesList, grantAuthorizationCode, greaterEquals, greaterThan, greaterThanEquals, gt, gte, iContains, iPattern, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isValidExpandedColumn, isValidSelectableColumns, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listClusters, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, pgRollJobStatus, pgRollStatus, previewBranchSchemaEdit, pushBranchMigrations, putFile, putFileItem, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, renameDatabase, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, sqlQuery, startsWith, summarizeTable, transformImage, updateBranchMetadata, updateBranchSchema, updateCluster, updateColumn, updateDatabaseGithubSettings, updateDatabaseMetadata, updateMigrationRequest, updateOAuthAccessToken, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID, vectorSearchTable };
|
4817
|
+
export { BaseClient, FetcherError, FilesPlugin, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Query, RecordArray, RecordColumnTypes, Repository, RestRepository, SQLPlugin, SchemaPlugin, SearchPlugin, Serializer, SimpleCache, TransactionPlugin, XataApiClient, XataApiPlugin, XataError, XataFile, XataPlugin, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, aggregateTable, applyBranchSchemaEdit, applyMigration, askTable, askTableSession, branchTransaction, buildClient, buildPreviewBranchName, buildProviderString, bulkInsertTableRecords, cancelWorkspaceMemberInvite, compareBranchSchemas, compareBranchWithUserSchema, compareMigrationRequest, contains, copyBranch, createBranch, createCluster, createDatabase, createMigrationRequest, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteDatabaseGithubSettings, deleteFile, deleteFileItem, deleteOAuthAccessToken, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteUserOAuthClient, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, fileAccess, fileUpload, ge, getAPIKey, getAuthorizationCode, getBranch, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getCluster, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getFile, getFileItem, getGitBranchesMapping, getHostUrl, getMigrationRequest, getMigrationRequestIsMerged, getPreviewBranch, getRecord, getSchema, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getUserOAuthAccessTokens, getUserOAuthClients, getWorkspace, getWorkspaceMembersList, getWorkspacesList, grantAuthorizationCode, greaterEquals, greaterThan, greaterThanEquals, gt, gte, iContains, iPattern, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isValidExpandedColumn, isValidSelectableColumns, isXataRecord, le, lessEquals, lessThan, lessThanEquals, listClusters, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, pgRollJobStatus, pgRollMigrationHistory, pgRollStatus, previewBranchSchemaEdit, pushBranchMigrations, putFile, putFileItem, queryMigrationRequests, queryTable, removeGitBranchesEntry, removeWorkspaceMember, renameDatabase, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, sqlQuery, startsWith, summarizeTable, transformImage, updateBranchMetadata, updateBranchSchema, updateCluster, updateColumn, updateDatabaseGithubSettings, updateDatabaseMetadata, updateMigrationRequest, updateOAuthAccessToken, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID, vectorSearchTable };
|
4808
4818
|
//# sourceMappingURL=index.mjs.map
|