@wix/auto_sdk_ecom_checkout-settings 1.0.73 → 1.0.74
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/schemas.js +321 -321
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/schemas.mjs +321 -321
- package/build/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
- package/build/internal/cjs/index.js +0 -561
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.js +0 -483
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.js +0 -402
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/schemas.js +0 -649
- package/build/internal/cjs/schemas.js.map +0 -1
- package/build/internal/es/index.mjs +0 -527
- package/build/internal/es/index.mjs.map +0 -1
- package/build/internal/es/index.typings.mjs +0 -450
- package/build/internal/es/index.typings.mjs.map +0 -1
- package/build/internal/es/meta.mjs +0 -366
- package/build/internal/es/meta.mjs.map +0 -1
- package/build/internal/es/schemas.mjs +0 -609
- package/build/internal/es/schemas.mjs.map +0 -1
|
@@ -1,561 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// index.ts
|
|
21
|
-
var index_exports = {};
|
|
22
|
-
__export(index_exports, {
|
|
23
|
-
Alignment: () => Alignment,
|
|
24
|
-
CheckoutBillingFields: () => CheckoutBillingFields,
|
|
25
|
-
DisplayType: () => DisplayType,
|
|
26
|
-
ExpressButtonsCornerRadius: () => ExpressButtonsCornerRadius,
|
|
27
|
-
InputFieldBackgroundStyle: () => InputFieldBackgroundStyle,
|
|
28
|
-
LogoSize: () => LogoSize,
|
|
29
|
-
TestMode: () => TestMode,
|
|
30
|
-
WebhookIdentityType: () => WebhookIdentityType,
|
|
31
|
-
getCheckoutSettings: () => getCheckoutSettings4,
|
|
32
|
-
onCheckoutSettingsUpdated: () => onCheckoutSettingsUpdated2,
|
|
33
|
-
updateCheckoutSettings: () => updateCheckoutSettings4
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(index_exports);
|
|
36
|
-
|
|
37
|
-
// src/ecom-v1-checkout-settings-checkout-settings.public.ts
|
|
38
|
-
var import_rename_all_nested_keys2 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
39
|
-
var import_image3 = require("@wix/sdk-runtime/transformations/image");
|
|
40
|
-
var import_timestamp3 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
41
|
-
var import_transform_paths3 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
42
|
-
var import_sdk_types = require("@wix/sdk-types");
|
|
43
|
-
|
|
44
|
-
// src/ecom-v1-checkout-settings-checkout-settings.universal.ts
|
|
45
|
-
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
46
|
-
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
47
|
-
|
|
48
|
-
// src/ecom-v1-checkout-settings-checkout-settings.http.ts
|
|
49
|
-
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
50
|
-
var import_float = require("@wix/sdk-runtime/transformations/float");
|
|
51
|
-
var import_float2 = require("@wix/sdk-runtime/transformations/float");
|
|
52
|
-
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
53
|
-
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
54
|
-
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
55
|
-
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
56
|
-
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
57
|
-
function resolveWixEcomCheckoutSettingsApiV1CheckoutSettingsServiceUrl(opts) {
|
|
58
|
-
const domainToMappings = {
|
|
59
|
-
"api._api_base_domain_": [
|
|
60
|
-
{
|
|
61
|
-
srcPath: "/checkout-settings",
|
|
62
|
-
destPath: ""
|
|
63
|
-
}
|
|
64
|
-
],
|
|
65
|
-
"manage._base_domain_": [
|
|
66
|
-
{
|
|
67
|
-
srcPath: "/ecom/v1/checkout-settings",
|
|
68
|
-
destPath: "/v1/checkout-settings"
|
|
69
|
-
}
|
|
70
|
-
],
|
|
71
|
-
"www.wixapis.com": [
|
|
72
|
-
{
|
|
73
|
-
srcPath: "/ecom/v1/checkout-settings",
|
|
74
|
-
destPath: "/v1/checkout-settings"
|
|
75
|
-
}
|
|
76
|
-
],
|
|
77
|
-
"*.dev.wix-code.com": [
|
|
78
|
-
{
|
|
79
|
-
srcPath: "/ecom/v1/checkout-settings",
|
|
80
|
-
destPath: "/v1/checkout-settings"
|
|
81
|
-
}
|
|
82
|
-
],
|
|
83
|
-
_: [
|
|
84
|
-
{
|
|
85
|
-
srcPath: "/ecom/v1/checkout-settings",
|
|
86
|
-
destPath: "/v1/checkout-settings"
|
|
87
|
-
}
|
|
88
|
-
]
|
|
89
|
-
};
|
|
90
|
-
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
91
|
-
}
|
|
92
|
-
var PACKAGE_NAME = "@wix/auto_sdk_ecom_checkout-settings";
|
|
93
|
-
function getCheckoutSettings(payload) {
|
|
94
|
-
function __getCheckoutSettings({ host }) {
|
|
95
|
-
const metadata = {
|
|
96
|
-
entityFqdn: "wix.ecom.v1.checkout_settings",
|
|
97
|
-
method: "GET",
|
|
98
|
-
methodFqn: "wix.ecom.checkout_settings.api.v1.CheckoutSettingsService.GetCheckoutSettings",
|
|
99
|
-
packageName: PACKAGE_NAME,
|
|
100
|
-
migrationOptions: {
|
|
101
|
-
optInTransformResponse: true
|
|
102
|
-
},
|
|
103
|
-
url: resolveWixEcomCheckoutSettingsApiV1CheckoutSettingsServiceUrl({
|
|
104
|
-
protoPath: "/v1/checkout-settings",
|
|
105
|
-
data: payload,
|
|
106
|
-
host
|
|
107
|
-
}),
|
|
108
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
109
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
110
|
-
{
|
|
111
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
112
|
-
paths: [
|
|
113
|
-
{ path: "checkoutSettings.createdDate" },
|
|
114
|
-
{ path: "checkoutSettings.updatedDate" },
|
|
115
|
-
{
|
|
116
|
-
path: "checkoutSettings.checkoutBrand.header.logo.image.urlExpirationDate"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
path: "checkoutSettings.checkoutBrand.header.backgroundFill.image.urlExpirationDate"
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
path: "checkoutSettings.checkoutBrand.mainSection.formBackgroundFill.image.urlExpirationDate"
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
path: "checkoutSettings.checkoutBrand.mainSection.summaryBackgroundFill.image.urlExpirationDate"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
path: "checkoutSettings.checkoutBrand.footer.backgroundFill.image.urlExpirationDate"
|
|
129
|
-
}
|
|
130
|
-
]
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
134
|
-
paths: [
|
|
135
|
-
{
|
|
136
|
-
path: "checkoutSettings.checkoutBrand.header.logo.image.focalPoint.x"
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
path: "checkoutSettings.checkoutBrand.header.logo.image.focalPoint.y"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
path: "checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.x"
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
path: "checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.y"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
path: "checkoutSettings.checkoutBrand.mainSection.formBackgroundFill.image.focalPoint.x"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
path: "checkoutSettings.checkoutBrand.mainSection.formBackgroundFill.image.focalPoint.y"
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
path: "checkoutSettings.checkoutBrand.mainSection.summaryBackgroundFill.image.focalPoint.x"
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
path: "checkoutSettings.checkoutBrand.mainSection.summaryBackgroundFill.image.focalPoint.y"
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
path: "checkoutSettings.checkoutBrand.footer.backgroundFill.image.focalPoint.x"
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
path: "checkoutSettings.checkoutBrand.footer.backgroundFill.image.focalPoint.y"
|
|
164
|
-
}
|
|
165
|
-
]
|
|
166
|
-
}
|
|
167
|
-
])
|
|
168
|
-
};
|
|
169
|
-
return metadata;
|
|
170
|
-
}
|
|
171
|
-
return __getCheckoutSettings;
|
|
172
|
-
}
|
|
173
|
-
function updateCheckoutSettings(payload) {
|
|
174
|
-
function __updateCheckoutSettings({ host }) {
|
|
175
|
-
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
176
|
-
{
|
|
177
|
-
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
178
|
-
paths: [{ path: "fieldMask" }]
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
182
|
-
paths: [
|
|
183
|
-
{ path: "checkoutSettings.createdDate" },
|
|
184
|
-
{ path: "checkoutSettings.updatedDate" },
|
|
185
|
-
{
|
|
186
|
-
path: "checkoutSettings.checkoutBrand.header.logo.image.urlExpirationDate"
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
path: "checkoutSettings.checkoutBrand.header.backgroundFill.image.urlExpirationDate"
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
path: "checkoutSettings.checkoutBrand.mainSection.formBackgroundFill.image.urlExpirationDate"
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
path: "checkoutSettings.checkoutBrand.mainSection.summaryBackgroundFill.image.urlExpirationDate"
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
path: "checkoutSettings.checkoutBrand.footer.backgroundFill.image.urlExpirationDate"
|
|
199
|
-
}
|
|
200
|
-
]
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
204
|
-
paths: [
|
|
205
|
-
{
|
|
206
|
-
path: "checkoutSettings.checkoutBrand.header.logo.image.focalPoint.x"
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
path: "checkoutSettings.checkoutBrand.header.logo.image.focalPoint.y"
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
path: "checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.x"
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
path: "checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.y"
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
path: "checkoutSettings.checkoutBrand.mainSection.formBackgroundFill.image.focalPoint.x"
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
path: "checkoutSettings.checkoutBrand.mainSection.formBackgroundFill.image.focalPoint.y"
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
path: "checkoutSettings.checkoutBrand.mainSection.summaryBackgroundFill.image.focalPoint.x"
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
path: "checkoutSettings.checkoutBrand.mainSection.summaryBackgroundFill.image.focalPoint.y"
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
path: "checkoutSettings.checkoutBrand.footer.backgroundFill.image.focalPoint.x"
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
path: "checkoutSettings.checkoutBrand.footer.backgroundFill.image.focalPoint.y"
|
|
234
|
-
}
|
|
235
|
-
]
|
|
236
|
-
}
|
|
237
|
-
]);
|
|
238
|
-
const metadata = {
|
|
239
|
-
entityFqdn: "wix.ecom.v1.checkout_settings",
|
|
240
|
-
method: "PATCH",
|
|
241
|
-
methodFqn: "wix.ecom.checkout_settings.api.v1.CheckoutSettingsService.UpdateCheckoutSettings",
|
|
242
|
-
packageName: PACKAGE_NAME,
|
|
243
|
-
migrationOptions: {
|
|
244
|
-
optInTransformResponse: true
|
|
245
|
-
},
|
|
246
|
-
url: resolveWixEcomCheckoutSettingsApiV1CheckoutSettingsServiceUrl({
|
|
247
|
-
protoPath: "/v1/checkout-settings",
|
|
248
|
-
data: serializedData,
|
|
249
|
-
host
|
|
250
|
-
}),
|
|
251
|
-
data: serializedData,
|
|
252
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
253
|
-
{
|
|
254
|
-
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
255
|
-
paths: [
|
|
256
|
-
{ path: "checkoutSettings.createdDate" },
|
|
257
|
-
{ path: "checkoutSettings.updatedDate" },
|
|
258
|
-
{
|
|
259
|
-
path: "checkoutSettings.checkoutBrand.header.logo.image.urlExpirationDate"
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
path: "checkoutSettings.checkoutBrand.header.backgroundFill.image.urlExpirationDate"
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
path: "checkoutSettings.checkoutBrand.mainSection.formBackgroundFill.image.urlExpirationDate"
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
path: "checkoutSettings.checkoutBrand.mainSection.summaryBackgroundFill.image.urlExpirationDate"
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
path: "checkoutSettings.checkoutBrand.footer.backgroundFill.image.urlExpirationDate"
|
|
272
|
-
}
|
|
273
|
-
]
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
277
|
-
paths: [
|
|
278
|
-
{
|
|
279
|
-
path: "checkoutSettings.checkoutBrand.header.logo.image.focalPoint.x"
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
path: "checkoutSettings.checkoutBrand.header.logo.image.focalPoint.y"
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
path: "checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.x"
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
path: "checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.y"
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
path: "checkoutSettings.checkoutBrand.mainSection.formBackgroundFill.image.focalPoint.x"
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
path: "checkoutSettings.checkoutBrand.mainSection.formBackgroundFill.image.focalPoint.y"
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
path: "checkoutSettings.checkoutBrand.mainSection.summaryBackgroundFill.image.focalPoint.x"
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
path: "checkoutSettings.checkoutBrand.mainSection.summaryBackgroundFill.image.focalPoint.y"
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
path: "checkoutSettings.checkoutBrand.footer.backgroundFill.image.focalPoint.x"
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
path: "checkoutSettings.checkoutBrand.footer.backgroundFill.image.focalPoint.y"
|
|
307
|
-
}
|
|
308
|
-
]
|
|
309
|
-
}
|
|
310
|
-
])
|
|
311
|
-
};
|
|
312
|
-
return metadata;
|
|
313
|
-
}
|
|
314
|
-
return __updateCheckoutSettings;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
// src/ecom-v1-checkout-settings-checkout-settings.universal.ts
|
|
318
|
-
var import_image = require("@wix/sdk-runtime/transformations/image");
|
|
319
|
-
var import_image2 = require("@wix/sdk-runtime/transformations/image");
|
|
320
|
-
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
321
|
-
var TestMode = /* @__PURE__ */ ((TestMode2) => {
|
|
322
|
-
TestMode2["DISABLED"] = "DISABLED";
|
|
323
|
-
TestMode2["ENABLED_TO_ALL"] = "ENABLED_TO_ALL";
|
|
324
|
-
TestMode2["ENABLED_TO_OWNER_AND_COLLABORATORS"] = "ENABLED_TO_OWNER_AND_COLLABORATORS";
|
|
325
|
-
return TestMode2;
|
|
326
|
-
})(TestMode || {});
|
|
327
|
-
var LogoSize = /* @__PURE__ */ ((LogoSize2) => {
|
|
328
|
-
LogoSize2["SMALL"] = "SMALL";
|
|
329
|
-
LogoSize2["MEDIUM"] = "MEDIUM";
|
|
330
|
-
LogoSize2["LARGE"] = "LARGE";
|
|
331
|
-
return LogoSize2;
|
|
332
|
-
})(LogoSize || {});
|
|
333
|
-
var Alignment = /* @__PURE__ */ ((Alignment2) => {
|
|
334
|
-
Alignment2["SIDE"] = "SIDE";
|
|
335
|
-
Alignment2["CENTER"] = "CENTER";
|
|
336
|
-
return Alignment2;
|
|
337
|
-
})(Alignment || {});
|
|
338
|
-
var DisplayType = /* @__PURE__ */ ((DisplayType2) => {
|
|
339
|
-
DisplayType2["TEXT"] = "TEXT";
|
|
340
|
-
DisplayType2["ICON"] = "ICON";
|
|
341
|
-
return DisplayType2;
|
|
342
|
-
})(DisplayType || {});
|
|
343
|
-
var ExpressButtonsCornerRadius = /* @__PURE__ */ ((ExpressButtonsCornerRadius2) => {
|
|
344
|
-
ExpressButtonsCornerRadius2["RECTANGLE"] = "RECTANGLE";
|
|
345
|
-
ExpressButtonsCornerRadius2["PILL"] = "PILL";
|
|
346
|
-
return ExpressButtonsCornerRadius2;
|
|
347
|
-
})(ExpressButtonsCornerRadius || {});
|
|
348
|
-
var InputFieldBackgroundStyle = /* @__PURE__ */ ((InputFieldBackgroundStyle2) => {
|
|
349
|
-
InputFieldBackgroundStyle2["WHITE"] = "WHITE";
|
|
350
|
-
InputFieldBackgroundStyle2["TRANSPARENT"] = "TRANSPARENT";
|
|
351
|
-
return InputFieldBackgroundStyle2;
|
|
352
|
-
})(InputFieldBackgroundStyle || {});
|
|
353
|
-
var CheckoutBillingFields = /* @__PURE__ */ ((CheckoutBillingFields2) => {
|
|
354
|
-
CheckoutBillingFields2["All_FIELDS"] = "All_FIELDS";
|
|
355
|
-
CheckoutBillingFields2["MINIMUM_REQUIRED_FIELDS"] = "MINIMUM_REQUIRED_FIELDS";
|
|
356
|
-
return CheckoutBillingFields2;
|
|
357
|
-
})(CheckoutBillingFields || {});
|
|
358
|
-
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
359
|
-
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
360
|
-
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
361
|
-
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
362
|
-
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
363
|
-
WebhookIdentityType2["APP"] = "APP";
|
|
364
|
-
return WebhookIdentityType2;
|
|
365
|
-
})(WebhookIdentityType || {});
|
|
366
|
-
async function getCheckoutSettings2() {
|
|
367
|
-
const { httpClient, sideEffects } = arguments[0];
|
|
368
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
|
|
369
|
-
const reqOpts = getCheckoutSettings(payload);
|
|
370
|
-
sideEffects?.onSiteCall?.();
|
|
371
|
-
try {
|
|
372
|
-
const result = await httpClient.request(reqOpts);
|
|
373
|
-
sideEffects?.onSuccess?.(result);
|
|
374
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
375
|
-
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
376
|
-
{
|
|
377
|
-
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
378
|
-
paths: [
|
|
379
|
-
{ path: "checkoutSettings.checkoutBrand.header.logo.image" },
|
|
380
|
-
{
|
|
381
|
-
path: "checkoutSettings.checkoutBrand.header.backgroundFill.image"
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
path: "checkoutSettings.checkoutBrand.mainSection.formBackgroundFill.image"
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
path: "checkoutSettings.checkoutBrand.mainSection.summaryBackgroundFill.image"
|
|
388
|
-
},
|
|
389
|
-
{
|
|
390
|
-
path: "checkoutSettings.checkoutBrand.footer.backgroundFill.image"
|
|
391
|
-
}
|
|
392
|
-
]
|
|
393
|
-
}
|
|
394
|
-
])
|
|
395
|
-
);
|
|
396
|
-
} catch (err) {
|
|
397
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
398
|
-
err,
|
|
399
|
-
{
|
|
400
|
-
spreadPathsToArguments: {},
|
|
401
|
-
explicitPathsToArguments: {},
|
|
402
|
-
singleArgumentUnchanged: false
|
|
403
|
-
},
|
|
404
|
-
[]
|
|
405
|
-
);
|
|
406
|
-
sideEffects?.onError?.(err);
|
|
407
|
-
throw transformedError;
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
async function updateCheckoutSettings2(checkoutSettings) {
|
|
411
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
412
|
-
const payload = (0, import_transform_paths2.transformPaths)(
|
|
413
|
-
(0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
414
|
-
checkoutSettings
|
|
415
|
-
}),
|
|
416
|
-
[
|
|
417
|
-
{
|
|
418
|
-
transformFn: import_image.transformSDKImageToRESTImage,
|
|
419
|
-
paths: [
|
|
420
|
-
{ path: "checkoutSettings.checkoutBrand.header.logo.image" },
|
|
421
|
-
{
|
|
422
|
-
path: "checkoutSettings.checkoutBrand.header.backgroundFill.image"
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
path: "checkoutSettings.checkoutBrand.mainSection.formBackgroundFill.image"
|
|
426
|
-
},
|
|
427
|
-
{
|
|
428
|
-
path: "checkoutSettings.checkoutBrand.mainSection.summaryBackgroundFill.image"
|
|
429
|
-
},
|
|
430
|
-
{
|
|
431
|
-
path: "checkoutSettings.checkoutBrand.footer.backgroundFill.image"
|
|
432
|
-
}
|
|
433
|
-
]
|
|
434
|
-
}
|
|
435
|
-
]
|
|
436
|
-
);
|
|
437
|
-
const reqOpts = updateCheckoutSettings(payload);
|
|
438
|
-
sideEffects?.onSiteCall?.();
|
|
439
|
-
try {
|
|
440
|
-
const result = await httpClient.request(reqOpts);
|
|
441
|
-
sideEffects?.onSuccess?.(result);
|
|
442
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
443
|
-
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
444
|
-
{
|
|
445
|
-
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
446
|
-
paths: [
|
|
447
|
-
{ path: "checkoutSettings.checkoutBrand.header.logo.image" },
|
|
448
|
-
{
|
|
449
|
-
path: "checkoutSettings.checkoutBrand.header.backgroundFill.image"
|
|
450
|
-
},
|
|
451
|
-
{
|
|
452
|
-
path: "checkoutSettings.checkoutBrand.mainSection.formBackgroundFill.image"
|
|
453
|
-
},
|
|
454
|
-
{
|
|
455
|
-
path: "checkoutSettings.checkoutBrand.mainSection.summaryBackgroundFill.image"
|
|
456
|
-
},
|
|
457
|
-
{
|
|
458
|
-
path: "checkoutSettings.checkoutBrand.footer.backgroundFill.image"
|
|
459
|
-
}
|
|
460
|
-
]
|
|
461
|
-
}
|
|
462
|
-
])
|
|
463
|
-
);
|
|
464
|
-
} catch (err) {
|
|
465
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
466
|
-
err,
|
|
467
|
-
{
|
|
468
|
-
spreadPathsToArguments: {},
|
|
469
|
-
explicitPathsToArguments: { checkoutSettings: "$[0]" },
|
|
470
|
-
singleArgumentUnchanged: false
|
|
471
|
-
},
|
|
472
|
-
["checkoutSettings"]
|
|
473
|
-
);
|
|
474
|
-
sideEffects?.onError?.(err);
|
|
475
|
-
throw transformedError;
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
// src/ecom-v1-checkout-settings-checkout-settings.public.ts
|
|
480
|
-
function getCheckoutSettings3(httpClient) {
|
|
481
|
-
return () => getCheckoutSettings2(
|
|
482
|
-
// @ts-ignore
|
|
483
|
-
{ httpClient }
|
|
484
|
-
);
|
|
485
|
-
}
|
|
486
|
-
function updateCheckoutSettings3(httpClient) {
|
|
487
|
-
return (checkoutSettings) => updateCheckoutSettings2(
|
|
488
|
-
checkoutSettings,
|
|
489
|
-
// @ts-ignore
|
|
490
|
-
{ httpClient }
|
|
491
|
-
);
|
|
492
|
-
}
|
|
493
|
-
var onCheckoutSettingsUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDefinition)(
|
|
494
|
-
"wix.ecom.v1.checkout_settings_updated",
|
|
495
|
-
true,
|
|
496
|
-
(event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
|
|
497
|
-
(0, import_transform_paths3.transformPaths)(event, [
|
|
498
|
-
{
|
|
499
|
-
transformFn: import_timestamp3.transformRESTTimestampToSDKTimestamp,
|
|
500
|
-
paths: [
|
|
501
|
-
{ path: "entity.createdDate" },
|
|
502
|
-
{ path: "entity.updatedDate" },
|
|
503
|
-
{ path: "metadata.eventTime" },
|
|
504
|
-
{ path: "modifiedFields.createdDate" },
|
|
505
|
-
{ path: "modifiedFields.updatedDate" }
|
|
506
|
-
]
|
|
507
|
-
},
|
|
508
|
-
{
|
|
509
|
-
transformFn: import_image3.transformRESTImageToSDKImage,
|
|
510
|
-
paths: [
|
|
511
|
-
{ path: "entity.checkoutBrand.header.logo.image" },
|
|
512
|
-
{ path: "entity.checkoutBrand.header.backgroundFill.image" },
|
|
513
|
-
{
|
|
514
|
-
path: "entity.checkoutBrand.mainSection.formBackgroundFill.image"
|
|
515
|
-
},
|
|
516
|
-
{
|
|
517
|
-
path: "entity.checkoutBrand.mainSection.summaryBackgroundFill.image"
|
|
518
|
-
},
|
|
519
|
-
{ path: "entity.checkoutBrand.footer.backgroundFill.image" },
|
|
520
|
-
{ path: "modifiedFields.checkoutBrand.header.logo.image" },
|
|
521
|
-
{
|
|
522
|
-
path: "modifiedFields.checkoutBrand.header.backgroundFill.image"
|
|
523
|
-
},
|
|
524
|
-
{
|
|
525
|
-
path: "modifiedFields.checkoutBrand.mainSection.formBackgroundFill.image"
|
|
526
|
-
},
|
|
527
|
-
{
|
|
528
|
-
path: "modifiedFields.checkoutBrand.mainSection.summaryBackgroundFill.image"
|
|
529
|
-
},
|
|
530
|
-
{
|
|
531
|
-
path: "modifiedFields.checkoutBrand.footer.backgroundFill.image"
|
|
532
|
-
}
|
|
533
|
-
]
|
|
534
|
-
}
|
|
535
|
-
])
|
|
536
|
-
)
|
|
537
|
-
)();
|
|
538
|
-
|
|
539
|
-
// src/ecom-v1-checkout-settings-checkout-settings.context.ts
|
|
540
|
-
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
541
|
-
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
542
|
-
var getCheckoutSettings4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getCheckoutSettings3);
|
|
543
|
-
var updateCheckoutSettings4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateCheckoutSettings3);
|
|
544
|
-
var onCheckoutSettingsUpdated2 = /* @__PURE__ */ (0, import_event_definition_modules.createEventModule)(
|
|
545
|
-
onCheckoutSettingsUpdated
|
|
546
|
-
);
|
|
547
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
548
|
-
0 && (module.exports = {
|
|
549
|
-
Alignment,
|
|
550
|
-
CheckoutBillingFields,
|
|
551
|
-
DisplayType,
|
|
552
|
-
ExpressButtonsCornerRadius,
|
|
553
|
-
InputFieldBackgroundStyle,
|
|
554
|
-
LogoSize,
|
|
555
|
-
TestMode,
|
|
556
|
-
WebhookIdentityType,
|
|
557
|
-
getCheckoutSettings,
|
|
558
|
-
onCheckoutSettingsUpdated,
|
|
559
|
-
updateCheckoutSettings
|
|
560
|
-
});
|
|
561
|
-
//# sourceMappingURL=index.js.map
|