@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,636 @@
1
+ // src/restaurants-recipient-v1-recipient-recipients.public.ts
2
+ import { renameKeysFromRESTResponseToSDKResponse as renameKeysFromRESTResponseToSDKResponse2 } from "@wix/sdk-runtime/rename-all-nested-keys";
3
+ import { transformRESTTimestampToSDKTimestamp as transformRESTTimestampToSDKTimestamp2 } from "@wix/sdk-runtime/transformations/timestamp";
4
+ import { transformPaths as transformPaths3 } from "@wix/sdk-runtime/transformations/transform-paths";
5
+ import { EventDefinition } from "@wix/sdk-types";
6
+
7
+ // src/restaurants-recipient-v1-recipient-recipients.universal.ts
8
+ import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
9
+ import { queryBuilder } from "@wix/sdk-runtime/query-builder";
10
+ import {
11
+ renameKeysFromSDKRequestToRESTRequest,
12
+ renameKeysFromRESTResponseToSDKResponse
13
+ } from "@wix/sdk-runtime/rename-all-nested-keys";
14
+
15
+ // src/restaurants-recipient-v1-recipient-recipients.http.ts
16
+ import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
17
+ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
18
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
19
+ import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
20
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
21
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
22
+ function resolveWixRestaurantsRecipientV1NotificationRecipientsServiceUrl(opts) {
23
+ const domainToMappings = {
24
+ "manage._base_domain_": [
25
+ {
26
+ srcPath: "/_api/rest-notification-recipients",
27
+ destPath: ""
28
+ }
29
+ ],
30
+ "dev._base_domain_": [
31
+ {
32
+ srcPath: "/_api/rest-notification-recipients",
33
+ destPath: ""
34
+ }
35
+ ],
36
+ "www.wixapis.com": [
37
+ {
38
+ srcPath: "/rest-notification-recipients/v1",
39
+ destPath: "/v1"
40
+ },
41
+ {
42
+ srcPath: "/restaurants/recipient/v1/recipients",
43
+ destPath: "/v1/recipients"
44
+ }
45
+ ],
46
+ _: [
47
+ {
48
+ srcPath: "/_api/rest-notification-recipients",
49
+ destPath: ""
50
+ }
51
+ ],
52
+ "*.dev.wix-code.com": [
53
+ {
54
+ srcPath: "/_api/rest-notification-recipients",
55
+ destPath: ""
56
+ }
57
+ ]
58
+ };
59
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
60
+ }
61
+ var PACKAGE_NAME = "@wix/auto_sdk_restaurants_recipients";
62
+ function createRecipient(payload) {
63
+ function __createRecipient({ host }) {
64
+ const serializedData = transformPaths(payload, [
65
+ {
66
+ transformFn: transformSDKTimestampToRESTTimestamp,
67
+ paths: [
68
+ { path: "recipient.createdDate" },
69
+ { path: "recipient.updatedDate" }
70
+ ]
71
+ }
72
+ ]);
73
+ const metadata = {
74
+ entityFqdn: "wix.restaurants.recipient.v1.recipient",
75
+ method: "POST",
76
+ methodFqn: "wix.restaurants.recipient.v1.NotificationRecipientsService.CreateRecipient",
77
+ packageName: PACKAGE_NAME,
78
+ migrationOptions: {
79
+ optInTransformResponse: true
80
+ },
81
+ url: resolveWixRestaurantsRecipientV1NotificationRecipientsServiceUrl({
82
+ protoPath: "/v1/recipients",
83
+ data: serializedData,
84
+ host
85
+ }),
86
+ data: serializedData,
87
+ transformResponse: (payload2) => transformPaths(payload2, [
88
+ {
89
+ transformFn: transformRESTTimestampToSDKTimestamp,
90
+ paths: [
91
+ { path: "recipient.createdDate" },
92
+ { path: "recipient.updatedDate" }
93
+ ]
94
+ }
95
+ ])
96
+ };
97
+ return metadata;
98
+ }
99
+ return __createRecipient;
100
+ }
101
+ function getRecipient(payload) {
102
+ function __getRecipient({ host }) {
103
+ const metadata = {
104
+ entityFqdn: "wix.restaurants.recipient.v1.recipient",
105
+ method: "GET",
106
+ methodFqn: "wix.restaurants.recipient.v1.NotificationRecipientsService.GetRecipient",
107
+ packageName: PACKAGE_NAME,
108
+ migrationOptions: {
109
+ optInTransformResponse: true
110
+ },
111
+ url: resolveWixRestaurantsRecipientV1NotificationRecipientsServiceUrl({
112
+ protoPath: "/v1/recipients/{recipientId}",
113
+ data: payload,
114
+ host
115
+ }),
116
+ params: toURLSearchParams(payload),
117
+ transformResponse: (payload2) => transformPaths(payload2, [
118
+ {
119
+ transformFn: transformRESTTimestampToSDKTimestamp,
120
+ paths: [
121
+ { path: "recipient.createdDate" },
122
+ { path: "recipient.updatedDate" }
123
+ ]
124
+ }
125
+ ])
126
+ };
127
+ return metadata;
128
+ }
129
+ return __getRecipient;
130
+ }
131
+ function updateRecipient(payload) {
132
+ function __updateRecipient({ host }) {
133
+ const serializedData = transformPaths(payload, [
134
+ {
135
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
136
+ paths: [{ path: "fieldMask" }]
137
+ },
138
+ {
139
+ transformFn: transformSDKTimestampToRESTTimestamp,
140
+ paths: [
141
+ { path: "recipient.createdDate" },
142
+ { path: "recipient.updatedDate" }
143
+ ]
144
+ }
145
+ ]);
146
+ const metadata = {
147
+ entityFqdn: "wix.restaurants.recipient.v1.recipient",
148
+ method: "PATCH",
149
+ methodFqn: "wix.restaurants.recipient.v1.NotificationRecipientsService.UpdateRecipient",
150
+ packageName: PACKAGE_NAME,
151
+ migrationOptions: {
152
+ optInTransformResponse: true
153
+ },
154
+ url: resolveWixRestaurantsRecipientV1NotificationRecipientsServiceUrl({
155
+ protoPath: "/v1/recipients/{recipient.id}",
156
+ data: serializedData,
157
+ host
158
+ }),
159
+ data: serializedData,
160
+ transformResponse: (payload2) => transformPaths(payload2, [
161
+ {
162
+ transformFn: transformRESTTimestampToSDKTimestamp,
163
+ paths: [
164
+ { path: "recipient.createdDate" },
165
+ { path: "recipient.updatedDate" }
166
+ ]
167
+ }
168
+ ])
169
+ };
170
+ return metadata;
171
+ }
172
+ return __updateRecipient;
173
+ }
174
+ function deleteRecipient(payload) {
175
+ function __deleteRecipient({ host }) {
176
+ const metadata = {
177
+ entityFqdn: "wix.restaurants.recipient.v1.recipient",
178
+ method: "DELETE",
179
+ methodFqn: "wix.restaurants.recipient.v1.NotificationRecipientsService.DeleteRecipient",
180
+ packageName: PACKAGE_NAME,
181
+ migrationOptions: {
182
+ optInTransformResponse: true
183
+ },
184
+ url: resolveWixRestaurantsRecipientV1NotificationRecipientsServiceUrl({
185
+ protoPath: "/v1/recipients/{recipientId}",
186
+ data: payload,
187
+ host
188
+ }),
189
+ params: toURLSearchParams(payload)
190
+ };
191
+ return metadata;
192
+ }
193
+ return __deleteRecipient;
194
+ }
195
+ function queryRecipients(payload) {
196
+ function __queryRecipients({ host }) {
197
+ const metadata = {
198
+ entityFqdn: "wix.restaurants.recipient.v1.recipient",
199
+ method: "GET",
200
+ methodFqn: "wix.restaurants.recipient.v1.NotificationRecipientsService.QueryRecipients",
201
+ packageName: PACKAGE_NAME,
202
+ migrationOptions: {
203
+ optInTransformResponse: true
204
+ },
205
+ url: resolveWixRestaurantsRecipientV1NotificationRecipientsServiceUrl({
206
+ protoPath: "/v1/recipients/query",
207
+ data: payload,
208
+ host
209
+ }),
210
+ params: toURLSearchParams(payload, true),
211
+ transformResponse: (payload2) => transformPaths(payload2, [
212
+ {
213
+ transformFn: transformRESTTimestampToSDKTimestamp,
214
+ paths: [
215
+ { path: "recipients.createdDate" },
216
+ { path: "recipients.updatedDate" }
217
+ ]
218
+ }
219
+ ]),
220
+ fallback: [
221
+ {
222
+ method: "POST",
223
+ url: resolveWixRestaurantsRecipientV1NotificationRecipientsServiceUrl(
224
+ { protoPath: "/v1/recipients/query", data: payload, host }
225
+ ),
226
+ data: payload
227
+ }
228
+ ]
229
+ };
230
+ return metadata;
231
+ }
232
+ return __queryRecipients;
233
+ }
234
+ function bulkUpdateRecipientTags(payload) {
235
+ function __bulkUpdateRecipientTags({ host }) {
236
+ const metadata = {
237
+ entityFqdn: "wix.restaurants.recipient.v1.recipient",
238
+ method: "POST",
239
+ methodFqn: "wix.restaurants.recipient.v1.NotificationRecipientsService.BulkUpdateRecipientTags",
240
+ packageName: PACKAGE_NAME,
241
+ migrationOptions: {
242
+ optInTransformResponse: true
243
+ },
244
+ url: resolveWixRestaurantsRecipientV1NotificationRecipientsServiceUrl({
245
+ protoPath: "/v1/bulk/recipients/update-tags",
246
+ data: payload,
247
+ host
248
+ }),
249
+ data: payload
250
+ };
251
+ return metadata;
252
+ }
253
+ return __bulkUpdateRecipientTags;
254
+ }
255
+ function bulkUpdateRecipientTagsByFilter(payload) {
256
+ function __bulkUpdateRecipientTagsByFilter({ host }) {
257
+ const metadata = {
258
+ entityFqdn: "wix.restaurants.recipient.v1.recipient",
259
+ method: "POST",
260
+ methodFqn: "wix.restaurants.recipient.v1.NotificationRecipientsService.BulkUpdateRecipientTagsByFilter",
261
+ packageName: PACKAGE_NAME,
262
+ migrationOptions: {
263
+ optInTransformResponse: true
264
+ },
265
+ url: resolveWixRestaurantsRecipientV1NotificationRecipientsServiceUrl({
266
+ protoPath: "/v1/bulk/recipients/update-tags-by-filter",
267
+ data: payload,
268
+ host
269
+ }),
270
+ data: payload
271
+ };
272
+ return metadata;
273
+ }
274
+ return __bulkUpdateRecipientTagsByFilter;
275
+ }
276
+
277
+ // src/restaurants-recipient-v1-recipient-recipients.universal.ts
278
+ import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
279
+ var Channel = /* @__PURE__ */ ((Channel2) => {
280
+ Channel2["UNKNOWN_CHANNEL"] = "UNKNOWN_CHANNEL";
281
+ Channel2["SMS"] = "SMS";
282
+ Channel2["PHONE"] = "PHONE";
283
+ return Channel2;
284
+ })(Channel || {});
285
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
286
+ SortOrder2["ASC"] = "ASC";
287
+ SortOrder2["DESC"] = "DESC";
288
+ return SortOrder2;
289
+ })(SortOrder || {});
290
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
291
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
292
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
293
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
294
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
295
+ WebhookIdentityType2["APP"] = "APP";
296
+ return WebhookIdentityType2;
297
+ })(WebhookIdentityType || {});
298
+ async function createRecipient2(recipient) {
299
+ const { httpClient, sideEffects } = arguments[1];
300
+ const payload = renameKeysFromSDKRequestToRESTRequest({
301
+ recipient
302
+ });
303
+ const reqOpts = createRecipient(payload);
304
+ sideEffects?.onSiteCall?.();
305
+ try {
306
+ const result = await httpClient.request(reqOpts);
307
+ sideEffects?.onSuccess?.(result);
308
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.recipient;
309
+ } catch (err) {
310
+ const transformedError = sdkTransformError(
311
+ err,
312
+ {
313
+ spreadPathsToArguments: {},
314
+ explicitPathsToArguments: { recipient: "$[0]" },
315
+ singleArgumentUnchanged: false
316
+ },
317
+ ["recipient"]
318
+ );
319
+ sideEffects?.onError?.(err);
320
+ throw transformedError;
321
+ }
322
+ }
323
+ async function getRecipient2(recipientId) {
324
+ const { httpClient, sideEffects } = arguments[1];
325
+ const payload = renameKeysFromSDKRequestToRESTRequest({
326
+ recipientId
327
+ });
328
+ const reqOpts = getRecipient(payload);
329
+ sideEffects?.onSiteCall?.();
330
+ try {
331
+ const result = await httpClient.request(reqOpts);
332
+ sideEffects?.onSuccess?.(result);
333
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.recipient;
334
+ } catch (err) {
335
+ const transformedError = sdkTransformError(
336
+ err,
337
+ {
338
+ spreadPathsToArguments: {},
339
+ explicitPathsToArguments: { recipientId: "$[0]" },
340
+ singleArgumentUnchanged: false
341
+ },
342
+ ["recipientId"]
343
+ );
344
+ sideEffects?.onError?.(err);
345
+ throw transformedError;
346
+ }
347
+ }
348
+ async function updateRecipient2(_id, recipient) {
349
+ const { httpClient, sideEffects } = arguments[2];
350
+ const payload = renameKeysFromSDKRequestToRESTRequest({
351
+ recipient: { ...recipient, id: _id }
352
+ });
353
+ const reqOpts = updateRecipient(payload);
354
+ sideEffects?.onSiteCall?.();
355
+ try {
356
+ const result = await httpClient.request(reqOpts);
357
+ sideEffects?.onSuccess?.(result);
358
+ return renameKeysFromRESTResponseToSDKResponse(result.data)?.recipient;
359
+ } catch (err) {
360
+ const transformedError = sdkTransformError(
361
+ err,
362
+ {
363
+ spreadPathsToArguments: { recipient: "$[1]" },
364
+ explicitPathsToArguments: { "recipient.id": "$[0]" },
365
+ singleArgumentUnchanged: false
366
+ },
367
+ ["_id", "recipient"]
368
+ );
369
+ sideEffects?.onError?.(err);
370
+ throw transformedError;
371
+ }
372
+ }
373
+ async function deleteRecipient2(recipientId) {
374
+ const { httpClient, sideEffects } = arguments[1];
375
+ const payload = renameKeysFromSDKRequestToRESTRequest({
376
+ recipientId
377
+ });
378
+ const reqOpts = deleteRecipient(payload);
379
+ sideEffects?.onSiteCall?.();
380
+ try {
381
+ const result = await httpClient.request(reqOpts);
382
+ sideEffects?.onSuccess?.(result);
383
+ } catch (err) {
384
+ const transformedError = sdkTransformError(
385
+ err,
386
+ {
387
+ spreadPathsToArguments: {},
388
+ explicitPathsToArguments: { recipientId: "$[0]" },
389
+ singleArgumentUnchanged: false
390
+ },
391
+ ["recipientId"]
392
+ );
393
+ sideEffects?.onError?.(err);
394
+ throw transformedError;
395
+ }
396
+ }
397
+ function queryRecipients2() {
398
+ const { httpClient, sideEffects } = arguments[0];
399
+ return queryBuilder({
400
+ func: async (payload) => {
401
+ const reqOpts = queryRecipients(payload);
402
+ sideEffects?.onSiteCall?.();
403
+ try {
404
+ const result = await httpClient.request(reqOpts);
405
+ sideEffects?.onSuccess?.(result);
406
+ return result;
407
+ } catch (err) {
408
+ sideEffects?.onError?.(err);
409
+ throw err;
410
+ }
411
+ },
412
+ requestTransformer: (query) => {
413
+ const args = [query, {}];
414
+ return renameKeysFromSDKRequestToRESTRequest({
415
+ ...args?.[1],
416
+ query: args?.[0]
417
+ });
418
+ },
419
+ responseTransformer: ({ data }) => {
420
+ const transformedData = renameKeysFromRESTResponseToSDKResponse(
421
+ transformPaths2(data, [])
422
+ );
423
+ return {
424
+ items: transformedData?.recipients,
425
+ pagingMetadata: transformedData?.pagingMetadata
426
+ };
427
+ },
428
+ errorTransformer: (err) => {
429
+ const transformedError = sdkTransformError(err, {
430
+ spreadPathsToArguments: {},
431
+ explicitPathsToArguments: { query: "$[0]" },
432
+ singleArgumentUnchanged: false
433
+ });
434
+ throw transformedError;
435
+ },
436
+ pagingMethod: "CURSOR",
437
+ transformationPaths: {}
438
+ });
439
+ }
440
+ async function bulkUpdateRecipientTags2(recipientIds, options) {
441
+ const { httpClient, sideEffects } = arguments[2];
442
+ const payload = renameKeysFromSDKRequestToRESTRequest({
443
+ recipientIds,
444
+ assignTags: options?.assignTags,
445
+ unassignTags: options?.unassignTags
446
+ });
447
+ const reqOpts = bulkUpdateRecipientTags(
448
+ payload
449
+ );
450
+ sideEffects?.onSiteCall?.();
451
+ try {
452
+ const result = await httpClient.request(reqOpts);
453
+ sideEffects?.onSuccess?.(result);
454
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
455
+ } catch (err) {
456
+ const transformedError = sdkTransformError(
457
+ err,
458
+ {
459
+ spreadPathsToArguments: {},
460
+ explicitPathsToArguments: {
461
+ recipientIds: "$[0]",
462
+ assignTags: "$[1].assignTags",
463
+ unassignTags: "$[1].unassignTags"
464
+ },
465
+ singleArgumentUnchanged: false
466
+ },
467
+ ["recipientIds", "options"]
468
+ );
469
+ sideEffects?.onError?.(err);
470
+ throw transformedError;
471
+ }
472
+ }
473
+ async function bulkUpdateRecipientTagsByFilter2(filter, options) {
474
+ const { httpClient, sideEffects } = arguments[2];
475
+ const payload = renameKeysFromSDKRequestToRESTRequest({
476
+ filter,
477
+ assignTags: options?.assignTags,
478
+ unassignTags: options?.unassignTags
479
+ });
480
+ const reqOpts = bulkUpdateRecipientTagsByFilter(
481
+ payload
482
+ );
483
+ sideEffects?.onSiteCall?.();
484
+ try {
485
+ const result = await httpClient.request(reqOpts);
486
+ sideEffects?.onSuccess?.(result);
487
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
488
+ } catch (err) {
489
+ const transformedError = sdkTransformError(
490
+ err,
491
+ {
492
+ spreadPathsToArguments: {},
493
+ explicitPathsToArguments: {
494
+ filter: "$[0]",
495
+ assignTags: "$[1].assignTags",
496
+ unassignTags: "$[1].unassignTags"
497
+ },
498
+ singleArgumentUnchanged: false
499
+ },
500
+ ["filter", "options"]
501
+ );
502
+ sideEffects?.onError?.(err);
503
+ throw transformedError;
504
+ }
505
+ }
506
+
507
+ // src/restaurants-recipient-v1-recipient-recipients.public.ts
508
+ function createRecipient3(httpClient) {
509
+ return (recipient) => createRecipient2(
510
+ recipient,
511
+ // @ts-ignore
512
+ { httpClient }
513
+ );
514
+ }
515
+ function getRecipient3(httpClient) {
516
+ return (recipientId) => getRecipient2(
517
+ recipientId,
518
+ // @ts-ignore
519
+ { httpClient }
520
+ );
521
+ }
522
+ function updateRecipient3(httpClient) {
523
+ return (_id, recipient) => updateRecipient2(
524
+ _id,
525
+ recipient,
526
+ // @ts-ignore
527
+ { httpClient }
528
+ );
529
+ }
530
+ function deleteRecipient3(httpClient) {
531
+ return (recipientId) => deleteRecipient2(
532
+ recipientId,
533
+ // @ts-ignore
534
+ { httpClient }
535
+ );
536
+ }
537
+ function queryRecipients3(httpClient) {
538
+ return () => queryRecipients2(
539
+ // @ts-ignore
540
+ { httpClient }
541
+ );
542
+ }
543
+ function bulkUpdateRecipientTags3(httpClient) {
544
+ return (recipientIds, options) => bulkUpdateRecipientTags2(
545
+ recipientIds,
546
+ options,
547
+ // @ts-ignore
548
+ { httpClient }
549
+ );
550
+ }
551
+ function bulkUpdateRecipientTagsByFilter3(httpClient) {
552
+ return (filter, options) => bulkUpdateRecipientTagsByFilter2(
553
+ filter,
554
+ options,
555
+ // @ts-ignore
556
+ { httpClient }
557
+ );
558
+ }
559
+ var onRecipientCreated = EventDefinition(
560
+ "wix.restaurants.recipient.v1.recipient_created",
561
+ true,
562
+ (event) => renameKeysFromRESTResponseToSDKResponse2(
563
+ transformPaths3(event, [
564
+ {
565
+ transformFn: transformRESTTimestampToSDKTimestamp2,
566
+ paths: [
567
+ { path: "entity.createdDate" },
568
+ { path: "entity.updatedDate" },
569
+ { path: "metadata.eventTime" }
570
+ ]
571
+ }
572
+ ])
573
+ )
574
+ )();
575
+ var onRecipientDeleted = EventDefinition(
576
+ "wix.restaurants.recipient.v1.recipient_deleted",
577
+ true,
578
+ (event) => renameKeysFromRESTResponseToSDKResponse2(
579
+ transformPaths3(event, [
580
+ {
581
+ transformFn: transformRESTTimestampToSDKTimestamp2,
582
+ paths: [
583
+ { path: "entity.createdDate" },
584
+ { path: "entity.updatedDate" },
585
+ { path: "metadata.eventTime" }
586
+ ]
587
+ }
588
+ ])
589
+ )
590
+ )();
591
+ var onRecipientUpdated = EventDefinition(
592
+ "wix.restaurants.recipient.v1.recipient_updated",
593
+ true,
594
+ (event) => renameKeysFromRESTResponseToSDKResponse2(
595
+ transformPaths3(event, [
596
+ {
597
+ transformFn: transformRESTTimestampToSDKTimestamp2,
598
+ paths: [
599
+ { path: "entity.createdDate" },
600
+ { path: "entity.updatedDate" },
601
+ { path: "metadata.eventTime" }
602
+ ]
603
+ }
604
+ ])
605
+ )
606
+ )();
607
+
608
+ // src/restaurants-recipient-v1-recipient-recipients.context.ts
609
+ import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
610
+ import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
611
+ var createRecipient4 = /* @__PURE__ */ createRESTModule(createRecipient3);
612
+ var getRecipient4 = /* @__PURE__ */ createRESTModule(getRecipient3);
613
+ var updateRecipient4 = /* @__PURE__ */ createRESTModule(updateRecipient3);
614
+ var deleteRecipient4 = /* @__PURE__ */ createRESTModule(deleteRecipient3);
615
+ var queryRecipients4 = /* @__PURE__ */ createRESTModule(queryRecipients3);
616
+ var bulkUpdateRecipientTags4 = /* @__PURE__ */ createRESTModule(bulkUpdateRecipientTags3);
617
+ var bulkUpdateRecipientTagsByFilter4 = /* @__PURE__ */ createRESTModule(bulkUpdateRecipientTagsByFilter3);
618
+ var onRecipientCreated2 = createEventModule(onRecipientCreated);
619
+ var onRecipientDeleted2 = createEventModule(onRecipientDeleted);
620
+ var onRecipientUpdated2 = createEventModule(onRecipientUpdated);
621
+ export {
622
+ Channel,
623
+ SortOrder,
624
+ WebhookIdentityType,
625
+ bulkUpdateRecipientTags4 as bulkUpdateRecipientTags,
626
+ bulkUpdateRecipientTagsByFilter4 as bulkUpdateRecipientTagsByFilter,
627
+ createRecipient4 as createRecipient,
628
+ deleteRecipient4 as deleteRecipient,
629
+ getRecipient4 as getRecipient,
630
+ onRecipientCreated2 as onRecipientCreated,
631
+ onRecipientDeleted2 as onRecipientDeleted,
632
+ onRecipientUpdated2 as onRecipientUpdated,
633
+ queryRecipients4 as queryRecipients,
634
+ updateRecipient4 as updateRecipient
635
+ };
636
+ //# sourceMappingURL=index.mjs.map