@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.
- 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 +4 -4
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { Menu, BulkCreateMenusOptions, BulkCreateMenusResponse, ListMenusOptions, ListMenusResponse, UpdateMenu, MaskedMenu, BulkUpdateMenuOptions, BulkUpdateMenuResponse, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse,
|
|
2
|
+
import { DuplicateMenuOptions, DuplicateMenuResponse, Menu, BulkCreateMenusOptions, BulkCreateMenusResponse, ListMenusOptions, ListMenusResponse, UpdateMenu, MaskedMenu, BulkUpdateMenuOptions, BulkUpdateMenuResponse, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, GetMenuSiteUrlResponse, QueryMenusSiteUrlOptions, QueryMenusSiteUrlResponse, MenuUpdatedEnvelope, MenuCreatedEnvelope, MenuDeletedEnvelope, 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
|
+
}
|
|
5
10
|
declare function createMenu$1(httpClient: HttpClient): CreateMenuSignature;
|
|
6
11
|
interface CreateMenuSignature {
|
|
7
12
|
/**
|
|
8
|
-
* > **Note:** The Menus API only works with the Wix Restaurants Menus
|
|
13
|
+
* > **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).
|
|
9
14
|
*
|
|
10
15
|
* Creates a menu.
|
|
11
16
|
*
|
|
@@ -18,7 +23,7 @@ interface CreateMenuSignature {
|
|
|
18
23
|
declare function bulkCreateMenus$1(httpClient: HttpClient): BulkCreateMenusSignature;
|
|
19
24
|
interface BulkCreateMenusSignature {
|
|
20
25
|
/**
|
|
21
|
-
* > **Note:** The Menu API only works with the Wix Restaurants Menus
|
|
26
|
+
* > **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).
|
|
22
27
|
*
|
|
23
28
|
* Creates multiple menus at once.
|
|
24
29
|
* @param - Menu details.
|
|
@@ -28,7 +33,7 @@ interface BulkCreateMenusSignature {
|
|
|
28
33
|
declare function getMenu$1(httpClient: HttpClient): GetMenuSignature;
|
|
29
34
|
interface GetMenuSignature {
|
|
30
35
|
/**
|
|
31
|
-
* > **Note:** The Menu API only works with the Wix Restaurants Menus
|
|
36
|
+
* > **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).
|
|
32
37
|
*
|
|
33
38
|
* Retrieves a menu by ID.
|
|
34
39
|
* @param - Menu ID.
|
|
@@ -39,7 +44,7 @@ interface GetMenuSignature {
|
|
|
39
44
|
declare function listMenus$1(httpClient: HttpClient): ListMenusSignature;
|
|
40
45
|
interface ListMenusSignature {
|
|
41
46
|
/**
|
|
42
|
-
* > **Note:** The Menu API only works with the Wix Restaurants Menus
|
|
47
|
+
* > **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).
|
|
43
48
|
*
|
|
44
49
|
* Retrieves a list of up to 500 menus.
|
|
45
50
|
*/
|
|
@@ -48,7 +53,7 @@ interface ListMenusSignature {
|
|
|
48
53
|
declare function updateMenu$1(httpClient: HttpClient): UpdateMenuSignature;
|
|
49
54
|
interface UpdateMenuSignature {
|
|
50
55
|
/**
|
|
51
|
-
* > **Note:** The Menu API only works with the Wix Restaurants Menus
|
|
56
|
+
* > **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).
|
|
52
57
|
*
|
|
53
58
|
* Updates a menu.
|
|
54
59
|
*
|
|
@@ -63,7 +68,7 @@ interface UpdateMenuSignature {
|
|
|
63
68
|
declare function bulkUpdateMenu$1(httpClient: HttpClient): BulkUpdateMenuSignature;
|
|
64
69
|
interface BulkUpdateMenuSignature {
|
|
65
70
|
/**
|
|
66
|
-
* > **Note:** The Menu API only works with the Wix Restaurants Menus
|
|
71
|
+
* > **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).
|
|
67
72
|
*
|
|
68
73
|
* Updates multiple menus at once.
|
|
69
74
|
*
|
|
@@ -75,7 +80,7 @@ interface BulkUpdateMenuSignature {
|
|
|
75
80
|
declare function updateExtendedFields$1(httpClient: HttpClient): UpdateExtendedFieldsSignature;
|
|
76
81
|
interface UpdateExtendedFieldsSignature {
|
|
77
82
|
/**
|
|
78
|
-
* > **Note:** The Menu API only works with the Wix Restaurants Menus
|
|
83
|
+
* > **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).
|
|
79
84
|
*
|
|
80
85
|
* Updates only the `extendedFields` field.
|
|
81
86
|
* @param - ID of the entity to update.
|
|
@@ -86,18 +91,13 @@ interface UpdateExtendedFieldsSignature {
|
|
|
86
91
|
declare function deleteMenu$1(httpClient: HttpClient): DeleteMenuSignature;
|
|
87
92
|
interface DeleteMenuSignature {
|
|
88
93
|
/**
|
|
89
|
-
* > **Note:** The Menu API only works with the Wix Restaurants Menus
|
|
94
|
+
* > **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).
|
|
90
95
|
*
|
|
91
96
|
* Deletes a menu.
|
|
92
97
|
* @param - Menu ID.
|
|
93
98
|
*/
|
|
94
99
|
(menuId: string): Promise<void>;
|
|
95
100
|
}
|
|
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,14 +113,15 @@ 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">;
|
|
116
117
|
declare const onMenuCreated$1: EventDefinition<MenuCreatedEnvelope, "wix.restaurants.menus.v1.menu_created">;
|
|
117
118
|
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>;
|
|
124
125
|
declare const createMenu: MaybeContext<BuildRESTFunction<typeof createMenu$1> & typeof createMenu$1>;
|
|
125
126
|
declare const bulkCreateMenus: MaybeContext<BuildRESTFunction<typeof bulkCreateMenus$1> & typeof bulkCreateMenus$1>;
|
|
126
127
|
declare const getMenu: MaybeContext<BuildRESTFunction<typeof getMenu$1> & typeof getMenu$1>;
|
|
@@ -129,17 +130,16 @@ declare const updateMenu: MaybeContext<BuildRESTFunction<typeof updateMenu$1> &
|
|
|
129
130
|
declare const bulkUpdateMenu: MaybeContext<BuildRESTFunction<typeof bulkUpdateMenu$1> & typeof bulkUpdateMenu$1>;
|
|
130
131
|
declare const updateExtendedFields: MaybeContext<BuildRESTFunction<typeof updateExtendedFields$1> & typeof updateExtendedFields$1>;
|
|
131
132
|
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
|
+
/** */
|
|
137
139
|
declare const onMenuCreated: BuildEventDefinition<typeof onMenuCreated$1> & typeof onMenuCreated$1;
|
|
138
140
|
/**
|
|
139
141
|
* Triggered when a menu is deleted.
|
|
140
142
|
*/
|
|
141
143
|
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 resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusMenuUrl(opts) {
|
|
158
158
|
const domainToMappings = {
|
|
159
159
|
"manage._base_domain_": [
|
|
160
160
|
{
|
|
@@ -249,7 +249,7 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaur
|
|
|
249
249
|
};
|
|
250
250
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(opts) {
|
|
253
253
|
const domainToMappings = {
|
|
254
254
|
"manage._base_domain_": [
|
|
255
255
|
{
|
|
@@ -345,6 +345,25 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusMenuUrl(opts) {
|
|
|
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
|
+
}
|
|
348
367
|
function createMenu(payload) {
|
|
349
368
|
function __createMenu({ host }) {
|
|
350
369
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -652,25 +671,6 @@ function deleteMenu(payload) {
|
|
|
652
671
|
}
|
|
653
672
|
return __deleteMenu;
|
|
654
673
|
}
|
|
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,11 +713,6 @@ 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 || {});
|
|
721
716
|
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
722
717
|
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
723
718
|
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
@@ -726,6 +721,44 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
726
721
|
WebhookIdentityType2["APP"] = "APP";
|
|
727
722
|
return WebhookIdentityType2;
|
|
728
723
|
})(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
|
+
}
|
|
729
762
|
async function createMenu2(menu) {
|
|
730
763
|
const { httpClient, sideEffects } = arguments[1];
|
|
731
764
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ menu });
|
|
@@ -1010,39 +1043,6 @@ async function deleteMenu2(menuId) {
|
|
|
1010
1043
|
throw transformedError;
|
|
1011
1044
|
}
|
|
1012
1045
|
}
|
|
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,6 +1093,14 @@ 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
|
+
}
|
|
1096
1104
|
function createMenu3(httpClient) {
|
|
1097
1105
|
return (menu) => createMenu2(
|
|
1098
1106
|
menu,
|
|
@@ -1167,14 +1175,6 @@ function deleteMenu3(httpClient) {
|
|
|
1167
1175
|
{ httpClient }
|
|
1168
1176
|
);
|
|
1169
1177
|
}
|
|
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 onMenuUpdated = (0, import_sdk_types.EventDefinition)(
|
|
1193
|
+
"wix.restaurants.menus.v1.menu_updated",
|
|
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 onMenuCreated = (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" }
|
|
1203
|
+
{ path: "metadata.eventTime" },
|
|
1204
|
+
{ path: "modifiedFields.createdDate" },
|
|
1205
|
+
{ path: "modifiedFields.updatedDate" },
|
|
1206
|
+
{ path: "modifiedFields.externalReferenceInfo.lastSyncDate" }
|
|
1204
1207
|
]
|
|
1205
1208
|
}
|
|
1206
1209
|
])
|
|
1207
1210
|
)
|
|
1208
1211
|
)();
|
|
1209
|
-
var
|
|
1210
|
-
"wix.restaurants.menus.v1.
|
|
1212
|
+
var onMenuCreated = (0, import_sdk_types.EventDefinition)(
|
|
1213
|
+
"wix.restaurants.menus.v1.menu_created",
|
|
1211
1214
|
true,
|
|
1212
1215
|
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
1213
1216
|
(0, import_transform_paths3.transformPaths)(event, [
|
|
1214
1217
|
{
|
|
1215
1218
|
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
1216
1219
|
paths: [
|
|
1217
|
-
{ path: "
|
|
1218
|
-
{ path: "
|
|
1219
|
-
{ path: "
|
|
1220
|
+
{ path: "entity.createdDate" },
|
|
1221
|
+
{ path: "entity.updatedDate" },
|
|
1222
|
+
{ path: "entity.externalReferenceInfo.lastSyncDate" },
|
|
1220
1223
|
{ path: "metadata.eventTime" }
|
|
1221
1224
|
]
|
|
1222
1225
|
}
|
|
1223
1226
|
])
|
|
1224
1227
|
)
|
|
1225
1228
|
)();
|
|
1226
|
-
var
|
|
1227
|
-
"wix.restaurants.menus.v1.
|
|
1229
|
+
var onMenuDeleted = (0, import_sdk_types.EventDefinition)(
|
|
1230
|
+
"wix.restaurants.menus.v1.menu_deleted",
|
|
1228
1231
|
true,
|
|
1229
1232
|
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
1230
1233
|
(0, import_transform_paths3.transformPaths)(event, [
|
|
1231
1234
|
{
|
|
1232
1235
|
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
1233
1236
|
paths: [
|
|
1234
|
-
{ path: "
|
|
1235
|
-
{ path: "
|
|
1236
|
-
{ path: "
|
|
1237
|
-
{ path: "metadata.eventTime" }
|
|
1238
|
-
{ path: "modifiedFields.createdDate" },
|
|
1239
|
-
{ path: "modifiedFields.updatedDate" },
|
|
1240
|
-
{ path: "modifiedFields.externalReferenceInfo.lastSyncDate" }
|
|
1237
|
+
{ path: "undefined.createdDate" },
|
|
1238
|
+
{ path: "undefined.updatedDate" },
|
|
1239
|
+
{ path: "undefined.externalReferenceInfo.lastSyncDate" },
|
|
1240
|
+
{ path: "metadata.eventTime" }
|
|
1241
1241
|
]
|
|
1242
1242
|
}
|
|
1243
1243
|
])
|
|
@@ -1259,6 +1259,7 @@ function customQueryMenus(httpClient) {
|
|
|
1259
1259
|
}
|
|
1260
1260
|
return overloadedQuery;
|
|
1261
1261
|
}
|
|
1262
|
+
var duplicateMenu4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(duplicateMenu3);
|
|
1262
1263
|
var createMenu4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createMenu3);
|
|
1263
1264
|
var bulkCreateMenus4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateMenus3);
|
|
1264
1265
|
var getMenu4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getMenu3);
|
|
@@ -1267,13 +1268,12 @@ var updateMenu4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(upd
|
|
|
1267
1268
|
var bulkUpdateMenu4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdateMenu3);
|
|
1268
1269
|
var updateExtendedFields4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateExtendedFields3);
|
|
1269
1270
|
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);
|
|
1274
1275
|
var onMenuCreated2 = (0, import_event_definition_modules.createEventModule)(onMenuCreated);
|
|
1275
1276
|
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,
|