@commercetools/checkout-sdk 1.0.0

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 (58) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +172 -0
  3. package/dist/commercetools-checkout-sdk.browser.cjs.js +499 -0
  4. package/dist/commercetools-checkout-sdk.browser.esm.js +481 -0
  5. package/dist/commercetools-checkout-sdk.cjs.d.ts +2 -0
  6. package/dist/commercetools-checkout-sdk.cjs.dev.js +499 -0
  7. package/dist/commercetools-checkout-sdk.cjs.js +7 -0
  8. package/dist/commercetools-checkout-sdk.cjs.prod.js +499 -0
  9. package/dist/commercetools-checkout-sdk.esm.js +481 -0
  10. package/dist/declarations/src/ctp/ctp-client.d.ts +3 -0
  11. package/dist/declarations/src/ctp/ctp-client.d.ts.map +1 -0
  12. package/dist/declarations/src/generated/client/api-root.d.ts +19 -0
  13. package/dist/declarations/src/generated/client/api-root.d.ts.map +1 -0
  14. package/dist/declarations/src/generated/client/by-project-key-request-builder.d.ts +29 -0
  15. package/dist/declarations/src/generated/client/by-project-key-request-builder.d.ts.map +1 -0
  16. package/dist/declarations/src/generated/client/payment-intents/by-project-key-payment-intents-by-payment-id-request-builder.d.ts +42 -0
  17. package/dist/declarations/src/generated/client/payment-intents/by-project-key-payment-intents-by-payment-id-request-builder.d.ts.map +1 -0
  18. package/dist/declarations/src/generated/client/payment-intents/by-project-key-payment-intents-request-builder.d.ts +29 -0
  19. package/dist/declarations/src/generated/client/payment-intents/by-project-key-payment-intents-request-builder.d.ts.map +1 -0
  20. package/dist/declarations/src/generated/client/transactions/by-project-key-transactions-by-id-request-builder.d.ts +40 -0
  21. package/dist/declarations/src/generated/client/transactions/by-project-key-transactions-by-id-request-builder.d.ts.map +1 -0
  22. package/dist/declarations/src/generated/client/transactions/by-project-key-transactions-key-by-key-request-builder.d.ts +40 -0
  23. package/dist/declarations/src/generated/client/transactions/by-project-key-transactions-key-by-key-request-builder.d.ts.map +1 -0
  24. package/dist/declarations/src/generated/client/transactions/by-project-key-transactions-request-builder.d.ts +50 -0
  25. package/dist/declarations/src/generated/client/transactions/by-project-key-transactions-request-builder.d.ts.map +1 -0
  26. package/dist/declarations/src/generated/index.d.ts +27 -0
  27. package/dist/declarations/src/generated/index.d.ts.map +1 -0
  28. package/dist/declarations/src/generated/models/application.d.ts +39 -0
  29. package/dist/declarations/src/generated/models/application.d.ts.map +1 -0
  30. package/dist/declarations/src/generated/models/cart.d.ts +52 -0
  31. package/dist/declarations/src/generated/models/cart.d.ts.map +1 -0
  32. package/dist/declarations/src/generated/models/common.d.ts +100 -0
  33. package/dist/declarations/src/generated/models/common.d.ts.map +1 -0
  34. package/dist/declarations/src/generated/models/error.d.ts +144 -0
  35. package/dist/declarations/src/generated/models/error.d.ts.map +1 -0
  36. package/dist/declarations/src/generated/models/order.d.ts +26 -0
  37. package/dist/declarations/src/generated/models/order.d.ts.map +1 -0
  38. package/dist/declarations/src/generated/models/payment-integration.d.ts +39 -0
  39. package/dist/declarations/src/generated/models/payment-integration.d.ts.map +1 -0
  40. package/dist/declarations/src/generated/models/payment-intents.d.ts +111 -0
  41. package/dist/declarations/src/generated/models/payment-intents.d.ts.map +1 -0
  42. package/dist/declarations/src/generated/models/payment.d.ts +39 -0
  43. package/dist/declarations/src/generated/models/payment.d.ts.map +1 -0
  44. package/dist/declarations/src/generated/models/responses.d.ts +1647 -0
  45. package/dist/declarations/src/generated/models/responses.d.ts.map +1 -0
  46. package/dist/declarations/src/generated/models/transaction.d.ts +170 -0
  47. package/dist/declarations/src/generated/models/transaction.d.ts.map +1 -0
  48. package/dist/declarations/src/generated/shared/utils/common-types.d.ts +56 -0
  49. package/dist/declarations/src/generated/shared/utils/common-types.d.ts.map +1 -0
  50. package/dist/declarations/src/generated/shared/utils/middleware.d.ts +9 -0
  51. package/dist/declarations/src/generated/shared/utils/middleware.d.ts.map +1 -0
  52. package/dist/declarations/src/generated/shared/utils/requests-utils.d.ts +14 -0
  53. package/dist/declarations/src/generated/shared/utils/requests-utils.d.ts.map +1 -0
  54. package/dist/declarations/src/generated/shared/utils/uri-utils.d.ts +8 -0
  55. package/dist/declarations/src/generated/shared/utils/uri-utils.d.ts.map +1 -0
  56. package/dist/declarations/src/index.d.ts +3 -0
  57. package/dist/declarations/src/index.d.ts.map +1 -0
  58. package/package.json +48 -0
