@movmo_app/types 1.1.0 → 1.1.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.
package/dist/booking.d.ts CHANGED
@@ -75,6 +75,7 @@ export interface FlightOfferPassenger extends Passenger {
75
75
  }
76
76
  export type FlightOffer = {
77
77
  id: string;
78
+ customerId: string;
78
79
  dataSource: FlightOfferDataSource;
79
80
  passengers: FlightOfferPassenger[];
80
81
  pricingDetails: FlightOfferPricingDetails;
package/dist/booking.js CHANGED
@@ -16,5 +16,3 @@ var TravelerType;
16
16
  TravelerType["CHILD"] = "child";
17
17
  TravelerType["INFANT"] = "infant";
18
18
  })(TravelerType || (exports.TravelerType = TravelerType = {}));
19
- ;
20
- ;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Identity document types supported by the API.
3
+ */
4
+ export type IdentityDocumentType = 'passport' | 'visa' | 'drivers_license' | 'national_id' | 'known_traveler_number' | 'redress_number' | 'tax_id';
5
+ /**
6
+ * PassengerIdentityDocument represents a persisted identity document in the database.
7
+ * JSON field names use snake_case to match the Go backend.
8
+ */
9
+ export type PassengerIdentityDocument = {
10
+ id: string;
11
+ user_passenger_id: string;
12
+ document_type: IdentityDocumentType;
13
+ document_number: string;
14
+ issuing_country_code: string;
15
+ issuing_authority?: string;
16
+ issued_date?: string;
17
+ expires_on?: string;
18
+ nationality_on_document?: string;
19
+ birth_country?: string;
20
+ is_primary: boolean;
21
+ created_at?: string;
22
+ updated_at?: string;
23
+ };
24
+ /**
25
+ * Payload for creating or updating an identity document.
26
+ * JSON field names use snake_case to match the Go backend.
27
+ */
28
+ export type IdentityDocumentPayload = {
29
+ document_type: IdentityDocumentType;
30
+ document_number: string;
31
+ issuing_country_code: string;
32
+ issuing_authority?: string;
33
+ issued_date?: string;
34
+ expires_on?: string;
35
+ nationality_on_document?: string;
36
+ birth_country?: string;
37
+ is_primary?: boolean;
38
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/index.d.ts CHANGED
@@ -3,3 +3,4 @@ export * from './customers';
3
3
  export * from './users';
4
4
  export * from './booking';
5
5
  export * from './auth';
6
+ export * from './identity_documents';
package/dist/index.js CHANGED
@@ -19,3 +19,4 @@ __exportStar(require("./customers"), exports);
19
19
  __exportStar(require("./users"), exports);
20
20
  __exportStar(require("./booking"), exports);
21
21
  __exportStar(require("./auth"), exports);
22
+ __exportStar(require("./identity_documents"), exports);
package/dist/users.d.ts CHANGED
@@ -1,19 +1,72 @@
1
- import { Gender } from "./types";
1
+ import { Gender } from './types';
2
+ import { TravelerType } from './booking';
3
+ /**
4
+ * User represents a registered user in the system.
5
+ * JSON field names use snake_case to match the Go backend.
6
+ */
2
7
  export type User = {
3
8
  id: string;
4
- firstName: string;
5
- middleName?: string;
6
- lastName: string;
7
- suffix: string;
9
+ first_name?: string;
10
+ middle_name?: string;
11
+ last_name?: string;
12
+ suffix?: string;
8
13
  email: string;
9
- phoneNumber: string;
10
- dateOfBirth: string;
11
- gender: Gender;
12
- knownTravelerNumber?: string;
13
- passportNumber?: string;
14
+ phone_number: string;
15
+ date_of_birth?: string;
16
+ gender?: Gender;
17
+ known_traveler_number?: string;
18
+ last_login?: string;
19
+ created_at?: string;
20
+ updated_at?: string;
14
21
  };
22
+ /**
23
+ * UserPassenger represents a passenger owned by a specific user.
24
+ * All PII is stored directly on this struct (no separate passengers table).
25
+ * JSON field names use snake_case to match the Go backend.
26
+ */
15
27
  export type UserPassenger = {
16
- userId: string;
17
- passengerId: string;
18
- isDefault: boolean;
28
+ id: string;
29
+ user_id?: string;
30
+ first_name: string;
31
+ middle_name?: string;
32
+ last_name: string;
33
+ gender: Gender;
34
+ date_of_birth: string;
35
+ email?: string;
36
+ phone_number?: string;
37
+ nationality?: string;
38
+ traveler_type?: TravelerType;
39
+ is_default: boolean;
40
+ created_at?: string;
41
+ updated_at?: string;
42
+ };
43
+ /**
44
+ * Payload for creating a new user passenger.
45
+ * JSON field names use snake_case to match the Go backend.
46
+ */
47
+ export type CreateUserPassengerPayload = {
48
+ first_name: string;
49
+ middle_name?: string;
50
+ last_name: string;
51
+ gender: Gender | string;
52
+ date_of_birth: string;
53
+ email?: string;
54
+ phone_number?: string;
55
+ nationality?: string;
56
+ is_default?: boolean;
57
+ };
58
+ /**
59
+ * Payload for updating an existing user passenger.
60
+ * JSON field names use snake_case to match the Go backend.
61
+ */
62
+ export type UpdateUserPassengerPayload = {
63
+ first_name?: string;
64
+ middle_name?: string;
65
+ last_name?: string;
66
+ gender?: Gender | string;
67
+ date_of_birth?: string;
68
+ email?: string;
69
+ phone_number?: string;
70
+ nationality?: string;
71
+ is_default?: boolean;
19
72
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movmo_app/types",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "A collection of Movmo's types",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",