@wix/auto_sdk_ecom_checkout-settings 1.0.75 → 1.0.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ interface GetCheckoutSettingsSignature {
7
7
  /**
8
8
  * Retrieves the site's checkout settings.
9
9
  */
10
- (): Promise<NonNullablePaths<GetCheckoutSettingsResponse, `checkoutSettings.checkoutBrand.header.logo.size` | `checkoutSettings.checkoutBrand.header.alignment` | `checkoutSettings.checkoutBrand.header.continueShopping.displayType` | `checkoutSettings.checkoutBrand.mainSection.expressButtonsCornerRadius` | `checkoutSettings.checkoutBillingFields`, 6>>;
10
+ (): Promise<NonNullablePaths<GetCheckoutSettingsResponse, `checkoutSettings.checkoutBrand.header.logo.size` | `checkoutSettings.checkoutBrand.header.alignment` | `checkoutSettings.checkoutBrand.header.continueShopping.displayType` | `checkoutSettings.checkoutBrand.mainSection.expressButtonsCornerRadius` | `checkoutSettings.checkoutBillingFields`, 4>>;
11
11
  }
12
12
  declare function updateCheckoutSettings$1(httpClient: HttpClient): UpdateCheckoutSettingsSignature;
13
13
  interface UpdateCheckoutSettingsSignature {
@@ -15,7 +15,7 @@ interface UpdateCheckoutSettingsSignature {
15
15
  * Updates the site's checkout settings.
16
16
  * @param - Checkout settings to update.
17
17
  */
18
- (checkoutSettings: CheckoutSettings): Promise<NonNullablePaths<UpdateCheckoutSettingsResponse, `checkoutSettings.checkoutBrand.header.logo.size` | `checkoutSettings.checkoutBrand.header.alignment` | `checkoutSettings.checkoutBrand.header.continueShopping.displayType` | `checkoutSettings.checkoutBrand.mainSection.expressButtonsCornerRadius` | `checkoutSettings.checkoutBillingFields`, 6>>;
18
+ (checkoutSettings: CheckoutSettings): Promise<NonNullablePaths<UpdateCheckoutSettingsResponse, `checkoutSettings.checkoutBrand.header.logo.size` | `checkoutSettings.checkoutBrand.header.alignment` | `checkoutSettings.checkoutBrand.header.continueShopping.displayType` | `checkoutSettings.checkoutBrand.mainSection.expressButtonsCornerRadius` | `checkoutSettings.checkoutBillingFields`, 4>>;
19
19
  }
20
20
  declare const onCheckoutSettingsUpdated$1: EventDefinition<CheckoutSettingsUpdatedEnvelope, "wix.ecom.v1.checkout_settings_updated">;
21
21
 
@@ -54,6 +54,54 @@ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
54
54
  var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
55
55
  var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
56
56
  var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
57
+ var TRANSFORM_PATHS_0 = [
58
+ { path: "checkoutSettings.createdDate" },
59
+ { path: "checkoutSettings.updatedDate" },
60
+ {
61
+ path: "checkoutSettings.checkoutBrand.header.logo.image.urlExpirationDate"
62
+ },
63
+ {
64
+ path: "checkoutSettings.checkoutBrand.header.backgroundFill.image.urlExpirationDate"
65
+ },
66
+ {
67
+ path: "checkoutSettings.checkoutBrand.mainSection.formBackgroundFill.image.urlExpirationDate"
68
+ },
69
+ {
70
+ path: "checkoutSettings.checkoutBrand.mainSection.summaryBackgroundFill.image.urlExpirationDate"
71
+ },
72
+ {
73
+ path: "checkoutSettings.checkoutBrand.footer.backgroundFill.image.urlExpirationDate"
74
+ }
75
+ ];
76
+ var TRANSFORM_PATHS_1 = [
77
+ { path: "checkoutSettings.checkoutBrand.header.logo.image.focalPoint.x" },
78
+ { path: "checkoutSettings.checkoutBrand.header.logo.image.focalPoint.y" },
79
+ {
80
+ path: "checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.x"
81
+ },
82
+ {
83
+ path: "checkoutSettings.checkoutBrand.header.backgroundFill.image.focalPoint.y"
84
+ },
85
+ {
86
+ path: "checkoutSettings.checkoutBrand.mainSection.formBackgroundFill.image.focalPoint.x"
87
+ },
88
+ {
89
+ path: "checkoutSettings.checkoutBrand.mainSection.formBackgroundFill.image.focalPoint.y"
90
+ },
91
+ {
92
+ path: "checkoutSettings.checkoutBrand.mainSection.summaryBackgroundFill.image.focalPoint.x"
93
+ },
94
+ {
95
+ path: "checkoutSettings.checkoutBrand.mainSection.summaryBackgroundFill.image.focalPoint.y"
96
+ },
97
+ {
98
+ path: "checkoutSettings.checkoutBrand.footer.backgroundFill.image.focalPoint.x"
99
+ },
100
+ {
101
+ path: "checkoutSettings.checkoutBrand.footer.backgroundFill.image.focalPoint.y"
102
+ }
103
+ ];
104
+ var TRANSFORM_PATHS_2 = [{ path: "fieldMask" }];
57
105
  function resolveWixEcomCheckoutSettingsApiV1CheckoutSettingsServiceUrl(opts) {
58
106
  const domainToMappings = {
59
107
  "api._api_base_domain_": [
@@ -109,60 +157,11 @@ function getCheckoutSettings(payload) {
109
157
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
110
158
  {
111
159
  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
- ]
160
+ paths: TRANSFORM_PATHS_0
131
161
  },
132
162
  {
133
163
  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
- ]
164
+ paths: TRANSFORM_PATHS_1
166
165
  }
167
166
  ])
168
167
  };
