@wix/auto_sdk_restaurants_menus 1.0.76 → 1.0.77
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 +11 -11
- package/build/cjs/index.js +113 -90
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +233 -223
- package/build/cjs/index.typings.js +86 -63
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +195 -184
- package/build/cjs/meta.js +71 -48
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +16 -12
- package/build/cjs/schemas.js +23 -17
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +11 -11
- package/build/es/index.mjs +113 -90
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +233 -223
- package/build/es/index.typings.mjs +86 -63
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +195 -184
- package/build/es/meta.mjs +71 -48
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +16 -12
- package/build/es/schemas.mjs +23 -17
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +11 -11
- package/build/internal/cjs/index.js +113 -90
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +233 -223
- package/build/internal/cjs/index.typings.js +86 -63
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +195 -184
- package/build/internal/cjs/meta.js +71 -48
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +16 -12
- package/build/internal/cjs/schemas.js +23 -17
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +11 -11
- package/build/internal/es/index.mjs +113 -90
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +233 -223
- package/build/internal/es/index.typings.mjs +86 -63
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +195 -184
- package/build/internal/es/meta.mjs +71 -48
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +16 -12
- package/build/internal/es/schemas.mjs +23 -17
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
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';
|
|
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.mjs';
|
|
3
|
+
export { AccountInfo, AccountInfoMetadata, ActionEvent, AddressLocation, 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
|
-
}
|
|
10
5
|
declare function createMenu$1(httpClient: HttpClient): CreateMenuSignature;
|
|
11
6
|
interface CreateMenuSignature {
|
|
12
7
|
/**
|
|
@@ -98,6 +93,11 @@ interface DeleteMenuSignature {
|
|
|
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 };
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
|
|
15
15
|
// src/restaurants-menus-v1-menu-menus.http.ts
|
|
16
16
|
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
17
|
+
import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
|
|
17
18
|
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
18
19
|
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
19
20
|
import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
|
|
@@ -114,7 +115,7 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusSiteUrlRestaura
|
|
|
114
115
|
};
|
|
115
116
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
116
117
|
}
|
|
117
|
-
function
|
|
118
|
+
function resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(opts) {
|
|
118
119
|
const domainToMappings = {
|
|
119
120
|
"manage._base_domain_": [
|
|
120
121
|
{
|
|
@@ -209,7 +210,7 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusMenuUrl(opts) {
|
|
|
209
210
|
};
|
|
210
211
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
211
212
|
}
|
|
212
|
-
function
|
|
213
|
+
function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusMenuUrl(opts) {
|
|
213
214
|
const domainToMappings = {
|
|
214
215
|
"manage._base_domain_": [
|
|
215
216
|
{
|
|
@@ -305,25 +306,6 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaur
|
|
|
305
306
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
306
307
|
}
|
|
307
308
|
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
|
-
}
|
|
327
309
|
function createMenu(payload) {
|
|
328
310
|
function __createMenu({ host }) {
|
|
329
311
|
const serializedData = transformPaths(payload, [
|
|
@@ -470,6 +452,15 @@ function listMenus(payload) {
|
|
|
470
452
|
}
|
|
471
453
|
function queryMenus(payload) {
|
|
472
454
|
function __queryMenus({ host }) {
|
|
455
|
+
const serializedData = transformPaths(payload, [
|
|
456
|
+
{
|
|
457
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
458
|
+
paths: [
|
|
459
|
+
{ path: "query.sort.origin.latitude" },
|
|
460
|
+
{ path: "query.sort.origin.longitude" }
|
|
461
|
+
]
|
|
462
|
+
}
|
|
463
|
+
]);
|
|
473
464
|
const metadata = {
|
|
474
465
|
entityFqdn: "wix.restaurants.menus.v1.menu",
|
|
475
466
|
method: "POST",
|
|
@@ -480,10 +471,10 @@ function queryMenus(payload) {
|
|
|
480
471
|
},
|
|
481
472
|
url: resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusMenuUrl({
|
|
482
473
|
protoPath: "/v1/menus/query",
|
|
483
|
-
data:
|
|
474
|
+
data: serializedData,
|
|
484
475
|
host
|
|
485
476
|
}),
|
|
486
|
-
data:
|
|
477
|
+
data: serializedData,
|
|
487
478
|
transformResponse: (payload2) => transformPaths(payload2, [
|
|
488
479
|
{
|
|
489
480
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
@@ -631,6 +622,25 @@ function deleteMenu(payload) {
|
|
|
631
622
|
}
|
|
632
623
|
return __deleteMenu;
|
|
633
624
|
}
|
|
625
|
+
function duplicateMenu(payload) {
|
|
626
|
+
function __duplicateMenu({ host }) {
|
|
627
|
+
const metadata = {
|
|
628
|
+
entityFqdn: "wix.restaurants.menus.v1.menu",
|
|
629
|
+
method: "POST",
|
|
630
|
+
methodFqn: "com.wixpress.restaurants.menus_menu.v1.restaurants_duplicate_menu.RestaurantsDuplicateMenu.DuplicateMenu",
|
|
631
|
+
packageName: PACKAGE_NAME,
|
|
632
|
+
migrationOptions: {
|
|
633
|
+
optInTransformResponse: true
|
|
634
|
+
},
|
|
635
|
+
url: resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(
|
|
636
|
+
{ protoPath: "/v1/menus/{id}/duplicate", data: payload, host }
|
|
637
|
+
),
|
|
638
|
+
data: payload
|
|
639
|
+
};
|
|
640
|
+
return metadata;
|
|
641
|
+
}
|
|
642
|
+
return __duplicateMenu;
|
|
643
|
+
}
|
|
634
644
|
function getMenuSiteUrl(payload) {
|
|
635
645
|
function __getMenuSiteUrl({ host }) {
|
|
636
646
|
const metadata = {
|
|
@@ -652,6 +662,15 @@ function getMenuSiteUrl(payload) {
|
|
|
652
662
|
}
|
|
653
663
|
function queryMenusSiteUrl(payload) {
|
|
654
664
|
function __queryMenusSiteUrl({ host }) {
|
|
665
|
+
const serializedData = transformPaths(payload, [
|
|
666
|
+
{
|
|
667
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
668
|
+
paths: [
|
|
669
|
+
{ path: "query.sort.origin.latitude" },
|
|
670
|
+
{ path: "query.sort.origin.longitude" }
|
|
671
|
+
]
|
|
672
|
+
}
|
|
673
|
+
]);
|
|
655
674
|
const metadata = {
|
|
656
675
|
entityFqdn: "wix.restaurants.menus.v1.menu",
|
|
657
676
|
method: "POST",
|
|
@@ -661,9 +680,13 @@ function queryMenusSiteUrl(payload) {
|
|
|
661
680
|
optInTransformResponse: true
|
|
662
681
|
},
|
|
663
682
|
url: resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusSiteUrlRestaurantsMenusSiteUrlUrl(
|
|
664
|
-
{
|
|
683
|
+
{
|
|
684
|
+
protoPath: "/v1/menus-site-url/menus/query",
|
|
685
|
+
data: serializedData,
|
|
686
|
+
host
|
|
687
|
+
}
|
|
665
688
|
),
|
|
666
|
-
data:
|
|
689
|
+
data: serializedData
|
|
667
690
|
};
|
|
668
691
|
return metadata;
|
|
669
692
|
}
|
|
@@ -673,6 +696,11 @@ function queryMenusSiteUrl(payload) {
|
|
|
673
696
|
// src/restaurants-menus-v1-menu-menus.universal.ts
|
|
674
697
|
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
675
698
|
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
699
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
700
|
+
SortOrder2["ASC"] = "ASC";
|
|
701
|
+
SortOrder2["DESC"] = "DESC";
|
|
702
|
+
return SortOrder2;
|
|
703
|
+
})(SortOrder || {});
|
|
676
704
|
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
677
705
|
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
678
706
|
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
@@ -681,44 +709,6 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
681
709
|
WebhookIdentityType2["APP"] = "APP";
|
|
682
710
|
return WebhookIdentityType2;
|
|
683
711
|
})(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
|
-
}
|
|
722
712
|
async function createMenu2(menu) {
|
|
723
713
|
const { httpClient, sideEffects } = arguments[1];
|
|
724
714
|
const payload = renameKeysFromSDKRequestToRESTRequest({ menu });
|
|
@@ -1003,6 +993,39 @@ async function deleteMenu2(menuId) {
|
|
|
1003
993
|
throw transformedError;
|
|
1004
994
|
}
|
|
1005
995
|
}
|
|
996
|
+
async function duplicateMenu2(_id, options) {
|
|
997
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
998
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
999
|
+
id: _id,
|
|
1000
|
+
businessLocationIds: options?.businessLocationIds,
|
|
1001
|
+
duplicateSubEntities: options?.duplicateSubEntities,
|
|
1002
|
+
menuName: options?.menuName
|
|
1003
|
+
});
|
|
1004
|
+
const reqOpts = duplicateMenu(payload);
|
|
1005
|
+
sideEffects?.onSiteCall?.();
|
|
1006
|
+
try {
|
|
1007
|
+
const result = await httpClient.request(reqOpts);
|
|
1008
|
+
sideEffects?.onSuccess?.(result);
|
|
1009
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1010
|
+
} catch (err) {
|
|
1011
|
+
const transformedError = sdkTransformError(
|
|
1012
|
+
err,
|
|
1013
|
+
{
|
|
1014
|
+
spreadPathsToArguments: {},
|
|
1015
|
+
explicitPathsToArguments: {
|
|
1016
|
+
id: "$[0]",
|
|
1017
|
+
businessLocationIds: "$[1].businessLocationIds",
|
|
1018
|
+
duplicateSubEntities: "$[1].duplicateSubEntities",
|
|
1019
|
+
menuName: "$[1].menuName"
|
|
1020
|
+
},
|
|
1021
|
+
singleArgumentUnchanged: false
|
|
1022
|
+
},
|
|
1023
|
+
["_id", "options"]
|
|
1024
|
+
);
|
|
1025
|
+
sideEffects?.onError?.(err);
|
|
1026
|
+
throw transformedError;
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1006
1029
|
async function getMenuSiteUrl2(_id) {
|
|
1007
1030
|
const { httpClient, sideEffects } = arguments[1];
|
|
1008
1031
|
const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
|
|
@@ -1053,14 +1076,6 @@ async function queryMenusSiteUrl2(options) {
|
|
|
1053
1076
|
}
|
|
1054
1077
|
|
|
1055
1078
|
// 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
|
-
}
|
|
1064
1079
|
function createMenu3(httpClient) {
|
|
1065
1080
|
return (menu) => createMenu2(
|
|
1066
1081
|
menu,
|
|
@@ -1135,6 +1150,14 @@ function deleteMenu3(httpClient) {
|
|
|
1135
1150
|
{ httpClient }
|
|
1136
1151
|
);
|
|
1137
1152
|
}
|
|
1153
|
+
function duplicateMenu3(httpClient) {
|
|
1154
|
+
return (_id, options) => duplicateMenu2(
|
|
1155
|
+
_id,
|
|
1156
|
+
options,
|
|
1157
|
+
// @ts-ignore
|
|
1158
|
+
{ httpClient }
|
|
1159
|
+
);
|
|
1160
|
+
}
|
|
1138
1161
|
function getMenuSiteUrl3(httpClient) {
|
|
1139
1162
|
return (_id) => getMenuSiteUrl2(
|
|
1140
1163
|
_id,
|
|
@@ -1149,8 +1172,8 @@ function queryMenusSiteUrl3(httpClient) {
|
|
|
1149
1172
|
{ httpClient }
|
|
1150
1173
|
);
|
|
1151
1174
|
}
|
|
1152
|
-
var
|
|
1153
|
-
"wix.restaurants.menus.v1.
|
|
1175
|
+
var onMenuCreated = EventDefinition(
|
|
1176
|
+
"wix.restaurants.menus.v1.menu_created",
|
|
1154
1177
|
true,
|
|
1155
1178
|
(event) => renameKeysFromRESTResponseToSDKResponse2(
|
|
1156
1179
|
transformPaths3(event, [
|
|
@@ -1160,44 +1183,44 @@ var onMenuUpdated = EventDefinition(
|
|
|
1160
1183
|
{ path: "entity.createdDate" },
|
|
1161
1184
|
{ path: "entity.updatedDate" },
|
|
1162
1185
|
{ path: "entity.externalReferenceInfo.lastSyncDate" },
|
|
1163
|
-
{ path: "metadata.eventTime" }
|
|
1164
|
-
{ path: "modifiedFields.createdDate" },
|
|
1165
|
-
{ path: "modifiedFields.updatedDate" },
|
|
1166
|
-
{ path: "modifiedFields.externalReferenceInfo.lastSyncDate" }
|
|
1186
|
+
{ path: "metadata.eventTime" }
|
|
1167
1187
|
]
|
|
1168
1188
|
}
|
|
1169
1189
|
])
|
|
1170
1190
|
)
|
|
1171
1191
|
)();
|
|
1172
|
-
var
|
|
1173
|
-
"wix.restaurants.menus.v1.
|
|
1192
|
+
var onMenuDeleted = EventDefinition(
|
|
1193
|
+
"wix.restaurants.menus.v1.menu_deleted",
|
|
1174
1194
|
true,
|
|
1175
1195
|
(event) => renameKeysFromRESTResponseToSDKResponse2(
|
|
1176
1196
|
transformPaths3(event, [
|
|
1177
1197
|
{
|
|
1178
1198
|
transformFn: transformRESTTimestampToSDKTimestamp2,
|
|
1179
1199
|
paths: [
|
|
1180
|
-
{ path: "
|
|
1181
|
-
{ path: "
|
|
1182
|
-
{ path: "
|
|
1200
|
+
{ path: "undefined.createdDate" },
|
|
1201
|
+
{ path: "undefined.updatedDate" },
|
|
1202
|
+
{ path: "undefined.externalReferenceInfo.lastSyncDate" },
|
|
1183
1203
|
{ path: "metadata.eventTime" }
|
|
1184
1204
|
]
|
|
1185
1205
|
}
|
|
1186
1206
|
])
|
|
1187
1207
|
)
|
|
1188
1208
|
)();
|
|
1189
|
-
var
|
|
1190
|
-
"wix.restaurants.menus.v1.
|
|
1209
|
+
var onMenuUpdated = EventDefinition(
|
|
1210
|
+
"wix.restaurants.menus.v1.menu_updated",
|
|
1191
1211
|
true,
|
|
1192
1212
|
(event) => renameKeysFromRESTResponseToSDKResponse2(
|
|
1193
1213
|
transformPaths3(event, [
|
|
1194
1214
|
{
|
|
1195
1215
|
transformFn: transformRESTTimestampToSDKTimestamp2,
|
|
1196
1216
|
paths: [
|
|
1197
|
-
{ path: "
|
|
1198
|
-
{ path: "
|
|
1199
|
-
{ path: "
|
|
1200
|
-
{ path: "metadata.eventTime" }
|
|
1217
|
+
{ path: "entity.createdDate" },
|
|
1218
|
+
{ path: "entity.updatedDate" },
|
|
1219
|
+
{ path: "entity.externalReferenceInfo.lastSyncDate" },
|
|
1220
|
+
{ path: "metadata.eventTime" },
|
|
1221
|
+
{ path: "modifiedFields.createdDate" },
|
|
1222
|
+
{ path: "modifiedFields.updatedDate" },
|
|
1223
|
+
{ path: "modifiedFields.externalReferenceInfo.lastSyncDate" }
|
|
1201
1224
|
]
|
|
1202
1225
|
}
|
|
1203
1226
|
])
|
|
@@ -1219,7 +1242,6 @@ function customQueryMenus(httpClient) {
|
|
|
1219
1242
|
}
|
|
1220
1243
|
return overloadedQuery;
|
|
1221
1244
|
}
|
|
1222
|
-
var duplicateMenu4 = /* @__PURE__ */ createRESTModule(duplicateMenu3);
|
|
1223
1245
|
var createMenu4 = /* @__PURE__ */ createRESTModule(createMenu3);
|
|
1224
1246
|
var bulkCreateMenus4 = /* @__PURE__ */ createRESTModule(bulkCreateMenus3);
|
|
1225
1247
|
var getMenu4 = /* @__PURE__ */ createRESTModule(getMenu3);
|
|
@@ -1228,12 +1250,13 @@ var updateMenu4 = /* @__PURE__ */ createRESTModule(updateMenu3);
|
|
|
1228
1250
|
var bulkUpdateMenu4 = /* @__PURE__ */ createRESTModule(bulkUpdateMenu3);
|
|
1229
1251
|
var updateExtendedFields4 = /* @__PURE__ */ createRESTModule(updateExtendedFields3);
|
|
1230
1252
|
var deleteMenu4 = /* @__PURE__ */ createRESTModule(deleteMenu3);
|
|
1253
|
+
var duplicateMenu4 = /* @__PURE__ */ createRESTModule(duplicateMenu3);
|
|
1231
1254
|
var getMenuSiteUrl4 = /* @__PURE__ */ createRESTModule(getMenuSiteUrl3);
|
|
1232
1255
|
var queryMenusSiteUrl4 = /* @__PURE__ */ createRESTModule(queryMenusSiteUrl3);
|
|
1233
1256
|
var queryMenus4 = /* @__PURE__ */ createRESTModule(customQueryMenus);
|
|
1234
|
-
var onMenuUpdated2 = createEventModule(onMenuUpdated);
|
|
1235
1257
|
var onMenuCreated2 = createEventModule(onMenuCreated);
|
|
1236
1258
|
var onMenuDeleted2 = createEventModule(onMenuDeleted);
|
|
1259
|
+
var onMenuUpdated2 = createEventModule(onMenuUpdated);
|
|
1237
1260
|
export {
|
|
1238
1261
|
SortOrder,
|
|
1239
1262
|
WebhookIdentityType,
|