@wix/data 1.0.156 → 1.0.158
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/type-bundles/context.bundle.d.ts +910 -2133
- package/type-bundles/index.bundle.d.ts +910 -2133
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
type HostModule
|
|
1
|
+
type HostModule<T, H extends Host> = {
|
|
2
2
|
__type: 'host';
|
|
3
3
|
create(host: H): T;
|
|
4
4
|
};
|
|
5
|
-
type HostModuleAPI
|
|
6
|
-
type Host
|
|
5
|
+
type HostModuleAPI<T extends HostModule<any, any>> = T extends HostModule<infer U, any> ? U : never;
|
|
6
|
+
type Host<Environment = unknown> = {
|
|
7
7
|
channel: {
|
|
8
8
|
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
9
9
|
disconnect: () => void;
|
|
@@ -36,92 +36,92 @@ type Host$3<Environment = unknown> = {
|
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
type RESTFunctionDescriptor
|
|
40
|
-
interface HttpClient
|
|
41
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
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>>;
|
|
42
42
|
fetchWithAuth: typeof fetch;
|
|
43
43
|
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
44
44
|
getActiveToken?: () => string | undefined;
|
|
45
45
|
}
|
|
46
|
-
type RequestOptionsFactory
|
|
47
|
-
type HttpResponse
|
|
46
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
47
|
+
type HttpResponse<T = any> = {
|
|
48
48
|
data: T;
|
|
49
49
|
status: number;
|
|
50
50
|
statusText: string;
|
|
51
51
|
headers: any;
|
|
52
52
|
request?: any;
|
|
53
53
|
};
|
|
54
|
-
type RequestOptions
|
|
54
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
55
55
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
56
56
|
url: string;
|
|
57
57
|
data?: Data;
|
|
58
58
|
params?: URLSearchParams;
|
|
59
|
-
} & APIMetadata
|
|
60
|
-
type APIMetadata
|
|
59
|
+
} & APIMetadata;
|
|
60
|
+
type APIMetadata = {
|
|
61
61
|
methodFqn?: string;
|
|
62
62
|
entityFqdn?: string;
|
|
63
63
|
packageName?: string;
|
|
64
64
|
};
|
|
65
|
-
type BuildRESTFunction
|
|
66
|
-
type EventDefinition$
|
|
65
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
66
|
+
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
67
67
|
__type: 'event-definition';
|
|
68
68
|
type: Type;
|
|
69
69
|
isDomainEvent?: boolean;
|
|
70
70
|
transformations?: (envelope: unknown) => Payload;
|
|
71
71
|
__payload: Payload;
|
|
72
72
|
};
|
|
73
|
-
declare function EventDefinition$
|
|
74
|
-
type EventHandler$
|
|
75
|
-
type BuildEventDefinition$
|
|
73
|
+
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
74
|
+
type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
|
|
75
|
+
type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
|
|
76
76
|
|
|
77
|
-
type ServicePluginMethodInput
|
|
77
|
+
type ServicePluginMethodInput = {
|
|
78
78
|
request: any;
|
|
79
79
|
metadata: any;
|
|
80
80
|
};
|
|
81
|
-
type ServicePluginContract
|
|
82
|
-
type ServicePluginMethodMetadata
|
|
81
|
+
type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
82
|
+
type ServicePluginMethodMetadata = {
|
|
83
83
|
name: string;
|
|
84
84
|
primaryHttpMappingPath: string;
|
|
85
85
|
transformations: {
|
|
86
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput
|
|
86
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput;
|
|
87
87
|
toREST: (...args: unknown[]) => unknown;
|
|
88
88
|
};
|
|
89
89
|
};
|
|
90
|
-
type ServicePluginDefinition
|
|
90
|
+
type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
91
91
|
__type: 'service-plugin-definition';
|
|
92
92
|
componentType: string;
|
|
93
|
-
methods: ServicePluginMethodMetadata
|
|
93
|
+
methods: ServicePluginMethodMetadata[];
|
|
94
94
|
__contract: Contract;
|
|
95
95
|
};
|
|
96
|
-
declare function ServicePluginDefinition
|
|
97
|
-
type BuildServicePluginDefinition
|
|
98
|
-
declare const SERVICE_PLUGIN_ERROR_TYPE
|
|
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";
|
|
99
99
|
|
|
100
|
-
type RequestContext
|
|
100
|
+
type RequestContext = {
|
|
101
101
|
isSSR: boolean;
|
|
102
102
|
host: string;
|
|
103
103
|
protocol?: string;
|
|
104
104
|
};
|
|
105
|
-
type ResponseTransformer
|
|
105
|
+
type ResponseTransformer = (data: any, headers?: any) => any;
|
|
106
106
|
/**
|
|
107
107
|
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
108
108
|
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
109
109
|
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
110
110
|
*/
|
|
111
|
-
type Method
|
|
112
|
-
type AmbassadorRequestOptions
|
|
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> = {
|
|
113
113
|
_?: T;
|
|
114
114
|
url?: string;
|
|
115
|
-
method?: Method
|
|
115
|
+
method?: Method;
|
|
116
116
|
params?: any;
|
|
117
117
|
data?: any;
|
|
118
|
-
transformResponse?: ResponseTransformer
|
|
118
|
+
transformResponse?: ResponseTransformer | ResponseTransformer[];
|
|
119
119
|
};
|
|
120
|
-
type AmbassadorFactory
|
|
120
|
+
type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
|
|
121
121
|
__isAmbassador: boolean;
|
|
122
122
|
};
|
|
123
|
-
type AmbassadorFunctionDescriptor
|
|
124
|
-
type BuildAmbassadorFunction
|
|
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;
|
|
125
125
|
|
|
126
126
|
declare global {
|
|
127
127
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -130,7 +130,7 @@ declare global {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
declare const emptyObjectSymbol
|
|
133
|
+
declare const emptyObjectSymbol: unique symbol;
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
Represents a strictly empty plain object, the `{}` value.
|
|
@@ -158,7 +158,7 @@ Unfortunately, `Record<string, never>`, `Record<keyof any, never>` and `Record<n
|
|
|
158
158
|
|
|
159
159
|
@category Object
|
|
160
160
|
*/
|
|
161
|
-
type EmptyObject
|
|
161
|
+
type EmptyObject = {[emptyObjectSymbol]?: never};
|
|
162
162
|
|
|
163
163
|
/**
|
|
164
164
|
Returns a boolean for whether the two given types are equal.
|
|
@@ -186,7 +186,7 @@ type Includes<Value extends readonly any[], Item> =
|
|
|
186
186
|
@category Type Guard
|
|
187
187
|
@category Utilities
|
|
188
188
|
*/
|
|
189
|
-
type IsEqual
|
|
189
|
+
type IsEqual<A, B> =
|
|
190
190
|
(<G>() => G extends A ? 1 : 2) extends
|
|
191
191
|
(<G>() => G extends B ? 1 : 2)
|
|
192
192
|
? true
|
|
@@ -219,9 +219,9 @@ type Filtered = Filter<'bar', 'foo'>;
|
|
|
219
219
|
|
|
220
220
|
@see {Except}
|
|
221
221
|
*/
|
|
222
|
-
type Filter
|
|
222
|
+
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
223
223
|
|
|
224
|
-
type ExceptOptions
|
|
224
|
+
type ExceptOptions = {
|
|
225
225
|
/**
|
|
226
226
|
Disallow assigning non-specified properties.
|
|
227
227
|
|
|
@@ -265,8 +265,8 @@ const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
|
265
265
|
|
|
266
266
|
@category Object
|
|
267
267
|
*/
|
|
268
|
-
type Except
|
|
269
|
-
[KeyType in keyof ObjectType as Filter
|
|
268
|
+
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
|
|
269
|
+
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
270
270
|
} & (Options['requireExactProps'] extends true
|
|
271
271
|
? Partial<Record<KeysType, never>>
|
|
272
272
|
: {});
|
|
@@ -303,7 +303,7 @@ type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
|
303
303
|
|
|
304
304
|
@category Object
|
|
305
305
|
*/
|
|
306
|
-
type ConditionalKeys
|
|
306
|
+
type ConditionalKeys<Base, Condition> = NonNullable<
|
|
307
307
|
// Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
|
|
308
308
|
{
|
|
309
309
|
// Map through all the keys of the given base type.
|
|
@@ -357,9 +357,9 @@ type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
|
357
357
|
|
|
358
358
|
@category Object
|
|
359
359
|
*/
|
|
360
|
-
type ConditionalExcept
|
|
360
|
+
type ConditionalExcept<Base, Condition> = Except<
|
|
361
361
|
Base,
|
|
362
|
-
ConditionalKeys
|
|
362
|
+
ConditionalKeys<Base, Condition>
|
|
363
363
|
>;
|
|
364
364
|
|
|
365
365
|
/**
|
|
@@ -367,8 +367,8 @@ ConditionalKeys$3<Base, Condition>
|
|
|
367
367
|
* can either be a REST module or a host module.
|
|
368
368
|
* This type is recursive, so it can describe nested modules.
|
|
369
369
|
*/
|
|
370
|
-
type Descriptors
|
|
371
|
-
[key: string]: Descriptors
|
|
370
|
+
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition$3<any> | ServicePluginDefinition<any> | {
|
|
371
|
+
[key: string]: Descriptors | PublicMetadata | any;
|
|
372
372
|
};
|
|
373
373
|
/**
|
|
374
374
|
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
@@ -376,12 +376,12 @@ type Descriptors$3 = RESTFunctionDescriptor$3 | AmbassadorFunctionDescriptor$3 |
|
|
|
376
376
|
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
377
377
|
* do not match the given host (as they will not work with the given host).
|
|
378
378
|
*/
|
|
379
|
-
type BuildDescriptors
|
|
379
|
+
type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, Depth extends number = 5> = {
|
|
380
380
|
done: T;
|
|
381
381
|
recurse: T extends {
|
|
382
|
-
__type: typeof SERVICE_PLUGIN_ERROR_TYPE
|
|
383
|
-
} ? never : T extends AmbassadorFunctionDescriptor
|
|
384
|
-
[Key in keyof T]: T[Key] extends Descriptors
|
|
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, [
|
|
385
385
|
-1,
|
|
386
386
|
0,
|
|
387
387
|
1,
|
|
@@ -390,9 +390,9 @@ type BuildDescriptors$3<T extends Descriptors$3, H extends Host$3<any> | undefin
|
|
|
390
390
|
4,
|
|
391
391
|
5
|
|
392
392
|
][Depth]> : never;
|
|
393
|
-
}, EmptyObject
|
|
393
|
+
}, EmptyObject>;
|
|
394
394
|
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
395
|
-
type PublicMetadata
|
|
395
|
+
type PublicMetadata = {
|
|
396
396
|
PACKAGE_NAME?: string;
|
|
397
397
|
};
|
|
398
398
|
|
|
@@ -404,9 +404,9 @@ declare global {
|
|
|
404
404
|
* A type used to create concerete types from SDK descriptors in
|
|
405
405
|
* case a contextual client is available.
|
|
406
406
|
*/
|
|
407
|
-
type MaybeContext
|
|
408
|
-
host: Host
|
|
409
|
-
} ? BuildDescriptors
|
|
407
|
+
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
408
|
+
host: Host;
|
|
409
|
+
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
410
410
|
|
|
411
411
|
/** An external database connection defines a connection between an external database and a Wix site or project. */
|
|
412
412
|
interface ExternalDatabaseConnection {
|
|
@@ -825,7 +825,7 @@ interface UpdateExternalDatabaseConnection {
|
|
|
825
825
|
capabilities?: Capabilities;
|
|
826
826
|
}
|
|
827
827
|
|
|
828
|
-
declare function getExternalDatabaseConnection$1(httpClient: HttpClient
|
|
828
|
+
declare function getExternalDatabaseConnection$1(httpClient: HttpClient): GetExternalDatabaseConnectionSignature;
|
|
829
829
|
interface GetExternalDatabaseConnectionSignature {
|
|
830
830
|
/**
|
|
831
831
|
* Retrieves an external database connection by name.
|
|
@@ -834,14 +834,14 @@ interface GetExternalDatabaseConnectionSignature {
|
|
|
834
834
|
*/
|
|
835
835
|
(name: string): Promise<ExternalDatabaseConnection & ExternalDatabaseConnectionNonNullableFields>;
|
|
836
836
|
}
|
|
837
|
-
declare function listExternalDatabaseConnections$1(httpClient: HttpClient
|
|
837
|
+
declare function listExternalDatabaseConnections$1(httpClient: HttpClient): ListExternalDatabaseConnectionsSignature;
|
|
838
838
|
interface ListExternalDatabaseConnectionsSignature {
|
|
839
839
|
/**
|
|
840
840
|
* Retrieves a list of all external database collections associated with the site or project.
|
|
841
841
|
*/
|
|
842
842
|
(options?: ListExternalDatabaseConnectionsOptions | undefined): Promise<ListExternalDatabaseConnectionsResponse & ListExternalDatabaseConnectionsResponseNonNullableFields>;
|
|
843
843
|
}
|
|
844
|
-
declare function createExternalDatabaseConnection$1(httpClient: HttpClient
|
|
844
|
+
declare function createExternalDatabaseConnection$1(httpClient: HttpClient): CreateExternalDatabaseConnectionSignature;
|
|
845
845
|
interface CreateExternalDatabaseConnectionSignature {
|
|
846
846
|
/**
|
|
847
847
|
* Creates a new external database connection.
|
|
@@ -854,7 +854,7 @@ interface CreateExternalDatabaseConnectionSignature {
|
|
|
854
854
|
*/
|
|
855
855
|
(externalDatabaseConnection: ExternalDatabaseConnection, options: CreateExternalDatabaseConnectionOptions): Promise<ExternalDatabaseConnection & ExternalDatabaseConnectionNonNullableFields>;
|
|
856
856
|
}
|
|
857
|
-
declare function updateExternalDatabaseConnection$1(httpClient: HttpClient
|
|
857
|
+
declare function updateExternalDatabaseConnection$1(httpClient: HttpClient): UpdateExternalDatabaseConnectionSignature;
|
|
858
858
|
interface UpdateExternalDatabaseConnectionSignature {
|
|
859
859
|
/**
|
|
860
860
|
* Updates an external database connection.
|
|
@@ -873,7 +873,7 @@ interface UpdateExternalDatabaseConnectionSignature {
|
|
|
873
873
|
*/
|
|
874
874
|
(name: string, externalDatabaseConnection: UpdateExternalDatabaseConnection): Promise<ExternalDatabaseConnection & ExternalDatabaseConnectionNonNullableFields>;
|
|
875
875
|
}
|
|
876
|
-
declare function deleteExternalDatabaseConnection$1(httpClient: HttpClient
|
|
876
|
+
declare function deleteExternalDatabaseConnection$1(httpClient: HttpClient): DeleteExternalDatabaseConnectionSignature;
|
|
877
877
|
interface DeleteExternalDatabaseConnectionSignature {
|
|
878
878
|
/**
|
|
879
879
|
* Deletes an external database connection.
|
|
@@ -883,20 +883,20 @@ interface DeleteExternalDatabaseConnectionSignature {
|
|
|
883
883
|
*/
|
|
884
884
|
(name: string): Promise<void>;
|
|
885
885
|
}
|
|
886
|
-
declare const onExternalDatabaseConnectionCreated$1: EventDefinition$
|
|
887
|
-
declare const onExternalDatabaseConnectionUpdated$1: EventDefinition$
|
|
888
|
-
declare const onExternalDatabaseConnectionDeleted$1: EventDefinition$
|
|
886
|
+
declare const onExternalDatabaseConnectionCreated$1: EventDefinition$3<ExternalDatabaseConnectionCreatedEnvelope, "wix.data.v1.external_database_connection_created">;
|
|
887
|
+
declare const onExternalDatabaseConnectionUpdated$1: EventDefinition$3<ExternalDatabaseConnectionUpdatedEnvelope, "wix.data.v1.external_database_connection_updated">;
|
|
888
|
+
declare const onExternalDatabaseConnectionDeleted$1: EventDefinition$3<ExternalDatabaseConnectionDeletedEnvelope, "wix.data.v1.external_database_connection_deleted">;
|
|
889
889
|
|
|
890
|
-
type EventDefinition$
|
|
890
|
+
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
891
891
|
__type: 'event-definition';
|
|
892
892
|
type: Type;
|
|
893
893
|
isDomainEvent?: boolean;
|
|
894
894
|
transformations?: (envelope: unknown) => Payload;
|
|
895
895
|
__payload: Payload;
|
|
896
896
|
};
|
|
897
|
-
declare function EventDefinition$
|
|
898
|
-
type EventHandler$
|
|
899
|
-
type BuildEventDefinition$
|
|
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
900
|
|
|
901
901
|
declare global {
|
|
902
902
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -905,13 +905,13 @@ declare global {
|
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
907
|
|
|
908
|
-
declare function createEventModule$2<T extends EventDefinition$
|
|
908
|
+
declare function createEventModule$2<T extends EventDefinition$2<any, string>>(eventDefinition: T): BuildEventDefinition$2<T> & T;
|
|
909
909
|
|
|
910
|
-
declare const getExternalDatabaseConnection: MaybeContext
|
|
911
|
-
declare const listExternalDatabaseConnections: MaybeContext
|
|
912
|
-
declare const createExternalDatabaseConnection: MaybeContext
|
|
913
|
-
declare const updateExternalDatabaseConnection: MaybeContext
|
|
914
|
-
declare const deleteExternalDatabaseConnection: MaybeContext
|
|
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>;
|
|
915
915
|
|
|
916
916
|
type _publicOnExternalDatabaseConnectionCreatedType = typeof onExternalDatabaseConnectionCreated$1;
|
|
917
917
|
/**
|
|
@@ -980,498 +980,88 @@ declare namespace context$3 {
|
|
|
980
980
|
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
981
|
}
|
|
982
982
|
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
type HostModuleAPI$2<T extends HostModule$2<any, any>> = T extends HostModule$2<infer U, any> ? U : never;
|
|
988
|
-
type Host$2<Environment = unknown> = {
|
|
989
|
-
channel: {
|
|
990
|
-
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
991
|
-
disconnect: () => void;
|
|
992
|
-
} | Promise<{
|
|
993
|
-
disconnect: () => void;
|
|
994
|
-
}>;
|
|
995
|
-
};
|
|
996
|
-
environment?: Environment;
|
|
983
|
+
/** A data collection determines the structure of data to be stored in a database. */
|
|
984
|
+
interface DataCollection {
|
|
985
|
+
/** Collection ID. For example, `my-first-collection`. May include a namespace. */
|
|
986
|
+
_id?: string;
|
|
997
987
|
/**
|
|
998
|
-
*
|
|
988
|
+
* Collection type. Indicates how the collection was created and is stored.
|
|
989
|
+
*
|
|
990
|
+
* * `NATIVE`: User-created collection.
|
|
991
|
+
* * `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.
|
|
992
|
+
* * `BLOCKS_APP`: Collection created by a Wix Blocks app.
|
|
993
|
+
* * `EXTERNAL`: Collection located in externally connected storage.
|
|
994
|
+
* @readonly
|
|
999
995
|
*/
|
|
1000
|
-
|
|
996
|
+
collectionType?: CollectionType;
|
|
1001
997
|
/**
|
|
1002
|
-
*
|
|
1003
|
-
*
|
|
998
|
+
* ID of the app that defined this collection. For user-defined collections, this value is null.
|
|
999
|
+
* @readonly
|
|
1004
1000
|
*/
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
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;
|
|
1050
|
+
/**
|
|
1051
|
+
* Date the collection was last updated.
|
|
1052
|
+
* @readonly
|
|
1053
|
+
*/
|
|
1054
|
+
_updatedDate?: Date;
|
|
1027
1055
|
}
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1038
|
-
url: string;
|
|
1039
|
-
data?: Data;
|
|
1040
|
-
params?: URLSearchParams;
|
|
1041
|
-
} & APIMetadata$2;
|
|
1042
|
-
type APIMetadata$2 = {
|
|
1043
|
-
methodFqn?: string;
|
|
1044
|
-
entityFqdn?: string;
|
|
1045
|
-
packageName?: string;
|
|
1046
|
-
};
|
|
1047
|
-
type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
|
|
1048
|
-
type EventDefinition$4<Payload = unknown, Type extends string = string> = {
|
|
1049
|
-
__type: 'event-definition';
|
|
1050
|
-
type: Type;
|
|
1051
|
-
isDomainEvent?: boolean;
|
|
1052
|
-
transformations?: (envelope: unknown) => Payload;
|
|
1053
|
-
__payload: Payload;
|
|
1054
|
-
};
|
|
1055
|
-
declare function EventDefinition$4<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$4<Payload, Type>;
|
|
1056
|
-
type EventHandler$4<T extends EventDefinition$4> = (payload: T['__payload']) => void | Promise<void>;
|
|
1057
|
-
type BuildEventDefinition$4<T extends EventDefinition$4<any, string>> = (handler: EventHandler$4<T>) => void;
|
|
1058
|
-
|
|
1059
|
-
type ServicePluginMethodInput$2 = {
|
|
1060
|
-
request: any;
|
|
1061
|
-
metadata: any;
|
|
1062
|
-
};
|
|
1063
|
-
type ServicePluginContract$2 = Record<string, (payload: ServicePluginMethodInput$2) => unknown | Promise<unknown>>;
|
|
1064
|
-
type ServicePluginMethodMetadata$2 = {
|
|
1065
|
-
name: string;
|
|
1066
|
-
primaryHttpMappingPath: string;
|
|
1067
|
-
transformations: {
|
|
1068
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput$2;
|
|
1069
|
-
toREST: (...args: unknown[]) => unknown;
|
|
1070
|
-
};
|
|
1071
|
-
};
|
|
1072
|
-
type ServicePluginDefinition$2<Contract extends ServicePluginContract$2> = {
|
|
1073
|
-
__type: 'service-plugin-definition';
|
|
1074
|
-
componentType: string;
|
|
1075
|
-
methods: ServicePluginMethodMetadata$2[];
|
|
1076
|
-
__contract: Contract;
|
|
1077
|
-
};
|
|
1078
|
-
declare function ServicePluginDefinition$2<Contract extends ServicePluginContract$2>(componentType: string, methods: ServicePluginMethodMetadata$2[]): ServicePluginDefinition$2<Contract>;
|
|
1079
|
-
type BuildServicePluginDefinition$2<T extends ServicePluginDefinition$2<any>> = (implementation: T['__contract']) => void;
|
|
1080
|
-
declare const SERVICE_PLUGIN_ERROR_TYPE$2 = "wix_spi_error";
|
|
1081
|
-
|
|
1082
|
-
type RequestContext$2 = {
|
|
1083
|
-
isSSR: boolean;
|
|
1084
|
-
host: string;
|
|
1085
|
-
protocol?: string;
|
|
1086
|
-
};
|
|
1087
|
-
type ResponseTransformer$2 = (data: any, headers?: any) => any;
|
|
1088
|
-
/**
|
|
1089
|
-
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
1090
|
-
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
1091
|
-
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
1092
|
-
*/
|
|
1093
|
-
type Method$2 = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
1094
|
-
type AmbassadorRequestOptions$2<T = any> = {
|
|
1095
|
-
_?: T;
|
|
1096
|
-
url?: string;
|
|
1097
|
-
method?: Method$2;
|
|
1098
|
-
params?: any;
|
|
1099
|
-
data?: any;
|
|
1100
|
-
transformResponse?: ResponseTransformer$2 | ResponseTransformer$2[];
|
|
1101
|
-
};
|
|
1102
|
-
type AmbassadorFactory$2<Request, Response> = (payload: Request) => ((context: RequestContext$2) => AmbassadorRequestOptions$2<Response>) & {
|
|
1103
|
-
__isAmbassador: boolean;
|
|
1104
|
-
};
|
|
1105
|
-
type AmbassadorFunctionDescriptor$2<Request = any, Response = any> = AmbassadorFactory$2<Request, Response>;
|
|
1106
|
-
type BuildAmbassadorFunction$2<T extends AmbassadorFunctionDescriptor$2> = T extends AmbassadorFunctionDescriptor$2<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
1107
|
-
|
|
1108
|
-
declare global {
|
|
1109
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1110
|
-
interface SymbolConstructor {
|
|
1111
|
-
readonly observable: symbol;
|
|
1112
|
-
}
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
|
-
declare const emptyObjectSymbol$2: unique symbol;
|
|
1116
|
-
|
|
1117
|
-
/**
|
|
1118
|
-
Represents a strictly empty plain object, the `{}` value.
|
|
1119
|
-
|
|
1120
|
-
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)).
|
|
1121
|
-
|
|
1122
|
-
@example
|
|
1123
|
-
```
|
|
1124
|
-
import type {EmptyObject} from 'type-fest';
|
|
1125
|
-
|
|
1126
|
-
// The following illustrates the problem with `{}`.
|
|
1127
|
-
const foo1: {} = {}; // Pass
|
|
1128
|
-
const foo2: {} = []; // Pass
|
|
1129
|
-
const foo3: {} = 42; // Pass
|
|
1130
|
-
const foo4: {} = {a: 1}; // Pass
|
|
1131
|
-
|
|
1132
|
-
// With `EmptyObject` only the first case is valid.
|
|
1133
|
-
const bar1: EmptyObject = {}; // Pass
|
|
1134
|
-
const bar2: EmptyObject = 42; // Fail
|
|
1135
|
-
const bar3: EmptyObject = []; // Fail
|
|
1136
|
-
const bar4: EmptyObject = {a: 1}; // Fail
|
|
1137
|
-
```
|
|
1138
|
-
|
|
1139
|
-
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}.
|
|
1140
|
-
|
|
1141
|
-
@category Object
|
|
1142
|
-
*/
|
|
1143
|
-
type EmptyObject$2 = {[emptyObjectSymbol$2]?: never};
|
|
1144
|
-
|
|
1145
|
-
/**
|
|
1146
|
-
Returns a boolean for whether the two given types are equal.
|
|
1147
|
-
|
|
1148
|
-
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
1149
|
-
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
1150
|
-
|
|
1151
|
-
Use-cases:
|
|
1152
|
-
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
1153
|
-
|
|
1154
|
-
@example
|
|
1155
|
-
```
|
|
1156
|
-
import type {IsEqual} from 'type-fest';
|
|
1157
|
-
|
|
1158
|
-
// This type returns a boolean for whether the given array includes the given item.
|
|
1159
|
-
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
1160
|
-
type Includes<Value extends readonly any[], Item> =
|
|
1161
|
-
Value extends readonly [Value[0], ...infer rest]
|
|
1162
|
-
? IsEqual<Value[0], Item> extends true
|
|
1163
|
-
? true
|
|
1164
|
-
: Includes<rest, Item>
|
|
1165
|
-
: false;
|
|
1166
|
-
```
|
|
1167
|
-
|
|
1168
|
-
@category Type Guard
|
|
1169
|
-
@category Utilities
|
|
1170
|
-
*/
|
|
1171
|
-
type IsEqual$2<A, B> =
|
|
1172
|
-
(<G>() => G extends A ? 1 : 2) extends
|
|
1173
|
-
(<G>() => G extends B ? 1 : 2)
|
|
1174
|
-
? true
|
|
1175
|
-
: false;
|
|
1176
|
-
|
|
1177
|
-
/**
|
|
1178
|
-
Filter out keys from an object.
|
|
1179
|
-
|
|
1180
|
-
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
1181
|
-
Returns `never` if `Key` extends `Exclude`.
|
|
1182
|
-
Returns `Key` otherwise.
|
|
1183
|
-
|
|
1184
|
-
@example
|
|
1185
|
-
```
|
|
1186
|
-
type Filtered = Filter<'foo', 'foo'>;
|
|
1187
|
-
//=> never
|
|
1188
|
-
```
|
|
1189
|
-
|
|
1190
|
-
@example
|
|
1191
|
-
```
|
|
1192
|
-
type Filtered = Filter<'bar', string>;
|
|
1193
|
-
//=> never
|
|
1194
|
-
```
|
|
1195
|
-
|
|
1196
|
-
@example
|
|
1197
|
-
```
|
|
1198
|
-
type Filtered = Filter<'bar', 'foo'>;
|
|
1199
|
-
//=> 'bar'
|
|
1200
|
-
```
|
|
1201
|
-
|
|
1202
|
-
@see {Except}
|
|
1203
|
-
*/
|
|
1204
|
-
type Filter$2<KeyType, ExcludeType> = IsEqual$2<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
1205
|
-
|
|
1206
|
-
type ExceptOptions$2 = {
|
|
1207
|
-
/**
|
|
1208
|
-
Disallow assigning non-specified properties.
|
|
1209
|
-
|
|
1210
|
-
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
1211
|
-
|
|
1212
|
-
@default false
|
|
1213
|
-
*/
|
|
1214
|
-
requireExactProps?: boolean;
|
|
1215
|
-
};
|
|
1216
|
-
|
|
1217
|
-
/**
|
|
1218
|
-
Create a type from an object type without certain keys.
|
|
1219
|
-
|
|
1220
|
-
We recommend setting the `requireExactProps` option to `true`.
|
|
1221
|
-
|
|
1222
|
-
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.
|
|
1223
|
-
|
|
1224
|
-
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)).
|
|
1225
|
-
|
|
1226
|
-
@example
|
|
1227
|
-
```
|
|
1228
|
-
import type {Except} from 'type-fest';
|
|
1229
|
-
|
|
1230
|
-
type Foo = {
|
|
1231
|
-
a: number;
|
|
1232
|
-
b: string;
|
|
1233
|
-
};
|
|
1234
|
-
|
|
1235
|
-
type FooWithoutA = Except<Foo, 'a'>;
|
|
1236
|
-
//=> {b: string}
|
|
1237
|
-
|
|
1238
|
-
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
1239
|
-
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
1240
|
-
|
|
1241
|
-
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
1242
|
-
//=> {a: number} & Partial<Record<"b", never>>
|
|
1243
|
-
|
|
1244
|
-
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
1245
|
-
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
1246
|
-
```
|
|
1247
|
-
|
|
1248
|
-
@category Object
|
|
1249
|
-
*/
|
|
1250
|
-
type Except$2<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions$2 = {requireExactProps: false}> = {
|
|
1251
|
-
[KeyType in keyof ObjectType as Filter$2<KeyType, KeysType>]: ObjectType[KeyType];
|
|
1252
|
-
} & (Options['requireExactProps'] extends true
|
|
1253
|
-
? Partial<Record<KeysType, never>>
|
|
1254
|
-
: {});
|
|
1255
|
-
|
|
1256
|
-
/**
|
|
1257
|
-
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
1258
|
-
|
|
1259
|
-
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
1260
|
-
|
|
1261
|
-
@example
|
|
1262
|
-
```
|
|
1263
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
1264
|
-
|
|
1265
|
-
interface Example {
|
|
1266
|
-
a: string;
|
|
1267
|
-
b: string | number;
|
|
1268
|
-
c?: string;
|
|
1269
|
-
d: {};
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
1273
|
-
//=> 'a'
|
|
1274
|
-
```
|
|
1275
|
-
|
|
1276
|
-
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
1277
|
-
|
|
1278
|
-
@example
|
|
1279
|
-
```
|
|
1280
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
1281
|
-
|
|
1282
|
-
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
1283
|
-
//=> 'a' | 'c'
|
|
1284
|
-
```
|
|
1285
|
-
|
|
1286
|
-
@category Object
|
|
1287
|
-
*/
|
|
1288
|
-
type ConditionalKeys$2<Base, Condition> = NonNullable<
|
|
1289
|
-
// Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
|
|
1290
|
-
{
|
|
1291
|
-
// Map through all the keys of the given base type.
|
|
1292
|
-
[Key in keyof Base]:
|
|
1293
|
-
// Pick only keys with types extending the given `Condition` type.
|
|
1294
|
-
Base[Key] extends Condition
|
|
1295
|
-
// Retain this key since the condition passes.
|
|
1296
|
-
? Key
|
|
1297
|
-
// Discard this key since the condition fails.
|
|
1298
|
-
: never;
|
|
1299
|
-
|
|
1300
|
-
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
1301
|
-
}[keyof Base]
|
|
1302
|
-
>;
|
|
1303
|
-
|
|
1304
|
-
/**
|
|
1305
|
-
Exclude keys from a shape that matches the given `Condition`.
|
|
1306
|
-
|
|
1307
|
-
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.
|
|
1308
|
-
|
|
1309
|
-
@example
|
|
1310
|
-
```
|
|
1311
|
-
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
1312
|
-
|
|
1313
|
-
class Awesome {
|
|
1314
|
-
name: string;
|
|
1315
|
-
successes: number;
|
|
1316
|
-
failures: bigint;
|
|
1317
|
-
|
|
1318
|
-
run() {}
|
|
1319
|
-
}
|
|
1320
|
-
|
|
1321
|
-
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
|
|
1322
|
-
//=> {run: () => void}
|
|
1323
|
-
```
|
|
1324
|
-
|
|
1325
|
-
@example
|
|
1326
|
-
```
|
|
1327
|
-
import type {ConditionalExcept} from 'type-fest';
|
|
1328
|
-
|
|
1329
|
-
interface Example {
|
|
1330
|
-
a: string;
|
|
1331
|
-
b: string | number;
|
|
1332
|
-
c: () => void;
|
|
1333
|
-
d: {};
|
|
1334
|
-
}
|
|
1335
|
-
|
|
1336
|
-
type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
1337
|
-
//=> {b: string | number; c: () => void; d: {}}
|
|
1338
|
-
```
|
|
1339
|
-
|
|
1340
|
-
@category Object
|
|
1341
|
-
*/
|
|
1342
|
-
type ConditionalExcept$2<Base, Condition> = Except$2<
|
|
1343
|
-
Base,
|
|
1344
|
-
ConditionalKeys$2<Base, Condition>
|
|
1345
|
-
>;
|
|
1346
|
-
|
|
1347
|
-
/**
|
|
1348
|
-
* Descriptors are objects that describe the API of a module, and the module
|
|
1349
|
-
* can either be a REST module or a host module.
|
|
1350
|
-
* This type is recursive, so it can describe nested modules.
|
|
1351
|
-
*/
|
|
1352
|
-
type Descriptors$2 = RESTFunctionDescriptor$2 | AmbassadorFunctionDescriptor$2 | HostModule$2<any, any> | EventDefinition$4<any> | ServicePluginDefinition$2<any> | {
|
|
1353
|
-
[key: string]: Descriptors$2 | PublicMetadata$2 | any;
|
|
1354
|
-
};
|
|
1355
|
-
/**
|
|
1356
|
-
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
1357
|
-
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
1358
|
-
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
1359
|
-
* do not match the given host (as they will not work with the given host).
|
|
1360
|
-
*/
|
|
1361
|
-
type BuildDescriptors$2<T extends Descriptors$2, H extends Host$2<any> | undefined, Depth extends number = 5> = {
|
|
1362
|
-
done: T;
|
|
1363
|
-
recurse: T extends {
|
|
1364
|
-
__type: typeof SERVICE_PLUGIN_ERROR_TYPE$2;
|
|
1365
|
-
} ? never : T extends AmbassadorFunctionDescriptor$2 ? BuildAmbassadorFunction$2<T> : T extends RESTFunctionDescriptor$2 ? BuildRESTFunction$2<T> : T extends EventDefinition$4<any> ? BuildEventDefinition$4<T> : T extends ServicePluginDefinition$2<any> ? BuildServicePluginDefinition$2<T> : T extends HostModule$2<any, any> ? HostModuleAPI$2<T> : ConditionalExcept$2<{
|
|
1366
|
-
[Key in keyof T]: T[Key] extends Descriptors$2 ? BuildDescriptors$2<T[Key], H, [
|
|
1367
|
-
-1,
|
|
1368
|
-
0,
|
|
1369
|
-
1,
|
|
1370
|
-
2,
|
|
1371
|
-
3,
|
|
1372
|
-
4,
|
|
1373
|
-
5
|
|
1374
|
-
][Depth]> : never;
|
|
1375
|
-
}, EmptyObject$2>;
|
|
1376
|
-
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
1377
|
-
type PublicMetadata$2 = {
|
|
1378
|
-
PACKAGE_NAME?: string;
|
|
1379
|
-
};
|
|
1380
|
-
|
|
1381
|
-
declare global {
|
|
1382
|
-
interface ContextualClient {
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
/**
|
|
1386
|
-
* A type used to create concerete types from SDK descriptors in
|
|
1387
|
-
* case a contextual client is available.
|
|
1388
|
-
*/
|
|
1389
|
-
type MaybeContext$2<T extends Descriptors$2> = globalThis.ContextualClient extends {
|
|
1390
|
-
host: Host$2;
|
|
1391
|
-
} ? BuildDescriptors$2<T, globalThis.ContextualClient['host']> : T;
|
|
1392
|
-
|
|
1393
|
-
/** A data collection determines the structure of data to be stored in a database. */
|
|
1394
|
-
interface DataCollection {
|
|
1395
|
-
/** Collection ID. For example, `my-first-collection`. May include a namespace. */
|
|
1396
|
-
_id?: string;
|
|
1397
|
-
/**
|
|
1398
|
-
* Collection type. Indicates how the collection was created and is stored.
|
|
1399
|
-
*
|
|
1400
|
-
* * `NATIVE`: User-created collection.
|
|
1401
|
-
* * `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.
|
|
1402
|
-
* * `BLOCKS_APP`: Collection created by a Wix Blocks app.
|
|
1403
|
-
* * `EXTERNAL`: Collection located in externally connected storage.
|
|
1404
|
-
* @readonly
|
|
1405
|
-
*/
|
|
1406
|
-
collectionType?: CollectionType;
|
|
1407
|
-
/**
|
|
1408
|
-
* ID of the app that defined this collection. For user-defined collections, this value is null.
|
|
1409
|
-
* @readonly
|
|
1410
|
-
*/
|
|
1411
|
-
ownerAppId?: string | null;
|
|
1412
|
-
/**
|
|
1413
|
-
* Maximum number of items returned in a single query, based on the underlying storage.
|
|
1414
|
-
* Native collections have a maximum page size of 1000 for offset-based queries or 100 for cursor-based queries.
|
|
1415
|
-
* External collections' maximum page size defaults to 50, but an external provider can set any maximum value up to 1000.
|
|
1416
|
-
* @readonly
|
|
1417
|
-
*/
|
|
1418
|
-
maxPageSize?: number | null;
|
|
1419
|
-
/** Collection's display name as shown in the CMS. For example, `My First Collection`. */
|
|
1420
|
-
displayName?: string | null;
|
|
1421
|
-
/**
|
|
1422
|
-
* Indicates how the collection's items are sorted by default when a query doesn't specify an order.
|
|
1423
|
-
* @readonly
|
|
1424
|
-
*/
|
|
1425
|
-
defaultDisplayOrder?: Sort;
|
|
1426
|
-
/**
|
|
1427
|
-
* UI-friendly namespace of the Wix app with which the data collection is associated, such as Stores or Bookings.
|
|
1428
|
-
* Empty for all data collections not owned by internal Wix apps.
|
|
1429
|
-
* @readonly
|
|
1430
|
-
*/
|
|
1431
|
-
displayNamespace?: string | null;
|
|
1432
|
-
/** The field whose value the CMS displays to represent the collection item when referenced in a different collection. */
|
|
1433
|
-
displayField?: string | null;
|
|
1434
|
-
/**
|
|
1435
|
-
* Capabilities the collection supports.
|
|
1436
|
-
* @readonly
|
|
1437
|
-
*/
|
|
1438
|
-
capabilities?: CollectionCapabilities;
|
|
1439
|
-
/** Collection's field structure. */
|
|
1440
|
-
fields?: Field$1[];
|
|
1441
|
-
/** Levels of permission for accessing and modifying data, defined by lowest role needed to perform each action. */
|
|
1442
|
-
permissions?: Permissions;
|
|
1443
|
-
/**
|
|
1444
|
-
* 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.
|
|
1445
|
-
* @readonly
|
|
1446
|
-
*/
|
|
1447
|
-
revision?: string | null;
|
|
1448
|
-
/** All plugins the collection uses. Plugins apply additional capabilities to the collection or extend its functionality. */
|
|
1449
|
-
plugins?: Plugin[];
|
|
1450
|
-
/**
|
|
1451
|
-
* All paging modes the collection supports. In native collections, offset-based paging is supported by default.
|
|
1452
|
-
* @readonly
|
|
1453
|
-
*/
|
|
1454
|
-
pagingModes?: PagingMode[];
|
|
1455
|
-
/**
|
|
1456
|
-
* Date the collection was created.
|
|
1457
|
-
* @readonly
|
|
1458
|
-
*/
|
|
1459
|
-
_createdDate?: Date;
|
|
1460
|
-
/**
|
|
1461
|
-
* Date the collection was last updated.
|
|
1462
|
-
* @readonly
|
|
1463
|
-
*/
|
|
1464
|
-
_updatedDate?: Date;
|
|
1465
|
-
}
|
|
1466
|
-
declare enum CollectionType {
|
|
1467
|
-
/** User-created collection. */
|
|
1468
|
-
NATIVE = "NATIVE",
|
|
1469
|
-
/** [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). */
|
|
1470
|
-
WIX_APP = "WIX_APP",
|
|
1471
|
-
/** Collection created by a Wix Blocks app. */
|
|
1472
|
-
BLOCKS_APP = "BLOCKS_APP",
|
|
1473
|
-
/** Collection located in externally connected storage. */
|
|
1474
|
-
EXTERNAL = "EXTERNAL"
|
|
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"
|
|
1475
1065
|
}
|
|
1476
1066
|
interface Sort {
|
|
1477
1067
|
/** Field to sort by. */
|
|
@@ -2049,6 +1639,11 @@ interface GetDataCollectionRequest {
|
|
|
2049
1639
|
*/
|
|
2050
1640
|
consistentRead?: boolean;
|
|
2051
1641
|
}
|
|
1642
|
+
declare enum Segment {
|
|
1643
|
+
UNKNOWN_SEGMENT = "UNKNOWN_SEGMENT",
|
|
1644
|
+
PUBLIC = "PUBLIC",
|
|
1645
|
+
DEV = "DEV"
|
|
1646
|
+
}
|
|
2052
1647
|
interface GetDataCollectionResponse {
|
|
2053
1648
|
/** Details of the collection requested. */
|
|
2054
1649
|
collection?: DataCollection;
|
|
@@ -2612,744 +2207,336 @@ interface EventMetadata$1 extends BaseEventMetadata$1 {
|
|
|
2612
2207
|
* Unique event ID.
|
|
2613
2208
|
* Allows clients to ignore duplicate webhooks.
|
|
2614
2209
|
*/
|
|
2615
|
-
_id?: string;
|
|
2616
|
-
/**
|
|
2617
|
-
* Assumes actions are also always typed to an entity_type
|
|
2618
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
2619
|
-
*/
|
|
2620
|
-
entityFqdn?: string;
|
|
2621
|
-
/**
|
|
2622
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
2623
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
2624
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
2625
|
-
*/
|
|
2626
|
-
slug?: string;
|
|
2627
|
-
/** ID of the entity associated with the event. */
|
|
2628
|
-
entityId?: string;
|
|
2629
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
2630
|
-
eventTime?: Date;
|
|
2631
|
-
/**
|
|
2632
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
2633
|
-
* (for example, GDPR).
|
|
2634
|
-
*/
|
|
2635
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
2636
|
-
/** If present, indicates the action that triggered the event. */
|
|
2637
|
-
originatedFrom?: string | null;
|
|
2638
|
-
/**
|
|
2639
|
-
* A sequence number defining the order of updates to the underlying entity.
|
|
2640
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
2641
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
2642
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
2643
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
2644
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
2645
|
-
*/
|
|
2646
|
-
entityEventSequence?: string | null;
|
|
2647
|
-
}
|
|
2648
|
-
interface DataCollectionClonedEnvelope {
|
|
2649
|
-
data: DataCollectionClonedEvent;
|
|
2650
|
-
metadata: EventMetadata$1;
|
|
2651
|
-
}
|
|
2652
|
-
interface DataCollectionChangedEnvelope {
|
|
2653
|
-
data: DataCollectionChangedEvent;
|
|
2654
|
-
metadata: EventMetadata$1;
|
|
2655
|
-
}
|
|
2656
|
-
interface DataCollectionCreatedEnvelope {
|
|
2657
|
-
entity: DataCollection;
|
|
2658
|
-
metadata: EventMetadata$1;
|
|
2659
|
-
}
|
|
2660
|
-
interface DataCollectionUpdatedEnvelope {
|
|
2661
|
-
entity: DataCollection;
|
|
2662
|
-
metadata: EventMetadata$1;
|
|
2663
|
-
}
|
|
2664
|
-
interface DataCollectionDeletedEnvelope {
|
|
2665
|
-
metadata: EventMetadata$1;
|
|
2666
|
-
}
|
|
2667
|
-
interface GetDataCollectionOptions {
|
|
2668
|
-
/**
|
|
2669
|
-
* Whether to retrieve data from the primary database instance.
|
|
2670
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
2671
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
2672
|
-
*
|
|
2673
|
-
* Default: `false`
|
|
2674
|
-
*/
|
|
2675
|
-
consistentRead?: boolean;
|
|
2676
|
-
}
|
|
2677
|
-
interface ListDataCollectionsOptions {
|
|
2678
|
-
/**
|
|
2679
|
-
* Defines how collections in the response are sorted.
|
|
2680
|
-
*
|
|
2681
|
-
* Default: Ordered by ID in ascending order.
|
|
2682
|
-
*/
|
|
2683
|
-
sort?: Sorting$1;
|
|
2684
|
-
/** Pagination information. */
|
|
2685
|
-
paging?: Paging$2;
|
|
2686
|
-
/**
|
|
2687
|
-
* Whether to retrieve data from the primary database instance.
|
|
2688
|
-
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
2689
|
-
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
2690
|
-
*
|
|
2691
|
-
* Default: `false`
|
|
2692
|
-
*/
|
|
2693
|
-
consistentRead?: boolean;
|
|
2694
|
-
}
|
|
2695
|
-
|
|
2696
|
-
declare function createDataCollection$1(httpClient: HttpClient$2): CreateDataCollectionSignature;
|
|
2697
|
-
interface CreateDataCollectionSignature {
|
|
2698
|
-
/**
|
|
2699
|
-
* Creates a new data collection.
|
|
2700
|
-
*
|
|
2701
|
-
* 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.
|
|
2702
|
-
* @param - Collection details.
|
|
2703
|
-
* @param - Options for creating a data collection.
|
|
2704
|
-
* @returns Details of collection created.
|
|
2705
|
-
*/
|
|
2706
|
-
(collection: DataCollection): Promise<DataCollection & DataCollectionNonNullableFields>;
|
|
2707
|
-
}
|
|
2708
|
-
declare function getDataCollection$1(httpClient: HttpClient$2): GetDataCollectionSignature;
|
|
2709
|
-
interface GetDataCollectionSignature {
|
|
2710
|
-
/**
|
|
2711
|
-
* Retrieves a data collection by ID.
|
|
2712
|
-
* @param - ID of the collection to retrieve.
|
|
2713
|
-
* @param - Options for retrieving a data collection.
|
|
2714
|
-
* @returns Details of the collection requested.
|
|
2210
|
+
_id?: string;
|
|
2211
|
+
/**
|
|
2212
|
+
* Assumes actions are also always typed to an entity_type
|
|
2213
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
2715
2214
|
*/
|
|
2716
|
-
|
|
2717
|
-
}
|
|
2718
|
-
declare function listDataCollections$1(httpClient: HttpClient$2): ListDataCollectionsSignature;
|
|
2719
|
-
interface ListDataCollectionsSignature {
|
|
2215
|
+
entityFqdn?: string;
|
|
2720
2216
|
/**
|
|
2721
|
-
*
|
|
2722
|
-
*
|
|
2723
|
-
*
|
|
2724
|
-
* @param - Options for retrieving a list of data collections.
|
|
2217
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
2218
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
2219
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
2725
2220
|
*/
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
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;
|
|
2730
2226
|
/**
|
|
2731
|
-
*
|
|
2732
|
-
*
|
|
2733
|
-
* A collection ID, revision number, permissions, and at least 1 field must be provided within `options.collection`.
|
|
2734
|
-
* If a collection with that ID exists, and if its current `revision` number matches the one provided, it is updated.
|
|
2735
|
-
* Otherwise, the request fails.
|
|
2736
|
-
*
|
|
2737
|
-
* When a collection is updated, its `_updatedDate` property is changed to the current date and its `revision` property is incremented.
|
|
2738
|
-
*
|
|
2739
|
-
* > **Note:**
|
|
2740
|
-
* > 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
|
|
2741
|
-
* > aren't included in the updated collection details, their values are lost.
|
|
2742
|
-
* @param - Updated collection details. The existing collection is replaced with this version.
|
|
2743
|
-
* @param - Options for updating a data collection.
|
|
2744
|
-
* @returns Updated collection details.
|
|
2227
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
2228
|
+
* (for example, GDPR).
|
|
2745
2229
|
*/
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
interface DeleteDataCollectionSignature {
|
|
2230
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
2231
|
+
/** If present, indicates the action that triggered the event. */
|
|
2232
|
+
originatedFrom?: string | null;
|
|
2750
2233
|
/**
|
|
2751
|
-
*
|
|
2752
|
-
*
|
|
2753
|
-
*
|
|
2754
|
-
*
|
|
2755
|
-
*
|
|
2234
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
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.
|
|
2756
2240
|
*/
|
|
2757
|
-
|
|
2241
|
+
entityEventSequence?: string | null;
|
|
2758
2242
|
}
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
declare const onDataCollectionUpdated$1: EventDefinition$4<DataCollectionUpdatedEnvelope, "wix.data.v2.data_collection_updated">;
|
|
2763
|
-
declare const onDataCollectionDeleted$1: EventDefinition$4<DataCollectionDeletedEnvelope, "wix.data.v2.data_collection_deleted">;
|
|
2764
|
-
|
|
2765
|
-
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
2766
|
-
__type: 'event-definition';
|
|
2767
|
-
type: Type;
|
|
2768
|
-
isDomainEvent?: boolean;
|
|
2769
|
-
transformations?: (envelope: unknown) => Payload;
|
|
2770
|
-
__payload: Payload;
|
|
2771
|
-
};
|
|
2772
|
-
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
2773
|
-
type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
|
|
2774
|
-
type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
|
|
2775
|
-
|
|
2776
|
-
declare global {
|
|
2777
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2778
|
-
interface SymbolConstructor {
|
|
2779
|
-
readonly observable: symbol;
|
|
2780
|
-
}
|
|
2243
|
+
interface DataCollectionClonedEnvelope {
|
|
2244
|
+
data: DataCollectionClonedEvent;
|
|
2245
|
+
metadata: EventMetadata$1;
|
|
2781
2246
|
}
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
declare const createDataCollection: MaybeContext$2<BuildRESTFunction$2<typeof createDataCollection$1> & typeof createDataCollection$1>;
|
|
2786
|
-
declare const getDataCollection: MaybeContext$2<BuildRESTFunction$2<typeof getDataCollection$1> & typeof getDataCollection$1>;
|
|
2787
|
-
declare const listDataCollections: MaybeContext$2<BuildRESTFunction$2<typeof listDataCollections$1> & typeof listDataCollections$1>;
|
|
2788
|
-
declare const updateDataCollection: MaybeContext$2<BuildRESTFunction$2<typeof updateDataCollection$1> & typeof updateDataCollection$1>;
|
|
2789
|
-
declare const deleteDataCollection: MaybeContext$2<BuildRESTFunction$2<typeof deleteDataCollection$1> & typeof deleteDataCollection$1>;
|
|
2790
|
-
|
|
2791
|
-
type _publicOnDataCollectionClonedEventType = typeof onDataCollectionClonedEvent$1;
|
|
2792
|
-
/**
|
|
2793
|
-
* Event triggered when collection is cloned from other instance
|
|
2794
|
-
* CREATED event will be also triggered along with this action
|
|
2795
|
-
*/
|
|
2796
|
-
declare const onDataCollectionClonedEvent: ReturnType<typeof createEventModule$1<_publicOnDataCollectionClonedEventType>>;
|
|
2797
|
-
|
|
2798
|
-
type _publicOnDataCollectionChangedEventType = typeof onDataCollectionChangedEvent$1;
|
|
2799
|
-
/**
|
|
2800
|
-
* Event triggered when collection is changed, describing some of changes
|
|
2801
|
-
* UPDATED event will be also triggered along with this action
|
|
2802
|
-
*/
|
|
2803
|
-
declare const onDataCollectionChangedEvent: ReturnType<typeof createEventModule$1<_publicOnDataCollectionChangedEventType>>;
|
|
2804
|
-
|
|
2805
|
-
type _publicOnDataCollectionCreatedType = typeof onDataCollectionCreated$1;
|
|
2806
|
-
/** */
|
|
2807
|
-
declare const onDataCollectionCreated: ReturnType<typeof createEventModule$1<_publicOnDataCollectionCreatedType>>;
|
|
2808
|
-
|
|
2809
|
-
type _publicOnDataCollectionUpdatedType = typeof onDataCollectionUpdated$1;
|
|
2810
|
-
/** */
|
|
2811
|
-
declare const onDataCollectionUpdated: ReturnType<typeof createEventModule$1<_publicOnDataCollectionUpdatedType>>;
|
|
2812
|
-
|
|
2813
|
-
type _publicOnDataCollectionDeletedType = typeof onDataCollectionDeleted$1;
|
|
2814
|
-
/** */
|
|
2815
|
-
declare const onDataCollectionDeleted: ReturnType<typeof createEventModule$1<_publicOnDataCollectionDeletedType>>;
|
|
2816
|
-
|
|
2817
|
-
type context$2_AccessLevel = AccessLevel;
|
|
2818
|
-
declare const context$2_AccessLevel: typeof AccessLevel;
|
|
2819
|
-
type context$2_AllowedDataPermissions = AllowedDataPermissions;
|
|
2820
|
-
type context$2_ArraySizeRange = ArraySizeRange;
|
|
2821
|
-
type context$2_BulkGetDataCollectionsPageBySnapshotsRequest = BulkGetDataCollectionsPageBySnapshotsRequest;
|
|
2822
|
-
type context$2_BulkGetDataCollectionsPageBySnapshotsResponse = BulkGetDataCollectionsPageBySnapshotsResponse;
|
|
2823
|
-
type context$2_BulkGetDataCollectionsRequest = BulkGetDataCollectionsRequest;
|
|
2824
|
-
type context$2_BulkGetDataCollectionsResponse = BulkGetDataCollectionsResponse;
|
|
2825
|
-
type context$2_Calculator = Calculator;
|
|
2826
|
-
type context$2_CalculatorPatternOneOf = CalculatorPatternOneOf;
|
|
2827
|
-
type context$2_CmsOptions = CmsOptions;
|
|
2828
|
-
type context$2_CollectionCapabilities = CollectionCapabilities;
|
|
2829
|
-
type context$2_CollectionOperation = CollectionOperation;
|
|
2830
|
-
declare const context$2_CollectionOperation: typeof CollectionOperation;
|
|
2831
|
-
type context$2_CollectionType = CollectionType;
|
|
2832
|
-
declare const context$2_CollectionType: typeof CollectionType;
|
|
2833
|
-
type context$2_CreateDataCollectionFieldRequest = CreateDataCollectionFieldRequest;
|
|
2834
|
-
type context$2_CreateDataCollectionFieldResponse = CreateDataCollectionFieldResponse;
|
|
2835
|
-
type context$2_CreateDataCollectionRequest = CreateDataCollectionRequest;
|
|
2836
|
-
type context$2_CreateDataCollectionResponse = CreateDataCollectionResponse;
|
|
2837
|
-
type context$2_CreateDataCollectionResponseNonNullableFields = CreateDataCollectionResponseNonNullableFields;
|
|
2838
|
-
type context$2_CreateDataCollectionsSnapshotRequest = CreateDataCollectionsSnapshotRequest;
|
|
2839
|
-
type context$2_CreateDataCollectionsSnapshotResponse = CreateDataCollectionsSnapshotResponse;
|
|
2840
|
-
type context$2_CreateMigratedCollectionsSnapshotRequest = CreateMigratedCollectionsSnapshotRequest;
|
|
2841
|
-
type context$2_CreateMigratedCollectionsSnapshotResponse = CreateMigratedCollectionsSnapshotResponse;
|
|
2842
|
-
type context$2_DataCollection = DataCollection;
|
|
2843
|
-
type context$2_DataCollectionChangedEnvelope = DataCollectionChangedEnvelope;
|
|
2844
|
-
type context$2_DataCollectionChangedEvent = DataCollectionChangedEvent;
|
|
2845
|
-
type context$2_DataCollectionClonedEnvelope = DataCollectionClonedEnvelope;
|
|
2846
|
-
type context$2_DataCollectionClonedEvent = DataCollectionClonedEvent;
|
|
2847
|
-
type context$2_DataCollectionCreatedEnvelope = DataCollectionCreatedEnvelope;
|
|
2848
|
-
type context$2_DataCollectionDeletedEnvelope = DataCollectionDeletedEnvelope;
|
|
2849
|
-
type context$2_DataCollectionNonNullableFields = DataCollectionNonNullableFields;
|
|
2850
|
-
type context$2_DataCollectionUpdatedEnvelope = DataCollectionUpdatedEnvelope;
|
|
2851
|
-
type context$2_DataOperation = DataOperation;
|
|
2852
|
-
declare const context$2_DataOperation: typeof DataOperation;
|
|
2853
|
-
type context$2_DataPermissions = DataPermissions;
|
|
2854
|
-
type context$2_DeleteDataCollectionFieldRequest = DeleteDataCollectionFieldRequest;
|
|
2855
|
-
type context$2_DeleteDataCollectionFieldResponse = DeleteDataCollectionFieldResponse;
|
|
2856
|
-
type context$2_DeleteDataCollectionRequest = DeleteDataCollectionRequest;
|
|
2857
|
-
type context$2_DeleteDataCollectionResponse = DeleteDataCollectionResponse;
|
|
2858
|
-
type context$2_DeleteDataCollectionsSnapshotRequest = DeleteDataCollectionsSnapshotRequest;
|
|
2859
|
-
type context$2_DeleteDataCollectionsSnapshotResponse = DeleteDataCollectionsSnapshotResponse;
|
|
2860
|
-
type context$2_Direction = Direction;
|
|
2861
|
-
declare const context$2_Direction: typeof Direction;
|
|
2862
|
-
type context$2_FieldCapabilities = FieldCapabilities;
|
|
2863
|
-
type context$2_FieldPlugin = FieldPlugin;
|
|
2864
|
-
type context$2_FieldPluginOptionsOneOf = FieldPluginOptionsOneOf;
|
|
2865
|
-
type context$2_FieldPluginType = FieldPluginType;
|
|
2866
|
-
declare const context$2_FieldPluginType: typeof FieldPluginType;
|
|
2867
|
-
type context$2_FieldRangeValidationsOneOf = FieldRangeValidationsOneOf;
|
|
2868
|
-
type context$2_FieldsPattern = FieldsPattern;
|
|
2869
|
-
type context$2_Format = Format;
|
|
2870
|
-
declare const context$2_Format: typeof Format;
|
|
2871
|
-
type context$2_GetDataCollectionOptions = GetDataCollectionOptions;
|
|
2872
|
-
type context$2_GetDataCollectionRequest = GetDataCollectionRequest;
|
|
2873
|
-
type context$2_GetDataCollectionResponse = GetDataCollectionResponse;
|
|
2874
|
-
type context$2_GetDataCollectionResponseNonNullableFields = GetDataCollectionResponseNonNullableFields;
|
|
2875
|
-
type context$2_IndexField = IndexField;
|
|
2876
|
-
type context$2_IndexLimits = IndexLimits;
|
|
2877
|
-
type context$2_IndexStatus = IndexStatus;
|
|
2878
|
-
declare const context$2_IndexStatus: typeof IndexStatus;
|
|
2879
|
-
type context$2_ListDataCollectionsOptions = ListDataCollectionsOptions;
|
|
2880
|
-
type context$2_ListDataCollectionsRequest = ListDataCollectionsRequest;
|
|
2881
|
-
type context$2_ListDataCollectionsResponse = ListDataCollectionsResponse;
|
|
2882
|
-
type context$2_ListDataCollectionsResponseNonNullableFields = ListDataCollectionsResponseNonNullableFields;
|
|
2883
|
-
type context$2_MultiReference = MultiReference;
|
|
2884
|
-
type context$2_MultilingualOptions = MultilingualOptions;
|
|
2885
|
-
type context$2_NumberRange = NumberRange;
|
|
2886
|
-
type context$2_ObjectField = ObjectField;
|
|
2887
|
-
type context$2_PageLink = PageLink;
|
|
2888
|
-
type context$2_PageLinkPluginOptions = PageLinkPluginOptions;
|
|
2889
|
-
type context$2_PagingMode = PagingMode;
|
|
2890
|
-
declare const context$2_PagingMode: typeof PagingMode;
|
|
2891
|
-
type context$2_Permissions = Permissions;
|
|
2892
|
-
type context$2_Plugin = Plugin;
|
|
2893
|
-
type context$2_PluginCmsOptions = PluginCmsOptions;
|
|
2894
|
-
type context$2_PluginOptionsOneOf = PluginOptionsOneOf;
|
|
2895
|
-
type context$2_PluginType = PluginType;
|
|
2896
|
-
declare const context$2_PluginType: typeof PluginType;
|
|
2897
|
-
type context$2_PluginUpdate = PluginUpdate;
|
|
2898
|
-
type context$2_QueryOperator = QueryOperator;
|
|
2899
|
-
declare const context$2_QueryOperator: typeof QueryOperator;
|
|
2900
|
-
type context$2_Reference = Reference;
|
|
2901
|
-
type context$2_RestoreDataCollectionsFromSnapshotRequest = RestoreDataCollectionsFromSnapshotRequest;
|
|
2902
|
-
type context$2_RestoreDataCollectionsFromSnapshotResponse = RestoreDataCollectionsFromSnapshotResponse;
|
|
2903
|
-
type context$2_Role = Role;
|
|
2904
|
-
declare const context$2_Role: typeof Role;
|
|
2905
|
-
type context$2_SingleItemPluginOptions = SingleItemPluginOptions;
|
|
2906
|
-
type context$2_SiteSort = SiteSort;
|
|
2907
|
-
type context$2_SnapshotCollection = SnapshotCollection;
|
|
2908
|
-
type context$2_Sort = Sort;
|
|
2909
|
-
type context$2_StringLengthRange = StringLengthRange;
|
|
2910
|
-
type context$2_Type = Type;
|
|
2911
|
-
declare const context$2_Type: typeof Type;
|
|
2912
|
-
type context$2_TypeMetadata = TypeMetadata;
|
|
2913
|
-
type context$2_TypeMetadataMetadataOneOf = TypeMetadataMetadataOneOf;
|
|
2914
|
-
type context$2_UpdateDataCollectionFieldRequest = UpdateDataCollectionFieldRequest;
|
|
2915
|
-
type context$2_UpdateDataCollectionFieldResponse = UpdateDataCollectionFieldResponse;
|
|
2916
|
-
type context$2_UpdateDataCollectionRequest = UpdateDataCollectionRequest;
|
|
2917
|
-
type context$2_UpdateDataCollectionResponse = UpdateDataCollectionResponse;
|
|
2918
|
-
type context$2_UpdateDataCollectionResponseNonNullableFields = UpdateDataCollectionResponseNonNullableFields;
|
|
2919
|
-
type context$2_UpdateDataPermissionsRequest = UpdateDataPermissionsRequest;
|
|
2920
|
-
type context$2_UpdateDataPermissionsResponse = UpdateDataPermissionsResponse;
|
|
2921
|
-
type context$2_UrlizedOnlyPattern = UrlizedOnlyPattern;
|
|
2922
|
-
type context$2_UrlizedPluginOptions = UrlizedPluginOptions;
|
|
2923
|
-
type context$2__Array = _Array;
|
|
2924
|
-
type context$2__Object = _Object;
|
|
2925
|
-
type context$2__publicOnDataCollectionChangedEventType = _publicOnDataCollectionChangedEventType;
|
|
2926
|
-
type context$2__publicOnDataCollectionClonedEventType = _publicOnDataCollectionClonedEventType;
|
|
2927
|
-
type context$2__publicOnDataCollectionCreatedType = _publicOnDataCollectionCreatedType;
|
|
2928
|
-
type context$2__publicOnDataCollectionDeletedType = _publicOnDataCollectionDeletedType;
|
|
2929
|
-
type context$2__publicOnDataCollectionUpdatedType = _publicOnDataCollectionUpdatedType;
|
|
2930
|
-
declare const context$2_createDataCollection: typeof createDataCollection;
|
|
2931
|
-
declare const context$2_deleteDataCollection: typeof deleteDataCollection;
|
|
2932
|
-
declare const context$2_getDataCollection: typeof getDataCollection;
|
|
2933
|
-
declare const context$2_listDataCollections: typeof listDataCollections;
|
|
2934
|
-
declare const context$2_onDataCollectionChangedEvent: typeof onDataCollectionChangedEvent;
|
|
2935
|
-
declare const context$2_onDataCollectionClonedEvent: typeof onDataCollectionClonedEvent;
|
|
2936
|
-
declare const context$2_onDataCollectionCreated: typeof onDataCollectionCreated;
|
|
2937
|
-
declare const context$2_onDataCollectionDeleted: typeof onDataCollectionDeleted;
|
|
2938
|
-
declare const context$2_onDataCollectionUpdated: typeof onDataCollectionUpdated;
|
|
2939
|
-
declare const context$2_updateDataCollection: typeof updateDataCollection;
|
|
2940
|
-
declare namespace context$2 {
|
|
2941
|
-
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, 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 };
|
|
2247
|
+
interface DataCollectionChangedEnvelope {
|
|
2248
|
+
data: DataCollectionChangedEvent;
|
|
2249
|
+
metadata: EventMetadata$1;
|
|
2942
2250
|
}
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
}>;
|
|
2956
|
-
};
|
|
2957
|
-
environment?: Environment;
|
|
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 {
|
|
2958
2263
|
/**
|
|
2959
|
-
*
|
|
2264
|
+
* Whether to retrieve data from the primary database instance.
|
|
2265
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
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`
|
|
2960
2269
|
*/
|
|
2961
|
-
|
|
2270
|
+
consistentRead?: boolean;
|
|
2271
|
+
}
|
|
2272
|
+
interface ListDataCollectionsOptions {
|
|
2962
2273
|
/**
|
|
2963
|
-
*
|
|
2964
|
-
*
|
|
2274
|
+
* Defines how collections in the response are sorted.
|
|
2275
|
+
*
|
|
2276
|
+
* Default: Ordered by ID in ascending order.
|
|
2965
2277
|
*/
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
*/
|
|
2978
|
-
passThroughHeaders?: Record<string, string>;
|
|
2979
|
-
};
|
|
2980
|
-
};
|
|
2981
|
-
|
|
2982
|
-
type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
|
|
2983
|
-
interface HttpClient$1 {
|
|
2984
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
2985
|
-
fetchWithAuth: typeof fetch;
|
|
2986
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
2987
|
-
getActiveToken?: () => string | undefined;
|
|
2988
|
-
}
|
|
2989
|
-
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
2990
|
-
type HttpResponse$1<T = any> = {
|
|
2991
|
-
data: T;
|
|
2992
|
-
status: number;
|
|
2993
|
-
statusText: string;
|
|
2994
|
-
headers: any;
|
|
2995
|
-
request?: any;
|
|
2996
|
-
};
|
|
2997
|
-
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
2998
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2999
|
-
url: string;
|
|
3000
|
-
data?: Data;
|
|
3001
|
-
params?: URLSearchParams;
|
|
3002
|
-
} & APIMetadata$1;
|
|
3003
|
-
type APIMetadata$1 = {
|
|
3004
|
-
methodFqn?: string;
|
|
3005
|
-
entityFqdn?: string;
|
|
3006
|
-
packageName?: string;
|
|
3007
|
-
};
|
|
3008
|
-
type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
|
|
3009
|
-
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
3010
|
-
__type: 'event-definition';
|
|
3011
|
-
type: Type;
|
|
3012
|
-
isDomainEvent?: boolean;
|
|
3013
|
-
transformations?: (envelope: unknown) => Payload;
|
|
3014
|
-
__payload: Payload;
|
|
3015
|
-
};
|
|
3016
|
-
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
3017
|
-
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
3018
|
-
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
3019
|
-
|
|
3020
|
-
type ServicePluginMethodInput$1 = {
|
|
3021
|
-
request: any;
|
|
3022
|
-
metadata: any;
|
|
3023
|
-
};
|
|
3024
|
-
type ServicePluginContract$1 = Record<string, (payload: ServicePluginMethodInput$1) => unknown | Promise<unknown>>;
|
|
3025
|
-
type ServicePluginMethodMetadata$1 = {
|
|
3026
|
-
name: string;
|
|
3027
|
-
primaryHttpMappingPath: string;
|
|
3028
|
-
transformations: {
|
|
3029
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput$1;
|
|
3030
|
-
toREST: (...args: unknown[]) => unknown;
|
|
3031
|
-
};
|
|
3032
|
-
};
|
|
3033
|
-
type ServicePluginDefinition$1<Contract extends ServicePluginContract$1> = {
|
|
3034
|
-
__type: 'service-plugin-definition';
|
|
3035
|
-
componentType: string;
|
|
3036
|
-
methods: ServicePluginMethodMetadata$1[];
|
|
3037
|
-
__contract: Contract;
|
|
3038
|
-
};
|
|
3039
|
-
declare function ServicePluginDefinition$1<Contract extends ServicePluginContract$1>(componentType: string, methods: ServicePluginMethodMetadata$1[]): ServicePluginDefinition$1<Contract>;
|
|
3040
|
-
type BuildServicePluginDefinition$1<T extends ServicePluginDefinition$1<any>> = (implementation: T['__contract']) => void;
|
|
3041
|
-
declare const SERVICE_PLUGIN_ERROR_TYPE$1 = "wix_spi_error";
|
|
3042
|
-
|
|
3043
|
-
type RequestContext$1 = {
|
|
3044
|
-
isSSR: boolean;
|
|
3045
|
-
host: string;
|
|
3046
|
-
protocol?: string;
|
|
3047
|
-
};
|
|
3048
|
-
type ResponseTransformer$1 = (data: any, headers?: any) => any;
|
|
3049
|
-
/**
|
|
3050
|
-
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
3051
|
-
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
3052
|
-
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
3053
|
-
*/
|
|
3054
|
-
type Method$1 = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
3055
|
-
type AmbassadorRequestOptions$1<T = any> = {
|
|
3056
|
-
_?: T;
|
|
3057
|
-
url?: string;
|
|
3058
|
-
method?: Method$1;
|
|
3059
|
-
params?: any;
|
|
3060
|
-
data?: any;
|
|
3061
|
-
transformResponse?: ResponseTransformer$1 | ResponseTransformer$1[];
|
|
3062
|
-
};
|
|
3063
|
-
type AmbassadorFactory$1<Request, Response> = (payload: Request) => ((context: RequestContext$1) => AmbassadorRequestOptions$1<Response>) & {
|
|
3064
|
-
__isAmbassador: boolean;
|
|
3065
|
-
};
|
|
3066
|
-
type AmbassadorFunctionDescriptor$1<Request = any, Response = any> = AmbassadorFactory$1<Request, Response>;
|
|
3067
|
-
type BuildAmbassadorFunction$1<T extends AmbassadorFunctionDescriptor$1> = T extends AmbassadorFunctionDescriptor$1<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
3068
|
-
|
|
3069
|
-
declare global {
|
|
3070
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
3071
|
-
interface SymbolConstructor {
|
|
3072
|
-
readonly observable: symbol;
|
|
3073
|
-
}
|
|
3074
|
-
}
|
|
3075
|
-
|
|
3076
|
-
declare const emptyObjectSymbol$1: unique symbol;
|
|
3077
|
-
|
|
3078
|
-
/**
|
|
3079
|
-
Represents a strictly empty plain object, the `{}` value.
|
|
3080
|
-
|
|
3081
|
-
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)).
|
|
3082
|
-
|
|
3083
|
-
@example
|
|
3084
|
-
```
|
|
3085
|
-
import type {EmptyObject} from 'type-fest';
|
|
3086
|
-
|
|
3087
|
-
// The following illustrates the problem with `{}`.
|
|
3088
|
-
const foo1: {} = {}; // Pass
|
|
3089
|
-
const foo2: {} = []; // Pass
|
|
3090
|
-
const foo3: {} = 42; // Pass
|
|
3091
|
-
const foo4: {} = {a: 1}; // Pass
|
|
3092
|
-
|
|
3093
|
-
// With `EmptyObject` only the first case is valid.
|
|
3094
|
-
const bar1: EmptyObject = {}; // Pass
|
|
3095
|
-
const bar2: EmptyObject = 42; // Fail
|
|
3096
|
-
const bar3: EmptyObject = []; // Fail
|
|
3097
|
-
const bar4: EmptyObject = {a: 1}; // Fail
|
|
3098
|
-
```
|
|
3099
|
-
|
|
3100
|
-
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}.
|
|
3101
|
-
|
|
3102
|
-
@category Object
|
|
3103
|
-
*/
|
|
3104
|
-
type EmptyObject$1 = {[emptyObjectSymbol$1]?: never};
|
|
3105
|
-
|
|
3106
|
-
/**
|
|
3107
|
-
Returns a boolean for whether the two given types are equal.
|
|
3108
|
-
|
|
3109
|
-
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
3110
|
-
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
3111
|
-
|
|
3112
|
-
Use-cases:
|
|
3113
|
-
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
3114
|
-
|
|
3115
|
-
@example
|
|
3116
|
-
```
|
|
3117
|
-
import type {IsEqual} from 'type-fest';
|
|
3118
|
-
|
|
3119
|
-
// This type returns a boolean for whether the given array includes the given item.
|
|
3120
|
-
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
3121
|
-
type Includes<Value extends readonly any[], Item> =
|
|
3122
|
-
Value extends readonly [Value[0], ...infer rest]
|
|
3123
|
-
? IsEqual<Value[0], Item> extends true
|
|
3124
|
-
? true
|
|
3125
|
-
: Includes<rest, Item>
|
|
3126
|
-
: false;
|
|
3127
|
-
```
|
|
3128
|
-
|
|
3129
|
-
@category Type Guard
|
|
3130
|
-
@category Utilities
|
|
3131
|
-
*/
|
|
3132
|
-
type IsEqual$1<A, B> =
|
|
3133
|
-
(<G>() => G extends A ? 1 : 2) extends
|
|
3134
|
-
(<G>() => G extends B ? 1 : 2)
|
|
3135
|
-
? true
|
|
3136
|
-
: false;
|
|
3137
|
-
|
|
3138
|
-
/**
|
|
3139
|
-
Filter out keys from an object.
|
|
3140
|
-
|
|
3141
|
-
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
3142
|
-
Returns `never` if `Key` extends `Exclude`.
|
|
3143
|
-
Returns `Key` otherwise.
|
|
3144
|
-
|
|
3145
|
-
@example
|
|
3146
|
-
```
|
|
3147
|
-
type Filtered = Filter<'foo', 'foo'>;
|
|
3148
|
-
//=> never
|
|
3149
|
-
```
|
|
3150
|
-
|
|
3151
|
-
@example
|
|
3152
|
-
```
|
|
3153
|
-
type Filtered = Filter<'bar', string>;
|
|
3154
|
-
//=> never
|
|
3155
|
-
```
|
|
3156
|
-
|
|
3157
|
-
@example
|
|
3158
|
-
```
|
|
3159
|
-
type Filtered = Filter<'bar', 'foo'>;
|
|
3160
|
-
//=> 'bar'
|
|
3161
|
-
```
|
|
3162
|
-
|
|
3163
|
-
@see {Except}
|
|
3164
|
-
*/
|
|
3165
|
-
type Filter$1<KeyType, ExcludeType> = IsEqual$1<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
3166
|
-
|
|
3167
|
-
type ExceptOptions$1 = {
|
|
3168
|
-
/**
|
|
3169
|
-
Disallow assigning non-specified properties.
|
|
3170
|
-
|
|
3171
|
-
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
3172
|
-
|
|
3173
|
-
@default false
|
|
3174
|
-
*/
|
|
3175
|
-
requireExactProps?: boolean;
|
|
3176
|
-
};
|
|
3177
|
-
|
|
3178
|
-
/**
|
|
3179
|
-
Create a type from an object type without certain keys.
|
|
3180
|
-
|
|
3181
|
-
We recommend setting the `requireExactProps` option to `true`.
|
|
3182
|
-
|
|
3183
|
-
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.
|
|
3184
|
-
|
|
3185
|
-
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)).
|
|
3186
|
-
|
|
3187
|
-
@example
|
|
3188
|
-
```
|
|
3189
|
-
import type {Except} from 'type-fest';
|
|
3190
|
-
|
|
3191
|
-
type Foo = {
|
|
3192
|
-
a: number;
|
|
3193
|
-
b: string;
|
|
3194
|
-
};
|
|
3195
|
-
|
|
3196
|
-
type FooWithoutA = Except<Foo, 'a'>;
|
|
3197
|
-
//=> {b: string}
|
|
3198
|
-
|
|
3199
|
-
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
3200
|
-
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
3201
|
-
|
|
3202
|
-
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
3203
|
-
//=> {a: number} & Partial<Record<"b", never>>
|
|
3204
|
-
|
|
3205
|
-
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
3206
|
-
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
3207
|
-
```
|
|
3208
|
-
|
|
3209
|
-
@category Object
|
|
3210
|
-
*/
|
|
3211
|
-
type Except$1<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions$1 = {requireExactProps: false}> = {
|
|
3212
|
-
[KeyType in keyof ObjectType as Filter$1<KeyType, KeysType>]: ObjectType[KeyType];
|
|
3213
|
-
} & (Options['requireExactProps'] extends true
|
|
3214
|
-
? Partial<Record<KeysType, never>>
|
|
3215
|
-
: {});
|
|
3216
|
-
|
|
3217
|
-
/**
|
|
3218
|
-
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
3219
|
-
|
|
3220
|
-
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
3221
|
-
|
|
3222
|
-
@example
|
|
3223
|
-
```
|
|
3224
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
3225
|
-
|
|
3226
|
-
interface Example {
|
|
3227
|
-
a: string;
|
|
3228
|
-
b: string | number;
|
|
3229
|
-
c?: string;
|
|
3230
|
-
d: {};
|
|
2278
|
+
sort?: Sorting$1;
|
|
2279
|
+
/** Pagination information. */
|
|
2280
|
+
paging?: Paging$2;
|
|
2281
|
+
/**
|
|
2282
|
+
* Whether to retrieve data from the primary database instance.
|
|
2283
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
2284
|
+
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
2285
|
+
*
|
|
2286
|
+
* Default: `false`
|
|
2287
|
+
*/
|
|
2288
|
+
consistentRead?: boolean;
|
|
3231
2289
|
}
|
|
3232
2290
|
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
@
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
//=> 'a' | 'c'
|
|
3245
|
-
```
|
|
3246
|
-
|
|
3247
|
-
@category Object
|
|
3248
|
-
*/
|
|
3249
|
-
type ConditionalKeys$1<Base, Condition> = NonNullable<
|
|
3250
|
-
// Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
|
|
3251
|
-
{
|
|
3252
|
-
// Map through all the keys of the given base type.
|
|
3253
|
-
[Key in keyof Base]:
|
|
3254
|
-
// Pick only keys with types extending the given `Condition` type.
|
|
3255
|
-
Base[Key] extends Condition
|
|
3256
|
-
// Retain this key since the condition passes.
|
|
3257
|
-
? Key
|
|
3258
|
-
// Discard this key since the condition fails.
|
|
3259
|
-
: never;
|
|
3260
|
-
|
|
3261
|
-
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
3262
|
-
}[keyof Base]
|
|
3263
|
-
>;
|
|
3264
|
-
|
|
3265
|
-
/**
|
|
3266
|
-
Exclude keys from a shape that matches the given `Condition`.
|
|
3267
|
-
|
|
3268
|
-
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.
|
|
3269
|
-
|
|
3270
|
-
@example
|
|
3271
|
-
```
|
|
3272
|
-
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
3273
|
-
|
|
3274
|
-
class Awesome {
|
|
3275
|
-
name: string;
|
|
3276
|
-
successes: number;
|
|
3277
|
-
failures: bigint;
|
|
3278
|
-
|
|
3279
|
-
run() {}
|
|
2291
|
+
declare function createDataCollection$1(httpClient: HttpClient): CreateDataCollectionSignature;
|
|
2292
|
+
interface CreateDataCollectionSignature {
|
|
2293
|
+
/**
|
|
2294
|
+
* Creates a new data collection.
|
|
2295
|
+
*
|
|
2296
|
+
* 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.
|
|
2297
|
+
* @param - Collection details.
|
|
2298
|
+
* @param - Options for creating a data collection.
|
|
2299
|
+
* @returns Details of collection created.
|
|
2300
|
+
*/
|
|
2301
|
+
(collection: DataCollection): Promise<DataCollection & DataCollectionNonNullableFields>;
|
|
3280
2302
|
}
|
|
2303
|
+
declare function getDataCollection$1(httpClient: HttpClient): GetDataCollectionSignature;
|
|
2304
|
+
interface GetDataCollectionSignature {
|
|
2305
|
+
/**
|
|
2306
|
+
* Retrieves a data collection by ID.
|
|
2307
|
+
* @param - ID of the collection to retrieve.
|
|
2308
|
+
* @param - Options for retrieving a data collection.
|
|
2309
|
+
* @returns Details of the collection requested.
|
|
2310
|
+
*/
|
|
2311
|
+
(dataCollectionId: string, options?: GetDataCollectionOptions | undefined): Promise<DataCollection & DataCollectionNonNullableFields>;
|
|
2312
|
+
}
|
|
2313
|
+
declare function listDataCollections$1(httpClient: HttpClient): ListDataCollectionsSignature;
|
|
2314
|
+
interface ListDataCollectionsSignature {
|
|
2315
|
+
/**
|
|
2316
|
+
* Retrieves a list of all data collections associated with the site or project.
|
|
2317
|
+
*
|
|
2318
|
+
* By default, the list is ordered by ID in ascending order.
|
|
2319
|
+
* @param - Options for retrieving a list of data collections.
|
|
2320
|
+
*/
|
|
2321
|
+
(options?: ListDataCollectionsOptions | undefined): Promise<ListDataCollectionsResponse & ListDataCollectionsResponseNonNullableFields>;
|
|
2322
|
+
}
|
|
2323
|
+
declare function updateDataCollection$1(httpClient: HttpClient): UpdateDataCollectionSignature;
|
|
2324
|
+
interface UpdateDataCollectionSignature {
|
|
2325
|
+
/**
|
|
2326
|
+
* Updates a data collection.
|
|
2327
|
+
*
|
|
2328
|
+
* A collection ID, revision number, permissions, and at least 1 field must be provided within `options.collection`.
|
|
2329
|
+
* If a collection with that ID exists, and if its current `revision` number matches the one provided, it is updated.
|
|
2330
|
+
* Otherwise, the request fails.
|
|
2331
|
+
*
|
|
2332
|
+
* When a collection is updated, its `_updatedDate` property is changed to the current date and its `revision` property is incremented.
|
|
2333
|
+
*
|
|
2334
|
+
* > **Note:**
|
|
2335
|
+
* > 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
|
|
2336
|
+
* > aren't included in the updated collection details, their values are lost.
|
|
2337
|
+
* @param - Updated collection details. The existing collection is replaced with this version.
|
|
2338
|
+
* @param - Options for updating a data collection.
|
|
2339
|
+
* @returns Updated collection details.
|
|
2340
|
+
*/
|
|
2341
|
+
(collection: DataCollection): Promise<DataCollection & DataCollectionNonNullableFields>;
|
|
2342
|
+
}
|
|
2343
|
+
declare function deleteDataCollection$1(httpClient: HttpClient): DeleteDataCollectionSignature;
|
|
2344
|
+
interface DeleteDataCollectionSignature {
|
|
2345
|
+
/**
|
|
2346
|
+
* Deletes a data collection.
|
|
2347
|
+
*
|
|
2348
|
+
* > **Note:**
|
|
2349
|
+
* > Once a collection is deleted, it can't be restored.
|
|
2350
|
+
* @param - ID of the collection to delete.
|
|
2351
|
+
*/
|
|
2352
|
+
(dataCollectionId: string): Promise<void>;
|
|
2353
|
+
}
|
|
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">;
|
|
3281
2359
|
|
|
3282
|
-
type
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
2360
|
+
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
2361
|
+
__type: 'event-definition';
|
|
2362
|
+
type: Type;
|
|
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;
|
|
3289
2370
|
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
2371
|
+
declare global {
|
|
2372
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2373
|
+
interface SymbolConstructor {
|
|
2374
|
+
readonly observable: symbol;
|
|
2375
|
+
}
|
|
3295
2376
|
}
|
|
3296
2377
|
|
|
3297
|
-
|
|
3298
|
-
//=> {b: string | number; c: () => void; d: {}}
|
|
3299
|
-
```
|
|
2378
|
+
declare function createEventModule$1<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
|
|
3300
2379
|
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
>;
|
|
2380
|
+
declare const createDataCollection: MaybeContext<BuildRESTFunction<typeof createDataCollection$1> & typeof createDataCollection$1>;
|
|
2381
|
+
declare const getDataCollection: MaybeContext<BuildRESTFunction<typeof getDataCollection$1> & typeof getDataCollection$1>;
|
|
2382
|
+
declare const listDataCollections: MaybeContext<BuildRESTFunction<typeof listDataCollections$1> & typeof listDataCollections$1>;
|
|
2383
|
+
declare const updateDataCollection: MaybeContext<BuildRESTFunction<typeof updateDataCollection$1> & typeof updateDataCollection$1>;
|
|
2384
|
+
declare const deleteDataCollection: MaybeContext<BuildRESTFunction<typeof deleteDataCollection$1> & typeof deleteDataCollection$1>;
|
|
3307
2385
|
|
|
2386
|
+
type _publicOnDataCollectionClonedEventType = typeof onDataCollectionClonedEvent$1;
|
|
3308
2387
|
/**
|
|
3309
|
-
*
|
|
3310
|
-
*
|
|
3311
|
-
* This type is recursive, so it can describe nested modules.
|
|
2388
|
+
* Event triggered when collection is cloned from other instance
|
|
2389
|
+
* CREATED event will be also triggered along with this action
|
|
3312
2390
|
*/
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
2391
|
+
declare const onDataCollectionClonedEvent: ReturnType<typeof createEventModule$1<_publicOnDataCollectionClonedEventType>>;
|
|
2392
|
+
|
|
2393
|
+
type _publicOnDataCollectionChangedEventType = typeof onDataCollectionChangedEvent$1;
|
|
3316
2394
|
/**
|
|
3317
|
-
*
|
|
3318
|
-
*
|
|
3319
|
-
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
3320
|
-
* do not match the given host (as they will not work with the given host).
|
|
2395
|
+
* Event triggered when collection is changed, describing some of changes
|
|
2396
|
+
* UPDATED event will be also triggered along with this action
|
|
3321
2397
|
*/
|
|
3322
|
-
|
|
3323
|
-
done: T;
|
|
3324
|
-
recurse: T extends {
|
|
3325
|
-
__type: typeof SERVICE_PLUGIN_ERROR_TYPE$1;
|
|
3326
|
-
} ? never : T extends AmbassadorFunctionDescriptor$1 ? BuildAmbassadorFunction$1<T> : T extends RESTFunctionDescriptor$1 ? BuildRESTFunction$1<T> : T extends EventDefinition$2<any> ? BuildEventDefinition$2<T> : T extends ServicePluginDefinition$1<any> ? BuildServicePluginDefinition$1<T> : T extends HostModule$1<any, any> ? HostModuleAPI$1<T> : ConditionalExcept$1<{
|
|
3327
|
-
[Key in keyof T]: T[Key] extends Descriptors$1 ? BuildDescriptors$1<T[Key], H, [
|
|
3328
|
-
-1,
|
|
3329
|
-
0,
|
|
3330
|
-
1,
|
|
3331
|
-
2,
|
|
3332
|
-
3,
|
|
3333
|
-
4,
|
|
3334
|
-
5
|
|
3335
|
-
][Depth]> : never;
|
|
3336
|
-
}, EmptyObject$1>;
|
|
3337
|
-
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
3338
|
-
type PublicMetadata$1 = {
|
|
3339
|
-
PACKAGE_NAME?: string;
|
|
3340
|
-
};
|
|
2398
|
+
declare const onDataCollectionChangedEvent: ReturnType<typeof createEventModule$1<_publicOnDataCollectionChangedEventType>>;
|
|
3341
2399
|
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
2400
|
+
type _publicOnDataCollectionCreatedType = typeof onDataCollectionCreated$1;
|
|
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 };
|
|
3345
2539
|
}
|
|
3346
|
-
/**
|
|
3347
|
-
* A type used to create concerete types from SDK descriptors in
|
|
3348
|
-
* case a contextual client is available.
|
|
3349
|
-
*/
|
|
3350
|
-
type MaybeContext$1<T extends Descriptors$1> = globalThis.ContextualClient extends {
|
|
3351
|
-
host: Host$1;
|
|
3352
|
-
} ? BuildDescriptors$1<T, globalThis.ContextualClient['host']> : T;
|
|
3353
2540
|
|
|
3354
2541
|
interface DataItem {
|
|
3355
2542
|
/** Data item ID. */
|
|
@@ -5285,7 +4472,7 @@ interface ReplaceDataItemReferencesOptions {
|
|
|
5285
4472
|
newReferencedItemIds?: string[];
|
|
5286
4473
|
}
|
|
5287
4474
|
|
|
5288
|
-
declare function insertDataItem$1(httpClient: HttpClient
|
|
4475
|
+
declare function insertDataItem$1(httpClient: HttpClient): InsertDataItemSignature;
|
|
5289
4476
|
interface InsertDataItemSignature {
|
|
5290
4477
|
/**
|
|
5291
4478
|
* Adds an item to a collection.
|
|
@@ -5303,7 +4490,7 @@ interface InsertDataItemSignature {
|
|
|
5303
4490
|
*/
|
|
5304
4491
|
(options?: InsertDataItemOptions | undefined): Promise<InsertDataItemResponse & InsertDataItemResponseNonNullableFields>;
|
|
5305
4492
|
}
|
|
5306
|
-
declare function updateDataItem$1(httpClient: HttpClient
|
|
4493
|
+
declare function updateDataItem$1(httpClient: HttpClient): UpdateDataItemSignature;
|
|
5307
4494
|
interface UpdateDataItemSignature {
|
|
5308
4495
|
/**
|
|
5309
4496
|
* Updates an item in a collection.
|
|
@@ -5325,7 +4512,7 @@ interface UpdateDataItemSignature {
|
|
|
5325
4512
|
*/
|
|
5326
4513
|
(_id: string, options?: UpdateDataItemOptions | undefined): Promise<UpdateDataItemResponse & UpdateDataItemResponseNonNullableFields>;
|
|
5327
4514
|
}
|
|
5328
|
-
declare function saveDataItem$1(httpClient: HttpClient
|
|
4515
|
+
declare function saveDataItem$1(httpClient: HttpClient): SaveDataItemSignature;
|
|
5329
4516
|
interface SaveDataItemSignature {
|
|
5330
4517
|
/**
|
|
5331
4518
|
* Inserts or updates an item in a collection.
|
|
@@ -5345,7 +4532,7 @@ interface SaveDataItemSignature {
|
|
|
5345
4532
|
*/
|
|
5346
4533
|
(options?: SaveDataItemOptions | undefined): Promise<SaveDataItemResponse & SaveDataItemResponseNonNullableFields>;
|
|
5347
4534
|
}
|
|
5348
|
-
declare function getDataItem$1(httpClient: HttpClient
|
|
4535
|
+
declare function getDataItem$1(httpClient: HttpClient): GetDataItemSignature;
|
|
5349
4536
|
interface GetDataItemSignature {
|
|
5350
4537
|
/**
|
|
5351
4538
|
* Retrieves an item from a collection.
|
|
@@ -5358,7 +4545,7 @@ interface GetDataItemSignature {
|
|
|
5358
4545
|
*/
|
|
5359
4546
|
(dataItemId: string, options?: GetDataItemOptions | undefined): Promise<DataItem & DataItemNonNullableFields>;
|
|
5360
4547
|
}
|
|
5361
|
-
declare function removeDataItem$1(httpClient: HttpClient
|
|
4548
|
+
declare function removeDataItem$1(httpClient: HttpClient): RemoveDataItemSignature;
|
|
5362
4549
|
interface RemoveDataItemSignature {
|
|
5363
4550
|
/**
|
|
5364
4551
|
* Removes an item from a collection.
|
|
@@ -5373,892 +4560,482 @@ interface RemoveDataItemSignature {
|
|
|
5373
4560
|
*/
|
|
5374
4561
|
(dataItemId: string, options?: RemoveDataItemOptions | undefined): Promise<RemoveDataItemResponse & RemoveDataItemResponseNonNullableFields>;
|
|
5375
4562
|
}
|
|
5376
|
-
declare function truncateDataItems$1(httpClient: HttpClient
|
|
5377
|
-
interface TruncateDataItemsSignature {
|
|
5378
|
-
/**
|
|
5379
|
-
* Removes all items from a collection.
|
|
5380
|
-
*
|
|
5381
|
-
*
|
|
5382
|
-
* If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.
|
|
5383
|
-
*
|
|
5384
|
-
* > **Note:**
|
|
5385
|
-
* > Once items have been removed from a collection, they can't be restored.
|
|
5386
|
-
* @param - Options for truncating data items from a collection.
|
|
5387
|
-
*/
|
|
5388
|
-
(options: TruncateDataItemsOptions): Promise<void>;
|
|
5389
|
-
}
|
|
5390
|
-
declare function queryDataItems$1(httpClient: HttpClient$1): QueryDataItemsSignature;
|
|
5391
|
-
interface QueryDataItemsSignature {
|
|
5392
|
-
/**
|
|
5393
|
-
* Creates a query to retrieve items from a database collection.
|
|
5394
|
-
*
|
|
5395
|
-
* The `queryDataItems()` function builds a query to retrieve data items from a collection and returns a `DataItemsQueryBuilder` object.
|
|
5396
|
-
*
|
|
5397
|
-
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
|
5398
|
-
*
|
|
5399
|
-
* You can refine the query by chaining `DataItemsQueryBuilder` functions onto the query. `DataItemsQueryBuilder` functions enable you to sort, filter, and control the results that `queryDataItems()` returns.
|
|
5400
|
-
*
|
|
5401
|
-
* The `queryDataItems()` function runs with the following `DataItemsQueryBuilder` defaults that you can override:
|
|
5402
|
-
*
|
|
5403
|
-
* + `skip`: 0
|
|
5404
|
-
* + `limit`: 50
|
|
5405
|
-
* + `descending`: by `_createdDate`
|
|
5406
|
-
*
|
|
5407
|
-
* The functions that are chained to `queryDataItems()` are applied in the order they are called. For example, if you sort on an `age` field in ascending order and then on a `name` field in descending order, the results are sorted first by the age of the items and then, if there are multiple results with the same age, the items are sorted by name in descending order, per age value.
|
|
5408
|
-
*
|
|
5409
|
-
* If the collection that you are querying has references to other collections, by default the data from referenced collections is not retrieved. To get the data from referenced items, specify them in the `options.includeReferencedItems` parameter.
|
|
5410
|
-
*
|
|
5411
|
-
* > **Note**: When calling `queryDataItems()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
5412
|
-
*
|
|
5413
|
-
*
|
|
5414
|
-
* @param - Options for querying data items.
|
|
5415
|
-
*/
|
|
5416
|
-
(options: QueryDataItemsOptions): DataItemsQueryBuilder;
|
|
5417
|
-
}
|
|
5418
|
-
declare function aggregateDataItems$1(httpClient: HttpClient$1): AggregateDataItemsSignature;
|
|
5419
|
-
interface AggregateDataItemsSignature {
|
|
5420
|
-
/**
|
|
5421
|
-
* Runs an aggregation on a data collection and returns the resulting list of items.
|
|
5422
|
-
*
|
|
5423
|
-
*
|
|
5424
|
-
* An aggregation enables you to perform certain calculations on your collection data, or on groups of items that you define, to retrieve meaningful summaries.
|
|
5425
|
-
* You can also add paging, filtering, and sorting preferences to your aggregation to retrieve exactly what you need.
|
|
5426
|
-
* @param - Options for running an aggregation.
|
|
5427
|
-
*/
|
|
5428
|
-
(options?: AggregateDataItemsOptions | undefined): Promise<AggregateDataItemsResponse>;
|
|
5429
|
-
}
|
|
5430
|
-
declare function countDataItems$1(httpClient: HttpClient$1): CountDataItemsSignature;
|
|
5431
|
-
interface CountDataItemsSignature {
|
|
5432
|
-
/**
|
|
5433
|
-
* Counts the number of items in a data collection that match the provided filtering preferences.
|
|
5434
|
-
*
|
|
5435
|
-
* > **Note**: When calling `countDataItems()` following an update to your collection, the result returned may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
5436
|
-
* @param - Options for counting the number of items in a data collection.
|
|
5437
|
-
*/
|
|
5438
|
-
(options?: CountDataItemsOptions | undefined): Promise<CountDataItemsResponse & CountDataItemsResponseNonNullableFields>;
|
|
5439
|
-
}
|
|
5440
|
-
declare function queryDistinctValues$1(httpClient: HttpClient$1): QueryDistinctValuesSignature;
|
|
5441
|
-
interface QueryDistinctValuesSignature {
|
|
5442
|
-
/**
|
|
5443
|
-
* Retrieves a list of distinct values for a given field in all items that match a query, without duplicates.
|
|
5444
|
-
*
|
|
5445
|
-
*
|
|
5446
|
-
* As with `queryDataItems()`, this endpoint retrieves items based on the filtering, sorting, and paging preferences you provide.
|
|
5447
|
-
* However, `queryDistinctValues()` doesn't return all of the full items that match the query.
|
|
5448
|
-
* Rather, it returns all unique values of the field you specify in `options.fieldName` for items that match the query.
|
|
5449
|
-
* If more than one item has the same value for that field, that value appears only once.
|
|
5450
|
-
*
|
|
5451
|
-
* For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
5452
|
-
*
|
|
5453
|
-
* > **Note**: When calling `queryDistinctValues()` following an update to your collection, the data retrieved may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
5454
|
-
* @param - Options for querying distinct values.
|
|
5455
|
-
*/
|
|
5456
|
-
(options?: QueryDistinctValuesOptions | undefined): Promise<QueryDistinctValuesResponse>;
|
|
5457
|
-
}
|
|
5458
|
-
declare function bulkInsertDataItems$1(httpClient: HttpClient$1): BulkInsertDataItemsSignature;
|
|
5459
|
-
interface BulkInsertDataItemsSignature {
|
|
5460
|
-
/**
|
|
5461
|
-
* Adds multiple items to a collection.
|
|
5462
|
-
*
|
|
5463
|
-
*
|
|
5464
|
-
* When each item is inserted into a collection, its ID is automatically assigned a random value.
|
|
5465
|
-
* You can optionally provide your own ID when inserting the item. If you specify an ID that already exists in the collection, the insertion will fail.
|
|
5466
|
-
* @param - Options for adding multiple items to a collection.
|
|
5467
|
-
*/
|
|
5468
|
-
(options?: BulkInsertDataItemsOptions | undefined): Promise<BulkInsertDataItemsResponse & BulkInsertDataItemsResponseNonNullableFields>;
|
|
5469
|
-
}
|
|
5470
|
-
declare function bulkUpdateDataItems$1(httpClient: HttpClient$1): BulkUpdateDataItemsSignature;
|
|
5471
|
-
interface BulkUpdateDataItemsSignature {
|
|
5472
|
-
/**
|
|
5473
|
-
* Updates multiple items in a collection.
|
|
5474
|
-
*
|
|
5475
|
-
*
|
|
5476
|
-
* This function replaces each specified data item's existing data with the payload provided in the request.
|
|
5477
|
-
*
|
|
5478
|
-
* Each item in the request must include an ID. If an item is found in the specified collection with
|
|
5479
|
-
* the same ID, that item is updated. If the collection doesn't contain an item with that ID, the update fails.
|
|
5480
|
-
*
|
|
5481
|
-
* When an item is updated, its `data._updatedDate` field is changed to the current date and time.
|
|
5482
|
-
*
|
|
5483
|
-
* > **Note:**
|
|
5484
|
-
* > After each item is updated, it only contains the fields included in the request. If the existing item has fields with values and those fields
|
|
5485
|
-
* > aren't included in the updated item, their values are lost.
|
|
5486
|
-
* @param - Options for updating multiple items in a collection.
|
|
5487
|
-
*/
|
|
5488
|
-
(options?: BulkUpdateDataItemsOptions | undefined): Promise<BulkUpdateDataItemsResponse & BulkUpdateDataItemsResponseNonNullableFields>;
|
|
5489
|
-
}
|
|
5490
|
-
declare function bulkSaveDataItems$1(httpClient: HttpClient$1): BulkSaveDataItemsSignature;
|
|
5491
|
-
interface BulkSaveDataItemsSignature {
|
|
5492
|
-
/**
|
|
5493
|
-
* Inserts or updates multiple items in a collection.
|
|
5494
|
-
*
|
|
5495
|
-
*
|
|
5496
|
-
* This function inserts or updates each item provided, depending on whether it already exists in the collection. For each item:
|
|
5497
|
-
*
|
|
5498
|
-
* + If you don't provide an ID, a new item is created.
|
|
5499
|
-
*
|
|
5500
|
-
* + If you provide an ID that doesn't exist in the collection, a new item is created with that ID.
|
|
5501
|
-
*
|
|
5502
|
-
* + If an item with the ID you provide already exists in the collection, that item is updated. When an item is updated, its `data._updatedDate` field is changed to the current date and time.
|
|
5503
|
-
*
|
|
5504
|
-
* > **Note:** When you provide an item with an ID that already exists in the collection, the item you provide completely replaces the existing item with that ID.
|
|
5505
|
-
* > This means that all of the item's previous fields and values are lost.
|
|
5506
|
-
* @param - Options for saving multiple items in a collection.
|
|
5507
|
-
*/
|
|
5508
|
-
(options?: BulkSaveDataItemsOptions | undefined): Promise<BulkSaveDataItemsResponse & BulkSaveDataItemsResponseNonNullableFields>;
|
|
5509
|
-
}
|
|
5510
|
-
declare function bulkRemoveDataItems$1(httpClient: HttpClient$1): BulkRemoveDataItemsSignature;
|
|
5511
|
-
interface BulkRemoveDataItemsSignature {
|
|
5512
|
-
/**
|
|
5513
|
-
* Removes multiple items from a collection.
|
|
5514
|
-
*
|
|
5515
|
-
*
|
|
5516
|
-
* If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.
|
|
5517
|
-
*
|
|
5518
|
-
* > **Note:** Once an item has been removed from a collection, it can't be restored.
|
|
5519
|
-
* @param - Options for removing multiple items from a collection.
|
|
5520
|
-
*/
|
|
5521
|
-
(options?: BulkRemoveDataItemsOptions | undefined): Promise<BulkRemoveDataItemsResponse & BulkRemoveDataItemsResponseNonNullableFields>;
|
|
5522
|
-
}
|
|
5523
|
-
declare function queryReferencedDataItems$1(httpClient: HttpClient$1): QueryReferencedDataItemsSignature;
|
|
5524
|
-
interface QueryReferencedDataItemsSignature {
|
|
5525
|
-
/**
|
|
5526
|
-
* Retrieves the full items referenced in the specified field of an item.
|
|
5527
|
-
*
|
|
5528
|
-
*
|
|
5529
|
-
* Reference and multi-reference fields refer to items in different collections.
|
|
5530
|
-
* Use this function to retrieve the full details of the referenced items themselves.
|
|
5531
|
-
*
|
|
5532
|
-
* For example, suppose you have a **Movies** collection with an **Actors** field that contains references to items in a **People** collection.
|
|
5533
|
-
* Querying the **Movies** collection using `queryReferencedDataItems()` returns the relevant **People** items referenced in the **Actors** field of the specified **Movie** item.
|
|
5534
|
-
* This gives you information from the **People** collection about each of the actors in the specified movie.
|
|
5535
|
-
*
|
|
5536
|
-
* > **Note**: When calling `queryReferencedDataItems()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
5537
|
-
* @param - Options for querying referenced data items.
|
|
5538
|
-
*/
|
|
5539
|
-
(options?: QueryReferencedDataItemsOptions | undefined): Promise<QueryReferencedDataItemsResponse & QueryReferencedDataItemsResponseNonNullableFields>;
|
|
5540
|
-
}
|
|
5541
|
-
declare function isReferencedDataItem$1(httpClient: HttpClient$1): IsReferencedDataItemSignature;
|
|
5542
|
-
interface IsReferencedDataItemSignature {
|
|
5543
|
-
/**
|
|
5544
|
-
* Checks whether a field in a referring item contains a reference to a specified item.
|
|
5545
|
-
*
|
|
5546
|
-
* > **Note**: When calling `isReferencedDataItem()` following an update to your collection, the result returned may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
5547
|
-
* @param - Options for checking whether a field contains a reference to an item.
|
|
5548
|
-
*/
|
|
5549
|
-
(options?: IsReferencedDataItemOptions | undefined): Promise<IsReferencedDataItemResponse & IsReferencedDataItemResponseNonNullableFields>;
|
|
5550
|
-
}
|
|
5551
|
-
declare function insertDataItemReference$1(httpClient: HttpClient$1): InsertDataItemReferenceSignature;
|
|
5552
|
-
interface InsertDataItemReferenceSignature {
|
|
5553
|
-
/**
|
|
5554
|
-
* Inserts a reference in the specified field in an item in a collection.
|
|
5555
|
-
*
|
|
5556
|
-
*
|
|
5557
|
-
* A reference in `options.dataItemReference` specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item.
|
|
5558
|
-
* @param - Options for inserting a reference.
|
|
5559
|
-
*/
|
|
5560
|
-
(options?: InsertDataItemReferenceOptions | undefined): Promise<InsertDataItemReferenceResponse & InsertDataItemReferenceResponseNonNullableFields>;
|
|
5561
|
-
}
|
|
5562
|
-
declare function removeDataItemReference$1(httpClient: HttpClient$1): RemoveDataItemReferenceSignature;
|
|
5563
|
-
interface RemoveDataItemReferenceSignature {
|
|
5564
|
-
/**
|
|
5565
|
-
* Removes the specified reference from the specified field.
|
|
5566
|
-
* @param - Options for removing a reference.
|
|
5567
|
-
*/
|
|
5568
|
-
(options: RemoveDataItemReferenceOptions): Promise<RemoveDataItemReferenceResponse & RemoveDataItemReferenceResponseNonNullableFields>;
|
|
5569
|
-
}
|
|
5570
|
-
declare function bulkInsertDataItemReferences$1(httpClient: HttpClient$1): BulkInsertDataItemReferencesSignature;
|
|
5571
|
-
interface BulkInsertDataItemReferencesSignature {
|
|
5572
|
-
/**
|
|
5573
|
-
* Inserts one or more references in the specified fields of items in a collection.
|
|
5574
|
-
*
|
|
5575
|
-
*
|
|
5576
|
-
* This endpoint adds one or more references to a collection.
|
|
5577
|
-
* 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.
|
|
5578
|
-
* @param - Options for inserting one or more references.
|
|
5579
|
-
*/
|
|
5580
|
-
(options?: BulkInsertDataItemReferencesOptions | undefined): Promise<BulkInsertDataItemReferencesResponse & BulkInsertDataItemReferencesResponseNonNullableFields>;
|
|
5581
|
-
}
|
|
5582
|
-
declare function bulkRemoveDataItemReferences$1(httpClient: HttpClient$1): BulkRemoveDataItemReferencesSignature;
|
|
5583
|
-
interface BulkRemoveDataItemReferencesSignature {
|
|
5584
|
-
/**
|
|
5585
|
-
* Removes one or more references.
|
|
5586
|
-
* @param - Options for removing one or more references.
|
|
5587
|
-
*/
|
|
5588
|
-
(options: BulkRemoveDataItemReferencesOptions): Promise<BulkRemoveDataItemReferencesResponse & BulkRemoveDataItemReferencesResponseNonNullableFields>;
|
|
5589
|
-
}
|
|
5590
|
-
declare function replaceDataItemReferences$1(httpClient: HttpClient$1): ReplaceDataItemReferencesSignature;
|
|
5591
|
-
interface ReplaceDataItemReferencesSignature {
|
|
4563
|
+
declare function truncateDataItems$1(httpClient: HttpClient): TruncateDataItemsSignature;
|
|
4564
|
+
interface TruncateDataItemsSignature {
|
|
5592
4565
|
/**
|
|
5593
|
-
*
|
|
4566
|
+
* Removes all items from a collection.
|
|
5594
4567
|
*
|
|
5595
4568
|
*
|
|
5596
|
-
*
|
|
5597
|
-
* The function removes existing references and in their place it adds references to the items specified in `options.newReferencedItemIds`.
|
|
4569
|
+
* If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.
|
|
5598
4570
|
*
|
|
5599
|
-
* > **Note:**
|
|
5600
|
-
*
|
|
4571
|
+
* > **Note:**
|
|
4572
|
+
* > Once items have been removed from a collection, they can't be restored.
|
|
4573
|
+
* @param - Options for truncating data items from a collection.
|
|
5601
4574
|
*/
|
|
5602
|
-
(options
|
|
5603
|
-
}
|
|
5604
|
-
declare const onDataItemCreated$1: EventDefinition$2<DataItemCreatedEnvelope, "wix.data.v2.data_item_created">;
|
|
5605
|
-
declare const onDataItemUpdated$1: EventDefinition$2<DataItemUpdatedEnvelope, "wix.data.v2.data_item_updated">;
|
|
5606
|
-
declare const onDataItemDeleted$1: EventDefinition$2<DataItemDeletedEnvelope, "wix.data.v2.data_item_deleted">;
|
|
5607
|
-
|
|
5608
|
-
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
5609
|
-
__type: 'event-definition';
|
|
5610
|
-
type: Type;
|
|
5611
|
-
isDomainEvent?: boolean;
|
|
5612
|
-
transformations?: (envelope: unknown) => Payload;
|
|
5613
|
-
__payload: Payload;
|
|
5614
|
-
};
|
|
5615
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
5616
|
-
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
5617
|
-
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
5618
|
-
|
|
5619
|
-
declare global {
|
|
5620
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
5621
|
-
interface SymbolConstructor {
|
|
5622
|
-
readonly observable: symbol;
|
|
5623
|
-
}
|
|
4575
|
+
(options: TruncateDataItemsOptions): Promise<void>;
|
|
5624
4576
|
}
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
* Triggered when a data item is inserted.
|
|
5653
|
-
*/
|
|
5654
|
-
declare const onDataItemCreated: ReturnType<typeof createEventModule<_publicOnDataItemCreatedType>>;
|
|
5655
|
-
|
|
5656
|
-
type _publicOnDataItemUpdatedType = typeof onDataItemUpdated$1;
|
|
5657
|
-
/**
|
|
5658
|
-
* Triggered when a data item is updated.
|
|
5659
|
-
*
|
|
5660
|
-
* **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.
|
|
5661
|
-
*/
|
|
5662
|
-
declare const onDataItemUpdated: ReturnType<typeof createEventModule<_publicOnDataItemUpdatedType>>;
|
|
5663
|
-
|
|
5664
|
-
type _publicOnDataItemDeletedType = typeof onDataItemDeleted$1;
|
|
5665
|
-
/**
|
|
5666
|
-
* Triggered when a data item is deleted.
|
|
5667
|
-
*/
|
|
5668
|
-
declare const onDataItemDeleted: ReturnType<typeof createEventModule<_publicOnDataItemDeletedType>>;
|
|
5669
|
-
|
|
5670
|
-
type context$1_ACTION = ACTION;
|
|
5671
|
-
declare const context$1_ACTION: typeof ACTION;
|
|
5672
|
-
type context$1_Action = Action;
|
|
5673
|
-
declare const context$1_Action: typeof Action;
|
|
5674
|
-
type context$1_ActionEvent = ActionEvent;
|
|
5675
|
-
type context$1_AggregateDataItemsOptions = AggregateDataItemsOptions;
|
|
5676
|
-
type context$1_AggregateDataItemsRequest = AggregateDataItemsRequest;
|
|
5677
|
-
type context$1_AggregateDataItemsRequestPagingMethodOneOf = AggregateDataItemsRequestPagingMethodOneOf;
|
|
5678
|
-
type context$1_AggregateDataItemsResponse = AggregateDataItemsResponse;
|
|
5679
|
-
type context$1_Aggregation = Aggregation;
|
|
5680
|
-
type context$1_AppendToArray = AppendToArray;
|
|
5681
|
-
type context$1_ApplicationError = ApplicationError;
|
|
5682
|
-
type context$1_Average = Average;
|
|
5683
|
-
type context$1_BaseEventMetadata = BaseEventMetadata;
|
|
5684
|
-
type context$1_BulkActionMetadata = BulkActionMetadata;
|
|
5685
|
-
type context$1_BulkActionType = BulkActionType;
|
|
5686
|
-
declare const context$1_BulkActionType: typeof BulkActionType;
|
|
5687
|
-
type context$1_BulkDataItemReferenceResult = BulkDataItemReferenceResult;
|
|
5688
|
-
type context$1_BulkDataItemResult = BulkDataItemResult;
|
|
5689
|
-
type context$1_BulkInsertDataItemReferencesOptions = BulkInsertDataItemReferencesOptions;
|
|
5690
|
-
type context$1_BulkInsertDataItemReferencesRequest = BulkInsertDataItemReferencesRequest;
|
|
5691
|
-
type context$1_BulkInsertDataItemReferencesResponse = BulkInsertDataItemReferencesResponse;
|
|
5692
|
-
type context$1_BulkInsertDataItemReferencesResponseNonNullableFields = BulkInsertDataItemReferencesResponseNonNullableFields;
|
|
5693
|
-
type context$1_BulkInsertDataItemsOptions = BulkInsertDataItemsOptions;
|
|
5694
|
-
type context$1_BulkInsertDataItemsRequest = BulkInsertDataItemsRequest;
|
|
5695
|
-
type context$1_BulkInsertDataItemsResponse = BulkInsertDataItemsResponse;
|
|
5696
|
-
type context$1_BulkInsertDataItemsResponseNonNullableFields = BulkInsertDataItemsResponseNonNullableFields;
|
|
5697
|
-
type context$1_BulkPatchDataItemsRequest = BulkPatchDataItemsRequest;
|
|
5698
|
-
type context$1_BulkPatchDataItemsResponse = BulkPatchDataItemsResponse;
|
|
5699
|
-
type context$1_BulkRemoveDataItemReferencesOptions = BulkRemoveDataItemReferencesOptions;
|
|
5700
|
-
type context$1_BulkRemoveDataItemReferencesRequest = BulkRemoveDataItemReferencesRequest;
|
|
5701
|
-
type context$1_BulkRemoveDataItemReferencesResponse = BulkRemoveDataItemReferencesResponse;
|
|
5702
|
-
type context$1_BulkRemoveDataItemReferencesResponseNonNullableFields = BulkRemoveDataItemReferencesResponseNonNullableFields;
|
|
5703
|
-
type context$1_BulkRemoveDataItemsOptions = BulkRemoveDataItemsOptions;
|
|
5704
|
-
type context$1_BulkRemoveDataItemsRequest = BulkRemoveDataItemsRequest;
|
|
5705
|
-
type context$1_BulkRemoveDataItemsResponse = BulkRemoveDataItemsResponse;
|
|
5706
|
-
type context$1_BulkRemoveDataItemsResponseNonNullableFields = BulkRemoveDataItemsResponseNonNullableFields;
|
|
5707
|
-
type context$1_BulkSaveDataItemsOptions = BulkSaveDataItemsOptions;
|
|
5708
|
-
type context$1_BulkSaveDataItemsRequest = BulkSaveDataItemsRequest;
|
|
5709
|
-
type context$1_BulkSaveDataItemsResponse = BulkSaveDataItemsResponse;
|
|
5710
|
-
type context$1_BulkSaveDataItemsResponseNonNullableFields = BulkSaveDataItemsResponseNonNullableFields;
|
|
5711
|
-
type context$1_BulkUpdateDataItemsOptions = BulkUpdateDataItemsOptions;
|
|
5712
|
-
type context$1_BulkUpdateDataItemsRequest = BulkUpdateDataItemsRequest;
|
|
5713
|
-
type context$1_BulkUpdateDataItemsResponse = BulkUpdateDataItemsResponse;
|
|
5714
|
-
type context$1_BulkUpdateDataItemsResponseNonNullableFields = BulkUpdateDataItemsResponseNonNullableFields;
|
|
5715
|
-
type context$1_CachingInfo = CachingInfo;
|
|
5716
|
-
type context$1_Count = Count;
|
|
5717
|
-
type context$1_CountDataItemsOptions = CountDataItemsOptions;
|
|
5718
|
-
type context$1_CountDataItemsRequest = CountDataItemsRequest;
|
|
5719
|
-
type context$1_CountDataItemsResponse = CountDataItemsResponse;
|
|
5720
|
-
type context$1_CountDataItemsResponseNonNullableFields = CountDataItemsResponseNonNullableFields;
|
|
5721
|
-
type context$1_CursorPaging = CursorPaging;
|
|
5722
|
-
type context$1_Cursors = Cursors;
|
|
5723
|
-
type context$1_DataItem = DataItem;
|
|
5724
|
-
type context$1_DataItemCreatedEnvelope = DataItemCreatedEnvelope;
|
|
5725
|
-
type context$1_DataItemDeletedEnvelope = DataItemDeletedEnvelope;
|
|
5726
|
-
type context$1_DataItemNonNullableFields = DataItemNonNullableFields;
|
|
5727
|
-
type context$1_DataItemReference = DataItemReference;
|
|
5728
|
-
type context$1_DataItemUpdatedEnvelope = DataItemUpdatedEnvelope;
|
|
5729
|
-
type context$1_DataItemsQueryBuilder = DataItemsQueryBuilder;
|
|
5730
|
-
type context$1_DataItemsQueryResult = DataItemsQueryResult;
|
|
5731
|
-
type context$1_DataPublishPluginOptions = DataPublishPluginOptions;
|
|
5732
|
-
type context$1_DomainEvent = DomainEvent;
|
|
5733
|
-
type context$1_DomainEventBodyOneOf = DomainEventBodyOneOf;
|
|
5734
|
-
type context$1_EntityCreatedEvent = EntityCreatedEvent;
|
|
5735
|
-
type context$1_EntityDeletedEvent = EntityDeletedEvent;
|
|
5736
|
-
type context$1_EntityUpdatedEvent = EntityUpdatedEvent;
|
|
5737
|
-
type context$1_EventMetadata = EventMetadata;
|
|
5738
|
-
type context$1_FieldUpdate = FieldUpdate;
|
|
5739
|
-
type context$1_FieldUpdateActionOptionsOneOf = FieldUpdateActionOptionsOneOf;
|
|
5740
|
-
type context$1_GetDataItemOptions = GetDataItemOptions;
|
|
5741
|
-
type context$1_GetDataItemRequest = GetDataItemRequest;
|
|
5742
|
-
type context$1_GetDataItemResponse = GetDataItemResponse;
|
|
5743
|
-
type context$1_GetDataItemResponseNonNullableFields = GetDataItemResponseNonNullableFields;
|
|
5744
|
-
type context$1_IdentificationData = IdentificationData;
|
|
5745
|
-
type context$1_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
|
|
5746
|
-
type context$1_IncrementField = IncrementField;
|
|
5747
|
-
type context$1_InsertDataItemOptions = InsertDataItemOptions;
|
|
5748
|
-
type context$1_InsertDataItemReferenceOptions = InsertDataItemReferenceOptions;
|
|
5749
|
-
type context$1_InsertDataItemReferenceRequest = InsertDataItemReferenceRequest;
|
|
5750
|
-
type context$1_InsertDataItemReferenceResponse = InsertDataItemReferenceResponse;
|
|
5751
|
-
type context$1_InsertDataItemReferenceResponseNonNullableFields = InsertDataItemReferenceResponseNonNullableFields;
|
|
5752
|
-
type context$1_InsertDataItemRequest = InsertDataItemRequest;
|
|
5753
|
-
type context$1_InsertDataItemResponse = InsertDataItemResponse;
|
|
5754
|
-
type context$1_InsertDataItemResponseNonNullableFields = InsertDataItemResponseNonNullableFields;
|
|
5755
|
-
type context$1_IsReferencedDataItemOptions = IsReferencedDataItemOptions;
|
|
5756
|
-
type context$1_IsReferencedDataItemRequest = IsReferencedDataItemRequest;
|
|
5757
|
-
type context$1_IsReferencedDataItemResponse = IsReferencedDataItemResponse;
|
|
5758
|
-
type context$1_IsReferencedDataItemResponseNonNullableFields = IsReferencedDataItemResponseNonNullableFields;
|
|
5759
|
-
type context$1_ItemMetadata = ItemMetadata;
|
|
5760
|
-
type context$1_Max = Max;
|
|
5761
|
-
type context$1_MessageEnvelope = MessageEnvelope;
|
|
5762
|
-
type context$1_Min = Min;
|
|
5763
|
-
type context$1_Operation = Operation;
|
|
5764
|
-
type context$1_OperationCalculateOneOf = OperationCalculateOneOf;
|
|
5765
|
-
type context$1_Options = Options;
|
|
5766
|
-
type context$1_PagingMetadataV2 = PagingMetadataV2;
|
|
5767
|
-
type context$1_PatchDataItemRequest = PatchDataItemRequest;
|
|
5768
|
-
type context$1_PatchDataItemResponse = PatchDataItemResponse;
|
|
5769
|
-
type context$1_PatchSet = PatchSet;
|
|
5770
|
-
type context$1_PublishPluginOptions = PublishPluginOptions;
|
|
5771
|
-
type context$1_QueryDataItemsOptions = QueryDataItemsOptions;
|
|
5772
|
-
type context$1_QueryDataItemsRequest = QueryDataItemsRequest;
|
|
5773
|
-
type context$1_QueryDataItemsResponse = QueryDataItemsResponse;
|
|
5774
|
-
type context$1_QueryDataItemsResponseNonNullableFields = QueryDataItemsResponseNonNullableFields;
|
|
5775
|
-
type context$1_QueryDistinctValuesOptions = QueryDistinctValuesOptions;
|
|
5776
|
-
type context$1_QueryDistinctValuesRequest = QueryDistinctValuesRequest;
|
|
5777
|
-
type context$1_QueryDistinctValuesRequestPagingMethodOneOf = QueryDistinctValuesRequestPagingMethodOneOf;
|
|
5778
|
-
type context$1_QueryDistinctValuesResponse = QueryDistinctValuesResponse;
|
|
5779
|
-
type context$1_QueryReferencedDataItemsOptions = QueryReferencedDataItemsOptions;
|
|
5780
|
-
type context$1_QueryReferencedDataItemsRequest = QueryReferencedDataItemsRequest;
|
|
5781
|
-
type context$1_QueryReferencedDataItemsRequestPagingMethodOneOf = QueryReferencedDataItemsRequestPagingMethodOneOf;
|
|
5782
|
-
type context$1_QueryReferencedDataItemsResponse = QueryReferencedDataItemsResponse;
|
|
5783
|
-
type context$1_QueryReferencedDataItemsResponseNonNullableFields = QueryReferencedDataItemsResponseNonNullableFields;
|
|
5784
|
-
type context$1_QueryV2 = QueryV2;
|
|
5785
|
-
type context$1_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf;
|
|
5786
|
-
type context$1_ReferencedItemOptions = ReferencedItemOptions;
|
|
5787
|
-
type context$1_ReferencedResult = ReferencedResult;
|
|
5788
|
-
type context$1_ReferencedResultEntityOneOf = ReferencedResultEntityOneOf;
|
|
5789
|
-
type context$1_RemoveDataItemOptions = RemoveDataItemOptions;
|
|
5790
|
-
type context$1_RemoveDataItemReferenceOptions = RemoveDataItemReferenceOptions;
|
|
5791
|
-
type context$1_RemoveDataItemReferenceRequest = RemoveDataItemReferenceRequest;
|
|
5792
|
-
type context$1_RemoveDataItemReferenceResponse = RemoveDataItemReferenceResponse;
|
|
5793
|
-
type context$1_RemoveDataItemReferenceResponseNonNullableFields = RemoveDataItemReferenceResponseNonNullableFields;
|
|
5794
|
-
type context$1_RemoveDataItemRequest = RemoveDataItemRequest;
|
|
5795
|
-
type context$1_RemoveDataItemResponse = RemoveDataItemResponse;
|
|
5796
|
-
type context$1_RemoveDataItemResponseNonNullableFields = RemoveDataItemResponseNonNullableFields;
|
|
5797
|
-
type context$1_RemoveFromArray = RemoveFromArray;
|
|
5798
|
-
type context$1_ReplaceDataItemReferencesOptions = ReplaceDataItemReferencesOptions;
|
|
5799
|
-
type context$1_ReplaceDataItemReferencesRequest = ReplaceDataItemReferencesRequest;
|
|
5800
|
-
type context$1_ReplaceDataItemReferencesResponse = ReplaceDataItemReferencesResponse;
|
|
5801
|
-
type context$1_ReplaceDataItemReferencesResponseNonNullableFields = ReplaceDataItemReferencesResponseNonNullableFields;
|
|
5802
|
-
type context$1_RestoreInfo = RestoreInfo;
|
|
5803
|
-
type context$1_SaveDataItemOptions = SaveDataItemOptions;
|
|
5804
|
-
type context$1_SaveDataItemRequest = SaveDataItemRequest;
|
|
5805
|
-
type context$1_SaveDataItemResponse = SaveDataItemResponse;
|
|
5806
|
-
type context$1_SaveDataItemResponseNonNullableFields = SaveDataItemResponseNonNullableFields;
|
|
5807
|
-
type context$1_SetField = SetField;
|
|
5808
|
-
type context$1_SortOrder = SortOrder;
|
|
5809
|
-
declare const context$1_SortOrder: typeof SortOrder;
|
|
5810
|
-
type context$1_Sorting = Sorting;
|
|
5811
|
-
type context$1_Sum = Sum;
|
|
5812
|
-
type context$1_TruncateDataItemsOptions = TruncateDataItemsOptions;
|
|
5813
|
-
type context$1_TruncateDataItemsRequest = TruncateDataItemsRequest;
|
|
5814
|
-
type context$1_TruncateDataItemsResponse = TruncateDataItemsResponse;
|
|
5815
|
-
type context$1_UnresolvedReference = UnresolvedReference;
|
|
5816
|
-
type context$1_UpdateDataItemOptions = UpdateDataItemOptions;
|
|
5817
|
-
type context$1_UpdateDataItemRequest = UpdateDataItemRequest;
|
|
5818
|
-
type context$1_UpdateDataItemResponse = UpdateDataItemResponse;
|
|
5819
|
-
type context$1_UpdateDataItemResponseNonNullableFields = UpdateDataItemResponseNonNullableFields;
|
|
5820
|
-
type context$1_WebhookIdentityType = WebhookIdentityType;
|
|
5821
|
-
declare const context$1_WebhookIdentityType: typeof WebhookIdentityType;
|
|
5822
|
-
type context$1__publicOnDataItemCreatedType = _publicOnDataItemCreatedType;
|
|
5823
|
-
type context$1__publicOnDataItemDeletedType = _publicOnDataItemDeletedType;
|
|
5824
|
-
type context$1__publicOnDataItemUpdatedType = _publicOnDataItemUpdatedType;
|
|
5825
|
-
declare const context$1_aggregateDataItems: typeof aggregateDataItems;
|
|
5826
|
-
declare const context$1_bulkInsertDataItemReferences: typeof bulkInsertDataItemReferences;
|
|
5827
|
-
declare const context$1_bulkInsertDataItems: typeof bulkInsertDataItems;
|
|
5828
|
-
declare const context$1_bulkRemoveDataItemReferences: typeof bulkRemoveDataItemReferences;
|
|
5829
|
-
declare const context$1_bulkRemoveDataItems: typeof bulkRemoveDataItems;
|
|
5830
|
-
declare const context$1_bulkSaveDataItems: typeof bulkSaveDataItems;
|
|
5831
|
-
declare const context$1_bulkUpdateDataItems: typeof bulkUpdateDataItems;
|
|
5832
|
-
declare const context$1_countDataItems: typeof countDataItems;
|
|
5833
|
-
declare const context$1_getDataItem: typeof getDataItem;
|
|
5834
|
-
declare const context$1_insertDataItem: typeof insertDataItem;
|
|
5835
|
-
declare const context$1_insertDataItemReference: typeof insertDataItemReference;
|
|
5836
|
-
declare const context$1_isReferencedDataItem: typeof isReferencedDataItem;
|
|
5837
|
-
declare const context$1_onDataItemCreated: typeof onDataItemCreated;
|
|
5838
|
-
declare const context$1_onDataItemDeleted: typeof onDataItemDeleted;
|
|
5839
|
-
declare const context$1_onDataItemUpdated: typeof onDataItemUpdated;
|
|
5840
|
-
declare const context$1_queryDataItems: typeof queryDataItems;
|
|
5841
|
-
declare const context$1_queryDistinctValues: typeof queryDistinctValues;
|
|
5842
|
-
declare const context$1_queryReferencedDataItems: typeof queryReferencedDataItems;
|
|
5843
|
-
declare const context$1_removeDataItem: typeof removeDataItem;
|
|
5844
|
-
declare const context$1_removeDataItemReference: typeof removeDataItemReference;
|
|
5845
|
-
declare const context$1_replaceDataItemReferences: typeof replaceDataItemReferences;
|
|
5846
|
-
declare const context$1_saveDataItem: typeof saveDataItem;
|
|
5847
|
-
declare const context$1_truncateDataItems: typeof truncateDataItems;
|
|
5848
|
-
declare const context$1_updateDataItem: typeof updateDataItem;
|
|
5849
|
-
declare namespace context$1 {
|
|
5850
|
-
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 };
|
|
4577
|
+
declare function queryDataItems$1(httpClient: HttpClient): QueryDataItemsSignature;
|
|
4578
|
+
interface QueryDataItemsSignature {
|
|
4579
|
+
/**
|
|
4580
|
+
* Creates a query to retrieve items from a database collection.
|
|
4581
|
+
*
|
|
4582
|
+
* The `queryDataItems()` function builds a query to retrieve data items from a collection and returns a `DataItemsQueryBuilder` object.
|
|
4583
|
+
*
|
|
4584
|
+
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
|
4585
|
+
*
|
|
4586
|
+
* You can refine the query by chaining `DataItemsQueryBuilder` functions onto the query. `DataItemsQueryBuilder` functions enable you to sort, filter, and control the results that `queryDataItems()` returns.
|
|
4587
|
+
*
|
|
4588
|
+
* The `queryDataItems()` function runs with the following `DataItemsQueryBuilder` defaults that you can override:
|
|
4589
|
+
*
|
|
4590
|
+
* + `skip`: 0
|
|
4591
|
+
* + `limit`: 50
|
|
4592
|
+
* + `descending`: by `_createdDate`
|
|
4593
|
+
*
|
|
4594
|
+
* The functions that are chained to `queryDataItems()` are applied in the order they are called. For example, if you sort on an `age` field in ascending order and then on a `name` field in descending order, the results are sorted first by the age of the items and then, if there are multiple results with the same age, the items are sorted by name in descending order, per age value.
|
|
4595
|
+
*
|
|
4596
|
+
* If the collection that you are querying has references to other collections, by default the data from referenced collections is not retrieved. To get the data from referenced items, specify them in the `options.includeReferencedItems` parameter.
|
|
4597
|
+
*
|
|
4598
|
+
* > **Note**: When calling `queryDataItems()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
4599
|
+
*
|
|
4600
|
+
*
|
|
4601
|
+
* @param - Options for querying data items.
|
|
4602
|
+
*/
|
|
4603
|
+
(options: QueryDataItemsOptions): DataItemsQueryBuilder;
|
|
5851
4604
|
}
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
__type: 'host';
|
|
5855
|
-
create(host: H): T;
|
|
5856
|
-
};
|
|
5857
|
-
type HostModuleAPI<T extends HostModule<any, any>> = T extends HostModule<infer U, any> ? U : never;
|
|
5858
|
-
type Host<Environment = unknown> = {
|
|
5859
|
-
channel: {
|
|
5860
|
-
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
5861
|
-
disconnect: () => void;
|
|
5862
|
-
} | Promise<{
|
|
5863
|
-
disconnect: () => void;
|
|
5864
|
-
}>;
|
|
5865
|
-
};
|
|
5866
|
-
environment?: Environment;
|
|
4605
|
+
declare function aggregateDataItems$1(httpClient: HttpClient): AggregateDataItemsSignature;
|
|
4606
|
+
interface AggregateDataItemsSignature {
|
|
5867
4607
|
/**
|
|
5868
|
-
*
|
|
4608
|
+
* Runs an aggregation on a data collection and returns the resulting list of items.
|
|
4609
|
+
*
|
|
4610
|
+
*
|
|
4611
|
+
* An aggregation enables you to perform certain calculations on your collection data, or on groups of items that you define, to retrieve meaningful summaries.
|
|
4612
|
+
* You can also add paging, filtering, and sorting preferences to your aggregation to retrieve exactly what you need.
|
|
4613
|
+
* @param - Options for running an aggregation.
|
|
5869
4614
|
*/
|
|
5870
|
-
|
|
4615
|
+
(options?: AggregateDataItemsOptions | undefined): Promise<AggregateDataItemsResponse>;
|
|
4616
|
+
}
|
|
4617
|
+
declare function countDataItems$1(httpClient: HttpClient): CountDataItemsSignature;
|
|
4618
|
+
interface CountDataItemsSignature {
|
|
5871
4619
|
/**
|
|
5872
|
-
*
|
|
5873
|
-
*
|
|
4620
|
+
* Counts the number of items in a data collection that match the provided filtering preferences.
|
|
4621
|
+
*
|
|
4622
|
+
* > **Note**: When calling `countDataItems()` following an update to your collection, the result returned may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
4623
|
+
* @param - Options for counting the number of items in a data collection.
|
|
5874
4624
|
*/
|
|
5875
|
-
|
|
5876
|
-
/**
|
|
5877
|
-
* The language of the currently viewed session
|
|
5878
|
-
*/
|
|
5879
|
-
language?: string;
|
|
5880
|
-
/**
|
|
5881
|
-
* The locale of the currently viewed session
|
|
5882
|
-
*/
|
|
5883
|
-
locale?: string;
|
|
5884
|
-
/**
|
|
5885
|
-
* Any headers that should be passed through to the API requests
|
|
5886
|
-
*/
|
|
5887
|
-
passThroughHeaders?: Record<string, string>;
|
|
5888
|
-
};
|
|
5889
|
-
};
|
|
5890
|
-
|
|
5891
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
5892
|
-
interface HttpClient {
|
|
5893
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
5894
|
-
fetchWithAuth: typeof fetch;
|
|
5895
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
5896
|
-
getActiveToken?: () => string | undefined;
|
|
4625
|
+
(options?: CountDataItemsOptions | undefined): Promise<CountDataItemsResponse & CountDataItemsResponseNonNullableFields>;
|
|
5897
4626
|
}
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
}
|
|
5948
|
-
declare function
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
4627
|
+
declare function queryDistinctValues$1(httpClient: HttpClient): QueryDistinctValuesSignature;
|
|
4628
|
+
interface QueryDistinctValuesSignature {
|
|
4629
|
+
/**
|
|
4630
|
+
* Retrieves a list of distinct values for a given field in all items that match a query, without duplicates.
|
|
4631
|
+
*
|
|
4632
|
+
*
|
|
4633
|
+
* As with `queryDataItems()`, this endpoint retrieves items based on the filtering, sorting, and paging preferences you provide.
|
|
4634
|
+
* However, `queryDistinctValues()` doesn't return all of the full items that match the query.
|
|
4635
|
+
* Rather, it returns all unique values of the field you specify in `options.fieldName` for items that match the query.
|
|
4636
|
+
* If more than one item has the same value for that field, that value appears only once.
|
|
4637
|
+
*
|
|
4638
|
+
* For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
4639
|
+
*
|
|
4640
|
+
* > **Note**: When calling `queryDistinctValues()` following an update to your collection, the data retrieved may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
4641
|
+
* @param - Options for querying distinct values.
|
|
4642
|
+
*/
|
|
4643
|
+
(options?: QueryDistinctValuesOptions | undefined): Promise<QueryDistinctValuesResponse>;
|
|
4644
|
+
}
|
|
4645
|
+
declare function bulkInsertDataItems$1(httpClient: HttpClient): BulkInsertDataItemsSignature;
|
|
4646
|
+
interface BulkInsertDataItemsSignature {
|
|
4647
|
+
/**
|
|
4648
|
+
* Adds multiple items to a collection.
|
|
4649
|
+
*
|
|
4650
|
+
*
|
|
4651
|
+
* When each item is inserted into a collection, its ID is automatically assigned a random value.
|
|
4652
|
+
* You can optionally provide your own ID when inserting the item. If you specify an ID that already exists in the collection, the insertion will fail.
|
|
4653
|
+
* @param - Options for adding multiple items to a collection.
|
|
4654
|
+
*/
|
|
4655
|
+
(options?: BulkInsertDataItemsOptions | undefined): Promise<BulkInsertDataItemsResponse & BulkInsertDataItemsResponseNonNullableFields>;
|
|
4656
|
+
}
|
|
4657
|
+
declare function bulkUpdateDataItems$1(httpClient: HttpClient): BulkUpdateDataItemsSignature;
|
|
4658
|
+
interface BulkUpdateDataItemsSignature {
|
|
4659
|
+
/**
|
|
4660
|
+
* Updates multiple items in a collection.
|
|
4661
|
+
*
|
|
4662
|
+
*
|
|
4663
|
+
* This function replaces each specified data item's existing data with the payload provided in the request.
|
|
4664
|
+
*
|
|
4665
|
+
* Each item in the request must include an ID. If an item is found in the specified collection with
|
|
4666
|
+
* the same ID, that item is updated. If the collection doesn't contain an item with that ID, the update fails.
|
|
4667
|
+
*
|
|
4668
|
+
* When an item is updated, its `data._updatedDate` field is changed to the current date and time.
|
|
4669
|
+
*
|
|
4670
|
+
* > **Note:**
|
|
4671
|
+
* > After each item is updated, it only contains the fields included in the request. If the existing item has fields with values and those fields
|
|
4672
|
+
* > aren't included in the updated item, their values are lost.
|
|
4673
|
+
* @param - Options for updating multiple items in a collection.
|
|
4674
|
+
*/
|
|
4675
|
+
(options?: BulkUpdateDataItemsOptions | undefined): Promise<BulkUpdateDataItemsResponse & BulkUpdateDataItemsResponseNonNullableFields>;
|
|
4676
|
+
}
|
|
4677
|
+
declare function bulkSaveDataItems$1(httpClient: HttpClient): BulkSaveDataItemsSignature;
|
|
4678
|
+
interface BulkSaveDataItemsSignature {
|
|
4679
|
+
/**
|
|
4680
|
+
* Inserts or updates multiple items in a collection.
|
|
4681
|
+
*
|
|
4682
|
+
*
|
|
4683
|
+
* This function inserts or updates each item provided, depending on whether it already exists in the collection. For each item:
|
|
4684
|
+
*
|
|
4685
|
+
* + If you don't provide an ID, a new item is created.
|
|
4686
|
+
*
|
|
4687
|
+
* + If you provide an ID that doesn't exist in the collection, a new item is created with that ID.
|
|
4688
|
+
*
|
|
4689
|
+
* + If an item with the ID you provide already exists in the collection, that item is updated. When an item is updated, its `data._updatedDate` field is changed to the current date and time.
|
|
4690
|
+
*
|
|
4691
|
+
* > **Note:** When you provide an item with an ID that already exists in the collection, the item you provide completely replaces the existing item with that ID.
|
|
4692
|
+
* > This means that all of the item's previous fields and values are lost.
|
|
4693
|
+
* @param - Options for saving multiple items in a collection.
|
|
4694
|
+
*/
|
|
4695
|
+
(options?: BulkSaveDataItemsOptions | undefined): Promise<BulkSaveDataItemsResponse & BulkSaveDataItemsResponseNonNullableFields>;
|
|
4696
|
+
}
|
|
4697
|
+
declare function bulkRemoveDataItems$1(httpClient: HttpClient): BulkRemoveDataItemsSignature;
|
|
4698
|
+
interface BulkRemoveDataItemsSignature {
|
|
4699
|
+
/**
|
|
4700
|
+
* Removes multiple items from a collection.
|
|
4701
|
+
*
|
|
4702
|
+
*
|
|
4703
|
+
* If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.
|
|
4704
|
+
*
|
|
4705
|
+
* > **Note:** Once an item has been removed from a collection, it can't be restored.
|
|
4706
|
+
* @param - Options for removing multiple items from a collection.
|
|
4707
|
+
*/
|
|
4708
|
+
(options?: BulkRemoveDataItemsOptions | undefined): Promise<BulkRemoveDataItemsResponse & BulkRemoveDataItemsResponseNonNullableFields>;
|
|
4709
|
+
}
|
|
4710
|
+
declare function queryReferencedDataItems$1(httpClient: HttpClient): QueryReferencedDataItemsSignature;
|
|
4711
|
+
interface QueryReferencedDataItemsSignature {
|
|
4712
|
+
/**
|
|
4713
|
+
* Retrieves the full items referenced in the specified field of an item.
|
|
4714
|
+
*
|
|
4715
|
+
*
|
|
4716
|
+
* Reference and multi-reference fields refer to items in different collections.
|
|
4717
|
+
* Use this function to retrieve the full details of the referenced items themselves.
|
|
4718
|
+
*
|
|
4719
|
+
* For example, suppose you have a **Movies** collection with an **Actors** field that contains references to items in a **People** collection.
|
|
4720
|
+
* Querying the **Movies** collection using `queryReferencedDataItems()` returns the relevant **People** items referenced in the **Actors** field of the specified **Movie** item.
|
|
4721
|
+
* This gives you information from the **People** collection about each of the actors in the specified movie.
|
|
4722
|
+
*
|
|
4723
|
+
* > **Note**: When calling `queryReferencedDataItems()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
4724
|
+
* @param - Options for querying referenced data items.
|
|
4725
|
+
*/
|
|
4726
|
+
(options?: QueryReferencedDataItemsOptions | undefined): Promise<QueryReferencedDataItemsResponse & QueryReferencedDataItemsResponseNonNullableFields>;
|
|
4727
|
+
}
|
|
4728
|
+
declare function isReferencedDataItem$1(httpClient: HttpClient): IsReferencedDataItemSignature;
|
|
4729
|
+
interface IsReferencedDataItemSignature {
|
|
4730
|
+
/**
|
|
4731
|
+
* Checks whether a field in a referring item contains a reference to a specified item.
|
|
4732
|
+
*
|
|
4733
|
+
* > **Note**: When calling `isReferencedDataItem()` following an update to your collection, the result returned may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
|
|
4734
|
+
* @param - Options for checking whether a field contains a reference to an item.
|
|
4735
|
+
*/
|
|
4736
|
+
(options?: IsReferencedDataItemOptions | undefined): Promise<IsReferencedDataItemResponse & IsReferencedDataItemResponseNonNullableFields>;
|
|
4737
|
+
}
|
|
4738
|
+
declare function insertDataItemReference$1(httpClient: HttpClient): InsertDataItemReferenceSignature;
|
|
4739
|
+
interface InsertDataItemReferenceSignature {
|
|
4740
|
+
/**
|
|
4741
|
+
* Inserts a reference in the specified field in an item in a collection.
|
|
4742
|
+
*
|
|
4743
|
+
*
|
|
4744
|
+
* A reference in `options.dataItemReference` specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item.
|
|
4745
|
+
* @param - Options for inserting a reference.
|
|
4746
|
+
*/
|
|
4747
|
+
(options?: InsertDataItemReferenceOptions | undefined): Promise<InsertDataItemReferenceResponse & InsertDataItemReferenceResponseNonNullableFields>;
|
|
5983
4748
|
}
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
@example
|
|
5993
|
-
```
|
|
5994
|
-
import type {EmptyObject} from 'type-fest';
|
|
5995
|
-
|
|
5996
|
-
// The following illustrates the problem with `{}`.
|
|
5997
|
-
const foo1: {} = {}; // Pass
|
|
5998
|
-
const foo2: {} = []; // Pass
|
|
5999
|
-
const foo3: {} = 42; // Pass
|
|
6000
|
-
const foo4: {} = {a: 1}; // Pass
|
|
6001
|
-
|
|
6002
|
-
// With `EmptyObject` only the first case is valid.
|
|
6003
|
-
const bar1: EmptyObject = {}; // Pass
|
|
6004
|
-
const bar2: EmptyObject = 42; // Fail
|
|
6005
|
-
const bar3: EmptyObject = []; // Fail
|
|
6006
|
-
const bar4: EmptyObject = {a: 1}; // Fail
|
|
6007
|
-
```
|
|
6008
|
-
|
|
6009
|
-
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}.
|
|
6010
|
-
|
|
6011
|
-
@category Object
|
|
6012
|
-
*/
|
|
6013
|
-
type EmptyObject = {[emptyObjectSymbol]?: never};
|
|
6014
|
-
|
|
6015
|
-
/**
|
|
6016
|
-
Returns a boolean for whether the two given types are equal.
|
|
6017
|
-
|
|
6018
|
-
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
6019
|
-
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
6020
|
-
|
|
6021
|
-
Use-cases:
|
|
6022
|
-
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
6023
|
-
|
|
6024
|
-
@example
|
|
6025
|
-
```
|
|
6026
|
-
import type {IsEqual} from 'type-fest';
|
|
6027
|
-
|
|
6028
|
-
// This type returns a boolean for whether the given array includes the given item.
|
|
6029
|
-
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
6030
|
-
type Includes<Value extends readonly any[], Item> =
|
|
6031
|
-
Value extends readonly [Value[0], ...infer rest]
|
|
6032
|
-
? IsEqual<Value[0], Item> extends true
|
|
6033
|
-
? true
|
|
6034
|
-
: Includes<rest, Item>
|
|
6035
|
-
: false;
|
|
6036
|
-
```
|
|
6037
|
-
|
|
6038
|
-
@category Type Guard
|
|
6039
|
-
@category Utilities
|
|
6040
|
-
*/
|
|
6041
|
-
type IsEqual<A, B> =
|
|
6042
|
-
(<G>() => G extends A ? 1 : 2) extends
|
|
6043
|
-
(<G>() => G extends B ? 1 : 2)
|
|
6044
|
-
? true
|
|
6045
|
-
: false;
|
|
6046
|
-
|
|
6047
|
-
/**
|
|
6048
|
-
Filter out keys from an object.
|
|
6049
|
-
|
|
6050
|
-
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
6051
|
-
Returns `never` if `Key` extends `Exclude`.
|
|
6052
|
-
Returns `Key` otherwise.
|
|
6053
|
-
|
|
6054
|
-
@example
|
|
6055
|
-
```
|
|
6056
|
-
type Filtered = Filter<'foo', 'foo'>;
|
|
6057
|
-
//=> never
|
|
6058
|
-
```
|
|
6059
|
-
|
|
6060
|
-
@example
|
|
6061
|
-
```
|
|
6062
|
-
type Filtered = Filter<'bar', string>;
|
|
6063
|
-
//=> never
|
|
6064
|
-
```
|
|
6065
|
-
|
|
6066
|
-
@example
|
|
6067
|
-
```
|
|
6068
|
-
type Filtered = Filter<'bar', 'foo'>;
|
|
6069
|
-
//=> 'bar'
|
|
6070
|
-
```
|
|
6071
|
-
|
|
6072
|
-
@see {Except}
|
|
6073
|
-
*/
|
|
6074
|
-
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
6075
|
-
|
|
6076
|
-
type ExceptOptions = {
|
|
6077
|
-
/**
|
|
6078
|
-
Disallow assigning non-specified properties.
|
|
6079
|
-
|
|
6080
|
-
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
6081
|
-
|
|
6082
|
-
@default false
|
|
6083
|
-
*/
|
|
6084
|
-
requireExactProps?: boolean;
|
|
6085
|
-
};
|
|
6086
|
-
|
|
6087
|
-
/**
|
|
6088
|
-
Create a type from an object type without certain keys.
|
|
6089
|
-
|
|
6090
|
-
We recommend setting the `requireExactProps` option to `true`.
|
|
6091
|
-
|
|
6092
|
-
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.
|
|
6093
|
-
|
|
6094
|
-
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)).
|
|
6095
|
-
|
|
6096
|
-
@example
|
|
6097
|
-
```
|
|
6098
|
-
import type {Except} from 'type-fest';
|
|
6099
|
-
|
|
6100
|
-
type Foo = {
|
|
6101
|
-
a: number;
|
|
6102
|
-
b: string;
|
|
6103
|
-
};
|
|
6104
|
-
|
|
6105
|
-
type FooWithoutA = Except<Foo, 'a'>;
|
|
6106
|
-
//=> {b: string}
|
|
6107
|
-
|
|
6108
|
-
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
6109
|
-
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
6110
|
-
|
|
6111
|
-
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
6112
|
-
//=> {a: number} & Partial<Record<"b", never>>
|
|
6113
|
-
|
|
6114
|
-
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
6115
|
-
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
6116
|
-
```
|
|
6117
|
-
|
|
6118
|
-
@category Object
|
|
6119
|
-
*/
|
|
6120
|
-
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
|
|
6121
|
-
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
6122
|
-
} & (Options['requireExactProps'] extends true
|
|
6123
|
-
? Partial<Record<KeysType, never>>
|
|
6124
|
-
: {});
|
|
6125
|
-
|
|
6126
|
-
/**
|
|
6127
|
-
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
6128
|
-
|
|
6129
|
-
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
6130
|
-
|
|
6131
|
-
@example
|
|
6132
|
-
```
|
|
6133
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
6134
|
-
|
|
6135
|
-
interface Example {
|
|
6136
|
-
a: string;
|
|
6137
|
-
b: string | number;
|
|
6138
|
-
c?: string;
|
|
6139
|
-
d: {};
|
|
4749
|
+
declare function removeDataItemReference$1(httpClient: HttpClient): RemoveDataItemReferenceSignature;
|
|
4750
|
+
interface RemoveDataItemReferenceSignature {
|
|
4751
|
+
/**
|
|
4752
|
+
* Removes the specified reference from the specified field.
|
|
4753
|
+
* @param - Options for removing a reference.
|
|
4754
|
+
*/
|
|
4755
|
+
(options: RemoveDataItemReferenceOptions): Promise<RemoveDataItemReferenceResponse & RemoveDataItemReferenceResponseNonNullableFields>;
|
|
6140
4756
|
}
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
6153
|
-
//=> 'a' | 'c'
|
|
6154
|
-
```
|
|
6155
|
-
|
|
6156
|
-
@category Object
|
|
6157
|
-
*/
|
|
6158
|
-
type ConditionalKeys<Base, Condition> = NonNullable<
|
|
6159
|
-
// Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
|
|
6160
|
-
{
|
|
6161
|
-
// Map through all the keys of the given base type.
|
|
6162
|
-
[Key in keyof Base]:
|
|
6163
|
-
// Pick only keys with types extending the given `Condition` type.
|
|
6164
|
-
Base[Key] extends Condition
|
|
6165
|
-
// Retain this key since the condition passes.
|
|
6166
|
-
? Key
|
|
6167
|
-
// Discard this key since the condition fails.
|
|
6168
|
-
: never;
|
|
6169
|
-
|
|
6170
|
-
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
6171
|
-
}[keyof Base]
|
|
6172
|
-
>;
|
|
6173
|
-
|
|
6174
|
-
/**
|
|
6175
|
-
Exclude keys from a shape that matches the given `Condition`.
|
|
6176
|
-
|
|
6177
|
-
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.
|
|
6178
|
-
|
|
6179
|
-
@example
|
|
6180
|
-
```
|
|
6181
|
-
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
6182
|
-
|
|
6183
|
-
class Awesome {
|
|
6184
|
-
name: string;
|
|
6185
|
-
successes: number;
|
|
6186
|
-
failures: bigint;
|
|
6187
|
-
|
|
6188
|
-
run() {}
|
|
4757
|
+
declare function bulkInsertDataItemReferences$1(httpClient: HttpClient): BulkInsertDataItemReferencesSignature;
|
|
4758
|
+
interface BulkInsertDataItemReferencesSignature {
|
|
4759
|
+
/**
|
|
4760
|
+
* Inserts one or more references in the specified fields of items in a collection.
|
|
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.
|
|
4766
|
+
*/
|
|
4767
|
+
(options?: BulkInsertDataItemReferencesOptions | undefined): Promise<BulkInsertDataItemReferencesResponse & BulkInsertDataItemReferencesResponseNonNullableFields>;
|
|
6189
4768
|
}
|
|
4769
|
+
declare function bulkRemoveDataItemReferences$1(httpClient: HttpClient): BulkRemoveDataItemReferencesSignature;
|
|
4770
|
+
interface BulkRemoveDataItemReferencesSignature {
|
|
4771
|
+
/**
|
|
4772
|
+
* Removes one or more references.
|
|
4773
|
+
* @param - Options for removing one or more references.
|
|
4774
|
+
*/
|
|
4775
|
+
(options: BulkRemoveDataItemReferencesOptions): Promise<BulkRemoveDataItemReferencesResponse & BulkRemoveDataItemReferencesResponseNonNullableFields>;
|
|
4776
|
+
}
|
|
4777
|
+
declare function replaceDataItemReferences$1(httpClient: HttpClient): ReplaceDataItemReferencesSignature;
|
|
4778
|
+
interface ReplaceDataItemReferencesSignature {
|
|
4779
|
+
/**
|
|
4780
|
+
* Replaces references in a specified field of a specified data item.
|
|
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.
|
|
4788
|
+
*/
|
|
4789
|
+
(options?: ReplaceDataItemReferencesOptions | undefined): Promise<ReplaceDataItemReferencesResponse & ReplaceDataItemReferencesResponseNonNullableFields>;
|
|
4790
|
+
}
|
|
4791
|
+
declare const onDataItemCreated$1: EventDefinition$3<DataItemCreatedEnvelope, "wix.data.v2.data_item_created">;
|
|
4792
|
+
declare const onDataItemUpdated$1: EventDefinition$3<DataItemUpdatedEnvelope, "wix.data.v2.data_item_updated">;
|
|
4793
|
+
declare const onDataItemDeleted$1: EventDefinition$3<DataItemDeletedEnvelope, "wix.data.v2.data_item_deleted">;
|
|
6190
4794
|
|
|
6191
|
-
type
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
4795
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
4796
|
+
__type: 'event-definition';
|
|
4797
|
+
type: Type;
|
|
4798
|
+
isDomainEvent?: boolean;
|
|
4799
|
+
transformations?: (envelope: unknown) => Payload;
|
|
4800
|
+
__payload: Payload;
|
|
4801
|
+
};
|
|
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;
|
|
6198
4805
|
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
4806
|
+
declare global {
|
|
4807
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4808
|
+
interface SymbolConstructor {
|
|
4809
|
+
readonly observable: symbol;
|
|
4810
|
+
}
|
|
6204
4811
|
}
|
|
6205
4812
|
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
>;
|
|
4813
|
+
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
4814
|
+
|
|
4815
|
+
declare const insertDataItem: MaybeContext<BuildRESTFunction<typeof insertDataItem$1> & typeof insertDataItem$1>;
|
|
4816
|
+
declare const updateDataItem: MaybeContext<BuildRESTFunction<typeof updateDataItem$1> & typeof updateDataItem$1>;
|
|
4817
|
+
declare const saveDataItem: MaybeContext<BuildRESTFunction<typeof saveDataItem$1> & typeof saveDataItem$1>;
|
|
4818
|
+
declare const getDataItem: MaybeContext<BuildRESTFunction<typeof getDataItem$1> & typeof getDataItem$1>;
|
|
4819
|
+
declare const removeDataItem: MaybeContext<BuildRESTFunction<typeof removeDataItem$1> & typeof removeDataItem$1>;
|
|
4820
|
+
declare const truncateDataItems: MaybeContext<BuildRESTFunction<typeof truncateDataItems$1> & typeof truncateDataItems$1>;
|
|
4821
|
+
declare const queryDataItems: MaybeContext<BuildRESTFunction<typeof queryDataItems$1> & typeof queryDataItems$1>;
|
|
4822
|
+
declare const aggregateDataItems: MaybeContext<BuildRESTFunction<typeof aggregateDataItems$1> & typeof aggregateDataItems$1>;
|
|
4823
|
+
declare const countDataItems: MaybeContext<BuildRESTFunction<typeof countDataItems$1> & typeof countDataItems$1>;
|
|
4824
|
+
declare const queryDistinctValues: MaybeContext<BuildRESTFunction<typeof queryDistinctValues$1> & typeof queryDistinctValues$1>;
|
|
4825
|
+
declare const bulkInsertDataItems: MaybeContext<BuildRESTFunction<typeof bulkInsertDataItems$1> & typeof bulkInsertDataItems$1>;
|
|
4826
|
+
declare const bulkUpdateDataItems: MaybeContext<BuildRESTFunction<typeof bulkUpdateDataItems$1> & typeof bulkUpdateDataItems$1>;
|
|
4827
|
+
declare const bulkSaveDataItems: MaybeContext<BuildRESTFunction<typeof bulkSaveDataItems$1> & typeof bulkSaveDataItems$1>;
|
|
4828
|
+
declare const bulkRemoveDataItems: MaybeContext<BuildRESTFunction<typeof bulkRemoveDataItems$1> & typeof bulkRemoveDataItems$1>;
|
|
4829
|
+
declare const queryReferencedDataItems: MaybeContext<BuildRESTFunction<typeof queryReferencedDataItems$1> & typeof queryReferencedDataItems$1>;
|
|
4830
|
+
declare const isReferencedDataItem: MaybeContext<BuildRESTFunction<typeof isReferencedDataItem$1> & typeof isReferencedDataItem$1>;
|
|
4831
|
+
declare const insertDataItemReference: MaybeContext<BuildRESTFunction<typeof insertDataItemReference$1> & typeof insertDataItemReference$1>;
|
|
4832
|
+
declare const removeDataItemReference: MaybeContext<BuildRESTFunction<typeof removeDataItemReference$1> & typeof removeDataItemReference$1>;
|
|
4833
|
+
declare const bulkInsertDataItemReferences: MaybeContext<BuildRESTFunction<typeof bulkInsertDataItemReferences$1> & typeof bulkInsertDataItemReferences$1>;
|
|
4834
|
+
declare const bulkRemoveDataItemReferences: MaybeContext<BuildRESTFunction<typeof bulkRemoveDataItemReferences$1> & typeof bulkRemoveDataItemReferences$1>;
|
|
4835
|
+
declare const replaceDataItemReferences: MaybeContext<BuildRESTFunction<typeof replaceDataItemReferences$1> & typeof replaceDataItemReferences$1>;
|
|
6216
4836
|
|
|
4837
|
+
type _publicOnDataItemCreatedType = typeof onDataItemCreated$1;
|
|
6217
4838
|
/**
|
|
6218
|
-
*
|
|
6219
|
-
* can either be a REST module or a host module.
|
|
6220
|
-
* This type is recursive, so it can describe nested modules.
|
|
4839
|
+
* Triggered when a data item is inserted.
|
|
6221
4840
|
*/
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
|
|
4841
|
+
declare const onDataItemCreated: ReturnType<typeof createEventModule<_publicOnDataItemCreatedType>>;
|
|
4842
|
+
|
|
4843
|
+
type _publicOnDataItemUpdatedType = typeof onDataItemUpdated$1;
|
|
6225
4844
|
/**
|
|
6226
|
-
*
|
|
6227
|
-
*
|
|
6228
|
-
*
|
|
6229
|
-
* do not match the given host (as they will not work with the given host).
|
|
4845
|
+
* Triggered when a data item is updated.
|
|
4846
|
+
*
|
|
4847
|
+
* **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.
|
|
6230
4848
|
*/
|
|
6231
|
-
|
|
6232
|
-
done: T;
|
|
6233
|
-
recurse: T extends {
|
|
6234
|
-
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
6235
|
-
} ? 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<{
|
|
6236
|
-
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
6237
|
-
-1,
|
|
6238
|
-
0,
|
|
6239
|
-
1,
|
|
6240
|
-
2,
|
|
6241
|
-
3,
|
|
6242
|
-
4,
|
|
6243
|
-
5
|
|
6244
|
-
][Depth]> : never;
|
|
6245
|
-
}, EmptyObject>;
|
|
6246
|
-
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
6247
|
-
type PublicMetadata = {
|
|
6248
|
-
PACKAGE_NAME?: string;
|
|
6249
|
-
};
|
|
4849
|
+
declare const onDataItemUpdated: ReturnType<typeof createEventModule<_publicOnDataItemUpdatedType>>;
|
|
6250
4850
|
|
|
6251
|
-
|
|
6252
|
-
interface ContextualClient {
|
|
6253
|
-
}
|
|
6254
|
-
}
|
|
4851
|
+
type _publicOnDataItemDeletedType = typeof onDataItemDeleted$1;
|
|
6255
4852
|
/**
|
|
6256
|
-
*
|
|
6257
|
-
* case a contextual client is available.
|
|
4853
|
+
* Triggered when a data item is deleted.
|
|
6258
4854
|
*/
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
4855
|
+
declare const onDataItemDeleted: ReturnType<typeof createEventModule<_publicOnDataItemDeletedType>>;
|
|
4856
|
+
|
|
4857
|
+
type context$1_ACTION = ACTION;
|
|
4858
|
+
declare const context$1_ACTION: typeof ACTION;
|
|
4859
|
+
type context$1_Action = Action;
|
|
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 };
|
|
5038
|
+
}
|
|
6262
5039
|
|
|
6263
5040
|
/** An index is a map of a collection's data, organized according to specific fields to increase query speed. */
|
|
6264
5041
|
interface Index {
|