@wix/motion 1.0.36 → 1.0.38

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.
@@ -0,0 +1,753 @@
1
+ interface AlarmMessage {
2
+ _id?: string;
3
+ seconds?: number;
4
+ }
5
+ interface AlarmResponse {
6
+ time?: Date;
7
+ }
8
+ interface AlarmTriggered {
9
+ }
10
+ interface AlarmSnoozed {
11
+ }
12
+ interface AlarmDeleted {
13
+ }
14
+ interface UpdateAlarmResponse {
15
+ alarm?: AlarmMessage;
16
+ }
17
+ interface IdentificationData$1 extends IdentificationDataIdOneOf$1 {
18
+ /** ID of a site visitor that has not logged in to the site. */
19
+ anonymousVisitorId?: string;
20
+ /** ID of a site visitor that has logged in to the site. */
21
+ memberId?: string;
22
+ /** ID of a Wix user (site owner, contributor, etc.). */
23
+ wixUserId?: string;
24
+ /** ID of an app. */
25
+ appId?: string;
26
+ /** @readonly */
27
+ identityType?: WebhookIdentityType$1;
28
+ }
29
+ /** @oneof */
30
+ interface IdentificationDataIdOneOf$1 {
31
+ /** ID of a site visitor that has not logged in to the site. */
32
+ anonymousVisitorId?: string;
33
+ /** ID of a site visitor that has logged in to the site. */
34
+ memberId?: string;
35
+ /** ID of a Wix user (site owner, contributor, etc.). */
36
+ wixUserId?: string;
37
+ /** ID of an app. */
38
+ appId?: string;
39
+ }
40
+ declare enum WebhookIdentityType$1 {
41
+ UNKNOWN = "UNKNOWN",
42
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
43
+ MEMBER = "MEMBER",
44
+ WIX_USER = "WIX_USER",
45
+ APP = "APP"
46
+ }
47
+ interface UpdateAlarmResponseNonNullableFields {
48
+ alarm?: {
49
+ _id: string;
50
+ seconds: number;
51
+ };
52
+ }
53
+ interface BaseEventMetadata$1 {
54
+ /** App instance ID. */
55
+ instanceId?: string | null;
56
+ /** Event type. */
57
+ eventType?: string;
58
+ /** The identification type and identity data. */
59
+ identity?: IdentificationData$1;
60
+ }
61
+ interface EventMetadata$1 extends BaseEventMetadata$1 {
62
+ /**
63
+ * Unique event ID.
64
+ * Allows clients to ignore duplicate webhooks.
65
+ */
66
+ _id?: string;
67
+ /**
68
+ * Assumes actions are also always typed to an entity_type
69
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
70
+ */
71
+ entityFqdn?: string;
72
+ /**
73
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
74
+ * This is although the created/updated/deleted notion is duplication of the oneof types
75
+ * Example: created/updated/deleted/started/completed/email_opened
76
+ */
77
+ slug?: string;
78
+ /** ID of the entity associated with the event. */
79
+ entityId?: string;
80
+ /** Event timestamp. */
81
+ eventTime?: Date;
82
+ /**
83
+ * Whether the event was triggered as a result of a privacy regulation application
84
+ * (for example, GDPR).
85
+ */
86
+ triggeredByAnonymizeRequest?: boolean | null;
87
+ /** If present, indicates the action that triggered the event. */
88
+ originatedFrom?: string | null;
89
+ /**
90
+ * A sequence number defining the order of updates to the underlying entity.
91
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
92
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
93
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
94
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
95
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
96
+ */
97
+ entityEventSequence?: string | null;
98
+ }
99
+ interface AlarmTriggeredEnvelope {
100
+ data: AlarmTriggered;
101
+ metadata: EventMetadata$1;
102
+ }
103
+ interface AlarmSnoozedEnvelope {
104
+ data: AlarmSnoozed;
105
+ metadata: EventMetadata$1;
106
+ }
107
+ interface AlarmDeletedEnvelope {
108
+ data: AlarmDeleted;
109
+ metadata: EventMetadata$1;
110
+ }
111
+ interface AlarmOptions {
112
+ someString?: string;
113
+ someOtherString?: string;
114
+ someOtherField?: string;
115
+ }
116
+ interface UpdateAlarm {
117
+ _id?: string;
118
+ seconds?: number;
119
+ }
120
+
121
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
122
+ interface HttpClient {
123
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
124
+ }
125
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
126
+ type HttpResponse<T = any> = {
127
+ data: T;
128
+ status: number;
129
+ statusText: string;
130
+ headers: any;
131
+ request?: any;
132
+ };
133
+ type RequestOptions<_TResponse = any, Data = any> = {
134
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
135
+ url: string;
136
+ data?: Data;
137
+ params?: URLSearchParams;
138
+ } & APIMetadata;
139
+ type APIMetadata = {
140
+ methodFqn?: string;
141
+ entityFqdn?: string;
142
+ packageName?: string;
143
+ };
144
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
145
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
146
+ __type: 'event-definition';
147
+ type: Type;
148
+ isDomainEvent?: boolean;
149
+ transformations?: unknown;
150
+ __payload: Payload;
151
+ };
152
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
153
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
154
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
155
+
156
+ declare function alarm$1(httpClient: HttpClient): (seconds: number, options?: AlarmOptions) => Promise<AlarmResponse>;
157
+ declare function updateAlarm$1(httpClient: HttpClient): (_id: string, alarm: UpdateAlarm) => Promise<UpdateAlarmResponse & UpdateAlarmResponseNonNullableFields>;
158
+ declare const onAlarmTriggered$1: EventDefinition<AlarmTriggeredEnvelope, "wix.alarm.v1.alarm_alarm_triggered">;
159
+ declare const onAlarmSnoozed$1: EventDefinition<AlarmSnoozedEnvelope, "wix.alarm.v1.alarm_alarm_snoozed">;
160
+ declare const onAlarmDeleted$1: EventDefinition<AlarmDeletedEnvelope, "wix.alarm.v1.alarm_alarm_deleted">;
161
+
162
+ declare const alarm: BuildRESTFunction<typeof alarm$1>;
163
+ declare const updateAlarm: BuildRESTFunction<typeof updateAlarm$1>;
164
+ declare const onAlarmTriggered: BuildEventDefinition<typeof onAlarmTriggered$1>;
165
+ declare const onAlarmSnoozed: BuildEventDefinition<typeof onAlarmSnoozed$1>;
166
+ declare const onAlarmDeleted: BuildEventDefinition<typeof onAlarmDeleted$1>;
167
+
168
+ declare const context$2_alarm: typeof alarm;
169
+ declare const context$2_onAlarmDeleted: typeof onAlarmDeleted;
170
+ declare const context$2_onAlarmSnoozed: typeof onAlarmSnoozed;
171
+ declare const context$2_onAlarmTriggered: typeof onAlarmTriggered;
172
+ declare const context$2_updateAlarm: typeof updateAlarm;
173
+ declare namespace context$2 {
174
+ export { context$2_alarm as alarm, context$2_onAlarmDeleted as onAlarmDeleted, context$2_onAlarmSnoozed as onAlarmSnoozed, context$2_onAlarmTriggered as onAlarmTriggered, context$2_updateAlarm as updateAlarm };
175
+ }
176
+
177
+ interface Dispatched {
178
+ /** the message someone says */
179
+ echo?: EchoMessage;
180
+ }
181
+ interface IdentificationData extends IdentificationDataIdOneOf {
182
+ /** ID of a site visitor that has not logged in to the site. */
183
+ anonymousVisitorId?: string;
184
+ /** ID of a site visitor that has logged in to the site. */
185
+ memberId?: string;
186
+ /** ID of a Wix user (site owner, contributor, etc.). */
187
+ wixUserId?: string;
188
+ /** ID of an app. */
189
+ appId?: string;
190
+ /** @readonly */
191
+ identityType?: WebhookIdentityType;
192
+ }
193
+ /** @oneof */
194
+ interface IdentificationDataIdOneOf {
195
+ /** ID of a site visitor that has not logged in to the site. */
196
+ anonymousVisitorId?: string;
197
+ /** ID of a site visitor that has logged in to the site. */
198
+ memberId?: string;
199
+ /** ID of a Wix user (site owner, contributor, etc.). */
200
+ wixUserId?: string;
201
+ /** ID of an app. */
202
+ appId?: string;
203
+ }
204
+ declare enum WebhookIdentityType {
205
+ UNKNOWN = "UNKNOWN",
206
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
207
+ MEMBER = "MEMBER",
208
+ WIX_USER = "WIX_USER",
209
+ APP = "APP"
210
+ }
211
+ interface EchoMessage {
212
+ veloMessage: string;
213
+ id: string;
214
+ }
215
+ interface BaseEventMetadata {
216
+ /** App instance ID. */
217
+ instanceId?: string | null;
218
+ /** Event type. */
219
+ eventType?: string;
220
+ /** The identification type and identity data. */
221
+ identity?: IdentificationData;
222
+ }
223
+ interface EventMetadata extends BaseEventMetadata {
224
+ /**
225
+ * Unique event ID.
226
+ * Allows clients to ignore duplicate webhooks.
227
+ */
228
+ _id?: string;
229
+ /**
230
+ * Assumes actions are also always typed to an entity_type
231
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
232
+ */
233
+ entityFqdn?: string;
234
+ /**
235
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
236
+ * This is although the created/updated/deleted notion is duplication of the oneof types
237
+ * Example: created/updated/deleted/started/completed/email_opened
238
+ */
239
+ slug?: string;
240
+ /** ID of the entity associated with the event. */
241
+ entityId?: string;
242
+ /** Event timestamp. */
243
+ eventTime?: Date;
244
+ /**
245
+ * Whether the event was triggered as a result of a privacy regulation application
246
+ * (for example, GDPR).
247
+ */
248
+ triggeredByAnonymizeRequest?: boolean | null;
249
+ /** If present, indicates the action that triggered the event. */
250
+ originatedFrom?: string | null;
251
+ /**
252
+ * A sequence number defining the order of updates to the underlying entity.
253
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
254
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
255
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
256
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
257
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
258
+ */
259
+ entityEventSequence?: string | null;
260
+ }
261
+ interface EchoDispatchedEnvelope {
262
+ data: Dispatched;
263
+ metadata: EventMetadata;
264
+ }
265
+ interface EchoOptions {
266
+ /** 2nd part of the message */
267
+ arg2?: string;
268
+ /** this field test translatable annotation */
269
+ titleField?: string;
270
+ someInt32?: number;
271
+ someDate?: Date;
272
+ }
273
+
274
+ declare function echo$1(httpClient: HttpClient): (arg1: string, options?: EchoOptions) => Promise<string>;
275
+ declare const onEchoDispatched$1: EventDefinition<EchoDispatchedEnvelope, "wix.metroinspector.v1.echo_dispatched">;
276
+
277
+ declare const echo: BuildRESTFunction<typeof echo$1>;
278
+ declare const onEchoDispatched: BuildEventDefinition<typeof onEchoDispatched$1>;
279
+
280
+ declare const context$1_echo: typeof echo;
281
+ declare const context$1_onEchoDispatched: typeof onEchoDispatched;
282
+ declare namespace context$1 {
283
+ export { context$1_echo as echo, context$1_onEchoDispatched as onEchoDispatched };
284
+ }
285
+
286
+ /** Physical address */
287
+ interface Address extends AddressStreetOneOf {
288
+ /** Street name and number. */
289
+ streetAddress?: StreetAddress;
290
+ /** Main address line, usually street and number as free text. */
291
+ addressLine1?: string | null;
292
+ /** Country code. */
293
+ country?: string | null;
294
+ /** Subdivision shorthand. Usually, a short code (2 or 3 letters) that represents a state, region, prefecture, or province. e.g. NY */
295
+ subdivision?: string | null;
296
+ /** City name. */
297
+ city?: string | null;
298
+ /** Zip/postal code. */
299
+ postalCode?: string | null;
300
+ /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
301
+ addressLine2?: string | null;
302
+ }
303
+ /** @oneof */
304
+ interface AddressStreetOneOf {
305
+ /** Street name and number. */
306
+ streetAddress?: StreetAddress;
307
+ /** Main address line, usually street and number as free text. */
308
+ addressLine?: string | null;
309
+ }
310
+ interface StreetAddress {
311
+ /** Street number. */
312
+ number?: string;
313
+ /** Street name. */
314
+ name?: string;
315
+ }
316
+ interface PageLink {
317
+ /** The page id we want from the site */
318
+ pageId?: string;
319
+ /** Where this link should open, supports _self and _blank or any name the user chooses. _self means same page, _blank means new page. */
320
+ target?: string | null;
321
+ /** rel of link */
322
+ rel?: LinkRel[];
323
+ }
324
+ /**
325
+ * The 'rel' attribute of the link. The rel attribute defines the relationship between a linked resource and the current document.
326
+ * Further reading (also about different possible rel types): https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel
327
+ * Following are the accepted 'rel' types by Wix applications.
328
+ */
329
+ declare enum LinkRel {
330
+ /** default (not implemented) */
331
+ unknown_link_rel = "unknown_link_rel",
332
+ /** Indicates that the current document's original author or publisher does not endorse the referenced document. */
333
+ nofollow = "nofollow",
334
+ /** Instructs the browser to navigate to the target resource without granting the new browsing context access to the document that opened it. */
335
+ noopener = "noopener",
336
+ /** No Referer header will be included. Additionally, has the same effect as noopener. */
337
+ noreferrer = "noreferrer",
338
+ /** Indicates a link that resulted from advertisements or paid placements. */
339
+ sponsored = "sponsored"
340
+ }
341
+ interface Variant {
342
+ name?: string;
343
+ value?: string;
344
+ image?: string;
345
+ }
346
+ interface MyAddress {
347
+ country?: string | null;
348
+ subdivision?: string | null;
349
+ city?: string | null;
350
+ postalCode?: string | null;
351
+ streetAddress?: StreetAddress;
352
+ }
353
+ interface GetProductsStartWithResponse {
354
+ products?: Product[];
355
+ }
356
+ interface Cursors {
357
+ /** Cursor string pointing to the next page in the list of results. */
358
+ next?: string | null;
359
+ /** Cursor pointing to the previous page in the list of results. */
360
+ prev?: string | null;
361
+ }
362
+ interface BulkCreateProductsResponse {
363
+ results?: BulkProductResult[];
364
+ bulkActionMetadata?: BulkActionMetadata;
365
+ }
366
+ interface ItemMetadata {
367
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
368
+ _id?: string | null;
369
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
370
+ originalIndex?: number;
371
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
372
+ success?: boolean;
373
+ /** Details about the error in case of failure. */
374
+ error?: ApplicationError;
375
+ }
376
+ interface ApplicationError {
377
+ /** Error code. */
378
+ code?: string;
379
+ /** Description of the error. */
380
+ description?: string;
381
+ /** Data related to the error. */
382
+ data?: Record<string, any> | null;
383
+ }
384
+ interface BulkProductResult {
385
+ /** Defined in wix.commons */
386
+ itemMetadata?: ItemMetadata;
387
+ /** Only exists if `returnEntity` was set to true in the request */
388
+ item?: Product;
389
+ }
390
+ interface BulkActionMetadata {
391
+ /** Number of items that were successfully processed. */
392
+ totalSuccesses?: number;
393
+ /** Number of items that couldn't be processed. */
394
+ totalFailures?: number;
395
+ /** Number of failures without details because detailed failure threshold was exceeded. */
396
+ undetailedFailures?: number;
397
+ }
398
+ interface MaskedProduct {
399
+ /** Product to be updated, may be partial */
400
+ product?: Product;
401
+ }
402
+ interface BulkUpdateProductsResponse {
403
+ results?: BulkUpdateProductsResponseBulkProductResult[];
404
+ bulkActionMetadata?: BulkActionMetadata;
405
+ }
406
+ interface BulkUpdateProductsResponseBulkProductResult {
407
+ itemMetadata?: ItemMetadata;
408
+ /** Only exists if `returnEntity` was set to true in the request */
409
+ item?: Product;
410
+ }
411
+ interface BulkDeleteProductsResponse {
412
+ results?: BulkDeleteProductsResponseBulkProductResult[];
413
+ bulkActionMetadata?: BulkActionMetadata;
414
+ }
415
+ interface BulkDeleteProductsResponseBulkProductResult {
416
+ itemMetadata?: ItemMetadata;
417
+ }
418
+ interface GetProductsStartWithResponseNonNullableFields {
419
+ products: {
420
+ _id: string;
421
+ collectionId: string;
422
+ image: string;
423
+ document: string;
424
+ video: string;
425
+ pageLink?: {
426
+ pageId: string;
427
+ rel: LinkRel[];
428
+ };
429
+ audio: string;
430
+ variants: {
431
+ name: string;
432
+ value: string;
433
+ image: string;
434
+ }[];
435
+ mainVariant?: {
436
+ name: string;
437
+ value: string;
438
+ image: string;
439
+ };
440
+ guid: string;
441
+ }[];
442
+ }
443
+ interface BulkCreateProductsResponseNonNullableFields {
444
+ results: {
445
+ itemMetadata?: {
446
+ originalIndex: number;
447
+ success: boolean;
448
+ error?: {
449
+ code: string;
450
+ description: string;
451
+ };
452
+ };
453
+ item?: {
454
+ _id: string;
455
+ collectionId: string;
456
+ image: string;
457
+ document: string;
458
+ video: string;
459
+ pageLink?: {
460
+ pageId: string;
461
+ rel: LinkRel[];
462
+ };
463
+ audio: string;
464
+ variants: {
465
+ name: string;
466
+ value: string;
467
+ image: string;
468
+ }[];
469
+ mainVariant?: {
470
+ name: string;
471
+ value: string;
472
+ image: string;
473
+ };
474
+ guid: string;
475
+ };
476
+ }[];
477
+ bulkActionMetadata?: {
478
+ totalSuccesses: number;
479
+ totalFailures: number;
480
+ undetailedFailures: number;
481
+ };
482
+ }
483
+ interface BulkUpdateProductsResponseNonNullableFields {
484
+ results: {
485
+ itemMetadata?: {
486
+ originalIndex: number;
487
+ success: boolean;
488
+ error?: {
489
+ code: string;
490
+ description: string;
491
+ };
492
+ };
493
+ item?: {
494
+ _id: string;
495
+ collectionId: string;
496
+ image: string;
497
+ document: string;
498
+ video: string;
499
+ pageLink?: {
500
+ pageId: string;
501
+ rel: LinkRel[];
502
+ };
503
+ audio: string;
504
+ variants: {
505
+ name: string;
506
+ value: string;
507
+ image: string;
508
+ }[];
509
+ mainVariant?: {
510
+ name: string;
511
+ value: string;
512
+ image: string;
513
+ };
514
+ guid: string;
515
+ };
516
+ }[];
517
+ bulkActionMetadata?: {
518
+ totalSuccesses: number;
519
+ totalFailures: number;
520
+ undetailedFailures: number;
521
+ };
522
+ }
523
+ interface BulkDeleteProductsResponseNonNullableFields {
524
+ results: {
525
+ itemMetadata?: {
526
+ originalIndex: number;
527
+ success: boolean;
528
+ error?: {
529
+ code: string;
530
+ description: string;
531
+ };
532
+ };
533
+ }[];
534
+ bulkActionMetadata?: {
535
+ totalSuccesses: number;
536
+ totalFailures: number;
537
+ undetailedFailures: number;
538
+ };
539
+ }
540
+ interface Product {
541
+ _id: string;
542
+ name: string | null;
543
+ collectionId: string;
544
+ _createdDate: Date;
545
+ modifiedDate: Date;
546
+ image: string;
547
+ address: Address;
548
+ document: string;
549
+ video: string;
550
+ pageLink: PageLink;
551
+ audio: string;
552
+ color: string | null;
553
+ localDate: string | null;
554
+ localTime: string | null;
555
+ localDateTime: string | null;
556
+ variants: Variant[];
557
+ mainVariant: Variant;
558
+ customAddress: MyAddress;
559
+ guid: string;
560
+ }
561
+ interface CreateProductOptionsRequiredFields {
562
+ product?: {
563
+ title: unknown;
564
+ };
565
+ }
566
+ interface CreateProductOptions {
567
+ product?: Product;
568
+ }
569
+ interface UpdateProductOptionsRequiredFields {
570
+ product?: {
571
+ _id: string;
572
+ };
573
+ }
574
+ interface UpdateProductOptions {
575
+ product?: Product;
576
+ }
577
+ interface GetProductsStartWithOptions {
578
+ addressLine2?: string | null;
579
+ }
580
+ interface QueryProductsOptions {
581
+ /** Whether variants should be included in the response. */
582
+ includeVariants?: boolean | undefined;
583
+ /** Whether hidden products should be included in the response. Requires permissions to manage products. */
584
+ includeHiddenProducts?: boolean | undefined;
585
+ /** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
586
+ includeMerchantSpecificData?: boolean | undefined;
587
+ }
588
+ interface QueryCursorResult {
589
+ cursors: Cursors;
590
+ hasNext: () => boolean;
591
+ hasPrev: () => boolean;
592
+ length: number;
593
+ pageSize: number;
594
+ }
595
+ interface ProductsQueryResult extends QueryCursorResult {
596
+ items: Product[];
597
+ query: ProductsQueryBuilder;
598
+ next: () => Promise<ProductsQueryResult>;
599
+ prev: () => Promise<ProductsQueryResult>;
600
+ }
601
+ interface ProductsQueryBuilder {
602
+ /** @param propertyName - Property whose value is compared with `value`.
603
+ * @param value - Value to compare against.
604
+ * @documentationMaturity preview
605
+ */
606
+ eq: (propertyName: 'title' | 'collectionId' | 'guid', value: any) => ProductsQueryBuilder;
607
+ /** @param propertyName - Property whose value is compared with `value`.
608
+ * @param value - Value to compare against.
609
+ * @documentationMaturity preview
610
+ */
611
+ ne: (propertyName: 'title' | 'guid', value: any) => ProductsQueryBuilder;
612
+ /** @param propertyName - Property whose value is compared with `string`.
613
+ * @param string - String to compare against. Case-insensitive.
614
+ * @documentationMaturity preview
615
+ */
616
+ startsWith: (propertyName: 'title' | 'guid', value: string) => ProductsQueryBuilder;
617
+ /** @param propertyName - Property whose value is compared with `values`.
618
+ * @param values - List of values to compare against.
619
+ * @documentationMaturity preview
620
+ */
621
+ hasSome: (propertyName: 'title' | 'guid', value: any[]) => ProductsQueryBuilder;
622
+ /** @documentationMaturity preview */
623
+ in: (propertyName: 'title' | 'guid', value: any) => ProductsQueryBuilder;
624
+ /** @documentationMaturity preview */
625
+ exists: (propertyName: 'title' | 'guid', value: boolean) => ProductsQueryBuilder;
626
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
627
+ * @documentationMaturity preview
628
+ */
629
+ ascending: (...propertyNames: Array<'title' | 'collectionId' | 'guid'>) => ProductsQueryBuilder;
630
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
631
+ * @documentationMaturity preview
632
+ */
633
+ descending: (...propertyNames: Array<'title' | 'collectionId' | 'guid'>) => ProductsQueryBuilder;
634
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
635
+ * @documentationMaturity preview
636
+ */
637
+ limit: (limit: number) => ProductsQueryBuilder;
638
+ /** @param cursor - A pointer to specific record
639
+ * @documentationMaturity preview
640
+ */
641
+ skipTo: (cursor: string) => ProductsQueryBuilder;
642
+ /** @documentationMaturity preview */
643
+ find: () => Promise<ProductsQueryResult>;
644
+ }
645
+ interface BulkCreateProductsOptions {
646
+ /** set to `true` if you wish to receive back the created products in the response */
647
+ returnEntity?: boolean;
648
+ }
649
+ interface BulkUpdateProductsOptions {
650
+ /** set to `true` if you wish to receive back the updated products in the response */
651
+ returnEntity?: boolean;
652
+ }
653
+
654
+ declare function createProduct$1(httpClient: HttpClient): (options?: CreateProductOptions & CreateProductOptionsRequiredFields) => Promise<Product & {
655
+ _id: string;
656
+ collectionId: string;
657
+ image: string;
658
+ document: string;
659
+ video: string;
660
+ pageLink?: {
661
+ pageId: string;
662
+ rel: LinkRel[];
663
+ } | undefined;
664
+ audio: string;
665
+ variants: {
666
+ name: string;
667
+ value: string;
668
+ image: string;
669
+ }[];
670
+ mainVariant?: {
671
+ name: string;
672
+ value: string;
673
+ image: string;
674
+ } | undefined;
675
+ guid: string;
676
+ }>;
677
+ declare function deleteProduct$1(httpClient: HttpClient): (productId: string) => Promise<void>;
678
+ declare function updateProduct$1(httpClient: HttpClient): (productId: string, options?: UpdateProductOptions & UpdateProductOptionsRequiredFields) => Promise<Product & {
679
+ _id: string;
680
+ collectionId: string;
681
+ image: string;
682
+ document: string;
683
+ video: string;
684
+ pageLink?: {
685
+ pageId: string;
686
+ rel: LinkRel[];
687
+ } | undefined;
688
+ audio: string;
689
+ variants: {
690
+ name: string;
691
+ value: string;
692
+ image: string;
693
+ }[];
694
+ mainVariant?: {
695
+ name: string;
696
+ value: string;
697
+ image: string;
698
+ } | undefined;
699
+ guid: string;
700
+ }>;
701
+ declare function getProduct$1(httpClient: HttpClient): (productId: string) => Promise<Product & {
702
+ _id: string;
703
+ collectionId: string;
704
+ image: string;
705
+ document: string;
706
+ video: string;
707
+ pageLink?: {
708
+ pageId: string;
709
+ rel: LinkRel[];
710
+ } | undefined;
711
+ audio: string;
712
+ variants: {
713
+ name: string;
714
+ value: string;
715
+ image: string;
716
+ }[];
717
+ mainVariant?: {
718
+ name: string;
719
+ value: string;
720
+ image: string;
721
+ } | undefined;
722
+ guid: string;
723
+ }>;
724
+ declare function getProductsStartWith$1(httpClient: HttpClient): (title: string, options?: GetProductsStartWithOptions) => Promise<GetProductsStartWithResponse & GetProductsStartWithResponseNonNullableFields>;
725
+ declare function queryProducts$1(httpClient: HttpClient): (options?: QueryProductsOptions) => ProductsQueryBuilder;
726
+ declare function bulkCreateProducts$1(httpClient: HttpClient): (products: Product[], options?: BulkCreateProductsOptions) => Promise<BulkCreateProductsResponse & BulkCreateProductsResponseNonNullableFields>;
727
+ declare function bulkUpdateProducts$1(httpClient: HttpClient): (products: MaskedProduct[], options?: BulkUpdateProductsOptions) => Promise<BulkUpdateProductsResponse & BulkUpdateProductsResponseNonNullableFields>;
728
+ declare function bulkDeleteProducts$1(httpClient: HttpClient): (productIds: string[]) => Promise<BulkDeleteProductsResponse & BulkDeleteProductsResponseNonNullableFields>;
729
+
730
+ declare const createProduct: BuildRESTFunction<typeof createProduct$1>;
731
+ declare const deleteProduct: BuildRESTFunction<typeof deleteProduct$1>;
732
+ declare const updateProduct: BuildRESTFunction<typeof updateProduct$1>;
733
+ declare const getProduct: BuildRESTFunction<typeof getProduct$1>;
734
+ declare const getProductsStartWith: BuildRESTFunction<typeof getProductsStartWith$1>;
735
+ declare const queryProducts: BuildRESTFunction<typeof queryProducts$1>;
736
+ declare const bulkCreateProducts: BuildRESTFunction<typeof bulkCreateProducts$1>;
737
+ declare const bulkUpdateProducts: BuildRESTFunction<typeof bulkUpdateProducts$1>;
738
+ declare const bulkDeleteProducts: BuildRESTFunction<typeof bulkDeleteProducts$1>;
739
+
740
+ declare const context_bulkCreateProducts: typeof bulkCreateProducts;
741
+ declare const context_bulkDeleteProducts: typeof bulkDeleteProducts;
742
+ declare const context_bulkUpdateProducts: typeof bulkUpdateProducts;
743
+ declare const context_createProduct: typeof createProduct;
744
+ declare const context_deleteProduct: typeof deleteProduct;
745
+ declare const context_getProduct: typeof getProduct;
746
+ declare const context_getProductsStartWith: typeof getProductsStartWith;
747
+ declare const context_queryProducts: typeof queryProducts;
748
+ declare const context_updateProduct: typeof updateProduct;
749
+ declare namespace context {
750
+ export { context_bulkCreateProducts as bulkCreateProducts, context_bulkDeleteProducts as bulkDeleteProducts, context_bulkUpdateProducts as bulkUpdateProducts, context_createProduct as createProduct, context_deleteProduct as deleteProduct, context_getProduct as getProduct, context_getProductsStartWith as getProductsStartWith, context_queryProducts as queryProducts, context_updateProduct as updateProduct };
751
+ }
752
+
753
+ export { context$2 as alarms, context$1 as metroinspector, context as products };