sm-types 1.5.1 → 1.5.2

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 (57) hide show
  1. package/{dist/common → common}/index.d.ts +0 -0
  2. package/{dist/common → common}/index.js +0 -0
  3. package/{dist/common → common}/shared/index.d.ts +0 -0
  4. package/{dist/common → common}/shared/index.js +0 -0
  5. package/{dist/errors → errors}/index.d.ts +0 -0
  6. package/{dist/errors → errors}/index.js +0 -0
  7. package/{dist/errors → errors}/user/create-user.d.ts +0 -0
  8. package/{dist/errors → errors}/user/create-user.js +0 -0
  9. package/{dist/errors → errors}/user/index.d.ts +0 -0
  10. package/{dist/errors → errors}/user/index.js +0 -0
  11. package/package.json +2 -2
  12. package/{dist/sm-airlines → sm-airlines}/command-params/index.d.ts +0 -0
  13. package/{dist/sm-airlines → sm-airlines}/command-params/index.js +0 -0
  14. package/{dist/sm-airlines → sm-airlines}/dtos/index.d.ts +0 -0
  15. package/{dist/sm-airlines → sm-airlines}/dtos/index.js +0 -0
  16. package/{dist/sm-airlines → sm-airlines}/dtos/request.d.ts +0 -0
  17. package/{dist/sm-airlines → sm-airlines}/dtos/request.js +0 -0
  18. package/{dist/sm-airlines → sm-airlines}/dtos/response.d.ts +0 -0
  19. package/{dist/sm-airlines → sm-airlines}/dtos/response.js +0 -0
  20. package/{dist/sm-airlines → sm-airlines}/index.d.ts +0 -0
  21. package/{dist/sm-airlines → sm-airlines}/index.js +0 -0
  22. package/{dist/sm-azul → sm-azul}/index.d.ts +0 -0
  23. package/{dist/sm-azul → sm-azul}/index.js +0 -0
  24. package/{dist/sm-azul → sm-azul}/shared/index.d.ts +0 -0
  25. package/{dist/sm-azul → sm-azul}/shared/index.js +0 -0
  26. package/{dist/sm-car-rentals → sm-car-rentals}/index.d.ts +0 -0
  27. package/{dist/sm-car-rentals → sm-car-rentals}/index.js +0 -0
  28. package/{dist/sm-car-rentals → sm-car-rentals}/localiza/index.d.ts +0 -0
  29. package/{dist/sm-car-rentals → sm-car-rentals}/localiza/index.js +0 -0
  30. package/{dist/sm-car-rentals → sm-car-rentals}/movida/index.d.ts +0 -0
  31. package/{dist/sm-car-rentals → sm-car-rentals}/movida/index.js +0 -0
  32. package/{dist/sm-tech → sm-tech}/index.d.ts +0 -0
  33. package/{dist/sm-tech → sm-tech}/index.js +0 -0
  34. package/{dist/sm-tech → sm-tech}/shared/index.d.ts +0 -0
  35. package/{dist/sm-tech → sm-tech}/shared/index.js +0 -0
  36. package/{dist/sm-wcf → sm-wcf}/index.d.ts +0 -0
  37. package/{dist/sm-wcf → sm-wcf}/index.js +0 -0
  38. package/dist/README.md +0 -3
  39. package/dist/package.json +0 -35
  40. package/src/common/index.ts +0 -13
  41. package/src/common/shared/index.ts +0 -16
  42. package/src/errors/index.ts +0 -1
  43. package/src/errors/user/create-user.ts +0 -5
  44. package/src/errors/user/index.ts +0 -1
  45. package/src/sm-airlines/command-params/index.ts +0 -30
  46. package/src/sm-airlines/dtos/index.ts +0 -20
  47. package/src/sm-airlines/dtos/request.ts +0 -44
  48. package/src/sm-airlines/dtos/response.ts +0 -73
  49. package/src/sm-airlines/index.ts +0 -672
  50. package/src/sm-azul/index.ts +0 -231
  51. package/src/sm-azul/shared/index.ts +0 -895
  52. package/src/sm-car-rentals/index.ts +0 -163
  53. package/src/sm-car-rentals/localiza/index.ts +0 -12
  54. package/src/sm-car-rentals/movida/index.ts +0 -11
  55. package/src/sm-tech/index.ts +0 -137
  56. package/src/sm-tech/shared/index.ts +0 -116
  57. package/src/sm-wcf/index.ts +0 -201
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Smartrips",
4
4
  "license": "ISC",
5
5
  "keywords": [],
6
- "version": "1.5.1",
6
+ "version": "1.5.2",
7
7
  "description": "",
