@coinflowlabs/vue 1.18.0 → 1.18.1
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/dist/coinflow-vue.js +535 -533
- package/dist/coinflow-vue.umd.cjs +11 -11
- package/dist/components/CoinflowIframe.vue.d.ts +1 -1
- package/dist/components/CoinflowPurchase.vue.d.ts +1 -1
- package/dist/components/CoinflowWithdraw.vue.d.ts +10 -1
- package/dist/lib/common/CoinflowTypes.d.ts +26 -3
- package/dist/lib/common/CoinflowUtils.d.ts +1 -1
- package/dist/lib/common/index.d.ts +4 -0
- package/dist/lib/common/types/flightTicketCartItem.d.ts +49 -0
- package/dist/lib/common/types/flightUpgradeCartItem.d.ts +49 -0
- package/dist/lib/common/types/lodgingCartItem.d.ts +37 -0
- package/dist/lib/common/types/travelCartItem.d.ts +212 -0
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
10
10
|
}, {
|
|
11
11
|
sendMessage(message: string): void;
|
|
12
12
|
handleIframeMessages({ data, origin }: {
|
|
13
|
-
data:
|
|
13
|
+
data: unknown;
|
|
14
14
|
origin: string;
|
|
15
15
|
}): void;
|
|
16
16
|
listenForMessage(isResponseValid: (response: string) => boolean): Promise<string>;
|
|
@@ -385,7 +385,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
385
385
|
}, {
|
|
386
386
|
sendMessage(message: string): void;
|
|
387
387
|
handleIframeMessages({ data, origin }: {
|
|
388
|
-
data:
|
|
388
|
+
data: unknown;
|
|
389
389
|
origin: string;
|
|
390
390
|
}): void;
|
|
391
391
|
listenForMessage(isResponseValid: (response: string) => boolean): Promise<string>;
|
|
@@ -30,6 +30,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
30
30
|
lat: number;
|
|
31
31
|
lng: number;
|
|
32
32
|
};
|
|
33
|
+
appReturnUrl?: string;
|
|
33
34
|
merchantId: string;
|
|
34
35
|
env?: import('..').CoinflowEnvs;
|
|
35
36
|
loaderBackground?: string;
|
|
@@ -38,6 +39,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
38
39
|
theme?: import('..').MerchantTheme;
|
|
39
40
|
wallet: import('..').SolanaWallet;
|
|
40
41
|
connection: import('@solana/web3.js').Connection;
|
|
42
|
+
ownerOverride?: string;
|
|
41
43
|
} | {
|
|
42
44
|
walletPubkey: string | null | undefined;
|
|
43
45
|
route: string;
|
|
@@ -61,6 +63,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
61
63
|
lat: number;
|
|
62
64
|
lng: number;
|
|
63
65
|
};
|
|
66
|
+
appReturnUrl?: string;
|
|
64
67
|
merchantId: string;
|
|
65
68
|
env?: import('..').CoinflowEnvs;
|
|
66
69
|
loaderBackground?: string;
|
|
@@ -92,6 +95,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
92
95
|
lat: number;
|
|
93
96
|
lng: number;
|
|
94
97
|
};
|
|
98
|
+
appReturnUrl?: string;
|
|
95
99
|
merchantId: string;
|
|
96
100
|
env?: import('..').CoinflowEnvs;
|
|
97
101
|
loaderBackground?: string;
|
|
@@ -123,6 +127,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
123
127
|
lat: number;
|
|
124
128
|
lng: number;
|
|
125
129
|
};
|
|
130
|
+
appReturnUrl?: string;
|
|
126
131
|
merchantId: string;
|
|
127
132
|
env?: import('..').CoinflowEnvs;
|
|
128
133
|
loaderBackground?: string;
|
|
@@ -154,6 +159,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
154
159
|
lat: number;
|
|
155
160
|
lng: number;
|
|
156
161
|
};
|
|
162
|
+
appReturnUrl?: string;
|
|
157
163
|
merchantId: string;
|
|
158
164
|
env?: import('..').CoinflowEnvs;
|
|
159
165
|
loaderBackground?: string;
|
|
@@ -185,6 +191,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
185
191
|
lat: number;
|
|
186
192
|
lng: number;
|
|
187
193
|
};
|
|
194
|
+
appReturnUrl?: string;
|
|
188
195
|
merchantId: string;
|
|
189
196
|
env?: import('..').CoinflowEnvs;
|
|
190
197
|
loaderBackground?: string;
|
|
@@ -215,6 +222,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
215
222
|
lat: number;
|
|
216
223
|
lng: number;
|
|
217
224
|
};
|
|
225
|
+
appReturnUrl?: string;
|
|
218
226
|
merchantId: string;
|
|
219
227
|
env?: import('..').CoinflowEnvs;
|
|
220
228
|
loaderBackground?: string;
|
|
@@ -246,6 +254,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
246
254
|
lat: number;
|
|
247
255
|
lng: number;
|
|
248
256
|
};
|
|
257
|
+
appReturnUrl?: string;
|
|
249
258
|
merchantId: string;
|
|
250
259
|
env?: import('..').CoinflowEnvs;
|
|
251
260
|
loaderBackground?: string;
|
|
@@ -280,7 +289,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
280
289
|
}, {
|
|
281
290
|
sendMessage(message: string): void;
|
|
282
291
|
handleIframeMessages({ data, origin }: {
|
|
283
|
-
data:
|
|
292
|
+
data: unknown;
|
|
284
293
|
origin: string;
|
|
285
294
|
}): void;
|
|
286
295
|
listenForMessage(isResponseValid: (response: string) => boolean): Promise<string>;
|
|
@@ -4,6 +4,10 @@ import { GiftCardCartItem } from './types/giftCardCartItem';
|
|
|
4
4
|
import { nftCartItem } from './types/nftCartItem';
|
|
5
5
|
import { CryptoCartItem } from './types/cryptoCartItem';
|
|
6
6
|
import { MoneyTopUpCartItem } from './types/moneyTopUpCartItem';
|
|
7
|
+
import { TravelCartItem } from './types/travelCartItem';
|
|
8
|
+
import { FlightTicketCartItem } from './types/flightTicketCartItem';
|
|
9
|
+
import { FlightUpgradeCartItem } from './types/flightUpgradeCartItem';
|
|
10
|
+
import { LodgingCartItem } from './types/lodgingCartItem';
|
|
7
11
|
export declare enum WithdrawCategory {
|
|
8
12
|
USER = "user",
|
|
9
13
|
BUSINESS = "business",
|
|
@@ -20,7 +24,8 @@ export declare enum WithdrawSpeed {
|
|
|
20
24
|
VENMO = "venmo",
|
|
21
25
|
PAYPAL = "paypal",
|
|
22
26
|
WIRE = "wire",
|
|
23
|
-
INTERAC = "interac"
|
|
27
|
+
INTERAC = "interac",
|
|
28
|
+
SWIFT = "swift"
|
|
24
29
|
}
|
|
25
30
|
export declare enum SettlementType {
|
|
26
31
|
Credits = "Credits",
|
|
@@ -244,11 +249,11 @@ export declare enum ChargebackProtectionAccountType {
|
|
|
244
249
|
PRIVATE = "private",
|
|
245
250
|
BUSINESS = "business"
|
|
246
251
|
}
|
|
247
|
-
export type CartItemClassOmitted = NftCartItemClassOmitted | Omit<GiftCardCartItem, 'listPrice'> | CryptoCartItem | MoneyTopUpCartItem;
|
|
252
|
+
export type CartItemClassOmitted = NftCartItemClassOmitted | Omit<GiftCardCartItem, 'listPrice'> | CryptoCartItem | MoneyTopUpCartItem | TravelCartItem | FlightTicketCartItem | FlightUpgradeCartItem | LodgingCartItem;
|
|
248
253
|
export type ChargebackProtectionItem = CartItemClassOmitted;
|
|
249
254
|
export type NftCartItemClassOmitted = Omit<nftCartItem, 'sellingPrice' | 'itemClass'>;
|
|
250
255
|
export type Cart = CartItem[];
|
|
251
|
-
export type CartItem = Omit<nftCartItem, 'listPrice' | 'sellingPrice'> | Omit<GiftCardCartItem, 'listPrice'> | CryptoCartItem | MoneyTopUpCartItem;
|
|
256
|
+
export type CartItem = Omit<nftCartItem, 'listPrice' | 'sellingPrice'> | Omit<GiftCardCartItem, 'listPrice'> | CryptoCartItem | MoneyTopUpCartItem | TravelCartItem | FlightTicketCartItem | FlightUpgradeCartItem | LodgingCartItem;
|
|
252
257
|
export declare enum ThreeDsChallengePreference {
|
|
253
258
|
NoPreference = "NoPreference",
|
|
254
259
|
Frictionless = "Frictionless",
|
|
@@ -382,6 +387,13 @@ export interface WithGeo {
|
|
|
382
387
|
lat: number;
|
|
383
388
|
lng: number;
|
|
384
389
|
};
|
|
390
|
+
/**
|
|
391
|
+
* Deep link (custom scheme or universal link) that reopens the host app.
|
|
392
|
+
* Used by browser-handoff checkouts (e.g. Venmo on React Native) so the
|
|
393
|
+
* standalone checkout page can route the customer back into the app after
|
|
394
|
+
* the payment app returns them to the browser.
|
|
395
|
+
*/
|
|
396
|
+
appReturnUrl?: string;
|
|
385
397
|
}
|
|
386
398
|
/**
|
|
387
399
|
* Used for Account Funding Transactions
|
|
@@ -483,12 +495,22 @@ export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
|
|
|
483
495
|
lat: number;
|
|
484
496
|
lng: number;
|
|
485
497
|
};
|
|
498
|
+
/**
|
|
499
|
+
* Deep link (custom scheme or universal link) that reopens the host app.
|
|
500
|
+
* Used by browser-handoff flows on React Native — Venmo checkout and the
|
|
501
|
+
* "Log in with PayPal" payout flow — so the standalone page routes the user
|
|
502
|
+
* back into the app after the payment/login app returns them to the browser.
|
|
503
|
+
* When omitted, PayPal linking still completes via polling but the user must
|
|
504
|
+
* switch back to the app manually.
|
|
505
|
+
*/
|
|
506
|
+
appReturnUrl?: string;
|
|
486
507
|
}
|
|
487
508
|
export type WalletTypes = SolanaWallet | EthWallet | StellarWallet;
|
|
488
509
|
export interface SolanaWalletProps {
|
|
489
510
|
wallet: SolanaWallet;
|
|
490
511
|
connection: Connection;
|
|
491
512
|
blockchain: 'solana';
|
|
513
|
+
ownerOverride?: string;
|
|
492
514
|
}
|
|
493
515
|
export type CoinflowSolanaWithdrawProps = CoinflowCommonWithdrawProps & SolanaWalletProps;
|
|
494
516
|
interface EvmWalletProps {
|
|
@@ -652,6 +674,7 @@ export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' |
|
|
|
652
674
|
disableGooglePay?: boolean;
|
|
653
675
|
theme?: MerchantTheme;
|
|
654
676
|
usePermit?: boolean;
|
|
677
|
+
ownerOverride?: string;
|
|
655
678
|
handleHeightChangeId: string | number;
|
|
656
679
|
}
|
|
657
680
|
export interface CoinflowIntentsIFrameProps {
|
|
@@ -7,7 +7,7 @@ export declare class CoinflowUtils {
|
|
|
7
7
|
static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
|
|
8
8
|
static getCoinflowAppBaseUrl(env?: CoinflowEnvs): string;
|
|
9
9
|
static getCoinflowApiUrl(env?: CoinflowEnvs): string;
|
|
10
|
-
static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, presentment, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, chargebackProtectionData, chargebackProtectionAccountType, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, accountFundingTransaction, partialUsdcChecked, redemptionCheck, allowedWithdrawSpeeds, isZeroAuthorization, zeroAuthorizationConfig, userLocation, depositAmounts, baseUrl, }: CoinflowIFrameProps & {
|
|
10
|
+
static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, presentment, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, chargebackProtectionData, chargebackProtectionAccountType, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, accountFundingTransaction, partialUsdcChecked, redemptionCheck, allowedWithdrawSpeeds, isZeroAuthorization, zeroAuthorizationConfig, userLocation, appReturnUrl, depositAmounts, ownerOverride, baseUrl, }: CoinflowIFrameProps & {
|
|
11
11
|
baseUrl?: string;
|
|
12
12
|
} & WithGeo): string;
|
|
13
13
|
static getCoinflowIntentsUrl({ baseUrl, route, color, theme, env, origins, deviceId, merchantCss, loaderBackground, handleHeightChangeId, }: CoinflowIntentsIFrameProps & {
|
|
@@ -11,6 +11,10 @@ export * from './types/AnyObject';
|
|
|
11
11
|
export * from './types/giftCardCartItem';
|
|
12
12
|
export * from './types/nftCartItem';
|
|
13
13
|
export * from './types/cryptoCartItem';
|
|
14
|
+
export * from './types/travelCartItem';
|
|
15
|
+
export * from './types/flightTicketCartItem';
|
|
16
|
+
export * from './types/flightUpgradeCartItem';
|
|
17
|
+
export * from './types/lodgingCartItem';
|
|
14
18
|
export * from './CoinflowPurchaseProtectionHeaders';
|
|
15
19
|
export * from './CoinflowProtectionInit';
|
|
16
20
|
export { default as getForterToken, captureForterToken, awaitForterToken, } from './Forter';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { CurrencyAmount, RecipientInfo } from './CartitemCommon';
|
|
2
|
+
import { AnyObject } from './AnyObject';
|
|
3
|
+
import { TravelFirstFlight, TravelTrip } from './travelCartItem';
|
|
4
|
+
/**
|
|
5
|
+
* Represents a flight ticket item in a shopping cart
|
|
6
|
+
*/
|
|
7
|
+
export interface FlightTicketCartItem {
|
|
8
|
+
/**
|
|
9
|
+
* Denotes the cart item class. The item schema is chosen based on this value.
|
|
10
|
+
* Allowed value: flightTicket
|
|
11
|
+
* Example: flightTicket
|
|
12
|
+
*/
|
|
13
|
+
itemClass: 'flightTicket';
|
|
14
|
+
/**
|
|
15
|
+
* The cart items's unique ID
|
|
16
|
+
* Example: 5de33332-546a-4171-8988-2a43d2bfe9c6
|
|
17
|
+
*/
|
|
18
|
+
id?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Any additional product data which can be provided, e.g. description, link to image, etc
|
|
21
|
+
* Example: {"any":"data","description":"This is the product description"}
|
|
22
|
+
*/
|
|
23
|
+
rawProductData?: AnyObject;
|
|
24
|
+
/**
|
|
25
|
+
* The item's selling price
|
|
26
|
+
*/
|
|
27
|
+
sellingPrice: CurrencyAmount;
|
|
28
|
+
/**
|
|
29
|
+
* The item's list price
|
|
30
|
+
*/
|
|
31
|
+
listPrice?: CurrencyAmount;
|
|
32
|
+
/**
|
|
33
|
+
* The user's personal info
|
|
34
|
+
*/
|
|
35
|
+
recipientInfo?: RecipientInfo;
|
|
36
|
+
/**
|
|
37
|
+
* The flight ticket's PNR code
|
|
38
|
+
* Example: X36Q9C
|
|
39
|
+
*/
|
|
40
|
+
pnr: string;
|
|
41
|
+
/**
|
|
42
|
+
* The trip details of the flight ticket
|
|
43
|
+
*/
|
|
44
|
+
trip: TravelTrip;
|
|
45
|
+
/**
|
|
46
|
+
* The first flight details of the trip
|
|
47
|
+
*/
|
|
48
|
+
firstFlight: TravelFirstFlight;
|
|
49
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { CurrencyAmount, RecipientInfo } from './CartitemCommon';
|
|
2
|
+
import { AnyObject } from './AnyObject';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a flight upgrade item in a shopping cart
|
|
5
|
+
*/
|
|
6
|
+
export interface FlightUpgradeCartItem {
|
|
7
|
+
/**
|
|
8
|
+
* Denotes the cart item class. The item schema is chosen based on this value.
|
|
9
|
+
* Allowed value: flightUpgrade
|
|
10
|
+
* Example: flightUpgrade
|
|
11
|
+
*/
|
|
12
|
+
itemClass: 'flightUpgrade';
|
|
13
|
+
/**
|
|
14
|
+
* The cart items's unique ID
|
|
15
|
+
* Example: 5de33332-546a-4171-8988-2a43d2bfe9c6
|
|
16
|
+
*/
|
|
17
|
+
id?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Any additional product data which can be provided, e.g. description, link to image, etc
|
|
20
|
+
* Example: {"any":"data","description":"This is the product description"}
|
|
21
|
+
*/
|
|
22
|
+
rawProductData?: AnyObject;
|
|
23
|
+
/**
|
|
24
|
+
* The item's selling price
|
|
25
|
+
*/
|
|
26
|
+
sellingPrice: CurrencyAmount;
|
|
27
|
+
/**
|
|
28
|
+
* The item's list price
|
|
29
|
+
*/
|
|
30
|
+
listPrice?: CurrencyAmount;
|
|
31
|
+
/**
|
|
32
|
+
* The user's personal info
|
|
33
|
+
*/
|
|
34
|
+
recipientInfo?: RecipientInfo;
|
|
35
|
+
/**
|
|
36
|
+
* The flight ticket's PNR code
|
|
37
|
+
* Example: X36Q9C
|
|
38
|
+
*/
|
|
39
|
+
pnr?: string;
|
|
40
|
+
/**
|
|
41
|
+
* The type of upgrade
|
|
42
|
+
* Example: changes
|
|
43
|
+
*/
|
|
44
|
+
upgradeType: 'changes' | 'fareIncrease' | 'baggage' | 'seats' | 'insurance' | 'other';
|
|
45
|
+
/**
|
|
46
|
+
* The upgrade description, required when the upgrade type is `other`
|
|
47
|
+
*/
|
|
48
|
+
description?: string;
|
|
49
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { CurrencyAmount, RecipientInfo } from './CartitemCommon';
|
|
2
|
+
import { AnyObject } from './AnyObject';
|
|
3
|
+
import { TravelLodging } from './travelCartItem';
|
|
4
|
+
/**
|
|
5
|
+
* Represents a lodging reservation item in a shopping cart.
|
|
6
|
+
* The reservation fields are flattened at the top level of the item.
|
|
7
|
+
*/
|
|
8
|
+
export interface LodgingCartItem extends TravelLodging {
|
|
9
|
+
/**
|
|
10
|
+
* Denotes the cart item class. The item schema is chosen based on this value.
|
|
11
|
+
* Allowed value: lodging
|
|
12
|
+
* Example: lodging
|
|
13
|
+
*/
|
|
14
|
+
itemClass: 'lodging';
|
|
15
|
+
/**
|
|
16
|
+
* The cart items's unique ID
|
|
17
|
+
* Example: 5de33332-546a-4171-8988-2a43d2bfe9c6
|
|
18
|
+
*/
|
|
19
|
+
id?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Any additional product data which can be provided, e.g. description, link to image, etc
|
|
22
|
+
* Example: {"any":"data","description":"This is the product description"}
|
|
23
|
+
*/
|
|
24
|
+
rawProductData?: AnyObject;
|
|
25
|
+
/**
|
|
26
|
+
* The item's selling price
|
|
27
|
+
*/
|
|
28
|
+
sellingPrice: CurrencyAmount;
|
|
29
|
+
/**
|
|
30
|
+
* The item's list price
|
|
31
|
+
*/
|
|
32
|
+
listPrice?: CurrencyAmount;
|
|
33
|
+
/**
|
|
34
|
+
* The user's personal info
|
|
35
|
+
*/
|
|
36
|
+
recipientInfo?: RecipientInfo;
|
|
37
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { CurrencyAmount, RecipientInfo } from './CartitemCommon';
|
|
2
|
+
import { AnyObject } from './AnyObject';
|
|
3
|
+
/**
|
|
4
|
+
* The booked hotel details
|
|
5
|
+
*/
|
|
6
|
+
export interface TravelLodgingHotel {
|
|
7
|
+
/**
|
|
8
|
+
* The name of the hotel
|
|
9
|
+
* Example: The Plaza Hotel
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* The two-letter code of the country in which the hotel is located
|
|
14
|
+
* Example: US
|
|
15
|
+
* Pattern: ^[A-Z]{2}$
|
|
16
|
+
*/
|
|
17
|
+
country: string;
|
|
18
|
+
/**
|
|
19
|
+
* The city in which the hotel is located
|
|
20
|
+
* Example: New York
|
|
21
|
+
*/
|
|
22
|
+
city: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The lodging details of the travel booking
|
|
26
|
+
*/
|
|
27
|
+
export interface TravelLodging {
|
|
28
|
+
/**
|
|
29
|
+
* Hotel reservation id
|
|
30
|
+
* Example: X36Q9C
|
|
31
|
+
*/
|
|
32
|
+
reservationId: string;
|
|
33
|
+
/**
|
|
34
|
+
* The number of nights booked in the reservation
|
|
35
|
+
* Min value: 1
|
|
36
|
+
* Example: 2
|
|
37
|
+
*/
|
|
38
|
+
nights: number;
|
|
39
|
+
/**
|
|
40
|
+
* The check-in date
|
|
41
|
+
* Example: 2022-05-02
|
|
42
|
+
*/
|
|
43
|
+
checkInDate: string;
|
|
44
|
+
/**
|
|
45
|
+
* The hour of day in which the check-in is done
|
|
46
|
+
* Example: 18
|
|
47
|
+
* Pattern: ^([01][0-9]|2[0-3])$
|
|
48
|
+
*/
|
|
49
|
+
checkInHour: string;
|
|
50
|
+
/**
|
|
51
|
+
* The booked hotel details
|
|
52
|
+
*/
|
|
53
|
+
hotel: TravelLodgingHotel;
|
|
54
|
+
/**
|
|
55
|
+
* Indicates whether extras were purchased in the reservation
|
|
56
|
+
*/
|
|
57
|
+
wereExtrasPurchased: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Indicates whether the reservation is refundable
|
|
60
|
+
*/
|
|
61
|
+
isRefundable: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* The most luxurious room booked in the reservation
|
|
64
|
+
* Example: Presidential Suite
|
|
65
|
+
*/
|
|
66
|
+
highestRoomType: string;
|
|
67
|
+
/**
|
|
68
|
+
* The number of rooms booked in the reservation
|
|
69
|
+
* Min value: 1
|
|
70
|
+
* Example: 2
|
|
71
|
+
*/
|
|
72
|
+
numberOfRooms: number;
|
|
73
|
+
/**
|
|
74
|
+
* The number of guests in the reservation
|
|
75
|
+
* Min value: 1
|
|
76
|
+
* Example: 4
|
|
77
|
+
*/
|
|
78
|
+
numberOfGuests: number;
|
|
79
|
+
/**
|
|
80
|
+
* The number of kids, out of the number of guests in the reservation
|
|
81
|
+
* Min value: 0
|
|
82
|
+
* Example: 2
|
|
83
|
+
*/
|
|
84
|
+
numberOfKids: number;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The trip details of the travel booking
|
|
88
|
+
*/
|
|
89
|
+
export interface TravelTrip {
|
|
90
|
+
/**
|
|
91
|
+
* The number of flights in the trip
|
|
92
|
+
* Min value: 1
|
|
93
|
+
* Example: 2
|
|
94
|
+
*/
|
|
95
|
+
numberOfFlights: number;
|
|
96
|
+
/**
|
|
97
|
+
* The number of checked bags
|
|
98
|
+
* Min value: 0
|
|
99
|
+
* Example: 1
|
|
100
|
+
*/
|
|
101
|
+
numberOfCheckedBags: number;
|
|
102
|
+
/**
|
|
103
|
+
* The first-way destination's three-letter IATA airport code
|
|
104
|
+
* Example: JFK
|
|
105
|
+
* Pattern: ^[A-Z]{3}$
|
|
106
|
+
*/
|
|
107
|
+
firstWayDestination: string;
|
|
108
|
+
/**
|
|
109
|
+
* `true` if the trip is a round-trip
|
|
110
|
+
* Example: true
|
|
111
|
+
*/
|
|
112
|
+
isRoundTrip: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* `luxurious` if the highest bought travel class in the trip is a luxury class (business/first), `economy` otherwise
|
|
115
|
+
* Example: luxurious
|
|
116
|
+
*/
|
|
117
|
+
highestClass: 'economy' | 'luxurious';
|
|
118
|
+
/**
|
|
119
|
+
* True if the trip ticket is a flexible ticket
|
|
120
|
+
* Example: true
|
|
121
|
+
*/
|
|
122
|
+
isFlexibleTicket: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* True if extras were included in the trip purchase
|
|
125
|
+
* Example: true
|
|
126
|
+
*/
|
|
127
|
+
wereExtrasPurchased: boolean;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The first flight details of the trip
|
|
131
|
+
*/
|
|
132
|
+
export interface TravelFirstFlight {
|
|
133
|
+
/**
|
|
134
|
+
* The number of travelers in the first flight
|
|
135
|
+
* Min value: 1
|
|
136
|
+
* Example: 2
|
|
137
|
+
*/
|
|
138
|
+
numberOfTravelers: number;
|
|
139
|
+
/**
|
|
140
|
+
* The timestamp of the departure, in *milliseconds* since the unix epoch
|
|
141
|
+
* Example: 1551398400000
|
|
142
|
+
*/
|
|
143
|
+
departureTime: number;
|
|
144
|
+
/**
|
|
145
|
+
* The first-flight departure airport's three-letter IATA code
|
|
146
|
+
* Example: JFK
|
|
147
|
+
* Pattern: ^[A-Z]{3}$
|
|
148
|
+
*/
|
|
149
|
+
departureAirport: string;
|
|
150
|
+
/**
|
|
151
|
+
* The first-flight duration, in hours
|
|
152
|
+
* Min value: 0
|
|
153
|
+
* Example: 3.5
|
|
154
|
+
*/
|
|
155
|
+
duration: number;
|
|
156
|
+
/**
|
|
157
|
+
* The alphanumeric flight code
|
|
158
|
+
* Example: BA2491A
|
|
159
|
+
* Pattern: ^[A-Z0-9]+$
|
|
160
|
+
*/
|
|
161
|
+
flightNumber: string;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Represents a travel booking item in a shopping cart
|
|
165
|
+
*/
|
|
166
|
+
export interface TravelCartItem {
|
|
167
|
+
/**
|
|
168
|
+
* Denotes the cart item class. The item schema is chosen based on this value.
|
|
169
|
+
* Allowed value: travel
|
|
170
|
+
* Example: travel
|
|
171
|
+
*/
|
|
172
|
+
itemClass: 'travel';
|
|
173
|
+
/**
|
|
174
|
+
* The cart items's unique ID
|
|
175
|
+
* Example: 5de33332-546a-4171-8988-2a43d2bfe9c6
|
|
176
|
+
*/
|
|
177
|
+
id?: string;
|
|
178
|
+
/**
|
|
179
|
+
* Any additional product data which can be provided, e.g. description, link to image, etc
|
|
180
|
+
* Example: {"any":"data","description":"This is the product description"}
|
|
181
|
+
*/
|
|
182
|
+
rawProductData?: AnyObject;
|
|
183
|
+
/**
|
|
184
|
+
* The item's selling price
|
|
185
|
+
*/
|
|
186
|
+
sellingPrice: CurrencyAmount;
|
|
187
|
+
/**
|
|
188
|
+
* The item's list price
|
|
189
|
+
*/
|
|
190
|
+
listPrice?: CurrencyAmount;
|
|
191
|
+
/**
|
|
192
|
+
* The user's personal info
|
|
193
|
+
*/
|
|
194
|
+
recipientInfo?: RecipientInfo;
|
|
195
|
+
/**
|
|
196
|
+
* The lodging details of the travel booking
|
|
197
|
+
*/
|
|
198
|
+
lodging: TravelLodging;
|
|
199
|
+
/**
|
|
200
|
+
* The flight ticket's PNR code
|
|
201
|
+
* Example: X36Q9C
|
|
202
|
+
*/
|
|
203
|
+
pnr: string;
|
|
204
|
+
/**
|
|
205
|
+
* The trip details of the travel booking
|
|
206
|
+
*/
|
|
207
|
+
trip: TravelTrip;
|
|
208
|
+
/**
|
|
209
|
+
* The first flight details of the trip
|
|
210
|
+
*/
|
|
211
|
+
firstFlight: TravelFirstFlight;
|
|
212
|
+
}
|