@wix/data 1.0.160 → 1.0.162
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
type HostModule<T, H extends Host> = {
|
|
1
|
+
type HostModule$3<T, H extends Host$3> = {
|
|
2
2
|
__type: 'host';
|
|
3
3
|
create(host: H): T;
|
|
4
4
|
};
|
|
5
|
-
type HostModuleAPI<T extends HostModule<any, any>> = T extends HostModule<infer U, any> ? U : never;
|
|
6
|
-
type Host<Environment = unknown> = {
|
|
5
|
+
type HostModuleAPI$3<T extends HostModule$3<any, any>> = T extends HostModule$3<infer U, any> ? U : never;
|
|
6
|
+
type Host$3<Environment = unknown> = {
|
|
7
7
|
channel: {
|
|
8
8
|
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
9
9
|
disconnect: () => void;
|
|
@@ -12,6 +12,10 @@ type Host<Environment = unknown> = {
|
|
|
12
12
|
}>;
|
|
13
13
|
};
|
|
14
14
|
environment?: Environment;
|
|
15
|
+
/**
|
|
16
|
+
* Optional name of the environment, use for logging
|
|
17
|
+
*/
|
|
18
|
+
name?: string;
|
|
15
19
|
/**
|
|
16
20
|
* Optional bast url to use for API requests, for example `www.wixapis.com`
|
|
17
21
|
*/
|
|
@@ -36,33 +40,33 @@ type Host<Environment = unknown> = {
|
|
|
36
40
|
};
|
|
37
41
|
};
|
|
38
42
|
|
|
39
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
40
|
-
interface HttpClient {
|
|
41
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
43
|
+
type RESTFunctionDescriptor$3<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$3) => T;
|
|
44
|
+
interface HttpClient$3 {
|
|
45
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
42
46
|
fetchWithAuth: typeof fetch;
|
|
43
47
|
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
44
48
|
getActiveToken?: () => string | undefined;
|
|
45
49
|
}
|
|
46
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
47
|
-
type HttpResponse<T = any> = {
|
|
50
|
+
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
51
|
+
type HttpResponse$3<T = any> = {
|
|
48
52
|
data: T;
|
|
49
53
|
status: number;
|
|
50
54
|
statusText: string;
|
|
51
55
|
headers: any;
|
|
52
56
|
request?: any;
|
|
53
57
|
};
|
|
54
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
58
|
+
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
55
59
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
56
60
|
url: string;
|
|
57
61
|
data?: Data;
|
|
58
62
|
params?: URLSearchParams;
|
|
59
|
-
} & APIMetadata;
|
|
60
|
-
type APIMetadata = {
|
|
63
|
+
} & APIMetadata$3;
|
|
64
|
+
type APIMetadata$3 = {
|
|
61
65
|
methodFqn?: string;
|
|
62
66
|
entityFqdn?: string;
|
|
63
67
|
packageName?: string;
|
|
64
68
|
};
|
|
65
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
69
|
+
type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
|
|
66
70
|
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
67
71
|
__type: 'event-definition';
|
|
68
72
|
type: Type;
|
|
@@ -74,54 +78,54 @@ declare function EventDefinition$3<Type extends string>(type: Type, isDomainEven
|
|
|
74
78
|
type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
|
|
75
79
|
type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
|
|
76
80
|
|
|
77
|
-
type ServicePluginMethodInput = {
|
|
81
|
+
type ServicePluginMethodInput$3 = {
|
|
78
82
|
request: any;
|
|
79
83
|
metadata: any;
|
|
80
84
|
};
|
|
81
|
-
type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
82
|
-
type ServicePluginMethodMetadata = {
|
|
85
|
+
type ServicePluginContract$3 = Record<string, (payload: ServicePluginMethodInput$3) => unknown | Promise<unknown>>;
|
|
86
|
+
type ServicePluginMethodMetadata$3 = {
|
|
83
87
|
name: string;
|
|
84
88
|
primaryHttpMappingPath: string;
|
|
85
89
|
transformations: {
|
|
86
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput;
|
|
90
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$3;
|
|
87
91
|
toREST: (...args: unknown[]) => unknown;
|
|
88
92
|
};
|
|
89
93
|
};
|
|
90
|
-
type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
94
|
+
type ServicePluginDefinition$3<Contract extends ServicePluginContract$3> = {
|
|
91
95
|
__type: 'service-plugin-definition';
|
|
92
96
|
componentType: string;
|
|
93
|
-
methods: ServicePluginMethodMetadata[];
|
|
97
|
+
methods: ServicePluginMethodMetadata$3[];
|
|
94
98
|
__contract: Contract;
|
|
95
99
|
};
|
|
96
|
-
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
97
|
-
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
98
|
-
declare const SERVICE_PLUGIN_ERROR_TYPE = "wix_spi_error";
|
|
100
|
+
declare function ServicePluginDefinition$3<Contract extends ServicePluginContract$3>(componentType: string, methods: ServicePluginMethodMetadata$3[]): ServicePluginDefinition$3<Contract>;
|
|
101
|
+
type BuildServicePluginDefinition$3<T extends ServicePluginDefinition$3<any>> = (implementation: T['__contract']) => void;
|
|
102
|
+
declare const SERVICE_PLUGIN_ERROR_TYPE$3 = "wix_spi_error";
|
|
99
103
|
|
|
100
|
-
type RequestContext = {
|
|
104
|
+
type RequestContext$3 = {
|
|
101
105
|
isSSR: boolean;
|
|
102
106
|
host: string;
|
|
103
107
|
protocol?: string;
|
|
104
108
|
};
|
|
105
|
-
type ResponseTransformer = (data: any, headers?: any) => any;
|
|
109
|
+
type ResponseTransformer$3 = (data: any, headers?: any) => any;
|
|
106
110
|
/**
|
|
107
111
|
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
108
112
|
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
109
113
|
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
110
114
|
*/
|
|
111
|
-
type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
112
|
-
type AmbassadorRequestOptions<T = any> = {
|
|
115
|
+
type Method$3 = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
116
|
+
type AmbassadorRequestOptions$3<T = any> = {
|
|
113
117
|
_?: T;
|
|
114
118
|
url?: string;
|
|
115
|
-
method?: Method;
|
|
119
|
+
method?: Method$3;
|
|
116
120
|
params?: any;
|
|
117
121
|
data?: any;
|
|
118
|
-
transformResponse?: ResponseTransformer | ResponseTransformer[];
|
|
122
|
+
transformResponse?: ResponseTransformer$3 | ResponseTransformer$3[];
|
|
119
123
|
};
|
|
120
|
-
type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
|
|
124
|
+
type AmbassadorFactory$3<Request, Response> = (payload: Request) => ((context: RequestContext$3) => AmbassadorRequestOptions$3<Response>) & {
|
|
121
125
|
__isAmbassador: boolean;
|
|
122
126
|
};
|
|
123
|
-
type AmbassadorFunctionDescriptor<Request = any, Response = any> = AmbassadorFactory<Request, Response>;
|
|
124
|
-
type BuildAmbassadorFunction<T extends AmbassadorFunctionDescriptor> = T extends AmbassadorFunctionDescriptor<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
127
|
+
type AmbassadorFunctionDescriptor$3<Request = any, Response = any> = AmbassadorFactory$3<Request, Response>;
|
|
128
|
+
type BuildAmbassadorFunction$3<T extends AmbassadorFunctionDescriptor$3> = T extends AmbassadorFunctionDescriptor$3<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
125
129
|
|
|
126
130
|
declare global {
|
|
127
131
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -130,7 +134,7 @@ declare global {
|
|
|
130
134
|
}
|
|
131
135
|
}
|
|
132
136
|
|
|
133
|
-
declare const emptyObjectSymbol: unique symbol;
|
|
137
|
+
declare const emptyObjectSymbol$3: unique symbol;
|
|
134
138
|
|
|
135
139
|
/**
|
|
136
140
|
Represents a strictly empty plain object, the `{}` value.
|
|
@@ -158,7 +162,7 @@ Unfortunately, `Record<string, never>`, `Record<keyof any, never>` and `Record<n
|
|
|
158
162
|
|
|
159
163
|
@category Object
|
|
160
164
|
*/
|
|
161
|
-
type EmptyObject = {[emptyObjectSymbol]?: never};
|
|
165
|
+
type EmptyObject$3 = {[emptyObjectSymbol$3]?: never};
|
|
162
166
|
|
|
163
167
|
/**
|
|
164
168
|
Returns a boolean for whether the two given types are equal.
|
|
@@ -186,7 +190,7 @@ type Includes<Value extends readonly any[], Item> =
|
|
|
186
190
|
@category Type Guard
|
|
187
191
|
@category Utilities
|
|
188
192
|
*/
|
|
189
|
-
type IsEqual<A, B> =
|
|
193
|
+
type IsEqual$3<A, B> =
|
|
190
194
|
(<G>() => G extends A ? 1 : 2) extends
|
|
191
195
|
(<G>() => G extends B ? 1 : 2)
|
|
192
196
|
? true
|
|
@@ -219,9 +223,9 @@ type Filtered = Filter<'bar', 'foo'>;
|
|
|
219
223
|
|
|
220
224
|
@see {Except}
|
|
221
225
|
*/
|
|
222
|
-
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
226
|
+
type Filter$3<KeyType, ExcludeType> = IsEqual$3<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
223
227
|
|
|
224
|
-
type ExceptOptions = {
|
|
228
|
+
type ExceptOptions$3 = {
|
|
225
229
|
/**
|
|
226
230
|
Disallow assigning non-specified properties.
|
|
227
231
|
|
|
@@ -265,12 +269,78 @@ const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
|
265
269
|
|
|
266
270
|
@category Object
|
|
267
271
|
*/
|
|
268
|
-
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
|
|
269
|
-
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
272
|
+
type Except$3<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions$3 = {requireExactProps: false}> = {
|
|
273
|
+
[KeyType in keyof ObjectType as Filter$3<KeyType, KeysType>]: ObjectType[KeyType];
|
|
270
274
|
} & (Options['requireExactProps'] extends true
|
|
271
275
|
? Partial<Record<KeysType, never>>
|
|
272
276
|
: {});
|
|
273
277
|
|
|
278
|
+
/**
|
|
279
|
+
Returns a boolean for whether the given type is `never`.
|
|
280
|
+
|
|
281
|
+
@link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
|
|
282
|
+
@link https://stackoverflow.com/a/53984913/10292952
|
|
283
|
+
@link https://www.zhenghao.io/posts/ts-never
|
|
284
|
+
|
|
285
|
+
Useful in type utilities, such as checking if something does not occur.
|
|
286
|
+
|
|
287
|
+
@example
|
|
288
|
+
```
|
|
289
|
+
import type {IsNever, And} from 'type-fest';
|
|
290
|
+
|
|
291
|
+
// https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
|
|
292
|
+
type AreStringsEqual<A extends string, B extends string> =
|
|
293
|
+
And<
|
|
294
|
+
IsNever<Exclude<A, B>> extends true ? true : false,
|
|
295
|
+
IsNever<Exclude<B, A>> extends true ? true : false
|
|
296
|
+
>;
|
|
297
|
+
|
|
298
|
+
type EndIfEqual<I extends string, O extends string> =
|
|
299
|
+
AreStringsEqual<I, O> extends true
|
|
300
|
+
? never
|
|
301
|
+
: void;
|
|
302
|
+
|
|
303
|
+
function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
|
|
304
|
+
if (input === output) {
|
|
305
|
+
process.exit(0);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
endIfEqual('abc', 'abc');
|
|
310
|
+
//=> never
|
|
311
|
+
|
|
312
|
+
endIfEqual('abc', '123');
|
|
313
|
+
//=> void
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
@category Type Guard
|
|
317
|
+
@category Utilities
|
|
318
|
+
*/
|
|
319
|
+
type IsNever$3<T> = [T] extends [never] ? true : false;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
An if-else-like type that resolves depending on whether the given type is `never`.
|
|
323
|
+
|
|
324
|
+
@see {@link IsNever}
|
|
325
|
+
|
|
326
|
+
@example
|
|
327
|
+
```
|
|
328
|
+
import type {IfNever} from 'type-fest';
|
|
329
|
+
|
|
330
|
+
type ShouldBeTrue = IfNever<never>;
|
|
331
|
+
//=> true
|
|
332
|
+
|
|
333
|
+
type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
|
|
334
|
+
//=> 'bar'
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
@category Type Guard
|
|
338
|
+
@category Utilities
|
|
339
|
+
*/
|
|
340
|
+
type IfNever$3<T, TypeIfNever = true, TypeIfNotNever = false> = (
|
|
341
|
+
IsNever$3<T> extends true ? TypeIfNever : TypeIfNotNever
|
|
342
|
+
);
|
|
343
|
+
|
|
274
344
|
/**
|
|
275
345
|
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
276
346
|
|
|
@@ -303,21 +373,19 @@ type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
|
303
373
|
|
|
304
374
|
@category Object
|
|
305
375
|
*/
|
|
306
|
-
type ConditionalKeys<Base, Condition> =
|
|
307
|
-
// Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
|
|
376
|
+
type ConditionalKeys$3<Base, Condition> =
|
|
308
377
|
{
|
|
309
378
|
// Map through all the keys of the given base type.
|
|
310
|
-
[Key in keyof Base]
|
|
379
|
+
[Key in keyof Base]-?:
|
|
311
380
|
// Pick only keys with types extending the given `Condition` type.
|
|
312
381
|
Base[Key] extends Condition
|
|
313
|
-
// Retain this key
|
|
314
|
-
|
|
382
|
+
// Retain this key
|
|
383
|
+
// If the value for the key extends never, only include it if `Condition` also extends never
|
|
384
|
+
? IfNever$3<Base[Key], IfNever$3<Condition, Key, never>, Key>
|
|
315
385
|
// Discard this key since the condition fails.
|
|
316
386
|
: never;
|
|
317
|
-
|
|
318
387
|
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
319
|
-
}[keyof Base]
|
|
320
|
-
>;
|
|
388
|
+
}[keyof Base];
|
|
321
389
|
|
|
322
390
|
/**
|
|
323
391
|
Exclude keys from a shape that matches the given `Condition`.
|
|
@@ -357,9 +425,9 @@ type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
|
357
425
|
|
|
358
426
|
@category Object
|
|
359
427
|
*/
|
|
360
|
-
type ConditionalExcept<Base, Condition> = Except<
|
|
428
|
+
type ConditionalExcept$3<Base, Condition> = Except$3<
|
|
361
429
|
Base,
|
|
362
|
-
ConditionalKeys<Base, Condition>
|
|
430
|
+
ConditionalKeys$3<Base, Condition>
|
|
363
431
|
>;
|
|
364
432
|
|
|
365
433
|
/**
|
|
@@ -367,8 +435,8 @@ ConditionalKeys<Base, Condition>
|
|
|
367
435
|
* can either be a REST module or a host module.
|
|
368
436
|
* This type is recursive, so it can describe nested modules.
|
|
369
437
|
*/
|
|
370
|
-
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition$3<any> | ServicePluginDefinition<any> | {
|
|
371
|
-
[key: string]: Descriptors | PublicMetadata | any;
|
|
438
|
+
type Descriptors$3 = RESTFunctionDescriptor$3 | AmbassadorFunctionDescriptor$3 | HostModule$3<any, any> | EventDefinition$3<any> | ServicePluginDefinition$3<any> | {
|
|
439
|
+
[key: string]: Descriptors$3 | PublicMetadata$3 | any;
|
|
372
440
|
};
|
|
373
441
|
/**
|
|
374
442
|
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
@@ -376,12 +444,12 @@ type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostM
|
|
|
376
444
|
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
377
445
|
* do not match the given host (as they will not work with the given host).
|
|
378
446
|
*/
|
|
379
|
-
type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, Depth extends number = 5> = {
|
|
447
|
+
type BuildDescriptors$3<T extends Descriptors$3, H extends Host$3<any> | undefined, Depth extends number = 5> = {
|
|
380
448
|
done: T;
|
|
381
449
|
recurse: T extends {
|
|
382
|
-
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
383
|
-
} ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition$3<any> ? BuildEventDefinition$3<T> : T extends ServicePluginDefinition<any> ? BuildServicePluginDefinition<T> : T extends HostModule<any, any> ? HostModuleAPI<T> : ConditionalExcept<{
|
|
384
|
-
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
450
|
+
__type: typeof SERVICE_PLUGIN_ERROR_TYPE$3;
|
|
451
|
+
} ? never : T extends AmbassadorFunctionDescriptor$3 ? BuildAmbassadorFunction$3<T> : T extends RESTFunctionDescriptor$3 ? BuildRESTFunction$3<T> : T extends EventDefinition$3<any> ? BuildEventDefinition$3<T> : T extends ServicePluginDefinition$3<any> ? BuildServicePluginDefinition$3<T> : T extends HostModule$3<any, any> ? HostModuleAPI$3<T> : ConditionalExcept$3<{
|
|
452
|
+
[Key in keyof T]: T[Key] extends Descriptors$3 ? BuildDescriptors$3<T[Key], H, [
|
|
385
453
|
-1,
|
|
386
454
|
0,
|
|
387
455
|
1,
|
|
@@ -390,9 +458,9 @@ type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, De
|
|
|
390
458
|
4,
|
|
391
459
|
5
|
|
392
460
|
][Depth]> : never;
|
|
393
|
-
}, EmptyObject>;
|
|
461
|
+
}, EmptyObject$3>;
|
|
394
462
|
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
395
|
-
type PublicMetadata = {
|
|
463
|
+
type PublicMetadata$3 = {
|
|
396
464
|
PACKAGE_NAME?: string;
|
|
397
465
|
};
|
|
398
466
|
|
|
@@ -404,9 +472,9 @@ declare global {
|
|
|
404
472
|
* A type used to create concerete types from SDK descriptors in
|
|
405
473
|
* case a contextual client is available.
|
|
406
474
|
*/
|
|
407
|
-
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
408
|
-
host: Host;
|
|
409
|
-
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
475
|
+
type MaybeContext$3<T extends Descriptors$3> = globalThis.ContextualClient extends {
|
|
476
|
+
host: Host$3;
|
|
477
|
+
} ? BuildDescriptors$3<T, globalThis.ContextualClient['host']> : T;
|
|
410
478
|
|
|
411
479
|
/** An external database connection defines a connection between an external database and a Wix site or project. */
|
|
412
480
|
interface ExternalDatabaseConnection {
|
|
@@ -825,7 +893,7 @@ interface UpdateExternalDatabaseConnection {
|
|
|
825
893
|
capabilities?: Capabilities;
|
|
826
894
|
}
|
|
827
895
|
|
|
828
|
-
declare function getExternalDatabaseConnection$1(httpClient: HttpClient): GetExternalDatabaseConnectionSignature;
|
|
896
|
+
declare function getExternalDatabaseConnection$1(httpClient: HttpClient$3): GetExternalDatabaseConnectionSignature;
|
|
829
897
|
interface GetExternalDatabaseConnectionSignature {
|
|
830
898
|
/**
|
|
831
899
|
* Retrieves an external database connection by name.
|
|
@@ -834,14 +902,14 @@ interface GetExternalDatabaseConnectionSignature {
|
|
|
834
902
|
*/
|
|
835
903
|
(name: string): Promise<ExternalDatabaseConnection & ExternalDatabaseConnectionNonNullableFields>;
|
|
836
904
|
}
|
|
837
|
-
declare function listExternalDatabaseConnections$1(httpClient: HttpClient): ListExternalDatabaseConnectionsSignature;
|
|
905
|
+
declare function listExternalDatabaseConnections$1(httpClient: HttpClient$3): ListExternalDatabaseConnectionsSignature;
|
|
838
906
|
interface ListExternalDatabaseConnectionsSignature {
|
|
839
907
|
/**
|
|
840
908
|
* Retrieves a list of all external database collections associated with the site or project.
|
|
841
909
|
*/
|
|
842
910
|
(options?: ListExternalDatabaseConnectionsOptions | undefined): Promise<ListExternalDatabaseConnectionsResponse & ListExternalDatabaseConnectionsResponseNonNullableFields>;
|
|
843
911
|
}
|
|
844
|
-
declare function createExternalDatabaseConnection$1(httpClient: HttpClient): CreateExternalDatabaseConnectionSignature;
|
|
912
|
+
declare function createExternalDatabaseConnection$1(httpClient: HttpClient$3): CreateExternalDatabaseConnectionSignature;
|
|
845
913
|
interface CreateExternalDatabaseConnectionSignature {
|
|
846
914
|
/**
|
|
847
915
|
* Creates a new external database connection.
|
|
@@ -854,7 +922,7 @@ interface CreateExternalDatabaseConnectionSignature {
|
|
|
854
922
|
*/
|
|
855
923
|
(externalDatabaseConnection: ExternalDatabaseConnection, options: CreateExternalDatabaseConnectionOptions): Promise<ExternalDatabaseConnection & ExternalDatabaseConnectionNonNullableFields>;
|
|
856
924
|
}
|
|
857
|
-
declare function updateExternalDatabaseConnection$1(httpClient: HttpClient): UpdateExternalDatabaseConnectionSignature;
|
|
925
|
+
declare function updateExternalDatabaseConnection$1(httpClient: HttpClient$3): UpdateExternalDatabaseConnectionSignature;
|
|
858
926
|
interface UpdateExternalDatabaseConnectionSignature {
|
|
859
927
|
/**
|
|
860
928
|
* Updates an external database connection.
|
|
@@ -873,7 +941,7 @@ interface UpdateExternalDatabaseConnectionSignature {
|
|
|
873
941
|
*/
|
|
874
942
|
(name: string, externalDatabaseConnection: UpdateExternalDatabaseConnection): Promise<ExternalDatabaseConnection & ExternalDatabaseConnectionNonNullableFields>;
|
|
875
943
|
}
|
|
876
|
-
declare function deleteExternalDatabaseConnection$1(httpClient: HttpClient): DeleteExternalDatabaseConnectionSignature;
|
|
944
|
+
declare function deleteExternalDatabaseConnection$1(httpClient: HttpClient$3): DeleteExternalDatabaseConnectionSignature;
|
|
877
945
|
interface DeleteExternalDatabaseConnectionSignature {
|
|
878
946
|
/**
|
|
879
947
|
* Deletes an external database connection.
|
|
@@ -887,31 +955,13 @@ declare const onExternalDatabaseConnectionCreated$1: EventDefinition$3<ExternalD
|
|
|
887
955
|
declare const onExternalDatabaseConnectionUpdated$1: EventDefinition$3<ExternalDatabaseConnectionUpdatedEnvelope, "wix.data.v1.external_database_connection_updated">;
|
|
888
956
|
declare const onExternalDatabaseConnectionDeleted$1: EventDefinition$3<ExternalDatabaseConnectionDeletedEnvelope, "wix.data.v1.external_database_connection_deleted">;
|
|
889
957
|
|
|
890
|
-
|
|
891
|
-
__type: 'event-definition';
|
|
892
|
-
type: Type;
|
|
893
|
-
isDomainEvent?: boolean;
|
|
894
|
-
transformations?: (envelope: unknown) => Payload;
|
|
895
|
-
__payload: Payload;
|
|
896
|
-
};
|
|
897
|
-
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
898
|
-
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
899
|
-
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
900
|
-
|
|
901
|
-
declare global {
|
|
902
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
903
|
-
interface SymbolConstructor {
|
|
904
|
-
readonly observable: symbol;
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
declare function createEventModule$2<T extends EventDefinition$2<any, string>>(eventDefinition: T): BuildEventDefinition$2<T> & T;
|
|
958
|
+
declare function createEventModule$2<T extends EventDefinition$3<any, string>>(eventDefinition: T): BuildEventDefinition$3<T> & T;
|
|
909
959
|
|
|
910
|
-
declare const getExternalDatabaseConnection: MaybeContext<BuildRESTFunction<typeof getExternalDatabaseConnection$1> & typeof getExternalDatabaseConnection$1>;
|
|
911
|
-
declare const listExternalDatabaseConnections: MaybeContext<BuildRESTFunction<typeof listExternalDatabaseConnections$1> & typeof listExternalDatabaseConnections$1>;
|
|
912
|
-
declare const createExternalDatabaseConnection: MaybeContext<BuildRESTFunction<typeof createExternalDatabaseConnection$1> & typeof createExternalDatabaseConnection$1>;
|
|
913
|
-
declare const updateExternalDatabaseConnection: MaybeContext<BuildRESTFunction<typeof updateExternalDatabaseConnection$1> & typeof updateExternalDatabaseConnection$1>;
|
|
914
|
-
declare const deleteExternalDatabaseConnection: MaybeContext<BuildRESTFunction<typeof deleteExternalDatabaseConnection$1> & typeof deleteExternalDatabaseConnection$1>;
|
|
960
|
+
declare const getExternalDatabaseConnection: MaybeContext$3<BuildRESTFunction$3<typeof getExternalDatabaseConnection$1> & typeof getExternalDatabaseConnection$1>;
|
|
961
|
+
declare const listExternalDatabaseConnections: MaybeContext$3<BuildRESTFunction$3<typeof listExternalDatabaseConnections$1> & typeof listExternalDatabaseConnections$1>;
|
|
962
|
+
declare const createExternalDatabaseConnection: MaybeContext$3<BuildRESTFunction$3<typeof createExternalDatabaseConnection$1> & typeof createExternalDatabaseConnection$1>;
|
|
963
|
+
declare const updateExternalDatabaseConnection: MaybeContext$3<BuildRESTFunction$3<typeof updateExternalDatabaseConnection$1> & typeof updateExternalDatabaseConnection$1>;
|
|
964
|
+
declare const deleteExternalDatabaseConnection: MaybeContext$3<BuildRESTFunction$3<typeof deleteExternalDatabaseConnection$1> & typeof deleteExternalDatabaseConnection$1>;
|
|
915
965
|
|
|
916
966
|
type _publicOnExternalDatabaseConnectionCreatedType = typeof onExternalDatabaseConnectionCreated$1;
|
|
917
967
|
/**
|
|
@@ -980,129 +1030,607 @@ declare namespace context$3 {
|
|
|
980
1030
|
export { type ActionEvent$2 as ActionEvent, type BaseEventMetadata$2 as BaseEventMetadata, type context$3_Capabilities as Capabilities, context$3_CauseOfFailure as CauseOfFailure, context$3_CollectionsFound as CollectionsFound, type context$3_ConnectionStatus as ConnectionStatus, context$3_ConnectionType as ConnectionType, type context$3_CreateExternalDatabaseConnectionOptions as CreateExternalDatabaseConnectionOptions, type context$3_CreateExternalDatabaseConnectionRequest as CreateExternalDatabaseConnectionRequest, type context$3_CreateExternalDatabaseConnectionResponse as CreateExternalDatabaseConnectionResponse, type context$3_CreateExternalDatabaseConnectionResponseNonNullableFields as CreateExternalDatabaseConnectionResponseNonNullableFields, type context$3_DeleteExternalDatabaseConnectionRequest as DeleteExternalDatabaseConnectionRequest, type context$3_DeleteExternalDatabaseConnectionResponse as DeleteExternalDatabaseConnectionResponse, type DomainEvent$2 as DomainEvent, type DomainEventBodyOneOf$2 as DomainEventBodyOneOf, type EntityCreatedEvent$2 as EntityCreatedEvent, type EntityDeletedEvent$2 as EntityDeletedEvent, type EntityUpdatedEvent$2 as EntityUpdatedEvent, type EventMetadata$2 as EventMetadata, type context$3_ExternalDatabaseConnection as ExternalDatabaseConnection, type context$3_ExternalDatabaseConnectionCreatedEnvelope as ExternalDatabaseConnectionCreatedEnvelope, type context$3_ExternalDatabaseConnectionDeletedEnvelope as ExternalDatabaseConnectionDeletedEnvelope, type context$3_ExternalDatabaseConnectionNonNullableFields as ExternalDatabaseConnectionNonNullableFields, type context$3_ExternalDatabaseConnectionUpdatedEnvelope as ExternalDatabaseConnectionUpdatedEnvelope, context$3_FieldType as FieldType, type context$3_GetExternalDatabaseConnectionRequest as GetExternalDatabaseConnectionRequest, type context$3_GetExternalDatabaseConnectionResponse as GetExternalDatabaseConnectionResponse, type context$3_GetExternalDatabaseConnectionResponseNonNullableFields as GetExternalDatabaseConnectionResponseNonNullableFields, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, type context$3_ListExternalDatabaseConnectionsOptions as ListExternalDatabaseConnectionsOptions, type context$3_ListExternalDatabaseConnectionsRequest as ListExternalDatabaseConnectionsRequest, type context$3_ListExternalDatabaseConnectionsResponse as ListExternalDatabaseConnectionsResponse, type context$3_ListExternalDatabaseConnectionsResponseNonNullableFields as ListExternalDatabaseConnectionsResponseNonNullableFields, type MessageEnvelope$2 as MessageEnvelope, type Paging$3 as Paging, type PagingMetadata$1 as PagingMetadata, context$3_ProtocolVersion as ProtocolVersion, type RestoreInfo$2 as RestoreInfo, type context$3_UpdateExternalDatabaseConnection as UpdateExternalDatabaseConnection, type context$3_UpdateExternalDatabaseConnectionRequest as UpdateExternalDatabaseConnectionRequest, type context$3_UpdateExternalDatabaseConnectionResponse as UpdateExternalDatabaseConnectionResponse, type context$3_UpdateExternalDatabaseConnectionResponseNonNullableFields as UpdateExternalDatabaseConnectionResponseNonNullableFields, WebhookIdentityType$2 as WebhookIdentityType, type context$3__publicOnExternalDatabaseConnectionCreatedType as _publicOnExternalDatabaseConnectionCreatedType, type context$3__publicOnExternalDatabaseConnectionDeletedType as _publicOnExternalDatabaseConnectionDeletedType, type context$3__publicOnExternalDatabaseConnectionUpdatedType as _publicOnExternalDatabaseConnectionUpdatedType, context$3_createExternalDatabaseConnection as createExternalDatabaseConnection, context$3_deleteExternalDatabaseConnection as deleteExternalDatabaseConnection, context$3_getExternalDatabaseConnection as getExternalDatabaseConnection, context$3_listExternalDatabaseConnections as listExternalDatabaseConnections, context$3_onExternalDatabaseConnectionCreated as onExternalDatabaseConnectionCreated, context$3_onExternalDatabaseConnectionDeleted as onExternalDatabaseConnectionDeleted, context$3_onExternalDatabaseConnectionUpdated as onExternalDatabaseConnectionUpdated, onExternalDatabaseConnectionCreated$1 as publicOnExternalDatabaseConnectionCreated, onExternalDatabaseConnectionDeleted$1 as publicOnExternalDatabaseConnectionDeleted, onExternalDatabaseConnectionUpdated$1 as publicOnExternalDatabaseConnectionUpdated, context$3_updateExternalDatabaseConnection as updateExternalDatabaseConnection };
|
|
981
1031
|
}
|
|
982
1032
|
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
/**
|
|
998
|
-
* ID of the app that defined this collection. For user-defined collections, this value is null.
|
|
999
|
-
* @readonly
|
|
1000
|
-
*/
|
|
1001
|
-
ownerAppId?: string | null;
|
|
1002
|
-
/**
|
|
1003
|
-
* Maximum number of items returned in a single query, based on the underlying storage.
|
|
1004
|
-
* Native collections have a maximum page size of 1000 for offset-based queries or 100 for cursor-based queries.
|
|
1005
|
-
* External collections' maximum page size defaults to 50, but an external provider can set any maximum value up to 1000.
|
|
1006
|
-
* @readonly
|
|
1007
|
-
*/
|
|
1008
|
-
maxPageSize?: number | null;
|
|
1009
|
-
/** Collection's display name as shown in the CMS. For example, `My First Collection`. */
|
|
1010
|
-
displayName?: string | null;
|
|
1011
|
-
/**
|
|
1012
|
-
* Indicates how the collection's items are sorted by default when a query doesn't specify an order.
|
|
1013
|
-
* @readonly
|
|
1014
|
-
*/
|
|
1015
|
-
defaultDisplayOrder?: Sort;
|
|
1016
|
-
/**
|
|
1017
|
-
* UI-friendly namespace of the Wix app with which the data collection is associated, such as Stores or Bookings.
|
|
1018
|
-
* Empty for all data collections not owned by internal Wix apps.
|
|
1019
|
-
* @readonly
|
|
1020
|
-
*/
|
|
1021
|
-
displayNamespace?: string | null;
|
|
1022
|
-
/** The field whose value the CMS displays to represent the collection item when referenced in a different collection. */
|
|
1023
|
-
displayField?: string | null;
|
|
1024
|
-
/**
|
|
1025
|
-
* Capabilities the collection supports.
|
|
1026
|
-
* @readonly
|
|
1027
|
-
*/
|
|
1028
|
-
capabilities?: CollectionCapabilities;
|
|
1029
|
-
/** Collection's field structure. */
|
|
1030
|
-
fields?: Field$1[];
|
|
1031
|
-
/** Levels of permission for accessing and modifying data, defined by lowest role needed to perform each action. */
|
|
1032
|
-
permissions?: Permissions;
|
|
1033
|
-
/**
|
|
1034
|
-
* Collection's current revision number, which increments each time the collection is updated. For an update operation to succeed, you must pass the latest revision number.
|
|
1035
|
-
* @readonly
|
|
1036
|
-
*/
|
|
1037
|
-
revision?: string | null;
|
|
1038
|
-
/** All plugins the collection uses. Plugins apply additional capabilities to the collection or extend its functionality. */
|
|
1039
|
-
plugins?: Plugin[];
|
|
1040
|
-
/**
|
|
1041
|
-
* All paging modes the collection supports. In native collections, offset-based paging is supported by default.
|
|
1042
|
-
* @readonly
|
|
1043
|
-
*/
|
|
1044
|
-
pagingModes?: PagingMode[];
|
|
1045
|
-
/**
|
|
1046
|
-
* Date the collection was created.
|
|
1047
|
-
* @readonly
|
|
1048
|
-
*/
|
|
1049
|
-
_createdDate?: Date;
|
|
1033
|
+
type HostModule$2<T, H extends Host$2> = {
|
|
1034
|
+
__type: 'host';
|
|
1035
|
+
create(host: H): T;
|
|
1036
|
+
};
|
|
1037
|
+
type HostModuleAPI$2<T extends HostModule$2<any, any>> = T extends HostModule$2<infer U, any> ? U : never;
|
|
1038
|
+
type Host$2<Environment = unknown> = {
|
|
1039
|
+
channel: {
|
|
1040
|
+
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
1041
|
+
disconnect: () => void;
|
|
1042
|
+
} | Promise<{
|
|
1043
|
+
disconnect: () => void;
|
|
1044
|
+
}>;
|
|
1045
|
+
};
|
|
1046
|
+
environment?: Environment;
|
|
1050
1047
|
/**
|
|
1051
|
-
*
|
|
1052
|
-
* @readonly
|
|
1048
|
+
* Optional name of the environment, use for logging
|
|
1053
1049
|
*/
|
|
1054
|
-
|
|
1055
|
-
}
|
|
1056
|
-
declare enum CollectionType {
|
|
1057
|
-
/** User-created collection. */
|
|
1058
|
-
NATIVE = "NATIVE",
|
|
1059
|
-
/** [Collection](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code#what-are-wix-app-collections) created by a Wix app when it is installed. This type of collection can be modified dynamically by that app (for example, Wix Forms). */
|
|
1060
|
-
WIX_APP = "WIX_APP",
|
|
1061
|
-
/** Collection created by a Wix Blocks app. */
|
|
1062
|
-
BLOCKS_APP = "BLOCKS_APP",
|
|
1063
|
-
/** Collection located in externally connected storage. */
|
|
1064
|
-
EXTERNAL = "EXTERNAL"
|
|
1065
|
-
}
|
|
1066
|
-
interface Sort {
|
|
1067
|
-
/** Field to sort by. */
|
|
1068
|
-
fieldKey?: string;
|
|
1050
|
+
name?: string;
|
|
1069
1051
|
/**
|
|
1070
|
-
*
|
|
1071
|
-
*
|
|
1072
|
-
* Default: `ASC`
|
|
1052
|
+
* Optional bast url to use for API requests, for example `www.wixapis.com`
|
|
1073
1053
|
*/
|
|
1074
|
-
|
|
1075
|
-
}
|
|
1076
|
-
declare enum Direction {
|
|
1077
|
-
ASC = "ASC",
|
|
1078
|
-
DESC = "DESC"
|
|
1079
|
-
}
|
|
1080
|
-
interface CollectionCapabilities {
|
|
1081
|
-
/** Data operations the collection supports. The listed operations can be performed on data the collection contains. */
|
|
1082
|
-
dataOperations?: DataOperation[];
|
|
1054
|
+
apiBaseUrl?: string;
|
|
1083
1055
|
/**
|
|
1084
|
-
*
|
|
1085
|
-
*
|
|
1086
|
-
* + `REMOVE`: Allows deleting the entire collection. If not included, the collection can't be deleted.
|
|
1056
|
+
* Possible data to be provided by every host, for cross cutting concerns
|
|
1057
|
+
* like internationalization, billing, etc.
|
|
1087
1058
|
*/
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1059
|
+
essentials?: {
|
|
1060
|
+
/**
|
|
1061
|
+
* The language of the currently viewed session
|
|
1062
|
+
*/
|
|
1063
|
+
language?: string;
|
|
1064
|
+
/**
|
|
1065
|
+
* The locale of the currently viewed session
|
|
1066
|
+
*/
|
|
1067
|
+
locale?: string;
|
|
1068
|
+
/**
|
|
1069
|
+
* Any headers that should be passed through to the API requests
|
|
1070
|
+
*/
|
|
1071
|
+
passThroughHeaders?: Record<string, string>;
|
|
1072
|
+
};
|
|
1073
|
+
};
|
|
1074
|
+
|
|
1075
|
+
type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
|
|
1076
|
+
interface HttpClient$2 {
|
|
1077
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
1078
|
+
fetchWithAuth: typeof fetch;
|
|
1079
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
1080
|
+
getActiveToken?: () => string | undefined;
|
|
1091
1081
|
}
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
GET
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1082
|
+
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
1083
|
+
type HttpResponse$2<T = any> = {
|
|
1084
|
+
data: T;
|
|
1085
|
+
status: number;
|
|
1086
|
+
statusText: string;
|
|
1087
|
+
headers: any;
|
|
1088
|
+
request?: any;
|
|
1089
|
+
};
|
|
1090
|
+
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
1091
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1092
|
+
url: string;
|
|
1093
|
+
data?: Data;
|
|
1094
|
+
params?: URLSearchParams;
|
|
1095
|
+
} & APIMetadata$2;
|
|
1096
|
+
type APIMetadata$2 = {
|
|
1097
|
+
methodFqn?: string;
|
|
1098
|
+
entityFqdn?: string;
|
|
1099
|
+
packageName?: string;
|
|
1100
|
+
};
|
|
1101
|
+
type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
|
|
1102
|
+
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
1103
|
+
__type: 'event-definition';
|
|
1104
|
+
type: Type;
|
|
1105
|
+
isDomainEvent?: boolean;
|
|
1106
|
+
transformations?: (envelope: unknown) => Payload;
|
|
1107
|
+
__payload: Payload;
|
|
1108
|
+
};
|
|
1109
|
+
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
1110
|
+
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
1111
|
+
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
1112
|
+
|
|
1113
|
+
type ServicePluginMethodInput$2 = {
|
|
1114
|
+
request: any;
|
|
1115
|
+
metadata: any;
|
|
1116
|
+
};
|
|
1117
|
+
type ServicePluginContract$2 = Record<string, (payload: ServicePluginMethodInput$2) => unknown | Promise<unknown>>;
|
|
1118
|
+
type ServicePluginMethodMetadata$2 = {
|
|
1119
|
+
name: string;
|
|
1120
|
+
primaryHttpMappingPath: string;
|
|
1121
|
+
transformations: {
|
|
1122
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$2;
|
|
1123
|
+
toREST: (...args: unknown[]) => unknown;
|
|
1124
|
+
};
|
|
1125
|
+
};
|
|
1126
|
+
type ServicePluginDefinition$2<Contract extends ServicePluginContract$2> = {
|
|
1127
|
+
__type: 'service-plugin-definition';
|
|
1128
|
+
componentType: string;
|
|
1129
|
+
methods: ServicePluginMethodMetadata$2[];
|
|
1130
|
+
__contract: Contract;
|
|
1131
|
+
};
|
|
1132
|
+
declare function ServicePluginDefinition$2<Contract extends ServicePluginContract$2>(componentType: string, methods: ServicePluginMethodMetadata$2[]): ServicePluginDefinition$2<Contract>;
|
|
1133
|
+
type BuildServicePluginDefinition$2<T extends ServicePluginDefinition$2<any>> = (implementation: T['__contract']) => void;
|
|
1134
|
+
declare const SERVICE_PLUGIN_ERROR_TYPE$2 = "wix_spi_error";
|
|
1135
|
+
|
|
1136
|
+
type RequestContext$2 = {
|
|
1137
|
+
isSSR: boolean;
|
|
1138
|
+
host: string;
|
|
1139
|
+
protocol?: string;
|
|
1140
|
+
};
|
|
1141
|
+
type ResponseTransformer$2 = (data: any, headers?: any) => any;
|
|
1142
|
+
/**
|
|
1143
|
+
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
1144
|
+
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
1145
|
+
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
1146
|
+
*/
|
|
1147
|
+
type Method$2 = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
1148
|
+
type AmbassadorRequestOptions$2<T = any> = {
|
|
1149
|
+
_?: T;
|
|
1150
|
+
url?: string;
|
|
1151
|
+
method?: Method$2;
|
|
1152
|
+
params?: any;
|
|
1153
|
+
data?: any;
|
|
1154
|
+
transformResponse?: ResponseTransformer$2 | ResponseTransformer$2[];
|
|
1155
|
+
};
|
|
1156
|
+
type AmbassadorFactory$2<Request, Response> = (payload: Request) => ((context: RequestContext$2) => AmbassadorRequestOptions$2<Response>) & {
|
|
1157
|
+
__isAmbassador: boolean;
|
|
1158
|
+
};
|
|
1159
|
+
type AmbassadorFunctionDescriptor$2<Request = any, Response = any> = AmbassadorFactory$2<Request, Response>;
|
|
1160
|
+
type BuildAmbassadorFunction$2<T extends AmbassadorFunctionDescriptor$2> = T extends AmbassadorFunctionDescriptor$2<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
1161
|
+
|
|
1162
|
+
declare global {
|
|
1163
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1164
|
+
interface SymbolConstructor {
|
|
1165
|
+
readonly observable: symbol;
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
declare const emptyObjectSymbol$2: unique symbol;
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
Represents a strictly empty plain object, the `{}` value.
|
|
1173
|
+
|
|
1174
|
+
When you annotate something as the type `{}`, it can be anything except `null` and `undefined`. This means that you cannot use `{}` to represent an empty plain object ([read more](https://stackoverflow.com/questions/47339869/typescript-empty-object-and-any-difference/52193484#52193484)).
|
|
1175
|
+
|
|
1176
|
+
@example
|
|
1177
|
+
```
|
|
1178
|
+
import type {EmptyObject} from 'type-fest';
|
|
1179
|
+
|
|
1180
|
+
// The following illustrates the problem with `{}`.
|
|
1181
|
+
const foo1: {} = {}; // Pass
|
|
1182
|
+
const foo2: {} = []; // Pass
|
|
1183
|
+
const foo3: {} = 42; // Pass
|
|
1184
|
+
const foo4: {} = {a: 1}; // Pass
|
|
1185
|
+
|
|
1186
|
+
// With `EmptyObject` only the first case is valid.
|
|
1187
|
+
const bar1: EmptyObject = {}; // Pass
|
|
1188
|
+
const bar2: EmptyObject = 42; // Fail
|
|
1189
|
+
const bar3: EmptyObject = []; // Fail
|
|
1190
|
+
const bar4: EmptyObject = {a: 1}; // Fail
|
|
1191
|
+
```
|
|
1192
|
+
|
|
1193
|
+
Unfortunately, `Record<string, never>`, `Record<keyof any, never>` and `Record<never, never>` do not work. See {@link https://github.com/sindresorhus/type-fest/issues/395 #395}.
|
|
1194
|
+
|
|
1195
|
+
@category Object
|
|
1196
|
+
*/
|
|
1197
|
+
type EmptyObject$2 = {[emptyObjectSymbol$2]?: never};
|
|
1198
|
+
|
|
1199
|
+
/**
|
|
1200
|
+
Returns a boolean for whether the two given types are equal.
|
|
1201
|
+
|
|
1202
|
+
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
1203
|
+
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
1204
|
+
|
|
1205
|
+
Use-cases:
|
|
1206
|
+
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
1207
|
+
|
|
1208
|
+
@example
|
|
1209
|
+
```
|
|
1210
|
+
import type {IsEqual} from 'type-fest';
|
|
1211
|
+
|
|
1212
|
+
// This type returns a boolean for whether the given array includes the given item.
|
|
1213
|
+
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
1214
|
+
type Includes<Value extends readonly any[], Item> =
|
|
1215
|
+
Value extends readonly [Value[0], ...infer rest]
|
|
1216
|
+
? IsEqual<Value[0], Item> extends true
|
|
1217
|
+
? true
|
|
1218
|
+
: Includes<rest, Item>
|
|
1219
|
+
: false;
|
|
1220
|
+
```
|
|
1221
|
+
|
|
1222
|
+
@category Type Guard
|
|
1223
|
+
@category Utilities
|
|
1224
|
+
*/
|
|
1225
|
+
type IsEqual$2<A, B> =
|
|
1226
|
+
(<G>() => G extends A ? 1 : 2) extends
|
|
1227
|
+
(<G>() => G extends B ? 1 : 2)
|
|
1228
|
+
? true
|
|
1229
|
+
: false;
|
|
1230
|
+
|
|
1231
|
+
/**
|
|
1232
|
+
Filter out keys from an object.
|
|
1233
|
+
|
|
1234
|
+
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
1235
|
+
Returns `never` if `Key` extends `Exclude`.
|
|
1236
|
+
Returns `Key` otherwise.
|
|
1237
|
+
|
|
1238
|
+
@example
|
|
1239
|
+
```
|
|
1240
|
+
type Filtered = Filter<'foo', 'foo'>;
|
|
1241
|
+
//=> never
|
|
1242
|
+
```
|
|
1243
|
+
|
|
1244
|
+
@example
|
|
1245
|
+
```
|
|
1246
|
+
type Filtered = Filter<'bar', string>;
|
|
1247
|
+
//=> never
|
|
1248
|
+
```
|
|
1249
|
+
|
|
1250
|
+
@example
|
|
1251
|
+
```
|
|
1252
|
+
type Filtered = Filter<'bar', 'foo'>;
|
|
1253
|
+
//=> 'bar'
|
|
1254
|
+
```
|
|
1255
|
+
|
|
1256
|
+
@see {Except}
|
|
1257
|
+
*/
|
|
1258
|
+
type Filter$2<KeyType, ExcludeType> = IsEqual$2<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
1259
|
+
|
|
1260
|
+
type ExceptOptions$2 = {
|
|
1261
|
+
/**
|
|
1262
|
+
Disallow assigning non-specified properties.
|
|
1263
|
+
|
|
1264
|
+
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
1265
|
+
|
|
1266
|
+
@default false
|
|
1267
|
+
*/
|
|
1268
|
+
requireExactProps?: boolean;
|
|
1269
|
+
};
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
Create a type from an object type without certain keys.
|
|
1273
|
+
|
|
1274
|
+
We recommend setting the `requireExactProps` option to `true`.
|
|
1275
|
+
|
|
1276
|
+
This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.
|
|
1277
|
+
|
|
1278
|
+
This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)).
|
|
1279
|
+
|
|
1280
|
+
@example
|
|
1281
|
+
```
|
|
1282
|
+
import type {Except} from 'type-fest';
|
|
1283
|
+
|
|
1284
|
+
type Foo = {
|
|
1285
|
+
a: number;
|
|
1286
|
+
b: string;
|
|
1287
|
+
};
|
|
1288
|
+
|
|
1289
|
+
type FooWithoutA = Except<Foo, 'a'>;
|
|
1290
|
+
//=> {b: string}
|
|
1291
|
+
|
|
1292
|
+
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
1293
|
+
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
1294
|
+
|
|
1295
|
+
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
1296
|
+
//=> {a: number} & Partial<Record<"b", never>>
|
|
1297
|
+
|
|
1298
|
+
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
1299
|
+
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
1300
|
+
```
|
|
1301
|
+
|
|
1302
|
+
@category Object
|
|
1303
|
+
*/
|
|
1304
|
+
type Except$2<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions$2 = {requireExactProps: false}> = {
|
|
1305
|
+
[KeyType in keyof ObjectType as Filter$2<KeyType, KeysType>]: ObjectType[KeyType];
|
|
1306
|
+
} & (Options['requireExactProps'] extends true
|
|
1307
|
+
? Partial<Record<KeysType, never>>
|
|
1308
|
+
: {});
|
|
1309
|
+
|
|
1310
|
+
/**
|
|
1311
|
+
Returns a boolean for whether the given type is `never`.
|
|
1312
|
+
|
|
1313
|
+
@link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
|
|
1314
|
+
@link https://stackoverflow.com/a/53984913/10292952
|
|
1315
|
+
@link https://www.zhenghao.io/posts/ts-never
|
|
1316
|
+
|
|
1317
|
+
Useful in type utilities, such as checking if something does not occur.
|
|
1318
|
+
|
|
1319
|
+
@example
|
|
1320
|
+
```
|
|
1321
|
+
import type {IsNever, And} from 'type-fest';
|
|
1322
|
+
|
|
1323
|
+
// https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
|
|
1324
|
+
type AreStringsEqual<A extends string, B extends string> =
|
|
1325
|
+
And<
|
|
1326
|
+
IsNever<Exclude<A, B>> extends true ? true : false,
|
|
1327
|
+
IsNever<Exclude<B, A>> extends true ? true : false
|
|
1328
|
+
>;
|
|
1329
|
+
|
|
1330
|
+
type EndIfEqual<I extends string, O extends string> =
|
|
1331
|
+
AreStringsEqual<I, O> extends true
|
|
1332
|
+
? never
|
|
1333
|
+
: void;
|
|
1334
|
+
|
|
1335
|
+
function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
|
|
1336
|
+
if (input === output) {
|
|
1337
|
+
process.exit(0);
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
endIfEqual('abc', 'abc');
|
|
1342
|
+
//=> never
|
|
1343
|
+
|
|
1344
|
+
endIfEqual('abc', '123');
|
|
1345
|
+
//=> void
|
|
1346
|
+
```
|
|
1347
|
+
|
|
1348
|
+
@category Type Guard
|
|
1349
|
+
@category Utilities
|
|
1350
|
+
*/
|
|
1351
|
+
type IsNever$2<T> = [T] extends [never] ? true : false;
|
|
1352
|
+
|
|
1353
|
+
/**
|
|
1354
|
+
An if-else-like type that resolves depending on whether the given type is `never`.
|
|
1355
|
+
|
|
1356
|
+
@see {@link IsNever}
|
|
1357
|
+
|
|
1358
|
+
@example
|
|
1359
|
+
```
|
|
1360
|
+
import type {IfNever} from 'type-fest';
|
|
1361
|
+
|
|
1362
|
+
type ShouldBeTrue = IfNever<never>;
|
|
1363
|
+
//=> true
|
|
1364
|
+
|
|
1365
|
+
type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
|
|
1366
|
+
//=> 'bar'
|
|
1367
|
+
```
|
|
1368
|
+
|
|
1369
|
+
@category Type Guard
|
|
1370
|
+
@category Utilities
|
|
1371
|
+
*/
|
|
1372
|
+
type IfNever$2<T, TypeIfNever = true, TypeIfNotNever = false> = (
|
|
1373
|
+
IsNever$2<T> extends true ? TypeIfNever : TypeIfNotNever
|
|
1374
|
+
);
|
|
1375
|
+
|
|
1376
|
+
/**
|
|
1377
|
+
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
1378
|
+
|
|
1379
|
+
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
1380
|
+
|
|
1381
|
+
@example
|
|
1382
|
+
```
|
|
1383
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
1384
|
+
|
|
1385
|
+
interface Example {
|
|
1386
|
+
a: string;
|
|
1387
|
+
b: string | number;
|
|
1388
|
+
c?: string;
|
|
1389
|
+
d: {};
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
1393
|
+
//=> 'a'
|
|
1394
|
+
```
|
|
1395
|
+
|
|
1396
|
+
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
1397
|
+
|
|
1398
|
+
@example
|
|
1399
|
+
```
|
|
1400
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
1401
|
+
|
|
1402
|
+
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
1403
|
+
//=> 'a' | 'c'
|
|
1404
|
+
```
|
|
1405
|
+
|
|
1406
|
+
@category Object
|
|
1407
|
+
*/
|
|
1408
|
+
type ConditionalKeys$2<Base, Condition> =
|
|
1409
|
+
{
|
|
1410
|
+
// Map through all the keys of the given base type.
|
|
1411
|
+
[Key in keyof Base]-?:
|
|
1412
|
+
// Pick only keys with types extending the given `Condition` type.
|
|
1413
|
+
Base[Key] extends Condition
|
|
1414
|
+
// Retain this key
|
|
1415
|
+
// If the value for the key extends never, only include it if `Condition` also extends never
|
|
1416
|
+
? IfNever$2<Base[Key], IfNever$2<Condition, Key, never>, Key>
|
|
1417
|
+
// Discard this key since the condition fails.
|
|
1418
|
+
: never;
|
|
1419
|
+
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
1420
|
+
}[keyof Base];
|
|
1421
|
+
|
|
1422
|
+
/**
|
|
1423
|
+
Exclude keys from a shape that matches the given `Condition`.
|
|
1424
|
+
|
|
1425
|
+
This is useful when you want to create a new type with a specific set of keys from a shape. For example, you might want to exclude all the primitive properties from a class and form a new shape containing everything but the primitive properties.
|
|
1426
|
+
|
|
1427
|
+
@example
|
|
1428
|
+
```
|
|
1429
|
+
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
1430
|
+
|
|
1431
|
+
class Awesome {
|
|
1432
|
+
name: string;
|
|
1433
|
+
successes: number;
|
|
1434
|
+
failures: bigint;
|
|
1435
|
+
|
|
1436
|
+
run() {}
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
|
|
1440
|
+
//=> {run: () => void}
|
|
1441
|
+
```
|
|
1442
|
+
|
|
1443
|
+
@example
|
|
1444
|
+
```
|
|
1445
|
+
import type {ConditionalExcept} from 'type-fest';
|
|
1446
|
+
|
|
1447
|
+
interface Example {
|
|
1448
|
+
a: string;
|
|
1449
|
+
b: string | number;
|
|
1450
|
+
c: () => void;
|
|
1451
|
+
d: {};
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
1455
|
+
//=> {b: string | number; c: () => void; d: {}}
|
|
1456
|
+
```
|
|
1457
|
+
|
|
1458
|
+
@category Object
|
|
1459
|
+
*/
|
|
1460
|
+
type ConditionalExcept$2<Base, Condition> = Except$2<
|
|
1461
|
+
Base,
|
|
1462
|
+
ConditionalKeys$2<Base, Condition>
|
|
1463
|
+
>;
|
|
1464
|
+
|
|
1465
|
+
/**
|
|
1466
|
+
* Descriptors are objects that describe the API of a module, and the module
|
|
1467
|
+
* can either be a REST module or a host module.
|
|
1468
|
+
* This type is recursive, so it can describe nested modules.
|
|
1469
|
+
*/
|
|
1470
|
+
type Descriptors$2 = RESTFunctionDescriptor$2 | AmbassadorFunctionDescriptor$2 | HostModule$2<any, any> | EventDefinition$2<any> | ServicePluginDefinition$2<any> | {
|
|
1471
|
+
[key: string]: Descriptors$2 | PublicMetadata$2 | any;
|
|
1472
|
+
};
|
|
1473
|
+
/**
|
|
1474
|
+
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
1475
|
+
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
1476
|
+
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
1477
|
+
* do not match the given host (as they will not work with the given host).
|
|
1478
|
+
*/
|
|
1479
|
+
type BuildDescriptors$2<T extends Descriptors$2, H extends Host$2<any> | undefined, Depth extends number = 5> = {
|
|
1480
|
+
done: T;
|
|
1481
|
+
recurse: T extends {
|
|
1482
|
+
__type: typeof SERVICE_PLUGIN_ERROR_TYPE$2;
|
|
1483
|
+
} ? never : T extends AmbassadorFunctionDescriptor$2 ? BuildAmbassadorFunction$2<T> : T extends RESTFunctionDescriptor$2 ? BuildRESTFunction$2<T> : T extends EventDefinition$2<any> ? BuildEventDefinition$2<T> : T extends ServicePluginDefinition$2<any> ? BuildServicePluginDefinition$2<T> : T extends HostModule$2<any, any> ? HostModuleAPI$2<T> : ConditionalExcept$2<{
|
|
1484
|
+
[Key in keyof T]: T[Key] extends Descriptors$2 ? BuildDescriptors$2<T[Key], H, [
|
|
1485
|
+
-1,
|
|
1486
|
+
0,
|
|
1487
|
+
1,
|
|
1488
|
+
2,
|
|
1489
|
+
3,
|
|
1490
|
+
4,
|
|
1491
|
+
5
|
|
1492
|
+
][Depth]> : never;
|
|
1493
|
+
}, EmptyObject$2>;
|
|
1494
|
+
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
1495
|
+
type PublicMetadata$2 = {
|
|
1496
|
+
PACKAGE_NAME?: string;
|
|
1497
|
+
};
|
|
1498
|
+
|
|
1499
|
+
declare global {
|
|
1500
|
+
interface ContextualClient {
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
/**
|
|
1504
|
+
* A type used to create concerete types from SDK descriptors in
|
|
1505
|
+
* case a contextual client is available.
|
|
1506
|
+
*/
|
|
1507
|
+
type MaybeContext$2<T extends Descriptors$2> = globalThis.ContextualClient extends {
|
|
1508
|
+
host: Host$2;
|
|
1509
|
+
} ? BuildDescriptors$2<T, globalThis.ContextualClient['host']> : T;
|
|
1510
|
+
|
|
1511
|
+
/** A data collection determines the structure of data to be stored in a database. */
|
|
1512
|
+
interface DataCollection {
|
|
1513
|
+
/** Collection ID. For example, `my-first-collection`. May include a namespace. */
|
|
1514
|
+
_id?: string;
|
|
1515
|
+
/**
|
|
1516
|
+
* Collection type. Indicates how the collection was created and is stored.
|
|
1517
|
+
*
|
|
1518
|
+
* * `NATIVE`: User-created collection.
|
|
1519
|
+
* * `WIX_APP`: [Collection](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code#what-are-wix-app-collections) created by a Wix app, including [starter collections](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code#what-are-wix-app-starter-collections) created when a Wix app is installed.
|
|
1520
|
+
* * `BLOCKS_APP`: Collection created by a Wix Blocks app.
|
|
1521
|
+
* * `EXTERNAL`: Collection located in externally connected storage.
|
|
1522
|
+
* @readonly
|
|
1523
|
+
*/
|
|
1524
|
+
collectionType?: CollectionType;
|
|
1525
|
+
/**
|
|
1526
|
+
* ID of the app that defined this collection. For user-defined collections, this value is null.
|
|
1527
|
+
* @readonly
|
|
1528
|
+
*/
|
|
1529
|
+
ownerAppId?: string | null;
|
|
1530
|
+
/**
|
|
1531
|
+
* Maximum number of items returned in a single query, based on the underlying storage.
|
|
1532
|
+
* Native collections have a maximum page size of 1000 for offset-based queries or 100 for cursor-based queries.
|
|
1533
|
+
* External collections' maximum page size defaults to 50, but an external provider can set any maximum value up to 1000.
|
|
1534
|
+
* @readonly
|
|
1535
|
+
*/
|
|
1536
|
+
maxPageSize?: number | null;
|
|
1537
|
+
/** Collection's display name as shown in the CMS. For example, `My First Collection`. */
|
|
1538
|
+
displayName?: string | null;
|
|
1539
|
+
/**
|
|
1540
|
+
* Indicates how the collection's items are sorted by default when a query doesn't specify an order.
|
|
1541
|
+
* @readonly
|
|
1542
|
+
*/
|
|
1543
|
+
defaultDisplayOrder?: Sort;
|
|
1544
|
+
/**
|
|
1545
|
+
* UI-friendly namespace of the Wix app with which the data collection is associated, such as Stores or Bookings.
|
|
1546
|
+
* Empty for all data collections not owned by internal Wix apps.
|
|
1547
|
+
* @readonly
|
|
1548
|
+
*/
|
|
1549
|
+
displayNamespace?: string | null;
|
|
1550
|
+
/** The field whose value the CMS displays to represent the collection item when referenced in a different collection. */
|
|
1551
|
+
displayField?: string | null;
|
|
1552
|
+
/**
|
|
1553
|
+
* Capabilities the collection supports.
|
|
1554
|
+
* @readonly
|
|
1555
|
+
*/
|
|
1556
|
+
capabilities?: CollectionCapabilities;
|
|
1557
|
+
/** Collection's field structure. */
|
|
1558
|
+
fields?: Field$1[];
|
|
1559
|
+
/** Levels of permission for accessing and modifying data, defined by lowest role needed to perform each action. */
|
|
1560
|
+
permissions?: Permissions;
|
|
1561
|
+
/**
|
|
1562
|
+
* Collection's current revision number, which increments each time the collection is updated. For an update operation to succeed, you must pass the latest revision number.
|
|
1563
|
+
* @readonly
|
|
1564
|
+
*/
|
|
1565
|
+
revision?: string | null;
|
|
1566
|
+
/** All plugins the collection uses. Plugins apply additional capabilities to the collection or extend its functionality. */
|
|
1567
|
+
plugins?: Plugin[];
|
|
1568
|
+
/**
|
|
1569
|
+
* All paging modes the collection supports. In native collections, offset-based paging is supported by default.
|
|
1570
|
+
* @readonly
|
|
1571
|
+
*/
|
|
1572
|
+
pagingModes?: PagingMode[];
|
|
1573
|
+
/**
|
|
1574
|
+
* Date the collection was created.
|
|
1575
|
+
* @readonly
|
|
1576
|
+
*/
|
|
1577
|
+
_createdDate?: Date;
|
|
1578
|
+
/**
|
|
1579
|
+
* Date the collection was last updated.
|
|
1580
|
+
* @readonly
|
|
1581
|
+
*/
|
|
1582
|
+
_updatedDate?: Date;
|
|
1583
|
+
}
|
|
1584
|
+
declare enum CollectionType {
|
|
1585
|
+
/** User-created collection. */
|
|
1586
|
+
NATIVE = "NATIVE",
|
|
1587
|
+
/** [Collection](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code#what-are-wix-app-collections) created by a Wix app when it is installed. This type of collection can be modified dynamically by that app (for example, Wix Forms). */
|
|
1588
|
+
WIX_APP = "WIX_APP",
|
|
1589
|
+
/** Collection created by a Wix Blocks app. */
|
|
1590
|
+
BLOCKS_APP = "BLOCKS_APP",
|
|
1591
|
+
/** Collection located in externally connected storage. */
|
|
1592
|
+
EXTERNAL = "EXTERNAL"
|
|
1593
|
+
}
|
|
1594
|
+
interface Sort {
|
|
1595
|
+
/** Field to sort by. */
|
|
1596
|
+
fieldKey?: string;
|
|
1597
|
+
/**
|
|
1598
|
+
* Sort order. Use `ASC` for ascending order or `DESC` for descending order.
|
|
1599
|
+
*
|
|
1600
|
+
* Default: `ASC`
|
|
1601
|
+
*/
|
|
1602
|
+
direction?: Direction;
|
|
1603
|
+
}
|
|
1604
|
+
declare enum Direction {
|
|
1605
|
+
ASC = "ASC",
|
|
1606
|
+
DESC = "DESC"
|
|
1607
|
+
}
|
|
1608
|
+
interface CollectionCapabilities {
|
|
1609
|
+
/** Data operations the collection supports. The listed operations can be performed on data the collection contains. */
|
|
1610
|
+
dataOperations?: DataOperation[];
|
|
1611
|
+
/**
|
|
1612
|
+
* Collection operations supported. The listed operations can be performed on the collection itself.
|
|
1613
|
+
* + `UPDATE`: Allows updating the collection's structure, for example adding, updating, or deleting fields. If not included, the collection's structure can't be changed.
|
|
1614
|
+
* + `REMOVE`: Allows deleting the entire collection. If not included, the collection can't be deleted.
|
|
1615
|
+
*/
|
|
1616
|
+
collectionOperations?: CollectionOperation[];
|
|
1617
|
+
/** Maximum number of indexes for the collection. */
|
|
1618
|
+
indexLimits?: IndexLimits;
|
|
1619
|
+
}
|
|
1620
|
+
declare enum DataOperation {
|
|
1621
|
+
AGGREGATE = "AGGREGATE",
|
|
1622
|
+
BULK_INSERT = "BULK_INSERT",
|
|
1623
|
+
BULK_REMOVE = "BULK_REMOVE",
|
|
1624
|
+
BULK_SAVE = "BULK_SAVE",
|
|
1625
|
+
BULK_UPDATE = "BULK_UPDATE",
|
|
1626
|
+
COUNT = "COUNT",
|
|
1627
|
+
DISTINCT = "DISTINCT",
|
|
1628
|
+
FIND = "FIND",
|
|
1629
|
+
GET = "GET",
|
|
1630
|
+
INSERT = "INSERT",
|
|
1631
|
+
INSERT_REFERENCE = "INSERT_REFERENCE",
|
|
1632
|
+
IS_REFERENCED = "IS_REFERENCED",
|
|
1633
|
+
QUERY_REFERENCED = "QUERY_REFERENCED",
|
|
1106
1634
|
REMOVE = "REMOVE",
|
|
1107
1635
|
REMOVE_REFERENCE = "REMOVE_REFERENCE",
|
|
1108
1636
|
REPLACE_REFERENCES = "REPLACE_REFERENCES",
|
|
@@ -2169,374 +2697,834 @@ interface AllowedDataPermissionsNonNullableFields {
|
|
|
2169
2697
|
itemUpdate: boolean;
|
|
2170
2698
|
itemRemove: boolean;
|
|
2171
2699
|
}
|
|
2172
|
-
interface DataCollectionNonNullableFields {
|
|
2173
|
-
_id: string;
|
|
2174
|
-
collectionType: CollectionType;
|
|
2175
|
-
defaultDisplayOrder?: SortNonNullableFields;
|
|
2176
|
-
capabilities?: CollectionCapabilitiesNonNullableFields;
|
|
2177
|
-
fields: FieldNonNullableFields$1[];
|
|
2178
|
-
permissions?: PermissionsNonNullableFields;
|
|
2179
|
-
plugins: PluginNonNullableFields[];
|
|
2180
|
-
pagingModes: PagingMode[];
|
|
2181
|
-
dataPermissions?: DataPermissionsNonNullableFields;
|
|
2182
|
-
allowedDataPermissions?: AllowedDataPermissionsNonNullableFields;
|
|
2700
|
+
interface DataCollectionNonNullableFields {
|
|
2701
|
+
_id: string;
|
|
2702
|
+
collectionType: CollectionType;
|
|
2703
|
+
defaultDisplayOrder?: SortNonNullableFields;
|
|
2704
|
+
capabilities?: CollectionCapabilitiesNonNullableFields;
|
|
2705
|
+
fields: FieldNonNullableFields$1[];
|
|
2706
|
+
permissions?: PermissionsNonNullableFields;
|
|
2707
|
+
plugins: PluginNonNullableFields[];
|
|
2708
|
+
pagingModes: PagingMode[];
|
|
2709
|
+
dataPermissions?: DataPermissionsNonNullableFields;
|
|
2710
|
+
allowedDataPermissions?: AllowedDataPermissionsNonNullableFields;
|
|
2711
|
+
}
|
|
2712
|
+
interface CreateDataCollectionResponseNonNullableFields {
|
|
2713
|
+
collection?: DataCollectionNonNullableFields;
|
|
2714
|
+
}
|
|
2715
|
+
interface GetDataCollectionResponseNonNullableFields {
|
|
2716
|
+
collection?: DataCollectionNonNullableFields;
|
|
2717
|
+
referencedCollections: DataCollectionNonNullableFields[];
|
|
2718
|
+
}
|
|
2719
|
+
interface ListDataCollectionsResponseNonNullableFields {
|
|
2720
|
+
collections: DataCollectionNonNullableFields[];
|
|
2721
|
+
}
|
|
2722
|
+
interface UpdateDataCollectionResponseNonNullableFields {
|
|
2723
|
+
collection?: DataCollectionNonNullableFields;
|
|
2724
|
+
}
|
|
2725
|
+
interface BaseEventMetadata$1 {
|
|
2726
|
+
/** App instance ID. */
|
|
2727
|
+
instanceId?: string | null;
|
|
2728
|
+
/** Event type. */
|
|
2729
|
+
eventType?: string;
|
|
2730
|
+
/** The identification type and identity data. */
|
|
2731
|
+
identity?: IdentificationData$1;
|
|
2732
|
+
}
|
|
2733
|
+
interface EventMetadata$1 extends BaseEventMetadata$1 {
|
|
2734
|
+
/**
|
|
2735
|
+
* Unique event ID.
|
|
2736
|
+
* Allows clients to ignore duplicate webhooks.
|
|
2737
|
+
*/
|
|
2738
|
+
_id?: string;
|
|
2739
|
+
/**
|
|
2740
|
+
* Assumes actions are also always typed to an entity_type
|
|
2741
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
2742
|
+
*/
|
|
2743
|
+
entityFqdn?: string;
|
|
2744
|
+
/**
|
|
2745
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
2746
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
2747
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
2748
|
+
*/
|
|
2749
|
+
slug?: string;
|
|
2750
|
+
/** ID of the entity associated with the event. */
|
|
2751
|
+
entityId?: string;
|
|
2752
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
2753
|
+
eventTime?: Date;
|
|
2754
|
+
/**
|
|
2755
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
2756
|
+
* (for example, GDPR).
|
|
2757
|
+
*/
|
|
2758
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
2759
|
+
/** If present, indicates the action that triggered the event. */
|
|
2760
|
+
originatedFrom?: string | null;
|
|
2761
|
+
/**
|
|
2762
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
2763
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
2764
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
2765
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
2766
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
2767
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
2768
|
+
*/
|
|
2769
|
+
entityEventSequence?: string | null;
|
|
2770
|
+
}
|
|
2771
|
+
interface DataCollectionClonedEnvelope {
|
|
2772
|
+
data: DataCollectionClonedEvent;
|
|
2773
|
+
metadata: EventMetadata$1;
|
|
2774
|
+
}
|
|
2775
|
+
interface DataCollectionChangedEnvelope {
|
|
2776
|
+
data: DataCollectionChangedEvent;
|
|
2777
|
+
metadata: EventMetadata$1;
|
|
2778
|
+
}
|
|
2779
|
+
interface DataCollectionCreatedEnvelope {
|
|
2780
|
+
entity: DataCollection;
|
|
2781
|
+
metadata: EventMetadata$1;
|
|
2782
|
+
}
|
|
2783
|
+
interface DataCollectionUpdatedEnvelope {
|
|
2784
|
+
entity: DataCollection;
|
|
2785
|
+
metadata: EventMetadata$1;
|
|
2786
|
+
}
|
|
2787
|
+
interface DataCollectionDeletedEnvelope {
|
|
2788
|
+
metadata: EventMetadata$1;
|
|
2789
|
+
}
|
|
2790
|
+
interface GetDataCollectionOptions {
|
|
2791
|
+
/**
|
|
2792
|
+
* Whether to retrieve data from the primary database instance.
|
|
2793
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
2794
|
+
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
2795
|
+
*
|
|
2796
|
+
* Default: `false`
|
|
2797
|
+
*/
|
|
2798
|
+
consistentRead?: boolean;
|
|
2799
|
+
}
|
|
2800
|
+
interface ListDataCollectionsOptions {
|
|
2801
|
+
/**
|
|
2802
|
+
* Defines how collections in the response are sorted.
|
|
2803
|
+
*
|
|
2804
|
+
* Default: Ordered by ID in ascending order.
|
|
2805
|
+
*/
|
|
2806
|
+
sort?: Sorting$1;
|
|
2807
|
+
/** Pagination information. */
|
|
2808
|
+
paging?: Paging$2;
|
|
2809
|
+
/**
|
|
2810
|
+
* Whether to retrieve data from the primary database instance.
|
|
2811
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
2812
|
+
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
2813
|
+
*
|
|
2814
|
+
* Default: `false`
|
|
2815
|
+
*/
|
|
2816
|
+
consistentRead?: boolean;
|
|
2183
2817
|
}
|
|
2184
|
-
|
|
2185
|
-
|
|
2818
|
+
|
|
2819
|
+
declare function createDataCollection$1(httpClient: HttpClient$2): CreateDataCollectionSignature;
|
|
2820
|
+
interface CreateDataCollectionSignature {
|
|
2821
|
+
/**
|
|
2822
|
+
* Creates a new data collection.
|
|
2823
|
+
*
|
|
2824
|
+
* The request body must include an ID, details for at least 1 field, and a permissions object. If any of these are missing, the collection isn't created.
|
|
2825
|
+
* @param - Collection details.
|
|
2826
|
+
* @param - Options for creating a data collection.
|
|
2827
|
+
* @returns Details of collection created.
|
|
2828
|
+
*/
|
|
2829
|
+
(collection: DataCollection): Promise<DataCollection & DataCollectionNonNullableFields>;
|
|
2186
2830
|
}
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2831
|
+
declare function getDataCollection$1(httpClient: HttpClient$2): GetDataCollectionSignature;
|
|
2832
|
+
interface GetDataCollectionSignature {
|
|
2833
|
+
/**
|
|
2834
|
+
* Retrieves a data collection by ID.
|
|
2835
|
+
* @param - ID of the collection to retrieve.
|
|
2836
|
+
* @param - Options for retrieving a data collection.
|
|
2837
|
+
* @returns Details of the collection requested.
|
|
2838
|
+
*/
|
|
2839
|
+
(dataCollectionId: string, options?: GetDataCollectionOptions | undefined): Promise<DataCollection & DataCollectionNonNullableFields>;
|
|
2190
2840
|
}
|
|
2191
|
-
|
|
2192
|
-
|
|
2841
|
+
declare function listDataCollections$1(httpClient: HttpClient$2): ListDataCollectionsSignature;
|
|
2842
|
+
interface ListDataCollectionsSignature {
|
|
2843
|
+
/**
|
|
2844
|
+
* Retrieves a list of all data collections associated with the site or project.
|
|
2845
|
+
*
|
|
2846
|
+
* By default, the list is ordered by ID in ascending order.
|
|
2847
|
+
* @param - Options for retrieving a list of data collections.
|
|
2848
|
+
*/
|
|
2849
|
+
(options?: ListDataCollectionsOptions | undefined): Promise<ListDataCollectionsResponse & ListDataCollectionsResponseNonNullableFields>;
|
|
2193
2850
|
}
|
|
2194
|
-
|
|
2195
|
-
|
|
2851
|
+
declare function updateDataCollection$1(httpClient: HttpClient$2): UpdateDataCollectionSignature;
|
|
2852
|
+
interface UpdateDataCollectionSignature {
|
|
2853
|
+
/**
|
|
2854
|
+
* Updates a data collection.
|
|
2855
|
+
*
|
|
2856
|
+
* A collection ID, revision number, permissions, and at least 1 field must be provided within `options.collection`.
|
|
2857
|
+
* If a collection with that ID exists, and if its current `revision` number matches the one provided, it is updated.
|
|
2858
|
+
* Otherwise, the request fails.
|
|
2859
|
+
*
|
|
2860
|
+
* When a collection is updated, its `_updatedDate` property is changed to the current date and its `revision` property is incremented.
|
|
2861
|
+
*
|
|
2862
|
+
* > **Note:**
|
|
2863
|
+
* > After a collection is updated, it only contains the properties included in the `updateDataCollection()` call. If the existing collection has properties with values and those properties
|
|
2864
|
+
* > aren't included in the updated collection details, their values are lost.
|
|
2865
|
+
* @param - Updated collection details. The existing collection is replaced with this version.
|
|
2866
|
+
* @param - Options for updating a data collection.
|
|
2867
|
+
* @returns Updated collection details.
|
|
2868
|
+
*/
|
|
2869
|
+
(collection: DataCollection): Promise<DataCollection & DataCollectionNonNullableFields>;
|
|
2196
2870
|
}
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2871
|
+
declare function deleteDataCollection$1(httpClient: HttpClient$2): DeleteDataCollectionSignature;
|
|
2872
|
+
interface DeleteDataCollectionSignature {
|
|
2873
|
+
/**
|
|
2874
|
+
* Deletes a data collection.
|
|
2875
|
+
*
|
|
2876
|
+
* > **Note:**
|
|
2877
|
+
* > Once a collection is deleted, it can't be restored.
|
|
2878
|
+
* @param - ID of the collection to delete.
|
|
2879
|
+
*/
|
|
2880
|
+
(dataCollectionId: string): Promise<void>;
|
|
2881
|
+
}
|
|
2882
|
+
declare const onDataCollectionClonedEvent$1: EventDefinition$2<DataCollectionClonedEnvelope, "wix.data.v2.data_collection_data_collection_cloned_event">;
|
|
2883
|
+
declare const onDataCollectionChangedEvent$1: EventDefinition$2<DataCollectionChangedEnvelope, "wix.data.v2.data_collection_data_collection_changed_event">;
|
|
2884
|
+
declare const onDataCollectionCreated$1: EventDefinition$2<DataCollectionCreatedEnvelope, "wix.data.v2.data_collection_created">;
|
|
2885
|
+
declare const onDataCollectionUpdated$1: EventDefinition$2<DataCollectionUpdatedEnvelope, "wix.data.v2.data_collection_updated">;
|
|
2886
|
+
declare const onDataCollectionDeleted$1: EventDefinition$2<DataCollectionDeletedEnvelope, "wix.data.v2.data_collection_deleted">;
|
|
2887
|
+
|
|
2888
|
+
declare function createEventModule$1<T extends EventDefinition$2<any, string>>(eventDefinition: T): BuildEventDefinition$2<T> & T;
|
|
2889
|
+
|
|
2890
|
+
declare const createDataCollection: MaybeContext$2<BuildRESTFunction$2<typeof createDataCollection$1> & typeof createDataCollection$1>;
|
|
2891
|
+
declare const getDataCollection: MaybeContext$2<BuildRESTFunction$2<typeof getDataCollection$1> & typeof getDataCollection$1>;
|
|
2892
|
+
declare const listDataCollections: MaybeContext$2<BuildRESTFunction$2<typeof listDataCollections$1> & typeof listDataCollections$1>;
|
|
2893
|
+
declare const updateDataCollection: MaybeContext$2<BuildRESTFunction$2<typeof updateDataCollection$1> & typeof updateDataCollection$1>;
|
|
2894
|
+
declare const deleteDataCollection: MaybeContext$2<BuildRESTFunction$2<typeof deleteDataCollection$1> & typeof deleteDataCollection$1>;
|
|
2895
|
+
|
|
2896
|
+
type _publicOnDataCollectionClonedEventType = typeof onDataCollectionClonedEvent$1;
|
|
2897
|
+
/**
|
|
2898
|
+
* Event triggered when collection is cloned from other instance
|
|
2899
|
+
* CREATED event will be also triggered along with this action
|
|
2900
|
+
*/
|
|
2901
|
+
declare const onDataCollectionClonedEvent: ReturnType<typeof createEventModule$1<_publicOnDataCollectionClonedEventType>>;
|
|
2902
|
+
|
|
2903
|
+
type _publicOnDataCollectionChangedEventType = typeof onDataCollectionChangedEvent$1;
|
|
2904
|
+
/**
|
|
2905
|
+
* Event triggered when collection is changed, describing some of changes
|
|
2906
|
+
* UPDATED event will be also triggered along with this action
|
|
2907
|
+
*/
|
|
2908
|
+
declare const onDataCollectionChangedEvent: ReturnType<typeof createEventModule$1<_publicOnDataCollectionChangedEventType>>;
|
|
2909
|
+
|
|
2910
|
+
type _publicOnDataCollectionCreatedType = typeof onDataCollectionCreated$1;
|
|
2911
|
+
/** */
|
|
2912
|
+
declare const onDataCollectionCreated: ReturnType<typeof createEventModule$1<_publicOnDataCollectionCreatedType>>;
|
|
2913
|
+
|
|
2914
|
+
type _publicOnDataCollectionUpdatedType = typeof onDataCollectionUpdated$1;
|
|
2915
|
+
/** */
|
|
2916
|
+
declare const onDataCollectionUpdated: ReturnType<typeof createEventModule$1<_publicOnDataCollectionUpdatedType>>;
|
|
2917
|
+
|
|
2918
|
+
type _publicOnDataCollectionDeletedType = typeof onDataCollectionDeleted$1;
|
|
2919
|
+
/** */
|
|
2920
|
+
declare const onDataCollectionDeleted: ReturnType<typeof createEventModule$1<_publicOnDataCollectionDeletedType>>;
|
|
2921
|
+
|
|
2922
|
+
type context$2_AccessLevel = AccessLevel;
|
|
2923
|
+
declare const context$2_AccessLevel: typeof AccessLevel;
|
|
2924
|
+
type context$2_AllowedDataPermissions = AllowedDataPermissions;
|
|
2925
|
+
type context$2_ArraySizeRange = ArraySizeRange;
|
|
2926
|
+
type context$2_BulkGetDataCollectionsPageBySnapshotsRequest = BulkGetDataCollectionsPageBySnapshotsRequest;
|
|
2927
|
+
type context$2_BulkGetDataCollectionsPageBySnapshotsResponse = BulkGetDataCollectionsPageBySnapshotsResponse;
|
|
2928
|
+
type context$2_BulkGetDataCollectionsRequest = BulkGetDataCollectionsRequest;
|
|
2929
|
+
type context$2_BulkGetDataCollectionsResponse = BulkGetDataCollectionsResponse;
|
|
2930
|
+
type context$2_Calculator = Calculator;
|
|
2931
|
+
type context$2_CalculatorPatternOneOf = CalculatorPatternOneOf;
|
|
2932
|
+
type context$2_CmsOptions = CmsOptions;
|
|
2933
|
+
type context$2_CollectionCapabilities = CollectionCapabilities;
|
|
2934
|
+
type context$2_CollectionOperation = CollectionOperation;
|
|
2935
|
+
declare const context$2_CollectionOperation: typeof CollectionOperation;
|
|
2936
|
+
type context$2_CollectionType = CollectionType;
|
|
2937
|
+
declare const context$2_CollectionType: typeof CollectionType;
|
|
2938
|
+
type context$2_CreateDataCollectionFieldRequest = CreateDataCollectionFieldRequest;
|
|
2939
|
+
type context$2_CreateDataCollectionFieldResponse = CreateDataCollectionFieldResponse;
|
|
2940
|
+
type context$2_CreateDataCollectionRequest = CreateDataCollectionRequest;
|
|
2941
|
+
type context$2_CreateDataCollectionResponse = CreateDataCollectionResponse;
|
|
2942
|
+
type context$2_CreateDataCollectionResponseNonNullableFields = CreateDataCollectionResponseNonNullableFields;
|
|
2943
|
+
type context$2_CreateDataCollectionsSnapshotRequest = CreateDataCollectionsSnapshotRequest;
|
|
2944
|
+
type context$2_CreateDataCollectionsSnapshotResponse = CreateDataCollectionsSnapshotResponse;
|
|
2945
|
+
type context$2_CreateMigratedCollectionsSnapshotRequest = CreateMigratedCollectionsSnapshotRequest;
|
|
2946
|
+
type context$2_CreateMigratedCollectionsSnapshotResponse = CreateMigratedCollectionsSnapshotResponse;
|
|
2947
|
+
type context$2_DataCollection = DataCollection;
|
|
2948
|
+
type context$2_DataCollectionChangedEnvelope = DataCollectionChangedEnvelope;
|
|
2949
|
+
type context$2_DataCollectionChangedEvent = DataCollectionChangedEvent;
|
|
2950
|
+
type context$2_DataCollectionClonedEnvelope = DataCollectionClonedEnvelope;
|
|
2951
|
+
type context$2_DataCollectionClonedEvent = DataCollectionClonedEvent;
|
|
2952
|
+
type context$2_DataCollectionCreatedEnvelope = DataCollectionCreatedEnvelope;
|
|
2953
|
+
type context$2_DataCollectionDeletedEnvelope = DataCollectionDeletedEnvelope;
|
|
2954
|
+
type context$2_DataCollectionNonNullableFields = DataCollectionNonNullableFields;
|
|
2955
|
+
type context$2_DataCollectionUpdatedEnvelope = DataCollectionUpdatedEnvelope;
|
|
2956
|
+
type context$2_DataOperation = DataOperation;
|
|
2957
|
+
declare const context$2_DataOperation: typeof DataOperation;
|
|
2958
|
+
type context$2_DataPermissions = DataPermissions;
|
|
2959
|
+
type context$2_DeleteDataCollectionFieldRequest = DeleteDataCollectionFieldRequest;
|
|
2960
|
+
type context$2_DeleteDataCollectionFieldResponse = DeleteDataCollectionFieldResponse;
|
|
2961
|
+
type context$2_DeleteDataCollectionRequest = DeleteDataCollectionRequest;
|
|
2962
|
+
type context$2_DeleteDataCollectionResponse = DeleteDataCollectionResponse;
|
|
2963
|
+
type context$2_DeleteDataCollectionsSnapshotRequest = DeleteDataCollectionsSnapshotRequest;
|
|
2964
|
+
type context$2_DeleteDataCollectionsSnapshotResponse = DeleteDataCollectionsSnapshotResponse;
|
|
2965
|
+
type context$2_Direction = Direction;
|
|
2966
|
+
declare const context$2_Direction: typeof Direction;
|
|
2967
|
+
type context$2_FieldCapabilities = FieldCapabilities;
|
|
2968
|
+
type context$2_FieldPlugin = FieldPlugin;
|
|
2969
|
+
type context$2_FieldPluginOptionsOneOf = FieldPluginOptionsOneOf;
|
|
2970
|
+
type context$2_FieldPluginType = FieldPluginType;
|
|
2971
|
+
declare const context$2_FieldPluginType: typeof FieldPluginType;
|
|
2972
|
+
type context$2_FieldRangeValidationsOneOf = FieldRangeValidationsOneOf;
|
|
2973
|
+
type context$2_FieldsPattern = FieldsPattern;
|
|
2974
|
+
type context$2_Format = Format;
|
|
2975
|
+
declare const context$2_Format: typeof Format;
|
|
2976
|
+
type context$2_GetDataCollectionOptions = GetDataCollectionOptions;
|
|
2977
|
+
type context$2_GetDataCollectionRequest = GetDataCollectionRequest;
|
|
2978
|
+
type context$2_GetDataCollectionResponse = GetDataCollectionResponse;
|
|
2979
|
+
type context$2_GetDataCollectionResponseNonNullableFields = GetDataCollectionResponseNonNullableFields;
|
|
2980
|
+
type context$2_IndexField = IndexField;
|
|
2981
|
+
type context$2_IndexLimits = IndexLimits;
|
|
2982
|
+
type context$2_IndexStatus = IndexStatus;
|
|
2983
|
+
declare const context$2_IndexStatus: typeof IndexStatus;
|
|
2984
|
+
type context$2_ListDataCollectionsOptions = ListDataCollectionsOptions;
|
|
2985
|
+
type context$2_ListDataCollectionsRequest = ListDataCollectionsRequest;
|
|
2986
|
+
type context$2_ListDataCollectionsResponse = ListDataCollectionsResponse;
|
|
2987
|
+
type context$2_ListDataCollectionsResponseNonNullableFields = ListDataCollectionsResponseNonNullableFields;
|
|
2988
|
+
type context$2_MultiReference = MultiReference;
|
|
2989
|
+
type context$2_MultilingualOptions = MultilingualOptions;
|
|
2990
|
+
type context$2_NumberRange = NumberRange;
|
|
2991
|
+
type context$2_ObjectField = ObjectField;
|
|
2992
|
+
type context$2_PageLink = PageLink;
|
|
2993
|
+
type context$2_PageLinkPluginOptions = PageLinkPluginOptions;
|
|
2994
|
+
type context$2_PagingMode = PagingMode;
|
|
2995
|
+
declare const context$2_PagingMode: typeof PagingMode;
|
|
2996
|
+
type context$2_Permissions = Permissions;
|
|
2997
|
+
type context$2_Plugin = Plugin;
|
|
2998
|
+
type context$2_PluginCmsOptions = PluginCmsOptions;
|
|
2999
|
+
type context$2_PluginOptionsOneOf = PluginOptionsOneOf;
|
|
3000
|
+
type context$2_PluginType = PluginType;
|
|
3001
|
+
declare const context$2_PluginType: typeof PluginType;
|
|
3002
|
+
type context$2_PluginUpdate = PluginUpdate;
|
|
3003
|
+
type context$2_QueryOperator = QueryOperator;
|
|
3004
|
+
declare const context$2_QueryOperator: typeof QueryOperator;
|
|
3005
|
+
type context$2_Reference = Reference;
|
|
3006
|
+
type context$2_RestoreDataCollectionsFromSnapshotRequest = RestoreDataCollectionsFromSnapshotRequest;
|
|
3007
|
+
type context$2_RestoreDataCollectionsFromSnapshotResponse = RestoreDataCollectionsFromSnapshotResponse;
|
|
3008
|
+
type context$2_Role = Role;
|
|
3009
|
+
declare const context$2_Role: typeof Role;
|
|
3010
|
+
type context$2_Segment = Segment;
|
|
3011
|
+
declare const context$2_Segment: typeof Segment;
|
|
3012
|
+
type context$2_SingleItemPluginOptions = SingleItemPluginOptions;
|
|
3013
|
+
type context$2_SiteSort = SiteSort;
|
|
3014
|
+
type context$2_SnapshotCollection = SnapshotCollection;
|
|
3015
|
+
type context$2_Sort = Sort;
|
|
3016
|
+
type context$2_StringLengthRange = StringLengthRange;
|
|
3017
|
+
type context$2_Type = Type;
|
|
3018
|
+
declare const context$2_Type: typeof Type;
|
|
3019
|
+
type context$2_TypeMetadata = TypeMetadata;
|
|
3020
|
+
type context$2_TypeMetadataMetadataOneOf = TypeMetadataMetadataOneOf;
|
|
3021
|
+
type context$2_UpdateDataCollectionFieldRequest = UpdateDataCollectionFieldRequest;
|
|
3022
|
+
type context$2_UpdateDataCollectionFieldResponse = UpdateDataCollectionFieldResponse;
|
|
3023
|
+
type context$2_UpdateDataCollectionRequest = UpdateDataCollectionRequest;
|
|
3024
|
+
type context$2_UpdateDataCollectionResponse = UpdateDataCollectionResponse;
|
|
3025
|
+
type context$2_UpdateDataCollectionResponseNonNullableFields = UpdateDataCollectionResponseNonNullableFields;
|
|
3026
|
+
type context$2_UpdateDataPermissionsRequest = UpdateDataPermissionsRequest;
|
|
3027
|
+
type context$2_UpdateDataPermissionsResponse = UpdateDataPermissionsResponse;
|
|
3028
|
+
type context$2_UrlizedOnlyPattern = UrlizedOnlyPattern;
|
|
3029
|
+
type context$2_UrlizedPluginOptions = UrlizedPluginOptions;
|
|
3030
|
+
type context$2__Array = _Array;
|
|
3031
|
+
type context$2__Object = _Object;
|
|
3032
|
+
type context$2__publicOnDataCollectionChangedEventType = _publicOnDataCollectionChangedEventType;
|
|
3033
|
+
type context$2__publicOnDataCollectionClonedEventType = _publicOnDataCollectionClonedEventType;
|
|
3034
|
+
type context$2__publicOnDataCollectionCreatedType = _publicOnDataCollectionCreatedType;
|
|
3035
|
+
type context$2__publicOnDataCollectionDeletedType = _publicOnDataCollectionDeletedType;
|
|
3036
|
+
type context$2__publicOnDataCollectionUpdatedType = _publicOnDataCollectionUpdatedType;
|
|
3037
|
+
declare const context$2_createDataCollection: typeof createDataCollection;
|
|
3038
|
+
declare const context$2_deleteDataCollection: typeof deleteDataCollection;
|
|
3039
|
+
declare const context$2_getDataCollection: typeof getDataCollection;
|
|
3040
|
+
declare const context$2_listDataCollections: typeof listDataCollections;
|
|
3041
|
+
declare const context$2_onDataCollectionChangedEvent: typeof onDataCollectionChangedEvent;
|
|
3042
|
+
declare const context$2_onDataCollectionClonedEvent: typeof onDataCollectionClonedEvent;
|
|
3043
|
+
declare const context$2_onDataCollectionCreated: typeof onDataCollectionCreated;
|
|
3044
|
+
declare const context$2_onDataCollectionDeleted: typeof onDataCollectionDeleted;
|
|
3045
|
+
declare const context$2_onDataCollectionUpdated: typeof onDataCollectionUpdated;
|
|
3046
|
+
declare const context$2_updateDataCollection: typeof updateDataCollection;
|
|
3047
|
+
declare namespace context$2 {
|
|
3048
|
+
export { context$2_AccessLevel as AccessLevel, type ActionEvent$1 as ActionEvent, type context$2_AllowedDataPermissions as AllowedDataPermissions, type context$2_ArraySizeRange as ArraySizeRange, type BaseEventMetadata$1 as BaseEventMetadata, type context$2_BulkGetDataCollectionsPageBySnapshotsRequest as BulkGetDataCollectionsPageBySnapshotsRequest, type context$2_BulkGetDataCollectionsPageBySnapshotsResponse as BulkGetDataCollectionsPageBySnapshotsResponse, type context$2_BulkGetDataCollectionsRequest as BulkGetDataCollectionsRequest, type context$2_BulkGetDataCollectionsResponse as BulkGetDataCollectionsResponse, type context$2_Calculator as Calculator, type context$2_CalculatorPatternOneOf as CalculatorPatternOneOf, type context$2_CmsOptions as CmsOptions, type context$2_CollectionCapabilities as CollectionCapabilities, context$2_CollectionOperation as CollectionOperation, context$2_CollectionType as CollectionType, type context$2_CreateDataCollectionFieldRequest as CreateDataCollectionFieldRequest, type context$2_CreateDataCollectionFieldResponse as CreateDataCollectionFieldResponse, type context$2_CreateDataCollectionRequest as CreateDataCollectionRequest, type context$2_CreateDataCollectionResponse as CreateDataCollectionResponse, type context$2_CreateDataCollectionResponseNonNullableFields as CreateDataCollectionResponseNonNullableFields, type context$2_CreateDataCollectionsSnapshotRequest as CreateDataCollectionsSnapshotRequest, type context$2_CreateDataCollectionsSnapshotResponse as CreateDataCollectionsSnapshotResponse, type context$2_CreateMigratedCollectionsSnapshotRequest as CreateMigratedCollectionsSnapshotRequest, type context$2_CreateMigratedCollectionsSnapshotResponse as CreateMigratedCollectionsSnapshotResponse, type context$2_DataCollection as DataCollection, type context$2_DataCollectionChangedEnvelope as DataCollectionChangedEnvelope, type context$2_DataCollectionChangedEvent as DataCollectionChangedEvent, type context$2_DataCollectionClonedEnvelope as DataCollectionClonedEnvelope, type context$2_DataCollectionClonedEvent as DataCollectionClonedEvent, type context$2_DataCollectionCreatedEnvelope as DataCollectionCreatedEnvelope, type context$2_DataCollectionDeletedEnvelope as DataCollectionDeletedEnvelope, type context$2_DataCollectionNonNullableFields as DataCollectionNonNullableFields, type context$2_DataCollectionUpdatedEnvelope as DataCollectionUpdatedEnvelope, context$2_DataOperation as DataOperation, type context$2_DataPermissions as DataPermissions, type context$2_DeleteDataCollectionFieldRequest as DeleteDataCollectionFieldRequest, type context$2_DeleteDataCollectionFieldResponse as DeleteDataCollectionFieldResponse, type context$2_DeleteDataCollectionRequest as DeleteDataCollectionRequest, type context$2_DeleteDataCollectionResponse as DeleteDataCollectionResponse, type context$2_DeleteDataCollectionsSnapshotRequest as DeleteDataCollectionsSnapshotRequest, type context$2_DeleteDataCollectionsSnapshotResponse as DeleteDataCollectionsSnapshotResponse, context$2_Direction as Direction, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type EventMetadata$1 as EventMetadata, type Failure$1 as Failure, type Field$1 as Field, type context$2_FieldCapabilities as FieldCapabilities, type context$2_FieldPlugin as FieldPlugin, type context$2_FieldPluginOptionsOneOf as FieldPluginOptionsOneOf, context$2_FieldPluginType as FieldPluginType, type context$2_FieldRangeValidationsOneOf as FieldRangeValidationsOneOf, type FieldUpdate$1 as FieldUpdate, type context$2_FieldsPattern as FieldsPattern, context$2_Format as Format, type context$2_GetDataCollectionOptions as GetDataCollectionOptions, type context$2_GetDataCollectionRequest as GetDataCollectionRequest, type context$2_GetDataCollectionResponse as GetDataCollectionResponse, type context$2_GetDataCollectionResponseNonNullableFields as GetDataCollectionResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type Index$1 as Index, type context$2_IndexField as IndexField, type context$2_IndexLimits as IndexLimits, context$2_IndexStatus as IndexStatus, type context$2_ListDataCollectionsOptions as ListDataCollectionsOptions, type context$2_ListDataCollectionsRequest as ListDataCollectionsRequest, type context$2_ListDataCollectionsResponse as ListDataCollectionsResponse, type context$2_ListDataCollectionsResponseNonNullableFields as ListDataCollectionsResponseNonNullableFields, type MessageEnvelope$1 as MessageEnvelope, type context$2_MultiReference as MultiReference, type context$2_MultilingualOptions as MultilingualOptions, type context$2_NumberRange as NumberRange, type context$2_ObjectField as ObjectField, Order$1 as Order, type context$2_PageLink as PageLink, type context$2_PageLinkPluginOptions as PageLinkPluginOptions, type Paging$2 as Paging, type PagingMetadataV2$1 as PagingMetadataV2, context$2_PagingMode as PagingMode, type context$2_Permissions as Permissions, type context$2_Plugin as Plugin, type context$2_PluginCmsOptions as PluginCmsOptions, type context$2_PluginOptionsOneOf as PluginOptionsOneOf, context$2_PluginType as PluginType, type context$2_PluginUpdate as PluginUpdate, type PublishPluginOptions$1 as PublishPluginOptions, context$2_QueryOperator as QueryOperator, type context$2_Reference as Reference, type context$2_RestoreDataCollectionsFromSnapshotRequest as RestoreDataCollectionsFromSnapshotRequest, type context$2_RestoreDataCollectionsFromSnapshotResponse as RestoreDataCollectionsFromSnapshotResponse, type RestoreInfo$1 as RestoreInfo, context$2_Role as Role, context$2_Segment as Segment, type context$2_SingleItemPluginOptions as SingleItemPluginOptions, type context$2_SiteSort as SiteSort, type context$2_SnapshotCollection as SnapshotCollection, type context$2_Sort as Sort, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, Status$1 as Status, type context$2_StringLengthRange as StringLengthRange, context$2_Type as Type, type context$2_TypeMetadata as TypeMetadata, type context$2_TypeMetadataMetadataOneOf as TypeMetadataMetadataOneOf, type context$2_UpdateDataCollectionFieldRequest as UpdateDataCollectionFieldRequest, type context$2_UpdateDataCollectionFieldResponse as UpdateDataCollectionFieldResponse, type context$2_UpdateDataCollectionRequest as UpdateDataCollectionRequest, type context$2_UpdateDataCollectionResponse as UpdateDataCollectionResponse, type context$2_UpdateDataCollectionResponseNonNullableFields as UpdateDataCollectionResponseNonNullableFields, type context$2_UpdateDataPermissionsRequest as UpdateDataPermissionsRequest, type context$2_UpdateDataPermissionsResponse as UpdateDataPermissionsResponse, type context$2_UrlizedOnlyPattern as UrlizedOnlyPattern, type context$2_UrlizedPluginOptions as UrlizedPluginOptions, WebhookIdentityType$1 as WebhookIdentityType, type context$2__Array as _Array, type context$2__Object as _Object, type context$2__publicOnDataCollectionChangedEventType as _publicOnDataCollectionChangedEventType, type context$2__publicOnDataCollectionClonedEventType as _publicOnDataCollectionClonedEventType, type context$2__publicOnDataCollectionCreatedType as _publicOnDataCollectionCreatedType, type context$2__publicOnDataCollectionDeletedType as _publicOnDataCollectionDeletedType, type context$2__publicOnDataCollectionUpdatedType as _publicOnDataCollectionUpdatedType, context$2_createDataCollection as createDataCollection, context$2_deleteDataCollection as deleteDataCollection, context$2_getDataCollection as getDataCollection, context$2_listDataCollections as listDataCollections, context$2_onDataCollectionChangedEvent as onDataCollectionChangedEvent, context$2_onDataCollectionClonedEvent as onDataCollectionClonedEvent, context$2_onDataCollectionCreated as onDataCollectionCreated, context$2_onDataCollectionDeleted as onDataCollectionDeleted, context$2_onDataCollectionUpdated as onDataCollectionUpdated, onDataCollectionChangedEvent$1 as publicOnDataCollectionChangedEvent, onDataCollectionClonedEvent$1 as publicOnDataCollectionClonedEvent, onDataCollectionCreated$1 as publicOnDataCollectionCreated, onDataCollectionDeleted$1 as publicOnDataCollectionDeleted, onDataCollectionUpdated$1 as publicOnDataCollectionUpdated, context$2_updateDataCollection as updateDataCollection };
|
|
2204
3049
|
}
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
*/
|
|
2221
|
-
slug?: string;
|
|
2222
|
-
/** ID of the entity associated with the event. */
|
|
2223
|
-
entityId?: string;
|
|
2224
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
2225
|
-
eventTime?: Date;
|
|
3050
|
+
|
|
3051
|
+
type HostModule$1<T, H extends Host$1> = {
|
|
3052
|
+
__type: 'host';
|
|
3053
|
+
create(host: H): T;
|
|
3054
|
+
};
|
|
3055
|
+
type HostModuleAPI$1<T extends HostModule$1<any, any>> = T extends HostModule$1<infer U, any> ? U : never;
|
|
3056
|
+
type Host$1<Environment = unknown> = {
|
|
3057
|
+
channel: {
|
|
3058
|
+
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
3059
|
+
disconnect: () => void;
|
|
3060
|
+
} | Promise<{
|
|
3061
|
+
disconnect: () => void;
|
|
3062
|
+
}>;
|
|
3063
|
+
};
|
|
3064
|
+
environment?: Environment;
|
|
2226
3065
|
/**
|
|
2227
|
-
*
|
|
2228
|
-
* (for example, GDPR).
|
|
3066
|
+
* Optional name of the environment, use for logging
|
|
2229
3067
|
*/
|
|
2230
|
-
|
|
2231
|
-
/** If present, indicates the action that triggered the event. */
|
|
2232
|
-
originatedFrom?: string | null;
|
|
3068
|
+
name?: string;
|
|
2233
3069
|
/**
|
|
2234
|
-
*
|
|
2235
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
2236
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
2237
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
2238
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
2239
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
3070
|
+
* Optional bast url to use for API requests, for example `www.wixapis.com`
|
|
2240
3071
|
*/
|
|
2241
|
-
|
|
2242
|
-
}
|
|
2243
|
-
interface DataCollectionClonedEnvelope {
|
|
2244
|
-
data: DataCollectionClonedEvent;
|
|
2245
|
-
metadata: EventMetadata$1;
|
|
2246
|
-
}
|
|
2247
|
-
interface DataCollectionChangedEnvelope {
|
|
2248
|
-
data: DataCollectionChangedEvent;
|
|
2249
|
-
metadata: EventMetadata$1;
|
|
2250
|
-
}
|
|
2251
|
-
interface DataCollectionCreatedEnvelope {
|
|
2252
|
-
entity: DataCollection;
|
|
2253
|
-
metadata: EventMetadata$1;
|
|
2254
|
-
}
|
|
2255
|
-
interface DataCollectionUpdatedEnvelope {
|
|
2256
|
-
entity: DataCollection;
|
|
2257
|
-
metadata: EventMetadata$1;
|
|
2258
|
-
}
|
|
2259
|
-
interface DataCollectionDeletedEnvelope {
|
|
2260
|
-
metadata: EventMetadata$1;
|
|
2261
|
-
}
|
|
2262
|
-
interface GetDataCollectionOptions {
|
|
3072
|
+
apiBaseUrl?: string;
|
|
2263
3073
|
/**
|
|
2264
|
-
*
|
|
2265
|
-
*
|
|
2266
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
2267
|
-
*
|
|
2268
|
-
* Default: `false`
|
|
3074
|
+
* Possible data to be provided by every host, for cross cutting concerns
|
|
3075
|
+
* like internationalization, billing, etc.
|
|
2269
3076
|
*/
|
|
2270
|
-
|
|
3077
|
+
essentials?: {
|
|
3078
|
+
/**
|
|
3079
|
+
* The language of the currently viewed session
|
|
3080
|
+
*/
|
|
3081
|
+
language?: string;
|
|
3082
|
+
/**
|
|
3083
|
+
* The locale of the currently viewed session
|
|
3084
|
+
*/
|
|
3085
|
+
locale?: string;
|
|
3086
|
+
/**
|
|
3087
|
+
* Any headers that should be passed through to the API requests
|
|
3088
|
+
*/
|
|
3089
|
+
passThroughHeaders?: Record<string, string>;
|
|
3090
|
+
};
|
|
3091
|
+
};
|
|
3092
|
+
|
|
3093
|
+
type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
|
|
3094
|
+
interface HttpClient$1 {
|
|
3095
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
3096
|
+
fetchWithAuth: typeof fetch;
|
|
3097
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
3098
|
+
getActiveToken?: () => string | undefined;
|
|
2271
3099
|
}
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
3100
|
+
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
3101
|
+
type HttpResponse$1<T = any> = {
|
|
3102
|
+
data: T;
|
|
3103
|
+
status: number;
|
|
3104
|
+
statusText: string;
|
|
3105
|
+
headers: any;
|
|
3106
|
+
request?: any;
|
|
3107
|
+
};
|
|
3108
|
+
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
3109
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
3110
|
+
url: string;
|
|
3111
|
+
data?: Data;
|
|
3112
|
+
params?: URLSearchParams;
|
|
3113
|
+
} & APIMetadata$1;
|
|
3114
|
+
type APIMetadata$1 = {
|
|
3115
|
+
methodFqn?: string;
|
|
3116
|
+
entityFqdn?: string;
|
|
3117
|
+
packageName?: string;
|
|
3118
|
+
};
|
|
3119
|
+
type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
|
|
3120
|
+
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
3121
|
+
__type: 'event-definition';
|
|
3122
|
+
type: Type;
|
|
3123
|
+
isDomainEvent?: boolean;
|
|
3124
|
+
transformations?: (envelope: unknown) => Payload;
|
|
3125
|
+
__payload: Payload;
|
|
3126
|
+
};
|
|
3127
|
+
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
3128
|
+
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
3129
|
+
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
3130
|
+
|
|
3131
|
+
type ServicePluginMethodInput$1 = {
|
|
3132
|
+
request: any;
|
|
3133
|
+
metadata: any;
|
|
3134
|
+
};
|
|
3135
|
+
type ServicePluginContract$1 = Record<string, (payload: ServicePluginMethodInput$1) => unknown | Promise<unknown>>;
|
|
3136
|
+
type ServicePluginMethodMetadata$1 = {
|
|
3137
|
+
name: string;
|
|
3138
|
+
primaryHttpMappingPath: string;
|
|
3139
|
+
transformations: {
|
|
3140
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$1;
|
|
3141
|
+
toREST: (...args: unknown[]) => unknown;
|
|
3142
|
+
};
|
|
3143
|
+
};
|
|
3144
|
+
type ServicePluginDefinition$1<Contract extends ServicePluginContract$1> = {
|
|
3145
|
+
__type: 'service-plugin-definition';
|
|
3146
|
+
componentType: string;
|
|
3147
|
+
methods: ServicePluginMethodMetadata$1[];
|
|
3148
|
+
__contract: Contract;
|
|
3149
|
+
};
|
|
3150
|
+
declare function ServicePluginDefinition$1<Contract extends ServicePluginContract$1>(componentType: string, methods: ServicePluginMethodMetadata$1[]): ServicePluginDefinition$1<Contract>;
|
|
3151
|
+
type BuildServicePluginDefinition$1<T extends ServicePluginDefinition$1<any>> = (implementation: T['__contract']) => void;
|
|
3152
|
+
declare const SERVICE_PLUGIN_ERROR_TYPE$1 = "wix_spi_error";
|
|
3153
|
+
|
|
3154
|
+
type RequestContext$1 = {
|
|
3155
|
+
isSSR: boolean;
|
|
3156
|
+
host: string;
|
|
3157
|
+
protocol?: string;
|
|
3158
|
+
};
|
|
3159
|
+
type ResponseTransformer$1 = (data: any, headers?: any) => any;
|
|
3160
|
+
/**
|
|
3161
|
+
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
3162
|
+
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
3163
|
+
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
3164
|
+
*/
|
|
3165
|
+
type Method$1 = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
3166
|
+
type AmbassadorRequestOptions$1<T = any> = {
|
|
3167
|
+
_?: T;
|
|
3168
|
+
url?: string;
|
|
3169
|
+
method?: Method$1;
|
|
3170
|
+
params?: any;
|
|
3171
|
+
data?: any;
|
|
3172
|
+
transformResponse?: ResponseTransformer$1 | ResponseTransformer$1[];
|
|
3173
|
+
};
|
|
3174
|
+
type AmbassadorFactory$1<Request, Response> = (payload: Request) => ((context: RequestContext$1) => AmbassadorRequestOptions$1<Response>) & {
|
|
3175
|
+
__isAmbassador: boolean;
|
|
3176
|
+
};
|
|
3177
|
+
type AmbassadorFunctionDescriptor$1<Request = any, Response = any> = AmbassadorFactory$1<Request, Response>;
|
|
3178
|
+
type BuildAmbassadorFunction$1<T extends AmbassadorFunctionDescriptor$1> = T extends AmbassadorFunctionDescriptor$1<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
3179
|
+
|
|
3180
|
+
declare global {
|
|
3181
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
3182
|
+
interface SymbolConstructor {
|
|
3183
|
+
readonly observable: symbol;
|
|
3184
|
+
}
|
|
2289
3185
|
}
|
|
2290
3186
|
|
|
2291
|
-
declare
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
}
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
}
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
3187
|
+
declare const emptyObjectSymbol$1: unique symbol;
|
|
3188
|
+
|
|
3189
|
+
/**
|
|
3190
|
+
Represents a strictly empty plain object, the `{}` value.
|
|
3191
|
+
|
|
3192
|
+
When you annotate something as the type `{}`, it can be anything except `null` and `undefined`. This means that you cannot use `{}` to represent an empty plain object ([read more](https://stackoverflow.com/questions/47339869/typescript-empty-object-and-any-difference/52193484#52193484)).
|
|
3193
|
+
|
|
3194
|
+
@example
|
|
3195
|
+
```
|
|
3196
|
+
import type {EmptyObject} from 'type-fest';
|
|
3197
|
+
|
|
3198
|
+
// The following illustrates the problem with `{}`.
|
|
3199
|
+
const foo1: {} = {}; // Pass
|
|
3200
|
+
const foo2: {} = []; // Pass
|
|
3201
|
+
const foo3: {} = 42; // Pass
|
|
3202
|
+
const foo4: {} = {a: 1}; // Pass
|
|
3203
|
+
|
|
3204
|
+
// With `EmptyObject` only the first case is valid.
|
|
3205
|
+
const bar1: EmptyObject = {}; // Pass
|
|
3206
|
+
const bar2: EmptyObject = 42; // Fail
|
|
3207
|
+
const bar3: EmptyObject = []; // Fail
|
|
3208
|
+
const bar4: EmptyObject = {a: 1}; // Fail
|
|
3209
|
+
```
|
|
3210
|
+
|
|
3211
|
+
Unfortunately, `Record<string, never>`, `Record<keyof any, never>` and `Record<never, never>` do not work. See {@link https://github.com/sindresorhus/type-fest/issues/395 #395}.
|
|
3212
|
+
|
|
3213
|
+
@category Object
|
|
3214
|
+
*/
|
|
3215
|
+
type EmptyObject$1 = {[emptyObjectSymbol$1]?: never};
|
|
3216
|
+
|
|
3217
|
+
/**
|
|
3218
|
+
Returns a boolean for whether the two given types are equal.
|
|
3219
|
+
|
|
3220
|
+
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
3221
|
+
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
3222
|
+
|
|
3223
|
+
Use-cases:
|
|
3224
|
+
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
3225
|
+
|
|
3226
|
+
@example
|
|
3227
|
+
```
|
|
3228
|
+
import type {IsEqual} from 'type-fest';
|
|
3229
|
+
|
|
3230
|
+
// This type returns a boolean for whether the given array includes the given item.
|
|
3231
|
+
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
3232
|
+
type Includes<Value extends readonly any[], Item> =
|
|
3233
|
+
Value extends readonly [Value[0], ...infer rest]
|
|
3234
|
+
? IsEqual<Value[0], Item> extends true
|
|
3235
|
+
? true
|
|
3236
|
+
: Includes<rest, Item>
|
|
3237
|
+
: false;
|
|
3238
|
+
```
|
|
3239
|
+
|
|
3240
|
+
@category Type Guard
|
|
3241
|
+
@category Utilities
|
|
3242
|
+
*/
|
|
3243
|
+
type IsEqual$1<A, B> =
|
|
3244
|
+
(<G>() => G extends A ? 1 : 2) extends
|
|
3245
|
+
(<G>() => G extends B ? 1 : 2)
|
|
3246
|
+
? true
|
|
3247
|
+
: false;
|
|
3248
|
+
|
|
3249
|
+
/**
|
|
3250
|
+
Filter out keys from an object.
|
|
3251
|
+
|
|
3252
|
+
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
3253
|
+
Returns `never` if `Key` extends `Exclude`.
|
|
3254
|
+
Returns `Key` otherwise.
|
|
3255
|
+
|
|
3256
|
+
@example
|
|
3257
|
+
```
|
|
3258
|
+
type Filtered = Filter<'foo', 'foo'>;
|
|
3259
|
+
//=> never
|
|
3260
|
+
```
|
|
3261
|
+
|
|
3262
|
+
@example
|
|
3263
|
+
```
|
|
3264
|
+
type Filtered = Filter<'bar', string>;
|
|
3265
|
+
//=> never
|
|
3266
|
+
```
|
|
3267
|
+
|
|
3268
|
+
@example
|
|
3269
|
+
```
|
|
3270
|
+
type Filtered = Filter<'bar', 'foo'>;
|
|
3271
|
+
//=> 'bar'
|
|
3272
|
+
```
|
|
3273
|
+
|
|
3274
|
+
@see {Except}
|
|
3275
|
+
*/
|
|
3276
|
+
type Filter$1<KeyType, ExcludeType> = IsEqual$1<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
3277
|
+
|
|
3278
|
+
type ExceptOptions$1 = {
|
|
3279
|
+
/**
|
|
3280
|
+
Disallow assigning non-specified properties.
|
|
3281
|
+
|
|
3282
|
+
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
3283
|
+
|
|
3284
|
+
@default false
|
|
3285
|
+
*/
|
|
3286
|
+
requireExactProps?: boolean;
|
|
3287
|
+
};
|
|
3288
|
+
|
|
3289
|
+
/**
|
|
3290
|
+
Create a type from an object type without certain keys.
|
|
3291
|
+
|
|
3292
|
+
We recommend setting the `requireExactProps` option to `true`.
|
|
3293
|
+
|
|
3294
|
+
This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.
|
|
3295
|
+
|
|
3296
|
+
This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)).
|
|
3297
|
+
|
|
3298
|
+
@example
|
|
3299
|
+
```
|
|
3300
|
+
import type {Except} from 'type-fest';
|
|
3301
|
+
|
|
3302
|
+
type Foo = {
|
|
3303
|
+
a: number;
|
|
3304
|
+
b: string;
|
|
3305
|
+
};
|
|
3306
|
+
|
|
3307
|
+
type FooWithoutA = Except<Foo, 'a'>;
|
|
3308
|
+
//=> {b: string}
|
|
3309
|
+
|
|
3310
|
+
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
3311
|
+
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
3312
|
+
|
|
3313
|
+
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
3314
|
+
//=> {a: number} & Partial<Record<"b", never>>
|
|
3315
|
+
|
|
3316
|
+
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
3317
|
+
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
3318
|
+
```
|
|
3319
|
+
|
|
3320
|
+
@category Object
|
|
3321
|
+
*/
|
|
3322
|
+
type Except$1<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions$1 = {requireExactProps: false}> = {
|
|
3323
|
+
[KeyType in keyof ObjectType as Filter$1<KeyType, KeysType>]: ObjectType[KeyType];
|
|
3324
|
+
} & (Options['requireExactProps'] extends true
|
|
3325
|
+
? Partial<Record<KeysType, never>>
|
|
3326
|
+
: {});
|
|
3327
|
+
|
|
3328
|
+
/**
|
|
3329
|
+
Returns a boolean for whether the given type is `never`.
|
|
3330
|
+
|
|
3331
|
+
@link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
|
|
3332
|
+
@link https://stackoverflow.com/a/53984913/10292952
|
|
3333
|
+
@link https://www.zhenghao.io/posts/ts-never
|
|
3334
|
+
|
|
3335
|
+
Useful in type utilities, such as checking if something does not occur.
|
|
3336
|
+
|
|
3337
|
+
@example
|
|
3338
|
+
```
|
|
3339
|
+
import type {IsNever, And} from 'type-fest';
|
|
3340
|
+
|
|
3341
|
+
// https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
|
|
3342
|
+
type AreStringsEqual<A extends string, B extends string> =
|
|
3343
|
+
And<
|
|
3344
|
+
IsNever<Exclude<A, B>> extends true ? true : false,
|
|
3345
|
+
IsNever<Exclude<B, A>> extends true ? true : false
|
|
3346
|
+
>;
|
|
3347
|
+
|
|
3348
|
+
type EndIfEqual<I extends string, O extends string> =
|
|
3349
|
+
AreStringsEqual<I, O> extends true
|
|
3350
|
+
? never
|
|
3351
|
+
: void;
|
|
3352
|
+
|
|
3353
|
+
function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
|
|
3354
|
+
if (input === output) {
|
|
3355
|
+
process.exit(0);
|
|
3356
|
+
}
|
|
2322
3357
|
}
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
3358
|
+
|
|
3359
|
+
endIfEqual('abc', 'abc');
|
|
3360
|
+
//=> never
|
|
3361
|
+
|
|
3362
|
+
endIfEqual('abc', '123');
|
|
3363
|
+
//=> void
|
|
3364
|
+
```
|
|
3365
|
+
|
|
3366
|
+
@category Type Guard
|
|
3367
|
+
@category Utilities
|
|
3368
|
+
*/
|
|
3369
|
+
type IsNever$1<T> = [T] extends [never] ? true : false;
|
|
3370
|
+
|
|
3371
|
+
/**
|
|
3372
|
+
An if-else-like type that resolves depending on whether the given type is `never`.
|
|
3373
|
+
|
|
3374
|
+
@see {@link IsNever}
|
|
3375
|
+
|
|
3376
|
+
@example
|
|
3377
|
+
```
|
|
3378
|
+
import type {IfNever} from 'type-fest';
|
|
3379
|
+
|
|
3380
|
+
type ShouldBeTrue = IfNever<never>;
|
|
3381
|
+
//=> true
|
|
3382
|
+
|
|
3383
|
+
type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
|
|
3384
|
+
//=> 'bar'
|
|
3385
|
+
```
|
|
3386
|
+
|
|
3387
|
+
@category Type Guard
|
|
3388
|
+
@category Utilities
|
|
3389
|
+
*/
|
|
3390
|
+
type IfNever$1<T, TypeIfNever = true, TypeIfNotNever = false> = (
|
|
3391
|
+
IsNever$1<T> extends true ? TypeIfNever : TypeIfNotNever
|
|
3392
|
+
);
|
|
3393
|
+
|
|
3394
|
+
/**
|
|
3395
|
+
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
3396
|
+
|
|
3397
|
+
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
3398
|
+
|
|
3399
|
+
@example
|
|
3400
|
+
```
|
|
3401
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
3402
|
+
|
|
3403
|
+
interface Example {
|
|
3404
|
+
a: string;
|
|
3405
|
+
b: string | number;
|
|
3406
|
+
c?: string;
|
|
3407
|
+
d: {};
|
|
2342
3408
|
}
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
3409
|
+
|
|
3410
|
+
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
3411
|
+
//=> 'a'
|
|
3412
|
+
```
|
|
3413
|
+
|
|
3414
|
+
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
3415
|
+
|
|
3416
|
+
@example
|
|
3417
|
+
```
|
|
3418
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
3419
|
+
|
|
3420
|
+
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
3421
|
+
//=> 'a' | 'c'
|
|
3422
|
+
```
|
|
3423
|
+
|
|
3424
|
+
@category Object
|
|
3425
|
+
*/
|
|
3426
|
+
type ConditionalKeys$1<Base, Condition> =
|
|
3427
|
+
{
|
|
3428
|
+
// Map through all the keys of the given base type.
|
|
3429
|
+
[Key in keyof Base]-?:
|
|
3430
|
+
// Pick only keys with types extending the given `Condition` type.
|
|
3431
|
+
Base[Key] extends Condition
|
|
3432
|
+
// Retain this key
|
|
3433
|
+
// If the value for the key extends never, only include it if `Condition` also extends never
|
|
3434
|
+
? IfNever$1<Base[Key], IfNever$1<Condition, Key, never>, Key>
|
|
3435
|
+
// Discard this key since the condition fails.
|
|
3436
|
+
: never;
|
|
3437
|
+
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
3438
|
+
}[keyof Base];
|
|
3439
|
+
|
|
3440
|
+
/**
|
|
3441
|
+
Exclude keys from a shape that matches the given `Condition`.
|
|
3442
|
+
|
|
3443
|
+
This is useful when you want to create a new type with a specific set of keys from a shape. For example, you might want to exclude all the primitive properties from a class and form a new shape containing everything but the primitive properties.
|
|
3444
|
+
|
|
3445
|
+
@example
|
|
3446
|
+
```
|
|
3447
|
+
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
3448
|
+
|
|
3449
|
+
class Awesome {
|
|
3450
|
+
name: string;
|
|
3451
|
+
successes: number;
|
|
3452
|
+
failures: bigint;
|
|
3453
|
+
|
|
3454
|
+
run() {}
|
|
2353
3455
|
}
|
|
2354
|
-
declare const onDataCollectionClonedEvent$1: EventDefinition$3<DataCollectionClonedEnvelope, "wix.data.v2.data_collection_data_collection_cloned_event">;
|
|
2355
|
-
declare const onDataCollectionChangedEvent$1: EventDefinition$3<DataCollectionChangedEnvelope, "wix.data.v2.data_collection_data_collection_changed_event">;
|
|
2356
|
-
declare const onDataCollectionCreated$1: EventDefinition$3<DataCollectionCreatedEnvelope, "wix.data.v2.data_collection_created">;
|
|
2357
|
-
declare const onDataCollectionUpdated$1: EventDefinition$3<DataCollectionUpdatedEnvelope, "wix.data.v2.data_collection_updated">;
|
|
2358
|
-
declare const onDataCollectionDeleted$1: EventDefinition$3<DataCollectionDeletedEnvelope, "wix.data.v2.data_collection_deleted">;
|
|
2359
3456
|
|
|
2360
|
-
type
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
isDomainEvent?: boolean;
|
|
2364
|
-
transformations?: (envelope: unknown) => Payload;
|
|
2365
|
-
__payload: Payload;
|
|
2366
|
-
};
|
|
2367
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
2368
|
-
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
2369
|
-
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
3457
|
+
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
|
|
3458
|
+
//=> {run: () => void}
|
|
3459
|
+
```
|
|
2370
3460
|
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
3461
|
+
@example
|
|
3462
|
+
```
|
|
3463
|
+
import type {ConditionalExcept} from 'type-fest';
|
|
3464
|
+
|
|
3465
|
+
interface Example {
|
|
3466
|
+
a: string;
|
|
3467
|
+
b: string | number;
|
|
3468
|
+
c: () => void;
|
|
3469
|
+
d: {};
|
|
2376
3470
|
}
|
|
2377
3471
|
|
|
2378
|
-
|
|
3472
|
+
type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
3473
|
+
//=> {b: string | number; c: () => void; d: {}}
|
|
3474
|
+
```
|
|
2379
3475
|
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
3476
|
+
@category Object
|
|
3477
|
+
*/
|
|
3478
|
+
type ConditionalExcept$1<Base, Condition> = Except$1<
|
|
3479
|
+
Base,
|
|
3480
|
+
ConditionalKeys$1<Base, Condition>
|
|
3481
|
+
>;
|
|
2385
3482
|
|
|
2386
|
-
type _publicOnDataCollectionClonedEventType = typeof onDataCollectionClonedEvent$1;
|
|
2387
3483
|
/**
|
|
2388
|
-
*
|
|
2389
|
-
*
|
|
3484
|
+
* Descriptors are objects that describe the API of a module, and the module
|
|
3485
|
+
* can either be a REST module or a host module.
|
|
3486
|
+
* This type is recursive, so it can describe nested modules.
|
|
2390
3487
|
*/
|
|
2391
|
-
|
|
3488
|
+
type Descriptors$1 = RESTFunctionDescriptor$1 | AmbassadorFunctionDescriptor$1 | HostModule$1<any, any> | EventDefinition$1<any> | ServicePluginDefinition$1<any> | {
|
|
3489
|
+
[key: string]: Descriptors$1 | PublicMetadata$1 | any;
|
|
3490
|
+
};
|
|
3491
|
+
/**
|
|
3492
|
+
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
3493
|
+
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
3494
|
+
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
3495
|
+
* do not match the given host (as they will not work with the given host).
|
|
3496
|
+
*/
|
|
3497
|
+
type BuildDescriptors$1<T extends Descriptors$1, H extends Host$1<any> | undefined, Depth extends number = 5> = {
|
|
3498
|
+
done: T;
|
|
3499
|
+
recurse: T extends {
|
|
3500
|
+
__type: typeof SERVICE_PLUGIN_ERROR_TYPE$1;
|
|
3501
|
+
} ? never : T extends AmbassadorFunctionDescriptor$1 ? BuildAmbassadorFunction$1<T> : T extends RESTFunctionDescriptor$1 ? BuildRESTFunction$1<T> : T extends EventDefinition$1<any> ? BuildEventDefinition$1<T> : T extends ServicePluginDefinition$1<any> ? BuildServicePluginDefinition$1<T> : T extends HostModule$1<any, any> ? HostModuleAPI$1<T> : ConditionalExcept$1<{
|
|
3502
|
+
[Key in keyof T]: T[Key] extends Descriptors$1 ? BuildDescriptors$1<T[Key], H, [
|
|
3503
|
+
-1,
|
|
3504
|
+
0,
|
|
3505
|
+
1,
|
|
3506
|
+
2,
|
|
3507
|
+
3,
|
|
3508
|
+
4,
|
|
3509
|
+
5
|
|
3510
|
+
][Depth]> : never;
|
|
3511
|
+
}, EmptyObject$1>;
|
|
3512
|
+
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
3513
|
+
type PublicMetadata$1 = {
|
|
3514
|
+
PACKAGE_NAME?: string;
|
|
3515
|
+
};
|
|
2392
3516
|
|
|
2393
|
-
|
|
3517
|
+
declare global {
|
|
3518
|
+
interface ContextualClient {
|
|
3519
|
+
}
|
|
3520
|
+
}
|
|
2394
3521
|
/**
|
|
2395
|
-
*
|
|
2396
|
-
*
|
|
3522
|
+
* A type used to create concerete types from SDK descriptors in
|
|
3523
|
+
* case a contextual client is available.
|
|
2397
3524
|
*/
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
/** */
|
|
2402
|
-
declare const onDataCollectionCreated: ReturnType<typeof createEventModule$1<_publicOnDataCollectionCreatedType>>;
|
|
2403
|
-
|
|
2404
|
-
type _publicOnDataCollectionUpdatedType = typeof onDataCollectionUpdated$1;
|
|
2405
|
-
/** */
|
|
2406
|
-
declare const onDataCollectionUpdated: ReturnType<typeof createEventModule$1<_publicOnDataCollectionUpdatedType>>;
|
|
2407
|
-
|
|
2408
|
-
type _publicOnDataCollectionDeletedType = typeof onDataCollectionDeleted$1;
|
|
2409
|
-
/** */
|
|
2410
|
-
declare const onDataCollectionDeleted: ReturnType<typeof createEventModule$1<_publicOnDataCollectionDeletedType>>;
|
|
2411
|
-
|
|
2412
|
-
type context$2_AccessLevel = AccessLevel;
|
|
2413
|
-
declare const context$2_AccessLevel: typeof AccessLevel;
|
|
2414
|
-
type context$2_AllowedDataPermissions = AllowedDataPermissions;
|
|
2415
|
-
type context$2_ArraySizeRange = ArraySizeRange;
|
|
2416
|
-
type context$2_BulkGetDataCollectionsPageBySnapshotsRequest = BulkGetDataCollectionsPageBySnapshotsRequest;
|
|
2417
|
-
type context$2_BulkGetDataCollectionsPageBySnapshotsResponse = BulkGetDataCollectionsPageBySnapshotsResponse;
|
|
2418
|
-
type context$2_BulkGetDataCollectionsRequest = BulkGetDataCollectionsRequest;
|
|
2419
|
-
type context$2_BulkGetDataCollectionsResponse = BulkGetDataCollectionsResponse;
|
|
2420
|
-
type context$2_Calculator = Calculator;
|
|
2421
|
-
type context$2_CalculatorPatternOneOf = CalculatorPatternOneOf;
|
|
2422
|
-
type context$2_CmsOptions = CmsOptions;
|
|
2423
|
-
type context$2_CollectionCapabilities = CollectionCapabilities;
|
|
2424
|
-
type context$2_CollectionOperation = CollectionOperation;
|
|
2425
|
-
declare const context$2_CollectionOperation: typeof CollectionOperation;
|
|
2426
|
-
type context$2_CollectionType = CollectionType;
|
|
2427
|
-
declare const context$2_CollectionType: typeof CollectionType;
|
|
2428
|
-
type context$2_CreateDataCollectionFieldRequest = CreateDataCollectionFieldRequest;
|
|
2429
|
-
type context$2_CreateDataCollectionFieldResponse = CreateDataCollectionFieldResponse;
|
|
2430
|
-
type context$2_CreateDataCollectionRequest = CreateDataCollectionRequest;
|
|
2431
|
-
type context$2_CreateDataCollectionResponse = CreateDataCollectionResponse;
|
|
2432
|
-
type context$2_CreateDataCollectionResponseNonNullableFields = CreateDataCollectionResponseNonNullableFields;
|
|
2433
|
-
type context$2_CreateDataCollectionsSnapshotRequest = CreateDataCollectionsSnapshotRequest;
|
|
2434
|
-
type context$2_CreateDataCollectionsSnapshotResponse = CreateDataCollectionsSnapshotResponse;
|
|
2435
|
-
type context$2_CreateMigratedCollectionsSnapshotRequest = CreateMigratedCollectionsSnapshotRequest;
|
|
2436
|
-
type context$2_CreateMigratedCollectionsSnapshotResponse = CreateMigratedCollectionsSnapshotResponse;
|
|
2437
|
-
type context$2_DataCollection = DataCollection;
|
|
2438
|
-
type context$2_DataCollectionChangedEnvelope = DataCollectionChangedEnvelope;
|
|
2439
|
-
type context$2_DataCollectionChangedEvent = DataCollectionChangedEvent;
|
|
2440
|
-
type context$2_DataCollectionClonedEnvelope = DataCollectionClonedEnvelope;
|
|
2441
|
-
type context$2_DataCollectionClonedEvent = DataCollectionClonedEvent;
|
|
2442
|
-
type context$2_DataCollectionCreatedEnvelope = DataCollectionCreatedEnvelope;
|
|
2443
|
-
type context$2_DataCollectionDeletedEnvelope = DataCollectionDeletedEnvelope;
|
|
2444
|
-
type context$2_DataCollectionNonNullableFields = DataCollectionNonNullableFields;
|
|
2445
|
-
type context$2_DataCollectionUpdatedEnvelope = DataCollectionUpdatedEnvelope;
|
|
2446
|
-
type context$2_DataOperation = DataOperation;
|
|
2447
|
-
declare const context$2_DataOperation: typeof DataOperation;
|
|
2448
|
-
type context$2_DataPermissions = DataPermissions;
|
|
2449
|
-
type context$2_DeleteDataCollectionFieldRequest = DeleteDataCollectionFieldRequest;
|
|
2450
|
-
type context$2_DeleteDataCollectionFieldResponse = DeleteDataCollectionFieldResponse;
|
|
2451
|
-
type context$2_DeleteDataCollectionRequest = DeleteDataCollectionRequest;
|
|
2452
|
-
type context$2_DeleteDataCollectionResponse = DeleteDataCollectionResponse;
|
|
2453
|
-
type context$2_DeleteDataCollectionsSnapshotRequest = DeleteDataCollectionsSnapshotRequest;
|
|
2454
|
-
type context$2_DeleteDataCollectionsSnapshotResponse = DeleteDataCollectionsSnapshotResponse;
|
|
2455
|
-
type context$2_Direction = Direction;
|
|
2456
|
-
declare const context$2_Direction: typeof Direction;
|
|
2457
|
-
type context$2_FieldCapabilities = FieldCapabilities;
|
|
2458
|
-
type context$2_FieldPlugin = FieldPlugin;
|
|
2459
|
-
type context$2_FieldPluginOptionsOneOf = FieldPluginOptionsOneOf;
|
|
2460
|
-
type context$2_FieldPluginType = FieldPluginType;
|
|
2461
|
-
declare const context$2_FieldPluginType: typeof FieldPluginType;
|
|
2462
|
-
type context$2_FieldRangeValidationsOneOf = FieldRangeValidationsOneOf;
|
|
2463
|
-
type context$2_FieldsPattern = FieldsPattern;
|
|
2464
|
-
type context$2_Format = Format;
|
|
2465
|
-
declare const context$2_Format: typeof Format;
|
|
2466
|
-
type context$2_GetDataCollectionOptions = GetDataCollectionOptions;
|
|
2467
|
-
type context$2_GetDataCollectionRequest = GetDataCollectionRequest;
|
|
2468
|
-
type context$2_GetDataCollectionResponse = GetDataCollectionResponse;
|
|
2469
|
-
type context$2_GetDataCollectionResponseNonNullableFields = GetDataCollectionResponseNonNullableFields;
|
|
2470
|
-
type context$2_IndexField = IndexField;
|
|
2471
|
-
type context$2_IndexLimits = IndexLimits;
|
|
2472
|
-
type context$2_IndexStatus = IndexStatus;
|
|
2473
|
-
declare const context$2_IndexStatus: typeof IndexStatus;
|
|
2474
|
-
type context$2_ListDataCollectionsOptions = ListDataCollectionsOptions;
|
|
2475
|
-
type context$2_ListDataCollectionsRequest = ListDataCollectionsRequest;
|
|
2476
|
-
type context$2_ListDataCollectionsResponse = ListDataCollectionsResponse;
|
|
2477
|
-
type context$2_ListDataCollectionsResponseNonNullableFields = ListDataCollectionsResponseNonNullableFields;
|
|
2478
|
-
type context$2_MultiReference = MultiReference;
|
|
2479
|
-
type context$2_MultilingualOptions = MultilingualOptions;
|
|
2480
|
-
type context$2_NumberRange = NumberRange;
|
|
2481
|
-
type context$2_ObjectField = ObjectField;
|
|
2482
|
-
type context$2_PageLink = PageLink;
|
|
2483
|
-
type context$2_PageLinkPluginOptions = PageLinkPluginOptions;
|
|
2484
|
-
type context$2_PagingMode = PagingMode;
|
|
2485
|
-
declare const context$2_PagingMode: typeof PagingMode;
|
|
2486
|
-
type context$2_Permissions = Permissions;
|
|
2487
|
-
type context$2_Plugin = Plugin;
|
|
2488
|
-
type context$2_PluginCmsOptions = PluginCmsOptions;
|
|
2489
|
-
type context$2_PluginOptionsOneOf = PluginOptionsOneOf;
|
|
2490
|
-
type context$2_PluginType = PluginType;
|
|
2491
|
-
declare const context$2_PluginType: typeof PluginType;
|
|
2492
|
-
type context$2_PluginUpdate = PluginUpdate;
|
|
2493
|
-
type context$2_QueryOperator = QueryOperator;
|
|
2494
|
-
declare const context$2_QueryOperator: typeof QueryOperator;
|
|
2495
|
-
type context$2_Reference = Reference;
|
|
2496
|
-
type context$2_RestoreDataCollectionsFromSnapshotRequest = RestoreDataCollectionsFromSnapshotRequest;
|
|
2497
|
-
type context$2_RestoreDataCollectionsFromSnapshotResponse = RestoreDataCollectionsFromSnapshotResponse;
|
|
2498
|
-
type context$2_Role = Role;
|
|
2499
|
-
declare const context$2_Role: typeof Role;
|
|
2500
|
-
type context$2_Segment = Segment;
|
|
2501
|
-
declare const context$2_Segment: typeof Segment;
|
|
2502
|
-
type context$2_SingleItemPluginOptions = SingleItemPluginOptions;
|
|
2503
|
-
type context$2_SiteSort = SiteSort;
|
|
2504
|
-
type context$2_SnapshotCollection = SnapshotCollection;
|
|
2505
|
-
type context$2_Sort = Sort;
|
|
2506
|
-
type context$2_StringLengthRange = StringLengthRange;
|
|
2507
|
-
type context$2_Type = Type;
|
|
2508
|
-
declare const context$2_Type: typeof Type;
|
|
2509
|
-
type context$2_TypeMetadata = TypeMetadata;
|
|
2510
|
-
type context$2_TypeMetadataMetadataOneOf = TypeMetadataMetadataOneOf;
|
|
2511
|
-
type context$2_UpdateDataCollectionFieldRequest = UpdateDataCollectionFieldRequest;
|
|
2512
|
-
type context$2_UpdateDataCollectionFieldResponse = UpdateDataCollectionFieldResponse;
|
|
2513
|
-
type context$2_UpdateDataCollectionRequest = UpdateDataCollectionRequest;
|
|
2514
|
-
type context$2_UpdateDataCollectionResponse = UpdateDataCollectionResponse;
|
|
2515
|
-
type context$2_UpdateDataCollectionResponseNonNullableFields = UpdateDataCollectionResponseNonNullableFields;
|
|
2516
|
-
type context$2_UpdateDataPermissionsRequest = UpdateDataPermissionsRequest;
|
|
2517
|
-
type context$2_UpdateDataPermissionsResponse = UpdateDataPermissionsResponse;
|
|
2518
|
-
type context$2_UrlizedOnlyPattern = UrlizedOnlyPattern;
|
|
2519
|
-
type context$2_UrlizedPluginOptions = UrlizedPluginOptions;
|
|
2520
|
-
type context$2__Array = _Array;
|
|
2521
|
-
type context$2__Object = _Object;
|
|
2522
|
-
type context$2__publicOnDataCollectionChangedEventType = _publicOnDataCollectionChangedEventType;
|
|
2523
|
-
type context$2__publicOnDataCollectionClonedEventType = _publicOnDataCollectionClonedEventType;
|
|
2524
|
-
type context$2__publicOnDataCollectionCreatedType = _publicOnDataCollectionCreatedType;
|
|
2525
|
-
type context$2__publicOnDataCollectionDeletedType = _publicOnDataCollectionDeletedType;
|
|
2526
|
-
type context$2__publicOnDataCollectionUpdatedType = _publicOnDataCollectionUpdatedType;
|
|
2527
|
-
declare const context$2_createDataCollection: typeof createDataCollection;
|
|
2528
|
-
declare const context$2_deleteDataCollection: typeof deleteDataCollection;
|
|
2529
|
-
declare const context$2_getDataCollection: typeof getDataCollection;
|
|
2530
|
-
declare const context$2_listDataCollections: typeof listDataCollections;
|
|
2531
|
-
declare const context$2_onDataCollectionChangedEvent: typeof onDataCollectionChangedEvent;
|
|
2532
|
-
declare const context$2_onDataCollectionClonedEvent: typeof onDataCollectionClonedEvent;
|
|
2533
|
-
declare const context$2_onDataCollectionCreated: typeof onDataCollectionCreated;
|
|
2534
|
-
declare const context$2_onDataCollectionDeleted: typeof onDataCollectionDeleted;
|
|
2535
|
-
declare const context$2_onDataCollectionUpdated: typeof onDataCollectionUpdated;
|
|
2536
|
-
declare const context$2_updateDataCollection: typeof updateDataCollection;
|
|
2537
|
-
declare namespace context$2 {
|
|
2538
|
-
export { context$2_AccessLevel as AccessLevel, type ActionEvent$1 as ActionEvent, type context$2_AllowedDataPermissions as AllowedDataPermissions, type context$2_ArraySizeRange as ArraySizeRange, type BaseEventMetadata$1 as BaseEventMetadata, type context$2_BulkGetDataCollectionsPageBySnapshotsRequest as BulkGetDataCollectionsPageBySnapshotsRequest, type context$2_BulkGetDataCollectionsPageBySnapshotsResponse as BulkGetDataCollectionsPageBySnapshotsResponse, type context$2_BulkGetDataCollectionsRequest as BulkGetDataCollectionsRequest, type context$2_BulkGetDataCollectionsResponse as BulkGetDataCollectionsResponse, type context$2_Calculator as Calculator, type context$2_CalculatorPatternOneOf as CalculatorPatternOneOf, type context$2_CmsOptions as CmsOptions, type context$2_CollectionCapabilities as CollectionCapabilities, context$2_CollectionOperation as CollectionOperation, context$2_CollectionType as CollectionType, type context$2_CreateDataCollectionFieldRequest as CreateDataCollectionFieldRequest, type context$2_CreateDataCollectionFieldResponse as CreateDataCollectionFieldResponse, type context$2_CreateDataCollectionRequest as CreateDataCollectionRequest, type context$2_CreateDataCollectionResponse as CreateDataCollectionResponse, type context$2_CreateDataCollectionResponseNonNullableFields as CreateDataCollectionResponseNonNullableFields, type context$2_CreateDataCollectionsSnapshotRequest as CreateDataCollectionsSnapshotRequest, type context$2_CreateDataCollectionsSnapshotResponse as CreateDataCollectionsSnapshotResponse, type context$2_CreateMigratedCollectionsSnapshotRequest as CreateMigratedCollectionsSnapshotRequest, type context$2_CreateMigratedCollectionsSnapshotResponse as CreateMigratedCollectionsSnapshotResponse, type context$2_DataCollection as DataCollection, type context$2_DataCollectionChangedEnvelope as DataCollectionChangedEnvelope, type context$2_DataCollectionChangedEvent as DataCollectionChangedEvent, type context$2_DataCollectionClonedEnvelope as DataCollectionClonedEnvelope, type context$2_DataCollectionClonedEvent as DataCollectionClonedEvent, type context$2_DataCollectionCreatedEnvelope as DataCollectionCreatedEnvelope, type context$2_DataCollectionDeletedEnvelope as DataCollectionDeletedEnvelope, type context$2_DataCollectionNonNullableFields as DataCollectionNonNullableFields, type context$2_DataCollectionUpdatedEnvelope as DataCollectionUpdatedEnvelope, context$2_DataOperation as DataOperation, type context$2_DataPermissions as DataPermissions, type context$2_DeleteDataCollectionFieldRequest as DeleteDataCollectionFieldRequest, type context$2_DeleteDataCollectionFieldResponse as DeleteDataCollectionFieldResponse, type context$2_DeleteDataCollectionRequest as DeleteDataCollectionRequest, type context$2_DeleteDataCollectionResponse as DeleteDataCollectionResponse, type context$2_DeleteDataCollectionsSnapshotRequest as DeleteDataCollectionsSnapshotRequest, type context$2_DeleteDataCollectionsSnapshotResponse as DeleteDataCollectionsSnapshotResponse, context$2_Direction as Direction, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type EventMetadata$1 as EventMetadata, type Failure$1 as Failure, type Field$1 as Field, type context$2_FieldCapabilities as FieldCapabilities, type context$2_FieldPlugin as FieldPlugin, type context$2_FieldPluginOptionsOneOf as FieldPluginOptionsOneOf, context$2_FieldPluginType as FieldPluginType, type context$2_FieldRangeValidationsOneOf as FieldRangeValidationsOneOf, type FieldUpdate$1 as FieldUpdate, type context$2_FieldsPattern as FieldsPattern, context$2_Format as Format, type context$2_GetDataCollectionOptions as GetDataCollectionOptions, type context$2_GetDataCollectionRequest as GetDataCollectionRequest, type context$2_GetDataCollectionResponse as GetDataCollectionResponse, type context$2_GetDataCollectionResponseNonNullableFields as GetDataCollectionResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type Index$1 as Index, type context$2_IndexField as IndexField, type context$2_IndexLimits as IndexLimits, context$2_IndexStatus as IndexStatus, type context$2_ListDataCollectionsOptions as ListDataCollectionsOptions, type context$2_ListDataCollectionsRequest as ListDataCollectionsRequest, type context$2_ListDataCollectionsResponse as ListDataCollectionsResponse, type context$2_ListDataCollectionsResponseNonNullableFields as ListDataCollectionsResponseNonNullableFields, type MessageEnvelope$1 as MessageEnvelope, type context$2_MultiReference as MultiReference, type context$2_MultilingualOptions as MultilingualOptions, type context$2_NumberRange as NumberRange, type context$2_ObjectField as ObjectField, Order$1 as Order, type context$2_PageLink as PageLink, type context$2_PageLinkPluginOptions as PageLinkPluginOptions, type Paging$2 as Paging, type PagingMetadataV2$1 as PagingMetadataV2, context$2_PagingMode as PagingMode, type context$2_Permissions as Permissions, type context$2_Plugin as Plugin, type context$2_PluginCmsOptions as PluginCmsOptions, type context$2_PluginOptionsOneOf as PluginOptionsOneOf, context$2_PluginType as PluginType, type context$2_PluginUpdate as PluginUpdate, type PublishPluginOptions$1 as PublishPluginOptions, context$2_QueryOperator as QueryOperator, type context$2_Reference as Reference, type context$2_RestoreDataCollectionsFromSnapshotRequest as RestoreDataCollectionsFromSnapshotRequest, type context$2_RestoreDataCollectionsFromSnapshotResponse as RestoreDataCollectionsFromSnapshotResponse, type RestoreInfo$1 as RestoreInfo, context$2_Role as Role, context$2_Segment as Segment, type context$2_SingleItemPluginOptions as SingleItemPluginOptions, type context$2_SiteSort as SiteSort, type context$2_SnapshotCollection as SnapshotCollection, type context$2_Sort as Sort, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, Status$1 as Status, type context$2_StringLengthRange as StringLengthRange, context$2_Type as Type, type context$2_TypeMetadata as TypeMetadata, type context$2_TypeMetadataMetadataOneOf as TypeMetadataMetadataOneOf, type context$2_UpdateDataCollectionFieldRequest as UpdateDataCollectionFieldRequest, type context$2_UpdateDataCollectionFieldResponse as UpdateDataCollectionFieldResponse, type context$2_UpdateDataCollectionRequest as UpdateDataCollectionRequest, type context$2_UpdateDataCollectionResponse as UpdateDataCollectionResponse, type context$2_UpdateDataCollectionResponseNonNullableFields as UpdateDataCollectionResponseNonNullableFields, type context$2_UpdateDataPermissionsRequest as UpdateDataPermissionsRequest, type context$2_UpdateDataPermissionsResponse as UpdateDataPermissionsResponse, type context$2_UrlizedOnlyPattern as UrlizedOnlyPattern, type context$2_UrlizedPluginOptions as UrlizedPluginOptions, WebhookIdentityType$1 as WebhookIdentityType, type context$2__Array as _Array, type context$2__Object as _Object, type context$2__publicOnDataCollectionChangedEventType as _publicOnDataCollectionChangedEventType, type context$2__publicOnDataCollectionClonedEventType as _publicOnDataCollectionClonedEventType, type context$2__publicOnDataCollectionCreatedType as _publicOnDataCollectionCreatedType, type context$2__publicOnDataCollectionDeletedType as _publicOnDataCollectionDeletedType, type context$2__publicOnDataCollectionUpdatedType as _publicOnDataCollectionUpdatedType, context$2_createDataCollection as createDataCollection, context$2_deleteDataCollection as deleteDataCollection, context$2_getDataCollection as getDataCollection, context$2_listDataCollections as listDataCollections, context$2_onDataCollectionChangedEvent as onDataCollectionChangedEvent, context$2_onDataCollectionClonedEvent as onDataCollectionClonedEvent, context$2_onDataCollectionCreated as onDataCollectionCreated, context$2_onDataCollectionDeleted as onDataCollectionDeleted, context$2_onDataCollectionUpdated as onDataCollectionUpdated, onDataCollectionChangedEvent$1 as publicOnDataCollectionChangedEvent, onDataCollectionClonedEvent$1 as publicOnDataCollectionClonedEvent, onDataCollectionCreated$1 as publicOnDataCollectionCreated, onDataCollectionDeleted$1 as publicOnDataCollectionDeleted, onDataCollectionUpdated$1 as publicOnDataCollectionUpdated, context$2_updateDataCollection as updateDataCollection };
|
|
2539
|
-
}
|
|
3525
|
+
type MaybeContext$1<T extends Descriptors$1> = globalThis.ContextualClient extends {
|
|
3526
|
+
host: Host$1;
|
|
3527
|
+
} ? BuildDescriptors$1<T, globalThis.ContextualClient['host']> : T;
|
|
2540
3528
|
|
|
2541
3529
|
interface DataItem {
|
|
2542
3530
|
/** Data item ID. */
|
|
@@ -3460,6 +4448,8 @@ interface UnresolvedReference {
|
|
|
3460
4448
|
referringItemFieldName?: string;
|
|
3461
4449
|
/** ID of unresolved referenced item */
|
|
3462
4450
|
referencedItemId?: string;
|
|
4451
|
+
/** Flag is set if item exists, but user is not authorized to read it */
|
|
4452
|
+
unauthorized?: boolean;
|
|
3463
4453
|
}
|
|
3464
4454
|
interface ReferencedResult extends ReferencedResultEntityOneOf {
|
|
3465
4455
|
/** Data item referenced. */
|
|
@@ -3768,6 +4758,7 @@ interface UnresolvedReferenceNonNullableFields {
|
|
|
3768
4758
|
referringItemId: string;
|
|
3769
4759
|
referringItemFieldName: string;
|
|
3770
4760
|
referencedItemId: string;
|
|
4761
|
+
unauthorized: boolean;
|
|
3771
4762
|
}
|
|
3772
4763
|
interface ReferencedResultNonNullableFields {
|
|
3773
4764
|
dataItem?: DataItemNonNullableFields;
|
|
@@ -4472,7 +5463,7 @@ interface ReplaceDataItemReferencesOptions {
|
|
|
4472
5463
|
newReferencedItemIds?: string[];
|
|
4473
5464
|
}
|
|
4474
5465
|
|
|
4475
|
-
declare function insertDataItem$1(httpClient: HttpClient): InsertDataItemSignature;
|
|
5466
|
+
declare function insertDataItem$1(httpClient: HttpClient$1): InsertDataItemSignature;
|
|
4476
5467
|
interface InsertDataItemSignature {
|
|
4477
5468
|
/**
|
|
4478
5469
|
* Adds an item to a collection.
|
|
@@ -4490,7 +5481,7 @@ interface InsertDataItemSignature {
|
|
|
4490
5481
|
*/
|
|
4491
5482
|
(options?: InsertDataItemOptions | undefined): Promise<InsertDataItemResponse & InsertDataItemResponseNonNullableFields>;
|
|
4492
5483
|
}
|
|
4493
|
-
declare function updateDataItem$1(httpClient: HttpClient): UpdateDataItemSignature;
|
|
5484
|
+
declare function updateDataItem$1(httpClient: HttpClient$1): UpdateDataItemSignature;
|
|
4494
5485
|
interface UpdateDataItemSignature {
|
|
4495
5486
|
/**
|
|
4496
5487
|
* Updates an item in a collection.
|
|
@@ -4512,7 +5503,7 @@ interface UpdateDataItemSignature {
|
|
|
4512
5503
|
*/
|
|
4513
5504
|
(_id: string, options?: UpdateDataItemOptions | undefined): Promise<UpdateDataItemResponse & UpdateDataItemResponseNonNullableFields>;
|
|
4514
5505
|
}
|
|
4515
|
-
declare function saveDataItem$1(httpClient: HttpClient): SaveDataItemSignature;
|
|
5506
|
+
declare function saveDataItem$1(httpClient: HttpClient$1): SaveDataItemSignature;
|
|
4516
5507
|
interface SaveDataItemSignature {
|
|
4517
5508
|
/**
|
|
4518
5509
|
* Inserts or updates an item in a collection.
|
|
@@ -4532,7 +5523,7 @@ interface SaveDataItemSignature {
|
|
|
4532
5523
|
*/
|
|
4533
5524
|
(options?: SaveDataItemOptions | undefined): Promise<SaveDataItemResponse & SaveDataItemResponseNonNullableFields>;
|
|
4534
5525
|
}
|
|
4535
|
-
declare function getDataItem$1(httpClient: HttpClient): GetDataItemSignature;
|
|
5526
|
+
declare function getDataItem$1(httpClient: HttpClient$1): GetDataItemSignature;
|
|
4536
5527
|
interface GetDataItemSignature {
|
|
4537
5528
|
/**
|
|
4538
5529
|
* Retrieves an item from a collection.
|
|
@@ -4545,7 +5536,7 @@ interface GetDataItemSignature {
|
|
|
4545
5536
|
*/
|
|
4546
5537
|
(dataItemId: string, options?: GetDataItemOptions | undefined): Promise<DataItem & DataItemNonNullableFields>;
|
|
4547
5538
|
}
|
|
4548
|
-
declare function removeDataItem$1(httpClient: HttpClient): RemoveDataItemSignature;
|
|
5539
|
+
declare function removeDataItem$1(httpClient: HttpClient$1): RemoveDataItemSignature;
|
|
4549
5540
|
interface RemoveDataItemSignature {
|
|
4550
5541
|
/**
|
|
4551
5542
|
* Removes an item from a collection.
|
|
@@ -4560,7 +5551,7 @@ interface RemoveDataItemSignature {
|
|
|
4560
5551
|
*/
|
|
4561
5552
|
(dataItemId: string, options?: RemoveDataItemOptions | undefined): Promise<RemoveDataItemResponse & RemoveDataItemResponseNonNullableFields>;
|
|
4562
5553
|
}
|
|
4563
|
-
declare function truncateDataItems$1(httpClient: HttpClient): TruncateDataItemsSignature;
|
|
5554
|
+
declare function truncateDataItems$1(httpClient: HttpClient$1): TruncateDataItemsSignature;
|
|
4564
5555
|
interface TruncateDataItemsSignature {
|
|
4565
5556
|
/**
|
|
4566
5557
|
* Removes all items from a collection.
|
|
@@ -4574,7 +5565,7 @@ interface TruncateDataItemsSignature {
|
|
|
4574
5565
|
*/
|
|
4575
5566
|
(options: TruncateDataItemsOptions): Promise<void>;
|
|
4576
5567
|
}
|
|
4577
|
-
declare function queryDataItems$1(httpClient: HttpClient): QueryDataItemsSignature;
|
|
5568
|
+
declare function queryDataItems$1(httpClient: HttpClient$1): QueryDataItemsSignature;
|
|
4578
5569
|
interface QueryDataItemsSignature {
|
|
4579
5570
|
/**
|
|
4580
5571
|
* Creates a query to retrieve items from a database collection.
|
|
@@ -4602,7 +5593,7 @@ interface QueryDataItemsSignature {
|
|
|
4602
5593
|
*/
|
|
4603
5594
|
(options: QueryDataItemsOptions): DataItemsQueryBuilder;
|
|
4604
5595
|
}
|
|
4605
|
-
declare function aggregateDataItems$1(httpClient: HttpClient): AggregateDataItemsSignature;
|
|
5596
|
+
declare function aggregateDataItems$1(httpClient: HttpClient$1): AggregateDataItemsSignature;
|
|
4606
5597
|
interface AggregateDataItemsSignature {
|
|
4607
5598
|
/**
|
|
4608
5599
|
* Runs an aggregation on a data collection and returns the resulting list of items.
|
|
@@ -4614,7 +5605,7 @@ interface AggregateDataItemsSignature {
|
|
|
4614
5605
|
*/
|
|
4615
5606
|
(options?: AggregateDataItemsOptions | undefined): Promise<AggregateDataItemsResponse>;
|
|
4616
5607
|
}
|
|
4617
|
-
declare function countDataItems$1(httpClient: HttpClient): CountDataItemsSignature;
|
|
5608
|
+
declare function countDataItems$1(httpClient: HttpClient$1): CountDataItemsSignature;
|
|
4618
5609
|
interface CountDataItemsSignature {
|
|
4619
5610
|
/**
|
|
4620
5611
|
* Counts the number of items in a data collection that match the provided filtering preferences.
|
|
@@ -4624,7 +5615,7 @@ interface CountDataItemsSignature {
|
|
|
4624
5615
|
*/
|
|
4625
5616
|
(options?: CountDataItemsOptions | undefined): Promise<CountDataItemsResponse & CountDataItemsResponseNonNullableFields>;
|
|
4626
5617
|
}
|
|
4627
|
-
declare function queryDistinctValues$1(httpClient: HttpClient): QueryDistinctValuesSignature;
|
|
5618
|
+
declare function queryDistinctValues$1(httpClient: HttpClient$1): QueryDistinctValuesSignature;
|
|
4628
5619
|
interface QueryDistinctValuesSignature {
|
|
4629
5620
|
/**
|
|
4630
5621
|
* Retrieves a list of distinct values for a given field in all items that match a query, without duplicates.
|
|
@@ -4642,7 +5633,7 @@ interface QueryDistinctValuesSignature {
|
|
|
4642
5633
|
*/
|
|
4643
5634
|
(options?: QueryDistinctValuesOptions | undefined): Promise<QueryDistinctValuesResponse>;
|
|
4644
5635
|
}
|
|
4645
|
-
declare function bulkInsertDataItems$1(httpClient: HttpClient): BulkInsertDataItemsSignature;
|
|
5636
|
+
declare function bulkInsertDataItems$1(httpClient: HttpClient$1): BulkInsertDataItemsSignature;
|
|
4646
5637
|
interface BulkInsertDataItemsSignature {
|
|
4647
5638
|
/**
|
|
4648
5639
|
* Adds multiple items to a collection.
|
|
@@ -4654,7 +5645,7 @@ interface BulkInsertDataItemsSignature {
|
|
|
4654
5645
|
*/
|
|
4655
5646
|
(options?: BulkInsertDataItemsOptions | undefined): Promise<BulkInsertDataItemsResponse & BulkInsertDataItemsResponseNonNullableFields>;
|
|
4656
5647
|
}
|
|
4657
|
-
declare function bulkUpdateDataItems$1(httpClient: HttpClient): BulkUpdateDataItemsSignature;
|
|
5648
|
+
declare function bulkUpdateDataItems$1(httpClient: HttpClient$1): BulkUpdateDataItemsSignature;
|
|
4658
5649
|
interface BulkUpdateDataItemsSignature {
|
|
4659
5650
|
/**
|
|
4660
5651
|
* Updates multiple items in a collection.
|
|
@@ -4674,7 +5665,7 @@ interface BulkUpdateDataItemsSignature {
|
|
|
4674
5665
|
*/
|
|
4675
5666
|
(options?: BulkUpdateDataItemsOptions | undefined): Promise<BulkUpdateDataItemsResponse & BulkUpdateDataItemsResponseNonNullableFields>;
|
|
4676
5667
|
}
|
|
4677
|
-
declare function bulkSaveDataItems$1(httpClient: HttpClient): BulkSaveDataItemsSignature;
|
|
5668
|
+
declare function bulkSaveDataItems$1(httpClient: HttpClient$1): BulkSaveDataItemsSignature;
|
|
4678
5669
|
interface BulkSaveDataItemsSignature {
|
|
4679
5670
|
/**
|
|
4680
5671
|
* Inserts or updates multiple items in a collection.
|
|
@@ -4694,7 +5685,7 @@ interface BulkSaveDataItemsSignature {
|
|
|
4694
5685
|
*/
|
|
4695
5686
|
(options?: BulkSaveDataItemsOptions | undefined): Promise<BulkSaveDataItemsResponse & BulkSaveDataItemsResponseNonNullableFields>;
|
|
4696
5687
|
}
|
|
4697
|
-
declare function bulkRemoveDataItems$1(httpClient: HttpClient): BulkRemoveDataItemsSignature;
|
|
5688
|
+
declare function bulkRemoveDataItems$1(httpClient: HttpClient$1): BulkRemoveDataItemsSignature;
|
|
4698
5689
|
interface BulkRemoveDataItemsSignature {
|
|
4699
5690
|
/**
|
|
4700
5691
|
* Removes multiple items from a collection.
|
|
@@ -4707,7 +5698,7 @@ interface BulkRemoveDataItemsSignature {
|
|
|
4707
5698
|
*/
|
|
4708
5699
|
(options?: BulkRemoveDataItemsOptions | undefined): Promise<BulkRemoveDataItemsResponse & BulkRemoveDataItemsResponseNonNullableFields>;
|
|
4709
5700
|
}
|
|
4710
|
-
declare function queryReferencedDataItems$1(httpClient: HttpClient): QueryReferencedDataItemsSignature;
|
|
5701
|
+
declare function queryReferencedDataItems$1(httpClient: HttpClient$1): QueryReferencedDataItemsSignature;
|
|
4711
5702
|
interface QueryReferencedDataItemsSignature {
|
|
4712
5703
|
/**
|
|
4713
5704
|
* Retrieves the full items referenced in the specified field of an item.
|
|
@@ -4725,7 +5716,7 @@ interface QueryReferencedDataItemsSignature {
|
|
|
4725
5716
|
*/
|
|
4726
5717
|
(options?: QueryReferencedDataItemsOptions | undefined): Promise<QueryReferencedDataItemsResponse & QueryReferencedDataItemsResponseNonNullableFields>;
|
|
4727
5718
|
}
|
|
4728
|
-
declare function isReferencedDataItem$1(httpClient: HttpClient): IsReferencedDataItemSignature;
|
|
5719
|
+
declare function isReferencedDataItem$1(httpClient: HttpClient$1): IsReferencedDataItemSignature;
|
|
4729
5720
|
interface IsReferencedDataItemSignature {
|
|
4730
5721
|
/**
|
|
4731
5722
|
* Checks whether a field in a referring item contains a reference to a specified item.
|
|
@@ -4735,7 +5726,7 @@ interface IsReferencedDataItemSignature {
|
|
|
4735
5726
|
*/
|
|
4736
5727
|
(options?: IsReferencedDataItemOptions | undefined): Promise<IsReferencedDataItemResponse & IsReferencedDataItemResponseNonNullableFields>;
|
|
4737
5728
|
}
|
|
4738
|
-
declare function insertDataItemReference$1(httpClient: HttpClient): InsertDataItemReferenceSignature;
|
|
5729
|
+
declare function insertDataItemReference$1(httpClient: HttpClient$1): InsertDataItemReferenceSignature;
|
|
4739
5730
|
interface InsertDataItemReferenceSignature {
|
|
4740
5731
|
/**
|
|
4741
5732
|
* Inserts a reference in the specified field in an item in a collection.
|
|
@@ -4746,7 +5737,7 @@ interface InsertDataItemReferenceSignature {
|
|
|
4746
5737
|
*/
|
|
4747
5738
|
(options?: InsertDataItemReferenceOptions | undefined): Promise<InsertDataItemReferenceResponse & InsertDataItemReferenceResponseNonNullableFields>;
|
|
4748
5739
|
}
|
|
4749
|
-
declare function removeDataItemReference$1(httpClient: HttpClient): RemoveDataItemReferenceSignature;
|
|
5740
|
+
declare function removeDataItemReference$1(httpClient: HttpClient$1): RemoveDataItemReferenceSignature;
|
|
4750
5741
|
interface RemoveDataItemReferenceSignature {
|
|
4751
5742
|
/**
|
|
4752
5743
|
* Removes the specified reference from the specified field.
|
|
@@ -4754,44 +5745,340 @@ interface RemoveDataItemReferenceSignature {
|
|
|
4754
5745
|
*/
|
|
4755
5746
|
(options: RemoveDataItemReferenceOptions): Promise<RemoveDataItemReferenceResponse & RemoveDataItemReferenceResponseNonNullableFields>;
|
|
4756
5747
|
}
|
|
4757
|
-
declare function bulkInsertDataItemReferences$1(httpClient: HttpClient): BulkInsertDataItemReferencesSignature;
|
|
4758
|
-
interface BulkInsertDataItemReferencesSignature {
|
|
5748
|
+
declare function bulkInsertDataItemReferences$1(httpClient: HttpClient$1): BulkInsertDataItemReferencesSignature;
|
|
5749
|
+
interface BulkInsertDataItemReferencesSignature {
|
|
5750
|
+
/**
|
|
5751
|
+
* Inserts one or more references in the specified fields of items in a collection.
|
|
5752
|
+
*
|
|
5753
|
+
*
|
|
5754
|
+
* This endpoint adds one or more references to a collection.
|
|
5755
|
+
* Each new reference in `options.dataItemReferences` specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item.
|
|
5756
|
+
* @param - Options for inserting one or more references.
|
|
5757
|
+
*/
|
|
5758
|
+
(options?: BulkInsertDataItemReferencesOptions | undefined): Promise<BulkInsertDataItemReferencesResponse & BulkInsertDataItemReferencesResponseNonNullableFields>;
|
|
5759
|
+
}
|
|
5760
|
+
declare function bulkRemoveDataItemReferences$1(httpClient: HttpClient$1): BulkRemoveDataItemReferencesSignature;
|
|
5761
|
+
interface BulkRemoveDataItemReferencesSignature {
|
|
5762
|
+
/**
|
|
5763
|
+
* Removes one or more references.
|
|
5764
|
+
* @param - Options for removing one or more references.
|
|
5765
|
+
*/
|
|
5766
|
+
(options: BulkRemoveDataItemReferencesOptions): Promise<BulkRemoveDataItemReferencesResponse & BulkRemoveDataItemReferencesResponseNonNullableFields>;
|
|
5767
|
+
}
|
|
5768
|
+
declare function replaceDataItemReferences$1(httpClient: HttpClient$1): ReplaceDataItemReferencesSignature;
|
|
5769
|
+
interface ReplaceDataItemReferencesSignature {
|
|
5770
|
+
/**
|
|
5771
|
+
* Replaces references in a specified field of a specified data item.
|
|
5772
|
+
*
|
|
5773
|
+
*
|
|
5774
|
+
* This function replaces the existing reference or references contained in the field specified in `options.referringItemFieldName` within the data item specified in `options.referringItemId`.
|
|
5775
|
+
* The function removes existing references and in their place it adds references to the items specified in `options.newReferencedItemIds`.
|
|
5776
|
+
*
|
|
5777
|
+
* > **Note:** If you pass an empty array in `options.newReferencedItemIds`, all existing references are removed.
|
|
5778
|
+
* @param - Options for replacing references.
|
|
5779
|
+
*/
|
|
5780
|
+
(options?: ReplaceDataItemReferencesOptions | undefined): Promise<ReplaceDataItemReferencesResponse & ReplaceDataItemReferencesResponseNonNullableFields>;
|
|
5781
|
+
}
|
|
5782
|
+
declare const onDataItemCreated$1: EventDefinition$1<DataItemCreatedEnvelope, "wix.data.v2.data_item_created">;
|
|
5783
|
+
declare const onDataItemUpdated$1: EventDefinition$1<DataItemUpdatedEnvelope, "wix.data.v2.data_item_updated">;
|
|
5784
|
+
declare const onDataItemDeleted$1: EventDefinition$1<DataItemDeletedEnvelope, "wix.data.v2.data_item_deleted">;
|
|
5785
|
+
|
|
5786
|
+
declare function createEventModule<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
|
|
5787
|
+
|
|
5788
|
+
declare const insertDataItem: MaybeContext$1<BuildRESTFunction$1<typeof insertDataItem$1> & typeof insertDataItem$1>;
|
|
5789
|
+
declare const updateDataItem: MaybeContext$1<BuildRESTFunction$1<typeof updateDataItem$1> & typeof updateDataItem$1>;
|
|
5790
|
+
declare const saveDataItem: MaybeContext$1<BuildRESTFunction$1<typeof saveDataItem$1> & typeof saveDataItem$1>;
|
|
5791
|
+
declare const getDataItem: MaybeContext$1<BuildRESTFunction$1<typeof getDataItem$1> & typeof getDataItem$1>;
|
|
5792
|
+
declare const removeDataItem: MaybeContext$1<BuildRESTFunction$1<typeof removeDataItem$1> & typeof removeDataItem$1>;
|
|
5793
|
+
declare const truncateDataItems: MaybeContext$1<BuildRESTFunction$1<typeof truncateDataItems$1> & typeof truncateDataItems$1>;
|
|
5794
|
+
declare const queryDataItems: MaybeContext$1<BuildRESTFunction$1<typeof queryDataItems$1> & typeof queryDataItems$1>;
|
|
5795
|
+
declare const aggregateDataItems: MaybeContext$1<BuildRESTFunction$1<typeof aggregateDataItems$1> & typeof aggregateDataItems$1>;
|
|
5796
|
+
declare const countDataItems: MaybeContext$1<BuildRESTFunction$1<typeof countDataItems$1> & typeof countDataItems$1>;
|
|
5797
|
+
declare const queryDistinctValues: MaybeContext$1<BuildRESTFunction$1<typeof queryDistinctValues$1> & typeof queryDistinctValues$1>;
|
|
5798
|
+
declare const bulkInsertDataItems: MaybeContext$1<BuildRESTFunction$1<typeof bulkInsertDataItems$1> & typeof bulkInsertDataItems$1>;
|
|
5799
|
+
declare const bulkUpdateDataItems: MaybeContext$1<BuildRESTFunction$1<typeof bulkUpdateDataItems$1> & typeof bulkUpdateDataItems$1>;
|
|
5800
|
+
declare const bulkSaveDataItems: MaybeContext$1<BuildRESTFunction$1<typeof bulkSaveDataItems$1> & typeof bulkSaveDataItems$1>;
|
|
5801
|
+
declare const bulkRemoveDataItems: MaybeContext$1<BuildRESTFunction$1<typeof bulkRemoveDataItems$1> & typeof bulkRemoveDataItems$1>;
|
|
5802
|
+
declare const queryReferencedDataItems: MaybeContext$1<BuildRESTFunction$1<typeof queryReferencedDataItems$1> & typeof queryReferencedDataItems$1>;
|
|
5803
|
+
declare const isReferencedDataItem: MaybeContext$1<BuildRESTFunction$1<typeof isReferencedDataItem$1> & typeof isReferencedDataItem$1>;
|
|
5804
|
+
declare const insertDataItemReference: MaybeContext$1<BuildRESTFunction$1<typeof insertDataItemReference$1> & typeof insertDataItemReference$1>;
|
|
5805
|
+
declare const removeDataItemReference: MaybeContext$1<BuildRESTFunction$1<typeof removeDataItemReference$1> & typeof removeDataItemReference$1>;
|
|
5806
|
+
declare const bulkInsertDataItemReferences: MaybeContext$1<BuildRESTFunction$1<typeof bulkInsertDataItemReferences$1> & typeof bulkInsertDataItemReferences$1>;
|
|
5807
|
+
declare const bulkRemoveDataItemReferences: MaybeContext$1<BuildRESTFunction$1<typeof bulkRemoveDataItemReferences$1> & typeof bulkRemoveDataItemReferences$1>;
|
|
5808
|
+
declare const replaceDataItemReferences: MaybeContext$1<BuildRESTFunction$1<typeof replaceDataItemReferences$1> & typeof replaceDataItemReferences$1>;
|
|
5809
|
+
|
|
5810
|
+
type _publicOnDataItemCreatedType = typeof onDataItemCreated$1;
|
|
5811
|
+
/**
|
|
5812
|
+
* Triggered when a data item is inserted.
|
|
5813
|
+
*/
|
|
5814
|
+
declare const onDataItemCreated: ReturnType<typeof createEventModule<_publicOnDataItemCreatedType>>;
|
|
5815
|
+
|
|
5816
|
+
type _publicOnDataItemUpdatedType = typeof onDataItemUpdated$1;
|
|
5817
|
+
/**
|
|
5818
|
+
* Triggered when a data item is updated.
|
|
5819
|
+
*
|
|
5820
|
+
* **Note**: When [scheduling an item's visibility change](https://support.wix.com/en/article/cms-controlling-live-site-item-visibility-from-your-collection#scheduling-changes-to-item-visibility), the event is triggered when the scheduled change is set up, not when it goes into effect.
|
|
5821
|
+
*/
|
|
5822
|
+
declare const onDataItemUpdated: ReturnType<typeof createEventModule<_publicOnDataItemUpdatedType>>;
|
|
5823
|
+
|
|
5824
|
+
type _publicOnDataItemDeletedType = typeof onDataItemDeleted$1;
|
|
5825
|
+
/**
|
|
5826
|
+
* Triggered when a data item is deleted.
|
|
5827
|
+
*/
|
|
5828
|
+
declare const onDataItemDeleted: ReturnType<typeof createEventModule<_publicOnDataItemDeletedType>>;
|
|
5829
|
+
|
|
5830
|
+
type context$1_ACTION = ACTION;
|
|
5831
|
+
declare const context$1_ACTION: typeof ACTION;
|
|
5832
|
+
type context$1_Action = Action;
|
|
5833
|
+
declare const context$1_Action: typeof Action;
|
|
5834
|
+
type context$1_ActionEvent = ActionEvent;
|
|
5835
|
+
type context$1_AggregateDataItemsOptions = AggregateDataItemsOptions;
|
|
5836
|
+
type context$1_AggregateDataItemsRequest = AggregateDataItemsRequest;
|
|
5837
|
+
type context$1_AggregateDataItemsRequestPagingMethodOneOf = AggregateDataItemsRequestPagingMethodOneOf;
|
|
5838
|
+
type context$1_AggregateDataItemsResponse = AggregateDataItemsResponse;
|
|
5839
|
+
type context$1_Aggregation = Aggregation;
|
|
5840
|
+
type context$1_AppendToArray = AppendToArray;
|
|
5841
|
+
type context$1_ApplicationError = ApplicationError;
|
|
5842
|
+
type context$1_Average = Average;
|
|
5843
|
+
type context$1_BaseEventMetadata = BaseEventMetadata;
|
|
5844
|
+
type context$1_BulkActionMetadata = BulkActionMetadata;
|
|
5845
|
+
type context$1_BulkActionType = BulkActionType;
|
|
5846
|
+
declare const context$1_BulkActionType: typeof BulkActionType;
|
|
5847
|
+
type context$1_BulkDataItemReferenceResult = BulkDataItemReferenceResult;
|
|
5848
|
+
type context$1_BulkDataItemResult = BulkDataItemResult;
|
|
5849
|
+
type context$1_BulkInsertDataItemReferencesOptions = BulkInsertDataItemReferencesOptions;
|
|
5850
|
+
type context$1_BulkInsertDataItemReferencesRequest = BulkInsertDataItemReferencesRequest;
|
|
5851
|
+
type context$1_BulkInsertDataItemReferencesResponse = BulkInsertDataItemReferencesResponse;
|
|
5852
|
+
type context$1_BulkInsertDataItemReferencesResponseNonNullableFields = BulkInsertDataItemReferencesResponseNonNullableFields;
|
|
5853
|
+
type context$1_BulkInsertDataItemsOptions = BulkInsertDataItemsOptions;
|
|
5854
|
+
type context$1_BulkInsertDataItemsRequest = BulkInsertDataItemsRequest;
|
|
5855
|
+
type context$1_BulkInsertDataItemsResponse = BulkInsertDataItemsResponse;
|
|
5856
|
+
type context$1_BulkInsertDataItemsResponseNonNullableFields = BulkInsertDataItemsResponseNonNullableFields;
|
|
5857
|
+
type context$1_BulkPatchDataItemsRequest = BulkPatchDataItemsRequest;
|
|
5858
|
+
type context$1_BulkPatchDataItemsResponse = BulkPatchDataItemsResponse;
|
|
5859
|
+
type context$1_BulkRemoveDataItemReferencesOptions = BulkRemoveDataItemReferencesOptions;
|
|
5860
|
+
type context$1_BulkRemoveDataItemReferencesRequest = BulkRemoveDataItemReferencesRequest;
|
|
5861
|
+
type context$1_BulkRemoveDataItemReferencesResponse = BulkRemoveDataItemReferencesResponse;
|
|
5862
|
+
type context$1_BulkRemoveDataItemReferencesResponseNonNullableFields = BulkRemoveDataItemReferencesResponseNonNullableFields;
|
|
5863
|
+
type context$1_BulkRemoveDataItemsOptions = BulkRemoveDataItemsOptions;
|
|
5864
|
+
type context$1_BulkRemoveDataItemsRequest = BulkRemoveDataItemsRequest;
|
|
5865
|
+
type context$1_BulkRemoveDataItemsResponse = BulkRemoveDataItemsResponse;
|
|
5866
|
+
type context$1_BulkRemoveDataItemsResponseNonNullableFields = BulkRemoveDataItemsResponseNonNullableFields;
|
|
5867
|
+
type context$1_BulkSaveDataItemsOptions = BulkSaveDataItemsOptions;
|
|
5868
|
+
type context$1_BulkSaveDataItemsRequest = BulkSaveDataItemsRequest;
|
|
5869
|
+
type context$1_BulkSaveDataItemsResponse = BulkSaveDataItemsResponse;
|
|
5870
|
+
type context$1_BulkSaveDataItemsResponseNonNullableFields = BulkSaveDataItemsResponseNonNullableFields;
|
|
5871
|
+
type context$1_BulkUpdateDataItemsOptions = BulkUpdateDataItemsOptions;
|
|
5872
|
+
type context$1_BulkUpdateDataItemsRequest = BulkUpdateDataItemsRequest;
|
|
5873
|
+
type context$1_BulkUpdateDataItemsResponse = BulkUpdateDataItemsResponse;
|
|
5874
|
+
type context$1_BulkUpdateDataItemsResponseNonNullableFields = BulkUpdateDataItemsResponseNonNullableFields;
|
|
5875
|
+
type context$1_CachingInfo = CachingInfo;
|
|
5876
|
+
type context$1_Count = Count;
|
|
5877
|
+
type context$1_CountDataItemsOptions = CountDataItemsOptions;
|
|
5878
|
+
type context$1_CountDataItemsRequest = CountDataItemsRequest;
|
|
5879
|
+
type context$1_CountDataItemsResponse = CountDataItemsResponse;
|
|
5880
|
+
type context$1_CountDataItemsResponseNonNullableFields = CountDataItemsResponseNonNullableFields;
|
|
5881
|
+
type context$1_CursorPaging = CursorPaging;
|
|
5882
|
+
type context$1_Cursors = Cursors;
|
|
5883
|
+
type context$1_DataItem = DataItem;
|
|
5884
|
+
type context$1_DataItemCreatedEnvelope = DataItemCreatedEnvelope;
|
|
5885
|
+
type context$1_DataItemDeletedEnvelope = DataItemDeletedEnvelope;
|
|
5886
|
+
type context$1_DataItemNonNullableFields = DataItemNonNullableFields;
|
|
5887
|
+
type context$1_DataItemReference = DataItemReference;
|
|
5888
|
+
type context$1_DataItemUpdatedEnvelope = DataItemUpdatedEnvelope;
|
|
5889
|
+
type context$1_DataItemsQueryBuilder = DataItemsQueryBuilder;
|
|
5890
|
+
type context$1_DataItemsQueryResult = DataItemsQueryResult;
|
|
5891
|
+
type context$1_DataPublishPluginOptions = DataPublishPluginOptions;
|
|
5892
|
+
type context$1_DomainEvent = DomainEvent;
|
|
5893
|
+
type context$1_DomainEventBodyOneOf = DomainEventBodyOneOf;
|
|
5894
|
+
type context$1_EntityCreatedEvent = EntityCreatedEvent;
|
|
5895
|
+
type context$1_EntityDeletedEvent = EntityDeletedEvent;
|
|
5896
|
+
type context$1_EntityUpdatedEvent = EntityUpdatedEvent;
|
|
5897
|
+
type context$1_EventMetadata = EventMetadata;
|
|
5898
|
+
type context$1_FieldUpdate = FieldUpdate;
|
|
5899
|
+
type context$1_FieldUpdateActionOptionsOneOf = FieldUpdateActionOptionsOneOf;
|
|
5900
|
+
type context$1_GetDataItemOptions = GetDataItemOptions;
|
|
5901
|
+
type context$1_GetDataItemRequest = GetDataItemRequest;
|
|
5902
|
+
type context$1_GetDataItemResponse = GetDataItemResponse;
|
|
5903
|
+
type context$1_GetDataItemResponseNonNullableFields = GetDataItemResponseNonNullableFields;
|
|
5904
|
+
type context$1_IdentificationData = IdentificationData;
|
|
5905
|
+
type context$1_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
|
|
5906
|
+
type context$1_IncrementField = IncrementField;
|
|
5907
|
+
type context$1_InsertDataItemOptions = InsertDataItemOptions;
|
|
5908
|
+
type context$1_InsertDataItemReferenceOptions = InsertDataItemReferenceOptions;
|
|
5909
|
+
type context$1_InsertDataItemReferenceRequest = InsertDataItemReferenceRequest;
|
|
5910
|
+
type context$1_InsertDataItemReferenceResponse = InsertDataItemReferenceResponse;
|
|
5911
|
+
type context$1_InsertDataItemReferenceResponseNonNullableFields = InsertDataItemReferenceResponseNonNullableFields;
|
|
5912
|
+
type context$1_InsertDataItemRequest = InsertDataItemRequest;
|
|
5913
|
+
type context$1_InsertDataItemResponse = InsertDataItemResponse;
|
|
5914
|
+
type context$1_InsertDataItemResponseNonNullableFields = InsertDataItemResponseNonNullableFields;
|
|
5915
|
+
type context$1_IsReferencedDataItemOptions = IsReferencedDataItemOptions;
|
|
5916
|
+
type context$1_IsReferencedDataItemRequest = IsReferencedDataItemRequest;
|
|
5917
|
+
type context$1_IsReferencedDataItemResponse = IsReferencedDataItemResponse;
|
|
5918
|
+
type context$1_IsReferencedDataItemResponseNonNullableFields = IsReferencedDataItemResponseNonNullableFields;
|
|
5919
|
+
type context$1_ItemMetadata = ItemMetadata;
|
|
5920
|
+
type context$1_Max = Max;
|
|
5921
|
+
type context$1_MessageEnvelope = MessageEnvelope;
|
|
5922
|
+
type context$1_Min = Min;
|
|
5923
|
+
type context$1_Operation = Operation;
|
|
5924
|
+
type context$1_OperationCalculateOneOf = OperationCalculateOneOf;
|
|
5925
|
+
type context$1_Options = Options;
|
|
5926
|
+
type context$1_PagingMetadataV2 = PagingMetadataV2;
|
|
5927
|
+
type context$1_PatchDataItemRequest = PatchDataItemRequest;
|
|
5928
|
+
type context$1_PatchDataItemResponse = PatchDataItemResponse;
|
|
5929
|
+
type context$1_PatchSet = PatchSet;
|
|
5930
|
+
type context$1_PublishPluginOptions = PublishPluginOptions;
|
|
5931
|
+
type context$1_QueryDataItemsOptions = QueryDataItemsOptions;
|
|
5932
|
+
type context$1_QueryDataItemsRequest = QueryDataItemsRequest;
|
|
5933
|
+
type context$1_QueryDataItemsResponse = QueryDataItemsResponse;
|
|
5934
|
+
type context$1_QueryDataItemsResponseNonNullableFields = QueryDataItemsResponseNonNullableFields;
|
|
5935
|
+
type context$1_QueryDistinctValuesOptions = QueryDistinctValuesOptions;
|
|
5936
|
+
type context$1_QueryDistinctValuesRequest = QueryDistinctValuesRequest;
|
|
5937
|
+
type context$1_QueryDistinctValuesRequestPagingMethodOneOf = QueryDistinctValuesRequestPagingMethodOneOf;
|
|
5938
|
+
type context$1_QueryDistinctValuesResponse = QueryDistinctValuesResponse;
|
|
5939
|
+
type context$1_QueryReferencedDataItemsOptions = QueryReferencedDataItemsOptions;
|
|
5940
|
+
type context$1_QueryReferencedDataItemsRequest = QueryReferencedDataItemsRequest;
|
|
5941
|
+
type context$1_QueryReferencedDataItemsRequestPagingMethodOneOf = QueryReferencedDataItemsRequestPagingMethodOneOf;
|
|
5942
|
+
type context$1_QueryReferencedDataItemsResponse = QueryReferencedDataItemsResponse;
|
|
5943
|
+
type context$1_QueryReferencedDataItemsResponseNonNullableFields = QueryReferencedDataItemsResponseNonNullableFields;
|
|
5944
|
+
type context$1_QueryV2 = QueryV2;
|
|
5945
|
+
type context$1_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf;
|
|
5946
|
+
type context$1_ReferencedItemOptions = ReferencedItemOptions;
|
|
5947
|
+
type context$1_ReferencedResult = ReferencedResult;
|
|
5948
|
+
type context$1_ReferencedResultEntityOneOf = ReferencedResultEntityOneOf;
|
|
5949
|
+
type context$1_RemoveDataItemOptions = RemoveDataItemOptions;
|
|
5950
|
+
type context$1_RemoveDataItemReferenceOptions = RemoveDataItemReferenceOptions;
|
|
5951
|
+
type context$1_RemoveDataItemReferenceRequest = RemoveDataItemReferenceRequest;
|
|
5952
|
+
type context$1_RemoveDataItemReferenceResponse = RemoveDataItemReferenceResponse;
|
|
5953
|
+
type context$1_RemoveDataItemReferenceResponseNonNullableFields = RemoveDataItemReferenceResponseNonNullableFields;
|
|
5954
|
+
type context$1_RemoveDataItemRequest = RemoveDataItemRequest;
|
|
5955
|
+
type context$1_RemoveDataItemResponse = RemoveDataItemResponse;
|
|
5956
|
+
type context$1_RemoveDataItemResponseNonNullableFields = RemoveDataItemResponseNonNullableFields;
|
|
5957
|
+
type context$1_RemoveFromArray = RemoveFromArray;
|
|
5958
|
+
type context$1_ReplaceDataItemReferencesOptions = ReplaceDataItemReferencesOptions;
|
|
5959
|
+
type context$1_ReplaceDataItemReferencesRequest = ReplaceDataItemReferencesRequest;
|
|
5960
|
+
type context$1_ReplaceDataItemReferencesResponse = ReplaceDataItemReferencesResponse;
|
|
5961
|
+
type context$1_ReplaceDataItemReferencesResponseNonNullableFields = ReplaceDataItemReferencesResponseNonNullableFields;
|
|
5962
|
+
type context$1_RestoreInfo = RestoreInfo;
|
|
5963
|
+
type context$1_SaveDataItemOptions = SaveDataItemOptions;
|
|
5964
|
+
type context$1_SaveDataItemRequest = SaveDataItemRequest;
|
|
5965
|
+
type context$1_SaveDataItemResponse = SaveDataItemResponse;
|
|
5966
|
+
type context$1_SaveDataItemResponseNonNullableFields = SaveDataItemResponseNonNullableFields;
|
|
5967
|
+
type context$1_SetField = SetField;
|
|
5968
|
+
type context$1_SortOrder = SortOrder;
|
|
5969
|
+
declare const context$1_SortOrder: typeof SortOrder;
|
|
5970
|
+
type context$1_Sorting = Sorting;
|
|
5971
|
+
type context$1_Sum = Sum;
|
|
5972
|
+
type context$1_TruncateDataItemsOptions = TruncateDataItemsOptions;
|
|
5973
|
+
type context$1_TruncateDataItemsRequest = TruncateDataItemsRequest;
|
|
5974
|
+
type context$1_TruncateDataItemsResponse = TruncateDataItemsResponse;
|
|
5975
|
+
type context$1_UnresolvedReference = UnresolvedReference;
|
|
5976
|
+
type context$1_UpdateDataItemOptions = UpdateDataItemOptions;
|
|
5977
|
+
type context$1_UpdateDataItemRequest = UpdateDataItemRequest;
|
|
5978
|
+
type context$1_UpdateDataItemResponse = UpdateDataItemResponse;
|
|
5979
|
+
type context$1_UpdateDataItemResponseNonNullableFields = UpdateDataItemResponseNonNullableFields;
|
|
5980
|
+
type context$1_WebhookIdentityType = WebhookIdentityType;
|
|
5981
|
+
declare const context$1_WebhookIdentityType: typeof WebhookIdentityType;
|
|
5982
|
+
type context$1__publicOnDataItemCreatedType = _publicOnDataItemCreatedType;
|
|
5983
|
+
type context$1__publicOnDataItemDeletedType = _publicOnDataItemDeletedType;
|
|
5984
|
+
type context$1__publicOnDataItemUpdatedType = _publicOnDataItemUpdatedType;
|
|
5985
|
+
declare const context$1_aggregateDataItems: typeof aggregateDataItems;
|
|
5986
|
+
declare const context$1_bulkInsertDataItemReferences: typeof bulkInsertDataItemReferences;
|
|
5987
|
+
declare const context$1_bulkInsertDataItems: typeof bulkInsertDataItems;
|
|
5988
|
+
declare const context$1_bulkRemoveDataItemReferences: typeof bulkRemoveDataItemReferences;
|
|
5989
|
+
declare const context$1_bulkRemoveDataItems: typeof bulkRemoveDataItems;
|
|
5990
|
+
declare const context$1_bulkSaveDataItems: typeof bulkSaveDataItems;
|
|
5991
|
+
declare const context$1_bulkUpdateDataItems: typeof bulkUpdateDataItems;
|
|
5992
|
+
declare const context$1_countDataItems: typeof countDataItems;
|
|
5993
|
+
declare const context$1_getDataItem: typeof getDataItem;
|
|
5994
|
+
declare const context$1_insertDataItem: typeof insertDataItem;
|
|
5995
|
+
declare const context$1_insertDataItemReference: typeof insertDataItemReference;
|
|
5996
|
+
declare const context$1_isReferencedDataItem: typeof isReferencedDataItem;
|
|
5997
|
+
declare const context$1_onDataItemCreated: typeof onDataItemCreated;
|
|
5998
|
+
declare const context$1_onDataItemDeleted: typeof onDataItemDeleted;
|
|
5999
|
+
declare const context$1_onDataItemUpdated: typeof onDataItemUpdated;
|
|
6000
|
+
declare const context$1_queryDataItems: typeof queryDataItems;
|
|
6001
|
+
declare const context$1_queryDistinctValues: typeof queryDistinctValues;
|
|
6002
|
+
declare const context$1_queryReferencedDataItems: typeof queryReferencedDataItems;
|
|
6003
|
+
declare const context$1_removeDataItem: typeof removeDataItem;
|
|
6004
|
+
declare const context$1_removeDataItemReference: typeof removeDataItemReference;
|
|
6005
|
+
declare const context$1_replaceDataItemReferences: typeof replaceDataItemReferences;
|
|
6006
|
+
declare const context$1_saveDataItem: typeof saveDataItem;
|
|
6007
|
+
declare const context$1_truncateDataItems: typeof truncateDataItems;
|
|
6008
|
+
declare const context$1_updateDataItem: typeof updateDataItem;
|
|
6009
|
+
declare namespace context$1 {
|
|
6010
|
+
export { context$1_ACTION as ACTION, context$1_Action as Action, type context$1_ActionEvent as ActionEvent, type context$1_AggregateDataItemsOptions as AggregateDataItemsOptions, type context$1_AggregateDataItemsRequest as AggregateDataItemsRequest, type context$1_AggregateDataItemsRequestPagingMethodOneOf as AggregateDataItemsRequestPagingMethodOneOf, type context$1_AggregateDataItemsResponse as AggregateDataItemsResponse, type context$1_Aggregation as Aggregation, type context$1_AppendToArray as AppendToArray, type context$1_ApplicationError as ApplicationError, type context$1_Average as Average, type context$1_BaseEventMetadata as BaseEventMetadata, type context$1_BulkActionMetadata as BulkActionMetadata, context$1_BulkActionType as BulkActionType, type context$1_BulkDataItemReferenceResult as BulkDataItemReferenceResult, type context$1_BulkDataItemResult as BulkDataItemResult, type context$1_BulkInsertDataItemReferencesOptions as BulkInsertDataItemReferencesOptions, type context$1_BulkInsertDataItemReferencesRequest as BulkInsertDataItemReferencesRequest, type context$1_BulkInsertDataItemReferencesResponse as BulkInsertDataItemReferencesResponse, type context$1_BulkInsertDataItemReferencesResponseNonNullableFields as BulkInsertDataItemReferencesResponseNonNullableFields, type context$1_BulkInsertDataItemsOptions as BulkInsertDataItemsOptions, type context$1_BulkInsertDataItemsRequest as BulkInsertDataItemsRequest, type context$1_BulkInsertDataItemsResponse as BulkInsertDataItemsResponse, type context$1_BulkInsertDataItemsResponseNonNullableFields as BulkInsertDataItemsResponseNonNullableFields, type context$1_BulkPatchDataItemsRequest as BulkPatchDataItemsRequest, type context$1_BulkPatchDataItemsResponse as BulkPatchDataItemsResponse, type context$1_BulkRemoveDataItemReferencesOptions as BulkRemoveDataItemReferencesOptions, type context$1_BulkRemoveDataItemReferencesRequest as BulkRemoveDataItemReferencesRequest, type context$1_BulkRemoveDataItemReferencesResponse as BulkRemoveDataItemReferencesResponse, type context$1_BulkRemoveDataItemReferencesResponseNonNullableFields as BulkRemoveDataItemReferencesResponseNonNullableFields, type context$1_BulkRemoveDataItemsOptions as BulkRemoveDataItemsOptions, type context$1_BulkRemoveDataItemsRequest as BulkRemoveDataItemsRequest, type context$1_BulkRemoveDataItemsResponse as BulkRemoveDataItemsResponse, type context$1_BulkRemoveDataItemsResponseNonNullableFields as BulkRemoveDataItemsResponseNonNullableFields, type context$1_BulkSaveDataItemsOptions as BulkSaveDataItemsOptions, type context$1_BulkSaveDataItemsRequest as BulkSaveDataItemsRequest, type context$1_BulkSaveDataItemsResponse as BulkSaveDataItemsResponse, type context$1_BulkSaveDataItemsResponseNonNullableFields as BulkSaveDataItemsResponseNonNullableFields, type context$1_BulkUpdateDataItemsOptions as BulkUpdateDataItemsOptions, type context$1_BulkUpdateDataItemsRequest as BulkUpdateDataItemsRequest, type context$1_BulkUpdateDataItemsResponse as BulkUpdateDataItemsResponse, type context$1_BulkUpdateDataItemsResponseNonNullableFields as BulkUpdateDataItemsResponseNonNullableFields, type context$1_CachingInfo as CachingInfo, type context$1_Count as Count, type context$1_CountDataItemsOptions as CountDataItemsOptions, type context$1_CountDataItemsRequest as CountDataItemsRequest, type context$1_CountDataItemsResponse as CountDataItemsResponse, type context$1_CountDataItemsResponseNonNullableFields as CountDataItemsResponseNonNullableFields, type context$1_CursorPaging as CursorPaging, type context$1_Cursors as Cursors, type context$1_DataItem as DataItem, type context$1_DataItemCreatedEnvelope as DataItemCreatedEnvelope, type context$1_DataItemDeletedEnvelope as DataItemDeletedEnvelope, type context$1_DataItemNonNullableFields as DataItemNonNullableFields, type context$1_DataItemReference as DataItemReference, type context$1_DataItemUpdatedEnvelope as DataItemUpdatedEnvelope, type context$1_DataItemsQueryBuilder as DataItemsQueryBuilder, type context$1_DataItemsQueryResult as DataItemsQueryResult, type context$1_DataPublishPluginOptions as DataPublishPluginOptions, type context$1_DomainEvent as DomainEvent, type context$1_DomainEventBodyOneOf as DomainEventBodyOneOf, type context$1_EntityCreatedEvent as EntityCreatedEvent, type context$1_EntityDeletedEvent as EntityDeletedEvent, type context$1_EntityUpdatedEvent as EntityUpdatedEvent, Environment$1 as Environment, type context$1_EventMetadata as EventMetadata, type context$1_FieldUpdate as FieldUpdate, type context$1_FieldUpdateActionOptionsOneOf as FieldUpdateActionOptionsOneOf, type context$1_GetDataItemOptions as GetDataItemOptions, type context$1_GetDataItemRequest as GetDataItemRequest, type context$1_GetDataItemResponse as GetDataItemResponse, type context$1_GetDataItemResponseNonNullableFields as GetDataItemResponseNonNullableFields, type context$1_IdentificationData as IdentificationData, type context$1_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type context$1_IncrementField as IncrementField, type context$1_InsertDataItemOptions as InsertDataItemOptions, type context$1_InsertDataItemReferenceOptions as InsertDataItemReferenceOptions, type context$1_InsertDataItemReferenceRequest as InsertDataItemReferenceRequest, type context$1_InsertDataItemReferenceResponse as InsertDataItemReferenceResponse, type context$1_InsertDataItemReferenceResponseNonNullableFields as InsertDataItemReferenceResponseNonNullableFields, type context$1_InsertDataItemRequest as InsertDataItemRequest, type context$1_InsertDataItemResponse as InsertDataItemResponse, type context$1_InsertDataItemResponseNonNullableFields as InsertDataItemResponseNonNullableFields, type context$1_IsReferencedDataItemOptions as IsReferencedDataItemOptions, type context$1_IsReferencedDataItemRequest as IsReferencedDataItemRequest, type context$1_IsReferencedDataItemResponse as IsReferencedDataItemResponse, type context$1_IsReferencedDataItemResponseNonNullableFields as IsReferencedDataItemResponseNonNullableFields, type context$1_ItemMetadata as ItemMetadata, type context$1_Max as Max, type context$1_MessageEnvelope as MessageEnvelope, type context$1_Min as Min, type context$1_Operation as Operation, type context$1_OperationCalculateOneOf as OperationCalculateOneOf, type context$1_Options as Options, type Paging$1 as Paging, type context$1_PagingMetadataV2 as PagingMetadataV2, type context$1_PatchDataItemRequest as PatchDataItemRequest, type context$1_PatchDataItemResponse as PatchDataItemResponse, type context$1_PatchSet as PatchSet, type context$1_PublishPluginOptions as PublishPluginOptions, type context$1_QueryDataItemsOptions as QueryDataItemsOptions, type context$1_QueryDataItemsRequest as QueryDataItemsRequest, type context$1_QueryDataItemsResponse as QueryDataItemsResponse, type context$1_QueryDataItemsResponseNonNullableFields as QueryDataItemsResponseNonNullableFields, type context$1_QueryDistinctValuesOptions as QueryDistinctValuesOptions, type context$1_QueryDistinctValuesRequest as QueryDistinctValuesRequest, type context$1_QueryDistinctValuesRequestPagingMethodOneOf as QueryDistinctValuesRequestPagingMethodOneOf, type context$1_QueryDistinctValuesResponse as QueryDistinctValuesResponse, type context$1_QueryReferencedDataItemsOptions as QueryReferencedDataItemsOptions, type context$1_QueryReferencedDataItemsRequest as QueryReferencedDataItemsRequest, type context$1_QueryReferencedDataItemsRequestPagingMethodOneOf as QueryReferencedDataItemsRequestPagingMethodOneOf, type context$1_QueryReferencedDataItemsResponse as QueryReferencedDataItemsResponse, type context$1_QueryReferencedDataItemsResponseNonNullableFields as QueryReferencedDataItemsResponseNonNullableFields, type context$1_QueryV2 as QueryV2, type context$1_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type context$1_ReferencedItemOptions as ReferencedItemOptions, type context$1_ReferencedResult as ReferencedResult, type context$1_ReferencedResultEntityOneOf as ReferencedResultEntityOneOf, type context$1_RemoveDataItemOptions as RemoveDataItemOptions, type context$1_RemoveDataItemReferenceOptions as RemoveDataItemReferenceOptions, type context$1_RemoveDataItemReferenceRequest as RemoveDataItemReferenceRequest, type context$1_RemoveDataItemReferenceResponse as RemoveDataItemReferenceResponse, type context$1_RemoveDataItemReferenceResponseNonNullableFields as RemoveDataItemReferenceResponseNonNullableFields, type context$1_RemoveDataItemRequest as RemoveDataItemRequest, type context$1_RemoveDataItemResponse as RemoveDataItemResponse, type context$1_RemoveDataItemResponseNonNullableFields as RemoveDataItemResponseNonNullableFields, type context$1_RemoveFromArray as RemoveFromArray, type context$1_ReplaceDataItemReferencesOptions as ReplaceDataItemReferencesOptions, type context$1_ReplaceDataItemReferencesRequest as ReplaceDataItemReferencesRequest, type context$1_ReplaceDataItemReferencesResponse as ReplaceDataItemReferencesResponse, type context$1_ReplaceDataItemReferencesResponseNonNullableFields as ReplaceDataItemReferencesResponseNonNullableFields, type context$1_RestoreInfo as RestoreInfo, type context$1_SaveDataItemOptions as SaveDataItemOptions, type context$1_SaveDataItemRequest as SaveDataItemRequest, type context$1_SaveDataItemResponse as SaveDataItemResponse, type context$1_SaveDataItemResponseNonNullableFields as SaveDataItemResponseNonNullableFields, type context$1_SetField as SetField, context$1_SortOrder as SortOrder, type context$1_Sorting as Sorting, type context$1_Sum as Sum, type context$1_TruncateDataItemsOptions as TruncateDataItemsOptions, type context$1_TruncateDataItemsRequest as TruncateDataItemsRequest, type context$1_TruncateDataItemsResponse as TruncateDataItemsResponse, type context$1_UnresolvedReference as UnresolvedReference, type context$1_UpdateDataItemOptions as UpdateDataItemOptions, type context$1_UpdateDataItemRequest as UpdateDataItemRequest, type context$1_UpdateDataItemResponse as UpdateDataItemResponse, type context$1_UpdateDataItemResponseNonNullableFields as UpdateDataItemResponseNonNullableFields, context$1_WebhookIdentityType as WebhookIdentityType, type context$1__publicOnDataItemCreatedType as _publicOnDataItemCreatedType, type context$1__publicOnDataItemDeletedType as _publicOnDataItemDeletedType, type context$1__publicOnDataItemUpdatedType as _publicOnDataItemUpdatedType, context$1_aggregateDataItems as aggregateDataItems, context$1_bulkInsertDataItemReferences as bulkInsertDataItemReferences, context$1_bulkInsertDataItems as bulkInsertDataItems, context$1_bulkRemoveDataItemReferences as bulkRemoveDataItemReferences, context$1_bulkRemoveDataItems as bulkRemoveDataItems, context$1_bulkSaveDataItems as bulkSaveDataItems, context$1_bulkUpdateDataItems as bulkUpdateDataItems, context$1_countDataItems as countDataItems, context$1_getDataItem as getDataItem, context$1_insertDataItem as insertDataItem, context$1_insertDataItemReference as insertDataItemReference, context$1_isReferencedDataItem as isReferencedDataItem, context$1_onDataItemCreated as onDataItemCreated, context$1_onDataItemDeleted as onDataItemDeleted, context$1_onDataItemUpdated as onDataItemUpdated, onDataItemCreated$1 as publicOnDataItemCreated, onDataItemDeleted$1 as publicOnDataItemDeleted, onDataItemUpdated$1 as publicOnDataItemUpdated, context$1_queryDataItems as queryDataItems, context$1_queryDistinctValues as queryDistinctValues, context$1_queryReferencedDataItems as queryReferencedDataItems, context$1_removeDataItem as removeDataItem, context$1_removeDataItemReference as removeDataItemReference, context$1_replaceDataItemReferences as replaceDataItemReferences, context$1_saveDataItem as saveDataItem, context$1_truncateDataItems as truncateDataItems, context$1_updateDataItem as updateDataItem };
|
|
6011
|
+
}
|
|
6012
|
+
|
|
6013
|
+
type HostModule<T, H extends Host> = {
|
|
6014
|
+
__type: 'host';
|
|
6015
|
+
create(host: H): T;
|
|
6016
|
+
};
|
|
6017
|
+
type HostModuleAPI<T extends HostModule<any, any>> = T extends HostModule<infer U, any> ? U : never;
|
|
6018
|
+
type Host<Environment = unknown> = {
|
|
6019
|
+
channel: {
|
|
6020
|
+
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
6021
|
+
disconnect: () => void;
|
|
6022
|
+
} | Promise<{
|
|
6023
|
+
disconnect: () => void;
|
|
6024
|
+
}>;
|
|
6025
|
+
};
|
|
6026
|
+
environment?: Environment;
|
|
4759
6027
|
/**
|
|
4760
|
-
*
|
|
4761
|
-
*
|
|
4762
|
-
*
|
|
4763
|
-
* This endpoint adds one or more references to a collection.
|
|
4764
|
-
* Each new reference in `options.dataItemReferences` specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item.
|
|
4765
|
-
* @param - Options for inserting one or more references.
|
|
6028
|
+
* Optional name of the environment, use for logging
|
|
4766
6029
|
*/
|
|
4767
|
-
|
|
4768
|
-
}
|
|
4769
|
-
declare function bulkRemoveDataItemReferences$1(httpClient: HttpClient): BulkRemoveDataItemReferencesSignature;
|
|
4770
|
-
interface BulkRemoveDataItemReferencesSignature {
|
|
6030
|
+
name?: string;
|
|
4771
6031
|
/**
|
|
4772
|
-
*
|
|
4773
|
-
* @param - Options for removing one or more references.
|
|
6032
|
+
* Optional bast url to use for API requests, for example `www.wixapis.com`
|
|
4774
6033
|
*/
|
|
4775
|
-
|
|
4776
|
-
}
|
|
4777
|
-
declare function replaceDataItemReferences$1(httpClient: HttpClient): ReplaceDataItemReferencesSignature;
|
|
4778
|
-
interface ReplaceDataItemReferencesSignature {
|
|
6034
|
+
apiBaseUrl?: string;
|
|
4779
6035
|
/**
|
|
4780
|
-
*
|
|
4781
|
-
*
|
|
4782
|
-
*
|
|
4783
|
-
* This function replaces the existing reference or references contained in the field specified in `options.referringItemFieldName` within the data item specified in `options.referringItemId`.
|
|
4784
|
-
* The function removes existing references and in their place it adds references to the items specified in `options.newReferencedItemIds`.
|
|
4785
|
-
*
|
|
4786
|
-
* > **Note:** If you pass an empty array in `options.newReferencedItemIds`, all existing references are removed.
|
|
4787
|
-
* @param - Options for replacing references.
|
|
6036
|
+
* Possible data to be provided by every host, for cross cutting concerns
|
|
6037
|
+
* like internationalization, billing, etc.
|
|
4788
6038
|
*/
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
6039
|
+
essentials?: {
|
|
6040
|
+
/**
|
|
6041
|
+
* The language of the currently viewed session
|
|
6042
|
+
*/
|
|
6043
|
+
language?: string;
|
|
6044
|
+
/**
|
|
6045
|
+
* The locale of the currently viewed session
|
|
6046
|
+
*/
|
|
6047
|
+
locale?: string;
|
|
6048
|
+
/**
|
|
6049
|
+
* Any headers that should be passed through to the API requests
|
|
6050
|
+
*/
|
|
6051
|
+
passThroughHeaders?: Record<string, string>;
|
|
6052
|
+
};
|
|
6053
|
+
};
|
|
4794
6054
|
|
|
6055
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
6056
|
+
interface HttpClient {
|
|
6057
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
6058
|
+
fetchWithAuth: typeof fetch;
|
|
6059
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
6060
|
+
getActiveToken?: () => string | undefined;
|
|
6061
|
+
}
|
|
6062
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
6063
|
+
type HttpResponse<T = any> = {
|
|
6064
|
+
data: T;
|
|
6065
|
+
status: number;
|
|
6066
|
+
statusText: string;
|
|
6067
|
+
headers: any;
|
|
6068
|
+
request?: any;
|
|
6069
|
+
};
|
|
6070
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
6071
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
6072
|
+
url: string;
|
|
6073
|
+
data?: Data;
|
|
6074
|
+
params?: URLSearchParams;
|
|
6075
|
+
} & APIMetadata;
|
|
6076
|
+
type APIMetadata = {
|
|
6077
|
+
methodFqn?: string;
|
|
6078
|
+
entityFqdn?: string;
|
|
6079
|
+
packageName?: string;
|
|
6080
|
+
};
|
|
6081
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
4795
6082
|
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
4796
6083
|
__type: 'event-definition';
|
|
4797
6084
|
type: Type;
|
|
@@ -4799,9 +6086,58 @@ type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
|
4799
6086
|
transformations?: (envelope: unknown) => Payload;
|
|
4800
6087
|
__payload: Payload;
|
|
4801
6088
|
};
|
|
4802
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
4803
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
4804
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
6089
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
6090
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
6091
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
6092
|
+
|
|
6093
|
+
type ServicePluginMethodInput = {
|
|
6094
|
+
request: any;
|
|
6095
|
+
metadata: any;
|
|
6096
|
+
};
|
|
6097
|
+
type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
6098
|
+
type ServicePluginMethodMetadata = {
|
|
6099
|
+
name: string;
|
|
6100
|
+
primaryHttpMappingPath: string;
|
|
6101
|
+
transformations: {
|
|
6102
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput;
|
|
6103
|
+
toREST: (...args: unknown[]) => unknown;
|
|
6104
|
+
};
|
|
6105
|
+
};
|
|
6106
|
+
type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
6107
|
+
__type: 'service-plugin-definition';
|
|
6108
|
+
componentType: string;
|
|
6109
|
+
methods: ServicePluginMethodMetadata[];
|
|
6110
|
+
__contract: Contract;
|
|
6111
|
+
};
|
|
6112
|
+
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
6113
|
+
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
6114
|
+
declare const SERVICE_PLUGIN_ERROR_TYPE = "wix_spi_error";
|
|
6115
|
+
|
|
6116
|
+
type RequestContext = {
|
|
6117
|
+
isSSR: boolean;
|
|
6118
|
+
host: string;
|
|
6119
|
+
protocol?: string;
|
|
6120
|
+
};
|
|
6121
|
+
type ResponseTransformer = (data: any, headers?: any) => any;
|
|
6122
|
+
/**
|
|
6123
|
+
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
6124
|
+
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
6125
|
+
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
6126
|
+
*/
|
|
6127
|
+
type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
6128
|
+
type AmbassadorRequestOptions<T = any> = {
|
|
6129
|
+
_?: T;
|
|
6130
|
+
url?: string;
|
|
6131
|
+
method?: Method;
|
|
6132
|
+
params?: any;
|
|
6133
|
+
data?: any;
|
|
6134
|
+
transformResponse?: ResponseTransformer | ResponseTransformer[];
|
|
6135
|
+
};
|
|
6136
|
+
type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
|
|
6137
|
+
__isAmbassador: boolean;
|
|
6138
|
+
};
|
|
6139
|
+
type AmbassadorFunctionDescriptor<Request = any, Response = any> = AmbassadorFactory<Request, Response>;
|
|
6140
|
+
type BuildAmbassadorFunction<T extends AmbassadorFunctionDescriptor> = T extends AmbassadorFunctionDescriptor<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
4805
6141
|
|
|
4806
6142
|
declare global {
|
|
4807
6143
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -4810,232 +6146,347 @@ declare global {
|
|
|
4810
6146
|
}
|
|
4811
6147
|
}
|
|
4812
6148
|
|
|
4813
|
-
declare
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
6149
|
+
declare const emptyObjectSymbol: unique symbol;
|
|
6150
|
+
|
|
6151
|
+
/**
|
|
6152
|
+
Represents a strictly empty plain object, the `{}` value.
|
|
6153
|
+
|
|
6154
|
+
When you annotate something as the type `{}`, it can be anything except `null` and `undefined`. This means that you cannot use `{}` to represent an empty plain object ([read more](https://stackoverflow.com/questions/47339869/typescript-empty-object-and-any-difference/52193484#52193484)).
|
|
6155
|
+
|
|
6156
|
+
@example
|
|
6157
|
+
```
|
|
6158
|
+
import type {EmptyObject} from 'type-fest';
|
|
6159
|
+
|
|
6160
|
+
// The following illustrates the problem with `{}`.
|
|
6161
|
+
const foo1: {} = {}; // Pass
|
|
6162
|
+
const foo2: {} = []; // Pass
|
|
6163
|
+
const foo3: {} = 42; // Pass
|
|
6164
|
+
const foo4: {} = {a: 1}; // Pass
|
|
6165
|
+
|
|
6166
|
+
// With `EmptyObject` only the first case is valid.
|
|
6167
|
+
const bar1: EmptyObject = {}; // Pass
|
|
6168
|
+
const bar2: EmptyObject = 42; // Fail
|
|
6169
|
+
const bar3: EmptyObject = []; // Fail
|
|
6170
|
+
const bar4: EmptyObject = {a: 1}; // Fail
|
|
6171
|
+
```
|
|
6172
|
+
|
|
6173
|
+
Unfortunately, `Record<string, never>`, `Record<keyof any, never>` and `Record<never, never>` do not work. See {@link https://github.com/sindresorhus/type-fest/issues/395 #395}.
|
|
6174
|
+
|
|
6175
|
+
@category Object
|
|
6176
|
+
*/
|
|
6177
|
+
type EmptyObject = {[emptyObjectSymbol]?: never};
|
|
6178
|
+
|
|
6179
|
+
/**
|
|
6180
|
+
Returns a boolean for whether the two given types are equal.
|
|
6181
|
+
|
|
6182
|
+
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
6183
|
+
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
6184
|
+
|
|
6185
|
+
Use-cases:
|
|
6186
|
+
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
6187
|
+
|
|
6188
|
+
@example
|
|
6189
|
+
```
|
|
6190
|
+
import type {IsEqual} from 'type-fest';
|
|
6191
|
+
|
|
6192
|
+
// This type returns a boolean for whether the given array includes the given item.
|
|
6193
|
+
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
6194
|
+
type Includes<Value extends readonly any[], Item> =
|
|
6195
|
+
Value extends readonly [Value[0], ...infer rest]
|
|
6196
|
+
? IsEqual<Value[0], Item> extends true
|
|
6197
|
+
? true
|
|
6198
|
+
: Includes<rest, Item>
|
|
6199
|
+
: false;
|
|
6200
|
+
```
|
|
6201
|
+
|
|
6202
|
+
@category Type Guard
|
|
6203
|
+
@category Utilities
|
|
6204
|
+
*/
|
|
6205
|
+
type IsEqual<A, B> =
|
|
6206
|
+
(<G>() => G extends A ? 1 : 2) extends
|
|
6207
|
+
(<G>() => G extends B ? 1 : 2)
|
|
6208
|
+
? true
|
|
6209
|
+
: false;
|
|
6210
|
+
|
|
6211
|
+
/**
|
|
6212
|
+
Filter out keys from an object.
|
|
6213
|
+
|
|
6214
|
+
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
6215
|
+
Returns `never` if `Key` extends `Exclude`.
|
|
6216
|
+
Returns `Key` otherwise.
|
|
6217
|
+
|
|
6218
|
+
@example
|
|
6219
|
+
```
|
|
6220
|
+
type Filtered = Filter<'foo', 'foo'>;
|
|
6221
|
+
//=> never
|
|
6222
|
+
```
|
|
6223
|
+
|
|
6224
|
+
@example
|
|
6225
|
+
```
|
|
6226
|
+
type Filtered = Filter<'bar', string>;
|
|
6227
|
+
//=> never
|
|
6228
|
+
```
|
|
6229
|
+
|
|
6230
|
+
@example
|
|
6231
|
+
```
|
|
6232
|
+
type Filtered = Filter<'bar', 'foo'>;
|
|
6233
|
+
//=> 'bar'
|
|
6234
|
+
```
|
|
6235
|
+
|
|
6236
|
+
@see {Except}
|
|
6237
|
+
*/
|
|
6238
|
+
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
6239
|
+
|
|
6240
|
+
type ExceptOptions = {
|
|
6241
|
+
/**
|
|
6242
|
+
Disallow assigning non-specified properties.
|
|
6243
|
+
|
|
6244
|
+
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
6245
|
+
|
|
6246
|
+
@default false
|
|
6247
|
+
*/
|
|
6248
|
+
requireExactProps?: boolean;
|
|
6249
|
+
};
|
|
6250
|
+
|
|
6251
|
+
/**
|
|
6252
|
+
Create a type from an object type without certain keys.
|
|
6253
|
+
|
|
6254
|
+
We recommend setting the `requireExactProps` option to `true`.
|
|
6255
|
+
|
|
6256
|
+
This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.
|
|
6257
|
+
|
|
6258
|
+
This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)).
|
|
6259
|
+
|
|
6260
|
+
@example
|
|
6261
|
+
```
|
|
6262
|
+
import type {Except} from 'type-fest';
|
|
6263
|
+
|
|
6264
|
+
type Foo = {
|
|
6265
|
+
a: number;
|
|
6266
|
+
b: string;
|
|
6267
|
+
};
|
|
6268
|
+
|
|
6269
|
+
type FooWithoutA = Except<Foo, 'a'>;
|
|
6270
|
+
//=> {b: string}
|
|
6271
|
+
|
|
6272
|
+
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
6273
|
+
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
6274
|
+
|
|
6275
|
+
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
6276
|
+
//=> {a: number} & Partial<Record<"b", never>>
|
|
6277
|
+
|
|
6278
|
+
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
6279
|
+
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
6280
|
+
```
|
|
6281
|
+
|
|
6282
|
+
@category Object
|
|
6283
|
+
*/
|
|
6284
|
+
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
|
|
6285
|
+
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
6286
|
+
} & (Options['requireExactProps'] extends true
|
|
6287
|
+
? Partial<Record<KeysType, never>>
|
|
6288
|
+
: {});
|
|
6289
|
+
|
|
6290
|
+
/**
|
|
6291
|
+
Returns a boolean for whether the given type is `never`.
|
|
6292
|
+
|
|
6293
|
+
@link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
|
|
6294
|
+
@link https://stackoverflow.com/a/53984913/10292952
|
|
6295
|
+
@link https://www.zhenghao.io/posts/ts-never
|
|
6296
|
+
|
|
6297
|
+
Useful in type utilities, such as checking if something does not occur.
|
|
6298
|
+
|
|
6299
|
+
@example
|
|
6300
|
+
```
|
|
6301
|
+
import type {IsNever, And} from 'type-fest';
|
|
6302
|
+
|
|
6303
|
+
// https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
|
|
6304
|
+
type AreStringsEqual<A extends string, B extends string> =
|
|
6305
|
+
And<
|
|
6306
|
+
IsNever<Exclude<A, B>> extends true ? true : false,
|
|
6307
|
+
IsNever<Exclude<B, A>> extends true ? true : false
|
|
6308
|
+
>;
|
|
6309
|
+
|
|
6310
|
+
type EndIfEqual<I extends string, O extends string> =
|
|
6311
|
+
AreStringsEqual<I, O> extends true
|
|
6312
|
+
? never
|
|
6313
|
+
: void;
|
|
6314
|
+
|
|
6315
|
+
function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
|
|
6316
|
+
if (input === output) {
|
|
6317
|
+
process.exit(0);
|
|
6318
|
+
}
|
|
6319
|
+
}
|
|
6320
|
+
|
|
6321
|
+
endIfEqual('abc', 'abc');
|
|
6322
|
+
//=> never
|
|
6323
|
+
|
|
6324
|
+
endIfEqual('abc', '123');
|
|
6325
|
+
//=> void
|
|
6326
|
+
```
|
|
6327
|
+
|
|
6328
|
+
@category Type Guard
|
|
6329
|
+
@category Utilities
|
|
6330
|
+
*/
|
|
6331
|
+
type IsNever<T> = [T] extends [never] ? true : false;
|
|
6332
|
+
|
|
6333
|
+
/**
|
|
6334
|
+
An if-else-like type that resolves depending on whether the given type is `never`.
|
|
6335
|
+
|
|
6336
|
+
@see {@link IsNever}
|
|
6337
|
+
|
|
6338
|
+
@example
|
|
6339
|
+
```
|
|
6340
|
+
import type {IfNever} from 'type-fest';
|
|
6341
|
+
|
|
6342
|
+
type ShouldBeTrue = IfNever<never>;
|
|
6343
|
+
//=> true
|
|
6344
|
+
|
|
6345
|
+
type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
|
|
6346
|
+
//=> 'bar'
|
|
6347
|
+
```
|
|
6348
|
+
|
|
6349
|
+
@category Type Guard
|
|
6350
|
+
@category Utilities
|
|
6351
|
+
*/
|
|
6352
|
+
type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
|
|
6353
|
+
IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
|
|
6354
|
+
);
|
|
6355
|
+
|
|
6356
|
+
/**
|
|
6357
|
+
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
6358
|
+
|
|
6359
|
+
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
6360
|
+
|
|
6361
|
+
@example
|
|
6362
|
+
```
|
|
6363
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
6364
|
+
|
|
6365
|
+
interface Example {
|
|
6366
|
+
a: string;
|
|
6367
|
+
b: string | number;
|
|
6368
|
+
c?: string;
|
|
6369
|
+
d: {};
|
|
6370
|
+
}
|
|
6371
|
+
|
|
6372
|
+
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
6373
|
+
//=> 'a'
|
|
6374
|
+
```
|
|
6375
|
+
|
|
6376
|
+
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
6377
|
+
|
|
6378
|
+
@example
|
|
6379
|
+
```
|
|
6380
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
6381
|
+
|
|
6382
|
+
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
6383
|
+
//=> 'a' | 'c'
|
|
6384
|
+
```
|
|
6385
|
+
|
|
6386
|
+
@category Object
|
|
6387
|
+
*/
|
|
6388
|
+
type ConditionalKeys<Base, Condition> =
|
|
6389
|
+
{
|
|
6390
|
+
// Map through all the keys of the given base type.
|
|
6391
|
+
[Key in keyof Base]-?:
|
|
6392
|
+
// Pick only keys with types extending the given `Condition` type.
|
|
6393
|
+
Base[Key] extends Condition
|
|
6394
|
+
// Retain this key
|
|
6395
|
+
// If the value for the key extends never, only include it if `Condition` also extends never
|
|
6396
|
+
? IfNever<Base[Key], IfNever<Condition, Key, never>, Key>
|
|
6397
|
+
// Discard this key since the condition fails.
|
|
6398
|
+
: never;
|
|
6399
|
+
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
6400
|
+
}[keyof Base];
|
|
6401
|
+
|
|
6402
|
+
/**
|
|
6403
|
+
Exclude keys from a shape that matches the given `Condition`.
|
|
6404
|
+
|
|
6405
|
+
This is useful when you want to create a new type with a specific set of keys from a shape. For example, you might want to exclude all the primitive properties from a class and form a new shape containing everything but the primitive properties.
|
|
6406
|
+
|
|
6407
|
+
@example
|
|
6408
|
+
```
|
|
6409
|
+
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
6410
|
+
|
|
6411
|
+
class Awesome {
|
|
6412
|
+
name: string;
|
|
6413
|
+
successes: number;
|
|
6414
|
+
failures: bigint;
|
|
6415
|
+
|
|
6416
|
+
run() {}
|
|
6417
|
+
}
|
|
6418
|
+
|
|
6419
|
+
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
|
|
6420
|
+
//=> {run: () => void}
|
|
6421
|
+
```
|
|
6422
|
+
|
|
6423
|
+
@example
|
|
6424
|
+
```
|
|
6425
|
+
import type {ConditionalExcept} from 'type-fest';
|
|
6426
|
+
|
|
6427
|
+
interface Example {
|
|
6428
|
+
a: string;
|
|
6429
|
+
b: string | number;
|
|
6430
|
+
c: () => void;
|
|
6431
|
+
d: {};
|
|
6432
|
+
}
|
|
6433
|
+
|
|
6434
|
+
type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
6435
|
+
//=> {b: string | number; c: () => void; d: {}}
|
|
6436
|
+
```
|
|
4836
6437
|
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
6438
|
+
@category Object
|
|
6439
|
+
*/
|
|
6440
|
+
type ConditionalExcept<Base, Condition> = Except<
|
|
6441
|
+
Base,
|
|
6442
|
+
ConditionalKeys<Base, Condition>
|
|
6443
|
+
>;
|
|
4842
6444
|
|
|
4843
|
-
type _publicOnDataItemUpdatedType = typeof onDataItemUpdated$1;
|
|
4844
6445
|
/**
|
|
4845
|
-
*
|
|
4846
|
-
*
|
|
4847
|
-
*
|
|
6446
|
+
* Descriptors are objects that describe the API of a module, and the module
|
|
6447
|
+
* can either be a REST module or a host module.
|
|
6448
|
+
* This type is recursive, so it can describe nested modules.
|
|
4848
6449
|
*/
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
6450
|
+
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition<any> | ServicePluginDefinition<any> | {
|
|
6451
|
+
[key: string]: Descriptors | PublicMetadata | any;
|
|
6452
|
+
};
|
|
4852
6453
|
/**
|
|
4853
|
-
*
|
|
6454
|
+
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
6455
|
+
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
6456
|
+
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
6457
|
+
* do not match the given host (as they will not work with the given host).
|
|
4854
6458
|
*/
|
|
4855
|
-
|
|
6459
|
+
type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, Depth extends number = 5> = {
|
|
6460
|
+
done: T;
|
|
6461
|
+
recurse: T extends {
|
|
6462
|
+
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
6463
|
+
} ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition<any> ? BuildEventDefinition<T> : T extends ServicePluginDefinition<any> ? BuildServicePluginDefinition<T> : T extends HostModule<any, any> ? HostModuleAPI<T> : ConditionalExcept<{
|
|
6464
|
+
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
6465
|
+
-1,
|
|
6466
|
+
0,
|
|
6467
|
+
1,
|
|
6468
|
+
2,
|
|
6469
|
+
3,
|
|
6470
|
+
4,
|
|
6471
|
+
5
|
|
6472
|
+
][Depth]> : never;
|
|
6473
|
+
}, EmptyObject>;
|
|
6474
|
+
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
6475
|
+
type PublicMetadata = {
|
|
6476
|
+
PACKAGE_NAME?: string;
|
|
6477
|
+
};
|
|
4856
6478
|
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
declare const context$1_Action: typeof Action;
|
|
4861
|
-
type context$1_ActionEvent = ActionEvent;
|
|
4862
|
-
type context$1_AggregateDataItemsOptions = AggregateDataItemsOptions;
|
|
4863
|
-
type context$1_AggregateDataItemsRequest = AggregateDataItemsRequest;
|
|
4864
|
-
type context$1_AggregateDataItemsRequestPagingMethodOneOf = AggregateDataItemsRequestPagingMethodOneOf;
|
|
4865
|
-
type context$1_AggregateDataItemsResponse = AggregateDataItemsResponse;
|
|
4866
|
-
type context$1_Aggregation = Aggregation;
|
|
4867
|
-
type context$1_AppendToArray = AppendToArray;
|
|
4868
|
-
type context$1_ApplicationError = ApplicationError;
|
|
4869
|
-
type context$1_Average = Average;
|
|
4870
|
-
type context$1_BaseEventMetadata = BaseEventMetadata;
|
|
4871
|
-
type context$1_BulkActionMetadata = BulkActionMetadata;
|
|
4872
|
-
type context$1_BulkActionType = BulkActionType;
|
|
4873
|
-
declare const context$1_BulkActionType: typeof BulkActionType;
|
|
4874
|
-
type context$1_BulkDataItemReferenceResult = BulkDataItemReferenceResult;
|
|
4875
|
-
type context$1_BulkDataItemResult = BulkDataItemResult;
|
|
4876
|
-
type context$1_BulkInsertDataItemReferencesOptions = BulkInsertDataItemReferencesOptions;
|
|
4877
|
-
type context$1_BulkInsertDataItemReferencesRequest = BulkInsertDataItemReferencesRequest;
|
|
4878
|
-
type context$1_BulkInsertDataItemReferencesResponse = BulkInsertDataItemReferencesResponse;
|
|
4879
|
-
type context$1_BulkInsertDataItemReferencesResponseNonNullableFields = BulkInsertDataItemReferencesResponseNonNullableFields;
|
|
4880
|
-
type context$1_BulkInsertDataItemsOptions = BulkInsertDataItemsOptions;
|
|
4881
|
-
type context$1_BulkInsertDataItemsRequest = BulkInsertDataItemsRequest;
|
|
4882
|
-
type context$1_BulkInsertDataItemsResponse = BulkInsertDataItemsResponse;
|
|
4883
|
-
type context$1_BulkInsertDataItemsResponseNonNullableFields = BulkInsertDataItemsResponseNonNullableFields;
|
|
4884
|
-
type context$1_BulkPatchDataItemsRequest = BulkPatchDataItemsRequest;
|
|
4885
|
-
type context$1_BulkPatchDataItemsResponse = BulkPatchDataItemsResponse;
|
|
4886
|
-
type context$1_BulkRemoveDataItemReferencesOptions = BulkRemoveDataItemReferencesOptions;
|
|
4887
|
-
type context$1_BulkRemoveDataItemReferencesRequest = BulkRemoveDataItemReferencesRequest;
|
|
4888
|
-
type context$1_BulkRemoveDataItemReferencesResponse = BulkRemoveDataItemReferencesResponse;
|
|
4889
|
-
type context$1_BulkRemoveDataItemReferencesResponseNonNullableFields = BulkRemoveDataItemReferencesResponseNonNullableFields;
|
|
4890
|
-
type context$1_BulkRemoveDataItemsOptions = BulkRemoveDataItemsOptions;
|
|
4891
|
-
type context$1_BulkRemoveDataItemsRequest = BulkRemoveDataItemsRequest;
|
|
4892
|
-
type context$1_BulkRemoveDataItemsResponse = BulkRemoveDataItemsResponse;
|
|
4893
|
-
type context$1_BulkRemoveDataItemsResponseNonNullableFields = BulkRemoveDataItemsResponseNonNullableFields;
|
|
4894
|
-
type context$1_BulkSaveDataItemsOptions = BulkSaveDataItemsOptions;
|
|
4895
|
-
type context$1_BulkSaveDataItemsRequest = BulkSaveDataItemsRequest;
|
|
4896
|
-
type context$1_BulkSaveDataItemsResponse = BulkSaveDataItemsResponse;
|
|
4897
|
-
type context$1_BulkSaveDataItemsResponseNonNullableFields = BulkSaveDataItemsResponseNonNullableFields;
|
|
4898
|
-
type context$1_BulkUpdateDataItemsOptions = BulkUpdateDataItemsOptions;
|
|
4899
|
-
type context$1_BulkUpdateDataItemsRequest = BulkUpdateDataItemsRequest;
|
|
4900
|
-
type context$1_BulkUpdateDataItemsResponse = BulkUpdateDataItemsResponse;
|
|
4901
|
-
type context$1_BulkUpdateDataItemsResponseNonNullableFields = BulkUpdateDataItemsResponseNonNullableFields;
|
|
4902
|
-
type context$1_CachingInfo = CachingInfo;
|
|
4903
|
-
type context$1_Count = Count;
|
|
4904
|
-
type context$1_CountDataItemsOptions = CountDataItemsOptions;
|
|
4905
|
-
type context$1_CountDataItemsRequest = CountDataItemsRequest;
|
|
4906
|
-
type context$1_CountDataItemsResponse = CountDataItemsResponse;
|
|
4907
|
-
type context$1_CountDataItemsResponseNonNullableFields = CountDataItemsResponseNonNullableFields;
|
|
4908
|
-
type context$1_CursorPaging = CursorPaging;
|
|
4909
|
-
type context$1_Cursors = Cursors;
|
|
4910
|
-
type context$1_DataItem = DataItem;
|
|
4911
|
-
type context$1_DataItemCreatedEnvelope = DataItemCreatedEnvelope;
|
|
4912
|
-
type context$1_DataItemDeletedEnvelope = DataItemDeletedEnvelope;
|
|
4913
|
-
type context$1_DataItemNonNullableFields = DataItemNonNullableFields;
|
|
4914
|
-
type context$1_DataItemReference = DataItemReference;
|
|
4915
|
-
type context$1_DataItemUpdatedEnvelope = DataItemUpdatedEnvelope;
|
|
4916
|
-
type context$1_DataItemsQueryBuilder = DataItemsQueryBuilder;
|
|
4917
|
-
type context$1_DataItemsQueryResult = DataItemsQueryResult;
|
|
4918
|
-
type context$1_DataPublishPluginOptions = DataPublishPluginOptions;
|
|
4919
|
-
type context$1_DomainEvent = DomainEvent;
|
|
4920
|
-
type context$1_DomainEventBodyOneOf = DomainEventBodyOneOf;
|
|
4921
|
-
type context$1_EntityCreatedEvent = EntityCreatedEvent;
|
|
4922
|
-
type context$1_EntityDeletedEvent = EntityDeletedEvent;
|
|
4923
|
-
type context$1_EntityUpdatedEvent = EntityUpdatedEvent;
|
|
4924
|
-
type context$1_EventMetadata = EventMetadata;
|
|
4925
|
-
type context$1_FieldUpdate = FieldUpdate;
|
|
4926
|
-
type context$1_FieldUpdateActionOptionsOneOf = FieldUpdateActionOptionsOneOf;
|
|
4927
|
-
type context$1_GetDataItemOptions = GetDataItemOptions;
|
|
4928
|
-
type context$1_GetDataItemRequest = GetDataItemRequest;
|
|
4929
|
-
type context$1_GetDataItemResponse = GetDataItemResponse;
|
|
4930
|
-
type context$1_GetDataItemResponseNonNullableFields = GetDataItemResponseNonNullableFields;
|
|
4931
|
-
type context$1_IdentificationData = IdentificationData;
|
|
4932
|
-
type context$1_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
|
|
4933
|
-
type context$1_IncrementField = IncrementField;
|
|
4934
|
-
type context$1_InsertDataItemOptions = InsertDataItemOptions;
|
|
4935
|
-
type context$1_InsertDataItemReferenceOptions = InsertDataItemReferenceOptions;
|
|
4936
|
-
type context$1_InsertDataItemReferenceRequest = InsertDataItemReferenceRequest;
|
|
4937
|
-
type context$1_InsertDataItemReferenceResponse = InsertDataItemReferenceResponse;
|
|
4938
|
-
type context$1_InsertDataItemReferenceResponseNonNullableFields = InsertDataItemReferenceResponseNonNullableFields;
|
|
4939
|
-
type context$1_InsertDataItemRequest = InsertDataItemRequest;
|
|
4940
|
-
type context$1_InsertDataItemResponse = InsertDataItemResponse;
|
|
4941
|
-
type context$1_InsertDataItemResponseNonNullableFields = InsertDataItemResponseNonNullableFields;
|
|
4942
|
-
type context$1_IsReferencedDataItemOptions = IsReferencedDataItemOptions;
|
|
4943
|
-
type context$1_IsReferencedDataItemRequest = IsReferencedDataItemRequest;
|
|
4944
|
-
type context$1_IsReferencedDataItemResponse = IsReferencedDataItemResponse;
|
|
4945
|
-
type context$1_IsReferencedDataItemResponseNonNullableFields = IsReferencedDataItemResponseNonNullableFields;
|
|
4946
|
-
type context$1_ItemMetadata = ItemMetadata;
|
|
4947
|
-
type context$1_Max = Max;
|
|
4948
|
-
type context$1_MessageEnvelope = MessageEnvelope;
|
|
4949
|
-
type context$1_Min = Min;
|
|
4950
|
-
type context$1_Operation = Operation;
|
|
4951
|
-
type context$1_OperationCalculateOneOf = OperationCalculateOneOf;
|
|
4952
|
-
type context$1_Options = Options;
|
|
4953
|
-
type context$1_PagingMetadataV2 = PagingMetadataV2;
|
|
4954
|
-
type context$1_PatchDataItemRequest = PatchDataItemRequest;
|
|
4955
|
-
type context$1_PatchDataItemResponse = PatchDataItemResponse;
|
|
4956
|
-
type context$1_PatchSet = PatchSet;
|
|
4957
|
-
type context$1_PublishPluginOptions = PublishPluginOptions;
|
|
4958
|
-
type context$1_QueryDataItemsOptions = QueryDataItemsOptions;
|
|
4959
|
-
type context$1_QueryDataItemsRequest = QueryDataItemsRequest;
|
|
4960
|
-
type context$1_QueryDataItemsResponse = QueryDataItemsResponse;
|
|
4961
|
-
type context$1_QueryDataItemsResponseNonNullableFields = QueryDataItemsResponseNonNullableFields;
|
|
4962
|
-
type context$1_QueryDistinctValuesOptions = QueryDistinctValuesOptions;
|
|
4963
|
-
type context$1_QueryDistinctValuesRequest = QueryDistinctValuesRequest;
|
|
4964
|
-
type context$1_QueryDistinctValuesRequestPagingMethodOneOf = QueryDistinctValuesRequestPagingMethodOneOf;
|
|
4965
|
-
type context$1_QueryDistinctValuesResponse = QueryDistinctValuesResponse;
|
|
4966
|
-
type context$1_QueryReferencedDataItemsOptions = QueryReferencedDataItemsOptions;
|
|
4967
|
-
type context$1_QueryReferencedDataItemsRequest = QueryReferencedDataItemsRequest;
|
|
4968
|
-
type context$1_QueryReferencedDataItemsRequestPagingMethodOneOf = QueryReferencedDataItemsRequestPagingMethodOneOf;
|
|
4969
|
-
type context$1_QueryReferencedDataItemsResponse = QueryReferencedDataItemsResponse;
|
|
4970
|
-
type context$1_QueryReferencedDataItemsResponseNonNullableFields = QueryReferencedDataItemsResponseNonNullableFields;
|
|
4971
|
-
type context$1_QueryV2 = QueryV2;
|
|
4972
|
-
type context$1_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf;
|
|
4973
|
-
type context$1_ReferencedItemOptions = ReferencedItemOptions;
|
|
4974
|
-
type context$1_ReferencedResult = ReferencedResult;
|
|
4975
|
-
type context$1_ReferencedResultEntityOneOf = ReferencedResultEntityOneOf;
|
|
4976
|
-
type context$1_RemoveDataItemOptions = RemoveDataItemOptions;
|
|
4977
|
-
type context$1_RemoveDataItemReferenceOptions = RemoveDataItemReferenceOptions;
|
|
4978
|
-
type context$1_RemoveDataItemReferenceRequest = RemoveDataItemReferenceRequest;
|
|
4979
|
-
type context$1_RemoveDataItemReferenceResponse = RemoveDataItemReferenceResponse;
|
|
4980
|
-
type context$1_RemoveDataItemReferenceResponseNonNullableFields = RemoveDataItemReferenceResponseNonNullableFields;
|
|
4981
|
-
type context$1_RemoveDataItemRequest = RemoveDataItemRequest;
|
|
4982
|
-
type context$1_RemoveDataItemResponse = RemoveDataItemResponse;
|
|
4983
|
-
type context$1_RemoveDataItemResponseNonNullableFields = RemoveDataItemResponseNonNullableFields;
|
|
4984
|
-
type context$1_RemoveFromArray = RemoveFromArray;
|
|
4985
|
-
type context$1_ReplaceDataItemReferencesOptions = ReplaceDataItemReferencesOptions;
|
|
4986
|
-
type context$1_ReplaceDataItemReferencesRequest = ReplaceDataItemReferencesRequest;
|
|
4987
|
-
type context$1_ReplaceDataItemReferencesResponse = ReplaceDataItemReferencesResponse;
|
|
4988
|
-
type context$1_ReplaceDataItemReferencesResponseNonNullableFields = ReplaceDataItemReferencesResponseNonNullableFields;
|
|
4989
|
-
type context$1_RestoreInfo = RestoreInfo;
|
|
4990
|
-
type context$1_SaveDataItemOptions = SaveDataItemOptions;
|
|
4991
|
-
type context$1_SaveDataItemRequest = SaveDataItemRequest;
|
|
4992
|
-
type context$1_SaveDataItemResponse = SaveDataItemResponse;
|
|
4993
|
-
type context$1_SaveDataItemResponseNonNullableFields = SaveDataItemResponseNonNullableFields;
|
|
4994
|
-
type context$1_SetField = SetField;
|
|
4995
|
-
type context$1_SortOrder = SortOrder;
|
|
4996
|
-
declare const context$1_SortOrder: typeof SortOrder;
|
|
4997
|
-
type context$1_Sorting = Sorting;
|
|
4998
|
-
type context$1_Sum = Sum;
|
|
4999
|
-
type context$1_TruncateDataItemsOptions = TruncateDataItemsOptions;
|
|
5000
|
-
type context$1_TruncateDataItemsRequest = TruncateDataItemsRequest;
|
|
5001
|
-
type context$1_TruncateDataItemsResponse = TruncateDataItemsResponse;
|
|
5002
|
-
type context$1_UnresolvedReference = UnresolvedReference;
|
|
5003
|
-
type context$1_UpdateDataItemOptions = UpdateDataItemOptions;
|
|
5004
|
-
type context$1_UpdateDataItemRequest = UpdateDataItemRequest;
|
|
5005
|
-
type context$1_UpdateDataItemResponse = UpdateDataItemResponse;
|
|
5006
|
-
type context$1_UpdateDataItemResponseNonNullableFields = UpdateDataItemResponseNonNullableFields;
|
|
5007
|
-
type context$1_WebhookIdentityType = WebhookIdentityType;
|
|
5008
|
-
declare const context$1_WebhookIdentityType: typeof WebhookIdentityType;
|
|
5009
|
-
type context$1__publicOnDataItemCreatedType = _publicOnDataItemCreatedType;
|
|
5010
|
-
type context$1__publicOnDataItemDeletedType = _publicOnDataItemDeletedType;
|
|
5011
|
-
type context$1__publicOnDataItemUpdatedType = _publicOnDataItemUpdatedType;
|
|
5012
|
-
declare const context$1_aggregateDataItems: typeof aggregateDataItems;
|
|
5013
|
-
declare const context$1_bulkInsertDataItemReferences: typeof bulkInsertDataItemReferences;
|
|
5014
|
-
declare const context$1_bulkInsertDataItems: typeof bulkInsertDataItems;
|
|
5015
|
-
declare const context$1_bulkRemoveDataItemReferences: typeof bulkRemoveDataItemReferences;
|
|
5016
|
-
declare const context$1_bulkRemoveDataItems: typeof bulkRemoveDataItems;
|
|
5017
|
-
declare const context$1_bulkSaveDataItems: typeof bulkSaveDataItems;
|
|
5018
|
-
declare const context$1_bulkUpdateDataItems: typeof bulkUpdateDataItems;
|
|
5019
|
-
declare const context$1_countDataItems: typeof countDataItems;
|
|
5020
|
-
declare const context$1_getDataItem: typeof getDataItem;
|
|
5021
|
-
declare const context$1_insertDataItem: typeof insertDataItem;
|
|
5022
|
-
declare const context$1_insertDataItemReference: typeof insertDataItemReference;
|
|
5023
|
-
declare const context$1_isReferencedDataItem: typeof isReferencedDataItem;
|
|
5024
|
-
declare const context$1_onDataItemCreated: typeof onDataItemCreated;
|
|
5025
|
-
declare const context$1_onDataItemDeleted: typeof onDataItemDeleted;
|
|
5026
|
-
declare const context$1_onDataItemUpdated: typeof onDataItemUpdated;
|
|
5027
|
-
declare const context$1_queryDataItems: typeof queryDataItems;
|
|
5028
|
-
declare const context$1_queryDistinctValues: typeof queryDistinctValues;
|
|
5029
|
-
declare const context$1_queryReferencedDataItems: typeof queryReferencedDataItems;
|
|
5030
|
-
declare const context$1_removeDataItem: typeof removeDataItem;
|
|
5031
|
-
declare const context$1_removeDataItemReference: typeof removeDataItemReference;
|
|
5032
|
-
declare const context$1_replaceDataItemReferences: typeof replaceDataItemReferences;
|
|
5033
|
-
declare const context$1_saveDataItem: typeof saveDataItem;
|
|
5034
|
-
declare const context$1_truncateDataItems: typeof truncateDataItems;
|
|
5035
|
-
declare const context$1_updateDataItem: typeof updateDataItem;
|
|
5036
|
-
declare namespace context$1 {
|
|
5037
|
-
export { context$1_ACTION as ACTION, context$1_Action as Action, type context$1_ActionEvent as ActionEvent, type context$1_AggregateDataItemsOptions as AggregateDataItemsOptions, type context$1_AggregateDataItemsRequest as AggregateDataItemsRequest, type context$1_AggregateDataItemsRequestPagingMethodOneOf as AggregateDataItemsRequestPagingMethodOneOf, type context$1_AggregateDataItemsResponse as AggregateDataItemsResponse, type context$1_Aggregation as Aggregation, type context$1_AppendToArray as AppendToArray, type context$1_ApplicationError as ApplicationError, type context$1_Average as Average, type context$1_BaseEventMetadata as BaseEventMetadata, type context$1_BulkActionMetadata as BulkActionMetadata, context$1_BulkActionType as BulkActionType, type context$1_BulkDataItemReferenceResult as BulkDataItemReferenceResult, type context$1_BulkDataItemResult as BulkDataItemResult, type context$1_BulkInsertDataItemReferencesOptions as BulkInsertDataItemReferencesOptions, type context$1_BulkInsertDataItemReferencesRequest as BulkInsertDataItemReferencesRequest, type context$1_BulkInsertDataItemReferencesResponse as BulkInsertDataItemReferencesResponse, type context$1_BulkInsertDataItemReferencesResponseNonNullableFields as BulkInsertDataItemReferencesResponseNonNullableFields, type context$1_BulkInsertDataItemsOptions as BulkInsertDataItemsOptions, type context$1_BulkInsertDataItemsRequest as BulkInsertDataItemsRequest, type context$1_BulkInsertDataItemsResponse as BulkInsertDataItemsResponse, type context$1_BulkInsertDataItemsResponseNonNullableFields as BulkInsertDataItemsResponseNonNullableFields, type context$1_BulkPatchDataItemsRequest as BulkPatchDataItemsRequest, type context$1_BulkPatchDataItemsResponse as BulkPatchDataItemsResponse, type context$1_BulkRemoveDataItemReferencesOptions as BulkRemoveDataItemReferencesOptions, type context$1_BulkRemoveDataItemReferencesRequest as BulkRemoveDataItemReferencesRequest, type context$1_BulkRemoveDataItemReferencesResponse as BulkRemoveDataItemReferencesResponse, type context$1_BulkRemoveDataItemReferencesResponseNonNullableFields as BulkRemoveDataItemReferencesResponseNonNullableFields, type context$1_BulkRemoveDataItemsOptions as BulkRemoveDataItemsOptions, type context$1_BulkRemoveDataItemsRequest as BulkRemoveDataItemsRequest, type context$1_BulkRemoveDataItemsResponse as BulkRemoveDataItemsResponse, type context$1_BulkRemoveDataItemsResponseNonNullableFields as BulkRemoveDataItemsResponseNonNullableFields, type context$1_BulkSaveDataItemsOptions as BulkSaveDataItemsOptions, type context$1_BulkSaveDataItemsRequest as BulkSaveDataItemsRequest, type context$1_BulkSaveDataItemsResponse as BulkSaveDataItemsResponse, type context$1_BulkSaveDataItemsResponseNonNullableFields as BulkSaveDataItemsResponseNonNullableFields, type context$1_BulkUpdateDataItemsOptions as BulkUpdateDataItemsOptions, type context$1_BulkUpdateDataItemsRequest as BulkUpdateDataItemsRequest, type context$1_BulkUpdateDataItemsResponse as BulkUpdateDataItemsResponse, type context$1_BulkUpdateDataItemsResponseNonNullableFields as BulkUpdateDataItemsResponseNonNullableFields, type context$1_CachingInfo as CachingInfo, type context$1_Count as Count, type context$1_CountDataItemsOptions as CountDataItemsOptions, type context$1_CountDataItemsRequest as CountDataItemsRequest, type context$1_CountDataItemsResponse as CountDataItemsResponse, type context$1_CountDataItemsResponseNonNullableFields as CountDataItemsResponseNonNullableFields, type context$1_CursorPaging as CursorPaging, type context$1_Cursors as Cursors, type context$1_DataItem as DataItem, type context$1_DataItemCreatedEnvelope as DataItemCreatedEnvelope, type context$1_DataItemDeletedEnvelope as DataItemDeletedEnvelope, type context$1_DataItemNonNullableFields as DataItemNonNullableFields, type context$1_DataItemReference as DataItemReference, type context$1_DataItemUpdatedEnvelope as DataItemUpdatedEnvelope, type context$1_DataItemsQueryBuilder as DataItemsQueryBuilder, type context$1_DataItemsQueryResult as DataItemsQueryResult, type context$1_DataPublishPluginOptions as DataPublishPluginOptions, type context$1_DomainEvent as DomainEvent, type context$1_DomainEventBodyOneOf as DomainEventBodyOneOf, type context$1_EntityCreatedEvent as EntityCreatedEvent, type context$1_EntityDeletedEvent as EntityDeletedEvent, type context$1_EntityUpdatedEvent as EntityUpdatedEvent, Environment$1 as Environment, type context$1_EventMetadata as EventMetadata, type context$1_FieldUpdate as FieldUpdate, type context$1_FieldUpdateActionOptionsOneOf as FieldUpdateActionOptionsOneOf, type context$1_GetDataItemOptions as GetDataItemOptions, type context$1_GetDataItemRequest as GetDataItemRequest, type context$1_GetDataItemResponse as GetDataItemResponse, type context$1_GetDataItemResponseNonNullableFields as GetDataItemResponseNonNullableFields, type context$1_IdentificationData as IdentificationData, type context$1_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type context$1_IncrementField as IncrementField, type context$1_InsertDataItemOptions as InsertDataItemOptions, type context$1_InsertDataItemReferenceOptions as InsertDataItemReferenceOptions, type context$1_InsertDataItemReferenceRequest as InsertDataItemReferenceRequest, type context$1_InsertDataItemReferenceResponse as InsertDataItemReferenceResponse, type context$1_InsertDataItemReferenceResponseNonNullableFields as InsertDataItemReferenceResponseNonNullableFields, type context$1_InsertDataItemRequest as InsertDataItemRequest, type context$1_InsertDataItemResponse as InsertDataItemResponse, type context$1_InsertDataItemResponseNonNullableFields as InsertDataItemResponseNonNullableFields, type context$1_IsReferencedDataItemOptions as IsReferencedDataItemOptions, type context$1_IsReferencedDataItemRequest as IsReferencedDataItemRequest, type context$1_IsReferencedDataItemResponse as IsReferencedDataItemResponse, type context$1_IsReferencedDataItemResponseNonNullableFields as IsReferencedDataItemResponseNonNullableFields, type context$1_ItemMetadata as ItemMetadata, type context$1_Max as Max, type context$1_MessageEnvelope as MessageEnvelope, type context$1_Min as Min, type context$1_Operation as Operation, type context$1_OperationCalculateOneOf as OperationCalculateOneOf, type context$1_Options as Options, type Paging$1 as Paging, type context$1_PagingMetadataV2 as PagingMetadataV2, type context$1_PatchDataItemRequest as PatchDataItemRequest, type context$1_PatchDataItemResponse as PatchDataItemResponse, type context$1_PatchSet as PatchSet, type context$1_PublishPluginOptions as PublishPluginOptions, type context$1_QueryDataItemsOptions as QueryDataItemsOptions, type context$1_QueryDataItemsRequest as QueryDataItemsRequest, type context$1_QueryDataItemsResponse as QueryDataItemsResponse, type context$1_QueryDataItemsResponseNonNullableFields as QueryDataItemsResponseNonNullableFields, type context$1_QueryDistinctValuesOptions as QueryDistinctValuesOptions, type context$1_QueryDistinctValuesRequest as QueryDistinctValuesRequest, type context$1_QueryDistinctValuesRequestPagingMethodOneOf as QueryDistinctValuesRequestPagingMethodOneOf, type context$1_QueryDistinctValuesResponse as QueryDistinctValuesResponse, type context$1_QueryReferencedDataItemsOptions as QueryReferencedDataItemsOptions, type context$1_QueryReferencedDataItemsRequest as QueryReferencedDataItemsRequest, type context$1_QueryReferencedDataItemsRequestPagingMethodOneOf as QueryReferencedDataItemsRequestPagingMethodOneOf, type context$1_QueryReferencedDataItemsResponse as QueryReferencedDataItemsResponse, type context$1_QueryReferencedDataItemsResponseNonNullableFields as QueryReferencedDataItemsResponseNonNullableFields, type context$1_QueryV2 as QueryV2, type context$1_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type context$1_ReferencedItemOptions as ReferencedItemOptions, type context$1_ReferencedResult as ReferencedResult, type context$1_ReferencedResultEntityOneOf as ReferencedResultEntityOneOf, type context$1_RemoveDataItemOptions as RemoveDataItemOptions, type context$1_RemoveDataItemReferenceOptions as RemoveDataItemReferenceOptions, type context$1_RemoveDataItemReferenceRequest as RemoveDataItemReferenceRequest, type context$1_RemoveDataItemReferenceResponse as RemoveDataItemReferenceResponse, type context$1_RemoveDataItemReferenceResponseNonNullableFields as RemoveDataItemReferenceResponseNonNullableFields, type context$1_RemoveDataItemRequest as RemoveDataItemRequest, type context$1_RemoveDataItemResponse as RemoveDataItemResponse, type context$1_RemoveDataItemResponseNonNullableFields as RemoveDataItemResponseNonNullableFields, type context$1_RemoveFromArray as RemoveFromArray, type context$1_ReplaceDataItemReferencesOptions as ReplaceDataItemReferencesOptions, type context$1_ReplaceDataItemReferencesRequest as ReplaceDataItemReferencesRequest, type context$1_ReplaceDataItemReferencesResponse as ReplaceDataItemReferencesResponse, type context$1_ReplaceDataItemReferencesResponseNonNullableFields as ReplaceDataItemReferencesResponseNonNullableFields, type context$1_RestoreInfo as RestoreInfo, type context$1_SaveDataItemOptions as SaveDataItemOptions, type context$1_SaveDataItemRequest as SaveDataItemRequest, type context$1_SaveDataItemResponse as SaveDataItemResponse, type context$1_SaveDataItemResponseNonNullableFields as SaveDataItemResponseNonNullableFields, type context$1_SetField as SetField, context$1_SortOrder as SortOrder, type context$1_Sorting as Sorting, type context$1_Sum as Sum, type context$1_TruncateDataItemsOptions as TruncateDataItemsOptions, type context$1_TruncateDataItemsRequest as TruncateDataItemsRequest, type context$1_TruncateDataItemsResponse as TruncateDataItemsResponse, type context$1_UnresolvedReference as UnresolvedReference, type context$1_UpdateDataItemOptions as UpdateDataItemOptions, type context$1_UpdateDataItemRequest as UpdateDataItemRequest, type context$1_UpdateDataItemResponse as UpdateDataItemResponse, type context$1_UpdateDataItemResponseNonNullableFields as UpdateDataItemResponseNonNullableFields, context$1_WebhookIdentityType as WebhookIdentityType, type context$1__publicOnDataItemCreatedType as _publicOnDataItemCreatedType, type context$1__publicOnDataItemDeletedType as _publicOnDataItemDeletedType, type context$1__publicOnDataItemUpdatedType as _publicOnDataItemUpdatedType, context$1_aggregateDataItems as aggregateDataItems, context$1_bulkInsertDataItemReferences as bulkInsertDataItemReferences, context$1_bulkInsertDataItems as bulkInsertDataItems, context$1_bulkRemoveDataItemReferences as bulkRemoveDataItemReferences, context$1_bulkRemoveDataItems as bulkRemoveDataItems, context$1_bulkSaveDataItems as bulkSaveDataItems, context$1_bulkUpdateDataItems as bulkUpdateDataItems, context$1_countDataItems as countDataItems, context$1_getDataItem as getDataItem, context$1_insertDataItem as insertDataItem, context$1_insertDataItemReference as insertDataItemReference, context$1_isReferencedDataItem as isReferencedDataItem, context$1_onDataItemCreated as onDataItemCreated, context$1_onDataItemDeleted as onDataItemDeleted, context$1_onDataItemUpdated as onDataItemUpdated, onDataItemCreated$1 as publicOnDataItemCreated, onDataItemDeleted$1 as publicOnDataItemDeleted, onDataItemUpdated$1 as publicOnDataItemUpdated, context$1_queryDataItems as queryDataItems, context$1_queryDistinctValues as queryDistinctValues, context$1_queryReferencedDataItems as queryReferencedDataItems, context$1_removeDataItem as removeDataItem, context$1_removeDataItemReference as removeDataItemReference, context$1_replaceDataItemReferences as replaceDataItemReferences, context$1_saveDataItem as saveDataItem, context$1_truncateDataItems as truncateDataItems, context$1_updateDataItem as updateDataItem };
|
|
6479
|
+
declare global {
|
|
6480
|
+
interface ContextualClient {
|
|
6481
|
+
}
|
|
5038
6482
|
}
|
|
6483
|
+
/**
|
|
6484
|
+
* A type used to create concerete types from SDK descriptors in
|
|
6485
|
+
* case a contextual client is available.
|
|
6486
|
+
*/
|
|
6487
|
+
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
6488
|
+
host: Host;
|
|
6489
|
+
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
5039
6490
|
|
|
5040
6491
|
/** An index is a map of a collection's data, organized according to specific fields to increase query speed. */
|
|
5041
6492
|
interface Index {
|
|
@@ -5181,6 +6632,23 @@ interface PagingMetadata {
|
|
|
5181
6632
|
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
5182
6633
|
tooManyToCount?: boolean | null;
|
|
5183
6634
|
}
|
|
6635
|
+
interface ListAvailableIndexesRequest {
|
|
6636
|
+
/** Data collection to show available indexes for */
|
|
6637
|
+
dataCollectionId?: string;
|
|
6638
|
+
}
|
|
6639
|
+
interface ListAvailableIndexesResponse {
|
|
6640
|
+
/**
|
|
6641
|
+
* limit of regular single-field indexes, even if 0 1-field indices may be created using
|
|
6642
|
+
* 3-field quota (if available)
|
|
6643
|
+
*/
|
|
6644
|
+
regular1Field?: number;
|
|
6645
|
+
/** limit of regular indexes up to 3-fields (in addition to 1-field indexes quota) */
|
|
6646
|
+
regular3Field?: number;
|
|
6647
|
+
/** limit of unique indexes */
|
|
6648
|
+
unique1Field?: number;
|
|
6649
|
+
/** Overall index limit, missing value means there's no overall limit */
|
|
6650
|
+
total?: number | null;
|
|
6651
|
+
}
|
|
5184
6652
|
interface FieldNonNullableFields {
|
|
5185
6653
|
path: string;
|
|
5186
6654
|
order: Order;
|
|
@@ -5270,6 +6738,8 @@ type context_Failure = Failure;
|
|
|
5270
6738
|
type context_Field = Field;
|
|
5271
6739
|
type context_Index = Index;
|
|
5272
6740
|
type context_IndexNonNullableFields = IndexNonNullableFields;
|
|
6741
|
+
type context_ListAvailableIndexesRequest = ListAvailableIndexesRequest;
|
|
6742
|
+
type context_ListAvailableIndexesResponse = ListAvailableIndexesResponse;
|
|
5273
6743
|
type context_ListIndexesOptions = ListIndexesOptions;
|
|
5274
6744
|
type context_ListIndexesRequest = ListIndexesRequest;
|
|
5275
6745
|
type context_ListIndexesResponse = ListIndexesResponse;
|
|
@@ -5284,7 +6754,7 @@ declare const context_createIndex: typeof createIndex;
|
|
|
5284
6754
|
declare const context_dropIndex: typeof dropIndex;
|
|
5285
6755
|
declare const context_listIndexes: typeof listIndexes;
|
|
5286
6756
|
declare namespace context {
|
|
5287
|
-
export { type context_CreateIndexRequest as CreateIndexRequest, type context_CreateIndexResponse as CreateIndexResponse, type context_CreateIndexResponseNonNullableFields as CreateIndexResponseNonNullableFields, type context_DropIndexRequest as DropIndexRequest, type context_DropIndexResponse as DropIndexResponse, context_Environment as Environment, type context_Failure as Failure, type context_Field as Field, type context_Index as Index, type context_IndexNonNullableFields as IndexNonNullableFields, type context_ListIndexesOptions as ListIndexesOptions, type context_ListIndexesRequest as ListIndexesRequest, type context_ListIndexesResponse as ListIndexesResponse, type context_ListIndexesResponseNonNullableFields as ListIndexesResponseNonNullableFields, context_Order as Order, type context_Paging as Paging, type context_PagingMetadata as PagingMetadata, context_Status as Status, context_createIndex as createIndex, context_dropIndex as dropIndex, context_listIndexes as listIndexes };
|
|
6757
|
+
export { type context_CreateIndexRequest as CreateIndexRequest, type context_CreateIndexResponse as CreateIndexResponse, type context_CreateIndexResponseNonNullableFields as CreateIndexResponseNonNullableFields, type context_DropIndexRequest as DropIndexRequest, type context_DropIndexResponse as DropIndexResponse, context_Environment as Environment, type context_Failure as Failure, type context_Field as Field, type context_Index as Index, type context_IndexNonNullableFields as IndexNonNullableFields, type context_ListAvailableIndexesRequest as ListAvailableIndexesRequest, type context_ListAvailableIndexesResponse as ListAvailableIndexesResponse, type context_ListIndexesOptions as ListIndexesOptions, type context_ListIndexesRequest as ListIndexesRequest, type context_ListIndexesResponse as ListIndexesResponse, type context_ListIndexesResponseNonNullableFields as ListIndexesResponseNonNullableFields, context_Order as Order, type context_Paging as Paging, type context_PagingMetadata as PagingMetadata, context_Status as Status, context_createIndex as createIndex, context_dropIndex as dropIndex, context_listIndexes as listIndexes };
|
|
5288
6758
|
}
|
|
5289
6759
|
|
|
5290
6760
|
export { context$2 as collections, context$3 as externalDatabaseConnections, context as indexes, context$1 as items };
|