@userflow-tech/react-native 0.1.0 → 0.1.1

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 (142) hide show
  1. package/README.md +24 -14
  2. package/app.plugin.js +3 -0
  3. package/babel-plugin/index.d.ts +43 -0
  4. package/babel-plugin/index.d.ts.map +1 -0
  5. package/babel-plugin/index.js +854 -0
  6. package/babel-plugin/index.js.map +1 -0
  7. package/docs/deep-linking.md +2 -2
  8. package/docs/troubleshooting.md +2 -2
  9. package/expo-plugin/withUserflow.d.ts +17 -0
  10. package/expo-plugin/withUserflow.d.ts.map +1 -0
  11. package/expo-plugin/withUserflow.js +99 -0
  12. package/expo-plugin/withUserflow.js.map +1 -0
  13. package/lib/commonjs/anchors/AutoAnchorRegistry.js +1 -1
  14. package/lib/commonjs/anchors/autoAnchor.js +1 -1
  15. package/lib/commonjs/anchors/hintsCodec.js +1 -1
  16. package/lib/commonjs/pairing/diagnostics.js +2 -2
  17. package/lib/commonjs/pairing/diagnostics.js.map +1 -1
  18. package/lib/commonjs/version.js +1 -1
  19. package/lib/module/anchors/AutoAnchorRegistry.js +1 -1
  20. package/lib/module/anchors/autoAnchor.js +1 -1
  21. package/lib/module/anchors/hintsCodec.js +1 -1
  22. package/lib/module/pairing/diagnostics.js +2 -2
  23. package/lib/module/pairing/diagnostics.js.map +1 -1
  24. package/lib/module/version.js +1 -1
  25. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +1 -1
  26. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  27. package/lib/typescript/commonjs/src/anchors/autoAnchor.d.ts +1 -1
  28. package/lib/typescript/commonjs/src/anchors/hintsCodec.d.ts +1 -1
  29. package/lib/typescript/commonjs/src/version.d.ts +1 -1
  30. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +1 -1
  31. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  32. package/lib/typescript/module/src/anchors/autoAnchor.d.ts +1 -1
  33. package/lib/typescript/module/src/anchors/hintsCodec.d.ts +1 -1
  34. package/lib/typescript/module/src/version.d.ts +1 -1
  35. package/package.json +15 -7
  36. package/src/anchors/AutoAnchorRegistry.ts +1 -1
  37. package/src/anchors/autoAnchor.ts +1 -1
  38. package/src/anchors/hintsCodec.ts +1 -1
  39. package/src/pairing/diagnostics.ts +2 -2
  40. package/src/version.ts +1 -1
  41. package/vendor/core/LICENSE +76 -0
  42. package/vendor/core/README.md +9 -0
  43. package/vendor/core/dist/attributes.d.ts +16 -0
  44. package/vendor/core/dist/attributes.d.ts.map +1 -0
  45. package/vendor/core/dist/attributes.js +55 -0
  46. package/vendor/core/dist/attributes.js.map +1 -0
  47. package/vendor/core/dist/constants.d.ts +21 -0
  48. package/vendor/core/dist/constants.d.ts.map +1 -0
  49. package/vendor/core/dist/constants.js +21 -0
  50. package/vendor/core/dist/constants.js.map +1 -0
  51. package/vendor/core/dist/engine/ClientConditionEngine.d.ts +68 -0
  52. package/vendor/core/dist/engine/ClientConditionEngine.d.ts.map +1 -0
  53. package/vendor/core/dist/engine/ClientConditionEngine.js +197 -0
  54. package/vendor/core/dist/engine/ClientConditionEngine.js.map +1 -0
  55. package/vendor/core/dist/engine/FlowSessionEngine.d.ts +92 -0
  56. package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -0
  57. package/vendor/core/dist/engine/FlowSessionEngine.js +310 -0
  58. package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -0
  59. package/vendor/core/dist/engine/PairingEngine.d.ts +92 -0
  60. package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -0
  61. package/vendor/core/dist/engine/PairingEngine.js +302 -0
  62. package/vendor/core/dist/engine/PairingEngine.js.map +1 -0
  63. package/vendor/core/dist/engine/UserflowCore.d.ts +126 -0
  64. package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -0
  65. package/vendor/core/dist/engine/UserflowCore.js +266 -0
  66. package/vendor/core/dist/engine/UserflowCore.js.map +1 -0
  67. package/vendor/core/dist/engine/handleActions.d.ts +19 -0
  68. package/vendor/core/dist/engine/handleActions.d.ts.map +1 -0
  69. package/vendor/core/dist/engine/handleActions.js +71 -0
  70. package/vendor/core/dist/engine/handleActions.js.map +1 -0
  71. package/vendor/core/dist/engine/interpolateSessionData.d.ts +7 -0
  72. package/vendor/core/dist/engine/interpolateSessionData.d.ts.map +1 -0
  73. package/vendor/core/dist/engine/interpolateSessionData.js +29 -0
  74. package/vendor/core/dist/engine/interpolateSessionData.js.map +1 -0
  75. package/vendor/core/dist/errors.d.ts +9 -0
  76. package/vendor/core/dist/errors.d.ts.map +1 -0
  77. package/vendor/core/dist/errors.js +15 -0
  78. package/vendor/core/dist/errors.js.map +1 -0
  79. package/vendor/core/dist/eventAttributes.d.ts +7 -0
  80. package/vendor/core/dist/eventAttributes.d.ts.map +1 -0
  81. package/vendor/core/dist/eventAttributes.js +31 -0
  82. package/vendor/core/dist/eventAttributes.js.map +1 -0
  83. package/vendor/core/dist/index.d.ts +30 -0
  84. package/vendor/core/dist/index.d.ts.map +1 -0
  85. package/vendor/core/dist/index.js +21 -0
  86. package/vendor/core/dist/index.js.map +1 -0
  87. package/vendor/core/dist/transport/backoff.d.ts +11 -0
  88. package/vendor/core/dist/transport/backoff.d.ts.map +1 -0
  89. package/vendor/core/dist/transport/backoff.js +17 -0
  90. package/vendor/core/dist/transport/backoff.js.map +1 -0
  91. package/vendor/core/dist/transport/pairing.d.ts +121 -0
  92. package/vendor/core/dist/transport/pairing.d.ts.map +1 -0
  93. package/vendor/core/dist/transport/pairing.js +551 -0
  94. package/vendor/core/dist/transport/pairing.js.map +1 -0
  95. package/vendor/core/dist/transport/phoenix.d.ts +223 -0
  96. package/vendor/core/dist/transport/phoenix.d.ts.map +1 -0
  97. package/vendor/core/dist/transport/phoenix.js +757 -0
  98. package/vendor/core/dist/transport/phoenix.js.map +1 -0
  99. package/vendor/core/dist/transport/rateLimiter.d.ts +17 -0
  100. package/vendor/core/dist/transport/rateLimiter.d.ts.map +1 -0
  101. package/vendor/core/dist/transport/rateLimiter.js +30 -0
  102. package/vendor/core/dist/transport/rateLimiter.js.map +1 -0
  103. package/vendor/core/dist/transport/scheduler.d.ts +12 -0
  104. package/vendor/core/dist/transport/scheduler.d.ts.map +1 -0
  105. package/vendor/core/dist/transport/scheduler.js +11 -0
  106. package/vendor/core/dist/transport/scheduler.js.map +1 -0
  107. package/vendor/core/dist/types.d.ts +35 -0
  108. package/vendor/core/dist/types.d.ts.map +1 -0
  109. package/vendor/core/dist/types.js +2 -0
  110. package/vendor/core/dist/types.js.map +1 -0
  111. package/vendor/core/dist/version.d.ts +3 -0
  112. package/vendor/core/dist/version.d.ts.map +1 -0
  113. package/vendor/core/dist/version.js +3 -0
  114. package/vendor/core/dist/version.js.map +1 -0
  115. package/vendor/core/package.json +20 -0
  116. package/vendor/protocol/LICENSE +76 -0
  117. package/vendor/protocol/README.md +8 -0
  118. package/vendor/protocol/dist/autoData.d.ts +232 -0
  119. package/vendor/protocol/dist/autoData.d.ts.map +1 -0
  120. package/vendor/protocol/dist/autoData.js +78 -0
  121. package/vendor/protocol/dist/autoData.js.map +1 -0
  122. package/vendor/protocol/dist/events.d.ts +16 -0
  123. package/vendor/protocol/dist/events.d.ts.map +1 -0
  124. package/vendor/protocol/dist/events.js +8 -0
  125. package/vendor/protocol/dist/events.js.map +1 -0
  126. package/vendor/protocol/dist/flows.d.ts +298 -0
  127. package/vendor/protocol/dist/flows.d.ts.map +1 -0
  128. package/vendor/protocol/dist/flows.js +154 -0
  129. package/vendor/protocol/dist/flows.js.map +1 -0
  130. package/vendor/protocol/dist/index.d.ts +24 -0
  131. package/vendor/protocol/dist/index.d.ts.map +1 -0
  132. package/vendor/protocol/dist/index.js +16 -0
  133. package/vendor/protocol/dist/index.js.map +1 -0
  134. package/vendor/protocol/dist/messages.d.ts +166 -0
  135. package/vendor/protocol/dist/messages.d.ts.map +1 -0
  136. package/vendor/protocol/dist/messages.js +57 -0
  137. package/vendor/protocol/dist/messages.js.map +1 -0
  138. package/vendor/protocol/dist/pairing.d.ts +56 -0
  139. package/vendor/protocol/dist/pairing.d.ts.map +1 -0
  140. package/vendor/protocol/dist/pairing.js +146 -0
  141. package/vendor/protocol/dist/pairing.js.map +1 -0
  142. package/vendor/protocol/package.json +17 -0
@@ -0,0 +1,166 @@
1
+ /**
2
+ * Server/client wire messages (Phase 3, slice 1).
3
+ *
4
+ * Curated subset of the message unions from the web SDK's
5
+ * `end-user-protocol.ts`, limited to the flow-session lifecycle,
6
+ * condition-wait-timer, and client-condition messages needed to render
7
+ * modal/tooltip flows and gate them on device-local state. The full web
8
+ * unions carry many more message kinds (banner/checklist/resource-center/
9
+ * site sessions, assistant, trackers, etc.) that are out of scope here.
10
+ */
11
+ import type { Decimal, EndFlowReasonInput, FlowConditionFragment, FlowSessionFragment } from './flows.js';
12
+ import type { TrackEvent } from './events.js';
13
+ export interface SetFlowSession {
14
+ kind: 'SetFlowSession';
15
+ session: FlowSessionFragment;
16
+ }
17
+ export interface UnsetFlowSession {
18
+ kind: 'UnsetFlowSession';
19
+ sessionId: string;
20
+ }
21
+ export interface ForceGoToStep {
22
+ kind: 'ForceGoToStep';
23
+ sessionId: string;
24
+ stepId: string;
25
+ }
26
+ export interface StartConditionWaitTimer {
27
+ kind: 'StartConditionWaitTimer';
28
+ conditionId: string;
29
+ waitTime: Decimal;
30
+ }
31
+ export interface CancelConditionWaitTimer {
32
+ kind: 'CancelConditionWaitTimer';
33
+ conditionId: string;
34
+ }
35
+ export interface TrackClientCondition {
36
+ kind: 'TrackClientCondition';
37
+ condition: FlowConditionFragment;
38
+ flowId: string;
39
+ versionId: string;
40
+ }
41
+ export interface UntrackClientCondition {
42
+ kind: 'UntrackClientCondition';
43
+ conditionId: string;
44
+ }
45
+ /**
46
+ * The start condition being tested via {@link TestStartCondition} finally
47
+ * matched, so the server started the flow. Ends the waiting period.
48
+ */
49
+ export interface TestStartConditionSuccess {
50
+ kind: 'TestStartConditionSuccess';
51
+ }
52
+ export type ServerMessage = SetFlowSession | UnsetFlowSession | ForceGoToStep | StartConditionWaitTimer | CancelConditionWaitTimer | TrackClientCondition | UntrackClientCondition | TestStartConditionSuccess;
53
+ export interface GoToStep {
54
+ kind: 'GoToStep';
55
+ sessionId: string;
56
+ stepId: string;
57
+ }
58
+ export interface EndFlow {
59
+ kind: 'EndFlow';
60
+ sessionId: string;
61
+ endReason: EndFlowReasonInput;
62
+ }
63
+ export interface ReportTooltipTargetMissing {
64
+ kind: 'ReportTooltipTargetMissing';
65
+ sessionId: string;
66
+ stepId: string;
67
+ }
68
+ export interface AnswerQuestion {
69
+ kind: 'AnswerQuestion';
70
+ sessionId: string;
71
+ questionCvid?: string | null;
72
+ questionName?: string | null;
73
+ textAnswer: string | null;
74
+ numberAnswer: Decimal | null;
75
+ listAnswer: null | string[];
76
+ }
77
+ export interface FireConditionWaitTimer {
78
+ kind: 'FireConditionWaitTimer';
79
+ conditionId: string;
80
+ }
81
+ export interface ToggleClientCondition {
82
+ kind: 'ToggleClientCondition';
83
+ conditionId: string;
84
+ isTrue: boolean;
85
+ }
86
+ /**
87
+ * Client viewport / location context sent on join and location changes.
88
+ *
89
+ * Wire contract (backend `ClientContext`):
90
+ * - `pageUrl` is **required**. Mobile does not use web URLs — send `""`.
91
+ * - Location is reported as `screenPath` (Expo Router pathname) and/or
92
+ * `screenName` (React Navigation / manual route name). Do not send the
93
+ * legacy `path` / `screen` keys — the schema rejects unknown properties.
94
+ */
95
+ export interface ClientContext {
96
+ /** Required by the backend. Use `""` on mobile (web-only URL). */
97
+ pageUrl: string;
98
+ viewportWidth: number;
99
+ viewportHeight: number;
100
+ /** Expo Router pathname (e.g. `"/settings/billing"`). */
101
+ screenPath?: string | null;
102
+ /** React Navigation / manual screen name (e.g. `"BillingSettings"`). */
103
+ screenName?: string | null;
104
+ site?: boolean | null;
105
+ siteId?: string;
106
+ localeCode?: string | null;
107
+ }
108
+ /**
109
+ * Location update from a mobile navigation change.
110
+ *
111
+ * Host helpers still speak `path` (Expo Router) vs `screen` (React Navigation);
112
+ * {@link UserflowCore.updateScreen} maps those onto `screenPath` / `screenName`
113
+ * on {@link ClientContext}.
114
+ */
115
+ export type ClientLocationUpdate = {
116
+ path: string;
117
+ } | {
118
+ screen: string;
119
+ };
120
+ export interface UpdateClientContext {
121
+ kind: 'UpdateClientContext';
122
+ clientContext: ClientContext;
123
+ }
124
+ /** Start (or re-start) a flow from a short-lived builder/preview token. */
125
+ export interface StartFlowWithToken {
126
+ kind: 'StartFlowWithToken';
127
+ token: string;
128
+ }
129
+ /**
130
+ * Ask the server to wait for the flow's start condition instead of starting it
131
+ * immediately. Used by the builder's "when auto start conditions are triggered"
132
+ * preview mode; `StartFlowWithToken` force-starts and skips condition checks.
133
+ */
134
+ export interface TestStartCondition {
135
+ kind: 'TestStartCondition';
136
+ token: string;
137
+ }
138
+ /** Stop waiting on a start condition started by {@link TestStartCondition}. */
139
+ export interface TestStartConditionCancel {
140
+ kind: 'TestStartConditionCancel';
141
+ }
142
+ /**
143
+ * Snapshot entry included in the end-user channel join payload so the server
144
+ * can seed `tracked` / `true` / `false` client-condition sets on (re)join.
145
+ * `isTrue` is three-state: `true`, `false`, or `null` (unknown).
146
+ */
147
+ export interface JoinPayloadClientCondition {
148
+ conditionId: string;
149
+ isTrue: boolean | null;
150
+ }
151
+ /**
152
+ * Which SDK is joining the end-user channel. The server defaults a missing
153
+ * value to `WEB`, and `check_sessions` then drops flows built for the other
154
+ * platform — so the mobile client must send `REACT_NATIVE` or a Builder
155
+ * preview is started and immediately unset.
156
+ */
157
+ export declare enum TargetPlatform {
158
+ WEB = "WEB",
159
+ REACT_NATIVE = "REACT_NATIVE"
160
+ }
161
+ export type ClientMessage = GoToStep | EndFlow | ReportTooltipTargetMissing | AnswerQuestion | FireConditionWaitTimer | UpdateClientContext | ToggleClientCondition | StartFlowWithToken | TestStartCondition | TestStartConditionCancel | TrackEvent;
162
+ export declare const SERVER_MESSAGE_KINDS: readonly ["SetFlowSession", "UnsetFlowSession", "ForceGoToStep", "StartConditionWaitTimer", "CancelConditionWaitTimer", "TrackClientCondition", "UntrackClientCondition", "TestStartConditionSuccess"];
163
+ export declare const CLIENT_MESSAGE_KINDS: readonly ["GoToStep", "EndFlow", "ReportTooltipTargetMissing", "AnswerQuestion", "FireConditionWaitTimer", "UpdateClientContext", "ToggleClientCondition", "StartFlowWithToken", "TestStartCondition", "TestStartConditionCancel", "TrackEvent"];
164
+ export declare function isServerMessage(value: unknown): value is ServerMessage;
165
+ export declare function isClientMessage(value: unknown): value is ClientMessage;
166
+ //# sourceMappingURL=messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACV,OAAO,EACP,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,gBAAgB,CAAC;IACvB,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,eAAe,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,yBAAyB,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,0BAA0B,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;I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AAQ;IACX,YAAY,iBAAiB;CAC9B;AAED,MAAM,MAAM,aAAa,GACrB,QAAQ,GACR,OAAO,GACP,0BAA0B,GAC1B,cAAc,GACd,sBAAsB,GACtB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,GAClB,kBAAkB,GAClB,wBAAwB,GACxB,UAAU,CAAC;AAEf,eAAO,MAAM,oBAAoB,wMASoB,CAAC;AAEtD,eAAO,MAAM,oBAAoB,kPAYoB,CAAC;AAWtD,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAEtE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAEtE"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Server/client wire messages (Phase 3, slice 1).
3
+ *
4
+ * Curated subset of the message unions from the web SDK's
5
+ * `end-user-protocol.ts`, limited to the flow-session lifecycle,
6
+ * condition-wait-timer, and client-condition messages needed to render
7
+ * modal/tooltip flows and gate them on device-local state. The full web
8
+ * unions carry many more message kinds (banner/checklist/resource-center/
9
+ * site sessions, assistant, trackers, etc.) that are out of scope here.
10
+ */
11
+ /**
12
+ * Which SDK is joining the end-user channel. The server defaults a missing
13
+ * value to `WEB`, and `check_sessions` then drops flows built for the other
14
+ * platform — so the mobile client must send `REACT_NATIVE` or a Builder
15
+ * preview is started and immediately unset.
16
+ */
17
+ export var TargetPlatform;
18
+ (function (TargetPlatform) {
19
+ TargetPlatform["WEB"] = "WEB";
20
+ TargetPlatform["REACT_NATIVE"] = "REACT_NATIVE";
21
+ })(TargetPlatform || (TargetPlatform = {}));
22
+ export const SERVER_MESSAGE_KINDS = [
23
+ 'SetFlowSession',
24
+ 'UnsetFlowSession',
25
+ 'ForceGoToStep',
26
+ 'StartConditionWaitTimer',
27
+ 'CancelConditionWaitTimer',
28
+ 'TrackClientCondition',
29
+ 'UntrackClientCondition',
30
+ 'TestStartConditionSuccess',
31
+ ];
32
+ export const CLIENT_MESSAGE_KINDS = [
33
+ 'GoToStep',
34
+ 'EndFlow',
35
+ 'ReportTooltipTargetMissing',
36
+ 'AnswerQuestion',
37
+ 'FireConditionWaitTimer',
38
+ 'UpdateClientContext',
39
+ 'ToggleClientCondition',
40
+ 'StartFlowWithToken',
41
+ 'TestStartCondition',
42
+ 'TestStartConditionCancel',
43
+ 'TrackEvent',
44
+ ];
45
+ function hasStringKind(value) {
46
+ return (typeof value === 'object' &&
47
+ value !== null &&
48
+ 'kind' in value &&
49
+ typeof value.kind === 'string');
50
+ }
51
+ export function isServerMessage(value) {
52
+ return hasStringKind(value) && SERVER_MESSAGE_KINDS.includes(value.kind);
53
+ }
54
+ export function isClientMessage(value) {
55
+ return hasStringKind(value) && CLIENT_MESSAGE_KINDS.includes(value.kind);
56
+ }
57
+ //# sourceMappingURL=messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AA8KH;;;;;GAKG;AACH,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,6BAAW,CAAA;IACX,+CAA6B,CAAA;AAC/B,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAeD,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,yBAAyB;IACzB,0BAA0B;IAC1B,sBAAsB;IACtB,wBAAwB;IACxB,2BAA2B;CACwB,CAAC;AAEtD,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,UAAU;IACV,SAAS;IACT,4BAA4B;IAC5B,gBAAgB;IAChB,wBAAwB;IACxB,qBAAqB;IACrB,uBAAuB;IACvB,oBAAoB;IACpB,oBAAoB;IACpB,0BAA0B;IAC1B,YAAY;CACuC,CAAC;AAEtD,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,MAAM,IAAI,KAAK;QACf,OAAQ,KAA2B,CAAC,IAAI,KAAK,QAAQ,CACtD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,OAAO,aAAa,CAAC,KAAK,CAAC,IAAK,oBAA0C,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAClG,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,OAAO,aAAa,CAAC,KAAK,CAAC,IAAK,oBAA0C,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAClG,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Builder pairing wire contracts (mobile preview relay).
3
+ *
4
+ * Matches the backend `PairingChannel` allow-list and JWT claims shape.
5
+ * The JWT is signed, not encrypted — the SDK may decode claims client-side;
6
+ * the PairingSocket verifies signature + exp on connect.
7
+ */
8
+ /** Claims the device reads from a pairing JWT payload (unsigned decode). */
9
+ export interface PairingJwtClaims {
10
+ pairing_id: string;
11
+ exp: number;
12
+ iss?: string;
13
+ aud?: string;
14
+ iat?: number;
15
+ }
16
+ /** Device join payload for `pairing:<pairing_id>`. */
17
+ export interface PairingJoinPayload {
18
+ device_id: string;
19
+ model?: string;
20
+ os?: string;
21
+ app_version?: string;
22
+ }
23
+ /**
24
+ * Events the pairing channel relays between builder and device.
25
+ * Names match backend `@relayed_events` (CRX camelCase).
26
+ */
27
+ export declare const PAIRING_RELAY_EVENTS: readonly ["selectElement", "selectElementResult", "selectElementCancel", "startFlowWithToken", "startFlowWithTokenResult", "testTracker", "testTrackerResult", "startSmartFlow", "smartFlowStep", "smartFlowStop", "screenshot", "screenshotResult"];
28
+ export type PairingRelayEvent = (typeof PAIRING_RELAY_EVENTS)[number];
29
+ /** Payload for the builder → device `startFlowWithToken` relay event. */
30
+ export interface StartFlowWithTokenRelayPayload {
31
+ token: string;
32
+ idempotency_key?: string;
33
+ flowId?: string;
34
+ /**
35
+ * When true the builder asked to *wait for* the flow's start condition rather
36
+ * than start it immediately. Mirrors web `userflow-client.ts`, which routes
37
+ * this to `TestStartCondition` instead of `StartFlowWithToken`.
38
+ */
39
+ testStartCondition?: boolean;
40
+ [key: string]: unknown;
41
+ }
42
+ /** Result event device → builder after handling `startFlowWithToken`. */
43
+ export interface StartFlowWithTokenResultPayload {
44
+ ok: boolean;
45
+ error?: string;
46
+ idempotency_key?: string;
47
+ }
48
+ export declare function isPairingRelayEvent(value: string): value is PairingRelayEvent;
49
+ /**
50
+ * Decode the payload segment of a JWT without verifying the signature.
51
+ * Returns null when the token is malformed or missing required claims.
52
+ */
53
+ export declare function decodePairingJwt(jwt: string): PairingJwtClaims | null;
54
+ /** True when `exp` (unix seconds) is at or before `nowMs`. */
55
+ export declare function isPairingJwtExpired(claims: PairingJwtClaims, nowMs?: number): boolean;
56
+ //# sourceMappingURL=pairing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pairing.d.ts","sourceRoot":"","sources":["../src/pairing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,4EAA4E;AAC5E,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,sDAAsD;AACtD,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,sPAavB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,yEAAyE;AACzE,MAAM,WAAW,8BAA8B;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,yEAAyE;AACzE,MAAM,WAAW,+BAA+B;IAC9C,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,iBAAiB,CAE7E;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAwBrE;AAED,8DAA8D;AAC9D,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,GAAE,MAAmB,GAAG,OAAO,CAEjG"}
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Builder pairing wire contracts (mobile preview relay).
3
+ *
4
+ * Matches the backend `PairingChannel` allow-list and JWT claims shape.
5
+ * The JWT is signed, not encrypted — the SDK may decode claims client-side;
6
+ * the PairingSocket verifies signature + exp on connect.
7
+ */
8
+ /**
9
+ * Events the pairing channel relays between builder and device.
10
+ * Names match backend `@relayed_events` (CRX camelCase).
11
+ */
12
+ export const PAIRING_RELAY_EVENTS = [
13
+ 'selectElement',
14
+ 'selectElementResult',
15
+ 'selectElementCancel',
16
+ 'startFlowWithToken',
17
+ 'startFlowWithTokenResult',
18
+ 'testTracker',
19
+ 'testTrackerResult',
20
+ 'startSmartFlow',
21
+ 'smartFlowStep',
22
+ 'smartFlowStop',
23
+ 'screenshot',
24
+ 'screenshotResult',
25
+ ];
26
+ export function isPairingRelayEvent(value) {
27
+ return PAIRING_RELAY_EVENTS.includes(value);
28
+ }
29
+ /**
30
+ * Decode the payload segment of a JWT without verifying the signature.
31
+ * Returns null when the token is malformed or missing required claims.
32
+ */
33
+ export function decodePairingJwt(jwt) {
34
+ if (typeof jwt !== 'string' || jwt.length === 0)
35
+ return null;
36
+ const parts = jwt.split('.');
37
+ if (parts.length < 2)
38
+ return null;
39
+ const payloadSeg = parts[1];
40
+ if (!payloadSeg)
41
+ return null;
42
+ try {
43
+ const json = base64UrlDecodeToString(payloadSeg);
44
+ const parsed = JSON.parse(json);
45
+ const pairingId = parsed.pairing_id;
46
+ const exp = parsed.exp;
47
+ if (typeof pairingId !== 'string' || pairingId.length === 0)
48
+ return null;
49
+ if (typeof exp !== 'number' || !Number.isFinite(exp))
50
+ return null;
51
+ return {
52
+ pairing_id: pairingId,
53
+ exp,
54
+ ...(typeof parsed.iss === 'string' ? { iss: parsed.iss } : {}),
55
+ ...(typeof parsed.aud === 'string' ? { aud: parsed.aud } : {}),
56
+ ...(typeof parsed.iat === 'number' ? { iat: parsed.iat } : {}),
57
+ };
58
+ }
59
+ catch {
60
+ return null;
61
+ }
62
+ }
63
+ /** True when `exp` (unix seconds) is at or before `nowMs`. */
64
+ export function isPairingJwtExpired(claims, nowMs = Date.now()) {
65
+ return claims.exp * 1000 <= nowMs;
66
+ }
67
+ function base64UrlDecodeToString(segment) {
68
+ const padded = segment.replace(/-/g, '+').replace(/_/g, '/');
69
+ const padLen = (4 - (padded.length % 4)) % 4;
70
+ const b64 = padded + '='.repeat(padLen);
71
+ return utf8BytesToString(base64ToBytes(b64));
72
+ }
73
+ function base64ToBytes(b64) {
74
+ if (typeof globalThis.atob === 'function') {
75
+ const binary = globalThis.atob(b64);
76
+ const bytes = new Uint8Array(binary.length);
77
+ for (let i = 0; i < binary.length; i += 1) {
78
+ bytes[i] = binary.charCodeAt(i);
79
+ }
80
+ return bytes;
81
+ }
82
+ // Node / test environments.
83
+ const buf = globalThis.Buffer;
84
+ if (buf)
85
+ return new Uint8Array(buf.from(b64, 'base64'));
86
+ // Hermes / React Native without atob or Buffer polyfills.
87
+ return decodeBase64Manual(b64);
88
+ }
89
+ function decodeBase64Manual(b64) {
90
+ const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
91
+ const clean = b64.replace(/=+$/g, '');
92
+ const out = new Uint8Array(Math.floor((clean.length * 3) / 4));
93
+ let outIndex = 0;
94
+ for (let i = 0; i < clean.length; i += 4) {
95
+ const c0 = alphabet.indexOf(clean[i] ?? '');
96
+ const c1 = alphabet.indexOf(clean[i + 1] ?? '');
97
+ const c2 = alphabet.indexOf(clean[i + 2] ?? 'A');
98
+ const c3 = alphabet.indexOf(clean[i + 3] ?? 'A');
99
+ if (c0 < 0 || c1 < 0 || c2 < 0 || c3 < 0) {
100
+ throw new Error('Invalid base64');
101
+ }
102
+ const triplet = (c0 << 18) | (c1 << 12) | (c2 << 6) | c3;
103
+ if (outIndex < out.length)
104
+ out[outIndex++] = (triplet >> 16) & 0xff;
105
+ if (i + 2 < clean.length && outIndex < out.length) {
106
+ out[outIndex++] = (triplet >> 8) & 0xff;
107
+ }
108
+ if (i + 3 < clean.length && outIndex < out.length) {
109
+ out[outIndex++] = triplet & 0xff;
110
+ }
111
+ }
112
+ return outIndex === out.length ? out : out.subarray(0, outIndex);
113
+ }
114
+ function utf8BytesToString(bytes) {
115
+ if (typeof TextDecoder === 'function') {
116
+ return new TextDecoder('utf-8').decode(bytes);
117
+ }
118
+ // Manual UTF-8 decode for runtimes without TextDecoder (older Hermes).
119
+ let out = '';
120
+ for (let i = 0; i < bytes.length; i += 1) {
121
+ const b0 = bytes[i];
122
+ if (b0 < 0x80) {
123
+ out += String.fromCharCode(b0);
124
+ continue;
125
+ }
126
+ if (b0 < 0xe0) {
127
+ const b1 = bytes[++i] ?? 0;
128
+ out += String.fromCharCode(((b0 & 0x1f) << 6) | (b1 & 0x3f));
129
+ continue;
130
+ }
131
+ if (b0 < 0xf0) {
132
+ const b1 = bytes[++i] ?? 0;
133
+ const b2 = bytes[++i] ?? 0;
134
+ out += String.fromCharCode(((b0 & 0x0f) << 12) | ((b1 & 0x3f) << 6) | (b2 & 0x3f));
135
+ continue;
136
+ }
137
+ const b1 = bytes[++i] ?? 0;
138
+ const b2 = bytes[++i] ?? 0;
139
+ const b3 = bytes[++i] ?? 0;
140
+ let cp = ((b0 & 0x07) << 18) | ((b1 & 0x3f) << 12) | ((b2 & 0x3f) << 6) | (b3 & 0x3f);
141
+ cp -= 0x10000;
142
+ out += String.fromCharCode(0xd800 + ((cp >> 10) & 0x3ff), 0xdc00 + (cp & 0x3ff));
143
+ }
144
+ return out;
145
+ }
146
+ //# sourceMappingURL=pairing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pairing.js","sourceRoot":"","sources":["../src/pairing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAmBH;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,eAAe;IACf,qBAAqB;IACrB,qBAAqB;IACrB,oBAAoB;IACpB,0BAA0B;IAC1B,aAAa;IACb,mBAAmB;IACnB,gBAAgB;IAChB,eAAe;IACf,eAAe;IACf,YAAY;IACZ,kBAAkB;CACV,CAAC;AAyBX,MAAM,UAAU,mBAAmB,CAAC,KAAa;IAC/C,OAAQ,oBAA0C,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC1C,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAC7D,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7B,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAClC,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC5B,IAAI,CAAC,UAAU;QAAE,OAA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"0.1.1",
4
+ "description": "Userflow React Native SDK protocol — wire contracts and shared types.",
5
+ "license": "SEE LICENSE IN LICENSE",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "module": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js"
14
+ }
15
+ },
16
+ "sideEffects": false
17
+ }