@wix/auto_sdk_restaurants_menus 1.0.72 → 1.0.73

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 (49) hide show
  1. package/build/cjs/index.d.ts +10 -10
  2. package/build/cjs/index.js +86 -86
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +216 -216
  5. package/build/cjs/index.typings.js +59 -59
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +183 -183
  8. package/build/cjs/meta.js +44 -44
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +12 -12
  11. package/build/cjs/schemas.js +16 -16
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +10 -10
  14. package/build/es/index.mjs +86 -86
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +216 -216
  17. package/build/es/index.typings.mjs +59 -59
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +183 -183
  20. package/build/es/meta.mjs +44 -44
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +12 -12
  23. package/build/es/schemas.mjs +16 -16
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +10 -10
  26. package/build/internal/cjs/index.js +86 -86
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +216 -216
  29. package/build/internal/cjs/index.typings.js +59 -59
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +183 -183
  32. package/build/internal/cjs/meta.js +44 -44
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +12 -12
  35. package/build/internal/cjs/schemas.js +16 -16
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +10 -10
  38. package/build/internal/es/index.mjs +86 -86
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +216 -216
  41. package/build/internal/es/index.typings.mjs +59 -59
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +183 -183
  44. package/build/internal/es/meta.mjs +44 -44
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +12 -12
  47. package/build/internal/es/schemas.mjs +16 -16
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +2 -2
@@ -164,6 +164,183 @@ interface ExternalReferenceInfo {
164
164
  /** Whether the connection to the external system is currently active. */
165
165
  connected?: boolean | null;
166
166
  }