@@ -0,0 +1,1647 @@
1
+ /**
2
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
3
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
4
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
5
+ */
6
+ import { PaymentReference } from "./payment.js";
7
+ export type Message = AddDiscountCodeError | ApplicationDeactivated | BadInputData | CartEmptiedDuringCheckout | CartEmpty | CartNotFound | CartWithExistingPayment | CheckoutCancelled | CheckoutCompleted | CheckoutLoaded | CheckoutStarted | ConnectorError | DeprecatedFields | DiscountCodeNotApplicable | ErrorLoadingAllPaymentIntegrations | ExpiredSession | ExternalTermsAndConditionsPending | FailedToRefreshSession | GiftCardBalanceError | GiftCardBalanceRemoved | GiftCardBalanceStarted | GiftCardBalanceSuccess | GiftCardRedeemError | GiftCardRedeemStarted | GiftCardRedeemSuccess | InitError | InitTimeout | InvalidLocale | InvalidMode | MultipleVendorButtonContainers | NoPaymentIntegrations | NoShippingMethods | NonOrderableCartError | NotApplicableDiscountCodeRemoved | OrderCreated | OrderCreationError | OrderVerificationRetryError | OrderVerificationStarted | OrderVerificationTimeout | PaymentCancelled | PaymentFailed | PaymentIntegrationLoaded | PaymentIntegrationLoading | PaymentIntegrationLoadingError | PaymentIntegrationNotAvailable | PaymentIntegrationSelected | PaymentIntegrationSelectionConfirmation | PaymentIntegrationSelectionConfirmationFailed | PaymentIntegrationsReceived | PaymentStarted | PaymentValidationFailed | PaymentValidationPassed | PaymentValidationStarted | ProjectIsDeactivated | RemoveDiscountCodeError | ResponseMessage | SetShippingAddressError | ShippingAddressMissingError | ShippingMethodDoesNotMatchCart | ShippingMethodSelected | ShippingMethodSelectionConfirmation | UnavailableLocale | UnsupportedCountry | UpdatedFields;
8
+ export interface IMessage {
9
+ /**
10
+ * Message code for the event.
11
+ *
12
+ */
13
+ readonly code: string;
14
+ /**
15
+ * Severity level of the event. Can be `info`, `warn`, or `error`.
16
+ *
17
+ *
18
+ */
19
+ readonly severity: string;
20
+ /**
21
+ * Human-readable description of the event.
22
+ *
23
+ *
24
+ */
25
+ readonly message: string;
26
+ /**
27
+ * Unique identifier of the event.
28
+ *
29
+ */
30
+ readonly correlationId: string;
31
+ }
32
+ /**
33
+ * Generated when the customer cancels the checkout process.
34
+ *
35
+ */
36
+ export interface CheckoutCancelled extends IMessage {
37
+ readonly code: 'checkout_cancelled';
38
+ /**
39
+ * \`info`
40
+ *
41
+ */
42
+ readonly severity: string;
43
+ /**
44
+ * Checkout cancelled.
45
+ *
46
+ */
47
+ readonly message: string;
48
+ /**
49
+ * Unique identifier of the event.
50
+ *
51
+ */
52
+ readonly correlationId: string;
53
+ }
54
+ /**
55
+ * Generated when Checkout is loaded and waiting for the configuration properties to be passed with the `checkoutFlow` or `paymentFlow` [method](/sdk).
56
+ *
57
+ */
58
+ export interface CheckoutLoaded extends IMessage {
59
+ readonly code: 'checkout_loaded';
60
+ /**
61
+ * \`info`
62
+ *
63
+ */
64
+ readonly severity: string;
65
+ /**
66
+ * Checkout loaded.
67
+ *
68
+ */
69
+ readonly message: string;
70
+ /**
71
+ * Unique identifier of the event.
72
+ *
73
+ */
74
+ readonly correlationId: string;
75
+ }
76
+ /**
77
+ * Generated when the configuration properties are passed successfully with the `checkoutFlow` or `paymentFlow` [method](/sdk) and the checkout process starts.
78
+ *
79
+ */
80
+ export interface CheckoutStarted extends IMessage {
81
+ readonly code: 'checkout_started';
82
+ /**
83
+ * \`info`
84
+ *
85
+ */
86
+ readonly severity: string;
87
+ /**
88
+ * Checkout started.
89
+ *
90
+ */
91
+ readonly message: string;
92
+ /**
93
+ * Unique identifier of the event.
94
+ *
95
+ */
96
+ readonly correlationId: string;
97
+ }
98
+ /**
99
+ * Generated when the loading of all the payment integrations have failed.
100
+ *
101
+ */
102
+ export interface ErrorLoadingAllPaymentIntegrations extends IMessage {
103
+ readonly code: 'error_loading_all_payment_integrations';
104
+ /**
105
+ * \`error`
106
+ *
107
+ */
108
+ readonly severity: string;
109
+ /**
110
+ * Error loading all payment integrations.
111
+ *
112
+ */
113
+ readonly message: string;
114
+ /**
115
+ * Unique identifier of the event.
116
+ *
117
+ */
118
+ readonly correlationId: string;
119
+ }
120
+ /**
121
+ * Generated when the [Checkout Session](/installing-checkout#create-checkout-sessions) is expired.
122
+ *
123
+ */
124
+ export interface ExpiredSession extends IMessage {
125
+ readonly code: 'expired_session';
126
+ /**
127
+ * \`error`
128
+ *
129
+ */
130
+ readonly severity: string;
131
+ /**
132
+ * Session is expired.
133
+ *
134
+ */
135
+ readonly message: string;
136
+ /**
137
+ * Unique identifier of the event.
138
+ *
139
+ */
140
+ readonly correlationId: string;
141
+ }
142
+ /**
143
+ * Generated in Payment Only [mode](/../checkout/overview#complete-checkout-and-payment-only-modes) when the customer hasn't accepted the terms and conditions yet.
144
+ *
145
+ */
146
+ export interface ExternalTermsAndConditionsPending extends IMessage {
147
+ readonly code: 'external_terms_and_conditions_pending';
148
+ /**
149
+ * \`info`
150
+ *
151
+ */
152
+ readonly severity: string;
153
+ /**
154
+ * External terms and conditions pending.
155
+ *
156
+ */
157
+ readonly message: string;
158
+ /**
159
+ * Unique identifier of the event.
160
+ *
161
+ */
162
+ readonly correlationId: string;
163
+ }
164
+ /**
165
+ * Generated when the [Checkout Session](/installing-checkout#create-checkout-sessions) fails to refresh.
166
+ *
167
+ */
168
+ export interface FailedToRefreshSession extends IMessage {
169
+ readonly code: 'failed_to_refresh_session';
170
+ /**
171
+ * \`error`
172
+ *
173
+ */
174
+ readonly severity: string;
175
+ /**
176
+ * Failed to refresh session.
177
+ *
178
+ */
179
+ readonly message: string;
180
+ /**
181
+ * Unique identifier of the event.
182
+ *
183
+ */
184
+ readonly correlationId: string;
185
+ }
186
+ /**
187
+ * Generated when an error occurs while retrieving the balance of a gift card.
188
+ *
189
+ */
190
+ export interface GiftCardBalanceError extends IMessage {
191
+ readonly code: 'gift_card_balance_error';
192
+ /**
193
+ * \`error`
194
+ *
195
+ */
196
+ readonly severity: string;
197
+ /**
198
+ * Gift card balance failed.
199
+ *
200
+ */
201
+ readonly message: string;
202
+ /**
203
+ * Unique identifier of the event.
204
+ *
205
+ */
206
+ readonly correlationId: string;
207
+ }
208
+ /**
209
+ * Generated when the customer removes a gift card's balance that was initially applied as a payment integration.
210
+ *
211
+ */
212
+ export interface GiftCardBalanceRemoved extends IMessage {
213
+ readonly code: 'gift_card_balance_removed';
214
+ /**
215
+ * \`info`
216
+ *
217
+ */
218
+ readonly severity: string;
219
+ /**
220
+ * Gift card balance removed.
221
+ *
222
+ */
223
+ readonly message: string;
224
+ /**
225
+ * Unique identifier of the event.
226
+ *
227
+ */
228
+ readonly correlationId: string;
229
+ }
230
+ /**
231
+ * Generated when the customer enters the gift card's code for the payment, and Checkout initiates the retrieving of the gift card's balance.
232
+ *
233
+ */
234
+ export interface GiftCardBalanceStarted extends IMessage {
235
+ readonly code: 'gift_card_balance_started';
236
+ /**
237
+ * \`info`
238
+ *
239
+ */
240
+ readonly severity: string;
241
+ /**
242
+ * Gift card balance started.
243
+ *
244
+ */
245
+ readonly message: string;
246
+ /**
247
+ * Unique identifier of the event.
248
+ *
249
+ */
250
+ readonly correlationId: string;
251
+ }
252
+ /**
253
+ * Generated when the redemption of a gift card's balance fails.
254
+ *
255
+ */
256
+ export interface GiftCardRedeemError extends IMessage {
257
+ readonly code: 'gift_card_redeem_error';
258
+ /**
259
+ * \`error`
260
+ *
261
+ */
262
+ readonly severity: string;
263
+ /**
264
+ * Gift card redeem failed.
265
+ *
266
+ */
267
+ readonly message: string;
268
+ /**
269
+ * Unique identifier of the event.
270
+ *
271
+ */
272
+ readonly correlationId: string;
273
+ }
274
+ /**
275
+ * Generated when the customer confirms the payment by gift card and Checkout initiates the redemption of the gift card's balance.
276
+ *
277
+ */
278
+ export interface GiftCardRedeemStarted extends IMessage {
279
+ readonly code: 'gift_card_redeem_started';
280
+ /**
281
+ * \`info`
282
+ *
283
+ */
284
+ readonly severity: string;
285
+ /**
286
+ * Gift card redeem started.
287
+ *
288
+ */
289
+ readonly message: string;
290
+ /**
291
+ * Unique identifier of the event.
292
+ *
293
+ */
294
+ readonly correlationId: string;
295
+ }
296
+ /**
297
+ * Generated when the redemption of a gift card's balance is successful.
298
+ *
299
+ */
300
+ export interface GiftCardRedeemSuccess extends IMessage {
301
+ readonly code: 'gift_card_redeem_success';
302
+ /**
303
+ * \`info`
304
+ *
305
+ */
306
+ readonly severity: string;
307
+ /**
308
+ * Gift card redeem success.
309
+ *
310
+ */
311
+ readonly message: string;
312
+ /**
313
+ * Unique identifier of the event.
314
+ *
315
+ */
316
+ readonly correlationId: string;
317
+ }
318
+ /**
319
+ * Generated when an error occurs during Checkout's initialization.
320
+ *
321
+ */
322
+ export interface InitError extends IMessage {
323
+ readonly code: 'init_error';
324
+ /**
325
+ * \`error`
326
+ *
327
+ */
328
+ readonly severity: string;
329
+ /**
330
+ * Error during initialization.
331
+ *
332
+ */
333
+ readonly message: string;
334
+ /**
335
+ * Unique identifier of the event.
336
+ *
337
+ */
338
+ readonly correlationId: string;
339
+ }
340
+ /**
341
+ * Generated when Checkout does not receive the configuration properties with the `checkoutFlow` or `paymentFlow` [method](/sdk) on time.
342
+ *
343
+ */
344
+ export interface InitTimeout extends IMessage {
345
+ readonly code: 'init_timeout';
346
+ /**
347
+ * \`error`
348
+ *
349
+ */
350
+ readonly severity: string;
351
+ /**
352
+ * Timeout error, no init message received.
353
+ *
354
+ */
355
+ readonly message: string;
356
+ /**
357
+ * Unique identifier of the event.
358
+ *
359
+ */
360
+ readonly correlationId: string;
361
+ }
362
+ /**
363
+ * Generated when the Application does not support the requested Checkout [mode](/../checkout/overview#complete-checkout-and-payment-only-modes).
364
+ *
365
+ */
366
+ export interface InvalidMode extends IMessage {
367
+ readonly code: 'invalid_mode';
368
+ /**
369
+ * \`info`
370
+ *
371
+ */
372
+ readonly severity: string;
373
+ /**
374
+ * \`{mode}` mode requires an application with mode type `{modeTypeRequested}`. Current mode `{modeTypeReceived}`.
375
+ *
376
+ */
377
+ readonly message: string;
378
+ /**
379
+ * Unique identifier of the event.
380
+ *
381
+ */
382
+ readonly correlationId: string;
383
+ }
384
+ /**
385
+ * Generated when multiple containers for [vendor payment buttons](/sdk#display-custom-and-vendor-payment-buttons) are found.
386
+ *
387
+ */
388
+ export interface MultipleVendorButtonContainers extends IMessage {
389
+ readonly code: 'multiple_vendor_button_containers';
390
+ /**
391
+ * \`warn`
392
+ *
393
+ */
394
+ readonly severity: string;
395
+ /**
396
+ * Multiple vendor button containers detected, this may cause issues.
397
+ *
398
+ */
399
+ readonly message: string;
400
+ /**
401
+ * Unique identifier of the event.
402
+ *
403
+ */
404
+ readonly correlationId: string;
405
+ }
406
+ /**
407
+ * Generated when no payment integration is set up for an [Application](/connectors-and-applications#applications). Add at least one Payment integration to the Application in the Merchant Center.
408
+ *
409
+ */
410
+ export interface NoPaymentIntegrations extends IMessage {
411
+ readonly code: 'no_payment_integrations';
412
+ /**
413
+ * \`error`
414
+ *
415
+ */
416
+ readonly severity: string;
417
+ /**
418
+ * There are no payment integrations configured.
419
+ *
420
+ */
421
+ readonly message: string;
422
+ /**
423
+ * Unique identifier of the event.
424
+ *
425
+ */
426
+ readonly correlationId: string;
427
+ }
428
+ /**
429
+ * Generated when Checkout starts verifying the [Order](/../api/projects/orders).
430
+ *
431
+ */
432
+ export interface OrderVerificationStarted extends IMessage {
433
+ readonly code: 'order_verification_started';
434
+ /**
435
+ * \`info`
436
+ *
437
+ */
438
+ readonly severity: string;
439
+ /**
440
+ * Order verification started.
441
+ *
442
+ */
443
+ readonly message: string;
444
+ /**
445
+ * Unique identifier of the event.
446
+ *
447
+ */
448
+ readonly correlationId: string;
449
+ }
450
+ /**
451
+ * Generated when the verification of the [Order](/../api/projects/orders) times out.
452
+ *
453
+ */
454
+ export interface OrderVerificationTimeout extends IMessage {
455
+ readonly code: 'order_verification_timeout';
456
+ /**
457
+ * \`error`
458
+ *
459
+ */
460
+ readonly severity: string;
461
+ /**
462
+ * Order verification timeout.
463
+ *
464
+ */
465
+ readonly message: string;
466
+ /**
467
+ * Unique identifier of the event.
468
+ *
469
+ */
470
+ readonly correlationId: string;
471
+ }
472
+ /**
473
+ * Generated when Checkout and the payment service provider (PSP) validate the payment information entered by the customer.
474
+ *
475
+ */
476
+ export interface PaymentValidationPassed extends IMessage {
477
+ readonly code: 'payment_validation_passed';
478
+ /**
479
+ * \`info`
480
+ *
481
+ */
482
+ readonly severity: string;
483
+ /**
484
+ * Payment validation passed.
485
+ *
486
+ */
487
+ readonly message: string;
488
+ /**
489
+ * Unique identifier of the event.
490
+ *
491
+ */
492
+ readonly correlationId: string;
493
+ }
494
+ /**
495
+ * Generated when the validation of the payment information entered by the customer starts.
496
+ *
497
+ */
498
+ export interface PaymentValidationStarted extends IMessage {
499
+ readonly code: 'payment_validation_started';
500
+ /**
501
+ * \`info`
502
+ *
503
+ */
504
+ readonly severity: string;
505
+ /**
506
+ * Payment validation started.
507
+ *
508
+ */
509
+ readonly message: string;
510
+ /**
511
+ * Unique identifier of the event.
512
+ *
513
+ */
514
+ readonly correlationId: string;
515
+ }
516
+ export type ResponseMessage = AddDiscountCodeError | ApplicationDeactivated | BadInputData | CartEmptiedDuringCheckout | CartEmpty | CartNotFound | CartWithExistingPayment | CheckoutCompleted | ConnectorError | DeprecatedFields | DiscountCodeNotApplicable | GiftCardBalanceSuccess | InvalidLocale | NoShippingMethods | NonOrderableCartError | NotApplicableDiscountCodeRemoved | OrderCreated | OrderCreationError | OrderVerificationRetryError | PaymentCancelled | PaymentFailed | PaymentIntegrationLoaded | PaymentIntegrationLoading | PaymentIntegrationLoadingError | PaymentIntegrationNotAvailable | PaymentIntegrationSelected | PaymentIntegrationSelectionConfirmation | PaymentIntegrationSelectionConfirmationFailed | PaymentIntegrationsReceived | PaymentStarted | PaymentValidationFailed | ProjectIsDeactivated | RemoveDiscountCodeError | SetShippingAddressError | ShippingAddressMissingError | ShippingMethodSelected | ShippingMethodSelectionConfirmation | UnavailableLocale | UnsupportedCountry | UpdatedFields;
517
+ export interface IResponseMessage {
518
+ /**
519
+ * Message code for the event.
520
+ *
521
+ */
522
+ readonly code: string;
523
+ /**
524
+ * Severity level of the event. Can be `info`, `warn`, or `error`.
525
+ *
526
+ *
527
+ */
528
+ readonly severity: string;
529
+ /**
530
+ * Human-readable description of the event.
531
+ *
532
+ *
533
+ */
534
+ readonly message: string;
535
+ /**
536
+ * Unique identifier of the event.
537
+ *
538
+ *
539
+ */
540
+ readonly correlationId: string;
541
+ }
542
+ /**
543
+ * Generated when there was an error adding a Discount Code.
544
+ *
545
+ */
546
+ export interface AddDiscountCodeError extends IResponseMessage {
547
+ readonly code: 'add_discount_code_error';
548
+ /**
549
+ * \`error`
550
+ *
551
+ */
552
+ readonly severity: string;
553
+ /**
554
+ * Error adding discount code.
555
+ *
556
+ */
557
+ readonly message: string;
558
+ /**
559
+ * Unique identifier of the event.
560
+ *
561
+ */
562
+ readonly correlationId: string;
563
+ /**
564
+ * Contains the `error` object.
565
+ *
566
+ */
567
+ readonly payload: any;
568
+ }
569
+ /**
570
+ * Generated when the requested [Application](/connectors-and-applications#applications) is deactivated. Activate the Application in the Merchant Center to continue.
571
+ *
572
+ */
573
+ export interface ApplicationDeactivated extends IResponseMessage {
574
+ readonly code: 'application_disabled';
575
+ /**
576
+ * \`error`
577
+ *
578
+ */
579
+ readonly severity: string;
580
+ /**
581
+ * Application `{applicationKey}` for `{projectKey}` is disabled.
582
+ *
583
+ */
584
+ readonly message: string;
585
+ /**
586
+ * Unique identifier of the event.
587
+ *
588
+ */
589
+ readonly correlationId: string;
590
+ /**
591
+ * Contains the `project` and `application` objects with the related `key` property.
592
+ *
593
+ */
594
+ readonly payload: any;
595
+ }
596
+ /**
597
+ * Generated when the [Checkout properties](/sdk#configuration-properties) contains invalid fields.
598
+ *
599
+ */
600
+ export interface BadInputData extends IResponseMessage {
601
+ readonly code: 'invalid_fields';
602
+ /**
603
+ * \`error`
604
+ *
605
+ */
606
+ readonly severity: string;
607
+ /**
608
+ * Some fields are invalid.
609
+ *
610
+ */
611
+ readonly message: string;
612
+ /**
613
+ * Unique identifier of the event.
614
+ *
615
+ */
616
+ readonly correlationId: string;
617
+ /**
618
+ * Contains the `invalidFields` array of objects with the related `schema`, `path`, `value` and `message` properties.
619
+ *
620
+ */
621
+ readonly payload: any;
622
+ }
623
+ /**
624
+ * Generated when the [Cart](/../api/projects/carts) was emptied during the checkout process. It is not possible to recover from this, the customer must restart the checkout process.
625
+ *
626
+ */
627
+ export interface CartEmptiedDuringCheckout extends IResponseMessage {
628
+ readonly code: 'cart_emptied_during_checkout';
629
+ /**
630
+ * \`error`
631
+ *
632
+ */
633
+ readonly severity: string;
634
+ /**
635
+ * Cart `{cartId}` was emptied during checkout.
636
+ *
637
+ */
638
+ readonly message: string;
639
+ /**
640
+ * Unique identifier of the event.
641
+ *
642
+ */
643
+ readonly correlationId: string;
644
+ /**
645
+ * Contains the `cart` object with the `id` property.
646
+ *
647
+ */
648
+ readonly payload: any;
649
+ }
650
+ /**
651
+ * Generated when the [Cart](/../api/projects/carts) for the current checkout is empty. The Cart must contain at least one [Line Item](/../api/carts-orders-overview#line-items).
652
+ *
653
+ */
654
+ export interface CartEmpty extends IResponseMessage {
655
+ readonly code: 'cart_empty';
656
+ /**
657
+ * \`error`
658
+ *
659
+ */
660
+ readonly severity: string;
661
+ /**
662
+ * Cart `{cartId}` is empty.
663
+ *
664
+ */
665
+ readonly message: string;
666
+ /**
667
+ * Unique identifier of the event.
668
+ *
669
+ */
670
+ readonly correlationId: string;
671
+ /**
672
+ * Contains the `cart` object with the `id` property.
673
+ *
674
+ */
675
+ readonly payload: any;
676
+ }
677
+ /**
678
+ * Generated when the [Cart](/../api/projects/carts) is not found. To start the checkout process, a valid Cart with at least one [Line Item](/../api/carts-orders-overview#line-items) is required.
679
+ *
680
+ */
681
+ export interface CartNotFound extends IResponseMessage {
682
+ readonly code: 'cart_not_found';
683
+ /**
684
+ * \`error`
685
+ *
686
+ */
687
+ readonly severity: string;
688
+ /**
689
+ * Cart for `{projectKey}` and session `{sessionId}` not found.
690
+ *
691
+ */
692
+ readonly message: string;
693
+ /**
694
+ * Unique identifier of the event.
695
+ *
696
+ */
697
+ readonly correlationId: string;
698
+ /**
699
+ * Contains the `project` and `session` objects with the related `key` and `id` properties.
700
+ *
701
+ */
702
+ readonly payload: any;
703
+ }
704
+ /**
705
+ * Generated when trying to add a [Payment](/../api/projects/payments) to a [Cart](/../api/projects/carts) that already references an approved Payment.
706
+ *
707
+ */
708
+ export interface CartWithExistingPayment extends IResponseMessage {
709
+ readonly code: 'cart_with_exisiting_payment';
710
+ /**
711
+ * \`error`
712
+ *
713
+ */
714
+ readonly severity: string;
715
+ /**
716
+ * Cart with existing approved payment.
717
+ *
718
+ */
719
+ readonly message: string;
720
+ /**
721
+ * Unique identifier of the event.
722
+ *
723
+ */
724
+ readonly correlationId: string;
725
+ /**
726
+ * Contains the `cart` object with the `id` property.
727
+ *
728
+ */
729
+ readonly payload: any;
730
+ }
731
+ /**
732
+ * Generated when the customer completes the checkout process.
733
+ *
734
+ */
735
+ export interface CheckoutCompleted extends IResponseMessage {
736
+ readonly code: 'checkout_completed';
737
+ /**
738
+ * \`info`
739
+ *
740
+ */
741
+ readonly severity: string;
742
+ /**
743
+ * Checkout for `{orderId}` completed.
744
+ *
745
+ */
746
+ readonly message: string;
747
+ /**
748
+ * Unique identifier of the event.
749
+ *
750
+ */
751
+ readonly correlationId: string;
752
+ /**
753
+ * Contains the `order` object with the `id` property.
754
+ *
755
+ */
756
+ readonly payload: any;
757
+ }
758
+ /**
759
+ * Generated when the [Connector](/../checkout/connectors-and-applications#payment-connectors) triggers an error.
760
+ *
761
+ */
762
+ export interface ConnectorError extends IResponseMessage {
763
+ readonly code: 'connector_error';
764
+ /**
765
+ * \`error`
766
+ *
767
+ */
768
+ readonly severity: string;
769
+ /**
770
+ * Connector error.
771
+ *
772
+ */
773
+ readonly message: string;
774
+ /**
775
+ * Unique identifier of the event.
776
+ *
777
+ */
778
+ readonly correlationId: string;
779
+ /**
780
+ * Contains the `connector` object with the `id` property and optional `error`, `message`, and `data` properties.
781
+ *
782
+ */
783
+ readonly payload: any;
784
+ }
785
+ /**
786
+ * Generated when the [Checkout properties](/sdk#configuration-properties) contains one or more deprecated fields.
787
+ *
788
+ */
789
+ export interface DeprecatedFields extends IResponseMessage {
790
+ readonly code: 'deprecated_fields';
791
+ /**
792
+ * \`warn`
793
+ *
794
+ */
795
+ readonly severity: string;
796
+ /**
797
+ * Some fields are deprecated.
798
+ *
799
+ */
800
+ readonly message: string;
801
+ /**
802
+ * Unique identifier of the event.
803
+ *
804
+ */
805
+ readonly correlationId: string;
806
+ /**
807
+ * Contains the `deprecatedFields` array.
808
+ *
809
+ */
810
+ readonly payload: any;
811
+ }
812
+ /**
813
+ * Generated when the [Discount Code](/../api/projects/discountCodes) is not applicable for the current Cart.
814
+ *
815
+ */
816
+ export interface DiscountCodeNotApplicable extends IResponseMessage {
817
+ readonly code: 'discount_code_not_applicable';
818
+ /**
819
+ * \`info`
820
+ *
821
+ */
822
+ readonly severity: string;
823
+ /**
824
+ * Discount code not applicable.
825
+ *
826
+ */
827
+ readonly message: string;
828
+ /**
829
+ * Unique identifier of the event.
830
+ *
831
+ */
832
+ readonly correlationId: string;
833
+ /**
834
+ * Contains the `cartId` and `discountCode` properties.
835
+ *
836
+ */
837
+ readonly payload: any;
838
+ }
839
+ /**
840
+ * Generated when Checkout successfully retrieves a gift card's balance.
841
+ *
842
+ */
843
+ export interface GiftCardBalanceSuccess extends IResponseMessage {
844
+ readonly code: 'gift_card_balance_success';
845
+ /**
846
+ * \`info`
847
+ *
848
+ */
849
+ readonly severity: string;
850
+ /**
851
+ * Gift card balance started.
852
+ *
853
+ */
854
+ readonly message: string;
855
+ /**
856
+ * Unique identifier of the event.
857
+ *
858
+ */
859
+ readonly correlationId: string;
860
+ /**
861
+ * Contains the `amount` and `isBalanceSufficient` properties.
862
+ *
863
+ */
864
+ readonly payload: any;
865
+ }
866
+ /**
867
+ * Generated when the provided locale is invalid.
868
+ *
869
+ */
870
+ export interface InvalidLocale extends IResponseMessage {
871
+ readonly code: 'invalid_locale';
872
+ /**
873
+ * \`warn`
874
+ *
875
+ */
876
+ readonly severity: string;
877
+ /**
878
+ * The provided `{locale}` is invalid.
879
+ *
880
+ */
881
+ readonly message: string;
882
+ /**
883
+ * Unique identifier of the event.
884
+ *
885
+ */
886
+ readonly correlationId: string;
887
+ /**
888
+ * Contains the provided locale string, the related locale field (language or currency), and the used fallback one.
889
+ *
890
+ */
891
+ readonly payload: any;
892
+ }
893
+ /**
894
+ * Generated when no [Shipping Method](/../api/projects/shippingMethods) is available for the shipping address of the [Cart](/../api/projects/carts). This may indicate an incomplete configuration.
895
+ *
896
+ */
897
+ export interface NoShippingMethods extends IResponseMessage {
898
+ readonly code: 'no_shipping_methods';
899
+ /**
900
+ * \`error`
901
+ *
902
+ */
903
+ readonly severity: string;
904
+ /**
905
+ * There are no shipping methods matching cart.
906
+ *
907
+ */
908
+ readonly message: string;
909
+ /**
910
+ * Unique identifier of the event.
911
+ *
912
+ */
913
+ readonly correlationId: string;
914
+ /**
915
+ * Contains the `cart` object with the `id` property.
916
+ *
917
+ */
918
+ readonly payload: any;
919
+ }
920
+ /**
921
+ * Generated when the Order could not be created due to inconsistencies in the [Cart](/../api/projects/carts).
922
+ *
923
+ */
924
+ export interface NonOrderableCartError extends IResponseMessage {
925
+ readonly code: 'non_orderable_cart_error';
926
+ /**
927
+ * \`error`
928
+ *
929
+ */
930
+ readonly severity: string;
931
+ /**
932
+ * This cart is not orderable.
933
+ *
934
+ */
935
+ readonly message: string;
936
+ /**
937
+ * Unique identifier of the event.
938
+ *
939
+ */
940
+ readonly correlationId: string;
941
+ /**
942
+ * Contains the `cart` object with the `id` and `errors` properties.
943
+ *
944
+ */
945
+ readonly payload: any;
946
+ }
947
+ /**
948
+ * Generated when using the `paymentFlow` [method](/../checkout/browser-sdk#paymentflow-method) and Checkout removes a [Discount Code](/../api/projects/discountCodes) from the Cart because it does not apply to the Cart. Checkout removes the Discount Code to avoid an order creation error when converting the Cart to an Order.
949
+ *
950
+ */
951
+ export interface NotApplicableDiscountCodeRemoved extends IResponseMessage {
952
+ readonly code: 'not_applicable_discount_code_removed';
953
+ /**
954
+ * \`warn`
955
+ *
956
+ */
957
+ readonly severity: string;
958
+ /**
959
+ * Not applicable discount code removed.
960
+ *
961
+ */
962
+ readonly message: string;
963
+ /**
964
+ * Unique identifier of the event.
965
+ *
966
+ */
967
+ readonly correlationId: string;
968
+ /**
969
+ * Contains the `cartId` and `discountCode` properties.
970
+ *
971
+ */
972
+ readonly payload: any;
973
+ }
974
+ /**
975
+ * Generated when an [Order](/../api/projects/orders) is created after a successful checkout process.
976
+ *
977
+ */
978
+ export interface OrderCreated extends IResponseMessage {
979
+ readonly code: 'order_created';
980
+ /**
981
+ * \`info`
982
+ *
983
+ */
984
+ readonly severity: string;
985
+ /**
986
+ * Order `{orderId}` created.
987
+ *
988
+ */
989
+ readonly message: string;
990
+ /**
991
+ * Unique identifier of the event.
992
+ *
993
+ */
994
+ readonly correlationId: string;
995
+ /**
996
+ * Contains the `order` object with the `id` property.
997
+ *
998
+ */
999
+ readonly payload: any;
1000
+ }
1001
+ /**
1002
+ * Generated when an [Order](/../api/projects/orders) that references an approved [Payment](/../api/projects/payments) cannot be created.
1003
+ *
1004
+ */
1005
+ export interface OrderCreationError extends IResponseMessage {
1006
+ readonly code: 'order_creation_error';
1007
+ /**
1008
+ * \`error`
1009
+ *
1010
+ */
1011
+ readonly severity: string;
1012
+ /**
1013
+ * Order creation failed with approved payment.
1014
+ *
1015
+ */
1016
+ readonly message: string;
1017
+ /**
1018
+ * Unique identifier of the event.
1019
+ *
1020
+ */
1021
+ readonly correlationId: string;
1022
+ /**
1023
+ * Contains `paymentReference`, `sessionId`, and the `errors` array of objects, with the related `code` and `message` properties.
1024
+ *
1025
+ */
1026
+ readonly payload: any;
1027
+ }
1028
+ /**
1029
+ * Generated when retrying the verification of the [Order](/../api/projects/orders) results in an error.
1030
+ *
1031
+ */
1032
+ export interface OrderVerificationRetryError extends IResponseMessage {
1033
+ readonly code: 'order_verification_retry_error';
1034
+ /**
1035
+ * \`error`
1036
+ *
1037
+ */
1038
+ readonly severity: string;
1039
+ /**
1040
+ * Order verification retry error.
1041
+ *
1042
+ */
1043
+ readonly message: string;
1044
+ /**
1045
+ * Unique identifier of the event.
1046
+ *
1047
+ */
1048
+ readonly correlationId: string;
1049
+ /**
1050
+ * Contains the `error` property that can be either `orderReferenceNotAvailable` or `orderVerificationOngoing`.
1051
+ *
1052
+ */
1053
+ readonly payload: any;
1054
+ }
1055
+ /**
1056
+ * Generated when the customer cancels the payment (for example, by closing the browser's window).
1057
+ *
1058
+ */
1059
+ export interface PaymentCancelled extends IResponseMessage {
1060
+ readonly code: 'payment_cancelled';
1061
+ /**
1062
+ * \`info`
1063
+ *
1064
+ */
1065
+ readonly severity: string;
1066
+ /**
1067
+ * Payment cancelled.
1068
+ *
1069
+ */
1070
+ readonly message: string;
1071
+ /**
1072
+ * Unique identifier of the event.
1073
+ *
1074
+ */
1075
+ readonly correlationId: string;
1076
+ /**
1077
+ * Contains the reference data of a Payment.
1078
+ *
1079
+ */
1080
+ readonly payload: PaymentReference;
1081
+ }
1082
+ /**
1083
+ * Generated when the payment fails.
1084
+ *
1085
+ */
1086
+ export interface PaymentFailed extends IResponseMessage {
1087
+ readonly code: 'payment_failed';
1088
+ /**
1089
+ * \`error`
1090
+ *
1091
+ */
1092
+ readonly severity: string;
1093
+ /**
1094
+ * Payment failed.
1095
+ *
1096
+ */
1097
+ readonly message: string;
1098
+ /**
1099
+ * Unique identifier of the event.
1100
+ *
1101
+ */
1102
+ readonly correlationId: string;
1103
+ /**
1104
+ * Contains the reference data of a Payment.
1105
+ *
1106
+ */
1107
+ readonly payload: PaymentReference;
1108
+ }
1109
+ /**
1110
+ * Generated when the selected payment integration is loaded.
1111
+ *
1112
+ */
1113
+ export interface PaymentIntegrationLoaded extends IResponseMessage {
1114
+ readonly code: 'payment_integration_loaded';
1115
+ /**
1116
+ * \`info`
1117
+ *
1118
+ */
1119
+ readonly severity: string;
1120
+ /**
1121
+ * Payment integration loaded.
1122
+ *
1123
+ */
1124
+ readonly message: string;
1125
+ /**
1126
+ * Unique identifier of the event.
1127
+ *
1128
+ */
1129
+ readonly correlationId: string;
1130
+ /**
1131
+ * Contains the `integration` object with the `type` and `connectorId` properties.
1132
+ *
1133
+ */
1134
+ readonly payload: any;
1135
+ }
1136
+ /**
1137
+ * Generated when the selected payment integration is loading.
1138
+ *
1139
+ */
1140
+ export interface PaymentIntegrationLoading extends IResponseMessage {
1141
+ readonly code: 'payment_integration_loading';
1142
+ /**
1143
+ * \`info`
1144
+ *
1145
+ */
1146
+ readonly severity: string;
1147
+ /**
1148
+ * Payment integration loading.
1149
+ *
1150
+ */
1151
+ readonly message: string;
1152
+ /**
1153
+ * Unique identifier of the event.
1154
+ *
1155
+ */
1156
+ readonly correlationId: string;
1157
+ /**
1158
+ * Contains the `integration` object with the `type` and `connectorId` properties.
1159
+ *
1160
+ */
1161
+ readonly payload: any;
1162
+ }
1163
+ /**
1164
+ * Generated when the loading of the selected payment integration fails.
1165
+ *
1166
+ */
1167
+ export interface PaymentIntegrationLoadingError extends IResponseMessage {
1168
+ readonly code: 'payment_integration_loading_error';
1169
+ /**
1170
+ * \`error`
1171
+ *
1172
+ */
1173
+ readonly severity: string;
1174
+ /**
1175
+ * Payment integration loading failed.
1176
+ *
1177
+ */
1178
+ readonly message: string;
1179
+ /**
1180
+ * Unique identifier of the event.
1181
+ *
1182
+ */
1183
+ readonly correlationId: string;
1184
+ /**
1185
+ * Contains an `error` object and the `integration` object with the `type` and `connectorId` properties.
1186
+ *
1187
+ */
1188
+ readonly payload: any;
1189
+ }
1190
+ /**
1191
+ * Generated when there is an error with the selected payment integration and the payment integration is unavailable.
1192
+ *
1193
+ */
1194
+ export interface PaymentIntegrationNotAvailable extends IResponseMessage {
1195
+ readonly code: 'payment_integration_not_available';
1196
+ /**
1197
+ * \`warn`
1198
+ *
1199
+ */
1200
+ readonly severity: string;
1201
+ /**
1202
+ * Payment integration not available.
1203
+ *
1204
+ */
1205
+ readonly message: string;
1206
+ /**
1207
+ * Unique identifier of the event.
1208
+ *
1209
+ */
1210
+ readonly correlationId: string;
1211
+ /**
1212
+ * Contains the `method` object with the `type`, `id`, and `connectorId` properties.
1213
+ *
1214
+ */
1215
+ readonly payload: any;
1216
+ }
1217
+ /**
1218
+ * Generated when the customer selects the payment integration.
1219
+ *
1220
+ */
1221
+ export interface PaymentIntegrationSelected extends IResponseMessage {
1222
+ readonly code: 'payment_integration_selected';
1223
+ /**
1224
+ * \`info`
1225
+ *
1226
+ */
1227
+ readonly severity: string;
1228
+ /**
1229
+ * Payment integration selected.
1230
+ *
1231
+ */
1232
+ readonly message: string;
1233
+ /**
1234
+ * Unique identifier of the event.
1235
+ *
1236
+ */
1237
+ readonly correlationId: string;
1238
+ /**
1239
+ * Contains the `integration` object with the `type` and `hasVendorButton` properties.
1240
+ *
1241
+ */
1242
+ readonly payload: any;
1243
+ }
1244
+ /**
1245
+ * Generated when the customer has entered the payment integration information and moves to the next step.
1246
+ *
1247
+ */
1248
+ export interface PaymentIntegrationSelectionConfirmation extends IResponseMessage {
1249
+ readonly code: 'payment_integration_selection_confirmation';
1250
+ /**
1251
+ * \`info`
1252
+ *
1253
+ */
1254
+ readonly severity: string;
1255
+ /**
1256
+ * Payment integration selected.
1257
+ *
1258
+ */
1259
+ readonly message: string;
1260
+ /**
1261
+ * Unique identifier of the event.
1262
+ *
1263
+ */
1264
+ readonly correlationId: string;
1265
+ /**
1266
+ * Contains the `integration` object with the `type` and `hasVendorButton` properties.
1267
+ *
1268
+ */
1269
+ readonly payload: any;
1270
+ }
1271
+ /**
1272
+ * Generated when the selection of the payment integration by the customer is not successful.
1273
+ *
1274
+ */
1275
+ export interface PaymentIntegrationSelectionConfirmationFailed extends IResponseMessage {
1276
+ readonly code: 'payment_integration_selection_confirmation_failed';
1277
+ /**
1278
+ * \`info`
1279
+ *
1280
+ */
1281
+ readonly severity: string;
1282
+ /**
1283
+ * Payment integration selection failed.
1284
+ *
1285
+ */
1286
+ readonly message: string;
1287
+ /**
1288
+ * Unique identifier of the event.
1289
+ *
1290
+ */
1291
+ readonly correlationId: string;
1292
+ /**
1293
+ * Contains the `integration` object with the `type` property.
1294
+ *
1295
+ */
1296
+ readonly payload: any;
1297
+ }
1298
+ /**
1299
+ * Generated when Checkout receives and loads the payment integrations configured for the Application.
1300
+ *
1301
+ */
1302
+ export interface PaymentIntegrationsReceived extends IResponseMessage {
1303
+ readonly code: 'payment_integrations_received';
1304
+ /**
1305
+ * \`info`
1306
+ *
1307
+ */
1308
+ readonly severity: string;
1309
+ /**
1310
+ * Payment integrations received.
1311
+ *
1312
+ */
1313
+ readonly message: string;
1314
+ /**
1315
+ * Unique identifier of the event.
1316
+ *
1317
+ */
1318
+ readonly correlationId: string;
1319
+ /**
1320
+ * Contains the `paymentIntegrations` array of objects with the `type` and `connectorId` properties.
1321
+ *
1322
+ */
1323
+ readonly payload: any;
1324
+ }
1325
+ /**
1326
+ * Generated when the payment starts.
1327
+ *
1328
+ */
1329
+ export interface PaymentStarted extends IResponseMessage {
1330
+ readonly code: 'payment_started';
1331
+ /**
1332
+ * \`info`
1333
+ *
1334
+ */
1335
+ readonly severity: string;
1336
+ /**
1337
+ * Payment started.
1338
+ *
1339
+ */
1340
+ readonly message: string;
1341
+ /**
1342
+ * Unique identifier of the event.
1343
+ *
1344
+ */
1345
+ readonly correlationId: string;
1346
+ /**
1347
+ * Contains the `integration` object with the `type` property.
1348
+ *
1349
+ */
1350
+ readonly payload: any;
1351
+ }
1352
+ /**
1353
+ * Generated when Checkout and the payment service provider (PSP) do not validate the payment information entered by the customer.
1354
+ *
1355
+ */
1356
+ export interface PaymentValidationFailed extends IResponseMessage {
1357
+ readonly code: 'payment_validation_failed';
1358
+ /**
1359
+ * \`info`
1360
+ *
1361
+ */
1362
+ readonly severity: string;
1363
+ /**
1364
+ * Payment validation failed.
1365
+ *
1366
+ */
1367
+ readonly message: string;
1368
+ /**
1369
+ * Unique identifier of the event.
1370
+ *
1371
+ */
1372
+ readonly correlationId: string;
1373
+ /**
1374
+ * Contains the reference data of a Payment.
1375
+ *
1376
+ */
1377
+ readonly payload: PaymentReference;
1378
+ }
1379
+ /**
1380
+ * Generated when the Checkout [`projectKey`](/sdk) is deactivated and cannot be initialized. To activate it, contact the [Checkout support team](https://support.commercetools.com/).
1381
+ *
1382
+ */
1383
+ export interface ProjectIsDeactivated extends IResponseMessage {
1384
+ readonly code: 'project_deactivated';
1385
+ /**
1386
+ * \`error`
1387
+ *
1388
+ */
1389
+ readonly severity: string;
1390
+ /**
1391
+ * Project `{projectKey}` is deactivated.
1392
+ *
1393
+ */
1394
+ readonly message: string;
1395
+ /**
1396
+ * Unique identifier of the event.
1397
+ *
1398
+ */
1399
+ readonly correlationId: string;
1400
+ /**
1401
+ * Contains the `project` object with the `key` property.
1402
+ *
1403
+ */
1404
+ readonly payload: any;
1405
+ }
1406
+ /**
1407
+ * Generated when there was an error removing the [Discount Code](/../api/projects/discountCodes).
1408
+ *
1409
+ */
1410
+ export interface RemoveDiscountCodeError extends IResponseMessage {
1411
+ readonly code: 'remove_discount_code_error';
1412
+ /**
1413
+ * \`error`
1414
+ *
1415
+ */
1416
+ readonly severity: string;
1417
+ /**
1418
+ * Error removing discount code.
1419
+ *
1420
+ */
1421
+ readonly message: string;
1422
+ /**
1423
+ * Unique identifier of the event.
1424
+ *
1425
+ */
1426
+ readonly correlationId: string;
1427
+ /**
1428
+ * Contains the `error` object.
1429
+ *
1430
+ */
1431
+ readonly payload: any;
1432
+ }
1433
+ /**
1434
+ * Generated when the [Cart](/../api/projects/carts) cannot be updated with the shipping address.
1435
+ *
1436
+ */
1437
+ export interface SetShippingAddressError extends IResponseMessage {
1438
+ readonly code: 'set_shipping_address_error';
1439
+ /**
1440
+ * \`error`
1441
+ *
1442
+ */
1443
+ readonly severity: string;
1444
+ /**
1445
+ * Error setting shipping address.
1446
+ *
1447
+ */
1448
+ readonly message: string;
1449
+ /**
1450
+ * Unique identifier of the event.
1451
+ *
1452
+ */
1453
+ readonly correlationId: string;
1454
+ /**
1455
+ * Contains the `errors` array of objects, with the related `code` and `message` properties.
1456
+ *
1457
+ */
1458
+ readonly payload: any;
1459
+ }
1460
+ /**
1461
+ * Generated when the shipping address is missing for the given Cart.
1462
+ *
1463
+ */
1464
+ export interface ShippingAddressMissingError extends IResponseMessage {
1465
+ readonly code: 'shipping_address_missing';
1466
+ /**
1467
+ * \`error`
1468
+ *
1469
+ */
1470
+ readonly severity: string;
1471
+ /**
1472
+ * The shippingAddress field is missing for cart `{cartId}`.
1473
+ *
1474
+ */
1475
+ readonly message: string;
1476
+ /**
1477
+ * Unique identifier of the event.
1478
+ *
1479
+ */
1480
+ readonly correlationId: string;
1481
+ /**
1482
+ * Contains the `cart` object with the `id` property.
1483
+ *
1484
+ */
1485
+ readonly payload: any;
1486
+ }
1487
+ /**
1488
+ * Generated when the selected Shipping Method does not match the Cart anymore.
1489
+ *
1490
+ */
1491
+ export interface ShippingMethodDoesNotMatchCart extends IMessage {
1492
+ readonly code: 'shipping_method_does_not_match_cart';
1493
+ /**
1494
+ * \`info`
1495
+ *
1496
+ */
1497
+ readonly severity: string;
1498
+ /**
1499
+ * Selected shipping method no longer matches cart.
1500
+ *
1501
+ */
1502
+ readonly message: string;
1503
+ /**
1504
+ * Unique identifier of the event.
1505
+ *
1506
+ */
1507
+ readonly correlationId: string;
1508
+ }
1509
+ /**
1510
+ * Generated when the customer selects a Shipping Method that is different from the default option.
1511
+ *
1512
+ */
1513
+ export interface ShippingMethodSelected extends IResponseMessage {
1514
+ readonly code: 'shipping_method_selected';
1515
+ /**
1516
+ * \`info`
1517
+ *
1518
+ */
1519
+ readonly severity: string;
1520
+ /**
1521
+ * Shipping Method selected.
1522
+ *
1523
+ */
1524
+ readonly message: string;
1525
+ /**
1526
+ * Unique identifier of the event.
1527
+ *
1528
+ */
1529
+ readonly correlationId: string;
1530
+ /**
1531
+ * Contains the `method` object with the `name` and `id` properties.
1532
+ *
1533
+ */
1534
+ readonly payload: any;
1535
+ }
1536
+ /**
1537
+ * Generated when the customer selects a Shipping Method and moves to the next step of the checkout process.
1538
+ *
1539
+ */
1540
+ export interface ShippingMethodSelectionConfirmation extends IResponseMessage {
1541
+ readonly code: 'shipping_method_selection_confirmation';
1542
+ /**
1543
+ * \`info`
1544
+ *
1545
+ */
1546
+ readonly severity: string;
1547
+ /**
1548
+ * Shipping Method selection confirmed.
1549
+ *
1550
+ */
1551
+ readonly message: string;
1552
+ /**
1553
+ * Unique identifier of the event.
1554
+ *
1555
+ */
1556
+ readonly correlationId: string;
1557
+ /**
1558
+ * Contains the `method` object with the `name` and `id` properties.
1559
+ *
1560
+ */
1561
+ readonly payload: any;
1562
+ }
1563
+ /**
1564
+ * Generated when the provided `locale` is not [available for localization](/installing-checkout#locales). The localization falls back to English.
1565
+ *
1566
+ */
1567
+ export interface UnavailableLocale extends IResponseMessage {
1568
+ readonly code: 'unavailable_locale';
1569
+ /**
1570
+ * \`warn`
1571
+ *
1572
+ */
1573
+ readonly severity: string;
1574
+ /**
1575
+ * The provided locale `{locale}` is not available for translated definitions.
1576
+ *
1577
+ */
1578
+ readonly message: string;
1579
+ /**
1580
+ * Unique identifier of the event.
1581
+ *
1582
+ */
1583
+ readonly correlationId: string;
1584
+ /**
1585
+ * Contains the `locale` and the `fallback` properties.
1586
+ *
1587
+ */
1588
+ readonly payload: any;
1589
+ }
1590
+ /**
1591
+ * Generated when the country of the shipping address and/or billing address associated with the [Cart](/../api/projects/carts) does not match the countries set for the [Application](/connectors-and-applications#applications).
1592
+ *
1593
+ */
1594
+ export interface UnsupportedCountry extends IResponseMessage {
1595
+ readonly code: 'unsupported_country';
1596
+ /**
1597
+ * \`error`
1598
+ *
1599
+ */
1600
+ readonly severity: string;
1601
+ /**
1602
+ * Cart `{cartId}` has unsupported country.
1603
+ *
1604
+ */
1605
+ readonly message: string;
1606
+ /**
1607
+ * Unique identifier of the event.
1608
+ *
1609
+ */
1610
+ readonly correlationId: string;
1611
+ /**
1612
+ * Contains the `cart` object with the `id` property, `shippingCountry`, `billingCountry`, and the `supportedCountries` array.
1613
+ *
1614
+ */
1615
+ readonly payload: any;
1616
+ }
1617
+ /**
1618
+ * Generated when some fields provided in the Checkout initialization request are invalid and have been updated to match our schema. An array of updates will be provided with a sequence of edits used to transform an invalid value into a valid one.
1619
+ *
1620
+ */
1621
+ export interface UpdatedFields extends IResponseMessage {
1622
+ readonly code: 'updated_fields';
1623
+ /**
1624
+ * \`warn`
1625
+ *
1626
+ */
1627
+ readonly severity: string;
1628
+ /**
1629
+ * Some fields are invalid and have been updated.
1630
+ *
1631
+ */
1632
+ readonly message: string;
1633
+ /**
1634
+ * Unique identifier of the event.
1635
+ *
1636
+ */
1637
+ readonly correlationId: string;
1638
+ /**
1639
+ * Contains two arrays:
1640
+ * - `invalidFields` contains a list of invalid fields with the related `schema`, `path`, `value` and `message` properties.
1641
+ * - `updatedFields` contains the updated fields with its related `type`, `path` and `value` properties, where `type` can be `update`|`insert`|`delete`.
1642
+ *
1643
+ *
1644
+ */
1645
+ readonly payload: any;
1646
+ }
1647
+ //# sourceMappingURL=responses.d.ts.map