@arkyc/types 2.1.1 → 2.2.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/project.d.mts +12 -1
- package/dist/project.d.mts.map +1 -1
- package/dist/project.mjs.map +1 -1
- package/package.json +1 -1
package/dist/project.d.mts
CHANGED
|
@@ -16,7 +16,18 @@ export interface VerificationThresholds {
|
|
|
16
16
|
ocrConfidenceThreshold: number;
|
|
17
17
|
livenessThreshold: number;
|
|
18
18
|
faceMatchThreshold: number;
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Face-match similarity below which a session is rejected outright. Unset (the
|
|
21
|
+
* default), the face-match driver's own verdict decides, and a failed match is
|
|
22
|
+
* rejected. Set it below `faceMatchThreshold` so weak-but-plausible matches go to
|
|
23
|
+
* manual review instead: rejected below this, reviewed from here up to
|
|
24
|
+
* `faceMatchThreshold`, auto-approved above it. Document portraits often score
|
|
25
|
+
* lower against a live selfie than two photos do, so this suits ID-to-selfie.
|
|
26
|
+
*/
|
|
27
|
+
faceMatchRejectThreshold?: number | null;
|
|
28
|
+
/**
|
|
29
|
+
* Minimum address-verification confidence before flagging for review.
|
|
30
|
+
*/
|
|
20
31
|
addressThreshold: number;
|
|
21
32
|
}
|
|
22
33
|
/** Platform default verification thresholds. */
|
package/dist/project.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.mts","names":[],"sources":["../src/project.ts"],"mappings":";;;;;;YAOY;;YAGA;;;;;iBAMK;EACf;EACA;EACA;EACA
|
|
1
|
+
{"version":3,"file":"project.d.mts","names":[],"sources":["../src/project.ts"],"mappings":";;;;;;YAOY;;YAGA;;;;;iBAMK;EACf;EACA;EACA;EACA;;;;;;;;;EASA;;;;EAIA;;;qBAIW,iCAAiC;;iBAS7B;EACf;;;;;EAKA;EACA;EACA;EACA;;EAEA;;;;;EAKA;;;;;;;iBAQe;;EAEf;;;;;EAKA;;;iBAIe,wBAAwB;EACvC,aAAa,QAAQ;EACrB;;EAEA;;EAEA,gBAAgB;;EAEhB,UAAU;;EAEV,WAAW,QAAQ;;;;;;iBAOJ,gBAAgB,QAAQ;EACvC;EACA;EACA,aAAa;EACb,UAAU;EACV,UAAU;EACV,QAAQ;EACR;;;iBAIe,sBAAsB,QAAQ;EAC7C,SAAS;EACT,SAAS;EACT,QAAQ;;;;;;iBAOO,eAAe,QAAQ;EACtC;EACA;EACA;EACA,cAAc;EACd,YAAY;EACZ,YAAY;;;iBAIG;EACf,SAAS;;EAET;;;iBAIe;EACf,iBAAiB;EACjB,YAAY;EACZ,aAAa"}
|
package/dist/project.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.mjs","names":[],"sources":["../src/project.ts"],"sourcesContent":["import type { Entity, Id, IsoDateTime, Metadata, OrganizationScoped, ProjectScoped } from './common'\n\nimport type {
|
|
1
|
+
{"version":3,"file":"project.mjs","names":[],"sources":["../src/project.ts"],"sourcesContent":["import type { Entity, Id, IsoDateTime, Metadata, OrganizationScoped, ProjectScoped } from './common'\n\nimport type { CaptureModel } from './settings'\nimport type { MembershipStatus } from './organization'\nimport type { VelocitySettings } from './risk'\n\n/** Deployment environment for a project. */\nexport type ProjectEnvironment = 'production' | 'staging' | 'development'\n\n/** Project lifecycle status. */\nexport type ProjectStatus = 'active' | 'paused' | 'archived'\n\n/**\n * Per-project, configurable thresholds the decision engine compares scores\n * against. Projects may override any subset of {@link DEFAULT_VERIFICATION_THRESHOLDS}.\n */\nexport interface VerificationThresholds {\n documentQualityThreshold: number\n ocrConfidenceThreshold: number\n livenessThreshold: number\n faceMatchThreshold: number\n /**\n * Face-match similarity below which a session is rejected outright. Unset (the\n * default), the face-match driver's own verdict decides, and a failed match is\n * rejected. Set it below `faceMatchThreshold` so weak-but-plausible matches go to\n * manual review instead: rejected below this, reviewed from here up to\n * `faceMatchThreshold`, auto-approved above it. Document portraits often score\n * lower against a live selfie than two photos do, so this suits ID-to-selfie.\n */\n faceMatchRejectThreshold?: number | null\n /**\n * Minimum address-verification confidence before flagging for review.\n */\n addressThreshold: number\n}\n\n/** Platform default verification thresholds. */\nexport const DEFAULT_VERIFICATION_THRESHOLDS: VerificationThresholds = {\n documentQualityThreshold: 0.75,\n ocrConfidenceThreshold: 0.8,\n livenessThreshold: 0.85,\n faceMatchThreshold: 0.75,\n addressThreshold: 0.6,\n}\n\n/** Visual branding applied to the widget for a project. */\nexport interface ProjectBranding {\n logo_url?: string | null\n /**\n * Storage object key of an uploaded logo. Server-side only: the API resolves\n * it to a (signed, when the disk is private) `logo_url` in every response.\n */\n logo_key?: string | null\n primary_color?: string\n border_radius?: number\n theme?: 'light' | 'dark'\n /** Display name (company/product) shown in the widget header. */\n name?: string | null\n /**\n * Whether to show the project's name/logo in the widget header. Defaults to\n * shown; set `false` for an unbranded (white-label) header.\n */\n show_branding?: boolean\n}\n\n/**\n * Cross-device handoff: a desktop user continues an in-progress verification on\n * their phone by scanning a QR code.\n * The QR is shown first on desktop.\n */\nexport interface ProjectHandoffSettings {\n /** Whether desktop users are offered the QR handoff to their phone. */\n enabled?: boolean\n /**\n * Whether a desktop user may instead continue on the desktop device. When\n * `false`, a desktop user must scan to a phone (no \"continue here\"). Defaults true.\n */\n allow_desktop?: boolean\n}\n\n/** Project-level configuration. */\nexport interface ProjectSettings extends Metadata {\n thresholds?: Partial<VerificationThresholds>\n allowed_origins?: string[]\n /** Maximum verification attempts before a session is hard-failed. */\n max_retries?: number\n /** Overrides the global capture model for this project (Phase 17). */\n capture_model?: CaptureModel\n /** Cross-device session handoff (QR). Off unless the project opts in. */\n handoff?: ProjectHandoffSettings\n /** Repeat-session limits per network address (`VELOCITY_EXCEEDED`). */\n velocity?: Partial<VelocitySettings>\n}\n\n/**\n * A specific application, environment, or product integration owned by a\n * organization. Sessions, API keys, and webhooks are scoped to a project.\n */\nexport interface Project extends Entity, OrganizationScoped {\n name: string\n slug: string\n environment: ProjectEnvironment\n settings: ProjectSettings\n branding: ProjectBranding\n status: ProjectStatus\n has_ai_grant?: boolean\n}\n\n/** Links a user to a project with a role (narrower tha organization membership). */\nexport interface ProjectMember extends Entity, ProjectScoped {\n user_id: Id\n role_id: Id\n status: MembershipStatus\n}\n\n/**\n * A project API key. Only `key_prefix` is stored in clear; the secret is hashed\n * (`key_hash`) and shown to the integrator exactly once at creation.\n */\nexport interface ApiKey extends Entity, ProjectScoped {\n name: string\n key_prefix: string\n key_hash: string\n last_used_at: IsoDateTime | null\n expires_at: IsoDateTime | null\n revoked_at: IsoDateTime | null\n}\n\n/** An API key plus its one-time-visible secret, returned only at creation. */\nexport interface ApiKeyWithSecret {\n api_key: ApiKey\n /** The full secret key, e.g. `sk_live_…`. Never persisted in clear. */\n secret: string\n}\n\n/** Resolves the organization + project + (optionally) acting user for a request. */\nexport interface ProjectContext {\n organization_id: Id\n project_id: Id\n api_key_id?: Id\n}\n"],"mappings":";;AAqCA,MAAa,kCAA0D;CACrE,0BAA0B;CAC1B,wBAAwB;CACxB,mBAAmB;CACnB,oBAAoB;CACpB,kBAAkB;AACpB"}
|