167
+ interface DuplicateMenuRequest {
168
+ /**
169
+ * Menu id to be duplicated.
170
+ * @format GUID
171
+ */
172
+ _id: string;
173
+ /**
174
+ * Business location ids to duplicate the menu to.
175
+ * @format GUID
176
+ * @maxSize 100
177
+ */
178
+ businessLocationIds?: string[] | null;
179
+ /** Indicates whether sub-entities (such as items) should be duplicated as well. */
180
+ duplicateSubEntities?: boolean | null;
181
+ /**
182
+ * The new name of the duplicated menu.
183
+ * @maxLength 500
184
+ */
185
+ menuName?: string | null;
186
+ }
187
+ interface DuplicateMenuResponse {
188
+ /** @format GUID */
189
+ menuIds?: string[];
190
+ }
191
+ interface DomainEvent extends DomainEventBodyOneOf {
192
+ createdEvent?: EntityCreatedEvent;
193
+ updatedEvent?: EntityUpdatedEvent;
194
+ deletedEvent?: EntityDeletedEvent;
195
+ actionEvent?: ActionEvent;
196
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
197
+ _id?: string;
198
+ /**
199
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
200
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
201
+ */
202
+ entityFqdn?: string;
203
+ /**
204
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
205
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
206
+ */
207
+ slug?: string;
208
+ /** ID of the entity associated with the event. */
209
+ entityId?: string;
210
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
211
+ eventTime?: Date | null;
212
+ /**
213
+ * Whether the event was triggered as a result of a privacy regulation application
214
+ * (for example, GDPR).
215
+ */
216
+ triggeredByAnonymizeRequest?: boolean | null;
217
+ /** If present, indicates the action that triggered the event. */
218
+ originatedFrom?: string | null;
219
+ /**
220
+ * 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.
221
+ * 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.
222
+ */
223
+ entityEventSequence?: string | null;
224
+ }
225
+ /** @oneof */
226
+ interface DomainEventBodyOneOf {
227
+ createdEvent?: EntityCreatedEvent;
228
+ updatedEvent?: EntityUpdatedEvent;
229
+ deletedEvent?: EntityDeletedEvent;
230
+ actionEvent?: ActionEvent;
231
+ }
232
+ interface EntityCreatedEvent {
233
+ entity?: string;
234
+ }
235
+ interface RestoreInfo {
236
+ deletedDate?: Date | null;
237
+ }
238
+ interface EntityUpdatedEvent {
239
+ /**
240
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
241
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
242
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
243
+ */
244
+ currentEntity?: string;
245
+ }
246
+ interface EntityDeletedEvent {
247
+ /** Entity that was deleted. */
248
+ deletedEntity?: string | null;
249
+ }
250
+ interface ActionEvent {
251
+ body?: string;
252
+ }
253
+ interface MessageEnvelope {
254
+ /**
255
+ * App instance ID.
256
+ * @format GUID
257
+ */
258
+ instanceId?: string | null;
259
+ /**
260
+ * Event type.
261
+ * @maxLength 150
262
+ */
263
+ eventType?: string;
264
+ /** The identification type and identity data. */
265
+ identity?: IdentificationData;
266
+ /** Stringify payload. */
267
+ data?: string;
268
+ /** Details related to the account */
269
+ accountInfo?: AccountInfo;
270
+ }
271
+ interface IdentificationData extends IdentificationDataIdOneOf {
272
+ /**
273
+ * ID of a site visitor that has not logged in to the site.
274
+ * @format GUID
275
+ */
276
+ anonymousVisitorId?: string;
277
+ /**
278
+ * ID of a site visitor that has logged in to the site.
279
+ * @format GUID
280
+ */
281
+ memberId?: string;
282
+ /**
283
+ * ID of a Wix user (site owner, contributor, etc.).
284
+ * @format GUID
285
+ */
286
+ wixUserId?: string;
287
+ /**
288
+ * ID of an app.
289
+ * @format GUID
290
+ */
291
+ appId?: string;
292
+ /** @readonly */
293
+ identityType?: WebhookIdentityTypeWithLiterals;
294
+ }
295
+ /** @oneof */
296
+ interface IdentificationDataIdOneOf {
297
+ /**
298
+ * ID of a site visitor that has not logged in to the site.
299
+ * @format GUID
300
+ */
301
+ anonymousVisitorId?: string;
302
+ /**
303
+ * ID of a site visitor that has logged in to the site.
304
+ * @format GUID
305
+ */
306
+ memberId?: string;
307
+ /**
308
+ * ID of a Wix user (site owner, contributor, etc.).
309
+ * @format GUID
310
+ */
311
+ wixUserId?: string;
312
+ /**
313
+ * ID of an app.
314
+ * @format GUID
315
+ */
316
+ appId?: string;
317
+ }
318
+ declare enum WebhookIdentityType {
319
+ UNKNOWN = "UNKNOWN",
320
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
321
+ MEMBER = "MEMBER",
322
+ WIX_USER = "WIX_USER",
323
+ APP = "APP"
324
+ }
325
+ /** @enumType */
326
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
327
+ interface AccountInfo {
328
+ /**
329
+ * ID of the Wix account associated with the event.
330
+ * @format GUID
331
+ */
332
+ accountId?: string | null;
333
+ /**
334
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
335
+ * @format GUID
336
+ */
337
+ parentAccountId?: string | null;
338
+ /**
339
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
340
+ * @format GUID
341
+ */
342
+ siteId?: string | null;
343
+ }
167
344
  interface InvalidateCache extends InvalidateCacheGetByOneOf {
168
345
  /**
169
346
  * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!
@@ -583,68 +760,6 @@ interface CloneMenusRequest {
583
760
  }
584
761
  interface CloneMenusResponse {
585
762
  }
586
- interface DomainEvent extends DomainEventBodyOneOf {
587
- createdEvent?: EntityCreatedEvent;
588
- updatedEvent?: EntityUpdatedEvent;
589
- deletedEvent?: EntityDeletedEvent;
590
- actionEvent?: ActionEvent;
591
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
592
- _id?: string;
593
- /**
594
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
595
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
596
- */
597
- entityFqdn?: string;
598
- /**
599
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
600
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
601
- */
602
- slug?: string;
603
- /** ID of the entity associated with the event. */
604
- entityId?: string;
605
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
606
- eventTime?: Date | null;
607
- /**
608
- * Whether the event was triggered as a result of a privacy regulation application
609
- * (for example, GDPR).
610
- */
611
- triggeredByAnonymizeRequest?: boolean | null;
612
- /** If present, indicates the action that triggered the event. */
613
- originatedFrom?: string | null;
614
- /**
615
- * 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.
616
- * 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.
617
- */
618
- entityEventSequence?: string | null;
619
- }
620
- /** @oneof */
621
- interface DomainEventBodyOneOf {
622
- createdEvent?: EntityCreatedEvent;
623
- updatedEvent?: EntityUpdatedEvent;
624
- deletedEvent?: EntityDeletedEvent;
625
- actionEvent?: ActionEvent;
626
- }
627
- interface EntityCreatedEvent {
628
- entity?: string;
629
- }
630
- interface RestoreInfo {
631
- deletedDate?: Date | null;
632
- }
633
- interface EntityUpdatedEvent {
634
- /**
635
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
636
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
637
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
638
- */
639
- currentEntity?: string;
640
- }
641
- interface EntityDeletedEvent {
642
- /** Entity that was deleted. */
643
- deletedEntity?: string | null;
644
- }
645
- interface ActionEvent {
646
- body?: string;
647
- }
648
763
  interface Empty {
649
764
  }
