@xata.io/client 0.0.0-next.v042aeb4a059d554fba37ac7694aca9fe91a806bb → 0.0.0-next.v1872bc7364bb2472014aebb340d3584b4b8bd755
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 +11 -3
- package/dist/index.cjs +56 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +129 -12
- package/dist/index.mjs +54 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -4,6 +4,7 @@ declare abstract class XataPlugin {
|
|
4
4
|
type XataPluginOptions = ApiExtraProps & {
|
5
5
|
host: HostProvider;
|
6
6
|
tables: Table[];
|
7
|
+
branch: string;
|
7
8
|
};
|
8
9
|
|
9
10
|
type AttributeDictionary = Record<string, string | number | boolean | undefined>;
|
@@ -170,7 +171,6 @@ type Branch = {
|
|
170
171
|
* The cluster where this branch resides. Value of 'shared-cluster' for branches in shared clusters
|
171
172
|
*
|
172
173
|
* @minLength 1
|
173
|
-
* @x-internal true
|
174
174
|
*/
|
175
175
|
clusterID?: string;
|
176
176
|
createdAt: DateTime$1;
|
@@ -180,7 +180,7 @@ type ListBranchesResponse = {
|
|
180
180
|
branches: Branch[];
|
181
181
|
};
|
182
182
|
type DatabaseSettings = {
|
183
|
-
|
183
|
+
searchEnabled: boolean;
|
184
184
|
};
|
185
185
|
/**
|
186
186
|
* @maxLength 255
|
@@ -1710,6 +1710,10 @@ type Workspace = WorkspaceMeta & {
|
|
1710
1710
|
memberCount: number;
|
1711
1711
|
plan: WorkspacePlan;
|
1712
1712
|
};
|
1713
|
+
type WorkspaceSettings = {
|
1714
|
+
postgresEnabled: boolean;
|
1715
|
+
dedicatedClusters: boolean;
|
1716
|
+
};
|
1713
1717
|
type WorkspaceMember = {
|
1714
1718
|
userId: UserID;
|
1715
1719
|
fullname: string;
|
@@ -1873,6 +1877,13 @@ type ClusterConfiguration = {
|
|
1873
1877
|
* @format int64
|
1874
1878
|
*/
|
1875
1879
|
replicas?: number;
|
1880
|
+
/**
|
1881
|
+
* @format int64
|
1882
|
+
* @default 1
|
1883
|
+
* @maximum 3
|
1884
|
+
* @minimum 1
|
1885
|
+
*/
|
1886
|
+
instanceCount?: number;
|
1876
1887
|
/**
|
1877
1888
|
* @default false
|
1878
1889
|
*/
|
@@ -1891,7 +1902,7 @@ type ClusterCreateDetails = {
|
|
1891
1902
|
/**
|
1892
1903
|
* @maxLength 63
|
1893
1904
|
* @minLength 1
|
1894
|
-
* @pattern [a-
|
1905
|
+
* @pattern [a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*
|
1895
1906
|
*/
|
1896
1907
|
name: string;
|
1897
1908
|
configuration: ClusterConfiguration;
|
@@ -1943,6 +1954,10 @@ type ClusterConfigurationResponse = {
|
|
1943
1954
|
* @format int64
|
1944
1955
|
*/
|
1945
1956
|
replicas: number;
|
1957
|
+
/**
|
1958
|
+
* @format int64
|
1959
|
+
*/
|
1960
|
+
instanceCount: number;
|
1946
1961
|
/**
|
1947
1962
|
* @default false
|
1948
1963
|
*/
|
@@ -2001,9 +2016,13 @@ type DatabaseMetadata = {
|
|
2001
2016
|
*/
|
2002
2017
|
newMigrations?: boolean;
|
2003
2018
|
/**
|
2004
|
-
*
|
2019
|
+
* The default cluster ID where branches from this database reside. Value of 'shared-cluster' for branches in shared clusters.
|
2005
2020
|
*/
|
2006
2021
|
defaultClusterID?: string;
|
2022
|
+
/**
|
2023
|
+
* The database is accessible via the Postgres protocol
|
2024
|
+
*/
|
2025
|
+
postgresEnabled?: boolean;
|
2007
2026
|
/**
|
2008
2027
|
* Metadata about the database for display in Xata user interfaces
|
2009
2028
|
*/
|
@@ -2544,6 +2563,62 @@ type DeleteWorkspaceVariables = {
|
|
2544
2563
|
* Delete the workspace with the provided ID
|
2545
2564
|
*/
|
2546
2565
|
declare const deleteWorkspace: (variables: DeleteWorkspaceVariables, signal?: AbortSignal) => Promise<undefined>;
|
2566
|
+
type GetWorkspaceSettingsPathParams = {
|
2567
|
+
/**
|
2568
|
+
* Workspace ID
|
2569
|
+
*/
|
2570
|
+
workspaceId: WorkspaceID;
|
2571
|
+
};
|
2572
|
+
type GetWorkspaceSettingsError = ErrorWrapper$1<{
|
2573
|
+
status: 400;
|
2574
|
+
payload: BadRequestError;
|
2575
|
+
} | {
|
2576
|
+
status: 401;
|
2577
|
+
payload: AuthError;
|
2578
|
+
} | {
|
2579
|
+
status: 403;
|
2580
|
+
payload: AuthError;
|
2581
|
+
} | {
|
2582
|
+
status: 404;
|
2583
|
+
payload: SimpleError;
|
2584
|
+
}>;
|
2585
|
+
type GetWorkspaceSettingsVariables = {
|
2586
|
+
pathParams: GetWorkspaceSettingsPathParams;
|
2587
|
+
} & ControlPlaneFetcherExtraProps;
|
2588
|
+
/**
|
2589
|
+
* Retrieve workspace settings from a workspace ID
|
2590
|
+
*/
|
2591
|
+
declare const getWorkspaceSettings: (variables: GetWorkspaceSettingsVariables, signal?: AbortSignal) => Promise<WorkspaceSettings>;
|
2592
|
+
type UpdateWorkspaceSettingsPathParams = {
|
2593
|
+
/**
|
2594
|
+
* Workspace ID
|
2595
|
+
*/
|
2596
|
+
workspaceId: WorkspaceID;
|
2597
|
+
};
|
2598
|
+
type UpdateWorkspaceSettingsError = ErrorWrapper$1<{
|
2599
|
+
status: 400;
|
2600
|
+
payload: BadRequestError;
|
2601
|
+
} | {
|
2602
|
+
status: 401;
|
2603
|
+
payload: AuthError;
|
2604
|
+
} | {
|
2605
|
+
status: 403;
|
2606
|
+
payload: AuthError;
|
2607
|
+
} | {
|
2608
|
+
status: 404;
|
2609
|
+
payload: SimpleError;
|
2610
|
+
}>;
|
2611
|
+
type UpdateWorkspaceSettingsRequestBody = {
|
2612
|
+
postgresEnabled: boolean;
|
2613
|
+
};
|
2614
|
+
type UpdateWorkspaceSettingsVariables = {
|
2615
|
+
body: UpdateWorkspaceSettingsRequestBody;
|
2616
|
+
pathParams: UpdateWorkspaceSettingsPathParams;
|
2617
|
+
} & ControlPlaneFetcherExtraProps;
|
2618
|
+
/**
|
2619
|
+
* Update workspace settings
|
2620
|
+
*/
|
2621
|
+
declare const updateWorkspaceSettings: (variables: UpdateWorkspaceSettingsVariables, signal?: AbortSignal) => Promise<WorkspaceSettings>;
|
2547
2622
|
type GetWorkspaceMembersListPathParams = {
|
2548
2623
|
/**
|
2549
2624
|
* Workspace ID
|
@@ -3276,7 +3351,7 @@ type ApplyMigrationRequestBody = {
|
|
3276
3351
|
operations: {
|
3277
3352
|
[key: string]: any;
|
3278
3353
|
}[];
|
3279
|
-
|
3354
|
+
adaptTables?: boolean;
|
3280
3355
|
};
|
3281
3356
|
type ApplyMigrationVariables = {
|
3282
3357
|
body: ApplyMigrationRequestBody;
|
@@ -3315,6 +3390,31 @@ type AdaptTableVariables = {
|
|
3315
3390
|
* Adapt a table to be used from Xata, this will add the Xata metadata fields to the table, making it accessible through the data API.
|
3316
3391
|
*/
|
3317
3392
|
declare const adaptTable: (variables: AdaptTableVariables, signal?: AbortSignal) => Promise<ApplyMigrationResponse>;
|
3393
|
+
type AdaptAllTablesPathParams = {
|
3394
|
+
/**
|
3395
|
+
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
3396
|
+
*/
|
3397
|
+
dbBranchName: DBBranchName;
|
3398
|
+
workspace: string;
|
3399
|
+
region: string;
|
3400
|
+
};
|
3401
|
+
type AdaptAllTablesError = ErrorWrapper<{
|
3402
|
+
status: 400;
|
3403
|
+
payload: BadRequestError$1;
|
3404
|
+
} | {
|
3405
|
+
status: 401;
|
3406
|
+
payload: AuthError$1;
|
3407
|
+
} | {
|
3408
|
+
status: 404;
|
3409
|
+
payload: SimpleError$1;
|
3410
|
+
}>;
|
3411
|
+
type AdaptAllTablesVariables = {
|
3412
|
+
pathParams: AdaptAllTablesPathParams;
|
3413
|
+
} & DataPlaneFetcherExtraProps;
|
3414
|
+
/**
|
3415
|
+
* Adapt all xata incompatible tables present in the branch, this will add the Xata metadata fields to the table, making them accessible through the data API.
|
3416
|
+
*/
|
3417
|
+
declare const adaptAllTables: (variables: AdaptAllTablesVariables, signal?: AbortSignal) => Promise<ApplyMigrationResponse>;
|
3318
3418
|
type GetBranchMigrationJobStatusPathParams = {
|
3319
3419
|
/**
|
3320
3420
|
* The DBBranchName matches the pattern `{db_name}:{branch_name}`.
|
@@ -3453,8 +3553,11 @@ type UpdateDatabaseSettingsError = ErrorWrapper<{
|
|
3453
3553
|
status: 404;
|
3454
3554
|
payload: SimpleError$1;
|
3455
3555
|
}>;
|
3556
|
+
type UpdateDatabaseSettingsRequestBody = {
|
3557
|
+
searchEnabled?: boolean;
|
3558
|
+
};
|
3456
3559
|
type UpdateDatabaseSettingsVariables = {
|
3457
|
-
body
|
3560
|
+
body?: UpdateDatabaseSettingsRequestBody;
|
3458
3561
|
pathParams: UpdateDatabaseSettingsPathParams;
|
3459
3562
|
} & DataPlaneFetcherExtraProps;
|
3460
3563
|
/**
|
@@ -6852,6 +6955,8 @@ declare const operationsByTag: {
|
|
6852
6955
|
getWorkspace: (variables: GetWorkspaceVariables, signal?: AbortSignal | undefined) => Promise<Workspace>;
|
6853
6956
|
updateWorkspace: (variables: UpdateWorkspaceVariables, signal?: AbortSignal | undefined) => Promise<Workspace>;
|
6854
6957
|
deleteWorkspace: (variables: DeleteWorkspaceVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
|
6958
|
+
getWorkspaceSettings: (variables: GetWorkspaceSettingsVariables, signal?: AbortSignal | undefined) => Promise<WorkspaceSettings>;
|
6959
|
+
updateWorkspaceSettings: (variables: UpdateWorkspaceSettingsVariables, signal?: AbortSignal | undefined) => Promise<WorkspaceSettings>;
|
6855
6960
|
getWorkspaceMembersList: (variables: GetWorkspaceMembersListVariables, signal?: AbortSignal | undefined) => Promise<WorkspaceMembers>;
|
6856
6961
|
updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
|
6857
6962
|
removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
|
@@ -6859,6 +6964,7 @@ declare const operationsByTag: {
|
|
6859
6964
|
migrations: {
|
6860
6965
|
applyMigration: (variables: ApplyMigrationVariables, signal?: AbortSignal | undefined) => Promise<ApplyMigrationResponse>;
|
6861
6966
|
adaptTable: (variables: AdaptTableVariables, signal?: AbortSignal | undefined) => Promise<ApplyMigrationResponse>;
|
6967
|
+
adaptAllTables: (variables: AdaptAllTablesVariables, signal?: AbortSignal | undefined) => Promise<ApplyMigrationResponse>;
|
6862
6968
|
getBranchMigrationJobStatus: (variables: GetBranchMigrationJobStatusVariables, signal?: AbortSignal | undefined) => Promise<MigrationJobStatusResponse>;
|
6863
6969
|
getMigrationJobStatus: (variables: GetMigrationJobStatusVariables, signal?: AbortSignal | undefined) => Promise<MigrationJobStatusResponse>;
|
6864
6970
|
getMigrationHistory: (variables: GetMigrationHistoryVariables, signal?: AbortSignal | undefined) => Promise<MigrationHistoryResponse>;
|
@@ -6993,6 +7099,8 @@ declare function buildProviderString(provider: HostProvider): string;
|
|
6993
7099
|
declare function parseWorkspacesUrlParts(url: string): {
|
6994
7100
|
workspace: string;
|
6995
7101
|
region: string;
|
7102
|
+
database: string;
|
7103
|
+
branch?: string;
|
6996
7104
|
host: HostAliases;
|
6997
7105
|
} | null;
|
6998
7106
|
|
@@ -7192,8 +7300,9 @@ type schemas_WorkspaceMember = WorkspaceMember;
|
|
7192
7300
|
type schemas_WorkspaceMembers = WorkspaceMembers;
|
7193
7301
|
type schemas_WorkspaceMeta = WorkspaceMeta;
|
7194
7302
|
type schemas_WorkspacePlan = WorkspacePlan;
|
7303
|
+
type schemas_WorkspaceSettings = WorkspaceSettings;
|
7195
7304
|
declare namespace schemas {
|
7196
|
-
export type { schemas_APIKeyName as APIKeyName, schemas_AccessToken as AccessToken, schemas_AggExpression as AggExpression, schemas_AggExpressionMap as AggExpressionMap, AggResponse$1 as AggResponse, schemas_ApplyMigrationResponse as ApplyMigrationResponse, schemas_AuthorizationCodeRequest as AuthorizationCodeRequest, schemas_AuthorizationCodeResponse as AuthorizationCodeResponse, schemas_AutoscalingConfig as AutoscalingConfig, schemas_AutoscalingConfigResponse as AutoscalingConfigResponse, 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_BranchSchema as BranchSchema, schemas_BranchWithCopyID as BranchWithCopyID, schemas_ClusterConfiguration as ClusterConfiguration, schemas_ClusterConfigurationResponse as ClusterConfigurationResponse, 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_ClusterUpdateMetadata as ClusterUpdateMetadata, 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, schemas_DatabaseSettings as DatabaseSettings, 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_MaintenanceConfigResponse as MaintenanceConfigResponse, 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_MigrationHistoryItem as MigrationHistoryItem, schemas_MigrationHistoryResponse as MigrationHistoryResponse, schemas_MigrationJobID as MigrationJobID, schemas_MigrationJobStatus as MigrationJobStatus, schemas_MigrationJobStatusResponse as MigrationJobStatusResponse, schemas_MigrationJobType as MigrationJobType, 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_MigrationType as MigrationType, 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_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 };
|
7305
|
+
export type { schemas_APIKeyName as APIKeyName, schemas_AccessToken as AccessToken, schemas_AggExpression as AggExpression, schemas_AggExpressionMap as AggExpressionMap, AggResponse$1 as AggResponse, schemas_ApplyMigrationResponse as ApplyMigrationResponse, schemas_AuthorizationCodeRequest as AuthorizationCodeRequest, schemas_AuthorizationCodeResponse as AuthorizationCodeResponse, schemas_AutoscalingConfig as AutoscalingConfig, schemas_AutoscalingConfigResponse as AutoscalingConfigResponse, 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_BranchSchema as BranchSchema, schemas_BranchWithCopyID as BranchWithCopyID, schemas_ClusterConfiguration as ClusterConfiguration, schemas_ClusterConfigurationResponse as ClusterConfigurationResponse, 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_ClusterUpdateMetadata as ClusterUpdateMetadata, 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, schemas_DatabaseSettings as DatabaseSettings, 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_MaintenanceConfigResponse as MaintenanceConfigResponse, 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_MigrationHistoryItem as MigrationHistoryItem, schemas_MigrationHistoryResponse as MigrationHistoryResponse, schemas_MigrationJobID as MigrationJobID, schemas_MigrationJobStatus as MigrationJobStatus, schemas_MigrationJobStatusResponse as MigrationJobStatusResponse, schemas_MigrationJobType as MigrationJobType, 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_MigrationType as MigrationType, 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_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, schemas_WorkspaceSettings as WorkspaceSettings, XataRecord$1 as XataRecord };
|
7197
7306
|
}
|
7198
7307
|
|
7199
7308
|
declare class XataApiPlugin implements XataPlugin {
|
@@ -9321,11 +9430,11 @@ declare const le: <T extends ComparableType>(value: T) => ComparableTypeFilter<T
|
|
9321
9430
|
/**
|
9322
9431
|
* Operator to restrict results to only values that are not null.
|
9323
9432
|
*/
|
9324
|
-
declare const exists: <T>(column?: FilterColumns<T>
|
9433
|
+
declare const exists: <T>(column?: FilterColumns<T>) => ExistanceFilter<T>;
|
9325
9434
|
/**
|
9326
9435
|
* Operator to restrict results to only values that are null.
|
9327
9436
|
*/
|
9328
|
-
declare const notExists: <T>(column?: FilterColumns<T>
|
9437
|
+
declare const notExists: <T>(column?: FilterColumns<T>) => ExistanceFilter<T>;
|
9329
9438
|
/**
|
9330
9439
|
* Operator to restrict results to only values that start with the given prefix.
|
9331
9440
|
*/
|
@@ -9491,7 +9600,15 @@ type SQLQueryResultArray = {
|
|
9491
9600
|
warning?: string;
|
9492
9601
|
};
|
9493
9602
|
type SQLQueryResult<T, Mode extends SQLResponseType = 'json'> = Mode extends 'json' ? SQLQueryResultJSON<T> : Mode extends 'array' ? SQLQueryResultArray : never;
|
9494
|
-
type
|
9603
|
+
type SQLPluginFunction = <T, Query extends SQLQuery = SQLQuery>(query: Query, ...parameters: any[]) => Promise<SQLQueryResult<T, Query extends SQLQueryParams<any> ? Query['responseType'] extends SQLResponseType ? NonNullable<Query['responseType']> : 'json' : 'json'>>;
|
9604
|
+
type SQLPluginResult = SQLPluginFunction & {
|
9605
|
+
/**
|
9606
|
+
* Connection string to use when connecting to the database.
|
9607
|
+
* It includes the workspace, region, database and branch.
|
9608
|
+
* Connects with the same credentials as the Xata client.
|
9609
|
+
*/
|
9610
|
+
connectionString: string;
|
9611
|
+
};
|
9495
9612
|
declare class SQLPlugin extends XataPlugin {
|
9496
9613
|
build(pluginOptions: XataPluginOptions): SQLPluginResult;
|
9497
9614
|
}
|
@@ -9606,7 +9723,7 @@ type BaseClientOptions = {
|
|
9606
9723
|
clientName?: string;
|
9607
9724
|
xataAgentExtra?: Record<string, string>;
|
9608
9725
|
};
|
9609
|
-
declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins
|
9726
|
+
declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins) => ClientConstructor<Plugins>;
|
9610
9727
|
interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
|
9611
9728
|
new <Schemas extends Record<string, XataRecord> = {}>(options?: Partial<BaseClientOptions>, schemaTables?: readonly BaseSchema[]): Omit<{
|
9612
9729
|
db: Awaited<ReturnType<SchemaPlugin<Schemas>['build']>>;
|
@@ -9657,4 +9774,4 @@ declare class XataError extends Error {
|
|
9657
9774
|
constructor(message: string, status: number);
|
9658
9775
|
}
|
9659
9776
|
|
9660
|
-
export { type AcceptWorkspaceMemberInviteError, type AcceptWorkspaceMemberInvitePathParams, type AcceptWorkspaceMemberInviteVariables, type AdaptTableError, type AdaptTablePathParams, type AdaptTableVariables, 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 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 GetBranchMigrationJobStatusError, type GetBranchMigrationJobStatusPathParams, type GetBranchMigrationJobStatusVariables, 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 GetDatabaseSettingsError, type GetDatabaseSettingsPathParams, type GetDatabaseSettingsVariables, type GetFileError, type GetFileItemError, type GetFileItemPathParams, type GetFileItemVariables, type GetFilePathParams, type GetFileVariables, type GetGitBranchesMappingError, type GetGitBranchesMappingPathParams, type GetGitBranchesMappingVariables, type GetMigrationHistoryError, type GetMigrationHistoryPathParams, type GetMigrationHistoryVariables, type GetMigrationJobStatusError, type GetMigrationJobStatusPathParams, type GetMigrationJobStatusVariables, 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, PageRecordArray, type Paginable, type PaginationQueryMeta, 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, 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 UpdateDatabaseSettingsError, type UpdateDatabaseSettingsPathParams, type UpdateDatabaseSettingsVariables, 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, adaptTable, 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, getBranchMigrationJobStatus, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getCluster, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseSettings, getDatabaseURL, getFile, getFileItem, getGitBranchesMapping, getHostUrl, getMigrationHistory, getMigrationJobStatus, 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, le, lessEquals, lessThan, lessThanEquals, listClusters, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, 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, updateDatabaseSettings, updateMigrationRequest, updateOAuthAccessToken, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID, vectorSearchTable };
|
9777
|
+
export { type AcceptWorkspaceMemberInviteError, type AcceptWorkspaceMemberInvitePathParams, type AcceptWorkspaceMemberInviteVariables, type AdaptAllTablesError, type AdaptAllTablesPathParams, type AdaptAllTablesVariables, type AdaptTableError, type AdaptTablePathParams, type AdaptTableVariables, 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 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 GetBranchMigrationJobStatusError, type GetBranchMigrationJobStatusPathParams, type GetBranchMigrationJobStatusVariables, 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 GetDatabaseSettingsError, type GetDatabaseSettingsPathParams, type GetDatabaseSettingsVariables, type GetFileError, type GetFileItemError, type GetFileItemPathParams, type GetFileItemVariables, type GetFilePathParams, type GetFileVariables, type GetGitBranchesMappingError, type GetGitBranchesMappingPathParams, type GetGitBranchesMappingVariables, type GetMigrationHistoryError, type GetMigrationHistoryPathParams, type GetMigrationHistoryVariables, type GetMigrationJobStatusError, type GetMigrationJobStatusPathParams, type GetMigrationJobStatusVariables, 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 GetWorkspaceSettingsError, type GetWorkspaceSettingsPathParams, type GetWorkspaceSettingsVariables, 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, PageRecordArray, type Paginable, type PaginationQueryMeta, 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, 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 UpdateDatabaseSettingsError, type UpdateDatabaseSettingsPathParams, type UpdateDatabaseSettingsRequestBody, type UpdateDatabaseSettingsVariables, 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 UpdateWorkspaceSettingsError, type UpdateWorkspaceSettingsPathParams, type UpdateWorkspaceSettingsRequestBody, type UpdateWorkspaceSettingsVariables, 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, adaptAllTables, adaptTable, 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, getBranchMigrationJobStatus, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getCluster, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseSettings, getDatabaseURL, getFile, getFileItem, getGitBranchesMapping, getHostUrl, getMigrationHistory, getMigrationJobStatus, getMigrationRequest, getMigrationRequestIsMerged, getPreviewBranch, getRecord, getSchema, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getUserOAuthAccessTokens, getUserOAuthClients, getWorkspace, getWorkspaceMembersList, getWorkspaceSettings, getWorkspacesList, grantAuthorizationCode, greaterEquals, greaterThan, greaterThanEquals, gt, gte, iContains, iPattern, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isValidExpandedColumn, isValidSelectableColumns, le, lessEquals, lessThan, lessThanEquals, listClusters, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, 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, updateDatabaseSettings, updateMigrationRequest, updateOAuthAccessToken, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, updateWorkspaceSettings, upsertRecordWithID, vectorSearchTable };
|
package/dist/index.mjs
CHANGED
@@ -526,7 +526,7 @@ function defaultOnOpen(response) {
|
|
526
526
|
}
|
527
527
|
}
|
528
528
|
|
529
|
-
const VERSION = "0.29.
|
529
|
+
const VERSION = "0.29.3";
|
530
530
|
|
531
531
|
class ErrorWithCause extends Error {
|
532
532
|
constructor(message, options) {
|
@@ -619,15 +619,15 @@ function parseWorkspacesUrlParts(url) {
|
|
619
619
|
if (!isString(url))
|
620
620
|
return null;
|
621
621
|
const matches = {
|
622
|
-
production: url.match(/(?:https:\/\/)?([^.]+)(?:\.([^.]+))\.xata\.sh
|
623
|
-
staging: url.match(/(?:https:\/\/)?([^.]+)(?:\.([^.]+))\.staging-xata\.dev
|
624
|
-
dev: url.match(/(?:https:\/\/)?([^.]+)(?:\.([^.]+))\.dev-xata\.dev
|
625
|
-
local: url.match(/(?:https?:\/\/)?([^.]+)(?:\.([^.]+))\.localhost:(
|
622
|
+
production: url.match(/(?:https:\/\/)?([^.]+)(?:\.([^.]+))\.xata\.sh\/db\/([^:]+):?(.*)?/),
|
623
|
+
staging: url.match(/(?:https:\/\/)?([^.]+)(?:\.([^.]+))\.staging-xata\.dev\/db\/([^:]+):?(.*)?/),
|
624
|
+
dev: url.match(/(?:https:\/\/)?([^.]+)(?:\.([^.]+))\.dev-xata\.dev\/db\/([^:]+):?(.*)?/),
|
625
|
+
local: url.match(/(?:https?:\/\/)?([^.]+)(?:\.([^.]+))\.localhost:([^:]+):?(.*)?/)
|
626
626
|
};
|
627
627
|
const [host, match] = Object.entries(matches).find(([, match2]) => match2 !== null) ?? [];
|
628
628
|
if (!isHostProviderAlias(host) || !match)
|
629
629
|
return null;
|
630
|
-
return { workspace: match[1], region: match[2], host };
|
630
|
+
return { workspace: match[1], region: match[2], database: match[3], branch: match[4], host };
|
631
631
|
}
|
632
632
|
|
633
633
|
const pool = new ApiRequestPool();
|
@@ -854,6 +854,12 @@ const adaptTable = (variables, signal) => dataPlaneFetch({
|
|
854
854
|
...variables,
|
855
855
|
signal
|
856
856
|
});
|
857
|
+
const adaptAllTables = (variables, signal) => dataPlaneFetch({
|
858
|
+
url: "/db/{dbBranchName}/migrations/adapt",
|
859
|
+
method: "post",
|
860
|
+
...variables,
|
861
|
+
signal
|
862
|
+
});
|
857
863
|
const getBranchMigrationJobStatus = (variables, signal) => dataPlaneFetch({ url: "/db/{dbBranchName}/migrations/status", method: "get", ...variables, signal });
|
858
864
|
const getMigrationJobStatus = (variables, signal) => dataPlaneFetch({ url: "/db/{dbBranchName}/migrations/jobs/{jobId}", method: "get", ...variables, signal });
|
859
865
|
const getMigrationHistory = (variables, signal) => dataPlaneFetch({ url: "/db/{dbBranchName}/migrations/history", method: "get", ...variables, signal });
|
@@ -1086,6 +1092,7 @@ const operationsByTag$2 = {
|
|
1086
1092
|
migrations: {
|
1087
1093
|
applyMigration,
|
1088
1094
|
adaptTable,
|
1095
|
+
adaptAllTables,
|
1089
1096
|
getBranchMigrationJobStatus,
|
1090
1097
|
getMigrationJobStatus,
|
1091
1098
|
getMigrationHistory,
|
@@ -1257,6 +1264,8 @@ const deleteWorkspace = (variables, signal) => controlPlaneFetch({
|
|
1257
1264
|
...variables,
|
1258
1265
|
signal
|
1259
1266
|
});
|
1267
|
+
const getWorkspaceSettings = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/settings", method: "get", ...variables, signal });
|
1268
|
+
const updateWorkspaceSettings = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/settings", method: "patch", ...variables, signal });
|
1260
1269
|
const getWorkspaceMembersList = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/members", method: "get", ...variables, signal });
|
1261
1270
|
const updateWorkspaceMemberRole = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/members/{userId}", method: "put", ...variables, signal });
|
1262
1271
|
const removeWorkspaceMember = (variables, signal) => controlPlaneFetch({
|
@@ -1322,6 +1331,8 @@ const operationsByTag$1 = {
|
|
1322
1331
|
getWorkspace,
|
1323
1332
|
updateWorkspace,
|
1324
1333
|
deleteWorkspace,
|
1334
|
+
getWorkspaceSettings,
|
1335
|
+
updateWorkspaceSettings,
|
1325
1336
|
getWorkspaceMembersList,
|
1326
1337
|
updateWorkspaceMemberRole,
|
1327
1338
|
removeWorkspaceMember
|
@@ -3193,19 +3204,19 @@ function prepareParams(param1, param2) {
|
|
3193
3204
|
return { statement, params: param2?.map((value) => prepareValue(value)) };
|
3194
3205
|
}
|
3195
3206
|
if (isObject(param1)) {
|
3196
|
-
const { statement, params, consistency } = param1;
|
3197
|
-
return { statement, params: params?.map((value) => prepareValue(value)), consistency };
|
3207
|
+
const { statement, params, consistency, responseType } = param1;
|
3208
|
+
return { statement, params: params?.map((value) => prepareValue(value)), consistency, responseType };
|
3198
3209
|
}
|
3199
3210
|
throw new Error("Invalid query");
|
3200
3211
|
}
|
3201
3212
|
|
3202
3213
|
class SQLPlugin extends XataPlugin {
|
3203
3214
|
build(pluginOptions) {
|
3204
|
-
|
3215
|
+
const sqlFunction = async (query, ...parameters) => {
|
3205
3216
|
if (!isParamsObject(query) && (!isTemplateStringsArray(query) || !Array.isArray(parameters))) {
|
3206
3217
|
throw new Error("Invalid usage of `xata.sql`. Please use it as a tagged template or with an object.");
|
3207
3218
|
}
|
3208
|
-
const { statement, params, consistency } = prepareParams(query, parameters);
|
3219
|
+
const { statement, params, consistency, responseType } = prepareParams(query, parameters);
|
3209
3220
|
const {
|
3210
3221
|
records,
|
3211
3222
|
rows,
|
@@ -3213,11 +3224,13 @@ class SQLPlugin extends XataPlugin {
|
|
3213
3224
|
columns = []
|
3214
3225
|
} = await sqlQuery({
|
3215
3226
|
pathParams: { workspace: "{workspaceId}", dbBranchName: "{dbBranch}", region: "{region}" },
|
3216
|
-
body: { statement, params, consistency },
|
3227
|
+
body: { statement, params, consistency, responseType },
|
3217
3228
|
...pluginOptions
|
3218
3229
|
});
|
3219
3230
|
return { records, rows, warning, columns };
|
3220
3231
|
};
|
3232
|
+
sqlFunction.connectionString = buildConnectionString(pluginOptions);
|
3233
|
+
return sqlFunction;
|
3221
3234
|
}
|
3222
3235
|
}
|
3223
3236
|
function isTemplateStringsArray(strings) {
|
@@ -3226,6 +3239,33 @@ function isTemplateStringsArray(strings) {
|
|
3226
3239
|
function isParamsObject(params) {
|
3227
3240
|
return isObject(params) && "statement" in params;
|
3228
3241
|
}
|
3242
|
+
function buildDomain(host, region) {
|
3243
|
+
switch (host) {
|
3244
|
+
case "production":
|
3245
|
+
return `${region}.sql.xata.sh`;
|
3246
|
+
case "staging":
|
3247
|
+
return `${region}.sql.staging-xata.dev`;
|
3248
|
+
case "dev":
|
3249
|
+
return `${region}.sql.dev-xata.dev`;
|
3250
|
+
case "local":
|
3251
|
+
return "localhost:7654";
|
3252
|
+
default:
|
3253
|
+
throw new Error("Invalid host provider");
|
3254
|
+
}
|
3255
|
+
}
|
3256
|
+
function buildConnectionString({ apiKey, workspacesApiUrl, branch }) {
|
3257
|
+
const url = isString(workspacesApiUrl) ? workspacesApiUrl : workspacesApiUrl("", {});
|
3258
|
+
const parts = parseWorkspacesUrlParts(url);
|
3259
|
+
if (!parts)
|
3260
|
+
throw new Error("Invalid workspaces URL");
|
3261
|
+
const { workspace: workspaceSlug, region, database, host } = parts;
|
3262
|
+
const domain = buildDomain(host, region);
|
3263
|
+
const workspace = workspaceSlug.split("-").pop();
|
3264
|
+
if (!workspace || !region || !database || !apiKey || !branch) {
|
3265
|
+
throw new Error("Unable to build xata connection string");
|
3266
|
+
}
|
3267
|
+
return `postgresql://${workspace}:${apiKey}@${domain}/${database}:${branch}?sslmode=require`;
|
3268
|
+
}
|
3229
3269
|
|
3230
3270
|
class TransactionPlugin extends XataPlugin {
|
3231
3271
|
build(pluginOptions) {
|
@@ -3276,7 +3316,8 @@ const buildClient = (plugins) => {
|
|
3276
3316
|
const pluginOptions = {
|
3277
3317
|
...__privateMethod(this, _getFetchProps, getFetchProps_fn).call(this, safeOptions),
|
3278
3318
|
host: safeOptions.host,
|
3279
|
-
tables
|
3319
|
+
tables,
|
3320
|
+
branch: safeOptions.branch
|
3280
3321
|
};
|
3281
3322
|
const db = new SchemaPlugin().build(pluginOptions);
|
3282
3323
|
const search = new SearchPlugin(db).build(pluginOptions);
|
@@ -3457,5 +3498,5 @@ class XataError extends Error {
|
|
3457
3498
|
}
|
3458
3499
|
}
|
3459
3500
|
|
3460
|
-
export { BaseClient, FetcherError, FilesPlugin, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, PageRecordArray, Query, RecordArray, RecordColumnTypes, Repository, RestRepository, SQLPlugin, SchemaPlugin, SearchPlugin, Serializer, TransactionPlugin, XataApiClient, XataApiPlugin, XataError, XataFile, XataPlugin, acceptWorkspaceMemberInvite, adaptTable, 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, getBranchMigrationJobStatus, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getCluster, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseSettings, getDatabaseURL, getFile, getFileItem, getGitBranchesMapping, getHostUrl, getMigrationHistory, getMigrationJobStatus, 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, le, lessEquals, lessThan, lessThanEquals, listClusters, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, 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, updateDatabaseSettings, updateMigrationRequest, updateOAuthAccessToken, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID, vectorSearchTable };
|
3501
|
+
export { BaseClient, FetcherError, FilesPlugin, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, PageRecordArray, Query, RecordArray, RecordColumnTypes, Repository, RestRepository, SQLPlugin, SchemaPlugin, SearchPlugin, Serializer, TransactionPlugin, XataApiClient, XataApiPlugin, XataError, XataFile, XataPlugin, acceptWorkspaceMemberInvite, adaptAllTables, adaptTable, 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, getBranchMigrationJobStatus, getBranchMigrationPlan, getBranchSchemaHistory, getBranchStats, getCluster, getColumn, getDatabaseGithubSettings, getDatabaseList, getDatabaseMetadata, getDatabaseSettings, getDatabaseURL, getFile, getFileItem, getGitBranchesMapping, getHostUrl, getMigrationHistory, getMigrationJobStatus, getMigrationRequest, getMigrationRequestIsMerged, getPreviewBranch, getRecord, getSchema, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getUserOAuthAccessTokens, getUserOAuthClients, getWorkspace, getWorkspaceMembersList, getWorkspaceSettings, getWorkspacesList, grantAuthorizationCode, greaterEquals, greaterThan, greaterThanEquals, gt, gte, iContains, iPattern, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isHostProviderAlias, isHostProviderBuilder, isIdentifiable, isNot, isValidExpandedColumn, isValidSelectableColumns, le, lessEquals, lessThan, lessThanEquals, listClusters, listMigrationRequestsCommits, listRegions, lt, lte, mergeMigrationRequest, notExists, operationsByTag, parseProviderString, parseWorkspacesUrlParts, pattern, 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, updateDatabaseSettings, updateMigrationRequest, updateOAuthAccessToken, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, updateWorkspaceSettings, upsertRecordWithID, vectorSearchTable };
|
3461
3502
|
//# sourceMappingURL=index.mjs.map
|