@wix/auto_sdk_restaurants_menus 1.0.69 → 1.0.71

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 +18 -18
  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 +224 -224
  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 +18 -18
  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 +224 -224
  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 +18 -18
  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 +224 -224
  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 +18 -18
  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 +224 -224
  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 +4 -4
@@ -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,25 +906,32 @@ 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
- * > **Note:** The Menus API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new).
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
  *
912
936
  * Creates a menu.
913
937
  *
@@ -923,7 +947,7 @@ declare function onMenuUpdated(handler: (event: MenuUpdatedEnvelope) => void | P
923
947
  */
924
948
  declare function createMenu(menu: Menu): Promise<NonNullablePaths<Menu, `name` | `sectionIds` | `seoData.tags` | `seoData.tags.${number}.type` | `seoData.tags.${number}.children` | `seoData.tags.${number}.custom` | `seoData.tags.${number}.disabled` | `seoData.settings.preventAutoRedirect` | `seoData.settings.keywords` | `seoData.settings.keywords.${number}.term` | `seoData.settings.keywords.${number}.isMain`, 6>>;
925
949
  /**
926
- * > **Note:** The Menu API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new).
950
+ * > **Note:** The Menu 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).
927
951
  *
928
952
  * Creates multiple menus at once.
929
953
  * @param menus - Menu details.
@@ -940,7 +964,7 @@ interface BulkCreateMenusOptions {
940
964
  returnEntity?: boolean;
941
965
  }
942
966
  /**
943
- * > **Note:** The Menu API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new).
967
+ * > **Note:** The Menu 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).
944
968
  *
945
969
  * Retrieves a menu by ID.
946
970
  * @param menuId - Menu ID.
@@ -954,7 +978,7 @@ interface BulkCreateMenusOptions {
954
978
  */
955
979
  declare function getMenu(menuId: string): Promise<NonNullablePaths<Menu, `name` | `sectionIds` | `seoData.tags` | `seoData.tags.${number}.type` | `seoData.tags.${number}.children` | `seoData.tags.${number}.custom` | `seoData.tags.${number}.disabled` | `seoData.settings.preventAutoRedirect` | `seoData.settings.keywords` | `seoData.settings.keywords.${number}.term` | `seoData.settings.keywords.${number}.isMain`, 6>>;
956
980
  /**
957
- * > **Note:** The Menu API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new).
981
+ * > **Note:** The Menu 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).
958
982
  *
959
983
  * Retrieves a list of up to 500 menus.
960
984
  * @public
@@ -1161,7 +1185,7 @@ declare const utils: {
1161
1185
  };
1162
1186
  };
1163
1187
  /**
1164
- * > **Note:** The Menu API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new).
1188
+ * > **Note:** The Menu 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).
1165
1189
  *
1166
1190
  * Updates a menu.
1167
1191
  *
@@ -1239,7 +1263,7 @@ interface UpdateMenu {
1239
1263
  businessLocationId?: string | null;
1240
1264
  }
1241
1265
  /**
1242
- * > **Note:** The Menu API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new).
1266
+ * > **Note:** The Menu 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).
1243
1267
  *
1244
1268
  * Updates multiple menus at once.
1245
1269
  *
@@ -1260,7 +1284,7 @@ interface BulkUpdateMenuOptions {
1260
1284
  returnEntity?: boolean;
1261
1285
  }
1262
1286
  /**
1263
- * > **Note:** The Menu API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new).
1287
+ * > **Note:** The Menu 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).
1264
1288
  *
1265
1289
  * Updates only the `extendedFields` field.
1266
1290
  * @param _id - ID of the entity to update.
@@ -1279,7 +1303,7 @@ interface UpdateExtendedFieldsOptions {
1279
1303
  namespaceData: Record<string, any> | null;
1280
1304
  }
1281
1305
  /**
1282
- * > **Note:** The Menu API only works with the Wix Restaurants Menus (New) app. Make sure you have installed this app from the [Wix App Market](https://www.wix.com/app-market/wix-restaurants-menus-new).
1306
+ * > **Note:** The Menu 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).
1283
1307
  *
1284
1308
  * Deletes a menu.
1285
1309
  * @param menuId - Menu ID.
@@ -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.
@@ -146,7 +146,7 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusSiteUrlRestaura
146
146
  };
147
147
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
148
148
  }
149
- function resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(opts) {
149
+ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusMenuUrl(opts) {
150
150
  const domainToMappings = {
151
151
  "manage._base_domain_": [
152
152
  {
@@ -241,7 +241,7 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaur
241
241
  };
242
242
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
243
243
  }
244
- function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusMenuUrl(opts) {
244
+ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(opts) {
245
245
  const domainToMappings = {
246
246
  "manage._base_domain_": [
247
247
  {
@@ -337,6 +337,25 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusMenuUrl(opts) {
337
337
  return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
338
338
  }
339
339
  var PACKAGE_NAME = "@wix/auto_sdk_restaurants_menus";
340
+ function duplicateMenu(payload) {
341
+ function __duplicateMenu({ host }) {
342
+ const metadata = {
343
+ entityFqdn: "wix.restaurants.menus.v1.menu",
344
+ method: "POST",
345
+ methodFqn: "com.wixpress.restaurants.menus_menu.v1.restaurants_duplicate_menu.RestaurantsDuplicateMenu.DuplicateMenu",
346
+ packageName: PACKAGE_NAME,
347
+ migrationOptions: {
348
+ optInTransformResponse: true
349
+ },
350
+ url: resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(
351
+ { protoPath: "/v1/menus/{id}/duplicate", data: payload, host }
352
+ ),
353
+ data: payload
354
+ };
355
+ return metadata;
356
+ }
357
+ return __duplicateMenu;
358
+ }
340
359
  function createMenu(payload) {
341
360
  function __createMenu({ host }) {
342
361
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
@@ -644,25 +663,6 @@ function deleteMenu(payload) {
644
663
  }
645
664
  return __deleteMenu;
646
665
  }
647
- function duplicateMenu(payload) {
648
- function __duplicateMenu({ host }) {
649
- const metadata = {
650
- entityFqdn: "wix.restaurants.menus.v1.menu",
651
- method: "POST",
652
- methodFqn: "com.wixpress.restaurants.menus_menu.v1.restaurants_duplicate_menu.RestaurantsDuplicateMenu.DuplicateMenu",
653
- packageName: PACKAGE_NAME,
654
- migrationOptions: {
655
- optInTransformResponse: true
656
- },
657
- url: resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(
658
- { protoPath: "/v1/menus/{id}/duplicate", data: payload, host }
659
- ),
660
- data: payload
661
- };
662
- return metadata;
663
- }
664
- return __duplicateMenu;
665
- }
666
666
  function getMenuSiteUrl(payload) {
667
667
  function __getMenuSiteUrl({ host }) {
668
668
  const metadata = {
@@ -705,11 +705,6 @@ function queryMenusSiteUrl(payload) {
705
705
  // src/restaurants-menus-v1-menu-menus.universal.ts
706
706
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
707
707
  var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
708
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
709
- SortOrder2["ASC"] = "ASC";
710
- SortOrder2["DESC"] = "DESC";
711
- return SortOrder2;
712
- })(SortOrder || {});
713
708
  var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
714
709
  WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
715
710
  WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
@@ -718,6 +713,44 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
718
713
  WebhookIdentityType2["APP"] = "APP";
719
714
  return WebhookIdentityType2;
720
715
  })(WebhookIdentityType || {});
716
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
717
+ SortOrder2["ASC"] = "ASC";
718
+ SortOrder2["DESC"] = "DESC";
719
+ return SortOrder2;
720
+ })(SortOrder || {});
721
+ async function duplicateMenu2(_id, options) {
722
+ const { httpClient, sideEffects } = arguments[2];
723
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
724
+ id: _id,
725
+ businessLocationIds: options?.businessLocationIds,
726
+ duplicateSubEntities: options?.duplicateSubEntities,
727
+ menuName: options?.menuName
728
+ });
729
+ const reqOpts = duplicateMenu(payload);
730
+ sideEffects?.onSiteCall?.();
731
+ try {
732
+ const result = await httpClient.request(reqOpts);
733
+ sideEffects?.onSuccess?.(result);
734
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
735
+ } catch (err) {
736
+ const transformedError = (0, import_transform_error.transformError)(
737
+ err,
738
+ {
739
+ spreadPathsToArguments: {},
740
+ explicitPathsToArguments: {
741
+ id: "$[0]",
742
+ businessLocationIds: "$[1].businessLocationIds",
743
+ duplicateSubEntities: "$[1].duplicateSubEntities",
744
+ menuName: "$[1].menuName"
745
+ },
746
+ singleArgumentUnchanged: false
747
+ },
748
+ ["_id", "options"]
749
+ );
750
+ sideEffects?.onError?.(err);
751
+ throw transformedError;
752
+ }
753
+ }
721
754
  async function createMenu2(menu) {
722
755
  const { httpClient, sideEffects } = arguments[1];
723
756
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ menu });
@@ -1002,39 +1035,6 @@ async function deleteMenu2(menuId) {
1002
1035
  throw transformedError;
1003
1036
  }
1004
1037
  }
1005
- async function duplicateMenu2(_id, options) {
1006
- const { httpClient, sideEffects } = arguments[2];
1007
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1008
- id: _id,
1009
- businessLocationIds: options?.businessLocationIds,
1010
- duplicateSubEntities: options?.duplicateSubEntities,
1011
- menuName: options?.menuName
1012
- });
1013
- const reqOpts = duplicateMenu(payload);
1014
- sideEffects?.onSiteCall?.();
1015
- try {
1016
- const result = await httpClient.request(reqOpts);
1017
- sideEffects?.onSuccess?.(result);
1018
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
1019
- } catch (err) {
1020
- const transformedError = (0, import_transform_error.transformError)(
1021
- err,
1022
- {
1023
- spreadPathsToArguments: {},
1024
- explicitPathsToArguments: {
1025
- id: "$[0]",
1026
- businessLocationIds: "$[1].businessLocationIds",
1027
- duplicateSubEntities: "$[1].duplicateSubEntities",
1028
- menuName: "$[1].menuName"
1029
- },
1030
- singleArgumentUnchanged: false
1031
- },
1032
- ["_id", "options"]
1033
- );
1034
- sideEffects?.onError?.(err);
1035
- throw transformedError;
1036
- }
1037
- }
1038
1038
  async function getMenuSiteUrl2(_id) {
1039
1039
  const { httpClient, sideEffects } = arguments[1];
1040
1040
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });