@movmo_app/types 1.12.1 → 1.13.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.
@@ -33,7 +33,27 @@ export declare enum MovmoFrameMessageType {
33
33
  /** iframe → parent: a booking finished successfully. */
34
34
  BOOKING_COMPLETE = "MOVMO_BOOKING_COMPLETE",
35
35
  /** iframe → parent: a booking failed in a non-retryable way. */
36
- BOOKING_FAILED = "MOVMO_BOOKING_FAILED"
36
+ BOOKING_FAILED = "MOVMO_BOOKING_FAILED",
37
+ /**
38
+ * iframe → parent: the recognition surface's current state. Carries NO identity data by
39
+ * design — PII and the durable GUID never cross the browser. Parents use this purely to
40
+ * decide what to render (nothing / anonymous chip / recognized chip).
41
+ */
42
+ RECOGNITION_STATE = "MOVMO_RECOGNITION_STATE",
43
+ /**
44
+ * iframe → parent: the short-lived (120s), single-use recognition token the airline page
45
+ * forwards to its own backend. This is the ONLY identity-bearing value that ever crosses
46
+ * the frame boundary, and it is opaque to the parent — the parent cannot read identity out
47
+ * of it, only redeem it server-side.
48
+ */
49
+ RECOGNITION_TOKEN = "MOVMO_RECOGNITION_TOKEN",
50
+ /** iframe → parent: requested wrapper size for banner/chip transitions. */
51
+ RECOGNITION_RESIZE = "MOVMO_RECOGNITION_RESIZE",
52
+ /**
53
+ * iframe → parent: a user gesture requesting the parent start the Movmo OAuth (Flow A)
54
+ * redirect.
55
+ */
56
+ RECOGNITION_CONNECT = "MOVMO_RECOGNITION_CONNECT"
37
57
  }
38
58
  export interface MovmoReadyMessage {
39
59
  type: MovmoFrameMessageType.READY;
@@ -71,8 +91,24 @@ export interface MovmoBookingFailedMessage {
71
91
  */
72
92
  reason?: MovmoExitReason;
73
93
  }
94
+ export interface MovmoRecognitionStateMessage {
95
+ type: MovmoFrameMessageType.RECOGNITION_STATE;
96
+ state: 'recognized' | 'anonymous' | 'none';
97
+ }
98
+ export interface MovmoRecognitionTokenMessage {
99
+ type: MovmoFrameMessageType.RECOGNITION_TOKEN;
100
+ token: string;
101
+ }
102
+ export interface MovmoRecognitionResizeMessage {
103
+ type: MovmoFrameMessageType.RECOGNITION_RESIZE;
104
+ width: number;
105
+ height: number;
106
+ }
107
+ export interface MovmoRecognitionConnectMessage {
108
+ type: MovmoFrameMessageType.RECOGNITION_CONNECT;
109
+ }
74
110
  /** Discriminated union of every message exchanged across the frame boundary. */
75
- export type MovmoFrameMessage = MovmoReadyMessage | MovmoInitMessage | MovmoBookingCompleteMessage | MovmoBookingFailedMessage;
111
+ export type MovmoFrameMessage = MovmoReadyMessage | MovmoInitMessage | MovmoBookingCompleteMessage | MovmoBookingFailedMessage | MovmoRecognitionStateMessage | MovmoRecognitionTokenMessage | MovmoRecognitionResizeMessage | MovmoRecognitionConnectMessage;
76
112
  /** A per-environment origin allowlist (production vs. everything else). */
77
113
  export interface MovmoOriginAllowlist {
78
114
  prod: readonly string[];
@@ -39,6 +39,26 @@ var MovmoFrameMessageType;
39
39
  MovmoFrameMessageType["BOOKING_COMPLETE"] = "MOVMO_BOOKING_COMPLETE";
40
40
  /** iframe → parent: a booking failed in a non-retryable way. */
41
41
  MovmoFrameMessageType["BOOKING_FAILED"] = "MOVMO_BOOKING_FAILED";
42
+ /**
43
+ * iframe → parent: the recognition surface's current state. Carries NO identity data by
44
+ * design — PII and the durable GUID never cross the browser. Parents use this purely to
45
+ * decide what to render (nothing / anonymous chip / recognized chip).
46
+ */
47
+ MovmoFrameMessageType["RECOGNITION_STATE"] = "MOVMO_RECOGNITION_STATE";
48
+ /**
49
+ * iframe → parent: the short-lived (120s), single-use recognition token the airline page
50
+ * forwards to its own backend. This is the ONLY identity-bearing value that ever crosses
51
+ * the frame boundary, and it is opaque to the parent — the parent cannot read identity out
52
+ * of it, only redeem it server-side.
53
+ */
54
+ MovmoFrameMessageType["RECOGNITION_TOKEN"] = "MOVMO_RECOGNITION_TOKEN";
55
+ /** iframe → parent: requested wrapper size for banner/chip transitions. */
56
+ MovmoFrameMessageType["RECOGNITION_RESIZE"] = "MOVMO_RECOGNITION_RESIZE";
57
+ /**
58
+ * iframe → parent: a user gesture requesting the parent start the Movmo OAuth (Flow A)
59
+ * redirect.
60
+ */
61
+ MovmoFrameMessageType["RECOGNITION_CONNECT"] = "MOVMO_RECOGNITION_CONNECT";
42
62
  })(MovmoFrameMessageType || (exports.MovmoFrameMessageType = MovmoFrameMessageType = {}));
43
63
  /**
44
64
  * Origins served by Movmo's flights-ui iframe. The PARENT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movmo_app/types",
3
- "version": "1.12.1",
3
+ "version": "1.13.0",
4
4
  "description": "A collection of Movmo's types",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",