@wix/automations 1.0.41 → 1.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/type-bundles/context.bundle.d.ts +1368 -80
- package/type-bundles/index.bundle.d.ts +1368 -80
- package/type-bundles/meta.bundle.d.ts +82 -0
|
@@ -1,39 +1,127 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
type HostModule$2<T, H extends Host$2> = {
|
|
2
|
+
__type: 'host';
|
|
3
|
+
create(host: H): T;
|
|
4
|
+
};
|
|
5
|
+
type HostModuleAPI$2<T extends HostModule$2<any, any>> = T extends HostModule$2<infer U, any> ? U : never;
|
|
6
|
+
type Host$2<Environment = unknown> = {
|
|
7
|
+
channel: {
|
|
8
|
+
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
9
|
+
disconnect: () => void;
|
|
10
|
+
} | Promise<{
|
|
11
|
+
disconnect: () => void;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
environment?: Environment;
|
|
15
|
+
/**
|
|
16
|
+
* Optional bast url to use for API requests, for example `www.wixapis.com`
|
|
17
|
+
*/
|
|
18
|
+
apiBaseUrl?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Possible data to be provided by every host, for cross cutting concerns
|
|
21
|
+
* like internationalization, billing, etc.
|
|
22
|
+
*/
|
|
23
|
+
essentials?: {
|
|
24
|
+
/**
|
|
25
|
+
* The language of the currently viewed session
|
|
26
|
+
*/
|
|
27
|
+
language?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The locale of the currently viewed session
|
|
30
|
+
*/
|
|
31
|
+
locale?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Any headers that should be passed through to the API requests
|
|
34
|
+
*/
|
|
35
|
+
passThroughHeaders?: Record<string, string>;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
|
|
40
|
+
interface HttpClient$2 {
|
|
41
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
4
42
|
fetchWithAuth: typeof fetch;
|
|
5
43
|
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
44
|
+
getActiveToken?: () => string | undefined;
|
|
6
45
|
}
|
|
7
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
8
|
-
type HttpResponse<T = any> = {
|
|
46
|
+
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
47
|
+
type HttpResponse$2<T = any> = {
|
|
9
48
|
data: T;
|
|
10
49
|
status: number;
|
|
11
50
|
statusText: string;
|
|
12
51
|
headers: any;
|
|
13
52
|
request?: any;
|
|
14
53
|
};
|
|
15
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
54
|
+
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
16
55
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
17
56
|
url: string;
|
|
18
57
|
data?: Data;
|
|
19
58
|
params?: URLSearchParams;
|
|
20
|
-
} & APIMetadata;
|
|
21
|
-
type APIMetadata = {
|
|
59
|
+
} & APIMetadata$2;
|
|
60
|
+
type APIMetadata$2 = {
|
|
22
61
|
methodFqn?: string;
|
|
23
62
|
entityFqdn?: string;
|
|
24
63
|
packageName?: string;
|
|
25
64
|
};
|
|
26
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
27
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
65
|
+
type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
|
|
66
|
+
type EventDefinition$5<Payload = unknown, Type extends string = string> = {
|
|
28
67
|
__type: 'event-definition';
|
|
29
68
|
type: Type;
|
|
30
69
|
isDomainEvent?: boolean;
|
|
31
70
|
transformations?: (envelope: unknown) => Payload;
|
|
32
71
|
__payload: Payload;
|
|
33
72
|
};
|
|
34
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
35
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
36
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
73
|
+
declare function EventDefinition$5<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$5<Payload, Type>;
|
|
74
|
+
type EventHandler$5<T extends EventDefinition$5> = (payload: T['__payload']) => void | Promise<void>;
|
|
75
|
+
type BuildEventDefinition$5<T extends EventDefinition$5<any, string>> = (handler: EventHandler$5<T>) => void;
|
|
76
|
+
|
|
77
|
+
type ServicePluginMethodInput$2 = {
|
|
78
|
+
request: any;
|
|
79
|
+
metadata: any;
|
|
80
|
+
};
|
|
81
|
+
type ServicePluginContract$2 = Record<string, (payload: ServicePluginMethodInput$2) => unknown | Promise<unknown>>;
|
|
82
|
+
type ServicePluginMethodMetadata$2 = {
|
|
83
|
+
name: string;
|
|
84
|
+
primaryHttpMappingPath: string;
|
|
85
|
+
transformations: {
|
|
86
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$2;
|
|
87
|
+
toREST: (...args: unknown[]) => unknown;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
type ServicePluginDefinition$2<Contract extends ServicePluginContract$2> = {
|
|
91
|
+
__type: 'service-plugin-definition';
|
|
92
|
+
componentType: string;
|
|
93
|
+
methods: ServicePluginMethodMetadata$2[];
|
|
94
|
+
__contract: Contract;
|
|
95
|
+
};
|
|
96
|
+
declare function ServicePluginDefinition$2<Contract extends ServicePluginContract$2>(componentType: string, methods: ServicePluginMethodMetadata$2[]): ServicePluginDefinition$2<Contract>;
|
|
97
|
+
type BuildServicePluginDefinition$2<T extends ServicePluginDefinition$2<any>> = (implementation: T['__contract']) => void;
|
|
98
|
+
declare const SERVICE_PLUGIN_ERROR_TYPE$2 = "wix_spi_error";
|
|
99
|
+
|
|
100
|
+
type RequestContext$2 = {
|
|
101
|
+
isSSR: boolean;
|
|
102
|
+
host: string;
|
|
103
|
+
protocol?: string;
|
|
104
|
+
};
|
|
105
|
+
type ResponseTransformer$2 = (data: any, headers?: any) => any;
|
|
106
|
+
/**
|
|
107
|
+
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
108
|
+
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
109
|
+
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
110
|
+
*/
|
|
111
|
+
type Method$2 = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
112
|
+
type AmbassadorRequestOptions$2<T = any> = {
|
|
113
|
+
_?: T;
|
|
114
|
+
url?: string;
|
|
115
|
+
method?: Method$2;
|
|
116
|
+
params?: any;
|
|
117
|
+
data?: any;
|
|
118
|
+
transformResponse?: ResponseTransformer$2 | ResponseTransformer$2[];
|
|
119
|
+
};
|
|
120
|
+
type AmbassadorFactory$2<Request, Response> = (payload: Request) => ((context: RequestContext$2) => AmbassadorRequestOptions$2<Response>) & {
|
|
121
|
+
__isAmbassador: boolean;
|
|
122
|
+
};
|
|
123
|
+
type AmbassadorFunctionDescriptor$2<Request = any, Response = any> = AmbassadorFactory$2<Request, Response>;
|
|
124
|
+
type BuildAmbassadorFunction$2<T extends AmbassadorFunctionDescriptor$2> = T extends AmbassadorFunctionDescriptor$2<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
37
125
|
|
|
38
126
|
declare global {
|
|
39
127
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -42,6 +130,284 @@ declare global {
|
|
|
42
130
|
}
|
|
43
131
|
}
|
|
44
132
|
|
|
133
|
+
declare const emptyObjectSymbol$2: unique symbol;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
Represents a strictly empty plain object, the `{}` value.
|
|
137
|
+
|
|
138
|
+
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)).
|
|
139
|
+
|
|
140
|
+
@example
|
|
141
|
+
```
|
|
142
|
+
import type {EmptyObject} from 'type-fest';
|
|
143
|
+
|
|
144
|
+
// The following illustrates the problem with `{}`.
|
|
145
|
+
const foo1: {} = {}; // Pass
|
|
146
|
+
const foo2: {} = []; // Pass
|
|
147
|
+
const foo3: {} = 42; // Pass
|
|
148
|
+
const foo4: {} = {a: 1}; // Pass
|
|
149
|
+
|
|
150
|
+
// With `EmptyObject` only the first case is valid.
|
|
151
|
+
const bar1: EmptyObject = {}; // Pass
|
|
152
|
+
const bar2: EmptyObject = 42; // Fail
|
|
153
|
+
const bar3: EmptyObject = []; // Fail
|
|
154
|
+
const bar4: EmptyObject = {a: 1}; // Fail
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
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}.
|
|
158
|
+
|
|
159
|
+
@category Object
|
|
160
|
+
*/
|
|
161
|
+
type EmptyObject$2 = {[emptyObjectSymbol$2]?: never};
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
Returns a boolean for whether the two given types are equal.
|
|
165
|
+
|
|
166
|
+
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
167
|
+
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
168
|
+
|
|
169
|
+
Use-cases:
|
|
170
|
+
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
171
|
+
|
|
172
|
+
@example
|
|
173
|
+
```
|
|
174
|
+
import type {IsEqual} from 'type-fest';
|
|
175
|
+
|
|
176
|
+
// This type returns a boolean for whether the given array includes the given item.
|
|
177
|
+
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
178
|
+
type Includes<Value extends readonly any[], Item> =
|
|
179
|
+
Value extends readonly [Value[0], ...infer rest]
|
|
180
|
+
? IsEqual<Value[0], Item> extends true
|
|
181
|
+
? true
|
|
182
|
+
: Includes<rest, Item>
|
|
183
|
+
: false;
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
@category Type Guard
|
|
187
|
+
@category Utilities
|
|
188
|
+
*/
|
|
189
|
+
type IsEqual$2<A, B> =
|
|
190
|
+
(<G>() => G extends A ? 1 : 2) extends
|
|
191
|
+
(<G>() => G extends B ? 1 : 2)
|
|
192
|
+
? true
|
|
193
|
+
: false;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
Filter out keys from an object.
|
|
197
|
+
|
|
198
|
+
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
199
|
+
Returns `never` if `Key` extends `Exclude`.
|
|
200
|
+
Returns `Key` otherwise.
|
|
201
|
+
|
|
202
|
+
@example
|
|
203
|
+
```
|
|
204
|
+
type Filtered = Filter<'foo', 'foo'>;
|
|
205
|
+
//=> never
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
@example
|
|
209
|
+
```
|
|
210
|
+
type Filtered = Filter<'bar', string>;
|
|
211
|
+
//=> never
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
@example
|
|
215
|
+
```
|
|
216
|
+
type Filtered = Filter<'bar', 'foo'>;
|
|
217
|
+
//=> 'bar'
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
@see {Except}
|
|
221
|
+
*/
|
|
222
|
+
type Filter$5<KeyType, ExcludeType> = IsEqual$2<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
223
|
+
|
|
224
|
+
type ExceptOptions$2 = {
|
|
225
|
+
/**
|
|
226
|
+
Disallow assigning non-specified properties.
|
|
227
|
+
|
|
228
|
+
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
229
|
+
|
|
230
|
+
@default false
|
|
231
|
+
*/
|
|
232
|
+
requireExactProps?: boolean;
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
Create a type from an object type without certain keys.
|
|
237
|
+
|
|
238
|
+
We recommend setting the `requireExactProps` option to `true`.
|
|
239
|
+
|
|
240
|
+
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.
|
|
241
|
+
|
|
242
|
+
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)).
|
|
243
|
+
|
|
244
|
+
@example
|
|
245
|
+
```
|
|
246
|
+
import type {Except} from 'type-fest';
|
|
247
|
+
|
|
248
|
+
type Foo = {
|
|
249
|
+
a: number;
|
|
250
|
+
b: string;
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
type FooWithoutA = Except<Foo, 'a'>;
|
|
254
|
+
//=> {b: string}
|
|
255
|
+
|
|
256
|
+
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
257
|
+
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
258
|
+
|
|
259
|
+
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
260
|
+
//=> {a: number} & Partial<Record<"b", never>>
|
|
261
|
+
|
|
262
|
+
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
263
|
+
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
@category Object
|
|
267
|
+
*/
|
|
268
|
+
type Except$2<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions$2 = {requireExactProps: false}> = {
|
|
269
|
+
[KeyType in keyof ObjectType as Filter$5<KeyType, KeysType>]: ObjectType[KeyType];
|
|
270
|
+
} & (Options['requireExactProps'] extends true
|
|
271
|
+
? Partial<Record<KeysType, never>>
|
|
272
|
+
: {});
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
276
|
+
|
|
277
|
+
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
278
|
+
|
|
279
|
+
@example
|
|
280
|
+
```
|
|
281
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
282
|
+
|
|
283
|
+
interface Example {
|
|
284
|
+
a: string;
|
|
285
|
+
b: string | number;
|
|
286
|
+
c?: string;
|
|
287
|
+
d: {};
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
291
|
+
//=> 'a'
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
295
|
+
|
|
296
|
+
@example
|
|
297
|
+
```
|
|
298
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
299
|
+
|
|
300
|
+
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
301
|
+
//=> 'a' | 'c'
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
@category Object
|
|
305
|
+
*/
|
|
306
|
+
type ConditionalKeys$2<Base, Condition> = NonNullable<
|
|
307
|
+
// Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
|
|
308
|
+
{
|
|
309
|
+
// Map through all the keys of the given base type.
|
|
310
|
+
[Key in keyof Base]:
|
|
311
|
+
// Pick only keys with types extending the given `Condition` type.
|
|
312
|
+
Base[Key] extends Condition
|
|
313
|
+
// Retain this key since the condition passes.
|
|
314
|
+
? Key
|
|
315
|
+
// Discard this key since the condition fails.
|
|
316
|
+
: never;
|
|
317
|
+
|
|
318
|
+
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
319
|
+
}[keyof Base]
|
|
320
|
+
>;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
Exclude keys from a shape that matches the given `Condition`.
|
|
324
|
+
|
|
325
|
+
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.
|
|
326
|
+
|
|
327
|
+
@example
|
|
328
|
+
```
|
|
329
|
+
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
330
|
+
|
|
331
|
+
class Awesome {
|
|
332
|
+
name: string;
|
|
333
|
+
successes: number;
|
|
334
|
+
failures: bigint;
|
|
335
|
+
|
|
336
|
+
run() {}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
|
|
340
|
+
//=> {run: () => void}
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
@example
|
|
344
|
+
```
|
|
345
|
+
import type {ConditionalExcept} from 'type-fest';
|
|
346
|
+
|
|
347
|
+
interface Example {
|
|
348
|
+
a: string;
|
|
349
|
+
b: string | number;
|
|
350
|
+
c: () => void;
|
|
351
|
+
d: {};
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
355
|
+
//=> {b: string | number; c: () => void; d: {}}
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
@category Object
|
|
359
|
+
*/
|
|
360
|
+
type ConditionalExcept$2<Base, Condition> = Except$2<
|
|
361
|
+
Base,
|
|
362
|
+
ConditionalKeys$2<Base, Condition>
|
|
363
|
+
>;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Descriptors are objects that describe the API of a module, and the module
|
|
367
|
+
* can either be a REST module or a host module.
|
|
368
|
+
* This type is recursive, so it can describe nested modules.
|
|
369
|
+
*/
|
|
370
|
+
type Descriptors$2 = RESTFunctionDescriptor$2 | AmbassadorFunctionDescriptor$2 | HostModule$2<any, any> | EventDefinition$5<any> | ServicePluginDefinition$2<any> | {
|
|
371
|
+
[key: string]: Descriptors$2 | PublicMetadata$2 | any;
|
|
372
|
+
};
|
|
373
|
+
/**
|
|
374
|
+
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
375
|
+
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
376
|
+
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
377
|
+
* do not match the given host (as they will not work with the given host).
|
|
378
|
+
*/
|
|
379
|
+
type BuildDescriptors$2<T extends Descriptors$2, H extends Host$2<any> | undefined, Depth extends number = 5> = {
|
|
380
|
+
done: T;
|
|
381
|
+
recurse: T extends {
|
|
382
|
+
__type: typeof SERVICE_PLUGIN_ERROR_TYPE$2;
|
|
383
|
+
} ? never : T extends AmbassadorFunctionDescriptor$2 ? BuildAmbassadorFunction$2<T> : T extends RESTFunctionDescriptor$2 ? BuildRESTFunction$2<T> : T extends EventDefinition$5<any> ? BuildEventDefinition$5<T> : T extends ServicePluginDefinition$2<any> ? BuildServicePluginDefinition$2<T> : T extends HostModule$2<any, any> ? HostModuleAPI$2<T> : ConditionalExcept$2<{
|
|
384
|
+
[Key in keyof T]: T[Key] extends Descriptors$2 ? BuildDescriptors$2<T[Key], H, [
|
|
385
|
+
-1,
|
|
386
|
+
0,
|
|
387
|
+
1,
|
|
388
|
+
2,
|
|
389
|
+
3,
|
|
390
|
+
4,
|
|
391
|
+
5
|
|
392
|
+
][Depth]> : never;
|
|
393
|
+
}, EmptyObject$2>;
|
|
394
|
+
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
395
|
+
type PublicMetadata$2 = {
|
|
396
|
+
PACKAGE_NAME?: string;
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
declare global {
|
|
400
|
+
interface ContextualClient {
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* A type used to create concerete types from SDK descriptors in
|
|
405
|
+
* case a contextual client is available.
|
|
406
|
+
*/
|
|
407
|
+
type MaybeContext$2<T extends Descriptors$2> = globalThis.ContextualClient extends {
|
|
408
|
+
host: Host$2;
|
|
409
|
+
} ? BuildDescriptors$2<T, globalThis.ContextualClient['host']> : T;
|
|
410
|
+
|
|
45
411
|
/** Automation */
|
|
46
412
|
interface Automation$2 {
|
|
47
413
|
/**
|
|
@@ -120,7 +486,7 @@ interface Trigger$2 {
|
|
|
120
486
|
/** Identifier for this trigger - human readable action key */
|
|
121
487
|
triggerKey?: string;
|
|
122
488
|
/** optional list of filters on schema fields */
|
|
123
|
-
filters?: Filter$
|
|
489
|
+
filters?: Filter$4[];
|
|
124
490
|
/**
|
|
125
491
|
* optional - allows to define a trigger whose following actions will be executed only if the same event for the same resource has not in the last X seconds.
|
|
126
492
|
* for example, if the trigger is "session booked", the resource is a contact and the timeframe is 3600 seconds (contact hasn't booked another session in the last hour),
|
|
@@ -128,7 +494,7 @@ interface Trigger$2 {
|
|
|
128
494
|
*/
|
|
129
495
|
debounce?: Debounce;
|
|
130
496
|
}
|
|
131
|
-
interface Filter$
|
|
497
|
+
interface Filter$4 {
|
|
132
498
|
/** the filter identifier */
|
|
133
499
|
_id?: string | null;
|
|
134
500
|
/** the field key from the schema, for example "formId" */
|
|
@@ -1608,7 +1974,7 @@ interface GenerateActionInputMappingFromTemplateOptions {
|
|
|
1608
1974
|
actionInputMappingTemplate: Record<string, any> | null;
|
|
1609
1975
|
}
|
|
1610
1976
|
|
|
1611
|
-
declare function createAutomation$3(httpClient: HttpClient): CreateAutomationSignature$1;
|
|
1977
|
+
declare function createAutomation$3(httpClient: HttpClient$2): CreateAutomationSignature$1;
|
|
1612
1978
|
interface CreateAutomationSignature$1 {
|
|
1613
1979
|
/**
|
|
1614
1980
|
* Creates a new Automation
|
|
@@ -1617,7 +1983,7 @@ interface CreateAutomationSignature$1 {
|
|
|
1617
1983
|
*/
|
|
1618
1984
|
(automation: Automation$2): Promise<Automation$2 & AutomationNonNullableFields$1>;
|
|
1619
1985
|
}
|
|
1620
|
-
declare function getAutomation$3(httpClient: HttpClient): GetAutomationSignature$1;
|
|
1986
|
+
declare function getAutomation$3(httpClient: HttpClient$2): GetAutomationSignature$1;
|
|
1621
1987
|
interface GetAutomationSignature$1 {
|
|
1622
1988
|
/**
|
|
1623
1989
|
* Get a Automation by id
|
|
@@ -1626,7 +1992,7 @@ interface GetAutomationSignature$1 {
|
|
|
1626
1992
|
*/
|
|
1627
1993
|
(automationId: string, options?: GetAutomationOptions$1 | undefined): Promise<Automation$2 & AutomationNonNullableFields$1>;
|
|
1628
1994
|
}
|
|
1629
|
-
declare function updateAutomation$3(httpClient: HttpClient): UpdateAutomationSignature$1;
|
|
1995
|
+
declare function updateAutomation$3(httpClient: HttpClient$2): UpdateAutomationSignature$1;
|
|
1630
1996
|
interface UpdateAutomationSignature$1 {
|
|
1631
1997
|
/**
|
|
1632
1998
|
* Update a Automation, supports partial update
|
|
@@ -1636,7 +2002,7 @@ interface UpdateAutomationSignature$1 {
|
|
|
1636
2002
|
*/
|
|
1637
2003
|
(_id: string | null, automation: UpdateAutomation$1): Promise<Automation$2 & AutomationNonNullableFields$1>;
|
|
1638
2004
|
}
|
|
1639
|
-
declare function deleteAutomation$3(httpClient: HttpClient): DeleteAutomationSignature$1;
|
|
2005
|
+
declare function deleteAutomation$3(httpClient: HttpClient$2): DeleteAutomationSignature$1;
|
|
1640
2006
|
interface DeleteAutomationSignature$1 {
|
|
1641
2007
|
/**
|
|
1642
2008
|
* Delete an Automation
|
|
@@ -1644,14 +2010,14 @@ interface DeleteAutomationSignature$1 {
|
|
|
1644
2010
|
*/
|
|
1645
2011
|
(automationId: string, options?: DeleteAutomationOptions | undefined): Promise<void>;
|
|
1646
2012
|
}
|
|
1647
|
-
declare function queryAutomations$3(httpClient: HttpClient): QueryAutomationsSignature$1;
|
|
2013
|
+
declare function queryAutomations$3(httpClient: HttpClient$2): QueryAutomationsSignature$1;
|
|
1648
2014
|
interface QueryAutomationsSignature$1 {
|
|
1649
2015
|
/**
|
|
1650
2016
|
* Query Automations using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
|
|
1651
2017
|
*/
|
|
1652
2018
|
(options?: QueryAutomationsOptions | undefined): AutomationsQueryBuilder$1;
|
|
1653
2019
|
}
|
|
1654
|
-
declare function overrideApplicationAutomation$1(httpClient: HttpClient): OverrideApplicationAutomationSignature;
|
|
2020
|
+
declare function overrideApplicationAutomation$1(httpClient: HttpClient$2): OverrideApplicationAutomationSignature;
|
|
1655
2021
|
interface OverrideApplicationAutomationSignature {
|
|
1656
2022
|
/**
|
|
1657
2023
|
* Creates a new Automation
|
|
@@ -1659,7 +2025,7 @@ interface OverrideApplicationAutomationSignature {
|
|
|
1659
2025
|
*/
|
|
1660
2026
|
(automation: Automation$2): Promise<OverrideApplicationAutomationResponse & OverrideApplicationAutomationResponseNonNullableFields>;
|
|
1661
2027
|
}
|
|
1662
|
-
declare function validateAutomationById$1(httpClient: HttpClient): ValidateAutomationByIdSignature;
|
|
2028
|
+
declare function validateAutomationById$1(httpClient: HttpClient$2): ValidateAutomationByIdSignature;
|
|
1663
2029
|
interface ValidateAutomationByIdSignature {
|
|
1664
2030
|
/**
|
|
1665
2031
|
* Validate Automation by Id
|
|
@@ -1667,7 +2033,7 @@ interface ValidateAutomationByIdSignature {
|
|
|
1667
2033
|
*/
|
|
1668
2034
|
(automationId: string, options?: ValidateAutomationByIdOptions | undefined): Promise<ValidateAutomationByIdResponse & ValidateAutomationByIdResponseNonNullableFields>;
|
|
1669
2035
|
}
|
|
1670
|
-
declare function validateAutomation$3(httpClient: HttpClient): ValidateAutomationSignature$1;
|
|
2036
|
+
declare function validateAutomation$3(httpClient: HttpClient$2): ValidateAutomationSignature$1;
|
|
1671
2037
|
interface ValidateAutomationSignature$1 {
|
|
1672
2038
|
/**
|
|
1673
2039
|
* Validate Automation
|
|
@@ -1675,19 +2041,19 @@ interface ValidateAutomationSignature$1 {
|
|
|
1675
2041
|
*/
|
|
1676
2042
|
(automation: Automation$2): Promise<ValidateAutomationResponse$1 & ValidateAutomationResponseNonNullableFields$1>;
|
|
1677
2043
|
}
|
|
1678
|
-
declare function getAutomationActivationStats$1(httpClient: HttpClient): GetAutomationActivationStatsSignature;
|
|
2044
|
+
declare function getAutomationActivationStats$1(httpClient: HttpClient$2): GetAutomationActivationStatsSignature;
|
|
1679
2045
|
interface GetAutomationActivationStatsSignature {
|
|
1680
2046
|
/** @param - Automation ID */
|
|
1681
2047
|
(automationId: string, options?: GetAutomationActivationStatsOptions | undefined): Promise<GetAutomationActivationReportsResponse & GetAutomationActivationReportsResponseNonNullableFields>;
|
|
1682
2048
|
}
|
|
1683
|
-
declare function getActionsQuotaInfo$3(httpClient: HttpClient): GetActionsQuotaInfoSignature$1;
|
|
2049
|
+
declare function getActionsQuotaInfo$3(httpClient: HttpClient$2): GetActionsQuotaInfoSignature$1;
|
|
1684
2050
|
interface GetActionsQuotaInfoSignature$1 {
|
|
1685
2051
|
/**
|
|
1686
2052
|
* Get actions quota information
|
|
1687
2053
|
*/
|
|
1688
2054
|
(): Promise<GetActionsQuotaInfoResponse$1 & GetActionsQuotaInfoResponseNonNullableFields$1>;
|
|
1689
2055
|
}
|
|
1690
|
-
declare function generateActionInputMappingFromTemplate$1(httpClient: HttpClient): GenerateActionInputMappingFromTemplateSignature;
|
|
2056
|
+
declare function generateActionInputMappingFromTemplate$1(httpClient: HttpClient$2): GenerateActionInputMappingFromTemplateSignature;
|
|
1691
2057
|
interface GenerateActionInputMappingFromTemplateSignature {
|
|
1692
2058
|
/**
|
|
1693
2059
|
* Generate action input mapping from a template
|
|
@@ -1695,25 +2061,43 @@ interface GenerateActionInputMappingFromTemplateSignature {
|
|
|
1695
2061
|
*/
|
|
1696
2062
|
(appId: string, options: GenerateActionInputMappingFromTemplateOptions): Promise<GenerateActionInputMappingFromTemplateResponse>;
|
|
1697
2063
|
}
|
|
1698
|
-
declare const onAutomationCreated$3: EventDefinition<AutomationCreatedEnvelope$1, "wix.automations.v1.automation_created">;
|
|
1699
|
-
declare const onAutomationUpdated$3: EventDefinition<AutomationUpdatedEnvelope$1, "wix.automations.v1.automation_updated">;
|
|
1700
|
-
declare const onAutomationDeleted$3: EventDefinition<AutomationDeletedEnvelope$1, "wix.automations.v1.automation_deleted">;
|
|
1701
|
-
declare const onAutomationUpdatedWithPreviousEntity$3: EventDefinition<AutomationUpdatedWithPreviousEntityEnvelope$1, "wix.automations.v1.automation_updated_with_previous_entity">;
|
|
1702
|
-
declare const onAutomationDeletedWithEntity$3: EventDefinition<AutomationDeletedWithEntityEnvelope$1, "wix.automations.v1.automation_deleted_with_entity">;
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
declare
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
declare
|
|
1716
|
-
|
|
2064
|
+
declare const onAutomationCreated$3: EventDefinition$5<AutomationCreatedEnvelope$1, "wix.automations.v1.automation_created">;
|
|
2065
|
+
declare const onAutomationUpdated$3: EventDefinition$5<AutomationUpdatedEnvelope$1, "wix.automations.v1.automation_updated">;
|
|
2066
|
+
declare const onAutomationDeleted$3: EventDefinition$5<AutomationDeletedEnvelope$1, "wix.automations.v1.automation_deleted">;
|
|
2067
|
+
declare const onAutomationUpdatedWithPreviousEntity$3: EventDefinition$5<AutomationUpdatedWithPreviousEntityEnvelope$1, "wix.automations.v1.automation_updated_with_previous_entity">;
|
|
2068
|
+
declare const onAutomationDeletedWithEntity$3: EventDefinition$5<AutomationDeletedWithEntityEnvelope$1, "wix.automations.v1.automation_deleted_with_entity">;
|
|
2069
|
+
|
|
2070
|
+
type EventDefinition$4<Payload = unknown, Type extends string = string> = {
|
|
2071
|
+
__type: 'event-definition';
|
|
2072
|
+
type: Type;
|
|
2073
|
+
isDomainEvent?: boolean;
|
|
2074
|
+
transformations?: (envelope: unknown) => Payload;
|
|
2075
|
+
__payload: Payload;
|
|
2076
|
+
};
|
|
2077
|
+
declare function EventDefinition$4<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$4<Payload, Type>;
|
|
2078
|
+
type EventHandler$4<T extends EventDefinition$4> = (payload: T['__payload']) => void | Promise<void>;
|
|
2079
|
+
type BuildEventDefinition$4<T extends EventDefinition$4<any, string>> = (handler: EventHandler$4<T>) => void;
|
|
2080
|
+
|
|
2081
|
+
declare global {
|
|
2082
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2083
|
+
interface SymbolConstructor {
|
|
2084
|
+
readonly observable: symbol;
|
|
2085
|
+
}
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
declare function createEventModule$2<T extends EventDefinition$4<any, string>>(eventDefinition: T): BuildEventDefinition$4<T> & T;
|
|
2089
|
+
|
|
2090
|
+
declare const createAutomation$2: MaybeContext$2<BuildRESTFunction$2<typeof createAutomation$3> & typeof createAutomation$3>;
|
|
2091
|
+
declare const getAutomation$2: MaybeContext$2<BuildRESTFunction$2<typeof getAutomation$3> & typeof getAutomation$3>;
|
|
2092
|
+
declare const updateAutomation$2: MaybeContext$2<BuildRESTFunction$2<typeof updateAutomation$3> & typeof updateAutomation$3>;
|
|
2093
|
+
declare const deleteAutomation$2: MaybeContext$2<BuildRESTFunction$2<typeof deleteAutomation$3> & typeof deleteAutomation$3>;
|
|
2094
|
+
declare const queryAutomations$2: MaybeContext$2<BuildRESTFunction$2<typeof queryAutomations$3> & typeof queryAutomations$3>;
|
|
2095
|
+
declare const overrideApplicationAutomation: MaybeContext$2<BuildRESTFunction$2<typeof overrideApplicationAutomation$1> & typeof overrideApplicationAutomation$1>;
|
|
2096
|
+
declare const validateAutomationById: MaybeContext$2<BuildRESTFunction$2<typeof validateAutomationById$1> & typeof validateAutomationById$1>;
|
|
2097
|
+
declare const validateAutomation$2: MaybeContext$2<BuildRESTFunction$2<typeof validateAutomation$3> & typeof validateAutomation$3>;
|
|
2098
|
+
declare const getAutomationActivationStats: MaybeContext$2<BuildRESTFunction$2<typeof getAutomationActivationStats$1> & typeof getAutomationActivationStats$1>;
|
|
2099
|
+
declare const getActionsQuotaInfo$2: MaybeContext$2<BuildRESTFunction$2<typeof getActionsQuotaInfo$3> & typeof getActionsQuotaInfo$3>;
|
|
2100
|
+
declare const generateActionInputMappingFromTemplate: MaybeContext$2<BuildRESTFunction$2<typeof generateActionInputMappingFromTemplate$1> & typeof generateActionInputMappingFromTemplate$1>;
|
|
1717
2101
|
|
|
1718
2102
|
type _publicOnAutomationCreatedType$1 = typeof onAutomationCreated$3;
|
|
1719
2103
|
/** */
|
|
@@ -1793,8 +2177,418 @@ declare const index_d$2_getAutomationActivationStats: typeof getAutomationActiva
|
|
|
1793
2177
|
declare const index_d$2_overrideApplicationAutomation: typeof overrideApplicationAutomation;
|
|
1794
2178
|
declare const index_d$2_validateAutomationById: typeof validateAutomationById;
|
|
1795
2179
|
declare namespace index_d$2 {
|
|
1796
|
-
export { type Action$2 as Action, type ActionConfigurationError$1 as ActionConfigurationError, ActionErrorType$1 as ActionErrorType, type ActionEvent$2 as ActionEvent, type ActionProviderQuotaInfo$1 as ActionProviderQuotaInfo, type ActionQuotaInfo$1 as ActionQuotaInfo, type ActionValidationError$1 as ActionValidationError, type ActionValidationErrorErrorOneOf$1 as ActionValidationErrorErrorOneOf, type ActionValidationInfo$1 as ActionValidationInfo, type index_d$2_ActivationReport as ActivationReport, ActivationStatus$1 as ActivationStatus, type AdditionalInfo$1 as AdditionalInfo, type ApplicationError$2 as ApplicationError, type Asset$1 as Asset, type Automation$2 as Automation, type AutomationCreatedEnvelope$1 as AutomationCreatedEnvelope, type AutomationDeletedEnvelope$1 as AutomationDeletedEnvelope, type AutomationDeletedWithEntityEnvelope$1 as AutomationDeletedWithEntityEnvelope, type index_d$2_AutomationMetadata as AutomationMetadata, type AutomationNonNullableFields$1 as AutomationNonNullableFields, type AutomationUpdatedEnvelope$1 as AutomationUpdatedEnvelope, type AutomationUpdatedWithPreviousEntityEnvelope$1 as AutomationUpdatedWithPreviousEntityEnvelope, type AutomationsQueryBuilder$1 as AutomationsQueryBuilder, type AutomationsQueryResult$1 as AutomationsQueryResult, type BaseEventMetadata$2 as BaseEventMetadata, BlockType$1 as BlockType, type BulkActionMetadata$2 as BulkActionMetadata, type index_d$2_BulkCreateApplicationAutomationRequest as BulkCreateApplicationAutomationRequest, type index_d$2_BulkCreateApplicationAutomationResponse as BulkCreateApplicationAutomationResponse, type BulkDeleteAutomationsRequest$1 as BulkDeleteAutomationsRequest, type BulkDeleteAutomationsResponse$1 as BulkDeleteAutomationsResponse, type CTA$1 as CTA, type index_d$2_Condition as Condition, type ConditionBlock$1 as ConditionBlock, type index_d$2_Conditions as Conditions, type CreateAutomationRequest$1 as CreateAutomationRequest, type CreateAutomationResponse$1 as CreateAutomationResponse, type CreateAutomationResponseNonNullableFields$1 as CreateAutomationResponseNonNullableFields, type CursorPaging$1 as CursorPaging, type Cursors$1 as Cursors, type index_d$2_Debounce as Debounce, type Delay$1 as Delay, type index_d$2_DelayTypeOneOf as DelayTypeOneOf, type index_d$2_DeleteAutomationOptions as DeleteAutomationOptions, type DeleteAutomationRequest$1 as DeleteAutomationRequest, type DeleteAutomationResponse$1 as DeleteAutomationResponse, type DeleteContext$1 as DeleteContext, DeleteStatus$1 as DeleteStatus, type DeletedWithEntity$1 as DeletedWithEntity, type DomainEvent$2 as DomainEvent, type DomainEventBodyOneOf$2 as DomainEventBodyOneOf, type Empty$2 as Empty, type EntityCreatedEvent$2 as EntityCreatedEvent, type EntityDeletedEvent$2 as EntityDeletedEvent, type EntityUpdatedEvent$2 as EntityUpdatedEvent, type EventMetadata$2 as EventMetadata, type index_d$2_ExtendedFields as ExtendedFields, type Filter$2 as Filter, type index_d$2_GenerateActionInputMappingFromTemplateOptions as GenerateActionInputMappingFromTemplateOptions, type index_d$2_GenerateActionInputMappingFromTemplateRequest as GenerateActionInputMappingFromTemplateRequest, type index_d$2_GenerateActionInputMappingFromTemplateResponse as GenerateActionInputMappingFromTemplateResponse, type index_d$2_GenerateApplicationAutomationFromCustomRequest as GenerateApplicationAutomationFromCustomRequest, type index_d$2_GenerateApplicationAutomationFromCustomResponse as GenerateApplicationAutomationFromCustomResponse, type GetActionsQuotaInfoRequest$1 as GetActionsQuotaInfoRequest, type GetActionsQuotaInfoResponse$1 as GetActionsQuotaInfoResponse, type GetActionsQuotaInfoResponseNonNullableFields$1 as GetActionsQuotaInfoResponseNonNullableFields, type index_d$2_GetApplicationAutomationRequest as GetApplicationAutomationRequest, type index_d$2_GetApplicationAutomationResponse as GetApplicationAutomationResponse, type GetAutomationActionSchemaRequest$1 as GetAutomationActionSchemaRequest, type GetAutomationActionSchemaResponse$1 as GetAutomationActionSchemaResponse, type index_d$2_GetAutomationActivationReportsRequest as GetAutomationActivationReportsRequest, type index_d$2_GetAutomationActivationReportsResponse as GetAutomationActivationReportsResponse, type index_d$2_GetAutomationActivationReportsResponseNonNullableFields as GetAutomationActivationReportsResponseNonNullableFields, type index_d$2_GetAutomationActivationStatsOptions as GetAutomationActivationStatsOptions, type GetAutomationOptions$1 as GetAutomationOptions, type GetAutomationRequest$1 as GetAutomationRequest, type GetAutomationResponse$1 as GetAutomationResponse, type GetAutomationResponseNonNullableFields$1 as GetAutomationResponseNonNullableFields, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, type ItemMetadata$2 as ItemMetadata, type MessageEnvelope$2 as MessageEnvelope, type MetaSiteSpecialEvent$1 as MetaSiteSpecialEvent, type MetaSiteSpecialEventPayloadOneOf$1 as MetaSiteSpecialEventPayloadOneOf, type index_d$2_MigrationBulkCreateAutomations as MigrationBulkCreateAutomations, type index_d$2_MigrationBulkCreateAutomationsRequest as MigrationBulkCreateAutomationsRequest, type index_d$2_MigrationBulkCreateAutomationsResponse as MigrationBulkCreateAutomationsResponse, type index_d$2_MigrationUpdateMigratedToV3AutomationRequest as MigrationUpdateMigratedToV3AutomationRequest, type index_d$2_MigrationUpdateMigratedToV3AutomationResponse as MigrationUpdateMigratedToV3AutomationResponse, Namespace$1 as Namespace, type NamespaceChanged$1 as NamespaceChanged, type index_d$2_Offset as Offset, type index_d$2_OffsetValueOneOf as OffsetValueOneOf, type index_d$2_OverrideApplicationAutomationRequest as OverrideApplicationAutomationRequest, type index_d$2_OverrideApplicationAutomationResponse as OverrideApplicationAutomationResponse, type index_d$2_OverrideApplicationAutomationResponseNonNullableFields as OverrideApplicationAutomationResponseNonNullableFields, type index_d$2_Paging as Paging, type index_d$2_PagingMetadata as PagingMetadata, type index_d$2_PagingMetadataV2 as PagingMetadataV2, type Plan$1 as Plan, type ProviderConfigurationError$1 as ProviderConfigurationError, type index_d$2_QueryApplicationAutomationsRequest as QueryApplicationAutomationsRequest, type index_d$2_QueryApplicationAutomationsResponse as QueryApplicationAutomationsResponse, type index_d$2_QueryAutomationsOptions as QueryAutomationsOptions, type QueryAutomationsRequest$1 as QueryAutomationsRequest, type QueryAutomationsResponse$1 as QueryAutomationsResponse, type QueryAutomationsResponseNonNullableFields$1 as QueryAutomationsResponseNonNullableFields, type index_d$2_QueryV2 as QueryV2, type index_d$2_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type Quota$1 as Quota, type QuotaInfo$1 as QuotaInfo, type RateLimit$2 as RateLimit, type RestoreInfo$2 as RestoreInfo, type index_d$2_Rule as Rule, type ServiceProvisioned$1 as ServiceProvisioned, type ServiceRemoved$1 as ServiceRemoved, type SiteCreated$1 as SiteCreated, SiteCreatedContext$1 as SiteCreatedContext, type SiteDeleted$1 as SiteDeleted, type SiteHardDeleted$1 as SiteHardDeleted, type SiteMarkedAsTemplate$1 as SiteMarkedAsTemplate, type SiteMarkedAsWixSite$1 as SiteMarkedAsWixSite, type SitePublished$1 as SitePublished, type SiteRenamed$1 as SiteRenamed, type SiteTransferred$1 as SiteTransferred, type SiteUndeleted$1 as SiteUndeleted, type SiteUnpublished$1 as SiteUnpublished, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, type index_d$2_Source as Source, State$1 as State, Status$2 as Status, type StudioAssigned$1 as StudioAssigned, type StudioUnassigned$1 as StudioUnassigned, type index_d$2_SyncApplicationAutomationsRequest as SyncApplicationAutomationsRequest, type index_d$2_SyncApplicationAutomationsResponse as SyncApplicationAutomationsResponse, type Trigger$2 as Trigger, type TriggerConfigurationError$1 as TriggerConfigurationError, TriggerErrorType$1 as TriggerErrorType, type TriggerValidationError$1 as TriggerValidationError, type TriggerValidationErrorErrorOneOf$1 as TriggerValidationErrorErrorOneOf, TriggerValidationErrorValidationErrorType$1 as TriggerValidationErrorValidationErrorType, Type$2 as Type, type index_d$2_Until as Until, type index_d$2_UpdateApplicationAutomationConfigurationIdRequest as UpdateApplicationAutomationConfigurationIdRequest, type index_d$2_UpdateApplicationAutomationConfigurationIdResponse as UpdateApplicationAutomationConfigurationIdResponse, type index_d$2_UpdateApplicationAutomationToMigratedFromV1Request as UpdateApplicationAutomationToMigratedFromV1Request, type index_d$2_UpdateApplicationAutomationToMigratedFromV1Response as UpdateApplicationAutomationToMigratedFromV1Response, type UpdateAutomation$1 as UpdateAutomation, type UpdateAutomationRequest$1 as UpdateAutomationRequest, type UpdateAutomationResponse$1 as UpdateAutomationResponse, type UpdateAutomationResponseNonNullableFields$1 as UpdateAutomationResponseNonNullableFields, type index_d$2_UpdatedAutomationsWithEsb as UpdatedAutomationsWithEsb, type UpdatedWithPreviousEntity$1 as UpdatedWithPreviousEntity, type UpgradeCTA$1 as UpgradeCTA, type index_d$2_ValidateAutomationByIdOptions as ValidateAutomationByIdOptions, type index_d$2_ValidateAutomationByIdRequest as ValidateAutomationByIdRequest, type index_d$2_ValidateAutomationByIdResponse as ValidateAutomationByIdResponse, type index_d$2_ValidateAutomationByIdResponseNonNullableFields as ValidateAutomationByIdResponseNonNullableFields, type ValidateAutomationRequest$1 as ValidateAutomationRequest, type ValidateAutomationResponse$1 as ValidateAutomationResponse, type ValidateAutomationResponseNonNullableFields$1 as ValidateAutomationResponseNonNullableFields, ValidationErrorType$1 as ValidationErrorType, WebhookIdentityType$2 as WebhookIdentityType, type _publicOnAutomationCreatedType$1 as _publicOnAutomationCreatedType, type _publicOnAutomationDeletedType$1 as _publicOnAutomationDeletedType, type _publicOnAutomationDeletedWithEntityType$1 as _publicOnAutomationDeletedWithEntityType, type _publicOnAutomationUpdatedType$1 as _publicOnAutomationUpdatedType, type _publicOnAutomationUpdatedWithPreviousEntityType$1 as _publicOnAutomationUpdatedWithPreviousEntityType, createAutomation$2 as createAutomation, deleteAutomation$2 as deleteAutomation, index_d$2_generateActionInputMappingFromTemplate as generateActionInputMappingFromTemplate, getActionsQuotaInfo$2 as getActionsQuotaInfo, getAutomation$2 as getAutomation, index_d$2_getAutomationActivationStats as getAutomationActivationStats, onAutomationCreated$2 as onAutomationCreated, onAutomationDeleted$2 as onAutomationDeleted, onAutomationDeletedWithEntity$2 as onAutomationDeletedWithEntity, onAutomationUpdated$2 as onAutomationUpdated, onAutomationUpdatedWithPreviousEntity$2 as onAutomationUpdatedWithPreviousEntity, index_d$2_overrideApplicationAutomation as overrideApplicationAutomation, onAutomationCreated$3 as publicOnAutomationCreated, onAutomationDeleted$3 as publicOnAutomationDeleted, onAutomationDeletedWithEntity$3 as publicOnAutomationDeletedWithEntity, onAutomationUpdated$3 as publicOnAutomationUpdated, onAutomationUpdatedWithPreviousEntity$3 as publicOnAutomationUpdatedWithPreviousEntity, queryAutomations$2 as queryAutomations, updateAutomation$2 as updateAutomation, validateAutomation$2 as validateAutomation, index_d$2_validateAutomationById as validateAutomationById };
|
|
2180
|
+
export { type Action$2 as Action, type ActionConfigurationError$1 as ActionConfigurationError, ActionErrorType$1 as ActionErrorType, type ActionEvent$2 as ActionEvent, type ActionProviderQuotaInfo$1 as ActionProviderQuotaInfo, type ActionQuotaInfo$1 as ActionQuotaInfo, type ActionValidationError$1 as ActionValidationError, type ActionValidationErrorErrorOneOf$1 as ActionValidationErrorErrorOneOf, type ActionValidationInfo$1 as ActionValidationInfo, type index_d$2_ActivationReport as ActivationReport, ActivationStatus$1 as ActivationStatus, type AdditionalInfo$1 as AdditionalInfo, type ApplicationError$2 as ApplicationError, type Asset$1 as Asset, type Automation$2 as Automation, type AutomationCreatedEnvelope$1 as AutomationCreatedEnvelope, type AutomationDeletedEnvelope$1 as AutomationDeletedEnvelope, type AutomationDeletedWithEntityEnvelope$1 as AutomationDeletedWithEntityEnvelope, type index_d$2_AutomationMetadata as AutomationMetadata, type AutomationNonNullableFields$1 as AutomationNonNullableFields, type AutomationUpdatedEnvelope$1 as AutomationUpdatedEnvelope, type AutomationUpdatedWithPreviousEntityEnvelope$1 as AutomationUpdatedWithPreviousEntityEnvelope, type AutomationsQueryBuilder$1 as AutomationsQueryBuilder, type AutomationsQueryResult$1 as AutomationsQueryResult, type BaseEventMetadata$2 as BaseEventMetadata, BlockType$1 as BlockType, type BulkActionMetadata$2 as BulkActionMetadata, type index_d$2_BulkCreateApplicationAutomationRequest as BulkCreateApplicationAutomationRequest, type index_d$2_BulkCreateApplicationAutomationResponse as BulkCreateApplicationAutomationResponse, type BulkDeleteAutomationsRequest$1 as BulkDeleteAutomationsRequest, type BulkDeleteAutomationsResponse$1 as BulkDeleteAutomationsResponse, type CTA$1 as CTA, type index_d$2_Condition as Condition, type ConditionBlock$1 as ConditionBlock, type index_d$2_Conditions as Conditions, type CreateAutomationRequest$1 as CreateAutomationRequest, type CreateAutomationResponse$1 as CreateAutomationResponse, type CreateAutomationResponseNonNullableFields$1 as CreateAutomationResponseNonNullableFields, type CursorPaging$1 as CursorPaging, type Cursors$1 as Cursors, type index_d$2_Debounce as Debounce, type Delay$1 as Delay, type index_d$2_DelayTypeOneOf as DelayTypeOneOf, type index_d$2_DeleteAutomationOptions as DeleteAutomationOptions, type DeleteAutomationRequest$1 as DeleteAutomationRequest, type DeleteAutomationResponse$1 as DeleteAutomationResponse, type DeleteContext$1 as DeleteContext, DeleteStatus$1 as DeleteStatus, type DeletedWithEntity$1 as DeletedWithEntity, type DomainEvent$2 as DomainEvent, type DomainEventBodyOneOf$2 as DomainEventBodyOneOf, type Empty$2 as Empty, type EntityCreatedEvent$2 as EntityCreatedEvent, type EntityDeletedEvent$2 as EntityDeletedEvent, type EntityUpdatedEvent$2 as EntityUpdatedEvent, type EventMetadata$2 as EventMetadata, type index_d$2_ExtendedFields as ExtendedFields, type Filter$4 as Filter, type index_d$2_GenerateActionInputMappingFromTemplateOptions as GenerateActionInputMappingFromTemplateOptions, type index_d$2_GenerateActionInputMappingFromTemplateRequest as GenerateActionInputMappingFromTemplateRequest, type index_d$2_GenerateActionInputMappingFromTemplateResponse as GenerateActionInputMappingFromTemplateResponse, type index_d$2_GenerateApplicationAutomationFromCustomRequest as GenerateApplicationAutomationFromCustomRequest, type index_d$2_GenerateApplicationAutomationFromCustomResponse as GenerateApplicationAutomationFromCustomResponse, type GetActionsQuotaInfoRequest$1 as GetActionsQuotaInfoRequest, type GetActionsQuotaInfoResponse$1 as GetActionsQuotaInfoResponse, type GetActionsQuotaInfoResponseNonNullableFields$1 as GetActionsQuotaInfoResponseNonNullableFields, type index_d$2_GetApplicationAutomationRequest as GetApplicationAutomationRequest, type index_d$2_GetApplicationAutomationResponse as GetApplicationAutomationResponse, type GetAutomationActionSchemaRequest$1 as GetAutomationActionSchemaRequest, type GetAutomationActionSchemaResponse$1 as GetAutomationActionSchemaResponse, type index_d$2_GetAutomationActivationReportsRequest as GetAutomationActivationReportsRequest, type index_d$2_GetAutomationActivationReportsResponse as GetAutomationActivationReportsResponse, type index_d$2_GetAutomationActivationReportsResponseNonNullableFields as GetAutomationActivationReportsResponseNonNullableFields, type index_d$2_GetAutomationActivationStatsOptions as GetAutomationActivationStatsOptions, type GetAutomationOptions$1 as GetAutomationOptions, type GetAutomationRequest$1 as GetAutomationRequest, type GetAutomationResponse$1 as GetAutomationResponse, type GetAutomationResponseNonNullableFields$1 as GetAutomationResponseNonNullableFields, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, type ItemMetadata$2 as ItemMetadata, type MessageEnvelope$2 as MessageEnvelope, type MetaSiteSpecialEvent$1 as MetaSiteSpecialEvent, type MetaSiteSpecialEventPayloadOneOf$1 as MetaSiteSpecialEventPayloadOneOf, type index_d$2_MigrationBulkCreateAutomations as MigrationBulkCreateAutomations, type index_d$2_MigrationBulkCreateAutomationsRequest as MigrationBulkCreateAutomationsRequest, type index_d$2_MigrationBulkCreateAutomationsResponse as MigrationBulkCreateAutomationsResponse, type index_d$2_MigrationUpdateMigratedToV3AutomationRequest as MigrationUpdateMigratedToV3AutomationRequest, type index_d$2_MigrationUpdateMigratedToV3AutomationResponse as MigrationUpdateMigratedToV3AutomationResponse, Namespace$1 as Namespace, type NamespaceChanged$1 as NamespaceChanged, type index_d$2_Offset as Offset, type index_d$2_OffsetValueOneOf as OffsetValueOneOf, type index_d$2_OverrideApplicationAutomationRequest as OverrideApplicationAutomationRequest, type index_d$2_OverrideApplicationAutomationResponse as OverrideApplicationAutomationResponse, type index_d$2_OverrideApplicationAutomationResponseNonNullableFields as OverrideApplicationAutomationResponseNonNullableFields, type index_d$2_Paging as Paging, type index_d$2_PagingMetadata as PagingMetadata, type index_d$2_PagingMetadataV2 as PagingMetadataV2, type Plan$1 as Plan, type ProviderConfigurationError$1 as ProviderConfigurationError, type index_d$2_QueryApplicationAutomationsRequest as QueryApplicationAutomationsRequest, type index_d$2_QueryApplicationAutomationsResponse as QueryApplicationAutomationsResponse, type index_d$2_QueryAutomationsOptions as QueryAutomationsOptions, type QueryAutomationsRequest$1 as QueryAutomationsRequest, type QueryAutomationsResponse$1 as QueryAutomationsResponse, type QueryAutomationsResponseNonNullableFields$1 as QueryAutomationsResponseNonNullableFields, type index_d$2_QueryV2 as QueryV2, type index_d$2_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type Quota$1 as Quota, type QuotaInfo$1 as QuotaInfo, type RateLimit$2 as RateLimit, type RestoreInfo$2 as RestoreInfo, type index_d$2_Rule as Rule, type ServiceProvisioned$1 as ServiceProvisioned, type ServiceRemoved$1 as ServiceRemoved, type SiteCreated$1 as SiteCreated, SiteCreatedContext$1 as SiteCreatedContext, type SiteDeleted$1 as SiteDeleted, type SiteHardDeleted$1 as SiteHardDeleted, type SiteMarkedAsTemplate$1 as SiteMarkedAsTemplate, type SiteMarkedAsWixSite$1 as SiteMarkedAsWixSite, type SitePublished$1 as SitePublished, type SiteRenamed$1 as SiteRenamed, type SiteTransferred$1 as SiteTransferred, type SiteUndeleted$1 as SiteUndeleted, type SiteUnpublished$1 as SiteUnpublished, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, type index_d$2_Source as Source, State$1 as State, Status$2 as Status, type StudioAssigned$1 as StudioAssigned, type StudioUnassigned$1 as StudioUnassigned, type index_d$2_SyncApplicationAutomationsRequest as SyncApplicationAutomationsRequest, type index_d$2_SyncApplicationAutomationsResponse as SyncApplicationAutomationsResponse, type Trigger$2 as Trigger, type TriggerConfigurationError$1 as TriggerConfigurationError, TriggerErrorType$1 as TriggerErrorType, type TriggerValidationError$1 as TriggerValidationError, type TriggerValidationErrorErrorOneOf$1 as TriggerValidationErrorErrorOneOf, TriggerValidationErrorValidationErrorType$1 as TriggerValidationErrorValidationErrorType, Type$2 as Type, type index_d$2_Until as Until, type index_d$2_UpdateApplicationAutomationConfigurationIdRequest as UpdateApplicationAutomationConfigurationIdRequest, type index_d$2_UpdateApplicationAutomationConfigurationIdResponse as UpdateApplicationAutomationConfigurationIdResponse, type index_d$2_UpdateApplicationAutomationToMigratedFromV1Request as UpdateApplicationAutomationToMigratedFromV1Request, type index_d$2_UpdateApplicationAutomationToMigratedFromV1Response as UpdateApplicationAutomationToMigratedFromV1Response, type UpdateAutomation$1 as UpdateAutomation, type UpdateAutomationRequest$1 as UpdateAutomationRequest, type UpdateAutomationResponse$1 as UpdateAutomationResponse, type UpdateAutomationResponseNonNullableFields$1 as UpdateAutomationResponseNonNullableFields, type index_d$2_UpdatedAutomationsWithEsb as UpdatedAutomationsWithEsb, type UpdatedWithPreviousEntity$1 as UpdatedWithPreviousEntity, type UpgradeCTA$1 as UpgradeCTA, type index_d$2_ValidateAutomationByIdOptions as ValidateAutomationByIdOptions, type index_d$2_ValidateAutomationByIdRequest as ValidateAutomationByIdRequest, type index_d$2_ValidateAutomationByIdResponse as ValidateAutomationByIdResponse, type index_d$2_ValidateAutomationByIdResponseNonNullableFields as ValidateAutomationByIdResponseNonNullableFields, type ValidateAutomationRequest$1 as ValidateAutomationRequest, type ValidateAutomationResponse$1 as ValidateAutomationResponse, type ValidateAutomationResponseNonNullableFields$1 as ValidateAutomationResponseNonNullableFields, ValidationErrorType$1 as ValidationErrorType, WebhookIdentityType$2 as WebhookIdentityType, type _publicOnAutomationCreatedType$1 as _publicOnAutomationCreatedType, type _publicOnAutomationDeletedType$1 as _publicOnAutomationDeletedType, type _publicOnAutomationDeletedWithEntityType$1 as _publicOnAutomationDeletedWithEntityType, type _publicOnAutomationUpdatedType$1 as _publicOnAutomationUpdatedType, type _publicOnAutomationUpdatedWithPreviousEntityType$1 as _publicOnAutomationUpdatedWithPreviousEntityType, createAutomation$2 as createAutomation, deleteAutomation$2 as deleteAutomation, index_d$2_generateActionInputMappingFromTemplate as generateActionInputMappingFromTemplate, getActionsQuotaInfo$2 as getActionsQuotaInfo, getAutomation$2 as getAutomation, index_d$2_getAutomationActivationStats as getAutomationActivationStats, onAutomationCreated$2 as onAutomationCreated, onAutomationDeleted$2 as onAutomationDeleted, onAutomationDeletedWithEntity$2 as onAutomationDeletedWithEntity, onAutomationUpdated$2 as onAutomationUpdated, onAutomationUpdatedWithPreviousEntity$2 as onAutomationUpdatedWithPreviousEntity, index_d$2_overrideApplicationAutomation as overrideApplicationAutomation, onAutomationCreated$3 as publicOnAutomationCreated, onAutomationDeleted$3 as publicOnAutomationDeleted, onAutomationDeletedWithEntity$3 as publicOnAutomationDeletedWithEntity, onAutomationUpdated$3 as publicOnAutomationUpdated, onAutomationUpdatedWithPreviousEntity$3 as publicOnAutomationUpdatedWithPreviousEntity, queryAutomations$2 as queryAutomations, updateAutomation$2 as updateAutomation, validateAutomation$2 as validateAutomation, index_d$2_validateAutomationById as validateAutomationById };
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
type HostModule$1<T, H extends Host$1> = {
|
|
2184
|
+
__type: 'host';
|
|
2185
|
+
create(host: H): T;
|
|
2186
|
+
};
|
|
2187
|
+
type HostModuleAPI$1<T extends HostModule$1<any, any>> = T extends HostModule$1<infer U, any> ? U : never;
|
|
2188
|
+
type Host$1<Environment = unknown> = {
|
|
2189
|
+
channel: {
|
|
2190
|
+
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
2191
|
+
disconnect: () => void;
|
|
2192
|
+
} | Promise<{
|
|
2193
|
+
disconnect: () => void;
|
|
2194
|
+
}>;
|
|
2195
|
+
};
|
|
2196
|
+
environment?: Environment;
|
|
2197
|
+
/**
|
|
2198
|
+
* Optional bast url to use for API requests, for example `www.wixapis.com`
|
|
2199
|
+
*/
|
|
2200
|
+
apiBaseUrl?: string;
|
|
2201
|
+
/**
|
|
2202
|
+
* Possible data to be provided by every host, for cross cutting concerns
|
|
2203
|
+
* like internationalization, billing, etc.
|
|
2204
|
+
*/
|
|
2205
|
+
essentials?: {
|
|
2206
|
+
/**
|
|
2207
|
+
* The language of the currently viewed session
|
|
2208
|
+
*/
|
|
2209
|
+
language?: string;
|
|
2210
|
+
/**
|
|
2211
|
+
* The locale of the currently viewed session
|
|
2212
|
+
*/
|
|
2213
|
+
locale?: string;
|
|
2214
|
+
/**
|
|
2215
|
+
* Any headers that should be passed through to the API requests
|
|
2216
|
+
*/
|
|
2217
|
+
passThroughHeaders?: Record<string, string>;
|
|
2218
|
+
};
|
|
2219
|
+
};
|
|
2220
|
+
|
|
2221
|
+
type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
|
|
2222
|
+
interface HttpClient$1 {
|
|
2223
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
2224
|
+
fetchWithAuth: typeof fetch;
|
|
2225
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
2226
|
+
getActiveToken?: () => string | undefined;
|
|
2227
|
+
}
|
|
2228
|
+
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
2229
|
+
type HttpResponse$1<T = any> = {
|
|
2230
|
+
data: T;
|
|
2231
|
+
status: number;
|
|
2232
|
+
statusText: string;
|
|
2233
|
+
headers: any;
|
|
2234
|
+
request?: any;
|
|
2235
|
+
};
|
|
2236
|
+
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
2237
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2238
|
+
url: string;
|
|
2239
|
+
data?: Data;
|
|
2240
|
+
params?: URLSearchParams;
|
|
2241
|
+
} & APIMetadata$1;
|
|
2242
|
+
type APIMetadata$1 = {
|
|
2243
|
+
methodFqn?: string;
|
|
2244
|
+
entityFqdn?: string;
|
|
2245
|
+
packageName?: string;
|
|
2246
|
+
};
|
|
2247
|
+
type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
|
|
2248
|
+
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
2249
|
+
__type: 'event-definition';
|
|
2250
|
+
type: Type;
|
|
2251
|
+
isDomainEvent?: boolean;
|
|
2252
|
+
transformations?: (envelope: unknown) => Payload;
|
|
2253
|
+
__payload: Payload;
|
|
2254
|
+
};
|
|
2255
|
+
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
2256
|
+
type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
|
|
2257
|
+
type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
|
|
2258
|
+
|
|
2259
|
+
type ServicePluginMethodInput$1 = {
|
|
2260
|
+
request: any;
|
|
2261
|
+
metadata: any;
|
|
2262
|
+
};
|
|
2263
|
+
type ServicePluginContract$1 = Record<string, (payload: ServicePluginMethodInput$1) => unknown | Promise<unknown>>;
|
|
2264
|
+
type ServicePluginMethodMetadata$1 = {
|
|
2265
|
+
name: string;
|
|
2266
|
+
primaryHttpMappingPath: string;
|
|
2267
|
+
transformations: {
|
|
2268
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput$1;
|
|
2269
|
+
toREST: (...args: unknown[]) => unknown;
|
|
2270
|
+
};
|
|
2271
|
+
};
|
|
2272
|
+
type ServicePluginDefinition$1<Contract extends ServicePluginContract$1> = {
|
|
2273
|
+
__type: 'service-plugin-definition';
|
|
2274
|
+
componentType: string;
|
|
2275
|
+
methods: ServicePluginMethodMetadata$1[];
|
|
2276
|
+
__contract: Contract;
|
|
2277
|
+
};
|
|
2278
|
+
declare function ServicePluginDefinition$1<Contract extends ServicePluginContract$1>(componentType: string, methods: ServicePluginMethodMetadata$1[]): ServicePluginDefinition$1<Contract>;
|
|
2279
|
+
type BuildServicePluginDefinition$1<T extends ServicePluginDefinition$1<any>> = (implementation: T['__contract']) => void;
|
|
2280
|
+
declare const SERVICE_PLUGIN_ERROR_TYPE$1 = "wix_spi_error";
|
|
2281
|
+
|
|
2282
|
+
type RequestContext$1 = {
|
|
2283
|
+
isSSR: boolean;
|
|
2284
|
+
host: string;
|
|
2285
|
+
protocol?: string;
|
|
2286
|
+
};
|
|
2287
|
+
type ResponseTransformer$1 = (data: any, headers?: any) => any;
|
|
2288
|
+
/**
|
|
2289
|
+
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
2290
|
+
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
2291
|
+
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
2292
|
+
*/
|
|
2293
|
+
type Method$1 = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
2294
|
+
type AmbassadorRequestOptions$1<T = any> = {
|
|
2295
|
+
_?: T;
|
|
2296
|
+
url?: string;
|
|
2297
|
+
method?: Method$1;
|
|
2298
|
+
params?: any;
|
|
2299
|
+
data?: any;
|
|
2300
|
+
transformResponse?: ResponseTransformer$1 | ResponseTransformer$1[];
|
|
2301
|
+
};
|
|
2302
|
+
type AmbassadorFactory$1<Request, Response> = (payload: Request) => ((context: RequestContext$1) => AmbassadorRequestOptions$1<Response>) & {
|
|
2303
|
+
__isAmbassador: boolean;
|
|
2304
|
+
};
|
|
2305
|
+
type AmbassadorFunctionDescriptor$1<Request = any, Response = any> = AmbassadorFactory$1<Request, Response>;
|
|
2306
|
+
type BuildAmbassadorFunction$1<T extends AmbassadorFunctionDescriptor$1> = T extends AmbassadorFunctionDescriptor$1<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
2307
|
+
|
|
2308
|
+
declare global {
|
|
2309
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2310
|
+
interface SymbolConstructor {
|
|
2311
|
+
readonly observable: symbol;
|
|
2312
|
+
}
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
declare const emptyObjectSymbol$1: unique symbol;
|
|
2316
|
+
|
|
2317
|
+
/**
|
|
2318
|
+
Represents a strictly empty plain object, the `{}` value.
|
|
2319
|
+
|
|
2320
|
+
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)).
|
|
2321
|
+
|
|
2322
|
+
@example
|
|
2323
|
+
```
|
|
2324
|
+
import type {EmptyObject} from 'type-fest';
|
|
2325
|
+
|
|
2326
|
+
// The following illustrates the problem with `{}`.
|
|
2327
|
+
const foo1: {} = {}; // Pass
|
|
2328
|
+
const foo2: {} = []; // Pass
|
|
2329
|
+
const foo3: {} = 42; // Pass
|
|
2330
|
+
const foo4: {} = {a: 1}; // Pass
|
|
2331
|
+
|
|
2332
|
+
// With `EmptyObject` only the first case is valid.
|
|
2333
|
+
const bar1: EmptyObject = {}; // Pass
|
|
2334
|
+
const bar2: EmptyObject = 42; // Fail
|
|
2335
|
+
const bar3: EmptyObject = []; // Fail
|
|
2336
|
+
const bar4: EmptyObject = {a: 1}; // Fail
|
|
2337
|
+
```
|
|
2338
|
+
|
|
2339
|
+
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}.
|
|
2340
|
+
|
|
2341
|
+
@category Object
|
|
2342
|
+
*/
|
|
2343
|
+
type EmptyObject$1 = {[emptyObjectSymbol$1]?: never};
|
|
2344
|
+
|
|
2345
|
+
/**
|
|
2346
|
+
Returns a boolean for whether the two given types are equal.
|
|
2347
|
+
|
|
2348
|
+
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
2349
|
+
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
2350
|
+
|
|
2351
|
+
Use-cases:
|
|
2352
|
+
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
2353
|
+
|
|
2354
|
+
@example
|
|
2355
|
+
```
|
|
2356
|
+
import type {IsEqual} from 'type-fest';
|
|
2357
|
+
|
|
2358
|
+
// This type returns a boolean for whether the given array includes the given item.
|
|
2359
|
+
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
2360
|
+
type Includes<Value extends readonly any[], Item> =
|
|
2361
|
+
Value extends readonly [Value[0], ...infer rest]
|
|
2362
|
+
? IsEqual<Value[0], Item> extends true
|
|
2363
|
+
? true
|
|
2364
|
+
: Includes<rest, Item>
|
|
2365
|
+
: false;
|
|
2366
|
+
```
|
|
2367
|
+
|
|
2368
|
+
@category Type Guard
|
|
2369
|
+
@category Utilities
|
|
2370
|
+
*/
|
|
2371
|
+
type IsEqual$1<A, B> =
|
|
2372
|
+
(<G>() => G extends A ? 1 : 2) extends
|
|
2373
|
+
(<G>() => G extends B ? 1 : 2)
|
|
2374
|
+
? true
|
|
2375
|
+
: false;
|
|
2376
|
+
|
|
2377
|
+
/**
|
|
2378
|
+
Filter out keys from an object.
|
|
2379
|
+
|
|
2380
|
+
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
2381
|
+
Returns `never` if `Key` extends `Exclude`.
|
|
2382
|
+
Returns `Key` otherwise.
|
|
2383
|
+
|
|
2384
|
+
@example
|
|
2385
|
+
```
|
|
2386
|
+
type Filtered = Filter<'foo', 'foo'>;
|
|
2387
|
+
//=> never
|
|
2388
|
+
```
|
|
2389
|
+
|
|
2390
|
+
@example
|
|
2391
|
+
```
|
|
2392
|
+
type Filtered = Filter<'bar', string>;
|
|
2393
|
+
//=> never
|
|
2394
|
+
```
|
|
2395
|
+
|
|
2396
|
+
@example
|
|
2397
|
+
```
|
|
2398
|
+
type Filtered = Filter<'bar', 'foo'>;
|
|
2399
|
+
//=> 'bar'
|
|
2400
|
+
```
|
|
2401
|
+
|
|
2402
|
+
@see {Except}
|
|
2403
|
+
*/
|
|
2404
|
+
type Filter$3<KeyType, ExcludeType> = IsEqual$1<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
2405
|
+
|
|
2406
|
+
type ExceptOptions$1 = {
|
|
2407
|
+
/**
|
|
2408
|
+
Disallow assigning non-specified properties.
|
|
2409
|
+
|
|
2410
|
+
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
2411
|
+
|
|
2412
|
+
@default false
|
|
2413
|
+
*/
|
|
2414
|
+
requireExactProps?: boolean;
|
|
2415
|
+
};
|
|
2416
|
+
|
|
2417
|
+
/**
|
|
2418
|
+
Create a type from an object type without certain keys.
|
|
2419
|
+
|
|
2420
|
+
We recommend setting the `requireExactProps` option to `true`.
|
|
2421
|
+
|
|
2422
|
+
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.
|
|
2423
|
+
|
|
2424
|
+
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)).
|
|
2425
|
+
|
|
2426
|
+
@example
|
|
2427
|
+
```
|
|
2428
|
+
import type {Except} from 'type-fest';
|
|
2429
|
+
|
|
2430
|
+
type Foo = {
|
|
2431
|
+
a: number;
|
|
2432
|
+
b: string;
|
|
2433
|
+
};
|
|
2434
|
+
|
|
2435
|
+
type FooWithoutA = Except<Foo, 'a'>;
|
|
2436
|
+
//=> {b: string}
|
|
2437
|
+
|
|
2438
|
+
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
2439
|
+
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
2440
|
+
|
|
2441
|
+
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
2442
|
+
//=> {a: number} & Partial<Record<"b", never>>
|
|
2443
|
+
|
|
2444
|
+
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
2445
|
+
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
2446
|
+
```
|
|
2447
|
+
|
|
2448
|
+
@category Object
|
|
2449
|
+
*/
|
|
2450
|
+
type Except$1<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions$1 = {requireExactProps: false}> = {
|
|
2451
|
+
[KeyType in keyof ObjectType as Filter$3<KeyType, KeysType>]: ObjectType[KeyType];
|
|
2452
|
+
} & (Options['requireExactProps'] extends true
|
|
2453
|
+
? Partial<Record<KeysType, never>>
|
|
2454
|
+
: {});
|
|
2455
|
+
|
|
2456
|
+
/**
|
|
2457
|
+
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
2458
|
+
|
|
2459
|
+
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
2460
|
+
|
|
2461
|
+
@example
|
|
2462
|
+
```
|
|
2463
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
2464
|
+
|
|
2465
|
+
interface Example {
|
|
2466
|
+
a: string;
|
|
2467
|
+
b: string | number;
|
|
2468
|
+
c?: string;
|
|
2469
|
+
d: {};
|
|
2470
|
+
}
|
|
2471
|
+
|
|
2472
|
+
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
2473
|
+
//=> 'a'
|
|
2474
|
+
```
|
|
2475
|
+
|
|
2476
|
+
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
2477
|
+
|
|
2478
|
+
@example
|
|
2479
|
+
```
|
|
2480
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
2481
|
+
|
|
2482
|
+
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
2483
|
+
//=> 'a' | 'c'
|
|
2484
|
+
```
|
|
2485
|
+
|
|
2486
|
+
@category Object
|
|
2487
|
+
*/
|
|
2488
|
+
type ConditionalKeys$1<Base, Condition> = NonNullable<
|
|
2489
|
+
// Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
|
|
2490
|
+
{
|
|
2491
|
+
// Map through all the keys of the given base type.
|
|
2492
|
+
[Key in keyof Base]:
|
|
2493
|
+
// Pick only keys with types extending the given `Condition` type.
|
|
2494
|
+
Base[Key] extends Condition
|
|
2495
|
+
// Retain this key since the condition passes.
|
|
2496
|
+
? Key
|
|
2497
|
+
// Discard this key since the condition fails.
|
|
2498
|
+
: never;
|
|
2499
|
+
|
|
2500
|
+
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
2501
|
+
}[keyof Base]
|
|
2502
|
+
>;
|
|
2503
|
+
|
|
2504
|
+
/**
|
|
2505
|
+
Exclude keys from a shape that matches the given `Condition`.
|
|
2506
|
+
|
|
2507
|
+
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.
|
|
2508
|
+
|
|
2509
|
+
@example
|
|
2510
|
+
```
|
|
2511
|
+
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
2512
|
+
|
|
2513
|
+
class Awesome {
|
|
2514
|
+
name: string;
|
|
2515
|
+
successes: number;
|
|
2516
|
+
failures: bigint;
|
|
2517
|
+
|
|
2518
|
+
run() {}
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2521
|
+
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
|
|
2522
|
+
//=> {run: () => void}
|
|
2523
|
+
```
|
|
2524
|
+
|
|
2525
|
+
@example
|
|
2526
|
+
```
|
|
2527
|
+
import type {ConditionalExcept} from 'type-fest';
|
|
2528
|
+
|
|
2529
|
+
interface Example {
|
|
2530
|
+
a: string;
|
|
2531
|
+
b: string | number;
|
|
2532
|
+
c: () => void;
|
|
2533
|
+
d: {};
|
|
2534
|
+
}
|
|
2535
|
+
|
|
2536
|
+
type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
2537
|
+
//=> {b: string | number; c: () => void; d: {}}
|
|
2538
|
+
```
|
|
2539
|
+
|
|
2540
|
+
@category Object
|
|
2541
|
+
*/
|
|
2542
|
+
type ConditionalExcept$1<Base, Condition> = Except$1<
|
|
2543
|
+
Base,
|
|
2544
|
+
ConditionalKeys$1<Base, Condition>
|
|
2545
|
+
>;
|
|
2546
|
+
|
|
2547
|
+
/**
|
|
2548
|
+
* Descriptors are objects that describe the API of a module, and the module
|
|
2549
|
+
* can either be a REST module or a host module.
|
|
2550
|
+
* This type is recursive, so it can describe nested modules.
|
|
2551
|
+
*/
|
|
2552
|
+
type Descriptors$1 = RESTFunctionDescriptor$1 | AmbassadorFunctionDescriptor$1 | HostModule$1<any, any> | EventDefinition$3<any> | ServicePluginDefinition$1<any> | {
|
|
2553
|
+
[key: string]: Descriptors$1 | PublicMetadata$1 | any;
|
|
2554
|
+
};
|
|
2555
|
+
/**
|
|
2556
|
+
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
2557
|
+
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
2558
|
+
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
2559
|
+
* do not match the given host (as they will not work with the given host).
|
|
2560
|
+
*/
|
|
2561
|
+
type BuildDescriptors$1<T extends Descriptors$1, H extends Host$1<any> | undefined, Depth extends number = 5> = {
|
|
2562
|
+
done: T;
|
|
2563
|
+
recurse: T extends {
|
|
2564
|
+
__type: typeof SERVICE_PLUGIN_ERROR_TYPE$1;
|
|
2565
|
+
} ? never : T extends AmbassadorFunctionDescriptor$1 ? BuildAmbassadorFunction$1<T> : T extends RESTFunctionDescriptor$1 ? BuildRESTFunction$1<T> : T extends EventDefinition$3<any> ? BuildEventDefinition$3<T> : T extends ServicePluginDefinition$1<any> ? BuildServicePluginDefinition$1<T> : T extends HostModule$1<any, any> ? HostModuleAPI$1<T> : ConditionalExcept$1<{
|
|
2566
|
+
[Key in keyof T]: T[Key] extends Descriptors$1 ? BuildDescriptors$1<T[Key], H, [
|
|
2567
|
+
-1,
|
|
2568
|
+
0,
|
|
2569
|
+
1,
|
|
2570
|
+
2,
|
|
2571
|
+
3,
|
|
2572
|
+
4,
|
|
2573
|
+
5
|
|
2574
|
+
][Depth]> : never;
|
|
2575
|
+
}, EmptyObject$1>;
|
|
2576
|
+
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
2577
|
+
type PublicMetadata$1 = {
|
|
2578
|
+
PACKAGE_NAME?: string;
|
|
2579
|
+
};
|
|
2580
|
+
|
|
2581
|
+
declare global {
|
|
2582
|
+
interface ContextualClient {
|
|
2583
|
+
}
|
|
1797
2584
|
}
|
|
2585
|
+
/**
|
|
2586
|
+
* A type used to create concerete types from SDK descriptors in
|
|
2587
|
+
* case a contextual client is available.
|
|
2588
|
+
*/
|
|
2589
|
+
type MaybeContext$1<T extends Descriptors$1> = globalThis.ContextualClient extends {
|
|
2590
|
+
host: Host$1;
|
|
2591
|
+
} ? BuildDescriptors$1<T, globalThis.ContextualClient['host']> : T;
|
|
1798
2592
|
|
|
1799
2593
|
interface Activation {
|
|
1800
2594
|
/** Activation ID */
|
|
@@ -1917,7 +2711,7 @@ declare enum TimeUnit$1 {
|
|
|
1917
2711
|
WEEKS = "WEEKS",
|
|
1918
2712
|
MONTHS = "MONTHS"
|
|
1919
2713
|
}
|
|
1920
|
-
interface Filter$
|
|
2714
|
+
interface Filter$2 {
|
|
1921
2715
|
/** Filter ID. */
|
|
1922
2716
|
_id?: string;
|
|
1923
2717
|
/** Field key from the payload schema, for example "formId". */
|
|
@@ -2043,7 +2837,7 @@ interface Trigger$1 {
|
|
|
2043
2837
|
* List of filters on schema fields.
|
|
2044
2838
|
* In order for the automation to run, all filter expressions must evaluate to `true` for a given payload.
|
|
2045
2839
|
*/
|
|
2046
|
-
filters?: Filter$
|
|
2840
|
+
filters?: Filter$2[];
|
|
2047
2841
|
/** Defines the time offset between the trigger date and when the automation runs. */
|
|
2048
2842
|
scheduledEventOffset?: FutureDateActivationOffset$1;
|
|
2049
2843
|
/** Limits the number of times an automation can be triggered. */
|
|
@@ -3298,7 +4092,7 @@ interface ReportEventOptions {
|
|
|
3298
4092
|
idempotency?: Idempotency;
|
|
3299
4093
|
}
|
|
3300
4094
|
|
|
3301
|
-
declare function reportEvent$1(httpClient: HttpClient): ReportEventSignature;
|
|
4095
|
+
declare function reportEvent$1(httpClient: HttpClient$1): ReportEventSignature;
|
|
3302
4096
|
interface ReportEventSignature {
|
|
3303
4097
|
/**
|
|
3304
4098
|
* Reports an event and activates site automations with the specified trigger key.
|
|
@@ -3317,7 +4111,7 @@ interface ReportEventSignature {
|
|
|
3317
4111
|
*/
|
|
3318
4112
|
(triggerKey: string, options?: ReportEventOptions | undefined): Promise<ReportEventResponse & ReportEventResponseNonNullableFields>;
|
|
3319
4113
|
}
|
|
3320
|
-
declare function bulkReportEvent$1(httpClient: HttpClient): BulkReportEventSignature;
|
|
4114
|
+
declare function bulkReportEvent$1(httpClient: HttpClient$1): BulkReportEventSignature;
|
|
3321
4115
|
interface BulkReportEventSignature {
|
|
3322
4116
|
/**
|
|
3323
4117
|
* Bulk reports events and activates site automations with the specified trigger key.
|
|
@@ -3328,7 +4122,7 @@ interface BulkReportEventSignature {
|
|
|
3328
4122
|
*/
|
|
3329
4123
|
(triggerKey: string, eventsInfo: EventInfo[]): Promise<BulkReportEventResponse & BulkReportEventResponseNonNullableFields>;
|
|
3330
4124
|
}
|
|
3331
|
-
declare function bulkCancelEvent$1(httpClient: HttpClient): BulkCancelEventSignature;
|
|
4125
|
+
declare function bulkCancelEvent$1(httpClient: HttpClient$1): BulkCancelEventSignature;
|
|
3332
4126
|
interface BulkCancelEventSignature {
|
|
3333
4127
|
/**
|
|
3334
4128
|
* Bulk cancels any remaining actions for a trigger and external entities.
|
|
@@ -3338,7 +4132,7 @@ interface BulkCancelEventSignature {
|
|
|
3338
4132
|
*/
|
|
3339
4133
|
(triggerKey: string, externalEntityIds: string[]): Promise<BulkCancelEventResponse & BulkCancelEventResponseNonNullableFields>;
|
|
3340
4134
|
}
|
|
3341
|
-
declare function cancelEvent$1(httpClient: HttpClient): CancelEventSignature;
|
|
4135
|
+
declare function cancelEvent$1(httpClient: HttpClient$1): CancelEventSignature;
|
|
3342
4136
|
interface CancelEventSignature {
|
|
3343
4137
|
/**
|
|
3344
4138
|
* Cancels any remaining actions for a trigger and external entity.
|
|
@@ -3365,14 +4159,32 @@ interface CancelEventSignature {
|
|
|
3365
4159
|
*/
|
|
3366
4160
|
(triggerKey: string, externalEntityId: string): Promise<void>;
|
|
3367
4161
|
}
|
|
3368
|
-
declare const onActivationStatusChanged$1: EventDefinition<ActivationStatusChangedEnvelope, "wix.automations.v2.activation_activation_status_changed">;
|
|
4162
|
+
declare const onActivationStatusChanged$1: EventDefinition$3<ActivationStatusChangedEnvelope, "wix.automations.v2.activation_activation_status_changed">;
|
|
3369
4163
|
|
|
3370
|
-
|
|
4164
|
+
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
4165
|
+
__type: 'event-definition';
|
|
4166
|
+
type: Type;
|
|
4167
|
+
isDomainEvent?: boolean;
|
|
4168
|
+
transformations?: (envelope: unknown) => Payload;
|
|
4169
|
+
__payload: Payload;
|
|
4170
|
+
};
|
|
4171
|
+
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
4172
|
+
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
4173
|
+
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
3371
4174
|
|
|
3372
|
-
declare
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
4175
|
+
declare global {
|
|
4176
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4177
|
+
interface SymbolConstructor {
|
|
4178
|
+
readonly observable: symbol;
|
|
4179
|
+
}
|
|
4180
|
+
}
|
|
4181
|
+
|
|
4182
|
+
declare function createEventModule$1<T extends EventDefinition$2<any, string>>(eventDefinition: T): BuildEventDefinition$2<T> & T;
|
|
4183
|
+
|
|
4184
|
+
declare const reportEvent: MaybeContext$1<BuildRESTFunction$1<typeof reportEvent$1> & typeof reportEvent$1>;
|
|
4185
|
+
declare const bulkReportEvent: MaybeContext$1<BuildRESTFunction$1<typeof bulkReportEvent$1> & typeof bulkReportEvent$1>;
|
|
4186
|
+
declare const bulkCancelEvent: MaybeContext$1<BuildRESTFunction$1<typeof bulkCancelEvent$1> & typeof bulkCancelEvent$1>;
|
|
4187
|
+
declare const cancelEvent: MaybeContext$1<BuildRESTFunction$1<typeof cancelEvent$1> & typeof cancelEvent$1>;
|
|
3376
4188
|
|
|
3377
4189
|
type _publicOnActivationStatusChangedType = typeof onActivationStatusChanged$1;
|
|
3378
4190
|
/**
|
|
@@ -3503,9 +4315,419 @@ declare const index_d$1_cancelEvent: typeof cancelEvent;
|
|
|
3503
4315
|
declare const index_d$1_onActivationStatusChanged: typeof onActivationStatusChanged;
|
|
3504
4316
|
declare const index_d$1_reportEvent: typeof reportEvent;
|
|
3505
4317
|
declare namespace index_d$1 {
|
|
3506
|
-
export { type Action$1 as Action, type index_d$1_ActionActionOneOf as ActionActionOneOf, type index_d$1_ActionCompletedRequest as ActionCompletedRequest, type index_d$1_ActionData as ActionData, type ActionEvent$1 as ActionEvent, type ActionSettings$1 as ActionSettings, type index_d$1_ActionStatus as ActionStatus, type index_d$1_ActionsData as ActionsData, type index_d$1_Activation as Activation, type index_d$1_ActivationActionStatusChanged as ActivationActionStatusChanged, index_d$1_ActivationActionStatusChangedStatus as ActivationActionStatusChangedStatus, type index_d$1_ActivationActionStatusChangedStatusInfoOneOf as ActivationActionStatusChangedStatusInfoOneOf, type index_d$1_ActivationContinuedAfterSchedule as ActivationContinuedAfterSchedule, type index_d$1_ActivationRequest as ActivationRequest, type index_d$1_ActivationResumeAfterDelay as ActivationResumeAfterDelay, type index_d$1_ActivationScheduleCompleted as ActivationScheduleCompleted, type index_d$1_ActivationScheduleRequested as ActivationScheduleRequested, type index_d$1_ActivationSource as ActivationSource, type index_d$1_ActivationSourceOfOneOf as ActivationSourceOfOneOf, type index_d$1_ActivationStatus as ActivationStatus, type index_d$1_ActivationStatusChanged as ActivationStatusChanged, type index_d$1_ActivationStatusChangedEnvelope as ActivationStatusChangedEnvelope, type index_d$1_ActivationStatusChangedFailedStatusInfo as ActivationStatusChangedFailedStatusInfo, index_d$1_ActivationStatusChangedStatus as ActivationStatusChangedStatus, type index_d$1_ActivationStatusChangedStatusInfoOneOf as ActivationStatusChangedStatusInfoOneOf, type AppDefinedAction$1 as AppDefinedAction, type index_d$1_AppDefinedActionInfo as AppDefinedActionInfo, type ApplicationError$1 as ApplicationError, type ApplicationOrigin$1 as ApplicationOrigin, type index_d$1_AsyncAction as AsyncAction, type AuditInfo$1 as AuditInfo, type AuditInfoIdOneOf$1 as AuditInfoIdOneOf, type Automation$1 as Automation, type AutomationConfiguration$1 as AutomationConfiguration, type index_d$1_AutomationConfigurationAction as AutomationConfigurationAction, type index_d$1_AutomationConfigurationActionInfoOneOf as AutomationConfigurationActionInfoOneOf, index_d$1_AutomationConfigurationStatus as AutomationConfigurationStatus, type index_d$1_AutomationIdentifier as AutomationIdentifier, type index_d$1_AutomationInfo as AutomationInfo, type index_d$1_AutomationInfoOriginInfoOneOf as AutomationInfoOriginInfoOneOf, type AutomationOriginInfoOneOf$1 as AutomationOriginInfoOneOf, type AutomationSettings$1 as AutomationSettings, type BaseEventMetadata$1 as BaseEventMetadata, type index_d$1_BatchActivationRequest as BatchActivationRequest, index_d$1_BlockType as BlockType, type BulkActionMetadata$1 as BulkActionMetadata, type index_d$1_BulkCancelEventRequest as BulkCancelEventRequest, type index_d$1_BulkCancelEventResponse as BulkCancelEventResponse, type index_d$1_BulkCancelEventResponseNonNullableFields as BulkCancelEventResponseNonNullableFields, type index_d$1_BulkCancelEventResult as BulkCancelEventResult, type index_d$1_BulkReportEventRequest as BulkReportEventRequest, type index_d$1_BulkReportEventResponse as BulkReportEventResponse, type index_d$1_BulkReportEventResponseNonNullableFields as BulkReportEventResponseNonNullableFields, type index_d$1_BulkReportEventResult as BulkReportEventResult, type index_d$1_CancelEventRequest as CancelEventRequest, type index_d$1_CancelEventResponse as CancelEventResponse, type index_d$1_CancelPendingScheduleRequest as CancelPendingScheduleRequest, type index_d$1_CancelPendingScheduleRequestByOneOf as CancelPendingScheduleRequestByOneOf, type index_d$1_CancelPendingScheduleResponse as CancelPendingScheduleResponse, index_d$1_CancellationReason as CancellationReason, type index_d$1_CancelledStatusInfo as CancelledStatusInfo, type index_d$1_Case as Case, type ConditionAction$1 as ConditionAction, type index_d$1_ConditionActionInfo as ConditionActionInfo, type index_d$1_ConditionBlock as ConditionBlock, type ConditionExpressionGroup$1 as ConditionExpressionGroup, type index_d$1_ConditionFilter as ConditionFilter, type index_d$1_Delay as Delay, type DelayAction$1 as DelayAction, type index_d$1_DelayActionInfo as DelayActionInfo, type index_d$1_DelayHelper as DelayHelper, type index_d$1_DelayOfOneOf as DelayOfOneOf, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type DraftInfo$1 as DraftInfo, type Empty$1 as Empty, type index_d$1_EndedStatusInfo as EndedStatusInfo, type index_d$1_EndedStatusInfoTypeInfoOneOf as EndedStatusInfoTypeInfoOneOf, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type index_d$1_EventInfo as EventInfo, type EventMetadata$1 as EventMetadata, type index_d$1_ExecuteFromActionRequest as ExecuteFromActionRequest, type index_d$1_ExecuteFromActionResponse as ExecuteFromActionResponse, type index_d$1_ExpressionEvaluationResult as ExpressionEvaluationResult, type index_d$1_FailedStatusInfo as FailedStatusInfo, type Filter$
|
|
4318
|
+
export { type Action$1 as Action, type index_d$1_ActionActionOneOf as ActionActionOneOf, type index_d$1_ActionCompletedRequest as ActionCompletedRequest, type index_d$1_ActionData as ActionData, type ActionEvent$1 as ActionEvent, type ActionSettings$1 as ActionSettings, type index_d$1_ActionStatus as ActionStatus, type index_d$1_ActionsData as ActionsData, type index_d$1_Activation as Activation, type index_d$1_ActivationActionStatusChanged as ActivationActionStatusChanged, index_d$1_ActivationActionStatusChangedStatus as ActivationActionStatusChangedStatus, type index_d$1_ActivationActionStatusChangedStatusInfoOneOf as ActivationActionStatusChangedStatusInfoOneOf, type index_d$1_ActivationContinuedAfterSchedule as ActivationContinuedAfterSchedule, type index_d$1_ActivationRequest as ActivationRequest, type index_d$1_ActivationResumeAfterDelay as ActivationResumeAfterDelay, type index_d$1_ActivationScheduleCompleted as ActivationScheduleCompleted, type index_d$1_ActivationScheduleRequested as ActivationScheduleRequested, type index_d$1_ActivationSource as ActivationSource, type index_d$1_ActivationSourceOfOneOf as ActivationSourceOfOneOf, type index_d$1_ActivationStatus as ActivationStatus, type index_d$1_ActivationStatusChanged as ActivationStatusChanged, type index_d$1_ActivationStatusChangedEnvelope as ActivationStatusChangedEnvelope, type index_d$1_ActivationStatusChangedFailedStatusInfo as ActivationStatusChangedFailedStatusInfo, index_d$1_ActivationStatusChangedStatus as ActivationStatusChangedStatus, type index_d$1_ActivationStatusChangedStatusInfoOneOf as ActivationStatusChangedStatusInfoOneOf, type AppDefinedAction$1 as AppDefinedAction, type index_d$1_AppDefinedActionInfo as AppDefinedActionInfo, type ApplicationError$1 as ApplicationError, type ApplicationOrigin$1 as ApplicationOrigin, type index_d$1_AsyncAction as AsyncAction, type AuditInfo$1 as AuditInfo, type AuditInfoIdOneOf$1 as AuditInfoIdOneOf, type Automation$1 as Automation, type AutomationConfiguration$1 as AutomationConfiguration, type index_d$1_AutomationConfigurationAction as AutomationConfigurationAction, type index_d$1_AutomationConfigurationActionInfoOneOf as AutomationConfigurationActionInfoOneOf, index_d$1_AutomationConfigurationStatus as AutomationConfigurationStatus, type index_d$1_AutomationIdentifier as AutomationIdentifier, type index_d$1_AutomationInfo as AutomationInfo, type index_d$1_AutomationInfoOriginInfoOneOf as AutomationInfoOriginInfoOneOf, type AutomationOriginInfoOneOf$1 as AutomationOriginInfoOneOf, type AutomationSettings$1 as AutomationSettings, type BaseEventMetadata$1 as BaseEventMetadata, type index_d$1_BatchActivationRequest as BatchActivationRequest, index_d$1_BlockType as BlockType, type BulkActionMetadata$1 as BulkActionMetadata, type index_d$1_BulkCancelEventRequest as BulkCancelEventRequest, type index_d$1_BulkCancelEventResponse as BulkCancelEventResponse, type index_d$1_BulkCancelEventResponseNonNullableFields as BulkCancelEventResponseNonNullableFields, type index_d$1_BulkCancelEventResult as BulkCancelEventResult, type index_d$1_BulkReportEventRequest as BulkReportEventRequest, type index_d$1_BulkReportEventResponse as BulkReportEventResponse, type index_d$1_BulkReportEventResponseNonNullableFields as BulkReportEventResponseNonNullableFields, type index_d$1_BulkReportEventResult as BulkReportEventResult, type index_d$1_CancelEventRequest as CancelEventRequest, type index_d$1_CancelEventResponse as CancelEventResponse, type index_d$1_CancelPendingScheduleRequest as CancelPendingScheduleRequest, type index_d$1_CancelPendingScheduleRequestByOneOf as CancelPendingScheduleRequestByOneOf, type index_d$1_CancelPendingScheduleResponse as CancelPendingScheduleResponse, index_d$1_CancellationReason as CancellationReason, type index_d$1_CancelledStatusInfo as CancelledStatusInfo, type index_d$1_Case as Case, type ConditionAction$1 as ConditionAction, type index_d$1_ConditionActionInfo as ConditionActionInfo, type index_d$1_ConditionBlock as ConditionBlock, type ConditionExpressionGroup$1 as ConditionExpressionGroup, type index_d$1_ConditionFilter as ConditionFilter, type index_d$1_Delay as Delay, type DelayAction$1 as DelayAction, type index_d$1_DelayActionInfo as DelayActionInfo, type index_d$1_DelayHelper as DelayHelper, type index_d$1_DelayOfOneOf as DelayOfOneOf, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type DraftInfo$1 as DraftInfo, type Empty$1 as Empty, type index_d$1_EndedStatusInfo as EndedStatusInfo, type index_d$1_EndedStatusInfoTypeInfoOneOf as EndedStatusInfoTypeInfoOneOf, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type index_d$1_EventInfo as EventInfo, type EventMetadata$1 as EventMetadata, type index_d$1_ExecuteFromActionRequest as ExecuteFromActionRequest, type index_d$1_ExecuteFromActionResponse as ExecuteFromActionResponse, type index_d$1_ExpressionEvaluationResult as ExpressionEvaluationResult, type index_d$1_FailedStatusInfo as FailedStatusInfo, type Filter$2 as Filter, type FutureDateActivationOffset$1 as FutureDateActivationOffset, type index_d$1_Idempotency as Idempotency, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, index_d$1_IdentifierType as IdentifierType, type index_d$1_Identity as Identity, type index_d$1_IfFilter as IfFilter, type index_d$1_InitiatedStatusInfo as InitiatedStatusInfo, type ItemMetadata$1 as ItemMetadata, type MessageEnvelope$1 as MessageEnvelope, Operator$1 as Operator, Origin$1 as Origin, type index_d$1_Output as Output, type OutputAction$1 as OutputAction, type index_d$1_PreinstalledIdentifier as PreinstalledIdentifier, type PreinstalledOrigin$1 as PreinstalledOrigin, type RateLimit$1 as RateLimit, type RateLimitAction$1 as RateLimitAction, type index_d$1_RateLimitActionInfo as RateLimitActionInfo, type index_d$1_RateLimiting as RateLimiting, type index_d$1_RefreshPayloadRequest as RefreshPayloadRequest, type index_d$1_RefreshPayloadResponse as RefreshPayloadResponse, type index_d$1_ReportDomainEventRequest as ReportDomainEventRequest, type index_d$1_ReportDomainEventResponse as ReportDomainEventResponse, type index_d$1_ReportEventOptions as ReportEventOptions, type index_d$1_ReportEventRequest as ReportEventRequest, type index_d$1_ReportEventResponse as ReportEventResponse, type index_d$1_ReportEventResponseNonNullableFields as ReportEventResponseNonNullableFields, type RestoreInfo$1 as RestoreInfo, type index_d$1_RunAutomationRequest as RunAutomationRequest, type index_d$1_RunAutomationResponse as RunAutomationResponse, type index_d$1_Runtime as Runtime, type index_d$1_Schedule as Schedule, type index_d$1_ScheduleRequest as ScheduleRequest, type index_d$1_ScheduleResponse as ScheduleResponse, index_d$1_ScheduleStatus as ScheduleStatus, type index_d$1_ScheduledAction as ScheduledAction, type index_d$1_ScheduledStatusInfo as ScheduledStatusInfo, type index_d$1_Scheduler as Scheduler, type index_d$1_Service as Service, type index_d$1_ServiceMapping as ServiceMapping, type index_d$1_SimpleDelay as SimpleDelay, type index_d$1_SpiAction as SpiAction, type index_d$1_StartedStatusInfo as StartedStatusInfo, type index_d$1_StartedStatusInfoAppDefinedActionInfo as StartedStatusInfoAppDefinedActionInfo, type index_d$1_StartedStatusInfoTypeInfoOneOf as StartedStatusInfoTypeInfoOneOf, Status$1 as Status, type index_d$1_SwitchFilter as SwitchFilter, type index_d$1_SystemHelper as SystemHelper, type index_d$1_SystemHelperHelperOneOf as SystemHelperHelperOneOf, index_d$1_Target as Target, TimeUnit$1 as TimeUnit, type Trigger$1 as Trigger, type index_d$1_TriggerInfo as TriggerInfo, Type$1 as Type, index_d$1_Units as Units, type index_d$1_UpdatePendingSchedulesPayloadRequest as UpdatePendingSchedulesPayloadRequest, type index_d$1_UpdatePendingSchedulesPayloadResponse as UpdatePendingSchedulesPayloadResponse, type index_d$1_V1RunAutomationRequest as V1RunAutomationRequest, type index_d$1_V1RunAutomationRequestIdentifierOneOf as V1RunAutomationRequestIdentifierOneOf, type index_d$1_V1RunAutomationResponse as V1RunAutomationResponse, WebhookIdentityType$1 as WebhookIdentityType, type index_d$1__publicOnActivationStatusChangedType as _publicOnActivationStatusChangedType, index_d$1_bulkCancelEvent as bulkCancelEvent, index_d$1_bulkReportEvent as bulkReportEvent, index_d$1_cancelEvent as cancelEvent, index_d$1_onActivationStatusChanged as onActivationStatusChanged, onActivationStatusChanged$1 as publicOnActivationStatusChanged, index_d$1_reportEvent as reportEvent };
|
|
4319
|
+
}
|
|
4320
|
+
|
|
4321
|
+
type HostModule<T, H extends Host> = {
|
|
4322
|
+
__type: 'host';
|
|
4323
|
+
create(host: H): T;
|
|
4324
|
+
};
|
|
4325
|
+
type HostModuleAPI<T extends HostModule<any, any>> = T extends HostModule<infer U, any> ? U : never;
|
|
4326
|
+
type Host<Environment = unknown> = {
|
|
4327
|
+
channel: {
|
|
4328
|
+
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
4329
|
+
disconnect: () => void;
|
|
4330
|
+
} | Promise<{
|
|
4331
|
+
disconnect: () => void;
|
|
4332
|
+
}>;
|
|
4333
|
+
};
|
|
4334
|
+
environment?: Environment;
|
|
4335
|
+
/**
|
|
4336
|
+
* Optional bast url to use for API requests, for example `www.wixapis.com`
|
|
4337
|
+
*/
|
|
4338
|
+
apiBaseUrl?: string;
|
|
4339
|
+
/**
|
|
4340
|
+
* Possible data to be provided by every host, for cross cutting concerns
|
|
4341
|
+
* like internationalization, billing, etc.
|
|
4342
|
+
*/
|
|
4343
|
+
essentials?: {
|
|
4344
|
+
/**
|
|
4345
|
+
* The language of the currently viewed session
|
|
4346
|
+
*/
|
|
4347
|
+
language?: string;
|
|
4348
|
+
/**
|
|
4349
|
+
* The locale of the currently viewed session
|
|
4350
|
+
*/
|
|
4351
|
+
locale?: string;
|
|
4352
|
+
/**
|
|
4353
|
+
* Any headers that should be passed through to the API requests
|
|
4354
|
+
*/
|
|
4355
|
+
passThroughHeaders?: Record<string, string>;
|
|
4356
|
+
};
|
|
4357
|
+
};
|
|
4358
|
+
|
|
4359
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
4360
|
+
interface HttpClient {
|
|
4361
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4362
|
+
fetchWithAuth: typeof fetch;
|
|
4363
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
4364
|
+
getActiveToken?: () => string | undefined;
|
|
4365
|
+
}
|
|
4366
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
4367
|
+
type HttpResponse<T = any> = {
|
|
4368
|
+
data: T;
|
|
4369
|
+
status: number;
|
|
4370
|
+
statusText: string;
|
|
4371
|
+
headers: any;
|
|
4372
|
+
request?: any;
|
|
4373
|
+
};
|
|
4374
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
4375
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
4376
|
+
url: string;
|
|
4377
|
+
data?: Data;
|
|
4378
|
+
params?: URLSearchParams;
|
|
4379
|
+
} & APIMetadata;
|
|
4380
|
+
type APIMetadata = {
|
|
4381
|
+
methodFqn?: string;
|
|
4382
|
+
entityFqdn?: string;
|
|
4383
|
+
packageName?: string;
|
|
4384
|
+
};
|
|
4385
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
4386
|
+
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
4387
|
+
__type: 'event-definition';
|
|
4388
|
+
type: Type;
|
|
4389
|
+
isDomainEvent?: boolean;
|
|
4390
|
+
transformations?: (envelope: unknown) => Payload;
|
|
4391
|
+
__payload: Payload;
|
|
4392
|
+
};
|
|
4393
|
+
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
4394
|
+
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
4395
|
+
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
4396
|
+
|
|
4397
|
+
type ServicePluginMethodInput = {
|
|
4398
|
+
request: any;
|
|
4399
|
+
metadata: any;
|
|
4400
|
+
};
|
|
4401
|
+
type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
4402
|
+
type ServicePluginMethodMetadata = {
|
|
4403
|
+
name: string;
|
|
4404
|
+
primaryHttpMappingPath: string;
|
|
4405
|
+
transformations: {
|
|
4406
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput;
|
|
4407
|
+
toREST: (...args: unknown[]) => unknown;
|
|
4408
|
+
};
|
|
4409
|
+
};
|
|
4410
|
+
type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
4411
|
+
__type: 'service-plugin-definition';
|
|
4412
|
+
componentType: string;
|
|
4413
|
+
methods: ServicePluginMethodMetadata[];
|
|
4414
|
+
__contract: Contract;
|
|
4415
|
+
};
|
|
4416
|
+
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
4417
|
+
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
4418
|
+
declare const SERVICE_PLUGIN_ERROR_TYPE = "wix_spi_error";
|
|
4419
|
+
|
|
4420
|
+
type RequestContext = {
|
|
4421
|
+
isSSR: boolean;
|
|
4422
|
+
host: string;
|
|
4423
|
+
protocol?: string;
|
|
4424
|
+
};
|
|
4425
|
+
type ResponseTransformer = (data: any, headers?: any) => any;
|
|
4426
|
+
/**
|
|
4427
|
+
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
4428
|
+
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
4429
|
+
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
4430
|
+
*/
|
|
4431
|
+
type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
4432
|
+
type AmbassadorRequestOptions<T = any> = {
|
|
4433
|
+
_?: T;
|
|
4434
|
+
url?: string;
|
|
4435
|
+
method?: Method;
|
|
4436
|
+
params?: any;
|
|
4437
|
+
data?: any;
|
|
4438
|
+
transformResponse?: ResponseTransformer | ResponseTransformer[];
|
|
4439
|
+
};
|
|
4440
|
+
type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
|
|
4441
|
+
__isAmbassador: boolean;
|
|
4442
|
+
};
|
|
4443
|
+
type AmbassadorFunctionDescriptor<Request = any, Response = any> = AmbassadorFactory<Request, Response>;
|
|
4444
|
+
type BuildAmbassadorFunction<T extends AmbassadorFunctionDescriptor> = T extends AmbassadorFunctionDescriptor<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
4445
|
+
|
|
4446
|
+
declare global {
|
|
4447
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4448
|
+
interface SymbolConstructor {
|
|
4449
|
+
readonly observable: symbol;
|
|
4450
|
+
}
|
|
4451
|
+
}
|
|
4452
|
+
|
|
4453
|
+
declare const emptyObjectSymbol: unique symbol;
|
|
4454
|
+
|
|
4455
|
+
/**
|
|
4456
|
+
Represents a strictly empty plain object, the `{}` value.
|
|
4457
|
+
|
|
4458
|
+
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)).
|
|
4459
|
+
|
|
4460
|
+
@example
|
|
4461
|
+
```
|
|
4462
|
+
import type {EmptyObject} from 'type-fest';
|
|
4463
|
+
|
|
4464
|
+
// The following illustrates the problem with `{}`.
|
|
4465
|
+
const foo1: {} = {}; // Pass
|
|
4466
|
+
const foo2: {} = []; // Pass
|
|
4467
|
+
const foo3: {} = 42; // Pass
|
|
4468
|
+
const foo4: {} = {a: 1}; // Pass
|
|
4469
|
+
|
|
4470
|
+
// With `EmptyObject` only the first case is valid.
|
|
4471
|
+
const bar1: EmptyObject = {}; // Pass
|
|
4472
|
+
const bar2: EmptyObject = 42; // Fail
|
|
4473
|
+
const bar3: EmptyObject = []; // Fail
|
|
4474
|
+
const bar4: EmptyObject = {a: 1}; // Fail
|
|
4475
|
+
```
|
|
4476
|
+
|
|
4477
|
+
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}.
|
|
4478
|
+
|
|
4479
|
+
@category Object
|
|
4480
|
+
*/
|
|
4481
|
+
type EmptyObject = {[emptyObjectSymbol]?: never};
|
|
4482
|
+
|
|
4483
|
+
/**
|
|
4484
|
+
Returns a boolean for whether the two given types are equal.
|
|
4485
|
+
|
|
4486
|
+
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
4487
|
+
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
4488
|
+
|
|
4489
|
+
Use-cases:
|
|
4490
|
+
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
4491
|
+
|
|
4492
|
+
@example
|
|
4493
|
+
```
|
|
4494
|
+
import type {IsEqual} from 'type-fest';
|
|
4495
|
+
|
|
4496
|
+
// This type returns a boolean for whether the given array includes the given item.
|
|
4497
|
+
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
4498
|
+
type Includes<Value extends readonly any[], Item> =
|
|
4499
|
+
Value extends readonly [Value[0], ...infer rest]
|
|
4500
|
+
? IsEqual<Value[0], Item> extends true
|
|
4501
|
+
? true
|
|
4502
|
+
: Includes<rest, Item>
|
|
4503
|
+
: false;
|
|
4504
|
+
```
|
|
4505
|
+
|
|
4506
|
+
@category Type Guard
|
|
4507
|
+
@category Utilities
|
|
4508
|
+
*/
|
|
4509
|
+
type IsEqual<A, B> =
|
|
4510
|
+
(<G>() => G extends A ? 1 : 2) extends
|
|
4511
|
+
(<G>() => G extends B ? 1 : 2)
|
|
4512
|
+
? true
|
|
4513
|
+
: false;
|
|
4514
|
+
|
|
4515
|
+
/**
|
|
4516
|
+
Filter out keys from an object.
|
|
4517
|
+
|
|
4518
|
+
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
4519
|
+
Returns `never` if `Key` extends `Exclude`.
|
|
4520
|
+
Returns `Key` otherwise.
|
|
4521
|
+
|
|
4522
|
+
@example
|
|
4523
|
+
```
|
|
4524
|
+
type Filtered = Filter<'foo', 'foo'>;
|
|
4525
|
+
//=> never
|
|
4526
|
+
```
|
|
4527
|
+
|
|
4528
|
+
@example
|
|
4529
|
+
```
|
|
4530
|
+
type Filtered = Filter<'bar', string>;
|
|
4531
|
+
//=> never
|
|
4532
|
+
```
|
|
4533
|
+
|
|
4534
|
+
@example
|
|
4535
|
+
```
|
|
4536
|
+
type Filtered = Filter<'bar', 'foo'>;
|
|
4537
|
+
//=> 'bar'
|
|
4538
|
+
```
|
|
4539
|
+
|
|
4540
|
+
@see {Except}
|
|
4541
|
+
*/
|
|
4542
|
+
type Filter$1<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
4543
|
+
|
|
4544
|
+
type ExceptOptions = {
|
|
4545
|
+
/**
|
|
4546
|
+
Disallow assigning non-specified properties.
|
|
4547
|
+
|
|
4548
|
+
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
4549
|
+
|
|
4550
|
+
@default false
|
|
4551
|
+
*/
|
|
4552
|
+
requireExactProps?: boolean;
|
|
4553
|
+
};
|
|
4554
|
+
|
|
4555
|
+
/**
|
|
4556
|
+
Create a type from an object type without certain keys.
|
|
4557
|
+
|
|
4558
|
+
We recommend setting the `requireExactProps` option to `true`.
|
|
4559
|
+
|
|
4560
|
+
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.
|
|
4561
|
+
|
|
4562
|
+
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)).
|
|
4563
|
+
|
|
4564
|
+
@example
|
|
4565
|
+
```
|
|
4566
|
+
import type {Except} from 'type-fest';
|
|
4567
|
+
|
|
4568
|
+
type Foo = {
|
|
4569
|
+
a: number;
|
|
4570
|
+
b: string;
|
|
4571
|
+
};
|
|
4572
|
+
|
|
4573
|
+
type FooWithoutA = Except<Foo, 'a'>;
|
|
4574
|
+
//=> {b: string}
|
|
4575
|
+
|
|
4576
|
+
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
4577
|
+
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
4578
|
+
|
|
4579
|
+
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
4580
|
+
//=> {a: number} & Partial<Record<"b", never>>
|
|
4581
|
+
|
|
4582
|
+
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
4583
|
+
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
4584
|
+
```
|
|
4585
|
+
|
|
4586
|
+
@category Object
|
|
4587
|
+
*/
|
|
4588
|
+
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
|
|
4589
|
+
[KeyType in keyof ObjectType as Filter$1<KeyType, KeysType>]: ObjectType[KeyType];
|
|
4590
|
+
} & (Options['requireExactProps'] extends true
|
|
4591
|
+
? Partial<Record<KeysType, never>>
|
|
4592
|
+
: {});
|
|
4593
|
+
|
|
4594
|
+
/**
|
|
4595
|
+
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
4596
|
+
|
|
4597
|
+
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
4598
|
+
|
|
4599
|
+
@example
|
|
4600
|
+
```
|
|
4601
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
4602
|
+
|
|
4603
|
+
interface Example {
|
|
4604
|
+
a: string;
|
|
4605
|
+
b: string | number;
|
|
4606
|
+
c?: string;
|
|
4607
|
+
d: {};
|
|
4608
|
+
}
|
|
4609
|
+
|
|
4610
|
+
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
4611
|
+
//=> 'a'
|
|
4612
|
+
```
|
|
4613
|
+
|
|
4614
|
+
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
4615
|
+
|
|
4616
|
+
@example
|
|
4617
|
+
```
|
|
4618
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
4619
|
+
|
|
4620
|
+
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
4621
|
+
//=> 'a' | 'c'
|
|
4622
|
+
```
|
|
4623
|
+
|
|
4624
|
+
@category Object
|
|
4625
|
+
*/
|
|
4626
|
+
type ConditionalKeys<Base, Condition> = NonNullable<
|
|
4627
|
+
// Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
|
|
4628
|
+
{
|
|
4629
|
+
// Map through all the keys of the given base type.
|
|
4630
|
+
[Key in keyof Base]:
|
|
4631
|
+
// Pick only keys with types extending the given `Condition` type.
|
|
4632
|
+
Base[Key] extends Condition
|
|
4633
|
+
// Retain this key since the condition passes.
|
|
4634
|
+
? Key
|
|
4635
|
+
// Discard this key since the condition fails.
|
|
4636
|
+
: never;
|
|
4637
|
+
|
|
4638
|
+
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
4639
|
+
}[keyof Base]
|
|
4640
|
+
>;
|
|
4641
|
+
|
|
4642
|
+
/**
|
|
4643
|
+
Exclude keys from a shape that matches the given `Condition`.
|
|
4644
|
+
|
|
4645
|
+
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.
|
|
4646
|
+
|
|
4647
|
+
@example
|
|
4648
|
+
```
|
|
4649
|
+
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
4650
|
+
|
|
4651
|
+
class Awesome {
|
|
4652
|
+
name: string;
|
|
4653
|
+
successes: number;
|
|
4654
|
+
failures: bigint;
|
|
4655
|
+
|
|
4656
|
+
run() {}
|
|
4657
|
+
}
|
|
4658
|
+
|
|
4659
|
+
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
|
|
4660
|
+
//=> {run: () => void}
|
|
4661
|
+
```
|
|
4662
|
+
|
|
4663
|
+
@example
|
|
4664
|
+
```
|
|
4665
|
+
import type {ConditionalExcept} from 'type-fest';
|
|
4666
|
+
|
|
4667
|
+
interface Example {
|
|
4668
|
+
a: string;
|
|
4669
|
+
b: string | number;
|
|
4670
|
+
c: () => void;
|
|
4671
|
+
d: {};
|
|
3507
4672
|
}
|
|
3508
4673
|
|
|
4674
|
+
type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
4675
|
+
//=> {b: string | number; c: () => void; d: {}}
|
|
4676
|
+
```
|
|
4677
|
+
|
|
4678
|
+
@category Object
|
|
4679
|
+
*/
|
|
4680
|
+
type ConditionalExcept<Base, Condition> = Except<
|
|
4681
|
+
Base,
|
|
4682
|
+
ConditionalKeys<Base, Condition>
|
|
4683
|
+
>;
|
|
4684
|
+
|
|
4685
|
+
/**
|
|
4686
|
+
* Descriptors are objects that describe the API of a module, and the module
|
|
4687
|
+
* can either be a REST module or a host module.
|
|
4688
|
+
* This type is recursive, so it can describe nested modules.
|
|
4689
|
+
*/
|
|
4690
|
+
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition$1<any> | ServicePluginDefinition<any> | {
|
|
4691
|
+
[key: string]: Descriptors | PublicMetadata | any;
|
|
4692
|
+
};
|
|
4693
|
+
/**
|
|
4694
|
+
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
4695
|
+
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
4696
|
+
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
4697
|
+
* do not match the given host (as they will not work with the given host).
|
|
4698
|
+
*/
|
|
4699
|
+
type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, Depth extends number = 5> = {
|
|
4700
|
+
done: T;
|
|
4701
|
+
recurse: T extends {
|
|
4702
|
+
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
4703
|
+
} ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition$1<any> ? BuildEventDefinition$1<T> : T extends ServicePluginDefinition<any> ? BuildServicePluginDefinition<T> : T extends HostModule<any, any> ? HostModuleAPI<T> : ConditionalExcept<{
|
|
4704
|
+
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
4705
|
+
-1,
|
|
4706
|
+
0,
|
|
4707
|
+
1,
|
|
4708
|
+
2,
|
|
4709
|
+
3,
|
|
4710
|
+
4,
|
|
4711
|
+
5
|
|
4712
|
+
][Depth]> : never;
|
|
4713
|
+
}, EmptyObject>;
|
|
4714
|
+
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
4715
|
+
type PublicMetadata = {
|
|
4716
|
+
PACKAGE_NAME?: string;
|
|
4717
|
+
};
|
|
4718
|
+
|
|
4719
|
+
declare global {
|
|
4720
|
+
interface ContextualClient {
|
|
4721
|
+
}
|
|
4722
|
+
}
|
|
4723
|
+
/**
|
|
4724
|
+
* A type used to create concerete types from SDK descriptors in
|
|
4725
|
+
* case a contextual client is available.
|
|
4726
|
+
*/
|
|
4727
|
+
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
4728
|
+
host: Host;
|
|
4729
|
+
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
4730
|
+
|
|
3509
4731
|
interface Automation extends AutomationOriginInfoOneOf {
|
|
3510
4732
|
/** Application info */
|
|
3511
4733
|
applicationInfo?: ApplicationOrigin;
|
|
@@ -4637,6 +5859,8 @@ interface ValidateAutomationResponse {
|
|
|
4637
5859
|
triggerValidationErrors?: TriggerValidationError[];
|
|
4638
5860
|
/** List of validation information for the automation actions. */
|
|
4639
5861
|
actionValidationInfo?: ActionValidationInfo[];
|
|
5862
|
+
/** List of additional validation errors for the automation */
|
|
5863
|
+
automationValidationErrors?: AutomationValidationError[];
|
|
4640
5864
|
}
|
|
4641
5865
|
interface TriggerValidationError extends TriggerValidationErrorErrorOneOf {
|
|
4642
5866
|
/** Trigger configuration error. */
|
|
@@ -4744,6 +5968,35 @@ declare enum ActionErrorType {
|
|
|
4744
5968
|
MAPPING_SCHEMA_MISMATCH = "MAPPING_SCHEMA_MISMATCH",
|
|
4745
5969
|
MAPPING_VARIABLE_MISSING_FROM_SCHEMA = "MAPPING_VARIABLE_MISSING_FROM_SCHEMA"
|
|
4746
5970
|
}
|
|
5971
|
+
interface AutomationValidationError extends AutomationValidationErrorErrorOneOf {
|
|
5972
|
+
/** Automation configuration error. */
|
|
5973
|
+
configurationError?: AutomationConfigurationError;
|
|
5974
|
+
/** Provider configuration error. */
|
|
5975
|
+
providerConfigurationError?: ProviderConfigurationError;
|
|
5976
|
+
/** Validation error type. */
|
|
5977
|
+
errorType?: AutomationValidationErrorValidationErrorType;
|
|
5978
|
+
/** Validation error severity */
|
|
5979
|
+
severity?: ValidationErrorSeverity;
|
|
5980
|
+
}
|
|
5981
|
+
/** @oneof */
|
|
5982
|
+
interface AutomationValidationErrorErrorOneOf {
|
|
5983
|
+
/** Automation configuration error. */
|
|
5984
|
+
configurationError?: AutomationConfigurationError;
|
|
5985
|
+
/** Provider configuration error. */
|
|
5986
|
+
providerConfigurationError?: ProviderConfigurationError;
|
|
5987
|
+
}
|
|
5988
|
+
declare enum AutomationValidationErrorValidationErrorType {
|
|
5989
|
+
UNKNOWN_VALIDATION_ERROR_TYPE = "UNKNOWN_VALIDATION_ERROR_TYPE",
|
|
5990
|
+
CONFIGURATION_ERROR = "CONFIGURATION_ERROR",
|
|
5991
|
+
PROVIDER_ERROR = "PROVIDER_ERROR"
|
|
5992
|
+
}
|
|
5993
|
+
interface AutomationConfigurationError {
|
|
5994
|
+
/** Automation error type. */
|
|
5995
|
+
errorType?: AutomationErrorType;
|
|
5996
|
+
}
|
|
5997
|
+
declare enum AutomationErrorType {
|
|
5998
|
+
UNKNOWN_AUTOMATION_ERROR_TYPE = "UNKNOWN_AUTOMATION_ERROR_TYPE"
|
|
5999
|
+
}
|
|
4747
6000
|
interface GetAutomationActionSchemaRequest {
|
|
4748
6001
|
/** Automation ID */
|
|
4749
6002
|
automationId: string;
|
|
@@ -4973,10 +6226,20 @@ interface ActionValidationInfoNonNullableFields {
|
|
|
4973
6226
|
actionKey: string;
|
|
4974
6227
|
validationErrors: ActionValidationErrorNonNullableFields[];
|
|
4975
6228
|
}
|
|
6229
|
+
interface AutomationConfigurationErrorNonNullableFields {
|
|
6230
|
+
errorType: AutomationErrorType;
|
|
6231
|
+
}
|
|
6232
|
+
interface AutomationValidationErrorNonNullableFields {
|
|
6233
|
+
configurationError?: AutomationConfigurationErrorNonNullableFields;
|
|
6234
|
+
providerConfigurationError?: ProviderConfigurationErrorNonNullableFields;
|
|
6235
|
+
errorType: AutomationValidationErrorValidationErrorType;
|
|
6236
|
+
severity: ValidationErrorSeverity;
|
|
6237
|
+
}
|
|
4976
6238
|
interface ValidateAutomationResponseNonNullableFields {
|
|
4977
6239
|
valid: boolean;
|
|
4978
6240
|
triggerValidationErrors: TriggerValidationErrorNonNullableFields[];
|
|
4979
6241
|
actionValidationInfo: ActionValidationInfoNonNullableFields[];
|
|
6242
|
+
automationValidationErrors: AutomationValidationErrorNonNullableFields[];
|
|
4980
6243
|
}
|
|
4981
6244
|
interface PlanNonNullableFields {
|
|
4982
6245
|
_id: string;
|
|
@@ -5434,29 +6697,47 @@ interface GetActionsQuotaInfoSignature {
|
|
|
5434
6697
|
*/
|
|
5435
6698
|
(): Promise<GetActionsQuotaInfoResponse & GetActionsQuotaInfoResponseNonNullableFields>;
|
|
5436
6699
|
}
|
|
5437
|
-
declare const onAutomationCreated$1: EventDefinition<AutomationCreatedEnvelope, "wix.automations.v2.automation_created">;
|
|
5438
|
-
declare const onAutomationUpdated$1: EventDefinition<AutomationUpdatedEnvelope, "wix.automations.v2.automation_updated">;
|
|
5439
|
-
declare const onAutomationDeleted$1: EventDefinition<AutomationDeletedEnvelope, "wix.automations.v2.automation_deleted">;
|
|
5440
|
-
declare const onAutomationUpdatedWithPreviousEntity$1: EventDefinition<AutomationUpdatedWithPreviousEntityEnvelope, "wix.automations.v2.automation_updated_with_previous_entity">;
|
|
5441
|
-
declare const onAutomationDeletedWithEntity$1: EventDefinition<AutomationDeletedWithEntityEnvelope, "wix.automations.v2.automation_deleted_with_entity">;
|
|
6700
|
+
declare const onAutomationCreated$1: EventDefinition$1<AutomationCreatedEnvelope, "wix.automations.v2.automation_created">;
|
|
6701
|
+
declare const onAutomationUpdated$1: EventDefinition$1<AutomationUpdatedEnvelope, "wix.automations.v2.automation_updated">;
|
|
6702
|
+
declare const onAutomationDeleted$1: EventDefinition$1<AutomationDeletedEnvelope, "wix.automations.v2.automation_deleted">;
|
|
6703
|
+
declare const onAutomationUpdatedWithPreviousEntity$1: EventDefinition$1<AutomationUpdatedWithPreviousEntityEnvelope, "wix.automations.v2.automation_updated_with_previous_entity">;
|
|
6704
|
+
declare const onAutomationDeletedWithEntity$1: EventDefinition$1<AutomationDeletedWithEntityEnvelope, "wix.automations.v2.automation_deleted_with_entity">;
|
|
6705
|
+
|
|
6706
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
6707
|
+
__type: 'event-definition';
|
|
6708
|
+
type: Type;
|
|
6709
|
+
isDomainEvent?: boolean;
|
|
6710
|
+
transformations?: (envelope: unknown) => Payload;
|
|
6711
|
+
__payload: Payload;
|
|
6712
|
+
};
|
|
6713
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
6714
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
6715
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
6716
|
+
|
|
6717
|
+
declare global {
|
|
6718
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
6719
|
+
interface SymbolConstructor {
|
|
6720
|
+
readonly observable: symbol;
|
|
6721
|
+
}
|
|
6722
|
+
}
|
|
5442
6723
|
|
|
5443
6724
|
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
5444
6725
|
|
|
5445
|
-
declare const createAutomation: BuildRESTFunction<typeof createAutomation$1> & typeof createAutomation$1
|
|
5446
|
-
declare const getAutomation: BuildRESTFunction<typeof getAutomation$1> & typeof getAutomation$1
|
|
5447
|
-
declare const updateAutomation: BuildRESTFunction<typeof updateAutomation$1> & typeof updateAutomation$1
|
|
5448
|
-
declare const deleteAutomation: BuildRESTFunction<typeof deleteAutomation$1> & typeof deleteAutomation$1
|
|
5449
|
-
declare const bulkDeleteAutomations: BuildRESTFunction<typeof bulkDeleteAutomations$1> & typeof bulkDeleteAutomations$1
|
|
5450
|
-
declare const queryAutomations: BuildRESTFunction<typeof queryAutomations$1> & typeof queryAutomations$1
|
|
5451
|
-
declare const copyAutomation: BuildRESTFunction<typeof copyAutomation$1> & typeof copyAutomation$1
|
|
5452
|
-
declare const createDraftAutomation: BuildRESTFunction<typeof createDraftAutomation$1> & typeof createDraftAutomation$1
|
|
5453
|
-
declare const getOrCreateDraftAutomation: BuildRESTFunction<typeof getOrCreateDraftAutomation$1> & typeof getOrCreateDraftAutomation$1
|
|
5454
|
-
declare const updateDraftAutomation: BuildRESTFunction<typeof updateDraftAutomation$1> & typeof updateDraftAutomation$1
|
|
5455
|
-
declare const queryAutomationsWithDrafts: BuildRESTFunction<typeof queryAutomationsWithDrafts$1> & typeof queryAutomationsWithDrafts$1
|
|
5456
|
-
declare const deleteDraftAutomation: BuildRESTFunction<typeof deleteDraftAutomation$1> & typeof deleteDraftAutomation$1
|
|
5457
|
-
declare const validateAutomation: BuildRESTFunction<typeof validateAutomation$1> & typeof validateAutomation$1
|
|
5458
|
-
declare const getAutomationActionSchema: BuildRESTFunction<typeof getAutomationActionSchema$1> & typeof getAutomationActionSchema$1
|
|
5459
|
-
declare const getActionsQuotaInfo: BuildRESTFunction<typeof getActionsQuotaInfo$1> & typeof getActionsQuotaInfo$1
|
|
6726
|
+
declare const createAutomation: MaybeContext<BuildRESTFunction<typeof createAutomation$1> & typeof createAutomation$1>;
|
|
6727
|
+
declare const getAutomation: MaybeContext<BuildRESTFunction<typeof getAutomation$1> & typeof getAutomation$1>;
|
|
6728
|
+
declare const updateAutomation: MaybeContext<BuildRESTFunction<typeof updateAutomation$1> & typeof updateAutomation$1>;
|
|
6729
|
+
declare const deleteAutomation: MaybeContext<BuildRESTFunction<typeof deleteAutomation$1> & typeof deleteAutomation$1>;
|
|
6730
|
+
declare const bulkDeleteAutomations: MaybeContext<BuildRESTFunction<typeof bulkDeleteAutomations$1> & typeof bulkDeleteAutomations$1>;
|
|
6731
|
+
declare const queryAutomations: MaybeContext<BuildRESTFunction<typeof queryAutomations$1> & typeof queryAutomations$1>;
|
|
6732
|
+
declare const copyAutomation: MaybeContext<BuildRESTFunction<typeof copyAutomation$1> & typeof copyAutomation$1>;
|
|
6733
|
+
declare const createDraftAutomation: MaybeContext<BuildRESTFunction<typeof createDraftAutomation$1> & typeof createDraftAutomation$1>;
|
|
6734
|
+
declare const getOrCreateDraftAutomation: MaybeContext<BuildRESTFunction<typeof getOrCreateDraftAutomation$1> & typeof getOrCreateDraftAutomation$1>;
|
|
6735
|
+
declare const updateDraftAutomation: MaybeContext<BuildRESTFunction<typeof updateDraftAutomation$1> & typeof updateDraftAutomation$1>;
|
|
6736
|
+
declare const queryAutomationsWithDrafts: MaybeContext<BuildRESTFunction<typeof queryAutomationsWithDrafts$1> & typeof queryAutomationsWithDrafts$1>;
|
|
6737
|
+
declare const deleteDraftAutomation: MaybeContext<BuildRESTFunction<typeof deleteDraftAutomation$1> & typeof deleteDraftAutomation$1>;
|
|
6738
|
+
declare const validateAutomation: MaybeContext<BuildRESTFunction<typeof validateAutomation$1> & typeof validateAutomation$1>;
|
|
6739
|
+
declare const getAutomationActionSchema: MaybeContext<BuildRESTFunction<typeof getAutomationActionSchema$1> & typeof getAutomationActionSchema$1>;
|
|
6740
|
+
declare const getActionsQuotaInfo: MaybeContext<BuildRESTFunction<typeof getActionsQuotaInfo$1> & typeof getActionsQuotaInfo$1>;
|
|
5460
6741
|
|
|
5461
6742
|
type _publicOnAutomationCreatedType = typeof onAutomationCreated$1;
|
|
5462
6743
|
/** */
|
|
@@ -5499,14 +6780,21 @@ type index_d_AuditInfo = AuditInfo;
|
|
|
5499
6780
|
type index_d_AuditInfoIdOneOf = AuditInfoIdOneOf;
|
|
5500
6781
|
type index_d_Automation = Automation;
|
|
5501
6782
|
type index_d_AutomationConfiguration = AutomationConfiguration;
|
|
6783
|
+
type index_d_AutomationConfigurationError = AutomationConfigurationError;
|
|
5502
6784
|
type index_d_AutomationCreatedEnvelope = AutomationCreatedEnvelope;
|
|
5503
6785
|
type index_d_AutomationDeletedEnvelope = AutomationDeletedEnvelope;
|
|
5504
6786
|
type index_d_AutomationDeletedWithEntityEnvelope = AutomationDeletedWithEntityEnvelope;
|
|
6787
|
+
type index_d_AutomationErrorType = AutomationErrorType;
|
|
6788
|
+
declare const index_d_AutomationErrorType: typeof AutomationErrorType;
|
|
5505
6789
|
type index_d_AutomationNonNullableFields = AutomationNonNullableFields;
|
|
5506
6790
|
type index_d_AutomationOriginInfoOneOf = AutomationOriginInfoOneOf;
|
|
5507
6791
|
type index_d_AutomationSettings = AutomationSettings;
|
|
5508
6792
|
type index_d_AutomationUpdatedEnvelope = AutomationUpdatedEnvelope;
|
|
5509
6793
|
type index_d_AutomationUpdatedWithPreviousEntityEnvelope = AutomationUpdatedWithPreviousEntityEnvelope;
|
|
6794
|
+
type index_d_AutomationValidationError = AutomationValidationError;
|
|
6795
|
+
type index_d_AutomationValidationErrorErrorOneOf = AutomationValidationErrorErrorOneOf;
|
|
6796
|
+
type index_d_AutomationValidationErrorValidationErrorType = AutomationValidationErrorValidationErrorType;
|
|
6797
|
+
declare const index_d_AutomationValidationErrorValidationErrorType: typeof AutomationValidationErrorValidationErrorType;
|
|
5510
6798
|
type index_d_AutomationsQueryBuilder = AutomationsQueryBuilder;
|
|
5511
6799
|
type index_d_AutomationsQueryResult = AutomationsQueryResult;
|
|
5512
6800
|
type index_d_BaseEventMetadata = BaseEventMetadata;
|
|
@@ -5700,7 +6988,7 @@ declare const index_d_updateAutomation: typeof updateAutomation;
|
|
|
5700
6988
|
declare const index_d_updateDraftAutomation: typeof updateDraftAutomation;
|
|
5701
6989
|
declare const index_d_validateAutomation: typeof validateAutomation;
|
|
5702
6990
|
declare namespace index_d {
|
|
5703
|
-
export { type index_d_Action as Action, type index_d_ActionConfigurationError as ActionConfigurationError, index_d_ActionErrorType as ActionErrorType, type index_d_ActionEvent as ActionEvent, type index_d_ActionInfoOneOf as ActionInfoOneOf, type index_d_ActionProviderQuotaInfo as ActionProviderQuotaInfo, type index_d_ActionQuotaInfo as ActionQuotaInfo, type index_d_ActionSettings as ActionSettings, type index_d_ActionValidationError as ActionValidationError, type index_d_ActionValidationErrorErrorOneOf as ActionValidationErrorErrorOneOf, type index_d_ActionValidationInfo as ActionValidationInfo, type index_d_AdditionalInfo as AdditionalInfo, type index_d_AppDefinedAction as AppDefinedAction, type index_d_ApplicationError as ApplicationError, type index_d_ApplicationOrigin as ApplicationOrigin, type index_d_Asset as Asset, type index_d_AuditInfo as AuditInfo, type index_d_AuditInfoIdOneOf as AuditInfoIdOneOf, type index_d_Automation as Automation, type index_d_AutomationConfiguration as AutomationConfiguration, type index_d_AutomationCreatedEnvelope as AutomationCreatedEnvelope, type index_d_AutomationDeletedEnvelope as AutomationDeletedEnvelope, type index_d_AutomationDeletedWithEntityEnvelope as AutomationDeletedWithEntityEnvelope, type index_d_AutomationNonNullableFields as AutomationNonNullableFields, type index_d_AutomationOriginInfoOneOf as AutomationOriginInfoOneOf, type index_d_AutomationSettings as AutomationSettings, type index_d_AutomationUpdatedEnvelope as AutomationUpdatedEnvelope, type index_d_AutomationUpdatedWithPreviousEntityEnvelope as AutomationUpdatedWithPreviousEntityEnvelope, type index_d_AutomationsQueryBuilder as AutomationsQueryBuilder, type index_d_AutomationsQueryResult as AutomationsQueryResult, type index_d_BaseEventMetadata as BaseEventMetadata, type index_d_BulkActionMetadata as BulkActionMetadata, type index_d_BulkDeleteAutomationsRequest as BulkDeleteAutomationsRequest, type index_d_BulkDeleteAutomationsResponse as BulkDeleteAutomationsResponse, type index_d_BulkDeleteAutomationsResponseNonNullableFields as BulkDeleteAutomationsResponseNonNullableFields, type index_d_BulkDeleteResult as BulkDeleteResult, type index_d_CTA as CTA, type index_d_CommonCursorPaging as CommonCursorPaging, type index_d_CommonCursorPagingMetadata as CommonCursorPagingMetadata, type index_d_CommonCursorQuery as CommonCursorQuery, type index_d_CommonCursorQueryPagingMethodOneOf as CommonCursorQueryPagingMethodOneOf, type index_d_CommonCursors as CommonCursors, index_d_CommonSortOrder as CommonSortOrder, type index_d_CommonSorting as CommonSorting, type index_d_ConditionAction as ConditionAction, type index_d_ConditionExpressionGroup as ConditionExpressionGroup, type index_d_CopyAutomationOptions as CopyAutomationOptions, type index_d_CopyAutomationRequest as CopyAutomationRequest, type index_d_CopyAutomationResponse as CopyAutomationResponse, type index_d_CopyAutomationResponseNonNullableFields as CopyAutomationResponseNonNullableFields, type index_d_CreateAutomationRequest as CreateAutomationRequest, type index_d_CreateAutomationResponse as CreateAutomationResponse, type index_d_CreateAutomationResponseNonNullableFields as CreateAutomationResponseNonNullableFields, type index_d_CreateDraftAutomationOptions as CreateDraftAutomationOptions, type index_d_CreateDraftAutomationRequest as CreateDraftAutomationRequest, type index_d_CreateDraftAutomationResponse as CreateDraftAutomationResponse, type index_d_CreateDraftAutomationResponseNonNullableFields as CreateDraftAutomationResponseNonNullableFields, type index_d_CreatePreinstalledAutomationRequest as CreatePreinstalledAutomationRequest, type index_d_CreatePreinstalledAutomationResponse as CreatePreinstalledAutomationResponse, type index_d_CursorPaging as CursorPaging, type index_d_CursorPagingMetadata as CursorPagingMetadata, type index_d_CursorQuery as CursorQuery, type index_d_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, type index_d_Cursors as Cursors, type index_d_DelayAction as DelayAction, type index_d_DeleteAutomationRequest as DeleteAutomationRequest, type index_d_DeleteAutomationResponse as DeleteAutomationResponse, type index_d_DeleteContext as DeleteContext, type index_d_DeleteDraftAutomationRequest as DeleteDraftAutomationRequest, type index_d_DeleteDraftAutomationResponse as DeleteDraftAutomationResponse, type index_d_DeletePreinstalledAutomationRequest as DeletePreinstalledAutomationRequest, type index_d_DeletePreinstalledAutomationResponse as DeletePreinstalledAutomationResponse, index_d_DeleteStatus as DeleteStatus, type index_d_DeletedWithEntity as DeletedWithEntity, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_DraftInfo as DraftInfo, type index_d_DraftsInfo as DraftsInfo, type index_d_Empty as Empty, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_EventMetadata as EventMetadata, type index_d_Filter as Filter, type index_d_FutureDateActivationOffset as FutureDateActivationOffset, type index_d_GetActionsQuotaInfoRequest as GetActionsQuotaInfoRequest, type index_d_GetActionsQuotaInfoResponse as GetActionsQuotaInfoResponse, type index_d_GetActionsQuotaInfoResponseNonNullableFields as GetActionsQuotaInfoResponseNonNullableFields, type index_d_GetAutomationActionSchemaIdentifiers as GetAutomationActionSchemaIdentifiers, type index_d_GetAutomationActionSchemaRequest as GetAutomationActionSchemaRequest, type index_d_GetAutomationActionSchemaResponse as GetAutomationActionSchemaResponse, type index_d_GetAutomationOptions as GetAutomationOptions, type index_d_GetAutomationRequest as GetAutomationRequest, type index_d_GetAutomationResponse as GetAutomationResponse, type index_d_GetAutomationResponseNonNullableFields as GetAutomationResponseNonNullableFields, type index_d_GetAutomationRevisionRequest as GetAutomationRevisionRequest, type index_d_GetAutomationRevisionResponse as GetAutomationRevisionResponse, type index_d_GetOrCreateDraftAutomationRequest as GetOrCreateDraftAutomationRequest, type index_d_GetOrCreateDraftAutomationResponse as GetOrCreateDraftAutomationResponse, type index_d_GetOrCreateDraftAutomationResponseNonNullableFields as GetOrCreateDraftAutomationResponseNonNullableFields, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d_ItemMetadata as ItemMetadata, type index_d_MessageEnvelope as MessageEnvelope, type index_d_MetaSiteSpecialEvent as MetaSiteSpecialEvent, type index_d_MetaSiteSpecialEventPayloadOneOf as MetaSiteSpecialEventPayloadOneOf, index_d_Namespace as Namespace, type index_d_NamespaceChanged as NamespaceChanged, index_d_Operator as Operator, index_d_Origin as Origin, type index_d_OriginAutomationInfo as OriginAutomationInfo, type index_d_OutputAction as OutputAction, type index_d_Plan as Plan, type index_d_PreinstalledAutomationSpecInfo as PreinstalledAutomationSpecInfo, type index_d_PreinstalledOrigin as PreinstalledOrigin, type index_d_ProviderConfigurationError as ProviderConfigurationError, type index_d_PublishDraftAutomationRequest as PublishDraftAutomationRequest, type index_d_PublishDraftAutomationResponse as PublishDraftAutomationResponse, type index_d_QueryAutomationsRequest as QueryAutomationsRequest, type index_d_QueryAutomationsResponse as QueryAutomationsResponse, type index_d_QueryAutomationsResponseNonNullableFields as QueryAutomationsResponseNonNullableFields, type index_d_QueryAutomationsWithDraftsOptions as QueryAutomationsWithDraftsOptions, type index_d_QueryAutomationsWithDraftsRequest as QueryAutomationsWithDraftsRequest, type index_d_QueryAutomationsWithDraftsResponse as QueryAutomationsWithDraftsResponse, type index_d_QueryAutomationsWithDraftsResponseNonNullableFields as QueryAutomationsWithDraftsResponseNonNullableFields, type index_d_QueryPreinstalledAutomationsForAppRequest as QueryPreinstalledAutomationsForAppRequest, type index_d_QueryPreinstalledAutomationsForAppResponse as QueryPreinstalledAutomationsForAppResponse, type index_d_Quota as Quota, type index_d_QuotaInfo as QuotaInfo, type index_d_RateLimit as RateLimit, type index_d_RateLimitAction as RateLimitAction, type index_d_RestoreInfo as RestoreInfo, type index_d_ServiceProvisioned as ServiceProvisioned, type index_d_ServiceRemoved as ServiceRemoved, type index_d_SiteCreated as SiteCreated, index_d_SiteCreatedContext as SiteCreatedContext, type index_d_SiteDeleted as SiteDeleted, type index_d_SiteHardDeleted as SiteHardDeleted, type index_d_SiteMarkedAsTemplate as SiteMarkedAsTemplate, type index_d_SiteMarkedAsWixSite as SiteMarkedAsWixSite, type index_d_SitePublished as SitePublished, type index_d_SiteRenamed as SiteRenamed, type index_d_SiteTransferred as SiteTransferred, type index_d_SiteUndeleted as SiteUndeleted, type index_d_SiteUnpublished as SiteUnpublished, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, index_d_State as State, index_d_Status as Status, type index_d_StudioAssigned as StudioAssigned, type index_d_StudioUnassigned as StudioUnassigned, index_d_TimeUnit as TimeUnit, type index_d_Trigger as Trigger, type index_d_TriggerConfigurationError as TriggerConfigurationError, index_d_TriggerErrorType as TriggerErrorType, type index_d_TriggerValidationError as TriggerValidationError, type index_d_TriggerValidationErrorErrorOneOf as TriggerValidationErrorErrorOneOf, index_d_TriggerValidationErrorValidationErrorType as TriggerValidationErrorValidationErrorType, index_d_Type as Type, type index_d_UpdateAutomation as UpdateAutomation, type index_d_UpdateAutomationRequest as UpdateAutomationRequest, type index_d_UpdateAutomationResponse as UpdateAutomationResponse, type index_d_UpdateAutomationResponseNonNullableFields as UpdateAutomationResponseNonNullableFields, type index_d_UpdateDraftAutomation as UpdateDraftAutomation, type index_d_UpdateDraftAutomationRequest as UpdateDraftAutomationRequest, type index_d_UpdateDraftAutomationResponse as UpdateDraftAutomationResponse, type index_d_UpdateDraftAutomationResponseNonNullableFields as UpdateDraftAutomationResponseNonNullableFields, type index_d_UpdatePreinstalledAutomationRequest as UpdatePreinstalledAutomationRequest, type index_d_UpdatePreinstalledAutomationResponse as UpdatePreinstalledAutomationResponse, type index_d_UpdatedWithPreviousEntity as UpdatedWithPreviousEntity, type index_d_UpgradeCTA as UpgradeCTA, type index_d_ValidateAutomationOptions as ValidateAutomationOptions, type index_d_ValidateAutomationRequest as ValidateAutomationRequest, type index_d_ValidateAutomationResponse as ValidateAutomationResponse, type index_d_ValidateAutomationResponseNonNullableFields as ValidateAutomationResponseNonNullableFields, index_d_ValidationErrorSeverity as ValidationErrorSeverity, index_d_ValidationErrorType as ValidationErrorType, type index_d_ValidationSettings as ValidationSettings, index_d_WebhookIdentityType as WebhookIdentityType, type index_d__publicOnAutomationCreatedType as _publicOnAutomationCreatedType, type index_d__publicOnAutomationDeletedType as _publicOnAutomationDeletedType, type index_d__publicOnAutomationDeletedWithEntityType as _publicOnAutomationDeletedWithEntityType, type index_d__publicOnAutomationUpdatedType as _publicOnAutomationUpdatedType, type index_d__publicOnAutomationUpdatedWithPreviousEntityType as _publicOnAutomationUpdatedWithPreviousEntityType, index_d_bulkDeleteAutomations as bulkDeleteAutomations, index_d_copyAutomation as copyAutomation, index_d_createAutomation as createAutomation, index_d_createDraftAutomation as createDraftAutomation, index_d_deleteAutomation as deleteAutomation, index_d_deleteDraftAutomation as deleteDraftAutomation, index_d_getActionsQuotaInfo as getActionsQuotaInfo, index_d_getAutomation as getAutomation, index_d_getAutomationActionSchema as getAutomationActionSchema, index_d_getOrCreateDraftAutomation as getOrCreateDraftAutomation, index_d_onAutomationCreated as onAutomationCreated, index_d_onAutomationDeleted as onAutomationDeleted, index_d_onAutomationDeletedWithEntity as onAutomationDeletedWithEntity, index_d_onAutomationUpdated as onAutomationUpdated, index_d_onAutomationUpdatedWithPreviousEntity as onAutomationUpdatedWithPreviousEntity, onAutomationCreated$1 as publicOnAutomationCreated, onAutomationDeleted$1 as publicOnAutomationDeleted, onAutomationDeletedWithEntity$1 as publicOnAutomationDeletedWithEntity, onAutomationUpdated$1 as publicOnAutomationUpdated, onAutomationUpdatedWithPreviousEntity$1 as publicOnAutomationUpdatedWithPreviousEntity, index_d_queryAutomations as queryAutomations, index_d_queryAutomationsWithDrafts as queryAutomationsWithDrafts, index_d_updateAutomation as updateAutomation, index_d_updateDraftAutomation as updateDraftAutomation, index_d_validateAutomation as validateAutomation };
|
|
6991
|
+
export { type index_d_Action as Action, type index_d_ActionConfigurationError as ActionConfigurationError, index_d_ActionErrorType as ActionErrorType, type index_d_ActionEvent as ActionEvent, type index_d_ActionInfoOneOf as ActionInfoOneOf, type index_d_ActionProviderQuotaInfo as ActionProviderQuotaInfo, type index_d_ActionQuotaInfo as ActionQuotaInfo, type index_d_ActionSettings as ActionSettings, type index_d_ActionValidationError as ActionValidationError, type index_d_ActionValidationErrorErrorOneOf as ActionValidationErrorErrorOneOf, type index_d_ActionValidationInfo as ActionValidationInfo, type index_d_AdditionalInfo as AdditionalInfo, type index_d_AppDefinedAction as AppDefinedAction, type index_d_ApplicationError as ApplicationError, type index_d_ApplicationOrigin as ApplicationOrigin, type index_d_Asset as Asset, type index_d_AuditInfo as AuditInfo, type index_d_AuditInfoIdOneOf as AuditInfoIdOneOf, type index_d_Automation as Automation, type index_d_AutomationConfiguration as AutomationConfiguration, type index_d_AutomationConfigurationError as AutomationConfigurationError, type index_d_AutomationCreatedEnvelope as AutomationCreatedEnvelope, type index_d_AutomationDeletedEnvelope as AutomationDeletedEnvelope, type index_d_AutomationDeletedWithEntityEnvelope as AutomationDeletedWithEntityEnvelope, index_d_AutomationErrorType as AutomationErrorType, type index_d_AutomationNonNullableFields as AutomationNonNullableFields, type index_d_AutomationOriginInfoOneOf as AutomationOriginInfoOneOf, type index_d_AutomationSettings as AutomationSettings, type index_d_AutomationUpdatedEnvelope as AutomationUpdatedEnvelope, type index_d_AutomationUpdatedWithPreviousEntityEnvelope as AutomationUpdatedWithPreviousEntityEnvelope, type index_d_AutomationValidationError as AutomationValidationError, type index_d_AutomationValidationErrorErrorOneOf as AutomationValidationErrorErrorOneOf, index_d_AutomationValidationErrorValidationErrorType as AutomationValidationErrorValidationErrorType, type index_d_AutomationsQueryBuilder as AutomationsQueryBuilder, type index_d_AutomationsQueryResult as AutomationsQueryResult, type index_d_BaseEventMetadata as BaseEventMetadata, type index_d_BulkActionMetadata as BulkActionMetadata, type index_d_BulkDeleteAutomationsRequest as BulkDeleteAutomationsRequest, type index_d_BulkDeleteAutomationsResponse as BulkDeleteAutomationsResponse, type index_d_BulkDeleteAutomationsResponseNonNullableFields as BulkDeleteAutomationsResponseNonNullableFields, type index_d_BulkDeleteResult as BulkDeleteResult, type index_d_CTA as CTA, type index_d_CommonCursorPaging as CommonCursorPaging, type index_d_CommonCursorPagingMetadata as CommonCursorPagingMetadata, type index_d_CommonCursorQuery as CommonCursorQuery, type index_d_CommonCursorQueryPagingMethodOneOf as CommonCursorQueryPagingMethodOneOf, type index_d_CommonCursors as CommonCursors, index_d_CommonSortOrder as CommonSortOrder, type index_d_CommonSorting as CommonSorting, type index_d_ConditionAction as ConditionAction, type index_d_ConditionExpressionGroup as ConditionExpressionGroup, type index_d_CopyAutomationOptions as CopyAutomationOptions, type index_d_CopyAutomationRequest as CopyAutomationRequest, type index_d_CopyAutomationResponse as CopyAutomationResponse, type index_d_CopyAutomationResponseNonNullableFields as CopyAutomationResponseNonNullableFields, type index_d_CreateAutomationRequest as CreateAutomationRequest, type index_d_CreateAutomationResponse as CreateAutomationResponse, type index_d_CreateAutomationResponseNonNullableFields as CreateAutomationResponseNonNullableFields, type index_d_CreateDraftAutomationOptions as CreateDraftAutomationOptions, type index_d_CreateDraftAutomationRequest as CreateDraftAutomationRequest, type index_d_CreateDraftAutomationResponse as CreateDraftAutomationResponse, type index_d_CreateDraftAutomationResponseNonNullableFields as CreateDraftAutomationResponseNonNullableFields, type index_d_CreatePreinstalledAutomationRequest as CreatePreinstalledAutomationRequest, type index_d_CreatePreinstalledAutomationResponse as CreatePreinstalledAutomationResponse, type index_d_CursorPaging as CursorPaging, type index_d_CursorPagingMetadata as CursorPagingMetadata, type index_d_CursorQuery as CursorQuery, type index_d_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, type index_d_Cursors as Cursors, type index_d_DelayAction as DelayAction, type index_d_DeleteAutomationRequest as DeleteAutomationRequest, type index_d_DeleteAutomationResponse as DeleteAutomationResponse, type index_d_DeleteContext as DeleteContext, type index_d_DeleteDraftAutomationRequest as DeleteDraftAutomationRequest, type index_d_DeleteDraftAutomationResponse as DeleteDraftAutomationResponse, type index_d_DeletePreinstalledAutomationRequest as DeletePreinstalledAutomationRequest, type index_d_DeletePreinstalledAutomationResponse as DeletePreinstalledAutomationResponse, index_d_DeleteStatus as DeleteStatus, type index_d_DeletedWithEntity as DeletedWithEntity, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_DraftInfo as DraftInfo, type index_d_DraftsInfo as DraftsInfo, type index_d_Empty as Empty, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_EventMetadata as EventMetadata, type index_d_Filter as Filter, type index_d_FutureDateActivationOffset as FutureDateActivationOffset, type index_d_GetActionsQuotaInfoRequest as GetActionsQuotaInfoRequest, type index_d_GetActionsQuotaInfoResponse as GetActionsQuotaInfoResponse, type index_d_GetActionsQuotaInfoResponseNonNullableFields as GetActionsQuotaInfoResponseNonNullableFields, type index_d_GetAutomationActionSchemaIdentifiers as GetAutomationActionSchemaIdentifiers, type index_d_GetAutomationActionSchemaRequest as GetAutomationActionSchemaRequest, type index_d_GetAutomationActionSchemaResponse as GetAutomationActionSchemaResponse, type index_d_GetAutomationOptions as GetAutomationOptions, type index_d_GetAutomationRequest as GetAutomationRequest, type index_d_GetAutomationResponse as GetAutomationResponse, type index_d_GetAutomationResponseNonNullableFields as GetAutomationResponseNonNullableFields, type index_d_GetAutomationRevisionRequest as GetAutomationRevisionRequest, type index_d_GetAutomationRevisionResponse as GetAutomationRevisionResponse, type index_d_GetOrCreateDraftAutomationRequest as GetOrCreateDraftAutomationRequest, type index_d_GetOrCreateDraftAutomationResponse as GetOrCreateDraftAutomationResponse, type index_d_GetOrCreateDraftAutomationResponseNonNullableFields as GetOrCreateDraftAutomationResponseNonNullableFields, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d_ItemMetadata as ItemMetadata, type index_d_MessageEnvelope as MessageEnvelope, type index_d_MetaSiteSpecialEvent as MetaSiteSpecialEvent, type index_d_MetaSiteSpecialEventPayloadOneOf as MetaSiteSpecialEventPayloadOneOf, index_d_Namespace as Namespace, type index_d_NamespaceChanged as NamespaceChanged, index_d_Operator as Operator, index_d_Origin as Origin, type index_d_OriginAutomationInfo as OriginAutomationInfo, type index_d_OutputAction as OutputAction, type index_d_Plan as Plan, type index_d_PreinstalledAutomationSpecInfo as PreinstalledAutomationSpecInfo, type index_d_PreinstalledOrigin as PreinstalledOrigin, type index_d_ProviderConfigurationError as ProviderConfigurationError, type index_d_PublishDraftAutomationRequest as PublishDraftAutomationRequest, type index_d_PublishDraftAutomationResponse as PublishDraftAutomationResponse, type index_d_QueryAutomationsRequest as QueryAutomationsRequest, type index_d_QueryAutomationsResponse as QueryAutomationsResponse, type index_d_QueryAutomationsResponseNonNullableFields as QueryAutomationsResponseNonNullableFields, type index_d_QueryAutomationsWithDraftsOptions as QueryAutomationsWithDraftsOptions, type index_d_QueryAutomationsWithDraftsRequest as QueryAutomationsWithDraftsRequest, type index_d_QueryAutomationsWithDraftsResponse as QueryAutomationsWithDraftsResponse, type index_d_QueryAutomationsWithDraftsResponseNonNullableFields as QueryAutomationsWithDraftsResponseNonNullableFields, type index_d_QueryPreinstalledAutomationsForAppRequest as QueryPreinstalledAutomationsForAppRequest, type index_d_QueryPreinstalledAutomationsForAppResponse as QueryPreinstalledAutomationsForAppResponse, type index_d_Quota as Quota, type index_d_QuotaInfo as QuotaInfo, type index_d_RateLimit as RateLimit, type index_d_RateLimitAction as RateLimitAction, type index_d_RestoreInfo as RestoreInfo, type index_d_ServiceProvisioned as ServiceProvisioned, type index_d_ServiceRemoved as ServiceRemoved, type index_d_SiteCreated as SiteCreated, index_d_SiteCreatedContext as SiteCreatedContext, type index_d_SiteDeleted as SiteDeleted, type index_d_SiteHardDeleted as SiteHardDeleted, type index_d_SiteMarkedAsTemplate as SiteMarkedAsTemplate, type index_d_SiteMarkedAsWixSite as SiteMarkedAsWixSite, type index_d_SitePublished as SitePublished, type index_d_SiteRenamed as SiteRenamed, type index_d_SiteTransferred as SiteTransferred, type index_d_SiteUndeleted as SiteUndeleted, type index_d_SiteUnpublished as SiteUnpublished, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, index_d_State as State, index_d_Status as Status, type index_d_StudioAssigned as StudioAssigned, type index_d_StudioUnassigned as StudioUnassigned, index_d_TimeUnit as TimeUnit, type index_d_Trigger as Trigger, type index_d_TriggerConfigurationError as TriggerConfigurationError, index_d_TriggerErrorType as TriggerErrorType, type index_d_TriggerValidationError as TriggerValidationError, type index_d_TriggerValidationErrorErrorOneOf as TriggerValidationErrorErrorOneOf, index_d_TriggerValidationErrorValidationErrorType as TriggerValidationErrorValidationErrorType, index_d_Type as Type, type index_d_UpdateAutomation as UpdateAutomation, type index_d_UpdateAutomationRequest as UpdateAutomationRequest, type index_d_UpdateAutomationResponse as UpdateAutomationResponse, type index_d_UpdateAutomationResponseNonNullableFields as UpdateAutomationResponseNonNullableFields, type index_d_UpdateDraftAutomation as UpdateDraftAutomation, type index_d_UpdateDraftAutomationRequest as UpdateDraftAutomationRequest, type index_d_UpdateDraftAutomationResponse as UpdateDraftAutomationResponse, type index_d_UpdateDraftAutomationResponseNonNullableFields as UpdateDraftAutomationResponseNonNullableFields, type index_d_UpdatePreinstalledAutomationRequest as UpdatePreinstalledAutomationRequest, type index_d_UpdatePreinstalledAutomationResponse as UpdatePreinstalledAutomationResponse, type index_d_UpdatedWithPreviousEntity as UpdatedWithPreviousEntity, type index_d_UpgradeCTA as UpgradeCTA, type index_d_ValidateAutomationOptions as ValidateAutomationOptions, type index_d_ValidateAutomationRequest as ValidateAutomationRequest, type index_d_ValidateAutomationResponse as ValidateAutomationResponse, type index_d_ValidateAutomationResponseNonNullableFields as ValidateAutomationResponseNonNullableFields, index_d_ValidationErrorSeverity as ValidationErrorSeverity, index_d_ValidationErrorType as ValidationErrorType, type index_d_ValidationSettings as ValidationSettings, index_d_WebhookIdentityType as WebhookIdentityType, type index_d__publicOnAutomationCreatedType as _publicOnAutomationCreatedType, type index_d__publicOnAutomationDeletedType as _publicOnAutomationDeletedType, type index_d__publicOnAutomationDeletedWithEntityType as _publicOnAutomationDeletedWithEntityType, type index_d__publicOnAutomationUpdatedType as _publicOnAutomationUpdatedType, type index_d__publicOnAutomationUpdatedWithPreviousEntityType as _publicOnAutomationUpdatedWithPreviousEntityType, index_d_bulkDeleteAutomations as bulkDeleteAutomations, index_d_copyAutomation as copyAutomation, index_d_createAutomation as createAutomation, index_d_createDraftAutomation as createDraftAutomation, index_d_deleteAutomation as deleteAutomation, index_d_deleteDraftAutomation as deleteDraftAutomation, index_d_getActionsQuotaInfo as getActionsQuotaInfo, index_d_getAutomation as getAutomation, index_d_getAutomationActionSchema as getAutomationActionSchema, index_d_getOrCreateDraftAutomation as getOrCreateDraftAutomation, index_d_onAutomationCreated as onAutomationCreated, index_d_onAutomationDeleted as onAutomationDeleted, index_d_onAutomationDeletedWithEntity as onAutomationDeletedWithEntity, index_d_onAutomationUpdated as onAutomationUpdated, index_d_onAutomationUpdatedWithPreviousEntity as onAutomationUpdatedWithPreviousEntity, onAutomationCreated$1 as publicOnAutomationCreated, onAutomationDeleted$1 as publicOnAutomationDeleted, onAutomationDeletedWithEntity$1 as publicOnAutomationDeletedWithEntity, onAutomationUpdated$1 as publicOnAutomationUpdated, onAutomationUpdatedWithPreviousEntity$1 as publicOnAutomationUpdatedWithPreviousEntity, index_d_queryAutomations as queryAutomations, index_d_queryAutomationsWithDrafts as queryAutomationsWithDrafts, index_d_updateAutomation as updateAutomation, index_d_updateDraftAutomation as updateDraftAutomation, index_d_validateAutomation as validateAutomation };
|
|
5704
6992
|
}
|
|
5705
6993
|
|
|
5706
6994
|
export { index_d$1 as activations, index_d$2 as automationsService, index_d as automationsServiceV2 };
|