@movmo_app/types 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.
- package/README.md +3 -0
- package/dist/auth.d.ts +16 -0
- package/dist/auth.js +23 -0
- package/dist/booking.d.ts +95 -0
- package/dist/booking.js +23 -0
- package/dist/customers.d.ts +40 -0
- package/dist/customers.js +11 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +21 -0
- package/dist/types.d.ts +5 -0
- package/dist/types.js +9 -0
- package/dist/users.d.ts +18 -0
- package/dist/users.js +2 -0
- package/package.json +30 -0
package/README.md
ADDED
package/dist/auth.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum AuthenticationUsernameType {
|
|
2
|
+
EMAIL = "email",
|
|
3
|
+
PHONE_NUMBER = "phoneNumber"
|
|
4
|
+
}
|
|
5
|
+
export declare enum AuthenticationUserStatus {
|
|
6
|
+
CONFIRMED = "CONFIRMED",
|
|
7
|
+
UNCONFIRMED = "UNCONFIRMED"
|
|
8
|
+
}
|
|
9
|
+
export declare enum AuthenticationChallengeName {
|
|
10
|
+
SMS_OTP = "SMS_OTP",
|
|
11
|
+
EMAIL_OTP = "EMAIL_OTP"
|
|
12
|
+
}
|
|
13
|
+
export declare enum AuthenticationChallengeResponse {
|
|
14
|
+
SMS_OTP_CODE = "SMS_OTP_CODE",
|
|
15
|
+
EMAIL_OTP_CODE = "EMAIL_OTP_CODE"
|
|
16
|
+
}
|
package/dist/auth.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthenticationChallengeResponse = exports.AuthenticationChallengeName = exports.AuthenticationUserStatus = exports.AuthenticationUsernameType = void 0;
|
|
4
|
+
var AuthenticationUsernameType;
|
|
5
|
+
(function (AuthenticationUsernameType) {
|
|
6
|
+
AuthenticationUsernameType["EMAIL"] = "email";
|
|
7
|
+
AuthenticationUsernameType["PHONE_NUMBER"] = "phoneNumber";
|
|
8
|
+
})(AuthenticationUsernameType || (exports.AuthenticationUsernameType = AuthenticationUsernameType = {}));
|
|
9
|
+
var AuthenticationUserStatus;
|
|
10
|
+
(function (AuthenticationUserStatus) {
|
|
11
|
+
AuthenticationUserStatus["CONFIRMED"] = "CONFIRMED";
|
|
12
|
+
AuthenticationUserStatus["UNCONFIRMED"] = "UNCONFIRMED";
|
|
13
|
+
})(AuthenticationUserStatus || (exports.AuthenticationUserStatus = AuthenticationUserStatus = {}));
|
|
14
|
+
var AuthenticationChallengeName;
|
|
15
|
+
(function (AuthenticationChallengeName) {
|
|
16
|
+
AuthenticationChallengeName["SMS_OTP"] = "SMS_OTP";
|
|
17
|
+
AuthenticationChallengeName["EMAIL_OTP"] = "EMAIL_OTP";
|
|
18
|
+
})(AuthenticationChallengeName || (exports.AuthenticationChallengeName = AuthenticationChallengeName = {}));
|
|
19
|
+
var AuthenticationChallengeResponse;
|
|
20
|
+
(function (AuthenticationChallengeResponse) {
|
|
21
|
+
AuthenticationChallengeResponse["SMS_OTP_CODE"] = "SMS_OTP_CODE";
|
|
22
|
+
AuthenticationChallengeResponse["EMAIL_OTP_CODE"] = "EMAIL_OTP_CODE";
|
|
23
|
+
})(AuthenticationChallengeResponse || (exports.AuthenticationChallengeResponse = AuthenticationChallengeResponse = {}));
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Gender } from './types';
|
|
2
|
+
export declare enum FlightOfferDataSource {
|
|
3
|
+
Amadeus = "amadeus"
|
|
4
|
+
}
|
|
5
|
+
export declare enum FlightOfferSegmentLegType {
|
|
6
|
+
Inbound = "inbound",
|
|
7
|
+
Outbound = "outbound"
|
|
8
|
+
}
|
|
9
|
+
export type AircraftType = {
|
|
10
|
+
name: string;
|
|
11
|
+
iataCode: string;
|
|
12
|
+
};
|
|
13
|
+
export type City = {
|
|
14
|
+
iataCode: string;
|
|
15
|
+
name: string;
|
|
16
|
+
countryIso2: string;
|
|
17
|
+
timezone: string;
|
|
18
|
+
latitude: number;
|
|
19
|
+
longitude: number;
|
|
20
|
+
};
|
|
21
|
+
export type Airport = {
|
|
22
|
+
iataCode: string;
|
|
23
|
+
name: string;
|
|
24
|
+
city: City;
|
|
25
|
+
icaoCode: string;
|
|
26
|
+
countryName: string;
|
|
27
|
+
};
|
|
28
|
+
export type FlightOfferSegment = {
|
|
29
|
+
id: string;
|
|
30
|
+
legNumber: number;
|
|
31
|
+
legType: FlightOfferSegmentLegType;
|
|
32
|
+
departureAirport: Airport;
|
|
33
|
+
departureTime: Date;
|
|
34
|
+
departureTerminal?: string;
|
|
35
|
+
departureGate?: string;
|
|
36
|
+
arrivalAirport: Airport;
|
|
37
|
+
arrivalTime: Date;
|
|
38
|
+
arrivalTerminal?: string;
|
|
39
|
+
arrivalGate?: string;
|
|
40
|
+
duration: string;
|
|
41
|
+
layoverDuration?: string;
|
|
42
|
+
isLayoverOvernight?: boolean;
|
|
43
|
+
carrierCode: string;
|
|
44
|
+
flightNumber: string;
|
|
45
|
+
aircraft: AircraftType;
|
|
46
|
+
cabinClass: string;
|
|
47
|
+
fareBasis?: string;
|
|
48
|
+
};
|
|
49
|
+
export type FlightOfferPricingDetails = {
|
|
50
|
+
id: string;
|
|
51
|
+
baseFare: string;
|
|
52
|
+
taxesAndFees: string;
|
|
53
|
+
totalPrice: string;
|
|
54
|
+
currency: string;
|
|
55
|
+
};
|
|
56
|
+
export declare enum TravelerType {
|
|
57
|
+
ADULT = "adult",
|
|
58
|
+
CHILD = "child",
|
|
59
|
+
SENIOR = "senior",
|
|
60
|
+
YOUNG = "young",
|
|
61
|
+
HELD_INFANT = "held_infant",
|
|
62
|
+
SEATED_INFANT = "seated_infant"
|
|
63
|
+
}
|
|
64
|
+
export interface Passenger {
|
|
65
|
+
id: string;
|
|
66
|
+
firstName: string;
|
|
67
|
+
middleName?: string;
|
|
68
|
+
lastName: string;
|
|
69
|
+
gender: Gender;
|
|
70
|
+
dateOfBirth: string;
|
|
71
|
+
knownTravelerNumber?: string;
|
|
72
|
+
passportNumber?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface FlightOfferPassenger extends Passenger {
|
|
75
|
+
offerId: string;
|
|
76
|
+
travelerId: string;
|
|
77
|
+
travelerType: TravelerType;
|
|
78
|
+
}
|
|
79
|
+
export type FlightOffer = {
|
|
80
|
+
id: string;
|
|
81
|
+
dataSource: FlightOfferDataSource;
|
|
82
|
+
passengers: FlightOfferPassenger[];
|
|
83
|
+
pricingDetails: FlightOfferPricingDetails;
|
|
84
|
+
departureTime: Date;
|
|
85
|
+
returnTime?: Date;
|
|
86
|
+
departureDuration: string;
|
|
87
|
+
returnDuration?: string;
|
|
88
|
+
departureSegments: FlightOfferSegment[];
|
|
89
|
+
returnSegments?: FlightOfferSegment[];
|
|
90
|
+
expiration?: Date;
|
|
91
|
+
isRoundTrip: boolean;
|
|
92
|
+
rawOffer: object;
|
|
93
|
+
createdAt: Date;
|
|
94
|
+
updatedAt: Date;
|
|
95
|
+
};
|
package/dist/booking.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TravelerType = exports.FlightOfferSegmentLegType = exports.FlightOfferDataSource = void 0;
|
|
4
|
+
var FlightOfferDataSource;
|
|
5
|
+
(function (FlightOfferDataSource) {
|
|
6
|
+
FlightOfferDataSource["Amadeus"] = "amadeus";
|
|
7
|
+
})(FlightOfferDataSource || (exports.FlightOfferDataSource = FlightOfferDataSource = {}));
|
|
8
|
+
var FlightOfferSegmentLegType;
|
|
9
|
+
(function (FlightOfferSegmentLegType) {
|
|
10
|
+
FlightOfferSegmentLegType["Inbound"] = "inbound";
|
|
11
|
+
FlightOfferSegmentLegType["Outbound"] = "outbound";
|
|
12
|
+
})(FlightOfferSegmentLegType || (exports.FlightOfferSegmentLegType = FlightOfferSegmentLegType = {}));
|
|
13
|
+
var TravelerType;
|
|
14
|
+
(function (TravelerType) {
|
|
15
|
+
TravelerType["ADULT"] = "adult";
|
|
16
|
+
TravelerType["CHILD"] = "child";
|
|
17
|
+
TravelerType["SENIOR"] = "senior";
|
|
18
|
+
TravelerType["YOUNG"] = "young";
|
|
19
|
+
TravelerType["HELD_INFANT"] = "held_infant";
|
|
20
|
+
TravelerType["SEATED_INFANT"] = "seated_infant";
|
|
21
|
+
})(TravelerType || (exports.TravelerType = TravelerType = {}));
|
|
22
|
+
;
|
|
23
|
+
;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface Customer {
|
|
2
|
+
id: string;
|
|
3
|
+
companyName: string;
|
|
4
|
+
companyCode: string;
|
|
5
|
+
countryCode: string;
|
|
6
|
+
contactPerson: string;
|
|
7
|
+
contactEmail: string;
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
updatedAt: Date;
|
|
10
|
+
policies: CustomerPolicies;
|
|
11
|
+
}
|
|
12
|
+
export interface CustomerPolicies {
|
|
13
|
+
customerId?: string;
|
|
14
|
+
baggage: string;
|
|
15
|
+
changeFlight: string;
|
|
16
|
+
cancellation: string;
|
|
17
|
+
hazardMaterials: string;
|
|
18
|
+
animals: string;
|
|
19
|
+
createdAt: Date;
|
|
20
|
+
updatedAt: Date;
|
|
21
|
+
}
|
|
22
|
+
export declare enum CustomerResourceType {
|
|
23
|
+
STORAGE = "storage",
|
|
24
|
+
HOSTING = "hosting",
|
|
25
|
+
DNS = "dns",
|
|
26
|
+
AUTHENTICATION = "authentication",
|
|
27
|
+
AUTHORIZATION = "authorization"
|
|
28
|
+
}
|
|
29
|
+
export interface CustomerResource {
|
|
30
|
+
customerId: string;
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
type: CustomerResourceType;
|
|
34
|
+
region: string;
|
|
35
|
+
metadata: {
|
|
36
|
+
[key: string]: string;
|
|
37
|
+
};
|
|
38
|
+
createdAt: Date;
|
|
39
|
+
updatedAt: Date;
|
|
40
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomerResourceType = void 0;
|
|
4
|
+
var CustomerResourceType;
|
|
5
|
+
(function (CustomerResourceType) {
|
|
6
|
+
CustomerResourceType["STORAGE"] = "storage";
|
|
7
|
+
CustomerResourceType["HOSTING"] = "hosting";
|
|
8
|
+
CustomerResourceType["DNS"] = "dns";
|
|
9
|
+
CustomerResourceType["AUTHENTICATION"] = "authentication";
|
|
10
|
+
CustomerResourceType["AUTHORIZATION"] = "authorization";
|
|
11
|
+
})(CustomerResourceType || (exports.CustomerResourceType = CustomerResourceType = {}));
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./customers"), exports);
|
|
19
|
+
__exportStar(require("./users"), exports);
|
|
20
|
+
__exportStar(require("./booking"), exports);
|
|
21
|
+
__exportStar(require("./auth"), exports);
|
package/dist/types.d.ts
ADDED
package/dist/types.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Gender = void 0;
|
|
4
|
+
var Gender;
|
|
5
|
+
(function (Gender) {
|
|
6
|
+
Gender["MALE"] = "male";
|
|
7
|
+
Gender["FEMALE"] = "female";
|
|
8
|
+
Gender["DEFAULT"] = "";
|
|
9
|
+
})(Gender || (exports.Gender = Gender = {}));
|
package/dist/users.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Gender } from "./types";
|
|
2
|
+
export type User = {
|
|
3
|
+
id: string;
|
|
4
|
+
firstName: string;
|
|
5
|
+
middleName?: string;
|
|
6
|
+
lastName: string;
|
|
7
|
+
suffix: string;
|
|
8
|
+
email: string;
|
|
9
|
+
phoneNumber: string;
|
|
10
|
+
dateOfBirth: string;
|
|
11
|
+
gender: Gender;
|
|
12
|
+
knownTravelerNumber?: string;
|
|
13
|
+
passportNumber?: string;
|
|
14
|
+
};
|
|
15
|
+
export type UserPassenger = {
|
|
16
|
+
userId: string;
|
|
17
|
+
passengerId: string;
|
|
18
|
+
};
|
package/dist/users.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@movmo_app/types",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A collection of Movmo's types",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [],
|
|
12
|
+
"license": "ISC",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@types/node": "^20.14.2",
|
|
18
|
+
"typescript": "^5.4.5"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/movmo-app/react-js-packages.git"
|
|
24
|
+
},
|
|
25
|
+
"author": "Movmo",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/movmo-app/react-js-packages/issues"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://github.com/movmo-app/react-js-packages/blob/main/packages/@movmo-app/types/README.md"
|
|
30
|
+
}
|