8
8
  "repository": {
9
9
  "type": "git",
@@ -14,7 +14,7 @@
14
14
  "build": "npm run transpile && npm run copy-files",
15
15
  "transpile": "tsc",
16
16
  "copy-files": "cp ./package.json ./dist && cp ./README.md ./dist",
17
- "prepublishOnly": "npm run build && cd dist"
17
+ "publish-package": "npm run build && cd ./dist && npm publish"
18
18
  },
19
19
  "engines": {
20
20
  "node": ">=12.22.0 <=13.0.0",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/README.md DELETED
@@ -1,3 +0,0 @@
1
- ## sm-types
2
-
3
- Package containing useful types for sm
package/dist/package.json DELETED
@@ -1,35 +0,0 @@
1
- {
2
- "name": "sm-types",
3
- "author": "Smartrips",
4
- "license": "ISC",
5
- "keywords": [],
6
- "version": "1.5.1",
7
- "description": "",
8
- "repository": {
9
- "type": "git",
10
- "url": "git@github.com:smartrips-br/sm-types.git"
11
- },
12
- "scripts": {
13
- "prebuild": "rimraf dist",
14
- "build": "npm run transpile && npm run copy-files",
15
- "transpile": "tsc",
16
- "copy-files": "cp ./package.json ./dist && cp ./README.md ./dist",
17
- "prepublishOnly": "npm run build && cd dist"
18
- },
19
- "engines": {
20
- "node": ">=12.22.0 <=13.0.0",
21
- "npm": ">=6.13.4",
22
- "yarn": ">=0.23.4"
23
- },
24
- "main": "index.js",
25
- "types": "index.d.ts",
26
- "files": [
27
- "*/**"
28
- ],
29
- "dependencies": {
30
- "typescript": "^4.1.3"
31
- },
32
- "devDependencies": {
33
- "rimraf": "3.0.2"
34
- }
35
- }
@@ -1,13 +0,0 @@
1
- import * as SharedTypes from './shared';
2
-
3
- export interface IPaymentMethod {
4
- holderName?: string;
5
- number?: string;
6
- expirationDate?: string;
7
- cvv?: string;
8
- brand?: SharedTypes.ICardBrandsType;
9
- pgmId?: string;
10
- creditCardToken?: string;
11
- cardType?: string;
12
- payment_type: SharedTypes.PaymentMethodType;
13
- }
@@ -1,16 +0,0 @@
1
- const ICardBrands = {
2
- MasterCard: "mastercard",
3
- Visa: "visa",
4
- Amex: "string",
5
- Diners: "diners",
6
- Elo: "elo"
7
- } as const;
8
-
9
- const PaymentMethods = {
10
- CreditCard: 'credit_card',
11
- Billed: 'billed'
12
- } as const;
13
-
14
- type ValueOf<T> = T[keyof T];
15
- export type ICardBrandsType = ValueOf<typeof ICardBrands>;
16
- export type PaymentMethodType = ValueOf<typeof PaymentMethods>
@@ -1 +0,0 @@
1
- export * as UserErrors from './user'
@@ -1,5 +0,0 @@
1
- export const CreateUser = {
2
- EMAIL_TAKEN_BY_ACTIVE_USER: 'user:create:email_taken_by_active_user',
3
- EMAIL_TAKEN_BY_INACTIVE_USER: 'user:create:email_taken_by_inactive_user'
4
- }
5
-
@@ -1 +0,0 @@
1
- export * from './create-user'
@@ -1,30 +0,0 @@
1
- import { IAddOfferReqDto, IReserveOfferReqDto, IBuyOfferReqDto } from "../dtos";
2
-
3
- export interface IAddOfferCommandParams extends IAddOfferReqDto {}
4
-
5
- export interface IRefreshAvailabilityCommandParams {
6
- offerId: string;
7
- }
8
- export interface IBuyOfferCommandParams extends IBuyOfferReqDto {
9
- offerId: string;
10
- }
11
- export interface ICancelOfferCommandParams {
12
- offerId: string;
13
- }
14
- export interface IReserveOfferCommandParams extends IReserveOfferReqDto {
15
- offerId: string;
16
- }
17
- export interface IOrderReserveOfferCommandParams extends IReserveOfferReqDto {
18
- offerId: string;
19
- webhookUrl: string;
20
- }
21
- export interface IProcessReserveCommandParams extends IReserveOfferReqDto {
22
- offerId: string;
23
- webhookPath: string;
24
- }
25
- export interface IReplaceOfferCommandParams {
26
- offerId: string;
27
- }
28
- export interface ICheckReserveQueryParams {
29
- offerId: string;
30
- }
@@ -1,20 +0,0 @@
1
- export {
2
- IAddOfferReqDto,
3
- IBuyOfferReqDto,
4
- IReserveOfferReqDto,
5
- IOrderReserveOfferReqDto,
6
- IListOffersReqDto,
7
- } from "./request";
8
- export {
9
- IListOffersResDto,
10
- IAddOfferResDto,
11
- IGetOfferDetailsResDto,
12
- IRefreshAvailabilityResDto,
13
- IReplaceOfferResDto,
14
- IReserveOfferResDto,
15
- IOrderReserveOfferResDto,
16
- ICheckReserveOfferResDto,
17
- IBuyOfferResDto,
18
- ICancelOfferResDto,
19
- IGetChargeDetailsResDto
20
- } from "./response";
@@ -1,44 +0,0 @@
1
- import {
2
- IPaxInfo,
3
- IPassengerInfo,
4
- IContactInfo,
5
- IRoute,
6
- IOrderOptions,
7
- ISmWcfOffer,
8
- } from "../index";
9
- export interface IListOffersReqDto {
10
- international: boolean;
11
- cabinClass: string;
12
- promoCode: string;
13
- airlinesCode: string;
14
- paxInfo: IPaxInfo;
15
- routes: IRoute[];
16
- config: {
17
- sortType: IOrderOptions;
18
- groupByRoute: boolean;
19
- };
20
- }
21
- export interface IAddOfferReqDto {
22
- international: boolean;
23
- offerDetails: ISmWcfOffer;
24
- cabinClass: string;
25
- promoCode: string;
26
- airlinesCode: string;
27
- paxInfo: IPaxInfo;
28
- routes: IRoute[];
29
- recordLocator?: string;
30
- bookingCode?: string;
31
- }
32
- export interface IReserveOfferReqDto {
33
- contactInfo: IContactInfo;
34
- passengersInfo: IPassengerInfo[];
35
- }
36
- export interface IOrderReserveOfferReqDto {
37
- contactInfo: IContactInfo;
38
- passengersInfo: IPassengerInfo[];
39
- webhookUrl: string;
40
- }
41
- export interface IBuyOfferReqDto {
42
- paymentDataHash: string;
43
- passengersInfo: IPassengerInfo[];
44
- }
@@ -1,73 +0,0 @@
1
- import {
2
- IListOffersFiltersInfo,
3
- ISmAzulOffer,
4
- ISmWcfOffer,
5
- IPriceDetails,
6
- ISuppliers,
7
- } from "../index";
8
- export interface IListOffersResDto {
9
- generalData: IListOffersFiltersInfo;
10
- offers: ISmWcfOffer[];
11
- }
12
- export interface IAddOfferResDto {
13
- hasPriceChanged: boolean;
14
- available: boolean;
15
- verifiedOffer: ISmWcfOffer;
16
- airlinesOfferId: number;
17
- }
18
- export declare type IGetOfferDetailsResDto = ISmAzulOffer | ISmWcfOffer;
19
- export interface IRefreshAvailabilityResDto {
20
- availability: boolean;
21
- reservedUntil?: Date;
22
- currentPrice: number;
23
- selectedPrice: number;
24
- isSamePrice: boolean;
25
- refreshedOffer: ISmWcfOffer;
26
- stillReserved: boolean;
27
- }
28
- export interface IReplaceOfferResDto {
29
- replacingOffer: ISmWcfOffer;
30
- newAirlinesOfferId: any;
31
- }
32
- export interface IReserveOfferResDto {
33
- status: string;
34
- recordLocator: string;
35
- price: number;
36
- priceDetails?: IPriceDetails;
37
- reservedUntil: Date | string;
38
- extraLocators?: string;
39
- refreshedOffer: ISmWcfOffer;
40
- }
41
- export interface IOrderReserveOfferResDto {
42
- message: string;
43
- messageId: string;
44
- }
45
- export interface ICheckReserveOfferResDto {
46
- error?: boolean;
47
- message?: string;
48
- availability: boolean;
49
- reservedUntil?: Date;
50
- currentPrice: number;
51
- selectedPrice: number;
52
- priceDetails: IPriceDetails;
53
- isSamePrice: boolean;
54
- }
55
- export interface IBuyOfferResDto {
56
- recordLocator: string;
57
- bookingCode: string;
58
- price: number;
59
- emittedAt: Date;
60
- }
61
- export interface ICancelOfferResDto {
62
- supplier: ISuppliers;
63
- recordLocator: string;
64
- costToCancel?: number;
65
- refundedValue?: number;
66
- }
67
-
68
- export interface IGetChargeDetailsResDto {
69
- client_discount: number;
70
- cia_charge: number;
71
- smartrips_charge: number;
72
- final_price: number;
73
- }