@wix/auto_sdk_restaurants_recipients 1.0.0

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.
Files changed (39) hide show
  1. package/build/cjs/index.d.ts +103 -0
  2. package/build/cjs/index.js +672 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +827 -0
  5. package/build/cjs/index.typings.js +545 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +357 -0
  8. package/build/cjs/meta.js +436 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/es/index.d.mts +103 -0
  11. package/build/es/index.mjs +636 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/es/index.typings.d.mts +827 -0
  14. package/build/es/index.typings.mjs +512 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +357 -0
  17. package/build/es/meta.mjs +403 -0
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/es/package.json +3 -0
  20. package/build/internal/cjs/index.d.ts +103 -0
  21. package/build/internal/cjs/index.js +672 -0
  22. package/build/internal/cjs/index.js.map +1 -0
  23. package/build/internal/cjs/index.typings.d.ts +827 -0
  24. package/build/internal/cjs/index.typings.js +545 -0
  25. package/build/internal/cjs/index.typings.js.map +1 -0
  26. package/build/internal/cjs/meta.d.ts +357 -0
  27. package/build/internal/cjs/meta.js +436 -0
  28. package/build/internal/cjs/meta.js.map +1 -0
  29. package/build/internal/es/index.d.mts +103 -0
  30. package/build/internal/es/index.mjs +636 -0
  31. package/build/internal/es/index.mjs.map +1 -0
  32. package/build/internal/es/index.typings.d.mts +827 -0
  33. package/build/internal/es/index.typings.mjs +512 -0
  34. package/build/internal/es/index.typings.mjs.map +1 -0
  35. package/build/internal/es/meta.d.mts +357 -0
  36. package/build/internal/es/meta.mjs +403 -0
  37. package/build/internal/es/meta.mjs.map +1 -0
  38. package/meta/package.json +3 -0
  39. package/package.json +54 -0
