@arkyc/types 1.2.9 → 1.2.10

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.
@@ -0,0 +1,95 @@
1
+ import { Entity, Id, ProjectScoped } from "./common.mjs";
2
+
3
+ //#region src/access.d.ts
4
+ /**
5
+ * A gated project capability. Extended access generalizes what used to be the
6
+ * single AI-processing grant: projects request one or more capabilities, a
7
+ * platform admin approves each independently, and the app enforces the grant at
8
+ * runtime. New gated (and, later, paywalled) features are added here plus a row
9
+ * in {@link ACCESS_CAPABILITIES}, not a new subsystem.
10
+ */
11
+ type AccessCapability = 'ai' | 'pii';
12
+ /**
13
+ * The lifecycle of a capability grant. `none` is synthetic (no row yet) and only
14
+ * appears in API/UI responses; it is never persisted.
15
+ */
16
+ type AccessGrantStatus = 'none' | 'pending' | 'granted' | 'revoked';
17
+ /** Categories of personal data a project may request access to (PII capability). */
18
+ type PiiCategory = 'identity' | 'address';
19
+ /** When a project needs the PII: before the session is decided, or only after. */
20
+ type PiiTiming = 'before' | 'after';
21
+ /**
22
+ * Capability-specific request detail. Only meaningful for `pii`: what data the
23
+ * project needs, when, and their justification for being able to protect it.
24
+ */
25
+ interface AccessGrantDetails {
26
+ categories?: PiiCategory[];
27
+ timing?: PiiTiming;
28
+ justification?: string | null;
29
+ }
30
+ /** A per-`(project, capability)` entitlement with a request/review lifecycle. */
31
+ interface AccessGrant extends Entity, ProjectScoped {
32
+ capability: AccessCapability;
33
+ status: AccessGrantStatus;
34
+ details: AccessGrantDetails | null;
35
+ note: string | null;
36
+ requested_by: Id | null;
37
+ requested_at: string | null;
38
+ reviewed_by: Id | null;
39
+ reviewed_at: string | null;
40
+ }
41
+ /** Registry metadata for one capability. */
42
+ interface AccessCapabilityMeta {
43
+ key: AccessCapability;
44
+ label: string;
45
+ /** Whether projects can self-request it (vs admin-only grant). */
46
+ requestable: boolean;
47
+ /** Whether a request must carry {@link AccessGrantDetails} (PII does). */
48
+ requiresDetails: boolean;
49
+ }
50
+ /**
51
+ * The capability registry: the single source of truth for what can be gated.
52
+ * Enforcement and UIs iterate this rather than hard-coding capability names.
53
+ * (Room is left here for future `plan`/`billable` metadata behind a paywall.)
54
+ */
55
+ declare const ACCESS_CAPABILITIES: Record<AccessCapability, AccessCapabilityMeta>;
56
+ /** All capability keys, in display order. */
57
+ declare const ACCESS_CAPABILITY_KEYS: AccessCapability[];
58
+ /**
59
+ * Identity fields extracted from the document (the `identity` PII category).
60
+ */
61
+ interface ExtractedIdentity {
62
+ first_name: string | null;
63
+ last_name: string | null;
64
+ full_name: string | null;
65
+ date_of_birth: string | null;
66
+ document_number: string | null;
67
+ expiry_date: string | null;
68
+ nationality: string | null;
69
+ }
70
+ /**
71
+ * Residential address fields (the `address` PII category).
72
+ */
73
+ interface ExtractedAddress {
74
+ line1: string | null;
75
+ line2: string | null;
76
+ city: string | null;
77
+ region: string | null;
78
+ postal_code: string | null;
79
+ country: string | null;
80
+ latitude: number | null;
81
+ longitude: number | null;
82
+ }
83
+ /**
84
+ * The extracted personal data a project may read once granted the `pii`
85
+ * capability. Only the granted {@link PiiCategory | categories} are present, and
86
+ * (for `after` timing) only once the session is decided. Absent entirely when
87
+ * the project has no granted PII entitlement.
88
+ */
89
+ interface ExtractedData {
90
+ identity?: ExtractedIdentity;
91
+ address?: ExtractedAddress;
92
+ }
93
+ //#endregion
94
+ export { ACCESS_CAPABILITIES, ACCESS_CAPABILITY_KEYS, AccessCapability, AccessCapabilityMeta, AccessGrant, AccessGrantDetails, AccessGrantStatus, ExtractedAddress, ExtractedData, ExtractedIdentity, PiiCategory, PiiTiming };
95
+ //# sourceMappingURL=access.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access.d.mts","names":[],"sources":["../src/access.ts"],"mappings":";;;;;AASA;;;;AAA4B;KAAhB,gBAAA;;;;AAMiB;KAAjB,iBAAA;;KAGA,WAAA;;KAGA,SAAA;AAAZ;;;;AAAA,UAMiB,kBAAA;EACf,UAAA,GAAa,WAAA;EACb,MAAA,GAAS,SAAS;EAClB,aAAA;AAAA;;UAIe,WAAA,SAAoB,MAAA,EAAQ,aAAA;EAC3C,UAAA,EAAY,gBAAA;EACZ,MAAA,EAAQ,iBAAA;EACR,OAAA,EAAS,kBAAA;EACT,IAAA;EACA,YAAA,EAAc,EAAA;EACd,YAAA;EACA,WAAA,EAAa,EAAA;EACb,WAAA;AAAA;;UAIe,oBAAA;EACf,GAAA,EAAK,gBAAgB;EACrB,KAAA;EAdmC;EAgBnC,WAAA;EAhBwD;EAkBxD,eAAA;AAAA;;;;;;cAQW,mBAAA,EAAqB,MAAA,CAAO,gBAAA,EAAkB,oBAAA;;cAM9C,sBAAA,EAAwB,gBAAgB;;;;UAKpC,iBAAA;EACf,UAAA;EACA,SAAA;EACA,SAAA;EACA,aAAA;EACA,eAAA;EACA,WAAA;EACA,WAAA;AAAA;;;;UAMe,gBAAA;EACf,KAAA;EACA,KAAA;EACA,IAAA;EACA,MAAA;EACA,WAAA;EACA,OAAA;EACA,QAAA;EACA,SAAA;AAAA;;;;;;;UASe,aAAA;EACf,QAAA,GAAW,iBAAA;EACX,OAAA,GAAU,gBAAgB;AAAA"}
@@ -0,0 +1,26 @@
1
+ //#region src/access.ts
2
+ /**
3
+ * The capability registry: the single source of truth for what can be gated.
4
+ * Enforcement and UIs iterate this rather than hard-coding capability names.
5
+ * (Room is left here for future `plan`/`billable` metadata behind a paywall.)
6
+ */
7
+ const ACCESS_CAPABILITIES = {
8
+ ai: {
9
+ key: "ai",
10
+ label: "AI document processing",
11
+ requestable: true,
12
+ requiresDetails: false
13
+ },
14
+ pii: {
15
+ key: "pii",
16
+ label: "Extracted PII access",
17
+ requestable: true,
18
+ requiresDetails: true
19
+ }
20
+ };
21
+ /** All capability keys, in display order. */
22
+ const ACCESS_CAPABILITY_KEYS = ["ai", "pii"];
23
+ //#endregion
24
+ export { ACCESS_CAPABILITIES, ACCESS_CAPABILITY_KEYS };
25
+
26
+ //# sourceMappingURL=access.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access.mjs","names":[],"sources":["../src/access.ts"],"sourcesContent":["import type { Entity, Id, ProjectScoped } from './common'\n\n/**\n * A gated project capability. Extended access generalizes what used to be the\n * single AI-processing grant: projects request one or more capabilities, a\n * platform admin approves each independently, and the app enforces the grant at\n * runtime. New gated (and, later, paywalled) features are added here plus a row\n * in {@link ACCESS_CAPABILITIES}, not a new subsystem.\n */\nexport type AccessCapability = 'ai' | 'pii'\n\n/**\n * The lifecycle of a capability grant. `none` is synthetic (no row yet) and only\n * appears in API/UI responses; it is never persisted.\n */\nexport type AccessGrantStatus = 'none' | 'pending' | 'granted' | 'revoked'\n\n/** Categories of personal data a project may request access to (PII capability). */\nexport type PiiCategory = 'identity' | 'address'\n\n/** When a project needs the PII: before the session is decided, or only after. */\nexport type PiiTiming = 'before' | 'after'\n\n/**\n * Capability-specific request detail. Only meaningful for `pii`: what data the\n * project needs, when, and their justification for being able to protect it.\n */\nexport interface AccessGrantDetails {\n categories?: PiiCategory[]\n timing?: PiiTiming\n justification?: string | null\n}\n\n/** A per-`(project, capability)` entitlement with a request/review lifecycle. */\nexport interface AccessGrant extends Entity, ProjectScoped {\n capability: AccessCapability\n status: AccessGrantStatus\n details: AccessGrantDetails | null\n note: string | null\n requested_by: Id | null\n requested_at: string | null\n reviewed_by: Id | null\n reviewed_at: string | null\n}\n\n/** Registry metadata for one capability. */\nexport interface AccessCapabilityMeta {\n key: AccessCapability\n label: string\n /** Whether projects can self-request it (vs admin-only grant). */\n requestable: boolean\n /** Whether a request must carry {@link AccessGrantDetails} (PII does). */\n requiresDetails: boolean\n}\n\n/**\n * The capability registry: the single source of truth for what can be gated.\n * Enforcement and UIs iterate this rather than hard-coding capability names.\n * (Room is left here for future `plan`/`billable` metadata behind a paywall.)\n */\nexport const ACCESS_CAPABILITIES: Record<AccessCapability, AccessCapabilityMeta> = {\n ai: { key: 'ai', label: 'AI document processing', requestable: true, requiresDetails: false },\n pii: { key: 'pii', label: 'Extracted PII access', requestable: true, requiresDetails: true },\n}\n\n/** All capability keys, in display order. */\nexport const ACCESS_CAPABILITY_KEYS: AccessCapability[] = ['ai', 'pii']\n\n/**\n * Identity fields extracted from the document (the `identity` PII category).\n */\nexport interface ExtractedIdentity {\n first_name: string | null\n last_name: string | null\n full_name: string | null\n date_of_birth: string | null\n document_number: string | null\n expiry_date: string | null\n nationality: string | null\n}\n\n/**\n * Residential address fields (the `address` PII category).\n */\nexport interface ExtractedAddress {\n line1: string | null\n line2: string | null\n city: string | null\n region: string | null\n postal_code: string | null\n country: string | null\n latitude: number | null\n longitude: number | null\n}\n\n/**\n * The extracted personal data a project may read once granted the `pii`\n * capability. Only the granted {@link PiiCategory | categories} are present, and\n * (for `after` timing) only once the session is decided. Absent entirely when\n * the project has no granted PII entitlement.\n */\nexport interface ExtractedData {\n identity?: ExtractedIdentity\n address?: ExtractedAddress\n}\n"],"mappings":";;;;;;AA4DA,MAAa,sBAAsE;CACjF,IAAI;EAAE,KAAK;EAAM,OAAO;EAA0B,aAAa;EAAM,iBAAiB;CAAM;CAC5F,KAAK;EAAE,KAAK;EAAO,OAAO;EAAwB,aAAa;EAAM,iBAAiB;CAAK;AAC7F;;AAGA,MAAa,yBAA6C,CAAC,MAAM,KAAK"}
package/dist/index.d.mts CHANGED
@@ -11,7 +11,8 @@ import { AddressMethodResult, AddressResultData, AddressVerification, DocumentCa
11
11
  import { Review, ReviewAction, ReviewNote } from "./review.mjs";
12
12
  import { WebhookChecks, WebhookDelivery, WebhookDeliveryStatus, WebhookEndpoint, WebhookEndpointStatus, WebhookEvent, WebhookEventName } from "./webhook.mjs";
13
13
  import { ActorType, AuditLog } from "./audit.mjs";
14
+ import { ACCESS_CAPABILITIES, ACCESS_CAPABILITY_KEYS, AccessCapability, AccessCapabilityMeta, AccessGrant, AccessGrantDetails, AccessGrantStatus, ExtractedAddress, ExtractedData, ExtractedIdentity, PiiCategory, PiiTiming } from "./access.mjs";
14
15
  import { CreateSessionParams, SdkOptions, SessionResource } from "./sdk.mjs";
15
16
  import { WidgetMode, WidgetOptions, WidgetResult, WidgetStep } from "./widget.mjs";
16
17
  import { ApiErrorKey } from "./errors.mjs";
17
- export { ADDRESS_METHODS, AVAILABLE_WORKFLOW_STEP_KEYS, ActorType, AddressMethod, AddressMethodResult, AddressOnFail, AddressResultData, AddressStepConfig, AddressVerification, AdminPermission, AdminPermissionGroup, AdminPermissionKey, AdminRoleSlug, AnyPermissionGroup, AnyPermissionKey, ApiErrorKey, ApiKey, ApiKeyWithSecret, AuditLog, CaptureModel, CreateSessionParams, DEFAULT_ADDRESS_CONFIG, DEFAULT_GLOBAL_SETTINGS, DEFAULT_WORKFLOW_CONFIG, DecisionReason, DocumentCapture, DocumentPortrait, DocumentType, Entity, FaceMatchCheck, FaceMatchResultData, GlobalSetting, GlobalSettings, Id, InvitationStatus, IsoDate, IsoDateTime, LivenessChallenge, LivenessCheck, LivenessMode, LivenessResultData, MembershipStatus, Metadata, OcrAuthenticity, OcrFields, OcrResult, OcrResultData, Organization, OrganizationInvitation, OrganizationMember, OrganizationScoped, OrganizationSettings, Permission, PermissionGroup, PermissionKey, PostalAddress, Project, ProjectBranding, ProjectContext, ProjectEnvironment, ProjectHandoffSettings, ProjectMember, ProjectScoped, ProjectSettings, ProjectStatus, PublicUser, REALTIME_EVENT, RealtimeEventName, RealtimeTransport, Review, ReviewAction, ReviewActionEvent, ReviewNote, Role, RolePermission, SdkOptions, SessionResource, SessionTransitionEvent, SpoofSignals, SystemRoleSlug, Timestamps, User, UserPermission, VerificationDecision, VerificationSession, VerificationStatus, VerificationThresholds, WORKFLOW_STEP_KEYS, WebhookChecks, WebhookDelivery, WebhookDeliveryStatus, WebhookEndpoint, WebhookEndpointStatus, WebhookEvent, WebhookEventName, WidgetMode, WidgetOptions, WidgetResult, WidgetStep, Workflow, WorkflowConfig, WorkflowOptions, WorkflowStep, WorkflowStepKey, parseRealtimeChannel, realtimeChannels, workflowAddressConfig, workflowEnabledSteps, workflowEnables, workflowRunsOcr };
18
+ export { ACCESS_CAPABILITIES, ACCESS_CAPABILITY_KEYS, ADDRESS_METHODS, AVAILABLE_WORKFLOW_STEP_KEYS, AccessCapability, AccessCapabilityMeta, AccessGrant, AccessGrantDetails, AccessGrantStatus, ActorType, AddressMethod, AddressMethodResult, AddressOnFail, AddressResultData, AddressStepConfig, AddressVerification, AdminPermission, AdminPermissionGroup, AdminPermissionKey, AdminRoleSlug, AnyPermissionGroup, AnyPermissionKey, ApiErrorKey, ApiKey, ApiKeyWithSecret, AuditLog, CaptureModel, CreateSessionParams, DEFAULT_ADDRESS_CONFIG, DEFAULT_GLOBAL_SETTINGS, DEFAULT_WORKFLOW_CONFIG, DecisionReason, DocumentCapture, DocumentPortrait, DocumentType, Entity, ExtractedAddress, ExtractedData, ExtractedIdentity, FaceMatchCheck, FaceMatchResultData, GlobalSetting, GlobalSettings, Id, InvitationStatus, IsoDate, IsoDateTime, LivenessChallenge, LivenessCheck, LivenessMode, LivenessResultData, MembershipStatus, Metadata, OcrAuthenticity, OcrFields, OcrResult, OcrResultData, Organization, OrganizationInvitation, OrganizationMember, OrganizationScoped, OrganizationSettings, Permission, PermissionGroup, PermissionKey, PiiCategory, PiiTiming, PostalAddress, Project, ProjectBranding, ProjectContext, ProjectEnvironment, ProjectHandoffSettings, ProjectMember, ProjectScoped, ProjectSettings, ProjectStatus, PublicUser, REALTIME_EVENT, RealtimeEventName, RealtimeTransport, Review, ReviewAction, ReviewActionEvent, ReviewNote, Role, RolePermission, SdkOptions, SessionResource, SessionTransitionEvent, SpoofSignals, SystemRoleSlug, Timestamps, User, UserPermission, VerificationDecision, VerificationSession, VerificationStatus, VerificationThresholds, WORKFLOW_STEP_KEYS, WebhookChecks, WebhookDelivery, WebhookDeliveryStatus, WebhookEndpoint, WebhookEndpointStatus, WebhookEvent, WebhookEventName, WidgetMode, WidgetOptions, WidgetResult, WidgetStep, Workflow, WorkflowConfig, WorkflowOptions, WorkflowStep, WorkflowStepKey, parseRealtimeChannel, realtimeChannels, workflowAddressConfig, workflowEnabledSteps, workflowEnables, workflowRunsOcr };
package/dist/index.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  import { DEFAULT_GLOBAL_SETTINGS } from "./settings.mjs";
2
2
  import { REALTIME_EVENT, parseRealtimeChannel, realtimeChannels } from "./realtime.mjs";
3
3
  import { ADDRESS_METHODS, AVAILABLE_WORKFLOW_STEP_KEYS, DEFAULT_ADDRESS_CONFIG, DEFAULT_WORKFLOW_CONFIG, WORKFLOW_STEP_KEYS, workflowAddressConfig, workflowEnabledSteps, workflowEnables, workflowRunsOcr } from "./workflow.mjs";
4
- export { ADDRESS_METHODS, AVAILABLE_WORKFLOW_STEP_KEYS, DEFAULT_ADDRESS_CONFIG, DEFAULT_GLOBAL_SETTINGS, DEFAULT_WORKFLOW_CONFIG, REALTIME_EVENT, WORKFLOW_STEP_KEYS, parseRealtimeChannel, realtimeChannels, workflowAddressConfig, workflowEnabledSteps, workflowEnables, workflowRunsOcr };
4
+ import { ACCESS_CAPABILITIES, ACCESS_CAPABILITY_KEYS } from "./access.mjs";
5
+ export { ACCESS_CAPABILITIES, ACCESS_CAPABILITY_KEYS, ADDRESS_METHODS, AVAILABLE_WORKFLOW_STEP_KEYS, DEFAULT_ADDRESS_CONFIG, DEFAULT_GLOBAL_SETTINGS, DEFAULT_WORKFLOW_CONFIG, REALTIME_EVENT, WORKFLOW_STEP_KEYS, parseRealtimeChannel, realtimeChannels, workflowAddressConfig, workflowEnabledSteps, workflowEnables, workflowRunsOcr };
package/dist/rbac.d.mts CHANGED
@@ -18,9 +18,9 @@ type SystemRoleSlug = 'owner' | 'admin' | 'reviewer' | 'developer' | 'readonly';
18
18
  * These gate the super-admin surface above organizations and are only ever granted
19
19
  * through {@link AdminPermission} (never an organization role). Rows carry `admin: true`.
20
20
  */
21
- type AdminPermissionKey = 'admin.organizations.view' | 'admin.organizations.manage' | 'admin.users.view' | 'admin.users.manage' | 'admin.settings.view' | 'admin.settings.update' | 'admin.audit.view' | 'admin.billing.view' | 'admin.billing.update' | 'admin.ai_processing.view' | 'admin.ai_processing.manage';
21
+ type AdminPermissionKey = 'admin.organizations.view' | 'admin.organizations.manage' | 'admin.users.view' | 'admin.users.manage' | 'admin.settings.view' | 'admin.settings.update' | 'admin.audit.view' | 'admin.billing.view' | 'admin.billing.update' | 'admin.extended_access.view' | 'admin.extended_access.manage';
22
22
  /** The domain groups platform-admin permissions are organised under. */
23
- type AdminPermissionGroup = 'admin.organizations' | 'admin.users' | 'admin.settings' | 'admin.audit' | 'admin.billing' | 'admin.ai_processing';
23
+ type AdminPermissionGroup = 'admin.organizations' | 'admin.users' | 'admin.settings' | 'admin.audit' | 'admin.billing' | 'admin.extended_access';
24
24
  /** Any permission string, organization- or platform-scope. */
25
25
  type AnyPermissionKey = PermissionKey | AdminPermissionKey;
26
26
  /** Any permission group, organization- or platform-scope. */
package/dist/sdk.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Metadata } from "./common.mjs";
2
2
  import { VerificationDecision, VerificationStatus } from "./verification.mjs";
