@arkyc/types 2.0.0 → 2.1.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/access.d.mts +12 -14
- package/dist/access.d.mts.map +1 -1
- package/dist/audit.d.mts +2 -4
- package/dist/audit.d.mts.map +1 -1
- package/dist/common.d.mts +8 -9
- package/dist/common.d.mts.map +1 -1
- package/dist/errors.d.mts +1 -2
- package/dist/errors.d.mts.map +1 -1
- package/dist/notifications.d.mts +17 -13
- package/dist/notifications.d.mts.map +1 -1
- package/dist/organization.d.mts +6 -8
- package/dist/organization.d.mts.map +1 -1
- package/dist/project.d.mts +12 -14
- package/dist/project.d.mts.map +1 -1
- package/dist/providers.d.mts +16 -18
- package/dist/providers.d.mts.map +1 -1
- package/dist/rbac.d.mts +13 -15
- package/dist/rbac.d.mts.map +1 -1
- package/dist/realtime.d.mts +15 -11
- package/dist/realtime.d.mts.map +1 -1
- package/dist/review.d.mts +3 -5
- package/dist/review.d.mts.map +1 -1
- package/dist/risk.d.mts +20 -22
- package/dist/risk.d.mts.map +1 -1
- package/dist/sdk.d.mts +3 -5
- package/dist/sdk.d.mts.map +1 -1
- package/dist/settings.d.mts +6 -7
- package/dist/settings.d.mts.map +1 -1
- package/dist/user.d.mts +2 -4
- package/dist/user.d.mts.map +1 -1
- package/dist/verification.d.mts +6 -8
- package/dist/verification.d.mts.map +1 -1
- package/dist/webhook.d.mts +11 -11
- package/dist/webhook.d.mts.map +1 -1
- package/dist/widget.d.mts +4 -6
- package/dist/widget.d.mts.map +1 -1
- package/dist/workflow.d.mts +18 -20
- package/dist/workflow.d.mts.map +1 -1
- package/package.json +1 -1
package/dist/rbac.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rbac.d.mts","names":[],"sources":["../src/rbac.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"rbac.d.mts","names":[],"sources":["../src/rbac.ts"],"mappings":";;;;;;;;;YASY;;YA0CA;;YAcA;;;;;;YAOA;;YAcA;;YASA,mBAAmB,gBAAgB;;YAGnC,qBAAqB,kBAAkB;;YAGvC;;iBAGK,mBAAmB;;EAElC,MAAM;EACN;EACA,OAAO;;EAEP;;;;;;iBAOe,aAAa;;EAE5B,iBAAiB;EACjB;EACA;EACA;EACA;;EAEA;;;iBAIe,uBAAuB;EACtC,SAAS;EACT,eAAe;;;;;;iBAOA,uBAAuB,QAAQ;EAC9C,YAAY;EACZ,SAAS;EACT,eAAe;;;;;;;;iBASA,wBAAwB;EACvC,SAAS;EACT,eAAe;EACf,SAAS"}
|
package/dist/realtime.d.mts
CHANGED
|
@@ -1,30 +1,35 @@
|
|
|
1
1
|
import { Id } from "./common.mjs";
|
|
2
2
|
import { VerificationStatus } from "./verification.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/realtime.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Realtime contracts shared by the API (server publish) and the dashboard and
|
|
7
6
|
* widget (client subscribe), so channel and event names never drift between them.
|
|
8
7
|
*/
|
|
9
8
|
/** Events the API broadcasts. Clients react by invalidating their caches. */
|
|
10
|
-
declare const REALTIME_EVENT: {
|
|
11
|
-
/** A verification session changed status (the `transitionTo` choke point). */
|
|
9
|
+
export declare const REALTIME_EVENT: {
|
|
10
|
+
/** A verification session changed status (the `transitionTo` choke point). */
|
|
11
|
+
readonly sessionTransition: "session.transition";
|
|
12
|
+
/** A reviewer acted on a session (assign/note/suspicious/decision/retry). */
|
|
12
13
|
readonly reviewAction: "review.action";
|
|
13
14
|
};
|
|
14
|
-
type RealtimeEventName = (typeof REALTIME_EVENT)[keyof typeof REALTIME_EVENT];
|
|
15
|
+
export type RealtimeEventName = (typeof REALTIME_EVENT)[keyof typeof REALTIME_EVENT];
|
|
15
16
|
/**
|
|
16
17
|
* Private channel name builders. Every channel is `private-`, so a subscription
|
|
17
18
|
* must be authorized by the API. Segments are dot-separated so the API's channel
|
|
18
19
|
* rules can capture each id.
|
|
19
20
|
*/
|
|
20
|
-
declare const realtimeChannels: {
|
|
21
|
-
/** A user's own notifications. */
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
export declare const realtimeChannels: {
|
|
22
|
+
/** A user's own notifications. */
|
|
23
|
+
user: (userId: Id) => string;
|
|
24
|
+
/** Everything in an organization. */
|
|
25
|
+
organization: (organizationId: Id) => string;
|
|
26
|
+
/** Everything in a project. */
|
|
27
|
+
project: (organizationId: Id, projectId: Id) => string;
|
|
28
|
+
/** A single verification session (used by the widget via client token). */
|
|
24
29
|
session: (sessionId: Id) => string;
|
|
25
30
|
};
|
|
26
31
|
/** Payload for {@link REALTIME_EVENT.sessionTransition}. */
|
|
27
|
-
interface SessionTransitionEvent {
|
|
32
|
+
export interface SessionTransitionEvent {
|
|
28
33
|
session_id: Id;
|
|
29
34
|
organization_id: Id;
|
|
30
35
|
project_id: Id | null;
|
|
@@ -32,7 +37,7 @@ interface SessionTransitionEvent {
|
|
|
32
37
|
previous_status: VerificationStatus | null;
|
|
33
38
|
}
|
|
34
39
|
/** Payload for {@link REALTIME_EVENT.reviewAction}. */
|
|
35
|
-
interface ReviewActionEvent {
|
|
40
|
+
export interface ReviewActionEvent {
|
|
36
41
|
session_id: Id;
|
|
37
42
|
organization_id: Id;
|
|
38
43
|
project_id: Id | null;
|
|
@@ -41,5 +46,4 @@ interface ReviewActionEvent {
|
|
|
41
46
|
actor_id: Id | null;
|
|
42
47
|
}
|
|
43
48
|
//#endregion
|
|
44
|
-
export { REALTIME_EVENT, RealtimeEventName, ReviewActionEvent, SessionTransitionEvent, realtimeChannels };
|
|
45
49
|
//# sourceMappingURL=realtime.d.mts.map
|
package/dist/realtime.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"realtime.d.mts","names":[],"sources":["../src/realtime.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"realtime.d.mts","names":[],"sources":["../src/realtime.ts"],"mappings":";;;;;;;;qBASa;;WAAA;;WAAA;;YAOD,4BAA4B,6BAA6B;;;;;;qBAOxD;;EAEI,OAAA,QAAA;;EAEgB,eAAA,gBAAA;;EAEL,UAAA,gBAAA,IAAE,WAAa;;EAEpB,UAAA,WAAA;;;iBAIN;EACf,YAAY;EACZ,iBAAiB;EACjB,YAAY;EACZ,QAAQ;EACR,iBAAiB;;;iBAIF;EACf,YAAY;EACZ,iBAAiB;EACjB,YAAY;;EAEZ;EACA,UAAU"}
|
package/dist/review.d.mts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { Entity, Id, ProjectScoped } from "./common.mjs";
|
|
2
2
|
import { VerificationStatus } from "./verification.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/review.d.ts
|
|
5
4
|
/** Actions a human reviewer can take on a session. */
|
|
6
|
-
type ReviewAction = 'approve' | 'reject' | 'request_document_retry' | 'request_selfie_retry' | 'request_full_retry' | 'mark_suspicious' | 'note';
|
|
5
|
+
export type ReviewAction = 'approve' | 'reject' | 'request_document_retry' | 'request_selfie_retry' | 'request_full_retry' | 'mark_suspicious' | 'note';
|
|
7
6
|
/**
|
|
8
7
|
* An audited review action recording a status transition performed by a
|
|
9
8
|
* reviewer (or the system) on a session.
|
|
10
9
|
*/
|
|
11
|
-
interface Review extends Entity, ProjectScoped {
|
|
10
|
+
export interface Review extends Entity, ProjectScoped {
|
|
12
11
|
session_id: Id;
|
|
13
12
|
reviewer_id: Id | null;
|
|
14
13
|
previous_status: VerificationStatus;
|
|
@@ -17,11 +16,10 @@ interface Review extends Entity, ProjectScoped {
|
|
|
17
16
|
note: string | null;
|
|
18
17
|
}
|
|
19
18
|
/** A free-standing reviewer note attached to a session. */
|
|
20
|
-
interface ReviewNote extends Entity, ProjectScoped {
|
|
19
|
+
export interface ReviewNote extends Entity, ProjectScoped {
|
|
21
20
|
session_id: Id;
|
|
22
21
|
reviewer_id: Id;
|
|
23
22
|
note: string;
|
|
24
23
|
}
|
|
25
24
|
//#endregion
|
|
26
|
-
export { Review, ReviewAction, ReviewNote };
|
|
27
25
|
//# sourceMappingURL=review.d.mts.map
|
package/dist/review.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.d.mts","names":[],"sources":["../src/review.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"review.d.mts","names":[],"sources":["../src/review.ts"],"mappings":";;;;YAIY;;;;;iBAaK,eAAe,QAAQ;EACtC,YAAY;EACZ,aAAa;EACb,iBAAiB;EACjB,YAAY;EACZ;EACA;;;iBAIe,mBAAmB,QAAQ;EAC1C,YAAY;EACZ,aAAa;EACb"}
|
package/dist/risk.d.mts
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { Id, IsoDateTime } from "./common.mjs";
|
|
2
2
|
import { DecisionReason } from "./verification.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/risk.d.ts
|
|
5
4
|
/** A fraud or compliance signal a detector can raise against a session. */
|
|
6
|
-
type RiskSignalKey = 'duplicate_document' | 'duplicate_identity' | 'duplicate_face' | 'document_tampering' | 'document_inconsistent' | 'sanctions_match' | 'pep_match' | 'adverse_media' | 'high_risk_network' | 'ip_country_mismatch' | 'velocity_exceeded' | 'underage';
|
|
5
|
+
export type RiskSignalKey = 'duplicate_document' | 'duplicate_identity' | 'duplicate_face' | 'document_tampering' | 'document_inconsistent' | 'sanctions_match' | 'pep_match' | 'adverse_media' | 'high_risk_network' | 'ip_country_mismatch' | 'velocity_exceeded' | 'underage';
|
|
7
6
|
/** Every signal key, in decision precedence order (most severe first). */
|
|
8
|
-
declare const RISK_SIGNAL_KEYS: readonly RiskSignalKey[];
|
|
7
|
+
export declare const RISK_SIGNAL_KEYS: readonly RiskSignalKey[];
|
|
9
8
|
/** What a signal does to the decision: nothing (`info`), manual review, or rejection. */
|
|
10
|
-
type RiskSeverity = 'info' | 'review' | 'reject';
|
|
9
|
+
export type RiskSeverity = 'info' | 'review' | 'reject';
|
|
11
10
|
/** How a workflow treats a signal key. */
|
|
12
|
-
type RiskSignalPolicy = 'ignore' | 'review' | 'reject';
|
|
11
|
+
export type RiskSignalPolicy = 'ignore' | 'review' | 'reject';
|
|
13
12
|
/** Per-key policy overrides. Keys left out use {@link DEFAULT_RISK_SIGNAL_POLICY}. */
|
|
14
|
-
type RiskPolicyConfig = Partial<Record<RiskSignalKey, RiskSignalPolicy>>;
|
|
13
|
+
export type RiskPolicyConfig = Partial<Record<RiskSignalKey, RiskSignalPolicy>>;
|
|
15
14
|
/** Signals route to review unless an organization opts a key into `ignore` or `reject`. */
|
|
16
|
-
declare const DEFAULT_RISK_SIGNAL_POLICY: RiskSignalPolicy;
|
|
15
|
+
export declare const DEFAULT_RISK_SIGNAL_POLICY: RiskSignalPolicy;
|
|
17
16
|
/** Signals that never reject, whatever the policy says: their evidence is too soft. */
|
|
18
|
-
declare const REVIEW_ONLY_RISK_SIGNALS: readonly RiskSignalKey[];
|
|
17
|
+
export declare const REVIEW_ONLY_RISK_SIGNALS: readonly RiskSignalKey[];
|
|
19
18
|
/** The decision reason each signal key reports when it decides a session. */
|
|
20
|
-
declare const RISK_SIGNAL_REASONS: Record<RiskSignalKey, DecisionReason>;
|
|
19
|
+
export declare const RISK_SIGNAL_REASONS: Record<RiskSignalKey, DecisionReason>;
|
|
21
20
|
/** A signal raised by a detector, before it is stored. */
|
|
22
|
-
interface RiskSignal {
|
|
21
|
+
export interface RiskSignal {
|
|
23
22
|
key: RiskSignalKey;
|
|
24
23
|
severity: RiskSeverity;
|
|
25
24
|
/** How much the signal adds to the session's risk score, in [0, 1]. */
|
|
@@ -30,7 +29,7 @@ interface RiskSignal {
|
|
|
30
29
|
evidence: Record<string, unknown>;
|
|
31
30
|
}
|
|
32
31
|
/** A stored risk signal, as the dashboard API returns it. */
|
|
33
|
-
interface SessionRiskSignal extends RiskSignal {
|
|
32
|
+
export interface SessionRiskSignal extends RiskSignal {
|
|
34
33
|
id: Id;
|
|
35
34
|
session_id: Id;
|
|
36
35
|
/** Which detector raised it. */
|
|
@@ -41,7 +40,7 @@ interface SessionRiskSignal extends RiskSignal {
|
|
|
41
40
|
created_at: IsoDateTime;
|
|
42
41
|
}
|
|
43
42
|
/** The risk block of a webhook payload. */
|
|
44
|
-
interface WebhookRiskCheck {
|
|
43
|
+
export interface WebhookRiskCheck {
|
|
45
44
|
score: number | null;
|
|
46
45
|
signals: Array<{
|
|
47
46
|
key: RiskSignalKey;
|
|
@@ -50,9 +49,9 @@ interface WebhookRiskCheck {
|
|
|
50
49
|
}>;
|
|
51
50
|
}
|
|
52
51
|
/** A category of screening hit. */
|
|
53
|
-
type ScreeningHitCategory = 'sanction' | 'pep' | 'adverse_media' | 'other';
|
|
52
|
+
export type ScreeningHitCategory = 'sanction' | 'pep' | 'adverse_media' | 'other';
|
|
54
53
|
/** One watchlist entity a screened identity matched. */
|
|
55
|
-
interface ScreeningHit {
|
|
54
|
+
export interface ScreeningHit {
|
|
56
55
|
/** Provider entity id, stable across re-screens. */
|
|
57
56
|
entity_id: string;
|
|
58
57
|
name: string;
|
|
@@ -69,9 +68,9 @@ interface ScreeningHit {
|
|
|
69
68
|
url?: string;
|
|
70
69
|
}
|
|
71
70
|
/** What a screening hit does to the session. */
|
|
72
|
-
type ScreeningOnHit = 'review' | 'reject';
|
|
71
|
+
export type ScreeningOnHit = 'review' | 'reject';
|
|
73
72
|
/** Configuration for the `screening` workflow stage. */
|
|
74
|
-
interface ScreeningStepConfig {
|
|
73
|
+
export interface ScreeningStepConfig {
|
|
75
74
|
/** Minimum match score in [0, 1] that counts as a hit. */
|
|
76
75
|
threshold: number;
|
|
77
76
|
/** What a sanctions hit does. PEP and adverse media hits follow the workflow's risk policy. */
|
|
@@ -80,22 +79,21 @@ interface ScreeningStepConfig {
|
|
|
80
79
|
monitor: boolean;
|
|
81
80
|
}
|
|
82
81
|
/** The default screening config applied when the stage is enabled without one. */
|
|
83
|
-
declare const DEFAULT_SCREENING_CONFIG: ScreeningStepConfig;
|
|
82
|
+
export declare const DEFAULT_SCREENING_CONFIG: ScreeningStepConfig;
|
|
84
83
|
/** Project limits for repeat sessions from one network address. */
|
|
85
|
-
interface VelocitySettings {
|
|
84
|
+
export interface VelocitySettings {
|
|
86
85
|
/** Sessions from one IP, under different user references, before the signal fires. */
|
|
87
86
|
max_sessions: number;
|
|
88
87
|
/** The look-back window in minutes. */
|
|
89
88
|
window_minutes: number;
|
|
90
89
|
}
|
|
91
|
-
declare const DEFAULT_VELOCITY_SETTINGS: VelocitySettings;
|
|
90
|
+
export declare const DEFAULT_VELOCITY_SETTINGS: VelocitySettings;
|
|
92
91
|
/** Organization-level opt-in for storing face embeddings. Off by default. */
|
|
93
|
-
interface FaceEmbeddingSettings {
|
|
92
|
+
export interface FaceEmbeddingSettings {
|
|
94
93
|
enabled: boolean;
|
|
95
94
|
/** Days to keep an embedding before it is deleted. */
|
|
96
95
|
retention_days: number;
|
|
97
96
|
}
|
|
98
|
-
declare const DEFAULT_FACE_EMBEDDING_SETTINGS: FaceEmbeddingSettings;
|
|
97
|
+
export declare const DEFAULT_FACE_EMBEDDING_SETTINGS: FaceEmbeddingSettings;
|
|
99
98
|
//#endregion
|
|
100
|
-
export { DEFAULT_FACE_EMBEDDING_SETTINGS, DEFAULT_RISK_SIGNAL_POLICY, DEFAULT_SCREENING_CONFIG, DEFAULT_VELOCITY_SETTINGS, FaceEmbeddingSettings, REVIEW_ONLY_RISK_SIGNALS, RISK_SIGNAL_KEYS, RISK_SIGNAL_REASONS, RiskPolicyConfig, RiskSeverity, RiskSignal, RiskSignalKey, RiskSignalPolicy, ScreeningHit, ScreeningHitCategory, ScreeningOnHit, ScreeningStepConfig, SessionRiskSignal, VelocitySettings, WebhookRiskCheck };
|
|
101
99
|
//# sourceMappingURL=risk.d.mts.map
|
package/dist/risk.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"risk.d.mts","names":[],"sources":["../src/risk.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"risk.d.mts","names":[],"sources":["../src/risk.ts"],"mappings":";;;;YAIY;;qBAeC,2BAA2B;;YAgB5B;;YAGA;;YAGA,mBAAmB,QAAQ,OAAO,eAAe;;qBAGhD,4BAA4B;;qBAG5B,mCAAmC;;qBAGnC,qBAAqB,OAAO,eAAe;;iBAgBvC;EACf,KAAK;EACL,UAAU;;EAEV;;EAEA;;EAEA,UAAU;;;iBAIK,0BAA0B;EACzC,IAAI;EACJ,YAAY;;EAEZ;EACA,YAAY;EACZ,YAAY;EACZ;EACA,YAAY;;;iBAIG;EACf;EACA,SAAS;IACP,KAAK;IACL,UAAU;IACV;;;;YAKQ;;iBAGK;;EAEf;EACA;;EAEA;EACA,UAAU;;EAEV;;EAEA;EACA;EACA;;EAEA;;;YAIU;;iBAGK;;EAEf;;EAEA,QAAQ;;EAER;;;qBAIW,0BAA0B;;iBAOtB;;EAEf;;EAEA;;qBAGW,2BAA2B;;iBAMvB;EACf;;EAEA;;qBAGW,iCAAiC"}
|
package/dist/sdk.d.mts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Metadata } from "./common.mjs";
|
|
2
2
|
import { VerificationDecision, VerificationStatus } from "./verification.mjs";
|
|
3
3
|
import { ExtractedData } from "./access.mjs";
|
|
4
|
-
|
|
5
4
|
//#region src/sdk.d.ts
|
|
6
5
|
/** Options for constructing the server SDK client (`new Arkyc(...)`). */
|
|
7
|
-
interface SdkOptions {
|
|
6
|
+
export interface SdkOptions {
|
|
8
7
|
/** Project secret key, e.g. `sk_live_…`. */
|
|
9
8
|
secretKey: string;
|
|
10
9
|
/** API base URL; defaults to the hosted Arkyc API. */
|
|
@@ -13,14 +12,14 @@ interface SdkOptions {
|
|
|
13
12
|
timeoutMs?: number;
|
|
14
13
|
}
|
|
15
14
|
/** Parameters for creating a verification session from a backend. */
|
|
16
|
-
interface CreateSessionParams {
|
|
15
|
+
export interface CreateSessionParams {
|
|
17
16
|
userReference?: string;
|
|
18
17
|
metadata?: Metadata;
|
|
19
18
|
/** Optional override for how long the session/client token stays valid. */
|
|
20
19
|
expiresInSeconds?: number;
|
|
21
20
|
}
|
|
22
21
|
/** The session representation returned by the SDK/public API. */
|
|
23
|
-
interface SessionResource {
|
|
22
|
+
export interface SessionResource {
|
|
24
23
|
id: string;
|
|
25
24
|
status: VerificationStatus;
|
|
26
25
|
user_reference: string | null;
|
|
@@ -33,5 +32,4 @@ interface SessionResource {
|
|
|
33
32
|
created_at: string;
|
|
34
33
|
}
|
|
35
34
|
//#endregion
|
|
36
|
-
export { CreateSessionParams, SdkOptions, SessionResource };
|
|
37
35
|
//# sourceMappingURL=sdk.d.mts.map
|
package/dist/sdk.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.mts","names":[],"sources":["../src/sdk.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"sdk.d.mts","names":[],"sources":["../src/sdk.ts"],"mappings":";;;;;iBAKiB;;EAEf;;EAEA;;EAEA;;;iBAIe;EACf;EACA,WAAW;;EAEX;;;iBAIe;EACf;EACA,QAAQ;EACR;EACA,UAAU;;EAEV;;EAEA,YAAY;EACZ;EACA"}
|
package/dist/settings.d.mts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { Entity } from "./common.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/settings.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Which capture/liveness flow the widget offers (Phase 17). `passive` = the
|
|
6
5
|
* current selfie flow; `active` = guided active-liveness challenges; `both` =
|
|
7
6
|
* offer active, falling back to passive on failure/unsupported devices.
|
|
8
7
|
*/
|
|
9
|
-
type CaptureModel = 'passive' | 'active' | 'both';
|
|
8
|
+
export type CaptureModel = 'passive' | 'active' | 'both';
|
|
10
9
|
/**
|
|
11
10
|
* Platform-wide settings, managed by platform admins on the `/admin` surface and
|
|
12
11
|
* read by the app at runtime. A single typed record (see {@link GlobalSetting}),
|
|
13
12
|
* always merged over {@link DEFAULT_GLOBAL_SETTINGS} so every key is present.
|
|
14
13
|
*/
|
|
15
|
-
interface GlobalSettings {
|
|
14
|
+
export interface GlobalSettings {
|
|
16
15
|
/** Branding/basics for the whole platform. */
|
|
17
16
|
platform: {
|
|
18
17
|
name: string;
|
|
19
|
-
support_email: string | null;
|
|
18
|
+
support_email: string | null;
|
|
19
|
+
/** Whether new organization sign-ups are accepted. */
|
|
20
20
|
signups_enabled: boolean;
|
|
21
21
|
};
|
|
22
22
|
/** Default capture/liveness flow offered to widgets (Phase 17). */
|
|
@@ -34,11 +34,10 @@ interface GlobalSettings {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
/** The persisted singleton row backing {@link GlobalSettings}. */
|
|
37
|
-
interface GlobalSetting extends Entity {
|
|
37
|
+
export interface GlobalSetting extends Entity {
|
|
38
38
|
settings: GlobalSettings;
|
|
39
39
|
}
|
|
40
40
|
/** Defaults applied when a settings key is unset. */
|
|
41
|
-
declare const DEFAULT_GLOBAL_SETTINGS: GlobalSettings;
|
|
41
|
+
export declare const DEFAULT_GLOBAL_SETTINGS: GlobalSettings;
|
|
42
42
|
//#endregion
|
|
43
|
-
export { CaptureModel, DEFAULT_GLOBAL_SETTINGS, GlobalSetting, GlobalSettings };
|
|
44
43
|
//# sourceMappingURL=settings.d.mts.map
|
package/dist/settings.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.mts","names":[],"sources":["../src/settings.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"settings.d.mts","names":[],"sources":["../src/settings.ts"],"mappings":";;;;;;;YAOY;;;;;;iBAOK;;EAEf;IACE;IACA;;IAEA;;;EAGF;IACE,OAAO;;;EAGT;;;;;;IAME;;;;iBAKa,sBAAsB;EACrC,UAAU;;;qBAIC,yBAAyB"}
|
package/dist/user.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Entity, IsoDateTime } from "./common.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/user.d.ts
|
|
4
3
|
/** A platform user account. Users belong to one or more organizations via membership. */
|
|
5
|
-
interface User extends Entity {
|
|
4
|
+
export interface User extends Entity {
|
|
6
5
|
name: string;
|
|
7
6
|
email: string;
|
|
8
7
|
/** Never serialised to clients; present on the DB row only. */
|
|
@@ -11,7 +10,6 @@ interface User extends Entity {
|
|
|
11
10
|
last_login_at: IsoDateTime | null;
|
|
12
11
|
}
|
|
13
12
|
/** A user shape safe to expose to clients (no credential material). */
|
|
14
|
-
type PublicUser = Omit<User, 'password_hash'>;
|
|
13
|
+
export type PublicUser = Omit<User, 'password_hash'>;
|
|
15
14
|
//#endregion
|
|
16
|
-
export { PublicUser, User };
|
|
17
15
|
//# sourceMappingURL=user.d.mts.map
|
package/dist/user.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.mts","names":[],"sources":["../src/user.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"user.d.mts","names":[],"sources":["../src/user.ts"],"mappings":";;;iBAGiB,aAAa;EAC5B;EACA;;EAEA;EACA;EACA,eAAe;;;YAIL,aAAa,KAAK"}
|
package/dist/verification.d.mts
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
import { Entity, Id, IsoDateTime, Metadata, ProjectScoped } from "./common.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/verification.d.ts
|
|
4
3
|
/** The lifecycle state of a verification session. */
|
|
5
|
-
type VerificationStatus = 'pending' | 'started' | 'document_submitted' | 'address_submitted' | 'liveness_submitted' | 'processing' | 'requires_review' | 'approved' | 'rejected' | 'expired' | 'cancelled';
|
|
4
|
+
export type VerificationStatus = 'pending' | 'started' | 'document_submitted' | 'address_submitted' | 'liveness_submitted' | 'processing' | 'requires_review' | 'approved' | 'rejected' | 'expired' | 'cancelled';
|
|
6
5
|
/** The outcome of the decision engine (or a manual review). */
|
|
7
|
-
type VerificationDecision = 'approved' | 'requires_review' | 'rejected';
|
|
6
|
+
export type VerificationDecision = 'approved' | 'requires_review' | 'rejected';
|
|
8
7
|
/** Whether liveness is checked passively (a selfie) or actively (a challenge video). */
|
|
9
|
-
type LivenessMode = 'passive' | 'active';
|
|
8
|
+
export type LivenessMode = 'passive' | 'active';
|
|
10
9
|
/**
|
|
11
10
|
* A single active-liveness challenge the user is prompted to perform. The server
|
|
12
11
|
* issues a randomized sequence per session; the widget records the user doing
|
|
13
12
|
* them and submits the sequence it performed for the driver to validate.
|
|
14
13
|
*/
|
|
15
|
-
type LivenessChallenge = 'turn_left' | 'turn_right' | 'blink' | 'smile' | 'nod' | 'move_closer';
|
|
14
|
+
export type LivenessChallenge = 'turn_left' | 'turn_right' | 'blink' | 'smile' | 'nod' | 'move_closer';
|
|
16
15
|
/** Why a session reached its decision. */
|
|
17
|
-
type DecisionReason = 'AUTO_APPROVED' | 'LOW_DOCUMENT_QUALITY' | 'OCR_LOW_CONFIDENCE' | 'DOCUMENT_EXPIRED' | 'LIVENESS_FAILED' | 'LIVENESS_LOW_CONFIDENCE' | 'FACE_MATCH_FAILED' | 'FACE_MATCH_LOW_CONFIDENCE' | 'MULTIPLE_FACES_DETECTED' | 'ADDRESS_VERIFICATION_FAILED' | 'ADDRESS_LOW_CONFIDENCE' | 'MANUAL_APPROVAL' | 'MANUAL_REJECTION' | 'RETRY_REQUESTED' | 'DUPLICATE_DOCUMENT' | 'DUPLICATE_IDENTITY' | 'DUPLICATE_FACE' | 'DOCUMENT_TAMPERING' | 'SANCTIONS_MATCH' | 'PEP_MATCH' | 'ADVERSE_MEDIA_MATCH' | 'HIGH_RISK_DEVICE' | 'VELOCITY_EXCEEDED' | 'UNDERAGE';
|
|
16
|
+
export type DecisionReason = 'AUTO_APPROVED' | 'LOW_DOCUMENT_QUALITY' | 'OCR_LOW_CONFIDENCE' | 'DOCUMENT_EXPIRED' | 'LIVENESS_FAILED' | 'LIVENESS_LOW_CONFIDENCE' | 'FACE_MATCH_FAILED' | 'FACE_MATCH_LOW_CONFIDENCE' | 'MULTIPLE_FACES_DETECTED' | 'ADDRESS_VERIFICATION_FAILED' | 'ADDRESS_LOW_CONFIDENCE' | 'MANUAL_APPROVAL' | 'MANUAL_REJECTION' | 'RETRY_REQUESTED' | 'DUPLICATE_DOCUMENT' | 'DUPLICATE_IDENTITY' | 'DUPLICATE_FACE' | 'DOCUMENT_TAMPERING' | 'SANCTIONS_MATCH' | 'PEP_MATCH' | 'ADVERSE_MEDIA_MATCH' | 'HIGH_RISK_DEVICE' | 'VELOCITY_EXCEEDED' | 'UNDERAGE';
|
|
18
17
|
/**
|
|
19
18
|
* A verification session: the full lifecycle of one verification flow, owned by
|
|
20
19
|
* a project (and organization). Created from an integrator's backend, driven by the
|
|
21
20
|
* widget, decided automatically and/or by a human reviewer.
|
|
22
21
|
*/
|
|
23
|
-
interface VerificationSession extends Entity, ProjectScoped {
|
|
22
|
+
export interface VerificationSession extends Entity, ProjectScoped {
|
|
24
23
|
/** Integrator's own reference for the end user being verified. */
|
|
25
24
|
user_reference: string | null;
|
|
26
25
|
/** Person's name extracted from the document (OCR), when available. */
|
|
@@ -40,5 +39,4 @@ interface VerificationSession extends Entity, ProjectScoped {
|
|
|
40
39
|
metadata: Metadata;
|
|
41
40
|
}
|
|
42
41
|
//#endregion
|
|
43
|
-
export { DecisionReason, LivenessChallenge, LivenessMode, VerificationDecision, VerificationSession, VerificationStatus };
|
|
44
42
|
//# sourceMappingURL=verification.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification.d.mts","names":[],"sources":["../src/verification.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"verification.d.mts","names":[],"sources":["../src/verification.ts"],"mappings":";;;YAGY;;YAcA;;YAGA;;;;;;YAOA;;YAGA;;;;;;iBA+BK,4BAA4B,QAAQ;;EAEnD;;EAEA;EACA,QAAQ;EACR,eAAe;EACf,gBAAgB;EAChB,iBAAiB;;EAEjB;;EAEA;EACA,YAAY;EACZ,cAAc;EACd,aAAa;EACb,aAAa;EACb,UAAU"}
|
package/dist/webhook.d.mts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Entity, Id, IsoDateTime, ProjectScoped } from "./common.mjs";
|
|
2
2
|
import { DecisionReason, VerificationStatus } from "./verification.mjs";
|
|
3
3
|
import { ScreeningHit, WebhookRiskCheck } from "./risk.mjs";
|
|
4
|
-
|
|
5
4
|
//#region src/webhook.d.ts
|
|
6
5
|
/** The set of webhook event names Arkyc can deliver. */
|
|
7
|
-
type WebhookEventName = 'verification.started' | 'verification.document_submitted' | 'verification.address_submitted' | 'verification.processing' | 'verification.requires_review' | 'verification.approved' | 'verification.rejected' | 'verification.completed' | 'verification.expired' | 'verification.cancelled' | 'verification.screening_alert';
|
|
6
|
+
export type WebhookEventName = 'verification.started' | 'verification.document_submitted' | 'verification.address_submitted' | 'verification.processing' | 'verification.requires_review' | 'verification.approved' | 'verification.rejected' | 'verification.completed' | 'verification.expired' | 'verification.cancelled' | 'verification.screening_alert';
|
|
8
7
|
/** Per-check summary included in a webhook payload. */
|
|
9
|
-
interface WebhookChecks {
|
|
8
|
+
export interface WebhookChecks {
|
|
10
9
|
document?: {
|
|
11
10
|
quality_score: number;
|
|
12
11
|
ocr_confidence: number;
|
|
13
|
-
expired: boolean;
|
|
12
|
+
expired: boolean;
|
|
13
|
+
/** Which parser produced the OCR fields: the MRZ, a custom parser, or the generic scraper. */
|
|
14
14
|
ocr_parse_stage?: 'mrz' | 'custom' | 'generic';
|
|
15
15
|
};
|
|
16
16
|
liveness?: {
|
|
@@ -23,7 +23,8 @@ interface WebhookChecks {
|
|
|
23
23
|
};
|
|
24
24
|
address?: {
|
|
25
25
|
passed: boolean;
|
|
26
|
-
score: number;
|
|
26
|
+
score: number;
|
|
27
|
+
/** Which corroboration methods ran. */
|
|
27
28
|
methods: string[];
|
|
28
29
|
};
|
|
29
30
|
/** Risk signals raised against the session and the aggregate score. */
|
|
@@ -34,7 +35,7 @@ interface WebhookChecks {
|
|
|
34
35
|
};
|
|
35
36
|
}
|
|
36
37
|
/** The JSON body delivered to a webhook endpoint. */
|
|
37
|
-
interface WebhookEvent {
|
|
38
|
+
export interface WebhookEvent {
|
|
38
39
|
event: WebhookEventName;
|
|
39
40
|
session_id: Id;
|
|
40
41
|
organization_id: Id;
|
|
@@ -48,9 +49,9 @@ interface WebhookEvent {
|
|
|
48
49
|
created_at: IsoDateTime;
|
|
49
50
|
}
|
|
50
51
|
/** Webhook endpoint lifecycle status. */
|
|
51
|
-
type WebhookEndpointStatus = 'active' | 'disabled';
|
|
52
|
+
export type WebhookEndpointStatus = 'active' | 'disabled';
|
|
52
53
|
/** A configured webhook endpoint for a project. */
|
|
53
|
-
interface WebhookEndpoint extends Entity, ProjectScoped {
|
|
54
|
+
export interface WebhookEndpoint extends Entity, ProjectScoped {
|
|
54
55
|
url: string;
|
|
55
56
|
/** Hash of the signing secret; the raw secret is shown once at creation. */
|
|
56
57
|
secret_hash: string;
|
|
@@ -58,9 +59,9 @@ interface WebhookEndpoint extends Entity, ProjectScoped {
|
|
|
58
59
|
status: WebhookEndpointStatus;
|
|
59
60
|
}
|
|
60
61
|
/** Delivery attempt state for a webhook. */
|
|
61
|
-
type WebhookDeliveryStatus = 'pending' | 'delivered' | 'failed';
|
|
62
|
+
export type WebhookDeliveryStatus = 'pending' | 'delivered' | 'failed';
|
|
62
63
|
/** A record of a webhook delivery (and its retries). */
|
|
63
|
-
interface WebhookDelivery extends Entity, ProjectScoped {
|
|
64
|
+
export interface WebhookDelivery extends Entity, ProjectScoped {
|
|
64
65
|
webhook_endpoint_id: Id;
|
|
65
66
|
event: WebhookEventName;
|
|
66
67
|
payload: WebhookEvent;
|
|
@@ -71,5 +72,4 @@ interface WebhookDelivery extends Entity, ProjectScoped {
|
|
|
71
72
|
next_retry_at: IsoDateTime | null;
|
|
72
73
|
}
|
|
73
74
|
//#endregion
|
|
74
|
-
export { WebhookChecks, WebhookDelivery, WebhookDeliveryStatus, WebhookEndpoint, WebhookEndpointStatus, WebhookEvent, WebhookEventName };
|
|
75
75
|
//# sourceMappingURL=webhook.d.mts.map
|
package/dist/webhook.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.d.mts","names":[],"sources":["../src/webhook.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"webhook.d.mts","names":[],"sources":["../src/webhook.ts"],"mappings":";;;;;YAKY;;iBAcK;EACf;IACE;IACA;IACA;;IAEA;;EAEF;IACE;IACA;;EAEF;IACE;IACA;;EAEF;IACE;IACA;;IAEA;;;EAGF,OAAO;;EAEP;IACE,MAAM;;;;iBAKO;EACf,OAAO;EACP,YAAY;EACZ,iBAAiB;EACjB,YAAY;EACZ;EACA,QAAQ;EACR,QAAQ;EACR,iBAAiB;;EAEjB,QAAQ;EACR,YAAY;;;YAIF;;iBAGK,wBAAwB,QAAQ;EAC/C;;EAEA;EACA,QAAQ;EACR,QAAQ;;;YAIE;;iBAGK,wBAAwB,QAAQ;EAC/C,qBAAqB;EACrB,OAAO;EACP,SAAS;EACT,QAAQ;EACR;EACA;EACA;EACA,eAAe"}
|
package/dist/widget.d.mts
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { VerificationDecision, VerificationStatus } from "./verification.mjs";
|
|
2
2
|
import { ProjectBranding } from "./project.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/widget.d.ts
|
|
5
4
|
/** How the widget mounts into the host page. */
|
|
6
|
-
type WidgetMode = 'overlay' | 'inline' | 'hosted';
|
|
5
|
+
export type WidgetMode = 'overlay' | 'inline' | 'hosted';
|
|
7
6
|
/** The screens of the widget verification flow, in order. */
|
|
8
|
-
type WidgetStep = 'welcome' | 'document_selection' | 'front_capture' | 'back_capture' | 'ocr_processing' | 'address_entry' | 'address_processing' | 'active_liveness' | 'selfie_capture' | 'passive_liveness' | 'face_match' | 'processing' | 'result';
|
|
7
|
+
export type WidgetStep = 'welcome' | 'document_selection' | 'front_capture' | 'back_capture' | 'ocr_processing' | 'address_entry' | 'address_processing' | 'active_liveness' | 'selfie_capture' | 'passive_liveness' | 'face_match' | 'processing' | 'result';
|
|
9
8
|
/** The result handed to the widget's `onComplete` callback. */
|
|
10
|
-
interface WidgetResult {
|
|
9
|
+
export interface WidgetResult {
|
|
11
10
|
status: VerificationStatus;
|
|
12
11
|
decision: VerificationDecision | null;
|
|
13
12
|
}
|
|
14
13
|
/** Options for launching/mounting the embeddable widget. */
|
|
15
|
-
interface WidgetOptions {
|
|
14
|
+
export interface WidgetOptions {
|
|
16
15
|
/** Short-lived client token minted by the backend for this session. */
|
|
17
16
|
token: string;
|
|
18
17
|
mode?: WidgetMode;
|
|
@@ -25,5 +24,4 @@ interface WidgetOptions {
|
|
|
25
24
|
onClose?: () => void;
|
|
26
25
|
}
|
|
27
26
|
//#endregion
|
|
28
|
-
export { WidgetMode, WidgetOptions, WidgetResult, WidgetStep };
|
|
29
27
|
//# sourceMappingURL=widget.d.mts.map
|
package/dist/widget.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget.d.mts","names":[],"sources":["../src/widget.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"widget.d.mts","names":[],"sources":["../src/widget.ts"],"mappings":";;;;YAIY;;YAGA;;iBAgBK;EACf,QAAQ;EACR,UAAU;;;iBAIK;;EAEf;EACA,OAAO;;EAEP,qBAAqB;EACrB,WAAW;EACX;EACA,cAAc,QAAQ;EACtB,WAAW,OAAO;EAClB"}
|
package/dist/workflow.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Id, IsoDateTime } from "./common.mjs";
|
|
2
2
|
import { RiskPolicyConfig, ScreeningStepConfig } from "./risk.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/workflow.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Workflows (Phase 19).
|
|
@@ -13,27 +12,27 @@ import { RiskPolicyConfig, ScreeningStepConfig } from "./risk.mjs";
|
|
|
13
12
|
* disturbs sessions already in flight.
|
|
14
13
|
*/
|
|
15
14
|
/** A coarse verification stage a workflow can order and toggle. */
|
|
16
|
-
type WorkflowStepKey = 'document' | 'screening' | 'address' | 'liveness' | 'face_match';
|
|
15
|
+
export type WorkflowStepKey = 'document' | 'screening' | 'address' | 'liveness' | 'face_match';
|
|
17
16
|
/**
|
|
18
17
|
* The default pipeline's stages, in canonical order — what runs when a session
|
|
19
18
|
* has no workflow. `address` is deliberately NOT here: it's an opt-in stage,
|
|
20
19
|
* available only on custom workflows.
|
|
21
20
|
*/
|
|
22
|
-
declare const WORKFLOW_STEP_KEYS: readonly WorkflowStepKey[];
|
|
21
|
+
export declare const WORKFLOW_STEP_KEYS: readonly WorkflowStepKey[];
|
|
23
22
|
/**
|
|
24
23
|
* Every stage a custom workflow may include, in canonical order. Used by the
|
|
25
24
|
* workflow editor and to validate/normalise stored steps — a superset of
|
|
26
25
|
* {@link WORKFLOW_STEP_KEYS} that adds the opt-in `screening` and `address` stages.
|
|
27
26
|
*/
|
|
28
|
-
declare const AVAILABLE_WORKFLOW_STEP_KEYS: readonly WorkflowStepKey[];
|
|
27
|
+
export declare const AVAILABLE_WORKFLOW_STEP_KEYS: readonly WorkflowStepKey[];
|
|
29
28
|
/** A method the address stage uses to corroborate the user's address. */
|
|
30
|
-
type AddressMethod = 'poa_document' | 'device_location' | 'geocode_lookup';
|
|
29
|
+
export type AddressMethod = 'poa_document' | 'device_location' | 'geocode_lookup';
|
|
31
30
|
/** Every selectable address-verification method, in display order. */
|
|
32
|
-
declare const ADDRESS_METHODS: readonly AddressMethod[];
|
|
31
|
+
export declare const ADDRESS_METHODS: readonly AddressMethod[];
|
|
33
32
|
/** What a failed/low-confidence address result does to the session. */
|
|
34
|
-
type AddressOnFail = 'review' | 'reject';
|
|
33
|
+
export type AddressOnFail = 'review' | 'reject';
|
|
35
34
|
/** Configuration for the `address` stage, carried on its {@link WorkflowStep}. */
|
|
36
|
-
interface AddressStepConfig {
|
|
35
|
+
export interface AddressStepConfig {
|
|
37
36
|
/** Methods to run; at least one when the stage is enabled. */
|
|
38
37
|
methods: AddressMethod[];
|
|
39
38
|
/**
|
|
@@ -49,16 +48,16 @@ interface AddressStepConfig {
|
|
|
49
48
|
auto_approve_threshold?: number;
|
|
50
49
|
}
|
|
51
50
|
/** The default address config applied when the stage is enabled without one. */
|
|
52
|
-
declare const DEFAULT_ADDRESS_CONFIG: AddressStepConfig;
|
|
51
|
+
export declare const DEFAULT_ADDRESS_CONFIG: AddressStepConfig;
|
|
53
52
|
/** One stage within a workflow, in pipeline order, on or off. */
|
|
54
|
-
interface WorkflowStep {
|
|
53
|
+
export interface WorkflowStep {
|
|
55
54
|
key: WorkflowStepKey;
|
|
56
55
|
enabled: boolean;
|
|
57
56
|
/** Stage-specific configuration, used by the `address` and `screening` stages. */
|
|
58
57
|
config?: AddressStepConfig | ScreeningStepConfig;
|
|
59
58
|
}
|
|
60
59
|
/** Workflow-wide toggles. */
|
|
61
|
-
interface WorkflowOptions {
|
|
60
|
+
export interface WorkflowOptions {
|
|
62
61
|
/**
|
|
63
62
|
* Skip OCR parsing — capture the document image but don't extract fields.
|
|
64
63
|
* Useful when Arkyc is only used for data capture and the assets are handed
|
|
@@ -71,12 +70,12 @@ interface WorkflowOptions {
|
|
|
71
70
|
risk_policy?: RiskPolicyConfig;
|
|
72
71
|
}
|
|
73
72
|
/** The portable config of a workflow: ordered stages + options. */
|
|
74
|
-
interface WorkflowConfig {
|
|
73
|
+
export interface WorkflowConfig {
|
|
75
74
|
steps: WorkflowStep[];
|
|
76
75
|
options: WorkflowOptions;
|
|
77
76
|
}
|
|
78
77
|
/** A saved, organization-scoped workflow. */
|
|
79
|
-
interface Workflow extends WorkflowConfig {
|
|
78
|
+
export interface Workflow extends WorkflowConfig {
|
|
80
79
|
id: Id;
|
|
81
80
|
organization_id: Id;
|
|
82
81
|
name: string;
|
|
@@ -84,27 +83,26 @@ interface Workflow extends WorkflowConfig {
|
|
|
84
83
|
updated_at: IsoDateTime;
|
|
85
84
|
}
|
|
86
85
|
/** The default pipeline applied when a session has no workflow. */
|
|
87
|
-
declare const DEFAULT_WORKFLOW_CONFIG: WorkflowConfig;
|
|
86
|
+
export declare const DEFAULT_WORKFLOW_CONFIG: WorkflowConfig;
|
|
88
87
|
/**
|
|
89
88
|
* Whether a stage runs under a config. A `null` config means "no workflow" — the
|
|
90
89
|
* default pipeline, where every stage runs. Within a real config, a stage that is
|
|
91
90
|
* absent or `enabled: false` does not run.
|
|
92
91
|
*/
|
|
93
|
-
declare function workflowEnables(config: WorkflowConfig | null | undefined, key: WorkflowStepKey): boolean;
|
|
92
|
+
export declare function workflowEnables(config: WorkflowConfig | null | undefined, key: WorkflowStepKey): boolean;
|
|
94
93
|
/**
|
|
95
94
|
* The resolved address config for a session's workflow, or `null` when the
|
|
96
95
|
* address stage isn't enabled. Missing fields fall back to {@link DEFAULT_ADDRESS_CONFIG}.
|
|
97
96
|
*/
|
|
98
|
-
declare function workflowAddressConfig(config: WorkflowConfig | null | undefined): AddressStepConfig | null;
|
|
97
|
+
export declare function workflowAddressConfig(config: WorkflowConfig | null | undefined): AddressStepConfig | null;
|
|
99
98
|
/**
|
|
100
99
|
* The resolved screening config for a session's workflow, or `null` when the
|
|
101
100
|
* screening stage isn't enabled. Screening needs OCR fields to screen.
|
|
102
101
|
*/
|
|
103
|
-
declare function workflowScreeningConfig(config: WorkflowConfig | null | undefined): ScreeningStepConfig | null;
|
|
102
|
+
export declare function workflowScreeningConfig(config: WorkflowConfig | null | undefined): ScreeningStepConfig | null;
|
|
104
103
|
/** Whether OCR parsing should run: the document stage is on and `skip_ocr` is off. */
|
|
105
|
-
declare function workflowRunsOcr(config: WorkflowConfig | null | undefined): boolean;
|
|
104
|
+
export declare function workflowRunsOcr(config: WorkflowConfig | null | undefined): boolean;
|
|
106
105
|
/** The enabled stages in pipeline order (used by the widget to sequence its steps). */
|
|
107
|
-
declare function workflowEnabledSteps(config: WorkflowConfig | null | undefined): WorkflowStepKey[];
|
|
106
|
+
export declare function workflowEnabledSteps(config: WorkflowConfig | null | undefined): WorkflowStepKey[];
|
|
108
107
|
//#endregion
|
|
109
|
-
export { ADDRESS_METHODS, AVAILABLE_WORKFLOW_STEP_KEYS, AddressMethod, AddressOnFail, AddressStepConfig, DEFAULT_ADDRESS_CONFIG, DEFAULT_WORKFLOW_CONFIG, WORKFLOW_STEP_KEYS, Workflow, WorkflowConfig, WorkflowOptions, WorkflowStep, WorkflowStepKey, workflowAddressConfig, workflowEnabledSteps, workflowEnables, workflowRunsOcr, workflowScreeningConfig };
|
|
110
108
|
//# sourceMappingURL=workflow.d.mts.map
|
package/dist/workflow.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.d.mts","names":[],"sources":["../src/workflow.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"workflow.d.mts","names":[],"sources":["../src/workflow.ts"],"mappings":";;;;;;;;;;;;;;YAeY;;;;;;qBAOC,6BAA6B;;;;;;qBAO7B,uCAAuC;;YASxC;;qBAGC,0BAA0B;;YAG3B;;iBAGK;;EAEf,SAAS;;;;;EAKT,SAAS;;;;;;EAMT;;;qBAIW,wBAAwB;;iBAMpB;EACf,KAAK;EACL;;EAEA,SAAS,oBAAoB;;;iBAId;;;;;;EAMf;;EAEA;;EAEA,cAAc;;;iBAIC;EACf,OAAO;EACP,SAAS;;;iBAIM,iBAAiB;EAChC,IAAI;EACJ,iBAAiB;EACjB;EACA,YAAY;EACZ,YAAY;;;qBAID,yBAAyB;;;;;;wBActB,gBAAgB,QAAQ,mCAAmC,KAAK;;;;;wBAYhE,sBAAsB,QAAQ,oCAAoC;;;;;wBAYlE,wBAAwB,QAAQ,oCAAoC;;wBASpE,gBAAgB,QAAQ;;wBAOxB,qBAAqB,QAAQ,oCAAoC"}
|