@wix/data 1.0.162 → 1.0.163
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
type HostModule
|
|
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;
|
|
@@ -40,92 +40,92 @@ type Host$3<Environment = unknown> = {
|
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
type RESTFunctionDescriptor
|
|
44
|
-
interface HttpClient
|
|
45
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
43
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
44
|
+
interface HttpClient {
|
|
45
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
46
46
|
fetchWithAuth: typeof fetch;
|
|
47
47
|
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
48
48
|
getActiveToken?: () => string | undefined;
|
|
49
49
|
}
|
|
50
|
-
type RequestOptionsFactory
|
|
51
|
-
type HttpResponse
|
|
50
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
51
|
+
type HttpResponse<T = any> = {
|
|
52
52
|
data: T;
|
|
53
53
|
status: number;
|
|
54
54
|
statusText: string;
|
|
55
55
|
headers: any;
|
|
56
56
|
request?: any;
|
|
57
57
|
};
|
|
58
|
-
type RequestOptions
|
|
58
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
59
59
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
60
60
|
url: string;
|
|
61
61
|
data?: Data;
|
|
62
62
|
params?: URLSearchParams;
|
|
63
|
-
} & APIMetadata
|
|
64
|
-
type APIMetadata
|
|
63
|
+
} & APIMetadata;
|
|
64
|
+
type APIMetadata = {
|
|
65
65
|
methodFqn?: string;
|
|
66
66
|
entityFqdn?: string;
|
|
67
67
|
packageName?: string;
|
|
68
68
|
};
|
|
69
|
-
type BuildRESTFunction
|
|
70
|
-
type EventDefinition
|
|
69
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
70
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
71
71
|
__type: 'event-definition';
|
|
72
72
|
type: Type;
|
|
73
73
|
isDomainEvent?: boolean;
|
|
74
74
|
transformations?: (envelope: unknown) => Payload;
|
|
75
75
|
__payload: Payload;
|
|
76
76
|
};
|
|
77
|
-
declare function EventDefinition
|
|
78
|
-
type EventHandler
|
|
79
|
-
type BuildEventDefinition
|
|
77
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
78
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
79
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
80
80
|
|
|
81
|
-
type ServicePluginMethodInput
|
|
81
|
+
type ServicePluginMethodInput = {
|
|
82
82
|
request: any;
|
|
83
83
|
metadata: any;
|
|
84
84
|
};
|
|
85
|
-
type ServicePluginContract
|
|
86
|
-
type ServicePluginMethodMetadata
|
|
85
|
+
type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
86
|
+
type ServicePluginMethodMetadata = {
|
|
87
87
|
name: string;
|
|
88
88
|
primaryHttpMappingPath: string;
|
|
89
89
|
transformations: {
|
|
90
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput
|
|
90
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput;
|
|
91
91
|
toREST: (...args: unknown[]) => unknown;
|
|
92
92
|
};
|
|
93
93
|
};
|
|
94
|
-
type ServicePluginDefinition
|
|
94
|
+
type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
95
95
|
__type: 'service-plugin-definition';
|
|
96
96
|
componentType: string;
|
|
97
|
-
methods: ServicePluginMethodMetadata
|
|
97
|
+
methods: ServicePluginMethodMetadata[];
|
|
98
98
|
__contract: Contract;
|
|
99
99
|
};
|
|
100
|
-
declare function ServicePluginDefinition
|
|
101
|
-
type BuildServicePluginDefinition
|
|
102
|
-
declare const SERVICE_PLUGIN_ERROR_TYPE
|
|
100
|
+
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
101
|
+
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
102
|
+
declare const SERVICE_PLUGIN_ERROR_TYPE = "wix_spi_error";
|
|
103
103
|
|
|
104
|
-
type RequestContext
|
|
104
|
+
type RequestContext = {
|
|
105
105
|
isSSR: boolean;
|
|
106
106
|
host: string;
|
|
107
107
|
protocol?: string;
|
|
108
108
|
};
|
|
109
|
-
type ResponseTransformer
|
|
109
|
+
type ResponseTransformer = (data: any, headers?: any) => any;
|
|
110
110
|
/**
|
|
111
111
|
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
112
112
|
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
113
113
|
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
114
114
|
*/
|
|
115
|
-
type Method
|
|
116
|
-
type AmbassadorRequestOptions
|
|
115
|
+
type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
116
|
+
type AmbassadorRequestOptions<T = any> = {
|
|
117
117
|
_?: T;
|
|
118
118
|
url?: string;
|
|
119
|
-
method?: Method
|
|
119
|
+
method?: Method;
|
|
120
120
|
params?: any;
|
|
121
121
|
data?: any;
|
|
122
|
-
transformResponse?: ResponseTransformer
|
|
122
|
+
transformResponse?: ResponseTransformer | ResponseTransformer[];
|
|
123
123
|
};
|
|
124
|
-
type AmbassadorFactory
|
|
124
|
+
type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
|
|
125
125
|
__isAmbassador: boolean;
|
|
126
126
|
};
|
|
127
|
-
type AmbassadorFunctionDescriptor
|
|
128
|
-
type BuildAmbassadorFunction
|
|
127
|
+
type AmbassadorFunctionDescriptor<Request = any, Response = any> = AmbassadorFactory<Request, Response>;
|
|
128
|
+
type BuildAmbassadorFunction<T extends AmbassadorFunctionDescriptor> = T extends AmbassadorFunctionDescriptor<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
129
129
|
|
|
130
130
|
declare global {
|
|
131
131
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -134,7 +134,7 @@ declare global {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
declare const emptyObjectSymbol
|
|
137
|
+
declare const emptyObjectSymbol: unique symbol;
|
|
138
138
|
|
|
139
139
|
/**
|
|
140
140
|
Represents a strictly empty plain object, the `{}` value.
|
|
@@ -162,7 +162,7 @@ Unfortunately, `Record<string, never>`, `Record<keyof any, never>` and `Record<n
|
|
|
162
162
|
|
|
163
163
|
@category Object
|
|
164
164
|
*/
|
|
165
|
-
type EmptyObject
|
|
165
|
+
type EmptyObject = {[emptyObjectSymbol]?: never};
|
|
166
166
|
|
|
167
167
|
/**
|
|
168
168
|
Returns a boolean for whether the two given types are equal.
|
|
@@ -190,7 +190,7 @@ type Includes<Value extends readonly any[], Item> =
|
|
|
190
190
|
@category Type Guard
|
|
191
191
|
@category Utilities
|
|
192
192
|
*/
|
|
193
|
-
type IsEqual
|
|
193
|
+
type IsEqual<A, B> =
|
|
194
194
|
(<G>() => G extends A ? 1 : 2) extends
|
|
195
195
|
(<G>() => G extends B ? 1 : 2)
|
|
196
196
|
? true
|
|
@@ -223,9 +223,9 @@ type Filtered = Filter<'bar', 'foo'>;
|
|
|
223
223
|
|
|
224
224
|
@see {Except}
|
|
225
225
|
*/
|
|
226
|
-
type Filter
|
|
226
|
+
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
227
227
|
|
|
228
|
-
type ExceptOptions
|
|
228
|
+
type ExceptOptions = {
|
|
229
229
|
/**
|
|
230
230
|
Disallow assigning non-specified properties.
|
|
231
231
|
|
|
@@ -269,8 +269,8 @@ const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
|
269
269
|
|
|
270
270
|
@category Object
|
|
271
271
|
*/
|
|
272
|
-
type Except
|
|
273
|
-
[KeyType in keyof ObjectType as Filter
|
|
272
|
+
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
|
|
273
|
+
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
274
274
|
} & (Options['requireExactProps'] extends true
|
|
275
275
|
? Partial<Record<KeysType, never>>
|
|
276
276
|
: {});
|
|
@@ -316,7 +316,7 @@ endIfEqual('abc', '123');
|
|
|
316
316
|
@category Type Guard
|
|
317
317
|
@category Utilities
|
|
318
318
|
*/
|
|
319
|
-
type IsNever
|
|
319
|
+
type IsNever<T> = [T] extends [never] ? true : false;
|
|
320
320
|
|
|
321
321
|
/**
|
|
322
322
|
An if-else-like type that resolves depending on whether the given type is `never`.
|
|
@@ -337,8 +337,8 @@ type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
|
|
|
337
337
|
@category Type Guard
|
|
338
338
|
@category Utilities
|
|
339
339
|
*/
|
|
340
|
-
type IfNever
|
|
341
|
-
IsNever
|
|
340
|
+
type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
|
|
341
|
+
IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
|
|
342
342
|
);
|
|
343
343
|
|
|
344
344
|
/**
|
|
@@ -373,7 +373,7 @@ type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
|
373
373
|
|
|
374
374
|
@category Object
|
|
375
375
|
*/
|
|
376
|
-
type ConditionalKeys
|
|
376
|
+
type ConditionalKeys<Base, Condition> =
|
|
377
377
|
{
|
|
378
378
|
// Map through all the keys of the given base type.
|
|
379
379
|
[Key in keyof Base]-?:
|
|
@@ -381,7 +381,7 @@ type ConditionalKeys$3<Base, Condition> =
|
|
|
381
381
|
Base[Key] extends Condition
|
|
382
382
|
// Retain this key
|
|
383
383
|
// If the value for the key extends never, only include it if `Condition` also extends never
|
|
384
|
-
? IfNever
|
|
384
|
+
? IfNever<Base[Key], IfNever<Condition, Key, never>, Key>
|
|
385
385
|
// Discard this key since the condition fails.
|
|
386
386
|
: never;
|
|
387
387
|
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
@@ -425,9 +425,9 @@ type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
|
425
425
|
|
|
426
426
|
@category Object
|
|
427
427
|
*/
|
|
428
|
-
type ConditionalExcept
|
|
428
|
+
type ConditionalExcept<Base, Condition> = Except<
|
|
429
429
|
Base,
|
|
430
|
-
ConditionalKeys
|
|
430
|
+
ConditionalKeys<Base, Condition>
|
|
431
431
|
>;
|
|
432
432
|
|
|
433
433
|
/**
|
|
@@ -435,8 +435,8 @@ ConditionalKeys$3<Base, Condition>
|
|
|
435
435
|
* can either be a REST module or a host module.
|
|
436
436
|
* This type is recursive, so it can describe nested modules.
|
|
437
437
|
*/
|
|
438
|
-
type Descriptors
|
|
439
|
-
[key: string]: Descriptors
|
|
438
|
+
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition<any> | ServicePluginDefinition<any> | {
|
|
439
|
+
[key: string]: Descriptors | PublicMetadata | any;
|
|
440
440
|
};
|
|
441
441
|
/**
|
|
442
442
|
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
@@ -444,12 +444,12 @@ type Descriptors$3 = RESTFunctionDescriptor$3 | AmbassadorFunctionDescriptor$3 |
|
|
|
444
444
|
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
445
445
|
* do not match the given host (as they will not work with the given host).
|
|
446
446
|
*/
|
|
447
|
-
type BuildDescriptors
|
|
447
|
+
type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, Depth extends number = 5> = {
|
|
448
448
|
done: T;
|
|
449
449
|
recurse: T extends {
|
|
450
|
-
__type: typeof SERVICE_PLUGIN_ERROR_TYPE
|
|
451
|
-
} ? never : T extends AmbassadorFunctionDescriptor
|
|
452
|
-
[Key in keyof T]: T[Key] extends Descriptors
|
|
450
|
+
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
451
|
+
} ? 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<{
|
|
452
|
+
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
453
453
|
-1,
|
|
454
454
|
0,
|
|
455
455
|
1,
|
|
@@ -458,9 +458,9 @@ type BuildDescriptors$3<T extends Descriptors$3, H extends Host$3<any> | undefin
|
|
|
458
458
|
4,
|
|
459
459
|
5
|
|
460
460
|
][Depth]> : never;
|
|
461
|
-
}, EmptyObject
|
|
461
|
+
}, EmptyObject>;
|
|
462
462
|
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
463
|
-
type PublicMetadata
|
|
463
|
+
type PublicMetadata = {
|
|
464
464
|
PACKAGE_NAME?: string;
|
|
465
465
|
};
|
|
466
466
|
|
|
@@ -472,9 +472,9 @@ declare global {
|
|
|
472
472
|
* A type used to create concerete types from SDK descriptors in
|
|
473
473
|
* case a contextual client is available.
|
|
474
474
|
*/
|
|
475
|
-
type MaybeContext
|
|
476
|
-
host: Host
|
|
477
|
-
} ? BuildDescriptors
|
|
475
|
+
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
476
|
+
host: Host;
|
|
477
|
+
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
478
478
|
|
|
479
479
|
/** An external database connection defines a connection between an external database and a Wix site or project. */
|
|
480
480
|
interface ExternalDatabaseConnection {
|
|
@@ -807,7 +807,7 @@ interface CreateExternalDatabaseConnectionResponseNonNullableFields {
|
|
|
807
807
|
interface UpdateExternalDatabaseConnectionResponseNonNullableFields {
|
|
808
808
|
externalDatabaseConnection?: ExternalDatabaseConnectionNonNullableFields;
|
|
809
809
|
}
|
|
810
|
-
interface BaseEventMetadata$
|
|
810
|
+
interface BaseEventMetadata$1 {
|
|
811
811
|
/** App instance ID. */
|
|
812
812
|
instanceId?: string | null;
|
|
813
813
|
/** Event type. */
|
|
@@ -815,7 +815,7 @@ interface BaseEventMetadata$2 {
|
|
|
815
815
|
/** The identification type and identity data. */
|
|
816
816
|
identity?: IdentificationData$2;
|
|
817
817
|
}
|
|
818
|
-
interface EventMetadata$
|
|
818
|
+
interface EventMetadata$1 extends BaseEventMetadata$1 {
|
|
819
819
|
/**
|
|
820
820
|
* Unique event ID.
|
|
821
821
|
* Allows clients to ignore duplicate webhooks.
|
|
@@ -855,14 +855,14 @@ interface EventMetadata$2 extends BaseEventMetadata$2 {
|
|
|
855
855
|
}
|
|
856
856
|
interface ExternalDatabaseConnectionCreatedEnvelope {
|
|
857
857
|
entity: ExternalDatabaseConnection;
|
|
858
|
-
metadata: EventMetadata$
|
|
858
|
+
metadata: EventMetadata$1;
|
|
859
859
|
}
|
|
860
860
|
interface ExternalDatabaseConnectionUpdatedEnvelope {
|
|
861
861
|
entity: ExternalDatabaseConnection;
|
|
862
|
-
metadata: EventMetadata$
|
|
862
|
+
metadata: EventMetadata$1;
|
|
863
863
|
}
|
|
864
864
|
interface ExternalDatabaseConnectionDeletedEnvelope {
|
|
865
|
-
metadata: EventMetadata$
|
|
865
|
+
metadata: EventMetadata$1;
|
|
866
866
|
}
|
|
867
867
|
interface ListExternalDatabaseConnectionsOptions {
|
|
868
868
|
/** Paging */
|
|
@@ -893,7 +893,7 @@ interface UpdateExternalDatabaseConnection {
|
|
|
893
893
|
capabilities?: Capabilities;
|
|
894
894
|
}
|
|
895
895
|
|
|
896
|
-
declare function getExternalDatabaseConnection$1(httpClient: HttpClient
|
|
896
|
+
declare function getExternalDatabaseConnection$1(httpClient: HttpClient): GetExternalDatabaseConnectionSignature;
|
|
897
897
|
interface GetExternalDatabaseConnectionSignature {
|
|
898
898
|
/**
|
|
899
899
|
* Retrieves an external database connection by name.
|
|
@@ -902,14 +902,14 @@ interface GetExternalDatabaseConnectionSignature {
|
|
|
902
902
|
*/
|
|
903
903
|
(name: string): Promise<ExternalDatabaseConnection & ExternalDatabaseConnectionNonNullableFields>;
|
|
904
904
|
}
|
|
905
|
-
declare function listExternalDatabaseConnections$1(httpClient: HttpClient
|
|
905
|
+
declare function listExternalDatabaseConnections$1(httpClient: HttpClient): ListExternalDatabaseConnectionsSignature;
|
|
906
906
|
interface ListExternalDatabaseConnectionsSignature {
|
|
907
907
|
/**
|
|
908
908
|
* Retrieves a list of all external database collections associated with the site or project.
|
|
909
909
|
*/
|
|
910
910
|
(options?: ListExternalDatabaseConnectionsOptions | undefined): Promise<ListExternalDatabaseConnectionsResponse & ListExternalDatabaseConnectionsResponseNonNullableFields>;
|
|
911
911
|
}
|
|
912
|
-
declare function createExternalDatabaseConnection$1(httpClient: HttpClient
|
|
912
|
+
declare function createExternalDatabaseConnection$1(httpClient: HttpClient): CreateExternalDatabaseConnectionSignature;
|
|
913
913
|
interface CreateExternalDatabaseConnectionSignature {
|
|
914
914
|
/**
|
|
915
915
|
* Creates a new external database connection.
|
|
@@ -922,7 +922,7 @@ interface CreateExternalDatabaseConnectionSignature {
|
|
|
922
922
|
*/
|
|
923
923
|
(externalDatabaseConnection: ExternalDatabaseConnection, options: CreateExternalDatabaseConnectionOptions): Promise<ExternalDatabaseConnection & ExternalDatabaseConnectionNonNullableFields>;
|
|
924
924
|
}
|
|
925
|
-
declare function updateExternalDatabaseConnection$1(httpClient: HttpClient
|
|
925
|
+
declare function updateExternalDatabaseConnection$1(httpClient: HttpClient): UpdateExternalDatabaseConnectionSignature;
|
|
926
926
|
interface UpdateExternalDatabaseConnectionSignature {
|
|
927
927
|
/**
|
|
928
928
|
* Updates an external database connection.
|
|
@@ -941,7 +941,7 @@ interface UpdateExternalDatabaseConnectionSignature {
|
|
|
941
941
|
*/
|
|
942
942
|
(name: string, externalDatabaseConnection: UpdateExternalDatabaseConnection): Promise<ExternalDatabaseConnection & ExternalDatabaseConnectionNonNullableFields>;
|
|
943
943
|
}
|
|
944
|
-
declare function deleteExternalDatabaseConnection$1(httpClient: HttpClient
|
|
944
|
+
declare function deleteExternalDatabaseConnection$1(httpClient: HttpClient): DeleteExternalDatabaseConnectionSignature;
|
|
945
945
|
interface DeleteExternalDatabaseConnectionSignature {
|
|
946
946
|
/**
|
|
947
947
|
* Deletes an external database connection.
|
|
@@ -951,35 +951,35 @@ interface DeleteExternalDatabaseConnectionSignature {
|
|
|
951
951
|
*/
|
|
952
952
|
(name: string): Promise<void>;
|
|
953
953
|
}
|
|
954
|
-
declare const onExternalDatabaseConnectionCreated$1: EventDefinition
|
|
955
|
-
declare const onExternalDatabaseConnectionUpdated$1: EventDefinition
|
|
956
|
-
declare const onExternalDatabaseConnectionDeleted$1: EventDefinition
|
|
954
|
+
declare const onExternalDatabaseConnectionCreated$1: EventDefinition<ExternalDatabaseConnectionCreatedEnvelope, "wix.data.v1.external_database_connection_created">;
|
|
955
|
+
declare const onExternalDatabaseConnectionUpdated$1: EventDefinition<ExternalDatabaseConnectionUpdatedEnvelope, "wix.data.v1.external_database_connection_updated">;
|
|
956
|
+
declare const onExternalDatabaseConnectionDeleted$1: EventDefinition<ExternalDatabaseConnectionDeletedEnvelope, "wix.data.v1.external_database_connection_deleted">;
|
|
957
957
|
|
|
958
|
-
declare function createEventModule$
|
|
958
|
+
declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
959
959
|
|
|
960
|
-
declare const getExternalDatabaseConnection: MaybeContext
|
|
961
|
-
declare const listExternalDatabaseConnections: MaybeContext
|
|
962
|
-
declare const createExternalDatabaseConnection: MaybeContext
|
|
963
|
-
declare const updateExternalDatabaseConnection: MaybeContext
|
|
964
|
-
declare const deleteExternalDatabaseConnection: MaybeContext
|
|
960
|
+
declare const getExternalDatabaseConnection: MaybeContext<BuildRESTFunction<typeof getExternalDatabaseConnection$1> & typeof getExternalDatabaseConnection$1>;
|
|
961
|
+
declare const listExternalDatabaseConnections: MaybeContext<BuildRESTFunction<typeof listExternalDatabaseConnections$1> & typeof listExternalDatabaseConnections$1>;
|
|
962
|
+
declare const createExternalDatabaseConnection: MaybeContext<BuildRESTFunction<typeof createExternalDatabaseConnection$1> & typeof createExternalDatabaseConnection$1>;
|
|
963
|
+
declare const updateExternalDatabaseConnection: MaybeContext<BuildRESTFunction<typeof updateExternalDatabaseConnection$1> & typeof updateExternalDatabaseConnection$1>;
|
|
964
|
+
declare const deleteExternalDatabaseConnection: MaybeContext<BuildRESTFunction<typeof deleteExternalDatabaseConnection$1> & typeof deleteExternalDatabaseConnection$1>;
|
|
965
965
|
|
|
966
966
|
type _publicOnExternalDatabaseConnectionCreatedType = typeof onExternalDatabaseConnectionCreated$1;
|
|
967
967
|
/**
|
|
968
968
|
* Triggered when an external database connection is created.
|
|
969
969
|
*/
|
|
970
|
-
declare const onExternalDatabaseConnectionCreated: ReturnType<typeof createEventModule$
|
|
970
|
+
declare const onExternalDatabaseConnectionCreated: ReturnType<typeof createEventModule$1<_publicOnExternalDatabaseConnectionCreatedType>>;
|
|
971
971
|
|
|
972
972
|
type _publicOnExternalDatabaseConnectionUpdatedType = typeof onExternalDatabaseConnectionUpdated$1;
|
|
973
973
|
/**
|
|
974
974
|
* Triggered when an external database connection is updated.
|
|
975
975
|
*/
|
|
976
|
-
declare const onExternalDatabaseConnectionUpdated: ReturnType<typeof createEventModule$
|
|
976
|
+
declare const onExternalDatabaseConnectionUpdated: ReturnType<typeof createEventModule$1<_publicOnExternalDatabaseConnectionUpdatedType>>;
|
|
977
977
|
|
|
978
978
|
type _publicOnExternalDatabaseConnectionDeletedType = typeof onExternalDatabaseConnectionDeleted$1;
|
|
979
979
|
/**
|
|
980
980
|
* Triggered when an external database connection is deleted.
|
|
981
981
|
*/
|
|
982
|
-
declare const onExternalDatabaseConnectionDeleted: ReturnType<typeof createEventModule$
|
|
982
|
+
declare const onExternalDatabaseConnectionDeleted: ReturnType<typeof createEventModule$1<_publicOnExternalDatabaseConnectionDeletedType>>;
|
|
983
983
|
|
|
984
984
|
type index_d$3_Capabilities = Capabilities;
|
|
985
985
|
type index_d$3_CauseOfFailure = CauseOfFailure;
|
|
@@ -1027,595 +1027,117 @@ declare const index_d$3_onExternalDatabaseConnectionDeleted: typeof onExternalDa
|
|
|
1027
1027
|
declare const index_d$3_onExternalDatabaseConnectionUpdated: typeof onExternalDatabaseConnectionUpdated;
|
|
1028
1028
|
declare const index_d$3_updateExternalDatabaseConnection: typeof updateExternalDatabaseConnection;
|
|
1029
1029
|
declare namespace index_d$3 {
|
|
1030
|
-
export { type ActionEvent$2 as ActionEvent, type BaseEventMetadata$
|
|
1030
|
+
export { type ActionEvent$2 as ActionEvent, type BaseEventMetadata$1 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$1 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 };
|
|
1031
1031
|
}
|
|
1032
1032
|
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
type HostModuleAPI$2<T extends HostModule$2<any, any>> = T extends HostModule$2<infer U, any> ? U : never;
|
|
1038
|
-
type Host$2<Environment = unknown> = {
|
|
1039
|
-
channel: {
|
|
1040
|
-
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
1041
|
-
disconnect: () => void;
|
|
1042
|
-
} | Promise<{
|
|
1043
|
-
disconnect: () => void;
|
|
1044
|
-
}>;
|
|
1045
|
-
};
|
|
1046
|
-
environment?: Environment;
|
|
1033
|
+
/** A data collection determines the structure of data to be stored in a database. */
|
|
1034
|
+
interface DataCollection {
|
|
1035
|
+
/** Collection ID. For example, `my-first-collection`. May include a namespace. */
|
|
1036
|
+
_id?: string;
|
|
1047
1037
|
/**
|
|
1048
|
-
*
|
|
1038
|
+
* Collection type. Indicates how the collection was created and is stored.
|
|
1039
|
+
*
|
|
1040
|
+
* * `NATIVE`: User-created collection.
|
|
1041
|
+
* * `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.
|
|
1042
|
+
* * `BLOCKS_APP`: Collection created by a Wix Blocks app.
|
|
1043
|
+
* * `EXTERNAL`: Collection located in externally connected storage.
|
|
1044
|
+
* @readonly
|
|
1049
1045
|
*/
|
|
1050
|
-
|
|
1046
|
+
collectionType?: CollectionType;
|
|
1051
1047
|
/**
|
|
1052
|
-
*
|
|
1048
|
+
* ID of the app that defined this collection. For user-defined collections, this value is null.
|
|
1049
|
+
* @readonly
|
|
1053
1050
|
*/
|
|
1054
|
-
|
|
1051
|
+
ownerAppId?: string | null;
|
|
1055
1052
|
/**
|
|
1056
|
-
*
|
|
1057
|
-
*
|
|
1053
|
+
* Maximum number of items returned in a single query, based on the underlying storage.
|
|
1054
|
+
* Native collections have a maximum page size of 1000 for offset-based queries or 100 for cursor-based queries.
|
|
1055
|
+
* External collections' maximum page size defaults to 50, but an external provider can set any maximum value up to 1000.
|
|
1056
|
+
* @readonly
|
|
1058
1057
|
*/
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1058
|
+
maxPageSize?: number | null;
|
|
1059
|
+
/** Collection's display name as shown in the CMS. For example, `My First Collection`. */
|
|
1060
|
+
displayName?: string | null;
|
|
1061
|
+
/**
|
|
1062
|
+
* Indicates how the collection's items are sorted by default when a query doesn't specify an order.
|
|
1063
|
+
* @readonly
|
|
1064
|
+
*/
|
|
1065
|
+
defaultDisplayOrder?: Sort;
|
|
1066
|
+
/**
|
|
1067
|
+
* UI-friendly namespace of the Wix app with which the data collection is associated, such as Stores or Bookings.
|
|
1068
|
+
* Empty for all data collections not owned by internal Wix apps.
|
|
1069
|
+
* @readonly
|
|
1070
|
+
*/
|
|
1071
|
+
displayNamespace?: string | null;
|
|
1072
|
+
/** The field whose value the CMS displays to represent the collection item when referenced in a different collection. */
|
|
1073
|
+
displayField?: string | null;
|
|
1074
|
+
/**
|
|
1075
|
+
* Capabilities the collection supports.
|
|
1076
|
+
* @readonly
|
|
1077
|
+
*/
|
|
1078
|
+
capabilities?: CollectionCapabilities;
|
|
1079
|
+
/** Collection's field structure. */
|
|
1080
|
+
fields?: Field$1[];
|
|
1081
|
+
/** Levels of permission for accessing and modifying data, defined by lowest role needed to perform each action. */
|
|
1082
|
+
permissions?: Permissions;
|
|
1083
|
+
/**
|
|
1084
|
+
* 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.
|
|
1085
|
+
* @readonly
|
|
1086
|
+
*/
|
|
1087
|
+
revision?: string | null;
|
|
1088
|
+
/** All plugins the collection uses. Plugins apply additional capabilities to the collection or extend its functionality. */
|
|
1089
|
+
plugins?: Plugin[];
|
|
1090
|
+
/**
|
|
1091
|
+
* All paging modes the collection supports. In native collections, offset-based paging is supported by default.
|
|
1092
|
+
* @readonly
|
|
1093
|
+
*/
|
|
1094
|
+
pagingModes?: PagingMode[];
|
|
1095
|
+
/**
|
|
1096
|
+
* Date the collection was created.
|
|
1097
|
+
* @readonly
|
|
1098
|
+
*/
|
|
1099
|
+
_createdDate?: Date;
|
|
1100
|
+
/**
|
|
1101
|
+
* Date the collection was last updated.
|
|
1102
|
+
* @readonly
|
|
1103
|
+
*/
|
|
1104
|
+
_updatedDate?: Date;
|
|
1081
1105
|
}
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1092
|
-
url: string;
|
|
1093
|
-
data?: Data;
|
|
1094
|
-
params?: URLSearchParams;
|
|
1095
|
-
} & APIMetadata$2;
|
|
1096
|
-
type APIMetadata$2 = {
|
|
1097
|
-
methodFqn?: string;
|
|
1098
|
-
entityFqdn?: string;
|
|
1099
|
-
packageName?: string;
|
|
1100
|
-
};
|
|
1101
|
-
type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
|
|
1102
|
-
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
1103
|
-
__type: 'event-definition';
|
|
1104
|
-
type: Type;
|
|
1105
|
-
isDomainEvent?: boolean;
|
|
1106
|
-
transformations?: (envelope: unknown) => Payload;
|
|
1107
|
-
__payload: Payload;
|
|
1108
|
-
};
|
|
1109
|
-
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
1110
|
-
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
1111
|
-
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
1112
|
-
|
|
1113
|
-
type ServicePluginMethodInput$2 = {
|
|
1114
|
-
request: any;
|
|
1115
|
-
metadata: any;
|
|
1116
|
-
};
|
|
1117
|
-
type ServicePluginContract$2 = Record<string, (payload: ServicePluginMethodInput$2) => unknown | Promise<unknown>>;
|
|
1118
|
-
type ServicePluginMethodMetadata$2 = {
|
|
1119
|
-
name: string;
|
|
1120
|
-
primaryHttpMappingPath: string;
|
|
1121
|
-
transformations: {
|
|
1122
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput$2;
|
|
1123
|
-
toREST: (...args: unknown[]) => unknown;
|
|
1124
|
-
};
|
|
1125
|
-
};
|
|
1126
|
-
type ServicePluginDefinition$2<Contract extends ServicePluginContract$2> = {
|
|
1127
|
-
__type: 'service-plugin-definition';
|
|
1128
|
-
componentType: string;
|
|
1129
|
-
methods: ServicePluginMethodMetadata$2[];
|
|
1130
|
-
__contract: Contract;
|
|
1131
|
-
};
|
|
1132
|
-
declare function ServicePluginDefinition$2<Contract extends ServicePluginContract$2>(componentType: string, methods: ServicePluginMethodMetadata$2[]): ServicePluginDefinition$2<Contract>;
|
|
1133
|
-
type BuildServicePluginDefinition$2<T extends ServicePluginDefinition$2<any>> = (implementation: T['__contract']) => void;
|
|
1134
|
-
declare const SERVICE_PLUGIN_ERROR_TYPE$2 = "wix_spi_error";
|
|
1135
|
-
|
|
1136
|
-
type RequestContext$2 = {
|
|
1137
|
-
isSSR: boolean;
|
|
1138
|
-
host: string;
|
|
1139
|
-
protocol?: string;
|
|
1140
|
-
};
|
|
1141
|
-
type ResponseTransformer$2 = (data: any, headers?: any) => any;
|
|
1142
|
-
/**
|
|
1143
|
-
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
1144
|
-
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
1145
|
-
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
1146
|
-
*/
|
|
1147
|
-
type Method$2 = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
1148
|
-
type AmbassadorRequestOptions$2<T = any> = {
|
|
1149
|
-
_?: T;
|
|
1150
|
-
url?: string;
|
|
1151
|
-
method?: Method$2;
|
|
1152
|
-
params?: any;
|
|
1153
|
-
data?: any;
|
|
1154
|
-
transformResponse?: ResponseTransformer$2 | ResponseTransformer$2[];
|
|
1155
|
-
};
|
|
1156
|
-
type AmbassadorFactory$2<Request, Response> = (payload: Request) => ((context: RequestContext$2) => AmbassadorRequestOptions$2<Response>) & {
|
|
1157
|
-
__isAmbassador: boolean;
|
|
1158
|
-
};
|
|
1159
|
-
type AmbassadorFunctionDescriptor$2<Request = any, Response = any> = AmbassadorFactory$2<Request, Response>;
|
|
1160
|
-
type BuildAmbassadorFunction$2<T extends AmbassadorFunctionDescriptor$2> = T extends AmbassadorFunctionDescriptor$2<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
1161
|
-
|
|
1162
|
-
declare global {
|
|
1163
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1164
|
-
interface SymbolConstructor {
|
|
1165
|
-
readonly observable: symbol;
|
|
1166
|
-
}
|
|
1106
|
+
declare enum CollectionType {
|
|
1107
|
+
/** User-created collection. */
|
|
1108
|
+
NATIVE = "NATIVE",
|
|
1109
|
+
/** [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). */
|
|
1110
|
+
WIX_APP = "WIX_APP",
|
|
1111
|
+
/** Collection created by a Wix Blocks app. */
|
|
1112
|
+
BLOCKS_APP = "BLOCKS_APP",
|
|
1113
|
+
/** Collection located in externally connected storage. */
|
|
1114
|
+
EXTERNAL = "EXTERNAL"
|
|
1167
1115
|
}
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
/**
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
```
|
|
1178
|
-
import type {EmptyObject} from 'type-fest';
|
|
1179
|
-
|
|
1180
|
-
// The following illustrates the problem with `{}`.
|
|
1181
|
-
const foo1: {} = {}; // Pass
|
|
1182
|
-
const foo2: {} = []; // Pass
|
|
1183
|
-
const foo3: {} = 42; // Pass
|
|
1184
|
-
const foo4: {} = {a: 1}; // Pass
|
|
1185
|
-
|
|
1186
|
-
// With `EmptyObject` only the first case is valid.
|
|
1187
|
-
const bar1: EmptyObject = {}; // Pass
|
|
1188
|
-
const bar2: EmptyObject = 42; // Fail
|
|
1189
|
-
const bar3: EmptyObject = []; // Fail
|
|
1190
|
-
const bar4: EmptyObject = {a: 1}; // Fail
|
|
1191
|
-
```
|
|
1192
|
-
|
|
1193
|
-
Unfortunately, `Record<string, never>`, `Record<keyof any, never>` and `Record<never, never>` do not work. See {@link https://github.com/sindresorhus/type-fest/issues/395 #395}.
|
|
1194
|
-
|
|
1195
|
-
@category Object
|
|
1196
|
-
*/
|
|
1197
|
-
type EmptyObject$2 = {[emptyObjectSymbol$2]?: never};
|
|
1198
|
-
|
|
1199
|
-
/**
|
|
1200
|
-
Returns a boolean for whether the two given types are equal.
|
|
1201
|
-
|
|
1202
|
-
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
1203
|
-
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
1204
|
-
|
|
1205
|
-
Use-cases:
|
|
1206
|
-
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
1207
|
-
|
|
1208
|
-
@example
|
|
1209
|
-
```
|
|
1210
|
-
import type {IsEqual} from 'type-fest';
|
|
1211
|
-
|
|
1212
|
-
// This type returns a boolean for whether the given array includes the given item.
|
|
1213
|
-
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
1214
|
-
type Includes<Value extends readonly any[], Item> =
|
|
1215
|
-
Value extends readonly [Value[0], ...infer rest]
|
|
1216
|
-
? IsEqual<Value[0], Item> extends true
|
|
1217
|
-
? true
|
|
1218
|
-
: Includes<rest, Item>
|
|
1219
|
-
: false;
|
|
1220
|
-
```
|
|
1221
|
-
|
|
1222
|
-
@category Type Guard
|
|
1223
|
-
@category Utilities
|
|
1224
|
-
*/
|
|
1225
|
-
type IsEqual$2<A, B> =
|
|
1226
|
-
(<G>() => G extends A ? 1 : 2) extends
|
|
1227
|
-
(<G>() => G extends B ? 1 : 2)
|
|
1228
|
-
? true
|
|
1229
|
-
: false;
|
|
1230
|
-
|
|
1231
|
-
/**
|
|
1232
|
-
Filter out keys from an object.
|
|
1233
|
-
|
|
1234
|
-
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
1235
|
-
Returns `never` if `Key` extends `Exclude`.
|
|
1236
|
-
Returns `Key` otherwise.
|
|
1237
|
-
|
|
1238
|
-
@example
|
|
1239
|
-
```
|
|
1240
|
-
type Filtered = Filter<'foo', 'foo'>;
|
|
1241
|
-
//=> never
|
|
1242
|
-
```
|
|
1243
|
-
|
|
1244
|
-
@example
|
|
1245
|
-
```
|
|
1246
|
-
type Filtered = Filter<'bar', string>;
|
|
1247
|
-
//=> never
|
|
1248
|
-
```
|
|
1249
|
-
|
|
1250
|
-
@example
|
|
1251
|
-
```
|
|
1252
|
-
type Filtered = Filter<'bar', 'foo'>;
|
|
1253
|
-
//=> 'bar'
|
|
1254
|
-
```
|
|
1255
|
-
|
|
1256
|
-
@see {Except}
|
|
1257
|
-
*/
|
|
1258
|
-
type Filter$2<KeyType, ExcludeType> = IsEqual$2<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
1259
|
-
|
|
1260
|
-
type ExceptOptions$2 = {
|
|
1261
|
-
/**
|
|
1262
|
-
Disallow assigning non-specified properties.
|
|
1263
|
-
|
|
1264
|
-
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
1265
|
-
|
|
1266
|
-
@default false
|
|
1267
|
-
*/
|
|
1268
|
-
requireExactProps?: boolean;
|
|
1269
|
-
};
|
|
1270
|
-
|
|
1271
|
-
/**
|
|
1272
|
-
Create a type from an object type without certain keys.
|
|
1273
|
-
|
|
1274
|
-
We recommend setting the `requireExactProps` option to `true`.
|
|
1275
|
-
|
|
1276
|
-
This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.
|
|
1277
|
-
|
|
1278
|
-
This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)).
|
|
1279
|
-
|
|
1280
|
-
@example
|
|
1281
|
-
```
|
|
1282
|
-
import type {Except} from 'type-fest';
|
|
1283
|
-
|
|
1284
|
-
type Foo = {
|
|
1285
|
-
a: number;
|
|
1286
|
-
b: string;
|
|
1287
|
-
};
|
|
1288
|
-
|
|
1289
|
-
type FooWithoutA = Except<Foo, 'a'>;
|
|
1290
|
-
//=> {b: string}
|
|
1291
|
-
|
|
1292
|
-
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
1293
|
-
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
1294
|
-
|
|
1295
|
-
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
1296
|
-
//=> {a: number} & Partial<Record<"b", never>>
|
|
1297
|
-
|
|
1298
|
-
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
1299
|
-
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
1300
|
-
```
|
|
1301
|
-
|
|
1302
|
-
@category Object
|
|
1303
|
-
*/
|
|
1304
|
-
type Except$2<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions$2 = {requireExactProps: false}> = {
|
|
1305
|
-
[KeyType in keyof ObjectType as Filter$2<KeyType, KeysType>]: ObjectType[KeyType];
|
|
1306
|
-
} & (Options['requireExactProps'] extends true
|
|
1307
|
-
? Partial<Record<KeysType, never>>
|
|
1308
|
-
: {});
|
|
1309
|
-
|
|
1310
|
-
/**
|
|
1311
|
-
Returns a boolean for whether the given type is `never`.
|
|
1312
|
-
|
|
1313
|
-
@link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
|
|
1314
|
-
@link https://stackoverflow.com/a/53984913/10292952
|
|
1315
|
-
@link https://www.zhenghao.io/posts/ts-never
|
|
1316
|
-
|
|
1317
|
-
Useful in type utilities, such as checking if something does not occur.
|
|
1318
|
-
|
|
1319
|
-
@example
|
|
1320
|
-
```
|
|
1321
|
-
import type {IsNever, And} from 'type-fest';
|
|
1322
|
-
|
|
1323
|
-
// https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
|
|
1324
|
-
type AreStringsEqual<A extends string, B extends string> =
|
|
1325
|
-
And<
|
|
1326
|
-
IsNever<Exclude<A, B>> extends true ? true : false,
|
|
1327
|
-
IsNever<Exclude<B, A>> extends true ? true : false
|
|
1328
|
-
>;
|
|
1329
|
-
|
|
1330
|
-
type EndIfEqual<I extends string, O extends string> =
|
|
1331
|
-
AreStringsEqual<I, O> extends true
|
|
1332
|
-
? never
|
|
1333
|
-
: void;
|
|
1334
|
-
|
|
1335
|
-
function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
|
|
1336
|
-
if (input === output) {
|
|
1337
|
-
process.exit(0);
|
|
1338
|
-
}
|
|
1116
|
+
interface Sort {
|
|
1117
|
+
/** Field to sort by. */
|
|
1118
|
+
fieldKey?: string;
|
|
1119
|
+
/**
|
|
1120
|
+
* Sort order. Use `ASC` for ascending order or `DESC` for descending order.
|
|
1121
|
+
*
|
|
1122
|
+
* Default: `ASC`
|
|
1123
|
+
*/
|
|
1124
|
+
direction?: Direction;
|
|
1339
1125
|
}
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
endIfEqual('abc', '123');
|
|
1345
|
-
//=> void
|
|
1346
|
-
```
|
|
1347
|
-
|
|
1348
|
-
@category Type Guard
|
|
1349
|
-
@category Utilities
|
|
1350
|
-
*/
|
|
1351
|
-
type IsNever$2<T> = [T] extends [never] ? true : false;
|
|
1352
|
-
|
|
1353
|
-
/**
|
|
1354
|
-
An if-else-like type that resolves depending on whether the given type is `never`.
|
|
1355
|
-
|
|
1356
|
-
@see {@link IsNever}
|
|
1357
|
-
|
|
1358
|
-
@example
|
|
1359
|
-
```
|
|
1360
|
-
import type {IfNever} from 'type-fest';
|
|
1361
|
-
|
|
1362
|
-
type ShouldBeTrue = IfNever<never>;
|
|
1363
|
-
//=> true
|
|
1364
|
-
|
|
1365
|
-
type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
|
|
1366
|
-
//=> 'bar'
|
|
1367
|
-
```
|
|
1368
|
-
|
|
1369
|
-
@category Type Guard
|
|
1370
|
-
@category Utilities
|
|
1371
|
-
*/
|
|
1372
|
-
type IfNever$2<T, TypeIfNever = true, TypeIfNotNever = false> = (
|
|
1373
|
-
IsNever$2<T> extends true ? TypeIfNever : TypeIfNotNever
|
|
1374
|
-
);
|
|
1375
|
-
|
|
1376
|
-
/**
|
|
1377
|
-
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
1378
|
-
|
|
1379
|
-
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
1380
|
-
|
|
1381
|
-
@example
|
|
1382
|
-
```
|
|
1383
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
1384
|
-
|
|
1385
|
-
interface Example {
|
|
1386
|
-
a: string;
|
|
1387
|
-
b: string | number;
|
|
1388
|
-
c?: string;
|
|
1389
|
-
d: {};
|
|
1126
|
+
declare enum Direction {
|
|
1127
|
+
ASC = "ASC",
|
|
1128
|
+
DESC = "DESC"
|
|
1390
1129
|
}
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
1403
|
-
//=> 'a' | 'c'
|
|
1404
|
-
```
|
|
1405
|
-
|
|
1406
|
-
@category Object
|
|
1407
|
-
*/
|
|
1408
|
-
type ConditionalKeys$2<Base, Condition> =
|
|
1409
|
-
{
|
|
1410
|
-
// Map through all the keys of the given base type.
|
|
1411
|
-
[Key in keyof Base]-?:
|
|
1412
|
-
// Pick only keys with types extending the given `Condition` type.
|
|
1413
|
-
Base[Key] extends Condition
|
|
1414
|
-
// Retain this key
|
|
1415
|
-
// If the value for the key extends never, only include it if `Condition` also extends never
|
|
1416
|
-
? IfNever$2<Base[Key], IfNever$2<Condition, Key, never>, Key>
|
|
1417
|
-
// Discard this key since the condition fails.
|
|
1418
|
-
: never;
|
|
1419
|
-
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
1420
|
-
}[keyof Base];
|
|
1421
|
-
|
|
1422
|
-
/**
|
|
1423
|
-
Exclude keys from a shape that matches the given `Condition`.
|
|
1424
|
-
|
|
1425
|
-
This is useful when you want to create a new type with a specific set of keys from a shape. For example, you might want to exclude all the primitive properties from a class and form a new shape containing everything but the primitive properties.
|
|
1426
|
-
|
|
1427
|
-
@example
|
|
1428
|
-
```
|
|
1429
|
-
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
1430
|
-
|
|
1431
|
-
class Awesome {
|
|
1432
|
-
name: string;
|
|
1433
|
-
successes: number;
|
|
1434
|
-
failures: bigint;
|
|
1435
|
-
|
|
1436
|
-
run() {}
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
|
-
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
|
|
1440
|
-
//=> {run: () => void}
|
|
1441
|
-
```
|
|
1442
|
-
|
|
1443
|
-
@example
|
|
1444
|
-
```
|
|
1445
|
-
import type {ConditionalExcept} from 'type-fest';
|
|
1446
|
-
|
|
1447
|
-
interface Example {
|
|
1448
|
-
a: string;
|
|
1449
|
-
b: string | number;
|
|
1450
|
-
c: () => void;
|
|
1451
|
-
d: {};
|
|
1452
|
-
}
|
|
1453
|
-
|
|
1454
|
-
type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
1455
|
-
//=> {b: string | number; c: () => void; d: {}}
|
|
1456
|
-
```
|
|
1457
|
-
|
|
1458
|
-
@category Object
|
|
1459
|
-
*/
|
|
1460
|
-
type ConditionalExcept$2<Base, Condition> = Except$2<
|
|
1461
|
-
Base,
|
|
1462
|
-
ConditionalKeys$2<Base, Condition>
|
|
1463
|
-
>;
|
|
1464
|
-
|
|
1465
|
-
/**
|
|
1466
|
-
* Descriptors are objects that describe the API of a module, and the module
|
|
1467
|
-
* can either be a REST module or a host module.
|
|
1468
|
-
* This type is recursive, so it can describe nested modules.
|
|
1469
|
-
*/
|
|
1470
|
-
type Descriptors$2 = RESTFunctionDescriptor$2 | AmbassadorFunctionDescriptor$2 | HostModule$2<any, any> | EventDefinition$2<any> | ServicePluginDefinition$2<any> | {
|
|
1471
|
-
[key: string]: Descriptors$2 | PublicMetadata$2 | any;
|
|
1472
|
-
};
|
|
1473
|
-
/**
|
|
1474
|
-
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
1475
|
-
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
1476
|
-
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
1477
|
-
* do not match the given host (as they will not work with the given host).
|
|
1478
|
-
*/
|
|
1479
|
-
type BuildDescriptors$2<T extends Descriptors$2, H extends Host$2<any> | undefined, Depth extends number = 5> = {
|
|
1480
|
-
done: T;
|
|
1481
|
-
recurse: T extends {
|
|
1482
|
-
__type: typeof SERVICE_PLUGIN_ERROR_TYPE$2;
|
|
1483
|
-
} ? never : T extends AmbassadorFunctionDescriptor$2 ? BuildAmbassadorFunction$2<T> : T extends RESTFunctionDescriptor$2 ? BuildRESTFunction$2<T> : T extends EventDefinition$2<any> ? BuildEventDefinition$2<T> : T extends ServicePluginDefinition$2<any> ? BuildServicePluginDefinition$2<T> : T extends HostModule$2<any, any> ? HostModuleAPI$2<T> : ConditionalExcept$2<{
|
|
1484
|
-
[Key in keyof T]: T[Key] extends Descriptors$2 ? BuildDescriptors$2<T[Key], H, [
|
|
1485
|
-
-1,
|
|
1486
|
-
0,
|
|
1487
|
-
1,
|
|
1488
|
-
2,
|
|
1489
|
-
3,
|
|
1490
|
-
4,
|
|
1491
|
-
5
|
|
1492
|
-
][Depth]> : never;
|
|
1493
|
-
}, EmptyObject$2>;
|
|
1494
|
-
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
1495
|
-
type PublicMetadata$2 = {
|
|
1496
|
-
PACKAGE_NAME?: string;
|
|
1497
|
-
};
|
|
1498
|
-
|
|
1499
|
-
declare global {
|
|
1500
|
-
interface ContextualClient {
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
/**
|
|
1504
|
-
* A type used to create concerete types from SDK descriptors in
|
|
1505
|
-
* case a contextual client is available.
|
|
1506
|
-
*/
|
|
1507
|
-
type MaybeContext$2<T extends Descriptors$2> = globalThis.ContextualClient extends {
|
|
1508
|
-
host: Host$2;
|
|
1509
|
-
} ? BuildDescriptors$2<T, globalThis.ContextualClient['host']> : T;
|
|
1510
|
-
|
|
1511
|
-
/** A data collection determines the structure of data to be stored in a database. */
|
|
1512
|
-
interface DataCollection {
|
|
1513
|
-
/** Collection ID. For example, `my-first-collection`. May include a namespace. */
|
|
1514
|
-
_id?: string;
|
|
1515
|
-
/**
|
|
1516
|
-
* Collection type. Indicates how the collection was created and is stored.
|
|
1517
|
-
*
|
|
1518
|
-
* * `NATIVE`: User-created collection.
|
|
1519
|
-
* * `WIX_APP`: [Collection](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code#what-are-wix-app-collections) created by a Wix app, including [starter collections](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code#what-are-wix-app-starter-collections) created when a Wix app is installed.
|
|
1520
|
-
* * `BLOCKS_APP`: Collection created by a Wix Blocks app.
|
|
1521
|
-
* * `EXTERNAL`: Collection located in externally connected storage.
|
|
1522
|
-
* @readonly
|
|
1523
|
-
*/
|
|
1524
|
-
collectionType?: CollectionType;
|
|
1525
|
-
/**
|
|
1526
|
-
* ID of the app that defined this collection. For user-defined collections, this value is null.
|
|
1527
|
-
* @readonly
|
|
1528
|
-
*/
|
|
1529
|
-
ownerAppId?: string | null;
|
|
1530
|
-
/**
|
|
1531
|
-
* Maximum number of items returned in a single query, based on the underlying storage.
|
|
1532
|
-
* Native collections have a maximum page size of 1000 for offset-based queries or 100 for cursor-based queries.
|
|
1533
|
-
* External collections' maximum page size defaults to 50, but an external provider can set any maximum value up to 1000.
|
|
1534
|
-
* @readonly
|
|
1535
|
-
*/
|
|
1536
|
-
maxPageSize?: number | null;
|
|
1537
|
-
/** Collection's display name as shown in the CMS. For example, `My First Collection`. */
|
|
1538
|
-
displayName?: string | null;
|
|
1539
|
-
/**
|
|
1540
|
-
* Indicates how the collection's items are sorted by default when a query doesn't specify an order.
|
|
1541
|
-
* @readonly
|
|
1542
|
-
*/
|
|
1543
|
-
defaultDisplayOrder?: Sort;
|
|
1544
|
-
/**
|
|
1545
|
-
* UI-friendly namespace of the Wix app with which the data collection is associated, such as Stores or Bookings.
|
|
1546
|
-
* Empty for all data collections not owned by internal Wix apps.
|
|
1547
|
-
* @readonly
|
|
1548
|
-
*/
|
|
1549
|
-
displayNamespace?: string | null;
|
|
1550
|
-
/** The field whose value the CMS displays to represent the collection item when referenced in a different collection. */
|
|
1551
|
-
displayField?: string | null;
|
|
1552
|
-
/**
|
|
1553
|
-
* Capabilities the collection supports.
|
|
1554
|
-
* @readonly
|
|
1555
|
-
*/
|
|
1556
|
-
capabilities?: CollectionCapabilities;
|
|
1557
|
-
/** Collection's field structure. */
|
|
1558
|
-
fields?: Field$1[];
|
|
1559
|
-
/** Levels of permission for accessing and modifying data, defined by lowest role needed to perform each action. */
|
|
1560
|
-
permissions?: Permissions;
|
|
1561
|
-
/**
|
|
1562
|
-
* Collection's current revision number, which increments each time the collection is updated. For an update operation to succeed, you must pass the latest revision number.
|
|
1563
|
-
* @readonly
|
|
1564
|
-
*/
|
|
1565
|
-
revision?: string | null;
|
|
1566
|
-
/** All plugins the collection uses. Plugins apply additional capabilities to the collection or extend its functionality. */
|
|
1567
|
-
plugins?: Plugin[];
|
|
1568
|
-
/**
|
|
1569
|
-
* All paging modes the collection supports. In native collections, offset-based paging is supported by default.
|
|
1570
|
-
* @readonly
|
|
1571
|
-
*/
|
|
1572
|
-
pagingModes?: PagingMode[];
|
|
1573
|
-
/**
|
|
1574
|
-
* Date the collection was created.
|
|
1575
|
-
* @readonly
|
|
1576
|
-
*/
|
|
1577
|
-
_createdDate?: Date;
|
|
1578
|
-
/**
|
|
1579
|
-
* Date the collection was last updated.
|
|
1580
|
-
* @readonly
|
|
1581
|
-
*/
|
|
1582
|
-
_updatedDate?: Date;
|
|
1583
|
-
}
|
|
1584
|
-
declare enum CollectionType {
|
|
1585
|
-
/** User-created collection. */
|
|
1586
|
-
NATIVE = "NATIVE",
|
|
1587
|
-
/** [Collection](https://support.wix.com/en/article/velo-working-with-wix-app-collections-and-code#what-are-wix-app-collections) created by a Wix app when it is installed. This type of collection can be modified dynamically by that app (for example, Wix Forms). */
|
|
1588
|
-
WIX_APP = "WIX_APP",
|
|
1589
|
-
/** Collection created by a Wix Blocks app. */
|
|
1590
|
-
BLOCKS_APP = "BLOCKS_APP",
|
|
1591
|
-
/** Collection located in externally connected storage. */
|
|
1592
|
-
EXTERNAL = "EXTERNAL"
|
|
1593
|
-
}
|
|
1594
|
-
interface Sort {
|
|
1595
|
-
/** Field to sort by. */
|
|
1596
|
-
fieldKey?: string;
|
|
1597
|
-
/**
|
|
1598
|
-
* Sort order. Use `ASC` for ascending order or `DESC` for descending order.
|
|
1599
|
-
*
|
|
1600
|
-
* Default: `ASC`
|
|
1601
|
-
*/
|
|
1602
|
-
direction?: Direction;
|
|
1603
|
-
}
|
|
1604
|
-
declare enum Direction {
|
|
1605
|
-
ASC = "ASC",
|
|
1606
|
-
DESC = "DESC"
|
|
1607
|
-
}
|
|
1608
|
-
interface CollectionCapabilities {
|
|
1609
|
-
/** Data operations the collection supports. The listed operations can be performed on data the collection contains. */
|
|
1610
|
-
dataOperations?: DataOperation[];
|
|
1611
|
-
/**
|
|
1612
|
-
* Collection operations supported. The listed operations can be performed on the collection itself.
|
|
1613
|
-
* + `UPDATE`: Allows updating the collection's structure, for example adding, updating, or deleting fields. If not included, the collection's structure can't be changed.
|
|
1614
|
-
* + `REMOVE`: Allows deleting the entire collection. If not included, the collection can't be deleted.
|
|
1615
|
-
*/
|
|
1616
|
-
collectionOperations?: CollectionOperation[];
|
|
1617
|
-
/** Maximum number of indexes for the collection. */
|
|
1618
|
-
indexLimits?: IndexLimits;
|
|
1130
|
+
interface CollectionCapabilities {
|
|
1131
|
+
/** Data operations the collection supports. The listed operations can be performed on data the collection contains. */
|
|
1132
|
+
dataOperations?: DataOperation[];
|
|
1133
|
+
/**
|
|
1134
|
+
* Collection operations supported. The listed operations can be performed on the collection itself.
|
|
1135
|
+
* + `UPDATE`: Allows updating the collection's structure, for example adding, updating, or deleting fields. If not included, the collection's structure can't be changed.
|
|
1136
|
+
* + `REMOVE`: Allows deleting the entire collection. If not included, the collection can't be deleted.
|
|
1137
|
+
*/
|
|
1138
|
+
collectionOperations?: CollectionOperation[];
|
|
1139
|
+
/** Maximum number of indexes for the collection. */
|
|
1140
|
+
indexLimits?: IndexLimits;
|
|
1619
1141
|
}
|
|
1620
1142
|
declare enum DataOperation {
|
|
1621
1143
|
AGGREGATE = "AGGREGATE",
|
|
@@ -2722,71 +2244,6 @@ interface ListDataCollectionsResponseNonNullableFields {
|
|
|
2722
2244
|
interface UpdateDataCollectionResponseNonNullableFields {
|
|
2723
2245
|
collection?: DataCollectionNonNullableFields;
|
|
2724
2246
|
}
|
|
2725
|
-
interface BaseEventMetadata$1 {
|
|
2726
|
-
/** App instance ID. */
|
|
2727
|
-
instanceId?: string | null;
|
|
2728
|
-
/** Event type. */
|
|
2729
|
-
eventType?: string;
|
|
2730
|
-
/** The identification type and identity data. */
|
|
2731
|
-
identity?: IdentificationData$1;
|
|
2732
|
-
}
|
|
2733
|
-
interface EventMetadata$1 extends BaseEventMetadata$1 {
|
|
2734
|
-
/**
|
|
2735
|
-
* Unique event ID.
|
|
2736
|
-
* Allows clients to ignore duplicate webhooks.
|
|
2737
|
-
*/
|
|
2738
|
-
_id?: string;
|
|
2739
|
-
/**
|
|
2740
|
-
* Assumes actions are also always typed to an entity_type
|
|
2741
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
2742
|
-
*/
|
|
2743
|
-
entityFqdn?: string;
|
|
2744
|
-
/**
|
|
2745
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
2746
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
2747
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
2748
|
-
*/
|
|
2749
|
-
slug?: string;
|
|
2750
|
-
/** ID of the entity associated with the event. */
|
|
2751
|
-
entityId?: string;
|
|
2752
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
2753
|
-
eventTime?: Date;
|
|
2754
|
-
/**
|
|
2755
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
2756
|
-
* (for example, GDPR).
|
|
2757
|
-
*/
|
|
2758
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
2759
|
-
/** If present, indicates the action that triggered the event. */
|
|
2760
|
-
originatedFrom?: string | null;
|
|
2761
|
-
/**
|
|
2762
|
-
* A sequence number defining the order of updates to the underlying entity.
|
|
2763
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
2764
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
2765
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
2766
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
2767
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
2768
|
-
*/
|
|
2769
|
-
entityEventSequence?: string | null;
|
|
2770
|
-
}
|
|
2771
|
-
interface DataCollectionClonedEnvelope {
|
|
2772
|
-
data: DataCollectionClonedEvent;
|
|
2773
|
-
metadata: EventMetadata$1;
|
|
2774
|
-
}
|
|
2775
|
-
interface DataCollectionChangedEnvelope {
|
|
2776
|
-
data: DataCollectionChangedEvent;
|
|
2777
|
-
metadata: EventMetadata$1;
|
|
2778
|
-
}
|
|
2779
|
-
interface DataCollectionCreatedEnvelope {
|
|
2780
|
-
entity: DataCollection;
|
|
2781
|
-
metadata: EventMetadata$1;
|
|
2782
|
-
}
|
|
2783
|
-
interface DataCollectionUpdatedEnvelope {
|
|
2784
|
-
entity: DataCollection;
|
|
2785
|
-
metadata: EventMetadata$1;
|
|
2786
|
-
}
|
|
2787
|
-
interface DataCollectionDeletedEnvelope {
|
|
2788
|
-
metadata: EventMetadata$1;
|
|
2789
|
-
}
|
|
2790
2247
|
interface GetDataCollectionOptions {
|
|
2791
2248
|
/**
|
|
2792
2249
|
* Whether to retrieve data from the primary database instance.
|
|
@@ -2816,7 +2273,7 @@ interface ListDataCollectionsOptions {
|
|
|
2816
2273
|
consistentRead?: boolean;
|
|
2817
2274
|
}
|
|
2818
2275
|
|
|
2819
|
-
declare function createDataCollection$1(httpClient: HttpClient
|
|
2276
|
+
declare function createDataCollection$1(httpClient: HttpClient): CreateDataCollectionSignature;
|
|
2820
2277
|
interface CreateDataCollectionSignature {
|
|
2821
2278
|
/**
|
|
2822
2279
|
* Creates a new data collection.
|
|
@@ -2828,7 +2285,7 @@ interface CreateDataCollectionSignature {
|
|
|
2828
2285
|
*/
|
|
2829
2286
|
(collection: DataCollection): Promise<DataCollection & DataCollectionNonNullableFields>;
|
|
2830
2287
|
}
|
|
2831
|
-
declare function getDataCollection$1(httpClient: HttpClient
|
|
2288
|
+
declare function getDataCollection$1(httpClient: HttpClient): GetDataCollectionSignature;
|
|
2832
2289
|
interface GetDataCollectionSignature {
|
|
2833
2290
|
/**
|
|
2834
2291
|
* Retrieves a data collection by ID.
|
|
@@ -2838,7 +2295,7 @@ interface GetDataCollectionSignature {
|
|
|
2838
2295
|
*/
|
|
2839
2296
|
(dataCollectionId: string, options?: GetDataCollectionOptions | undefined): Promise<DataCollection & DataCollectionNonNullableFields>;
|
|
2840
2297
|
}
|
|
2841
|
-
declare function listDataCollections$1(httpClient: HttpClient
|
|
2298
|
+
declare function listDataCollections$1(httpClient: HttpClient): ListDataCollectionsSignature;
|
|
2842
2299
|
interface ListDataCollectionsSignature {
|
|
2843
2300
|
/**
|
|
2844
2301
|
* Retrieves a list of all data collections associated with the site or project.
|
|
@@ -2848,7 +2305,7 @@ interface ListDataCollectionsSignature {
|
|
|
2848
2305
|
*/
|
|
2849
2306
|
(options?: ListDataCollectionsOptions | undefined): Promise<ListDataCollectionsResponse & ListDataCollectionsResponseNonNullableFields>;
|
|
2850
2307
|
}
|
|
2851
|
-
declare function updateDataCollection$1(httpClient: HttpClient
|
|
2308
|
+
declare function updateDataCollection$1(httpClient: HttpClient): UpdateDataCollectionSignature;
|
|
2852
2309
|
interface UpdateDataCollectionSignature {
|
|
2853
2310
|
/**
|
|
2854
2311
|
* Updates a data collection.
|
|
@@ -2868,7 +2325,7 @@ interface UpdateDataCollectionSignature {
|
|
|
2868
2325
|
*/
|
|
2869
2326
|
(collection: DataCollection): Promise<DataCollection & DataCollectionNonNullableFields>;
|
|
2870
2327
|
}
|
|
2871
|
-
declare function deleteDataCollection$1(httpClient: HttpClient
|
|
2328
|
+
declare function deleteDataCollection$1(httpClient: HttpClient): DeleteDataCollectionSignature;
|
|
2872
2329
|
interface DeleteDataCollectionSignature {
|
|
2873
2330
|
/**
|
|
2874
2331
|
* Deletes a data collection.
|
|
@@ -2879,45 +2336,12 @@ interface DeleteDataCollectionSignature {
|
|
|
2879
2336
|
*/
|
|
2880
2337
|
(dataCollectionId: string): Promise<void>;
|
|
2881
2338
|
}
|
|
2882
|
-
declare const onDataCollectionClonedEvent$1: EventDefinition$2<DataCollectionClonedEnvelope, "wix.data.v2.data_collection_data_collection_cloned_event">;
|
|
2883
|
-
declare const onDataCollectionChangedEvent$1: EventDefinition$2<DataCollectionChangedEnvelope, "wix.data.v2.data_collection_data_collection_changed_event">;
|
|
2884
|
-
declare const onDataCollectionCreated$1: EventDefinition$2<DataCollectionCreatedEnvelope, "wix.data.v2.data_collection_created">;
|
|
2885
|
-
declare const onDataCollectionUpdated$1: EventDefinition$2<DataCollectionUpdatedEnvelope, "wix.data.v2.data_collection_updated">;
|
|
2886
|
-
declare const onDataCollectionDeleted$1: EventDefinition$2<DataCollectionDeletedEnvelope, "wix.data.v2.data_collection_deleted">;
|
|
2887
|
-
|
|
2888
|
-
declare function createEventModule$1<T extends EventDefinition$2<any, string>>(eventDefinition: T): BuildEventDefinition$2<T> & T;
|
|
2889
2339
|
|
|
2890
|
-
declare const createDataCollection: MaybeContext
|
|
2891
|
-
declare const getDataCollection: MaybeContext
|
|
2892
|
-
declare const listDataCollections: MaybeContext
|
|
2893
|
-
declare const updateDataCollection: MaybeContext
|
|
2894
|
-
declare const deleteDataCollection: MaybeContext
|
|
2895
|
-
|
|
2896
|
-
type _publicOnDataCollectionClonedEventType = typeof onDataCollectionClonedEvent$1;
|
|
2897
|
-
/**
|
|
2898
|
-
* Event triggered when collection is cloned from other instance
|
|
2899
|
-
* CREATED event will be also triggered along with this action
|
|
2900
|
-
*/
|
|
2901
|
-
declare const onDataCollectionClonedEvent: ReturnType<typeof createEventModule$1<_publicOnDataCollectionClonedEventType>>;
|
|
2902
|
-
|
|
2903
|
-
type _publicOnDataCollectionChangedEventType = typeof onDataCollectionChangedEvent$1;
|
|
2904
|
-
/**
|
|
2905
|
-
* Event triggered when collection is changed, describing some of changes
|
|
2906
|
-
* UPDATED event will be also triggered along with this action
|
|
2907
|
-
*/
|
|
2908
|
-
declare const onDataCollectionChangedEvent: ReturnType<typeof createEventModule$1<_publicOnDataCollectionChangedEventType>>;
|
|
2909
|
-
|
|
2910
|
-
type _publicOnDataCollectionCreatedType = typeof onDataCollectionCreated$1;
|
|
2911
|
-
/** */
|
|
2912
|
-
declare const onDataCollectionCreated: ReturnType<typeof createEventModule$1<_publicOnDataCollectionCreatedType>>;
|
|
2913
|
-
|
|
2914
|
-
type _publicOnDataCollectionUpdatedType = typeof onDataCollectionUpdated$1;
|
|
2915
|
-
/** */
|
|
2916
|
-
declare const onDataCollectionUpdated: ReturnType<typeof createEventModule$1<_publicOnDataCollectionUpdatedType>>;
|
|
2917
|
-
|
|
2918
|
-
type _publicOnDataCollectionDeletedType = typeof onDataCollectionDeleted$1;
|
|
2919
|
-
/** */
|
|
2920
|
-
declare const onDataCollectionDeleted: ReturnType<typeof createEventModule$1<_publicOnDataCollectionDeletedType>>;
|
|
2340
|
+
declare const createDataCollection: MaybeContext<BuildRESTFunction<typeof createDataCollection$1> & typeof createDataCollection$1>;
|
|
2341
|
+
declare const getDataCollection: MaybeContext<BuildRESTFunction<typeof getDataCollection$1> & typeof getDataCollection$1>;
|
|
2342
|
+
declare const listDataCollections: MaybeContext<BuildRESTFunction<typeof listDataCollections$1> & typeof listDataCollections$1>;
|
|
2343
|
+
declare const updateDataCollection: MaybeContext<BuildRESTFunction<typeof updateDataCollection$1> & typeof updateDataCollection$1>;
|
|
2344
|
+
declare const deleteDataCollection: MaybeContext<BuildRESTFunction<typeof deleteDataCollection$1> & typeof deleteDataCollection$1>;
|
|
2921
2345
|
|
|
2922
2346
|
type index_d$2_AccessLevel = AccessLevel;
|
|
2923
2347
|
declare const index_d$2_AccessLevel: typeof AccessLevel;
|
|
@@ -2945,14 +2369,9 @@ type index_d$2_CreateDataCollectionsSnapshotResponse = CreateDataCollectionsSnap
|
|
|
2945
2369
|
type index_d$2_CreateMigratedCollectionsSnapshotRequest = CreateMigratedCollectionsSnapshotRequest;
|
|
2946
2370
|
type index_d$2_CreateMigratedCollectionsSnapshotResponse = CreateMigratedCollectionsSnapshotResponse;
|
|
2947
2371
|
type index_d$2_DataCollection = DataCollection;
|
|
2948
|
-
type index_d$2_DataCollectionChangedEnvelope = DataCollectionChangedEnvelope;
|
|
2949
2372
|
type index_d$2_DataCollectionChangedEvent = DataCollectionChangedEvent;
|
|
2950
|
-
type index_d$2_DataCollectionClonedEnvelope = DataCollectionClonedEnvelope;
|
|
2951
2373
|
type index_d$2_DataCollectionClonedEvent = DataCollectionClonedEvent;
|
|
2952
|
-
type index_d$2_DataCollectionCreatedEnvelope = DataCollectionCreatedEnvelope;
|
|
2953
|
-
type index_d$2_DataCollectionDeletedEnvelope = DataCollectionDeletedEnvelope;
|
|
2954
2374
|
type index_d$2_DataCollectionNonNullableFields = DataCollectionNonNullableFields;
|
|
2955
|
-
type index_d$2_DataCollectionUpdatedEnvelope = DataCollectionUpdatedEnvelope;
|
|
2956
2375
|
type index_d$2_DataOperation = DataOperation;
|
|
2957
2376
|
declare const index_d$2_DataOperation: typeof DataOperation;
|
|
2958
2377
|
type index_d$2_DataPermissions = DataPermissions;
|
|
@@ -3029,536 +2448,48 @@ type index_d$2_UrlizedOnlyPattern = UrlizedOnlyPattern;
|
|
|
3029
2448
|
type index_d$2_UrlizedPluginOptions = UrlizedPluginOptions;
|
|
3030
2449
|
type index_d$2__Array = _Array;
|
|
3031
2450
|
type index_d$2__Object = _Object;
|
|
3032
|
-
type index_d$2__publicOnDataCollectionChangedEventType = _publicOnDataCollectionChangedEventType;
|
|
3033
|
-
type index_d$2__publicOnDataCollectionClonedEventType = _publicOnDataCollectionClonedEventType;
|
|
3034
|
-
type index_d$2__publicOnDataCollectionCreatedType = _publicOnDataCollectionCreatedType;
|
|
3035
|
-
type index_d$2__publicOnDataCollectionDeletedType = _publicOnDataCollectionDeletedType;
|
|
3036
|
-
type index_d$2__publicOnDataCollectionUpdatedType = _publicOnDataCollectionUpdatedType;
|
|
3037
2451
|
declare const index_d$2_createDataCollection: typeof createDataCollection;
|
|
3038
2452
|
declare const index_d$2_deleteDataCollection: typeof deleteDataCollection;
|
|
3039
2453
|
declare const index_d$2_getDataCollection: typeof getDataCollection;
|
|
3040
2454
|
declare const index_d$2_listDataCollections: typeof listDataCollections;
|
|
3041
|
-
declare const index_d$2_onDataCollectionChangedEvent: typeof onDataCollectionChangedEvent;
|
|
3042
|
-
declare const index_d$2_onDataCollectionClonedEvent: typeof onDataCollectionClonedEvent;
|
|
3043
|
-
declare const index_d$2_onDataCollectionCreated: typeof onDataCollectionCreated;
|
|
3044
|
-
declare const index_d$2_onDataCollectionDeleted: typeof onDataCollectionDeleted;
|
|
3045
|
-
declare const index_d$2_onDataCollectionUpdated: typeof onDataCollectionUpdated;
|
|
3046
2455
|
declare const index_d$2_updateDataCollection: typeof updateDataCollection;
|
|
3047
2456
|
declare namespace index_d$2 {
|
|
3048
|
-
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
|
|
2457
|
+
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 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_DataCollectionChangedEvent as DataCollectionChangedEvent, type index_d$2_DataCollectionClonedEvent as DataCollectionClonedEvent, type index_d$2_DataCollectionNonNullableFields as DataCollectionNonNullableFields, 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 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, index_d$2_Segment as Segment, 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, 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_updateDataCollection as updateDataCollection };
|
|
3049
2458
|
}
|
|
3050
2459
|
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
};
|
|
3055
|
-
type HostModuleAPI$1<T extends HostModule$1<any, any>> = T extends HostModule$1<infer U, any> ? U : never;
|
|
3056
|
-
type Host$1<Environment = unknown> = {
|
|
3057
|
-
channel: {
|
|
3058
|
-
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
3059
|
-
disconnect: () => void;
|
|
3060
|
-
} | Promise<{
|
|
3061
|
-
disconnect: () => void;
|
|
3062
|
-
}>;
|
|
3063
|
-
};
|
|
3064
|
-
environment?: Environment;
|
|
3065
|
-
/**
|
|
3066
|
-
* Optional name of the environment, use for logging
|
|
3067
|
-
*/
|
|
3068
|
-
name?: string;
|
|
2460
|
+
interface DataItem {
|
|
2461
|
+
/** Data item ID. */
|
|
2462
|
+
_id?: string;
|
|
3069
2463
|
/**
|
|
3070
|
-
*
|
|
2464
|
+
* ID of the collection this item belongs to
|
|
2465
|
+
* @readonly
|
|
3071
2466
|
*/
|
|
3072
|
-
|
|
2467
|
+
dataCollectionId?: string;
|
|
3073
2468
|
/**
|
|
3074
|
-
*
|
|
3075
|
-
*
|
|
2469
|
+
* Data item contents.
|
|
2470
|
+
*
|
|
2471
|
+
* Property-value pairs representing the data item's payload. When retrieving a data item, it also includes the following read-only fields:
|
|
2472
|
+
*
|
|
2473
|
+
* + `_id`: Item ID.
|
|
2474
|
+
* + `_createdDate`: Date and time the item was added to the collection.
|
|
2475
|
+
* + `_updatedDate`: Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.
|
|
2476
|
+
* + `_ownerId`: ID of the user who created the item. Can be modified with site owner permissions.
|
|
3076
2477
|
*/
|
|
3077
|
-
|
|
3078
|
-
/**
|
|
3079
|
-
* The language of the currently viewed session
|
|
3080
|
-
*/
|
|
3081
|
-
language?: string;
|
|
3082
|
-
/**
|
|
3083
|
-
* The locale of the currently viewed session
|
|
3084
|
-
*/
|
|
3085
|
-
locale?: string;
|
|
3086
|
-
/**
|
|
3087
|
-
* Any headers that should be passed through to the API requests
|
|
3088
|
-
*/
|
|
3089
|
-
passThroughHeaders?: Record<string, string>;
|
|
3090
|
-
};
|
|
3091
|
-
};
|
|
3092
|
-
|
|
3093
|
-
type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
|
|
3094
|
-
interface HttpClient$1 {
|
|
3095
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
3096
|
-
fetchWithAuth: typeof fetch;
|
|
3097
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
3098
|
-
getActiveToken?: () => string | undefined;
|
|
2478
|
+
data?: Record<string, any> | null;
|
|
3099
2479
|
}
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
} & APIMetadata$1;
|
|
3114
|
-
type APIMetadata$1 = {
|
|
3115
|
-
methodFqn?: string;
|
|
3116
|
-
entityFqdn?: string;
|
|
3117
|
-
packageName?: string;
|
|
3118
|
-
};
|
|
3119
|
-
type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
|
|
3120
|
-
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
3121
|
-
__type: 'event-definition';
|
|
3122
|
-
type: Type;
|
|
3123
|
-
isDomainEvent?: boolean;
|
|
3124
|
-
transformations?: (envelope: unknown) => Payload;
|
|
3125
|
-
__payload: Payload;
|
|
3126
|
-
};
|
|
3127
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
3128
|
-
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
3129
|
-
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
3130
|
-
|
|
3131
|
-
type ServicePluginMethodInput$1 = {
|
|
3132
|
-
request: any;
|
|
3133
|
-
metadata: any;
|
|
3134
|
-
};
|
|
3135
|
-
type ServicePluginContract$1 = Record<string, (payload: ServicePluginMethodInput$1) => unknown | Promise<unknown>>;
|
|
3136
|
-
type ServicePluginMethodMetadata$1 = {
|
|
3137
|
-
name: string;
|
|
3138
|
-
primaryHttpMappingPath: string;
|
|
3139
|
-
transformations: {
|
|
3140
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput$1;
|
|
3141
|
-
toREST: (...args: unknown[]) => unknown;
|
|
3142
|
-
};
|
|
3143
|
-
};
|
|
3144
|
-
type ServicePluginDefinition$1<Contract extends ServicePluginContract$1> = {
|
|
3145
|
-
__type: 'service-plugin-definition';
|
|
3146
|
-
componentType: string;
|
|
3147
|
-
methods: ServicePluginMethodMetadata$1[];
|
|
3148
|
-
__contract: Contract;
|
|
3149
|
-
};
|
|
3150
|
-
declare function ServicePluginDefinition$1<Contract extends ServicePluginContract$1>(componentType: string, methods: ServicePluginMethodMetadata$1[]): ServicePluginDefinition$1<Contract>;
|
|
3151
|
-
type BuildServicePluginDefinition$1<T extends ServicePluginDefinition$1<any>> = (implementation: T['__contract']) => void;
|
|
3152
|
-
declare const SERVICE_PLUGIN_ERROR_TYPE$1 = "wix_spi_error";
|
|
3153
|
-
|
|
3154
|
-
type RequestContext$1 = {
|
|
3155
|
-
isSSR: boolean;
|
|
3156
|
-
host: string;
|
|
3157
|
-
protocol?: string;
|
|
3158
|
-
};
|
|
3159
|
-
type ResponseTransformer$1 = (data: any, headers?: any) => any;
|
|
3160
|
-
/**
|
|
3161
|
-
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
3162
|
-
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
3163
|
-
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
3164
|
-
*/
|
|
3165
|
-
type Method$1 = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
3166
|
-
type AmbassadorRequestOptions$1<T = any> = {
|
|
3167
|
-
_?: T;
|
|
3168
|
-
url?: string;
|
|
3169
|
-
method?: Method$1;
|
|
3170
|
-
params?: any;
|
|
3171
|
-
data?: any;
|
|
3172
|
-
transformResponse?: ResponseTransformer$1 | ResponseTransformer$1[];
|
|
3173
|
-
};
|
|
3174
|
-
type AmbassadorFactory$1<Request, Response> = (payload: Request) => ((context: RequestContext$1) => AmbassadorRequestOptions$1<Response>) & {
|
|
3175
|
-
__isAmbassador: boolean;
|
|
3176
|
-
};
|
|
3177
|
-
type AmbassadorFunctionDescriptor$1<Request = any, Response = any> = AmbassadorFactory$1<Request, Response>;
|
|
3178
|
-
type BuildAmbassadorFunction$1<T extends AmbassadorFunctionDescriptor$1> = T extends AmbassadorFunctionDescriptor$1<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
3179
|
-
|
|
3180
|
-
declare global {
|
|
3181
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
3182
|
-
interface SymbolConstructor {
|
|
3183
|
-
readonly observable: symbol;
|
|
3184
|
-
}
|
|
3185
|
-
}
|
|
3186
|
-
|
|
3187
|
-
declare const emptyObjectSymbol$1: unique symbol;
|
|
3188
|
-
|
|
3189
|
-
/**
|
|
3190
|
-
Represents a strictly empty plain object, the `{}` value.
|
|
3191
|
-
|
|
3192
|
-
When you annotate something as the type `{}`, it can be anything except `null` and `undefined`. This means that you cannot use `{}` to represent an empty plain object ([read more](https://stackoverflow.com/questions/47339869/typescript-empty-object-and-any-difference/52193484#52193484)).
|
|
3193
|
-
|
|
3194
|
-
@example
|
|
3195
|
-
```
|
|
3196
|
-
import type {EmptyObject} from 'type-fest';
|
|
3197
|
-
|
|
3198
|
-
// The following illustrates the problem with `{}`.
|
|
3199
|
-
const foo1: {} = {}; // Pass
|
|
3200
|
-
const foo2: {} = []; // Pass
|
|
3201
|
-
const foo3: {} = 42; // Pass
|
|
3202
|
-
const foo4: {} = {a: 1}; // Pass
|
|
3203
|
-
|
|
3204
|
-
// With `EmptyObject` only the first case is valid.
|
|
3205
|
-
const bar1: EmptyObject = {}; // Pass
|
|
3206
|
-
const bar2: EmptyObject = 42; // Fail
|
|
3207
|
-
const bar3: EmptyObject = []; // Fail
|
|
3208
|
-
const bar4: EmptyObject = {a: 1}; // Fail
|
|
3209
|
-
```
|
|
3210
|
-
|
|
3211
|
-
Unfortunately, `Record<string, never>`, `Record<keyof any, never>` and `Record<never, never>` do not work. See {@link https://github.com/sindresorhus/type-fest/issues/395 #395}.
|
|
3212
|
-
|
|
3213
|
-
@category Object
|
|
3214
|
-
*/
|
|
3215
|
-
type EmptyObject$1 = {[emptyObjectSymbol$1]?: never};
|
|
3216
|
-
|
|
3217
|
-
/**
|
|
3218
|
-
Returns a boolean for whether the two given types are equal.
|
|
3219
|
-
|
|
3220
|
-
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
3221
|
-
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
3222
|
-
|
|
3223
|
-
Use-cases:
|
|
3224
|
-
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
3225
|
-
|
|
3226
|
-
@example
|
|
3227
|
-
```
|
|
3228
|
-
import type {IsEqual} from 'type-fest';
|
|
3229
|
-
|
|
3230
|
-
// This type returns a boolean for whether the given array includes the given item.
|
|
3231
|
-
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
3232
|
-
type Includes<Value extends readonly any[], Item> =
|
|
3233
|
-
Value extends readonly [Value[0], ...infer rest]
|
|
3234
|
-
? IsEqual<Value[0], Item> extends true
|
|
3235
|
-
? true
|
|
3236
|
-
: Includes<rest, Item>
|
|
3237
|
-
: false;
|
|
3238
|
-
```
|
|
3239
|
-
|
|
3240
|
-
@category Type Guard
|
|
3241
|
-
@category Utilities
|
|
3242
|
-
*/
|
|
3243
|
-
type IsEqual$1<A, B> =
|
|
3244
|
-
(<G>() => G extends A ? 1 : 2) extends
|
|
3245
|
-
(<G>() => G extends B ? 1 : 2)
|
|
3246
|
-
? true
|
|
3247
|
-
: false;
|
|
3248
|
-
|
|
3249
|
-
/**
|
|
3250
|
-
Filter out keys from an object.
|
|
3251
|
-
|
|
3252
|
-
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
3253
|
-
Returns `never` if `Key` extends `Exclude`.
|
|
3254
|
-
Returns `Key` otherwise.
|
|
3255
|
-
|
|
3256
|
-
@example
|
|
3257
|
-
```
|
|
3258
|
-
type Filtered = Filter<'foo', 'foo'>;
|
|
3259
|
-
//=> never
|
|
3260
|
-
```
|
|
3261
|
-
|
|
3262
|
-
@example
|
|
3263
|
-
```
|
|
3264
|
-
type Filtered = Filter<'bar', string>;
|
|
3265
|
-
//=> never
|
|
3266
|
-
```
|
|
3267
|
-
|
|
3268
|
-
@example
|
|
3269
|
-
```
|
|
3270
|
-
type Filtered = Filter<'bar', 'foo'>;
|
|
3271
|
-
//=> 'bar'
|
|
3272
|
-
```
|
|
3273
|
-
|
|
3274
|
-
@see {Except}
|
|
3275
|
-
*/
|
|
3276
|
-
type Filter$1<KeyType, ExcludeType> = IsEqual$1<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
3277
|
-
|
|
3278
|
-
type ExceptOptions$1 = {
|
|
3279
|
-
/**
|
|
3280
|
-
Disallow assigning non-specified properties.
|
|
3281
|
-
|
|
3282
|
-
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
3283
|
-
|
|
3284
|
-
@default false
|
|
3285
|
-
*/
|
|
3286
|
-
requireExactProps?: boolean;
|
|
3287
|
-
};
|
|
3288
|
-
|
|
3289
|
-
/**
|
|
3290
|
-
Create a type from an object type without certain keys.
|
|
3291
|
-
|
|
3292
|
-
We recommend setting the `requireExactProps` option to `true`.
|
|
3293
|
-
|
|
3294
|
-
This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.
|
|
3295
|
-
|
|
3296
|
-
This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)).
|
|
3297
|
-
|
|
3298
|
-
@example
|
|
3299
|
-
```
|
|
3300
|
-
import type {Except} from 'type-fest';
|
|
3301
|
-
|
|
3302
|
-
type Foo = {
|
|
3303
|
-
a: number;
|
|
3304
|
-
b: string;
|
|
3305
|
-
};
|
|
3306
|
-
|
|
3307
|
-
type FooWithoutA = Except<Foo, 'a'>;
|
|
3308
|
-
//=> {b: string}
|
|
3309
|
-
|
|
3310
|
-
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
3311
|
-
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
3312
|
-
|
|
3313
|
-
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
3314
|
-
//=> {a: number} & Partial<Record<"b", never>>
|
|
3315
|
-
|
|
3316
|
-
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
3317
|
-
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
3318
|
-
```
|
|
3319
|
-
|
|
3320
|
-
@category Object
|
|
3321
|
-
*/
|
|
3322
|
-
type Except$1<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions$1 = {requireExactProps: false}> = {
|
|
3323
|
-
[KeyType in keyof ObjectType as Filter$1<KeyType, KeysType>]: ObjectType[KeyType];
|
|
3324
|
-
} & (Options['requireExactProps'] extends true
|
|
3325
|
-
? Partial<Record<KeysType, never>>
|
|
3326
|
-
: {});
|
|
3327
|
-
|
|
3328
|
-
/**
|
|
3329
|
-
Returns a boolean for whether the given type is `never`.
|
|
3330
|
-
|
|
3331
|
-
@link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
|
|
3332
|
-
@link https://stackoverflow.com/a/53984913/10292952
|
|
3333
|
-
@link https://www.zhenghao.io/posts/ts-never
|
|
3334
|
-
|
|
3335
|
-
Useful in type utilities, such as checking if something does not occur.
|
|
3336
|
-
|
|
3337
|
-
@example
|
|
3338
|
-
```
|
|
3339
|
-
import type {IsNever, And} from 'type-fest';
|
|
3340
|
-
|
|
3341
|
-
// https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
|
|
3342
|
-
type AreStringsEqual<A extends string, B extends string> =
|
|
3343
|
-
And<
|
|
3344
|
-
IsNever<Exclude<A, B>> extends true ? true : false,
|
|
3345
|
-
IsNever<Exclude<B, A>> extends true ? true : false
|
|
3346
|
-
>;
|
|
3347
|
-
|
|
3348
|
-
type EndIfEqual<I extends string, O extends string> =
|
|
3349
|
-
AreStringsEqual<I, O> extends true
|
|
3350
|
-
? never
|
|
3351
|
-
: void;
|
|
3352
|
-
|
|
3353
|
-
function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
|
|
3354
|
-
if (input === output) {
|
|
3355
|
-
process.exit(0);
|
|
3356
|
-
}
|
|
3357
|
-
}
|
|
3358
|
-
|
|
3359
|
-
endIfEqual('abc', 'abc');
|
|
3360
|
-
//=> never
|
|
3361
|
-
|
|
3362
|
-
endIfEqual('abc', '123');
|
|
3363
|
-
//=> void
|
|
3364
|
-
```
|
|
3365
|
-
|
|
3366
|
-
@category Type Guard
|
|
3367
|
-
@category Utilities
|
|
3368
|
-
*/
|
|
3369
|
-
type IsNever$1<T> = [T] extends [never] ? true : false;
|
|
3370
|
-
|
|
3371
|
-
/**
|
|
3372
|
-
An if-else-like type that resolves depending on whether the given type is `never`.
|
|
3373
|
-
|
|
3374
|
-
@see {@link IsNever}
|
|
3375
|
-
|
|
3376
|
-
@example
|
|
3377
|
-
```
|
|
3378
|
-
import type {IfNever} from 'type-fest';
|
|
3379
|
-
|
|
3380
|
-
type ShouldBeTrue = IfNever<never>;
|
|
3381
|
-
//=> true
|
|
3382
|
-
|
|
3383
|
-
type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
|
|
3384
|
-
//=> 'bar'
|
|
3385
|
-
```
|
|
3386
|
-
|
|
3387
|
-
@category Type Guard
|
|
3388
|
-
@category Utilities
|
|
3389
|
-
*/
|
|
3390
|
-
type IfNever$1<T, TypeIfNever = true, TypeIfNotNever = false> = (
|
|
3391
|
-
IsNever$1<T> extends true ? TypeIfNever : TypeIfNotNever
|
|
3392
|
-
);
|
|
3393
|
-
|
|
3394
|
-
/**
|
|
3395
|
-
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
3396
|
-
|
|
3397
|
-
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
3398
|
-
|
|
3399
|
-
@example
|
|
3400
|
-
```
|
|
3401
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
3402
|
-
|
|
3403
|
-
interface Example {
|
|
3404
|
-
a: string;
|
|
3405
|
-
b: string | number;
|
|
3406
|
-
c?: string;
|
|
3407
|
-
d: {};
|
|
3408
|
-
}
|
|
3409
|
-
|
|
3410
|
-
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
3411
|
-
//=> 'a'
|
|
3412
|
-
```
|
|
3413
|
-
|
|
3414
|
-
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
3415
|
-
|
|
3416
|
-
@example
|
|
3417
|
-
```
|
|
3418
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
3419
|
-
|
|
3420
|
-
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
3421
|
-
//=> 'a' | 'c'
|
|
3422
|
-
```
|
|
3423
|
-
|
|
3424
|
-
@category Object
|
|
3425
|
-
*/
|
|
3426
|
-
type ConditionalKeys$1<Base, Condition> =
|
|
3427
|
-
{
|
|
3428
|
-
// Map through all the keys of the given base type.
|
|
3429
|
-
[Key in keyof Base]-?:
|
|
3430
|
-
// Pick only keys with types extending the given `Condition` type.
|
|
3431
|
-
Base[Key] extends Condition
|
|
3432
|
-
// Retain this key
|
|
3433
|
-
// If the value for the key extends never, only include it if `Condition` also extends never
|
|
3434
|
-
? IfNever$1<Base[Key], IfNever$1<Condition, Key, never>, Key>
|
|
3435
|
-
// Discard this key since the condition fails.
|
|
3436
|
-
: never;
|
|
3437
|
-
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
3438
|
-
}[keyof Base];
|
|
3439
|
-
|
|
3440
|
-
/**
|
|
3441
|
-
Exclude keys from a shape that matches the given `Condition`.
|
|
3442
|
-
|
|
3443
|
-
This is useful when you want to create a new type with a specific set of keys from a shape. For example, you might want to exclude all the primitive properties from a class and form a new shape containing everything but the primitive properties.
|
|
3444
|
-
|
|
3445
|
-
@example
|
|
3446
|
-
```
|
|
3447
|
-
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
3448
|
-
|
|
3449
|
-
class Awesome {
|
|
3450
|
-
name: string;
|
|
3451
|
-
successes: number;
|
|
3452
|
-
failures: bigint;
|
|
3453
|
-
|
|
3454
|
-
run() {}
|
|
3455
|
-
}
|
|
3456
|
-
|
|
3457
|
-
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
|
|
3458
|
-
//=> {run: () => void}
|
|
3459
|
-
```
|
|
3460
|
-
|
|
3461
|
-
@example
|
|
3462
|
-
```
|
|
3463
|
-
import type {ConditionalExcept} from 'type-fest';
|
|
3464
|
-
|
|
3465
|
-
interface Example {
|
|
3466
|
-
a: string;
|
|
3467
|
-
b: string | number;
|
|
3468
|
-
c: () => void;
|
|
3469
|
-
d: {};
|
|
3470
|
-
}
|
|
3471
|
-
|
|
3472
|
-
type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
3473
|
-
//=> {b: string | number; c: () => void; d: {}}
|
|
3474
|
-
```
|
|
3475
|
-
|
|
3476
|
-
@category Object
|
|
3477
|
-
*/
|
|
3478
|
-
type ConditionalExcept$1<Base, Condition> = Except$1<
|
|
3479
|
-
Base,
|
|
3480
|
-
ConditionalKeys$1<Base, Condition>
|
|
3481
|
-
>;
|
|
3482
|
-
|
|
3483
|
-
/**
|
|
3484
|
-
* Descriptors are objects that describe the API of a module, and the module
|
|
3485
|
-
* can either be a REST module or a host module.
|
|
3486
|
-
* This type is recursive, so it can describe nested modules.
|
|
3487
|
-
*/
|
|
3488
|
-
type Descriptors$1 = RESTFunctionDescriptor$1 | AmbassadorFunctionDescriptor$1 | HostModule$1<any, any> | EventDefinition$1<any> | ServicePluginDefinition$1<any> | {
|
|
3489
|
-
[key: string]: Descriptors$1 | PublicMetadata$1 | any;
|
|
3490
|
-
};
|
|
3491
|
-
/**
|
|
3492
|
-
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
3493
|
-
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
3494
|
-
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
3495
|
-
* do not match the given host (as they will not work with the given host).
|
|
3496
|
-
*/
|
|
3497
|
-
type BuildDescriptors$1<T extends Descriptors$1, H extends Host$1<any> | undefined, Depth extends number = 5> = {
|
|
3498
|
-
done: T;
|
|
3499
|
-
recurse: T extends {
|
|
3500
|
-
__type: typeof SERVICE_PLUGIN_ERROR_TYPE$1;
|
|
3501
|
-
} ? never : T extends AmbassadorFunctionDescriptor$1 ? BuildAmbassadorFunction$1<T> : T extends RESTFunctionDescriptor$1 ? BuildRESTFunction$1<T> : T extends EventDefinition$1<any> ? BuildEventDefinition$1<T> : T extends ServicePluginDefinition$1<any> ? BuildServicePluginDefinition$1<T> : T extends HostModule$1<any, any> ? HostModuleAPI$1<T> : ConditionalExcept$1<{
|
|
3502
|
-
[Key in keyof T]: T[Key] extends Descriptors$1 ? BuildDescriptors$1<T[Key], H, [
|
|
3503
|
-
-1,
|
|
3504
|
-
0,
|
|
3505
|
-
1,
|
|
3506
|
-
2,
|
|
3507
|
-
3,
|
|
3508
|
-
4,
|
|
3509
|
-
5
|
|
3510
|
-
][Depth]> : never;
|
|
3511
|
-
}, EmptyObject$1>;
|
|
3512
|
-
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
3513
|
-
type PublicMetadata$1 = {
|
|
3514
|
-
PACKAGE_NAME?: string;
|
|
3515
|
-
};
|
|
3516
|
-
|
|
3517
|
-
declare global {
|
|
3518
|
-
interface ContextualClient {
|
|
3519
|
-
}
|
|
3520
|
-
}
|
|
3521
|
-
/**
|
|
3522
|
-
* A type used to create concerete types from SDK descriptors in
|
|
3523
|
-
* case a contextual client is available.
|
|
3524
|
-
*/
|
|
3525
|
-
type MaybeContext$1<T extends Descriptors$1> = globalThis.ContextualClient extends {
|
|
3526
|
-
host: Host$1;
|
|
3527
|
-
} ? BuildDescriptors$1<T, globalThis.ContextualClient['host']> : T;
|
|
3528
|
-
|
|
3529
|
-
interface DataItem {
|
|
3530
|
-
/** Data item ID. */
|
|
3531
|
-
_id?: string;
|
|
3532
|
-
/**
|
|
3533
|
-
* ID of the collection this item belongs to
|
|
3534
|
-
* @readonly
|
|
3535
|
-
*/
|
|
3536
|
-
dataCollectionId?: string;
|
|
3537
|
-
/**
|
|
3538
|
-
* Data item contents.
|
|
3539
|
-
*
|
|
3540
|
-
* Property-value pairs representing the data item's payload. When retrieving a data item, it also includes the following read-only fields:
|
|
3541
|
-
*
|
|
3542
|
-
* + `_id`: Item ID.
|
|
3543
|
-
* + `_createdDate`: Date and time the item was added to the collection.
|
|
3544
|
-
* + `_updatedDate`: Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have the same value.
|
|
3545
|
-
* + `_ownerId`: ID of the user who created the item. Can be modified with site owner permissions.
|
|
3546
|
-
*/
|
|
3547
|
-
data?: Record<string, any> | null;
|
|
3548
|
-
}
|
|
3549
|
-
interface InsertDataItemRequest {
|
|
3550
|
-
/** ID of the collection in which to insert the item. */
|
|
3551
|
-
dataCollectionId: string;
|
|
3552
|
-
/** Item to insert. */
|
|
3553
|
-
dataItem: DataItem;
|
|
3554
|
-
/**
|
|
3555
|
-
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
3556
|
-
*
|
|
3557
|
-
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
3558
|
-
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
3559
|
-
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
3560
|
-
*/
|
|
3561
|
-
appOptions?: Record<string, any> | null;
|
|
2480
|
+
interface InsertDataItemRequest {
|
|
2481
|
+
/** ID of the collection in which to insert the item. */
|
|
2482
|
+
dataCollectionId: string;
|
|
2483
|
+
/** Item to insert. */
|
|
2484
|
+
dataItem: DataItem;
|
|
2485
|
+
/**
|
|
2486
|
+
* Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying.
|
|
2487
|
+
*
|
|
2488
|
+
* When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
|
|
2489
|
+
* - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
|
|
2490
|
+
* - `includeVariants`: Whether to include product variants in the query. Default: `false`.
|
|
2491
|
+
*/
|
|
2492
|
+
appOptions?: Record<string, any> | null;
|
|
3562
2493
|
}
|
|
3563
2494
|
declare enum Environment$1 {
|
|
3564
2495
|
LIVE = "LIVE",
|
|
@@ -5463,7 +4394,7 @@ interface ReplaceDataItemReferencesOptions {
|
|
|
5463
4394
|
newReferencedItemIds?: string[];
|
|
5464
4395
|
}
|
|
5465
4396
|
|
|
5466
|
-
declare function insertDataItem$1(httpClient: HttpClient
|
|
4397
|
+
declare function insertDataItem$1(httpClient: HttpClient): InsertDataItemSignature;
|
|
5467
4398
|
interface InsertDataItemSignature {
|
|
5468
4399
|
/**
|
|
5469
4400
|
* Adds an item to a collection.
|
|
@@ -5481,7 +4412,7 @@ interface InsertDataItemSignature {
|
|
|
5481
4412
|
*/
|
|
5482
4413
|
(options?: InsertDataItemOptions | undefined): Promise<InsertDataItemResponse & InsertDataItemResponseNonNullableFields>;
|
|
5483
4414
|
}
|
|
5484
|
-
declare function updateDataItem$1(httpClient: HttpClient
|
|
4415
|
+
declare function updateDataItem$1(httpClient: HttpClient): UpdateDataItemSignature;
|
|
5485
4416
|
interface UpdateDataItemSignature {
|
|
5486
4417
|
/**
|
|
5487
4418
|
* Updates an item in a collection.
|
|
@@ -5503,7 +4434,7 @@ interface UpdateDataItemSignature {
|
|
|
5503
4434
|
*/
|
|
5504
4435
|
(_id: string, options?: UpdateDataItemOptions | undefined): Promise<UpdateDataItemResponse & UpdateDataItemResponseNonNullableFields>;
|
|
5505
4436
|
}
|
|
5506
|
-
declare function saveDataItem$1(httpClient: HttpClient
|
|
4437
|
+
declare function saveDataItem$1(httpClient: HttpClient): SaveDataItemSignature;
|
|
5507
4438
|
interface SaveDataItemSignature {
|
|
5508
4439
|
/**
|
|
5509
4440
|
* Inserts or updates an item in a collection.
|
|
@@ -5523,7 +4454,7 @@ interface SaveDataItemSignature {
|
|
|
5523
4454
|
*/
|
|
5524
4455
|
(options?: SaveDataItemOptions | undefined): Promise<SaveDataItemResponse & SaveDataItemResponseNonNullableFields>;
|
|
5525
4456
|
}
|
|
5526
|
-
declare function getDataItem$1(httpClient: HttpClient
|
|
4457
|
+
declare function getDataItem$1(httpClient: HttpClient): GetDataItemSignature;
|
|
5527
4458
|
interface GetDataItemSignature {
|
|
5528
4459
|
/**
|
|
5529
4460
|
* Retrieves an item from a collection.
|
|
@@ -5536,7 +4467,7 @@ interface GetDataItemSignature {
|
|
|
5536
4467
|
*/
|
|
5537
4468
|
(dataItemId: string, options?: GetDataItemOptions | undefined): Promise<DataItem & DataItemNonNullableFields>;
|
|
5538
4469
|
}
|
|
5539
|
-
declare function removeDataItem$1(httpClient: HttpClient
|
|
4470
|
+
declare function removeDataItem$1(httpClient: HttpClient): RemoveDataItemSignature;
|
|
5540
4471
|
interface RemoveDataItemSignature {
|
|
5541
4472
|
/**
|
|
5542
4473
|
* Removes an item from a collection.
|
|
@@ -5551,7 +4482,7 @@ interface RemoveDataItemSignature {
|
|
|
5551
4482
|
*/
|
|
5552
4483
|
(dataItemId: string, options?: RemoveDataItemOptions | undefined): Promise<RemoveDataItemResponse & RemoveDataItemResponseNonNullableFields>;
|
|
5553
4484
|
}
|
|
5554
|
-
declare function truncateDataItems$1(httpClient: HttpClient
|
|
4485
|
+
declare function truncateDataItems$1(httpClient: HttpClient): TruncateDataItemsSignature;
|
|
5555
4486
|
interface TruncateDataItemsSignature {
|
|
5556
4487
|
/**
|
|
5557
4488
|
* Removes all items from a collection.
|
|
@@ -5565,7 +4496,7 @@ interface TruncateDataItemsSignature {
|
|
|
5565
4496
|
*/
|
|
5566
4497
|
(options: TruncateDataItemsOptions): Promise<void>;
|
|
5567
4498
|
}
|
|
5568
|
-
declare function queryDataItems$1(httpClient: HttpClient
|
|
4499
|
+
declare function queryDataItems$1(httpClient: HttpClient): QueryDataItemsSignature;
|
|
5569
4500
|
interface QueryDataItemsSignature {
|
|
5570
4501
|
/**
|
|
5571
4502
|
* Creates a query to retrieve items from a database collection.
|
|
@@ -5593,7 +4524,7 @@ interface QueryDataItemsSignature {
|
|
|
5593
4524
|
*/
|
|
5594
4525
|
(options: QueryDataItemsOptions): DataItemsQueryBuilder;
|
|
5595
4526
|
}
|
|
5596
|
-
declare function aggregateDataItems$1(httpClient: HttpClient
|
|
4527
|
+
declare function aggregateDataItems$1(httpClient: HttpClient): AggregateDataItemsSignature;
|
|
5597
4528
|
interface AggregateDataItemsSignature {
|
|
5598
4529
|
/**
|
|
5599
4530
|
* Runs an aggregation on a data collection and returns the resulting list of items.
|
|
@@ -5605,888 +4536,410 @@ interface AggregateDataItemsSignature {
|
|
|
5605
4536
|
*/
|
|
5606
4537
|
(options?: AggregateDataItemsOptions | undefined): Promise<AggregateDataItemsResponse>;
|
|
5607
4538
|
}
|
|
5608
|
-
declare function countDataItems$1(httpClient: HttpClient
|
|
5609
|
-
interface CountDataItemsSignature {
|
|
5610
|
-
/**
|
|
5611
|
-
* Counts the number of items in a data collection that match the provided filtering preferences.
|
|
5612
|
-
*
|
|
5613
|
-
* > **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`.
|
|
5614
|
-
* @param - Options for counting the number of items in a data collection.
|
|
5615
|
-
*/
|
|
5616
|
-
(options?: CountDataItemsOptions | undefined): Promise<CountDataItemsResponse & CountDataItemsResponseNonNullableFields>;
|
|
5617
|
-
}
|
|
5618
|
-
declare function queryDistinctValues$1(httpClient: HttpClient$1): QueryDistinctValuesSignature;
|
|
5619
|
-
interface QueryDistinctValuesSignature {
|
|
5620
|
-
/**
|
|
5621
|
-
* Retrieves a list of distinct values for a given field in all items that match a query, without duplicates.
|
|
5622
|
-
*
|
|
5623
|
-
*
|
|
5624
|
-
* As with `queryDataItems()`, this endpoint retrieves items based on the filtering, sorting, and paging preferences you provide.
|
|
5625
|
-
* However, `queryDistinctValues()` doesn't return all of the full items that match the query.
|
|
5626
|
-
* Rather, it returns all unique values of the field you specify in `options.fieldName` for items that match the query.
|
|
5627
|
-
* If more than one item has the same value for that field, that value appears only once.
|
|
5628
|
-
*
|
|
5629
|
-
* For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
5630
|
-
*
|
|
5631
|
-
* > **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`.
|
|
5632
|
-
* @param - Options for querying distinct values.
|
|
5633
|
-
*/
|
|
5634
|
-
(options?: QueryDistinctValuesOptions | undefined): Promise<QueryDistinctValuesResponse>;
|
|
5635
|
-
}
|
|
5636
|
-
declare function bulkInsertDataItems$1(httpClient: HttpClient$1): BulkInsertDataItemsSignature;
|
|
5637
|
-
interface BulkInsertDataItemsSignature {
|
|
5638
|
-
/**
|
|
5639
|
-
* Adds multiple items to a collection.
|
|
5640
|
-
*
|
|
5641
|
-
*
|
|
5642
|
-
* When each item is inserted into a collection, its ID is automatically assigned a random value.
|
|
5643
|
-
* 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.
|
|
5644
|
-
* @param - Options for adding multiple items to a collection.
|
|
5645
|
-
*/
|
|
5646
|
-
(options?: BulkInsertDataItemsOptions | undefined): Promise<BulkInsertDataItemsResponse & BulkInsertDataItemsResponseNonNullableFields>;
|
|
5647
|
-
}
|
|
5648
|
-
declare function bulkUpdateDataItems$1(httpClient: HttpClient$1): BulkUpdateDataItemsSignature;
|
|
5649
|
-
interface BulkUpdateDataItemsSignature {
|
|
5650
|
-
/**
|
|
5651
|
-
* Updates multiple items in a collection.
|
|
5652
|
-
*
|
|
5653
|
-
*
|
|
5654
|
-
* This function replaces each specified data item's existing data with the payload provided in the request.
|
|
5655
|
-
*
|
|
5656
|
-
* Each item in the request must include an ID. If an item is found in the specified collection with
|
|
5657
|
-
* the same ID, that item is updated. If the collection doesn't contain an item with that ID, the update fails.
|
|
5658
|
-
*
|
|
5659
|
-
* When an item is updated, its `data._updatedDate` field is changed to the current date and time.
|
|
5660
|
-
*
|
|
5661
|
-
* > **Note:**
|
|
5662
|
-
* > 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
|
|
5663
|
-
* > aren't included in the updated item, their values are lost.
|
|
5664
|
-
* @param - Options for updating multiple items in a collection.
|
|
5665
|
-
*/
|
|
5666
|
-
(options?: BulkUpdateDataItemsOptions | undefined): Promise<BulkUpdateDataItemsResponse & BulkUpdateDataItemsResponseNonNullableFields>;
|
|
5667
|
-
}
|
|
5668
|
-
declare function bulkSaveDataItems$1(httpClient: HttpClient$1): BulkSaveDataItemsSignature;
|
|
5669
|
-
interface BulkSaveDataItemsSignature {
|
|
5670
|
-
/**
|
|
5671
|
-
* Inserts or updates multiple items in a collection.
|
|
5672
|
-
*
|
|
5673
|
-
*
|
|
5674
|
-
* This function inserts or updates each item provided, depending on whether it already exists in the collection. For each item:
|
|
5675
|
-
*
|
|
5676
|
-
* + If you don't provide an ID, a new item is created.
|
|
5677
|
-
*
|
|
5678
|
-
* + If you provide an ID that doesn't exist in the collection, a new item is created with that ID.
|
|
5679
|
-
*
|
|
5680
|
-
* + 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.
|
|
5681
|
-
*
|
|
5682
|
-
* > **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.
|
|
5683
|
-
* > This means that all of the item's previous fields and values are lost.
|
|
5684
|
-
* @param - Options for saving multiple items in a collection.
|
|
5685
|
-
*/
|
|
5686
|
-
(options?: BulkSaveDataItemsOptions | undefined): Promise<BulkSaveDataItemsResponse & BulkSaveDataItemsResponseNonNullableFields>;
|
|
5687
|
-
}
|
|
5688
|
-
declare function bulkRemoveDataItems$1(httpClient: HttpClient$1): BulkRemoveDataItemsSignature;
|
|
5689
|
-
interface BulkRemoveDataItemsSignature {
|
|
5690
|
-
/**
|
|
5691
|
-
* Removes multiple items from a collection.
|
|
5692
|
-
*
|
|
5693
|
-
*
|
|
5694
|
-
* If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.
|
|
5695
|
-
*
|
|
5696
|
-
* > **Note:** Once an item has been removed from a collection, it can't be restored.
|
|
5697
|
-
* @param - Options for removing multiple items from a collection.
|
|
5698
|
-
*/
|
|
5699
|
-
(options?: BulkRemoveDataItemsOptions | undefined): Promise<BulkRemoveDataItemsResponse & BulkRemoveDataItemsResponseNonNullableFields>;
|
|
5700
|
-
}
|
|
5701
|
-
declare function queryReferencedDataItems$1(httpClient: HttpClient$1): QueryReferencedDataItemsSignature;
|
|
5702
|
-
interface QueryReferencedDataItemsSignature {
|
|
5703
|
-
/**
|
|
5704
|
-
* Retrieves the full items referenced in the specified field of an item.
|
|
5705
|
-
*
|
|
5706
|
-
*
|
|
5707
|
-
* Reference and multi-reference fields refer to items in different collections.
|
|
5708
|
-
* Use this function to retrieve the full details of the referenced items themselves.
|
|
5709
|
-
*
|
|
5710
|
-
* For example, suppose you have a **Movies** collection with an **Actors** field that contains references to items in a **People** collection.
|
|
5711
|
-
* Querying the **Movies** collection using `queryReferencedDataItems()` returns the relevant **People** items referenced in the **Actors** field of the specified **Movie** item.
|
|
5712
|
-
* This gives you information from the **People** collection about each of the actors in the specified movie.
|
|
5713
|
-
*
|
|
5714
|
-
* > **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`.
|
|
5715
|
-
* @param - Options for querying referenced data items.
|
|
5716
|
-
*/
|
|
5717
|
-
(options?: QueryReferencedDataItemsOptions | undefined): Promise<QueryReferencedDataItemsResponse & QueryReferencedDataItemsResponseNonNullableFields>;
|
|
5718
|
-
}
|
|
5719
|
-
declare function isReferencedDataItem$1(httpClient: HttpClient$1): IsReferencedDataItemSignature;
|
|
5720
|
-
interface IsReferencedDataItemSignature {
|
|
5721
|
-
/**
|
|
5722
|
-
* Checks whether a field in a referring item contains a reference to a specified item.
|
|
5723
|
-
*
|
|
5724
|
-
* > **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`.
|
|
5725
|
-
* @param - Options for checking whether a field contains a reference to an item.
|
|
5726
|
-
*/
|
|
5727
|
-
(options?: IsReferencedDataItemOptions | undefined): Promise<IsReferencedDataItemResponse & IsReferencedDataItemResponseNonNullableFields>;
|
|
5728
|
-
}
|
|
5729
|
-
declare function insertDataItemReference$1(httpClient: HttpClient$1): InsertDataItemReferenceSignature;
|
|
5730
|
-
interface InsertDataItemReferenceSignature {
|
|
5731
|
-
/**
|
|
5732
|
-
* Inserts a reference in the specified field in an item in a collection.
|
|
5733
|
-
*
|
|
5734
|
-
*
|
|
5735
|
-
* 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.
|
|
5736
|
-
* @param - Options for inserting a reference.
|
|
5737
|
-
*/
|
|
5738
|
-
(options?: InsertDataItemReferenceOptions | undefined): Promise<InsertDataItemReferenceResponse & InsertDataItemReferenceResponseNonNullableFields>;
|
|
5739
|
-
}
|
|
5740
|
-
declare function removeDataItemReference$1(httpClient: HttpClient$1): RemoveDataItemReferenceSignature;
|
|
5741
|
-
interface RemoveDataItemReferenceSignature {
|
|
5742
|
-
/**
|
|
5743
|
-
* Removes the specified reference from the specified field.
|
|
5744
|
-
* @param - Options for removing a reference.
|
|
5745
|
-
*/
|
|
5746
|
-
(options: RemoveDataItemReferenceOptions): Promise<RemoveDataItemReferenceResponse & RemoveDataItemReferenceResponseNonNullableFields>;
|
|
5747
|
-
}
|
|
5748
|
-
declare function bulkInsertDataItemReferences$1(httpClient: HttpClient$1): BulkInsertDataItemReferencesSignature;
|
|
5749
|
-
interface BulkInsertDataItemReferencesSignature {
|
|
5750
|
-
/**
|
|
5751
|
-
* Inserts one or more references in the specified fields of items in a collection.
|
|
5752
|
-
*
|
|
5753
|
-
*
|
|
5754
|
-
* This endpoint adds one or more references to a collection.
|
|
5755
|
-
* Each new reference in `options.dataItemReferences` specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item.
|
|
5756
|
-
* @param - Options for inserting one or more references.
|
|
5757
|
-
*/
|
|
5758
|
-
(options?: BulkInsertDataItemReferencesOptions | undefined): Promise<BulkInsertDataItemReferencesResponse & BulkInsertDataItemReferencesResponseNonNullableFields>;
|
|
5759
|
-
}
|
|
5760
|
-
declare function bulkRemoveDataItemReferences$1(httpClient: HttpClient$1): BulkRemoveDataItemReferencesSignature;
|
|
5761
|
-
interface BulkRemoveDataItemReferencesSignature {
|
|
5762
|
-
/**
|
|
5763
|
-
* Removes one or more references.
|
|
5764
|
-
* @param - Options for removing one or more references.
|
|
5765
|
-
*/
|
|
5766
|
-
(options: BulkRemoveDataItemReferencesOptions): Promise<BulkRemoveDataItemReferencesResponse & BulkRemoveDataItemReferencesResponseNonNullableFields>;
|
|
5767
|
-
}
|
|
5768
|
-
declare function replaceDataItemReferences$1(httpClient: HttpClient$1): ReplaceDataItemReferencesSignature;
|
|
5769
|
-
interface ReplaceDataItemReferencesSignature {
|
|
5770
|
-
/**
|
|
5771
|
-
* Replaces references in a specified field of a specified data item.
|
|
5772
|
-
*
|
|
5773
|
-
*
|
|
5774
|
-
* This function replaces the existing reference or references contained in the field specified in `options.referringItemFieldName` within the data item specified in `options.referringItemId`.
|
|
5775
|
-
* The function removes existing references and in their place it adds references to the items specified in `options.newReferencedItemIds`.
|
|
5776
|
-
*
|
|
5777
|
-
* > **Note:** If you pass an empty array in `options.newReferencedItemIds`, all existing references are removed.
|
|
5778
|
-
* @param - Options for replacing references.
|
|
5779
|
-
*/
|
|
5780
|
-
(options?: ReplaceDataItemReferencesOptions | undefined): Promise<ReplaceDataItemReferencesResponse & ReplaceDataItemReferencesResponseNonNullableFields>;
|
|
5781
|
-
}
|
|
5782
|
-
declare const onDataItemCreated$1: EventDefinition$1<DataItemCreatedEnvelope, "wix.data.v2.data_item_created">;
|
|
5783
|
-
declare const onDataItemUpdated$1: EventDefinition$1<DataItemUpdatedEnvelope, "wix.data.v2.data_item_updated">;
|
|
5784
|
-
declare const onDataItemDeleted$1: EventDefinition$1<DataItemDeletedEnvelope, "wix.data.v2.data_item_deleted">;
|
|
5785
|
-
|
|
5786
|
-
declare function createEventModule<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
|
|
5787
|
-
|
|
5788
|
-
declare const insertDataItem: MaybeContext$1<BuildRESTFunction$1<typeof insertDataItem$1> & typeof insertDataItem$1>;
|
|
5789
|
-
declare const updateDataItem: MaybeContext$1<BuildRESTFunction$1<typeof updateDataItem$1> & typeof updateDataItem$1>;
|
|
5790
|
-
declare const saveDataItem: MaybeContext$1<BuildRESTFunction$1<typeof saveDataItem$1> & typeof saveDataItem$1>;
|
|
5791
|
-
declare const getDataItem: MaybeContext$1<BuildRESTFunction$1<typeof getDataItem$1> & typeof getDataItem$1>;
|
|
5792
|
-
declare const removeDataItem: MaybeContext$1<BuildRESTFunction$1<typeof removeDataItem$1> & typeof removeDataItem$1>;
|
|
5793
|
-
declare const truncateDataItems: MaybeContext$1<BuildRESTFunction$1<typeof truncateDataItems$1> & typeof truncateDataItems$1>;
|
|
5794
|
-
declare const queryDataItems: MaybeContext$1<BuildRESTFunction$1<typeof queryDataItems$1> & typeof queryDataItems$1>;
|
|
5795
|
-
declare const aggregateDataItems: MaybeContext$1<BuildRESTFunction$1<typeof aggregateDataItems$1> & typeof aggregateDataItems$1>;
|
|
5796
|
-
declare const countDataItems: MaybeContext$1<BuildRESTFunction$1<typeof countDataItems$1> & typeof countDataItems$1>;
|
|
5797
|
-
declare const queryDistinctValues: MaybeContext$1<BuildRESTFunction$1<typeof queryDistinctValues$1> & typeof queryDistinctValues$1>;
|
|
5798
|
-
declare const bulkInsertDataItems: MaybeContext$1<BuildRESTFunction$1<typeof bulkInsertDataItems$1> & typeof bulkInsertDataItems$1>;
|
|
5799
|
-
declare const bulkUpdateDataItems: MaybeContext$1<BuildRESTFunction$1<typeof bulkUpdateDataItems$1> & typeof bulkUpdateDataItems$1>;
|
|
5800
|
-
declare const bulkSaveDataItems: MaybeContext$1<BuildRESTFunction$1<typeof bulkSaveDataItems$1> & typeof bulkSaveDataItems$1>;
|
|
5801
|
-
declare const bulkRemoveDataItems: MaybeContext$1<BuildRESTFunction$1<typeof bulkRemoveDataItems$1> & typeof bulkRemoveDataItems$1>;
|
|
5802
|
-
declare const queryReferencedDataItems: MaybeContext$1<BuildRESTFunction$1<typeof queryReferencedDataItems$1> & typeof queryReferencedDataItems$1>;
|
|
5803
|
-
declare const isReferencedDataItem: MaybeContext$1<BuildRESTFunction$1<typeof isReferencedDataItem$1> & typeof isReferencedDataItem$1>;
|
|
5804
|
-
declare const insertDataItemReference: MaybeContext$1<BuildRESTFunction$1<typeof insertDataItemReference$1> & typeof insertDataItemReference$1>;
|
|
5805
|
-
declare const removeDataItemReference: MaybeContext$1<BuildRESTFunction$1<typeof removeDataItemReference$1> & typeof removeDataItemReference$1>;
|
|
5806
|
-
declare const bulkInsertDataItemReferences: MaybeContext$1<BuildRESTFunction$1<typeof bulkInsertDataItemReferences$1> & typeof bulkInsertDataItemReferences$1>;
|
|
5807
|
-
declare const bulkRemoveDataItemReferences: MaybeContext$1<BuildRESTFunction$1<typeof bulkRemoveDataItemReferences$1> & typeof bulkRemoveDataItemReferences$1>;
|
|
5808
|
-
declare const replaceDataItemReferences: MaybeContext$1<BuildRESTFunction$1<typeof replaceDataItemReferences$1> & typeof replaceDataItemReferences$1>;
|
|
5809
|
-
|
|
5810
|
-
type _publicOnDataItemCreatedType = typeof onDataItemCreated$1;
|
|
5811
|
-
/**
|
|
5812
|
-
* Triggered when a data item is inserted.
|
|
5813
|
-
*/
|
|
5814
|
-
declare const onDataItemCreated: ReturnType<typeof createEventModule<_publicOnDataItemCreatedType>>;
|
|
5815
|
-
|
|
5816
|
-
type _publicOnDataItemUpdatedType = typeof onDataItemUpdated$1;
|
|
5817
|
-
/**
|
|
5818
|
-
* Triggered when a data item is updated.
|
|
5819
|
-
*
|
|
5820
|
-
* **Note**: When [scheduling an item's visibility change](https://support.wix.com/en/article/cms-controlling-live-site-item-visibility-from-your-collection#scheduling-changes-to-item-visibility), the event is triggered when the scheduled change is set up, not when it goes into effect.
|
|
5821
|
-
*/
|
|
5822
|
-
declare const onDataItemUpdated: ReturnType<typeof createEventModule<_publicOnDataItemUpdatedType>>;
|
|
5823
|
-
|
|
5824
|
-
type _publicOnDataItemDeletedType = typeof onDataItemDeleted$1;
|
|
5825
|
-
/**
|
|
5826
|
-
* Triggered when a data item is deleted.
|
|
5827
|
-
*/
|
|
5828
|
-
declare const onDataItemDeleted: ReturnType<typeof createEventModule<_publicOnDataItemDeletedType>>;
|
|
5829
|
-
|
|
5830
|
-
type index_d$1_ACTION = ACTION;
|
|
5831
|
-
declare const index_d$1_ACTION: typeof ACTION;
|
|
5832
|
-
type index_d$1_Action = Action;
|
|
5833
|
-
declare const index_d$1_Action: typeof Action;
|
|
5834
|
-
type index_d$1_ActionEvent = ActionEvent;
|
|
5835
|
-
type index_d$1_AggregateDataItemsOptions = AggregateDataItemsOptions;
|
|
5836
|
-
type index_d$1_AggregateDataItemsRequest = AggregateDataItemsRequest;
|
|
5837
|
-
type index_d$1_AggregateDataItemsRequestPagingMethodOneOf = AggregateDataItemsRequestPagingMethodOneOf;
|
|
5838
|
-
type index_d$1_AggregateDataItemsResponse = AggregateDataItemsResponse;
|
|
5839
|
-
type index_d$1_Aggregation = Aggregation;
|
|
5840
|
-
type index_d$1_AppendToArray = AppendToArray;
|
|
5841
|
-
type index_d$1_ApplicationError = ApplicationError;
|
|
5842
|
-
type index_d$1_Average = Average;
|
|
5843
|
-
type index_d$1_BaseEventMetadata = BaseEventMetadata;
|
|
5844
|
-
type index_d$1_BulkActionMetadata = BulkActionMetadata;
|
|
5845
|
-
type index_d$1_BulkActionType = BulkActionType;
|
|
5846
|
-
declare const index_d$1_BulkActionType: typeof BulkActionType;
|
|
5847
|
-
type index_d$1_BulkDataItemReferenceResult = BulkDataItemReferenceResult;
|
|
5848
|
-
type index_d$1_BulkDataItemResult = BulkDataItemResult;
|
|
5849
|
-
type index_d$1_BulkInsertDataItemReferencesOptions = BulkInsertDataItemReferencesOptions;
|
|
5850
|
-
type index_d$1_BulkInsertDataItemReferencesRequest = BulkInsertDataItemReferencesRequest;
|
|
5851
|
-
type index_d$1_BulkInsertDataItemReferencesResponse = BulkInsertDataItemReferencesResponse;
|
|
5852
|
-
type index_d$1_BulkInsertDataItemReferencesResponseNonNullableFields = BulkInsertDataItemReferencesResponseNonNullableFields;
|
|
5853
|
-
type index_d$1_BulkInsertDataItemsOptions = BulkInsertDataItemsOptions;
|
|
5854
|
-
type index_d$1_BulkInsertDataItemsRequest = BulkInsertDataItemsRequest;
|
|
5855
|
-
type index_d$1_BulkInsertDataItemsResponse = BulkInsertDataItemsResponse;
|
|
5856
|
-
type index_d$1_BulkInsertDataItemsResponseNonNullableFields = BulkInsertDataItemsResponseNonNullableFields;
|
|
5857
|
-
type index_d$1_BulkPatchDataItemsRequest = BulkPatchDataItemsRequest;
|
|
5858
|
-
type index_d$1_BulkPatchDataItemsResponse = BulkPatchDataItemsResponse;
|
|
5859
|
-
type index_d$1_BulkRemoveDataItemReferencesOptions = BulkRemoveDataItemReferencesOptions;
|
|
5860
|
-
type index_d$1_BulkRemoveDataItemReferencesRequest = BulkRemoveDataItemReferencesRequest;
|
|
5861
|
-
type index_d$1_BulkRemoveDataItemReferencesResponse = BulkRemoveDataItemReferencesResponse;
|
|
5862
|
-
type index_d$1_BulkRemoveDataItemReferencesResponseNonNullableFields = BulkRemoveDataItemReferencesResponseNonNullableFields;
|
|
5863
|
-
type index_d$1_BulkRemoveDataItemsOptions = BulkRemoveDataItemsOptions;
|
|
5864
|
-
type index_d$1_BulkRemoveDataItemsRequest = BulkRemoveDataItemsRequest;
|
|
5865
|
-
type index_d$1_BulkRemoveDataItemsResponse = BulkRemoveDataItemsResponse;
|
|
5866
|
-
type index_d$1_BulkRemoveDataItemsResponseNonNullableFields = BulkRemoveDataItemsResponseNonNullableFields;
|
|
5867
|
-
type index_d$1_BulkSaveDataItemsOptions = BulkSaveDataItemsOptions;
|
|
5868
|
-
type index_d$1_BulkSaveDataItemsRequest = BulkSaveDataItemsRequest;
|
|
5869
|
-
type index_d$1_BulkSaveDataItemsResponse = BulkSaveDataItemsResponse;
|
|
5870
|
-
type index_d$1_BulkSaveDataItemsResponseNonNullableFields = BulkSaveDataItemsResponseNonNullableFields;
|
|
5871
|
-
type index_d$1_BulkUpdateDataItemsOptions = BulkUpdateDataItemsOptions;
|
|
5872
|
-
type index_d$1_BulkUpdateDataItemsRequest = BulkUpdateDataItemsRequest;
|
|
5873
|
-
type index_d$1_BulkUpdateDataItemsResponse = BulkUpdateDataItemsResponse;
|
|
5874
|
-
type index_d$1_BulkUpdateDataItemsResponseNonNullableFields = BulkUpdateDataItemsResponseNonNullableFields;
|
|
5875
|
-
type index_d$1_CachingInfo = CachingInfo;
|
|
5876
|
-
type index_d$1_Count = Count;
|
|
5877
|
-
type index_d$1_CountDataItemsOptions = CountDataItemsOptions;
|
|
5878
|
-
type index_d$1_CountDataItemsRequest = CountDataItemsRequest;
|
|
5879
|
-
type index_d$1_CountDataItemsResponse = CountDataItemsResponse;
|
|
5880
|
-
type index_d$1_CountDataItemsResponseNonNullableFields = CountDataItemsResponseNonNullableFields;
|
|
5881
|
-
type index_d$1_CursorPaging = CursorPaging;
|
|
5882
|
-
type index_d$1_Cursors = Cursors;
|
|
5883
|
-
type index_d$1_DataItem = DataItem;
|
|
5884
|
-
type index_d$1_DataItemCreatedEnvelope = DataItemCreatedEnvelope;
|
|
5885
|
-
type index_d$1_DataItemDeletedEnvelope = DataItemDeletedEnvelope;
|
|
5886
|
-
type index_d$1_DataItemNonNullableFields = DataItemNonNullableFields;
|
|
5887
|
-
type index_d$1_DataItemReference = DataItemReference;
|
|
5888
|
-
type index_d$1_DataItemUpdatedEnvelope = DataItemUpdatedEnvelope;
|
|
5889
|
-
type index_d$1_DataItemsQueryBuilder = DataItemsQueryBuilder;
|
|
5890
|
-
type index_d$1_DataItemsQueryResult = DataItemsQueryResult;
|
|
5891
|
-
type index_d$1_DataPublishPluginOptions = DataPublishPluginOptions;
|
|
5892
|
-
type index_d$1_DomainEvent = DomainEvent;
|
|
5893
|
-
type index_d$1_DomainEventBodyOneOf = DomainEventBodyOneOf;
|
|
5894
|
-
type index_d$1_EntityCreatedEvent = EntityCreatedEvent;
|
|
5895
|
-
type index_d$1_EntityDeletedEvent = EntityDeletedEvent;
|
|
5896
|
-
type index_d$1_EntityUpdatedEvent = EntityUpdatedEvent;
|
|
5897
|
-
type index_d$1_EventMetadata = EventMetadata;
|
|
5898
|
-
type index_d$1_FieldUpdate = FieldUpdate;
|
|
5899
|
-
type index_d$1_FieldUpdateActionOptionsOneOf = FieldUpdateActionOptionsOneOf;
|
|
5900
|
-
type index_d$1_GetDataItemOptions = GetDataItemOptions;
|
|
5901
|
-
type index_d$1_GetDataItemRequest = GetDataItemRequest;
|
|
5902
|
-
type index_d$1_GetDataItemResponse = GetDataItemResponse;
|
|
5903
|
-
type index_d$1_GetDataItemResponseNonNullableFields = GetDataItemResponseNonNullableFields;
|
|
5904
|
-
type index_d$1_IdentificationData = IdentificationData;
|
|
5905
|
-
type index_d$1_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
|
|
5906
|
-
type index_d$1_IncrementField = IncrementField;
|
|
5907
|
-
type index_d$1_InsertDataItemOptions = InsertDataItemOptions;
|
|
5908
|
-
type index_d$1_InsertDataItemReferenceOptions = InsertDataItemReferenceOptions;
|
|
5909
|
-
type index_d$1_InsertDataItemReferenceRequest = InsertDataItemReferenceRequest;
|
|
5910
|
-
type index_d$1_InsertDataItemReferenceResponse = InsertDataItemReferenceResponse;
|
|
5911
|
-
type index_d$1_InsertDataItemReferenceResponseNonNullableFields = InsertDataItemReferenceResponseNonNullableFields;
|
|
5912
|
-
type index_d$1_InsertDataItemRequest = InsertDataItemRequest;
|
|
5913
|
-
type index_d$1_InsertDataItemResponse = InsertDataItemResponse;
|
|
5914
|
-
type index_d$1_InsertDataItemResponseNonNullableFields = InsertDataItemResponseNonNullableFields;
|
|
5915
|
-
type index_d$1_IsReferencedDataItemOptions = IsReferencedDataItemOptions;
|
|
5916
|
-
type index_d$1_IsReferencedDataItemRequest = IsReferencedDataItemRequest;
|
|
5917
|
-
type index_d$1_IsReferencedDataItemResponse = IsReferencedDataItemResponse;
|
|
5918
|
-
type index_d$1_IsReferencedDataItemResponseNonNullableFields = IsReferencedDataItemResponseNonNullableFields;
|
|
5919
|
-
type index_d$1_ItemMetadata = ItemMetadata;
|
|
5920
|
-
type index_d$1_Max = Max;
|
|
5921
|
-
type index_d$1_MessageEnvelope = MessageEnvelope;
|
|
5922
|
-
type index_d$1_Min = Min;
|
|
5923
|
-
type index_d$1_Operation = Operation;
|
|
5924
|
-
type index_d$1_OperationCalculateOneOf = OperationCalculateOneOf;
|
|
5925
|
-
type index_d$1_Options = Options;
|
|
5926
|
-
type index_d$1_PagingMetadataV2 = PagingMetadataV2;
|
|
5927
|
-
type index_d$1_PatchDataItemRequest = PatchDataItemRequest;
|
|
5928
|
-
type index_d$1_PatchDataItemResponse = PatchDataItemResponse;
|
|
5929
|
-
type index_d$1_PatchSet = PatchSet;
|
|
5930
|
-
type index_d$1_PublishPluginOptions = PublishPluginOptions;
|
|
5931
|
-
type index_d$1_QueryDataItemsOptions = QueryDataItemsOptions;
|
|
5932
|
-
type index_d$1_QueryDataItemsRequest = QueryDataItemsRequest;
|
|
5933
|
-
type index_d$1_QueryDataItemsResponse = QueryDataItemsResponse;
|
|
5934
|
-
type index_d$1_QueryDataItemsResponseNonNullableFields = QueryDataItemsResponseNonNullableFields;
|
|
5935
|
-
type index_d$1_QueryDistinctValuesOptions = QueryDistinctValuesOptions;
|
|
5936
|
-
type index_d$1_QueryDistinctValuesRequest = QueryDistinctValuesRequest;
|
|
5937
|
-
type index_d$1_QueryDistinctValuesRequestPagingMethodOneOf = QueryDistinctValuesRequestPagingMethodOneOf;
|
|
5938
|
-
type index_d$1_QueryDistinctValuesResponse = QueryDistinctValuesResponse;
|
|
5939
|
-
type index_d$1_QueryReferencedDataItemsOptions = QueryReferencedDataItemsOptions;
|
|
5940
|
-
type index_d$1_QueryReferencedDataItemsRequest = QueryReferencedDataItemsRequest;
|
|
5941
|
-
type index_d$1_QueryReferencedDataItemsRequestPagingMethodOneOf = QueryReferencedDataItemsRequestPagingMethodOneOf;
|
|
5942
|
-
type index_d$1_QueryReferencedDataItemsResponse = QueryReferencedDataItemsResponse;
|
|
5943
|
-
type index_d$1_QueryReferencedDataItemsResponseNonNullableFields = QueryReferencedDataItemsResponseNonNullableFields;
|
|
5944
|
-
type index_d$1_QueryV2 = QueryV2;
|
|
5945
|
-
type index_d$1_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf;
|
|
5946
|
-
type index_d$1_ReferencedItemOptions = ReferencedItemOptions;
|
|
5947
|
-
type index_d$1_ReferencedResult = ReferencedResult;
|
|
5948
|
-
type index_d$1_ReferencedResultEntityOneOf = ReferencedResultEntityOneOf;
|
|
5949
|
-
type index_d$1_RemoveDataItemOptions = RemoveDataItemOptions;
|
|
5950
|
-
type index_d$1_RemoveDataItemReferenceOptions = RemoveDataItemReferenceOptions;
|
|
5951
|
-
type index_d$1_RemoveDataItemReferenceRequest = RemoveDataItemReferenceRequest;
|
|
5952
|
-
type index_d$1_RemoveDataItemReferenceResponse = RemoveDataItemReferenceResponse;
|
|
5953
|
-
type index_d$1_RemoveDataItemReferenceResponseNonNullableFields = RemoveDataItemReferenceResponseNonNullableFields;
|
|
5954
|
-
type index_d$1_RemoveDataItemRequest = RemoveDataItemRequest;
|
|
5955
|
-
type index_d$1_RemoveDataItemResponse = RemoveDataItemResponse;
|
|
5956
|
-
type index_d$1_RemoveDataItemResponseNonNullableFields = RemoveDataItemResponseNonNullableFields;
|
|
5957
|
-
type index_d$1_RemoveFromArray = RemoveFromArray;
|
|
5958
|
-
type index_d$1_ReplaceDataItemReferencesOptions = ReplaceDataItemReferencesOptions;
|
|
5959
|
-
type index_d$1_ReplaceDataItemReferencesRequest = ReplaceDataItemReferencesRequest;
|
|
5960
|
-
type index_d$1_ReplaceDataItemReferencesResponse = ReplaceDataItemReferencesResponse;
|
|
5961
|
-
type index_d$1_ReplaceDataItemReferencesResponseNonNullableFields = ReplaceDataItemReferencesResponseNonNullableFields;
|
|
5962
|
-
type index_d$1_RestoreInfo = RestoreInfo;
|
|
5963
|
-
type index_d$1_SaveDataItemOptions = SaveDataItemOptions;
|
|
5964
|
-
type index_d$1_SaveDataItemRequest = SaveDataItemRequest;
|
|
5965
|
-
type index_d$1_SaveDataItemResponse = SaveDataItemResponse;
|
|
5966
|
-
type index_d$1_SaveDataItemResponseNonNullableFields = SaveDataItemResponseNonNullableFields;
|
|
5967
|
-
type index_d$1_SetField = SetField;
|
|
5968
|
-
type index_d$1_SortOrder = SortOrder;
|
|
5969
|
-
declare const index_d$1_SortOrder: typeof SortOrder;
|
|
5970
|
-
type index_d$1_Sorting = Sorting;
|
|
5971
|
-
type index_d$1_Sum = Sum;
|
|
5972
|
-
type index_d$1_TruncateDataItemsOptions = TruncateDataItemsOptions;
|
|
5973
|
-
type index_d$1_TruncateDataItemsRequest = TruncateDataItemsRequest;
|
|
5974
|
-
type index_d$1_TruncateDataItemsResponse = TruncateDataItemsResponse;
|
|
5975
|
-
type index_d$1_UnresolvedReference = UnresolvedReference;
|
|
5976
|
-
type index_d$1_UpdateDataItemOptions = UpdateDataItemOptions;
|
|
5977
|
-
type index_d$1_UpdateDataItemRequest = UpdateDataItemRequest;
|
|
5978
|
-
type index_d$1_UpdateDataItemResponse = UpdateDataItemResponse;
|
|
5979
|
-
type index_d$1_UpdateDataItemResponseNonNullableFields = UpdateDataItemResponseNonNullableFields;
|
|
5980
|
-
type index_d$1_WebhookIdentityType = WebhookIdentityType;
|
|
5981
|
-
declare const index_d$1_WebhookIdentityType: typeof WebhookIdentityType;
|
|
5982
|
-
type index_d$1__publicOnDataItemCreatedType = _publicOnDataItemCreatedType;
|
|
5983
|
-
type index_d$1__publicOnDataItemDeletedType = _publicOnDataItemDeletedType;
|
|
5984
|
-
type index_d$1__publicOnDataItemUpdatedType = _publicOnDataItemUpdatedType;
|
|
5985
|
-
declare const index_d$1_aggregateDataItems: typeof aggregateDataItems;
|
|
5986
|
-
declare const index_d$1_bulkInsertDataItemReferences: typeof bulkInsertDataItemReferences;
|
|
5987
|
-
declare const index_d$1_bulkInsertDataItems: typeof bulkInsertDataItems;
|
|
5988
|
-
declare const index_d$1_bulkRemoveDataItemReferences: typeof bulkRemoveDataItemReferences;
|
|
5989
|
-
declare const index_d$1_bulkRemoveDataItems: typeof bulkRemoveDataItems;
|
|
5990
|
-
declare const index_d$1_bulkSaveDataItems: typeof bulkSaveDataItems;
|
|
5991
|
-
declare const index_d$1_bulkUpdateDataItems: typeof bulkUpdateDataItems;
|
|
5992
|
-
declare const index_d$1_countDataItems: typeof countDataItems;
|
|
5993
|
-
declare const index_d$1_getDataItem: typeof getDataItem;
|
|
5994
|
-
declare const index_d$1_insertDataItem: typeof insertDataItem;
|
|
5995
|
-
declare const index_d$1_insertDataItemReference: typeof insertDataItemReference;
|
|
5996
|
-
declare const index_d$1_isReferencedDataItem: typeof isReferencedDataItem;
|
|
5997
|
-
declare const index_d$1_onDataItemCreated: typeof onDataItemCreated;
|
|
5998
|
-
declare const index_d$1_onDataItemDeleted: typeof onDataItemDeleted;
|
|
5999
|
-
declare const index_d$1_onDataItemUpdated: typeof onDataItemUpdated;
|
|
6000
|
-
declare const index_d$1_queryDataItems: typeof queryDataItems;
|
|
6001
|
-
declare const index_d$1_queryDistinctValues: typeof queryDistinctValues;
|
|
6002
|
-
declare const index_d$1_queryReferencedDataItems: typeof queryReferencedDataItems;
|
|
6003
|
-
declare const index_d$1_removeDataItem: typeof removeDataItem;
|
|
6004
|
-
declare const index_d$1_removeDataItemReference: typeof removeDataItemReference;
|
|
6005
|
-
declare const index_d$1_replaceDataItemReferences: typeof replaceDataItemReferences;
|
|
6006
|
-
declare const index_d$1_saveDataItem: typeof saveDataItem;
|
|
6007
|
-
declare const index_d$1_truncateDataItems: typeof truncateDataItems;
|
|
6008
|
-
declare const index_d$1_updateDataItem: typeof updateDataItem;
|
|
6009
|
-
declare namespace index_d$1 {
|
|
6010
|
-
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 };
|
|
6011
|
-
}
|
|
6012
|
-
|
|
6013
|
-
type HostModule<T, H extends Host> = {
|
|
6014
|
-
__type: 'host';
|
|
6015
|
-
create(host: H): T;
|
|
6016
|
-
};
|
|
6017
|
-
type HostModuleAPI<T extends HostModule<any, any>> = T extends HostModule<infer U, any> ? U : never;
|
|
6018
|
-
type Host<Environment = unknown> = {
|
|
6019
|
-
channel: {
|
|
6020
|
-
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
6021
|
-
disconnect: () => void;
|
|
6022
|
-
} | Promise<{
|
|
6023
|
-
disconnect: () => void;
|
|
6024
|
-
}>;
|
|
6025
|
-
};
|
|
6026
|
-
environment?: Environment;
|
|
6027
|
-
/**
|
|
6028
|
-
* Optional name of the environment, use for logging
|
|
6029
|
-
*/
|
|
6030
|
-
name?: string;
|
|
6031
|
-
/**
|
|
6032
|
-
* Optional bast url to use for API requests, for example `www.wixapis.com`
|
|
6033
|
-
*/
|
|
6034
|
-
apiBaseUrl?: string;
|
|
6035
|
-
/**
|
|
6036
|
-
* Possible data to be provided by every host, for cross cutting concerns
|
|
6037
|
-
* like internationalization, billing, etc.
|
|
6038
|
-
*/
|
|
6039
|
-
essentials?: {
|
|
6040
|
-
/**
|
|
6041
|
-
* The language of the currently viewed session
|
|
6042
|
-
*/
|
|
6043
|
-
language?: string;
|
|
6044
|
-
/**
|
|
6045
|
-
* The locale of the currently viewed session
|
|
6046
|
-
*/
|
|
6047
|
-
locale?: string;
|
|
6048
|
-
/**
|
|
6049
|
-
* Any headers that should be passed through to the API requests
|
|
6050
|
-
*/
|
|
6051
|
-
passThroughHeaders?: Record<string, string>;
|
|
6052
|
-
};
|
|
6053
|
-
};
|
|
6054
|
-
|
|
6055
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
6056
|
-
interface HttpClient {
|
|
6057
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
6058
|
-
fetchWithAuth: typeof fetch;
|
|
6059
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
6060
|
-
getActiveToken?: () => string | undefined;
|
|
6061
|
-
}
|
|
6062
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
6063
|
-
type HttpResponse<T = any> = {
|
|
6064
|
-
data: T;
|
|
6065
|
-
status: number;
|
|
6066
|
-
statusText: string;
|
|
6067
|
-
headers: any;
|
|
6068
|
-
request?: any;
|
|
6069
|
-
};
|
|
6070
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
6071
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
6072
|
-
url: string;
|
|
6073
|
-
data?: Data;
|
|
6074
|
-
params?: URLSearchParams;
|
|
6075
|
-
} & APIMetadata;
|
|
6076
|
-
type APIMetadata = {
|
|
6077
|
-
methodFqn?: string;
|
|
6078
|
-
entityFqdn?: string;
|
|
6079
|
-
packageName?: string;
|
|
6080
|
-
};
|
|
6081
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
6082
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
6083
|
-
__type: 'event-definition';
|
|
6084
|
-
type: Type;
|
|
6085
|
-
isDomainEvent?: boolean;
|
|
6086
|
-
transformations?: (envelope: unknown) => Payload;
|
|
6087
|
-
__payload: Payload;
|
|
6088
|
-
};
|
|
6089
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
6090
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
6091
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
6092
|
-
|
|
6093
|
-
type ServicePluginMethodInput = {
|
|
6094
|
-
request: any;
|
|
6095
|
-
metadata: any;
|
|
6096
|
-
};
|
|
6097
|
-
type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
6098
|
-
type ServicePluginMethodMetadata = {
|
|
6099
|
-
name: string;
|
|
6100
|
-
primaryHttpMappingPath: string;
|
|
6101
|
-
transformations: {
|
|
6102
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput;
|
|
6103
|
-
toREST: (...args: unknown[]) => unknown;
|
|
6104
|
-
};
|
|
6105
|
-
};
|
|
6106
|
-
type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
6107
|
-
__type: 'service-plugin-definition';
|
|
6108
|
-
componentType: string;
|
|
6109
|
-
methods: ServicePluginMethodMetadata[];
|
|
6110
|
-
__contract: Contract;
|
|
6111
|
-
};
|
|
6112
|
-
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
6113
|
-
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
6114
|
-
declare const SERVICE_PLUGIN_ERROR_TYPE = "wix_spi_error";
|
|
6115
|
-
|
|
6116
|
-
type RequestContext = {
|
|
6117
|
-
isSSR: boolean;
|
|
6118
|
-
host: string;
|
|
6119
|
-
protocol?: string;
|
|
6120
|
-
};
|
|
6121
|
-
type ResponseTransformer = (data: any, headers?: any) => any;
|
|
6122
|
-
/**
|
|
6123
|
-
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
6124
|
-
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
6125
|
-
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
6126
|
-
*/
|
|
6127
|
-
type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
6128
|
-
type AmbassadorRequestOptions<T = any> = {
|
|
6129
|
-
_?: T;
|
|
6130
|
-
url?: string;
|
|
6131
|
-
method?: Method;
|
|
6132
|
-
params?: any;
|
|
6133
|
-
data?: any;
|
|
6134
|
-
transformResponse?: ResponseTransformer | ResponseTransformer[];
|
|
6135
|
-
};
|
|
6136
|
-
type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
|
|
6137
|
-
__isAmbassador: boolean;
|
|
6138
|
-
};
|
|
6139
|
-
type AmbassadorFunctionDescriptor<Request = any, Response = any> = AmbassadorFactory<Request, Response>;
|
|
6140
|
-
type BuildAmbassadorFunction<T extends AmbassadorFunctionDescriptor> = T extends AmbassadorFunctionDescriptor<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
6141
|
-
|
|
6142
|
-
declare global {
|
|
6143
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
6144
|
-
interface SymbolConstructor {
|
|
6145
|
-
readonly observable: symbol;
|
|
6146
|
-
}
|
|
6147
|
-
}
|
|
6148
|
-
|
|
6149
|
-
declare const emptyObjectSymbol: unique symbol;
|
|
6150
|
-
|
|
6151
|
-
/**
|
|
6152
|
-
Represents a strictly empty plain object, the `{}` value.
|
|
6153
|
-
|
|
6154
|
-
When you annotate something as the type `{}`, it can be anything except `null` and `undefined`. This means that you cannot use `{}` to represent an empty plain object ([read more](https://stackoverflow.com/questions/47339869/typescript-empty-object-and-any-difference/52193484#52193484)).
|
|
6155
|
-
|
|
6156
|
-
@example
|
|
6157
|
-
```
|
|
6158
|
-
import type {EmptyObject} from 'type-fest';
|
|
6159
|
-
|
|
6160
|
-
// The following illustrates the problem with `{}`.
|
|
6161
|
-
const foo1: {} = {}; // Pass
|
|
6162
|
-
const foo2: {} = []; // Pass
|
|
6163
|
-
const foo3: {} = 42; // Pass
|
|
6164
|
-
const foo4: {} = {a: 1}; // Pass
|
|
6165
|
-
|
|
6166
|
-
// With `EmptyObject` only the first case is valid.
|
|
6167
|
-
const bar1: EmptyObject = {}; // Pass
|
|
6168
|
-
const bar2: EmptyObject = 42; // Fail
|
|
6169
|
-
const bar3: EmptyObject = []; // Fail
|
|
6170
|
-
const bar4: EmptyObject = {a: 1}; // Fail
|
|
6171
|
-
```
|
|
6172
|
-
|
|
6173
|
-
Unfortunately, `Record<string, never>`, `Record<keyof any, never>` and `Record<never, never>` do not work. See {@link https://github.com/sindresorhus/type-fest/issues/395 #395}.
|
|
6174
|
-
|
|
6175
|
-
@category Object
|
|
6176
|
-
*/
|
|
6177
|
-
type EmptyObject = {[emptyObjectSymbol]?: never};
|
|
6178
|
-
|
|
6179
|
-
/**
|
|
6180
|
-
Returns a boolean for whether the two given types are equal.
|
|
6181
|
-
|
|
6182
|
-
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
6183
|
-
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
6184
|
-
|
|
6185
|
-
Use-cases:
|
|
6186
|
-
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
6187
|
-
|
|
6188
|
-
@example
|
|
6189
|
-
```
|
|
6190
|
-
import type {IsEqual} from 'type-fest';
|
|
6191
|
-
|
|
6192
|
-
// This type returns a boolean for whether the given array includes the given item.
|
|
6193
|
-
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
6194
|
-
type Includes<Value extends readonly any[], Item> =
|
|
6195
|
-
Value extends readonly [Value[0], ...infer rest]
|
|
6196
|
-
? IsEqual<Value[0], Item> extends true
|
|
6197
|
-
? true
|
|
6198
|
-
: Includes<rest, Item>
|
|
6199
|
-
: false;
|
|
6200
|
-
```
|
|
6201
|
-
|
|
6202
|
-
@category Type Guard
|
|
6203
|
-
@category Utilities
|
|
6204
|
-
*/
|
|
6205
|
-
type IsEqual<A, B> =
|
|
6206
|
-
(<G>() => G extends A ? 1 : 2) extends
|
|
6207
|
-
(<G>() => G extends B ? 1 : 2)
|
|
6208
|
-
? true
|
|
6209
|
-
: false;
|
|
6210
|
-
|
|
6211
|
-
/**
|
|
6212
|
-
Filter out keys from an object.
|
|
6213
|
-
|
|
6214
|
-
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
6215
|
-
Returns `never` if `Key` extends `Exclude`.
|
|
6216
|
-
Returns `Key` otherwise.
|
|
6217
|
-
|
|
6218
|
-
@example
|
|
6219
|
-
```
|
|
6220
|
-
type Filtered = Filter<'foo', 'foo'>;
|
|
6221
|
-
//=> never
|
|
6222
|
-
```
|
|
6223
|
-
|
|
6224
|
-
@example
|
|
6225
|
-
```
|
|
6226
|
-
type Filtered = Filter<'bar', string>;
|
|
6227
|
-
//=> never
|
|
6228
|
-
```
|
|
6229
|
-
|
|
6230
|
-
@example
|
|
6231
|
-
```
|
|
6232
|
-
type Filtered = Filter<'bar', 'foo'>;
|
|
6233
|
-
//=> 'bar'
|
|
6234
|
-
```
|
|
6235
|
-
|
|
6236
|
-
@see {Except}
|
|
6237
|
-
*/
|
|
6238
|
-
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
6239
|
-
|
|
6240
|
-
type ExceptOptions = {
|
|
6241
|
-
/**
|
|
6242
|
-
Disallow assigning non-specified properties.
|
|
6243
|
-
|
|
6244
|
-
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
6245
|
-
|
|
6246
|
-
@default false
|
|
6247
|
-
*/
|
|
6248
|
-
requireExactProps?: boolean;
|
|
6249
|
-
};
|
|
6250
|
-
|
|
6251
|
-
/**
|
|
6252
|
-
Create a type from an object type without certain keys.
|
|
6253
|
-
|
|
6254
|
-
We recommend setting the `requireExactProps` option to `true`.
|
|
6255
|
-
|
|
6256
|
-
This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.
|
|
6257
|
-
|
|
6258
|
-
This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)).
|
|
6259
|
-
|
|
6260
|
-
@example
|
|
6261
|
-
```
|
|
6262
|
-
import type {Except} from 'type-fest';
|
|
6263
|
-
|
|
6264
|
-
type Foo = {
|
|
6265
|
-
a: number;
|
|
6266
|
-
b: string;
|
|
6267
|
-
};
|
|
6268
|
-
|
|
6269
|
-
type FooWithoutA = Except<Foo, 'a'>;
|
|
6270
|
-
//=> {b: string}
|
|
6271
|
-
|
|
6272
|
-
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
6273
|
-
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
6274
|
-
|
|
6275
|
-
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
6276
|
-
//=> {a: number} & Partial<Record<"b", never>>
|
|
6277
|
-
|
|
6278
|
-
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
6279
|
-
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
6280
|
-
```
|
|
6281
|
-
|
|
6282
|
-
@category Object
|
|
6283
|
-
*/
|
|
6284
|
-
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
|
|
6285
|
-
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
6286
|
-
} & (Options['requireExactProps'] extends true
|
|
6287
|
-
? Partial<Record<KeysType, never>>
|
|
6288
|
-
: {});
|
|
6289
|
-
|
|
6290
|
-
/**
|
|
6291
|
-
Returns a boolean for whether the given type is `never`.
|
|
6292
|
-
|
|
6293
|
-
@link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
|
|
6294
|
-
@link https://stackoverflow.com/a/53984913/10292952
|
|
6295
|
-
@link https://www.zhenghao.io/posts/ts-never
|
|
6296
|
-
|
|
6297
|
-
Useful in type utilities, such as checking if something does not occur.
|
|
6298
|
-
|
|
6299
|
-
@example
|
|
6300
|
-
```
|
|
6301
|
-
import type {IsNever, And} from 'type-fest';
|
|
6302
|
-
|
|
6303
|
-
// https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
|
|
6304
|
-
type AreStringsEqual<A extends string, B extends string> =
|
|
6305
|
-
And<
|
|
6306
|
-
IsNever<Exclude<A, B>> extends true ? true : false,
|
|
6307
|
-
IsNever<Exclude<B, A>> extends true ? true : false
|
|
6308
|
-
>;
|
|
6309
|
-
|
|
6310
|
-
type EndIfEqual<I extends string, O extends string> =
|
|
6311
|
-
AreStringsEqual<I, O> extends true
|
|
6312
|
-
? never
|
|
6313
|
-
: void;
|
|
6314
|
-
|
|
6315
|
-
function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
|
|
6316
|
-
if (input === output) {
|
|
6317
|
-
process.exit(0);
|
|
6318
|
-
}
|
|
6319
|
-
}
|
|
6320
|
-
|
|
6321
|
-
endIfEqual('abc', 'abc');
|
|
6322
|
-
//=> never
|
|
6323
|
-
|
|
6324
|
-
endIfEqual('abc', '123');
|
|
6325
|
-
//=> void
|
|
6326
|
-
```
|
|
6327
|
-
|
|
6328
|
-
@category Type Guard
|
|
6329
|
-
@category Utilities
|
|
6330
|
-
*/
|
|
6331
|
-
type IsNever<T> = [T] extends [never] ? true : false;
|
|
6332
|
-
|
|
6333
|
-
/**
|
|
6334
|
-
An if-else-like type that resolves depending on whether the given type is `never`.
|
|
6335
|
-
|
|
6336
|
-
@see {@link IsNever}
|
|
6337
|
-
|
|
6338
|
-
@example
|
|
6339
|
-
```
|
|
6340
|
-
import type {IfNever} from 'type-fest';
|
|
6341
|
-
|
|
6342
|
-
type ShouldBeTrue = IfNever<never>;
|
|
6343
|
-
//=> true
|
|
6344
|
-
|
|
6345
|
-
type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
|
|
6346
|
-
//=> 'bar'
|
|
6347
|
-
```
|
|
6348
|
-
|
|
6349
|
-
@category Type Guard
|
|
6350
|
-
@category Utilities
|
|
6351
|
-
*/
|
|
6352
|
-
type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
|
|
6353
|
-
IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
|
|
6354
|
-
);
|
|
6355
|
-
|
|
6356
|
-
/**
|
|
6357
|
-
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
6358
|
-
|
|
6359
|
-
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
6360
|
-
|
|
6361
|
-
@example
|
|
6362
|
-
```
|
|
6363
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
6364
|
-
|
|
6365
|
-
interface Example {
|
|
6366
|
-
a: string;
|
|
6367
|
-
b: string | number;
|
|
6368
|
-
c?: string;
|
|
6369
|
-
d: {};
|
|
4539
|
+
declare function countDataItems$1(httpClient: HttpClient): CountDataItemsSignature;
|
|
4540
|
+
interface CountDataItemsSignature {
|
|
4541
|
+
/**
|
|
4542
|
+
* Counts the number of items in a data collection that match the provided filtering preferences.
|
|
4543
|
+
*
|
|
4544
|
+
* > **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`.
|
|
4545
|
+
* @param - Options for counting the number of items in a data collection.
|
|
4546
|
+
*/
|
|
4547
|
+
(options?: CountDataItemsOptions | undefined): Promise<CountDataItemsResponse & CountDataItemsResponseNonNullableFields>;
|
|
6370
4548
|
}
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
type ConditionalKeys<Base, Condition> =
|
|
6389
|
-
{
|
|
6390
|
-
// Map through all the keys of the given base type.
|
|
6391
|
-
[Key in keyof Base]-?:
|
|
6392
|
-
// Pick only keys with types extending the given `Condition` type.
|
|
6393
|
-
Base[Key] extends Condition
|
|
6394
|
-
// Retain this key
|
|
6395
|
-
// If the value for the key extends never, only include it if `Condition` also extends never
|
|
6396
|
-
? IfNever<Base[Key], IfNever<Condition, Key, never>, Key>
|
|
6397
|
-
// Discard this key since the condition fails.
|
|
6398
|
-
: never;
|
|
6399
|
-
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
6400
|
-
}[keyof Base];
|
|
6401
|
-
|
|
6402
|
-
/**
|
|
6403
|
-
Exclude keys from a shape that matches the given `Condition`.
|
|
6404
|
-
|
|
6405
|
-
This is useful when you want to create a new type with a specific set of keys from a shape. For example, you might want to exclude all the primitive properties from a class and form a new shape containing everything but the primitive properties.
|
|
6406
|
-
|
|
6407
|
-
@example
|
|
6408
|
-
```
|
|
6409
|
-
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
6410
|
-
|
|
6411
|
-
class Awesome {
|
|
6412
|
-
name: string;
|
|
6413
|
-
successes: number;
|
|
6414
|
-
failures: bigint;
|
|
6415
|
-
|
|
6416
|
-
run() {}
|
|
4549
|
+
declare function queryDistinctValues$1(httpClient: HttpClient): QueryDistinctValuesSignature;
|
|
4550
|
+
interface QueryDistinctValuesSignature {
|
|
4551
|
+
/**
|
|
4552
|
+
* Retrieves a list of distinct values for a given field in all items that match a query, without duplicates.
|
|
4553
|
+
*
|
|
4554
|
+
*
|
|
4555
|
+
* As with `queryDataItems()`, this endpoint retrieves items based on the filtering, sorting, and paging preferences you provide.
|
|
4556
|
+
* However, `queryDistinctValues()` doesn't return all of the full items that match the query.
|
|
4557
|
+
* Rather, it returns all unique values of the field you specify in `options.fieldName` for items that match the query.
|
|
4558
|
+
* If more than one item has the same value for that field, that value appears only once.
|
|
4559
|
+
*
|
|
4560
|
+
* For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
4561
|
+
*
|
|
4562
|
+
* > **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`.
|
|
4563
|
+
* @param - Options for querying distinct values.
|
|
4564
|
+
*/
|
|
4565
|
+
(options?: QueryDistinctValuesOptions | undefined): Promise<QueryDistinctValuesResponse>;
|
|
6417
4566
|
}
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
4567
|
+
declare function bulkInsertDataItems$1(httpClient: HttpClient): BulkInsertDataItemsSignature;
|
|
4568
|
+
interface BulkInsertDataItemsSignature {
|
|
4569
|
+
/**
|
|
4570
|
+
* Adds multiple items to a collection.
|
|
4571
|
+
*
|
|
4572
|
+
*
|
|
4573
|
+
* When each item is inserted into a collection, its ID is automatically assigned a random value.
|
|
4574
|
+
* 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.
|
|
4575
|
+
* @param - Options for adding multiple items to a collection.
|
|
4576
|
+
*/
|
|
4577
|
+
(options?: BulkInsertDataItemsOptions | undefined): Promise<BulkInsertDataItemsResponse & BulkInsertDataItemsResponseNonNullableFields>;
|
|
4578
|
+
}
|
|
4579
|
+
declare function bulkUpdateDataItems$1(httpClient: HttpClient): BulkUpdateDataItemsSignature;
|
|
4580
|
+
interface BulkUpdateDataItemsSignature {
|
|
4581
|
+
/**
|
|
4582
|
+
* Updates multiple items in a collection.
|
|
4583
|
+
*
|
|
4584
|
+
*
|
|
4585
|
+
* This function replaces each specified data item's existing data with the payload provided in the request.
|
|
4586
|
+
*
|
|
4587
|
+
* Each item in the request must include an ID. If an item is found in the specified collection with
|
|
4588
|
+
* the same ID, that item is updated. If the collection doesn't contain an item with that ID, the update fails.
|
|
4589
|
+
*
|
|
4590
|
+
* When an item is updated, its `data._updatedDate` field is changed to the current date and time.
|
|
4591
|
+
*
|
|
4592
|
+
* > **Note:**
|
|
4593
|
+
* > 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
|
|
4594
|
+
* > aren't included in the updated item, their values are lost.
|
|
4595
|
+
* @param - Options for updating multiple items in a collection.
|
|
4596
|
+
*/
|
|
4597
|
+
(options?: BulkUpdateDataItemsOptions | undefined): Promise<BulkUpdateDataItemsResponse & BulkUpdateDataItemsResponseNonNullableFields>;
|
|
4598
|
+
}
|
|
4599
|
+
declare function bulkSaveDataItems$1(httpClient: HttpClient): BulkSaveDataItemsSignature;
|
|
4600
|
+
interface BulkSaveDataItemsSignature {
|
|
4601
|
+
/**
|
|
4602
|
+
* Inserts or updates multiple items in a collection.
|
|
4603
|
+
*
|
|
4604
|
+
*
|
|
4605
|
+
* This function inserts or updates each item provided, depending on whether it already exists in the collection. For each item:
|
|
4606
|
+
*
|
|
4607
|
+
* + If you don't provide an ID, a new item is created.
|
|
4608
|
+
*
|
|
4609
|
+
* + If you provide an ID that doesn't exist in the collection, a new item is created with that ID.
|
|
4610
|
+
*
|
|
4611
|
+
* + 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.
|
|
4612
|
+
*
|
|
4613
|
+
* > **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.
|
|
4614
|
+
* > This means that all of the item's previous fields and values are lost.
|
|
4615
|
+
* @param - Options for saving multiple items in a collection.
|
|
4616
|
+
*/
|
|
4617
|
+
(options?: BulkSaveDataItemsOptions | undefined): Promise<BulkSaveDataItemsResponse & BulkSaveDataItemsResponseNonNullableFields>;
|
|
4618
|
+
}
|
|
4619
|
+
declare function bulkRemoveDataItems$1(httpClient: HttpClient): BulkRemoveDataItemsSignature;
|
|
4620
|
+
interface BulkRemoveDataItemsSignature {
|
|
4621
|
+
/**
|
|
4622
|
+
* Removes multiple items from a collection.
|
|
4623
|
+
*
|
|
4624
|
+
*
|
|
4625
|
+
* If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.
|
|
4626
|
+
*
|
|
4627
|
+
* > **Note:** Once an item has been removed from a collection, it can't be restored.
|
|
4628
|
+
* @param - Options for removing multiple items from a collection.
|
|
4629
|
+
*/
|
|
4630
|
+
(options?: BulkRemoveDataItemsOptions | undefined): Promise<BulkRemoveDataItemsResponse & BulkRemoveDataItemsResponseNonNullableFields>;
|
|
4631
|
+
}
|
|
4632
|
+
declare function queryReferencedDataItems$1(httpClient: HttpClient): QueryReferencedDataItemsSignature;
|
|
4633
|
+
interface QueryReferencedDataItemsSignature {
|
|
4634
|
+
/**
|
|
4635
|
+
* Retrieves the full items referenced in the specified field of an item.
|
|
4636
|
+
*
|
|
4637
|
+
*
|
|
4638
|
+
* Reference and multi-reference fields refer to items in different collections.
|
|
4639
|
+
* Use this function to retrieve the full details of the referenced items themselves.
|
|
4640
|
+
*
|
|
4641
|
+
* For example, suppose you have a **Movies** collection with an **Actors** field that contains references to items in a **People** collection.
|
|
4642
|
+
* Querying the **Movies** collection using `queryReferencedDataItems()` returns the relevant **People** items referenced in the **Actors** field of the specified **Movie** item.
|
|
4643
|
+
* This gives you information from the **People** collection about each of the actors in the specified movie.
|
|
4644
|
+
*
|
|
4645
|
+
* > **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`.
|
|
4646
|
+
* @param - Options for querying referenced data items.
|
|
4647
|
+
*/
|
|
4648
|
+
(options?: QueryReferencedDataItemsOptions | undefined): Promise<QueryReferencedDataItemsResponse & QueryReferencedDataItemsResponseNonNullableFields>;
|
|
4649
|
+
}
|
|
4650
|
+
declare function isReferencedDataItem$1(httpClient: HttpClient): IsReferencedDataItemSignature;
|
|
4651
|
+
interface IsReferencedDataItemSignature {
|
|
4652
|
+
/**
|
|
4653
|
+
* Checks whether a field in a referring item contains a reference to a specified item.
|
|
4654
|
+
*
|
|
4655
|
+
* > **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`.
|
|
4656
|
+
* @param - Options for checking whether a field contains a reference to an item.
|
|
4657
|
+
*/
|
|
4658
|
+
(options?: IsReferencedDataItemOptions | undefined): Promise<IsReferencedDataItemResponse & IsReferencedDataItemResponseNonNullableFields>;
|
|
4659
|
+
}
|
|
4660
|
+
declare function insertDataItemReference$1(httpClient: HttpClient): InsertDataItemReferenceSignature;
|
|
4661
|
+
interface InsertDataItemReferenceSignature {
|
|
4662
|
+
/**
|
|
4663
|
+
* Inserts a reference in the specified field in an item in a collection.
|
|
4664
|
+
*
|
|
4665
|
+
*
|
|
4666
|
+
* 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.
|
|
4667
|
+
* @param - Options for inserting a reference.
|
|
4668
|
+
*/
|
|
4669
|
+
(options?: InsertDataItemReferenceOptions | undefined): Promise<InsertDataItemReferenceResponse & InsertDataItemReferenceResponseNonNullableFields>;
|
|
4670
|
+
}
|
|
4671
|
+
declare function removeDataItemReference$1(httpClient: HttpClient): RemoveDataItemReferenceSignature;
|
|
4672
|
+
interface RemoveDataItemReferenceSignature {
|
|
4673
|
+
/**
|
|
4674
|
+
* Removes the specified reference from the specified field.
|
|
4675
|
+
* @param - Options for removing a reference.
|
|
4676
|
+
*/
|
|
4677
|
+
(options: RemoveDataItemReferenceOptions): Promise<RemoveDataItemReferenceResponse & RemoveDataItemReferenceResponseNonNullableFields>;
|
|
4678
|
+
}
|
|
4679
|
+
declare function bulkInsertDataItemReferences$1(httpClient: HttpClient): BulkInsertDataItemReferencesSignature;
|
|
4680
|
+
interface BulkInsertDataItemReferencesSignature {
|
|
4681
|
+
/**
|
|
4682
|
+
* Inserts one or more references in the specified fields of items in a collection.
|
|
4683
|
+
*
|
|
4684
|
+
*
|
|
4685
|
+
* This endpoint adds one or more references to a collection.
|
|
4686
|
+
* 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.
|
|
4687
|
+
* @param - Options for inserting one or more references.
|
|
4688
|
+
*/
|
|
4689
|
+
(options?: BulkInsertDataItemReferencesOptions | undefined): Promise<BulkInsertDataItemReferencesResponse & BulkInsertDataItemReferencesResponseNonNullableFields>;
|
|
4690
|
+
}
|
|
4691
|
+
declare function bulkRemoveDataItemReferences$1(httpClient: HttpClient): BulkRemoveDataItemReferencesSignature;
|
|
4692
|
+
interface BulkRemoveDataItemReferencesSignature {
|
|
4693
|
+
/**
|
|
4694
|
+
* Removes one or more references.
|
|
4695
|
+
* @param - Options for removing one or more references.
|
|
4696
|
+
*/
|
|
4697
|
+
(options: BulkRemoveDataItemReferencesOptions): Promise<BulkRemoveDataItemReferencesResponse & BulkRemoveDataItemReferencesResponseNonNullableFields>;
|
|
4698
|
+
}
|
|
4699
|
+
declare function replaceDataItemReferences$1(httpClient: HttpClient): ReplaceDataItemReferencesSignature;
|
|
4700
|
+
interface ReplaceDataItemReferencesSignature {
|
|
4701
|
+
/**
|
|
4702
|
+
* Replaces references in a specified field of a specified data item.
|
|
4703
|
+
*
|
|
4704
|
+
*
|
|
4705
|
+
* This function replaces the existing reference or references contained in the field specified in `options.referringItemFieldName` within the data item specified in `options.referringItemId`.
|
|
4706
|
+
* The function removes existing references and in their place it adds references to the items specified in `options.newReferencedItemIds`.
|
|
4707
|
+
*
|
|
4708
|
+
* > **Note:** If you pass an empty array in `options.newReferencedItemIds`, all existing references are removed.
|
|
4709
|
+
* @param - Options for replacing references.
|
|
4710
|
+
*/
|
|
4711
|
+
(options?: ReplaceDataItemReferencesOptions | undefined): Promise<ReplaceDataItemReferencesResponse & ReplaceDataItemReferencesResponseNonNullableFields>;
|
|
6432
4712
|
}
|
|
4713
|
+
declare const onDataItemCreated$1: EventDefinition<DataItemCreatedEnvelope, "wix.data.v2.data_item_created">;
|
|
4714
|
+
declare const onDataItemUpdated$1: EventDefinition<DataItemUpdatedEnvelope, "wix.data.v2.data_item_updated">;
|
|
4715
|
+
declare const onDataItemDeleted$1: EventDefinition<DataItemDeletedEnvelope, "wix.data.v2.data_item_deleted">;
|
|
4716
|
+
|
|
4717
|
+
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
4718
|
+
|
|
4719
|
+
declare const insertDataItem: MaybeContext<BuildRESTFunction<typeof insertDataItem$1> & typeof insertDataItem$1>;
|
|
4720
|
+
declare const updateDataItem: MaybeContext<BuildRESTFunction<typeof updateDataItem$1> & typeof updateDataItem$1>;
|
|
4721
|
+
declare const saveDataItem: MaybeContext<BuildRESTFunction<typeof saveDataItem$1> & typeof saveDataItem$1>;
|
|
4722
|
+
declare const getDataItem: MaybeContext<BuildRESTFunction<typeof getDataItem$1> & typeof getDataItem$1>;
|
|
4723
|
+
declare const removeDataItem: MaybeContext<BuildRESTFunction<typeof removeDataItem$1> & typeof removeDataItem$1>;
|
|
4724
|
+
declare const truncateDataItems: MaybeContext<BuildRESTFunction<typeof truncateDataItems$1> & typeof truncateDataItems$1>;
|
|
4725
|
+
declare const queryDataItems: MaybeContext<BuildRESTFunction<typeof queryDataItems$1> & typeof queryDataItems$1>;
|
|
4726
|
+
declare const aggregateDataItems: MaybeContext<BuildRESTFunction<typeof aggregateDataItems$1> & typeof aggregateDataItems$1>;
|
|
4727
|
+
declare const countDataItems: MaybeContext<BuildRESTFunction<typeof countDataItems$1> & typeof countDataItems$1>;
|
|
4728
|
+
declare const queryDistinctValues: MaybeContext<BuildRESTFunction<typeof queryDistinctValues$1> & typeof queryDistinctValues$1>;
|
|
4729
|
+
declare const bulkInsertDataItems: MaybeContext<BuildRESTFunction<typeof bulkInsertDataItems$1> & typeof bulkInsertDataItems$1>;
|
|
4730
|
+
declare const bulkUpdateDataItems: MaybeContext<BuildRESTFunction<typeof bulkUpdateDataItems$1> & typeof bulkUpdateDataItems$1>;
|
|
4731
|
+
declare const bulkSaveDataItems: MaybeContext<BuildRESTFunction<typeof bulkSaveDataItems$1> & typeof bulkSaveDataItems$1>;
|
|
4732
|
+
declare const bulkRemoveDataItems: MaybeContext<BuildRESTFunction<typeof bulkRemoveDataItems$1> & typeof bulkRemoveDataItems$1>;
|
|
4733
|
+
declare const queryReferencedDataItems: MaybeContext<BuildRESTFunction<typeof queryReferencedDataItems$1> & typeof queryReferencedDataItems$1>;
|
|
4734
|
+
declare const isReferencedDataItem: MaybeContext<BuildRESTFunction<typeof isReferencedDataItem$1> & typeof isReferencedDataItem$1>;
|
|
4735
|
+
declare const insertDataItemReference: MaybeContext<BuildRESTFunction<typeof insertDataItemReference$1> & typeof insertDataItemReference$1>;
|
|
4736
|
+
declare const removeDataItemReference: MaybeContext<BuildRESTFunction<typeof removeDataItemReference$1> & typeof removeDataItemReference$1>;
|
|
4737
|
+
declare const bulkInsertDataItemReferences: MaybeContext<BuildRESTFunction<typeof bulkInsertDataItemReferences$1> & typeof bulkInsertDataItemReferences$1>;
|
|
4738
|
+
declare const bulkRemoveDataItemReferences: MaybeContext<BuildRESTFunction<typeof bulkRemoveDataItemReferences$1> & typeof bulkRemoveDataItemReferences$1>;
|
|
4739
|
+
declare const replaceDataItemReferences: MaybeContext<BuildRESTFunction<typeof replaceDataItemReferences$1> & typeof replaceDataItemReferences$1>;
|
|
6433
4740
|
|
|
6434
|
-
type
|
|
6435
|
-
//=> {b: string | number; c: () => void; d: {}}
|
|
6436
|
-
```
|
|
6437
|
-
|
|
6438
|
-
@category Object
|
|
6439
|
-
*/
|
|
6440
|
-
type ConditionalExcept<Base, Condition> = Except<
|
|
6441
|
-
Base,
|
|
6442
|
-
ConditionalKeys<Base, Condition>
|
|
6443
|
-
>;
|
|
6444
|
-
|
|
4741
|
+
type _publicOnDataItemCreatedType = typeof onDataItemCreated$1;
|
|
6445
4742
|
/**
|
|
6446
|
-
*
|
|
6447
|
-
* can either be a REST module or a host module.
|
|
6448
|
-
* This type is recursive, so it can describe nested modules.
|
|
4743
|
+
* Triggered when a data item is inserted.
|
|
6449
4744
|
*/
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
4745
|
+
declare const onDataItemCreated: ReturnType<typeof createEventModule<_publicOnDataItemCreatedType>>;
|
|
4746
|
+
|
|
4747
|
+
type _publicOnDataItemUpdatedType = typeof onDataItemUpdated$1;
|
|
6453
4748
|
/**
|
|
6454
|
-
*
|
|
6455
|
-
*
|
|
6456
|
-
*
|
|
6457
|
-
* do not match the given host (as they will not work with the given host).
|
|
4749
|
+
* Triggered when a data item is updated.
|
|
4750
|
+
*
|
|
4751
|
+
* **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.
|
|
6458
4752
|
*/
|
|
6459
|
-
|
|
6460
|
-
done: T;
|
|
6461
|
-
recurse: T extends {
|
|
6462
|
-
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
6463
|
-
} ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition<any> ? BuildEventDefinition<T> : T extends ServicePluginDefinition<any> ? BuildServicePluginDefinition<T> : T extends HostModule<any, any> ? HostModuleAPI<T> : ConditionalExcept<{
|
|
6464
|
-
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
6465
|
-
-1,
|
|
6466
|
-
0,
|
|
6467
|
-
1,
|
|
6468
|
-
2,
|
|
6469
|
-
3,
|
|
6470
|
-
4,
|
|
6471
|
-
5
|
|
6472
|
-
][Depth]> : never;
|
|
6473
|
-
}, EmptyObject>;
|
|
6474
|
-
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
6475
|
-
type PublicMetadata = {
|
|
6476
|
-
PACKAGE_NAME?: string;
|
|
6477
|
-
};
|
|
4753
|
+
declare const onDataItemUpdated: ReturnType<typeof createEventModule<_publicOnDataItemUpdatedType>>;
|
|
6478
4754
|
|
|
6479
|
-
|
|
6480
|
-
interface ContextualClient {
|
|
6481
|
-
}
|
|
6482
|
-
}
|
|
4755
|
+
type _publicOnDataItemDeletedType = typeof onDataItemDeleted$1;
|
|
6483
4756
|
/**
|
|
6484
|
-
*
|
|
6485
|
-
* case a contextual client is available.
|
|
4757
|
+
* Triggered when a data item is deleted.
|
|
6486
4758
|
*/
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
4759
|
+
declare const onDataItemDeleted: ReturnType<typeof createEventModule<_publicOnDataItemDeletedType>>;
|
|
4760
|
+
|
|
4761
|
+
type index_d$1_ACTION = ACTION;
|
|
4762
|
+
declare const index_d$1_ACTION: typeof ACTION;
|
|
4763
|
+
type index_d$1_Action = Action;
|
|
4764
|
+
declare const index_d$1_Action: typeof Action;
|
|
4765
|
+
type index_d$1_ActionEvent = ActionEvent;
|
|
4766
|
+
type index_d$1_AggregateDataItemsOptions = AggregateDataItemsOptions;
|
|
4767
|
+
type index_d$1_AggregateDataItemsRequest = AggregateDataItemsRequest;
|
|
4768
|
+
type index_d$1_AggregateDataItemsRequestPagingMethodOneOf = AggregateDataItemsRequestPagingMethodOneOf;
|
|
4769
|
+
type index_d$1_AggregateDataItemsResponse = AggregateDataItemsResponse;
|
|
4770
|
+
type index_d$1_Aggregation = Aggregation;
|
|
4771
|
+
type index_d$1_AppendToArray = AppendToArray;
|
|
4772
|
+
type index_d$1_ApplicationError = ApplicationError;
|
|
4773
|
+
type index_d$1_Average = Average;
|
|
4774
|
+
type index_d$1_BaseEventMetadata = BaseEventMetadata;
|
|
4775
|
+
type index_d$1_BulkActionMetadata = BulkActionMetadata;
|
|
4776
|
+
type index_d$1_BulkActionType = BulkActionType;
|
|
4777
|
+
declare const index_d$1_BulkActionType: typeof BulkActionType;
|
|
4778
|
+
type index_d$1_BulkDataItemReferenceResult = BulkDataItemReferenceResult;
|
|
4779
|
+
type index_d$1_BulkDataItemResult = BulkDataItemResult;
|
|
4780
|
+
type index_d$1_BulkInsertDataItemReferencesOptions = BulkInsertDataItemReferencesOptions;
|
|
4781
|
+
type index_d$1_BulkInsertDataItemReferencesRequest = BulkInsertDataItemReferencesRequest;
|
|
4782
|
+
type index_d$1_BulkInsertDataItemReferencesResponse = BulkInsertDataItemReferencesResponse;
|
|
4783
|
+
type index_d$1_BulkInsertDataItemReferencesResponseNonNullableFields = BulkInsertDataItemReferencesResponseNonNullableFields;
|
|
4784
|
+
type index_d$1_BulkInsertDataItemsOptions = BulkInsertDataItemsOptions;
|
|
4785
|
+
type index_d$1_BulkInsertDataItemsRequest = BulkInsertDataItemsRequest;
|
|
4786
|
+
type index_d$1_BulkInsertDataItemsResponse = BulkInsertDataItemsResponse;
|
|
4787
|
+
type index_d$1_BulkInsertDataItemsResponseNonNullableFields = BulkInsertDataItemsResponseNonNullableFields;
|
|
4788
|
+
type index_d$1_BulkPatchDataItemsRequest = BulkPatchDataItemsRequest;
|
|
4789
|
+
type index_d$1_BulkPatchDataItemsResponse = BulkPatchDataItemsResponse;
|
|
4790
|
+
type index_d$1_BulkRemoveDataItemReferencesOptions = BulkRemoveDataItemReferencesOptions;
|
|
4791
|
+
type index_d$1_BulkRemoveDataItemReferencesRequest = BulkRemoveDataItemReferencesRequest;
|
|
4792
|
+
type index_d$1_BulkRemoveDataItemReferencesResponse = BulkRemoveDataItemReferencesResponse;
|
|
4793
|
+
type index_d$1_BulkRemoveDataItemReferencesResponseNonNullableFields = BulkRemoveDataItemReferencesResponseNonNullableFields;
|
|
4794
|
+
type index_d$1_BulkRemoveDataItemsOptions = BulkRemoveDataItemsOptions;
|
|
4795
|
+
type index_d$1_BulkRemoveDataItemsRequest = BulkRemoveDataItemsRequest;
|
|
4796
|
+
type index_d$1_BulkRemoveDataItemsResponse = BulkRemoveDataItemsResponse;
|
|
4797
|
+
type index_d$1_BulkRemoveDataItemsResponseNonNullableFields = BulkRemoveDataItemsResponseNonNullableFields;
|
|
4798
|
+
type index_d$1_BulkSaveDataItemsOptions = BulkSaveDataItemsOptions;
|
|
4799
|
+
type index_d$1_BulkSaveDataItemsRequest = BulkSaveDataItemsRequest;
|
|
4800
|
+
type index_d$1_BulkSaveDataItemsResponse = BulkSaveDataItemsResponse;
|
|
4801
|
+
type index_d$1_BulkSaveDataItemsResponseNonNullableFields = BulkSaveDataItemsResponseNonNullableFields;
|
|
4802
|
+
type index_d$1_BulkUpdateDataItemsOptions = BulkUpdateDataItemsOptions;
|
|
4803
|
+
type index_d$1_BulkUpdateDataItemsRequest = BulkUpdateDataItemsRequest;
|
|
4804
|
+
type index_d$1_BulkUpdateDataItemsResponse = BulkUpdateDataItemsResponse;
|
|
4805
|
+
type index_d$1_BulkUpdateDataItemsResponseNonNullableFields = BulkUpdateDataItemsResponseNonNullableFields;
|
|
4806
|
+
type index_d$1_CachingInfo = CachingInfo;
|
|
4807
|
+
type index_d$1_Count = Count;
|
|
4808
|
+
type index_d$1_CountDataItemsOptions = CountDataItemsOptions;
|
|
4809
|
+
type index_d$1_CountDataItemsRequest = CountDataItemsRequest;
|
|
4810
|
+
type index_d$1_CountDataItemsResponse = CountDataItemsResponse;
|
|
4811
|
+
type index_d$1_CountDataItemsResponseNonNullableFields = CountDataItemsResponseNonNullableFields;
|
|
4812
|
+
type index_d$1_CursorPaging = CursorPaging;
|
|
4813
|
+
type index_d$1_Cursors = Cursors;
|
|
4814
|
+
type index_d$1_DataItem = DataItem;
|
|
4815
|
+
type index_d$1_DataItemCreatedEnvelope = DataItemCreatedEnvelope;
|
|
4816
|
+
type index_d$1_DataItemDeletedEnvelope = DataItemDeletedEnvelope;
|
|
4817
|
+
type index_d$1_DataItemNonNullableFields = DataItemNonNullableFields;
|
|
4818
|
+
type index_d$1_DataItemReference = DataItemReference;
|
|
4819
|
+
type index_d$1_DataItemUpdatedEnvelope = DataItemUpdatedEnvelope;
|
|
4820
|
+
type index_d$1_DataItemsQueryBuilder = DataItemsQueryBuilder;
|
|
4821
|
+
type index_d$1_DataItemsQueryResult = DataItemsQueryResult;
|
|
4822
|
+
type index_d$1_DataPublishPluginOptions = DataPublishPluginOptions;
|
|
4823
|
+
type index_d$1_DomainEvent = DomainEvent;
|
|
4824
|
+
type index_d$1_DomainEventBodyOneOf = DomainEventBodyOneOf;
|
|
4825
|
+
type index_d$1_EntityCreatedEvent = EntityCreatedEvent;
|
|
4826
|
+
type index_d$1_EntityDeletedEvent = EntityDeletedEvent;
|
|
4827
|
+
type index_d$1_EntityUpdatedEvent = EntityUpdatedEvent;
|
|
4828
|
+
type index_d$1_EventMetadata = EventMetadata;
|
|
4829
|
+
type index_d$1_FieldUpdate = FieldUpdate;
|
|
4830
|
+
type index_d$1_FieldUpdateActionOptionsOneOf = FieldUpdateActionOptionsOneOf;
|
|
4831
|
+
type index_d$1_GetDataItemOptions = GetDataItemOptions;
|
|
4832
|
+
type index_d$1_GetDataItemRequest = GetDataItemRequest;
|
|
4833
|
+
type index_d$1_GetDataItemResponse = GetDataItemResponse;
|
|
4834
|
+
type index_d$1_GetDataItemResponseNonNullableFields = GetDataItemResponseNonNullableFields;
|
|
4835
|
+
type index_d$1_IdentificationData = IdentificationData;
|
|
4836
|
+
type index_d$1_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
|
|
4837
|
+
type index_d$1_IncrementField = IncrementField;
|
|
4838
|
+
type index_d$1_InsertDataItemOptions = InsertDataItemOptions;
|
|
4839
|
+
type index_d$1_InsertDataItemReferenceOptions = InsertDataItemReferenceOptions;
|
|
4840
|
+
type index_d$1_InsertDataItemReferenceRequest = InsertDataItemReferenceRequest;
|
|
4841
|
+
type index_d$1_InsertDataItemReferenceResponse = InsertDataItemReferenceResponse;
|
|
4842
|
+
type index_d$1_InsertDataItemReferenceResponseNonNullableFields = InsertDataItemReferenceResponseNonNullableFields;
|
|
4843
|
+
type index_d$1_InsertDataItemRequest = InsertDataItemRequest;
|
|
4844
|
+
type index_d$1_InsertDataItemResponse = InsertDataItemResponse;
|
|
4845
|
+
type index_d$1_InsertDataItemResponseNonNullableFields = InsertDataItemResponseNonNullableFields;
|
|
4846
|
+
type index_d$1_IsReferencedDataItemOptions = IsReferencedDataItemOptions;
|
|
4847
|
+
type index_d$1_IsReferencedDataItemRequest = IsReferencedDataItemRequest;
|
|
4848
|
+
type index_d$1_IsReferencedDataItemResponse = IsReferencedDataItemResponse;
|
|
4849
|
+
type index_d$1_IsReferencedDataItemResponseNonNullableFields = IsReferencedDataItemResponseNonNullableFields;
|
|
4850
|
+
type index_d$1_ItemMetadata = ItemMetadata;
|
|
4851
|
+
type index_d$1_Max = Max;
|
|
4852
|
+
type index_d$1_MessageEnvelope = MessageEnvelope;
|
|
4853
|
+
type index_d$1_Min = Min;
|
|
4854
|
+
type index_d$1_Operation = Operation;
|
|
4855
|
+
type index_d$1_OperationCalculateOneOf = OperationCalculateOneOf;
|
|
4856
|
+
type index_d$1_Options = Options;
|
|
4857
|
+
type index_d$1_PagingMetadataV2 = PagingMetadataV2;
|
|
4858
|
+
type index_d$1_PatchDataItemRequest = PatchDataItemRequest;
|
|
4859
|
+
type index_d$1_PatchDataItemResponse = PatchDataItemResponse;
|
|
4860
|
+
type index_d$1_PatchSet = PatchSet;
|
|
4861
|
+
type index_d$1_PublishPluginOptions = PublishPluginOptions;
|
|
4862
|
+
type index_d$1_QueryDataItemsOptions = QueryDataItemsOptions;
|
|
4863
|
+
type index_d$1_QueryDataItemsRequest = QueryDataItemsRequest;
|
|
4864
|
+
type index_d$1_QueryDataItemsResponse = QueryDataItemsResponse;
|
|
4865
|
+
type index_d$1_QueryDataItemsResponseNonNullableFields = QueryDataItemsResponseNonNullableFields;
|
|
4866
|
+
type index_d$1_QueryDistinctValuesOptions = QueryDistinctValuesOptions;
|
|
4867
|
+
type index_d$1_QueryDistinctValuesRequest = QueryDistinctValuesRequest;
|
|
4868
|
+
type index_d$1_QueryDistinctValuesRequestPagingMethodOneOf = QueryDistinctValuesRequestPagingMethodOneOf;
|
|
4869
|
+
type index_d$1_QueryDistinctValuesResponse = QueryDistinctValuesResponse;
|
|
4870
|
+
type index_d$1_QueryReferencedDataItemsOptions = QueryReferencedDataItemsOptions;
|
|
4871
|
+
type index_d$1_QueryReferencedDataItemsRequest = QueryReferencedDataItemsRequest;
|
|
4872
|
+
type index_d$1_QueryReferencedDataItemsRequestPagingMethodOneOf = QueryReferencedDataItemsRequestPagingMethodOneOf;
|
|
4873
|
+
type index_d$1_QueryReferencedDataItemsResponse = QueryReferencedDataItemsResponse;
|
|
4874
|
+
type index_d$1_QueryReferencedDataItemsResponseNonNullableFields = QueryReferencedDataItemsResponseNonNullableFields;
|
|
4875
|
+
type index_d$1_QueryV2 = QueryV2;
|
|
4876
|
+
type index_d$1_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf;
|
|
4877
|
+
type index_d$1_ReferencedItemOptions = ReferencedItemOptions;
|
|
4878
|
+
type index_d$1_ReferencedResult = ReferencedResult;
|
|
4879
|
+
type index_d$1_ReferencedResultEntityOneOf = ReferencedResultEntityOneOf;
|
|
4880
|
+
type index_d$1_RemoveDataItemOptions = RemoveDataItemOptions;
|
|
4881
|
+
type index_d$1_RemoveDataItemReferenceOptions = RemoveDataItemReferenceOptions;
|
|
4882
|
+
type index_d$1_RemoveDataItemReferenceRequest = RemoveDataItemReferenceRequest;
|
|
4883
|
+
type index_d$1_RemoveDataItemReferenceResponse = RemoveDataItemReferenceResponse;
|
|
4884
|
+
type index_d$1_RemoveDataItemReferenceResponseNonNullableFields = RemoveDataItemReferenceResponseNonNullableFields;
|
|
4885
|
+
type index_d$1_RemoveDataItemRequest = RemoveDataItemRequest;
|
|
4886
|
+
type index_d$1_RemoveDataItemResponse = RemoveDataItemResponse;
|
|
4887
|
+
type index_d$1_RemoveDataItemResponseNonNullableFields = RemoveDataItemResponseNonNullableFields;
|
|
4888
|
+
type index_d$1_RemoveFromArray = RemoveFromArray;
|
|
4889
|
+
type index_d$1_ReplaceDataItemReferencesOptions = ReplaceDataItemReferencesOptions;
|
|
4890
|
+
type index_d$1_ReplaceDataItemReferencesRequest = ReplaceDataItemReferencesRequest;
|
|
4891
|
+
type index_d$1_ReplaceDataItemReferencesResponse = ReplaceDataItemReferencesResponse;
|
|
4892
|
+
type index_d$1_ReplaceDataItemReferencesResponseNonNullableFields = ReplaceDataItemReferencesResponseNonNullableFields;
|
|
4893
|
+
type index_d$1_RestoreInfo = RestoreInfo;
|
|
4894
|
+
type index_d$1_SaveDataItemOptions = SaveDataItemOptions;
|
|
4895
|
+
type index_d$1_SaveDataItemRequest = SaveDataItemRequest;
|
|
4896
|
+
type index_d$1_SaveDataItemResponse = SaveDataItemResponse;
|
|
4897
|
+
type index_d$1_SaveDataItemResponseNonNullableFields = SaveDataItemResponseNonNullableFields;
|
|
4898
|
+
type index_d$1_SetField = SetField;
|
|
4899
|
+
type index_d$1_SortOrder = SortOrder;
|
|
4900
|
+
declare const index_d$1_SortOrder: typeof SortOrder;
|
|
4901
|
+
type index_d$1_Sorting = Sorting;
|
|
4902
|
+
type index_d$1_Sum = Sum;
|
|
4903
|
+
type index_d$1_TruncateDataItemsOptions = TruncateDataItemsOptions;
|
|
4904
|
+
type index_d$1_TruncateDataItemsRequest = TruncateDataItemsRequest;
|
|
4905
|
+
type index_d$1_TruncateDataItemsResponse = TruncateDataItemsResponse;
|
|
4906
|
+
type index_d$1_UnresolvedReference = UnresolvedReference;
|
|
4907
|
+
type index_d$1_UpdateDataItemOptions = UpdateDataItemOptions;
|
|
4908
|
+
type index_d$1_UpdateDataItemRequest = UpdateDataItemRequest;
|
|
4909
|
+
type index_d$1_UpdateDataItemResponse = UpdateDataItemResponse;
|
|
4910
|
+
type index_d$1_UpdateDataItemResponseNonNullableFields = UpdateDataItemResponseNonNullableFields;
|
|
4911
|
+
type index_d$1_WebhookIdentityType = WebhookIdentityType;
|
|
4912
|
+
declare const index_d$1_WebhookIdentityType: typeof WebhookIdentityType;
|
|
4913
|
+
type index_d$1__publicOnDataItemCreatedType = _publicOnDataItemCreatedType;
|
|
4914
|
+
type index_d$1__publicOnDataItemDeletedType = _publicOnDataItemDeletedType;
|
|
4915
|
+
type index_d$1__publicOnDataItemUpdatedType = _publicOnDataItemUpdatedType;
|
|
4916
|
+
declare const index_d$1_aggregateDataItems: typeof aggregateDataItems;
|
|
4917
|
+
declare const index_d$1_bulkInsertDataItemReferences: typeof bulkInsertDataItemReferences;
|
|
4918
|
+
declare const index_d$1_bulkInsertDataItems: typeof bulkInsertDataItems;
|
|
4919
|
+
declare const index_d$1_bulkRemoveDataItemReferences: typeof bulkRemoveDataItemReferences;
|
|
4920
|
+
declare const index_d$1_bulkRemoveDataItems: typeof bulkRemoveDataItems;
|
|
4921
|
+
declare const index_d$1_bulkSaveDataItems: typeof bulkSaveDataItems;
|
|
4922
|
+
declare const index_d$1_bulkUpdateDataItems: typeof bulkUpdateDataItems;
|
|
4923
|
+
declare const index_d$1_countDataItems: typeof countDataItems;
|
|
4924
|
+
declare const index_d$1_getDataItem: typeof getDataItem;
|
|
4925
|
+
declare const index_d$1_insertDataItem: typeof insertDataItem;
|
|
4926
|
+
declare const index_d$1_insertDataItemReference: typeof insertDataItemReference;
|
|
4927
|
+
declare const index_d$1_isReferencedDataItem: typeof isReferencedDataItem;
|
|
4928
|
+
declare const index_d$1_onDataItemCreated: typeof onDataItemCreated;
|
|
4929
|
+
declare const index_d$1_onDataItemDeleted: typeof onDataItemDeleted;
|
|
4930
|
+
declare const index_d$1_onDataItemUpdated: typeof onDataItemUpdated;
|
|
4931
|
+
declare const index_d$1_queryDataItems: typeof queryDataItems;
|
|
4932
|
+
declare const index_d$1_queryDistinctValues: typeof queryDistinctValues;
|
|
4933
|
+
declare const index_d$1_queryReferencedDataItems: typeof queryReferencedDataItems;
|
|
4934
|
+
declare const index_d$1_removeDataItem: typeof removeDataItem;
|
|
4935
|
+
declare const index_d$1_removeDataItemReference: typeof removeDataItemReference;
|
|
4936
|
+
declare const index_d$1_replaceDataItemReferences: typeof replaceDataItemReferences;
|
|
4937
|
+
declare const index_d$1_saveDataItem: typeof saveDataItem;
|
|
4938
|
+
declare const index_d$1_truncateDataItems: typeof truncateDataItems;
|
|
4939
|
+
declare const index_d$1_updateDataItem: typeof updateDataItem;
|
|
4940
|
+
declare namespace index_d$1 {
|
|
4941
|
+
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 };
|
|
4942
|
+
}
|
|
6490
4943
|
|
|
6491
4944
|
/** An index is a map of a collection's data, organized according to specific fields to increase query speed. */
|
|
6492
4945
|
interface Index {
|