@movmo_app/types 1.28.0 → 1.30.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/dist/auth.d.ts CHANGED
@@ -41,7 +41,7 @@ export type MovmoVerifyResponse = {
41
41
  export type MovmoRecoveryCancelRequest = {
42
42
  token: string;
43
43
  };
44
- export type AuthErrorCode = 'invalid_email' | 'rate_limited' | 'resend_too_soon' | 'flow_expired' | 'invalid_code' | 'too_many_attempts' | 'invalid_request' | 'invalid_credential' | 'passkey_limit' | 'credential_exists' | 'not_found' | 'reauth_required' | 'movmo_session_required' | 'first_party_only' | 'issuer_unavailable' | 'passkey_failed' | 'sign_in_failed' | 'recovery_required' | 'recovery_blocked' | 'recovery_cooldown' | 'code_sends_paused';
44
+ export type AuthErrorCode = 'invalid_email' | 'rate_limited' | 'resend_too_soon' | 'flow_expired' | 'invalid_code' | 'too_many_attempts' | 'invalid_request' | 'invalid_credential' | 'passkey_limit' | 'credential_exists' | 'not_found' | 'reauth_required' | 'movmo_session_required' | 'first_party_only' | 'issuer_unavailable' | 'passkey_failed' | 'sign_in_failed' | 'recovery_required' | 'recovery_blocked' | 'recovery_cooldown' | 'code_sends_paused' | 'account_deletion_pending' | 'booking_in_progress' | 'deletion_pending' | 'deletion_in_progress' | 'admin_account';
45
45
  /**
46
46
  * ContactType represents the types of contact information that can be changed
47
47
  * through the contact-change flow (initiate, verify-identity, confirm).
@@ -6,13 +6,19 @@
6
6
  * check OAuth consent and mint recognition tokens; `airlineName`/
7
7
  * `airlineDomain` are display-only copy substitutions on consent-disclosure
8
8
  * surfaces (recognition banner, booking-confirmation activation card, the
9
- * Connected apps "Airlines" row and grant-disclosure modal). `providerId`
10
- * joins a flight offer/booking's provider to the airline's OAuth client.
9
+ * Connected apps "Airlines" row and grant-disclosure modal). `airlineRef`
10
+ * (MOVMO-934) is the airline's Movmo customer code (`customers.company_code`,
11
+ * the checkout `airlineRef`): it is the key that joins a booking to the
12
+ * airline's OAuth client. Absent when the client has no customer of its own.
13
+ * `providerId` names the airline's booking integration (PSS) and is not
14
+ * unique per airline (demo airlines share mock providers; Aero's PSS is
15
+ * Darwin), so never pick a partner by it.
11
16
  */
12
17
  export interface IdentityPartner {
13
18
  clientId: string;
14
19
  airlineName: string;
15
20
  airlineDomain: string;
21
+ airlineRef?: string;
16
22
  providerId: string;
17
23
  supportedScopes: string[];
18
24
  }
@@ -24,6 +30,7 @@ export interface IdentityPartnerWire {
24
30
  client_id: string;
25
31
  airline_name: string;
26
32
  airline_domain: string;
33
+ airline_ref?: string;
27
34
  provider_id: string;
28
35
  supported_scopes?: string[];
29
36
  }
package/dist/identity.js CHANGED
@@ -11,12 +11,6 @@ function mapIdentityPartners(response) {
11
11
  var _a;
12
12
  return ((_a = response === null || response === void 0 ? void 0 : response.partners) !== null && _a !== void 0 ? _a : []).map((partner) => {
13
13
  var _a;
14
- return ({
15
- clientId: partner.client_id,
16
- airlineName: partner.airline_name,
17
- airlineDomain: partner.airline_domain,
18
- providerId: partner.provider_id,
19
- supportedScopes: (_a = partner.supported_scopes) !== null && _a !== void 0 ? _a : [],
20
- });
14
+ return (Object.assign(Object.assign({ clientId: partner.client_id, airlineName: partner.airline_name, airlineDomain: partner.airline_domain }, (partner.airline_ref ? { airlineRef: partner.airline_ref } : {})), { providerId: partner.provider_id, supportedScopes: (_a = partner.supported_scopes) !== null && _a !== void 0 ? _a : [] }));
21
15
  });
22
16
  }
package/dist/users.d.ts CHANGED
@@ -1,5 +1,17 @@
1
1
  import { Gender } from './types';
2
2
  import { TravelerType } from './booking';
3
+ /** Present on `GET /v1/users/me` only while an account deletion is pending. */
4
+ export type AccountDeletion = {
5
+ status: 'pending';
6
+ requested_at: string;
7
+ scheduled_for: string;
8
+ };
9
+ /** Body of `403` answered by any authenticated route while a deletion is pending. */
10
+ export type AccountDeletionPendingBody = {
11
+ code: 'account_deletion_pending';
12
+ scheduled_for?: string;
13
+ restore_url?: string;
14
+ };
3
15
  /**
4
16
  * User represents a registered user in the system.
5
17
  * JSON field names use snake_case to match the Go backend.
@@ -20,6 +32,8 @@ export type User = {
20
32
  last_login?: string;
21
33
  created_at?: string;
22
34
  updated_at?: string;
35
+ /** Set only while the account is scheduled for deletion. */
36
+ account_deletion?: AccountDeletion;
23
37
  };
24
38
  /**
25
39
  * UserPassenger represents a passenger owned by a specific user.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movmo_app/types",
3
- "version": "1.28.0",
3
+ "version": "1.30.0",
4
4
  "description": "A collection of Movmo's types",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",