@wix/motion 1.0.64 → 1.0.66
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/build/es/package.json +3 -0
- package/meta/package.json +1 -5
- package/package.json +26 -18
- package/context/package.json +0 -7
- package/type-bundles/context.bundle.d.ts +0 -1755
- package/type-bundles/index.bundle.d.ts +0 -1755
- package/type-bundles/meta.bundle.d.ts +0 -1066
|
@@ -1,1755 +0,0 @@
|
|
|
1
|
-
type HostModule<T, H extends Host> = {
|
|
2
|
-
__type: 'host';
|
|
3
|
-
create(host: H): T;
|
|
4
|
-
};
|
|
5
|
-
type HostModuleAPI<T extends HostModule<any, any>> = T extends HostModule<infer U, any> ? U : never;
|
|
6
|
-
type Host<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 name of the environment, use for logging
|
|
17
|
-
*/
|
|
18
|
-
name?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Optional bast url to use for API requests, for example `www.wixapis.com`
|
|
21
|
-
*/
|
|
22
|
-
apiBaseUrl?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Possible data to be provided by every host, for cross cutting concerns
|
|
25
|
-
* like internationalization, billing, etc.
|
|
26
|
-
*/
|
|
27
|
-
essentials?: {
|
|
28
|
-
/**
|
|
29
|
-
* The language of the currently viewed session
|
|
30
|
-
*/
|
|
31
|
-
language?: string;
|
|
32
|
-
/**
|
|
33
|
-
* The locale of the currently viewed session
|
|
34
|
-
*/
|
|
35
|
-
locale?: string;
|
|
36
|
-
/**
|
|
37
|
-
* Any headers that should be passed through to the API requests
|
|
38
|
-
*/
|
|
39
|
-
passThroughHeaders?: Record<string, string>;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
44
|
-
interface HttpClient {
|
|
45
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
46
|
-
fetchWithAuth: typeof fetch;
|
|
47
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
48
|
-
getActiveToken?: () => string | undefined;
|
|
49
|
-
}
|
|
50
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
51
|
-
type HttpResponse<T = any> = {
|
|
52
|
-
data: T;
|
|
53
|
-
status: number;
|
|
54
|
-
statusText: string;
|
|
55
|
-
headers: any;
|
|
56
|
-
request?: any;
|
|
57
|
-
};
|
|
58
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
59
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
60
|
-
url: string;
|
|
61
|
-
data?: Data;
|
|
62
|
-
params?: URLSearchParams;
|
|
63
|
-
} & APIMetadata;
|
|
64
|
-
type APIMetadata = {
|
|
65
|
-
methodFqn?: string;
|
|
66
|
-
entityFqdn?: string;
|
|
67
|
-
packageName?: string;
|
|
68
|
-
};
|
|
69
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
70
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
71
|
-
__type: 'event-definition';
|
|
72
|
-
type: Type;
|
|
73
|
-
isDomainEvent?: boolean;
|
|
74
|
-
transformations?: (envelope: unknown) => Payload;
|
|
75
|
-
__payload: Payload;
|
|
76
|
-
};
|
|
77
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
78
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
79
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
80
|
-
|
|
81
|
-
type ServicePluginMethodInput = {
|
|
82
|
-
request: any;
|
|
83
|
-
metadata: any;
|
|
84
|
-
};
|
|
85
|
-
type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
86
|
-
type ServicePluginMethodMetadata = {
|
|
87
|
-
name: string;
|
|
88
|
-
primaryHttpMappingPath: string;
|
|
89
|
-
transformations: {
|
|
90
|
-
fromREST: (...args: unknown[]) => ServicePluginMethodInput;
|
|
91
|
-
toREST: (...args: unknown[]) => unknown;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
95
|
-
__type: 'service-plugin-definition';
|
|
96
|
-
componentType: string;
|
|
97
|
-
methods: ServicePluginMethodMetadata[];
|
|
98
|
-
__contract: Contract;
|
|
99
|
-
};
|
|
100
|
-
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
101
|
-
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
102
|
-
declare const SERVICE_PLUGIN_ERROR_TYPE = "wix_spi_error";
|
|
103
|
-
|
|
104
|
-
type RequestContext = {
|
|
105
|
-
isSSR: boolean;
|
|
106
|
-
host: string;
|
|
107
|
-
protocol?: string;
|
|
108
|
-
};
|
|
109
|
-
type ResponseTransformer = (data: any, headers?: any) => any;
|
|
110
|
-
/**
|
|
111
|
-
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
112
|
-
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
113
|
-
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
114
|
-
*/
|
|
115
|
-
type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
116
|
-
type AmbassadorRequestOptions<T = any> = {
|
|
117
|
-
_?: T;
|
|
118
|
-
url?: string;
|
|
119
|
-
method?: Method;
|
|
120
|
-
params?: any;
|
|
121
|
-
data?: any;
|
|
122
|
-
transformResponse?: ResponseTransformer | ResponseTransformer[];
|
|
123
|
-
};
|
|
124
|
-
type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
|
|
125
|
-
__isAmbassador: boolean;
|
|
126
|
-
};
|
|
127
|
-
type AmbassadorFunctionDescriptor<Request = any, Response = any> = AmbassadorFactory<Request, Response>;
|
|
128
|
-
type BuildAmbassadorFunction<T extends AmbassadorFunctionDescriptor> = T extends AmbassadorFunctionDescriptor<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
129
|
-
|
|
130
|
-
declare global {
|
|
131
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
132
|
-
interface SymbolConstructor {
|
|
133
|
-
readonly observable: symbol;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
declare const emptyObjectSymbol: unique symbol;
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
Represents a strictly empty plain object, the `{}` value.
|
|
141
|
-
|
|
142
|
-
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)).
|
|
143
|
-
|
|
144
|
-
@example
|
|
145
|
-
```
|
|
146
|
-
import type {EmptyObject} from 'type-fest';
|
|
147
|
-
|
|
148
|
-
// The following illustrates the problem with `{}`.
|
|
149
|
-
const foo1: {} = {}; // Pass
|
|
150
|
-
const foo2: {} = []; // Pass
|
|
151
|
-
const foo3: {} = 42; // Pass
|
|
152
|
-
const foo4: {} = {a: 1}; // Pass
|
|
153
|
-
|
|
154
|
-
// With `EmptyObject` only the first case is valid.
|
|
155
|
-
const bar1: EmptyObject = {}; // Pass
|
|
156
|
-
const bar2: EmptyObject = 42; // Fail
|
|
157
|
-
const bar3: EmptyObject = []; // Fail
|
|
158
|
-
const bar4: EmptyObject = {a: 1}; // Fail
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
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}.
|
|
162
|
-
|
|
163
|
-
@category Object
|
|
164
|
-
*/
|
|
165
|
-
type EmptyObject = {[emptyObjectSymbol]?: never};
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
Returns a boolean for whether the two given types are equal.
|
|
169
|
-
|
|
170
|
-
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
171
|
-
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
172
|
-
|
|
173
|
-
Use-cases:
|
|
174
|
-
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
175
|
-
|
|
176
|
-
@example
|
|
177
|
-
```
|
|
178
|
-
import type {IsEqual} from 'type-fest';
|
|
179
|
-
|
|
180
|
-
// This type returns a boolean for whether the given array includes the given item.
|
|
181
|
-
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
182
|
-
type Includes<Value extends readonly any[], Item> =
|
|
183
|
-
Value extends readonly [Value[0], ...infer rest]
|
|
184
|
-
? IsEqual<Value[0], Item> extends true
|
|
185
|
-
? true
|
|
186
|
-
: Includes<rest, Item>
|
|
187
|
-
: false;
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
@category Type Guard
|
|
191
|
-
@category Utilities
|
|
192
|
-
*/
|
|
193
|
-
type IsEqual<A, B> =
|
|
194
|
-
(<G>() => G extends A ? 1 : 2) extends
|
|
195
|
-
(<G>() => G extends B ? 1 : 2)
|
|
196
|
-
? true
|
|
197
|
-
: false;
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
Filter out keys from an object.
|
|
201
|
-
|
|
202
|
-
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
203
|
-
Returns `never` if `Key` extends `Exclude`.
|
|
204
|
-
Returns `Key` otherwise.
|
|
205
|
-
|
|
206
|
-
@example
|
|
207
|
-
```
|
|
208
|
-
type Filtered = Filter<'foo', 'foo'>;
|
|
209
|
-
//=> never
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
@example
|
|
213
|
-
```
|
|
214
|
-
type Filtered = Filter<'bar', string>;
|
|
215
|
-
//=> never
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
@example
|
|
219
|
-
```
|
|
220
|
-
type Filtered = Filter<'bar', 'foo'>;
|
|
221
|
-
//=> 'bar'
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
@see {Except}
|
|
225
|
-
*/
|
|
226
|
-
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
227
|
-
|
|
228
|
-
type ExceptOptions = {
|
|
229
|
-
/**
|
|
230
|
-
Disallow assigning non-specified properties.
|
|
231
|
-
|
|
232
|
-
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
233
|
-
|
|
234
|
-
@default false
|
|
235
|
-
*/
|
|
236
|
-
requireExactProps?: boolean;
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
Create a type from an object type without certain keys.
|
|
241
|
-
|
|
242
|
-
We recommend setting the `requireExactProps` option to `true`.
|
|
243
|
-
|
|
244
|
-
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.
|
|
245
|
-
|
|
246
|
-
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)).
|
|
247
|
-
|
|
248
|
-
@example
|
|
249
|
-
```
|
|
250
|
-
import type {Except} from 'type-fest';
|
|
251
|
-
|
|
252
|
-
type Foo = {
|
|
253
|
-
a: number;
|
|
254
|
-
b: string;
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
type FooWithoutA = Except<Foo, 'a'>;
|
|
258
|
-
//=> {b: string}
|
|
259
|
-
|
|
260
|
-
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
261
|
-
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
262
|
-
|
|
263
|
-
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
264
|
-
//=> {a: number} & Partial<Record<"b", never>>
|
|
265
|
-
|
|
266
|
-
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
267
|
-
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
@category Object
|
|
271
|
-
*/
|
|
272
|
-
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
|
|
273
|
-
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
274
|
-
} & (Options['requireExactProps'] extends true
|
|
275
|
-
? Partial<Record<KeysType, never>>
|
|
276
|
-
: {});
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
Returns a boolean for whether the given type is `never`.
|
|
280
|
-
|
|
281
|
-
@link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
|
|
282
|
-
@link https://stackoverflow.com/a/53984913/10292952
|
|
283
|
-
@link https://www.zhenghao.io/posts/ts-never
|
|
284
|
-
|
|
285
|
-
Useful in type utilities, such as checking if something does not occur.
|
|
286
|
-
|
|
287
|
-
@example
|
|
288
|
-
```
|
|
289
|
-
import type {IsNever, And} from 'type-fest';
|
|
290
|
-
|
|
291
|
-
// https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
|
|
292
|
-
type AreStringsEqual<A extends string, B extends string> =
|
|
293
|
-
And<
|
|
294
|
-
IsNever<Exclude<A, B>> extends true ? true : false,
|
|
295
|
-
IsNever<Exclude<B, A>> extends true ? true : false
|
|
296
|
-
>;
|
|
297
|
-
|
|
298
|
-
type EndIfEqual<I extends string, O extends string> =
|
|
299
|
-
AreStringsEqual<I, O> extends true
|
|
300
|
-
? never
|
|
301
|
-
: void;
|
|
302
|
-
|
|
303
|
-
function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
|
|
304
|
-
if (input === output) {
|
|
305
|
-
process.exit(0);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
endIfEqual('abc', 'abc');
|
|
310
|
-
//=> never
|
|
311
|
-
|
|
312
|
-
endIfEqual('abc', '123');
|
|
313
|
-
//=> void
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
@category Type Guard
|
|
317
|
-
@category Utilities
|
|
318
|
-
*/
|
|
319
|
-
type IsNever<T> = [T] extends [never] ? true : false;
|
|
320
|
-
|
|
321
|
-
/**
|
|
322
|
-
An if-else-like type that resolves depending on whether the given type is `never`.
|
|
323
|
-
|
|
324
|
-
@see {@link IsNever}
|
|
325
|
-
|
|
326
|
-
@example
|
|
327
|
-
```
|
|
328
|
-
import type {IfNever} from 'type-fest';
|
|
329
|
-
|
|
330
|
-
type ShouldBeTrue = IfNever<never>;
|
|
331
|
-
//=> true
|
|
332
|
-
|
|
333
|
-
type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
|
|
334
|
-
//=> 'bar'
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
@category Type Guard
|
|
338
|
-
@category Utilities
|
|
339
|
-
*/
|
|
340
|
-
type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
|
|
341
|
-
IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
|
|
342
|
-
);
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
346
|
-
|
|
347
|
-
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
348
|
-
|
|
349
|
-
@example
|
|
350
|
-
```
|
|
351
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
352
|
-
|
|
353
|
-
interface Example {
|
|
354
|
-
a: string;
|
|
355
|
-
b: string | number;
|
|
356
|
-
c?: string;
|
|
357
|
-
d: {};
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
361
|
-
//=> 'a'
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
365
|
-
|
|
366
|
-
@example
|
|
367
|
-
```
|
|
368
|
-
import type {ConditionalKeys} from 'type-fest';
|
|
369
|
-
|
|
370
|
-
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
371
|
-
//=> 'a' | 'c'
|
|
372
|
-
```
|
|
373
|
-
|
|
374
|
-
@category Object
|
|
375
|
-
*/
|
|
376
|
-
type ConditionalKeys<Base, Condition> =
|
|
377
|
-
{
|
|
378
|
-
// Map through all the keys of the given base type.
|
|
379
|
-
[Key in keyof Base]-?:
|
|
380
|
-
// Pick only keys with types extending the given `Condition` type.
|
|
381
|
-
Base[Key] extends Condition
|
|
382
|
-
// Retain this key
|
|
383
|
-
// If the value for the key extends never, only include it if `Condition` also extends never
|
|
384
|
-
? IfNever<Base[Key], IfNever<Condition, Key, never>, Key>
|
|
385
|
-
// Discard this key since the condition fails.
|
|
386
|
-
: never;
|
|
387
|
-
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
388
|
-
}[keyof Base];
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
Exclude keys from a shape that matches the given `Condition`.
|
|
392
|
-
|
|
393
|
-
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.
|
|
394
|
-
|
|
395
|
-
@example
|
|
396
|
-
```
|
|
397
|
-
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
398
|
-
|
|
399
|
-
class Awesome {
|
|
400
|
-
name: string;
|
|
401
|
-
successes: number;
|
|
402
|
-
failures: bigint;
|
|
403
|
-
|
|
404
|
-
run() {}
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
|
|
408
|
-
//=> {run: () => void}
|
|
409
|
-
```
|
|
410
|
-
|
|
411
|
-
@example
|
|
412
|
-
```
|
|
413
|
-
import type {ConditionalExcept} from 'type-fest';
|
|
414
|
-
|
|
415
|
-
interface Example {
|
|
416
|
-
a: string;
|
|
417
|
-
b: string | number;
|
|
418
|
-
c: () => void;
|
|
419
|
-
d: {};
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
423
|
-
//=> {b: string | number; c: () => void; d: {}}
|
|
424
|
-
```
|
|
425
|
-
|
|
426
|
-
@category Object
|
|
427
|
-
*/
|
|
428
|
-
type ConditionalExcept<Base, Condition> = Except<
|
|
429
|
-
Base,
|
|
430
|
-
ConditionalKeys<Base, Condition>
|
|
431
|
-
>;
|
|
432
|
-
|
|
433
|
-
/**
|
|
434
|
-
* Descriptors are objects that describe the API of a module, and the module
|
|
435
|
-
* can either be a REST module or a host module.
|
|
436
|
-
* This type is recursive, so it can describe nested modules.
|
|
437
|
-
*/
|
|
438
|
-
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition<any> | ServicePluginDefinition<any> | {
|
|
439
|
-
[key: string]: Descriptors | PublicMetadata | any;
|
|
440
|
-
};
|
|
441
|
-
/**
|
|
442
|
-
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
443
|
-
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
444
|
-
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
445
|
-
* do not match the given host (as they will not work with the given host).
|
|
446
|
-
*/
|
|
447
|
-
type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, Depth extends number = 5> = {
|
|
448
|
-
done: T;
|
|
449
|
-
recurse: T extends {
|
|
450
|
-
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
451
|
-
} ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition<any> ? BuildEventDefinition<T> : T extends ServicePluginDefinition<any> ? BuildServicePluginDefinition<T> : T extends HostModule<any, any> ? HostModuleAPI<T> : ConditionalExcept<{
|
|
452
|
-
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
453
|
-
-1,
|
|
454
|
-
0,
|
|
455
|
-
1,
|
|
456
|
-
2,
|
|
457
|
-
3,
|
|
458
|
-
4,
|
|
459
|
-
5
|
|
460
|
-
][Depth]> : never;
|
|
461
|
-
}, EmptyObject>;
|
|
462
|
-
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
463
|
-
type PublicMetadata = {
|
|
464
|
-
PACKAGE_NAME?: string;
|
|
465
|
-
};
|
|
466
|
-
|
|
467
|
-
declare global {
|
|
468
|
-
interface ContextualClient {
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
/**
|
|
472
|
-
* A type used to create concerete types from SDK descriptors in
|
|
473
|
-
* case a contextual client is available.
|
|
474
|
-
*/
|
|
475
|
-
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
476
|
-
host: Host;
|
|
477
|
-
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
478
|
-
|
|
479
|
-
interface AlarmMessage {
|
|
480
|
-
_id?: string;
|
|
481
|
-
seconds?: number;
|
|
482
|
-
}
|
|
483
|
-
interface Dispatched$1 {
|
|
484
|
-
/** the message someone says */
|
|
485
|
-
echo?: EchoMessage$1;
|
|
486
|
-
}
|
|
487
|
-
interface EchoMessage$1 {
|
|
488
|
-
/** message comment from EchoMessage proto def, with special comment */
|
|
489
|
-
message?: string;
|
|
490
|
-
/** messages_list comment from EchoMessage proto def */
|
|
491
|
-
messagesList?: MessageItem$1[];
|
|
492
|
-
_id?: string;
|
|
493
|
-
}
|
|
494
|
-
interface MessageItem$1 {
|
|
495
|
-
/** inner_message comment from EchoMessage proto def */
|
|
496
|
-
innerMessage?: string;
|
|
497
|
-
}
|
|
498
|
-
interface AlarmTestRequest {
|
|
499
|
-
}
|
|
500
|
-
interface AlarmTestResponse {
|
|
501
|
-
}
|
|
502
|
-
interface AlarmRequest {
|
|
503
|
-
seconds: number;
|
|
504
|
-
someString?: string;
|
|
505
|
-
someOtherString?: string;
|
|
506
|
-
someOtherField?: string;
|
|
507
|
-
}
|
|
508
|
-
interface AlarmResponse {
|
|
509
|
-
time?: Date | null;
|
|
510
|
-
}
|
|
511
|
-
interface AlarmTriggered {
|
|
512
|
-
}
|
|
513
|
-
interface AlarmSnoozed {
|
|
514
|
-
}
|
|
515
|
-
interface AlarmDeleted {
|
|
516
|
-
}
|
|
517
|
-
interface UpdateAlarmRequest {
|
|
518
|
-
alarm: AlarmMessage;
|
|
519
|
-
}
|
|
520
|
-
interface UpdateAlarmResponse {
|
|
521
|
-
alarm?: AlarmMessage;
|
|
522
|
-
}
|
|
523
|
-
interface DomainEvent$1 extends DomainEventBodyOneOf$1 {
|
|
524
|
-
createdEvent?: EntityCreatedEvent$1;
|
|
525
|
-
updatedEvent?: EntityUpdatedEvent$1;
|
|
526
|
-
deletedEvent?: EntityDeletedEvent$1;
|
|
527
|
-
actionEvent?: ActionEvent$1;
|
|
528
|
-
/**
|
|
529
|
-
* Unique event ID.
|
|
530
|
-
* Allows clients to ignore duplicate webhooks.
|
|
531
|
-
*/
|
|
532
|
-
_id?: string;
|
|
533
|
-
/**
|
|
534
|
-
* Assumes actions are also always typed to an entity_type
|
|
535
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
536
|
-
*/
|
|
537
|
-
entityFqdn?: string;
|
|
538
|
-
/**
|
|
539
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
540
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
541
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
542
|
-
*/
|
|
543
|
-
slug?: string;
|
|
544
|
-
/** ID of the entity associated with the event. */
|
|
545
|
-
entityId?: string;
|
|
546
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
547
|
-
eventTime?: Date | null;
|
|
548
|
-
/**
|
|
549
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
550
|
-
* (for example, GDPR).
|
|
551
|
-
*/
|
|
552
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
553
|
-
/** If present, indicates the action that triggered the event. */
|
|
554
|
-
originatedFrom?: string | null;
|
|
555
|
-
/**
|
|
556
|
-
* A sequence number defining the order of updates to the underlying entity.
|
|
557
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
558
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
559
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
560
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
561
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
562
|
-
*/
|
|
563
|
-
entityEventSequence?: string | null;
|
|
564
|
-
}
|
|
565
|
-
/** @oneof */
|
|
566
|
-
interface DomainEventBodyOneOf$1 {
|
|
567
|
-
createdEvent?: EntityCreatedEvent$1;
|
|
568
|
-
updatedEvent?: EntityUpdatedEvent$1;
|
|
569
|
-
deletedEvent?: EntityDeletedEvent$1;
|
|
570
|
-
actionEvent?: ActionEvent$1;
|
|
571
|
-
}
|
|
572
|
-
interface EntityCreatedEvent$1 {
|
|
573
|
-
entity?: string;
|
|
574
|
-
}
|
|
575
|
-
interface RestoreInfo$1 {
|
|
576
|
-
deletedDate?: Date | null;
|
|
577
|
-
}
|
|
578
|
-
interface EntityUpdatedEvent$1 {
|
|
579
|
-
/**
|
|
580
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
581
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
582
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
583
|
-
*/
|
|
584
|
-
currentEntity?: string;
|
|
585
|
-
}
|
|
586
|
-
interface EntityDeletedEvent$1 {
|
|
587
|
-
/** Entity that was deleted */
|
|
588
|
-
deletedEntity?: string | null;
|
|
589
|
-
}
|
|
590
|
-
interface ActionEvent$1 {
|
|
591
|
-
body?: string;
|
|
592
|
-
}
|
|
593
|
-
interface MessageEnvelope$1 {
|
|
594
|
-
/** App instance ID. */
|
|
595
|
-
instanceId?: string | null;
|
|
596
|
-
/** Event type. */
|
|
597
|
-
eventType?: string;
|
|
598
|
-
/** The identification type and identity data. */
|
|
599
|
-
identity?: IdentificationData$1;
|
|
600
|
-
/** Stringify payload. */
|
|
601
|
-
data?: string;
|
|
602
|
-
}
|
|
603
|
-
interface IdentificationData$1 extends IdentificationDataIdOneOf$1 {
|
|
604
|
-
/** ID of a site visitor that has not logged in to the site. */
|
|
605
|
-
anonymousVisitorId?: string;
|
|
606
|
-
/** ID of a site visitor that has logged in to the site. */
|
|
607
|
-
memberId?: string;
|
|
608
|
-
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
609
|
-
wixUserId?: string;
|
|
610
|
-
/** ID of an app. */
|
|
611
|
-
appId?: string;
|
|
612
|
-
/** @readonly */
|
|
613
|
-
identityType?: WebhookIdentityType$1;
|
|
614
|
-
}
|
|
615
|
-
/** @oneof */
|
|
616
|
-
interface IdentificationDataIdOneOf$1 {
|
|
617
|
-
/** ID of a site visitor that has not logged in to the site. */
|
|
618
|
-
anonymousVisitorId?: string;
|
|
619
|
-
/** ID of a site visitor that has logged in to the site. */
|
|
620
|
-
memberId?: string;
|
|
621
|
-
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
622
|
-
wixUserId?: string;
|
|
623
|
-
/** ID of an app. */
|
|
624
|
-
appId?: string;
|
|
625
|
-
}
|
|
626
|
-
declare enum WebhookIdentityType$1 {
|
|
627
|
-
UNKNOWN = "UNKNOWN",
|
|
628
|
-
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
629
|
-
MEMBER = "MEMBER",
|
|
630
|
-
WIX_USER = "WIX_USER",
|
|
631
|
-
APP = "APP"
|
|
632
|
-
}
|
|
633
|
-
interface AlarmRequestRequiredFields {
|
|
634
|
-
seconds: number;
|
|
635
|
-
}
|
|
636
|
-
interface UpdateAlarmRequestRequiredFields {
|
|
637
|
-
alarm: {
|
|
638
|
-
_id: string;
|
|
639
|
-
};
|
|
640
|
-
}
|
|
641
|
-
interface AlarmMessageNonNullableFields {
|
|
642
|
-
_id: string;
|
|
643
|
-
seconds: number;
|
|
644
|
-
}
|
|
645
|
-
interface UpdateAlarmResponseNonNullableFields {
|
|
646
|
-
alarm?: AlarmMessageNonNullableFields;
|
|
647
|
-
}
|
|
648
|
-
interface BaseEventMetadata$1 {
|
|
649
|
-
/** App instance ID. */
|
|
650
|
-
instanceId?: string | null;
|
|
651
|
-
/** Event type. */
|
|
652
|
-
eventType?: string;
|
|
653
|
-
/** The identification type and identity data. */
|
|
654
|
-
identity?: IdentificationData$1;
|
|
655
|
-
}
|
|
656
|
-
interface EventMetadata$1 extends BaseEventMetadata$1 {
|
|
657
|
-
/**
|
|
658
|
-
* Unique event ID.
|
|
659
|
-
* Allows clients to ignore duplicate webhooks.
|
|
660
|
-
*/
|
|
661
|
-
_id?: string;
|
|
662
|
-
/**
|
|
663
|
-
* Assumes actions are also always typed to an entity_type
|
|
664
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
665
|
-
*/
|
|
666
|
-
entityFqdn?: string;
|
|
667
|
-
/**
|
|
668
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
669
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
670
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
671
|
-
*/
|
|
672
|
-
slug?: string;
|
|
673
|
-
/** ID of the entity associated with the event. */
|
|
674
|
-
entityId?: string;
|
|
675
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
676
|
-
eventTime?: Date | null;
|
|
677
|
-
/**
|
|
678
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
679
|
-
* (for example, GDPR).
|
|
680
|
-
*/
|
|
681
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
682
|
-
/** If present, indicates the action that triggered the event. */
|
|
683
|
-
originatedFrom?: string | null;
|
|
684
|
-
/**
|
|
685
|
-
* A sequence number defining the order of updates to the underlying entity.
|
|
686
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
687
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
688
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
689
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
690
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
691
|
-
*/
|
|
692
|
-
entityEventSequence?: string | null;
|
|
693
|
-
}
|
|
694
|
-
interface AlarmDeletedEnvelope {
|
|
695
|
-
data: AlarmDeleted;
|
|
696
|
-
metadata: EventMetadata$1;
|
|
697
|
-
}
|
|
698
|
-
interface AlarmSnoozedEnvelope {
|
|
699
|
-
data: AlarmSnoozed;
|
|
700
|
-
metadata: EventMetadata$1;
|
|
701
|
-
}
|
|
702
|
-
interface AlarmTriggeredEnvelope {
|
|
703
|
-
data: AlarmTriggered;
|
|
704
|
-
metadata: EventMetadata$1;
|
|
705
|
-
}
|
|
706
|
-
interface AlarmOptions {
|
|
707
|
-
someString?: string;
|
|
708
|
-
someOtherString?: string;
|
|
709
|
-
someOtherField?: string;
|
|
710
|
-
}
|
|
711
|
-
interface UpdateAlarm {
|
|
712
|
-
_id?: string;
|
|
713
|
-
seconds?: number;
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
declare function alarmTest$1(httpClient: HttpClient): AlarmTestSignature;
|
|
717
|
-
interface AlarmTestSignature {
|
|
718
|
-
/**
|
|
719
|
-
* Some description
|
|
720
|
-
*/
|
|
721
|
-
(): Promise<void>;
|
|
722
|
-
}
|
|
723
|
-
declare function alarm$1(httpClient: HttpClient): AlarmSignature;
|
|
724
|
-
interface AlarmSignature {
|
|
725
|
-
/**
|
|
726
|
-
* sets up an alarm after {seconds}
|
|
727
|
-
*/
|
|
728
|
-
(seconds: number, options?: AlarmOptions | undefined): Promise<AlarmResponse>;
|
|
729
|
-
}
|
|
730
|
-
declare function updateAlarm$1(httpClient: HttpClient): UpdateAlarmSignature;
|
|
731
|
-
interface UpdateAlarmSignature {
|
|
732
|
-
/**
|
|
733
|
-
* sets up an existing alarm with id {id}
|
|
734
|
-
*/
|
|
735
|
-
(_id: string, alarm: UpdateAlarm): Promise<UpdateAlarmResponse & UpdateAlarmResponseNonNullableFields>;
|
|
736
|
-
}
|
|
737
|
-
declare const onAlarmDeleted$1: EventDefinition<AlarmDeletedEnvelope, "wix.alarm.v1.alarm_alarm_deleted">;
|
|
738
|
-
declare const onAlarmSnoozed$1: EventDefinition<AlarmSnoozedEnvelope, "wix.alarm.v1.alarm_alarm_snoozed">;
|
|
739
|
-
declare const onAlarmTriggered$1: EventDefinition<AlarmTriggeredEnvelope, "wix.alarm.v1.alarm_alarm_triggered">;
|
|
740
|
-
|
|
741
|
-
declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
742
|
-
|
|
743
|
-
declare const alarmTest: MaybeContext<BuildRESTFunction<typeof alarmTest$1> & typeof alarmTest$1>;
|
|
744
|
-
declare const alarm: MaybeContext<BuildRESTFunction<typeof alarm$1> & typeof alarm$1>;
|
|
745
|
-
declare const updateAlarm: MaybeContext<BuildRESTFunction<typeof updateAlarm$1> & typeof updateAlarm$1>;
|
|
746
|
-
|
|
747
|
-
type _publicOnAlarmDeletedType = typeof onAlarmDeleted$1;
|
|
748
|
-
/**
|
|
749
|
-
* alarm event that might be consumed when alarm is deleted
|
|
750
|
-
*/
|
|
751
|
-
declare const onAlarmDeleted: ReturnType<typeof createEventModule$1<_publicOnAlarmDeletedType>>;
|
|
752
|
-
|
|
753
|
-
type _publicOnAlarmSnoozedType = typeof onAlarmSnoozed$1;
|
|
754
|
-
/**
|
|
755
|
-
* alarm event that might be consumed when alarm is snoozed
|
|
756
|
-
*/
|
|
757
|
-
declare const onAlarmSnoozed: ReturnType<typeof createEventModule$1<_publicOnAlarmSnoozedType>>;
|
|
758
|
-
|
|
759
|
-
type _publicOnAlarmTriggeredType = typeof onAlarmTriggered$1;
|
|
760
|
-
/**
|
|
761
|
-
* alarm event that might be consumed when alarm is triggered
|
|
762
|
-
*/
|
|
763
|
-
declare const onAlarmTriggered: ReturnType<typeof createEventModule$1<_publicOnAlarmTriggeredType>>;
|
|
764
|
-
|
|
765
|
-
type index_d$2_AlarmDeleted = AlarmDeleted;
|
|
766
|
-
type index_d$2_AlarmDeletedEnvelope = AlarmDeletedEnvelope;
|
|
767
|
-
type index_d$2_AlarmMessage = AlarmMessage;
|
|
768
|
-
type index_d$2_AlarmOptions = AlarmOptions;
|
|
769
|
-
type index_d$2_AlarmRequest = AlarmRequest;
|
|
770
|
-
type index_d$2_AlarmRequestRequiredFields = AlarmRequestRequiredFields;
|
|
771
|
-
type index_d$2_AlarmResponse = AlarmResponse;
|
|
772
|
-
type index_d$2_AlarmSnoozed = AlarmSnoozed;
|
|
773
|
-
type index_d$2_AlarmSnoozedEnvelope = AlarmSnoozedEnvelope;
|
|
774
|
-
type index_d$2_AlarmTestRequest = AlarmTestRequest;
|
|
775
|
-
type index_d$2_AlarmTestResponse = AlarmTestResponse;
|
|
776
|
-
type index_d$2_AlarmTriggered = AlarmTriggered;
|
|
777
|
-
type index_d$2_AlarmTriggeredEnvelope = AlarmTriggeredEnvelope;
|
|
778
|
-
type index_d$2_UpdateAlarm = UpdateAlarm;
|
|
779
|
-
type index_d$2_UpdateAlarmRequest = UpdateAlarmRequest;
|
|
780
|
-
type index_d$2_UpdateAlarmRequestRequiredFields = UpdateAlarmRequestRequiredFields;
|
|
781
|
-
type index_d$2_UpdateAlarmResponse = UpdateAlarmResponse;
|
|
782
|
-
type index_d$2_UpdateAlarmResponseNonNullableFields = UpdateAlarmResponseNonNullableFields;
|
|
783
|
-
type index_d$2__publicOnAlarmDeletedType = _publicOnAlarmDeletedType;
|
|
784
|
-
type index_d$2__publicOnAlarmSnoozedType = _publicOnAlarmSnoozedType;
|
|
785
|
-
type index_d$2__publicOnAlarmTriggeredType = _publicOnAlarmTriggeredType;
|
|
786
|
-
declare const index_d$2_alarm: typeof alarm;
|
|
787
|
-
declare const index_d$2_alarmTest: typeof alarmTest;
|
|
788
|
-
declare const index_d$2_onAlarmDeleted: typeof onAlarmDeleted;
|
|
789
|
-
declare const index_d$2_onAlarmSnoozed: typeof onAlarmSnoozed;
|
|
790
|
-
declare const index_d$2_onAlarmTriggered: typeof onAlarmTriggered;
|
|
791
|
-
declare const index_d$2_updateAlarm: typeof updateAlarm;
|
|
792
|
-
declare namespace index_d$2 {
|
|
793
|
-
export { type ActionEvent$1 as ActionEvent, type index_d$2_AlarmDeleted as AlarmDeleted, type index_d$2_AlarmDeletedEnvelope as AlarmDeletedEnvelope, type index_d$2_AlarmMessage as AlarmMessage, type index_d$2_AlarmOptions as AlarmOptions, type index_d$2_AlarmRequest as AlarmRequest, type index_d$2_AlarmRequestRequiredFields as AlarmRequestRequiredFields, type index_d$2_AlarmResponse as AlarmResponse, type index_d$2_AlarmSnoozed as AlarmSnoozed, type index_d$2_AlarmSnoozedEnvelope as AlarmSnoozedEnvelope, type index_d$2_AlarmTestRequest as AlarmTestRequest, type index_d$2_AlarmTestResponse as AlarmTestResponse, type index_d$2_AlarmTriggered as AlarmTriggered, type index_d$2_AlarmTriggeredEnvelope as AlarmTriggeredEnvelope, type BaseEventMetadata$1 as BaseEventMetadata, type Dispatched$1 as Dispatched, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type EchoMessage$1 as EchoMessage, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type EventMetadata$1 as EventMetadata, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type MessageEnvelope$1 as MessageEnvelope, type MessageItem$1 as MessageItem, type RestoreInfo$1 as RestoreInfo, type index_d$2_UpdateAlarm as UpdateAlarm, type index_d$2_UpdateAlarmRequest as UpdateAlarmRequest, type index_d$2_UpdateAlarmRequestRequiredFields as UpdateAlarmRequestRequiredFields, type index_d$2_UpdateAlarmResponse as UpdateAlarmResponse, type index_d$2_UpdateAlarmResponseNonNullableFields as UpdateAlarmResponseNonNullableFields, WebhookIdentityType$1 as WebhookIdentityType, type index_d$2__publicOnAlarmDeletedType as _publicOnAlarmDeletedType, type index_d$2__publicOnAlarmSnoozedType as _publicOnAlarmSnoozedType, type index_d$2__publicOnAlarmTriggeredType as _publicOnAlarmTriggeredType, index_d$2_alarm as alarm, index_d$2_alarmTest as alarmTest, index_d$2_onAlarmDeleted as onAlarmDeleted, index_d$2_onAlarmSnoozed as onAlarmSnoozed, index_d$2_onAlarmTriggered as onAlarmTriggered, onAlarmDeleted$1 as publicOnAlarmDeleted, onAlarmSnoozed$1 as publicOnAlarmSnoozed, onAlarmTriggered$1 as publicOnAlarmTriggered, index_d$2_updateAlarm as updateAlarm };
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
interface MessageItem {
|
|
797
|
-
/** inner_message comment from EchoMessage proto def */
|
|
798
|
-
innerMessage?: string;
|
|
799
|
-
}
|
|
800
|
-
interface EchoRequest {
|
|
801
|
-
/** 1st part of the message */
|
|
802
|
-
arg1: string;
|
|
803
|
-
/** 2nd part of the message */
|
|
804
|
-
arg2?: string;
|
|
805
|
-
/** this field test translatable annotation */
|
|
806
|
-
titleField?: string;
|
|
807
|
-
someInt32?: number;
|
|
808
|
-
someDate?: Date | null;
|
|
809
|
-
}
|
|
810
|
-
interface EchoResponse {
|
|
811
|
-
/** message result as EchoMessage */
|
|
812
|
-
echoMessage?: EchoMessage;
|
|
813
|
-
/** messge reseult as string */
|
|
814
|
-
message?: string;
|
|
815
|
-
}
|
|
816
|
-
interface Dispatched {
|
|
817
|
-
/** the message someone says */
|
|
818
|
-
echo?: EchoMessage;
|
|
819
|
-
}
|
|
820
|
-
interface DomainEvent extends DomainEventBodyOneOf {
|
|
821
|
-
createdEvent?: EntityCreatedEvent;
|
|
822
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
823
|
-
deletedEvent?: EntityDeletedEvent;
|
|
824
|
-
actionEvent?: ActionEvent;
|
|
825
|
-
/**
|
|
826
|
-
* Unique event ID.
|
|
827
|
-
* Allows clients to ignore duplicate webhooks.
|
|
828
|
-
*/
|
|
829
|
-
_id?: string;
|
|
830
|
-
/**
|
|
831
|
-
* Assumes actions are also always typed to an entity_type
|
|
832
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
833
|
-
*/
|
|
834
|
-
entityFqdn?: string;
|
|
835
|
-
/**
|
|
836
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
837
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
838
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
839
|
-
*/
|
|
840
|
-
slug?: string;
|
|
841
|
-
/** ID of the entity associated with the event. */
|
|
842
|
-
entityId?: string;
|
|
843
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
844
|
-
eventTime?: Date | null;
|
|
845
|
-
/**
|
|
846
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
847
|
-
* (for example, GDPR).
|
|
848
|
-
*/
|
|
849
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
850
|
-
/** If present, indicates the action that triggered the event. */
|
|
851
|
-
originatedFrom?: string | null;
|
|
852
|
-
/**
|
|
853
|
-
* A sequence number defining the order of updates to the underlying entity.
|
|
854
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
855
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
856
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
857
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
858
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
859
|
-
*/
|
|
860
|
-
entityEventSequence?: string | null;
|
|
861
|
-
}
|
|
862
|
-
/** @oneof */
|
|
863
|
-
interface DomainEventBodyOneOf {
|
|
864
|
-
createdEvent?: EntityCreatedEvent;
|
|
865
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
866
|
-
deletedEvent?: EntityDeletedEvent;
|
|
867
|
-
actionEvent?: ActionEvent;
|
|
868
|
-
}
|
|
869
|
-
interface EntityCreatedEvent {
|
|
870
|
-
entity?: string;
|
|
871
|
-
}
|
|
872
|
-
interface RestoreInfo {
|
|
873
|
-
deletedDate?: Date | null;
|
|
874
|
-
}
|
|
875
|
-
interface EntityUpdatedEvent {
|
|
876
|
-
/**
|
|
877
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
878
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
879
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
880
|
-
*/
|
|
881
|
-
currentEntity?: string;
|
|
882
|
-
}
|
|
883
|
-
interface EntityDeletedEvent {
|
|
884
|
-
/** Entity that was deleted */
|
|
885
|
-
deletedEntity?: string | null;
|
|
886
|
-
}
|
|
887
|
-
interface ActionEvent {
|
|
888
|
-
body?: string;
|
|
889
|
-
}
|
|
890
|
-
interface MessageEnvelope {
|
|
891
|
-
/** App instance ID. */
|
|
892
|
-
instanceId?: string | null;
|
|
893
|
-
/** Event type. */
|
|
894
|
-
eventType?: string;
|
|
895
|
-
/** The identification type and identity data. */
|
|
896
|
-
identity?: IdentificationData;
|
|
897
|
-
/** Stringify payload. */
|
|
898
|
-
data?: string;
|
|
899
|
-
}
|
|
900
|
-
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
901
|
-
/** ID of a site visitor that has not logged in to the site. */
|
|
902
|
-
anonymousVisitorId?: string;
|
|
903
|
-
/** ID of a site visitor that has logged in to the site. */
|
|
904
|
-
memberId?: string;
|
|
905
|
-
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
906
|
-
wixUserId?: string;
|
|
907
|
-
/** ID of an app. */
|
|
908
|
-
appId?: string;
|
|
909
|
-
/** @readonly */
|
|
910
|
-
identityType?: WebhookIdentityType;
|
|
911
|
-
}
|
|
912
|
-
/** @oneof */
|
|
913
|
-
interface IdentificationDataIdOneOf {
|
|
914
|
-
/** ID of a site visitor that has not logged in to the site. */
|
|
915
|
-
anonymousVisitorId?: string;
|
|
916
|
-
/** ID of a site visitor that has logged in to the site. */
|
|
917
|
-
memberId?: string;
|
|
918
|
-
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
919
|
-
wixUserId?: string;
|
|
920
|
-
/** ID of an app. */
|
|
921
|
-
appId?: string;
|
|
922
|
-
}
|
|
923
|
-
declare enum WebhookIdentityType {
|
|
924
|
-
UNKNOWN = "UNKNOWN",
|
|
925
|
-
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
926
|
-
MEMBER = "MEMBER",
|
|
927
|
-
WIX_USER = "WIX_USER",
|
|
928
|
-
APP = "APP"
|
|
929
|
-
}
|
|
930
|
-
interface EchoRequestRequiredFields {
|
|
931
|
-
arg1: string;
|
|
932
|
-
}
|
|
933
|
-
interface MessageItemNonNullableFields {
|
|
934
|
-
innerMessage: string;
|
|
935
|
-
}
|
|
936
|
-
interface EchoMessageNonNullableFields {
|
|
937
|
-
message: string;
|
|
938
|
-
messagesList: MessageItemNonNullableFields[];
|
|
939
|
-
_id: string;
|
|
940
|
-
}
|
|
941
|
-
interface EchoResponseNonNullableFields {
|
|
942
|
-
echoMessage?: EchoMessageNonNullableFields;
|
|
943
|
-
message: string;
|
|
944
|
-
}
|
|
945
|
-
interface EchoMessage {
|
|
946
|
-
veloMessage: string;
|
|
947
|
-
id: string;
|
|
948
|
-
}
|
|
949
|
-
interface BaseEventMetadata {
|
|
950
|
-
/** App instance ID. */
|
|
951
|
-
instanceId?: string | null;
|
|
952
|
-
/** Event type. */
|
|
953
|
-
eventType?: string;
|
|
954
|
-
/** The identification type and identity data. */
|
|
955
|
-
identity?: IdentificationData;
|
|
956
|
-
}
|
|
957
|
-
interface EventMetadata extends BaseEventMetadata {
|
|
958
|
-
/**
|
|
959
|
-
* Unique event ID.
|
|
960
|
-
* Allows clients to ignore duplicate webhooks.
|
|
961
|
-
*/
|
|
962
|
-
_id?: string;
|
|
963
|
-
/**
|
|
964
|
-
* Assumes actions are also always typed to an entity_type
|
|
965
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
966
|
-
*/
|
|
967
|
-
entityFqdn?: string;
|
|
968
|
-
/**
|
|
969
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
970
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
971
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
|
972
|
-
*/
|
|
973
|
-
slug?: string;
|
|
974
|
-
/** ID of the entity associated with the event. */
|
|
975
|
-
entityId?: string;
|
|
976
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
977
|
-
eventTime?: Date | null;
|
|
978
|
-
/**
|
|
979
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
980
|
-
* (for example, GDPR).
|
|
981
|
-
*/
|
|
982
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
983
|
-
/** If present, indicates the action that triggered the event. */
|
|
984
|
-
originatedFrom?: string | null;
|
|
985
|
-
/**
|
|
986
|
-
* A sequence number defining the order of updates to the underlying entity.
|
|
987
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
988
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
989
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
990
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
991
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
992
|
-
*/
|
|
993
|
-
entityEventSequence?: string | null;
|
|
994
|
-
}
|
|
995
|
-
interface EchoDispatchedEnvelope {
|
|
996
|
-
data: Dispatched;
|
|
997
|
-
metadata: EventMetadata;
|
|
998
|
-
}
|
|
999
|
-
interface EchoOptions {
|
|
1000
|
-
/** 2nd part of the message */
|
|
1001
|
-
arg2?: string;
|
|
1002
|
-
/** this field test translatable annotation */
|
|
1003
|
-
titleField?: string;
|
|
1004
|
-
someInt32?: number;
|
|
1005
|
-
someDate?: Date | null;
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
declare function echo$1(httpClient: HttpClient): EchoSignature;
|
|
1009
|
-
interface EchoSignature {
|
|
1010
|
-
/**
|
|
1011
|
-
* echo given arg1 and arg2
|
|
1012
|
-
* @param - 1st part of the message
|
|
1013
|
-
* @param - modified comment for arg2 el hovav
|
|
1014
|
-
* @returns messge reseult as string
|
|
1015
|
-
*/
|
|
1016
|
-
(arg1: string, options?: EchoOptions | undefined): Promise<string>;
|
|
1017
|
-
}
|
|
1018
|
-
declare const onEchoDispatched$1: EventDefinition<EchoDispatchedEnvelope, "wix.metroinspector.v1.echo_dispatched">;
|
|
1019
|
-
|
|
1020
|
-
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
1021
|
-
|
|
1022
|
-
declare const echo: MaybeContext<BuildRESTFunction<typeof echo$1> & typeof echo$1>;
|
|
1023
|
-
|
|
1024
|
-
type _publicOnEchoDispatchedType = typeof onEchoDispatched$1;
|
|
1025
|
-
/**
|
|
1026
|
-
* echo event that might be consumed when somone says something!
|
|
1027
|
-
*/
|
|
1028
|
-
declare const onEchoDispatched: ReturnType<typeof createEventModule<_publicOnEchoDispatchedType>>;
|
|
1029
|
-
|
|
1030
|
-
type index_d$1_ActionEvent = ActionEvent;
|
|
1031
|
-
type index_d$1_BaseEventMetadata = BaseEventMetadata;
|
|
1032
|
-
type index_d$1_Dispatched = Dispatched;
|
|
1033
|
-
type index_d$1_DomainEvent = DomainEvent;
|
|
1034
|
-
type index_d$1_DomainEventBodyOneOf = DomainEventBodyOneOf;
|
|
1035
|
-
type index_d$1_EchoDispatchedEnvelope = EchoDispatchedEnvelope;
|
|
1036
|
-
type index_d$1_EchoMessage = EchoMessage;
|
|
1037
|
-
type index_d$1_EchoOptions = EchoOptions;
|
|
1038
|
-
type index_d$1_EchoRequest = EchoRequest;
|
|
1039
|
-
type index_d$1_EchoRequestRequiredFields = EchoRequestRequiredFields;
|
|
1040
|
-
type index_d$1_EchoResponse = EchoResponse;
|
|
1041
|
-
type index_d$1_EchoResponseNonNullableFields = EchoResponseNonNullableFields;
|
|
1042
|
-
type index_d$1_EntityCreatedEvent = EntityCreatedEvent;
|
|
1043
|
-
type index_d$1_EntityDeletedEvent = EntityDeletedEvent;
|
|
1044
|
-
type index_d$1_EntityUpdatedEvent = EntityUpdatedEvent;
|
|
1045
|
-
type index_d$1_EventMetadata = EventMetadata;
|
|
1046
|
-
type index_d$1_IdentificationData = IdentificationData;
|
|
1047
|
-
type index_d$1_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
|
|
1048
|
-
type index_d$1_MessageEnvelope = MessageEnvelope;
|
|
1049
|
-
type index_d$1_MessageItem = MessageItem;
|
|
1050
|
-
type index_d$1_RestoreInfo = RestoreInfo;
|
|
1051
|
-
type index_d$1_WebhookIdentityType = WebhookIdentityType;
|
|
1052
|
-
declare const index_d$1_WebhookIdentityType: typeof WebhookIdentityType;
|
|
1053
|
-
type index_d$1__publicOnEchoDispatchedType = _publicOnEchoDispatchedType;
|
|
1054
|
-
declare const index_d$1_echo: typeof echo;
|
|
1055
|
-
declare const index_d$1_onEchoDispatched: typeof onEchoDispatched;
|
|
1056
|
-
declare namespace index_d$1 {
|
|
1057
|
-
export { type index_d$1_ActionEvent as ActionEvent, type index_d$1_BaseEventMetadata as BaseEventMetadata, type index_d$1_Dispatched as Dispatched, type index_d$1_DomainEvent as DomainEvent, type index_d$1_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d$1_EchoDispatchedEnvelope as EchoDispatchedEnvelope, type index_d$1_EchoMessage as EchoMessage, type index_d$1_EchoOptions as EchoOptions, type index_d$1_EchoRequest as EchoRequest, type index_d$1_EchoRequestRequiredFields as EchoRequestRequiredFields, type index_d$1_EchoResponse as EchoResponse, type index_d$1_EchoResponseNonNullableFields as EchoResponseNonNullableFields, type index_d$1_EntityCreatedEvent as EntityCreatedEvent, type index_d$1_EntityDeletedEvent as EntityDeletedEvent, type index_d$1_EntityUpdatedEvent as EntityUpdatedEvent, type index_d$1_EventMetadata as EventMetadata, type index_d$1_IdentificationData as IdentificationData, type index_d$1_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d$1_MessageEnvelope as MessageEnvelope, type index_d$1_MessageItem as MessageItem, type index_d$1_RestoreInfo as RestoreInfo, index_d$1_WebhookIdentityType as WebhookIdentityType, type index_d$1__publicOnEchoDispatchedType as _publicOnEchoDispatchedType, index_d$1_echo as echo, index_d$1_onEchoDispatched as onEchoDispatched, onEchoDispatched$1 as publicOnEchoDispatched };
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
|
-
interface FocalPoint {
|
|
1061
|
-
/** X-coordinate of the focal point. */
|
|
1062
|
-
x?: number;
|
|
1063
|
-
/** Y-coordinate of the focal point. */
|
|
1064
|
-
y?: number;
|
|
1065
|
-
/** crop by height */
|
|
1066
|
-
height?: number | null;
|
|
1067
|
-
/** crop by width */
|
|
1068
|
-
width?: number | null;
|
|
1069
|
-
}
|
|
1070
|
-
/** Physical address */
|
|
1071
|
-
interface Address extends AddressStreetOneOf {
|
|
1072
|
-
/** Street name and number. */
|
|
1073
|
-
streetAddress?: StreetAddress;
|
|
1074
|
-
/** Main address line, usually street and number as free text. */
|
|
1075
|
-
addressLine1?: string | null;
|
|
1076
|
-
/** Country code. */
|
|
1077
|
-
country?: string | null;
|
|
1078
|
-
/** Subdivision shorthand. Usually, a short code (2 or 3 letters) that represents a state, region, prefecture, or province. e.g. NY */
|
|
1079
|
-
subdivision?: string | null;
|
|
1080
|
-
/** City name. */
|
|
1081
|
-
city?: string | null;
|
|
1082
|
-
/** Zip/postal code. */
|
|
1083
|
-
postalCode?: string | null;
|
|
1084
|
-
/** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
|
|
1085
|
-
addressLine2?: string | null;
|
|
1086
|
-
}
|
|
1087
|
-
/** @oneof */
|
|
1088
|
-
interface AddressStreetOneOf {
|
|
1089
|
-
/** Street name and number. */
|
|
1090
|
-
streetAddress?: StreetAddress;
|
|
1091
|
-
/** Main address line, usually street and number as free text. */
|
|
1092
|
-
addressLine?: string | null;
|
|
1093
|
-
}
|
|
1094
|
-
interface StreetAddress {
|
|
1095
|
-
/** Street number. */
|
|
1096
|
-
number?: string;
|
|
1097
|
-
/** Street name. */
|
|
1098
|
-
name?: string;
|
|
1099
|
-
}
|
|
1100
|
-
interface AddressLocation {
|
|
1101
|
-
/** Address latitude. */
|
|
1102
|
-
latitude?: number | null;
|
|
1103
|
-
/** Address longitude. */
|
|
1104
|
-
longitude?: number | null;
|
|
1105
|
-
}
|
|
1106
|
-
interface Subdivision {
|
|
1107
|
-
/** Short subdivision code. */
|
|
1108
|
-
code?: string;
|
|
1109
|
-
/** Subdivision full name. */
|
|
1110
|
-
name?: string;
|
|
1111
|
-
}
|
|
1112
|
-
declare enum SubdivisionType {
|
|
1113
|
-
UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
|
|
1114
|
-
/** State */
|
|
1115
|
-
ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
|
|
1116
|
-
/** County */
|
|
1117
|
-
ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
|
|
1118
|
-
/** City/town */
|
|
1119
|
-
ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
|
|
1120
|
-
/** Neighborhood/quarter */
|
|
1121
|
-
ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
|
|
1122
|
-
/** Street/block */
|
|
1123
|
-
ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
|
|
1124
|
-
/** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
|
|
1125
|
-
COUNTRY = "COUNTRY"
|
|
1126
|
-
}
|
|
1127
|
-
/** Subdivision Concordance values */
|
|
1128
|
-
interface StandardDetails {
|
|
1129
|
-
/** subdivision iso-3166-2 code according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). e.g. US-NY, GB-SCT, NO-30 */
|
|
1130
|
-
iso31662?: string | null;
|
|
1131
|
-
}
|
|
1132
|
-
interface VideoResolution {
|
|
1133
|
-
/** Video URL. */
|
|
1134
|
-
url?: string;
|
|
1135
|
-
/** Video height. */
|
|
1136
|
-
height?: number;
|
|
1137
|
-
/** Video width. */
|
|
1138
|
-
width?: number;
|
|
1139
|
-
/** Video format for example, mp4, hls. */
|
|
1140
|
-
format?: string;
|
|
1141
|
-
}
|
|
1142
|
-
interface PageLink {
|
|
1143
|
-
/** The page id we want from the site */
|
|
1144
|
-
pageId?: string;
|
|
1145
|
-
/** Where this link should open, supports _self and _blank or any name the user chooses. _self means same page, _blank means new page. */
|
|
1146
|
-
target?: string | null;
|
|
1147
|
-
/** rel of link */
|
|
1148
|
-
rel?: LinkRel[];
|
|
1149
|
-
}
|
|
1150
|
-
/**
|
|
1151
|
-
* The 'rel' attribute of the link. The rel attribute defines the relationship between a linked resource and the current document.
|
|
1152
|
-
* Further reading (also about different possible rel types): https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel
|
|
1153
|
-
* Following are the accepted 'rel' types by Wix applications.
|
|
1154
|
-
*/
|
|
1155
|
-
declare enum LinkRel {
|
|
1156
|
-
/** default (not implemented) */
|
|
1157
|
-
unknown_link_rel = "unknown_link_rel",
|
|
1158
|
-
/** Indicates that the current document's original author or publisher does not endorse the referenced document. */
|
|
1159
|
-
nofollow = "nofollow",
|
|
1160
|
-
/** Instructs the browser to navigate to the target resource without granting the new browsing context access to the document that opened it. */
|
|
1161
|
-
noopener = "noopener",
|
|
1162
|
-
/** No Referer header will be included. Additionally, has the same effect as noopener. */
|
|
1163
|
-
noreferrer = "noreferrer",
|
|
1164
|
-
/** Indicates a link that resulted from advertisements or paid placements. */
|
|
1165
|
-
sponsored = "sponsored"
|
|
1166
|
-
}
|
|
1167
|
-
interface Variant {
|
|
1168
|
-
name?: string;
|
|
1169
|
-
value?: string;
|
|
1170
|
-
image?: string;
|
|
1171
|
-
}
|
|
1172
|
-
interface MyAddress {
|
|
1173
|
-
country?: string | null;
|
|
1174
|
-
subdivision?: string | null;
|
|
1175
|
-
city?: string | null;
|
|
1176
|
-
postalCode?: string | null;
|
|
1177
|
-
streetAddress?: StreetAddress;
|
|
1178
|
-
}
|
|
1179
|
-
interface CreateProductRequest {
|
|
1180
|
-
product?: Product;
|
|
1181
|
-
}
|
|
1182
|
-
interface CreateProductResponse {
|
|
1183
|
-
product?: Product;
|
|
1184
|
-
}
|
|
1185
|
-
interface DeleteProductRequest {
|
|
1186
|
-
productId: string;
|
|
1187
|
-
}
|
|
1188
|
-
interface DeleteProductResponse {
|
|
1189
|
-
}
|
|
1190
|
-
interface UpdateProductRequest {
|
|
1191
|
-
productId: string;
|
|
1192
|
-
product?: Product;
|
|
1193
|
-
}
|
|
1194
|
-
interface UpdateProductResponse {
|
|
1195
|
-
product?: Product;
|
|
1196
|
-
}
|
|
1197
|
-
interface GetProductRequest {
|
|
1198
|
-
productId: string;
|
|
1199
|
-
}
|
|
1200
|
-
interface GetProductResponse {
|
|
1201
|
-
product?: Product;
|
|
1202
|
-
}
|
|
1203
|
-
interface GetProductsStartWithRequest {
|
|
1204
|
-
title: string;
|
|
1205
|
-
addressLine2?: string | null;
|
|
1206
|
-
}
|
|
1207
|
-
interface GetProductsStartWithResponse {
|
|
1208
|
-
products?: Product[];
|
|
1209
|
-
}
|
|
1210
|
-
interface QueryProductsRequest {
|
|
1211
|
-
query?: QueryV2;
|
|
1212
|
-
/** Whether variants should be included in the response. */
|
|
1213
|
-
includeVariants?: boolean;
|
|
1214
|
-
/** Whether hidden products should be included in the response. Requires permissions to manage products. */
|
|
1215
|
-
includeHiddenProducts?: boolean;
|
|
1216
|
-
/** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
|
|
1217
|
-
includeMerchantSpecificData?: boolean;
|
|
1218
|
-
}
|
|
1219
|
-
interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
1220
|
-
/** Paging options to limit and skip the number of items. */
|
|
1221
|
-
paging?: Paging;
|
|
1222
|
-
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
1223
|
-
cursorPaging?: CursorPaging;
|
|
1224
|
-
/**
|
|
1225
|
-
* Filter object.
|
|
1226
|
-
*
|
|
1227
|
-
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
1228
|
-
*/
|
|
1229
|
-
filter?: Record<string, any> | null;
|
|
1230
|
-
/**
|
|
1231
|
-
* Sort object.
|
|
1232
|
-
*
|
|
1233
|
-
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
1234
|
-
*/
|
|
1235
|
-
sort?: Sorting[];
|
|
1236
|
-
/** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
1237
|
-
fields?: string[];
|
|
1238
|
-
/** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
1239
|
-
fieldsets?: string[];
|
|
1240
|
-
}
|
|
1241
|
-
/** @oneof */
|
|
1242
|
-
interface QueryV2PagingMethodOneOf {
|
|
1243
|
-
/** Paging options to limit and skip the number of items. */
|
|
1244
|
-
paging?: Paging;
|
|
1245
|
-
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
1246
|
-
cursorPaging?: CursorPaging;
|
|
1247
|
-
}
|
|
1248
|
-
interface Sorting {
|
|
1249
|
-
/** Name of the field to sort by. */
|
|
1250
|
-
fieldName?: string;
|
|
1251
|
-
/** Sort order. */
|
|
1252
|
-
order?: SortOrder;
|
|
1253
|
-
}
|
|
1254
|
-
declare enum SortOrder {
|
|
1255
|
-
ASC = "ASC",
|
|
1256
|
-
DESC = "DESC"
|
|
1257
|
-
}
|
|
1258
|
-
interface Paging {
|
|
1259
|
-
/** Number of items to load. */
|
|
1260
|
-
limit?: number | null;
|
|
1261
|
-
/** Number of items to skip in the current sort order. */
|
|
1262
|
-
offset?: number | null;
|
|
1263
|
-
}
|
|
1264
|
-
interface CursorPaging {
|
|
1265
|
-
/** Maximum number of items to return in the results. */
|
|
1266
|
-
limit?: number | null;
|
|
1267
|
-
/**
|
|
1268
|
-
* Pointer to the next or previous page in the list of results.
|
|
1269
|
-
*
|
|
1270
|
-
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1271
|
-
* Not relevant for the first request.
|
|
1272
|
-
*/
|
|
1273
|
-
cursor?: string | null;
|
|
1274
|
-
}
|
|
1275
|
-
interface QueryProductsResponse {
|
|
1276
|
-
products?: Product[];
|
|
1277
|
-
metadata?: PagingMetadataV2;
|
|
1278
|
-
}
|
|
1279
|
-
interface PagingMetadataV2 {
|
|
1280
|
-
/** Number of items returned in the response. */
|
|
1281
|
-
count?: number | null;
|
|
1282
|
-
/** Offset that was requested. */
|
|
1283
|
-
offset?: number | null;
|
|
1284
|
-
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
1285
|
-
total?: number | null;
|
|
1286
|
-
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
1287
|
-
tooManyToCount?: boolean | null;
|
|
1288
|
-
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
1289
|
-
cursors?: Cursors;
|
|
1290
|
-
}
|
|
1291
|
-
interface Cursors {
|
|
1292
|
-
/** Cursor string pointing to the next page in the list of results. */
|
|
1293
|
-
next?: string | null;
|
|
1294
|
-
/** Cursor pointing to the previous page in the list of results. */
|
|
1295
|
-
prev?: string | null;
|
|
1296
|
-
}
|
|
1297
|
-
interface BulkCreateProductsRequest {
|
|
1298
|
-
products: Product[];
|
|
1299
|
-
/** set to `true` if you wish to receive back the created products in the response */
|
|
1300
|
-
returnEntity?: boolean;
|
|
1301
|
-
}
|
|
1302
|
-
interface BulkCreateProductsResponse {
|
|
1303
|
-
results?: BulkProductResult[];
|
|
1304
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1305
|
-
}
|
|
1306
|
-
interface ItemMetadata {
|
|
1307
|
-
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
1308
|
-
_id?: string | null;
|
|
1309
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
1310
|
-
originalIndex?: number;
|
|
1311
|
-
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
1312
|
-
success?: boolean;
|
|
1313
|
-
/** Details about the error in case of failure. */
|
|
1314
|
-
error?: ApplicationError;
|
|
1315
|
-
}
|
|
1316
|
-
interface ApplicationError {
|
|
1317
|
-
/** Error code. */
|
|
1318
|
-
code?: string;
|
|
1319
|
-
/** Description of the error. */
|
|
1320
|
-
description?: string;
|
|
1321
|
-
/** Data related to the error. */
|
|
1322
|
-
data?: Record<string, any> | null;
|
|
1323
|
-
}
|
|
1324
|
-
interface BulkProductResult {
|
|
1325
|
-
/** Defined in wix.commons */
|
|
1326
|
-
itemMetadata?: ItemMetadata;
|
|
1327
|
-
/** Only exists if `returnEntity` was set to true in the request */
|
|
1328
|
-
item?: Product;
|
|
1329
|
-
}
|
|
1330
|
-
interface BulkActionMetadata {
|
|
1331
|
-
/** Number of items that were successfully processed. */
|
|
1332
|
-
totalSuccesses?: number;
|
|
1333
|
-
/** Number of items that couldn't be processed. */
|
|
1334
|
-
totalFailures?: number;
|
|
1335
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
1336
|
-
undetailedFailures?: number;
|
|
1337
|
-
}
|
|
1338
|
-
interface BulkUpdateProductsRequest {
|
|
1339
|
-
products: MaskedProduct[];
|
|
1340
|
-
/** set to `true` if you wish to receive back the updated products in the response */
|
|
1341
|
-
returnEntity?: boolean;
|
|
1342
|
-
}
|
|
1343
|
-
interface MaskedProduct {
|
|
1344
|
-
/** Product to be updated, may be partial */
|
|
1345
|
-
product?: Product;
|
|
1346
|
-
}
|
|
1347
|
-
interface BulkUpdateProductsResponse {
|
|
1348
|
-
results?: BulkUpdateProductsResponseBulkProductResult[];
|
|
1349
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1350
|
-
}
|
|
1351
|
-
interface BulkUpdateProductsResponseBulkProductResult {
|
|
1352
|
-
itemMetadata?: ItemMetadata;
|
|
1353
|
-
/** Only exists if `returnEntity` was set to true in the request */
|
|
1354
|
-
item?: Product;
|
|
1355
|
-
}
|
|
1356
|
-
interface BulkDeleteProductsRequest {
|
|
1357
|
-
productIds: string[];
|
|
1358
|
-
}
|
|
1359
|
-
interface BulkDeleteProductsResponse {
|
|
1360
|
-
results?: BulkDeleteProductsResponseBulkProductResult[];
|
|
1361
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1362
|
-
}
|
|
1363
|
-
interface BulkDeleteProductsResponseBulkProductResult {
|
|
1364
|
-
itemMetadata?: ItemMetadata;
|
|
1365
|
-
}
|
|
1366
|
-
interface ResetProductsDbRequest {
|
|
1367
|
-
}
|
|
1368
|
-
interface ResetProductsDbResponse {
|
|
1369
|
-
}
|
|
1370
|
-
interface CreateProductRequestRequiredFields {
|
|
1371
|
-
product?: {
|
|
1372
|
-
title: string;
|
|
1373
|
-
};
|
|
1374
|
-
}
|
|
1375
|
-
interface StreetAddressNonNullableFields {
|
|
1376
|
-
number: string;
|
|
1377
|
-
name: string;
|
|
1378
|
-
apt: string;
|
|
1379
|
-
}
|
|
1380
|
-
interface AddressNonNullableFields {
|
|
1381
|
-
streetAddress?: StreetAddressNonNullableFields;
|
|
1382
|
-
}
|
|
1383
|
-
interface PageLinkNonNullableFields {
|
|
1384
|
-
pageId: string;
|
|
1385
|
-
rel: LinkRel[];
|
|
1386
|
-
}
|
|
1387
|
-
interface VariantNonNullableFields {
|
|
1388
|
-
name: string;
|
|
1389
|
-
value: string;
|
|
1390
|
-
image: string;
|
|
1391
|
-
}
|
|
1392
|
-
interface MyAddressNonNullableFields {
|
|
1393
|
-
streetAddress?: StreetAddressNonNullableFields;
|
|
1394
|
-
}
|
|
1395
|
-
interface ProductNonNullableFields {
|
|
1396
|
-
_id: string;
|
|
1397
|
-
collectionId: string;
|
|
1398
|
-
image: string;
|
|
1399
|
-
address?: AddressNonNullableFields;
|
|
1400
|
-
document: string;
|
|
1401
|
-
video: string;
|
|
1402
|
-
pageLink?: PageLinkNonNullableFields;
|
|
1403
|
-
audio: string;
|
|
1404
|
-
variants: VariantNonNullableFields[];
|
|
1405
|
-
mainVariant?: VariantNonNullableFields;
|
|
1406
|
-
customAddress?: MyAddressNonNullableFields;
|
|
1407
|
-
guid: string;
|
|
1408
|
-
}
|
|
1409
|
-
interface CreateProductResponseNonNullableFields {
|
|
1410
|
-
product?: ProductNonNullableFields;
|
|
1411
|
-
}
|
|
1412
|
-
interface DeleteProductRequestRequiredFields {
|
|
1413
|
-
productId: string;
|
|
1414
|
-
}
|
|
1415
|
-
interface UpdateProductRequestRequiredFields {
|
|
1416
|
-
product?: {
|
|
1417
|
-
_id: string;
|
|
1418
|
-
};
|
|
1419
|
-
productId: string;
|
|
1420
|
-
}
|
|
1421
|
-
interface UpdateProductResponseNonNullableFields {
|
|
1422
|
-
product?: ProductNonNullableFields;
|
|
1423
|
-
}
|
|
1424
|
-
interface GetProductRequestRequiredFields {
|
|
1425
|
-
productId: string;
|
|
1426
|
-
}
|
|
1427
|
-
interface GetProductResponseNonNullableFields {
|
|
1428
|
-
product?: ProductNonNullableFields;
|
|
1429
|
-
}
|
|
1430
|
-
interface GetProductsStartWithRequestRequiredFields {
|
|
1431
|
-
title: string;
|
|
1432
|
-
}
|
|
1433
|
-
interface GetProductsStartWithResponseNonNullableFields {
|
|
1434
|
-
products: ProductNonNullableFields[];
|
|
1435
|
-
}
|
|
1436
|
-
interface QueryProductsResponseNonNullableFields {
|
|
1437
|
-
products: ProductNonNullableFields[];
|
|
1438
|
-
}
|
|
1439
|
-
interface BulkCreateProductsRequestRequiredFields {
|
|
1440
|
-
products: Product[];
|
|
1441
|
-
}
|
|
1442
|
-
interface ApplicationErrorNonNullableFields {
|
|
1443
|
-
code: string;
|
|
1444
|
-
description: string;
|
|
1445
|
-
}
|
|
1446
|
-
interface ItemMetadataNonNullableFields {
|
|
1447
|
-
originalIndex: number;
|
|
1448
|
-
success: boolean;
|
|
1449
|
-
error?: ApplicationErrorNonNullableFields;
|
|
1450
|
-
}
|
|
1451
|
-
interface BulkProductResultNonNullableFields {
|
|
1452
|
-
itemMetadata?: ItemMetadataNonNullableFields;
|
|
1453
|
-
item?: ProductNonNullableFields;
|
|
1454
|
-
}
|
|
1455
|
-
interface BulkActionMetadataNonNullableFields {
|
|
1456
|
-
totalSuccesses: number;
|
|
1457
|
-
totalFailures: number;
|
|
1458
|
-
undetailedFailures: number;
|
|
1459
|
-
}
|
|
1460
|
-
interface BulkCreateProductsResponseNonNullableFields {
|
|
1461
|
-
results: BulkProductResultNonNullableFields[];
|
|
1462
|
-
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
|
|
1463
|
-
}
|
|
1464
|
-
interface BulkUpdateProductsRequestRequiredFields {
|
|
1465
|
-
products: MaskedProduct[];
|
|
1466
|
-
}
|
|
1467
|
-
interface BulkUpdateProductsResponseBulkProductResultNonNullableFields {
|
|
1468
|
-
itemMetadata?: ItemMetadataNonNullableFields;
|
|
1469
|
-
item?: ProductNonNullableFields;
|
|
1470
|
-
}
|
|
1471
|
-
interface BulkUpdateProductsResponseNonNullableFields {
|
|
1472
|
-
results: BulkUpdateProductsResponseBulkProductResultNonNullableFields[];
|
|
1473
|
-
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
|
|
1474
|
-
}
|
|
1475
|
-
interface BulkDeleteProductsRequestRequiredFields {
|
|
1476
|
-
productIds: string[];
|
|
1477
|
-
}
|
|
1478
|
-
interface BulkDeleteProductsResponseBulkProductResultNonNullableFields {
|
|
1479
|
-
itemMetadata?: ItemMetadataNonNullableFields;
|
|
1480
|
-
}
|
|
1481
|
-
interface BulkDeleteProductsResponseNonNullableFields {
|
|
1482
|
-
results: BulkDeleteProductsResponseBulkProductResultNonNullableFields[];
|
|
1483
|
-
bulkActionMetadata?: BulkActionMetadataNonNullableFields;
|
|
1484
|
-
}
|
|
1485
|
-
interface Product {
|
|
1486
|
-
_id: string;
|
|
1487
|
-
name: string | null;
|
|
1488
|
-
collectionId: string;
|
|
1489
|
-
_createdDate: Date | null;
|
|
1490
|
-
modifiedDate: Date | null;
|
|
1491
|
-
image: string;
|
|
1492
|
-
address: Address;
|
|
1493
|
-
document: string;
|
|
1494
|
-
video: string;
|
|
1495
|
-
pageLink: PageLink;
|
|
1496
|
-
audio: string;
|
|
1497
|
-
color: string | null;
|
|
1498
|
-
localDate: string | null;
|
|
1499
|
-
localTime: string | null;
|
|
1500
|
-
localDateTime: string | null;
|
|
1501
|
-
variants: Variant[];
|
|
1502
|
-
mainVariant: Variant;
|
|
1503
|
-
customAddress: MyAddress;
|
|
1504
|
-
guid: string;
|
|
1505
|
-
}
|
|
1506
|
-
interface CreateProductOptionsRequiredFields {
|
|
1507
|
-
product?: {
|
|
1508
|
-
title: unknown;
|
|
1509
|
-
};
|
|
1510
|
-
}
|
|
1511
|
-
interface CreateProductOptions {
|
|
1512
|
-
product?: Product;
|
|
1513
|
-
}
|
|
1514
|
-
interface UpdateProductOptionsRequiredFields {
|
|
1515
|
-
product?: {
|
|
1516
|
-
_id: string;
|
|
1517
|
-
};
|
|
1518
|
-
}
|
|
1519
|
-
interface UpdateProductOptions {
|
|
1520
|
-
product?: Product;
|
|
1521
|
-
}
|
|
1522
|
-
interface GetProductsStartWithOptions {
|
|
1523
|
-
addressLine2?: string | null;
|
|
1524
|
-
}
|
|
1525
|
-
interface QueryProductsOptions {
|
|
1526
|
-
/** Whether variants should be included in the response. */
|
|
1527
|
-
includeVariants?: boolean | undefined;
|
|
1528
|
-
/** Whether hidden products should be included in the response. Requires permissions to manage products. */
|
|
1529
|
-
includeHiddenProducts?: boolean | undefined;
|
|
1530
|
-
/** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
|
|
1531
|
-
includeMerchantSpecificData?: boolean | undefined;
|
|
1532
|
-
}
|
|
1533
|
-
interface QueryCursorResult {
|
|
1534
|
-
cursors: Cursors;
|
|
1535
|
-
hasNext: () => boolean;
|
|
1536
|
-
hasPrev: () => boolean;
|
|
1537
|
-
length: number;
|
|
1538
|
-
pageSize: number;
|
|
1539
|
-
}
|
|
1540
|
-
interface ProductsQueryResult extends QueryCursorResult {
|
|
1541
|
-
items: Product[];
|
|
1542
|
-
query: ProductsQueryBuilder;
|
|
1543
|
-
next: () => Promise<ProductsQueryResult>;
|
|
1544
|
-
prev: () => Promise<ProductsQueryResult>;
|
|
1545
|
-
}
|
|
1546
|
-
interface ProductsQueryBuilder {
|
|
1547
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
1548
|
-
* @param value - Value to compare against.
|
|
1549
|
-
* @documentationMaturity preview
|
|
1550
|
-
*/
|
|
1551
|
-
eq: (propertyName: 'title' | 'collectionId' | 'guid', value: any) => ProductsQueryBuilder;
|
|
1552
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
1553
|
-
* @param value - Value to compare against.
|
|
1554
|
-
* @documentationMaturity preview
|
|
1555
|
-
*/
|
|
1556
|
-
ne: (propertyName: 'title' | 'guid', value: any) => ProductsQueryBuilder;
|
|
1557
|
-
/** @param propertyName - Property whose value is compared with `string`.
|
|
1558
|
-
* @param string - String to compare against. Case-insensitive.
|
|
1559
|
-
* @documentationMaturity preview
|
|
1560
|
-
*/
|
|
1561
|
-
startsWith: (propertyName: 'title' | 'guid', value: string) => ProductsQueryBuilder;
|
|
1562
|
-
/** @param propertyName - Property whose value is compared with `values`.
|
|
1563
|
-
* @param values - List of values to compare against.
|
|
1564
|
-
* @documentationMaturity preview
|
|
1565
|
-
*/
|
|
1566
|
-
hasSome: (propertyName: 'title' | 'guid', value: any[]) => ProductsQueryBuilder;
|
|
1567
|
-
/** @documentationMaturity preview */
|
|
1568
|
-
in: (propertyName: 'title' | 'guid', value: any) => ProductsQueryBuilder;
|
|
1569
|
-
/** @documentationMaturity preview */
|
|
1570
|
-
exists: (propertyName: 'title' | 'guid', value: boolean) => ProductsQueryBuilder;
|
|
1571
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1572
|
-
* @documentationMaturity preview
|
|
1573
|
-
*/
|
|
1574
|
-
ascending: (...propertyNames: Array<'title' | 'collectionId' | 'guid'>) => ProductsQueryBuilder;
|
|
1575
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
1576
|
-
* @documentationMaturity preview
|
|
1577
|
-
*/
|
|
1578
|
-
descending: (...propertyNames: Array<'title' | 'collectionId' | 'guid'>) => ProductsQueryBuilder;
|
|
1579
|
-
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
1580
|
-
* @documentationMaturity preview
|
|
1581
|
-
*/
|
|
1582
|
-
limit: (limit: number) => ProductsQueryBuilder;
|
|
1583
|
-
/** @param cursor - A pointer to specific record
|
|
1584
|
-
* @documentationMaturity preview
|
|
1585
|
-
*/
|
|
1586
|
-
skipTo: (cursor: string) => ProductsQueryBuilder;
|
|
1587
|
-
/** @documentationMaturity preview */
|
|
1588
|
-
find: () => Promise<ProductsQueryResult>;
|
|
1589
|
-
}
|
|
1590
|
-
interface BulkCreateProductsOptions {
|
|
1591
|
-
/** set to `true` if you wish to receive back the created products in the response */
|
|
1592
|
-
returnEntity?: boolean;
|
|
1593
|
-
}
|
|
1594
|
-
interface BulkUpdateProductsOptions {
|
|
1595
|
-
/** set to `true` if you wish to receive back the updated products in the response */
|
|
1596
|
-
returnEntity?: boolean;
|
|
1597
|
-
}
|
|
1598
|
-
|
|
1599
|
-
declare function createProduct$1(httpClient: HttpClient): CreateProductSignature;
|
|
1600
|
-
interface CreateProductSignature {
|
|
1601
|
-
/**
|
|
1602
|
-
* Creating a product
|
|
1603
|
-
*/
|
|
1604
|
-
(options?: (CreateProductOptions & CreateProductOptionsRequiredFields) | undefined): Promise<Product & ProductNonNullableFields>;
|
|
1605
|
-
}
|
|
1606
|
-
declare function deleteProduct$1(httpClient: HttpClient): DeleteProductSignature;
|
|
1607
|
-
interface DeleteProductSignature {
|
|
1608
|
-
/** */
|
|
1609
|
-
(productId: string): Promise<void>;
|
|
1610
|
-
}
|
|
1611
|
-
declare function updateProduct$1(httpClient: HttpClient): UpdateProductSignature;
|
|
1612
|
-
interface UpdateProductSignature {
|
|
1613
|
-
/** */
|
|
1614
|
-
(productId: string, options?: (UpdateProductOptions & UpdateProductOptionsRequiredFields) | undefined): Promise<Product & ProductNonNullableFields>;
|
|
1615
|
-
}
|
|
1616
|
-
declare function getProduct$1(httpClient: HttpClient): GetProductSignature;
|
|
1617
|
-
interface GetProductSignature {
|
|
1618
|
-
/** */
|
|
1619
|
-
(productId: string): Promise<Product & ProductNonNullableFields>;
|
|
1620
|
-
}
|
|
1621
|
-
declare function getProductsStartWith$1(httpClient: HttpClient): GetProductsStartWithSignature;
|
|
1622
|
-
interface GetProductsStartWithSignature {
|
|
1623
|
-
/** */
|
|
1624
|
-
(title: string, options?: GetProductsStartWithOptions | undefined): Promise<GetProductsStartWithResponse & GetProductsStartWithResponseNonNullableFields>;
|
|
1625
|
-
}
|
|
1626
|
-
declare function queryProducts$1(httpClient: HttpClient): QueryProductsSignature;
|
|
1627
|
-
interface QueryProductsSignature {
|
|
1628
|
-
/** */
|
|
1629
|
-
(options?: QueryProductsOptions | undefined): ProductsQueryBuilder;
|
|
1630
|
-
}
|
|
1631
|
-
declare function bulkCreateProducts$1(httpClient: HttpClient): BulkCreateProductsSignature;
|
|
1632
|
-
interface BulkCreateProductsSignature {
|
|
1633
|
-
/**
|
|
1634
|
-
* create multiple products in a single request. Works synchronously
|
|
1635
|
-
*/
|
|
1636
|
-
(products: Product[], options?: BulkCreateProductsOptions | undefined): Promise<BulkCreateProductsResponse & BulkCreateProductsResponseNonNullableFields>;
|
|
1637
|
-
}
|
|
1638
|
-
declare function bulkUpdateProducts$1(httpClient: HttpClient): BulkUpdateProductsSignature;
|
|
1639
|
-
interface BulkUpdateProductsSignature {
|
|
1640
|
-
/**
|
|
1641
|
-
* update multiple products in a single request. Works synchronously.
|
|
1642
|
-
*/
|
|
1643
|
-
(products: MaskedProduct[], options?: BulkUpdateProductsOptions | undefined): Promise<BulkUpdateProductsResponse & BulkUpdateProductsResponseNonNullableFields>;
|
|
1644
|
-
}
|
|
1645
|
-
declare function bulkDeleteProducts$1(httpClient: HttpClient): BulkDeleteProductsSignature;
|
|
1646
|
-
interface BulkDeleteProductsSignature {
|
|
1647
|
-
/**
|
|
1648
|
-
* deletes multiple products in a single request. Works synchronously.
|
|
1649
|
-
*/
|
|
1650
|
-
(productIds: string[]): Promise<BulkDeleteProductsResponse & BulkDeleteProductsResponseNonNullableFields>;
|
|
1651
|
-
}
|
|
1652
|
-
|
|
1653
|
-
declare const createProduct: MaybeContext<BuildRESTFunction<typeof createProduct$1> & typeof createProduct$1>;
|
|
1654
|
-
declare const deleteProduct: MaybeContext<BuildRESTFunction<typeof deleteProduct$1> & typeof deleteProduct$1>;
|
|
1655
|
-
declare const updateProduct: MaybeContext<BuildRESTFunction<typeof updateProduct$1> & typeof updateProduct$1>;
|
|
1656
|
-
declare const getProduct: MaybeContext<BuildRESTFunction<typeof getProduct$1> & typeof getProduct$1>;
|
|
1657
|
-
declare const getProductsStartWith: MaybeContext<BuildRESTFunction<typeof getProductsStartWith$1> & typeof getProductsStartWith$1>;
|
|
1658
|
-
declare const queryProducts: MaybeContext<BuildRESTFunction<typeof queryProducts$1> & typeof queryProducts$1>;
|
|
1659
|
-
declare const bulkCreateProducts: MaybeContext<BuildRESTFunction<typeof bulkCreateProducts$1> & typeof bulkCreateProducts$1>;
|
|
1660
|
-
declare const bulkUpdateProducts: MaybeContext<BuildRESTFunction<typeof bulkUpdateProducts$1> & typeof bulkUpdateProducts$1>;
|
|
1661
|
-
declare const bulkDeleteProducts: MaybeContext<BuildRESTFunction<typeof bulkDeleteProducts$1> & typeof bulkDeleteProducts$1>;
|
|
1662
|
-
|
|
1663
|
-
type index_d_Address = Address;
|
|
1664
|
-
type index_d_AddressLocation = AddressLocation;
|
|
1665
|
-
type index_d_AddressStreetOneOf = AddressStreetOneOf;
|
|
1666
|
-
type index_d_ApplicationError = ApplicationError;
|
|
1667
|
-
type index_d_BulkActionMetadata = BulkActionMetadata;
|
|
1668
|
-
type index_d_BulkCreateProductsOptions = BulkCreateProductsOptions;
|
|
1669
|
-
type index_d_BulkCreateProductsRequest = BulkCreateProductsRequest;
|
|
1670
|
-
type index_d_BulkCreateProductsRequestRequiredFields = BulkCreateProductsRequestRequiredFields;
|
|
1671
|
-
type index_d_BulkCreateProductsResponse = BulkCreateProductsResponse;
|
|
1672
|
-
type index_d_BulkCreateProductsResponseNonNullableFields = BulkCreateProductsResponseNonNullableFields;
|
|
1673
|
-
type index_d_BulkDeleteProductsRequest = BulkDeleteProductsRequest;
|
|
1674
|
-
type index_d_BulkDeleteProductsRequestRequiredFields = BulkDeleteProductsRequestRequiredFields;
|
|
1675
|
-
type index_d_BulkDeleteProductsResponse = BulkDeleteProductsResponse;
|
|
1676
|
-
type index_d_BulkDeleteProductsResponseBulkProductResult = BulkDeleteProductsResponseBulkProductResult;
|
|
1677
|
-
type index_d_BulkDeleteProductsResponseNonNullableFields = BulkDeleteProductsResponseNonNullableFields;
|
|
1678
|
-
type index_d_BulkProductResult = BulkProductResult;
|
|
1679
|
-
type index_d_BulkUpdateProductsOptions = BulkUpdateProductsOptions;
|
|
1680
|
-
type index_d_BulkUpdateProductsRequest = BulkUpdateProductsRequest;
|
|
1681
|
-
type index_d_BulkUpdateProductsRequestRequiredFields = BulkUpdateProductsRequestRequiredFields;
|
|
1682
|
-
type index_d_BulkUpdateProductsResponse = BulkUpdateProductsResponse;
|
|
1683
|
-
type index_d_BulkUpdateProductsResponseBulkProductResult = BulkUpdateProductsResponseBulkProductResult;
|
|
1684
|
-
type index_d_BulkUpdateProductsResponseNonNullableFields = BulkUpdateProductsResponseNonNullableFields;
|
|
1685
|
-
type index_d_CreateProductOptions = CreateProductOptions;
|
|
1686
|
-
type index_d_CreateProductOptionsRequiredFields = CreateProductOptionsRequiredFields;
|
|
1687
|
-
type index_d_CreateProductRequest = CreateProductRequest;
|
|
1688
|
-
type index_d_CreateProductRequestRequiredFields = CreateProductRequestRequiredFields;
|
|
1689
|
-
type index_d_CreateProductResponse = CreateProductResponse;
|
|
1690
|
-
type index_d_CreateProductResponseNonNullableFields = CreateProductResponseNonNullableFields;
|
|
1691
|
-
type index_d_CursorPaging = CursorPaging;
|
|
1692
|
-
type index_d_Cursors = Cursors;
|
|
1693
|
-
type index_d_DeleteProductRequest = DeleteProductRequest;
|
|
1694
|
-
type index_d_DeleteProductRequestRequiredFields = DeleteProductRequestRequiredFields;
|
|
1695
|
-
type index_d_DeleteProductResponse = DeleteProductResponse;
|
|
1696
|
-
type index_d_FocalPoint = FocalPoint;
|
|
1697
|
-
type index_d_GetProductRequest = GetProductRequest;
|
|
1698
|
-
type index_d_GetProductRequestRequiredFields = GetProductRequestRequiredFields;
|
|
1699
|
-
type index_d_GetProductResponse = GetProductResponse;
|
|
1700
|
-
type index_d_GetProductResponseNonNullableFields = GetProductResponseNonNullableFields;
|
|
1701
|
-
type index_d_GetProductsStartWithOptions = GetProductsStartWithOptions;
|
|
1702
|
-
type index_d_GetProductsStartWithRequest = GetProductsStartWithRequest;
|
|
1703
|
-
type index_d_GetProductsStartWithRequestRequiredFields = GetProductsStartWithRequestRequiredFields;
|
|
1704
|
-
type index_d_GetProductsStartWithResponse = GetProductsStartWithResponse;
|
|
1705
|
-
type index_d_GetProductsStartWithResponseNonNullableFields = GetProductsStartWithResponseNonNullableFields;
|
|
1706
|
-
type index_d_ItemMetadata = ItemMetadata;
|
|
1707
|
-
type index_d_LinkRel = LinkRel;
|
|
1708
|
-
declare const index_d_LinkRel: typeof LinkRel;
|
|
1709
|
-
type index_d_MaskedProduct = MaskedProduct;
|
|
1710
|
-
type index_d_MyAddress = MyAddress;
|
|
1711
|
-
type index_d_PageLink = PageLink;
|
|
1712
|
-
type index_d_Paging = Paging;
|
|
1713
|
-
type index_d_PagingMetadataV2 = PagingMetadataV2;
|
|
1714
|
-
type index_d_Product = Product;
|
|
1715
|
-
type index_d_ProductNonNullableFields = ProductNonNullableFields;
|
|
1716
|
-
type index_d_ProductsQueryBuilder = ProductsQueryBuilder;
|
|
1717
|
-
type index_d_ProductsQueryResult = ProductsQueryResult;
|
|
1718
|
-
type index_d_QueryProductsOptions = QueryProductsOptions;
|
|
1719
|
-
type index_d_QueryProductsRequest = QueryProductsRequest;
|
|
1720
|
-
type index_d_QueryProductsResponse = QueryProductsResponse;
|
|
1721
|
-
type index_d_QueryProductsResponseNonNullableFields = QueryProductsResponseNonNullableFields;
|
|
1722
|
-
type index_d_QueryV2 = QueryV2;
|
|
1723
|
-
type index_d_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf;
|
|
1724
|
-
type index_d_ResetProductsDbRequest = ResetProductsDbRequest;
|
|
1725
|
-
type index_d_ResetProductsDbResponse = ResetProductsDbResponse;
|
|
1726
|
-
type index_d_SortOrder = SortOrder;
|
|
1727
|
-
declare const index_d_SortOrder: typeof SortOrder;
|
|
1728
|
-
type index_d_Sorting = Sorting;
|
|
1729
|
-
type index_d_StandardDetails = StandardDetails;
|
|
1730
|
-
type index_d_StreetAddress = StreetAddress;
|
|
1731
|
-
type index_d_Subdivision = Subdivision;
|
|
1732
|
-
type index_d_SubdivisionType = SubdivisionType;
|
|
1733
|
-
declare const index_d_SubdivisionType: typeof SubdivisionType;
|
|
1734
|
-
type index_d_UpdateProductOptions = UpdateProductOptions;
|
|
1735
|
-
type index_d_UpdateProductOptionsRequiredFields = UpdateProductOptionsRequiredFields;
|
|
1736
|
-
type index_d_UpdateProductRequest = UpdateProductRequest;
|
|
1737
|
-
type index_d_UpdateProductRequestRequiredFields = UpdateProductRequestRequiredFields;
|
|
1738
|
-
type index_d_UpdateProductResponse = UpdateProductResponse;
|
|
1739
|
-
type index_d_UpdateProductResponseNonNullableFields = UpdateProductResponseNonNullableFields;
|
|
1740
|
-
type index_d_Variant = Variant;
|
|
1741
|
-
type index_d_VideoResolution = VideoResolution;
|
|
1742
|
-
declare const index_d_bulkCreateProducts: typeof bulkCreateProducts;
|
|
1743
|
-
declare const index_d_bulkDeleteProducts: typeof bulkDeleteProducts;
|
|
1744
|
-
declare const index_d_bulkUpdateProducts: typeof bulkUpdateProducts;
|
|
1745
|
-
declare const index_d_createProduct: typeof createProduct;
|
|
1746
|
-
declare const index_d_deleteProduct: typeof deleteProduct;
|
|
1747
|
-
declare const index_d_getProduct: typeof getProduct;
|
|
1748
|
-
declare const index_d_getProductsStartWith: typeof getProductsStartWith;
|
|
1749
|
-
declare const index_d_queryProducts: typeof queryProducts;
|
|
1750
|
-
declare const index_d_updateProduct: typeof updateProduct;
|
|
1751
|
-
declare namespace index_d {
|
|
1752
|
-
export { type index_d_Address as Address, type index_d_AddressLocation as AddressLocation, type index_d_AddressStreetOneOf as AddressStreetOneOf, type index_d_ApplicationError as ApplicationError, type index_d_BulkActionMetadata as BulkActionMetadata, type index_d_BulkCreateProductsOptions as BulkCreateProductsOptions, type index_d_BulkCreateProductsRequest as BulkCreateProductsRequest, type index_d_BulkCreateProductsRequestRequiredFields as BulkCreateProductsRequestRequiredFields, type index_d_BulkCreateProductsResponse as BulkCreateProductsResponse, type index_d_BulkCreateProductsResponseNonNullableFields as BulkCreateProductsResponseNonNullableFields, type index_d_BulkDeleteProductsRequest as BulkDeleteProductsRequest, type index_d_BulkDeleteProductsRequestRequiredFields as BulkDeleteProductsRequestRequiredFields, type index_d_BulkDeleteProductsResponse as BulkDeleteProductsResponse, type index_d_BulkDeleteProductsResponseBulkProductResult as BulkDeleteProductsResponseBulkProductResult, type index_d_BulkDeleteProductsResponseNonNullableFields as BulkDeleteProductsResponseNonNullableFields, type index_d_BulkProductResult as BulkProductResult, type index_d_BulkUpdateProductsOptions as BulkUpdateProductsOptions, type index_d_BulkUpdateProductsRequest as BulkUpdateProductsRequest, type index_d_BulkUpdateProductsRequestRequiredFields as BulkUpdateProductsRequestRequiredFields, type index_d_BulkUpdateProductsResponse as BulkUpdateProductsResponse, type index_d_BulkUpdateProductsResponseBulkProductResult as BulkUpdateProductsResponseBulkProductResult, type index_d_BulkUpdateProductsResponseNonNullableFields as BulkUpdateProductsResponseNonNullableFields, type index_d_CreateProductOptions as CreateProductOptions, type index_d_CreateProductOptionsRequiredFields as CreateProductOptionsRequiredFields, type index_d_CreateProductRequest as CreateProductRequest, type index_d_CreateProductRequestRequiredFields as CreateProductRequestRequiredFields, type index_d_CreateProductResponse as CreateProductResponse, type index_d_CreateProductResponseNonNullableFields as CreateProductResponseNonNullableFields, type index_d_CursorPaging as CursorPaging, type index_d_Cursors as Cursors, type index_d_DeleteProductRequest as DeleteProductRequest, type index_d_DeleteProductRequestRequiredFields as DeleteProductRequestRequiredFields, type index_d_DeleteProductResponse as DeleteProductResponse, type index_d_FocalPoint as FocalPoint, type index_d_GetProductRequest as GetProductRequest, type index_d_GetProductRequestRequiredFields as GetProductRequestRequiredFields, type index_d_GetProductResponse as GetProductResponse, type index_d_GetProductResponseNonNullableFields as GetProductResponseNonNullableFields, type index_d_GetProductsStartWithOptions as GetProductsStartWithOptions, type index_d_GetProductsStartWithRequest as GetProductsStartWithRequest, type index_d_GetProductsStartWithRequestRequiredFields as GetProductsStartWithRequestRequiredFields, type index_d_GetProductsStartWithResponse as GetProductsStartWithResponse, type index_d_GetProductsStartWithResponseNonNullableFields as GetProductsStartWithResponseNonNullableFields, type index_d_ItemMetadata as ItemMetadata, index_d_LinkRel as LinkRel, type index_d_MaskedProduct as MaskedProduct, type index_d_MyAddress as MyAddress, type index_d_PageLink as PageLink, type index_d_Paging as Paging, type index_d_PagingMetadataV2 as PagingMetadataV2, type index_d_Product as Product, type index_d_ProductNonNullableFields as ProductNonNullableFields, type index_d_ProductsQueryBuilder as ProductsQueryBuilder, type index_d_ProductsQueryResult as ProductsQueryResult, type index_d_QueryProductsOptions as QueryProductsOptions, type index_d_QueryProductsRequest as QueryProductsRequest, type index_d_QueryProductsResponse as QueryProductsResponse, type index_d_QueryProductsResponseNonNullableFields as QueryProductsResponseNonNullableFields, type index_d_QueryV2 as QueryV2, type index_d_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type index_d_ResetProductsDbRequest as ResetProductsDbRequest, type index_d_ResetProductsDbResponse as ResetProductsDbResponse, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, type index_d_StandardDetails as StandardDetails, type index_d_StreetAddress as StreetAddress, type index_d_Subdivision as Subdivision, index_d_SubdivisionType as SubdivisionType, type index_d_UpdateProductOptions as UpdateProductOptions, type index_d_UpdateProductOptionsRequiredFields as UpdateProductOptionsRequiredFields, type index_d_UpdateProductRequest as UpdateProductRequest, type index_d_UpdateProductRequestRequiredFields as UpdateProductRequestRequiredFields, type index_d_UpdateProductResponse as UpdateProductResponse, type index_d_UpdateProductResponseNonNullableFields as UpdateProductResponseNonNullableFields, type index_d_Variant as Variant, type index_d_VideoResolution as VideoResolution, index_d_bulkCreateProducts as bulkCreateProducts, index_d_bulkDeleteProducts as bulkDeleteProducts, index_d_bulkUpdateProducts as bulkUpdateProducts, index_d_createProduct as createProduct, index_d_deleteProduct as deleteProduct, index_d_getProduct as getProduct, index_d_getProductsStartWith as getProductsStartWith, index_d_queryProducts as queryProducts, index_d_updateProduct as updateProduct };
|
|
1753
|
-
}
|
|
1754
|
-
|
|
1755
|
-
export { index_d$2 as alarms, index_d$1 as metroinspector, index_d as products };
|