@wix/data 1.0.156 → 1.0.157
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 +2 -2
- package/type-bundles/context.bundle.d.ts +901 -2131
- package/type-bundles/index.bundle.d.ts +901 -2131
|
@@ -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 index_d$3 {
|
|
|
980
980
|
export { type ActionEvent$2 as ActionEvent, type BaseEventMetadata$2 as BaseEventMetadata, type index_d$3_Capabilities as Capabilities, index_d$3_CauseOfFailure as CauseOfFailure, index_d$3_CollectionsFound as CollectionsFound, type index_d$3_ConnectionStatus as ConnectionStatus, index_d$3_ConnectionType as ConnectionType, type index_d$3_CreateExternalDatabaseConnectionOptions as CreateExternalDatabaseConnectionOptions, type index_d$3_CreateExternalDatabaseConnectionRequest as CreateExternalDatabaseConnectionRequest, type index_d$3_CreateExternalDatabaseConnectionResponse as CreateExternalDatabaseConnectionResponse, type index_d$3_CreateExternalDatabaseConnectionResponseNonNullableFields as CreateExternalDatabaseConnectionResponseNonNullableFields, type index_d$3_DeleteExternalDatabaseConnectionRequest as DeleteExternalDatabaseConnectionRequest, type index_d$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 index_d$3_ExternalDatabaseConnection as ExternalDatabaseConnection, type index_d$3_ExternalDatabaseConnectionCreatedEnvelope as ExternalDatabaseConnectionCreatedEnvelope, type index_d$3_ExternalDatabaseConnectionDeletedEnvelope as ExternalDatabaseConnectionDeletedEnvelope, type index_d$3_ExternalDatabaseConnectionNonNullableFields as ExternalDatabaseConnectionNonNullableFields, type index_d$3_ExternalDatabaseConnectionUpdatedEnvelope as ExternalDatabaseConnectionUpdatedEnvelope, index_d$3_FieldType as FieldType, type index_d$3_GetExternalDatabaseConnectionRequest as GetExternalDatabaseConnectionRequest, type index_d$3_GetExternalDatabaseConnectionResponse as GetExternalDatabaseConnectionResponse, type index_d$3_GetExternalDatabaseConnectionResponseNonNullableFields as GetExternalDatabaseConnectionResponseNonNullableFields, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, type index_d$3_ListExternalDatabaseConnectionsOptions as ListExternalDatabaseConnectionsOptions, type index_d$3_ListExternalDatabaseConnectionsRequest as ListExternalDatabaseConnectionsRequest, type index_d$3_ListExternalDatabaseConnectionsResponse as ListExternalDatabaseConnectionsResponse, type index_d$3_ListExternalDatabaseConnectionsResponseNonNullableFields as ListExternalDatabaseConnectionsResponseNonNullableFields, type MessageEnvelope$2 as MessageEnvelope, type Paging$3 as Paging, type PagingMetadata$1 as PagingMetadata, index_d$3_ProtocolVersion as ProtocolVersion, type RestoreInfo$2 as RestoreInfo, type index_d$3_UpdateExternalDatabaseConnection as UpdateExternalDatabaseConnection, type index_d$3_UpdateExternalDatabaseConnectionRequest as UpdateExternalDatabaseConnectionRequest, type index_d$3_UpdateExternalDatabaseConnectionResponse as UpdateExternalDatabaseConnectionResponse, type index_d$3_UpdateExternalDatabaseConnectionResponseNonNullableFields as UpdateExternalDatabaseConnectionResponseNonNullableFields, WebhookIdentityType$2 as WebhookIdentityType, type index_d$3__publicOnExternalDatabaseConnectionCreatedType as _publicOnExternalDatabaseConnectionCreatedType, type index_d$3__publicOnExternalDatabaseConnectionDeletedType as _publicOnExternalDatabaseConnectionDeletedType, type index_d$3__publicOnExternalDatabaseConnectionUpdatedType as _publicOnExternalDatabaseConnectionUpdatedType, index_d$3_createExternalDatabaseConnection as createExternalDatabaseConnection, index_d$3_deleteExternalDatabaseConnection as deleteExternalDatabaseConnection, index_d$3_getExternalDatabaseConnection as getExternalDatabaseConnection, index_d$3_listExternalDatabaseConnections as listExternalDatabaseConnections, index_d$3_onExternalDatabaseConnectionCreated as onExternalDatabaseConnectionCreated, index_d$3_onExternalDatabaseConnectionDeleted as onExternalDatabaseConnectionDeleted, index_d$3_onExternalDatabaseConnectionUpdated as onExternalDatabaseConnectionUpdated, onExternalDatabaseConnectionCreated$1 as publicOnExternalDatabaseConnectionCreated, onExternalDatabaseConnectionDeleted$1 as publicOnExternalDatabaseConnectionDeleted, onExternalDatabaseConnectionUpdated$1 as publicOnExternalDatabaseConnectionUpdated, index_d$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. */
|
|
@@ -2614,742 +2204,332 @@ interface EventMetadata$1 extends BaseEventMetadata$1 {
|
|
|
2614
2204
|
*/
|
|
2615
2205
|
_id?: string;
|
|
2616
2206
|
/**
|
|
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.
|
|
2207
|
+
* Assumes actions are also always typed to an entity_type
|
|
2208
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
2715
2209
|
*/
|
|
2716
|
-
|
|
2717
|
-
}
|
|
2718
|
-
declare function listDataCollections$1(httpClient: HttpClient$2): ListDataCollectionsSignature;
|
|
2719
|
-
interface ListDataCollectionsSignature {
|
|
2210
|
+
entityFqdn?: string;
|
|
2720
2211
|
/**
|
|
2721
|
-
*
|
|
2722
|
-
*
|
|
2723
|
-
*
|
|
2724
|
-
* @param - Options for retrieving a list of data collections.
|
|
2212
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
2213
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
2214
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
2725
2215
|
*/
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2216
|
+
slug?: string;
|
|
2217
|
+
/** ID of the entity associated with the event. */
|
|
2218
|
+
entityId?: string;
|
|
2219
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
2220
|
+
eventTime?: Date;
|
|
2730
2221
|
/**
|
|
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.
|
|
2222
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
2223
|
+
* (for example, GDPR).
|
|
2745
2224
|
*/
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
interface DeleteDataCollectionSignature {
|
|
2225
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
2226
|
+
/** If present, indicates the action that triggered the event. */
|
|
2227
|
+
originatedFrom?: string | null;
|
|
2750
2228
|
/**
|
|
2751
|
-
*
|
|
2752
|
-
*
|
|
2753
|
-
*
|
|
2754
|
-
*
|
|
2755
|
-
*
|
|
2229
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
2230
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
2231
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
2232
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
2233
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
2234
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
2756
2235
|
*/
|
|
2757
|
-
|
|
2236
|
+
entityEventSequence?: string | null;
|
|
2758
2237
|
}
|
|
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
|
-
}
|
|
2238
|
+
interface DataCollectionClonedEnvelope {
|
|
2239
|
+
data: DataCollectionClonedEvent;
|
|
2240
|
+
metadata: EventMetadata$1;
|
|
2781
2241
|
}
|
|
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 index_d$2_AccessLevel = AccessLevel;
|
|
2818
|
-
declare const index_d$2_AccessLevel: typeof AccessLevel;
|
|
2819
|
-
type index_d$2_AllowedDataPermissions = AllowedDataPermissions;
|
|
2820
|
-
type index_d$2_ArraySizeRange = ArraySizeRange;
|
|
2821
|
-
type index_d$2_BulkGetDataCollectionsPageBySnapshotsRequest = BulkGetDataCollectionsPageBySnapshotsRequest;
|
|
2822
|
-
type index_d$2_BulkGetDataCollectionsPageBySnapshotsResponse = BulkGetDataCollectionsPageBySnapshotsResponse;
|
|
2823
|
-
type index_d$2_BulkGetDataCollectionsRequest = BulkGetDataCollectionsRequest;
|
|
2824
|
-
type index_d$2_BulkGetDataCollectionsResponse = BulkGetDataCollectionsResponse;
|
|
2825
|
-
type index_d$2_Calculator = Calculator;
|
|
2826
|
-
type index_d$2_CalculatorPatternOneOf = CalculatorPatternOneOf;
|
|
2827
|
-
type index_d$2_CmsOptions = CmsOptions;
|
|
2828
|
-
type index_d$2_CollectionCapabilities = CollectionCapabilities;
|
|
2829
|
-
type index_d$2_CollectionOperation = CollectionOperation;
|
|
2830
|
-
declare const index_d$2_CollectionOperation: typeof CollectionOperation;
|
|
2831
|
-
type index_d$2_CollectionType = CollectionType;
|
|
2832
|
-
declare const index_d$2_CollectionType: typeof CollectionType;
|
|
2833
|
-
type index_d$2_CreateDataCollectionFieldRequest = CreateDataCollectionFieldRequest;
|
|
2834
|
-
type index_d$2_CreateDataCollectionFieldResponse = CreateDataCollectionFieldResponse;
|
|
2835
|
-
type index_d$2_CreateDataCollectionRequest = CreateDataCollectionRequest;
|
|
2836
|
-
type index_d$2_CreateDataCollectionResponse = CreateDataCollectionResponse;
|
|
2837
|
-
type index_d$2_CreateDataCollectionResponseNonNullableFields = CreateDataCollectionResponseNonNullableFields;
|
|
2838
|
-
type index_d$2_CreateDataCollectionsSnapshotRequest = CreateDataCollectionsSnapshotRequest;
|
|
2839
|
-
type index_d$2_CreateDataCollectionsSnapshotResponse = CreateDataCollectionsSnapshotResponse;
|
|
2840
|
-
type index_d$2_CreateMigratedCollectionsSnapshotRequest = CreateMigratedCollectionsSnapshotRequest;
|
|
2841
|
-
type index_d$2_CreateMigratedCollectionsSnapshotResponse = CreateMigratedCollectionsSnapshotResponse;
|
|
2842
|
-
type index_d$2_DataCollection = DataCollection;
|
|
2843
|
-
type index_d$2_DataCollectionChangedEnvelope = DataCollectionChangedEnvelope;
|
|
2844
|
-
type index_d$2_DataCollectionChangedEvent = DataCollectionChangedEvent;
|
|
2845
|
-
type index_d$2_DataCollectionClonedEnvelope = DataCollectionClonedEnvelope;
|
|
2846
|
-
type index_d$2_DataCollectionClonedEvent = DataCollectionClonedEvent;
|
|
2847
|
-
type index_d$2_DataCollectionCreatedEnvelope = DataCollectionCreatedEnvelope;
|
|
2848
|
-
type index_d$2_DataCollectionDeletedEnvelope = DataCollectionDeletedEnvelope;
|
|
2849
|
-
type index_d$2_DataCollectionNonNullableFields = DataCollectionNonNullableFields;
|
|
2850
|
-
type index_d$2_DataCollectionUpdatedEnvelope = DataCollectionUpdatedEnvelope;
|
|
2851
|
-
type index_d$2_DataOperation = DataOperation;
|
|
2852
|
-
declare const index_d$2_DataOperation: typeof DataOperation;
|
|
2853
|
-
type index_d$2_DataPermissions = DataPermissions;
|
|
2854
|
-
type index_d$2_DeleteDataCollectionFieldRequest = DeleteDataCollectionFieldRequest;
|
|
2855
|
-
type index_d$2_DeleteDataCollectionFieldResponse = DeleteDataCollectionFieldResponse;
|
|
2856
|
-
type index_d$2_DeleteDataCollectionRequest = DeleteDataCollectionRequest;
|
|
2857
|
-
type index_d$2_DeleteDataCollectionResponse = DeleteDataCollectionResponse;
|
|
2858
|
-
type index_d$2_DeleteDataCollectionsSnapshotRequest = DeleteDataCollectionsSnapshotRequest;
|
|
2859
|
-
type index_d$2_DeleteDataCollectionsSnapshotResponse = DeleteDataCollectionsSnapshotResponse;
|
|
2860
|
-
type index_d$2_Direction = Direction;
|
|
2861
|
-
declare const index_d$2_Direction: typeof Direction;
|
|
2862
|
-
type index_d$2_FieldCapabilities = FieldCapabilities;
|
|
2863
|
-
type index_d$2_FieldPlugin = FieldPlugin;
|
|
2864
|
-
type index_d$2_FieldPluginOptionsOneOf = FieldPluginOptionsOneOf;
|
|
2865
|
-
type index_d$2_FieldPluginType = FieldPluginType;
|
|
2866
|
-
declare const index_d$2_FieldPluginType: typeof FieldPluginType;
|
|
2867
|
-
type index_d$2_FieldRangeValidationsOneOf = FieldRangeValidationsOneOf;
|
|
2868
|
-
type index_d$2_FieldsPattern = FieldsPattern;
|
|
2869
|
-
type index_d$2_Format = Format;
|
|
2870
|
-
declare const index_d$2_Format: typeof Format;
|
|
2871
|
-
type index_d$2_GetDataCollectionOptions = GetDataCollectionOptions;
|
|
2872
|
-
type index_d$2_GetDataCollectionRequest = GetDataCollectionRequest;
|
|
2873
|
-
type index_d$2_GetDataCollectionResponse = GetDataCollectionResponse;
|
|
2874
|
-
type index_d$2_GetDataCollectionResponseNonNullableFields = GetDataCollectionResponseNonNullableFields;
|
|
2875
|
-
type index_d$2_IndexField = IndexField;
|
|
2876
|
-
type index_d$2_IndexLimits = IndexLimits;
|
|
2877
|
-
type index_d$2_IndexStatus = IndexStatus;
|
|
2878
|
-
declare const index_d$2_IndexStatus: typeof IndexStatus;
|
|
2879
|
-
type index_d$2_ListDataCollectionsOptions = ListDataCollectionsOptions;
|
|
2880
|
-
type index_d$2_ListDataCollectionsRequest = ListDataCollectionsRequest;
|
|
2881
|
-
type index_d$2_ListDataCollectionsResponse = ListDataCollectionsResponse;
|
|
2882
|
-
type index_d$2_ListDataCollectionsResponseNonNullableFields = ListDataCollectionsResponseNonNullableFields;
|
|
2883
|
-
type index_d$2_MultiReference = MultiReference;
|
|
2884
|
-
type index_d$2_MultilingualOptions = MultilingualOptions;
|
|
2885
|
-
type index_d$2_NumberRange = NumberRange;
|
|
2886
|
-
type index_d$2_ObjectField = ObjectField;
|
|
2887
|
-
type index_d$2_PageLink = PageLink;
|
|
2888
|
-
type index_d$2_PageLinkPluginOptions = PageLinkPluginOptions;
|
|
2889
|
-
type index_d$2_PagingMode = PagingMode;
|
|
2890
|
-
declare const index_d$2_PagingMode: typeof PagingMode;
|
|
2891
|
-
type index_d$2_Permissions = Permissions;
|
|
2892
|
-
type index_d$2_Plugin = Plugin;
|
|
2893
|
-
type index_d$2_PluginCmsOptions = PluginCmsOptions;
|
|
2894
|
-
type index_d$2_PluginOptionsOneOf = PluginOptionsOneOf;
|
|
2895
|
-
type index_d$2_PluginType = PluginType;
|
|
2896
|
-
declare const index_d$2_PluginType: typeof PluginType;
|
|
2897
|
-
type index_d$2_PluginUpdate = PluginUpdate;
|
|
2898
|
-
type index_d$2_QueryOperator = QueryOperator;
|
|
2899
|
-
declare const index_d$2_QueryOperator: typeof QueryOperator;
|
|
2900
|
-
type index_d$2_Reference = Reference;
|
|
2901
|
-
type index_d$2_RestoreDataCollectionsFromSnapshotRequest = RestoreDataCollectionsFromSnapshotRequest;
|
|
2902
|
-
type index_d$2_RestoreDataCollectionsFromSnapshotResponse = RestoreDataCollectionsFromSnapshotResponse;
|
|
2903
|
-
type index_d$2_Role = Role;
|
|
2904
|
-
declare const index_d$2_Role: typeof Role;
|
|
2905
|
-
type index_d$2_SingleItemPluginOptions = SingleItemPluginOptions;
|
|
2906
|
-
type index_d$2_SiteSort = SiteSort;
|
|
2907
|
-
type index_d$2_SnapshotCollection = SnapshotCollection;
|
|
2908
|
-
type index_d$2_Sort = Sort;
|
|
2909
|
-
type index_d$2_StringLengthRange = StringLengthRange;
|
|
2910
|
-
type index_d$2_Type = Type;
|
|
2911
|
-
declare const index_d$2_Type: typeof Type;
|
|
2912
|
-
type index_d$2_TypeMetadata = TypeMetadata;
|
|
2913
|
-
type index_d$2_TypeMetadataMetadataOneOf = TypeMetadataMetadataOneOf;
|
|
2914
|
-
type index_d$2_UpdateDataCollectionFieldRequest = UpdateDataCollectionFieldRequest;
|
|
2915
|
-
type index_d$2_UpdateDataCollectionFieldResponse = UpdateDataCollectionFieldResponse;
|
|
2916
|
-
type index_d$2_UpdateDataCollectionRequest = UpdateDataCollectionRequest;
|
|
2917
|
-
type index_d$2_UpdateDataCollectionResponse = UpdateDataCollectionResponse;
|
|
2918
|
-
type index_d$2_UpdateDataCollectionResponseNonNullableFields = UpdateDataCollectionResponseNonNullableFields;
|
|
2919
|
-
type index_d$2_UpdateDataPermissionsRequest = UpdateDataPermissionsRequest;
|
|
2920
|
-
type index_d$2_UpdateDataPermissionsResponse = UpdateDataPermissionsResponse;
|
|
2921
|
-
type index_d$2_UrlizedOnlyPattern = UrlizedOnlyPattern;
|
|
2922
|
-
type index_d$2_UrlizedPluginOptions = UrlizedPluginOptions;
|
|
2923
|
-
type index_d$2__Array = _Array;
|
|
2924
|
-
type index_d$2__Object = _Object;
|
|
2925
|
-
type index_d$2__publicOnDataCollectionChangedEventType = _publicOnDataCollectionChangedEventType;
|
|
2926
|
-
type index_d$2__publicOnDataCollectionClonedEventType = _publicOnDataCollectionClonedEventType;
|
|
2927
|
-
type index_d$2__publicOnDataCollectionCreatedType = _publicOnDataCollectionCreatedType;
|
|
2928
|
-
type index_d$2__publicOnDataCollectionDeletedType = _publicOnDataCollectionDeletedType;
|
|
2929
|
-
type index_d$2__publicOnDataCollectionUpdatedType = _publicOnDataCollectionUpdatedType;
|
|
2930
|
-
declare const index_d$2_createDataCollection: typeof createDataCollection;
|
|
2931
|
-
declare const index_d$2_deleteDataCollection: typeof deleteDataCollection;
|
|
2932
|
-
declare const index_d$2_getDataCollection: typeof getDataCollection;
|
|
2933
|
-
declare const index_d$2_listDataCollections: typeof listDataCollections;
|
|
2934
|
-
declare const index_d$2_onDataCollectionChangedEvent: typeof onDataCollectionChangedEvent;
|
|
2935
|
-
declare const index_d$2_onDataCollectionClonedEvent: typeof onDataCollectionClonedEvent;
|
|
2936
|
-
declare const index_d$2_onDataCollectionCreated: typeof onDataCollectionCreated;
|
|
2937
|
-
declare const index_d$2_onDataCollectionDeleted: typeof onDataCollectionDeleted;
|
|
2938
|
-
declare const index_d$2_onDataCollectionUpdated: typeof onDataCollectionUpdated;
|
|
2939
|
-
declare const index_d$2_updateDataCollection: typeof updateDataCollection;
|
|
2940
|
-
declare namespace index_d$2 {
|
|
2941
|
-
export { index_d$2_AccessLevel as AccessLevel, type ActionEvent$1 as ActionEvent, type index_d$2_AllowedDataPermissions as AllowedDataPermissions, type index_d$2_ArraySizeRange as ArraySizeRange, type BaseEventMetadata$1 as BaseEventMetadata, type index_d$2_BulkGetDataCollectionsPageBySnapshotsRequest as BulkGetDataCollectionsPageBySnapshotsRequest, type index_d$2_BulkGetDataCollectionsPageBySnapshotsResponse as BulkGetDataCollectionsPageBySnapshotsResponse, type index_d$2_BulkGetDataCollectionsRequest as BulkGetDataCollectionsRequest, type index_d$2_BulkGetDataCollectionsResponse as BulkGetDataCollectionsResponse, type index_d$2_Calculator as Calculator, type index_d$2_CalculatorPatternOneOf as CalculatorPatternOneOf, type index_d$2_CmsOptions as CmsOptions, type index_d$2_CollectionCapabilities as CollectionCapabilities, index_d$2_CollectionOperation as CollectionOperation, index_d$2_CollectionType as CollectionType, type index_d$2_CreateDataCollectionFieldRequest as CreateDataCollectionFieldRequest, type index_d$2_CreateDataCollectionFieldResponse as CreateDataCollectionFieldResponse, type index_d$2_CreateDataCollectionRequest as CreateDataCollectionRequest, type index_d$2_CreateDataCollectionResponse as CreateDataCollectionResponse, type index_d$2_CreateDataCollectionResponseNonNullableFields as CreateDataCollectionResponseNonNullableFields, type index_d$2_CreateDataCollectionsSnapshotRequest as CreateDataCollectionsSnapshotRequest, type index_d$2_CreateDataCollectionsSnapshotResponse as CreateDataCollectionsSnapshotResponse, type index_d$2_CreateMigratedCollectionsSnapshotRequest as CreateMigratedCollectionsSnapshotRequest, type index_d$2_CreateMigratedCollectionsSnapshotResponse as CreateMigratedCollectionsSnapshotResponse, type index_d$2_DataCollection as DataCollection, type index_d$2_DataCollectionChangedEnvelope as DataCollectionChangedEnvelope, type index_d$2_DataCollectionChangedEvent as DataCollectionChangedEvent, type index_d$2_DataCollectionClonedEnvelope as DataCollectionClonedEnvelope, type index_d$2_DataCollectionClonedEvent as DataCollectionClonedEvent, type index_d$2_DataCollectionCreatedEnvelope as DataCollectionCreatedEnvelope, type index_d$2_DataCollectionDeletedEnvelope as DataCollectionDeletedEnvelope, type index_d$2_DataCollectionNonNullableFields as DataCollectionNonNullableFields, type index_d$2_DataCollectionUpdatedEnvelope as DataCollectionUpdatedEnvelope, index_d$2_DataOperation as DataOperation, type index_d$2_DataPermissions as DataPermissions, type index_d$2_DeleteDataCollectionFieldRequest as DeleteDataCollectionFieldRequest, type index_d$2_DeleteDataCollectionFieldResponse as DeleteDataCollectionFieldResponse, type index_d$2_DeleteDataCollectionRequest as DeleteDataCollectionRequest, type index_d$2_DeleteDataCollectionResponse as DeleteDataCollectionResponse, type index_d$2_DeleteDataCollectionsSnapshotRequest as DeleteDataCollectionsSnapshotRequest, type index_d$2_DeleteDataCollectionsSnapshotResponse as DeleteDataCollectionsSnapshotResponse, index_d$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 index_d$2_FieldCapabilities as FieldCapabilities, type index_d$2_FieldPlugin as FieldPlugin, type index_d$2_FieldPluginOptionsOneOf as FieldPluginOptionsOneOf, index_d$2_FieldPluginType as FieldPluginType, type index_d$2_FieldRangeValidationsOneOf as FieldRangeValidationsOneOf, type FieldUpdate$1 as FieldUpdate, type index_d$2_FieldsPattern as FieldsPattern, index_d$2_Format as Format, type index_d$2_GetDataCollectionOptions as GetDataCollectionOptions, type index_d$2_GetDataCollectionRequest as GetDataCollectionRequest, type index_d$2_GetDataCollectionResponse as GetDataCollectionResponse, type index_d$2_GetDataCollectionResponseNonNullableFields as GetDataCollectionResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type Index$1 as Index, type index_d$2_IndexField as IndexField, type index_d$2_IndexLimits as IndexLimits, index_d$2_IndexStatus as IndexStatus, type index_d$2_ListDataCollectionsOptions as ListDataCollectionsOptions, type index_d$2_ListDataCollectionsRequest as ListDataCollectionsRequest, type index_d$2_ListDataCollectionsResponse as ListDataCollectionsResponse, type index_d$2_ListDataCollectionsResponseNonNullableFields as ListDataCollectionsResponseNonNullableFields, type MessageEnvelope$1 as MessageEnvelope, type index_d$2_MultiReference as MultiReference, type index_d$2_MultilingualOptions as MultilingualOptions, type index_d$2_NumberRange as NumberRange, type index_d$2_ObjectField as ObjectField, Order$1 as Order, type index_d$2_PageLink as PageLink, type index_d$2_PageLinkPluginOptions as PageLinkPluginOptions, type Paging$2 as Paging, type PagingMetadataV2$1 as PagingMetadataV2, index_d$2_PagingMode as PagingMode, type index_d$2_Permissions as Permissions, type index_d$2_Plugin as Plugin, type index_d$2_PluginCmsOptions as PluginCmsOptions, type index_d$2_PluginOptionsOneOf as PluginOptionsOneOf, index_d$2_PluginType as PluginType, type index_d$2_PluginUpdate as PluginUpdate, type PublishPluginOptions$1 as PublishPluginOptions, index_d$2_QueryOperator as QueryOperator, type index_d$2_Reference as Reference, type index_d$2_RestoreDataCollectionsFromSnapshotRequest as RestoreDataCollectionsFromSnapshotRequest, type index_d$2_RestoreDataCollectionsFromSnapshotResponse as RestoreDataCollectionsFromSnapshotResponse, type RestoreInfo$1 as RestoreInfo, index_d$2_Role as Role, type index_d$2_SingleItemPluginOptions as SingleItemPluginOptions, type index_d$2_SiteSort as SiteSort, type index_d$2_SnapshotCollection as SnapshotCollection, type index_d$2_Sort as Sort, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, Status$1 as Status, type index_d$2_StringLengthRange as StringLengthRange, index_d$2_Type as Type, type index_d$2_TypeMetadata as TypeMetadata, type index_d$2_TypeMetadataMetadataOneOf as TypeMetadataMetadataOneOf, type index_d$2_UpdateDataCollectionFieldRequest as UpdateDataCollectionFieldRequest, type index_d$2_UpdateDataCollectionFieldResponse as UpdateDataCollectionFieldResponse, type index_d$2_UpdateDataCollectionRequest as UpdateDataCollectionRequest, type index_d$2_UpdateDataCollectionResponse as UpdateDataCollectionResponse, type index_d$2_UpdateDataCollectionResponseNonNullableFields as UpdateDataCollectionResponseNonNullableFields, type index_d$2_UpdateDataPermissionsRequest as UpdateDataPermissionsRequest, type index_d$2_UpdateDataPermissionsResponse as UpdateDataPermissionsResponse, type index_d$2_UrlizedOnlyPattern as UrlizedOnlyPattern, type index_d$2_UrlizedPluginOptions as UrlizedPluginOptions, WebhookIdentityType$1 as WebhookIdentityType, type index_d$2__Array as _Array, type index_d$2__Object as _Object, type index_d$2__publicOnDataCollectionChangedEventType as _publicOnDataCollectionChangedEventType, type index_d$2__publicOnDataCollectionClonedEventType as _publicOnDataCollectionClonedEventType, type index_d$2__publicOnDataCollectionCreatedType as _publicOnDataCollectionCreatedType, type index_d$2__publicOnDataCollectionDeletedType as _publicOnDataCollectionDeletedType, type index_d$2__publicOnDataCollectionUpdatedType as _publicOnDataCollectionUpdatedType, index_d$2_createDataCollection as createDataCollection, index_d$2_deleteDataCollection as deleteDataCollection, index_d$2_getDataCollection as getDataCollection, index_d$2_listDataCollections as listDataCollections, index_d$2_onDataCollectionChangedEvent as onDataCollectionChangedEvent, index_d$2_onDataCollectionClonedEvent as onDataCollectionClonedEvent, index_d$2_onDataCollectionCreated as onDataCollectionCreated, index_d$2_onDataCollectionDeleted as onDataCollectionDeleted, index_d$2_onDataCollectionUpdated as onDataCollectionUpdated, onDataCollectionChangedEvent$1 as publicOnDataCollectionChangedEvent, onDataCollectionClonedEvent$1 as publicOnDataCollectionClonedEvent, onDataCollectionCreated$1 as publicOnDataCollectionCreated, onDataCollectionDeleted$1 as publicOnDataCollectionDeleted, onDataCollectionUpdated$1 as publicOnDataCollectionUpdated, index_d$2_updateDataCollection as updateDataCollection };
|
|
2242
|
+
interface DataCollectionChangedEnvelope {
|
|
2243
|
+
data: DataCollectionChangedEvent;
|
|
2244
|
+
metadata: EventMetadata$1;
|
|
2942
2245
|
}
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
}>;
|
|
2956
|
-
};
|
|
2957
|
-
environment?: Environment;
|
|
2246
|
+
interface DataCollectionCreatedEnvelope {
|
|
2247
|
+
entity: DataCollection;
|
|
2248
|
+
metadata: EventMetadata$1;
|
|
2249
|
+
}
|
|
2250
|
+
interface DataCollectionUpdatedEnvelope {
|
|
2251
|
+
entity: DataCollection;
|
|
2252
|
+
metadata: EventMetadata$1;
|
|
2253
|
+
}
|
|
2254
|
+
interface DataCollectionDeletedEnvelope {
|
|
2255
|
+
metadata: EventMetadata$1;
|
|
2256
|
+
}
|
|
2257
|
+
interface GetDataCollectionOptions {
|
|
2958
2258
|
/**
|
|
2959
|
-
*
|
|
2259
|
+
* Whether to retrieve data from the primary database instance.
|
|
2260
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
2261
|
+
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
2262
|
+
*
|
|
2263
|
+
* Default: `false`
|
|
2960
2264
|
*/
|
|
2961
|
-
|
|
2265
|
+
consistentRead?: boolean;
|
|
2266
|
+
}
|
|
2267
|
+
interface ListDataCollectionsOptions {
|
|
2962
2268
|
/**
|
|
2963
|
-
*
|
|
2964
|
-
*
|
|
2269
|
+
* Defines how collections in the response are sorted.
|
|
2270
|
+
*
|
|
2271
|
+
* Default: Ordered by ID in ascending order.
|
|
2965
2272
|
*/
|
|
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: {};
|
|
2273
|
+
sort?: Sorting$1;
|
|
2274
|
+
/** Pagination information. */
|
|
2275
|
+
paging?: Paging$2;
|
|
2276
|
+
/**
|
|
2277
|
+
* Whether to retrieve data from the primary database instance.
|
|
2278
|
+
* This decreases performance but ensures data retrieved is up to date even immediately after an update.
|
|
2279
|
+
* Learn more about [Wix Data and eventual consistency](https://dev.wix.com/api/rest/wix-data/wix-data/eventual-consistency).
|
|
2280
|
+
*
|
|
2281
|
+
* Default: `false`
|
|
2282
|
+
*/
|
|
2283
|
+
consistentRead?: boolean;
|
|
3231
2284
|
}
|
|
3232
2285
|
|
|
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() {}
|
|
2286
|
+
declare function createDataCollection$1(httpClient: HttpClient): CreateDataCollectionSignature;
|
|
2287
|
+
interface CreateDataCollectionSignature {
|
|
2288
|
+
/**
|
|
2289
|
+
* Creates a new data collection.
|
|
2290
|
+
*
|
|
2291
|
+
* 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.
|
|
2292
|
+
* @param - Collection details.
|
|
2293
|
+
* @param - Options for creating a data collection.
|
|
2294
|
+
* @returns Details of collection created.
|
|
2295
|
+
*/
|
|
2296
|
+
(collection: DataCollection): Promise<DataCollection & DataCollectionNonNullableFields>;
|
|
3280
2297
|
}
|
|
2298
|
+
declare function getDataCollection$1(httpClient: HttpClient): GetDataCollectionSignature;
|
|
2299
|
+
interface GetDataCollectionSignature {
|
|
2300
|
+
/**
|
|
2301
|
+
* Retrieves a data collection by ID.
|
|
2302
|
+
* @param - ID of the collection to retrieve.
|
|
2303
|
+
* @param - Options for retrieving a data collection.
|
|
2304
|
+
* @returns Details of the collection requested.
|
|
2305
|
+
*/
|
|
2306
|
+
(dataCollectionId: string, options?: GetDataCollectionOptions | undefined): Promise<DataCollection & DataCollectionNonNullableFields>;
|
|
2307
|
+
}
|
|
2308
|
+
declare function listDataCollections$1(httpClient: HttpClient): ListDataCollectionsSignature;
|
|
2309
|
+
interface ListDataCollectionsSignature {
|
|
2310
|
+
/**
|
|
2311
|
+
* Retrieves a list of all data collections associated with the site or project.
|
|
2312
|
+
*
|
|
2313
|
+
* By default, the list is ordered by ID in ascending order.
|
|
2314
|
+
* @param - Options for retrieving a list of data collections.
|
|
2315
|
+
*/
|
|
2316
|
+
(options?: ListDataCollectionsOptions | undefined): Promise<ListDataCollectionsResponse & ListDataCollectionsResponseNonNullableFields>;
|
|
2317
|
+
}
|
|
2318
|
+
declare function updateDataCollection$1(httpClient: HttpClient): UpdateDataCollectionSignature;
|
|
2319
|
+
interface UpdateDataCollectionSignature {
|
|
2320
|
+
/**
|
|
2321
|
+
* Updates a data collection.
|
|
2322
|
+
*
|
|
2323
|
+
* A collection ID, revision number, permissions, and at least 1 field must be provided within `options.collection`.
|
|
2324
|
+
* If a collection with that ID exists, and if its current `revision` number matches the one provided, it is updated.
|
|
2325
|
+
* Otherwise, the request fails.
|
|
2326
|
+
*
|
|
2327
|
+
* When a collection is updated, its `_updatedDate` property is changed to the current date and its `revision` property is incremented.
|
|
2328
|
+
*
|
|
2329
|
+
* > **Note:**
|
|
2330
|
+
* > 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
|
|
2331
|
+
* > aren't included in the updated collection details, their values are lost.
|
|
2332
|
+
* @param - Updated collection details. The existing collection is replaced with this version.
|
|
2333
|
+
* @param - Options for updating a data collection.
|
|
2334
|
+
* @returns Updated collection details.
|
|
2335
|
+
*/
|
|
2336
|
+
(collection: DataCollection): Promise<DataCollection & DataCollectionNonNullableFields>;
|
|
2337
|
+
}
|
|
2338
|
+
declare function deleteDataCollection$1(httpClient: HttpClient): DeleteDataCollectionSignature;
|
|
2339
|
+
interface DeleteDataCollectionSignature {
|
|
2340
|
+
/**
|
|
2341
|
+
* Deletes a data collection.
|
|
2342
|
+
*
|
|
2343
|
+
* > **Note:**
|
|
2344
|
+
* > Once a collection is deleted, it can't be restored.
|
|
2345
|
+
* @param - ID of the collection to delete.
|
|
2346
|
+
*/
|
|
2347
|
+
(dataCollectionId: string): Promise<void>;
|
|
2348
|
+
}
|
|
2349
|
+
declare const onDataCollectionClonedEvent$1: EventDefinition$3<DataCollectionClonedEnvelope, "wix.data.v2.data_collection_data_collection_cloned_event">;
|
|
2350
|
+
declare const onDataCollectionChangedEvent$1: EventDefinition$3<DataCollectionChangedEnvelope, "wix.data.v2.data_collection_data_collection_changed_event">;
|
|
2351
|
+
declare const onDataCollectionCreated$1: EventDefinition$3<DataCollectionCreatedEnvelope, "wix.data.v2.data_collection_created">;
|
|
2352
|
+
declare const onDataCollectionUpdated$1: EventDefinition$3<DataCollectionUpdatedEnvelope, "wix.data.v2.data_collection_updated">;
|
|
2353
|
+
declare const onDataCollectionDeleted$1: EventDefinition$3<DataCollectionDeletedEnvelope, "wix.data.v2.data_collection_deleted">;
|
|
3281
2354
|
|
|
3282
|
-
type
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
2355
|
+
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
2356
|
+
__type: 'event-definition';
|
|
2357
|
+
type: Type;
|
|
2358
|
+
isDomainEvent?: boolean;
|
|
2359
|
+
transformations?: (envelope: unknown) => Payload;
|
|
2360
|
+
__payload: Payload;
|
|
2361
|
+
};
|
|
2362
|
+
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
2363
|
+
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
2364
|
+
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
3289
2365
|
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
2366
|
+
declare global {
|
|
2367
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2368
|
+
interface SymbolConstructor {
|
|
2369
|
+
readonly observable: symbol;
|
|
2370
|
+
}
|
|
3295
2371
|
}
|
|
3296
2372
|
|
|
3297
|
-
|
|
3298
|
-
//=> {b: string | number; c: () => void; d: {}}
|
|
3299
|
-
```
|
|
2373
|
+
declare function createEventModule$1<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
|
|
3300
2374
|
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
>;
|
|
2375
|
+
declare const createDataCollection: MaybeContext<BuildRESTFunction<typeof createDataCollection$1> & typeof createDataCollection$1>;
|
|
2376
|
+
declare const getDataCollection: MaybeContext<BuildRESTFunction<typeof getDataCollection$1> & typeof getDataCollection$1>;
|
|
2377
|
+
declare const listDataCollections: MaybeContext<BuildRESTFunction<typeof listDataCollections$1> & typeof listDataCollections$1>;
|
|
2378
|
+
declare const updateDataCollection: MaybeContext<BuildRESTFunction<typeof updateDataCollection$1> & typeof updateDataCollection$1>;
|
|
2379
|
+
declare const deleteDataCollection: MaybeContext<BuildRESTFunction<typeof deleteDataCollection$1> & typeof deleteDataCollection$1>;
|
|
3307
2380
|
|
|
2381
|
+
type _publicOnDataCollectionClonedEventType = typeof onDataCollectionClonedEvent$1;
|
|
3308
2382
|
/**
|
|
3309
|
-
*
|
|
3310
|
-
*
|
|
3311
|
-
* This type is recursive, so it can describe nested modules.
|
|
2383
|
+
* Event triggered when collection is cloned from other instance
|
|
2384
|
+
* CREATED event will be also triggered along with this action
|
|
3312
2385
|
*/
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
2386
|
+
declare const onDataCollectionClonedEvent: ReturnType<typeof createEventModule$1<_publicOnDataCollectionClonedEventType>>;
|
|
2387
|
+
|
|
2388
|
+
type _publicOnDataCollectionChangedEventType = typeof onDataCollectionChangedEvent$1;
|
|
3316
2389
|
/**
|
|
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).
|
|
2390
|
+
* Event triggered when collection is changed, describing some of changes
|
|
2391
|
+
* UPDATED event will be also triggered along with this action
|
|
3321
2392
|
*/
|
|
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
|
-
};
|
|
2393
|
+
declare const onDataCollectionChangedEvent: ReturnType<typeof createEventModule$1<_publicOnDataCollectionChangedEventType>>;
|
|
3341
2394
|
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
2395
|
+
type _publicOnDataCollectionCreatedType = typeof onDataCollectionCreated$1;
|
|
2396
|
+
/** */
|
|
2397
|
+
declare const onDataCollectionCreated: ReturnType<typeof createEventModule$1<_publicOnDataCollectionCreatedType>>;
|
|
2398
|
+
|
|
2399
|
+
type _publicOnDataCollectionUpdatedType = typeof onDataCollectionUpdated$1;
|
|
2400
|
+
/** */
|
|
2401
|
+
declare const onDataCollectionUpdated: ReturnType<typeof createEventModule$1<_publicOnDataCollectionUpdatedType>>;
|
|
2402
|
+
|
|
2403
|
+
type _publicOnDataCollectionDeletedType = typeof onDataCollectionDeleted$1;
|
|
2404
|
+
/** */
|
|
2405
|
+
declare const onDataCollectionDeleted: ReturnType<typeof createEventModule$1<_publicOnDataCollectionDeletedType>>;
|
|
2406
|
+
|
|
2407
|
+
type index_d$2_AccessLevel = AccessLevel;
|
|
2408
|
+
declare const index_d$2_AccessLevel: typeof AccessLevel;
|
|
2409
|
+
type index_d$2_AllowedDataPermissions = AllowedDataPermissions;
|
|
2410
|
+
type index_d$2_ArraySizeRange = ArraySizeRange;
|
|
2411
|
+
type index_d$2_BulkGetDataCollectionsPageBySnapshotsRequest = BulkGetDataCollectionsPageBySnapshotsRequest;
|
|
2412
|
+
type index_d$2_BulkGetDataCollectionsPageBySnapshotsResponse = BulkGetDataCollectionsPageBySnapshotsResponse;
|
|
2413
|
+
type index_d$2_BulkGetDataCollectionsRequest = BulkGetDataCollectionsRequest;
|
|
2414
|
+
type index_d$2_BulkGetDataCollectionsResponse = BulkGetDataCollectionsResponse;
|
|
2415
|
+
type index_d$2_Calculator = Calculator;
|
|
2416
|
+
type index_d$2_CalculatorPatternOneOf = CalculatorPatternOneOf;
|
|
2417
|
+
type index_d$2_CmsOptions = CmsOptions;
|
|
2418
|
+
type index_d$2_CollectionCapabilities = CollectionCapabilities;
|
|
2419
|
+
type index_d$2_CollectionOperation = CollectionOperation;
|
|
2420
|
+
declare const index_d$2_CollectionOperation: typeof CollectionOperation;
|
|
2421
|
+
type index_d$2_CollectionType = CollectionType;
|
|
2422
|
+
declare const index_d$2_CollectionType: typeof CollectionType;
|
|
2423
|
+
type index_d$2_CreateDataCollectionFieldRequest = CreateDataCollectionFieldRequest;
|
|
2424
|
+
type index_d$2_CreateDataCollectionFieldResponse = CreateDataCollectionFieldResponse;
|
|
2425
|
+
type index_d$2_CreateDataCollectionRequest = CreateDataCollectionRequest;
|
|
2426
|
+
type index_d$2_CreateDataCollectionResponse = CreateDataCollectionResponse;
|
|
2427
|
+
type index_d$2_CreateDataCollectionResponseNonNullableFields = CreateDataCollectionResponseNonNullableFields;
|
|
2428
|
+
type index_d$2_CreateDataCollectionsSnapshotRequest = CreateDataCollectionsSnapshotRequest;
|
|
2429
|
+
type index_d$2_CreateDataCollectionsSnapshotResponse = CreateDataCollectionsSnapshotResponse;
|
|
2430
|
+
type index_d$2_CreateMigratedCollectionsSnapshotRequest = CreateMigratedCollectionsSnapshotRequest;
|
|
2431
|
+
type index_d$2_CreateMigratedCollectionsSnapshotResponse = CreateMigratedCollectionsSnapshotResponse;
|
|
2432
|
+
type index_d$2_DataCollection = DataCollection;
|
|
2433
|
+
type index_d$2_DataCollectionChangedEnvelope = DataCollectionChangedEnvelope;
|
|
2434
|
+
type index_d$2_DataCollectionChangedEvent = DataCollectionChangedEvent;
|
|
2435
|
+
type index_d$2_DataCollectionClonedEnvelope = DataCollectionClonedEnvelope;
|
|
2436
|
+
type index_d$2_DataCollectionClonedEvent = DataCollectionClonedEvent;
|
|
2437
|
+
type index_d$2_DataCollectionCreatedEnvelope = DataCollectionCreatedEnvelope;
|
|
2438
|
+
type index_d$2_DataCollectionDeletedEnvelope = DataCollectionDeletedEnvelope;
|
|
2439
|
+
type index_d$2_DataCollectionNonNullableFields = DataCollectionNonNullableFields;
|
|
2440
|
+
type index_d$2_DataCollectionUpdatedEnvelope = DataCollectionUpdatedEnvelope;
|
|
2441
|
+
type index_d$2_DataOperation = DataOperation;
|
|
2442
|
+
declare const index_d$2_DataOperation: typeof DataOperation;
|
|
2443
|
+
type index_d$2_DataPermissions = DataPermissions;
|
|
2444
|
+
type index_d$2_DeleteDataCollectionFieldRequest = DeleteDataCollectionFieldRequest;
|
|
2445
|
+
type index_d$2_DeleteDataCollectionFieldResponse = DeleteDataCollectionFieldResponse;
|
|
2446
|
+
type index_d$2_DeleteDataCollectionRequest = DeleteDataCollectionRequest;
|
|
2447
|
+
type index_d$2_DeleteDataCollectionResponse = DeleteDataCollectionResponse;
|
|
2448
|
+
type index_d$2_DeleteDataCollectionsSnapshotRequest = DeleteDataCollectionsSnapshotRequest;
|
|
2449
|
+
type index_d$2_DeleteDataCollectionsSnapshotResponse = DeleteDataCollectionsSnapshotResponse;
|
|
2450
|
+
type index_d$2_Direction = Direction;
|
|
2451
|
+
declare const index_d$2_Direction: typeof Direction;
|
|
2452
|
+
type index_d$2_FieldCapabilities = FieldCapabilities;
|
|
2453
|
+
type index_d$2_FieldPlugin = FieldPlugin;
|
|
2454
|
+
type index_d$2_FieldPluginOptionsOneOf = FieldPluginOptionsOneOf;
|
|
2455
|
+
type index_d$2_FieldPluginType = FieldPluginType;
|
|
2456
|
+
declare const index_d$2_FieldPluginType: typeof FieldPluginType;
|
|
2457
|
+
type index_d$2_FieldRangeValidationsOneOf = FieldRangeValidationsOneOf;
|
|
2458
|
+
type index_d$2_FieldsPattern = FieldsPattern;
|
|
2459
|
+
type index_d$2_Format = Format;
|
|
2460
|
+
declare const index_d$2_Format: typeof Format;
|
|
2461
|
+
type index_d$2_GetDataCollectionOptions = GetDataCollectionOptions;
|
|
2462
|
+
type index_d$2_GetDataCollectionRequest = GetDataCollectionRequest;
|
|
2463
|
+
type index_d$2_GetDataCollectionResponse = GetDataCollectionResponse;
|
|
2464
|
+
type index_d$2_GetDataCollectionResponseNonNullableFields = GetDataCollectionResponseNonNullableFields;
|
|
2465
|
+
type index_d$2_IndexField = IndexField;
|
|
2466
|
+
type index_d$2_IndexLimits = IndexLimits;
|
|
2467
|
+
type index_d$2_IndexStatus = IndexStatus;
|
|
2468
|
+
declare const index_d$2_IndexStatus: typeof IndexStatus;
|
|
2469
|
+
type index_d$2_ListDataCollectionsOptions = ListDataCollectionsOptions;
|
|
2470
|
+
type index_d$2_ListDataCollectionsRequest = ListDataCollectionsRequest;
|
|
2471
|
+
type index_d$2_ListDataCollectionsResponse = ListDataCollectionsResponse;
|
|
2472
|
+
type index_d$2_ListDataCollectionsResponseNonNullableFields = ListDataCollectionsResponseNonNullableFields;
|
|
2473
|
+
type index_d$2_MultiReference = MultiReference;
|
|
2474
|
+
type index_d$2_MultilingualOptions = MultilingualOptions;
|
|
2475
|
+
type index_d$2_NumberRange = NumberRange;
|
|
2476
|
+
type index_d$2_ObjectField = ObjectField;
|
|
2477
|
+
type index_d$2_PageLink = PageLink;
|
|
2478
|
+
type index_d$2_PageLinkPluginOptions = PageLinkPluginOptions;
|
|
2479
|
+
type index_d$2_PagingMode = PagingMode;
|
|
2480
|
+
declare const index_d$2_PagingMode: typeof PagingMode;
|
|
2481
|
+
type index_d$2_Permissions = Permissions;
|
|
2482
|
+
type index_d$2_Plugin = Plugin;
|
|
2483
|
+
type index_d$2_PluginCmsOptions = PluginCmsOptions;
|
|
2484
|
+
type index_d$2_PluginOptionsOneOf = PluginOptionsOneOf;
|
|
2485
|
+
type index_d$2_PluginType = PluginType;
|
|
2486
|
+
declare const index_d$2_PluginType: typeof PluginType;
|
|
2487
|
+
type index_d$2_PluginUpdate = PluginUpdate;
|
|
2488
|
+
type index_d$2_QueryOperator = QueryOperator;
|
|
2489
|
+
declare const index_d$2_QueryOperator: typeof QueryOperator;
|
|
2490
|
+
type index_d$2_Reference = Reference;
|
|
2491
|
+
type index_d$2_RestoreDataCollectionsFromSnapshotRequest = RestoreDataCollectionsFromSnapshotRequest;
|
|
2492
|
+
type index_d$2_RestoreDataCollectionsFromSnapshotResponse = RestoreDataCollectionsFromSnapshotResponse;
|
|
2493
|
+
type index_d$2_Role = Role;
|
|
2494
|
+
declare const index_d$2_Role: typeof Role;
|
|
2495
|
+
type index_d$2_SingleItemPluginOptions = SingleItemPluginOptions;
|
|
2496
|
+
type index_d$2_SiteSort = SiteSort;
|
|
2497
|
+
type index_d$2_SnapshotCollection = SnapshotCollection;
|
|
2498
|
+
type index_d$2_Sort = Sort;
|
|
2499
|
+
type index_d$2_StringLengthRange = StringLengthRange;
|
|
2500
|
+
type index_d$2_Type = Type;
|
|
2501
|
+
declare const index_d$2_Type: typeof Type;
|
|
2502
|
+
type index_d$2_TypeMetadata = TypeMetadata;
|
|
2503
|
+
type index_d$2_TypeMetadataMetadataOneOf = TypeMetadataMetadataOneOf;
|
|
2504
|
+
type index_d$2_UpdateDataCollectionFieldRequest = UpdateDataCollectionFieldRequest;
|
|
2505
|
+
type index_d$2_UpdateDataCollectionFieldResponse = UpdateDataCollectionFieldResponse;
|
|
2506
|
+
type index_d$2_UpdateDataCollectionRequest = UpdateDataCollectionRequest;
|
|
2507
|
+
type index_d$2_UpdateDataCollectionResponse = UpdateDataCollectionResponse;
|
|
2508
|
+
type index_d$2_UpdateDataCollectionResponseNonNullableFields = UpdateDataCollectionResponseNonNullableFields;
|
|
2509
|
+
type index_d$2_UpdateDataPermissionsRequest = UpdateDataPermissionsRequest;
|
|
2510
|
+
type index_d$2_UpdateDataPermissionsResponse = UpdateDataPermissionsResponse;
|
|
2511
|
+
type index_d$2_UrlizedOnlyPattern = UrlizedOnlyPattern;
|
|
2512
|
+
type index_d$2_UrlizedPluginOptions = UrlizedPluginOptions;
|
|
2513
|
+
type index_d$2__Array = _Array;
|
|
2514
|
+
type index_d$2__Object = _Object;
|
|
2515
|
+
type index_d$2__publicOnDataCollectionChangedEventType = _publicOnDataCollectionChangedEventType;
|
|
2516
|
+
type index_d$2__publicOnDataCollectionClonedEventType = _publicOnDataCollectionClonedEventType;
|
|
2517
|
+
type index_d$2__publicOnDataCollectionCreatedType = _publicOnDataCollectionCreatedType;
|
|
2518
|
+
type index_d$2__publicOnDataCollectionDeletedType = _publicOnDataCollectionDeletedType;
|
|
2519
|
+
type index_d$2__publicOnDataCollectionUpdatedType = _publicOnDataCollectionUpdatedType;
|
|
2520
|
+
declare const index_d$2_createDataCollection: typeof createDataCollection;
|
|
2521
|
+
declare const index_d$2_deleteDataCollection: typeof deleteDataCollection;
|
|
2522
|
+
declare const index_d$2_getDataCollection: typeof getDataCollection;
|
|
2523
|
+
declare const index_d$2_listDataCollections: typeof listDataCollections;
|
|
2524
|
+
declare const index_d$2_onDataCollectionChangedEvent: typeof onDataCollectionChangedEvent;
|
|
2525
|
+
declare const index_d$2_onDataCollectionClonedEvent: typeof onDataCollectionClonedEvent;
|
|
2526
|
+
declare const index_d$2_onDataCollectionCreated: typeof onDataCollectionCreated;
|
|
2527
|
+
declare const index_d$2_onDataCollectionDeleted: typeof onDataCollectionDeleted;
|
|
2528
|
+
declare const index_d$2_onDataCollectionUpdated: typeof onDataCollectionUpdated;
|
|
2529
|
+
declare const index_d$2_updateDataCollection: typeof updateDataCollection;
|
|
2530
|
+
declare namespace index_d$2 {
|
|
2531
|
+
export { index_d$2_AccessLevel as AccessLevel, type ActionEvent$1 as ActionEvent, type index_d$2_AllowedDataPermissions as AllowedDataPermissions, type index_d$2_ArraySizeRange as ArraySizeRange, type BaseEventMetadata$1 as BaseEventMetadata, type index_d$2_BulkGetDataCollectionsPageBySnapshotsRequest as BulkGetDataCollectionsPageBySnapshotsRequest, type index_d$2_BulkGetDataCollectionsPageBySnapshotsResponse as BulkGetDataCollectionsPageBySnapshotsResponse, type index_d$2_BulkGetDataCollectionsRequest as BulkGetDataCollectionsRequest, type index_d$2_BulkGetDataCollectionsResponse as BulkGetDataCollectionsResponse, type index_d$2_Calculator as Calculator, type index_d$2_CalculatorPatternOneOf as CalculatorPatternOneOf, type index_d$2_CmsOptions as CmsOptions, type index_d$2_CollectionCapabilities as CollectionCapabilities, index_d$2_CollectionOperation as CollectionOperation, index_d$2_CollectionType as CollectionType, type index_d$2_CreateDataCollectionFieldRequest as CreateDataCollectionFieldRequest, type index_d$2_CreateDataCollectionFieldResponse as CreateDataCollectionFieldResponse, type index_d$2_CreateDataCollectionRequest as CreateDataCollectionRequest, type index_d$2_CreateDataCollectionResponse as CreateDataCollectionResponse, type index_d$2_CreateDataCollectionResponseNonNullableFields as CreateDataCollectionResponseNonNullableFields, type index_d$2_CreateDataCollectionsSnapshotRequest as CreateDataCollectionsSnapshotRequest, type index_d$2_CreateDataCollectionsSnapshotResponse as CreateDataCollectionsSnapshotResponse, type index_d$2_CreateMigratedCollectionsSnapshotRequest as CreateMigratedCollectionsSnapshotRequest, type index_d$2_CreateMigratedCollectionsSnapshotResponse as CreateMigratedCollectionsSnapshotResponse, type index_d$2_DataCollection as DataCollection, type index_d$2_DataCollectionChangedEnvelope as DataCollectionChangedEnvelope, type index_d$2_DataCollectionChangedEvent as DataCollectionChangedEvent, type index_d$2_DataCollectionClonedEnvelope as DataCollectionClonedEnvelope, type index_d$2_DataCollectionClonedEvent as DataCollectionClonedEvent, type index_d$2_DataCollectionCreatedEnvelope as DataCollectionCreatedEnvelope, type index_d$2_DataCollectionDeletedEnvelope as DataCollectionDeletedEnvelope, type index_d$2_DataCollectionNonNullableFields as DataCollectionNonNullableFields, type index_d$2_DataCollectionUpdatedEnvelope as DataCollectionUpdatedEnvelope, index_d$2_DataOperation as DataOperation, type index_d$2_DataPermissions as DataPermissions, type index_d$2_DeleteDataCollectionFieldRequest as DeleteDataCollectionFieldRequest, type index_d$2_DeleteDataCollectionFieldResponse as DeleteDataCollectionFieldResponse, type index_d$2_DeleteDataCollectionRequest as DeleteDataCollectionRequest, type index_d$2_DeleteDataCollectionResponse as DeleteDataCollectionResponse, type index_d$2_DeleteDataCollectionsSnapshotRequest as DeleteDataCollectionsSnapshotRequest, type index_d$2_DeleteDataCollectionsSnapshotResponse as DeleteDataCollectionsSnapshotResponse, index_d$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 index_d$2_FieldCapabilities as FieldCapabilities, type index_d$2_FieldPlugin as FieldPlugin, type index_d$2_FieldPluginOptionsOneOf as FieldPluginOptionsOneOf, index_d$2_FieldPluginType as FieldPluginType, type index_d$2_FieldRangeValidationsOneOf as FieldRangeValidationsOneOf, type FieldUpdate$1 as FieldUpdate, type index_d$2_FieldsPattern as FieldsPattern, index_d$2_Format as Format, type index_d$2_GetDataCollectionOptions as GetDataCollectionOptions, type index_d$2_GetDataCollectionRequest as GetDataCollectionRequest, type index_d$2_GetDataCollectionResponse as GetDataCollectionResponse, type index_d$2_GetDataCollectionResponseNonNullableFields as GetDataCollectionResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type Index$1 as Index, type index_d$2_IndexField as IndexField, type index_d$2_IndexLimits as IndexLimits, index_d$2_IndexStatus as IndexStatus, type index_d$2_ListDataCollectionsOptions as ListDataCollectionsOptions, type index_d$2_ListDataCollectionsRequest as ListDataCollectionsRequest, type index_d$2_ListDataCollectionsResponse as ListDataCollectionsResponse, type index_d$2_ListDataCollectionsResponseNonNullableFields as ListDataCollectionsResponseNonNullableFields, type MessageEnvelope$1 as MessageEnvelope, type index_d$2_MultiReference as MultiReference, type index_d$2_MultilingualOptions as MultilingualOptions, type index_d$2_NumberRange as NumberRange, type index_d$2_ObjectField as ObjectField, Order$1 as Order, type index_d$2_PageLink as PageLink, type index_d$2_PageLinkPluginOptions as PageLinkPluginOptions, type Paging$2 as Paging, type PagingMetadataV2$1 as PagingMetadataV2, index_d$2_PagingMode as PagingMode, type index_d$2_Permissions as Permissions, type index_d$2_Plugin as Plugin, type index_d$2_PluginCmsOptions as PluginCmsOptions, type index_d$2_PluginOptionsOneOf as PluginOptionsOneOf, index_d$2_PluginType as PluginType, type index_d$2_PluginUpdate as PluginUpdate, type PublishPluginOptions$1 as PublishPluginOptions, index_d$2_QueryOperator as QueryOperator, type index_d$2_Reference as Reference, type index_d$2_RestoreDataCollectionsFromSnapshotRequest as RestoreDataCollectionsFromSnapshotRequest, type index_d$2_RestoreDataCollectionsFromSnapshotResponse as RestoreDataCollectionsFromSnapshotResponse, type RestoreInfo$1 as RestoreInfo, index_d$2_Role as Role, type index_d$2_SingleItemPluginOptions as SingleItemPluginOptions, type index_d$2_SiteSort as SiteSort, type index_d$2_SnapshotCollection as SnapshotCollection, type index_d$2_Sort as Sort, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, Status$1 as Status, type index_d$2_StringLengthRange as StringLengthRange, index_d$2_Type as Type, type index_d$2_TypeMetadata as TypeMetadata, type index_d$2_TypeMetadataMetadataOneOf as TypeMetadataMetadataOneOf, type index_d$2_UpdateDataCollectionFieldRequest as UpdateDataCollectionFieldRequest, type index_d$2_UpdateDataCollectionFieldResponse as UpdateDataCollectionFieldResponse, type index_d$2_UpdateDataCollectionRequest as UpdateDataCollectionRequest, type index_d$2_UpdateDataCollectionResponse as UpdateDataCollectionResponse, type index_d$2_UpdateDataCollectionResponseNonNullableFields as UpdateDataCollectionResponseNonNullableFields, type index_d$2_UpdateDataPermissionsRequest as UpdateDataPermissionsRequest, type index_d$2_UpdateDataPermissionsResponse as UpdateDataPermissionsResponse, type index_d$2_UrlizedOnlyPattern as UrlizedOnlyPattern, type index_d$2_UrlizedPluginOptions as UrlizedPluginOptions, WebhookIdentityType$1 as WebhookIdentityType, type index_d$2__Array as _Array, type index_d$2__Object as _Object, type index_d$2__publicOnDataCollectionChangedEventType as _publicOnDataCollectionChangedEventType, type index_d$2__publicOnDataCollectionClonedEventType as _publicOnDataCollectionClonedEventType, type index_d$2__publicOnDataCollectionCreatedType as _publicOnDataCollectionCreatedType, type index_d$2__publicOnDataCollectionDeletedType as _publicOnDataCollectionDeletedType, type index_d$2__publicOnDataCollectionUpdatedType as _publicOnDataCollectionUpdatedType, index_d$2_createDataCollection as createDataCollection, index_d$2_deleteDataCollection as deleteDataCollection, index_d$2_getDataCollection as getDataCollection, index_d$2_listDataCollections as listDataCollections, index_d$2_onDataCollectionChangedEvent as onDataCollectionChangedEvent, index_d$2_onDataCollectionClonedEvent as onDataCollectionClonedEvent, index_d$2_onDataCollectionCreated as onDataCollectionCreated, index_d$2_onDataCollectionDeleted as onDataCollectionDeleted, index_d$2_onDataCollectionUpdated as onDataCollectionUpdated, onDataCollectionChangedEvent$1 as publicOnDataCollectionChangedEvent, onDataCollectionClonedEvent$1 as publicOnDataCollectionClonedEvent, onDataCollectionCreated$1 as publicOnDataCollectionCreated, onDataCollectionDeleted$1 as publicOnDataCollectionDeleted, onDataCollectionUpdated$1 as publicOnDataCollectionUpdated, index_d$2_updateDataCollection as updateDataCollection };
|
|
3345
2532
|
}
|
|
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
2533
|
|
|
3354
2534
|
interface DataItem {
|
|
3355
2535
|
/** Data item ID. */
|
|
@@ -5285,7 +4465,7 @@ interface ReplaceDataItemReferencesOptions {
|
|
|
5285
4465
|
newReferencedItemIds?: string[];
|
|
5286
4466
|
}
|
|
5287
4467
|
|
|
5288
|
-
declare function insertDataItem$1(httpClient: HttpClient
|
|
4468
|
+
declare function insertDataItem$1(httpClient: HttpClient): InsertDataItemSignature;
|
|
5289
4469
|
interface InsertDataItemSignature {
|
|
5290
4470
|
/**
|
|
5291
4471
|
* Adds an item to a collection.
|
|
@@ -5303,7 +4483,7 @@ interface InsertDataItemSignature {
|
|
|
5303
4483
|
*/
|
|
5304
4484
|
(options?: InsertDataItemOptions | undefined): Promise<InsertDataItemResponse & InsertDataItemResponseNonNullableFields>;
|
|
5305
4485
|
}
|
|
5306
|
-
declare function updateDataItem$1(httpClient: HttpClient
|
|
4486
|
+
declare function updateDataItem$1(httpClient: HttpClient): UpdateDataItemSignature;
|
|
5307
4487
|
interface UpdateDataItemSignature {
|
|
5308
4488
|
/**
|
|
5309
4489
|
* Updates an item in a collection.
|
|
@@ -5325,7 +4505,7 @@ interface UpdateDataItemSignature {
|
|
|
5325
4505
|
*/
|
|
5326
4506
|
(_id: string, options?: UpdateDataItemOptions | undefined): Promise<UpdateDataItemResponse & UpdateDataItemResponseNonNullableFields>;
|
|
5327
4507
|
}
|
|
5328
|
-
declare function saveDataItem$1(httpClient: HttpClient
|
|
4508
|
+
declare function saveDataItem$1(httpClient: HttpClient): SaveDataItemSignature;
|
|
5329
4509
|
interface SaveDataItemSignature {
|
|
5330
4510
|
/**
|
|
5331
4511
|
* Inserts or updates an item in a collection.
|
|
@@ -5345,7 +4525,7 @@ interface SaveDataItemSignature {
|
|
|
5345
4525
|
*/
|
|
5346
4526
|
(options?: SaveDataItemOptions | undefined): Promise<SaveDataItemResponse & SaveDataItemResponseNonNullableFields>;
|
|
5347
4527
|
}
|
|
5348
|
-
declare function getDataItem$1(httpClient: HttpClient
|
|
4528
|
+
declare function getDataItem$1(httpClient: HttpClient): GetDataItemSignature;
|
|
5349
4529
|
interface GetDataItemSignature {
|
|
5350
4530
|
/**
|
|
5351
4531
|
* Retrieves an item from a collection.
|
|
@@ -5358,7 +4538,7 @@ interface GetDataItemSignature {
|
|
|
5358
4538
|
*/
|
|
5359
4539
|
(dataItemId: string, options?: GetDataItemOptions | undefined): Promise<DataItem & DataItemNonNullableFields>;
|
|
5360
4540
|
}
|
|
5361
|
-
declare function removeDataItem$1(httpClient: HttpClient
|
|
4541
|
+
declare function removeDataItem$1(httpClient: HttpClient): RemoveDataItemSignature;
|
|
5362
4542
|
interface RemoveDataItemSignature {
|
|
5363
4543
|
/**
|
|
5364
4544
|
* Removes an item from a collection.
|
|
@@ -5373,892 +4553,482 @@ interface RemoveDataItemSignature {
|
|
|
5373
4553
|
*/
|
|
5374
4554
|
(dataItemId: string, options?: RemoveDataItemOptions | undefined): Promise<RemoveDataItemResponse & RemoveDataItemResponseNonNullableFields>;
|
|
5375
4555
|
}
|
|
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 {
|
|
4556
|
+
declare function truncateDataItems$1(httpClient: HttpClient): TruncateDataItemsSignature;
|
|
4557
|
+
interface TruncateDataItemsSignature {
|
|
5592
4558
|
/**
|
|
5593
|
-
*
|
|
4559
|
+
* Removes all items from a collection.
|
|
5594
4560
|
*
|
|
5595
4561
|
*
|
|
5596
|
-
*
|
|
5597
|
-
* The function removes existing references and in their place it adds references to the items specified in `options.newReferencedItemIds`.
|
|
4562
|
+
* If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.
|
|
5598
4563
|
*
|
|
5599
|
-
* > **Note:**
|
|
5600
|
-
*
|
|
4564
|
+
* > **Note:**
|
|
4565
|
+
* > Once items have been removed from a collection, they can't be restored.
|
|
4566
|
+
* @param - Options for truncating data items from a collection.
|
|
5601
4567
|
*/
|
|
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
|
-
}
|
|
4568
|
+
(options: TruncateDataItemsOptions): Promise<void>;
|
|
5624
4569
|
}
|
|
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 index_d$1_ACTION = ACTION;
|
|
5671
|
-
declare const index_d$1_ACTION: typeof ACTION;
|
|
5672
|
-
type index_d$1_Action = Action;
|
|
5673
|
-
declare const index_d$1_Action: typeof Action;
|
|
5674
|
-
type index_d$1_ActionEvent = ActionEvent;
|
|
5675
|
-
type index_d$1_AggregateDataItemsOptions = AggregateDataItemsOptions;
|
|
5676
|
-
type index_d$1_AggregateDataItemsRequest = AggregateDataItemsRequest;
|
|
5677
|
-
type index_d$1_AggregateDataItemsRequestPagingMethodOneOf = AggregateDataItemsRequestPagingMethodOneOf;
|
|
5678
|
-
type index_d$1_AggregateDataItemsResponse = AggregateDataItemsResponse;
|
|
5679
|
-
type index_d$1_Aggregation = Aggregation;
|
|
5680
|
-
type index_d$1_AppendToArray = AppendToArray;
|
|
5681
|
-
type index_d$1_ApplicationError = ApplicationError;
|
|
5682
|
-
type index_d$1_Average = Average;
|
|
5683
|
-
type index_d$1_BaseEventMetadata = BaseEventMetadata;
|
|
5684
|
-
type index_d$1_BulkActionMetadata = BulkActionMetadata;
|
|
5685
|
-
type index_d$1_BulkActionType = BulkActionType;
|
|
5686
|
-
declare const index_d$1_BulkActionType: typeof BulkActionType;
|
|
5687
|
-
type index_d$1_BulkDataItemReferenceResult = BulkDataItemReferenceResult;
|
|
5688
|
-
type index_d$1_BulkDataItemResult = BulkDataItemResult;
|
|
5689
|
-
type index_d$1_BulkInsertDataItemReferencesOptions = BulkInsertDataItemReferencesOptions;
|
|
5690
|
-
type index_d$1_BulkInsertDataItemReferencesRequest = BulkInsertDataItemReferencesRequest;
|
|
5691
|
-
type index_d$1_BulkInsertDataItemReferencesResponse = BulkInsertDataItemReferencesResponse;
|
|
5692
|
-
type index_d$1_BulkInsertDataItemReferencesResponseNonNullableFields = BulkInsertDataItemReferencesResponseNonNullableFields;
|
|
5693
|
-
type index_d$1_BulkInsertDataItemsOptions = BulkInsertDataItemsOptions;
|
|
5694
|
-
type index_d$1_BulkInsertDataItemsRequest = BulkInsertDataItemsRequest;
|
|
5695
|
-
type index_d$1_BulkInsertDataItemsResponse = BulkInsertDataItemsResponse;
|
|
5696
|
-
type index_d$1_BulkInsertDataItemsResponseNonNullableFields = BulkInsertDataItemsResponseNonNullableFields;
|
|
5697
|
-
type index_d$1_BulkPatchDataItemsRequest = BulkPatchDataItemsRequest;
|
|
5698
|
-
type index_d$1_BulkPatchDataItemsResponse = BulkPatchDataItemsResponse;
|
|
5699
|
-
type index_d$1_BulkRemoveDataItemReferencesOptions = BulkRemoveDataItemReferencesOptions;
|
|
5700
|
-
type index_d$1_BulkRemoveDataItemReferencesRequest = BulkRemoveDataItemReferencesRequest;
|
|
5701
|
-
type index_d$1_BulkRemoveDataItemReferencesResponse = BulkRemoveDataItemReferencesResponse;
|
|
5702
|
-
type index_d$1_BulkRemoveDataItemReferencesResponseNonNullableFields = BulkRemoveDataItemReferencesResponseNonNullableFields;
|
|
5703
|
-
type index_d$1_BulkRemoveDataItemsOptions = BulkRemoveDataItemsOptions;
|
|
5704
|
-
type index_d$1_BulkRemoveDataItemsRequest = BulkRemoveDataItemsRequest;
|
|
5705
|
-
type index_d$1_BulkRemoveDataItemsResponse = BulkRemoveDataItemsResponse;
|
|
5706
|
-
type index_d$1_BulkRemoveDataItemsResponseNonNullableFields = BulkRemoveDataItemsResponseNonNullableFields;
|
|
5707
|
-
type index_d$1_BulkSaveDataItemsOptions = BulkSaveDataItemsOptions;
|
|
5708
|
-
type index_d$1_BulkSaveDataItemsRequest = BulkSaveDataItemsRequest;
|
|
5709
|
-
type index_d$1_BulkSaveDataItemsResponse = BulkSaveDataItemsResponse;
|
|
5710
|
-
type index_d$1_BulkSaveDataItemsResponseNonNullableFields = BulkSaveDataItemsResponseNonNullableFields;
|
|
5711
|
-
type index_d$1_BulkUpdateDataItemsOptions = BulkUpdateDataItemsOptions;
|
|
5712
|
-
type index_d$1_BulkUpdateDataItemsRequest = BulkUpdateDataItemsRequest;
|
|
5713
|
-
type index_d$1_BulkUpdateDataItemsResponse = BulkUpdateDataItemsResponse;
|
|
5714
|
-
type index_d$1_BulkUpdateDataItemsResponseNonNullableFields = BulkUpdateDataItemsResponseNonNullableFields;
|
|
5715
|
-
type index_d$1_CachingInfo = CachingInfo;
|
|
5716
|
-
type index_d$1_Count = Count;
|
|
5717
|
-
type index_d$1_CountDataItemsOptions = CountDataItemsOptions;
|
|
5718
|
-
type index_d$1_CountDataItemsRequest = CountDataItemsRequest;
|
|
5719
|
-
type index_d$1_CountDataItemsResponse = CountDataItemsResponse;
|
|
5720
|
-
type index_d$1_CountDataItemsResponseNonNullableFields = CountDataItemsResponseNonNullableFields;
|
|
5721
|
-
type index_d$1_CursorPaging = CursorPaging;
|
|
5722
|
-
type index_d$1_Cursors = Cursors;
|
|
5723
|
-
type index_d$1_DataItem = DataItem;
|
|
5724
|
-
type index_d$1_DataItemCreatedEnvelope = DataItemCreatedEnvelope;
|
|
5725
|
-
type index_d$1_DataItemDeletedEnvelope = DataItemDeletedEnvelope;
|
|
5726
|
-
type index_d$1_DataItemNonNullableFields = DataItemNonNullableFields;
|
|
5727
|
-
type index_d$1_DataItemReference = DataItemReference;
|
|
5728
|
-
type index_d$1_DataItemUpdatedEnvelope = DataItemUpdatedEnvelope;
|
|
5729
|
-
type index_d$1_DataItemsQueryBuilder = DataItemsQueryBuilder;
|
|
5730
|
-
type index_d$1_DataItemsQueryResult = DataItemsQueryResult;
|
|
5731
|
-
type index_d$1_DataPublishPluginOptions = DataPublishPluginOptions;
|
|
5732
|
-
type index_d$1_DomainEvent = DomainEvent;
|
|
5733
|
-
type index_d$1_DomainEventBodyOneOf = DomainEventBodyOneOf;
|
|
5734
|
-
type index_d$1_EntityCreatedEvent = EntityCreatedEvent;
|
|
5735
|
-
type index_d$1_EntityDeletedEvent = EntityDeletedEvent;
|
|
5736
|
-
type index_d$1_EntityUpdatedEvent = EntityUpdatedEvent;
|
|
5737
|
-
type index_d$1_EventMetadata = EventMetadata;
|
|
5738
|
-
type index_d$1_FieldUpdate = FieldUpdate;
|
|
5739
|
-
type index_d$1_FieldUpdateActionOptionsOneOf = FieldUpdateActionOptionsOneOf;
|
|
5740
|
-
type index_d$1_GetDataItemOptions = GetDataItemOptions;
|
|
5741
|
-
type index_d$1_GetDataItemRequest = GetDataItemRequest;
|
|
5742
|
-
type index_d$1_GetDataItemResponse = GetDataItemResponse;
|
|
5743
|
-
type index_d$1_GetDataItemResponseNonNullableFields = GetDataItemResponseNonNullableFields;
|
|
5744
|
-
type index_d$1_IdentificationData = IdentificationData;
|
|
5745
|
-
type index_d$1_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
|
|
5746
|
-
type index_d$1_IncrementField = IncrementField;
|
|
5747
|
-
type index_d$1_InsertDataItemOptions = InsertDataItemOptions;
|
|
5748
|
-
type index_d$1_InsertDataItemReferenceOptions = InsertDataItemReferenceOptions;
|
|
5749
|
-
type index_d$1_InsertDataItemReferenceRequest = InsertDataItemReferenceRequest;
|
|
5750
|
-
type index_d$1_InsertDataItemReferenceResponse = InsertDataItemReferenceResponse;
|
|
5751
|
-
type index_d$1_InsertDataItemReferenceResponseNonNullableFields = InsertDataItemReferenceResponseNonNullableFields;
|
|
5752
|
-
type index_d$1_InsertDataItemRequest = InsertDataItemRequest;
|
|
5753
|
-
type index_d$1_InsertDataItemResponse = InsertDataItemResponse;
|
|
5754
|
-
type index_d$1_InsertDataItemResponseNonNullableFields = InsertDataItemResponseNonNullableFields;
|
|
5755
|
-
type index_d$1_IsReferencedDataItemOptions = IsReferencedDataItemOptions;
|
|
5756
|
-
type index_d$1_IsReferencedDataItemRequest = IsReferencedDataItemRequest;
|
|
5757
|
-
type index_d$1_IsReferencedDataItemResponse = IsReferencedDataItemResponse;
|
|
5758
|
-
type index_d$1_IsReferencedDataItemResponseNonNullableFields = IsReferencedDataItemResponseNonNullableFields;
|
|
5759
|
-
type index_d$1_ItemMetadata = ItemMetadata;
|
|
5760
|
-
type index_d$1_Max = Max;
|
|
5761
|
-
type index_d$1_MessageEnvelope = MessageEnvelope;
|
|
5762
|
-
type index_d$1_Min = Min;
|
|
5763
|
-
type index_d$1_Operation = Operation;
|
|
5764
|
-
type index_d$1_OperationCalculateOneOf = OperationCalculateOneOf;
|
|
5765
|
-
type index_d$1_Options = Options;
|
|
5766
|
-
type index_d$1_PagingMetadataV2 = PagingMetadataV2;
|
|
5767
|
-
type index_d$1_PatchDataItemRequest = PatchDataItemRequest;
|
|
5768
|
-
type index_d$1_PatchDataItemResponse = PatchDataItemResponse;
|
|
5769
|
-
type index_d$1_PatchSet = PatchSet;
|
|
5770
|
-
type index_d$1_PublishPluginOptions = PublishPluginOptions;
|
|
5771
|
-
type index_d$1_QueryDataItemsOptions = QueryDataItemsOptions;
|
|
5772
|
-
type index_d$1_QueryDataItemsRequest = QueryDataItemsRequest;
|
|
5773
|
-
type index_d$1_QueryDataItemsResponse = QueryDataItemsResponse;
|
|
5774
|
-
type index_d$1_QueryDataItemsResponseNonNullableFields = QueryDataItemsResponseNonNullableFields;
|
|
5775
|
-
type index_d$1_QueryDistinctValuesOptions = QueryDistinctValuesOptions;
|
|
5776
|
-
type index_d$1_QueryDistinctValuesRequest = QueryDistinctValuesRequest;
|
|
5777
|
-
type index_d$1_QueryDistinctValuesRequestPagingMethodOneOf = QueryDistinctValuesRequestPagingMethodOneOf;
|
|
5778
|
-
type index_d$1_QueryDistinctValuesResponse = QueryDistinctValuesResponse;
|
|
5779
|
-
type index_d$1_QueryReferencedDataItemsOptions = QueryReferencedDataItemsOptions;
|
|
5780
|
-
type index_d$1_QueryReferencedDataItemsRequest = QueryReferencedDataItemsRequest;
|
|
5781
|
-
type index_d$1_QueryReferencedDataItemsRequestPagingMethodOneOf = QueryReferencedDataItemsRequestPagingMethodOneOf;
|
|
5782
|
-
type index_d$1_QueryReferencedDataItemsResponse = QueryReferencedDataItemsResponse;
|
|
5783
|
-
type index_d$1_QueryReferencedDataItemsResponseNonNullableFields = QueryReferencedDataItemsResponseNonNullableFields;
|
|
5784
|
-
type index_d$1_QueryV2 = QueryV2;
|
|
5785
|
-
type index_d$1_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf;
|
|
5786
|
-
type index_d$1_ReferencedItemOptions = ReferencedItemOptions;
|
|
5787
|
-
type index_d$1_ReferencedResult = ReferencedResult;
|
|
5788
|
-
type index_d$1_ReferencedResultEntityOneOf = ReferencedResultEntityOneOf;
|
|
5789
|
-
type index_d$1_RemoveDataItemOptions = RemoveDataItemOptions;
|
|
5790
|
-
type index_d$1_RemoveDataItemReferenceOptions = RemoveDataItemReferenceOptions;
|
|
5791
|
-
type index_d$1_RemoveDataItemReferenceRequest = RemoveDataItemReferenceRequest;
|
|
5792
|
-
type index_d$1_RemoveDataItemReferenceResponse = RemoveDataItemReferenceResponse;
|
|
5793
|
-
type index_d$1_RemoveDataItemReferenceResponseNonNullableFields = RemoveDataItemReferenceResponseNonNullableFields;
|
|
5794
|
-
type index_d$1_RemoveDataItemRequest = RemoveDataItemRequest;
|
|
5795
|
-
type index_d$1_RemoveDataItemResponse = RemoveDataItemResponse;
|
|
5796
|
-
type index_d$1_RemoveDataItemResponseNonNullableFields = RemoveDataItemResponseNonNullableFields;
|
|
5797
|
-
type index_d$1_RemoveFromArray = RemoveFromArray;
|
|
5798
|
-
type index_d$1_ReplaceDataItemReferencesOptions = ReplaceDataItemReferencesOptions;
|
|
5799
|
-
type index_d$1_ReplaceDataItemReferencesRequest = ReplaceDataItemReferencesRequest;
|
|
5800
|
-
type index_d$1_ReplaceDataItemReferencesResponse = ReplaceDataItemReferencesResponse;
|
|
5801
|
-
type index_d$1_ReplaceDataItemReferencesResponseNonNullableFields = ReplaceDataItemReferencesResponseNonNullableFields;
|
|
5802
|
-
type index_d$1_RestoreInfo = RestoreInfo;
|
|
5803
|
-
type index_d$1_SaveDataItemOptions = SaveDataItemOptions;
|
|
5804
|
-
type index_d$1_SaveDataItemRequest = SaveDataItemRequest;
|
|
5805
|
-
type index_d$1_SaveDataItemResponse = SaveDataItemResponse;
|
|
5806
|
-
type index_d$1_SaveDataItemResponseNonNullableFields = SaveDataItemResponseNonNullableFields;
|
|
5807
|
-
type index_d$1_SetField = SetField;
|
|
5808
|
-
type index_d$1_SortOrder = SortOrder;
|
|
5809
|
-
declare const index_d$1_SortOrder: typeof SortOrder;
|
|
5810
|
-
type index_d$1_Sorting = Sorting;
|
|
5811
|
-
type index_d$1_Sum = Sum;
|
|
5812
|
-
type index_d$1_TruncateDataItemsOptions = TruncateDataItemsOptions;
|
|
5813
|
-
type index_d$1_TruncateDataItemsRequest = TruncateDataItemsRequest;
|
|
5814
|
-
type index_d$1_TruncateDataItemsResponse = TruncateDataItemsResponse;
|
|
5815
|
-
type index_d$1_UnresolvedReference = UnresolvedReference;
|
|
5816
|
-
type index_d$1_UpdateDataItemOptions = UpdateDataItemOptions;
|
|
5817
|
-
type index_d$1_UpdateDataItemRequest = UpdateDataItemRequest;
|
|
5818
|
-
type index_d$1_UpdateDataItemResponse = UpdateDataItemResponse;
|
|
5819
|
-
type index_d$1_UpdateDataItemResponseNonNullableFields = UpdateDataItemResponseNonNullableFields;
|
|
5820
|
-
type index_d$1_WebhookIdentityType = WebhookIdentityType;
|
|
5821
|
-
declare const index_d$1_WebhookIdentityType: typeof WebhookIdentityType;
|
|
5822
|
-
type index_d$1__publicOnDataItemCreatedType = _publicOnDataItemCreatedType;
|
|
5823
|
-
type index_d$1__publicOnDataItemDeletedType = _publicOnDataItemDeletedType;
|
|
5824
|
-
type index_d$1__publicOnDataItemUpdatedType = _publicOnDataItemUpdatedType;
|
|
5825
|
-
declare const index_d$1_aggregateDataItems: typeof aggregateDataItems;
|
|
5826
|
-
declare const index_d$1_bulkInsertDataItemReferences: typeof bulkInsertDataItemReferences;
|
|
5827
|
-
declare const index_d$1_bulkInsertDataItems: typeof bulkInsertDataItems;
|
|
5828
|
-
declare const index_d$1_bulkRemoveDataItemReferences: typeof bulkRemoveDataItemReferences;
|
|
5829
|
-
declare const index_d$1_bulkRemoveDataItems: typeof bulkRemoveDataItems;
|
|
5830
|
-
declare const index_d$1_bulkSaveDataItems: typeof bulkSaveDataItems;
|
|
5831
|
-
declare const index_d$1_bulkUpdateDataItems: typeof bulkUpdateDataItems;
|
|
5832
|
-
declare const index_d$1_countDataItems: typeof countDataItems;
|
|
5833
|
-
declare const index_d$1_getDataItem: typeof getDataItem;
|
|
5834
|
-
declare const index_d$1_insertDataItem: typeof insertDataItem;
|
|
5835
|
-
declare const index_d$1_insertDataItemReference: typeof insertDataItemReference;
|
|
5836
|
-
declare const index_d$1_isReferencedDataItem: typeof isReferencedDataItem;
|
|
5837
|
-
declare const index_d$1_onDataItemCreated: typeof onDataItemCreated;
|
|
5838
|
-
declare const index_d$1_onDataItemDeleted: typeof onDataItemDeleted;
|
|
5839
|
-
declare const index_d$1_onDataItemUpdated: typeof onDataItemUpdated;
|
|
5840
|
-
declare const index_d$1_queryDataItems: typeof queryDataItems;
|
|
5841
|
-
declare const index_d$1_queryDistinctValues: typeof queryDistinctValues;
|
|
5842
|
-
declare const index_d$1_queryReferencedDataItems: typeof queryReferencedDataItems;
|
|
5843
|
-
declare const index_d$1_removeDataItem: typeof removeDataItem;
|
|
5844
|
-
declare const index_d$1_removeDataItemReference: typeof removeDataItemReference;
|
|
5845
|
-
declare const index_d$1_replaceDataItemReferences: typeof replaceDataItemReferences;
|
|
5846
|
-
declare const index_d$1_saveDataItem: typeof saveDataItem;
|
|
5847
|
-
declare const index_d$1_truncateDataItems: typeof truncateDataItems;
|
|
5848
|
-
declare const index_d$1_updateDataItem: typeof updateDataItem;
|
|
5849
|
-
declare namespace index_d$1 {
|
|
5850
|
-
export { index_d$1_ACTION as ACTION, index_d$1_Action as Action, type index_d$1_ActionEvent as ActionEvent, type index_d$1_AggregateDataItemsOptions as AggregateDataItemsOptions, type index_d$1_AggregateDataItemsRequest as AggregateDataItemsRequest, type index_d$1_AggregateDataItemsRequestPagingMethodOneOf as AggregateDataItemsRequestPagingMethodOneOf, type index_d$1_AggregateDataItemsResponse as AggregateDataItemsResponse, type index_d$1_Aggregation as Aggregation, type index_d$1_AppendToArray as AppendToArray, type index_d$1_ApplicationError as ApplicationError, type index_d$1_Average as Average, type index_d$1_BaseEventMetadata as BaseEventMetadata, type index_d$1_BulkActionMetadata as BulkActionMetadata, index_d$1_BulkActionType as BulkActionType, type index_d$1_BulkDataItemReferenceResult as BulkDataItemReferenceResult, type index_d$1_BulkDataItemResult as BulkDataItemResult, type index_d$1_BulkInsertDataItemReferencesOptions as BulkInsertDataItemReferencesOptions, type index_d$1_BulkInsertDataItemReferencesRequest as BulkInsertDataItemReferencesRequest, type index_d$1_BulkInsertDataItemReferencesResponse as BulkInsertDataItemReferencesResponse, type index_d$1_BulkInsertDataItemReferencesResponseNonNullableFields as BulkInsertDataItemReferencesResponseNonNullableFields, type index_d$1_BulkInsertDataItemsOptions as BulkInsertDataItemsOptions, type index_d$1_BulkInsertDataItemsRequest as BulkInsertDataItemsRequest, type index_d$1_BulkInsertDataItemsResponse as BulkInsertDataItemsResponse, type index_d$1_BulkInsertDataItemsResponseNonNullableFields as BulkInsertDataItemsResponseNonNullableFields, type index_d$1_BulkPatchDataItemsRequest as BulkPatchDataItemsRequest, type index_d$1_BulkPatchDataItemsResponse as BulkPatchDataItemsResponse, type index_d$1_BulkRemoveDataItemReferencesOptions as BulkRemoveDataItemReferencesOptions, type index_d$1_BulkRemoveDataItemReferencesRequest as BulkRemoveDataItemReferencesRequest, type index_d$1_BulkRemoveDataItemReferencesResponse as BulkRemoveDataItemReferencesResponse, type index_d$1_BulkRemoveDataItemReferencesResponseNonNullableFields as BulkRemoveDataItemReferencesResponseNonNullableFields, type index_d$1_BulkRemoveDataItemsOptions as BulkRemoveDataItemsOptions, type index_d$1_BulkRemoveDataItemsRequest as BulkRemoveDataItemsRequest, type index_d$1_BulkRemoveDataItemsResponse as BulkRemoveDataItemsResponse, type index_d$1_BulkRemoveDataItemsResponseNonNullableFields as BulkRemoveDataItemsResponseNonNullableFields, type index_d$1_BulkSaveDataItemsOptions as BulkSaveDataItemsOptions, type index_d$1_BulkSaveDataItemsRequest as BulkSaveDataItemsRequest, type index_d$1_BulkSaveDataItemsResponse as BulkSaveDataItemsResponse, type index_d$1_BulkSaveDataItemsResponseNonNullableFields as BulkSaveDataItemsResponseNonNullableFields, type index_d$1_BulkUpdateDataItemsOptions as BulkUpdateDataItemsOptions, type index_d$1_BulkUpdateDataItemsRequest as BulkUpdateDataItemsRequest, type index_d$1_BulkUpdateDataItemsResponse as BulkUpdateDataItemsResponse, type index_d$1_BulkUpdateDataItemsResponseNonNullableFields as BulkUpdateDataItemsResponseNonNullableFields, type index_d$1_CachingInfo as CachingInfo, type index_d$1_Count as Count, type index_d$1_CountDataItemsOptions as CountDataItemsOptions, type index_d$1_CountDataItemsRequest as CountDataItemsRequest, type index_d$1_CountDataItemsResponse as CountDataItemsResponse, type index_d$1_CountDataItemsResponseNonNullableFields as CountDataItemsResponseNonNullableFields, type index_d$1_CursorPaging as CursorPaging, type index_d$1_Cursors as Cursors, type index_d$1_DataItem as DataItem, type index_d$1_DataItemCreatedEnvelope as DataItemCreatedEnvelope, type index_d$1_DataItemDeletedEnvelope as DataItemDeletedEnvelope, type index_d$1_DataItemNonNullableFields as DataItemNonNullableFields, type index_d$1_DataItemReference as DataItemReference, type index_d$1_DataItemUpdatedEnvelope as DataItemUpdatedEnvelope, type index_d$1_DataItemsQueryBuilder as DataItemsQueryBuilder, type index_d$1_DataItemsQueryResult as DataItemsQueryResult, type index_d$1_DataPublishPluginOptions as DataPublishPluginOptions, type index_d$1_DomainEvent as DomainEvent, type index_d$1_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d$1_EntityCreatedEvent as EntityCreatedEvent, type index_d$1_EntityDeletedEvent as EntityDeletedEvent, type index_d$1_EntityUpdatedEvent as EntityUpdatedEvent, Environment$1 as Environment, type index_d$1_EventMetadata as EventMetadata, type index_d$1_FieldUpdate as FieldUpdate, type index_d$1_FieldUpdateActionOptionsOneOf as FieldUpdateActionOptionsOneOf, type index_d$1_GetDataItemOptions as GetDataItemOptions, type index_d$1_GetDataItemRequest as GetDataItemRequest, type index_d$1_GetDataItemResponse as GetDataItemResponse, type index_d$1_GetDataItemResponseNonNullableFields as GetDataItemResponseNonNullableFields, type index_d$1_IdentificationData as IdentificationData, type index_d$1_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d$1_IncrementField as IncrementField, type index_d$1_InsertDataItemOptions as InsertDataItemOptions, type index_d$1_InsertDataItemReferenceOptions as InsertDataItemReferenceOptions, type index_d$1_InsertDataItemReferenceRequest as InsertDataItemReferenceRequest, type index_d$1_InsertDataItemReferenceResponse as InsertDataItemReferenceResponse, type index_d$1_InsertDataItemReferenceResponseNonNullableFields as InsertDataItemReferenceResponseNonNullableFields, type index_d$1_InsertDataItemRequest as InsertDataItemRequest, type index_d$1_InsertDataItemResponse as InsertDataItemResponse, type index_d$1_InsertDataItemResponseNonNullableFields as InsertDataItemResponseNonNullableFields, type index_d$1_IsReferencedDataItemOptions as IsReferencedDataItemOptions, type index_d$1_IsReferencedDataItemRequest as IsReferencedDataItemRequest, type index_d$1_IsReferencedDataItemResponse as IsReferencedDataItemResponse, type index_d$1_IsReferencedDataItemResponseNonNullableFields as IsReferencedDataItemResponseNonNullableFields, type index_d$1_ItemMetadata as ItemMetadata, type index_d$1_Max as Max, type index_d$1_MessageEnvelope as MessageEnvelope, type index_d$1_Min as Min, type index_d$1_Operation as Operation, type index_d$1_OperationCalculateOneOf as OperationCalculateOneOf, type index_d$1_Options as Options, type Paging$1 as Paging, type index_d$1_PagingMetadataV2 as PagingMetadataV2, type index_d$1_PatchDataItemRequest as PatchDataItemRequest, type index_d$1_PatchDataItemResponse as PatchDataItemResponse, type index_d$1_PatchSet as PatchSet, type index_d$1_PublishPluginOptions as PublishPluginOptions, type index_d$1_QueryDataItemsOptions as QueryDataItemsOptions, type index_d$1_QueryDataItemsRequest as QueryDataItemsRequest, type index_d$1_QueryDataItemsResponse as QueryDataItemsResponse, type index_d$1_QueryDataItemsResponseNonNullableFields as QueryDataItemsResponseNonNullableFields, type index_d$1_QueryDistinctValuesOptions as QueryDistinctValuesOptions, type index_d$1_QueryDistinctValuesRequest as QueryDistinctValuesRequest, type index_d$1_QueryDistinctValuesRequestPagingMethodOneOf as QueryDistinctValuesRequestPagingMethodOneOf, type index_d$1_QueryDistinctValuesResponse as QueryDistinctValuesResponse, type index_d$1_QueryReferencedDataItemsOptions as QueryReferencedDataItemsOptions, type index_d$1_QueryReferencedDataItemsRequest as QueryReferencedDataItemsRequest, type index_d$1_QueryReferencedDataItemsRequestPagingMethodOneOf as QueryReferencedDataItemsRequestPagingMethodOneOf, type index_d$1_QueryReferencedDataItemsResponse as QueryReferencedDataItemsResponse, type index_d$1_QueryReferencedDataItemsResponseNonNullableFields as QueryReferencedDataItemsResponseNonNullableFields, type index_d$1_QueryV2 as QueryV2, type index_d$1_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type index_d$1_ReferencedItemOptions as ReferencedItemOptions, type index_d$1_ReferencedResult as ReferencedResult, type index_d$1_ReferencedResultEntityOneOf as ReferencedResultEntityOneOf, type index_d$1_RemoveDataItemOptions as RemoveDataItemOptions, type index_d$1_RemoveDataItemReferenceOptions as RemoveDataItemReferenceOptions, type index_d$1_RemoveDataItemReferenceRequest as RemoveDataItemReferenceRequest, type index_d$1_RemoveDataItemReferenceResponse as RemoveDataItemReferenceResponse, type index_d$1_RemoveDataItemReferenceResponseNonNullableFields as RemoveDataItemReferenceResponseNonNullableFields, type index_d$1_RemoveDataItemRequest as RemoveDataItemRequest, type index_d$1_RemoveDataItemResponse as RemoveDataItemResponse, type index_d$1_RemoveDataItemResponseNonNullableFields as RemoveDataItemResponseNonNullableFields, type index_d$1_RemoveFromArray as RemoveFromArray, type index_d$1_ReplaceDataItemReferencesOptions as ReplaceDataItemReferencesOptions, type index_d$1_ReplaceDataItemReferencesRequest as ReplaceDataItemReferencesRequest, type index_d$1_ReplaceDataItemReferencesResponse as ReplaceDataItemReferencesResponse, type index_d$1_ReplaceDataItemReferencesResponseNonNullableFields as ReplaceDataItemReferencesResponseNonNullableFields, type index_d$1_RestoreInfo as RestoreInfo, type index_d$1_SaveDataItemOptions as SaveDataItemOptions, type index_d$1_SaveDataItemRequest as SaveDataItemRequest, type index_d$1_SaveDataItemResponse as SaveDataItemResponse, type index_d$1_SaveDataItemResponseNonNullableFields as SaveDataItemResponseNonNullableFields, type index_d$1_SetField as SetField, index_d$1_SortOrder as SortOrder, type index_d$1_Sorting as Sorting, type index_d$1_Sum as Sum, type index_d$1_TruncateDataItemsOptions as TruncateDataItemsOptions, type index_d$1_TruncateDataItemsRequest as TruncateDataItemsRequest, type index_d$1_TruncateDataItemsResponse as TruncateDataItemsResponse, type index_d$1_UnresolvedReference as UnresolvedReference, type index_d$1_UpdateDataItemOptions as UpdateDataItemOptions, type index_d$1_UpdateDataItemRequest as UpdateDataItemRequest, type index_d$1_UpdateDataItemResponse as UpdateDataItemResponse, type index_d$1_UpdateDataItemResponseNonNullableFields as UpdateDataItemResponseNonNullableFields, index_d$1_WebhookIdentityType as WebhookIdentityType, type index_d$1__publicOnDataItemCreatedType as _publicOnDataItemCreatedType, type index_d$1__publicOnDataItemDeletedType as _publicOnDataItemDeletedType, type index_d$1__publicOnDataItemUpdatedType as _publicOnDataItemUpdatedType, index_d$1_aggregateDataItems as aggregateDataItems, index_d$1_bulkInsertDataItemReferences as bulkInsertDataItemReferences, index_d$1_bulkInsertDataItems as bulkInsertDataItems, index_d$1_bulkRemoveDataItemReferences as bulkRemoveDataItemReferences, index_d$1_bulkRemoveDataItems as bulkRemoveDataItems, index_d$1_bulkSaveDataItems as bulkSaveDataItems, index_d$1_bulkUpdateDataItems as bulkUpdateDataItems, index_d$1_countDataItems as countDataItems, index_d$1_getDataItem as getDataItem, index_d$1_insertDataItem as insertDataItem, index_d$1_insertDataItemReference as insertDataItemReference, index_d$1_isReferencedDataItem as isReferencedDataItem, index_d$1_onDataItemCreated as onDataItemCreated, index_d$1_onDataItemDeleted as onDataItemDeleted, index_d$1_onDataItemUpdated as onDataItemUpdated, onDataItemCreated$1 as publicOnDataItemCreated, onDataItemDeleted$1 as publicOnDataItemDeleted, onDataItemUpdated$1 as publicOnDataItemUpdated, index_d$1_queryDataItems as queryDataItems, index_d$1_queryDistinctValues as queryDistinctValues, index_d$1_queryReferencedDataItems as queryReferencedDataItems, index_d$1_removeDataItem as removeDataItem, index_d$1_removeDataItemReference as removeDataItemReference, index_d$1_replaceDataItemReferences as replaceDataItemReferences, index_d$1_saveDataItem as saveDataItem, index_d$1_truncateDataItems as truncateDataItems, index_d$1_updateDataItem as updateDataItem };
|
|
4570
|
+
declare function queryDataItems$1(httpClient: HttpClient): QueryDataItemsSignature;
|
|
4571
|
+
interface QueryDataItemsSignature {
|
|
4572
|
+
/**
|
|
4573
|
+
* Creates a query to retrieve items from a database collection.
|
|
4574
|
+
*
|
|
4575
|
+
* The `queryDataItems()` function builds a query to retrieve data items from a collection and returns a `DataItemsQueryBuilder` object.
|
|
4576
|
+
*
|
|
4577
|
+
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
|
4578
|
+
*
|
|
4579
|
+
* 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.
|
|
4580
|
+
*
|
|
4581
|
+
* The `queryDataItems()` function runs with the following `DataItemsQueryBuilder` defaults that you can override:
|
|
4582
|
+
*
|
|
4583
|
+
* + `skip`: 0
|
|
4584
|
+
* + `limit`: 50
|
|
4585
|
+
* + `descending`: by `_createdDate`
|
|
4586
|
+
*
|
|
4587
|
+
* 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.
|
|
4588
|
+
*
|
|
4589
|
+
* 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.
|
|
4590
|
+
*
|
|
4591
|
+
* > **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`.
|
|
4592
|
+
*
|
|
4593
|
+
*
|
|
4594
|
+
* @param - Options for querying data items.
|
|
4595
|
+
*/
|
|
4596
|
+
(options: QueryDataItemsOptions): DataItemsQueryBuilder;
|
|
5851
4597
|
}
|
|
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;
|
|
4598
|
+
declare function aggregateDataItems$1(httpClient: HttpClient): AggregateDataItemsSignature;
|
|
4599
|
+
interface AggregateDataItemsSignature {
|
|
5867
4600
|
/**
|
|
5868
|
-
*
|
|
4601
|
+
* Runs an aggregation on a data collection and returns the resulting list of items.
|
|
4602
|
+
*
|
|
4603
|
+
*
|
|
4604
|
+
* An aggregation enables you to perform certain calculations on your collection data, or on groups of items that you define, to retrieve meaningful summaries.
|
|
4605
|
+
* You can also add paging, filtering, and sorting preferences to your aggregation to retrieve exactly what you need.
|
|
4606
|
+
* @param - Options for running an aggregation.
|
|
5869
4607
|
*/
|
|
5870
|
-
|
|
4608
|
+
(options?: AggregateDataItemsOptions | undefined): Promise<AggregateDataItemsResponse>;
|
|
4609
|
+
}
|
|
4610
|
+
declare function countDataItems$1(httpClient: HttpClient): CountDataItemsSignature;
|
|
4611
|
+
interface CountDataItemsSignature {
|
|
5871
4612
|
/**
|
|
5872
|
-
*
|
|
5873
|
-
*
|
|
4613
|
+
* Counts the number of items in a data collection that match the provided filtering preferences.
|
|
4614
|
+
*
|
|
4615
|
+
* > **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`.
|
|
4616
|
+
* @param - Options for counting the number of items in a data collection.
|
|
5874
4617
|
*/
|
|
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;
|
|
4618
|
+
(options?: CountDataItemsOptions | undefined): Promise<CountDataItemsResponse & CountDataItemsResponseNonNullableFields>;
|
|
5897
4619
|
}
|
|
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
|
-
|
|
4620
|
+
declare function queryDistinctValues$1(httpClient: HttpClient): QueryDistinctValuesSignature;
|
|
4621
|
+
interface QueryDistinctValuesSignature {
|
|
4622
|
+
/**
|
|
4623
|
+
* Retrieves a list of distinct values for a given field in all items that match a query, without duplicates.
|
|
4624
|
+
*
|
|
4625
|
+
*
|
|
4626
|
+
* As with `queryDataItems()`, this endpoint retrieves items based on the filtering, sorting, and paging preferences you provide.
|
|
4627
|
+
* However, `queryDistinctValues()` doesn't return all of the full items that match the query.
|
|
4628
|
+
* Rather, it returns all unique values of the field you specify in `options.fieldName` for items that match the query.
|
|
4629
|
+
* If more than one item has the same value for that field, that value appears only once.
|
|
4630
|
+
*
|
|
4631
|
+
* For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
4632
|
+
*
|
|
4633
|
+
* > **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`.
|
|
4634
|
+
* @param - Options for querying distinct values.
|
|
4635
|
+
*/
|
|
4636
|
+
(options?: QueryDistinctValuesOptions | undefined): Promise<QueryDistinctValuesResponse>;
|
|
4637
|
+
}
|
|
4638
|
+
declare function bulkInsertDataItems$1(httpClient: HttpClient): BulkInsertDataItemsSignature;
|
|
4639
|
+
interface BulkInsertDataItemsSignature {
|
|
4640
|
+
/**
|
|
4641
|
+
* Adds multiple items to a collection.
|
|
4642
|
+
*
|
|
4643
|
+
*
|
|
4644
|
+
* When each item is inserted into a collection, its ID is automatically assigned a random value.
|
|
4645
|
+
* 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.
|
|
4646
|
+
* @param - Options for adding multiple items to a collection.
|
|
4647
|
+
*/
|
|
4648
|
+
(options?: BulkInsertDataItemsOptions | undefined): Promise<BulkInsertDataItemsResponse & BulkInsertDataItemsResponseNonNullableFields>;
|
|
4649
|
+
}
|
|
4650
|
+
declare function bulkUpdateDataItems$1(httpClient: HttpClient): BulkUpdateDataItemsSignature;
|
|
4651
|
+
interface BulkUpdateDataItemsSignature {
|
|
4652
|
+
/**
|
|
4653
|
+
* Updates multiple items in a collection.
|
|
4654
|
+
*
|
|
4655
|
+
*
|
|
4656
|
+
* This function replaces each specified data item's existing data with the payload provided in the request.
|
|
4657
|
+
*
|
|
4658
|
+
* Each item in the request must include an ID. If an item is found in the specified collection with
|
|
4659
|
+
* the same ID, that item is updated. If the collection doesn't contain an item with that ID, the update fails.
|
|
4660
|
+
*
|
|
4661
|
+
* When an item is updated, its `data._updatedDate` field is changed to the current date and time.
|
|
4662
|
+
*
|
|
4663
|
+
* > **Note:**
|
|
4664
|
+
* > 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
|
|
4665
|
+
* > aren't included in the updated item, their values are lost.
|
|
4666
|
+
* @param - Options for updating multiple items in a collection.
|
|
4667
|
+
*/
|
|
4668
|
+
(options?: BulkUpdateDataItemsOptions | undefined): Promise<BulkUpdateDataItemsResponse & BulkUpdateDataItemsResponseNonNullableFields>;
|
|
4669
|
+
}
|
|
4670
|
+
declare function bulkSaveDataItems$1(httpClient: HttpClient): BulkSaveDataItemsSignature;
|
|
4671
|
+
interface BulkSaveDataItemsSignature {
|
|
4672
|
+
/**
|
|
4673
|
+
* Inserts or updates multiple items in a collection.
|
|
4674
|
+
*
|
|
4675
|
+
*
|
|
4676
|
+
* This function inserts or updates each item provided, depending on whether it already exists in the collection. For each item:
|
|
4677
|
+
*
|
|
4678
|
+
* + If you don't provide an ID, a new item is created.
|
|
4679
|
+
*
|
|
4680
|
+
* + If you provide an ID that doesn't exist in the collection, a new item is created with that ID.
|
|
4681
|
+
*
|
|
4682
|
+
* + 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.
|
|
4683
|
+
*
|
|
4684
|
+
* > **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.
|
|
4685
|
+
* > This means that all of the item's previous fields and values are lost.
|
|
4686
|
+
* @param - Options for saving multiple items in a collection.
|
|
4687
|
+
*/
|
|
4688
|
+
(options?: BulkSaveDataItemsOptions | undefined): Promise<BulkSaveDataItemsResponse & BulkSaveDataItemsResponseNonNullableFields>;
|
|
4689
|
+
}
|
|
4690
|
+
declare function bulkRemoveDataItems$1(httpClient: HttpClient): BulkRemoveDataItemsSignature;
|
|
4691
|
+
interface BulkRemoveDataItemsSignature {
|
|
4692
|
+
/**
|
|
4693
|
+
* Removes multiple items from a collection.
|
|
4694
|
+
*
|
|
4695
|
+
*
|
|
4696
|
+
* If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.
|
|
4697
|
+
*
|
|
4698
|
+
* > **Note:** Once an item has been removed from a collection, it can't be restored.
|
|
4699
|
+
* @param - Options for removing multiple items from a collection.
|
|
4700
|
+
*/
|
|
4701
|
+
(options?: BulkRemoveDataItemsOptions | undefined): Promise<BulkRemoveDataItemsResponse & BulkRemoveDataItemsResponseNonNullableFields>;
|
|
4702
|
+
}
|
|
4703
|
+
declare function queryReferencedDataItems$1(httpClient: HttpClient): QueryReferencedDataItemsSignature;
|
|
4704
|
+
interface QueryReferencedDataItemsSignature {
|
|
4705
|
+
/**
|
|
4706
|
+
* Retrieves the full items referenced in the specified field of an item.
|
|
4707
|
+
*
|
|
4708
|
+
*
|
|
4709
|
+
* Reference and multi-reference fields refer to items in different collections.
|
|
4710
|
+
* Use this function to retrieve the full details of the referenced items themselves.
|
|
4711
|
+
*
|
|
4712
|
+
* For example, suppose you have a **Movies** collection with an **Actors** field that contains references to items in a **People** collection.
|
|
4713
|
+
* Querying the **Movies** collection using `queryReferencedDataItems()` returns the relevant **People** items referenced in the **Actors** field of the specified **Movie** item.
|
|
4714
|
+
* This gives you information from the **People** collection about each of the actors in the specified movie.
|
|
4715
|
+
*
|
|
4716
|
+
* > **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`.
|
|
4717
|
+
* @param - Options for querying referenced data items.
|
|
4718
|
+
*/
|
|
4719
|
+
(options?: QueryReferencedDataItemsOptions | undefined): Promise<QueryReferencedDataItemsResponse & QueryReferencedDataItemsResponseNonNullableFields>;
|
|
4720
|
+
}
|
|
4721
|
+
declare function isReferencedDataItem$1(httpClient: HttpClient): IsReferencedDataItemSignature;
|
|
4722
|
+
interface IsReferencedDataItemSignature {
|
|
4723
|
+
/**
|
|
4724
|
+
* Checks whether a field in a referring item contains a reference to a specified item.
|
|
4725
|
+
*
|
|
4726
|
+
* > **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`.
|
|
4727
|
+
* @param - Options for checking whether a field contains a reference to an item.
|
|
4728
|
+
*/
|
|
4729
|
+
(options?: IsReferencedDataItemOptions | undefined): Promise<IsReferencedDataItemResponse & IsReferencedDataItemResponseNonNullableFields>;
|
|
4730
|
+
}
|
|
4731
|
+
declare function insertDataItemReference$1(httpClient: HttpClient): InsertDataItemReferenceSignature;
|
|
4732
|
+
interface InsertDataItemReferenceSignature {
|
|
4733
|
+
/**
|
|
4734
|
+
* Inserts a reference in the specified field in an item in a collection.
|
|
4735
|
+
*
|
|
4736
|
+
*
|
|
4737
|
+
* 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.
|
|
4738
|
+
* @param - Options for inserting a reference.
|
|
4739
|
+
*/
|
|
4740
|
+
(options?: InsertDataItemReferenceOptions | undefined): Promise<InsertDataItemReferenceResponse & InsertDataItemReferenceResponseNonNullableFields>;
|
|
5983
4741
|
}
|
|
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: {};
|
|
4742
|
+
declare function removeDataItemReference$1(httpClient: HttpClient): RemoveDataItemReferenceSignature;
|
|
4743
|
+
interface RemoveDataItemReferenceSignature {
|
|
4744
|
+
/**
|
|
4745
|
+
* Removes the specified reference from the specified field.
|
|
4746
|
+
* @param - Options for removing a reference.
|
|
4747
|
+
*/
|
|
4748
|
+
(options: RemoveDataItemReferenceOptions): Promise<RemoveDataItemReferenceResponse & RemoveDataItemReferenceResponseNonNullableFields>;
|
|
6140
4749
|
}
|
|
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() {}
|
|
4750
|
+
declare function bulkInsertDataItemReferences$1(httpClient: HttpClient): BulkInsertDataItemReferencesSignature;
|
|
4751
|
+
interface BulkInsertDataItemReferencesSignature {
|
|
4752
|
+
/**
|
|
4753
|
+
* Inserts one or more references in the specified fields of items in a collection.
|
|
4754
|
+
*
|
|
4755
|
+
*
|
|
4756
|
+
* This endpoint adds one or more references to a collection.
|
|
4757
|
+
* 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.
|
|
4758
|
+
* @param - Options for inserting one or more references.
|
|
4759
|
+
*/
|
|
4760
|
+
(options?: BulkInsertDataItemReferencesOptions | undefined): Promise<BulkInsertDataItemReferencesResponse & BulkInsertDataItemReferencesResponseNonNullableFields>;
|
|
6189
4761
|
}
|
|
4762
|
+
declare function bulkRemoveDataItemReferences$1(httpClient: HttpClient): BulkRemoveDataItemReferencesSignature;
|
|
4763
|
+
interface BulkRemoveDataItemReferencesSignature {
|
|
4764
|
+
/**
|
|
4765
|
+
* Removes one or more references.
|
|
4766
|
+
* @param - Options for removing one or more references.
|
|
4767
|
+
*/
|
|
4768
|
+
(options: BulkRemoveDataItemReferencesOptions): Promise<BulkRemoveDataItemReferencesResponse & BulkRemoveDataItemReferencesResponseNonNullableFields>;
|
|
4769
|
+
}
|
|
4770
|
+
declare function replaceDataItemReferences$1(httpClient: HttpClient): ReplaceDataItemReferencesSignature;
|
|
4771
|
+
interface ReplaceDataItemReferencesSignature {
|
|
4772
|
+
/**
|
|
4773
|
+
* Replaces references in a specified field of a specified data item.
|
|
4774
|
+
*
|
|
4775
|
+
*
|
|
4776
|
+
* This function replaces the existing reference or references contained in the field specified in `options.referringItemFieldName` within the data item specified in `options.referringItemId`.
|
|
4777
|
+
* The function removes existing references and in their place it adds references to the items specified in `options.newReferencedItemIds`.
|
|
4778
|
+
*
|
|
4779
|
+
* > **Note:** If you pass an empty array in `options.newReferencedItemIds`, all existing references are removed.
|
|
4780
|
+
* @param - Options for replacing references.
|
|
4781
|
+
*/
|
|
4782
|
+
(options?: ReplaceDataItemReferencesOptions | undefined): Promise<ReplaceDataItemReferencesResponse & ReplaceDataItemReferencesResponseNonNullableFields>;
|
|
4783
|
+
}
|
|
4784
|
+
declare const onDataItemCreated$1: EventDefinition$3<DataItemCreatedEnvelope, "wix.data.v2.data_item_created">;
|
|
4785
|
+
declare const onDataItemUpdated$1: EventDefinition$3<DataItemUpdatedEnvelope, "wix.data.v2.data_item_updated">;
|
|
4786
|
+
declare const onDataItemDeleted$1: EventDefinition$3<DataItemDeletedEnvelope, "wix.data.v2.data_item_deleted">;
|
|
6190
4787
|
|
|
6191
|
-
type
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
4788
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
4789
|
+
__type: 'event-definition';
|
|
4790
|
+
type: Type;
|
|
4791
|
+
isDomainEvent?: boolean;
|
|
4792
|
+
transformations?: (envelope: unknown) => Payload;
|
|
4793
|
+
__payload: Payload;
|
|
4794
|
+
};
|
|
4795
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
4796
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
4797
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
6198
4798
|
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
4799
|
+
declare global {
|
|
4800
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4801
|
+
interface SymbolConstructor {
|
|
4802
|
+
readonly observable: symbol;
|
|
4803
|
+
}
|
|
6204
4804
|
}
|
|
6205
4805
|
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
>;
|
|
4806
|
+
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
4807
|
+
|
|
4808
|
+
declare const insertDataItem: MaybeContext<BuildRESTFunction<typeof insertDataItem$1> & typeof insertDataItem$1>;
|
|
4809
|
+
declare const updateDataItem: MaybeContext<BuildRESTFunction<typeof updateDataItem$1> & typeof updateDataItem$1>;
|
|
4810
|
+
declare const saveDataItem: MaybeContext<BuildRESTFunction<typeof saveDataItem$1> & typeof saveDataItem$1>;
|
|
4811
|
+
declare const getDataItem: MaybeContext<BuildRESTFunction<typeof getDataItem$1> & typeof getDataItem$1>;
|
|
4812
|
+
declare const removeDataItem: MaybeContext<BuildRESTFunction<typeof removeDataItem$1> & typeof removeDataItem$1>;
|
|
4813
|
+
declare const truncateDataItems: MaybeContext<BuildRESTFunction<typeof truncateDataItems$1> & typeof truncateDataItems$1>;
|
|
4814
|
+
declare const queryDataItems: MaybeContext<BuildRESTFunction<typeof queryDataItems$1> & typeof queryDataItems$1>;
|
|
4815
|
+
declare const aggregateDataItems: MaybeContext<BuildRESTFunction<typeof aggregateDataItems$1> & typeof aggregateDataItems$1>;
|
|
4816
|
+
declare const countDataItems: MaybeContext<BuildRESTFunction<typeof countDataItems$1> & typeof countDataItems$1>;
|
|
4817
|
+
declare const queryDistinctValues: MaybeContext<BuildRESTFunction<typeof queryDistinctValues$1> & typeof queryDistinctValues$1>;
|
|
4818
|
+
declare const bulkInsertDataItems: MaybeContext<BuildRESTFunction<typeof bulkInsertDataItems$1> & typeof bulkInsertDataItems$1>;
|
|
4819
|
+
declare const bulkUpdateDataItems: MaybeContext<BuildRESTFunction<typeof bulkUpdateDataItems$1> & typeof bulkUpdateDataItems$1>;
|
|
4820
|
+
declare const bulkSaveDataItems: MaybeContext<BuildRESTFunction<typeof bulkSaveDataItems$1> & typeof bulkSaveDataItems$1>;
|
|
4821
|
+
declare const bulkRemoveDataItems: MaybeContext<BuildRESTFunction<typeof bulkRemoveDataItems$1> & typeof bulkRemoveDataItems$1>;
|
|
4822
|
+
declare const queryReferencedDataItems: MaybeContext<BuildRESTFunction<typeof queryReferencedDataItems$1> & typeof queryReferencedDataItems$1>;
|
|
4823
|
+
declare const isReferencedDataItem: MaybeContext<BuildRESTFunction<typeof isReferencedDataItem$1> & typeof isReferencedDataItem$1>;
|
|
4824
|
+
declare const insertDataItemReference: MaybeContext<BuildRESTFunction<typeof insertDataItemReference$1> & typeof insertDataItemReference$1>;
|
|
4825
|
+
declare const removeDataItemReference: MaybeContext<BuildRESTFunction<typeof removeDataItemReference$1> & typeof removeDataItemReference$1>;
|
|
4826
|
+
declare const bulkInsertDataItemReferences: MaybeContext<BuildRESTFunction<typeof bulkInsertDataItemReferences$1> & typeof bulkInsertDataItemReferences$1>;
|
|
4827
|
+
declare const bulkRemoveDataItemReferences: MaybeContext<BuildRESTFunction<typeof bulkRemoveDataItemReferences$1> & typeof bulkRemoveDataItemReferences$1>;
|
|
4828
|
+
declare const replaceDataItemReferences: MaybeContext<BuildRESTFunction<typeof replaceDataItemReferences$1> & typeof replaceDataItemReferences$1>;
|
|
6216
4829
|
|
|
4830
|
+
type _publicOnDataItemCreatedType = typeof onDataItemCreated$1;
|
|
6217
4831
|
/**
|
|
6218
|
-
*
|
|
6219
|
-
* can either be a REST module or a host module.
|
|
6220
|
-
* This type is recursive, so it can describe nested modules.
|
|
4832
|
+
* Triggered when a data item is inserted.
|
|
6221
4833
|
*/
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
|
|
4834
|
+
declare const onDataItemCreated: ReturnType<typeof createEventModule<_publicOnDataItemCreatedType>>;
|
|
4835
|
+
|
|
4836
|
+
type _publicOnDataItemUpdatedType = typeof onDataItemUpdated$1;
|
|
6225
4837
|
/**
|
|
6226
|
-
*
|
|
6227
|
-
*
|
|
6228
|
-
*
|
|
6229
|
-
* do not match the given host (as they will not work with the given host).
|
|
4838
|
+
* Triggered when a data item is updated.
|
|
4839
|
+
*
|
|
4840
|
+
* **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
4841
|
*/
|
|
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
|
-
};
|
|
4842
|
+
declare const onDataItemUpdated: ReturnType<typeof createEventModule<_publicOnDataItemUpdatedType>>;
|
|
6250
4843
|
|
|
6251
|
-
|
|
6252
|
-
interface ContextualClient {
|
|
6253
|
-
}
|
|
6254
|
-
}
|
|
4844
|
+
type _publicOnDataItemDeletedType = typeof onDataItemDeleted$1;
|
|
6255
4845
|
/**
|
|
6256
|
-
*
|
|
6257
|
-
* case a contextual client is available.
|
|
4846
|
+
* Triggered when a data item is deleted.
|
|
6258
4847
|
*/
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
4848
|
+
declare const onDataItemDeleted: ReturnType<typeof createEventModule<_publicOnDataItemDeletedType>>;
|
|
4849
|
+
|
|
4850
|
+
type index_d$1_ACTION = ACTION;
|
|
4851
|
+
declare const index_d$1_ACTION: typeof ACTION;
|
|
4852
|
+
type index_d$1_Action = Action;
|
|
4853
|
+
declare const index_d$1_Action: typeof Action;
|
|
4854
|
+
type index_d$1_ActionEvent = ActionEvent;
|
|
4855
|
+
type index_d$1_AggregateDataItemsOptions = AggregateDataItemsOptions;
|
|
4856
|
+
type index_d$1_AggregateDataItemsRequest = AggregateDataItemsRequest;
|
|
4857
|
+
type index_d$1_AggregateDataItemsRequestPagingMethodOneOf = AggregateDataItemsRequestPagingMethodOneOf;
|
|
4858
|
+
type index_d$1_AggregateDataItemsResponse = AggregateDataItemsResponse;
|
|
4859
|
+
type index_d$1_Aggregation = Aggregation;
|
|
4860
|
+
type index_d$1_AppendToArray = AppendToArray;
|
|
4861
|
+
type index_d$1_ApplicationError = ApplicationError;
|
|
4862
|
+
type index_d$1_Average = Average;
|
|
4863
|
+
type index_d$1_BaseEventMetadata = BaseEventMetadata;
|
|
4864
|
+
type index_d$1_BulkActionMetadata = BulkActionMetadata;
|
|
4865
|
+
type index_d$1_BulkActionType = BulkActionType;
|
|
4866
|
+
declare const index_d$1_BulkActionType: typeof BulkActionType;
|
|
4867
|
+
type index_d$1_BulkDataItemReferenceResult = BulkDataItemReferenceResult;
|
|
4868
|
+
type index_d$1_BulkDataItemResult = BulkDataItemResult;
|
|
4869
|
+
type index_d$1_BulkInsertDataItemReferencesOptions = BulkInsertDataItemReferencesOptions;
|
|
4870
|
+
type index_d$1_BulkInsertDataItemReferencesRequest = BulkInsertDataItemReferencesRequest;
|
|
4871
|
+
type index_d$1_BulkInsertDataItemReferencesResponse = BulkInsertDataItemReferencesResponse;
|
|
4872
|
+
type index_d$1_BulkInsertDataItemReferencesResponseNonNullableFields = BulkInsertDataItemReferencesResponseNonNullableFields;
|
|
4873
|
+
type index_d$1_BulkInsertDataItemsOptions = BulkInsertDataItemsOptions;
|
|
4874
|
+
type index_d$1_BulkInsertDataItemsRequest = BulkInsertDataItemsRequest;
|
|
4875
|
+
type index_d$1_BulkInsertDataItemsResponse = BulkInsertDataItemsResponse;
|
|
4876
|
+
type index_d$1_BulkInsertDataItemsResponseNonNullableFields = BulkInsertDataItemsResponseNonNullableFields;
|
|
4877
|
+
type index_d$1_BulkPatchDataItemsRequest = BulkPatchDataItemsRequest;
|
|
4878
|
+
type index_d$1_BulkPatchDataItemsResponse = BulkPatchDataItemsResponse;
|
|
4879
|
+
type index_d$1_BulkRemoveDataItemReferencesOptions = BulkRemoveDataItemReferencesOptions;
|
|
4880
|
+
type index_d$1_BulkRemoveDataItemReferencesRequest = BulkRemoveDataItemReferencesRequest;
|
|
4881
|
+
type index_d$1_BulkRemoveDataItemReferencesResponse = BulkRemoveDataItemReferencesResponse;
|
|
4882
|
+
type index_d$1_BulkRemoveDataItemReferencesResponseNonNullableFields = BulkRemoveDataItemReferencesResponseNonNullableFields;
|
|
4883
|
+
type index_d$1_BulkRemoveDataItemsOptions = BulkRemoveDataItemsOptions;
|
|
4884
|
+
type index_d$1_BulkRemoveDataItemsRequest = BulkRemoveDataItemsRequest;
|
|
4885
|
+
type index_d$1_BulkRemoveDataItemsResponse = BulkRemoveDataItemsResponse;
|
|
4886
|
+
type index_d$1_BulkRemoveDataItemsResponseNonNullableFields = BulkRemoveDataItemsResponseNonNullableFields;
|
|
4887
|
+
type index_d$1_BulkSaveDataItemsOptions = BulkSaveDataItemsOptions;
|
|
4888
|
+
type index_d$1_BulkSaveDataItemsRequest = BulkSaveDataItemsRequest;
|
|
4889
|
+
type index_d$1_BulkSaveDataItemsResponse = BulkSaveDataItemsResponse;
|
|
4890
|
+
type index_d$1_BulkSaveDataItemsResponseNonNullableFields = BulkSaveDataItemsResponseNonNullableFields;
|
|
4891
|
+
type index_d$1_BulkUpdateDataItemsOptions = BulkUpdateDataItemsOptions;
|
|
4892
|
+
type index_d$1_BulkUpdateDataItemsRequest = BulkUpdateDataItemsRequest;
|
|
4893
|
+
type index_d$1_BulkUpdateDataItemsResponse = BulkUpdateDataItemsResponse;
|
|
4894
|
+
type index_d$1_BulkUpdateDataItemsResponseNonNullableFields = BulkUpdateDataItemsResponseNonNullableFields;
|
|
4895
|
+
type index_d$1_CachingInfo = CachingInfo;
|
|
4896
|
+
type index_d$1_Count = Count;
|
|
4897
|
+
type index_d$1_CountDataItemsOptions = CountDataItemsOptions;
|
|
4898
|
+
type index_d$1_CountDataItemsRequest = CountDataItemsRequest;
|
|
4899
|
+
type index_d$1_CountDataItemsResponse = CountDataItemsResponse;
|
|
4900
|
+
type index_d$1_CountDataItemsResponseNonNullableFields = CountDataItemsResponseNonNullableFields;
|
|
4901
|
+
type index_d$1_CursorPaging = CursorPaging;
|
|
4902
|
+
type index_d$1_Cursors = Cursors;
|
|
4903
|
+
type index_d$1_DataItem = DataItem;
|
|
4904
|
+
type index_d$1_DataItemCreatedEnvelope = DataItemCreatedEnvelope;
|
|
4905
|
+
type index_d$1_DataItemDeletedEnvelope = DataItemDeletedEnvelope;
|
|
4906
|
+
type index_d$1_DataItemNonNullableFields = DataItemNonNullableFields;
|
|
4907
|
+
type index_d$1_DataItemReference = DataItemReference;
|
|
4908
|
+
type index_d$1_DataItemUpdatedEnvelope = DataItemUpdatedEnvelope;
|
|
4909
|
+
type index_d$1_DataItemsQueryBuilder = DataItemsQueryBuilder;
|
|
4910
|
+
type index_d$1_DataItemsQueryResult = DataItemsQueryResult;
|
|
4911
|
+
type index_d$1_DataPublishPluginOptions = DataPublishPluginOptions;
|
|
4912
|
+
type index_d$1_DomainEvent = DomainEvent;
|
|
4913
|
+
type index_d$1_DomainEventBodyOneOf = DomainEventBodyOneOf;
|
|
4914
|
+
type index_d$1_EntityCreatedEvent = EntityCreatedEvent;
|
|
4915
|
+
type index_d$1_EntityDeletedEvent = EntityDeletedEvent;
|
|
4916
|
+
type index_d$1_EntityUpdatedEvent = EntityUpdatedEvent;
|
|
4917
|
+
type index_d$1_EventMetadata = EventMetadata;
|
|
4918
|
+
type index_d$1_FieldUpdate = FieldUpdate;
|
|
4919
|
+
type index_d$1_FieldUpdateActionOptionsOneOf = FieldUpdateActionOptionsOneOf;
|
|
4920
|
+
type index_d$1_GetDataItemOptions = GetDataItemOptions;
|
|
4921
|
+
type index_d$1_GetDataItemRequest = GetDataItemRequest;
|
|
4922
|
+
type index_d$1_GetDataItemResponse = GetDataItemResponse;
|
|
4923
|
+
type index_d$1_GetDataItemResponseNonNullableFields = GetDataItemResponseNonNullableFields;
|
|
4924
|
+
type index_d$1_IdentificationData = IdentificationData;
|
|
4925
|
+
type index_d$1_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
|
|
4926
|
+
type index_d$1_IncrementField = IncrementField;
|
|
4927
|
+
type index_d$1_InsertDataItemOptions = InsertDataItemOptions;
|
|
4928
|
+
type index_d$1_InsertDataItemReferenceOptions = InsertDataItemReferenceOptions;
|
|
4929
|
+
type index_d$1_InsertDataItemReferenceRequest = InsertDataItemReferenceRequest;
|
|
4930
|
+
type index_d$1_InsertDataItemReferenceResponse = InsertDataItemReferenceResponse;
|
|
4931
|
+
type index_d$1_InsertDataItemReferenceResponseNonNullableFields = InsertDataItemReferenceResponseNonNullableFields;
|
|
4932
|
+
type index_d$1_InsertDataItemRequest = InsertDataItemRequest;
|
|
4933
|
+
type index_d$1_InsertDataItemResponse = InsertDataItemResponse;
|
|
4934
|
+
type index_d$1_InsertDataItemResponseNonNullableFields = InsertDataItemResponseNonNullableFields;
|
|
4935
|
+
type index_d$1_IsReferencedDataItemOptions = IsReferencedDataItemOptions;
|
|
4936
|
+
type index_d$1_IsReferencedDataItemRequest = IsReferencedDataItemRequest;
|
|
4937
|
+
type index_d$1_IsReferencedDataItemResponse = IsReferencedDataItemResponse;
|
|
4938
|
+
type index_d$1_IsReferencedDataItemResponseNonNullableFields = IsReferencedDataItemResponseNonNullableFields;
|
|
4939
|
+
type index_d$1_ItemMetadata = ItemMetadata;
|
|
4940
|
+
type index_d$1_Max = Max;
|
|
4941
|
+
type index_d$1_MessageEnvelope = MessageEnvelope;
|
|
4942
|
+
type index_d$1_Min = Min;
|
|
4943
|
+
type index_d$1_Operation = Operation;
|
|
4944
|
+
type index_d$1_OperationCalculateOneOf = OperationCalculateOneOf;
|
|
4945
|
+
type index_d$1_Options = Options;
|
|
4946
|
+
type index_d$1_PagingMetadataV2 = PagingMetadataV2;
|
|
4947
|
+
type index_d$1_PatchDataItemRequest = PatchDataItemRequest;
|
|
4948
|
+
type index_d$1_PatchDataItemResponse = PatchDataItemResponse;
|
|
4949
|
+
type index_d$1_PatchSet = PatchSet;
|
|
4950
|
+
type index_d$1_PublishPluginOptions = PublishPluginOptions;
|
|
4951
|
+
type index_d$1_QueryDataItemsOptions = QueryDataItemsOptions;
|
|
4952
|
+
type index_d$1_QueryDataItemsRequest = QueryDataItemsRequest;
|
|
4953
|
+
type index_d$1_QueryDataItemsResponse = QueryDataItemsResponse;
|
|
4954
|
+
type index_d$1_QueryDataItemsResponseNonNullableFields = QueryDataItemsResponseNonNullableFields;
|
|
4955
|
+
type index_d$1_QueryDistinctValuesOptions = QueryDistinctValuesOptions;
|
|
4956
|
+
type index_d$1_QueryDistinctValuesRequest = QueryDistinctValuesRequest;
|
|
4957
|
+
type index_d$1_QueryDistinctValuesRequestPagingMethodOneOf = QueryDistinctValuesRequestPagingMethodOneOf;
|
|
4958
|
+
type index_d$1_QueryDistinctValuesResponse = QueryDistinctValuesResponse;
|
|
4959
|
+
type index_d$1_QueryReferencedDataItemsOptions = QueryReferencedDataItemsOptions;
|
|
4960
|
+
type index_d$1_QueryReferencedDataItemsRequest = QueryReferencedDataItemsRequest;
|
|
4961
|
+
type index_d$1_QueryReferencedDataItemsRequestPagingMethodOneOf = QueryReferencedDataItemsRequestPagingMethodOneOf;
|
|
4962
|
+
type index_d$1_QueryReferencedDataItemsResponse = QueryReferencedDataItemsResponse;
|
|
4963
|
+
type index_d$1_QueryReferencedDataItemsResponseNonNullableFields = QueryReferencedDataItemsResponseNonNullableFields;
|
|
4964
|
+
type index_d$1_QueryV2 = QueryV2;
|
|
4965
|
+
type index_d$1_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf;
|
|
4966
|
+
type index_d$1_ReferencedItemOptions = ReferencedItemOptions;
|
|
4967
|
+
type index_d$1_ReferencedResult = ReferencedResult;
|
|
4968
|
+
type index_d$1_ReferencedResultEntityOneOf = ReferencedResultEntityOneOf;
|
|
4969
|
+
type index_d$1_RemoveDataItemOptions = RemoveDataItemOptions;
|
|
4970
|
+
type index_d$1_RemoveDataItemReferenceOptions = RemoveDataItemReferenceOptions;
|
|
4971
|
+
type index_d$1_RemoveDataItemReferenceRequest = RemoveDataItemReferenceRequest;
|
|
4972
|
+
type index_d$1_RemoveDataItemReferenceResponse = RemoveDataItemReferenceResponse;
|
|
4973
|
+
type index_d$1_RemoveDataItemReferenceResponseNonNullableFields = RemoveDataItemReferenceResponseNonNullableFields;
|
|
4974
|
+
type index_d$1_RemoveDataItemRequest = RemoveDataItemRequest;
|
|
4975
|
+
type index_d$1_RemoveDataItemResponse = RemoveDataItemResponse;
|
|
4976
|
+
type index_d$1_RemoveDataItemResponseNonNullableFields = RemoveDataItemResponseNonNullableFields;
|
|
4977
|
+
type index_d$1_RemoveFromArray = RemoveFromArray;
|
|
4978
|
+
type index_d$1_ReplaceDataItemReferencesOptions = ReplaceDataItemReferencesOptions;
|
|
4979
|
+
type index_d$1_ReplaceDataItemReferencesRequest = ReplaceDataItemReferencesRequest;
|
|
4980
|
+
type index_d$1_ReplaceDataItemReferencesResponse = ReplaceDataItemReferencesResponse;
|
|
4981
|
+
type index_d$1_ReplaceDataItemReferencesResponseNonNullableFields = ReplaceDataItemReferencesResponseNonNullableFields;
|
|
4982
|
+
type index_d$1_RestoreInfo = RestoreInfo;
|
|
4983
|
+
type index_d$1_SaveDataItemOptions = SaveDataItemOptions;
|
|
4984
|
+
type index_d$1_SaveDataItemRequest = SaveDataItemRequest;
|
|
4985
|
+
type index_d$1_SaveDataItemResponse = SaveDataItemResponse;
|
|
4986
|
+
type index_d$1_SaveDataItemResponseNonNullableFields = SaveDataItemResponseNonNullableFields;
|
|
4987
|
+
type index_d$1_SetField = SetField;
|
|
4988
|
+
type index_d$1_SortOrder = SortOrder;
|
|
4989
|
+
declare const index_d$1_SortOrder: typeof SortOrder;
|
|
4990
|
+
type index_d$1_Sorting = Sorting;
|
|
4991
|
+
type index_d$1_Sum = Sum;
|
|
4992
|
+
type index_d$1_TruncateDataItemsOptions = TruncateDataItemsOptions;
|
|
4993
|
+
type index_d$1_TruncateDataItemsRequest = TruncateDataItemsRequest;
|
|
4994
|
+
type index_d$1_TruncateDataItemsResponse = TruncateDataItemsResponse;
|
|
4995
|
+
type index_d$1_UnresolvedReference = UnresolvedReference;
|
|
4996
|
+
type index_d$1_UpdateDataItemOptions = UpdateDataItemOptions;
|
|
4997
|
+
type index_d$1_UpdateDataItemRequest = UpdateDataItemRequest;
|
|
4998
|
+
type index_d$1_UpdateDataItemResponse = UpdateDataItemResponse;
|
|
4999
|
+
type index_d$1_UpdateDataItemResponseNonNullableFields = UpdateDataItemResponseNonNullableFields;
|
|
5000
|
+
type index_d$1_WebhookIdentityType = WebhookIdentityType;
|
|
5001
|
+
declare const index_d$1_WebhookIdentityType: typeof WebhookIdentityType;
|
|
5002
|
+
type index_d$1__publicOnDataItemCreatedType = _publicOnDataItemCreatedType;
|
|
5003
|
+
type index_d$1__publicOnDataItemDeletedType = _publicOnDataItemDeletedType;
|
|
5004
|
+
type index_d$1__publicOnDataItemUpdatedType = _publicOnDataItemUpdatedType;
|
|
5005
|
+
declare const index_d$1_aggregateDataItems: typeof aggregateDataItems;
|
|
5006
|
+
declare const index_d$1_bulkInsertDataItemReferences: typeof bulkInsertDataItemReferences;
|
|
5007
|
+
declare const index_d$1_bulkInsertDataItems: typeof bulkInsertDataItems;
|
|
5008
|
+
declare const index_d$1_bulkRemoveDataItemReferences: typeof bulkRemoveDataItemReferences;
|
|
5009
|
+
declare const index_d$1_bulkRemoveDataItems: typeof bulkRemoveDataItems;
|
|
5010
|
+
declare const index_d$1_bulkSaveDataItems: typeof bulkSaveDataItems;
|
|
5011
|
+
declare const index_d$1_bulkUpdateDataItems: typeof bulkUpdateDataItems;
|
|
5012
|
+
declare const index_d$1_countDataItems: typeof countDataItems;
|
|
5013
|
+
declare const index_d$1_getDataItem: typeof getDataItem;
|
|
5014
|
+
declare const index_d$1_insertDataItem: typeof insertDataItem;
|
|
5015
|
+
declare const index_d$1_insertDataItemReference: typeof insertDataItemReference;
|
|
5016
|
+
declare const index_d$1_isReferencedDataItem: typeof isReferencedDataItem;
|
|
5017
|
+
declare const index_d$1_onDataItemCreated: typeof onDataItemCreated;
|
|
5018
|
+
declare const index_d$1_onDataItemDeleted: typeof onDataItemDeleted;
|
|
5019
|
+
declare const index_d$1_onDataItemUpdated: typeof onDataItemUpdated;
|
|
5020
|
+
declare const index_d$1_queryDataItems: typeof queryDataItems;
|
|
5021
|
+
declare const index_d$1_queryDistinctValues: typeof queryDistinctValues;
|
|
5022
|
+
declare const index_d$1_queryReferencedDataItems: typeof queryReferencedDataItems;
|
|
5023
|
+
declare const index_d$1_removeDataItem: typeof removeDataItem;
|
|
5024
|
+
declare const index_d$1_removeDataItemReference: typeof removeDataItemReference;
|
|
5025
|
+
declare const index_d$1_replaceDataItemReferences: typeof replaceDataItemReferences;
|
|
5026
|
+
declare const index_d$1_saveDataItem: typeof saveDataItem;
|
|
5027
|
+
declare const index_d$1_truncateDataItems: typeof truncateDataItems;
|
|
5028
|
+
declare const index_d$1_updateDataItem: typeof updateDataItem;
|
|
5029
|
+
declare namespace index_d$1 {
|
|
5030
|
+
export { index_d$1_ACTION as ACTION, index_d$1_Action as Action, type index_d$1_ActionEvent as ActionEvent, type index_d$1_AggregateDataItemsOptions as AggregateDataItemsOptions, type index_d$1_AggregateDataItemsRequest as AggregateDataItemsRequest, type index_d$1_AggregateDataItemsRequestPagingMethodOneOf as AggregateDataItemsRequestPagingMethodOneOf, type index_d$1_AggregateDataItemsResponse as AggregateDataItemsResponse, type index_d$1_Aggregation as Aggregation, type index_d$1_AppendToArray as AppendToArray, type index_d$1_ApplicationError as ApplicationError, type index_d$1_Average as Average, type index_d$1_BaseEventMetadata as BaseEventMetadata, type index_d$1_BulkActionMetadata as BulkActionMetadata, index_d$1_BulkActionType as BulkActionType, type index_d$1_BulkDataItemReferenceResult as BulkDataItemReferenceResult, type index_d$1_BulkDataItemResult as BulkDataItemResult, type index_d$1_BulkInsertDataItemReferencesOptions as BulkInsertDataItemReferencesOptions, type index_d$1_BulkInsertDataItemReferencesRequest as BulkInsertDataItemReferencesRequest, type index_d$1_BulkInsertDataItemReferencesResponse as BulkInsertDataItemReferencesResponse, type index_d$1_BulkInsertDataItemReferencesResponseNonNullableFields as BulkInsertDataItemReferencesResponseNonNullableFields, type index_d$1_BulkInsertDataItemsOptions as BulkInsertDataItemsOptions, type index_d$1_BulkInsertDataItemsRequest as BulkInsertDataItemsRequest, type index_d$1_BulkInsertDataItemsResponse as BulkInsertDataItemsResponse, type index_d$1_BulkInsertDataItemsResponseNonNullableFields as BulkInsertDataItemsResponseNonNullableFields, type index_d$1_BulkPatchDataItemsRequest as BulkPatchDataItemsRequest, type index_d$1_BulkPatchDataItemsResponse as BulkPatchDataItemsResponse, type index_d$1_BulkRemoveDataItemReferencesOptions as BulkRemoveDataItemReferencesOptions, type index_d$1_BulkRemoveDataItemReferencesRequest as BulkRemoveDataItemReferencesRequest, type index_d$1_BulkRemoveDataItemReferencesResponse as BulkRemoveDataItemReferencesResponse, type index_d$1_BulkRemoveDataItemReferencesResponseNonNullableFields as BulkRemoveDataItemReferencesResponseNonNullableFields, type index_d$1_BulkRemoveDataItemsOptions as BulkRemoveDataItemsOptions, type index_d$1_BulkRemoveDataItemsRequest as BulkRemoveDataItemsRequest, type index_d$1_BulkRemoveDataItemsResponse as BulkRemoveDataItemsResponse, type index_d$1_BulkRemoveDataItemsResponseNonNullableFields as BulkRemoveDataItemsResponseNonNullableFields, type index_d$1_BulkSaveDataItemsOptions as BulkSaveDataItemsOptions, type index_d$1_BulkSaveDataItemsRequest as BulkSaveDataItemsRequest, type index_d$1_BulkSaveDataItemsResponse as BulkSaveDataItemsResponse, type index_d$1_BulkSaveDataItemsResponseNonNullableFields as BulkSaveDataItemsResponseNonNullableFields, type index_d$1_BulkUpdateDataItemsOptions as BulkUpdateDataItemsOptions, type index_d$1_BulkUpdateDataItemsRequest as BulkUpdateDataItemsRequest, type index_d$1_BulkUpdateDataItemsResponse as BulkUpdateDataItemsResponse, type index_d$1_BulkUpdateDataItemsResponseNonNullableFields as BulkUpdateDataItemsResponseNonNullableFields, type index_d$1_CachingInfo as CachingInfo, type index_d$1_Count as Count, type index_d$1_CountDataItemsOptions as CountDataItemsOptions, type index_d$1_CountDataItemsRequest as CountDataItemsRequest, type index_d$1_CountDataItemsResponse as CountDataItemsResponse, type index_d$1_CountDataItemsResponseNonNullableFields as CountDataItemsResponseNonNullableFields, type index_d$1_CursorPaging as CursorPaging, type index_d$1_Cursors as Cursors, type index_d$1_DataItem as DataItem, type index_d$1_DataItemCreatedEnvelope as DataItemCreatedEnvelope, type index_d$1_DataItemDeletedEnvelope as DataItemDeletedEnvelope, type index_d$1_DataItemNonNullableFields as DataItemNonNullableFields, type index_d$1_DataItemReference as DataItemReference, type index_d$1_DataItemUpdatedEnvelope as DataItemUpdatedEnvelope, type index_d$1_DataItemsQueryBuilder as DataItemsQueryBuilder, type index_d$1_DataItemsQueryResult as DataItemsQueryResult, type index_d$1_DataPublishPluginOptions as DataPublishPluginOptions, type index_d$1_DomainEvent as DomainEvent, type index_d$1_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d$1_EntityCreatedEvent as EntityCreatedEvent, type index_d$1_EntityDeletedEvent as EntityDeletedEvent, type index_d$1_EntityUpdatedEvent as EntityUpdatedEvent, Environment$1 as Environment, type index_d$1_EventMetadata as EventMetadata, type index_d$1_FieldUpdate as FieldUpdate, type index_d$1_FieldUpdateActionOptionsOneOf as FieldUpdateActionOptionsOneOf, type index_d$1_GetDataItemOptions as GetDataItemOptions, type index_d$1_GetDataItemRequest as GetDataItemRequest, type index_d$1_GetDataItemResponse as GetDataItemResponse, type index_d$1_GetDataItemResponseNonNullableFields as GetDataItemResponseNonNullableFields, type index_d$1_IdentificationData as IdentificationData, type index_d$1_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d$1_IncrementField as IncrementField, type index_d$1_InsertDataItemOptions as InsertDataItemOptions, type index_d$1_InsertDataItemReferenceOptions as InsertDataItemReferenceOptions, type index_d$1_InsertDataItemReferenceRequest as InsertDataItemReferenceRequest, type index_d$1_InsertDataItemReferenceResponse as InsertDataItemReferenceResponse, type index_d$1_InsertDataItemReferenceResponseNonNullableFields as InsertDataItemReferenceResponseNonNullableFields, type index_d$1_InsertDataItemRequest as InsertDataItemRequest, type index_d$1_InsertDataItemResponse as InsertDataItemResponse, type index_d$1_InsertDataItemResponseNonNullableFields as InsertDataItemResponseNonNullableFields, type index_d$1_IsReferencedDataItemOptions as IsReferencedDataItemOptions, type index_d$1_IsReferencedDataItemRequest as IsReferencedDataItemRequest, type index_d$1_IsReferencedDataItemResponse as IsReferencedDataItemResponse, type index_d$1_IsReferencedDataItemResponseNonNullableFields as IsReferencedDataItemResponseNonNullableFields, type index_d$1_ItemMetadata as ItemMetadata, type index_d$1_Max as Max, type index_d$1_MessageEnvelope as MessageEnvelope, type index_d$1_Min as Min, type index_d$1_Operation as Operation, type index_d$1_OperationCalculateOneOf as OperationCalculateOneOf, type index_d$1_Options as Options, type Paging$1 as Paging, type index_d$1_PagingMetadataV2 as PagingMetadataV2, type index_d$1_PatchDataItemRequest as PatchDataItemRequest, type index_d$1_PatchDataItemResponse as PatchDataItemResponse, type index_d$1_PatchSet as PatchSet, type index_d$1_PublishPluginOptions as PublishPluginOptions, type index_d$1_QueryDataItemsOptions as QueryDataItemsOptions, type index_d$1_QueryDataItemsRequest as QueryDataItemsRequest, type index_d$1_QueryDataItemsResponse as QueryDataItemsResponse, type index_d$1_QueryDataItemsResponseNonNullableFields as QueryDataItemsResponseNonNullableFields, type index_d$1_QueryDistinctValuesOptions as QueryDistinctValuesOptions, type index_d$1_QueryDistinctValuesRequest as QueryDistinctValuesRequest, type index_d$1_QueryDistinctValuesRequestPagingMethodOneOf as QueryDistinctValuesRequestPagingMethodOneOf, type index_d$1_QueryDistinctValuesResponse as QueryDistinctValuesResponse, type index_d$1_QueryReferencedDataItemsOptions as QueryReferencedDataItemsOptions, type index_d$1_QueryReferencedDataItemsRequest as QueryReferencedDataItemsRequest, type index_d$1_QueryReferencedDataItemsRequestPagingMethodOneOf as QueryReferencedDataItemsRequestPagingMethodOneOf, type index_d$1_QueryReferencedDataItemsResponse as QueryReferencedDataItemsResponse, type index_d$1_QueryReferencedDataItemsResponseNonNullableFields as QueryReferencedDataItemsResponseNonNullableFields, type index_d$1_QueryV2 as QueryV2, type index_d$1_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type index_d$1_ReferencedItemOptions as ReferencedItemOptions, type index_d$1_ReferencedResult as ReferencedResult, type index_d$1_ReferencedResultEntityOneOf as ReferencedResultEntityOneOf, type index_d$1_RemoveDataItemOptions as RemoveDataItemOptions, type index_d$1_RemoveDataItemReferenceOptions as RemoveDataItemReferenceOptions, type index_d$1_RemoveDataItemReferenceRequest as RemoveDataItemReferenceRequest, type index_d$1_RemoveDataItemReferenceResponse as RemoveDataItemReferenceResponse, type index_d$1_RemoveDataItemReferenceResponseNonNullableFields as RemoveDataItemReferenceResponseNonNullableFields, type index_d$1_RemoveDataItemRequest as RemoveDataItemRequest, type index_d$1_RemoveDataItemResponse as RemoveDataItemResponse, type index_d$1_RemoveDataItemResponseNonNullableFields as RemoveDataItemResponseNonNullableFields, type index_d$1_RemoveFromArray as RemoveFromArray, type index_d$1_ReplaceDataItemReferencesOptions as ReplaceDataItemReferencesOptions, type index_d$1_ReplaceDataItemReferencesRequest as ReplaceDataItemReferencesRequest, type index_d$1_ReplaceDataItemReferencesResponse as ReplaceDataItemReferencesResponse, type index_d$1_ReplaceDataItemReferencesResponseNonNullableFields as ReplaceDataItemReferencesResponseNonNullableFields, type index_d$1_RestoreInfo as RestoreInfo, type index_d$1_SaveDataItemOptions as SaveDataItemOptions, type index_d$1_SaveDataItemRequest as SaveDataItemRequest, type index_d$1_SaveDataItemResponse as SaveDataItemResponse, type index_d$1_SaveDataItemResponseNonNullableFields as SaveDataItemResponseNonNullableFields, type index_d$1_SetField as SetField, index_d$1_SortOrder as SortOrder, type index_d$1_Sorting as Sorting, type index_d$1_Sum as Sum, type index_d$1_TruncateDataItemsOptions as TruncateDataItemsOptions, type index_d$1_TruncateDataItemsRequest as TruncateDataItemsRequest, type index_d$1_TruncateDataItemsResponse as TruncateDataItemsResponse, type index_d$1_UnresolvedReference as UnresolvedReference, type index_d$1_UpdateDataItemOptions as UpdateDataItemOptions, type index_d$1_UpdateDataItemRequest as UpdateDataItemRequest, type index_d$1_UpdateDataItemResponse as UpdateDataItemResponse, type index_d$1_UpdateDataItemResponseNonNullableFields as UpdateDataItemResponseNonNullableFields, index_d$1_WebhookIdentityType as WebhookIdentityType, type index_d$1__publicOnDataItemCreatedType as _publicOnDataItemCreatedType, type index_d$1__publicOnDataItemDeletedType as _publicOnDataItemDeletedType, type index_d$1__publicOnDataItemUpdatedType as _publicOnDataItemUpdatedType, index_d$1_aggregateDataItems as aggregateDataItems, index_d$1_bulkInsertDataItemReferences as bulkInsertDataItemReferences, index_d$1_bulkInsertDataItems as bulkInsertDataItems, index_d$1_bulkRemoveDataItemReferences as bulkRemoveDataItemReferences, index_d$1_bulkRemoveDataItems as bulkRemoveDataItems, index_d$1_bulkSaveDataItems as bulkSaveDataItems, index_d$1_bulkUpdateDataItems as bulkUpdateDataItems, index_d$1_countDataItems as countDataItems, index_d$1_getDataItem as getDataItem, index_d$1_insertDataItem as insertDataItem, index_d$1_insertDataItemReference as insertDataItemReference, index_d$1_isReferencedDataItem as isReferencedDataItem, index_d$1_onDataItemCreated as onDataItemCreated, index_d$1_onDataItemDeleted as onDataItemDeleted, index_d$1_onDataItemUpdated as onDataItemUpdated, onDataItemCreated$1 as publicOnDataItemCreated, onDataItemDeleted$1 as publicOnDataItemDeleted, onDataItemUpdated$1 as publicOnDataItemUpdated, index_d$1_queryDataItems as queryDataItems, index_d$1_queryDistinctValues as queryDistinctValues, index_d$1_queryReferencedDataItems as queryReferencedDataItems, index_d$1_removeDataItem as removeDataItem, index_d$1_removeDataItemReference as removeDataItemReference, index_d$1_replaceDataItemReferences as replaceDataItemReferences, index_d$1_saveDataItem as saveDataItem, index_d$1_truncateDataItems as truncateDataItems, index_d$1_updateDataItem as updateDataItem };
|
|
5031
|
+
}
|
|
6262
5032
|
|
|
6263
5033
|
/** An index is a map of a collection's data, organized according to specific fields to increase query speed. */
|
|
6264
5034
|
interface Index {
|