@wix/auto_sdk_ecom_delivery-profile 1.0.25 → 1.0.27

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