@wix/motion 1.0.65 → 1.0.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1778 +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 context$2_AlarmDeleted = AlarmDeleted;
766
- type context$2_AlarmDeletedEnvelope = AlarmDeletedEnvelope;
767
- type context$2_AlarmMessage = AlarmMessage;
768
- type context$2_AlarmOptions = AlarmOptions;
769
- type context$2_AlarmRequest = AlarmRequest;
770
- type context$2_AlarmRequestRequiredFields = AlarmRequestRequiredFields;
771
- type context$2_AlarmResponse = AlarmResponse;
772
- type context$2_AlarmSnoozed = AlarmSnoozed;
773
- type context$2_AlarmSnoozedEnvelope = AlarmSnoozedEnvelope;
774
- type context$2_AlarmTestRequest = AlarmTestRequest;
775
- type context$2_AlarmTestResponse = AlarmTestResponse;
776
- type context$2_AlarmTriggered = AlarmTriggered;
777
- type context$2_AlarmTriggeredEnvelope = AlarmTriggeredEnvelope;
778
- type context$2_UpdateAlarm = UpdateAlarm;
779
- type context$2_UpdateAlarmRequest = UpdateAlarmRequest;
780
- type context$2_UpdateAlarmRequestRequiredFields = UpdateAlarmRequestRequiredFields;
781
- type context$2_UpdateAlarmResponse = UpdateAlarmResponse;
782
- type context$2_UpdateAlarmResponseNonNullableFields = UpdateAlarmResponseNonNullableFields;
783
- type context$2__publicOnAlarmDeletedType = _publicOnAlarmDeletedType;
784
- type context$2__publicOnAlarmSnoozedType = _publicOnAlarmSnoozedType;
785
- type context$2__publicOnAlarmTriggeredType = _publicOnAlarmTriggeredType;
786
- declare const context$2_alarm: typeof alarm;
787
- declare const context$2_alarmTest: typeof alarmTest;
788
- declare const context$2_onAlarmDeleted: typeof onAlarmDeleted;
789
- declare const context$2_onAlarmSnoozed: typeof onAlarmSnoozed;
790
- declare const context$2_onAlarmTriggered: typeof onAlarmTriggered;
791
- declare const context$2_updateAlarm: typeof updateAlarm;
792
- declare namespace context$2 {
793
- export { type ActionEvent$1 as ActionEvent, type context$2_AlarmDeleted as AlarmDeleted, type context$2_AlarmDeletedEnvelope as AlarmDeletedEnvelope, type context$2_AlarmMessage as AlarmMessage, type context$2_AlarmOptions as AlarmOptions, type context$2_AlarmRequest as AlarmRequest, type context$2_AlarmRequestRequiredFields as AlarmRequestRequiredFields, type context$2_AlarmResponse as AlarmResponse, type context$2_AlarmSnoozed as AlarmSnoozed, type context$2_AlarmSnoozedEnvelope as AlarmSnoozedEnvelope, type context$2_AlarmTestRequest as AlarmTestRequest, type context$2_AlarmTestResponse as AlarmTestResponse, type context$2_AlarmTriggered as AlarmTriggered, type context$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 context$2_UpdateAlarm as UpdateAlarm, type context$2_UpdateAlarmRequest as UpdateAlarmRequest, type context$2_UpdateAlarmRequestRequiredFields as UpdateAlarmRequestRequiredFields, type context$2_UpdateAlarmResponse as UpdateAlarmResponse, type context$2_UpdateAlarmResponseNonNullableFields as UpdateAlarmResponseNonNullableFields, WebhookIdentityType$1 as WebhookIdentityType, type context$2__publicOnAlarmDeletedType as _publicOnAlarmDeletedType, type context$2__publicOnAlarmSnoozedType as _publicOnAlarmSnoozedType, type context$2__publicOnAlarmTriggeredType as _publicOnAlarmTriggeredType, context$2_alarm as alarm, context$2_alarmTest as alarmTest, context$2_onAlarmDeleted as onAlarmDeleted, context$2_onAlarmSnoozed as onAlarmSnoozed, context$2_onAlarmTriggered as onAlarmTriggered, onAlarmDeleted$1 as publicOnAlarmDeleted, onAlarmSnoozed$1 as publicOnAlarmSnoozed, onAlarmTriggered$1 as publicOnAlarmTriggered, context$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 context$1_ActionEvent = ActionEvent;
1031
- type context$1_BaseEventMetadata = BaseEventMetadata;
1032
- type context$1_Dispatched = Dispatched;
1033
- type context$1_DomainEvent = DomainEvent;
1034
- type context$1_DomainEventBodyOneOf = DomainEventBodyOneOf;
1035
- type context$1_EchoDispatchedEnvelope = EchoDispatchedEnvelope;
1036
- type context$1_EchoMessage = EchoMessage;
1037
- type context$1_EchoOptions = EchoOptions;
1038
- type context$1_EchoRequest = EchoRequest;
1039
- type context$1_EchoRequestRequiredFields = EchoRequestRequiredFields;
1040
- type context$1_EchoResponse = EchoResponse;
1041
- type context$1_EchoResponseNonNullableFields = EchoResponseNonNullableFields;
1042
- type context$1_EntityCreatedEvent = EntityCreatedEvent;
1043
- type context$1_EntityDeletedEvent = EntityDeletedEvent;
1044
- type context$1_EntityUpdatedEvent = EntityUpdatedEvent;
1045
- type context$1_EventMetadata = EventMetadata;
1046
- type context$1_IdentificationData = IdentificationData;
1047
- type context$1_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
1048
- type context$1_MessageEnvelope = MessageEnvelope;
1049
- type context$1_MessageItem = MessageItem;
1050
- type context$1_RestoreInfo = RestoreInfo;
1051
- type context$1_WebhookIdentityType = WebhookIdentityType;
1052
- declare const context$1_WebhookIdentityType: typeof WebhookIdentityType;
1053
- type context$1__publicOnEchoDispatchedType = _publicOnEchoDispatchedType;
1054
- declare const context$1_echo: typeof echo;
1055
- declare const context$1_onEchoDispatched: typeof onEchoDispatched;
1056
- declare namespace context$1 {
1057
- export { type context$1_ActionEvent as ActionEvent, type context$1_BaseEventMetadata as BaseEventMetadata, type context$1_Dispatched as Dispatched, type context$1_DomainEvent as DomainEvent, type context$1_DomainEventBodyOneOf as DomainEventBodyOneOf, type context$1_EchoDispatchedEnvelope as EchoDispatchedEnvelope, type context$1_EchoMessage as EchoMessage, type context$1_EchoOptions as EchoOptions, type context$1_EchoRequest as EchoRequest, type context$1_EchoRequestRequiredFields as EchoRequestRequiredFields, type context$1_EchoResponse as EchoResponse, type context$1_EchoResponseNonNullableFields as EchoResponseNonNullableFields, type context$1_EntityCreatedEvent as EntityCreatedEvent, type context$1_EntityDeletedEvent as EntityDeletedEvent, type context$1_EntityUpdatedEvent as EntityUpdatedEvent, type context$1_EventMetadata as EventMetadata, type context$1_IdentificationData as IdentificationData, type context$1_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type context$1_MessageEnvelope as MessageEnvelope, type context$1_MessageItem as MessageItem, type context$1_RestoreInfo as RestoreInfo, context$1_WebhookIdentityType as WebhookIdentityType, type context$1__publicOnEchoDispatchedType as _publicOnEchoDispatchedType, context$1_echo as echo, context$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 CountProductsRequest {
1204
- filter?: Record<string, any> | null;
1205
- }
1206
- interface CountProductsResponse {
1207
- count?: number;
1208
- }
1209
- interface GetProductsStartWithRequest {
1210
- title: string;
1211
- addressLine2?: string | null;
1212
- }
1213
- interface GetProductsStartWithResponse {
1214
- products?: Product[];
1215
- }
1216
- interface QueryProductsRequest {
1217
- query?: QueryV2;
1218
- /** Whether variants should be included in the response. */
1219
- includeVariants?: boolean;
1220
- /** Whether hidden products should be included in the response. Requires permissions to manage products. */
1221
- includeHiddenProducts?: boolean;
1222
- /** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
1223
- includeMerchantSpecificData?: boolean;
1224
- }
1225
- interface QueryV2 extends QueryV2PagingMethodOneOf {
1226
- /** Paging options to limit and skip the number of items. */
1227
- paging?: Paging;
1228
- /** 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`. */
1229
- cursorPaging?: CursorPaging;
1230
- /**
1231
- * Filter object.
1232
- *
1233
- * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
1234
- */
1235
- filter?: Record<string, any> | null;
1236
- /**
1237
- * Sort object.
1238
- *
1239
- * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
1240
- */
1241
- sort?: Sorting[];
1242
- /** 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. */
1243
- fields?: string[];
1244
- /** 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. */
1245
- fieldsets?: string[];
1246
- }
1247
- /** @oneof */
1248
- interface QueryV2PagingMethodOneOf {
1249
- /** Paging options to limit and skip the number of items. */
1250
- paging?: Paging;
1251
- /** 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`. */
1252
- cursorPaging?: CursorPaging;
1253
- }
1254
- interface Sorting {
1255
- /** Name of the field to sort by. */
1256
- fieldName?: string;
1257
- /** Sort order. */
1258
- order?: SortOrder;
1259
- }
1260
- declare enum SortOrder {
1261
- ASC = "ASC",
1262
- DESC = "DESC"
1263
- }
1264
- interface Paging {
1265
- /** Number of items to load. */
1266
- limit?: number | null;
1267
- /** Number of items to skip in the current sort order. */
1268
- offset?: number | null;
1269
- }
1270
- interface CursorPaging {
1271
- /** Maximum number of items to return in the results. */
1272
- limit?: number | null;
1273
- /**
1274
- * Pointer to the next or previous page in the list of results.
1275
- *
1276
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1277
- * Not relevant for the first request.
1278
- */
1279
- cursor?: string | null;
1280
- }
1281
- interface QueryProductsResponse {
1282
- products?: Product[];
1283
- metadata?: PagingMetadataV2;
1284
- }
1285
- interface PagingMetadataV2 {
1286
- /** Number of items returned in the response. */
1287
- count?: number | null;
1288
- /** Offset that was requested. */
1289
- offset?: number | null;
1290
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
1291
- total?: number | null;
1292
- /** Flag that indicates the server failed to calculate the `total` field. */
1293
- tooManyToCount?: boolean | null;
1294
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
1295
- cursors?: Cursors;
1296
- }
1297
- interface Cursors {
1298
- /** Cursor string pointing to the next page in the list of results. */
1299
- next?: string | null;
1300
- /** Cursor pointing to the previous page in the list of results. */
1301
- prev?: string | null;
1302
- }
1303
- interface BulkCreateProductsRequest {
1304
- products: Product[];
1305
- /** set to `true` if you wish to receive back the created products in the response */
1306
- returnEntity?: boolean;
1307
- }
1308
- interface BulkCreateProductsResponse {
1309
- results?: BulkProductResult[];
1310
- bulkActionMetadata?: BulkActionMetadata;
1311
- }
1312
- interface ItemMetadata {
1313
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
1314
- _id?: string | null;
1315
- /** Index of the item within the request array. Allows for correlation between request and response items. */
1316
- originalIndex?: number;
1317
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1318
- success?: boolean;
1319
- /** Details about the error in case of failure. */
1320
- error?: ApplicationError;
1321
- }
1322
- interface ApplicationError {
1323
- /** Error code. */
1324
- code?: string;
1325
- /** Description of the error. */
1326
- description?: string;
1327
- /** Data related to the error. */
1328
- data?: Record<string, any> | null;
1329
- }
1330
- interface BulkProductResult {
1331
- /** Defined in wix.commons */
1332
- itemMetadata?: ItemMetadata;
1333
- /** Only exists if `returnEntity` was set to true in the request */
1334
- item?: Product;
1335
- }
1336
- interface BulkActionMetadata {
1337
- /** Number of items that were successfully processed. */
1338
- totalSuccesses?: number;
1339
- /** Number of items that couldn't be processed. */
1340
- totalFailures?: number;
1341
- /** Number of failures without details because detailed failure threshold was exceeded. */
1342
- undetailedFailures?: number;
1343
- }
1344
- interface BulkUpdateProductsRequest {
1345
- products: MaskedProduct[];
1346
- /** set to `true` if you wish to receive back the updated products in the response */
1347
- returnEntity?: boolean;
1348
- }
1349
- interface MaskedProduct {
1350
- /** Product to be updated, may be partial */
1351
- product?: Product;
1352
- }
1353
- interface BulkUpdateProductsResponse {
1354
- results?: BulkUpdateProductsResponseBulkProductResult[];
1355
- bulkActionMetadata?: BulkActionMetadata;
1356
- }
1357
- interface BulkUpdateProductsResponseBulkProductResult {
1358
- itemMetadata?: ItemMetadata;
1359
- /** Only exists if `returnEntity` was set to true in the request */
1360
- item?: Product;
1361
- }
1362
- interface BulkDeleteProductsRequest {
1363
- productIds: string[];
1364
- }
1365
- interface BulkDeleteProductsResponse {
1366
- results?: BulkDeleteProductsResponseBulkProductResult[];
1367
- bulkActionMetadata?: BulkActionMetadata;
1368
- }
1369
- interface BulkDeleteProductsResponseBulkProductResult {
1370
- itemMetadata?: ItemMetadata;
1371
- }
1372
- interface ResetProductsDbRequest {
1373
- }
1374
- interface ResetProductsDbResponse {
1375
- }
1376
- interface CreateProductRequestRequiredFields {
1377
- product?: {
1378
- title: string;
1379
- };
1380
- }
1381
- interface StreetAddressNonNullableFields {
1382
- number: string;
1383
- name: string;
1384
- apt: string;
1385
- }
1386
- interface AddressNonNullableFields {
1387
- streetAddress?: StreetAddressNonNullableFields;
1388
- }
1389
- interface PageLinkNonNullableFields {
1390
- pageId: string;
1391
- rel: LinkRel[];
1392
- }
1393
- interface VariantNonNullableFields {
1394
- name: string;
1395
- value: string;
1396
- image: string;
1397
- }
1398
- interface MyAddressNonNullableFields {
1399
- streetAddress?: StreetAddressNonNullableFields;
1400
- }
1401
- interface ProductNonNullableFields {
1402
- _id: string;
1403
- collectionId: string;
1404
- image: string;
1405
- address?: AddressNonNullableFields;
1406
- document: string;
1407
- video: string;
1408
- pageLink?: PageLinkNonNullableFields;
1409
- audio: string;
1410
- variants: VariantNonNullableFields[];
1411
- mainVariant?: VariantNonNullableFields;
1412
- customAddress?: MyAddressNonNullableFields;
1413
- guid: string;
1414
- }
1415
- interface CreateProductResponseNonNullableFields {
1416
- product?: ProductNonNullableFields;
1417
- }
1418
- interface DeleteProductRequestRequiredFields {
1419
- productId: string;
1420
- }
1421
- interface UpdateProductRequestRequiredFields {
1422
- product?: {
1423
- _id: string;
1424
- };
1425
- productId: string;
1426
- }
1427
- interface UpdateProductResponseNonNullableFields {
1428
- product?: ProductNonNullableFields;
1429
- }
1430
- interface GetProductRequestRequiredFields {
1431
- productId: string;
1432
- }
1433
- interface GetProductResponseNonNullableFields {
1434
- product?: ProductNonNullableFields;
1435
- }
1436
- interface CountProductsResponseNonNullableFields {
1437
- count: number;
1438
- }
1439
- interface GetProductsStartWithRequestRequiredFields {
1440
- title: string;
1441
- }
1442
- interface GetProductsStartWithResponseNonNullableFields {
1443
- products: ProductNonNullableFields[];
1444
- }
1445
- interface QueryProductsResponseNonNullableFields {
1446
- products: ProductNonNullableFields[];
1447
- }
1448
- interface BulkCreateProductsRequestRequiredFields {
1449
- products: Product[];
1450
- }
1451
- interface ApplicationErrorNonNullableFields {
1452
- code: string;
1453
- description: string;
1454
- }
1455
- interface ItemMetadataNonNullableFields {
1456
- originalIndex: number;
1457
- success: boolean;
1458
- error?: ApplicationErrorNonNullableFields;
1459
- }
1460
- interface BulkProductResultNonNullableFields {
1461
- itemMetadata?: ItemMetadataNonNullableFields;
1462
- item?: ProductNonNullableFields;
1463
- }
1464
- interface BulkActionMetadataNonNullableFields {
1465
- totalSuccesses: number;
1466
- totalFailures: number;
1467
- undetailedFailures: number;
1468
- }
1469
- interface BulkCreateProductsResponseNonNullableFields {
1470
- results: BulkProductResultNonNullableFields[];
1471
- bulkActionMetadata?: BulkActionMetadataNonNullableFields;
1472
- }
1473
- interface BulkUpdateProductsRequestRequiredFields {
1474
- products: MaskedProduct[];
1475
- }
1476
- interface BulkUpdateProductsResponseBulkProductResultNonNullableFields {
1477
- itemMetadata?: ItemMetadataNonNullableFields;
1478
- item?: ProductNonNullableFields;
1479
- }
1480
- interface BulkUpdateProductsResponseNonNullableFields {
1481
- results: BulkUpdateProductsResponseBulkProductResultNonNullableFields[];
1482
- bulkActionMetadata?: BulkActionMetadataNonNullableFields;
1483
- }
1484
- interface BulkDeleteProductsRequestRequiredFields {
1485
- productIds: string[];
1486
- }
1487
- interface BulkDeleteProductsResponseBulkProductResultNonNullableFields {
1488
- itemMetadata?: ItemMetadataNonNullableFields;
1489
- }
1490
- interface BulkDeleteProductsResponseNonNullableFields {
1491
- results: BulkDeleteProductsResponseBulkProductResultNonNullableFields[];
1492
- bulkActionMetadata?: BulkActionMetadataNonNullableFields;
1493
- }
1494
- interface Product {
1495
- _id: string;
1496
- name: string | null;
1497
- collectionId: string;
1498
- _createdDate: Date | null;
1499
- modifiedDate: Date | null;
1500
- image: string;
1501
- address: Address;
1502
- document: string;
1503
- video: string;
1504
- pageLink: PageLink;
1505
- audio: string;
1506
- color: string | null;
1507
- localDate: string | null;
1508
- localTime: string | null;
1509
- localDateTime: string | null;
1510
- variants: Variant[];
1511
- mainVariant: Variant;
1512
- customAddress: MyAddress;
1513
- guid: string;
1514
- }
1515
- interface CreateProductOptionsRequiredFields {
1516
- product?: {
1517
- title: unknown;
1518
- };
1519
- }
1520
- interface CreateProductOptions {
1521
- product?: Product;
1522
- }
1523
- interface UpdateProductOptionsRequiredFields {
1524
- product?: {
1525
- _id: string;
1526
- };
1527
- }
1528
- interface UpdateProductOptions {
1529
- product?: Product;
1530
- }
1531
- interface CountProductsOptions {
1532
- filter?: Record<string, any> | null;
1533
- }
1534
- interface GetProductsStartWithOptions {
1535
- addressLine2?: string | null;
1536
- }
1537
- interface QueryProductsOptions {
1538
- /** Whether variants should be included in the response. */
1539
- includeVariants?: boolean | undefined;
1540
- /** Whether hidden products should be included in the response. Requires permissions to manage products. */
1541
- includeHiddenProducts?: boolean | undefined;
1542
- /** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
1543
- includeMerchantSpecificData?: boolean | undefined;
1544
- }
1545
- interface QueryCursorResult {
1546
- cursors: Cursors;
1547
- hasNext: () => boolean;
1548
- hasPrev: () => boolean;
1549
- length: number;
1550
- pageSize: number;
1551
- }
1552
- interface ProductsQueryResult extends QueryCursorResult {
1553
- items: Product[];
1554
- query: ProductsQueryBuilder;
1555
- next: () => Promise<ProductsQueryResult>;
1556
- prev: () => Promise<ProductsQueryResult>;
1557
- }
1558
- interface ProductsQueryBuilder {
1559
- /** @param propertyName - Property whose value is compared with `value`.
1560
- * @param value - Value to compare against.
1561
- * @documentationMaturity preview
1562
- */
1563
- eq: (propertyName: 'title' | 'collectionId' | 'guid', value: any) => ProductsQueryBuilder;
1564
- /** @param propertyName - Property whose value is compared with `value`.
1565
- * @param value - Value to compare against.
1566
- * @documentationMaturity preview
1567
- */
1568
- ne: (propertyName: 'title' | 'guid', value: any) => ProductsQueryBuilder;
1569
- /** @param propertyName - Property whose value is compared with `string`.
1570
- * @param string - String to compare against. Case-insensitive.
1571
- * @documentationMaturity preview
1572
- */
1573
- startsWith: (propertyName: 'title' | 'guid', value: string) => ProductsQueryBuilder;
1574
- /** @param propertyName - Property whose value is compared with `values`.
1575
- * @param values - List of values to compare against.
1576
- * @documentationMaturity preview
1577
- */
1578
- hasSome: (propertyName: 'title' | 'guid', value: any[]) => ProductsQueryBuilder;
1579
- /** @documentationMaturity preview */
1580
- in: (propertyName: 'title' | 'guid', value: any) => ProductsQueryBuilder;
1581
- /** @documentationMaturity preview */
1582
- exists: (propertyName: 'title' | 'guid', value: boolean) => ProductsQueryBuilder;
1583
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1584
- * @documentationMaturity preview
1585
- */
1586
- ascending: (...propertyNames: Array<'title' | 'collectionId' | 'guid'>) => ProductsQueryBuilder;
1587
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1588
- * @documentationMaturity preview
1589
- */
1590
- descending: (...propertyNames: Array<'title' | 'collectionId' | 'guid'>) => ProductsQueryBuilder;
1591
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1592
- * @documentationMaturity preview
1593
- */
1594
- limit: (limit: number) => ProductsQueryBuilder;
1595
- /** @param cursor - A pointer to specific record
1596
- * @documentationMaturity preview
1597
- */
1598
- skipTo: (cursor: string) => ProductsQueryBuilder;
1599
- /** @documentationMaturity preview */
1600
- find: () => Promise<ProductsQueryResult>;
1601
- }
1602
- interface BulkCreateProductsOptions {
1603
- /** set to `true` if you wish to receive back the created products in the response */
1604
- returnEntity?: boolean;
1605
- }
1606
- interface BulkUpdateProductsOptions {
1607
- /** set to `true` if you wish to receive back the updated products in the response */
1608
- returnEntity?: boolean;
1609
- }
1610
-
1611
- declare function createProduct$1(httpClient: HttpClient): CreateProductSignature;
1612
- interface CreateProductSignature {
1613
- /**
1614
- * Creating a product
1615
- */
1616
- (options?: (CreateProductOptions & CreateProductOptionsRequiredFields) | undefined): Promise<Product & ProductNonNullableFields>;
1617
- }
1618
- declare function deleteProduct$1(httpClient: HttpClient): DeleteProductSignature;
1619
- interface DeleteProductSignature {
1620
- /** */
1621
- (productId: string): Promise<void>;
1622
- }
1623
- declare function updateProduct$1(httpClient: HttpClient): UpdateProductSignature;
1624
- interface UpdateProductSignature {
1625
- /** */
1626
- (productId: string, options?: (UpdateProductOptions & UpdateProductOptionsRequiredFields) | undefined): Promise<Product & ProductNonNullableFields>;
1627
- }
1628
- declare function getProduct$1(httpClient: HttpClient): GetProductSignature;
1629
- interface GetProductSignature {
1630
- /** */
1631
- (productId: string): Promise<Product & ProductNonNullableFields>;
1632
- }
1633
- declare function countProducts$1(httpClient: HttpClient): CountProductsSignature;
1634
- interface CountProductsSignature {
1635
- /** */
1636
- (options?: CountProductsOptions | undefined): Promise<CountProductsResponse & CountProductsResponseNonNullableFields>;
1637
- }
1638
- declare function getProductsStartWith$1(httpClient: HttpClient): GetProductsStartWithSignature;
1639
- interface GetProductsStartWithSignature {
1640
- /** */
1641
- (title: string, options?: GetProductsStartWithOptions | undefined): Promise<GetProductsStartWithResponse & GetProductsStartWithResponseNonNullableFields>;
1642
- }
1643
- declare function queryProducts$1(httpClient: HttpClient): QueryProductsSignature;
1644
- interface QueryProductsSignature {
1645
- /** */
1646
- (options?: QueryProductsOptions | undefined): ProductsQueryBuilder;
1647
- }
1648
- declare function bulkCreateProducts$1(httpClient: HttpClient): BulkCreateProductsSignature;
1649
- interface BulkCreateProductsSignature {
1650
- /**
1651
- * create multiple products in a single request. Works synchronously
1652
- */
1653
- (products: Product[], options?: BulkCreateProductsOptions | undefined): Promise<BulkCreateProductsResponse & BulkCreateProductsResponseNonNullableFields>;
1654
- }
1655
- declare function bulkUpdateProducts$1(httpClient: HttpClient): BulkUpdateProductsSignature;
1656
- interface BulkUpdateProductsSignature {
1657
- /**
1658
- * update multiple products in a single request. Works synchronously.
1659
- */
1660
- (products: MaskedProduct[], options?: BulkUpdateProductsOptions | undefined): Promise<BulkUpdateProductsResponse & BulkUpdateProductsResponseNonNullableFields>;
1661
- }
1662
- declare function bulkDeleteProducts$1(httpClient: HttpClient): BulkDeleteProductsSignature;
1663
- interface BulkDeleteProductsSignature {
1664
- /**
1665
- * deletes multiple products in a single request. Works synchronously.
1666
- */
1667
- (productIds: string[]): Promise<BulkDeleteProductsResponse & BulkDeleteProductsResponseNonNullableFields>;
1668
- }
1669
-
1670
- declare const createProduct: MaybeContext<BuildRESTFunction<typeof createProduct$1> & typeof createProduct$1>;
1671
- declare const deleteProduct: MaybeContext<BuildRESTFunction<typeof deleteProduct$1> & typeof deleteProduct$1>;
1672
- declare const updateProduct: MaybeContext<BuildRESTFunction<typeof updateProduct$1> & typeof updateProduct$1>;
1673
- declare const getProduct: MaybeContext<BuildRESTFunction<typeof getProduct$1> & typeof getProduct$1>;
1674
- declare const countProducts: MaybeContext<BuildRESTFunction<typeof countProducts$1> & typeof countProducts$1>;
1675
- declare const getProductsStartWith: MaybeContext<BuildRESTFunction<typeof getProductsStartWith$1> & typeof getProductsStartWith$1>;
1676
- declare const queryProducts: MaybeContext<BuildRESTFunction<typeof queryProducts$1> & typeof queryProducts$1>;
1677
- declare const bulkCreateProducts: MaybeContext<BuildRESTFunction<typeof bulkCreateProducts$1> & typeof bulkCreateProducts$1>;
1678
- declare const bulkUpdateProducts: MaybeContext<BuildRESTFunction<typeof bulkUpdateProducts$1> & typeof bulkUpdateProducts$1>;
1679
- declare const bulkDeleteProducts: MaybeContext<BuildRESTFunction<typeof bulkDeleteProducts$1> & typeof bulkDeleteProducts$1>;
1680
-
1681
- type context_Address = Address;
1682
- type context_AddressLocation = AddressLocation;
1683
- type context_AddressStreetOneOf = AddressStreetOneOf;
1684
- type context_ApplicationError = ApplicationError;
1685
- type context_BulkActionMetadata = BulkActionMetadata;
1686
- type context_BulkCreateProductsOptions = BulkCreateProductsOptions;
1687
- type context_BulkCreateProductsRequest = BulkCreateProductsRequest;
1688
- type context_BulkCreateProductsRequestRequiredFields = BulkCreateProductsRequestRequiredFields;
1689
- type context_BulkCreateProductsResponse = BulkCreateProductsResponse;
1690
- type context_BulkCreateProductsResponseNonNullableFields = BulkCreateProductsResponseNonNullableFields;
1691
- type context_BulkDeleteProductsRequest = BulkDeleteProductsRequest;
1692
- type context_BulkDeleteProductsRequestRequiredFields = BulkDeleteProductsRequestRequiredFields;
1693
- type context_BulkDeleteProductsResponse = BulkDeleteProductsResponse;
1694
- type context_BulkDeleteProductsResponseBulkProductResult = BulkDeleteProductsResponseBulkProductResult;
1695
- type context_BulkDeleteProductsResponseNonNullableFields = BulkDeleteProductsResponseNonNullableFields;
1696
- type context_BulkProductResult = BulkProductResult;
1697
- type context_BulkUpdateProductsOptions = BulkUpdateProductsOptions;
1698
- type context_BulkUpdateProductsRequest = BulkUpdateProductsRequest;
1699
- type context_BulkUpdateProductsRequestRequiredFields = BulkUpdateProductsRequestRequiredFields;
1700
- type context_BulkUpdateProductsResponse = BulkUpdateProductsResponse;
1701
- type context_BulkUpdateProductsResponseBulkProductResult = BulkUpdateProductsResponseBulkProductResult;
1702
- type context_BulkUpdateProductsResponseNonNullableFields = BulkUpdateProductsResponseNonNullableFields;
1703
- type context_CountProductsOptions = CountProductsOptions;
1704
- type context_CountProductsRequest = CountProductsRequest;
1705
- type context_CountProductsResponse = CountProductsResponse;
1706
- type context_CountProductsResponseNonNullableFields = CountProductsResponseNonNullableFields;
1707
- type context_CreateProductOptions = CreateProductOptions;
1708
- type context_CreateProductOptionsRequiredFields = CreateProductOptionsRequiredFields;
1709
- type context_CreateProductRequest = CreateProductRequest;
1710
- type context_CreateProductRequestRequiredFields = CreateProductRequestRequiredFields;
1711
- type context_CreateProductResponse = CreateProductResponse;
1712
- type context_CreateProductResponseNonNullableFields = CreateProductResponseNonNullableFields;
1713
- type context_CursorPaging = CursorPaging;
1714
- type context_Cursors = Cursors;
1715
- type context_DeleteProductRequest = DeleteProductRequest;
1716
- type context_DeleteProductRequestRequiredFields = DeleteProductRequestRequiredFields;
1717
- type context_DeleteProductResponse = DeleteProductResponse;
1718
- type context_FocalPoint = FocalPoint;
1719
- type context_GetProductRequest = GetProductRequest;
1720
- type context_GetProductRequestRequiredFields = GetProductRequestRequiredFields;
1721
- type context_GetProductResponse = GetProductResponse;
1722
- type context_GetProductResponseNonNullableFields = GetProductResponseNonNullableFields;
1723
- type context_GetProductsStartWithOptions = GetProductsStartWithOptions;
1724
- type context_GetProductsStartWithRequest = GetProductsStartWithRequest;
1725
- type context_GetProductsStartWithRequestRequiredFields = GetProductsStartWithRequestRequiredFields;
1726
- type context_GetProductsStartWithResponse = GetProductsStartWithResponse;
1727
- type context_GetProductsStartWithResponseNonNullableFields = GetProductsStartWithResponseNonNullableFields;
1728
- type context_ItemMetadata = ItemMetadata;
1729
- type context_LinkRel = LinkRel;
1730
- declare const context_LinkRel: typeof LinkRel;
1731
- type context_MaskedProduct = MaskedProduct;
1732
- type context_MyAddress = MyAddress;
1733
- type context_PageLink = PageLink;
1734
- type context_Paging = Paging;
1735
- type context_PagingMetadataV2 = PagingMetadataV2;
1736
- type context_Product = Product;
1737
- type context_ProductNonNullableFields = ProductNonNullableFields;
1738
- type context_ProductsQueryBuilder = ProductsQueryBuilder;
1739
- type context_ProductsQueryResult = ProductsQueryResult;
1740
- type context_QueryProductsOptions = QueryProductsOptions;
1741
- type context_QueryProductsRequest = QueryProductsRequest;
1742
- type context_QueryProductsResponse = QueryProductsResponse;
1743
- type context_QueryProductsResponseNonNullableFields = QueryProductsResponseNonNullableFields;
1744
- type context_QueryV2 = QueryV2;
1745
- type context_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf;
1746
- type context_ResetProductsDbRequest = ResetProductsDbRequest;
1747
- type context_ResetProductsDbResponse = ResetProductsDbResponse;
1748
- type context_SortOrder = SortOrder;
1749
- declare const context_SortOrder: typeof SortOrder;
1750
- type context_Sorting = Sorting;
1751
- type context_StandardDetails = StandardDetails;
1752
- type context_StreetAddress = StreetAddress;
1753
- type context_Subdivision = Subdivision;
1754
- type context_SubdivisionType = SubdivisionType;
1755
- declare const context_SubdivisionType: typeof SubdivisionType;
1756
- type context_UpdateProductOptions = UpdateProductOptions;
1757
- type context_UpdateProductOptionsRequiredFields = UpdateProductOptionsRequiredFields;
1758
- type context_UpdateProductRequest = UpdateProductRequest;
1759
- type context_UpdateProductRequestRequiredFields = UpdateProductRequestRequiredFields;
1760
- type context_UpdateProductResponse = UpdateProductResponse;
1761
- type context_UpdateProductResponseNonNullableFields = UpdateProductResponseNonNullableFields;
1762
- type context_Variant = Variant;
1763
- type context_VideoResolution = VideoResolution;
1764
- declare const context_bulkCreateProducts: typeof bulkCreateProducts;
1765
- declare const context_bulkDeleteProducts: typeof bulkDeleteProducts;
1766
- declare const context_bulkUpdateProducts: typeof bulkUpdateProducts;
1767
- declare const context_countProducts: typeof countProducts;
1768
- declare const context_createProduct: typeof createProduct;
1769
- declare const context_deleteProduct: typeof deleteProduct;
1770
- declare const context_getProduct: typeof getProduct;
1771
- declare const context_getProductsStartWith: typeof getProductsStartWith;
1772
- declare const context_queryProducts: typeof queryProducts;
1773
- declare const context_updateProduct: typeof updateProduct;
1774
- declare namespace context {
1775
- export { type context_Address as Address, type context_AddressLocation as AddressLocation, type context_AddressStreetOneOf as AddressStreetOneOf, type context_ApplicationError as ApplicationError, type context_BulkActionMetadata as BulkActionMetadata, type context_BulkCreateProductsOptions as BulkCreateProductsOptions, type context_BulkCreateProductsRequest as BulkCreateProductsRequest, type context_BulkCreateProductsRequestRequiredFields as BulkCreateProductsRequestRequiredFields, type context_BulkCreateProductsResponse as BulkCreateProductsResponse, type context_BulkCreateProductsResponseNonNullableFields as BulkCreateProductsResponseNonNullableFields, type context_BulkDeleteProductsRequest as BulkDeleteProductsRequest, type context_BulkDeleteProductsRequestRequiredFields as BulkDeleteProductsRequestRequiredFields, type context_BulkDeleteProductsResponse as BulkDeleteProductsResponse, type context_BulkDeleteProductsResponseBulkProductResult as BulkDeleteProductsResponseBulkProductResult, type context_BulkDeleteProductsResponseNonNullableFields as BulkDeleteProductsResponseNonNullableFields, type context_BulkProductResult as BulkProductResult, type context_BulkUpdateProductsOptions as BulkUpdateProductsOptions, type context_BulkUpdateProductsRequest as BulkUpdateProductsRequest, type context_BulkUpdateProductsRequestRequiredFields as BulkUpdateProductsRequestRequiredFields, type context_BulkUpdateProductsResponse as BulkUpdateProductsResponse, type context_BulkUpdateProductsResponseBulkProductResult as BulkUpdateProductsResponseBulkProductResult, type context_BulkUpdateProductsResponseNonNullableFields as BulkUpdateProductsResponseNonNullableFields, type context_CountProductsOptions as CountProductsOptions, type context_CountProductsRequest as CountProductsRequest, type context_CountProductsResponse as CountProductsResponse, type context_CountProductsResponseNonNullableFields as CountProductsResponseNonNullableFields, type context_CreateProductOptions as CreateProductOptions, type context_CreateProductOptionsRequiredFields as CreateProductOptionsRequiredFields, type context_CreateProductRequest as CreateProductRequest, type context_CreateProductRequestRequiredFields as CreateProductRequestRequiredFields, type context_CreateProductResponse as CreateProductResponse, type context_CreateProductResponseNonNullableFields as CreateProductResponseNonNullableFields, type context_CursorPaging as CursorPaging, type context_Cursors as Cursors, type context_DeleteProductRequest as DeleteProductRequest, type context_DeleteProductRequestRequiredFields as DeleteProductRequestRequiredFields, type context_DeleteProductResponse as DeleteProductResponse, type context_FocalPoint as FocalPoint, type context_GetProductRequest as GetProductRequest, type context_GetProductRequestRequiredFields as GetProductRequestRequiredFields, type context_GetProductResponse as GetProductResponse, type context_GetProductResponseNonNullableFields as GetProductResponseNonNullableFields, type context_GetProductsStartWithOptions as GetProductsStartWithOptions, type context_GetProductsStartWithRequest as GetProductsStartWithRequest, type context_GetProductsStartWithRequestRequiredFields as GetProductsStartWithRequestRequiredFields, type context_GetProductsStartWithResponse as GetProductsStartWithResponse, type context_GetProductsStartWithResponseNonNullableFields as GetProductsStartWithResponseNonNullableFields, type context_ItemMetadata as ItemMetadata, context_LinkRel as LinkRel, type context_MaskedProduct as MaskedProduct, type context_MyAddress as MyAddress, type context_PageLink as PageLink, type context_Paging as Paging, type context_PagingMetadataV2 as PagingMetadataV2, type context_Product as Product, type context_ProductNonNullableFields as ProductNonNullableFields, type context_ProductsQueryBuilder as ProductsQueryBuilder, type context_ProductsQueryResult as ProductsQueryResult, type context_QueryProductsOptions as QueryProductsOptions, type context_QueryProductsRequest as QueryProductsRequest, type context_QueryProductsResponse as QueryProductsResponse, type context_QueryProductsResponseNonNullableFields as QueryProductsResponseNonNullableFields, type context_QueryV2 as QueryV2, type context_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type context_ResetProductsDbRequest as ResetProductsDbRequest, type context_ResetProductsDbResponse as ResetProductsDbResponse, context_SortOrder as SortOrder, type context_Sorting as Sorting, type context_StandardDetails as StandardDetails, type context_StreetAddress as StreetAddress, type context_Subdivision as Subdivision, context_SubdivisionType as SubdivisionType, type context_UpdateProductOptions as UpdateProductOptions, type context_UpdateProductOptionsRequiredFields as UpdateProductOptionsRequiredFields, type context_UpdateProductRequest as UpdateProductRequest, type context_UpdateProductRequestRequiredFields as UpdateProductRequestRequiredFields, type context_UpdateProductResponse as UpdateProductResponse, type context_UpdateProductResponseNonNullableFields as UpdateProductResponseNonNullableFields, type context_Variant as Variant, type context_VideoResolution as VideoResolution, context_bulkCreateProducts as bulkCreateProducts, context_bulkDeleteProducts as bulkDeleteProducts, context_bulkUpdateProducts as bulkUpdateProducts, context_countProducts as countProducts, context_createProduct as createProduct, context_deleteProduct as deleteProduct, context_getProduct as getProduct, context_getProductsStartWith as getProductsStartWith, context_queryProducts as queryProducts, context_updateProduct as updateProduct };
1776
- }
1777
-
1778
- export { context$2 as alarms, context$1 as metroinspector, context as products };