@wix/auto_sdk_restaurants_menus 1.0.96 → 1.0.98
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 +25 -25
- package/build/cjs/index.js +198 -198
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +283 -177
- package/build/cjs/index.typings.js +173 -173
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +243 -137
- package/build/cjs/meta.js +146 -146
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +25 -25
- package/build/es/index.mjs +198 -198
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +283 -177
- package/build/es/index.typings.mjs +173 -173
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +243 -137
- package/build/es/meta.mjs +146 -146
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +25 -25
- package/build/internal/cjs/index.typings.d.ts +297 -191
- package/build/internal/cjs/meta.d.ts +257 -151
- package/build/internal/es/index.d.mts +25 -25
- package/build/internal/es/index.typings.d.mts +297 -191
- package/build/internal/es/meta.d.mts +257 -151
- package/package.json +3 -3
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,27 +1,7 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
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.js';
|
|
2
|
+
import { Menu, BulkCreateMenusOptions, BulkCreateMenusResponse, ListMenusOptions, ListMenusResponse, UpdateMenu, MaskedMenu, BulkUpdateMenuOptions, BulkUpdateMenuResponse, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, DuplicateMenuOptions, DuplicateMenuResponse, GetMenuSiteUrlResponse, QueryMenusSiteUrlOptions, QueryMenusSiteUrlResponse, MenuUpdatedEnvelope, MenuCreatedEnvelope, MenuDeletedEnvelope, MenusQueryBuilder, MenuQuery, typedQueryMenus } from './index.typings.js';
|
|
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, MenuExportRow, MenuQuerySpec, MenuSiteUrl, MenusDataCloningCompleted, MenusQueryResult, MessageEnvelope, Page, Pages, QueryMenuExportRowsRequest, QueryMenuExportRowsResponse, 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`, 0>>;
|
|
9
|
-
}
|
|
10
|
-
declare function getMenuSiteUrl$1(httpClient: HttpClient): GetMenuSiteUrlSignature;
|
|
11
|
-
interface GetMenuSiteUrlSignature {
|
|
12
|
-
/**
|
|
13
|
-
* Get menu details and path URL by menu ID.
|
|
14
|
-
* @param - Menu ID.
|
|
15
|
-
*/
|
|
16
|
-
(_id: string): Promise<NonNullablePaths<GetMenuSiteUrlResponse, `menuSiteUrl.path`, 1>>;
|
|
17
|
-
}
|
|
18
|
-
declare function queryMenusSiteUrl$1(httpClient: HttpClient): QueryMenusSiteUrlSignature;
|
|
19
|
-
interface QueryMenusSiteUrlSignature {
|
|
20
|
-
/**
|
|
21
|
-
* Query menu details and path URL
|
|
22
|
-
*/
|
|
23
|
-
(options?: QueryMenusSiteUrlOptions): Promise<NonNullablePaths<QueryMenusSiteUrlResponse, `menuSiteUrls` | `menuSiteUrls.${number}.path`, 2>>;
|
|
24
|
-
}
|
|
25
5
|
declare function createMenu$1(httpClient: HttpClient): CreateMenuSignature;
|
|
26
6
|
interface CreateMenuSignature {
|
|
27
7
|
/**
|
|
@@ -113,6 +93,26 @@ interface DeleteMenuSignature {
|
|
|
113
93
|
*/
|
|
114
94
|
(menuId: string): Promise<void>;
|
|
115
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`, 0>>;
|
|
100
|
+
}
|
|
101
|
+
declare function getMenuSiteUrl$1(httpClient: HttpClient): GetMenuSiteUrlSignature;
|
|
102
|
+
interface GetMenuSiteUrlSignature {
|
|
103
|
+
/**
|
|
104
|
+
* Get menu details and path URL by menu ID.
|
|
105
|
+
* @param - Menu ID.
|
|
106
|
+
*/
|
|
107
|
+
(_id: string): Promise<NonNullablePaths<GetMenuSiteUrlResponse, `menuSiteUrl.path`, 1>>;
|
|
108
|
+
}
|
|
109
|
+
declare function queryMenusSiteUrl$1(httpClient: HttpClient): QueryMenusSiteUrlSignature;
|
|
110
|
+
interface QueryMenusSiteUrlSignature {
|
|
111
|
+
/**
|
|
112
|
+
* Query menu details and path URL
|
|
113
|
+
*/
|
|
114
|
+
(options?: QueryMenusSiteUrlOptions): Promise<NonNullablePaths<QueryMenusSiteUrlResponse, `menuSiteUrls` | `menuSiteUrls.${number}.path`, 2>>;
|
|
115
|
+
}
|
|
116
116
|
declare const onMenuUpdated$1: EventDefinition<MenuUpdatedEnvelope, "wix.restaurants.menus.v1.menu_updated">;
|
|
117
117
|
declare const onMenuCreated$1: EventDefinition<MenuCreatedEnvelope, "wix.restaurants.menus.v1.menu_created">;
|
|
118
118
|
declare const onMenuDeleted$1: EventDefinition<MenuDeletedEnvelope, "wix.restaurants.menus.v1.menu_deleted">;
|
|
@@ -121,9 +121,6 @@ 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
|
-
declare const getMenuSiteUrl: MaybeContext<BuildRESTFunction<typeof getMenuSiteUrl$1> & typeof getMenuSiteUrl$1>;
|
|
126
|
-
declare const queryMenusSiteUrl: MaybeContext<BuildRESTFunction<typeof queryMenusSiteUrl$1> & typeof queryMenusSiteUrl$1>;
|
|
127
124
|
declare const createMenu: MaybeContext<BuildRESTFunction<typeof createMenu$1> & typeof createMenu$1>;
|
|
128
125
|
declare const bulkCreateMenus: MaybeContext<BuildRESTFunction<typeof bulkCreateMenus$1> & typeof bulkCreateMenus$1>;
|
|
129
126
|
declare const getMenu: MaybeContext<BuildRESTFunction<typeof getMenu$1> & typeof getMenu$1>;
|
|
@@ -132,6 +129,9 @@ declare const updateMenu: MaybeContext<BuildRESTFunction<typeof updateMenu$1> &
|
|
|
132
129
|
declare const bulkUpdateMenu: MaybeContext<BuildRESTFunction<typeof bulkUpdateMenu$1> & typeof bulkUpdateMenu$1>;
|
|
133
130
|
declare const updateExtendedFields: MaybeContext<BuildRESTFunction<typeof updateExtendedFields$1> & typeof updateExtendedFields$1>;
|
|
134
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
|
+
declare const getMenuSiteUrl: MaybeContext<BuildRESTFunction<typeof getMenuSiteUrl$1> & typeof getMenuSiteUrl$1>;
|
|
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
137
|
declare const onMenuUpdated: BuildEventDefinition<typeof onMenuUpdated$1> & typeof onMenuUpdated$1;
|
package/build/cjs/index.js
CHANGED
|
@@ -61,24 +61,24 @@ var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
|
61
61
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
62
62
|
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
63
63
|
var TRANSFORM_PATHS_0 = [
|
|
64
|
-
{ path: "query.sort.origin.latitude" },
|
|
65
|
-
{ path: "query.sort.origin.longitude" }
|
|
66
|
-
];
|
|
67
|
-
var TRANSFORM_PATHS_1 = [
|
|
68
64
|
{ path: "menu.createdDate" },
|
|
69
65
|
{ path: "menu.updatedDate" },
|
|
70
66
|
{ path: "menu.externalReferenceInfo.lastSyncDate" }
|
|
71
67
|
];
|
|
72
|
-
var
|
|
68
|
+
var TRANSFORM_PATHS_1 = [
|
|
73
69
|
{ path: "menus.createdDate" },
|
|
74
70
|
{ path: "menus.updatedDate" },
|
|
75
71
|
{ path: "menus.externalReferenceInfo.lastSyncDate" }
|
|
76
72
|
];
|
|
77
|
-
var
|
|
73
|
+
var TRANSFORM_PATHS_2 = [
|
|
78
74
|
{ path: "results.menu.createdDate" },
|
|
79
75
|
{ path: "results.menu.updatedDate" },
|
|
80
76
|
{ path: "results.menu.externalReferenceInfo.lastSyncDate" }
|
|
81
77
|
];
|
|
78
|
+
var TRANSFORM_PATHS_3 = [
|
|
79
|
+
{ path: "query.sort.origin.latitude" },
|
|
80
|
+
{ path: "query.sort.origin.longitude" }
|
|
81
|
+
];
|
|
82
82
|
var TRANSFORM_PATHS_4 = [{ path: "mask" }];
|
|
83
83
|
var TRANSFORM_PATHS_5 = [{ path: "menus.mask" }];
|
|
84
84
|
var TRANSFORM_PATHS_6 = [
|
|
@@ -86,7 +86,7 @@ var TRANSFORM_PATHS_6 = [
|
|
|
86
86
|
{ path: "menus.menu.updatedDate" },
|
|
87
87
|
{ path: "menus.menu.externalReferenceInfo.lastSyncDate" }
|
|
88
88
|
];
|
|
89
|
-
function
|
|
89
|
+
function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusSiteUrlRestaurantsMenusSiteUrlUrl(opts) {
|
|
90
90
|
const domainToMappings = {
|
|
91
91
|
"manage._base_domain_": [
|
|
92
92
|
{
|
|
@@ -181,7 +181,7 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusMenuUrl(opts) {
|
|
|
181
181
|
};
|
|
182
182
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(opts) {
|
|
185
185
|
const domainToMappings = {
|
|
186
186
|
"manage._base_domain_": [
|
|
187
187
|
{
|
|
@@ -276,7 +276,7 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusSiteUrlRestaura
|
|
|
276
276
|
};
|
|
277
277
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusMenuUrl(opts) {
|
|
280
280
|
const domainToMappings = {
|
|
281
281
|
"manage._base_domain_": [
|
|
282
282
|
{
|
|
@@ -372,79 +372,12 @@ function resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaur
|
|
|
372
372
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
373
373
|
}
|
|
374
374
|
var PACKAGE_NAME = "@wix/auto_sdk_restaurants_menus";
|
|
375
|
-
function duplicateMenu(payload) {
|
|
376
|
-
function __duplicateMenu({ host }) {
|
|
377
|
-
const metadata = {
|
|
378
|
-
entityFqdn: "wix.restaurants.menus.v1.menu",
|
|
379
|
-
method: "POST",
|
|
380
|
-
methodFqn: "com.wixpress.restaurants.menus_menu.v1.restaurants_duplicate_menu.RestaurantsDuplicateMenu.DuplicateMenu",
|
|
381
|
-
packageName: PACKAGE_NAME,
|
|
382
|
-
migrationOptions: {
|
|
383
|
-
optInTransformResponse: true
|
|
384
|
-
},
|
|
385
|
-
url: resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(
|
|
386
|
-
{ protoPath: "/v1/menus/{id}/duplicate", data: payload, host }
|
|
387
|
-
),
|
|
388
|
-
data: payload
|
|
389
|
-
};
|
|
390
|
-
return metadata;
|
|
391
|
-
}
|
|
392
|
-
return __duplicateMenu;
|
|
393
|
-
}
|
|
394
|
-
function getMenuSiteUrl(payload) {
|
|
395
|
-
function __getMenuSiteUrl({ host }) {
|
|
396
|
-
const metadata = {
|
|
397
|
-
entityFqdn: "wix.restaurants.menus.v1.menu",
|
|
398
|
-
method: "GET",
|
|
399
|
-
methodFqn: "com.wixpress.restaurants.menus_menu.v1.restaurants_menus_site_url.RestaurantsMenusSiteUrl.GetMenuSiteUrl",
|
|
400
|
-
packageName: PACKAGE_NAME,
|
|
401
|
-
migrationOptions: {
|
|
402
|
-
optInTransformResponse: true
|
|
403
|
-
},
|
|
404
|
-
url: resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusSiteUrlRestaurantsMenusSiteUrlUrl(
|
|
405
|
-
{ protoPath: "/v1/menus-site-url/menus/{id}", data: payload, host }
|
|
406
|
-
),
|
|
407
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
408
|
-
};
|
|
409
|
-
return metadata;
|
|
410
|
-
}
|
|
411
|
-
return __getMenuSiteUrl;
|
|
412
|
-
}
|
|
413
|
-
function queryMenusSiteUrl(payload) {
|
|
414
|
-
function __queryMenusSiteUrl({ host }) {
|
|
415
|
-
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
416
|
-
{
|
|
417
|
-
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
418
|
-
paths: TRANSFORM_PATHS_0
|
|
419
|
-
}
|
|
420
|
-
]);
|
|
421
|
-
const metadata = {
|
|
422
|
-
entityFqdn: "wix.restaurants.menus.v1.menu",
|
|
423
|
-
method: "POST",
|
|
424
|
-
methodFqn: "com.wixpress.restaurants.menus_menu.v1.restaurants_menus_site_url.RestaurantsMenusSiteUrl.QueryMenusSiteUrl",
|
|
425
|
-
packageName: PACKAGE_NAME,
|
|
426
|
-
migrationOptions: {
|
|
427
|
-
optInTransformResponse: true
|
|
428
|
-
},
|
|
429
|
-
url: resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusSiteUrlRestaurantsMenusSiteUrlUrl(
|
|
430
|
-
{
|
|
431
|
-
protoPath: "/v1/menus-site-url/menus/query",
|
|
432
|
-
data: serializedData,
|
|
433
|
-
host
|
|
434
|
-
}
|
|
435
|
-
),
|
|
436
|
-
data: serializedData
|
|
437
|
-
};
|
|
438
|
-
return metadata;
|
|
439
|
-
}
|
|
440
|
-
return __queryMenusSiteUrl;
|
|
441
|
-
}
|
|
442
375
|
function createMenu(payload) {
|
|
443
376
|
function __createMenu({ host }) {
|
|
444
377
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
445
378
|
{
|
|
446
379
|
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
447
|
-
paths:
|
|
380
|
+
paths: TRANSFORM_PATHS_0
|
|
448
381
|
}
|
|
449
382
|
]);
|
|
450
383
|
const metadata = {
|
|
@@ -464,7 +397,7 @@ function createMenu(payload) {
|
|
|
464
397
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
465
398
|
{
|
|
466
399
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
467
|
-
paths:
|
|
400
|
+
paths: TRANSFORM_PATHS_0
|
|
468
401
|
}
|
|
469
402
|
])
|
|
470
403
|
};
|
|
@@ -477,7 +410,7 @@ function bulkCreateMenus(payload) {
|
|
|
477
410
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
478
411
|
{
|
|
479
412
|
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
480
|
-
paths:
|
|
413
|
+
paths: TRANSFORM_PATHS_1
|
|
481
414
|
}
|
|
482
415
|
]);
|
|
483
416
|
const metadata = {
|
|
@@ -497,7 +430,7 @@ function bulkCreateMenus(payload) {
|
|
|
497
430
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
498
431
|
{
|
|
499
432
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
500
|
-
paths:
|
|
433
|
+
paths: TRANSFORM_PATHS_2
|
|
501
434
|
}
|
|
502
435
|
])
|
|
503
436
|
};
|
|
@@ -524,7 +457,7 @@ function getMenu(payload) {
|
|
|
524
457
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
525
458
|
{
|
|
526
459
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
527
|
-
paths:
|
|
460
|
+
paths: TRANSFORM_PATHS_0
|
|
528
461
|
}
|
|
529
462
|
])
|
|
530
463
|
};
|
|
@@ -551,7 +484,7 @@ function listMenus(payload) {
|
|
|
551
484
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
552
485
|
{
|
|
553
486
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
554
|
-
paths:
|
|
487
|
+
paths: TRANSFORM_PATHS_1
|
|
555
488
|
}
|
|
556
489
|
])
|
|
557
490
|
};
|
|
@@ -564,7 +497,7 @@ function queryMenus(payload) {
|
|
|
564
497
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
565
498
|
{
|
|
566
499
|
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
567
|
-
paths:
|
|
500
|
+
paths: TRANSFORM_PATHS_3
|
|
568
501
|
}
|
|
569
502
|
]);
|
|
570
503
|
const metadata = {
|
|
@@ -584,7 +517,7 @@ function queryMenus(payload) {
|
|
|
584
517
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
585
518
|
{
|
|
586
519
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
587
|
-
paths:
|
|
520
|
+
paths: TRANSFORM_PATHS_1
|
|
588
521
|
}
|
|
589
522
|
])
|
|
590
523
|
};
|
|
@@ -601,7 +534,7 @@ function updateMenu(payload) {
|
|
|
601
534
|
},
|
|
602
535
|
{
|
|
603
536
|
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
604
|
-
paths:
|
|
537
|
+
paths: TRANSFORM_PATHS_0
|
|
605
538
|
}
|
|
606
539
|
]);
|
|
607
540
|
const metadata = {
|
|
@@ -621,7 +554,7 @@ function updateMenu(payload) {
|
|
|
621
554
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
622
555
|
{
|
|
623
556
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
624
|
-
paths:
|
|
557
|
+
paths: TRANSFORM_PATHS_0
|
|
625
558
|
}
|
|
626
559
|
])
|
|
627
560
|
};
|
|
@@ -658,7 +591,7 @@ function bulkUpdateMenu(payload) {
|
|
|
658
591
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
659
592
|
{
|
|
660
593
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
661
|
-
paths:
|
|
594
|
+
paths: TRANSFORM_PATHS_2
|
|
662
595
|
}
|
|
663
596
|
])
|
|
664
597
|
};
|
|
@@ -708,10 +641,82 @@ function deleteMenu(payload) {
|
|
|
708
641
|
}
|
|
709
642
|
return __deleteMenu;
|
|
710
643
|
}
|
|
644
|
+
function duplicateMenu(payload) {
|
|
645
|
+
function __duplicateMenu({ host }) {
|
|
646
|
+
const metadata = {
|
|
647
|
+
entityFqdn: "wix.restaurants.menus.v1.menu",
|
|
648
|
+
method: "POST",
|
|
649
|
+
methodFqn: "com.wixpress.restaurants.menus_menu.v1.restaurants_duplicate_menu.RestaurantsDuplicateMenu.DuplicateMenu",
|
|
650
|
+
packageName: PACKAGE_NAME,
|
|
651
|
+
migrationOptions: {
|
|
652
|
+
optInTransformResponse: true
|
|
653
|
+
},
|
|
654
|
+
url: resolveComWixpressRestaurantsMenusMenuV1RestaurantsDuplicateMenuRestaurantsDuplicateMenuUrl(
|
|
655
|
+
{ protoPath: "/v1/menus/{id}/duplicate", data: payload, host }
|
|
656
|
+
),
|
|
657
|
+
data: payload
|
|
658
|
+
};
|
|
659
|
+
return metadata;
|
|
660
|
+
}
|
|
661
|
+
return __duplicateMenu;
|
|
662
|
+
}
|
|
663
|
+
function getMenuSiteUrl(payload) {
|
|
664
|
+
function __getMenuSiteUrl({ host }) {
|
|
665
|
+
const metadata = {
|
|
666
|
+
entityFqdn: "wix.restaurants.menus.v1.menu",
|
|
667
|
+
method: "GET",
|
|
668
|
+
methodFqn: "com.wixpress.restaurants.menus_menu.v1.restaurants_menus_site_url.RestaurantsMenusSiteUrl.GetMenuSiteUrl",
|
|
669
|
+
packageName: PACKAGE_NAME,
|
|
670
|
+
migrationOptions: {
|
|
671
|
+
optInTransformResponse: true
|
|
672
|
+
},
|
|
673
|
+
url: resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusSiteUrlRestaurantsMenusSiteUrlUrl(
|
|
674
|
+
{ protoPath: "/v1/menus-site-url/menus/{id}", data: payload, host }
|
|
675
|
+
),
|
|
676
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
677
|
+
};
|
|
678
|
+
return metadata;
|
|
679
|
+
}
|
|
680
|
+
return __getMenuSiteUrl;
|
|
681
|
+
}
|
|
682
|
+
function queryMenusSiteUrl(payload) {
|
|
683
|
+
function __queryMenusSiteUrl({ host }) {
|
|
684
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
685
|
+
{
|
|
686
|
+
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
687
|
+
paths: TRANSFORM_PATHS_3
|
|
688
|
+
}
|
|
689
|
+
]);
|
|
690
|
+
const metadata = {
|
|
691
|
+
entityFqdn: "wix.restaurants.menus.v1.menu",
|
|
692
|
+
method: "POST",
|
|
693
|
+
methodFqn: "com.wixpress.restaurants.menus_menu.v1.restaurants_menus_site_url.RestaurantsMenusSiteUrl.QueryMenusSiteUrl",
|
|
694
|
+
packageName: PACKAGE_NAME,
|
|
695
|
+
migrationOptions: {
|
|
696
|
+
optInTransformResponse: true
|
|
697
|
+
},
|
|
698
|
+
url: resolveComWixpressRestaurantsMenusMenuV1RestaurantsMenusSiteUrlRestaurantsMenusSiteUrlUrl(
|
|
699
|
+
{
|
|
700
|
+
protoPath: "/v1/menus-site-url/menus/query",
|
|
701
|
+
data: serializedData,
|
|
702
|
+
host
|
|
703
|
+
}
|
|
704
|
+
),
|
|
705
|
+
data: serializedData
|
|
706
|
+
};
|
|
707
|
+
return metadata;
|
|
708
|
+
}
|
|
709
|
+
return __queryMenusSiteUrl;
|
|
710
|
+
}
|
|
711
711
|
|
|
712
712
|
// src/restaurants-menus-v1-menu-menus.universal.ts
|
|
713
713
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
714
714
|
var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
|
|
715
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
716
|
+
SortOrder2["ASC"] = "ASC";
|
|
717
|
+
SortOrder2["DESC"] = "DESC";
|
|
718
|
+
return SortOrder2;
|
|
719
|
+
})(SortOrder || {});
|
|
715
720
|
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
716
721
|
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
717
722
|
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
@@ -720,92 +725,6 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
720
725
|
WebhookIdentityType2["APP"] = "APP";
|
|
721
726
|
return WebhookIdentityType2;
|
|
722
727
|
})(WebhookIdentityType || {});
|
|
723
|
-
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
724
|
-
SortOrder2["ASC"] = "ASC";
|
|
725
|
-
SortOrder2["DESC"] = "DESC";
|
|
726
|
-
return SortOrder2;
|
|
727
|
-
})(SortOrder || {});
|
|
728
|
-
async function duplicateMenu2(_id, options) {
|
|
729
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
730
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
731
|
-
id: _id,
|
|
732
|
-
businessLocationIds: options?.businessLocationIds,
|
|
733
|
-
duplicateSubEntities: options?.duplicateSubEntities,
|
|
734
|
-
menuName: options?.menuName
|
|
735
|
-
});
|
|
736
|
-
const reqOpts = duplicateMenu(payload);
|
|
737
|
-
sideEffects?.onSiteCall?.();
|
|
738
|
-
try {
|
|
739
|
-
const result = await httpClient.request(reqOpts);
|
|
740
|
-
sideEffects?.onSuccess?.(result);
|
|
741
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
742
|
-
} catch (err) {
|
|
743
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
744
|
-
err,
|
|
745
|
-
{
|
|
746
|
-
spreadPathsToArguments: {},
|
|
747
|
-
explicitPathsToArguments: {
|
|
748
|
-
id: "$[0]",
|
|
749
|
-
businessLocationIds: "$[1].businessLocationIds",
|
|
750
|
-
duplicateSubEntities: "$[1].duplicateSubEntities",
|
|
751
|
-
menuName: "$[1].menuName"
|
|
752
|
-
},
|
|
753
|
-
singleArgumentUnchanged: false
|
|
754
|
-
},
|
|
755
|
-
["_id", "options"]
|
|
756
|
-
);
|
|
757
|
-
sideEffects?.onError?.(err);
|
|
758
|
-
throw transformedError;
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
async function getMenuSiteUrl2(_id) {
|
|
762
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
763
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
|
|
764
|
-
const reqOpts = getMenuSiteUrl(payload);
|
|
765
|
-
sideEffects?.onSiteCall?.();
|
|
766
|
-
try {
|
|
767
|
-
const result = await httpClient.request(reqOpts);
|
|
768
|
-
sideEffects?.onSuccess?.(result);
|
|
769
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
770
|
-
} catch (err) {
|
|
771
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
772
|
-
err,
|
|
773
|
-
{
|
|
774
|
-
spreadPathsToArguments: {},
|
|
775
|
-
explicitPathsToArguments: { id: "$[0]" },
|
|
776
|
-
singleArgumentUnchanged: false
|
|
777
|
-
},
|
|
778
|
-
["_id"]
|
|
779
|
-
);
|
|
780
|
-
sideEffects?.onError?.(err);
|
|
781
|
-
throw transformedError;
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
async function queryMenusSiteUrl2(options) {
|
|
785
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
786
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
787
|
-
query: options?.query
|
|
788
|
-
});
|
|
789
|
-
const reqOpts = queryMenusSiteUrl(payload);
|
|
790
|
-
sideEffects?.onSiteCall?.();
|
|
791
|
-
try {
|
|
792
|
-
const result = await httpClient.request(reqOpts);
|
|
793
|
-
sideEffects?.onSuccess?.(result);
|
|
794
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
795
|
-
} catch (err) {
|
|
796
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
797
|
-
err,
|
|
798
|
-
{
|
|
799
|
-
spreadPathsToArguments: {},
|
|
800
|
-
explicitPathsToArguments: { query: "$[0].query" },
|
|
801
|
-
singleArgumentUnchanged: false
|
|
802
|
-
},
|
|
803
|
-
["options"]
|
|
804
|
-
);
|
|
805
|
-
sideEffects?.onError?.(err);
|
|
806
|
-
throw transformedError;
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
728
|
async function createMenu2(menu) {
|
|
810
729
|
const { httpClient, sideEffects } = arguments[1];
|
|
811
730
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ menu });
|
|
@@ -1088,6 +1007,87 @@ async function deleteMenu2(menuId) {
|
|
|
1088
1007
|
throw transformedError;
|
|
1089
1008
|
}
|
|
1090
1009
|
}
|
|
1010
|
+
async function duplicateMenu2(_id, options) {
|
|
1011
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1012
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1013
|
+
id: _id,
|
|
1014
|
+
businessLocationIds: options?.businessLocationIds,
|
|
1015
|
+
duplicateSubEntities: options?.duplicateSubEntities,
|
|
1016
|
+
menuName: options?.menuName
|
|
1017
|
+
});
|
|
1018
|
+
const reqOpts = duplicateMenu(payload);
|
|
1019
|
+
sideEffects?.onSiteCall?.();
|
|
1020
|
+
try {
|
|
1021
|
+
const result = await httpClient.request(reqOpts);
|
|
1022
|
+
sideEffects?.onSuccess?.(result);
|
|
1023
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1024
|
+
} catch (err) {
|
|
1025
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1026
|
+
err,
|
|
1027
|
+
{
|
|
1028
|
+
spreadPathsToArguments: {},
|
|
1029
|
+
explicitPathsToArguments: {
|
|
1030
|
+
id: "$[0]",
|
|
1031
|
+
businessLocationIds: "$[1].businessLocationIds",
|
|
1032
|
+
duplicateSubEntities: "$[1].duplicateSubEntities",
|
|
1033
|
+
menuName: "$[1].menuName"
|
|
1034
|
+
},
|
|
1035
|
+
singleArgumentUnchanged: false
|
|
1036
|
+
},
|
|
1037
|
+
["_id", "options"]
|
|
1038
|
+
);
|
|
1039
|
+
sideEffects?.onError?.(err);
|
|
1040
|
+
throw transformedError;
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
async function getMenuSiteUrl2(_id) {
|
|
1044
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1045
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ id: _id });
|
|
1046
|
+
const reqOpts = getMenuSiteUrl(payload);
|
|
1047
|
+
sideEffects?.onSiteCall?.();
|
|
1048
|
+
try {
|
|
1049
|
+
const result = await httpClient.request(reqOpts);
|
|
1050
|
+
sideEffects?.onSuccess?.(result);
|
|
1051
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1052
|
+
} catch (err) {
|
|
1053
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1054
|
+
err,
|
|
1055
|
+
{
|
|
1056
|
+
spreadPathsToArguments: {},
|
|
1057
|
+
explicitPathsToArguments: { id: "$[0]" },
|
|
1058
|
+
singleArgumentUnchanged: false
|
|
1059
|
+
},
|
|
1060
|
+
["_id"]
|
|
1061
|
+
);
|
|
1062
|
+
sideEffects?.onError?.(err);
|
|
1063
|
+
throw transformedError;
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
async function queryMenusSiteUrl2(options) {
|
|
1067
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
1068
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1069
|
+
query: options?.query
|
|
1070
|
+
});
|
|
1071
|
+
const reqOpts = queryMenusSiteUrl(payload);
|
|
1072
|
+
sideEffects?.onSiteCall?.();
|
|
1073
|
+
try {
|
|
1074
|
+
const result = await httpClient.request(reqOpts);
|
|
1075
|
+
sideEffects?.onSuccess?.(result);
|
|
1076
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
1077
|
+
} catch (err) {
|
|
1078
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1079
|
+
err,
|
|
1080
|
+
{
|
|
1081
|
+
spreadPathsToArguments: {},
|
|
1082
|
+
explicitPathsToArguments: { query: "$[0].query" },
|
|
1083
|
+
singleArgumentUnchanged: false
|
|
1084
|
+
},
|
|
1085
|
+
["options"]
|
|
1086
|
+
);
|
|
1087
|
+
sideEffects?.onError?.(err);
|
|
1088
|
+
throw transformedError;
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
1091
|
|
|
1092
1092
|
// src/restaurants-menus-v1-menu-menus.public.ts
|
|
1093
1093
|
var TRANSFORM_PATHS_02 = [
|
|
@@ -1111,28 +1111,6 @@ var TRANSFORM_PATHS_22 = [
|
|
|
1111
1111
|
{ path: "undefined.externalReferenceInfo.lastSyncDate" },
|
|
1112
1112
|
{ path: "metadata.eventTime" }
|
|
1113
1113
|
];
|
|
1114
|
-
function duplicateMenu3(httpClient) {
|
|
1115
|
-
return (_id, options) => duplicateMenu2(
|
|
1116
|
-
_id,
|
|
1117
|
-
options,
|
|
1118
|
-
// @ts-ignore
|
|
1119
|
-
{ httpClient }
|
|
1120
|
-
);
|
|
1121
|
-
}
|
|
1122
|
-
function getMenuSiteUrl3(httpClient) {
|
|
1123
|
-
return (_id) => getMenuSiteUrl2(
|
|
1124
|
-
_id,
|
|
1125
|
-
// @ts-ignore
|
|
1126
|
-
{ httpClient }
|
|
1127
|
-
);
|
|
1128
|
-
}
|
|
1129
|
-
function queryMenusSiteUrl3(httpClient) {
|
|
1130
|
-
return (options) => queryMenusSiteUrl2(
|
|
1131
|
-
options,
|
|
1132
|
-
// @ts-ignore
|
|
1133
|
-
{ httpClient }
|
|
1134
|
-
);
|
|
1135
|
-
}
|
|
1136
1114
|
function createMenu3(httpClient) {
|
|
1137
1115
|
return (menu) => createMenu2(
|
|
1138
1116
|
menu,
|
|
@@ -1207,6 +1185,28 @@ function deleteMenu3(httpClient) {
|
|
|
1207
1185
|
{ httpClient }
|
|
1208
1186
|
);
|
|
1209
1187
|
}
|
|
1188
|
+
function duplicateMenu3(httpClient) {
|
|
1189
|
+
return (_id, options) => duplicateMenu2(
|
|
1190
|
+
_id,
|
|
1191
|
+
options,
|
|
1192
|
+
// @ts-ignore
|
|
1193
|
+
{ httpClient }
|
|
1194
|
+
);
|
|
1195
|
+
}
|
|
1196
|
+
function getMenuSiteUrl3(httpClient) {
|
|
1197
|
+
return (_id) => getMenuSiteUrl2(
|
|
1198
|
+
_id,
|
|
1199
|
+
// @ts-ignore
|
|
1200
|
+
{ httpClient }
|
|
1201
|
+
);
|
|
1202
|
+
}
|
|
1203
|
+
function queryMenusSiteUrl3(httpClient) {
|
|
1204
|
+
return (options) => queryMenusSiteUrl2(
|
|
1205
|
+
options,
|
|
1206
|
+
// @ts-ignore
|
|
1207
|
+
{ httpClient }
|
|
1208
|
+
);
|
|
1209
|
+
}
|
|
1210
1210
|
var onMenuUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
|
|
1211
1211
|
"wix.restaurants.menus.v1.menu_updated",
|
|
1212
1212
|
true,
|
|
@@ -1259,9 +1259,6 @@ function customQueryMenus(httpClient) {
|
|
|
1259
1259
|
}
|
|
1260
1260
|
return overloadedQuery;
|
|
1261
1261
|
}
|
|
1262
|
-
var duplicateMenu4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(duplicateMenu3);
|
|
1263
|
-
var getMenuSiteUrl4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getMenuSiteUrl3);
|
|
1264
|
-
var queryMenusSiteUrl4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryMenusSiteUrl3);
|
|
1265
1262
|
var createMenu4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createMenu3);
|
|
1266
1263
|
var bulkCreateMenus4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateMenus3);
|
|
1267
1264
|
var getMenu4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getMenu3);
|
|
@@ -1270,6 +1267,9 @@ var updateMenu4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(upd
|
|
|
1270
1267
|
var bulkUpdateMenu4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdateMenu3);
|
|
1271
1268
|
var updateExtendedFields4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateExtendedFields3);
|
|
1272
1269
|
var deleteMenu4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteMenu3);
|
|
1270
|
+
var duplicateMenu4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(duplicateMenu3);
|
|
1271
|
+
var getMenuSiteUrl4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getMenuSiteUrl3);
|
|
1272
|
+
var queryMenusSiteUrl4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryMenusSiteUrl3);
|
|
1273
1273
|
var queryMenus4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryMenus);
|
|
1274
1274
|
var onMenuUpdated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(onMenuUpdated);
|
|
1275
1275
|
var onMenuCreated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(onMenuCreated);
|