sm-types 1.0.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/README.md +3 -0
- package/common/index.d.ts +11 -0
- package/common/index.js +2 -0
- package/common/shared/index.d.ts +10 -0
- package/common/shared/index.js +9 -0
- package/package.json +26 -0
- package/sm-airlines/command-params/index.d.ts +21 -0
- package/sm-airlines/command-params/index.js +2 -0
- package/sm-airlines/dtos/index.d.ts +2 -0
- package/sm-airlines/dtos/index.js +2 -0
- package/sm-airlines/dtos/request.d.ts +30 -0
- package/sm-airlines/dtos/request.js +2 -0
- package/sm-airlines/dtos/response.d.ts +54 -0
- package/sm-airlines/dtos/response.js +2 -0
- package/sm-airlines/index.d.ts +578 -0
- package/sm-airlines/index.js +110 -0
- package/sm-azul/index.d.ts +203 -0
- package/sm-azul/index.js +13 -0
- package/sm-azul/shared/index.d.ts +767 -0
- package/sm-azul/shared/index.js +210 -0
- package/sm-car-rentals/index.d.ts +128 -0
- package/sm-car-rentals/index.js +16 -0
- package/sm-car-rentals/localiza/index.d.ts +12 -0
- package/sm-car-rentals/localiza/index.js +2 -0
- package/sm-car-rentals/movida/index.d.ts +11 -0
- package/sm-car-rentals/movida/index.js +2 -0
- package/sm-tech/index.d.ts +103 -0
- package/sm-tech/index.js +13 -0
- package/sm-tech/shared/index.d.ts +84 -0
- package/sm-tech/shared/index.js +21 -0
- package/sm-wcf/index.d.ts +183 -0
- package/sm-wcf/index.js +2 -0
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as SharedTypes from './shared';
|
|
2
|
+
export interface ICreditCard {
|
|
3
|
+
holderName: string;
|
|
4
|
+
number: string;
|
|
5
|
+
expirationDate: string;
|
|
6
|
+
cvv: string;
|
|
7
|
+
brand: SharedTypes.ICardBrandsType;
|
|
8
|
+
pgmId?: string;
|
|
9
|
+
creditCardToken?: string;
|
|
10
|
+
cardType?: string;
|
|
11
|
+
}
|
package/common/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const ICardBrands: {
|
|
2
|
+
readonly MasterCard: "mastercard";
|
|
3
|
+
readonly Visa: "visa";
|
|
4
|
+
readonly Amex: "string";
|
|
5
|
+
readonly Diners: "diners";
|
|
6
|
+
readonly Elo: "elo";
|
|
7
|
+
};
|
|
8
|
+
declare type ValueOf<T> = T[keyof T];
|
|
9
|
+
export declare type ICardBrandsType = ValueOf<typeof ICardBrands>;
|
|
10
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sm-types",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "tsc",
|
|
7
|
+
"prepare": "npm run build",
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [],
|
|
11
|
+
"author": "Caio Poyares",
|
|
12
|
+
"license": "ISC",
|
|
13
|
+
"main": "index.js",
|
|
14
|
+
"types": "index.d.ts",
|
|
15
|
+
"files": [
|
|
16
|
+
"/common",
|
|
17
|
+
"/sm-tech",
|
|
18
|
+
"/sm-wcf",
|
|
19
|
+
"/sm-azul",
|
|
20
|
+
"/sm-airlines",
|
|
21
|
+
"/sm-car-rentals"
|
|
22
|
+
],
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"typescript": "^4.1.3"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IAddOfferReqDto, IReserveOfferReqDto, IBuyOfferReqDto } from "../dtos";
|
|
2
|
+
export interface IAddOfferCommandParams extends IAddOfferReqDto {
|
|
3
|
+
}
|
|
4
|
+
export interface IRefreshAvailabilityCommandParams {
|
|
5
|
+
offerId: string;
|
|
6
|
+
}
|
|
7
|
+
export interface IBuyOfferCommandParams extends IBuyOfferReqDto {
|
|
8
|
+
offerId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ICancelOfferCommandParams {
|
|
11
|
+
offerId: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IReserveOfferCommandParams extends IReserveOfferReqDto {
|
|
14
|
+
offerId: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IReplaceOfferCommandParams {
|
|
17
|
+
offerId: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ICheckReserveQueryParams {
|
|
20
|
+
offerId: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { IAddOfferReqDto, IBuyOfferReqDto, IReserveOfferReqDto, IListOffersReqDto, } from "./request";
|
|
2
|
+
export { IListOffersResDto, IAddOfferResDto, IGetOfferDetailsResDto, IRefreshAvailabilityResDto, IReplaceOfferResDto, IReserveOfferResDto, ICheckReserveOfferResDto, IBuyOfferResDto, ICancelOfferResDto, } from "./response";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IPaxInfo, IPassengerInfo, IContactInfo, IRoute, IOrderOptions, ISmWcfOffer } from "../index";
|
|
2
|
+
export interface IListOffersReqDto {
|
|
3
|
+
international: boolean;
|
|
4
|
+
cabinClass: string;
|
|
5
|
+
promoCode: string;
|
|
6
|
+
paxInfo: IPaxInfo;
|
|
7
|
+
routes: IRoute[];
|
|
8
|
+
config: {
|
|
9
|
+
sortType: IOrderOptions;
|
|
10
|
+
groupByRoute: boolean;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface IAddOfferReqDto {
|
|
14
|
+
international: boolean;
|
|
15
|
+
offerDetails: ISmWcfOffer;
|
|
16
|
+
cabinClass: string;
|
|
17
|
+
promoCode: string;
|
|
18
|
+
paxInfo: IPaxInfo;
|
|
19
|
+
routes: IRoute[];
|
|
20
|
+
recordLocator?: string;
|
|
21
|
+
bookingCode?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface IReserveOfferReqDto {
|
|
24
|
+
contactInfo: IContactInfo;
|
|
25
|
+
passengersInfo: IPassengerInfo[];
|
|
26
|
+
}
|
|
27
|
+
export interface IBuyOfferReqDto {
|
|
28
|
+
paymentDataHash: string;
|
|
29
|
+
passengersInfo: IPassengerInfo[];
|
|
30
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { IListOffersFiltersInfo, ISmAzulOffer, ISmWcfOffer, IPriceDetails, ISuppliers } from "../index";
|
|
2
|
+
export interface IListOffersResDto {
|
|
3
|
+
generalData: IListOffersFiltersInfo;
|
|
4
|
+
offers: ISmWcfOffer[];
|
|
5
|
+
}
|
|
6
|
+
export interface IAddOfferResDto {
|
|
7
|
+
hasPriceChanged: boolean;
|
|
8
|
+
available: boolean;
|
|
9
|
+
verifiedOffer: ISmWcfOffer;
|
|
10
|
+
airlinesOfferId: number;
|
|
11
|
+
}
|
|
12
|
+
export declare type IGetOfferDetailsResDto = ISmAzulOffer | ISmWcfOffer;
|
|
13
|
+
export interface IRefreshAvailabilityResDto {
|
|
14
|
+
availability: boolean;
|
|
15
|
+
currentPrice: number;
|
|
16
|
+
selectedPrice: number;
|
|
17
|
+
isSamePrice: boolean;
|
|
18
|
+
refreshedOffer: ISmWcfOffer;
|
|
19
|
+
stillReserved: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface IReplaceOfferResDto {
|
|
22
|
+
replacingOffer: ISmWcfOffer;
|
|
23
|
+
newAirlinesOfferId: any;
|
|
24
|
+
}
|
|
25
|
+
export interface IReserveOfferResDto {
|
|
26
|
+
status: string;
|
|
27
|
+
recordLocator: string;
|
|
28
|
+
price: number;
|
|
29
|
+
priceDetails?: IPriceDetails;
|
|
30
|
+
reservedUntil: Date | string;
|
|
31
|
+
extraLocators?: string;
|
|
32
|
+
refreshedOffer: ISmWcfOffer;
|
|
33
|
+
}
|
|
34
|
+
export interface ICheckReserveOfferResDto {
|
|
35
|
+
error?: boolean;
|
|
36
|
+
message?: string;
|
|
37
|
+
availability: boolean;
|
|
38
|
+
currentPrice: number;
|
|
39
|
+
selectedPrice: number;
|
|
40
|
+
priceDetails: IPriceDetails;
|
|
41
|
+
isSamePrice: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface IBuyOfferResDto {
|
|
44
|
+
recordLocator: string;
|
|
45
|
+
bookingCode: string;
|
|
46
|
+
price: number;
|
|
47
|
+
emittedAt: Date;
|
|
48
|
+
}
|
|
49
|
+
export interface ICancelOfferResDto {
|
|
50
|
+
supplier: ISuppliers;
|
|
51
|
+
recordLocator: string;
|
|
52
|
+
costToCancel?: number;
|
|
53
|
+
refundedValue?: number;
|
|
54
|
+
}
|