3
+ import { ExtractedData } from "./access.mjs";
3
4
 
4
5
  //#region src/sdk.d.ts
5
6
  /** Options for constructing the server SDK client (`new Arkyc(...)`). */
@@ -26,6 +27,8 @@ interface SessionResource {
26
27
  decision: VerificationDecision | null;
27
28
  /** Short-lived client token for launching the widget (create response only). */
28
29
  client_token?: string;
30
+ /** Extracted PII, present only when the project holds a granted `pii` entitlement. */
31
+ extracted?: ExtractedData | null;
29
32
  expires_at: string;
30
33
  created_at: string;
31
34
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.mts","names":[],"sources":["../src/sdk.ts"],"mappings":";;;;;UAIiB,UAAA;EAAA;EAEf,SAAA;;EAEA,OAAA;EAFA;EAIA,SAAA;AAAA;;UAIe,mBAAA;EACf,aAAA;EACA,QAAA,GAAW,QAAQ;;EAEnB,gBAAA;AAAA;;UAIe,eAAA;EACf,EAAA;EACA,MAAA,EAAQ,kBAAA;EACR,cAAA;EACA,QAAA,EAAU,oBAAoB;EAJA;EAM9B,YAAA;EACA,UAAA;EACA,UAAA;AAAA"}
1
+ {"version":3,"file":"sdk.d.mts","names":[],"sources":["../src/sdk.ts"],"mappings":";;;;;;UAKiB,UAAA;EAAA;EAEf,SAAA;;EAEA,OAAA;EAFA;EAIA,SAAA;AAAA;;UAIe,mBAAA;EACf,aAAA;EACA,QAAA,GAAW,QAAQ;;EAEnB,gBAAA;AAAA;;UAIe,eAAA;EACf,EAAA;EACA,MAAA,EAAQ,kBAAA;EACR,cAAA;EACA,QAAA,EAAU,oBAAA;EAJoB;EAM9B,YAAA;EAJQ;EAMR,SAAA,GAAY,aAAA;EACZ,UAAA;EACA,UAAA;AAAA"}
@@ -35,6 +35,15 @@ interface GlobalSettings {
35
35
  capture: {
36
36
  model: CaptureModel;
37
37
  };
38
+ /** Signed session-asset links (captured document/selfie images). */
39
+ assets: {
40
+ /**
41
+ * How long a signed asset URL stays valid, in seconds. The link embeds its
42
+ * own expiry, so a change only affects newly minted URLs; existing links
43
+ * keep their original window. Bounded to [60, 86400] (1 minute to 24 hours).
44
+ */
45
+ url_ttl_seconds: number;
46
+ };
38
47
  }
39
48
  /** The persisted singleton row backing {@link GlobalSettings}. */
40
49
  interface GlobalSetting extends Entity {
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.mts","names":[],"sources":["../src/settings.ts"],"mappings":";;;;;AASA;;;;AAA6B;KAAjB,iBAAA;;;;AAOY;AAOxB;KAPY,YAAA;;;;;;UAOK,cAAA;EASf;EAPA,QAAA;IACE,IAAA;IACA,aAAA,iBAUA;IARA,eAAA;EAAA;EAQmB;EALrB,QAAA;IACE,SAAA,EAAW,iBAAA;EAAA;EAS8B;EAN3C,OAAA;IACE,KAAA,EAAO,YAAY;EAAA;AAAA;AAMG;AAAA,UADT,aAAA,SAAsB,MAAM;EAC3C,QAAA,EAAU,cAAA;AAAA;;cAIC,uBAAA,EAAyB,cAYrC"}
1
+ {"version":3,"file":"settings.d.mts","names":[],"sources":["../src/settings.ts"],"mappings":";;;;;AASA;;;;AAA6B;KAAjB,iBAAA;;;;AAOY;AAOxB;KAPY,YAAA;;;;;;UAOK,cAAA;EASf;EAPA,QAAA;IACE,IAAA;IACA,aAAA,iBAUA;IARA,eAAA;EAAA;EAiBA;EAdF,QAAA;IACE,SAAA,EAAW,iBAAA;EAAA;EAkBgB;EAf7B,OAAA;IACE,KAAA,EAAO,YAAY;EAAA;EAerB;EAZA,MAAA;IAYwB;AAAA;AAI1B;;;IAVI,eAAA;EAAA;AAAA;;UAKa,aAAA,SAAsB,MAAM;EAC3C,QAAA,EAAU,cAAA;AAAA;;cAIC,uBAAA,EAAyB,cAerC"}
package/dist/settings.mjs CHANGED
@@ -7,7 +7,8 @@ const DEFAULT_GLOBAL_SETTINGS = {
7
7
  signups_enabled: true
8
8
  },
9
9
  realtime: { transport: "off" },
10
- capture: { model: "passive" }
10
+ capture: { model: "passive" },
11
+ assets: { url_ttl_seconds: 1800 }
11
12
  };
12
13
  //#endregion
13
14
  export { DEFAULT_GLOBAL_SETTINGS };
@@ -1 +1 @@
1
- {"version":3,"file":"settings.mjs","names":[],"sources":["../src/settings.ts"],"sourcesContent":["import type { Entity } from './common'\n\n/**\n * Realtime transport for verification events (Phase 16). `pusher` covers both\n * hosted Pusher Channels (default, via a cluster) and self-hosted soketi (opt-in,\n * via a host) — they share the Pusher protocol. `polling` carries no push\n * transport: clients poll the session endpoint instead (a universal fallback that\n * needs no infrastructure). `off` disables live updates entirely.\n */\nexport type RealtimeTransport = 'pusher' | 'firebase' | 'polling' | 'off'\n\n/**\n * Which capture/liveness flow the widget offers (Phase 17). `passive` = the\n * current selfie flow; `active` = guided active-liveness challenges; `both` =\n * offer active, falling back to passive on failure/unsupported devices.\n */\nexport type CaptureModel = 'passive' | 'active' | 'both'\n\n/**\n * Platform-wide settings, managed by platform admins on the `/admin` surface and\n * read by the app at runtime. A single typed record (see {@link GlobalSetting}),\n * always merged over {@link DEFAULT_GLOBAL_SETTINGS} so every key is present.\n */\nexport interface GlobalSettings {\n /** Branding/basics for the whole platform. */\n platform: {\n name: string\n support_email: string | null\n /** Whether new organization sign-ups are accepted. */\n signups_enabled: boolean\n }\n /** Realtime delivery configuration (consumed in Phase 16). */\n realtime: {\n transport: RealtimeTransport\n }\n /** Default capture/liveness flow offered to widgets (Phase 17). */\n capture: {\n model: CaptureModel\n }\n}\n\n/** The persisted singleton row backing {@link GlobalSettings}. */\nexport interface GlobalSetting extends Entity {\n settings: GlobalSettings\n}\n\n/** Defaults applied when a settings key is unset. */\nexport const DEFAULT_GLOBAL_SETTINGS: GlobalSettings = {\n platform: {\n name: 'Arkyc',\n support_email: null,\n signups_enabled: true,\n },\n realtime: {\n transport: 'off',\n },\n capture: {\n model: 'passive',\n },\n}\n"],"mappings":";;AA+CA,MAAa,0BAA0C;CACrD,UAAU;EACR,MAAM;EACN,eAAe;EACf,iBAAiB;CACnB;CACA,UAAU,EACR,WAAW,MACb;CACA,SAAS,EACP,OAAO,UACT;AACF"}
1
+ {"version":3,"file":"settings.mjs","names":[],"sources":["../src/settings.ts"],"sourcesContent":["import type { Entity } from './common'\n\n/**\n * Realtime transport for verification events (Phase 16). `pusher` covers both\n * hosted Pusher Channels (default, via a cluster) and self-hosted soketi (opt-in,\n * via a host) — they share the Pusher protocol. `polling` carries no push\n * transport: clients poll the session endpoint instead (a universal fallback that\n * needs no infrastructure). `off` disables live updates entirely.\n */\nexport type RealtimeTransport = 'pusher' | 'firebase' | 'polling' | 'off'\n\n/**\n * Which capture/liveness flow the widget offers (Phase 17). `passive` = the\n * current selfie flow; `active` = guided active-liveness challenges; `both` =\n * offer active, falling back to passive on failure/unsupported devices.\n */\nexport type CaptureModel = 'passive' | 'active' | 'both'\n\n/**\n * Platform-wide settings, managed by platform admins on the `/admin` surface and\n * read by the app at runtime. A single typed record (see {@link GlobalSetting}),\n * always merged over {@link DEFAULT_GLOBAL_SETTINGS} so every key is present.\n */\nexport interface GlobalSettings {\n /** Branding/basics for the whole platform. */\n platform: {\n name: string\n support_email: string | null\n /** Whether new organization sign-ups are accepted. */\n signups_enabled: boolean\n }\n /** Realtime delivery configuration (consumed in Phase 16). */\n realtime: {\n transport: RealtimeTransport\n }\n /** Default capture/liveness flow offered to widgets (Phase 17). */\n capture: {\n model: CaptureModel\n }\n /** Signed session-asset links (captured document/selfie images). */\n assets: {\n /**\n * How long a signed asset URL stays valid, in seconds. The link embeds its\n * own expiry, so a change only affects newly minted URLs; existing links\n * keep their original window. Bounded to [60, 86400] (1 minute to 24 hours).\n */\n url_ttl_seconds: number\n }\n}\n\n/** The persisted singleton row backing {@link GlobalSettings}. */\nexport interface GlobalSetting extends Entity {\n settings: GlobalSettings\n}\n\n/** Defaults applied when a settings key is unset. */\nexport const DEFAULT_GLOBAL_SETTINGS: GlobalSettings = {\n platform: {\n name: 'Arkyc',\n support_email: null,\n signups_enabled: true,\n },\n realtime: {\n transport: 'off',\n },\n capture: {\n model: 'passive',\n },\n assets: {\n url_ttl_seconds: 1800,\n },\n}\n"],"mappings":";;AAwDA,MAAa,0BAA0C;CACrD,UAAU;EACR,MAAM;EACN,eAAe;EACf,iBAAiB;CACnB;CACA,UAAU,EACR,WAAW,MACb;CACA,SAAS,EACP,OAAO,UACT;CACA,QAAQ,EACN,iBAAiB,KACnB;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkyc/types",
3
- "version": "1.2.9",
3
+ "version": "1.2.10",
4
4
  "description": "Shared domain types and contracts for Arkyc",
5
5
  "license": "MIT",
6
6
  "keywords": [