@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/es/index.d.mts
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.mjs';
|
|
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.mjs';
|
|
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/es/index.mjs
CHANGED
|
@@ -114,7 +114,7 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusSiteUrlRestaura
|
|
|
114
114
|
};
|
|
115
115
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusMenuUrl(opts) {
|
|
118
118
|
const domainToMappings = {
|
|
119
119
|
"manage._base_domain_": [
|
|
120
120
|
{
|
|
@@ -209,7 +209,7 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaur
|
|
|
209
209
|
};
|
|
210
210
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(opts) {
|
|
213
213
|
const domainToMappings = {
|
|
214
214
|
"manage._base_domain_": [
|
|
215
215
|
{
|
|
@@ -305,6 +305,25 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusMenuUrl(opts) {
|
|
|
305
305
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
306
306
|
}
|
|
307
307
|
var PACKAGE_NAME = "@wix/auto_sdk_restaurants_menus";
|
|
308
|
+
function duplicateMenu(payload) {
|
|
309
|
+
function __duplicateMenu({ host }) {
|
|
310
|
+
const metadata = {
|
|
311
|
+
entityFqdn: "wix.restaurants.menus.v1.menu",
|
|
312
|
+
method: "POST",
|
|
313
|
+
methodFqn: "com.wixpress.restaurants.menus_menu.v1.restaurants_duplicate_menu.RestaurantsDuplicateMenu.DuplicateMenu",
|
|
314
|
+
packageName: PACKAGE_NAME,
|
|
315
|
+
migrationOptions: {
|
|
316
|
+
optInTransformResponse: true
|
|
317
|
+
},
|
|
318
|
+
url: resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(
|
|
319
|
+
{ protoPath: "/v1/menus/{id}/duplicate", data: payload, host }
|
|
320
|
+
),
|
|
321
|
+
data: payload
|
|
322
|
+
};
|
|
323
|
+
return metadata;
|
|
324
|
+
}
|
|
325
|
+
return __duplicateMenu;
|
|
326
|
+
}
|
|
308
327
|
function createMenu(payload) {
|
|
309
328
|
function __createMenu({ host }) {
|
|
310
329
|
const serializedData = transformPaths(payload, [
|
|
@@ -612,25 +631,6 @@ function deleteMenu(payload) {
|
|
|
612
631
|
}
|
|
613
632
|
return __deleteMenu;
|
|
614
633
|
}
|
|
615
|
-
function duplicateMenu(payload) {
|
|
616
|
-
function __duplicateMenu({ host }) {
|
|
617
|
-
const metadata = {
|
|
618
|
-
entityFqdn: "wix.restaurants.menus.v1.menu",
|
|
619
|
-
method: "POST",
|
|
620
|
-
methodFqn: "com.wixpress.restaurants.menus_menu.v1.restaurants_duplicate_menu.RestaurantsDuplicateMenu.DuplicateMenu",
|
|
621
|
-
packageName: PACKAGE_NAME,
|
|
622
|
-
migrationOptions: {
|
|
623
|
-
optInTransformResponse: true
|
|
624
|
-
},
|
|
625
|
-
url: resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(
|
|
626
|
-
{ protoPath: "/v1/menus/{id}/duplicate", data: payload, host }
|
|
627
|
-
),
|
|
628
|
-
data: payload
|
|
629
|
-
};
|
|
630
|
-
return metadata;
|
|
631
|
-
}
|
|
632
|
-
return __duplicateMenu;
|
|
633
|
-
}
|
|
634
634
|
function getMenuSiteUrl(payload) {
|
|
635
635
|
function __getMenuSiteUrl({ host }) {
|
|
636
636
|
const metadata = {
|
|
@@ -673,11 +673,6 @@ function queryMenusSiteUrl(payload) {
|
|
|
673
673
|
// src/restaurants-menus-v1-menu-menus.universal.ts
|
|
674
674
|
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
675
675
|
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
676
|
-
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
677
|
-
SortOrder2["ASC"] = "ASC";
|
|
678
|
-
SortOrder2["DESC"] = "DESC";
|
|
679
|
-
return SortOrder2;
|
|
680
|
-
})(SortOrder || {});
|
|
681
676
|
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
682
677
|
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
683
678
|
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
@@ -686,6 +681,44 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
686
681
|
WebhookIdentityType2["APP"] = "APP";
|
|
687
682
|
return WebhookIdentityType2;
|
|
688
683
|
})(WebhookIdentityType || {});
|
|
684
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
685
|
+
SortOrder2["ASC"] = "ASC";
|
|
686
|
+
SortOrder2["DESC"] = "DESC";
|
|
687
|
+
return SortOrder2;
|
|
688
|
+
})(SortOrder || {});
|
|
689
|
+
async function duplicateMenu2(_id, options) {
|
|
690
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
691
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
692
|
+
id: _id,
|
|
693
|
+
businessLocationIds: options?.businessLocationIds,
|
|
694
|
+
duplicateSubEntities: options?.duplicateSubEntities,
|
|
695
|
+
menuName: options?.menuName
|
|
696
|
+
});
|
|
697
|
+
const reqOpts = duplicateMenu(payload);
|
|
698
|
+
sideEffects?.onSiteCall?.();
|
|
699
|
+
try {
|
|
700
|
+
const result = await httpClient.request(reqOpts);
|
|
701
|
+
sideEffects?.onSuccess?.(result);
|
|
702
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
703
|
+
} catch (err) {
|
|
704
|
+
const transformedError = sdkTransformError(
|
|
705
|
+
err,
|
|
706
|
+
{
|
|
707
|
+
spreadPathsToArguments: {},
|
|
708
|
+
explicitPathsToArguments: {
|
|
709
|
+
id: "$[0]",
|
|
710
|
+
businessLocationIds: "$[1].businessLocationIds",
|
|
711
|
+
duplicateSubEntities: "$[1].duplicateSubEntities",
|
|
712
|
+
menuName: "$[1].menuName"
|
|
713
|
+
},
|
|
714
|
+
singleArgumentUnchanged: false
|
|
715
|
+
},
|
|
716
|
+
["_id", "options"]
|
|
717
|
+
);
|
|
718
|
+
sideEffects?.onError?.(err);
|
|
719
|
+
throw transformedError;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
689
722
|
async function createMenu2(menu) {
|
|
690
723
|
const { httpClient, sideEffects } = arguments[1];
|
|
691
724
|
const payload = renameKeysFromSDKRequestToRESTRequest({ menu });
|
|
@@ -970,39 +1003,6 @@ async function deleteMenu2(menuId) {
|
|
|
970
1003
|
throw transformedError;
|
|
971
1004
|
}
|
|
972
1005
|
}
|
|
973
|
-
async function duplicateMenu2(_id, options) {
|
|
974
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
975
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
976
|
-
id: _id,
|
|
977
|
-
businessLocationIds: options?.businessLocationIds,
|
|
978
|
-
duplicateSubEntities: options?.duplicateSubEntities,
|
|
979
|
-
menuName: options?.menuName
|
|
980
|
-
});
|
|
981
|
-
const reqOpts = duplicateMenu(payload);
|
|
982
|
-
sideEffects?.onSiteCall?.();
|
|
983
|
-
try {
|
|
984
|
-
const result = await httpClient.request(reqOpts);
|
|
985
|
-
sideEffects?.onSuccess?.(result);
|
|
986
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
987
|
-
} catch (err) {
|
|
988
|
-
const transformedError = sdkTransformError(
|
|
989
|
-
err,
|
|
990
|
-
{
|
|
991
|
-
spreadPathsToArguments: {},
|
|
992
|
-
explicitPathsToArguments: {
|
|
993
|
-
id: "$[0]",
|
|
994
|
-
businessLocationIds: "$[1].businessLocationIds",
|
|
995
|
-
duplicateSubEntities: "$[1].duplicateSubEntities",
|
|
996
|
-
menuName: "$[1].menuName"
|
|
997
|
-
},
|
|
998
|
-
singleArgumentUnchanged: false
|
|
999
|
-
},
|
|
1000
|
-
["_id", "options"]
|
|
1001
|
-
);
|
|
1002
|
-
sideEffects?.onError?.(err);
|
|
1003
|
-
throw transformedError;
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
1006
|
async function getMenuSiteUrl2(_id) {
|
|
1007
1007
|
const { httpClient, sideEffects } = arguments[1];
|
|
1008
1008
|
const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
|
|
@@ -1053,6 +1053,14 @@ async function queryMenusSiteUrl2(options) {
|
|
|
1053
1053
|
}
|
|
1054
1054
|
|
|
1055
1055
|
// src/restaurants-menus-v1-menu-menus.public.ts
|
|
1056
|
+
function duplicateMenu3(httpClient) {
|
|
1057
|
+
return (_id, options) => duplicateMenu2(
|
|
1058
|
+
_id,
|
|
1059
|
+
options,
|
|
1060
|
+
// @ts-ignore
|
|
1061
|
+
{ httpClient }
|
|
1062
|
+
);
|
|
1063
|
+
}
|
|
1056
1064
|
function createMenu3(httpClient) {
|
|
1057
1065
|
return (menu) => createMenu2(
|
|
1058
1066
|
menu,
|
|
@@ -1127,14 +1135,6 @@ function deleteMenu3(httpClient) {
|
|
|
1127
1135
|
{ httpClient }
|
|
1128
1136
|
);
|
|
1129
1137
|
}
|
|
1130
|
-
function duplicateMenu3(httpClient) {
|
|
1131
|
-
return (_id, options) => duplicateMenu2(
|
|
1132
|
-
_id,
|
|
1133
|
-
options,
|
|
1134
|
-
// @ts-ignore
|
|
1135
|
-
{ httpClient }
|
|
1136
|
-
);
|
|
1137
|
-
}
|
|
1138
1138
|
function getMenuSiteUrl3(httpClient) {
|
|
1139
1139
|
return (_id) => getMenuSiteUrl2(
|
|
1140
1140
|
_id,
|
|
@@ -1149,8 +1149,8 @@ function queryMenusSiteUrl3(httpClient) {
|
|
|
1149
1149
|
{ httpClient }
|
|
1150
1150
|
);
|
|
1151
1151
|
}
|
|
1152
|
-
var
|
|
1153
|
-
"wix.restaurants.menus.v1.
|
|
1152
|
+
var onMenuUpdated = EventDefinition(
|
|
1153
|
+
"wix.restaurants.menus.v1.menu_updated",
|
|
1154
1154
|
true,
|
|
1155
1155
|
(event) => renameKeysFromRESTResponseToSDKResponse2(
|
|
1156
1156
|
transformPaths3(event, [
|
|
@@ -1160,44 +1160,44 @@ var onMenuCreated = EventDefinition(
|
|
|
1160
1160
|
{ path: "entity.createdDate" },
|
|
1161
1161
|
{ path: "entity.updatedDate" },
|
|
1162
1162
|
{ path: "entity.externalReferenceInfo.lastSyncDate" },
|
|
1163
|
-
{ path: "metadata.eventTime" }
|
|
1163
|
+
{ path: "metadata.eventTime" },
|
|
1164
|
+
{ path: "modifiedFields.createdDate" },
|
|
1165
|
+
{ path: "modifiedFields.updatedDate" },
|
|
1166
|
+
{ path: "modifiedFields.externalReferenceInfo.lastSyncDate" }
|
|
1164
1167
|
]
|
|
1165
1168
|
}
|
|
1166
1169
|
])
|
|
1167
1170
|
)
|
|
1168
1171
|
)();
|
|
1169
|
-
var
|
|
1170
|
-
"wix.restaurants.menus.v1.
|
|
1172
|
+
var onMenuCreated = EventDefinition(
|
|
1173
|
+
"wix.restaurants.menus.v1.menu_created",
|
|
1171
1174
|
true,
|
|
1172
1175
|
(event) => renameKeysFromRESTResponseToSDKResponse2(
|
|
1173
1176
|
transformPaths3(event, [
|
|
1174
1177
|
{
|
|
1175
1178
|
transformFn: transformRESTTimestampToSDKTimestamp2,
|
|
1176
1179
|
paths: [
|
|
1177
|
-
{ path: "
|
|
1178
|
-
{ path: "
|
|
1179
|
-
{ path: "
|
|
1180
|
+
{ path: "entity.createdDate" },
|
|
1181
|
+
{ path: "entity.updatedDate" },
|
|
1182
|
+
{ path: "entity.externalReferenceInfo.lastSyncDate" },
|
|
1180
1183
|
{ path: "metadata.eventTime" }
|
|
1181
1184
|
]
|
|
1182
1185
|
}
|
|
1183
1186
|
])
|
|
1184
1187
|
)
|
|
1185
1188
|
)();
|
|
1186
|
-
var
|
|
1187
|
-
"wix.restaurants.menus.v1.
|
|
1189
|
+
var onMenuDeleted = EventDefinition(
|
|
1190
|
+
"wix.restaurants.menus.v1.menu_deleted",
|
|
1188
1191
|
true,
|
|
1189
1192
|
(event) => renameKeysFromRESTResponseToSDKResponse2(
|
|
1190
1193
|
transformPaths3(event, [
|
|
1191
1194
|
{
|
|
1192
1195
|
transformFn: transformRESTTimestampToSDKTimestamp2,
|
|
1193
1196
|
paths: [
|
|
1194
|
-
{ path: "
|
|
1195
|
-
{ path: "
|
|
1196
|
-
{ path: "
|
|
1197
|
-
{ path: "metadata.eventTime" }
|
|
1198
|
-
{ path: "modifiedFields.createdDate" },
|
|
1199
|
-
{ path: "modifiedFields.updatedDate" },
|
|
1200
|
-
{ path: "modifiedFields.externalReferenceInfo.lastSyncDate" }
|
|
1197
|
+
{ path: "undefined.createdDate" },
|
|
1198
|
+
{ path: "undefined.updatedDate" },
|
|
1199
|
+
{ path: "undefined.externalReferenceInfo.lastSyncDate" },
|
|
1200
|
+
{ path: "metadata.eventTime" }
|
|
1201
1201
|
]
|
|
1202
1202
|
}
|
|
1203
1203
|
])
|
|
@@ -1219,6 +1219,7 @@ function customQueryMenus(httpClient) {
|
|
|
1219
1219
|
}
|
|
1220
1220
|
return overloadedQuery;
|
|
1221
1221
|
}
|
|
1222
|
+
var duplicateMenu4 = /* @__PURE__ */ createRESTModule(duplicateMenu3);
|
|
1222
1223
|
var createMenu4 = /* @__PURE__ */ createRESTModule(createMenu3);
|
|
1223
1224
|
var bulkCreateMenus4 = /* @__PURE__ */ createRESTModule(bulkCreateMenus3);
|
|
1224
1225
|
var getMenu4 = /* @__PURE__ */ createRESTModule(getMenu3);
|
|
@@ -1227,13 +1228,12 @@ var updateMenu4 = /* @__PURE__ */ createRESTModule(updateMenu3);
|
|
|
1227
1228
|
var bulkUpdateMenu4 = /* @__PURE__ */ createRESTModule(bulkUpdateMenu3);
|
|
1228
1229
|
var updateExtendedFields4 = /* @__PURE__ */ createRESTModule(updateExtendedFields3);
|
|
1229
1230
|
var deleteMenu4 = /* @__PURE__ */ createRESTModule(deleteMenu3);
|
|
1230
|
-
var duplicateMenu4 = /* @__PURE__ */ createRESTModule(duplicateMenu3);
|
|
1231
1231
|
var getMenuSiteUrl4 = /* @__PURE__ */ createRESTModule(getMenuSiteUrl3);
|
|
1232
1232
|
var queryMenusSiteUrl4 = /* @__PURE__ */ createRESTModule(queryMenusSiteUrl3);
|
|
1233
1233
|
var queryMenus4 = /* @__PURE__ */ createRESTModule(customQueryMenus);
|
|
1234
|
+
var onMenuUpdated2 = createEventModule(onMenuUpdated);
|
|
1234
1235
|
var onMenuCreated2 = createEventModule(onMenuCreated);
|
|
1235
1236
|
var onMenuDeleted2 = createEventModule(onMenuDeleted);
|
|
1236
|
-
var onMenuUpdated2 = createEventModule(onMenuUpdated);
|
|
1237
1237
|
export {
|
|
1238
1238
|
SortOrder,
|
|
1239
1239
|
WebhookIdentityType,
|