@xata.io/client 0.29.2 → 0.29.3
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 +8 -0
- package/dist/index.cjs +48 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +89 -5
- package/dist/index.mjs +47 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -29,6 +29,7 @@ type XataPluginOptions = ApiExtraProps & {
|
|
29
29
|
cache: CacheImpl;
|
30
30
|
host: HostProvider;
|
31
31
|
tables: Table[];
|
32
|
+
branch: string;
|
32
33
|
};
|
33
34
|
|
34
35
|
type AttributeDictionary = Record<string, string | number | boolean | undefined>;
|
@@ -169,7 +170,7 @@ type ListBranchesResponse = {
|
|
169
170
|
branches: Branch[];
|
170
171
|
};
|
171
172
|
type DatabaseSettings = {
|
172
|
-
|
173
|
+
searchEnabled: boolean;
|
173
174
|
};
|
174
175
|
/**
|
175
176
|
* @maxLength 255
|
@@ -1699,6 +1700,9 @@ type Workspace = WorkspaceMeta & {
|
|
1699
1700
|
memberCount: number;
|
1700
1701
|
plan: WorkspacePlan;
|
1701
1702
|
};
|
1703
|
+
type WorkspaceSettings = {
|
1704
|
+
postgresEnabled: boolean;
|
1705
|
+
};
|
1702
1706
|
type WorkspaceMember = {
|
1703
1707
|
userId: UserID;
|
1704
1708
|
fullname: string;
|
@@ -1957,6 +1961,9 @@ type ClusterMetadata = {
|
|
1957
1961
|
* @x-internal true
|
1958
1962
|
*/
|
1959
1963
|
type ClusterUpdateDetails = {
|
1964
|
+
/**
|
1965
|
+
* @pattern ^[Ss][Tt][Oo][Pp]|[Ss][Tt][Aa][Rr][Tt]$
|
1966
|
+
*/
|
1960
1967
|
command: string;
|
1961
1968
|
};
|
1962
1969
|
/**
|
@@ -1990,6 +1997,10 @@ type DatabaseMetadata = {
|
|
1990
1997
|
* @x-internal true
|
1991
1998
|
*/
|
1992
1999
|
defaultClusterID?: string;
|
2000
|
+
/**
|
2001
|
+
* The database is accessible via the Postgres protocol
|
2002
|
+
*/
|
2003
|
+
postgresEnabled?: boolean;
|
1993
2004
|
/**
|
1994
2005
|
* Metadata about the database for display in Xata user interfaces
|
1995
2006
|
*/
|
@@ -2530,6 +2541,62 @@ type DeleteWorkspaceVariables = {
|
|
2530
2541
|
* Delete the workspace with the provided ID
|
2531
2542
|
*/
|
2532
2543
|
declare const deleteWorkspace: (variables: DeleteWorkspaceVariables, signal?: AbortSignal) => Promise<undefined>;
|
2544
|
+
type GetWorkspaceSettingsPathParams = {
|
2545
|
+
/**
|
2546
|
+
* Workspace ID
|
2547
|
+
*/
|
2548
|
+
workspaceId: WorkspaceID;
|
2549
|
+
};
|
2550
|
+
type GetWorkspaceSettingsError = ErrorWrapper$1<{
|
2551
|
+
status: 400;
|
2552
|
+
payload: BadRequestError;
|
2553
|
+
} | {
|
2554
|
+
status: 401;
|
2555
|
+
payload: AuthError;
|
2556
|
+
} | {
|
2557
|
+
status: 403;
|
2558
|
+
payload: AuthError;
|
2559
|
+
} | {
|
2560
|
+
status: 404;
|
2561
|
+
payload: SimpleError;
|
2562
|
+
}>;
|
2563
|
+
type GetWorkspaceSettingsVariables = {
|
2564
|
+
pathParams: GetWorkspaceSettingsPathParams;
|
2565
|
+
} & ControlPlaneFetcherExtraProps;
|
2566
|
+
/**
|
2567
|
+
* Retrieve workspace settings from a workspace ID
|
2568
|
+
*/
|
2569
|
+
declare const getWorkspaceSettings: (variables: GetWorkspaceSettingsVariables, signal?: AbortSignal) => Promise<WorkspaceSettings>;
|
2570
|
+
type UpdateWorkspaceSettingsPathParams = {
|
2571
|
+
/**
|
2572
|
+
* Workspace ID
|
2573
|
+
*/
|
2574
|
+
workspaceId: WorkspaceID;
|
2575
|
+
};
|
2576
|
+
type UpdateWorkspaceSettingsError = ErrorWrapper$1<{
|
2577
|
+
status: 400;
|
2578
|
+
payload: BadRequestError;
|
2579
|
+
} | {
|
2580
|
+
status: 401;
|
2581
|
+
payload: AuthError;
|
2582
|
+
} | {
|
2583
|
+
status: 403;
|
2584
|
+
payload: AuthError;
|
2585
|
+
} | {
|
2586
|
+
status: 404;
|
2587
|
+
payload: SimpleError;
|
2588
|
+
}>;
|
2589
|
+
type UpdateWorkspaceSettingsRequestBody = {
|
2590
|
+
postgresEnabled: boolean;
|
2591
|
+
};
|
2592
|
+
type UpdateWorkspaceSettingsVariables = {
|
2593
|
+
body: UpdateWorkspaceSettingsRequestBody;
|
2594
|
+
pathParams: UpdateWorkspaceSettingsPathParams;
|
2595
|
+
} & ControlPlaneFetcherExtraProps;
|
2596
|
+
/**
|
2597
|
+
* Update workspace settings
|
2598
|
+
*/
|
2599
|
+
declare const updateWorkspaceSettings: (variables: UpdateWorkspaceSettingsVariables, signal?: AbortSignal) => Promise<WorkspaceSettings>;
|
2533
2600
|
type GetWorkspaceMembersListPathParams = {
|
2534
2601
|
/**
|
2535
2602
|
* Workspace ID
|
@@ -3262,6 +3329,7 @@ type ApplyMigrationRequestBody = {
|
|
3262
3329
|
operations: {
|
3263
3330
|
[key: string]: any;
|
3264
3331
|
}[];
|
3332
|
+
adaptTables?: boolean;
|
3265
3333
|
};
|
3266
3334
|
type ApplyMigrationVariables = {
|
3267
3335
|
body: ApplyMigrationRequestBody;
|
@@ -3438,8 +3506,11 @@ type UpdateDatabaseSettingsError = ErrorWrapper<{
|
|
3438
3506
|
status: 404;
|
3439
3507
|
payload: SimpleError$1;
|
3440
3508
|
}>;
|
3509
|
+
type UpdateDatabaseSettingsRequestBody = {
|
3510
|
+
searchEnabled?: boolean;
|
3511
|
+
};
|
3441
3512
|
type UpdateDatabaseSettingsVariables = {
|
3442
|
-
body
|
3513
|
+
body?: UpdateDatabaseSettingsRequestBody;
|
3443
3514
|
pathParams: UpdateDatabaseSettingsPathParams;
|
3444
3515
|
} & DataPlaneFetcherExtraProps;
|
3445
3516
|
/**
|
@@ -6837,6 +6908,8 @@ declare const operationsByTag: {
|
|
6837
6908
|
getWorkspace: (variables: GetWorkspaceVariables, signal?: AbortSignal | undefined) => Promise<Workspace>;
|
6838
6909
|
updateWorkspace: (variables: UpdateWorkspaceVariables, signal?: AbortSignal | undefined) => Promise<Workspace>;
|
6839
6910
|
deleteWorkspace: (variables: DeleteWorkspaceVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
|
6911
|
+
getWorkspaceSettings: (variables: GetWorkspaceSettingsVariables, signal?: AbortSignal | undefined) => Promise<WorkspaceSettings>;
|
6912
|
+
updateWorkspaceSettings: (variables: UpdateWorkspaceSettingsVariables, signal?: AbortSignal | undefined) => Promise<WorkspaceSettings>;
|
6840
6913
|
getWorkspaceMembersList: (variables: GetWorkspaceMembersListVariables, signal?: AbortSignal | undefined) => Promise<WorkspaceMembers>;
|
6841
6914
|
updateWorkspaceMemberRole: (variables: UpdateWorkspaceMemberRoleVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
|
6842
6915
|
removeWorkspaceMember: (variables: RemoveWorkspaceMemberVariables, signal?: AbortSignal | undefined) => Promise<undefined>;
|
@@ -6978,6 +7051,8 @@ declare function buildProviderString(provider: HostProvider): string;
|
|
6978
7051
|
declare function parseWorkspacesUrlParts(url: string): {
|
6979
7052
|
workspace: string;
|
6980
7053
|
region: string;
|
7054
|
+
database: string;
|
7055
|
+
branch?: string;
|
6981
7056
|
host: HostAliases;
|
6982
7057
|
} | null;
|
6983
7058
|
|
@@ -7156,8 +7231,9 @@ type schemas_WorkspaceMember = WorkspaceMember;
|
|
7156
7231
|
type schemas_WorkspaceMembers = WorkspaceMembers;
|
7157
7232
|
type schemas_WorkspaceMeta = WorkspaceMeta;
|
7158
7233
|
type schemas_WorkspacePlan = WorkspacePlan;
|
7234
|
+
type schemas_WorkspaceSettings = WorkspaceSettings;
|
7159
7235
|
declare namespace schemas {
|
7160
|
-
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 };
|
7236
|
+
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 };
|
7161
7237
|
}
|
7162
7238
|
|
7163
7239
|
type ApiExtraProps = Omit<FetcherExtraProps, 'endpoint'>;
|
@@ -10253,7 +10329,15 @@ type SQLQueryResultArray = {
|
|
10253
10329
|
warning?: string;
|
10254
10330
|
};
|
10255
10331
|
type SQLQueryResult<T, Mode extends SQLResponseType = 'json'> = Mode extends 'json' ? SQLQueryResultJSON<T> : Mode extends 'array' ? SQLQueryResultArray : never;
|
10256
|
-
type
|
10332
|
+
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'>>;
|
10333
|
+
type SQLPluginResult = SQLPluginFunction & {
|
10334
|
+
/**
|
10335
|
+
* Connection string to use when connecting to the database.
|
10336
|
+
* It includes the workspace, region, database and branch.
|
10337
|
+
* Connects with the same credentials as the Xata client.
|
10338
|
+
*/
|
10339
|
+
connectionString: string;
|
10340
|
+
};
|
10257
10341
|
declare class SQLPlugin extends XataPlugin {
|
10258
10342
|
build(pluginOptions: XataPluginOptions): SQLPluginResult;
|
10259
10343
|
}
|
@@ -10420,4 +10504,4 @@ declare class XataError extends Error {
|
|
10420
10504
|
constructor(message: string, status: number);
|
10421
10505
|
}
|
10422
10506
|
|
10423
|
-
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 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 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, 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 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, isXataRecord, 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 };
|
10507
|
+
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 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 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, 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 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, 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, isXataRecord, 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();
|
@@ -1255,6 +1255,8 @@ const deleteWorkspace = (variables, signal) => controlPlaneFetch({
|
|
1255
1255
|
...variables,
|
1256
1256
|
signal
|
1257
1257
|
});
|
1258
|
+
const getWorkspaceSettings = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/settings", method: "get", ...variables, signal });
|
1259
|
+
const updateWorkspaceSettings = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/settings", method: "patch", ...variables, signal });
|
1258
1260
|
const getWorkspaceMembersList = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/members", method: "get", ...variables, signal });
|
1259
1261
|
const updateWorkspaceMemberRole = (variables, signal) => controlPlaneFetch({ url: "/workspaces/{workspaceId}/members/{userId}", method: "put", ...variables, signal });
|
1260
1262
|
const removeWorkspaceMember = (variables, signal) => controlPlaneFetch({
|
@@ -1320,6 +1322,8 @@ const operationsByTag$1 = {
|
|
1320
1322
|
getWorkspace,
|
1321
1323
|
updateWorkspace,
|
1322
1324
|
deleteWorkspace,
|
1325
|
+
getWorkspaceSettings,
|
1326
|
+
updateWorkspaceSettings,
|
1323
1327
|
getWorkspaceMembersList,
|
1324
1328
|
updateWorkspaceMemberRole,
|
1325
1329
|
removeWorkspaceMember
|
@@ -4587,19 +4591,19 @@ function prepareParams(param1, param2) {
|
|
4587
4591
|
return { statement, params: param2?.map((value) => prepareValue(value)) };
|
4588
4592
|
}
|
4589
4593
|
if (isObject(param1)) {
|
4590
|
-
const { statement, params, consistency } = param1;
|
4591
|
-
return { statement, params: params?.map((value) => prepareValue(value)), consistency };
|
4594
|
+
const { statement, params, consistency, responseType } = param1;
|
4595
|
+
return { statement, params: params?.map((value) => prepareValue(value)), consistency, responseType };
|
4592
4596
|
}
|
4593
4597
|
throw new Error("Invalid query");
|
4594
4598
|
}
|
4595
4599
|
|
4596
4600
|
class SQLPlugin extends XataPlugin {
|
4597
4601
|
build(pluginOptions) {
|
4598
|
-
|
4602
|
+
const sqlFunction = async (query, ...parameters) => {
|
4599
4603
|
if (!isParamsObject(query) && (!isTemplateStringsArray(query) || !Array.isArray(parameters))) {
|
4600
4604
|
throw new Error("Invalid usage of `xata.sql`. Please use it as a tagged template or with an object.");
|
4601
4605
|
}
|
4602
|
-
const { statement, params, consistency } = prepareParams(query, parameters);
|
4606
|
+
const { statement, params, consistency, responseType } = prepareParams(query, parameters);
|
4603
4607
|
const {
|
4604
4608
|
records,
|
4605
4609
|
rows,
|
@@ -4607,11 +4611,13 @@ class SQLPlugin extends XataPlugin {
|
|
4607
4611
|
columns = []
|
4608
4612
|
} = await sqlQuery({
|
4609
4613
|
pathParams: { workspace: "{workspaceId}", dbBranchName: "{dbBranch}", region: "{region}" },
|
4610
|
-
body: { statement, params, consistency },
|
4614
|
+
body: { statement, params, consistency, responseType },
|
4611
4615
|
...pluginOptions
|
4612
4616
|
});
|
4613
4617
|
return { records, rows, warning, columns };
|
4614
4618
|
};
|
4619
|
+
sqlFunction.connectionString = buildConnectionString(pluginOptions);
|
4620
|
+
return sqlFunction;
|
4615
4621
|
}
|
4616
4622
|
}
|
4617
4623
|
function isTemplateStringsArray(strings) {
|
@@ -4620,6 +4626,33 @@ function isTemplateStringsArray(strings) {
|
|
4620
4626
|
function isParamsObject(params) {
|
4621
4627
|
return isObject(params) && "statement" in params;
|
4622
4628
|
}
|
4629
|
+
function buildDomain(host, region) {
|
4630
|
+
switch (host) {
|
4631
|
+
case "production":
|
4632
|
+
return `${region}.sql.xata.sh`;
|
4633
|
+
case "staging":
|
4634
|
+
return `${region}.sql.staging-xata.dev`;
|
4635
|
+
case "dev":
|
4636
|
+
return `${region}.sql.dev-xata.dev`;
|
4637
|
+
case "local":
|
4638
|
+
return "localhost:7654";
|
4639
|
+
default:
|
4640
|
+
throw new Error("Invalid host provider");
|
4641
|
+
}
|
4642
|
+
}
|
4643
|
+
function buildConnectionString({ apiKey, workspacesApiUrl, branch }) {
|
4644
|
+
const url = isString(workspacesApiUrl) ? workspacesApiUrl : workspacesApiUrl("", {});
|
4645
|
+
const parts = parseWorkspacesUrlParts(url);
|
4646
|
+
if (!parts)
|
4647
|
+
throw new Error("Invalid workspaces URL");
|
4648
|
+
const { workspace: workspaceSlug, region, database, host } = parts;
|
4649
|
+
const domain = buildDomain(host, region);
|
4650
|
+
const workspace = workspaceSlug.split("-").pop();
|
4651
|
+
if (!workspace || !region || !database || !apiKey || !branch) {
|
4652
|
+
throw new Error("Unable to build xata connection string");
|
4653
|
+
}
|
4654
|
+
return `postgresql://${workspace}:${apiKey}@${domain}/${database}:${branch}?sslmode=require`;
|
4655
|
+
}
|
4623
4656
|
|
4624
4657
|
class TransactionPlugin extends XataPlugin {
|
4625
4658
|
build(pluginOptions) {
|
@@ -4671,7 +4704,8 @@ const buildClient = (plugins) => {
|
|
4671
4704
|
...__privateMethod(this, _getFetchProps, getFetchProps_fn).call(this, safeOptions),
|
4672
4705
|
cache: safeOptions.cache,
|
4673
4706
|
host: safeOptions.host,
|
4674
|
-
tables
|
4707
|
+
tables,
|
4708
|
+
branch: safeOptions.branch
|
4675
4709
|
};
|
4676
4710
|
const db = new SchemaPlugin().build(pluginOptions);
|
4677
4711
|
const search = new SearchPlugin(db).build(pluginOptions);
|
@@ -4854,5 +4888,5 @@ class XataError extends Error {
|
|
4854
4888
|
}
|
4855
4889
|
}
|
4856
4890
|
|
4857
|
-
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, SimpleCache, 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, isXataRecord, 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 };
|
4891
|
+
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, SimpleCache, 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, 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, isXataRecord, 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 };
|
4858
4892
|
//# sourceMappingURL=index.mjs.map
|