@wix/auto_sdk_restaurants_menus 1.0.70 → 1.0.72
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.
- package/build/cjs/index.d.ts +18 -18
- package/build/cjs/index.js +86 -86
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +224 -224
- package/build/cjs/index.typings.js +59 -59
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +183 -183
- package/build/cjs/meta.js +44 -44
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +12 -12
- package/build/cjs/schemas.js +16 -16
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +18 -18
- package/build/es/index.mjs +86 -86
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +224 -224
- package/build/es/index.typings.mjs +59 -59
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +183 -183
- package/build/es/meta.mjs +44 -44
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +12 -12
- package/build/es/schemas.mjs +16 -16
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +18 -18
- package/build/internal/cjs/index.js +86 -86
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +224 -224
- package/build/internal/cjs/index.typings.js +59 -59
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +183 -183
- package/build/internal/cjs/meta.js +44 -44
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +12 -12
- package/build/internal/cjs/schemas.js +16 -16
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +18 -18
- package/build/internal/es/index.mjs +86 -86
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +224 -224
- package/build/internal/es/index.typings.mjs +59 -59
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +183 -183
- package/build/internal/es/meta.mjs +44 -44
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +12 -12
- package/build/internal/es/schemas.mjs +16 -16
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
2
|
+
import { Menu, BulkCreateMenusOptions, BulkCreateMenusResponse, ListMenusOptions, ListMenusResponse, UpdateMenu, MaskedMenu, BulkUpdateMenuOptions, BulkUpdateMenuResponse, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, DuplicateMenuOptions, DuplicateMenuResponse, GetMenuSiteUrlResponse, QueryMenusSiteUrlOptions, QueryMenusSiteUrlResponse, MenuCreatedEnvelope, MenuDeletedEnvelope, MenuUpdatedEnvelope, MenusQueryBuilder, MenuQuery, typedQueryMenus } from './index.typings.js';
|
|
3
3
|
export { AccountInfo, AccountInfoMetadata, ActionEvent, App, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkCreateMenuResult, BulkCreateMenusRequest, BulkMenuResult, BulkUpdateMenuRequest, BusinessLocationDetails, CloneMenusRequest, CloneMenusResponse, CommonQueryWithEntityContext, CreateMenuRequest, CreateMenuResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, CustomTag, DeleteMenuRequest, DeleteMenuResponse, DeleteOrphanSections, DomainEvent, DomainEventBodyOneOf, DuplicateMenuRequest, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, ExternalReferenceInfo, File, GetMenuRequest, GetMenuResponse, GetMenuSiteUrlRequest, IdentificationData, IdentificationDataIdOneOf, InvalidateCache, InvalidateCacheGetByOneOf, ItemMetadata, Keyword, ListMenusRequest, MenuQuerySpec, MenuSiteUrl, MenusDataCloningCompleted, MenusQueryResult, MessageEnvelope, Page, Pages, QueryMenusRequest, QueryMenusResponse, QueryMenusSiteUrlRequest, RestoreInfo, RunMenusMultiLocationMigrationRequest, RunMenusMultiLocationMigrationResponse, SeoSchema, Settings, SortOrder, SortOrderWithLiterals, Sorting, SyncContentToMultilingualRequest, SyncContentToMultilingualResponse, Tag, URI, URIs, UpdateBusinessLocationIdRequest, UpdateBusinessLocationIdResponse, UpdateExtendedFieldsRequest, UpdateMenuRequest, UpdateMenuResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
|
|
4
4
|
|
|
5
|
-
declare function duplicateMenu$1(httpClient: HttpClient): DuplicateMenuSignature;
|
|
6
|
-
interface DuplicateMenuSignature {
|
|
7
|
-
/** @param - Menu id to be duplicated. */
|
|
8
|
-
(_id: string, options?: DuplicateMenuOptions): Promise<NonNullablePaths<DuplicateMenuResponse, `menuIds`, 2>>;
|
|
9
|
-
}
|
|
10
5
|
declare function createMenu$1(httpClient: HttpClient): CreateMenuSignature;
|
|
11
6
|
interface CreateMenuSignature {
|
|
12
7
|
/**
|
|
13
|
-
* > **Note:** The Menus API only works with the Wix Restaurants Menus
|
|
8
|
+
* > **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).
|
|
14
9
|
*
|
|
15
10
|
* Creates a menu.
|
|
16
11
|
*
|
|
@@ -23,7 +18,7 @@ interface CreateMenuSignature {
|
|
|
23
18
|
declare function bulkCreateMenus$1(httpClient: HttpClient): BulkCreateMenusSignature;
|
|
24
19
|
interface BulkCreateMenusSignature {
|
|
25
20
|
/**
|
|
26
|
-
* > **Note:** The Menu API only works with the Wix Restaurants Menus
|
|
21
|
+
* > **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).
|
|
27
22
|
*
|
|
28
23
|
* Creates multiple menus at once.
|
|
29
24
|
* @param - Menu details.
|
|
@@ -33,7 +28,7 @@ interface BulkCreateMenusSignature {
|
|
|
33
28
|
declare function getMenu$1(httpClient: HttpClient): GetMenuSignature;
|
|
34
29
|
interface GetMenuSignature {
|
|
35
30
|
/**
|
|
36
|
-
* > **Note:** The Menu API only works with the Wix Restaurants Menus
|
|
31
|
+
* > **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).
|
|
37
32
|
*
|
|
38
33
|
* Retrieves a menu by ID.
|
|
39
34
|
* @param - Menu ID.
|
|
@@ -44,7 +39,7 @@ interface GetMenuSignature {
|
|
|
44
39
|
declare function listMenus$1(httpClient: HttpClient): ListMenusSignature;
|
|
45
40
|
interface ListMenusSignature {
|
|
46
41
|
/**
|
|
47
|
-
* > **Note:** The Menu API only works with the Wix Restaurants Menus
|
|
42
|
+
* > **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).
|
|
48
43
|
*
|
|
49
44
|
* Retrieves a list of up to 500 menus.
|
|
50
45
|
*/
|
|
@@ -53,7 +48,7 @@ interface ListMenusSignature {
|
|
|
53
48
|
declare function updateMenu$1(httpClient: HttpClient): UpdateMenuSignature;
|
|
54
49
|
interface UpdateMenuSignature {
|
|
55
50
|
/**
|
|
56
|
-
* > **Note:** The Menu API only works with the Wix Restaurants Menus
|
|
51
|
+
* > **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).
|
|
57
52
|
*
|
|
58
53
|
* Updates a menu.
|
|
59
54
|
*
|
|
@@ -68,7 +63,7 @@ interface UpdateMenuSignature {
|
|
|
68
63
|
declare function bulkUpdateMenu$1(httpClient: HttpClient): BulkUpdateMenuSignature;
|
|
69
64
|
interface BulkUpdateMenuSignature {
|
|
70
65
|
/**
|
|
71
|
-
* > **Note:** The Menu API only works with the Wix Restaurants Menus
|
|
66
|
+
* > **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).
|
|
72
67
|
*
|
|
73
68
|
* Updates multiple menus at once.
|
|
74
69
|
*
|
|
@@ -80,7 +75,7 @@ interface BulkUpdateMenuSignature {
|
|
|
80
75
|
declare function updateExtendedFields$1(httpClient: HttpClient): UpdateExtendedFieldsSignature;
|
|
81
76
|
interface UpdateExtendedFieldsSignature {
|
|
82
77
|
/**
|
|
83
|
-
* > **Note:** The Menu API only works with the Wix Restaurants Menus
|
|
78
|
+
* > **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).
|
|
84
79
|
*
|
|
85
80
|
* Updates only the `extendedFields` field.
|
|
86
81
|
* @param - ID of the entity to update.
|
|
@@ -91,13 +86,18 @@ interface UpdateExtendedFieldsSignature {
|
|
|
91
86
|
declare function deleteMenu$1(httpClient: HttpClient): DeleteMenuSignature;
|
|
92
87
|
interface DeleteMenuSignature {
|
|
93
88
|
/**
|
|
94
|
-
* > **Note:** The Menu API only works with the Wix Restaurants Menus
|
|
89
|
+
* > **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).
|
|
95
90
|
*
|
|
96
91
|
* Deletes a menu.
|
|
97
92
|
* @param - Menu ID.
|
|
98
93
|
*/
|
|
99
94
|
(menuId: string): Promise<void>;
|
|
100
95
|
}
|
|
96
|
+
declare function duplicateMenu$1(httpClient: HttpClient): DuplicateMenuSignature;
|
|
97
|
+
interface DuplicateMenuSignature {
|
|
98
|
+
/** @param - Menu id to be duplicated. */
|
|
99
|
+
(_id: string, options?: DuplicateMenuOptions): Promise<NonNullablePaths<DuplicateMenuResponse, `menuIds`, 2>>;
|
|
100
|
+
}
|
|
101
101
|
declare function getMenuSiteUrl$1(httpClient: HttpClient): GetMenuSiteUrlSignature;
|
|
102
102
|
interface GetMenuSiteUrlSignature {
|
|
103
103
|
/**
|
|
@@ -113,15 +113,14 @@ interface QueryMenusSiteUrlSignature {
|
|
|
113
113
|
*/
|
|
114
114
|
(options?: QueryMenusSiteUrlOptions): Promise<NonNullablePaths<QueryMenusSiteUrlResponse, `menuSiteUrls` | `menuSiteUrls.${number}.path`, 4>>;
|
|
115
115
|
}
|
|
116
|
-
declare const onMenuUpdated$1: EventDefinition<MenuUpdatedEnvelope, "wix.restaurants.menus.v1.menu_updated">;
|
|
117
116
|
declare const onMenuCreated$1: EventDefinition<MenuCreatedEnvelope, "wix.restaurants.menus.v1.menu_created">;
|
|
118
117
|
declare const onMenuDeleted$1: EventDefinition<MenuDeletedEnvelope, "wix.restaurants.menus.v1.menu_deleted">;
|
|
118
|
+
declare const onMenuUpdated$1: EventDefinition<MenuUpdatedEnvelope, "wix.restaurants.menus.v1.menu_updated">;
|
|
119
119
|
|
|
120
120
|
declare function customQueryMenus(httpClient: HttpClient): {
|
|
121
121
|
(): MenusQueryBuilder;
|
|
122
122
|
(query: MenuQuery): ReturnType<typeof typedQueryMenus>;
|
|
123
123
|
};
|
|
124
|
-
declare const duplicateMenu: MaybeContext<BuildRESTFunction<typeof duplicateMenu$1> & typeof duplicateMenu$1>;
|
|
125
124
|
declare const createMenu: MaybeContext<BuildRESTFunction<typeof createMenu$1> & typeof createMenu$1>;
|
|
126
125
|
declare const bulkCreateMenus: MaybeContext<BuildRESTFunction<typeof bulkCreateMenus$1> & typeof bulkCreateMenus$1>;
|
|
127
126
|
declare const getMenu: MaybeContext<BuildRESTFunction<typeof getMenu$1> & typeof getMenu$1>;
|
|
@@ -130,16 +129,17 @@ declare const updateMenu: MaybeContext<BuildRESTFunction<typeof updateMenu$1> &
|
|
|
130
129
|
declare const bulkUpdateMenu: MaybeContext<BuildRESTFunction<typeof bulkUpdateMenu$1> & typeof bulkUpdateMenu$1>;
|
|
131
130
|
declare const updateExtendedFields: MaybeContext<BuildRESTFunction<typeof updateExtendedFields$1> & typeof updateExtendedFields$1>;
|
|
132
131
|
declare const deleteMenu: MaybeContext<BuildRESTFunction<typeof deleteMenu$1> & typeof deleteMenu$1>;
|
|
132
|
+
declare const duplicateMenu: MaybeContext<BuildRESTFunction<typeof duplicateMenu$1> & typeof duplicateMenu$1>;
|
|
133
133
|
declare const getMenuSiteUrl: MaybeContext<BuildRESTFunction<typeof getMenuSiteUrl$1> & typeof getMenuSiteUrl$1>;
|
|
134
134
|
declare const queryMenusSiteUrl: MaybeContext<BuildRESTFunction<typeof queryMenusSiteUrl$1> & typeof queryMenusSiteUrl$1>;
|
|
135
135
|
declare const queryMenus: MaybeContext<BuildRESTFunction<typeof customQueryMenus> & typeof customQueryMenus>;
|
|
136
136
|
/** */
|
|
137
|
-
declare const onMenuUpdated: BuildEventDefinition<typeof onMenuUpdated$1> & typeof onMenuUpdated$1;
|
|
138
|
-
/** */
|
|
139
137
|
declare const onMenuCreated: BuildEventDefinition<typeof onMenuCreated$1> & typeof onMenuCreated$1;
|
|
140
138
|
/**
|
|
141
139
|
* Triggered when a menu is deleted.
|
|
142
140
|
*/
|
|
143
141
|
declare const onMenuDeleted: BuildEventDefinition<typeof onMenuDeleted$1> & typeof onMenuDeleted$1;
|
|
142
|
+
/** */
|
|
143
|
+
declare const onMenuUpdated: BuildEventDefinition<typeof onMenuUpdated$1> & typeof onMenuUpdated$1;
|
|
144
144
|
|
|
145
145
|
export { BulkCreateMenusOptions, BulkCreateMenusResponse, BulkUpdateMenuOptions, BulkUpdateMenuResponse, DuplicateMenuOptions, DuplicateMenuResponse, GetMenuSiteUrlResponse, ListMenusOptions, ListMenusResponse, MaskedMenu, Menu, MenuCreatedEnvelope, MenuDeletedEnvelope, MenuQuery, MenuUpdatedEnvelope, MenusQueryBuilder, QueryMenusSiteUrlOptions, QueryMenusSiteUrlResponse, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateMenu, bulkCreateMenus, bulkUpdateMenu, createMenu, deleteMenu, duplicateMenu, getMenu, getMenuSiteUrl, listMenus, onMenuCreated, onMenuDeleted, onMenuUpdated, queryMenus, queryMenusSiteUrl, updateExtendedFields, updateMenu };
|
package/build/cjs/index.js
CHANGED
|
@@ -154,7 +154,7 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusSiteUrlRestaura
|
|
|
154
154
|
};
|
|
155
155
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(opts) {
|
|
158
158
|
const domainToMappings = {
|
|
159
159
|
"manage._base_domain_": [
|
|
160
160
|
{
|
|
@@ -249,7 +249,7 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusMenuUrl(opts) {
|
|
|
249
249
|
};
|
|
250
250
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusMenuUrl(opts) {
|
|
253
253
|
const domainToMappings = {
|
|
254
254
|
"manage._base_domain_": [
|
|
255
255
|
{
|
|
@@ -345,25 +345,6 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaur
|
|
|
345
345
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
346
346
|
}
|
|
347
347
|
var PACKAGE_NAME = "@wix/auto_sdk_restaurants_menus";
|
|
348
|
-
function duplicateMenu(payload) {
|
|
349
|
-
function __duplicateMenu({ host }) {
|
|
350
|
-
const metadata = {
|
|
351
|
-
entityFqdn: "wix.restaurants.menus.v1.menu",
|
|
352
|
-
method: "POST",
|
|
353
|
-
methodFqn: "com.wixpress.restaurants.menus_menu.v1.restaurants_duplicate_menu.RestaurantsDuplicateMenu.DuplicateMenu",
|
|
354
|
-
packageName: PACKAGE_NAME,
|
|
355
|
-
migrationOptions: {
|
|
356
|
-
optInTransformResponse: true
|
|
357
|
-
},
|
|
358
|
-
url: resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(
|
|
359
|
-
{ protoPath: "/v1/menus/{id}/duplicate", data: payload, host }
|
|
360
|
-
),
|
|
361
|
-
data: payload
|
|
362
|
-
};
|
|
363
|
-
return metadata;
|
|
364
|
-
}
|
|
365
|
-
return __duplicateMenu;
|
|
366
|
-
}
|
|
367
348
|
function createMenu(payload) {
|
|
368
349
|
function __createMenu({ host }) {
|
|
369
350
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -671,6 +652,25 @@ function deleteMenu(payload) {
|
|
|
671
652
|
}
|
|
672
653
|
return __deleteMenu;
|
|
673
654
|
}
|
|
655
|
+
function duplicateMenu(payload) {
|
|
656
|
+
function __duplicateMenu({ host }) {
|
|
657
|
+
const metadata = {
|
|
658
|
+
entityFqdn: "wix.restaurants.menus.v1.menu",
|
|
659
|
+
method: "POST",
|
|
660
|
+
methodFqn: "com.wixpress.restaurants.menus_menu.v1.restaurants_duplicate_menu.RestaurantsDuplicateMenu.DuplicateMenu",
|
|
661
|
+
packageName: PACKAGE_NAME,
|
|
662
|
+
migrationOptions: {
|
|
663
|
+
optInTransformResponse: true
|
|
664
|
+
},
|
|
665
|
+
url: resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(
|
|
666
|
+
{ protoPath: "/v1/menus/{id}/duplicate", data: payload, host }
|
|
667
|
+
),
|
|
668
|
+
data: payload
|
|
669
|
+
};
|
|
670
|
+
return metadata;
|
|
671
|
+
}
|
|
672
|
+
return __duplicateMenu;
|
|
673
|
+
}
|
|
674
674
|
function getMenuSiteUrl(payload) {
|
|
675
675
|
function __getMenuSiteUrl({ host }) {
|
|
676
676
|
const metadata = {
|
|
@@ -713,6 +713,11 @@ function queryMenusSiteUrl(payload) {
|
|
|
713
713
|
// src/restaurants-menus-v1-menu-menus.universal.ts
|
|
714
714
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
715
715
|
var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
|
|
716
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
717
|
+
SortOrder2["ASC"] = "ASC";
|
|
718
|
+
SortOrder2["DESC"] = "DESC";
|
|
719
|
+
return SortOrder2;
|
|
720
|
+
})(SortOrder || {});
|
|
716
721
|
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
717
722
|
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
718
723
|
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
@@ -721,44 +726,6 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
721
726
|
WebhookIdentityType2["APP"] = "APP";
|
|
722
727
|
return WebhookIdentityType2;
|
|
723
728
|
})(WebhookIdentityType || {});
|
|
724
|
-
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
725
|
-
SortOrder2["ASC"] = "ASC";
|
|
726
|
-
SortOrder2["DESC"] = "DESC";
|
|
727
|
-
return SortOrder2;
|
|
728
|
-
})(SortOrder || {});
|
|
729
|
-
async function duplicateMenu2(_id, options) {
|
|
730
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
731
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
732
|
-
id: _id,
|
|
733
|
-
businessLocationIds: options?.businessLocationIds,
|
|
734
|
-
duplicateSubEntities: options?.duplicateSubEntities,
|
|
735
|
-
menuName: options?.menuName
|
|
736
|
-
});
|
|
737
|
-
const reqOpts = duplicateMenu(payload);
|
|
738
|
-
sideEffects?.onSiteCall?.();
|
|
739
|
-
try {
|
|
740
|
-
const result = await httpClient.request(reqOpts);
|
|
741
|
-
sideEffects?.onSuccess?.(result);
|
|
742
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
743
|
-
} catch (err) {
|
|
744
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
745
|
-
err,
|
|
746
|
-
{
|
|
747
|
-
spreadPathsToArguments: {},
|
|
748
|
-
explicitPathsToArguments: {
|
|
749
|
-
id: "$[0]",
|
|
750
|
-
businessLocationIds: "$[1].businessLocationIds",
|
|
751
|
-
duplicateSubEntities: "$[1].duplicateSubEntities",
|
|
752
|
-
menuName: "$[1].menuName"
|
|
753
|
-
},
|
|
754
|
-
singleArgumentUnchanged: false
|
|
755
|
-
},
|
|
756
|
-
["_id", "options"]
|
|
757
|
-
);
|
|
758
|
-
sideEffects?.onError?.(err);
|
|
759
|
-
throw transformedError;
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
729
|
async function createMenu2(menu) {
|
|
763
730
|
const { httpClient, sideEffects } = arguments[1];
|
|
764
731
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ menu });
|
|
@@ -1043,6 +1010,39 @@ async function deleteMenu2(menuId) {
|
|
|
1043
1010
|
throw transformedError;
|
|
1044
1011
|
}
|
|
1045
1012
|
}
|
|
1013
|
+
async function duplicateMenu2(_id, options) {
|
|
1014
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1015
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1016
|
+
id: _id,
|
|
1017
|
+
businessLocationIds: options?.businessLocationIds,
|
|
1018
|
+
duplicateSubEntities: options?.duplicateSubEntities,
|
|
1019
|
+
menuName: options?.menuName
|
|
1020
|
+
});
|
|
1021
|
+
const reqOpts = duplicateMenu(payload);
|
|
1022
|
+
sideEffects?.onSiteCall?.();
|
|
1023
|
+
try {
|
|
1024
|
+
const result = await httpClient.request(reqOpts);
|
|
1025
|
+
sideEffects?.onSuccess?.(result);
|
|
1026
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1027
|
+
} catch (err) {
|
|
1028
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1029
|
+
err,
|
|
1030
|
+
{
|
|
1031
|
+
spreadPathsToArguments: {},
|
|
1032
|
+
explicitPathsToArguments: {
|
|
1033
|
+
id: "$[0]",
|
|
1034
|
+
businessLocationIds: "$[1].businessLocationIds",
|
|
1035
|
+
duplicateSubEntities: "$[1].duplicateSubEntities",
|
|
1036
|
+
menuName: "$[1].menuName"
|
|
1037
|
+
},
|
|
1038
|
+
singleArgumentUnchanged: false
|
|
1039
|
+
},
|
|
1040
|
+
["_id", "options"]
|
|
1041
|
+
);
|
|
1042
|
+
sideEffects?.onError?.(err);
|
|
1043
|
+
throw transformedError;
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
1046
|
async function getMenuSiteUrl2(_id) {
|
|
1047
1047
|
const { httpClient, sideEffects } = arguments[1];
|
|
1048
1048
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
|
|
@@ -1093,14 +1093,6 @@ async function queryMenusSiteUrl2(options) {
|
|
|
1093
1093
|
}
|
|
1094
1094
|
|
|
1095
1095
|
// src/restaurants-menus-v1-menu-menus.public.ts
|
|
1096
|
-
function duplicateMenu3(httpClient) {
|
|
1097
|
-
return (_id, options) => duplicateMenu2(
|
|
1098
|
-
_id,
|
|
1099
|
-
options,
|
|
1100
|
-
// @ts-ignore
|
|
1101
|
-
{ httpClient }
|
|
1102
|
-
);
|
|
1103
|
-
}
|
|
1104
1096
|
function createMenu3(httpClient) {
|
|
1105
1097
|
return (menu) => createMenu2(
|
|
1106
1098
|
menu,
|
|
@@ -1175,6 +1167,14 @@ function deleteMenu3(httpClient) {
|
|
|
1175
1167
|
{ httpClient }
|
|
1176
1168
|
);
|
|
1177
1169
|
}
|
|
1170
|
+
function duplicateMenu3(httpClient) {
|
|
1171
|
+
return (_id, options) => duplicateMenu2(
|
|
1172
|
+
_id,
|
|
1173
|
+
options,
|
|
1174
|
+
// @ts-ignore
|
|
1175
|
+
{ httpClient }
|
|
1176
|
+
);
|
|
1177
|
+
}
|
|
1178
1178
|
function getMenuSiteUrl3(httpClient) {
|
|
1179
1179
|
return (_id) => getMenuSiteUrl2(
|
|
1180
1180
|
_id,
|
|
@@ -1189,8 +1189,8 @@ function queryMenusSiteUrl3(httpClient) {
|
|
|
1189
1189
|
{ httpClient }
|
|
1190
1190
|
);
|
|
1191
1191
|
}
|
|
1192
|
-
var
|
|
1193
|
-
"wix.restaurants.menus.v1.
|
|
1192
|
+
var onMenuCreated = (0, import_sdk_types.EventDefinition)(
|
|
1193
|
+
"wix.restaurants.menus.v1.menu_created",
|
|
1194
1194
|
true,
|
|
1195
1195
|
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
1196
1196
|
(0, import_transform_paths3.transformPaths)(event, [
|
|
@@ -1200,44 +1200,44 @@ var onMenuUpdated = (0, import_sdk_types.EventDefinition)(
|
|
|
1200
1200
|
{ path: "entity.createdDate" },
|
|
1201
1201
|
{ path: "entity.updatedDate" },
|
|
1202
1202
|
{ path: "entity.externalReferenceInfo.lastSyncDate" },
|
|
1203
|
-
{ path: "metadata.eventTime" }
|
|
1204
|
-
{ path: "modifiedFields.createdDate" },
|
|
1205
|
-
{ path: "modifiedFields.updatedDate" },
|
|
1206
|
-
{ path: "modifiedFields.externalReferenceInfo.lastSyncDate" }
|
|
1203
|
+
{ path: "metadata.eventTime" }
|
|
1207
1204
|
]
|
|
1208
1205
|
}
|
|
1209
1206
|
])
|
|
1210
1207
|
)
|
|
1211
1208
|
)();
|
|
1212
|
-
var
|
|
1213
|
-
"wix.restaurants.menus.v1.
|
|
1209
|
+
var onMenuDeleted = (0, import_sdk_types.EventDefinition)(
|
|
1210
|
+
"wix.restaurants.menus.v1.menu_deleted",
|
|
1214
1211
|
true,
|
|
1215
1212
|
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
1216
1213
|
(0, import_transform_paths3.transformPaths)(event, [
|
|
1217
1214
|
{
|
|
1218
1215
|
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
1219
1216
|
paths: [
|
|
1220
|
-
{ path: "
|
|
1221
|
-
{ path: "
|
|
1222
|
-
{ path: "
|
|
1217
|
+
{ path: "undefined.createdDate" },
|
|
1218
|
+
{ path: "undefined.updatedDate" },
|
|
1219
|
+
{ path: "undefined.externalReferenceInfo.lastSyncDate" },
|
|
1223
1220
|
{ path: "metadata.eventTime" }
|
|
1224
1221
|
]
|
|
1225
1222
|
}
|
|
1226
1223
|
])
|
|
1227
1224
|
)
|
|
1228
1225
|
)();
|
|
1229
|
-
var
|
|
1230
|
-
"wix.restaurants.menus.v1.
|
|
1226
|
+
var onMenuUpdated = (0, import_sdk_types.EventDefinition)(
|
|
1227
|
+
"wix.restaurants.menus.v1.menu_updated",
|
|
1231
1228
|
true,
|
|
1232
1229
|
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
1233
1230
|
(0, import_transform_paths3.transformPaths)(event, [
|
|
1234
1231
|
{
|
|
1235
1232
|
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
1236
1233
|
paths: [
|
|
1237
|
-
{ path: "
|
|
1238
|
-
{ path: "
|
|
1239
|
-
{ path: "
|
|
1240
|
-
{ path: "metadata.eventTime" }
|
|
1234
|
+
{ path: "entity.createdDate" },
|
|
1235
|
+
{ path: "entity.updatedDate" },
|
|
1236
|
+
{ path: "entity.externalReferenceInfo.lastSyncDate" },
|
|
1237
|
+
{ path: "metadata.eventTime" },
|
|
1238
|
+
{ path: "modifiedFields.createdDate" },
|
|
1239
|
+
{ path: "modifiedFields.updatedDate" },
|
|
1240
|
+
{ path: "modifiedFields.externalReferenceInfo.lastSyncDate" }
|
|
1241
1241
|
]
|
|
1242
1242
|
}
|
|
1243
1243
|
])
|
|
@@ -1259,7 +1259,6 @@ function customQueryMenus(httpClient) {
|
|
|
1259
1259
|
}
|
|
1260
1260
|
return overloadedQuery;
|
|
1261
1261
|
}
|
|
1262
|
-
var duplicateMenu4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(duplicateMenu3);
|
|
1263
1262
|
var createMenu4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createMenu3);
|
|
1264
1263
|
var bulkCreateMenus4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateMenus3);
|
|
1265
1264
|
var getMenu4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getMenu3);
|
|
@@ -1268,12 +1267,13 @@ var updateMenu4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(upd
|
|
|
1268
1267
|
var bulkUpdateMenu4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdateMenu3);
|
|
1269
1268
|
var updateExtendedFields4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateExtendedFields3);
|
|
1270
1269
|
var deleteMenu4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteMenu3);
|
|
1270
|
+
var duplicateMenu4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(duplicateMenu3);
|
|
1271
1271
|
var getMenuSiteUrl4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getMenuSiteUrl3);
|
|
1272
1272
|
var queryMenusSiteUrl4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryMenusSiteUrl3);
|
|
1273
1273
|
var queryMenus4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryMenus);
|
|
1274
|
-
var onMenuUpdated2 = (0, import_event_definition_modules.createEventModule)(onMenuUpdated);
|
|
1275
1274
|
var onMenuCreated2 = (0, import_event_definition_modules.createEventModule)(onMenuCreated);
|
|
1276
1275
|
var onMenuDeleted2 = (0, import_event_definition_modules.createEventModule)(onMenuDeleted);
|
|
1276
|
+
var onMenuUpdated2 = (0, import_event_definition_modules.createEventModule)(onMenuUpdated);
|
|
1277
1277
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1278
1278
|
0 && (module.exports = {
|
|
1279
1279
|
SortOrder,
|