@wix/auto_sdk_ecom_delivery-profile 1.0.42 → 1.0.44
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/src/ecom-v1-delivery-profile-delivery-profile.types.d.ts → ecom-v1-delivery-profile-delivery-profile.universal-CQYvMtsF.d.mts} +371 -136
- package/build/{internal/cjs/src/ecom-v1-delivery-profile-delivery-profile.types.d.ts → ecom-v1-delivery-profile-delivery-profile.universal-CQYvMtsF.d.ts} +371 -136
- package/build/index.d.mts +176 -0
- package/build/index.d.ts +176 -0
- package/build/index.js +1260 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +1213 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/{es/src/ecom-v1-delivery-profile-delivery-profile.types.d.ts → ecom-v1-delivery-profile-delivery-profile.universal-CQYvMtsF.d.mts} +371 -136
- package/build/{es/src/ecom-v1-delivery-profile-delivery-profile.types.d.ts → internal/ecom-v1-delivery-profile-delivery-profile.universal-CQYvMtsF.d.ts} +371 -136
- package/build/internal/index.d.mts +176 -0
- package/build/internal/index.d.ts +176 -0
- package/build/internal/index.js +1260 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +1213 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +733 -0
- package/build/internal/meta.d.ts +733 -0
- package/build/internal/meta.js +855 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +813 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/meta.d.mts +733 -0
- package/build/meta.d.ts +733 -0
- package/build/meta.js +855 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +813 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/ecom-v1-delivery-profile-delivery-profile.context.d.ts +0 -20
- package/build/cjs/src/ecom-v1-delivery-profile-delivery-profile.context.js +0 -31
- package/build/cjs/src/ecom-v1-delivery-profile-delivery-profile.context.js.map +0 -1
- package/build/cjs/src/ecom-v1-delivery-profile-delivery-profile.http.d.ts +0 -73
- package/build/cjs/src/ecom-v1-delivery-profile-delivery-profile.http.js +0 -567
- package/build/cjs/src/ecom-v1-delivery-profile-delivery-profile.http.js.map +0 -1
- package/build/cjs/src/ecom-v1-delivery-profile-delivery-profile.meta.d.ts +0 -46
- package/build/cjs/src/ecom-v1-delivery-profile-delivery-profile.meta.js +0 -344
- package/build/cjs/src/ecom-v1-delivery-profile-delivery-profile.meta.js.map +0 -1
- package/build/cjs/src/ecom-v1-delivery-profile-delivery-profile.public.d.ts +0 -159
- package/build/cjs/src/ecom-v1-delivery-profile-delivery-profile.public.js +0 -111
- package/build/cjs/src/ecom-v1-delivery-profile-delivery-profile.public.js.map +0 -1
- package/build/cjs/src/ecom-v1-delivery-profile-delivery-profile.types.js +0 -142
- package/build/cjs/src/ecom-v1-delivery-profile-delivery-profile.types.js.map +0 -1
- package/build/cjs/src/ecom-v1-delivery-profile-delivery-profile.universal.d.ts +0 -2011
- package/build/cjs/src/ecom-v1-delivery-profile-delivery-profile.universal.js +0 -967
- package/build/cjs/src/ecom-v1-delivery-profile-delivery-profile.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/ecom-v1-delivery-profile-delivery-profile.context.d.ts +0 -20
- package/build/es/src/ecom-v1-delivery-profile-delivery-profile.context.js +0 -20
- package/build/es/src/ecom-v1-delivery-profile-delivery-profile.context.js.map +0 -1
- package/build/es/src/ecom-v1-delivery-profile-delivery-profile.http.d.ts +0 -73
- package/build/es/src/ecom-v1-delivery-profile-delivery-profile.http.js +0 -548
- package/build/es/src/ecom-v1-delivery-profile-delivery-profile.http.js.map +0 -1
- package/build/es/src/ecom-v1-delivery-profile-delivery-profile.meta.d.ts +0 -46
- package/build/es/src/ecom-v1-delivery-profile-delivery-profile.meta.js +0 -302
- package/build/es/src/ecom-v1-delivery-profile-delivery-profile.meta.js.map +0 -1
- package/build/es/src/ecom-v1-delivery-profile-delivery-profile.public.d.ts +0 -159
- package/build/es/src/ecom-v1-delivery-profile-delivery-profile.public.js +0 -84
- package/build/es/src/ecom-v1-delivery-profile-delivery-profile.public.js.map +0 -1
- package/build/es/src/ecom-v1-delivery-profile-delivery-profile.types.js +0 -139
- package/build/es/src/ecom-v1-delivery-profile-delivery-profile.types.js.map +0 -1
- package/build/es/src/ecom-v1-delivery-profile-delivery-profile.universal.d.ts +0 -2011
- package/build/es/src/ecom-v1-delivery-profile-delivery-profile.universal.js +0 -925
- package/build/es/src/ecom-v1-delivery-profile-delivery-profile.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-delivery-profile-delivery-profile.context.d.ts +0 -20
- package/build/internal/cjs/src/ecom-v1-delivery-profile-delivery-profile.context.js +0 -31
- package/build/internal/cjs/src/ecom-v1-delivery-profile-delivery-profile.context.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-delivery-profile-delivery-profile.http.d.ts +0 -73
- package/build/internal/cjs/src/ecom-v1-delivery-profile-delivery-profile.http.js +0 -567
- package/build/internal/cjs/src/ecom-v1-delivery-profile-delivery-profile.http.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-delivery-profile-delivery-profile.meta.d.ts +0 -46
- package/build/internal/cjs/src/ecom-v1-delivery-profile-delivery-profile.meta.js +0 -344
- package/build/internal/cjs/src/ecom-v1-delivery-profile-delivery-profile.meta.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-delivery-profile-delivery-profile.public.d.ts +0 -159
- package/build/internal/cjs/src/ecom-v1-delivery-profile-delivery-profile.public.js +0 -111
- package/build/internal/cjs/src/ecom-v1-delivery-profile-delivery-profile.public.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-delivery-profile-delivery-profile.types.js +0 -142
- package/build/internal/cjs/src/ecom-v1-delivery-profile-delivery-profile.types.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-delivery-profile-delivery-profile.universal.d.ts +0 -2011
- package/build/internal/cjs/src/ecom-v1-delivery-profile-delivery-profile.universal.js +0 -967
- package/build/internal/cjs/src/ecom-v1-delivery-profile-delivery-profile.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/ecom-v1-delivery-profile-delivery-profile.context.d.ts +0 -20
- package/build/internal/es/src/ecom-v1-delivery-profile-delivery-profile.context.js +0 -20
- package/build/internal/es/src/ecom-v1-delivery-profile-delivery-profile.context.js.map +0 -1
- package/build/internal/es/src/ecom-v1-delivery-profile-delivery-profile.http.d.ts +0 -73
- package/build/internal/es/src/ecom-v1-delivery-profile-delivery-profile.http.js +0 -548
- package/build/internal/es/src/ecom-v1-delivery-profile-delivery-profile.http.js.map +0 -1
- package/build/internal/es/src/ecom-v1-delivery-profile-delivery-profile.meta.d.ts +0 -46
- package/build/internal/es/src/ecom-v1-delivery-profile-delivery-profile.meta.js +0 -302
- package/build/internal/es/src/ecom-v1-delivery-profile-delivery-profile.meta.js.map +0 -1
- package/build/internal/es/src/ecom-v1-delivery-profile-delivery-profile.public.d.ts +0 -159
- package/build/internal/es/src/ecom-v1-delivery-profile-delivery-profile.public.js +0 -84
- package/build/internal/es/src/ecom-v1-delivery-profile-delivery-profile.public.js.map +0 -1
- package/build/internal/es/src/ecom-v1-delivery-profile-delivery-profile.types.js +0 -139
- package/build/internal/es/src/ecom-v1-delivery-profile-delivery-profile.types.js.map +0 -1
- package/build/internal/es/src/ecom-v1-delivery-profile-delivery-profile.universal.d.ts +0 -2011
- package/build/internal/es/src/ecom-v1-delivery-profile-delivery-profile.universal.js +0 -925
- package/build/internal/es/src/ecom-v1-delivery-profile-delivery-profile.universal.js.map +0 -1
|
@@ -1,967 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.updateExtendedFields = exports.updateCarrierSettings = exports.listDeliveryCarriers = exports.listInstalledDeliveryCarriers = exports.listDeliveryCarrierDetails = exports.updateDeliveryCarrier = exports.removeDeliveryCarrier = exports.addDeliveryCarrier = exports.removeDeliveryRegion = exports.updateDeliveryRegion = exports.addDeliveryRegion = exports.queryDeliveryProfiles = exports.deleteDeliveryProfile = exports.updateDeliveryProfile = exports.getDeliveryProfile = exports.createDeliveryProfile = exports.WebhookIdentityType = exports.DeleteStatus = exports.Namespace = exports.SiteCreatedContext = exports.State = exports.DestinationScope = exports.SortOrder = exports.ChargeType = void 0;
|
|
27
|
-
const transform_error_1 = require("@wix/sdk-runtime/transform-error");
|
|
28
|
-
const query_builder_1 = require("@wix/sdk-runtime/query-builder");
|
|
29
|
-
const rename_all_nested_keys_1 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
30
|
-
const ambassadorWixEcomV1DeliveryProfile = __importStar(require("./ecom-v1-delivery-profile-delivery-profile.http.js"));
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
const transform_paths_1 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
33
|
-
var ChargeType;
|
|
34
|
-
(function (ChargeType) {
|
|
35
|
-
ChargeType["HANDLING_FEE"] = "HANDLING_FEE";
|
|
36
|
-
})(ChargeType || (exports.ChargeType = ChargeType = {}));
|
|
37
|
-
var SortOrder;
|
|
38
|
-
(function (SortOrder) {
|
|
39
|
-
SortOrder["ASC"] = "ASC";
|
|
40
|
-
SortOrder["DESC"] = "DESC";
|
|
41
|
-
})(SortOrder || (exports.SortOrder = SortOrder = {}));
|
|
42
|
-
var DestinationScope;
|
|
43
|
-
(function (DestinationScope) {
|
|
44
|
-
/** No additional destinations are requested */
|
|
45
|
-
DestinationScope["SPECIFIC_DESTINATIONS"] = "SPECIFIC_DESTINATIONS";
|
|
46
|
-
/** All Destinations */
|
|
47
|
-
DestinationScope["WORLDWIDE"] = "WORLDWIDE";
|
|
48
|
-
})(DestinationScope || (exports.DestinationScope = DestinationScope = {}));
|
|
49
|
-
var State;
|
|
50
|
-
(function (State) {
|
|
51
|
-
State["UNKNOWN"] = "UNKNOWN";
|
|
52
|
-
State["ENABLED"] = "ENABLED";
|
|
53
|
-
State["DISABLED"] = "DISABLED";
|
|
54
|
-
State["PENDING"] = "PENDING";
|
|
55
|
-
State["DEMO"] = "DEMO";
|
|
56
|
-
})(State || (exports.State = State = {}));
|
|
57
|
-
var SiteCreatedContext;
|
|
58
|
-
(function (SiteCreatedContext) {
|
|
59
|
-
/** A valid option, we don't expose all reasons why site might be created. */
|
|
60
|
-
SiteCreatedContext["OTHER"] = "OTHER";
|
|
61
|
-
/** A meta site was created from template. */
|
|
62
|
-
SiteCreatedContext["FROM_TEMPLATE"] = "FROM_TEMPLATE";
|
|
63
|
-
/** A meta site was created by copying of the transfferred meta site. */
|
|
64
|
-
SiteCreatedContext["DUPLICATE_BY_SITE_TRANSFER"] = "DUPLICATE_BY_SITE_TRANSFER";
|
|
65
|
-
/** A copy of existing meta site. */
|
|
66
|
-
SiteCreatedContext["DUPLICATE"] = "DUPLICATE";
|
|
67
|
-
/** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */
|
|
68
|
-
SiteCreatedContext["OLD_SITE_TRANSFER"] = "OLD_SITE_TRANSFER";
|
|
69
|
-
/** deprecated A meta site was created for Flash editor. */
|
|
70
|
-
SiteCreatedContext["FLASH"] = "FLASH";
|
|
71
|
-
})(SiteCreatedContext || (exports.SiteCreatedContext = SiteCreatedContext = {}));
|
|
72
|
-
var Namespace;
|
|
73
|
-
(function (Namespace) {
|
|
74
|
-
Namespace["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
|
|
75
|
-
/** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
|
|
76
|
-
Namespace["WIX"] = "WIX";
|
|
77
|
-
/** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
78
|
-
Namespace["SHOUT_OUT"] = "SHOUT_OUT";
|
|
79
|
-
/** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
80
|
-
Namespace["ALBUMS"] = "ALBUMS";
|
|
81
|
-
/** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
82
|
-
Namespace["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
|
|
83
|
-
/** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
84
|
-
Namespace["HOTELS"] = "HOTELS";
|
|
85
|
-
/** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
86
|
-
Namespace["CLUBS"] = "CLUBS";
|
|
87
|
-
/** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
88
|
-
Namespace["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
|
|
89
|
-
/** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
90
|
-
Namespace["DEV_SITE"] = "DEV_SITE";
|
|
91
|
-
/** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
92
|
-
Namespace["LOGOS"] = "LOGOS";
|
|
93
|
-
/** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
94
|
-
Namespace["VIDEO_MAKER"] = "VIDEO_MAKER";
|
|
95
|
-
/** MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
96
|
-
Namespace["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
|
|
97
|
-
/** MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
98
|
-
Namespace["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
|
|
99
|
-
/**
|
|
100
|
-
* A draft created by HTML editor on open. Upon "first save" it will be moved to be of WIX domain.
|
|
101
|
-
*
|
|
102
|
-
* Meta site with this namespace will *not* be shown in a user's site list by default.
|
|
103
|
-
*/
|
|
104
|
-
Namespace["HTML_DRAFT"] = "HTML_DRAFT";
|
|
105
|
-
/**
|
|
106
|
-
* the user-journey for Fitness users who want to start from managing their business instead of designing their website.
|
|
107
|
-
* Will be accessible from Site List and will not have a website app.
|
|
108
|
-
* Once the user attaches a site, the site will become a regular wixsite.
|
|
109
|
-
*/
|
|
110
|
-
Namespace["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
|
|
111
|
-
/** Belongs to "strategic products" company. Supports new product in the creator's economy space. */
|
|
112
|
-
Namespace["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
|
|
113
|
-
/** It is to be used in the Business First efforts. */
|
|
114
|
-
Namespace["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
|
|
115
|
-
/** Bookings business flow with no site. */
|
|
116
|
-
Namespace["ANYWHERE"] = "ANYWHERE";
|
|
117
|
-
/** Namespace for Headless Backoffice with no editor */
|
|
118
|
-
Namespace["HEADLESS"] = "HEADLESS";
|
|
119
|
-
/**
|
|
120
|
-
* Namespace for master site that will exist in parent account that will be referenced by subaccounts
|
|
121
|
-
* The site will be used for account level CSM feature for enterprise
|
|
122
|
-
*/
|
|
123
|
-
Namespace["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
|
|
124
|
-
/** Rise.ai Siteless account management for Gift Cards and Store Credit. */
|
|
125
|
-
Namespace["RISE"] = "RISE";
|
|
126
|
-
/**
|
|
127
|
-
* As part of the branded app new funnel, users now can create a meta site that will be branded app first.
|
|
128
|
-
* There's a blank site behind the scene but it's blank).
|
|
129
|
-
* The Mobile company will be the owner of this namespace.
|
|
130
|
-
*/
|
|
131
|
-
Namespace["BRANDED_FIRST"] = "BRANDED_FIRST";
|
|
132
|
-
/** Nownia.com Siteless account management for Ai Scheduling Assistant. */
|
|
133
|
-
Namespace["NOWNIA"] = "NOWNIA";
|
|
134
|
-
/**
|
|
135
|
-
* UGC Templates are templates that are created by users for personal use and to sale to other users.
|
|
136
|
-
* The Partners company owns this namespace.
|
|
137
|
-
*/
|
|
138
|
-
Namespace["UGC_TEMPLATE"] = "UGC_TEMPLATE";
|
|
139
|
-
/** Codux Headless Sites */
|
|
140
|
-
Namespace["CODUX"] = "CODUX";
|
|
141
|
-
/** Bobb - AI Design Creator. */
|
|
142
|
-
Namespace["MEDIA_DESIGN_CREATOR"] = "MEDIA_DESIGN_CREATOR";
|
|
143
|
-
/**
|
|
144
|
-
* Shared Blog Site is a unique single site across Enterprise account,
|
|
145
|
-
* This site will hold all Blog posts related to the Marketing product.
|
|
146
|
-
*/
|
|
147
|
-
Namespace["SHARED_BLOG_ENTERPRISE"] = "SHARED_BLOG_ENTERPRISE";
|
|
148
|
-
/** Standalone forms (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
149
|
-
Namespace["STANDALONE_FORMS"] = "STANDALONE_FORMS";
|
|
150
|
-
/** Standalone events (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
151
|
-
Namespace["STANDALONE_EVENTS"] = "STANDALONE_EVENTS";
|
|
152
|
-
/** MIMIR - Siteless account for MIMIR Ai Job runner. */
|
|
153
|
-
Namespace["MIMIR"] = "MIMIR";
|
|
154
|
-
})(Namespace || (exports.Namespace = Namespace = {}));
|
|
155
|
-
var DeleteStatus;
|
|
156
|
-
(function (DeleteStatus) {
|
|
157
|
-
DeleteStatus["UNKNOWN"] = "UNKNOWN";
|
|
158
|
-
DeleteStatus["TRASH"] = "TRASH";
|
|
159
|
-
DeleteStatus["DELETED"] = "DELETED";
|
|
160
|
-
DeleteStatus["PENDING_PURGE"] = "PENDING_PURGE";
|
|
161
|
-
DeleteStatus["PURGED_EXTERNALLY"] = "PURGED_EXTERNALLY";
|
|
162
|
-
})(DeleteStatus || (exports.DeleteStatus = DeleteStatus = {}));
|
|
163
|
-
var WebhookIdentityType;
|
|
164
|
-
(function (WebhookIdentityType) {
|
|
165
|
-
WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
|
|
166
|
-
WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
167
|
-
WebhookIdentityType["MEMBER"] = "MEMBER";
|
|
168
|
-
WebhookIdentityType["WIX_USER"] = "WIX_USER";
|
|
169
|
-
WebhookIdentityType["APP"] = "APP";
|
|
170
|
-
})(WebhookIdentityType || (exports.WebhookIdentityType = WebhookIdentityType = {}));
|
|
171
|
-
/**
|
|
172
|
-
* Creates a DeliveryProfile.
|
|
173
|
-
*
|
|
174
|
-
* The request body must include the DeliveryProfiles name. DeliveryRegions are optional.
|
|
175
|
-
* @param deliveryProfile - DeliveryProfile to be created.
|
|
176
|
-
* @public
|
|
177
|
-
* @documentationMaturity preview
|
|
178
|
-
* @requiredField deliveryProfile
|
|
179
|
-
* @requiredField deliveryProfile.deliveryRegions.destinations
|
|
180
|
-
* @requiredField deliveryProfile.deliveryRegions.destinations.countryCode
|
|
181
|
-
* @requiredField deliveryProfile.deliveryRegions.name
|
|
182
|
-
* @requiredField deliveryProfile.name
|
|
183
|
-
* @permissionId ECOM.DELIVERY_PROFILE_CREATE
|
|
184
|
-
* @permissionScope Manage Stores - all permissions
|
|
185
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
186
|
-
* @permissionScope Manage Stores
|
|
187
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
188
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
189
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
190
|
-
* @permissionScope Manage eCommerce - all permissions
|
|
191
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
192
|
-
* @applicableIdentity APP
|
|
193
|
-
* @returns The created DeliveryProfile.
|
|
194
|
-
* @fqn wix.ecom.deliveryprofile.v1.DeliveryProfiles.CreateDeliveryProfile
|
|
195
|
-
*/
|
|
196
|
-
async function createDeliveryProfile(deliveryProfile) {
|
|
197
|
-
// @ts-ignore
|
|
198
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
199
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
200
|
-
deliveryProfile: deliveryProfile,
|
|
201
|
-
});
|
|
202
|
-
const reqOpts = ambassadorWixEcomV1DeliveryProfile.createDeliveryProfile(payload);
|
|
203
|
-
sideEffects?.onSiteCall?.();
|
|
204
|
-
try {
|
|
205
|
-
const result = await httpClient.request(reqOpts);
|
|
206
|
-
sideEffects?.onSuccess?.(result);
|
|
207
|
-
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data)
|
|
208
|
-
?.deliveryProfile;
|
|
209
|
-
}
|
|
210
|
-
catch (err) {
|
|
211
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
212
|
-
spreadPathsToArguments: {},
|
|
213
|
-
explicitPathsToArguments: { deliveryProfile: '$[0]' },
|
|
214
|
-
singleArgumentUnchanged: false,
|
|
215
|
-
}, ['deliveryProfile']);
|
|
216
|
-
sideEffects?.onError?.(err);
|
|
217
|
-
throw transformedError;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
exports.createDeliveryProfile = createDeliveryProfile;
|
|
221
|
-
/**
|
|
222
|
-
* Retrieves a DeliveryProfile.
|
|
223
|
-
* @param deliveryProfileId - ID of the DeliveryProfile to retrieve.
|
|
224
|
-
* @public
|
|
225
|
-
* @documentationMaturity preview
|
|
226
|
-
* @requiredField deliveryProfileId
|
|
227
|
-
* @permissionId ECOM.DELIVERY_PROFILE_READ
|
|
228
|
-
* @permissionScope Manage Stores - all permissions
|
|
229
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
230
|
-
* @permissionScope Manage Stores
|
|
231
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
232
|
-
* @permissionScope Read eCommerce - all read permissions
|
|
233
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
234
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
235
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
236
|
-
* @permissionScope Manage eCommerce - all permissions
|
|
237
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
238
|
-
* @applicableIdentity APP
|
|
239
|
-
* @applicableIdentity VISITOR
|
|
240
|
-
* @returns The requested DeliveryProfile.
|
|
241
|
-
* @fqn wix.ecom.deliveryprofile.v1.DeliveryProfiles.GetDeliveryProfile
|
|
242
|
-
*/
|
|
243
|
-
async function getDeliveryProfile(deliveryProfileId) {
|
|
244
|
-
// @ts-ignore
|
|
245
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
246
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
247
|
-
deliveryProfileId: deliveryProfileId,
|
|
248
|
-
});
|
|
249
|
-
const reqOpts = ambassadorWixEcomV1DeliveryProfile.getDeliveryProfile(payload);
|
|
250
|
-
sideEffects?.onSiteCall?.();
|
|
251
|
-
try {
|
|
252
|
-
const result = await httpClient.request(reqOpts);
|
|
253
|
-
sideEffects?.onSuccess?.(result);
|
|
254
|
-
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data)
|
|
255
|
-
?.deliveryProfile;
|
|
256
|
-
}
|
|
257
|
-
catch (err) {
|
|
258
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
259
|
-
spreadPathsToArguments: {},
|
|
260
|
-
explicitPathsToArguments: { deliveryProfileId: '$[0]' },
|
|
261
|
-
singleArgumentUnchanged: false,
|
|
262
|
-
}, ['deliveryProfileId']);
|
|
263
|
-
sideEffects?.onError?.(err);
|
|
264
|
-
throw transformedError;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
exports.getDeliveryProfile = getDeliveryProfile;
|
|
268
|
-
/**
|
|
269
|
-
* Updates a DeliveryProfile.
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
* Each time the DeliveryProfile is updated,
|
|
273
|
-
* `revision` increments by 1.
|
|
274
|
-
* The current `revision` must be passed when updating the DeliveryProfile.
|
|
275
|
-
* This ensures you're working with the latest DeliveryProfile
|
|
276
|
-
* and prevents unintended overwrites.
|
|
277
|
-
*
|
|
278
|
-
* This method does not allow updating the DeliveryRegions in this DeliveryProfile.
|
|
279
|
-
* Use AddDeliveryRegion, UpdateDeliveryRegion and RemoveDeliveryRegion for these functionalities.
|
|
280
|
-
* @param _id - DeliveryProfile ID.
|
|
281
|
-
* @public
|
|
282
|
-
* @documentationMaturity preview
|
|
283
|
-
* @requiredField _id
|
|
284
|
-
* @requiredField deliveryProfile
|
|
285
|
-
* @requiredField deliveryProfile.revision
|
|
286
|
-
* @permissionId ECOM.DELIVERY_PROFILE_UPDATE
|
|
287
|
-
* @permissionScope Manage Stores - all permissions
|
|
288
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
289
|
-
* @permissionScope Manage Stores
|
|
290
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
291
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
292
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
293
|
-
* @permissionScope Manage eCommerce - all permissions
|
|
294
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
295
|
-
* @applicableIdentity APP
|
|
296
|
-
* @returns Updated DeliveryProfile.
|
|
297
|
-
* @fqn wix.ecom.deliveryprofile.v1.DeliveryProfiles.UpdateDeliveryProfile
|
|
298
|
-
*/
|
|
299
|
-
async function updateDeliveryProfile(_id, deliveryProfile) {
|
|
300
|
-
// @ts-ignore
|
|
301
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
302
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
303
|
-
deliveryProfile: { ...deliveryProfile, id: _id },
|
|
304
|
-
});
|
|
305
|
-
const reqOpts = ambassadorWixEcomV1DeliveryProfile.updateDeliveryProfile(payload);
|
|
306
|
-
sideEffects?.onSiteCall?.();
|
|
307
|
-
try {
|
|
308
|
-
const result = await httpClient.request(reqOpts);
|
|
309
|
-
sideEffects?.onSuccess?.(result);
|
|
310
|
-
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data)
|
|
311
|
-
?.deliveryProfile;
|
|
312
|
-
}
|
|
313
|
-
catch (err) {
|
|
314
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
315
|
-
spreadPathsToArguments: { deliveryProfile: '$[1]' },
|
|
316
|
-
explicitPathsToArguments: { 'deliveryProfile.id': '$[0]' },
|
|
317
|
-
singleArgumentUnchanged: false,
|
|
318
|
-
}, ['_id', 'deliveryProfile']);
|
|
319
|
-
sideEffects?.onError?.(err);
|
|
320
|
-
throw transformedError;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
exports.updateDeliveryProfile = updateDeliveryProfile;
|
|
324
|
-
/**
|
|
325
|
-
* Deletes a DeliveryProfile.
|
|
326
|
-
*
|
|
327
|
-
* Deleting a DeliveryProfile permanently removes them from the DeliveryProfile List.
|
|
328
|
-
* @param deliveryProfileId - Id of the DeliveryProfile to delete.
|
|
329
|
-
* @public
|
|
330
|
-
* @documentationMaturity preview
|
|
331
|
-
* @requiredField deliveryProfileId
|
|
332
|
-
* @permissionId ECOM.DELIVERY_PROFILE_DELETE
|
|
333
|
-
* @permissionScope Manage Stores - all permissions
|
|
334
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
335
|
-
* @permissionScope Manage Stores
|
|
336
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
337
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
338
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
339
|
-
* @permissionScope Manage eCommerce - all permissions
|
|
340
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
341
|
-
* @applicableIdentity APP
|
|
342
|
-
* @fqn wix.ecom.deliveryprofile.v1.DeliveryProfiles.DeleteDeliveryProfile
|
|
343
|
-
*/
|
|
344
|
-
async function deleteDeliveryProfile(deliveryProfileId) {
|
|
345
|
-
// @ts-ignore
|
|
346
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
347
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
348
|
-
deliveryProfileId: deliveryProfileId,
|
|
349
|
-
});
|
|
350
|
-
const reqOpts = ambassadorWixEcomV1DeliveryProfile.deleteDeliveryProfile(payload);
|
|
351
|
-
sideEffects?.onSiteCall?.();
|
|
352
|
-
try {
|
|
353
|
-
const result = await httpClient.request(reqOpts);
|
|
354
|
-
sideEffects?.onSuccess?.(result);
|
|
355
|
-
}
|
|
356
|
-
catch (err) {
|
|
357
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
358
|
-
spreadPathsToArguments: {},
|
|
359
|
-
explicitPathsToArguments: { deliveryProfileId: '$[0]' },
|
|
360
|
-
singleArgumentUnchanged: false,
|
|
361
|
-
}, ['deliveryProfileId']);
|
|
362
|
-
sideEffects?.onError?.(err);
|
|
363
|
-
throw transformedError;
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
exports.deleteDeliveryProfile = deleteDeliveryProfile;
|
|
367
|
-
/**
|
|
368
|
-
* Retrieves a list of DeliveryProfiles, given the provided [paging, filtering, and sorting][1].
|
|
369
|
-
*
|
|
370
|
-
* Up to 1,000 DeliveryProfiles can be returned per request.
|
|
371
|
-
*
|
|
372
|
-
* To learn how to query DeliveryProfiles, see [API Query Language][2].
|
|
373
|
-
*
|
|
374
|
-
* [1]: https://dev.wix.com/api/rest/getting-started/sorting-and-paging
|
|
375
|
-
* [2]: https://dev.wix.com/api/rest/getting-started/api-query-language
|
|
376
|
-
* @public
|
|
377
|
-
* @documentationMaturity preview
|
|
378
|
-
* @permissionScope Manage Stores - all permissions
|
|
379
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
380
|
-
* @permissionScope Manage Stores
|
|
381
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
382
|
-
* @permissionScope Read eCommerce - all read permissions
|
|
383
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
384
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
385
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
386
|
-
* @permissionScope Manage eCommerce - all permissions
|
|
387
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
388
|
-
* @permissionId ECOM.DELIVERY_PROFILE_READ
|
|
389
|
-
* @applicableIdentity APP
|
|
390
|
-
* @applicableIdentity VISITOR
|
|
391
|
-
* @fqn wix.ecom.deliveryprofile.v1.DeliveryProfiles.QueryDeliveryProfiles
|
|
392
|
-
*/
|
|
393
|
-
function queryDeliveryProfiles() {
|
|
394
|
-
// @ts-ignore
|
|
395
|
-
const { httpClient, sideEffects } = arguments[0];
|
|
396
|
-
return (0, query_builder_1.queryBuilder)({
|
|
397
|
-
func: async (payload) => {
|
|
398
|
-
const reqOpts = ambassadorWixEcomV1DeliveryProfile.queryDeliveryProfiles(payload);
|
|
399
|
-
sideEffects?.onSiteCall?.();
|
|
400
|
-
try {
|
|
401
|
-
const result = await httpClient.request(reqOpts);
|
|
402
|
-
sideEffects?.onSuccess?.(result);
|
|
403
|
-
return result;
|
|
404
|
-
}
|
|
405
|
-
catch (err) {
|
|
406
|
-
sideEffects?.onError?.(err);
|
|
407
|
-
throw err;
|
|
408
|
-
}
|
|
409
|
-
},
|
|
410
|
-
requestTransformer: (query) => {
|
|
411
|
-
const args = [query, {}];
|
|
412
|
-
return (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
413
|
-
...args?.[1],
|
|
414
|
-
query: args?.[0],
|
|
415
|
-
});
|
|
416
|
-
},
|
|
417
|
-
responseTransformer: ({ data, }) => {
|
|
418
|
-
const transformedData = (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)((0, transform_paths_1.transformPaths)(data, []));
|
|
419
|
-
return {
|
|
420
|
-
items: transformedData?.deliveryProfiles,
|
|
421
|
-
pagingMetadata: transformedData?.pagingMetadata,
|
|
422
|
-
};
|
|
423
|
-
},
|
|
424
|
-
errorTransformer: (err) => {
|
|
425
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
426
|
-
spreadPathsToArguments: {},
|
|
427
|
-
explicitPathsToArguments: { query: '$[0]' },
|
|
428
|
-
singleArgumentUnchanged: false,
|
|
429
|
-
});
|
|
430
|
-
throw transformedError;
|
|
431
|
-
},
|
|
432
|
-
pagingMethod: 'CURSOR',
|
|
433
|
-
transformationPaths: {},
|
|
434
|
-
});
|
|
435
|
-
}
|
|
436
|
-
exports.queryDeliveryProfiles = queryDeliveryProfiles;
|
|
437
|
-
/**
|
|
438
|
-
* Creates a new DeliveryRegion in an existing DeliveryProfile.
|
|
439
|
-
* @param deliveryProfileId - delivery profile id to associated with the DeliveryRegion
|
|
440
|
-
* @param deliveryRegion - DeliveryRegion to be created
|
|
441
|
-
* @public
|
|
442
|
-
* @documentationMaturity preview
|
|
443
|
-
* @requiredField deliveryProfileId
|
|
444
|
-
* @requiredField deliveryRegion
|
|
445
|
-
* @requiredField deliveryRegion.destinations.countryCode
|
|
446
|
-
* @requiredField deliveryRegion.name
|
|
447
|
-
* @permissionId ECOM.DELIVERY_PROFILE_UPDATE
|
|
448
|
-
* @permissionScope Manage Stores - all permissions
|
|
449
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
450
|
-
* @permissionScope Manage Stores
|
|
451
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
452
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
453
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
454
|
-
* @permissionScope Manage eCommerce - all permissions
|
|
455
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
456
|
-
* @applicableIdentity APP
|
|
457
|
-
* @fqn wix.ecom.deliveryprofile.v1.DeliveryProfiles.AddDeliveryRegion
|
|
458
|
-
*/
|
|
459
|
-
async function addDeliveryRegion(deliveryProfileId, deliveryRegion, options) {
|
|
460
|
-
// @ts-ignore
|
|
461
|
-
const { httpClient, sideEffects } = arguments[3];
|
|
462
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
463
|
-
deliveryProfileId: deliveryProfileId,
|
|
464
|
-
deliveryRegion: deliveryRegion,
|
|
465
|
-
revision: options?.revision,
|
|
466
|
-
});
|
|
467
|
-
const reqOpts = ambassadorWixEcomV1DeliveryProfile.addDeliveryRegion(payload);
|
|
468
|
-
sideEffects?.onSiteCall?.();
|
|
469
|
-
try {
|
|
470
|
-
const result = await httpClient.request(reqOpts);
|
|
471
|
-
sideEffects?.onSuccess?.(result);
|
|
472
|
-
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
473
|
-
}
|
|
474
|
-
catch (err) {
|
|
475
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
476
|
-
spreadPathsToArguments: {},
|
|
477
|
-
explicitPathsToArguments: {
|
|
478
|
-
deliveryProfileId: '$[0]',
|
|
479
|
-
deliveryRegion: '$[1]',
|
|
480
|
-
revision: '$[2].revision',
|
|
481
|
-
},
|
|
482
|
-
singleArgumentUnchanged: false,
|
|
483
|
-
}, ['deliveryProfileId', 'deliveryRegion', 'options']);
|
|
484
|
-
sideEffects?.onError?.(err);
|
|
485
|
-
throw transformedError;
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
exports.addDeliveryRegion = addDeliveryRegion;
|
|
489
|
-
/**
|
|
490
|
-
* Update a DeliveryRegion, supports partial update
|
|
491
|
-
* Pass the latest `revision` for a successful update
|
|
492
|
-
*
|
|
493
|
-
* This method does not allow setting or updating the delivery delivery_carriers in this delivery_region.
|
|
494
|
-
* Use AddDeliveryCarrier, UpdateDeliveryCarrier and RemoveDeliveryCarrier for these functionalities.
|
|
495
|
-
* @public
|
|
496
|
-
* @documentationMaturity preview
|
|
497
|
-
* @requiredField deliveryRegion
|
|
498
|
-
* @requiredField identifiers
|
|
499
|
-
* @requiredField identifiers.deliveryProfileId
|
|
500
|
-
* @requiredField identifiers.deliveryRegionId
|
|
501
|
-
* @permissionId ECOM.DELIVERY_REGION_UPDATE
|
|
502
|
-
* @permissionScope Manage Stores - all permissions
|
|
503
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
504
|
-
* @permissionScope Manage Stores
|
|
505
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
506
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
507
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
508
|
-
* @permissionScope Manage eCommerce - all permissions
|
|
509
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
510
|
-
* @applicableIdentity APP
|
|
511
|
-
* @fqn wix.ecom.deliveryprofile.v1.DeliveryProfiles.UpdateDeliveryRegion
|
|
512
|
-
*/
|
|
513
|
-
async function updateDeliveryRegion(identifiers, deliveryRegion, options) {
|
|
514
|
-
// @ts-ignore
|
|
515
|
-
const { httpClient, sideEffects } = arguments[3];
|
|
516
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
517
|
-
deliveryProfileId: identifiers?.deliveryProfileId,
|
|
518
|
-
deliveryRegion: { ...deliveryRegion, id: identifiers?.deliveryRegionId },
|
|
519
|
-
revision: options?.revision,
|
|
520
|
-
});
|
|
521
|
-
const reqOpts = ambassadorWixEcomV1DeliveryProfile.updateDeliveryRegion(payload);
|
|
522
|
-
sideEffects?.onSiteCall?.();
|
|
523
|
-
try {
|
|
524
|
-
const result = await httpClient.request(reqOpts);
|
|
525
|
-
sideEffects?.onSuccess?.(result);
|
|
526
|
-
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
527
|
-
}
|
|
528
|
-
catch (err) {
|
|
529
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
530
|
-
spreadPathsToArguments: { deliveryRegion: '$[1]' },
|
|
531
|
-
explicitPathsToArguments: {
|
|
532
|
-
deliveryProfileId: '$[0].deliveryProfileId',
|
|
533
|
-
'deliveryRegion.id': '$[0].deliveryRegionId',
|
|
534
|
-
revision: '$[2].revision',
|
|
535
|
-
},
|
|
536
|
-
singleArgumentUnchanged: false,
|
|
537
|
-
}, ['identifiers', 'deliveryRegion', 'options']);
|
|
538
|
-
sideEffects?.onError?.(err);
|
|
539
|
-
throw transformedError;
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
exports.updateDeliveryRegion = updateDeliveryRegion;
|
|
543
|
-
/**
|
|
544
|
-
* Delete a DeliveryRegion
|
|
545
|
-
* @public
|
|
546
|
-
* @documentationMaturity preview
|
|
547
|
-
* @requiredField identifiers
|
|
548
|
-
* @requiredField identifiers.deliveryProfileId
|
|
549
|
-
* @requiredField identifiers.deliveryRegionId
|
|
550
|
-
* @permissionId ECOM.DELIVERY_PROFILE_UPDATE
|
|
551
|
-
* @permissionScope Manage Stores - all permissions
|
|
552
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
553
|
-
* @permissionScope Manage Stores
|
|
554
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
555
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
556
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
557
|
-
* @permissionScope Manage eCommerce - all permissions
|
|
558
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
559
|
-
* @applicableIdentity APP
|
|
560
|
-
* @fqn wix.ecom.deliveryprofile.v1.DeliveryProfiles.RemoveDeliveryRegion
|
|
561
|
-
*/
|
|
562
|
-
async function removeDeliveryRegion(identifiers, options) {
|
|
563
|
-
// @ts-ignore
|
|
564
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
565
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
566
|
-
deliveryProfileId: identifiers?.deliveryProfileId,
|
|
567
|
-
deliveryRegionId: identifiers?.deliveryRegionId,
|
|
568
|
-
revision: options?.revision,
|
|
569
|
-
});
|
|
570
|
-
const reqOpts = ambassadorWixEcomV1DeliveryProfile.removeDeliveryRegion(payload);
|
|
571
|
-
sideEffects?.onSiteCall?.();
|
|
572
|
-
try {
|
|
573
|
-
const result = await httpClient.request(reqOpts);
|
|
574
|
-
sideEffects?.onSuccess?.(result);
|
|
575
|
-
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
576
|
-
}
|
|
577
|
-
catch (err) {
|
|
578
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
579
|
-
spreadPathsToArguments: {},
|
|
580
|
-
explicitPathsToArguments: {
|
|
581
|
-
deliveryProfileId: '$[0].deliveryProfileId',
|
|
582
|
-
deliveryRegionId: '$[0].deliveryRegionId',
|
|
583
|
-
revision: '$[1].revision',
|
|
584
|
-
},
|
|
585
|
-
singleArgumentUnchanged: false,
|
|
586
|
-
}, ['identifiers', 'options']);
|
|
587
|
-
sideEffects?.onError?.(err);
|
|
588
|
-
throw transformedError;
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
exports.removeDeliveryRegion = removeDeliveryRegion;
|
|
592
|
-
/**
|
|
593
|
-
* Add a delivery_carrier to a delivery region
|
|
594
|
-
* @param deliveryRegionId - delivery_region id to associated with the delivery_carrier.
|
|
595
|
-
* @public
|
|
596
|
-
* @documentationMaturity preview
|
|
597
|
-
* @requiredField deliveryRegionId
|
|
598
|
-
* @requiredField options
|
|
599
|
-
* @requiredField options.deliveryCarrier
|
|
600
|
-
* @permissionId ECOM.DELIVERY_CARRIER_ADD
|
|
601
|
-
* @permissionScope Manage Stores - all permissions
|
|
602
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
603
|
-
* @permissionScope Manage Stores
|
|
604
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
605
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
606
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
607
|
-
* @permissionScope Manage eCommerce - all permissions
|
|
608
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
609
|
-
* @applicableIdentity APP
|
|
610
|
-
* @fqn wix.ecom.deliveryprofile.v1.DeliveryProfiles.AddDeliveryCarrier
|
|
611
|
-
*/
|
|
612
|
-
async function addDeliveryCarrier(deliveryRegionId, options) {
|
|
613
|
-
// @ts-ignore
|
|
614
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
615
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
616
|
-
deliveryRegionId: deliveryRegionId,
|
|
617
|
-
deliveryCarrier: options?.deliveryCarrier,
|
|
618
|
-
});
|
|
619
|
-
const reqOpts = ambassadorWixEcomV1DeliveryProfile.addDeliveryCarrier(payload);
|
|
620
|
-
sideEffects?.onSiteCall?.();
|
|
621
|
-
try {
|
|
622
|
-
const result = await httpClient.request(reqOpts);
|
|
623
|
-
sideEffects?.onSuccess?.(result);
|
|
624
|
-
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
625
|
-
}
|
|
626
|
-
catch (err) {
|
|
627
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
628
|
-
spreadPathsToArguments: {},
|
|
629
|
-
explicitPathsToArguments: {
|
|
630
|
-
deliveryRegionId: '$[0]',
|
|
631
|
-
deliveryCarrier: '$[1].deliveryCarrier',
|
|
632
|
-
},
|
|
633
|
-
singleArgumentUnchanged: false,
|
|
634
|
-
}, ['deliveryRegionId', 'options']);
|
|
635
|
-
sideEffects?.onError?.(err);
|
|
636
|
-
throw transformedError;
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
exports.addDeliveryCarrier = addDeliveryCarrier;
|
|
640
|
-
/**
|
|
641
|
-
* Remove a delivery_carrier from a delivery region
|
|
642
|
-
* @param deliveryRegionId - Id of the DeliveryRegion
|
|
643
|
-
* @public
|
|
644
|
-
* @documentationMaturity preview
|
|
645
|
-
* @requiredField deliveryRegionId
|
|
646
|
-
* @requiredField options
|
|
647
|
-
* @requiredField options.appId
|
|
648
|
-
* @permissionId ECOM.DELIVERY_CARRIER_REMOVE
|
|
649
|
-
* @permissionScope Manage Stores - all permissions
|
|
650
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
651
|
-
* @permissionScope Manage Stores
|
|
652
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
653
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
654
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
655
|
-
* @permissionScope Manage eCommerce - all permissions
|
|
656
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
657
|
-
* @applicableIdentity APP
|
|
658
|
-
* @fqn wix.ecom.deliveryprofile.v1.DeliveryProfiles.RemoveDeliveryCarrier
|
|
659
|
-
*/
|
|
660
|
-
async function removeDeliveryCarrier(deliveryRegionId, options) {
|
|
661
|
-
// @ts-ignore
|
|
662
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
663
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
664
|
-
deliveryRegionId: deliveryRegionId,
|
|
665
|
-
appId: options?.appId,
|
|
666
|
-
});
|
|
667
|
-
const reqOpts = ambassadorWixEcomV1DeliveryProfile.removeDeliveryCarrier(payload);
|
|
668
|
-
sideEffects?.onSiteCall?.();
|
|
669
|
-
try {
|
|
670
|
-
const result = await httpClient.request(reqOpts);
|
|
671
|
-
sideEffects?.onSuccess?.(result);
|
|
672
|
-
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
673
|
-
}
|
|
674
|
-
catch (err) {
|
|
675
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
676
|
-
spreadPathsToArguments: {},
|
|
677
|
-
explicitPathsToArguments: {
|
|
678
|
-
deliveryRegionId: '$[0]',
|
|
679
|
-
appId: '$[1].appId',
|
|
680
|
-
},
|
|
681
|
-
singleArgumentUnchanged: false,
|
|
682
|
-
}, ['deliveryRegionId', 'options']);
|
|
683
|
-
sideEffects?.onError?.(err);
|
|
684
|
-
throw transformedError;
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
exports.removeDeliveryCarrier = removeDeliveryCarrier;
|
|
688
|
-
/**
|
|
689
|
-
* Update a delivery carrier in a delivery region
|
|
690
|
-
* @param deliveryRegionId - DeliveryRegion id
|
|
691
|
-
* @public
|
|
692
|
-
* @documentationMaturity preview
|
|
693
|
-
* @requiredField deliveryRegionId
|
|
694
|
-
* @requiredField options.deliveryCarrier.appId
|
|
695
|
-
* @permissionId ECOM.DELIVERY_CARRIER_UPDATE
|
|
696
|
-
* @permissionScope Manage Stores - all permissions
|
|
697
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
698
|
-
* @permissionScope Manage Stores
|
|
699
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
700
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
701
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
702
|
-
* @permissionScope Manage eCommerce - all permissions
|
|
703
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
704
|
-
* @applicableIdentity APP
|
|
705
|
-
* @fqn wix.ecom.deliveryprofile.v1.DeliveryProfiles.UpdateDeliveryCarrier
|
|
706
|
-
*/
|
|
707
|
-
async function updateDeliveryCarrier(deliveryRegionId, options) {
|
|
708
|
-
// @ts-ignore
|
|
709
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
710
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
711
|
-
deliveryRegionId: deliveryRegionId,
|
|
712
|
-
deliveryCarrier: options?.deliveryCarrier,
|
|
713
|
-
});
|
|
714
|
-
const reqOpts = ambassadorWixEcomV1DeliveryProfile.updateDeliveryCarrier(payload);
|
|
715
|
-
sideEffects?.onSiteCall?.();
|
|
716
|
-
try {
|
|
717
|
-
const result = await httpClient.request(reqOpts);
|
|
718
|
-
sideEffects?.onSuccess?.(result);
|
|
719
|
-
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
720
|
-
}
|
|
721
|
-
catch (err) {
|
|
722
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
723
|
-
spreadPathsToArguments: {},
|
|
724
|
-
explicitPathsToArguments: {
|
|
725
|
-
deliveryRegionId: '$[0]',
|
|
726
|
-
deliveryCarrier: '$[1].deliveryCarrier',
|
|
727
|
-
},
|
|
728
|
-
singleArgumentUnchanged: false,
|
|
729
|
-
}, ['deliveryRegionId', 'options']);
|
|
730
|
-
sideEffects?.onError?.(err);
|
|
731
|
-
throw transformedError;
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
exports.updateDeliveryCarrier = updateDeliveryCarrier;
|
|
735
|
-
/**
|
|
736
|
-
* List all installed delivery carriers in order to set their ids in delivery rules
|
|
737
|
-
* @public
|
|
738
|
-
* @documentationMaturity preview
|
|
739
|
-
* @permissionId ECOM.DELIVERY_CARRIER_DETAILS_READ
|
|
740
|
-
* @permissionScope Manage Stores - all permissions
|
|
741
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
742
|
-
* @permissionScope Manage Stores
|
|
743
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
744
|
-
* @permissionScope Read eCommerce - all read permissions
|
|
745
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
746
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
747
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
748
|
-
* @permissionScope Manage eCommerce - all permissions
|
|
749
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
750
|
-
* @applicableIdentity APP
|
|
751
|
-
* @fqn wix.ecom.deliveryprofile.v1.DeliveryProfiles.ListDeliveryCarrierDetails
|
|
752
|
-
* @deprecated
|
|
753
|
-
* @replacedBy ListInstalledDeliveryCarriers
|
|
754
|
-
* @targetRemovalDate 2025-04-01
|
|
755
|
-
*/
|
|
756
|
-
async function listDeliveryCarrierDetails() {
|
|
757
|
-
// @ts-ignore
|
|
758
|
-
const { httpClient, sideEffects } = arguments[0];
|
|
759
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({});
|
|
760
|
-
const reqOpts = ambassadorWixEcomV1DeliveryProfile.listDeliveryCarrierDetails(payload);
|
|
761
|
-
sideEffects?.onSiteCall?.();
|
|
762
|
-
try {
|
|
763
|
-
const result = await httpClient.request(reqOpts);
|
|
764
|
-
sideEffects?.onSuccess?.(result);
|
|
765
|
-
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
766
|
-
}
|
|
767
|
-
catch (err) {
|
|
768
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
769
|
-
spreadPathsToArguments: {},
|
|
770
|
-
explicitPathsToArguments: {},
|
|
771
|
-
singleArgumentUnchanged: false,
|
|
772
|
-
}, []);
|
|
773
|
-
sideEffects?.onError?.(err);
|
|
774
|
-
throw transformedError;
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
exports.listDeliveryCarrierDetails = listDeliveryCarrierDetails;
|
|
778
|
-
/** @public
|
|
779
|
-
* @documentationMaturity preview
|
|
780
|
-
* @permissionId ECOM.DELIVERY_CARRIER_READ
|
|
781
|
-
* @permissionScope Manage Stores - all permissions
|
|
782
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
783
|
-
* @permissionScope Manage Stores
|
|
784
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
785
|
-
* @permissionScope Read eCommerce - all read permissions
|
|
786
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
787
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
788
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
789
|
-
* @permissionScope Manage eCommerce - all permissions
|
|
790
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
791
|
-
* @applicableIdentity APP
|
|
792
|
-
* @fqn wix.ecom.deliveryprofile.v1.DeliveryProfiles.ListInstalledDeliveryCarriers
|
|
793
|
-
*/
|
|
794
|
-
async function listInstalledDeliveryCarriers() {
|
|
795
|
-
// @ts-ignore
|
|
796
|
-
const { httpClient, sideEffects } = arguments[0];
|
|
797
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({});
|
|
798
|
-
const reqOpts = ambassadorWixEcomV1DeliveryProfile.listInstalledDeliveryCarriers(payload);
|
|
799
|
-
sideEffects?.onSiteCall?.();
|
|
800
|
-
try {
|
|
801
|
-
const result = await httpClient.request(reqOpts);
|
|
802
|
-
sideEffects?.onSuccess?.(result);
|
|
803
|
-
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
804
|
-
}
|
|
805
|
-
catch (err) {
|
|
806
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
807
|
-
spreadPathsToArguments: {},
|
|
808
|
-
explicitPathsToArguments: {},
|
|
809
|
-
singleArgumentUnchanged: false,
|
|
810
|
-
}, []);
|
|
811
|
-
sideEffects?.onError?.(err);
|
|
812
|
-
throw transformedError;
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
exports.listInstalledDeliveryCarriers = listInstalledDeliveryCarriers;
|
|
816
|
-
/**
|
|
817
|
-
* Get delivery carrier settings for a delivery profile and delivery region.
|
|
818
|
-
* These are returned in a table format for the dashboard.
|
|
819
|
-
* @param deliveryProfileId - Delivery profile id.
|
|
820
|
-
* @public
|
|
821
|
-
* @documentationMaturity preview
|
|
822
|
-
* @requiredField deliveryProfileId
|
|
823
|
-
* @permissionId ECOM.DELIVERY_CARRIER_READ
|
|
824
|
-
* @permissionScope Manage Stores - all permissions
|
|
825
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
826
|
-
* @permissionScope Manage Stores
|
|
827
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
828
|
-
* @permissionScope Read eCommerce - all read permissions
|
|
829
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
830
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
831
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
832
|
-
* @permissionScope Manage eCommerce - all permissions
|
|
833
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
834
|
-
* @applicableIdentity APP
|
|
835
|
-
* @fqn wix.ecom.deliveryprofile.v1.DeliveryProfiles.ListDeliveryCarriers
|
|
836
|
-
*/
|
|
837
|
-
async function listDeliveryCarriers(deliveryProfileId, options) {
|
|
838
|
-
// @ts-ignore
|
|
839
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
840
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
841
|
-
deliveryProfileId: deliveryProfileId,
|
|
842
|
-
appIds: options?.appIds,
|
|
843
|
-
});
|
|
844
|
-
const reqOpts = ambassadorWixEcomV1DeliveryProfile.listDeliveryCarriers(payload);
|
|
845
|
-
sideEffects?.onSiteCall?.();
|
|
846
|
-
try {
|
|
847
|
-
const result = await httpClient.request(reqOpts);
|
|
848
|
-
sideEffects?.onSuccess?.(result);
|
|
849
|
-
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
850
|
-
}
|
|
851
|
-
catch (err) {
|
|
852
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
853
|
-
spreadPathsToArguments: {},
|
|
854
|
-
explicitPathsToArguments: {
|
|
855
|
-
deliveryProfileId: '$[0]',
|
|
856
|
-
appIds: '$[1].appIds',
|
|
857
|
-
},
|
|
858
|
-
singleArgumentUnchanged: false,
|
|
859
|
-
}, ['deliveryProfileId', 'options']);
|
|
860
|
-
sideEffects?.onError?.(err);
|
|
861
|
-
throw transformedError;
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
exports.listDeliveryCarriers = listDeliveryCarriers;
|
|
865
|
-
/**
|
|
866
|
-
* Update carrier's external active settings
|
|
867
|
-
* @param carrierId - Carrier id.
|
|
868
|
-
* @public
|
|
869
|
-
* @documentationMaturity preview
|
|
870
|
-
* @requiredField carrierId
|
|
871
|
-
* @requiredField options
|
|
872
|
-
* @requiredField options.active
|
|
873
|
-
* @requiredField options.rowId
|
|
874
|
-
* @permissionId ECOM.DELIVERY_CARRIER_UPDATE
|
|
875
|
-
* @permissionScope Manage Stores - all permissions
|
|
876
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
877
|
-
* @permissionScope Manage Stores
|
|
878
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
879
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
880
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
881
|
-
* @permissionScope Manage eCommerce - all permissions
|
|
882
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
883
|
-
* @applicableIdentity APP
|
|
884
|
-
* @fqn wix.ecom.deliveryprofile.v1.DeliveryProfiles.UpdateCarrierSettings
|
|
885
|
-
*/
|
|
886
|
-
async function updateCarrierSettings(carrierId, options) {
|
|
887
|
-
// @ts-ignore
|
|
888
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
889
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
890
|
-
carrierId: carrierId,
|
|
891
|
-
rowId: options?.rowId,
|
|
892
|
-
active: options?.active,
|
|
893
|
-
});
|
|
894
|
-
const reqOpts = ambassadorWixEcomV1DeliveryProfile.updateCarrierSettings(payload);
|
|
895
|
-
sideEffects?.onSiteCall?.();
|
|
896
|
-
try {
|
|
897
|
-
const result = await httpClient.request(reqOpts);
|
|
898
|
-
sideEffects?.onSuccess?.(result);
|
|
899
|
-
}
|
|
900
|
-
catch (err) {
|
|
901
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
902
|
-
spreadPathsToArguments: {},
|
|
903
|
-
explicitPathsToArguments: {
|
|
904
|
-
carrierId: '$[0]',
|
|
905
|
-
rowId: '$[1].rowId',
|
|
906
|
-
active: '$[1].active',
|
|
907
|
-
},
|
|
908
|
-
singleArgumentUnchanged: false,
|
|
909
|
-
}, ['carrierId', 'options']);
|
|
910
|
-
sideEffects?.onError?.(err);
|
|
911
|
-
throw transformedError;
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
exports.updateCarrierSettings = updateCarrierSettings;
|
|
915
|
-
/**
|
|
916
|
-
* Updates extended fields of a DeliveryProfile without incrementing revision
|
|
917
|
-
* @param _id - ID of the entity to update.
|
|
918
|
-
* @param namespace - Identifier for the app whose extended fields are being updated.
|
|
919
|
-
* @public
|
|
920
|
-
* @documentationMaturity preview
|
|
921
|
-
* @requiredField _id
|
|
922
|
-
* @requiredField namespace
|
|
923
|
-
* @requiredField options
|
|
924
|
-
* @requiredField options.namespaceData
|
|
925
|
-
* @permissionId ECOM.DELIVERY_PROFILE_UPDATE
|
|
926
|
-
* @permissionScope Manage Stores - all permissions
|
|
927
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
928
|
-
* @permissionScope Manage Stores
|
|
929
|
-
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
930
|
-
* @permissionScope Manage Restaurants - all permissions
|
|
931
|
-
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
932
|
-
* @permissionScope Manage eCommerce - all permissions
|
|
933
|
-
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
934
|
-
* @applicableIdentity APP
|
|
935
|
-
* @fqn wix.ecom.deliveryprofile.v1.DeliveryProfiles.UpdateExtendedFields
|
|
936
|
-
*/
|
|
937
|
-
async function updateExtendedFields(_id, namespace, options) {
|
|
938
|
-
// @ts-ignore
|
|
939
|
-
const { httpClient, sideEffects } = arguments[3];
|
|
940
|
-
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
941
|
-
id: _id,
|
|
942
|
-
namespace: namespace,
|
|
943
|
-
namespaceData: options?.namespaceData,
|
|
944
|
-
});
|
|
945
|
-
const reqOpts = ambassadorWixEcomV1DeliveryProfile.updateExtendedFields(payload);
|
|
946
|
-
sideEffects?.onSiteCall?.();
|
|
947
|
-
try {
|
|
948
|
-
const result = await httpClient.request(reqOpts);
|
|
949
|
-
sideEffects?.onSuccess?.(result);
|
|
950
|
-
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
951
|
-
}
|
|
952
|
-
catch (err) {
|
|
953
|
-
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
954
|
-
spreadPathsToArguments: {},
|
|
955
|
-
explicitPathsToArguments: {
|
|
956
|
-
id: '$[0]',
|
|
957
|
-
namespace: '$[1]',
|
|
958
|
-
namespaceData: '$[2].namespaceData',
|
|
959
|
-
},
|
|
960
|
-
singleArgumentUnchanged: false,
|
|
961
|
-
}, ['_id', 'namespace', 'options']);
|
|
962
|
-
sideEffects?.onError?.(err);
|
|
963
|
-
throw transformedError;
|
|
964
|
-
}
|
|
965
|
-
}
|
|
966
|
-
exports.updateExtendedFields = updateExtendedFields;
|
|
967
|
-
//# sourceMappingURL=ecom-v1-delivery-profile-delivery-profile.universal.js.map
|