@xata.io/client 0.0.0-alpha.vec0bff6 → 0.0.0-alpha.vec88a57
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/CHANGELOG.md +24 -0
- package/README.md +2 -0
- package/Usage.md +27 -6
- package/dist/index.cjs +383 -179
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +171 -17
- package/dist/index.mjs +372 -180
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
declare type AttributeDictionary = Record<string, string | number | boolean | undefined>;
|
|
2
|
+
declare type TraceFunction = <T>(name: string, fn: (options: {
|
|
3
|
+
setAttributes: (attrs: AttributeDictionary) => void;
|
|
4
|
+
onError: (message: string) => void;
|
|
5
|
+
}) => T, options?: AttributeDictionary) => Promise<T>;
|
|
6
|
+
|
|
1
7
|
declare type FetchImpl = (url: string, init?: {
|
|
2
8
|
body?: string;
|
|
3
9
|
headers?: Record<string, string>;
|
|
@@ -5,6 +11,7 @@ declare type FetchImpl = (url: string, init?: {
|
|
|
5
11
|
}) => Promise<{
|
|
6
12
|
ok: boolean;
|
|
7
13
|
status: number;
|
|
14
|
+
url: string;
|
|
8
15
|
json(): Promise<any>;
|
|
9
16
|
headers?: {
|
|
10
17
|
get(name: string): string | null;
|
|
@@ -16,6 +23,7 @@ declare type FetcherExtraProps = {
|
|
|
16
23
|
workspacesApiUrl: string | WorkspaceApiUrlBuilder;
|
|
17
24
|
fetchImpl: FetchImpl;
|
|
18
25
|
apiKey: string;
|
|
26
|
+
trace: TraceFunction;
|
|
19
27
|
};
|
|
20
28
|
declare type ErrorWrapper<TError> = TError | {
|
|
21
29
|
status: 'unknown';
|
|
@@ -52,6 +60,7 @@ declare abstract class XataPlugin {
|
|
|
52
60
|
declare type XataPluginOptions = {
|
|
53
61
|
getFetchProps: () => Promise<FetcherExtraProps>;
|
|
54
62
|
cache: CacheImpl;
|
|
63
|
+
trace?: TraceFunction;
|
|
55
64
|
};
|
|
56
65
|
|
|
57
66
|
/**
|
|
@@ -122,16 +131,20 @@ declare type WorkspaceMembers = {
|
|
|
122
131
|
* @pattern ^ik_[a-zA-Z0-9]+
|
|
123
132
|
*/
|
|
124
133
|
declare type InviteKey = string;
|
|
134
|
+
/**
|
|
135
|
+
* Metadata of databases
|
|
136
|
+
*/
|
|
137
|
+
declare type DatabaseMetadata = {
|
|
138
|
+
name: string;
|
|
139
|
+
displayName: string;
|
|
140
|
+
createdAt: DateTime;
|
|
141
|
+
numberOfBranches: number;
|
|
142
|
+
ui?: {
|
|
143
|
+
color?: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
125
146
|
declare type ListDatabasesResponse = {
|
|
126
|
-
databases?:
|
|
127
|
-
name: string;
|
|
128
|
-
displayName: string;
|
|
129
|
-
createdAt: DateTime;
|
|
130
|
-
numberOfBranches: number;
|
|
131
|
-
ui?: {
|
|
132
|
-
color?: string;
|
|
133
|
-
};
|
|
134
|
-
}[];
|
|
147
|
+
databases?: DatabaseMetadata[];
|
|
135
148
|
};
|
|
136
149
|
declare type ListBranchesResponse = {
|
|
137
150
|
databaseName: string;
|
|
@@ -453,6 +466,7 @@ type schemas_InviteID = InviteID;
|
|
|
453
466
|
type schemas_WorkspaceInvite = WorkspaceInvite;
|
|
454
467
|
type schemas_WorkspaceMembers = WorkspaceMembers;
|
|
455
468
|
type schemas_InviteKey = InviteKey;
|
|
469
|
+
type schemas_DatabaseMetadata = DatabaseMetadata;
|
|
456
470
|
type schemas_ListDatabasesResponse = ListDatabasesResponse;
|
|
457
471
|
type schemas_ListBranchesResponse = ListBranchesResponse;
|
|
458
472
|
type schemas_ListGitBranchesResponse = ListGitBranchesResponse;
|
|
@@ -511,6 +525,7 @@ declare namespace schemas {
|
|
|
511
525
|
schemas_WorkspaceInvite as WorkspaceInvite,
|
|
512
526
|
schemas_WorkspaceMembers as WorkspaceMembers,
|
|
513
527
|
schemas_InviteKey as InviteKey,
|
|
528
|
+
schemas_DatabaseMetadata as DatabaseMetadata,
|
|
514
529
|
schemas_ListDatabasesResponse as ListDatabasesResponse,
|
|
515
530
|
schemas_ListBranchesResponse as ListBranchesResponse,
|
|
516
531
|
schemas_ListGitBranchesResponse as ListGitBranchesResponse,
|
|
@@ -1139,6 +1154,27 @@ declare type DeleteDatabaseVariables = {
|
|
|
1139
1154
|
* Delete a database and all of its branches and tables permanently.
|
|
1140
1155
|
*/
|
|
1141
1156
|
declare const deleteDatabase: (variables: DeleteDatabaseVariables) => Promise<undefined>;
|
|
1157
|
+
declare type GetDatabaseMetadataPathParams = {
|
|
1158
|
+
dbName: DBName;
|
|
1159
|
+
workspace: string;
|
|
1160
|
+
};
|
|
1161
|
+
declare type GetDatabaseMetadataError = ErrorWrapper<{
|
|
1162
|
+
status: 400;
|
|
1163
|
+
payload: BadRequestError;
|
|
1164
|
+
} | {
|
|
1165
|
+
status: 401;
|
|
1166
|
+
payload: AuthError;
|
|
1167
|
+
} | {
|
|
1168
|
+
status: 404;
|
|
1169
|
+
payload: SimpleError;
|
|
1170
|
+
}>;
|
|
1171
|
+
declare type GetDatabaseMetadataVariables = {
|
|
1172
|
+
pathParams: GetDatabaseMetadataPathParams;
|
|
1173
|
+
} & FetcherExtraProps;
|
|
1174
|
+
/**
|
|
1175
|
+
* Retrieve metadata of the given database
|
|
1176
|
+
*/
|
|
1177
|
+
declare const getDatabaseMetadata: (variables: GetDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
|
|
1142
1178
|
declare type GetGitBranchesMappingPathParams = {
|
|
1143
1179
|
dbName: DBName;
|
|
1144
1180
|
workspace: string;
|
|
@@ -2813,6 +2849,7 @@ declare const operationsByTag: {
|
|
|
2813
2849
|
getDatabaseList: (variables: GetDatabaseListVariables) => Promise<ListDatabasesResponse>;
|
|
2814
2850
|
createDatabase: (variables: CreateDatabaseVariables) => Promise<CreateDatabaseResponse>;
|
|
2815
2851
|
deleteDatabase: (variables: DeleteDatabaseVariables) => Promise<undefined>;
|
|
2852
|
+
getDatabaseMetadata: (variables: GetDatabaseMetadataVariables) => Promise<DatabaseMetadata>;
|
|
2816
2853
|
getGitBranchesMapping: (variables: GetGitBranchesMappingVariables) => Promise<ListGitBranchesResponse>;
|
|
2817
2854
|
addGitBranchesEntry: (variables: AddGitBranchesEntryVariables) => Promise<AddGitBranchesEntryResponse>;
|
|
2818
2855
|
removeGitBranchesEntry: (variables: RemoveGitBranchesEntryVariables) => Promise<undefined>;
|
|
@@ -2867,10 +2904,8 @@ interface XataApiClientOptions {
|
|
|
2867
2904
|
fetch?: FetchImpl;
|
|
2868
2905
|
apiKey?: string;
|
|
2869
2906
|
host?: HostProvider;
|
|
2907
|
+
trace?: TraceFunction;
|
|
2870
2908
|
}
|
|
2871
|
-
/**
|
|
2872
|
-
* @deprecated Use XataApiPlugin instead
|
|
2873
|
-
*/
|
|
2874
2909
|
declare class XataApiClient {
|
|
2875
2910
|
#private;
|
|
2876
2911
|
constructor(options?: XataApiClientOptions);
|
|
@@ -2914,6 +2949,7 @@ declare class DatabaseApi {
|
|
|
2914
2949
|
getDatabaseList(workspace: WorkspaceID): Promise<ListDatabasesResponse>;
|
|
2915
2950
|
createDatabase(workspace: WorkspaceID, dbName: DBName, options?: CreateDatabaseRequestBody): Promise<CreateDatabaseResponse>;
|
|
2916
2951
|
deleteDatabase(workspace: WorkspaceID, dbName: DBName): Promise<void>;
|
|
2952
|
+
getDatabaseMetadata(workspace: WorkspaceID, dbName: DBName): Promise<DatabaseMetadata>;
|
|
2917
2953
|
getGitBranchesMapping(workspace: WorkspaceID, dbName: DBName): Promise<ListGitBranchesResponse>;
|
|
2918
2954
|
addGitBranchesEntry(workspace: WorkspaceID, dbName: DBName, body: AddGitBranchesEntryRequestBody): Promise<AddGitBranchesEntryResponse>;
|
|
2919
2955
|
removeGitBranchesEntry(workspace: WorkspaceID, dbName: DBName, gitBranch: string): Promise<void>;
|
|
@@ -3187,7 +3223,7 @@ declare type BaseApiFilter<Record> = PropertyAccessFilter<Record> | AggregatorFi
|
|
|
3187
3223
|
declare type NestedApiFilter<T> = {
|
|
3188
3224
|
[key in keyof T]?: T[key] extends Record<string, any> ? SingleOrArray<Filter<T[key]>> : PropertyFilter<T[key]>;
|
|
3189
3225
|
};
|
|
3190
|
-
declare type Filter<T> = T extends Record<string, any> ? BaseApiFilter<T> | NestedApiFilter<T> : PropertyFilter<T>;
|
|
3226
|
+
declare type Filter<T> = T extends Record<string, any> ? T extends Date ? PropertyFilter<T> : BaseApiFilter<T> | NestedApiFilter<T> : PropertyFilter<T>;
|
|
3191
3227
|
|
|
3192
3228
|
declare type DateBooster = {
|
|
3193
3229
|
origin?: string;
|
|
@@ -3341,7 +3377,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
|
3341
3377
|
* @param value The value to filter.
|
|
3342
3378
|
* @returns A new Query object.
|
|
3343
3379
|
*/
|
|
3344
|
-
filter<F extends SelectableColumn<Record>>(column: F, value: Filter<ValueAtColumn<Record, F
|
|
3380
|
+
filter<F extends SelectableColumn<Record>>(column: F, value: Filter<NonNullable<ValueAtColumn<Record, F>>>): Query<Record, Result>;
|
|
3345
3381
|
/**
|
|
3346
3382
|
* Builds a new query object adding one or more constraints. Examples:
|
|
3347
3383
|
*
|
|
@@ -3362,7 +3398,7 @@ declare class Query<Record extends XataRecord, Result extends XataRecord = Recor
|
|
|
3362
3398
|
* @param direction The direction. Either ascending or descending.
|
|
3363
3399
|
* @returns A new Query object.
|
|
3364
3400
|
*/
|
|
3365
|
-
sort<F extends SelectableColumn<Record>>(column: F, direction
|
|
3401
|
+
sort<F extends SelectableColumn<Record>>(column: F, direction?: SortDirection): Query<Record, Result>;
|
|
3366
3402
|
/**
|
|
3367
3403
|
* Builds a new query specifying the set of columns to be returned in the query response.
|
|
3368
3404
|
* @param columns Array of column names to be returned by the query.
|
|
@@ -3942,6 +3978,10 @@ declare type PropertyType<Tables, Properties, PropertyName> = Properties & {
|
|
|
3942
3978
|
[K in ObjectColumns[number]['name']]?: PropertyType<Tables, ObjectColumns[number], K>;
|
|
3943
3979
|
} : never : never : Type extends 'link' ? TableType<Tables, LinkedTable> & XataRecord : never) | null : never : never;
|
|
3944
3980
|
|
|
3981
|
+
/**
|
|
3982
|
+
* Operator to restrict results to only values that are greater than the given value.
|
|
3983
|
+
*/
|
|
3984
|
+
declare const greaterThan: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
|
3945
3985
|
/**
|
|
3946
3986
|
* Operator to restrict results to only values that are greater than the given value.
|
|
3947
3987
|
*/
|
|
@@ -3949,15 +3989,35 @@ declare const gt: <T extends ComparableType>(value: T) => ComparableTypeFilter<T
|
|
|
3949
3989
|
/**
|
|
3950
3990
|
* Operator to restrict results to only values that are greater than or equal to the given value.
|
|
3951
3991
|
*/
|
|
3952
|
-
declare const
|
|
3992
|
+
declare const greaterThanEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
|
3993
|
+
/**
|
|
3994
|
+
* Operator to restrict results to only values that are greater than or equal to the given value.
|
|
3995
|
+
*/
|
|
3996
|
+
declare const greaterEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
|
3953
3997
|
/**
|
|
3954
3998
|
* Operator to restrict results to only values that are greater than or equal to the given value.
|
|
3955
3999
|
*/
|
|
3956
4000
|
declare const gte: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
|
4001
|
+
/**
|
|
4002
|
+
* Operator to restrict results to only values that are greater than or equal to the given value.
|
|
4003
|
+
*/
|
|
4004
|
+
declare const ge: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
|
4005
|
+
/**
|
|
4006
|
+
* Operator to restrict results to only values that are lower than the given value.
|
|
4007
|
+
*/
|
|
4008
|
+
declare const lessThan: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
|
3957
4009
|
/**
|
|
3958
4010
|
* Operator to restrict results to only values that are lower than the given value.
|
|
3959
4011
|
*/
|
|
3960
4012
|
declare const lt: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
|
4013
|
+
/**
|
|
4014
|
+
* Operator to restrict results to only values that are lower than or equal to the given value.
|
|
4015
|
+
*/
|
|
4016
|
+
declare const lessThanEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
|
4017
|
+
/**
|
|
4018
|
+
* Operator to restrict results to only values that are lower than or equal to the given value.
|
|
4019
|
+
*/
|
|
4020
|
+
declare const lessEquals: <T extends ComparableType>(value: T) => ComparableTypeFilter<T>;
|
|
3961
4021
|
/**
|
|
3962
4022
|
* Operator to restrict results to only values that are lower than or equal to the given value.
|
|
3963
4023
|
*/
|
|
@@ -3990,6 +4050,10 @@ declare const pattern: (value: string) => StringTypeFilter;
|
|
|
3990
4050
|
* Operator to restrict results to only values that are equal to the given value.
|
|
3991
4051
|
*/
|
|
3992
4052
|
declare const is: <T>(value: T) => PropertyFilter<T>;
|
|
4053
|
+
/**
|
|
4054
|
+
* Operator to restrict results to only values that are equal to the given value.
|
|
4055
|
+
*/
|
|
4056
|
+
declare const equals: <T>(value: T) => PropertyFilter<T>;
|
|
3993
4057
|
/**
|
|
3994
4058
|
* Operator to restrict results to only values that are not equal to the given value.
|
|
3995
4059
|
*/
|
|
@@ -4040,6 +4104,7 @@ declare type BaseClientOptions = {
|
|
|
4040
4104
|
databaseURL?: string;
|
|
4041
4105
|
branch?: BranchStrategyOption;
|
|
4042
4106
|
cache?: CacheImpl;
|
|
4107
|
+
trace?: TraceFunction;
|
|
4043
4108
|
};
|
|
4044
4109
|
declare const buildClient: <Plugins extends Record<string, XataPlugin> = {}>(plugins?: Plugins | undefined) => ClientConstructor<Plugins>;
|
|
4045
4110
|
interface ClientConstructor<Plugins extends Record<string, XataPlugin>> {
|
|
@@ -4059,6 +4124,15 @@ declare const BaseClient_base: ClientConstructor<{}>;
|
|
|
4059
4124
|
declare class BaseClient extends BaseClient_base<[]> {
|
|
4060
4125
|
}
|
|
4061
4126
|
|
|
4127
|
+
declare class Serializer {
|
|
4128
|
+
classes: Record<string, any>;
|
|
4129
|
+
add(clazz: any): void;
|
|
4130
|
+
toJSON<T>(data: T): string;
|
|
4131
|
+
fromJSON<T>(json: string): T;
|
|
4132
|
+
}
|
|
4133
|
+
declare const serialize: <T>(data: T) => string;
|
|
4134
|
+
declare const deserialize: <T>(json: string) => T;
|
|
4135
|
+
|
|
4062
4136
|
declare type BranchResolutionOptions = {
|
|
4063
4137
|
databaseURL?: string;
|
|
4064
4138
|
apiKey?: string;
|
|
@@ -4070,9 +4144,89 @@ declare function getDatabaseURL(): string | undefined;
|
|
|
4070
4144
|
|
|
4071
4145
|
declare function getAPIKey(): string | undefined;
|
|
4072
4146
|
|
|
4147
|
+
interface Body {
|
|
4148
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
4149
|
+
blob(): Promise<Blob>;
|
|
4150
|
+
formData(): Promise<FormData>;
|
|
4151
|
+
json(): Promise<any>;
|
|
4152
|
+
text(): Promise<string>;
|
|
4153
|
+
}
|
|
4154
|
+
interface Blob {
|
|
4155
|
+
readonly size: number;
|
|
4156
|
+
readonly type: string;
|
|
4157
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
4158
|
+
slice(start?: number, end?: number, contentType?: string): Blob;
|
|
4159
|
+
text(): Promise<string>;
|
|
4160
|
+
}
|
|
4161
|
+
/** Provides information about files and allows JavaScript in a web page to access their content. */
|
|
4162
|
+
interface File extends Blob {
|
|
4163
|
+
readonly lastModified: number;
|
|
4164
|
+
readonly name: string;
|
|
4165
|
+
readonly webkitRelativePath: string;
|
|
4166
|
+
}
|
|
4167
|
+
declare type FormDataEntryValue = File | string;
|
|
4168
|
+
/** Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data". */
|
|
4169
|
+
interface FormData {
|
|
4170
|
+
append(name: string, value: string | Blob, fileName?: string): void;
|
|
4171
|
+
delete(name: string): void;
|
|
4172
|
+
get(name: string): FormDataEntryValue | null;
|
|
4173
|
+
getAll(name: string): FormDataEntryValue[];
|
|
4174
|
+
has(name: string): boolean;
|
|
4175
|
+
set(name: string, value: string | Blob, fileName?: string): void;
|
|
4176
|
+
forEach(callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any): void;
|
|
4177
|
+
}
|
|
4178
|
+
/** This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs. You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence. */
|
|
4179
|
+
interface Headers {
|
|
4180
|
+
append(name: string, value: string): void;
|
|
4181
|
+
delete(name: string): void;
|
|
4182
|
+
get(name: string): string | null;
|
|
4183
|
+
has(name: string): boolean;
|
|
4184
|
+
set(name: string, value: string): void;
|
|
4185
|
+
forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void;
|
|
4186
|
+
}
|
|
4187
|
+
interface Request extends Body {
|
|
4188
|
+
/** Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching. */
|
|
4189
|
+
readonly cache: 'default' | 'force-cache' | 'no-cache' | 'no-store' | 'only-if-cached' | 'reload';
|
|
4190
|
+
/** Returns the credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. */
|
|
4191
|
+
readonly credentials: 'include' | 'omit' | 'same-origin';
|
|
4192
|
+
/** Returns the kind of resource requested by request, e.g., "document" or "script". */
|
|
4193
|
+
readonly destination: '' | 'audio' | 'audioworklet' | 'document' | 'embed' | 'font' | 'frame' | 'iframe' | 'image' | 'manifest' | 'object' | 'paintworklet' | 'report' | 'script' | 'sharedworker' | 'style' | 'track' | 'video' | 'worker' | 'xslt';
|
|
4194
|
+
/** Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header. */
|
|
4195
|
+
readonly headers: Headers;
|
|
4196
|
+
/** Returns request's subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI] */
|
|
4197
|
+
readonly integrity: string;
|
|
4198
|
+
/** Returns a boolean indicating whether or not request can outlive the global in which it was created. */
|
|
4199
|
+
readonly keepalive: boolean;
|
|
4200
|
+
/** Returns request's HTTP method, which is "GET" by default. */
|
|
4201
|
+
readonly method: string;
|
|
4202
|
+
/** Returns the mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs. */
|
|
4203
|
+
readonly mode: 'cors' | 'navigate' | 'no-cors' | 'same-origin';
|
|
4204
|
+
/** Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default. */
|
|
4205
|
+
readonly redirect: 'error' | 'follow' | 'manual';
|
|
4206
|
+
/** Returns the referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and "about:client" when defaulting to the global's default. This is used during fetching to determine the value of the `Referer` header of the request being made. */
|
|
4207
|
+
readonly referrer: string;
|
|
4208
|
+
/** Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer. */
|
|
4209
|
+
readonly referrerPolicy: '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
|
|
4210
|
+
/** Returns the URL of request as a string. */
|
|
4211
|
+
readonly url: string;
|
|
4212
|
+
clone(): Request;
|
|
4213
|
+
}
|
|
4214
|
+
|
|
4215
|
+
declare type XataWorkerContext<XataClient> = {
|
|
4216
|
+
xata: XataClient;
|
|
4217
|
+
request: Request;
|
|
4218
|
+
env: Record<string, string | undefined>;
|
|
4219
|
+
};
|
|
4220
|
+
declare type RemoveFirst<T> = T extends [any, ...infer U] ? U : never;
|
|
4221
|
+
declare type WorkerRunnerConfig = {
|
|
4222
|
+
workspace: string;
|
|
4223
|
+
worker: string;
|
|
4224
|
+
};
|
|
4225
|
+
declare function buildWorkerRunner<XataClient>(config: WorkerRunnerConfig): <WorkerFunction extends (ctx: XataWorkerContext<XataClient>, ...args: any[]) => any>(name: string, _worker: WorkerFunction) => (...args: RemoveFirst<Parameters<WorkerFunction>>) => Promise<Awaited<ReturnType<WorkerFunction>>>;
|
|
4226
|
+
|
|
4073
4227
|
declare class XataError extends Error {
|
|
4074
4228
|
readonly status: number;
|
|
4075
4229
|
constructor(message: string, status: number);
|
|
4076
4230
|
}
|
|
4077
4231
|
|
|
4078
|
-
export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchResponse, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateTableError, CreateTablePathParams, CreateTableResponse, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DeleteBranchError, DeleteBranchPathParams, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableVariables, DeleteUserAPIKeyError, DeleteUserAPIKeyPathParams, DeleteUserAPIKeyVariables, DeleteUserError, DeleteUserVariables, DeleteWorkspaceError, DeleteWorkspacePathParams, DeleteWorkspaceVariables, EditableData, ExecuteBranchMigrationPlanError, ExecuteBranchMigrationPlanPathParams, ExecuteBranchMigrationPlanRequestBody, ExecuteBranchMigrationPlanVariables, FetchImpl, FetcherExtraProps, GetBranchDetailsError, GetBranchDetailsPathParams, GetBranchDetailsVariables, GetBranchListError, GetBranchListPathParams, GetBranchListVariables, GetBranchMetadataError, GetBranchMetadataPathParams, GetBranchMetadataVariables, GetBranchMigrationHistoryError, GetBranchMigrationHistoryPathParams, GetBranchMigrationHistoryRequestBody, GetBranchMigrationHistoryResponse, GetBranchMigrationHistoryVariables, GetBranchMigrationPlanError, GetBranchMigrationPlanPathParams, GetBranchMigrationPlanVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetRecordError, GetRecordPathParams, GetRecordQueryParams, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, Link, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, Query, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RecordArray, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, ResolveBranchError, ResolveBranchPathParams, ResolveBranchQueryParams, ResolveBranchResponse, ResolveBranchVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaInference, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SearchTableError, SearchTablePathParams, SearchTableRequestBody, SearchTableVariables, SearchXataRecord, SelectableColumn, SelectedPick, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberInviteError, UpdateWorkspaceMemberInvitePathParams, UpdateWorkspaceMemberInviteRequestBody, UpdateWorkspaceMemberInviteVariables, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, buildClient, bulkInsertTableRecords, cancelWorkspaceMemberInvite, contains, createBranch, createDatabase, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, endsWith, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseURL, getGitBranchesMapping, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isIdentifiable, isNot, isXataRecord, le, lt, lte, notExists, operationsByTag, pattern, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, setTableSchema, startsWith, updateBranchMetadata, updateColumn, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };
|
|
4232
|
+
export { AcceptWorkspaceMemberInviteError, AcceptWorkspaceMemberInvitePathParams, AcceptWorkspaceMemberInviteVariables, AddGitBranchesEntryError, AddGitBranchesEntryPathParams, AddGitBranchesEntryRequestBody, AddGitBranchesEntryResponse, AddGitBranchesEntryVariables, AddTableColumnError, AddTableColumnPathParams, AddTableColumnVariables, BaseClient, BaseClientOptions, BaseData, BaseSchema, BulkInsertTableRecordsError, BulkInsertTableRecordsPathParams, BulkInsertTableRecordsQueryParams, BulkInsertTableRecordsRequestBody, BulkInsertTableRecordsVariables, CacheImpl, CancelWorkspaceMemberInviteError, CancelWorkspaceMemberInvitePathParams, CancelWorkspaceMemberInviteVariables, ClientConstructor, CreateBranchError, CreateBranchPathParams, CreateBranchQueryParams, CreateBranchRequestBody, CreateBranchResponse, CreateBranchVariables, CreateDatabaseError, CreateDatabasePathParams, CreateDatabaseRequestBody, CreateDatabaseResponse, CreateDatabaseVariables, CreateTableError, CreateTablePathParams, CreateTableResponse, CreateTableVariables, CreateUserAPIKeyError, CreateUserAPIKeyPathParams, CreateUserAPIKeyResponse, CreateUserAPIKeyVariables, CreateWorkspaceError, CreateWorkspaceVariables, CursorNavigationOptions, DeleteBranchError, DeleteBranchPathParams, DeleteBranchVariables, DeleteColumnError, DeleteColumnPathParams, DeleteColumnVariables, DeleteDatabaseError, DeleteDatabasePathParams, DeleteDatabaseVariables, DeleteRecordError, DeleteRecordPathParams, DeleteRecordQueryParams, DeleteRecordVariables, DeleteTableError, DeleteTablePathParams, DeleteTableVariables, DeleteUserAPIKeyError, DeleteUserAPIKeyPathParams, DeleteUserAPIKeyVariables, DeleteUserError, DeleteUserVariables, DeleteWorkspaceError, DeleteWorkspacePathParams, DeleteWorkspaceVariables, EditableData, ExecuteBranchMigrationPlanError, ExecuteBranchMigrationPlanPathParams, ExecuteBranchMigrationPlanRequestBody, ExecuteBranchMigrationPlanVariables, FetchImpl, FetcherExtraProps, GetBranchDetailsError, GetBranchDetailsPathParams, GetBranchDetailsVariables, GetBranchListError, GetBranchListPathParams, GetBranchListVariables, GetBranchMetadataError, GetBranchMetadataPathParams, GetBranchMetadataVariables, GetBranchMigrationHistoryError, GetBranchMigrationHistoryPathParams, GetBranchMigrationHistoryRequestBody, GetBranchMigrationHistoryResponse, GetBranchMigrationHistoryVariables, GetBranchMigrationPlanError, GetBranchMigrationPlanPathParams, GetBranchMigrationPlanVariables, GetBranchStatsError, GetBranchStatsPathParams, GetBranchStatsResponse, GetBranchStatsVariables, GetColumnError, GetColumnPathParams, GetColumnVariables, GetDatabaseListError, GetDatabaseListPathParams, GetDatabaseListVariables, GetDatabaseMetadataError, GetDatabaseMetadataPathParams, GetDatabaseMetadataVariables, GetGitBranchesMappingError, GetGitBranchesMappingPathParams, GetGitBranchesMappingVariables, GetRecordError, GetRecordPathParams, GetRecordQueryParams, GetRecordVariables, GetTableColumnsError, GetTableColumnsPathParams, GetTableColumnsResponse, GetTableColumnsVariables, GetTableSchemaError, GetTableSchemaPathParams, GetTableSchemaResponse, GetTableSchemaVariables, GetUserAPIKeysError, GetUserAPIKeysResponse, GetUserAPIKeysVariables, GetUserError, GetUserVariables, GetWorkspaceError, GetWorkspaceMembersListError, GetWorkspaceMembersListPathParams, GetWorkspaceMembersListVariables, GetWorkspacePathParams, GetWorkspaceVariables, GetWorkspacesListError, GetWorkspacesListResponse, GetWorkspacesListVariables, Identifiable, InsertRecordError, InsertRecordPathParams, InsertRecordQueryParams, InsertRecordVariables, InsertRecordWithIDError, InsertRecordWithIDPathParams, InsertRecordWithIDQueryParams, InsertRecordWithIDVariables, InviteWorkspaceMemberError, InviteWorkspaceMemberPathParams, InviteWorkspaceMemberRequestBody, InviteWorkspaceMemberVariables, Link, OffsetNavigationOptions, operationsByTag as Operations, PAGINATION_DEFAULT_OFFSET, PAGINATION_DEFAULT_SIZE, PAGINATION_MAX_OFFSET, PAGINATION_MAX_SIZE, Page, Paginable, PaginationQueryMeta, Query, QueryTableError, QueryTablePathParams, QueryTableRequestBody, QueryTableVariables, RecordArray, RemoveGitBranchesEntryError, RemoveGitBranchesEntryPathParams, RemoveGitBranchesEntryQueryParams, RemoveGitBranchesEntryVariables, RemoveWorkspaceMemberError, RemoveWorkspaceMemberPathParams, RemoveWorkspaceMemberVariables, Repository, ResendWorkspaceMemberInviteError, ResendWorkspaceMemberInvitePathParams, ResendWorkspaceMemberInviteVariables, ResolveBranchError, ResolveBranchPathParams, ResolveBranchQueryParams, ResolveBranchResponse, ResolveBranchVariables, responses as Responses, RestRepository, SchemaDefinition, SchemaInference, SchemaPlugin, SchemaPluginResult, schemas as Schemas, SearchBranchError, SearchBranchPathParams, SearchBranchRequestBody, SearchBranchVariables, SearchOptions, SearchPlugin, SearchPluginResult, SearchTableError, SearchTablePathParams, SearchTableRequestBody, SearchTableVariables, SearchXataRecord, SelectableColumn, SelectedPick, Serializer, SetTableSchemaError, SetTableSchemaPathParams, SetTableSchemaRequestBody, SetTableSchemaVariables, SimpleCache, SimpleCacheOptions, UpdateBranchMetadataError, UpdateBranchMetadataPathParams, UpdateBranchMetadataVariables, UpdateColumnError, UpdateColumnPathParams, UpdateColumnRequestBody, UpdateColumnVariables, UpdateRecordWithIDError, UpdateRecordWithIDPathParams, UpdateRecordWithIDQueryParams, UpdateRecordWithIDVariables, UpdateTableError, UpdateTablePathParams, UpdateTableRequestBody, UpdateTableVariables, UpdateUserError, UpdateUserVariables, UpdateWorkspaceError, UpdateWorkspaceMemberInviteError, UpdateWorkspaceMemberInvitePathParams, UpdateWorkspaceMemberInviteRequestBody, UpdateWorkspaceMemberInviteVariables, UpdateWorkspaceMemberRoleError, UpdateWorkspaceMemberRolePathParams, UpdateWorkspaceMemberRoleRequestBody, UpdateWorkspaceMemberRoleVariables, UpdateWorkspacePathParams, UpdateWorkspaceVariables, UpsertRecordWithIDError, UpsertRecordWithIDPathParams, UpsertRecordWithIDQueryParams, UpsertRecordWithIDVariables, ValueAtColumn, XataApiClient, XataApiClientOptions, XataApiPlugin, XataError, XataPlugin, XataPluginOptions, XataRecord, acceptWorkspaceMemberInvite, addGitBranchesEntry, addTableColumn, buildClient, buildWorkerRunner, bulkInsertTableRecords, cancelWorkspaceMemberInvite, contains, createBranch, createDatabase, createTable, createUserAPIKey, createWorkspace, deleteBranch, deleteColumn, deleteDatabase, deleteRecord, deleteTable, deleteUser, deleteUserAPIKey, deleteWorkspace, deserialize, endsWith, equals, executeBranchMigrationPlan, exists, ge, getAPIKey, getBranchDetails, getBranchList, getBranchMetadata, getBranchMigrationHistory, getBranchMigrationPlan, getBranchStats, getColumn, getCurrentBranchDetails, getCurrentBranchName, getDatabaseList, getDatabaseMetadata, getDatabaseURL, getGitBranchesMapping, getRecord, getTableColumns, getTableSchema, getUser, getUserAPIKeys, getWorkspace, getWorkspaceMembersList, getWorkspacesList, greaterEquals, greaterThan, greaterThanEquals, gt, gte, includes, includesAll, includesAny, includesNone, insertRecord, insertRecordWithID, inviteWorkspaceMember, is, isCursorPaginationOptions, isIdentifiable, isNot, isXataRecord, le, lessEquals, lessThan, lessThanEquals, lt, lte, notExists, operationsByTag, pattern, queryTable, removeGitBranchesEntry, removeWorkspaceMember, resendWorkspaceMemberInvite, resolveBranch, searchBranch, searchTable, serialize, setTableSchema, startsWith, updateBranchMetadata, updateColumn, updateRecordWithID, updateTable, updateUser, updateWorkspace, updateWorkspaceMemberInvite, updateWorkspaceMemberRole, upsertRecordWithID };
|