@@ -0,0 +1,827 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
3
+ interface Recipient {
4
+ /**
5
+ * Recipient ID.
6
+ * @format GUID
7
+ * @readonly
8
+ */
9
+ _id?: string | null;
10
+ /**
11
+ * Revision number, which increments by 1 each time the Recipient is updated.
12
+ * To prevent conflicting changes,
13
+ * the current revision must be passed when updating the Recipient.
14
+ *
15
+ * Ignored when creating a Recipient.
16
+ * @readonly
17
+ */
18
+ revision?: string | null;
19
+ /**
20
+ * Date and time the Recipient was created.
21
+ * @readonly
22
+ */
23
+ _createdDate?: Date | null;
24
+ /**
25
+ * Date and time the Recipient was last updated.
26
+ * @readonly
27
+ */
28
+ _updatedDate?: Date | null;
29
+ /**
30
+ * Recipient's phone number for receiving notifications.
31
+ * @format PHONE
32
+ */
33
+ phone?: string;
34
+ /**
35
+ * IDs of the business locations this recipient should receive order creation notifications for.
36
+ *
37
+ * If this list is empty the recipient receives notifications for orders created at all locations.
38
+ * @maxSize 100
39
+ * @format GUID
40
+ */
41
+ businessLocationIds?: string[];
42
+ /**
43
+ * Communication channels for sending notifications to the recipient.
44
+ *
45
+ * At least 1 channel is required. Recipients can receive notifications
46
+ * through multiple channels simultaneously.
47
+ * @minSize 1
48
+ * @maxSize 2
49
+ */
50
+ channels?: ChannelWithLiterals[];
51
+ /**
52
+ * Additional information about the recipient.
53
+ *
54
+ * Use this field to store notes about the recipient's role, availability,
55
+ * or other relevant details for notification management.
56
+ * @maxLength 500
57
+ */
58
+ note?: string | null;
59
+ /**
60
+ * Additional custom fields for the recipient.
61
+ *
62
+ * Learn more about [extended fields](https://dev.wix.com/docs/api-reference/business-solutions/wix-api/extended-fields).
63
+ */
64
+ extendedFields?: ExtendedFields;
65
+ /**
66
+ * Tags for categorizing and organizing recipients.
67
+ *
68
+ * Use tags to group recipients by role (manager, kitchen staff), shift (morning, evening), or other criteria for targeted notifications.
69
+ */
70
+ tags?: Tags;
71
+ }
72
+ declare enum Channel {
73
+ UNKNOWN_CHANNEL = "UNKNOWN_CHANNEL",
74
+ /** Send notifications via SMS text messages. */
75
+ SMS = "SMS",
76
+ /** Send notifications via phone calls. */
77
+ PHONE = "PHONE"
78
+ }
79
+ /** @enumType */
80
+ type ChannelWithLiterals = Channel | 'UNKNOWN_CHANNEL' | 'SMS' | 'PHONE';
81
+ interface ExtendedFields {
82
+ /**
83
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
84
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
85
+ *
86
+ * You can only access fields for which you have the appropriate permissions.
87
+ *
88
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
89
+ */
90
+ namespaces?: Record<string, Record<string, any>>;
91
+ }
92
+ /**
93
+ * Common object for tags.
94
+ * Should be use as in this example:
95
+ * message Foo {
96
+ * option (.wix.api.decomposite_of) = "wix.commons.v2.tags.Foo";
97
+ * string id = 1;
98
+ * ...
99
+ * Tags tags = 5
100
+ * }
101
+ *
102
+ * example of taggable entity
103
+ * {
104
+ * id: "123"
105
+ * tags: {
106
+ * public_tags: {
107
+ * tag_ids:["11","22"]
108
+ * },
109
+ * private_tags: {
110
+ * tag_ids: ["33", "44"]
111
+ * }
112
+ * }
113
+ * }
114
+ */
115
+ interface Tags {
116
+ /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */
117
+ privateTags?: TagList;
118
+ /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */
119
+ publicTags?: TagList;
120
+ }
121
+ interface TagList {
122
+ /**
123
+ * List of tag IDs.
124
+ * @maxSize 100
125
+ * @maxLength 5
126
+ */
127
+ tagIds?: string[];
128
+ }
129
+ interface CreateRecipientRequest {
130
+ /** Recipient to create. */
131
+ recipient: Recipient;
132
+ }
133
+ interface CreateRecipientResponse {
134
+ /** Created recipient. */
135
+ recipient?: Recipient;
136
+ }
137
+ interface GetRecipientRequest {
138
+ /**
139
+ * ID of the recipient to retrieve.
140
+ * @format GUID
141
+ */
142
+ recipientId: string;
143
+ }
144
+ interface GetRecipientResponse {
145
+ /** Retrieved recipient. */
146
+ recipient?: Recipient;
147
+ }
148
+ interface UpdateRecipientRequest {
149
+ /** Recipient to update. May be partial. */
150
+ recipient: Recipient;
151
+ }
152
+ interface UpdateRecipientResponse {
153
+ /** Updated recipient. */
154
+ recipient?: Recipient;
155
+ }
156
+ interface DeleteRecipientRequest {
157
+ /**
158
+ * ID of the recipient to delete.
159
+ * @format GUID
160
+ */
161
+ recipientId: string;
162
+ }
163
+ interface DeleteRecipientResponse {
164
+ }
165
+ interface QueryRecipientsRequest {
166
+ /** WQL expression. */
167
+ query?: CursorQuery;
168
+ }
169
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
170
+ /**
171
+ * Cursor paging options.
172
+ *
173
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
174
+ */
175
+ cursorPaging?: CursorPaging;
176
+ /**
177
+ * Filter object.
178
+ *
179
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
180
+ */
181
+ filter?: Record<string, any> | null;
182
+ /**
183
+ * Sort object.
184
+ *
185
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
186
+ * @maxSize 5
187
+ */
188
+ sort?: Sorting[];
189
+ }
190
+ /** @oneof */
191
+ interface CursorQueryPagingMethodOneOf {
192
+ /**
193
+ * Cursor paging options.
194
+ *
195
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
196
+ */
197
+ cursorPaging?: CursorPaging;
198
+ }
199
+ interface Sorting {
200
+ /**
201
+ * Name of the field to sort by.
202
+ * @maxLength 512
203
+ */
204
+ fieldName?: string;
205
+ /** Sort order. */
206
+ order?: SortOrderWithLiterals;
207
+ }
208
+ declare enum SortOrder {
209
+ ASC = "ASC",
210
+ DESC = "DESC"
211
+ }
212
+ /** @enumType */
213
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
214
+ interface CursorPaging {
215
+ /**
216
+ * Maximum number of items to return in the results.
217
+ * @max 100
218
+ */
219
+ limit?: number | null;
220
+ /**
221
+ * Pointer to the next or previous page in the list of results.
222
+ *
223
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
224
+ * Not relevant for the first request.
225
+ * @maxLength 16000
226
+ */
227
+ cursor?: string | null;
228
+ }
229
+ interface QueryRecipientsResponse {
230
+ /** Retrieved recipients. */
231
+ recipients?: Recipient[];
232
+ /** Paging metadata for the query results. */
233
+ pagingMetadata?: CursorPagingMetadata;
234
+ }
235
+ interface CursorPagingMetadata {
236
+ /** Number of items returned in current page. */
237
+ count?: number | null;
238
+ /** Cursor strings that point to the next page, previous page, or both. */
239
+ cursors?: Cursors;
240
+ /**
241
+ * Whether there are more pages to retrieve following the current page.
242
+ *
243
+ * + `true`: Another page of results can be retrieved.
244
+ * + `false`: This is the last page.
245
+ */
246
+ hasNext?: boolean | null;
247
+ }
248
+ interface Cursors {
249
+ /**
250
+ * Cursor string pointing to the next page in the list of results.
251
+ * @maxLength 16000
252
+ */
253
+ next?: string | null;
254
+ /**
255
+ * Cursor pointing to the previous page in the list of results.
256
+ * @maxLength 16000
257
+ */
258
+ prev?: string | null;
259
+ }
260
+ interface BulkUpdateRecipientTagsRequest {
261
+ /**
262
+ * IDs of recipients to update tags for.
263
+ * @minSize 1
264
+ * @maxSize 100
265
+ * @format GUID
266
+ */
267
+ recipientIds: string[];
268
+ /** List of Tags to assign. */
269
+ assignTags?: Tags;
270
+ /** List of Tags to unassign. */
271
+ unassignTags?: Tags;
272
+ }
273
+ interface BulkUpdateRecipientTagsResponse {
274
+ /**
275
+ * Results of the bulk update operation.
276
+ * @minSize 1
277
+ * @maxSize 100
278
+ */
279
+ results?: BulkUpdateRecipientTagsResult[];
280
+ /** Metadata regarding the bulk update operation. */
281
+ bulkActionMetadata?: BulkActionMetadata;
282
+ }
283
+ interface ItemMetadata {
284
+ /**
285
+ * Item ID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.
286
+ * @format GUID
287
+ */
288
+ _id?: string | null;
289
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
290
+ originalIndex?: number;
291
+ /** Whether the requested action for this item was successful. When `false`, the `error` field is returned. */
292
+ success?: boolean;
293
+ /** Details about the error in case of failure. */
294
+ error?: ApplicationError;
295
+ }
296
+ interface ApplicationError {
297
+ /** Error code. */
298
+ code?: string;
299
+ /** Description of the error. */
300
+ description?: string;
301
+ /** Data related to the error. */
302
+ data?: Record<string, any> | null;
303
+ }
304
+ interface BulkUpdateRecipientTagsResult {
305
+ /** Metadata regarding the specific single update operation. */
306
+ itemMetadata?: ItemMetadata;
307
+ }
308
+ interface BulkActionMetadata {
309
+ /** Number of items that were successfully processed. */
310
+ totalSuccesses?: number;
311
+ /** Number of items that couldn't be processed. */
312
+ totalFailures?: number;
313
+ /** Number of failures without details because detailed failure threshold was exceeded. */
314
+ undetailedFailures?: number;
315
+ }
316
+ interface BulkUpdateRecipientTagsByFilterRequest {
317
+ /** Filter. */
318
+ filter: Record<string, any> | null;
319
+ /** List of Tags to assign. */
320
+ assignTags?: Tags;
321
+ /** List of Tags to unassign. */
322
+ unassignTags?: Tags;
323
+ }
324
+ interface BulkUpdateRecipientTagsByFilterResponse {
325
+ /**
326
+ * Job ID.
327
+ * @format GUID
328
+ */
329
+ jobId?: string;
330
+ }
331
+ interface DomainEvent extends DomainEventBodyOneOf {
332
+ createdEvent?: EntityCreatedEvent;
333
+ updatedEvent?: EntityUpdatedEvent;
334
+ deletedEvent?: EntityDeletedEvent;
335
+ actionEvent?: ActionEvent;
336
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
337
+ _id?: string;
338
+ /**
339
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
340
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
341
+ */
342
+ entityFqdn?: string;
343
+ /**
344
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
345
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
346
+ */
347
+ slug?: string;
348
+ /** ID of the entity associated with the event. */
349
+ entityId?: string;
350
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
351
+ eventTime?: Date | null;
352
+ /**
353
+ * Whether the event was triggered as a result of a privacy regulation application
354
+ * (for example, GDPR).
355
+ */
356
+ triggeredByAnonymizeRequest?: boolean | null;
357
+ /** If present, indicates the action that triggered the event. */
358
+ originatedFrom?: string | null;
359
+ /**
360
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
361
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
362
+ */
363
+ entityEventSequence?: string | null;
364
+ }
365
+ /** @oneof */
366
+ interface DomainEventBodyOneOf {
367
+ createdEvent?: EntityCreatedEvent;
368
+ updatedEvent?: EntityUpdatedEvent;
369
+ deletedEvent?: EntityDeletedEvent;
370
+ actionEvent?: ActionEvent;
371
+ }
372
+ interface EntityCreatedEvent {
373
+ entity?: string;
374
+ }
375
+ interface RestoreInfo {
376
+ deletedDate?: Date | null;
377
+ }
378
+ interface EntityUpdatedEvent {
379
+ /**
380
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
381
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
382
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
383
+ */
384
+ currentEntity?: string;
385
+ }
386
+ interface EntityDeletedEvent {
387
+ /** Entity that was deleted. */
388
+ deletedEntity?: string | null;
389
+ }
390
+ interface ActionEvent {
391
+ body?: string;
392
+ }
393
+ interface MessageEnvelope {
394
+ /**
395
+ * App instance ID.
396
+ * @format GUID
397
+ */
398
+ instanceId?: string | null;
399
+ /**
400
+ * Event type.
401
+ * @maxLength 150
402
+ */
403
+ eventType?: string;
404
+ /** The identification type and identity data. */
405
+ identity?: IdentificationData;
406
+ /** Stringify payload. */
407
+ data?: string;
408
+ }
409
+ interface IdentificationData extends IdentificationDataIdOneOf {
410
+ /**
411
+ * ID of a site visitor that has not logged in to the site.
412
+ * @format GUID
413
+ */
414
+ anonymousVisitorId?: string;
415
+ /**
416
+ * ID of a site visitor that has logged in to the site.
417
+ * @format GUID
418
+ */
419
+ memberId?: string;
420
+ /**
421
+ * ID of a Wix user (site owner, contributor, etc.).
422
+ * @format GUID
423
+ */
424
+ wixUserId?: string;
425
+ /**
426
+ * ID of an app.
427
+ * @format GUID
428
+ */
429
+ appId?: string;
430
+ /** @readonly */
431
+ identityType?: WebhookIdentityTypeWithLiterals;
432
+ }
433
+ /** @oneof */
434
+ interface IdentificationDataIdOneOf {
435
+ /**
436
+ * ID of a site visitor that has not logged in to the site.
437
+ * @format GUID
438
+ */
439
+ anonymousVisitorId?: string;
440
+ /**
441
+ * ID of a site visitor that has logged in to the site.
442
+ * @format GUID
443
+ */
444
+ memberId?: string;
445
+ /**
446
+ * ID of a Wix user (site owner, contributor, etc.).
447
+ * @format GUID
448
+ */
449
+ wixUserId?: string;
450
+ /**
451
+ * ID of an app.
452
+ * @format GUID
453
+ */
454
+ appId?: string;
455
+ }
456
+ declare enum WebhookIdentityType {
457
+ UNKNOWN = "UNKNOWN",
458
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
459
+ MEMBER = "MEMBER",
460
+ WIX_USER = "WIX_USER",
461
+ APP = "APP"
462
+ }
463
+ /** @enumType */
464
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
465
+ /** @docsIgnore */
466
+ type BulkUpdateRecipientTagsApplicationErrors = {
467
+ code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
468
+ description?: string;
469
+ data?: Record<string, any>;
470
+ };
471
+ /** @docsIgnore */
472
+ type BulkUpdateRecipientTagsByFilterApplicationErrors = {
473
+ code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';
474
+ description?: string;
475
+ data?: Record<string, any>;
476
+ };
477
+ interface BaseEventMetadata {
478
+ /**
479
+ * App instance ID.
480
+ * @format GUID
481
+ */
482
+ instanceId?: string | null;
483
+ /**
484
+ * Event type.
485
+ * @maxLength 150
486
+ */
487
+ eventType?: string;
488
+ /** The identification type and identity data. */
489
+ identity?: IdentificationData;
490
+ }
491
+ interface EventMetadata extends BaseEventMetadata {
492
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
493
+ _id?: string;
494
+ /**
495
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
496
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
497
+ */
498
+ entityFqdn?: string;
499
+ /**
500
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
501
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
502
+ */
503
+ slug?: string;
504
+ /** ID of the entity associated with the event. */
505
+ entityId?: string;
506
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
507
+ eventTime?: Date | null;
508
+ /**
509
+ * Whether the event was triggered as a result of a privacy regulation application
510
+ * (for example, GDPR).
511
+ */
512
+ triggeredByAnonymizeRequest?: boolean | null;
513
+ /** If present, indicates the action that triggered the event. */
514
+ originatedFrom?: string | null;
515
+ /**
516
+ * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
517
+ * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
518
+ */
519
+ entityEventSequence?: string | null;
520
+ }
521
+ interface RecipientCreatedEnvelope {
522
+ entity: Recipient;
523
+ metadata: EventMetadata;
524
+ }
525
+ /** @permissionScope Manage Restaurants - all permissions
526
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
527
+ * @permissionId RESTAURANTS.RECIPIENT_READ
528
+ * @webhook
529
+ * @eventType wix.restaurants.recipient.v1.recipient_created
530
+ * @slug created
531
+ * @documentationMaturity preview
532
+ */
533
+ declare function onRecipientCreated(handler: (event: RecipientCreatedEnvelope) => void | Promise<void>): void;
534
+ interface RecipientDeletedEnvelope {
535
+ entity: Recipient;
536
+ metadata: EventMetadata;
537
+ }
538
+ /** @permissionScope Manage Restaurants - all permissions
539
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
540
+ * @permissionId RESTAURANTS.RECIPIENT_READ
541
+ * @webhook
542
+ * @eventType wix.restaurants.recipient.v1.recipient_deleted
543
+ * @slug deleted
544
+ * @documentationMaturity preview
545
+ */
546
+ declare function onRecipientDeleted(handler: (event: RecipientDeletedEnvelope) => void | Promise<void>): void;
547
+ interface RecipientUpdatedEnvelope {
548
+ entity: Recipient;
549
+ metadata: EventMetadata;
550
+ }
551
+ /** @permissionScope Manage Restaurants - all permissions
552
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
553
+ * @permissionId RESTAURANTS.RECIPIENT_READ
554
+ * @webhook
555
+ * @eventType wix.restaurants.recipient.v1.recipient_updated
556
+ * @slug updated
557
+ * @documentationMaturity preview
558
+ */
559
+ declare function onRecipientUpdated(handler: (event: RecipientUpdatedEnvelope) => void | Promise<void>): void;
560
+ /**
561
+ * Creates a recipient.
562
+ * @param recipient - Recipient to create.
563
+ * @public
564
+ * @documentationMaturity preview
565
+ * @requiredField recipient
566
+ * @requiredField recipient.channels
567
+ * @permissionId RESTAURANTS.RECIPIENT_CREATE
568
+ * @applicableIdentity APP
569
+ * @returns Created recipient.
570
+ * @fqn wix.restaurants.recipient.v1.NotificationRecipientsService.CreateRecipient
571
+ */
572
+ declare function createRecipient(recipient: NonNullablePaths<Recipient, `channels`, 2>): Promise<NonNullablePaths<Recipient, `phone` | `businessLocationIds` | `channels` | `tags.privateTags.tagIds`, 4>>;
573
+ /**
574
+ * Retrieves a recipient by ID.
575
+ * @param recipientId - ID of the recipient to retrieve.
576
+ * @public
577
+ * @documentationMaturity preview
578
+ * @requiredField recipientId
579
+ * @permissionId RESTAURANTS.RECIPIENT_READ
580
+ * @applicableIdentity APP
581
+ * @returns Retrieved recipient.
582
+ * @fqn wix.restaurants.recipient.v1.NotificationRecipientsService.GetRecipient
583
+ */
584
+ declare function getRecipient(recipientId: string): Promise<NonNullablePaths<Recipient, `phone` | `businessLocationIds` | `channels` | `tags.privateTags.tagIds`, 4>>;
585
+ /**
586
+ * Updates a recipient's information.
587
+ *
588
+ * Each time the recipient is updated, `revision` increments by 1.
589
+ * The current `revision` must be passed when updating the recipient.
590
+ * This ensures you're working with the latest recipient and prevents unintended overwrites.
591
+ * @param _id - Recipient ID.
592
+ * @public
593
+ * @documentationMaturity preview
594
+ * @requiredField _id
595
+ * @requiredField recipient
596
+ * @requiredField recipient.revision
597
+ * @permissionId RESTAURANTS.RECIPIENT_UPDATE
598
+ * @applicableIdentity APP
599
+ * @returns Updated recipient.
600
+ * @fqn wix.restaurants.recipient.v1.NotificationRecipientsService.UpdateRecipient
601
+ */
602
+ declare function updateRecipient(_id: string, recipient: NonNullablePaths<UpdateRecipient, `revision`, 2>): Promise<NonNullablePaths<Recipient, `phone` | `businessLocationIds` | `channels` | `tags.privateTags.tagIds`, 4>>;
603
+ interface UpdateRecipient {
604
+ /**
605
+ * Recipient ID.
606
+ * @format GUID
607
+ * @readonly
608
+ */
609
+ _id?: string | null;
610
+ /**
611
+ * Revision number, which increments by 1 each time the Recipient is updated.
612
+ * To prevent conflicting changes,
613
+ * the current revision must be passed when updating the Recipient.
614
+ *
615
+ * Ignored when creating a Recipient.
616
+ * @readonly
617
+ */
618
+ revision?: string | null;
619
+ /**
620
+ * Date and time the Recipient was created.
621
+ * @readonly
622
+ */
623
+ _createdDate?: Date | null;
624
+ /**
625
+ * Date and time the Recipient was last updated.
626
+ * @readonly
627
+ */
628
+ _updatedDate?: Date | null;
629
+ /**
630
+ * Recipient's phone number for receiving notifications.
631
+ * @format PHONE
632
+ */
633
+ phone?: string;
634
+ /**
635
+ * IDs of the business locations this recipient should receive order creation notifications for.
636
+ *
637
+ * If this list is empty the recipient receives notifications for orders created at all locations.
638
+ * @maxSize 100
639
+ * @format GUID
640
+ */
641
+ businessLocationIds?: string[];
642
+ /**
643
+ * Communication channels for sending notifications to the recipient.
644
+ *
645
+ * At least 1 channel is required. Recipients can receive notifications
646
+ * through multiple channels simultaneously.
647
+ * @minSize 1
648
+ * @maxSize 2
649
+ */
650
+ channels?: ChannelWithLiterals[];
651
+ /**
652
+ * Additional information about the recipient.
653
+ *
654
+ * Use this field to store notes about the recipient's role, availability,
655
+ * or other relevant details for notification management.
656
+ * @maxLength 500
657
+ */
658
+ note?: string | null;
659
+ /**
660
+ * Additional custom fields for the recipient.
661
+ *
662
+ * Learn more about [extended fields](https://dev.wix.com/docs/api-reference/business-solutions/wix-api/extended-fields).
663
+ */
664
+ extendedFields?: ExtendedFields;
665
+ /**
666
+ * Tags for categorizing and organizing recipients.
667
+ *
668
+ * Use tags to group recipients by role (manager, kitchen staff), shift (morning, evening), or other criteria for targeted notifications.
669
+ */
670
+ tags?: Tags;
671
+ }
672
+ /**
673
+ * Deletes a recipient.
674
+ * @param recipientId - ID of the recipient to delete.
675
+ * @public
676
+ * @documentationMaturity preview
677
+ * @requiredField recipientId
678
+ * @permissionId RESTAURANTS.RECIPIENT_DELETE
679
+ * @applicableIdentity APP
680
+ * @fqn wix.restaurants.recipient.v1.NotificationRecipientsService.DeleteRecipient
681
+ */
682
+ declare function deleteRecipient(recipientId: string): Promise<void>;
683
+ /**
684
+ * Retrieves a list of recipients with optional filtering, sorting, and paging.
685
+ *
686
+ * Up to 100 recipients can be returned per request.
687
+ *
688
+ * For a detailed list of supported operations, see the [Supported Filters and Sorting](https://dev.wix.com/docs/api-reference/business-solutions/restaurants/wix-restaurants-new/online-orders/notification-recipients/supported-filters-and-sorting) article.
689
+ * To learn how to query notification recipients, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
690
+ *
691
+ * Supported properties for filtering and sorting:
692
+ * `id`, `createdDate`, `updatedDate`, `channels`
693
+ * @public
694
+ * @documentationMaturity preview
695
+ * @permissionId RESTAURANTS.RECIPIENT_READ
696
+ * @applicableIdentity APP
697
+ * @fqn wix.restaurants.recipient.v1.NotificationRecipientsService.QueryRecipients
698
+ */
699
+ declare function queryRecipients(): RecipientsQueryBuilder;
700
+ interface QueryCursorResult {
701
+ cursors: Cursors;
702
+ hasNext: () => boolean;
703
+ hasPrev: () => boolean;
704
+ length: number;
705
+ pageSize: number;
706
+ }
707
+ interface RecipientsQueryResult extends QueryCursorResult {
708
+ items: Recipient[];
709
+ query: RecipientsQueryBuilder;
710
+ next: () => Promise<RecipientsQueryResult>;
711
+ prev: () => Promise<RecipientsQueryResult>;
712
+ }
713
+ interface RecipientsQueryBuilder {
714
+ /** @param propertyName - Property whose value is compared with `value`.
715
+ * @param value - Value to compare against.
716
+ * @documentationMaturity preview
717
+ */
718
+ eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'businessLocationIds' | 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds', value: any) => RecipientsQueryBuilder;
719
+ /** @param propertyName - Property whose value is compared with `value`.
720
+ * @param value - Value to compare against.
721
+ * @documentationMaturity preview
722
+ */
723
+ ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'businessLocationIds' | 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds', value: any) => RecipientsQueryBuilder;
724
+ /** @param propertyName - Property whose value is compared with `value`.
725
+ * @param value - Value to compare against.
726
+ * @documentationMaturity preview
727
+ */
728
+ ge: (propertyName: '_id' | '_createdDate' | '_updatedDate', value: any) => RecipientsQueryBuilder;
729
+ /** @param propertyName - Property whose value is compared with `value`.
730
+ * @param value - Value to compare against.
731
+ * @documentationMaturity preview
732
+ */
733
+ gt: (propertyName: '_id' | '_createdDate' | '_updatedDate', value: any) => RecipientsQueryBuilder;
734
+ /** @param propertyName - Property whose value is compared with `value`.
735
+ * @param value - Value to compare against.
736
+ * @documentationMaturity preview
737
+ */
738
+ le: (propertyName: '_id' | '_createdDate' | '_updatedDate', value: any) => RecipientsQueryBuilder;
739
+ /** @param propertyName - Property whose value is compared with `value`.
740
+ * @param value - Value to compare against.
741
+ * @documentationMaturity preview
742
+ */
743
+ lt: (propertyName: '_id' | '_createdDate' | '_updatedDate', value: any) => RecipientsQueryBuilder;
744
+ /** @param propertyName - Property whose value is compared with `string`.
745
+ * @param string - String to compare against. Case-insensitive.
746
+ * @documentationMaturity preview
747
+ */
748
+ startsWith: (propertyName: '_id', value: string) => RecipientsQueryBuilder;
749
+ /** @param propertyName - Property whose value is compared with `values`.
750
+ * @param values - List of values to compare against.
751
+ * @documentationMaturity preview
752
+ */
753
+ hasSome: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'businessLocationIds' | 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds', value: any[]) => RecipientsQueryBuilder;
754
+ /** @param propertyName - Property whose value is compared with `values`.
755
+ * @param values - List of values to compare against.
756
+ * @documentationMaturity preview
757
+ */
758
+ hasAll: (propertyName: 'businessLocationIds' | 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds', value: any[]) => RecipientsQueryBuilder;
759
+ /** @documentationMaturity preview */
760
+ in: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'businessLocationIds' | 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds', value: any) => RecipientsQueryBuilder;
761
+ /** @documentationMaturity preview */
762
+ exists: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'businessLocationIds' | 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds', value: boolean) => RecipientsQueryBuilder;
763
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
764
+ * @documentationMaturity preview
765
+ */
766
+ ascending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'businessLocationIds' | 'channels' | 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds'>) => RecipientsQueryBuilder;
767
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
768
+ * @documentationMaturity preview
769
+ */
770
+ descending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'businessLocationIds' | 'channels' | 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds'>) => RecipientsQueryBuilder;
771
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
772
+ * @documentationMaturity preview
773
+ */
774
+ limit: (limit: number) => RecipientsQueryBuilder;
775
+ /** @param cursor - A pointer to specific record
776
+ * @documentationMaturity preview
777
+ */
778
+ skipTo: (cursor: string) => RecipientsQueryBuilder;
779
+ /** @documentationMaturity preview */
780
+ find: () => Promise<RecipientsQueryResult>;
781
+ }
782
+ /**
783
+ * Updates tags on multiple recipients by recipient IDs.
784
+ *
785
+ * This is a synchronous operation that updates up to 100 recipients at once.
786
+ * If a tag appears in both assign and unassign lists, it will be assigned.
787
+ * @param recipientIds - IDs of recipients to update tags for.
788
+ * @public
789
+ * @documentationMaturity preview
790
+ * @requiredField recipientIds
791
+ * @permissionId RESTAURANTS.RECIPIENT_UPDATE_TAGS
792
+ * @applicableIdentity APP
793
+ * @fqn wix.restaurants.recipient.v1.NotificationRecipientsService.BulkUpdateRecipientTags
794
+ */
795
+ declare function bulkUpdateRecipientTags(recipientIds: string[], options?: BulkUpdateRecipientTagsOptions): Promise<NonNullablePaths<BulkUpdateRecipientTagsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6> & {
796
+ __applicationErrorsType?: BulkUpdateRecipientTagsApplicationErrors;
797
+ }>;
798
+ interface BulkUpdateRecipientTagsOptions {
799
+ /** List of Tags to assign. */
800
+ assignTags?: Tags;
801
+ /** List of Tags to unassign. */
802
+ unassignTags?: Tags;
803
+ }
804
+ /**
805
+ * Updates tags on multiple recipients using filter criteria.
806
+ *
807
+ * This is an asynchronous operation that returns a job ID for tracking progress.
808
+ * An empty filter will update all recipients. If a tag appears in both assign and unassign lists, it will be assigned.
809
+ * @param filter - Filter.
810
+ * @public
811
+ * @documentationMaturity preview
812
+ * @requiredField filter
813
+ * @permissionId RESTAURANTS.RECIPIENT_UPDATE_TAGS
814
+ * @applicableIdentity APP
815
+ * @fqn wix.restaurants.recipient.v1.NotificationRecipientsService.BulkUpdateRecipientTagsByFilter
816
+ */
817
+ declare function bulkUpdateRecipientTagsByFilter(filter: Record<string, any>, options?: BulkUpdateRecipientTagsByFilterOptions): Promise<NonNullablePaths<BulkUpdateRecipientTagsByFilterResponse, `jobId`, 2> & {
818
+ __applicationErrorsType?: BulkUpdateRecipientTagsByFilterApplicationErrors;
819
+ }>;
820
+ interface BulkUpdateRecipientTagsByFilterOptions {
821
+ /** List of Tags to assign. */
822
+ assignTags?: Tags;
823
+ /** List of Tags to unassign. */
824
+ unassignTags?: Tags;
825
+ }
826
+
827
+ export { type ActionEvent, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkUpdateRecipientTagsApplicationErrors, type BulkUpdateRecipientTagsByFilterApplicationErrors, type BulkUpdateRecipientTagsByFilterOptions, type BulkUpdateRecipientTagsByFilterRequest, type BulkUpdateRecipientTagsByFilterResponse, type BulkUpdateRecipientTagsOptions, type BulkUpdateRecipientTagsRequest, type BulkUpdateRecipientTagsResponse, type BulkUpdateRecipientTagsResult, Channel, type ChannelWithLiterals, type CreateRecipientRequest, type CreateRecipientResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteRecipientRequest, type DeleteRecipientResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GetRecipientRequest, type GetRecipientResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type MessageEnvelope, type QueryRecipientsRequest, type QueryRecipientsResponse, type Recipient, type RecipientCreatedEnvelope, type RecipientDeletedEnvelope, type RecipientUpdatedEnvelope, type RecipientsQueryBuilder, type RecipientsQueryResult, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, type TagList, type Tags, type UpdateRecipient, type UpdateRecipientRequest, type UpdateRecipientResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkUpdateRecipientTags, bulkUpdateRecipientTagsByFilter, createRecipient, deleteRecipient, getRecipient, onRecipientCreated, onRecipientDeleted, onRecipientUpdated, queryRecipients, updateRecipient };