650
765
  interface SyncContentToMultilingualRequest {
@@ -656,121 +771,6 @@ interface SyncContentToMultilingualRequest {
656
771
  }
657
772
  interface SyncContentToMultilingualResponse {
658
773
  }
659
- interface MessageEnvelope {
660
- /**
661
- * App instance ID.
662
- * @format GUID
663
- */
664
- instanceId?: string | null;
665
- /**
666
- * Event type.
667
- * @maxLength 150
668
- */
669
- eventType?: string;
670
- /** The identification type and identity data. */
671
- identity?: IdentificationData;
672
- /** Stringify payload. */
673
- data?: string;
674
- /** Details related to the account */
675
- accountInfo?: AccountInfo;
676
- }
677
- interface IdentificationData extends IdentificationDataIdOneOf {
678
- /**
679
- * ID of a site visitor that has not logged in to the site.
680
- * @format GUID
681
- */
682
- anonymousVisitorId?: string;
683
- /**
684
- * ID of a site visitor that has logged in to the site.
685
- * @format GUID
686
- */
687
- memberId?: string;
688
- /**
689
- * ID of a Wix user (site owner, contributor, etc.).
690
- * @format GUID
691
- */
692
- wixUserId?: string;
693
- /**
694
- * ID of an app.
695
- * @format GUID
696
- */
697
- appId?: string;
698
- /** @readonly */
699
- identityType?: WebhookIdentityTypeWithLiterals;
700
- }
701
- /** @oneof */
702
- interface IdentificationDataIdOneOf {
703
- /**
704
- * ID of a site visitor that has not logged in to the site.
705
- * @format GUID
706
- */
707
- anonymousVisitorId?: string;
708
- /**
709
- * ID of a site visitor that has logged in to the site.
710
- * @format GUID
711
- */
712
- memberId?: string;
713
- /**
714
- * ID of a Wix user (site owner, contributor, etc.).
715
- * @format GUID
716
- */
717
- wixUserId?: string;
718
- /**
719
- * ID of an app.
720
- * @format GUID
721
- */
722
- appId?: string;
723
- }
724
- declare enum WebhookIdentityType {
725
- UNKNOWN = "UNKNOWN",
726
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
727
- MEMBER = "MEMBER",
728
- WIX_USER = "WIX_USER",
729
- APP = "APP"
730
- }
731
- /** @enumType */
732
- type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
733
- interface AccountInfo {
734
- /**
735
- * ID of the Wix account associated with the event.
736
- * @format GUID
737
- */
738
- accountId?: string | null;
739
- /**
740
- * ID of the parent Wix account. Only included when accountId belongs to a child account.
741
- * @format GUID
742
- */
743
- parentAccountId?: string | null;
744
- /**
745
- * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
746
- * @format GUID
747
- */
748
- siteId?: string | null;
749
- }
750
- interface DuplicateMenuRequest {
751
- /**
752
- * Menu id to be duplicated.
753
- * @format GUID
754
- */
755
- _id: string;
756
- /**
757
- * Business location ids to duplicate the menu to.
758
- * @format GUID
759
- * @maxSize 100
760
- */
761
- businessLocationIds?: string[] | null;
762
- /** Indicates whether sub-entities (such as items) should be duplicated as well. */
763
- duplicateSubEntities?: boolean | null;
764
- /**
765
- * The new name of the duplicated menu.
766
- * @maxLength 500
767
- */
768
- menuName?: string | null;
769
- }
770
- interface DuplicateMenuResponse {
771
- /** @format GUID */
772
- menuIds?: string[];
773
- }
774
774
  interface GetMenuSiteUrlRequest {
775
775
  /**
776
776
  * Menu ID.
@@ -856,6 +856,23 @@ interface AccountInfoMetadata {
856
856
  /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
857
857
  parentAccountId?: string;
858
858
  }
859
+ interface MenuUpdatedEnvelope {
860
+ entity: Menu;
861
+ metadata: EventMetadata;
862
+ /** @hidden */
863
+ modifiedFields: Record<string, any>;
864
+ }
865
+ /** @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read
866
+ * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ
867
+ * @permissionScope Manage Restaurants - all permissions
868
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
869
+ * @permissionId RESTAURANTS.MENU_READ
870
+ * @webhook
871
+ * @eventType wix.restaurants.menus.v1.menu_updated
872
+ * @slug updated
873
+ * @documentationMaturity preview
874
+ */
875
+ declare function onMenuUpdated(handler: (event: MenuUpdatedEnvelope) => void | Promise<void>): void;
859
876
  interface MenuCreatedEnvelope {
860
877
  entity: Menu;
861
878
  metadata: EventMetadata;
@@ -889,23 +906,30 @@ interface MenuDeletedEnvelope {
889
906
  * @documentationMaturity preview
890
907
  */
891
908
  declare function onMenuDeleted(handler: (event: MenuDeletedEnvelope) => void | Promise<void>): void;
892
- interface MenuUpdatedEnvelope {
893
- entity: Menu;
894
- metadata: EventMetadata;
895
- /** @hidden */
896
- modifiedFields: Record<string, any>;
897
- }
898
- /** @permissionScope Wix Multilingual - Nile Wrapper Domain Events Read
899
- * @permissionScopeId SCOPE.MULTILINGUAL.NILE_WRAPPER_DOMAIN_EVENTS_READ
900
- * @permissionScope Manage Restaurants - all permissions
901
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
902
- * @permissionId RESTAURANTS.MENU_READ
903
- * @webhook
904
- * @eventType wix.restaurants.menus.v1.menu_updated
905
- * @slug updated
909
+ /** @param _id - Menu id to be duplicated.
910
+ * @public
906
911
  * @documentationMaturity preview
912
+ * @requiredField _id
913
+ * @permissionId RESTAURANTS.MENU_CREATE
914
+ * @applicableIdentity APP
915
+ * @fqn com.wixpress.restaurants.menus_menu.v1.restaurants_duplicate_menu.RestaurantsDuplicateMenu.DuplicateMenu
907
916
  */
908
- declare function onMenuUpdated(handler: (event: MenuUpdatedEnvelope) => void | Promise<void>): void;
917
+ declare function duplicateMenu(_id: string, options?: DuplicateMenuOptions): Promise<NonNullablePaths<DuplicateMenuResponse, `menuIds`, 2>>;
918
+ interface DuplicateMenuOptions {
919
+ /**
920
+ * Business location ids to duplicate the menu to.
921
+ * @format GUID
922
+ * @maxSize 100
923
+ */
924
+ businessLocationIds?: string[] | null;
925
+ /** Indicates whether sub-entities (such as items) should be duplicated as well. */
926
+ duplicateSubEntities?: boolean | null;
927
+ /**
928
+ * The new name of the duplicated menu.
929
+ * @maxLength 500
930
+ */
931
+ menuName?: string | null;
932
+ }
909
933
  /**
910
934
  * > **Note:** The Menus API only works with the Wix Restaurants Menus app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new).
911
935
  *
@@ -1291,30 +1315,6 @@ interface UpdateExtendedFieldsOptions {
1291
1315
  * @fqn com.wixpress.restaurants.menus_menu.v1.RestaurantsMenusMenu.DeleteMenu
1292
1316
  */
1293
1317
  declare function deleteMenu(menuId: string): Promise<void>;
1294
- /** @param _id - Menu id to be duplicated.
1295
- * @public
1296
- * @documentationMaturity preview
1297
- * @requiredField _id
1298
- * @permissionId RESTAURANTS.MENU_CREATE
1299
- * @applicableIdentity APP
1300
- * @fqn com.wixpress.restaurants.menus_menu.v1.restaurants_duplicate_menu.RestaurantsDuplicateMenu.DuplicateMenu
1301
- */
1302
- declare function duplicateMenu(_id: string, options?: DuplicateMenuOptions): Promise<NonNullablePaths<DuplicateMenuResponse, `menuIds`, 2>>;
1303
- interface DuplicateMenuOptions {
1304
- /**
1305
- * Business location ids to duplicate the menu to.
1306
- * @format GUID
1307
- * @maxSize 100
1308
- */
1309
- businessLocationIds?: string[] | null;
1310
- /** Indicates whether sub-entities (such as items) should be duplicated as well. */
1311
- duplicateSubEntities?: boolean | null;
1312
- /**
1313
- * The new name of the duplicated menu.
1314
- * @maxLength 500
1315
- */
1316
- menuName?: string | null;
1317
- }
1318
1318
  /**
1319
1319
  * Get menu details and path URL by menu ID.
1320
1320
  * @param _id - Menu ID.
@@ -108,7 +108,7 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusSiteUrlRestaura
108
108
  };
109
109
  return resolveUrl(Object.assign(opts, { domainToMappings }));
110
110
  }
111
- function resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(opts) {
111
+ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusMenuUrl(opts) {
112
112
  const domainToMappings = {
113
113
  "manage._base_domain_": [
114
114
  {
@@ -203,7 +203,7 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaur
203
203
  };
204
204
  return resolveUrl(Object.assign(opts, { domainToMappings }));
205
205
  }
206
- function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusMenuUrl(opts) {
206
+ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(opts) {
207
207
  const domainToMappings = {
208
208
  "manage._base_domain_": [
209
209
  {
@@ -299,6 +299,25 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusMenuUrl(opts) {
299
299
  return resolveUrl(Object.assign(opts, { domainToMappings }));
300
300
  }
301
301
  var PACKAGE_NAME = "@wix/auto_sdk_restaurants_menus";
302
+ function duplicateMenu(payload) {
303
+ function __duplicateMenu({ host }) {
304
+ const metadata = {
305
+ entityFqdn: "wix.restaurants.menus.v1.menu",
306
+ method: "POST",
307
+ methodFqn: "com.wixpress.restaurants.menus_menu.v1.restaurants_duplicate_menu.RestaurantsDuplicateMenu.DuplicateMenu",
308
+ packageName: PACKAGE_NAME,
309
+ migrationOptions: {
310
+ optInTransformResponse: true
311
+ },
312
+ url: resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(
313
+ { protoPath: "/v1/menus/{id}/duplicate", data: payload, host }
314
+ ),
315
+ data: payload
316
+ };
317
+ return metadata;
318
+ }
319
+ return __duplicateMenu;
320
+ }
302
321
  function createMenu(payload) {
303
322
  function __createMenu({ host }) {
304
323
  const serializedData = transformPaths(payload, [
@@ -606,25 +625,6 @@ function deleteMenu(payload) {
606
625
  }
607
626
  return __deleteMenu;
608
627
  }
609
- function duplicateMenu(payload) {
610
- function __duplicateMenu({ host }) {
611
- const metadata = {
612
- entityFqdn: "wix.restaurants.menus.v1.menu",
613
- method: "POST",
614
- methodFqn: "com.wixpress.restaurants.menus_menu.v1.restaurants_duplicate_menu.RestaurantsDuplicateMenu.DuplicateMenu",
615
- packageName: PACKAGE_NAME,
616
- migrationOptions: {
617
- optInTransformResponse: true
618
- },
619
- url: resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(
620
- { protoPath: "/v1/menus/{id}/duplicate", data: payload, host }
621
- ),
622
- data: payload
623
- };
624
- return metadata;
625
- }
626
- return __duplicateMenu;
627
- }
628
628
  function getMenuSiteUrl(payload) {
629
629
  function __getMenuSiteUrl({ host }) {
630
630
  const metadata = {
@@ -667,11 +667,6 @@ function queryMenusSiteUrl(payload) {
667
667
  // src/restaurants-menus-v1-menu-menus.universal.ts
668
668
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
669
669
  import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
670
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
671
- SortOrder2["ASC"] = "ASC";
672
- SortOrder2["DESC"] = "DESC";
673
- return SortOrder2;
674
- })(SortOrder || {});
675
670
  var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
676
671
  WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
677
672
  WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
@@ -680,6 +675,44 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
680
675
  WebhookIdentityType2["APP"] = "APP";
681
676
  return WebhookIdentityType2;
682
677
  })(WebhookIdentityType || {});
678
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
679
+ SortOrder2["ASC"] = "ASC";
680
+ SortOrder2["DESC"] = "DESC";
681
+ return SortOrder2;
682
+ })(SortOrder || {});
683
+ async function duplicateMenu2(_id, options) {
684
+ const { httpClient, sideEffects } = arguments[2];
685
+ const payload = renameKeysFromSDKRequestToRESTRequest({
686
+ id: _id,
687
+ businessLocationIds: options?.businessLocationIds,
688
+ duplicateSubEntities: options?.duplicateSubEntities,
689
+ menuName: options?.menuName
690
+ });
691
+ const reqOpts = duplicateMenu(payload);
692
+ sideEffects?.onSiteCall?.();
693
+ try {
694
+ const result = await httpClient.request(reqOpts);
695
+ sideEffects?.onSuccess?.(result);
696
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
697
+ } catch (err) {
698
+ const transformedError = sdkTransformError(
699
+ err,
700
+ {
701
+ spreadPathsToArguments: {},
702
+ explicitPathsToArguments: {
703
+ id: "$[0]",
704
+ businessLocationIds: "$[1].businessLocationIds",
705
+ duplicateSubEntities: "$[1].duplicateSubEntities",
706
+ menuName: "$[1].menuName"
707
+ },
708
+ singleArgumentUnchanged: false
709
+ },
710
+ ["_id", "options"]
711
+ );
712
+ sideEffects?.onError?.(err);
713
+ throw transformedError;
714
+ }
715
+ }
683
716
  async function createMenu2(menu) {
684
717
  const { httpClient, sideEffects } = arguments[1];
685
718
  const payload = renameKeysFromSDKRequestToRESTRequest({ menu });
@@ -964,39 +997,6 @@ async function deleteMenu2(menuId) {
964
997
  throw transformedError;
965
998
  }
966
999
  }
967
- async function duplicateMenu2(_id, options) {
968
- const { httpClient, sideEffects } = arguments[2];
969
- const payload = renameKeysFromSDKRequestToRESTRequest({
970
- id: _id,
971
- businessLocationIds: options?.businessLocationIds,
972
- duplicateSubEntities: options?.duplicateSubEntities,
973
- menuName: options?.menuName
974
- });
975
- const reqOpts = duplicateMenu(payload);
976
- sideEffects?.onSiteCall?.();
977
- try {
978
- const result = await httpClient.request(reqOpts);
979
- sideEffects?.onSuccess?.(result);
980
- return renameKeysFromRESTResponseToSDKResponse(result.data);
981
- } catch (err) {
982
- const transformedError = sdkTransformError(
983
- err,
984
- {
985
- spreadPathsToArguments: {},
986
- explicitPathsToArguments: {
987
- id: "$[0]",
988
- businessLocationIds: "$[1].businessLocationIds",
989
- duplicateSubEntities: "$[1].duplicateSubEntities",
990
- menuName: "$[1].menuName"
991
- },
992
- singleArgumentUnchanged: false
993
- },
994
- ["_id", "options"]
995
- );
996
- sideEffects?.onError?.(err);
997
- throw transformedError;
998
- }
999
- }
1000
1000
  async function getMenuSiteUrl2(_id) {
1001
1001
  const { httpClient, sideEffects } = arguments[1];
1002
1002
  const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });