smartcomply-web-sdk 1.0.88 → 1.0.89

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.
@@ -21,7 +21,7 @@ export declare class SmartComply {
21
21
  * CDN tag they installed with (e.g. @1, which floats to the latest
22
22
  * matching release) actually resolved to the version they expect.
23
23
  */
24
- static readonly VERSION = "1.0.88";
24
+ static readonly VERSION = "1.0.89";
25
25
  private http;
26
26
  private clientId;
27
27
  private _sessionToken;
@@ -46,9 +46,32 @@ export declare class SmartComply {
46
46
  * Returns: { token: "...", expires_at: "..." }
47
47
  */
48
48
  createSession(): Promise<SessionResponse>;
49
+ /**
50
+ * Resume an existing session from a resume_token (client-initiated
51
+ * resubmit — see the "Resubmit" action in the Adhere dashboard). Unlike
52
+ * createSession(), this makes no network call: a resume_token IS already
53
+ * a valid SessionToken row on the backend (SDKSessionTokenAuthentication
54
+ * checks it against SessionToken.active the same way as any session
55
+ * token), so there is nothing to create — only to start using directly.
56
+ *
57
+ * Must be used INSTEAD OF createSession(), not alongside it. Calling
58
+ * createSession() after this would mint a second, unrelated session and
59
+ * silently abandon the resume — the backend's resume-match in
60
+ * LivenessCreateAPIView only fires for the session actually presented on
61
+ * the request, so the resume_token has to be the one in use throughout.
62
+ *
63
+ * No expires_at is set here — the resume_token's own issuance response
64
+ * only carries resume_expires_at (a 72h invite-link window), not the
65
+ * session's own runtime expiry the way createSession() returns one. The
66
+ * backend still enforces the real expiry server-side regardless; this
67
+ * only means the client-side "session about to expire" warning timer
68
+ * (see SmartComplyFlow.initialize()) has nothing to schedule against and
69
+ * is skipped for a resumed session.
70
+ */
71
+ resumeSession(resumeToken: string): void;
49
72
  /**
50
73
  * Fetch SDK configuration from the backend.
51
- * Must be called after createSession().
74
+ * Must be called after createSession() or resumeSession().
52
75
  *
53
76
  * GET /v1/initialize/
54
77
  * Auth: x-access-token: <sessionToken>
@@ -1 +1 @@
1
- {"version":3,"file":"Smartcomply.d.ts","sourceRoot":"","sources":["../../src/client/Smartcomply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EACL,eAAe,EACf,aAAa,EACd,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;GAQG;AACH,qBAAa,WAAW;IACtB;;;;;;;;OAQG;IACH,MAAM,CAAC,QAAQ,CAAC,OAAO,YAAY;IAEnC,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,iBAAiB,CAAuB;IAChD,OAAO,CAAC,UAAU,CAA8B;IAEzC,UAAU,EAAE,gBAAgB,CAAC;IAC7B,QAAQ,EAAE,cAAc,CAAC;gBAEpB,MAAM,EAAE,SAAS;IAiB7B,sDAAsD;IACtD,IAAI,YAAY,IAAI,MAAM,GAAG,IAAI,CAEhC;IAED,uCAAuC;IACvC,IAAI,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAEpC;IAED,gFAAgF;IAChF,IAAI,SAAS,IAAI,aAAa,GAAG,IAAI,CAEpC;IAED;;;;;;;;OAQG;IACG,aAAa,IAAI,OAAO,CAAC,eAAe,CAAC;IAgB/C;;;;;;;;OAQG;IACG,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC;CASjD"}
1
+ {"version":3,"file":"Smartcomply.d.ts","sourceRoot":"","sources":["../../src/client/Smartcomply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EACL,eAAe,EACf,aAAa,EACd,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;GAQG;AACH,qBAAa,WAAW;IACtB;;;;;;;;OAQG;IACH,MAAM,CAAC,QAAQ,CAAC,OAAO,YAAY;IAEnC,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,iBAAiB,CAAuB;IAChD,OAAO,CAAC,UAAU,CAA8B;IAEzC,UAAU,EAAE,gBAAgB,CAAC;IAC7B,QAAQ,EAAE,cAAc,CAAC;gBAEpB,MAAM,EAAE,SAAS;IAiB7B,sDAAsD;IACtD,IAAI,YAAY,IAAI,MAAM,GAAG,IAAI,CAEhC;IAED,uCAAuC;IACvC,IAAI,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAEpC;IAED,gFAAgF;IAChF,IAAI,SAAS,IAAI,aAAa,GAAG,IAAI,CAEpC;IAED;;;;;;;;OAQG;IACG,aAAa,IAAI,OAAO,CAAC,eAAe,CAAC;IAgB/C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAMxC;;;;;;;;OAQG;IACG,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC;CASjD"}
@@ -60,9 +60,36 @@ class SmartComply {
60
60
  this.http.setSessionToken(response.token);
61
61
  return response;
62
62
  }
63
+ /**
64
+ * Resume an existing session from a resume_token (client-initiated
65
+ * resubmit — see the "Resubmit" action in the Adhere dashboard). Unlike
66
+ * createSession(), this makes no network call: a resume_token IS already
67
+ * a valid SessionToken row on the backend (SDKSessionTokenAuthentication
68
+ * checks it against SessionToken.active the same way as any session
69
+ * token), so there is nothing to create — only to start using directly.
70
+ *
71
+ * Must be used INSTEAD OF createSession(), not alongside it. Calling
72
+ * createSession() after this would mint a second, unrelated session and
73
+ * silently abandon the resume — the backend's resume-match in
74
+ * LivenessCreateAPIView only fires for the session actually presented on
75
+ * the request, so the resume_token has to be the one in use throughout.
76
+ *
77
+ * No expires_at is set here — the resume_token's own issuance response
78
+ * only carries resume_expires_at (a 72h invite-link window), not the
79
+ * session's own runtime expiry the way createSession() returns one. The
80
+ * backend still enforces the real expiry server-side regardless; this
81
+ * only means the client-side "session about to expire" warning timer
82
+ * (see SmartComplyFlow.initialize()) has nothing to schedule against and
83
+ * is skipped for a resumed session.
84
+ */
85
+ resumeSession(resumeToken) {
86
+ this._sessionToken = resumeToken;
87
+ this._sessionExpiresAt = null;
88
+ this.http.setSessionToken(resumeToken);
89
+ }
63
90
  /**
64
91
  * Fetch SDK configuration from the backend.
65
- * Must be called after createSession().
92
+ * Must be called after createSession() or resumeSession().
66
93
  *
67
94
  * GET /v1/initialize/
68
95
  * Auth: x-access-token: <sessionToken>
@@ -85,5 +112,5 @@ exports.SmartComply = SmartComply;
85
112
  * CDN tag they installed with (e.g. @1, which floats to the latest
86
113
  * matching release) actually resolved to the version they expect.
87
114
  */
88
- SmartComply.VERSION = "1.0.88";
115
+ SmartComply.VERSION = "1.0.89";
89
116
  //# sourceMappingURL=Smartcomply.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Smartcomply.js","sourceRoot":"","sources":["../../src/client/Smartcomply.ts"],"names":[],"mappings":";;;AACA,6CAA0C;AAC1C,iEAAoE;AACpE,2DAA8D;AAC9D,4CAA4C;AAM5C;;;;;;;;GAQG;AACH,MAAa,WAAW;IAqBtB,YAAY,MAAiB;QAPrB,kBAAa,GAAkB,IAAI,CAAC;QACpC,sBAAiB,GAAkB,IAAI,CAAC;QACxC,eAAU,GAAyB,IAAI,CAAC;QAM9C,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;QACnF,CAAC;QAED,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QA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K,CAAC,aAAa;QACjB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CACtC,MAAM,EACN,qBAAqB,EACrB,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,CAC7B,CAAC;QAEF,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC;QACpC,IAAI,CAAC,iBAAiB,GAAG,QAAQ,CAAC,UAAU,CAAC;QAE7C,mEAAmE;QACnE,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAE1C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,aAAa,CAAC,WAAmB;QAC/B,IAAI,CAAC,aAAa,GAAG,WAAW,CAAC;QACjC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAC9B,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,gBAAgB;QACpB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAC3C,KAAK,EACL,iBAAiB,CAClB,CAAC;QAEF,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;QACzB,OAAO,MAAM,CAAC;IAChB,CAAC;;AA3HH,kCA4HC;AA3HC;;;;;;;;GAQG;AACa,mBAAO,GAAG,QAAQ,AAAX,CAAY"}
@@ -21,7 +21,7 @@ export declare class SmartComply {
21
21
  * CDN tag they installed with (e.g. @1, which floats to the latest
22
22
  * matching release) actually resolved to the version they expect.
23
23
  */
24
- static readonly VERSION = "1.0.88";
24
+ static readonly VERSION = "1.0.89";
25
25
  private http;
26
26
  private clientId;
27
27
  private _sessionToken;
@@ -46,9 +46,32 @@ export declare class SmartComply {
46
46
  * Returns: { token: "...", expires_at: "..." }
47
47
  */
48
48
  createSession(): Promise<SessionResponse>;
49
+ /**
50
+ * Resume an existing session from a resume_token (client-initiated
51
+ * resubmit — see the "Resubmit" action in the Adhere dashboard). Unlike
52
+ * createSession(), this makes no network call: a resume_token IS already
53
+ * a valid SessionToken row on the backend (SDKSessionTokenAuthentication
54
+ * checks it against SessionToken.active the same way as any session
55
+ * token), so there is nothing to create — only to start using directly.
56
+ *
57
+ * Must be used INSTEAD OF createSession(), not alongside it. Calling
58
+ * createSession() after this would mint a second, unrelated session and
59
+ * silently abandon the resume — the backend's resume-match in
60
+ * LivenessCreateAPIView only fires for the session actually presented on
61
+ * the request, so the resume_token has to be the one in use throughout.
62
+ *
63
+ * No expires_at is set here — the resume_token's own issuance response
64
+ * only carries resume_expires_at (a 72h invite-link window), not the
65
+ * session's own runtime expiry the way createSession() returns one. The
66
+ * backend still enforces the real expiry server-side regardless; this
67
+ * only means the client-side "session about to expire" warning timer
68
+ * (see SmartComplyFlow.initialize()) has nothing to schedule against and
69
+ * is skipped for a resumed session.
70
+ */
71
+ resumeSession(resumeToken: string): void;
49
72
  /**
50
73
  * Fetch SDK configuration from the backend.
51
- * Must be called after createSession().
74
+ * Must be called after createSession() or resumeSession().
52
75
  *
53
76
  * GET /v1/initialize/
54
77
  * Auth: x-access-token: <sessionToken>
@@ -1 +1 @@
1
- {"version":3,"file":"Smartcomply.d.ts","sourceRoot":"","sources":["../../../src/client/Smartcomply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EACL,eAAe,EACf,aAAa,EACd,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;GAQG;AACH,qBAAa,WAAW;IACtB;;;;;;;;OAQG;IACH,MAAM,CAAC,QAAQ,CAAC,OAAO,YAAY;IAEnC,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,QAAQ,CAAS;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;IAED,uCAAuC;IACvC,IAAI,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAEpC;IAED,gFAAgF;IAChF,IAAI,SAAS,IAAI,aAAa,GAAG,IAAI,CAEpC;IAED;;;;;;;;OAQG;IACG,aAAa,IAAI,OAAO,CAAC,eAAe,CAAC;IAgB/C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAMxC;;;;;;;;OAQG;IACG,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC;CASjD"}
@@ -57,9 +57,36 @@ export class SmartComply {
57
57
  this.http.setSessionToken(response.token);
58
58
  return response;
59
59
  }
60
+ /**
61
+ * Resume an existing session from a resume_token (client-initiated
62
+ * resubmit — see the "Resubmit" action in the Adhere dashboard). Unlike
63
+ * createSession(), this makes no network call: a resume_token IS already
64
+ * a valid SessionToken row on the backend (SDKSessionTokenAuthentication
65
+ * checks it against SessionToken.active the same way as any session
66
+ * token), so there is nothing to create — only to start using directly.
67
+ *
68
+ * Must be used INSTEAD OF createSession(), not alongside it. Calling
69
+ * createSession() after this would mint a second, unrelated session and
70
+ * silently abandon the resume — the backend's resume-match in
71
+ * LivenessCreateAPIView only fires for the session actually presented on
72
+ * the request, so the resume_token has to be the one in use throughout.
73
+ *
74
+ * No expires_at is set here — the resume_token's own issuance response
75
+ * only carries resume_expires_at (a 72h invite-link window), not the
76
+ * session's own runtime expiry the way createSession() returns one. The
77
+ * backend still enforces the real expiry server-side regardless; this
78
+ * only means the client-side "session about to expire" warning timer
79
+ * (see SmartComplyFlow.initialize()) has nothing to schedule against and
80
+ * is skipped for a resumed session.
81
+ */
82
+ resumeSession(resumeToken) {
83
+ this._sessionToken = resumeToken;
84
+ this._sessionExpiresAt = null;
85
+ this.http.setSessionToken(resumeToken);
86
+ }
60
87
  /**
61
88
  * Fetch SDK configuration from the backend.
62
- * Must be called after createSession().
89
+ * Must be called after createSession() or resumeSession().
63
90
  *
64
91
  * GET /v1/initialize/
65
92
  * Auth: x-access-token: <sessionToken>
@@ -81,5 +108,5 @@ export class SmartComply {
81
108
  * CDN tag they installed with (e.g. @1, which floats to the latest
82
109
  * matching release) actually resolved to the version they expect.
83
110
  */
84
- SmartComply.VERSION = "1.0.88";
111
+ SmartComply.VERSION = "1.0.89";
85
112
  //# sourceMappingURL=Smartcomply.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Smartcomply.js","sourceRoot":"","sources":["../../../src/client/Smartcomply.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAM5C;;;;;;;;GAQG;AACH,MAAM,OAAO,WAAW;IAqBtB,YAAY,MAAiB;QAPrB,kBAAa,GAAkB,IAAI,CAAC;QACpC,sBAAiB,GAAkB,IAAI,CAAC;QACxC,eAAU,GAAyB,IAAI,CAAC;QAM9C,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;QACnF,CAAC;QAED,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;QAEnC,IAAI,CAAC,UAAU,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,IAAI,CAAC,QAAQ,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE9C,SAAS,CAAC,MAAM,CAAC,IAAI,W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CAC7B,CAAC;QAEF,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC;QACpC,IAAI,CAAC,iBAAiB,GAAG,QAAQ,CAAC,UAAU,CAAC;QAE7C,mEAAmE;QACnE,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAE1C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,aAAa,CAAC,WAAmB;QAC/B,IAAI,CAAC,aAAa,GAAG,WAAW,CAAC;QACjC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAC9B,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,gBAAgB;QACpB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAC3C,KAAK,EACL,iBAAiB,CAClB,CAAC;QAEF,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;QACzB,OAAO,MAAM,CAAC;IAChB,CAAC;;AA1HD;;;;;;;;GAQG;AACa,mBAAO,GAAG,QAAQ,AAAX,CAAY"}
@@ -6,6 +6,25 @@ export interface FlowOptions {
6
6
  clientId: string;
7
7
  environment?: Environment;
8
8
  timeout?: number;
9
+ /**
10
+ * Resume a previously-failed verification instead of starting a new
11
+ * session — the token from a client-initiated resubmit invite (the
12
+ * "Resubmit" action on a failed session in the Adhere dashboard). Read
13
+ * this from wherever your own resume link puts it (a query param, a
14
+ * deep-link payload, etc.) and pass it straight through here; the SDK
15
+ * does not parse the host page's URL itself.
16
+ *
17
+ * This authenticates the widget as the resumed session instead of
18
+ * creating a new one, so the backend's own resume-match (LivenessCreateAPIView)
19
+ * applies on the customer's next create/submit call. It does NOT yet
20
+ * skip the widget's own UI screens (country/ID-type/welcome still show
21
+ * as normal) — the backend-side "only ask for what's missing" behavior
22
+ * (e.g. reusing an already-passed liveness capture on a document-only
23
+ * retry) still applies once create/ is called, but the widget doesn't
24
+ * yet inspect failure_stage to pre-select a step. That's tracked as
25
+ * separate follow-up UI work, not part of this flag.
26
+ */
27
+ resumeToken?: string;
9
28
  onComplete?: (result: FlowResult) => void;
10
29
  onError?: (error: Error) => void;
11
30
  onClose?: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"SmartComplyFlow.d.ts","sourceRoot":"","sources":["../../../src/flow/SmartComplyFlow.ts"],"names":[],"mappings":"AACA,OAAO,EAA6B,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAIxF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAoB,YAAY,EAAE,MAAM,wBAAwB,CAAC;AA2CxE,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAC1C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;CAC7C;AAoDD,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,OAAO,GACtB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,YAAY,CAAA;CAAE,CAkH7D;AAsHD,qBAAa,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AAC,UAAU;IAUlB,OAAO,CAAC,YAAY;CAiCrB"}
@@ -607,23 +607,32 @@ export class SmartComplyFlow {
607
607
  async initialize() {
608
608
  this.showStep("loading");
609
609
  try {
610
- // Create session
611
- await this.sdk.createSession();
612
- // C4: Start session expiry timer (warn 2 min before 30-min expiry)
613
- const expiresAt = this.sdk.sessionExpiresAt;
614
- if (expiresAt) {
615
- const expiresMs = new Date(expiresAt).getTime() - Date.now();
616
- const warnMs = Math.max(expiresMs - 120000, 0); // warn 2 min before
617
- this.sessionExpiryTimer = setTimeout(() => this._showExpiryWarningWhenSafe(), warnMs);
618
- // The warning above is advisory only and can defer indefinitely
619
- // while the user sits on a camera-active step — without a hard
620
- // stop, an ignored/deferred warning left the widget open against
621
- // an already-expired backend session (SessionToken.expires_at,
622
- // 30 min — see sdk/views.py's SessionToken.objects.create call)
623
- // for as long as the host page stayed open. Force-close once the
624
- // real deadline passes so the widget's lifetime never exceeds
625
- // what the backend actually honors.
626
- this.sessionExpiredTimer = setTimeout(() => this._enforceSessionExpiry(), Math.max(expiresMs, 0));
610
+ if (this.options.resumeToken) {
611
+ // A resume_token IS already a valid session on the backend — no
612
+ // creation call, and no client-side expiry warning to schedule
613
+ // (see resumeSession()'s own doc comment for why). The backend
614
+ // still enforces the real expiry regardless; a request made after
615
+ // it has genuinely lapsed is rejected there, same as any session.
616
+ this.sdk.resumeSession(this.options.resumeToken);
617
+ }
618
+ else {
619
+ await this.sdk.createSession();
620
+ // C4: Start session expiry timer (warn 2 min before 30-min expiry)
621
+ const expiresAt = this.sdk.sessionExpiresAt;
622
+ if (expiresAt) {
623
+ const expiresMs = new Date(expiresAt).getTime() - Date.now();
624
+ const warnMs = Math.max(expiresMs - 120000, 0); // warn 2 min before
625
+ this.sessionExpiryTimer = setTimeout(() => this._showExpiryWarningWhenSafe(), warnMs);
626
+ // The warning above is advisory only and can defer indefinitely
627
+ // while the user sits on a camera-active step — without a hard
628
+ // stop, an ignored/deferred warning left the widget open against
629
+ // an already-expired backend session (SessionToken.expires_at,
630
+ // 30 min — see sdk/views.py's SessionToken.objects.create call)
631
+ // for as long as the host page stayed open. Force-close once the
632
+ // real deadline passes so the widget's lifetime never exceeds
633
+ // what the backend actually honors.
634
+ this.sessionExpiredTimer = setTimeout(() => this._enforceSessionExpiry(), Math.max(expiresMs, 0));
635
+ }
627
636
  }
628
637
  // Load config
629
638
  this.sdkConfig = await this.sdk.initializeConfig();