@@ -175,64 +174,15 @@ function updateCheckoutSettings(payload) {
175
174
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
176
175
  {
177
176
  transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
178
- paths: [{ path: "fieldMask" }]
177
+ paths: TRANSFORM_PATHS_2
179
178
  },
180
179
  {
181
180
  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
- ]
181
+ paths: TRANSFORM_PATHS_0
201
182
  },
202
183
  {
203
184
  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
- ]
185
+ paths: TRANSFORM_PATHS_1
236
186
  }
237
187
  ]);
238
188
  const metadata = {
@@ -252,60 +202,11 @@ function updateCheckoutSettings(payload) {
252
202
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
253
203
  {
254
204
  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
- ]
205
+ paths: TRANSFORM_PATHS_0
274
206
  },
275
207
  {
276
208
  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
- ]
209
+ paths: TRANSFORM_PATHS_1
309
210
  }
310
211
  ])
311
212
  };
@@ -318,6 +219,17 @@ function updateCheckoutSettings(payload) {
318
219
  var import_image = require("@wix/sdk-runtime/transformations/image");
319
220
  var import_image2 = require("@wix/sdk-runtime/transformations/image");
320
221
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
222
+ var TRANSFORM_PATHS_02 = [
223
+ { path: "checkoutSettings.checkoutBrand.header.logo.image" },
224
+ { path: "checkoutSettings.checkoutBrand.header.backgroundFill.image" },
225
+ {
226
+ path: "checkoutSettings.checkoutBrand.mainSection.formBackgroundFill.image"
227
+ },
228
+ {
229
+ path: "checkoutSettings.checkoutBrand.mainSection.summaryBackgroundFill.image"
230
+ },
231
+ { path: "checkoutSettings.checkoutBrand.footer.backgroundFill.image" }
232
+ ];
321
233
  var TestMode = /* @__PURE__ */ ((TestMode2) => {
322
234
  TestMode2["DISABLED"] = "DISABLED";
323
235
  TestMode2["ENABLED_TO_ALL"] = "ENABLED_TO_ALL";
@@ -375,21 +287,7 @@ async function getCheckoutSettings2() {
375
287
  (0, import_transform_paths2.transformPaths)(result.data, [
376
288
  {
377
289
  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
- ]
290
+ paths: TRANSFORM_PATHS_02
393
291
  }
394
292
  ])
395
293
  );
@@ -416,21 +314,7 @@ async function updateCheckoutSettings2(checkoutSettings) {
416
314
  [
417
315
  {
418
316
  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
- ]
317
+ paths: TRANSFORM_PATHS_02
434
318
  }
435
319
  ]
436
320
  );
@@ -443,21 +327,7 @@ async function updateCheckoutSettings2(checkoutSettings) {
443
327
  (0, import_transform_paths2.transformPaths)(result.data, [
444
328
  {
445
329
  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
- ]
330
+ paths: TRANSFORM_PATHS_02
461
331
  }
462
332
  ])
463
333
  );
@@ -477,6 +347,27 @@ async function updateCheckoutSettings2(checkoutSettings) {
477
347
  }
478
348
 
479
349
  // src/ecom-v1-checkout-settings-checkout-settings.public.ts
350
+ var TRANSFORM_PATHS_03 = [
351
+ { path: "entity.createdDate" },
352
+ { path: "entity.updatedDate" },
353
+ { path: "metadata.eventTime" },
354
+ { path: "modifiedFields.createdDate" },
355
+ { path: "modifiedFields.updatedDate" }
356
+ ];
357
+ var TRANSFORM_PATHS_12 = [
358
+ { path: "entity.checkoutBrand.header.logo.image" },
359
+ { path: "entity.checkoutBrand.header.backgroundFill.image" },
360
+ { path: "entity.checkoutBrand.mainSection.formBackgroundFill.image" },
361
+ { path: "entity.checkoutBrand.mainSection.summaryBackgroundFill.image" },
362
+ { path: "entity.checkoutBrand.footer.backgroundFill.image" },
363
+ { path: "modifiedFields.checkoutBrand.header.logo.image" },
364
+ { path: "modifiedFields.checkoutBrand.header.backgroundFill.image" },
365
+ { path: "modifiedFields.checkoutBrand.mainSection.formBackgroundFill.image" },
366
+ {
367
+ path: "modifiedFields.checkoutBrand.mainSection.summaryBackgroundFill.image"
368
+ },
369
+ { path: "modifiedFields.checkoutBrand.footer.backgroundFill.image" }
370
+ ];
480
371
  function getCheckoutSettings3(httpClient) {
481
372
  return () => getCheckoutSettings2(
482
373
  // @ts-ignore
@@ -497,40 +388,11 @@ var onCheckoutSettingsUpdated = /* @__PURE__ */ (0, import_sdk_types.EventDefini
497
388
  (0, import_transform_paths3.transformPaths)(event, [
498
389
  {
499
390
  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
- ]
391
+ paths: TRANSFORM_PATHS_03
507
392
  },
508
393
  {
509
394
  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
- ]
395
+ paths: TRANSFORM_PATHS_12
534
396
  }
535
397
  ])
536
398
  )