@duffel/components 3.7.23 → 3.7.25
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/components/DuffelCardForm/lib/types.d.ts +26 -6
- package/custom-elements.js +2 -2
- package/custom-elements.js.map +2 -2
- package/functions/createThreeDSecureSession/client.d.ts +19 -1
- package/functions/createThreeDSecureSession/createThreeDSecureSession.d.ts +7 -0
- package/index.js +3 -3
- package/index.js.map +2 -2
- package/package.json +4 -4
- package/stories/AirlineLogo.stories.d.ts +0 -1
- package/stories/Icon.stories.d.ts +0 -1
- package/stories/MapboxPlacesLookup.stories.d.ts +0 -1
- package/stories/NGSSliceFareCard.stories.d.ts +0 -1
- package/stories/OfferSlice.stories.d.ts +0 -1
- package/stories/OfferSliceModal.stories.d.ts +0 -1
- package/stories/PlacesLookup.stories.d.ts +0 -1
- package/stories/SliceSummary.stories.d.ts +0 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
interface CommonCardData {
|
|
2
|
+
/**
|
|
3
|
+
* Duffel's unique identifier for the resource
|
|
4
|
+
*/
|
|
2
5
|
id: string;
|
|
6
|
+
/**
|
|
7
|
+
* Whether the card was created in live mode. This field will be set to true
|
|
8
|
+
* if the card was created in live mode, or false if it was created in test mode.
|
|
9
|
+
*/
|
|
10
|
+
live_mode: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Last 4 digits of the card number.
|
|
13
|
+
*/
|
|
3
14
|
last_4_digits: string;
|
|
4
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Card brand name.
|
|
17
|
+
*/
|
|
18
|
+
brand: "visa" | "mastercard" | "uatp" | "american_express" | "diners_club" | "jcb" | "discover";
|
|
5
19
|
}
|
|
6
20
|
interface CardActionError {
|
|
7
21
|
status: number;
|
|
@@ -12,11 +26,16 @@ export interface SecurityPolicyViolationData {
|
|
|
12
26
|
}
|
|
13
27
|
export interface CreateCardForTemporaryUseData extends CommonCardData {
|
|
14
28
|
saved: false;
|
|
15
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* The ISO 8601 datetime at which the card will be automatically deleted.
|
|
31
|
+
*/
|
|
16
32
|
unavailable_at: string;
|
|
17
33
|
}
|
|
18
34
|
export interface SaveCardData extends CommonCardData {
|
|
19
35
|
saved: true;
|
|
36
|
+
/**
|
|
37
|
+
* The ISO 8601 datetime at which the card will be automatically deleted.
|
|
38
|
+
*/
|
|
20
39
|
unavailable_at: null;
|
|
21
40
|
}
|
|
22
41
|
export interface SaveCardError extends CardActionError {
|
|
@@ -67,10 +86,11 @@ export interface DuffelCardFormProps {
|
|
|
67
86
|
* The card intent defines what the form is meant to look like.
|
|
68
87
|
* It can be one of:
|
|
69
88
|
*
|
|
70
|
-
* - `to-create-card-for-temporary-use`: The full form will be shown. You may also use this intent for the use case of
|
|
71
|
-
* - `to-use-saved-card`:
|
|
72
|
-
* - `to-save-card`: The form will be shown without the
|
|
73
|
-
* but not create an
|
|
89
|
+
* - `to-create-card-for-temporary-use`: The full form will be shown. You may also use this intent for the use case of saving and using the card.
|
|
90
|
+
* - `to-use-saved-card`: Only a CVC field will be shown. When using this intent a saved card ID is required.
|
|
91
|
+
* - `to-save-card`: The form will be shown without the CVC field. This only allows you to save a card for future use,
|
|
92
|
+
* but not create an ID for immediate, temporary use. For the use case of saving and using during checkout, use the `to-create-card-for-temporary-use` intent.
|
|
93
|
+
|
|
74
94
|
*/
|
|
75
95
|
intent: DuffelCardFormIntent;
|
|
76
96
|
/**
|