@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/access.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Entity, Id, ProjectScoped } from "./common.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/access.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* A gated project capability. Extended access generalizes what used to be the
|
|
@@ -8,27 +7,27 @@ import { Entity, Id, ProjectScoped } from "./common.mjs";
|
|
|
8
7
|
* runtime. New gated (and, later, paywalled) features are added here plus a row
|
|
9
8
|
* in {@link ACCESS_CAPABILITIES}, not a new subsystem.
|
|
10
9
|
*/
|
|
11
|
-
type AccessCapability = 'ai' | 'pii';
|
|
10
|
+
export type AccessCapability = 'ai' | 'pii';
|
|
12
11
|
/**
|
|
13
12
|
* The lifecycle of a capability grant. `none` is synthetic (no row yet) and only
|
|
14
13
|
* appears in API/UI responses; it is never persisted.
|
|
15
14
|
*/
|
|
16
|
-
type AccessGrantStatus = 'none' | 'pending' | 'granted' | 'revoked';
|
|
15
|
+
export type AccessGrantStatus = 'none' | 'pending' | 'granted' | 'revoked';
|
|
17
16
|
/** Categories of personal data a project may request access to (PII capability). */
|
|
18
|
-
type PiiCategory = 'identity' | 'address';
|
|
17
|
+
export type PiiCategory = 'identity' | 'address';
|
|
19
18
|
/** When a project needs the PII: before the session is decided, or only after. */
|
|
20
|
-
type PiiTiming = 'before' | 'after';
|
|
19
|
+
export type PiiTiming = 'before' | 'after';
|
|
21
20
|
/**
|
|
22
21
|
* Capability-specific request detail. Only meaningful for `pii`: what data the
|
|
23
22
|
* project needs, when, and their justification for being able to protect it.
|
|
24
23
|
*/
|
|
25
|
-
interface AccessGrantDetails {
|
|
24
|
+
export interface AccessGrantDetails {
|
|
26
25
|
categories?: PiiCategory[];
|
|
27
26
|
timing?: PiiTiming;
|
|
28
27
|
justification?: string | null;
|
|
29
28
|
}
|
|
30
29
|
/** A per-`(project, capability)` entitlement with a request/review lifecycle. */
|
|
31
|
-
interface AccessGrant extends Entity, ProjectScoped {
|
|
30
|
+
export interface AccessGrant extends Entity, ProjectScoped {
|
|
32
31
|
capability: AccessCapability;
|
|
33
32
|
status: AccessGrantStatus;
|
|
34
33
|
details: AccessGrantDetails | null;
|
|
@@ -39,7 +38,7 @@ interface AccessGrant extends Entity, ProjectScoped {
|
|
|
39
38
|
reviewed_at: string | null;
|
|
40
39
|
}
|
|
41
40
|
/** Registry metadata for one capability. */
|
|
42
|
-
interface AccessCapabilityMeta {
|
|
41
|
+
export interface AccessCapabilityMeta {
|
|
43
42
|
key: AccessCapability;
|
|
44
43
|
label: string;
|
|
45
44
|
/** Whether projects can self-request it (vs admin-only grant). */
|
|
@@ -52,13 +51,13 @@ interface AccessCapabilityMeta {
|
|
|
52
51
|
* Enforcement and UIs iterate this rather than hard-coding capability names.
|
|
53
52
|
* (Room is left here for future `plan`/`billable` metadata behind a paywall.)
|
|
54
53
|
*/
|
|
55
|
-
declare const ACCESS_CAPABILITIES: Record<AccessCapability, AccessCapabilityMeta>;
|
|
54
|
+
export declare const ACCESS_CAPABILITIES: Record<AccessCapability, AccessCapabilityMeta>;
|
|
56
55
|
/** All capability keys, in display order. */
|
|
57
|
-
declare const ACCESS_CAPABILITY_KEYS: AccessCapability[];
|
|
56
|
+
export declare const ACCESS_CAPABILITY_KEYS: AccessCapability[];
|
|
58
57
|
/**
|
|
59
58
|
* Identity fields extracted from the document (the `identity` PII category).
|
|
60
59
|
*/
|
|
61
|
-
interface ExtractedIdentity {
|
|
60
|
+
export interface ExtractedIdentity {
|
|
62
61
|
first_name: string | null;
|
|
63
62
|
last_name: string | null;
|
|
64
63
|
full_name: string | null;
|
|
@@ -70,7 +69,7 @@ interface ExtractedIdentity {
|
|
|
70
69
|
/**
|
|
71
70
|
* Residential address fields (the `address` PII category).
|
|
72
71
|
*/
|
|
73
|
-
interface ExtractedAddress {
|
|
72
|
+
export interface ExtractedAddress {
|
|
74
73
|
line1: string | null;
|
|
75
74
|
line2: string | null;
|
|
76
75
|
city: string | null;
|
|
@@ -86,10 +85,9 @@ interface ExtractedAddress {
|
|
|
86
85
|
* (for `after` timing) only once the session is decided. Absent entirely when
|
|
87
86
|
* the project has no granted PII entitlement.
|
|
88
87
|
*/
|
|
89
|
-
interface ExtractedData {
|
|
88
|
+
export interface ExtractedData {
|
|
90
89
|
identity?: ExtractedIdentity;
|
|
91
90
|
address?: ExtractedAddress;
|
|
92
91
|
}
|
|
93
92
|
//#endregion
|
|
94
|
-
export { ACCESS_CAPABILITIES, ACCESS_CAPABILITY_KEYS, AccessCapability, AccessCapabilityMeta, AccessGrant, AccessGrantDetails, AccessGrantStatus, ExtractedAddress, ExtractedData, ExtractedIdentity, PiiCategory, PiiTiming };
|
|
95
93
|
//# sourceMappingURL=access.d.mts.map
|
package/dist/access.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access.d.mts","names":[],"sources":["../src/access.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"access.d.mts","names":[],"sources":["../src/access.ts"],"mappings":";;;;;;;;;YASY;;;;;YAMA;;YAGA;;YAGA;;;;;iBAMK;EACf,aAAa;EACb,SAAS;EACT;;;iBAIe,oBAAoB,QAAQ;EAC3C,YAAY;EACZ,QAAQ;EACR,SAAS;EACT;EACA,cAAc;EACd;EACA,aAAa;EACb;;;iBAIe;EACf,KAAK;EACL;;EAEA;;EAEA;;;;;;;qBAQW,qBAAqB,OAAO,kBAAkB;;qBAM9C,wBAAwB;;;;iBAKpB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;;;;;iBAMe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;;;iBASe;EACf,WAAW;EACX,UAAU"}
|
package/dist/audit.d.mts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Id, IsoDateTime, Metadata } from "./common.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/audit.d.ts
|
|
4
3
|
/** Who performed an audited action. */
|
|
5
|
-
type ActorType = 'user' | 'api_key' | 'system';
|
|
4
|
+
export type ActorType = 'user' | 'api_key' | 'system';
|
|
6
5
|
/**
|
|
7
6
|
* An immutable audit log entry. Project scope is optional (some actions are
|
|
8
7
|
* organization-level only). Audit rows are append-only and carry no `updated_at`.
|
|
9
8
|
*/
|
|
10
|
-
interface AuditLog {
|
|
9
|
+
export interface AuditLog {
|
|
11
10
|
id: Id;
|
|
12
11
|
organization_id: Id;
|
|
13
12
|
project_id: Id | null;
|
|
@@ -23,5 +22,4 @@ interface AuditLog {
|
|
|
23
22
|
created_at: IsoDateTime;
|
|
24
23
|
}
|
|
25
24
|
//#endregion
|
|
26
|
-
export { ActorType, AuditLog };
|
|
27
25
|
//# sourceMappingURL=audit.d.mts.map
|
package/dist/audit.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.mts","names":[],"sources":["../src/audit.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"audit.d.mts","names":[],"sources":["../src/audit.ts"],"mappings":";;;YAGY;;;;;iBAMK;EACf,IAAI;EACJ,iBAAiB;EACjB,YAAY;EACZ,UAAU;EACV,YAAY;;EAEZ;EACA;EACA,WAAW;EACX,UAAU;EACV;EACA;EACA,YAAY"}
|
package/dist/common.d.mts
CHANGED
|
@@ -7,30 +7,29 @@
|
|
|
7
7
|
* `kyc_sess_…`, `organization_…`, `project_…`); timestamps are ISO-8601 strings.
|
|
8
8
|
*/
|
|
9
9
|
/** A unique identifier (typically a prefixed, URL-safe string). */
|
|
10
|
-
type Id = string;
|
|
10
|
+
export type Id = string;
|
|
11
11
|
/** An ISO-8601 date-time string, e.g. `2026-06-20T00:00:00.000Z`. */
|
|
12
|
-
type IsoDateTime = string;
|
|
12
|
+
export type IsoDateTime = string;
|
|
13
13
|
/** An ISO-8601 date string (no time component), e.g. `1990-05-21`. */
|
|
14
|
-
type IsoDate = string;
|
|
14
|
+
export type IsoDate = string;
|
|
15
15
|
/** Arbitrary, JSON-serialisable metadata attached to an entity. */
|
|
16
|
-
type Metadata = Record<string, unknown>;
|
|
16
|
+
export type Metadata = Record<string, unknown>;
|
|
17
17
|
/** Columns shared by every persisted entity. */
|
|
18
|
-
interface Timestamps {
|
|
18
|
+
export interface Timestamps {
|
|
19
19
|
created_at: IsoDateTime;
|
|
20
20
|
updated_at: IsoDateTime;
|
|
21
21
|
}
|
|
22
22
|
/** A persisted entity: an `id` plus creation/update timestamps. */
|
|
23
|
-
interface Entity extends Timestamps {
|
|
23
|
+
export interface Entity extends Timestamps {
|
|
24
24
|
id: Id;
|
|
25
25
|
}
|
|
26
26
|
/** Scoping columns present on every organization-owned entity. */
|
|
27
|
-
interface OrganizationScoped {
|
|
27
|
+
export interface OrganizationScoped {
|
|
28
28
|
organization_id: Id;
|
|
29
29
|
}
|
|
30
30
|
/** Scoping columns present on every project-owned entity. */
|
|
31
|
-
interface ProjectScoped extends OrganizationScoped {
|
|
31
|
+
export interface ProjectScoped extends OrganizationScoped {
|
|
32
32
|
project_id: Id;
|
|
33
33
|
}
|
|
34
34
|
//#endregion
|
|
35
|
-
export { Entity, Id, IsoDate, IsoDateTime, Metadata, OrganizationScoped, ProjectScoped, Timestamps };
|
|
36
35
|
//# sourceMappingURL=common.d.mts.map
|
package/dist/common.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.mts","names":[],"sources":["../src/common.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"common.d.mts","names":[],"sources":["../src/common.ts"],"mappings":";;;;;;;;;YASY;;YAGA;;YAGA;;YAGA,WAAW;;iBAGN;EACf,YAAY;EACZ,YAAY;;;iBAIG,eAAe;EAC9B,IAAI;;;iBAIW;EACf,iBAAiB;;;iBAIF,sBAAsB;EACrC,YAAY"}
|
package/dist/errors.d.mts
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* The typed clients surface this as `ArkycApiError.error` (`@arkyc/sdk`) and
|
|
11
11
|
* `WidgetApiError.error` (`@arkyc/widget`).
|
|
12
12
|
*/
|
|
13
|
-
type ApiErrorKey = 'missing_client_token' | 'invalid_client_token' | 'session_expired' | 'origin_not_allowed' | 'client_token_used' | 'handoff_disabled' | 'missing_api_key' | 'invalid_api_key' | 'invalid_workflow' | 'invalid_webhook';
|
|
13
|
+
export type ApiErrorKey = 'missing_client_token' | 'invalid_client_token' | 'session_expired' | 'origin_not_allowed' | 'client_token_used' | 'handoff_disabled' | 'missing_api_key' | 'invalid_api_key' | 'invalid_workflow' | 'invalid_webhook';
|
|
14
14
|
//#endregion
|
|
15
|
-
export { ApiErrorKey };
|
|
16
15
|
//# sourceMappingURL=errors.d.mts.map
|
package/dist/errors.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.mts","names":[],"sources":["../src/errors.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"errors.d.mts","names":[],"sources":["../src/errors.ts"],"mappings":";;;;;;;;;;;;YAWY"}
|
package/dist/notifications.d.mts
CHANGED
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
import { Id } from "./common.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/notifications.d.ts
|
|
4
3
|
/** Kinds of in-app notification a user can receive. */
|
|
5
|
-
declare const NOTIFICATION_TYPE: {
|
|
6
|
-
/** A verification session was assigned to you for review. */
|
|
7
|
-
readonly
|
|
8
|
-
|
|
9
|
-
readonly
|
|
10
|
-
|
|
4
|
+
export declare const NOTIFICATION_TYPE: {
|
|
5
|
+
/** A verification session was assigned to you for review. */
|
|
6
|
+
readonly reviewAssigned: "review.assigned";
|
|
7
|
+
/** A verification session in a project you review needs a manual decision. */
|
|
8
|
+
readonly sessionNeedsReview: "session.requires_review";
|
|
9
|
+
/** Someone else approved or rejected a session assigned to you. */
|
|
10
|
+
readonly reviewDecided: "review.decided";
|
|
11
|
+
/** A webhook endpoint you maintain exhausted its delivery retries. */
|
|
12
|
+
readonly webhookFailing: "webhook.failing";
|
|
13
|
+
/** You were invited to join an organization. */
|
|
14
|
+
readonly invitationReceived: "invitation.received";
|
|
15
|
+
/** Watchlist screening matched a session in a project you review. */
|
|
11
16
|
readonly screeningHit: "screening.hit";
|
|
12
17
|
};
|
|
13
|
-
type NotificationType = (typeof NOTIFICATION_TYPE)[keyof typeof NOTIFICATION_TYPE];
|
|
18
|
+
export type NotificationType = (typeof NOTIFICATION_TYPE)[keyof typeof NOTIFICATION_TYPE];
|
|
14
19
|
/** A user's notification delivery preferences. */
|
|
15
|
-
interface NotificationPreferences {
|
|
20
|
+
export interface NotificationPreferences {
|
|
16
21
|
/** Also push notifications to the user's registered devices. */
|
|
17
22
|
push: boolean;
|
|
18
23
|
}
|
|
19
|
-
declare const DEFAULT_NOTIFICATION_PREFERENCES: NotificationPreferences;
|
|
24
|
+
export declare const DEFAULT_NOTIFICATION_PREFERENCES: NotificationPreferences;
|
|
20
25
|
/** Platforms a device push token can be registered for. */
|
|
21
|
-
type PushPlatform = 'ios' | 'android' | 'web';
|
|
26
|
+
export type PushPlatform = 'ios' | 'android' | 'web';
|
|
22
27
|
/** A stored in-app notification, as the API returns it. */
|
|
23
|
-
interface UserNotification {
|
|
28
|
+
export interface UserNotification {
|
|
24
29
|
id: Id;
|
|
25
30
|
type: NotificationType | string | null;
|
|
26
31
|
title: string;
|
|
@@ -33,5 +38,4 @@ interface UserNotification {
|
|
|
33
38
|
created_at: string;
|
|
34
39
|
}
|
|
35
40
|
//#endregion
|
|
36
|
-
export { DEFAULT_NOTIFICATION_PREFERENCES, NOTIFICATION_TYPE, NotificationPreferences, NotificationType, PushPlatform, UserNotification };
|
|
37
41
|
//# sourceMappingURL=notifications.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.d.mts","names":[],"sources":["../src/notifications.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"notifications.d.mts","names":[],"sources":["../src/notifications.ts"],"mappings":";;;qBAGa;;;;;;;;;;;;;;YAeD,2BAA2B,gCAAgC;;iBAGtD;;EAEf;;qBAGW,kCAAkC;;YAKnC;;iBAGK;EACf,IAAI;EACJ,MAAM;EACN;EACA;EACA;;EAEA;EACA,MAAM;EACN;EACA"}
|
package/dist/organization.d.mts
CHANGED
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
import { Entity, Id, IsoDateTime, Metadata, OrganizationScoped } from "./common.mjs";
|
|
2
2
|
import { FaceEmbeddingSettings } from "./risk.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/organization.d.ts
|
|
5
4
|
/** Membership lifecycle states for organization/project members. */
|
|
6
|
-
type MembershipStatus = 'active' | 'invited' | 'suspended';
|
|
5
|
+
export type MembershipStatus = 'active' | 'invited' | 'suspended';
|
|
7
6
|
/** Invitation lifecycle states. */
|
|
8
|
-
type InvitationStatus = 'pending' | 'accepted' | 'expired' | 'revoked';
|
|
7
|
+
export type InvitationStatus = 'pending' | 'accepted' | 'expired' | 'revoked';
|
|
9
8
|
/**
|
|
10
9
|
* An organization, business, or workspace using Arkyc. An organization owns projects,
|
|
11
10
|
* members, roles, API keys, sessions, webhooks, and audit logs.
|
|
12
11
|
*/
|
|
13
|
-
interface Organization extends Entity {
|
|
12
|
+
export interface Organization extends Entity {
|
|
14
13
|
name: string;
|
|
15
14
|
slug: string;
|
|
16
15
|
logo_url: string | null;
|
|
17
16
|
settings: OrganizationSettings;
|
|
18
17
|
}
|
|
19
18
|
/** Organization-level configuration (free-form, with known optional keys). */
|
|
20
|
-
interface OrganizationSettings extends Metadata {
|
|
19
|
+
export interface OrganizationSettings extends Metadata {
|
|
21
20
|
/** Days to retain verification media before cleanup (Phase 15). */
|
|
22
21
|
retention_days?: number;
|
|
23
22
|
/** Store face embeddings to catch one face behind several identities. Off by default. */
|
|
24
23
|
face_embeddings?: Partial<FaceEmbeddingSettings>;
|
|
25
24
|
}
|
|
26
25
|
/** Links a {@link User} to a {@link Organization} with a role. */
|
|
27
|
-
interface OrganizationMember extends Entity, OrganizationScoped {
|
|
26
|
+
export interface OrganizationMember extends Entity, OrganizationScoped {
|
|
28
27
|
user_id: Id;
|
|
29
28
|
role_id: Id;
|
|
30
29
|
status: MembershipStatus;
|
|
31
30
|
joined_at: IsoDateTime | null;
|
|
32
31
|
}
|
|
33
32
|
/** A pending invitation to join an organization with a given role. */
|
|
34
|
-
interface OrganizationInvitation extends Entity, OrganizationScoped {
|
|
33
|
+
export interface OrganizationInvitation extends Entity, OrganizationScoped {
|
|
35
34
|
email: string;
|
|
36
35
|
role_id: Id;
|
|
37
36
|
/** Hash of the single-use invitation token; the raw token is emailed once. */
|
|
@@ -40,5 +39,4 @@ interface OrganizationInvitation extends Entity, OrganizationScoped {
|
|
|
40
39
|
accepted_at: IsoDateTime | null;
|
|
41
40
|
}
|
|
42
41
|
//#endregion
|
|
43
|
-
export { InvitationStatus, MembershipStatus, Organization, OrganizationInvitation, OrganizationMember, OrganizationSettings };
|
|
44
42
|
//# sourceMappingURL=organization.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.d.mts","names":[],"sources":["../src/organization.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"organization.d.mts","names":[],"sources":["../src/organization.ts"],"mappings":";;;;YAIY;;YAGA;;;;;iBAMK,qBAAqB;EACpC;EACA;EACA;EACA,UAAU;;;iBAIK,6BAA6B;;EAE5C;;EAEA,kBAAkB,QAAQ;;;iBAIX,2BAA2B,QAAQ;EAClD,SAAS;EACT,SAAS;EACT,QAAQ;EACR,WAAW;;;iBAII,+BAA+B,QAAQ;EACtD;EACA,SAAS;;EAET;EACA,YAAY;EACZ,aAAa"}
|
package/dist/project.d.mts
CHANGED
|
@@ -2,17 +2,16 @@ import { Entity, Id, IsoDateTime, Metadata, OrganizationScoped, ProjectScoped }
|
|
|
2
2
|
import { VelocitySettings } from "./risk.mjs";
|
|
3
3
|
import { MembershipStatus } from "./organization.mjs";
|
|
4
4
|
import { CaptureModel } from "./settings.mjs";
|
|
5
|
-
|
|
6
5
|
//#region src/project.d.ts
|
|
7
6
|
/** Deployment environment for a project. */
|
|
8
|
-
type ProjectEnvironment = 'production' | 'staging' | 'development';
|
|
7
|
+
export type ProjectEnvironment = 'production' | 'staging' | 'development';
|
|
9
8
|
/** Project lifecycle status. */
|
|
10
|
-
type ProjectStatus = 'active' | 'paused' | 'archived';
|
|
9
|
+
export type ProjectStatus = 'active' | 'paused' | 'archived';
|
|
11
10
|
/**
|
|
12
11
|
* Per-project, configurable thresholds the decision engine compares scores
|
|
13
12
|
* against. Projects may override any subset of {@link DEFAULT_VERIFICATION_THRESHOLDS}.
|
|
14
13
|
*/
|
|
15
|
-
interface VerificationThresholds {
|
|
14
|
+
export interface VerificationThresholds {
|
|
16
15
|
documentQualityThreshold: number;
|
|
17
16
|
ocrConfidenceThreshold: number;
|
|
18
17
|
livenessThreshold: number;
|
|
@@ -21,9 +20,9 @@ interface VerificationThresholds {
|
|
|
21
20
|
addressThreshold: number;
|
|
22
21
|
}
|
|
23
22
|
/** Platform default verification thresholds. */
|
|
24
|
-
declare const DEFAULT_VERIFICATION_THRESHOLDS: VerificationThresholds;
|
|
23
|
+
export declare const DEFAULT_VERIFICATION_THRESHOLDS: VerificationThresholds;
|
|
25
24
|
/** Visual branding applied to the widget for a project. */
|
|
26
|
-
interface ProjectBranding {
|
|
25
|
+
export interface ProjectBranding {
|
|
27
26
|
logo_url?: string | null;
|
|
28
27
|
/**
|
|
29
28
|
* Storage object key of an uploaded logo. Server-side only: the API resolves
|
|
@@ -46,7 +45,7 @@ interface ProjectBranding {
|
|
|
46
45
|
* their phone by scanning a QR code.
|
|
47
46
|
* The QR is shown first on desktop.
|
|
48
47
|
*/
|
|
49
|
-
interface ProjectHandoffSettings {
|
|
48
|
+
export interface ProjectHandoffSettings {
|
|
50
49
|
/** Whether desktop users are offered the QR handoff to their phone. */
|
|
51
50
|
enabled?: boolean;
|
|
52
51
|
/**
|
|
@@ -56,7 +55,7 @@ interface ProjectHandoffSettings {
|
|
|
56
55
|
allow_desktop?: boolean;
|
|
57
56
|
}
|
|
58
57
|
/** Project-level configuration. */
|
|
59
|
-
interface ProjectSettings extends Metadata {
|
|
58
|
+
export interface ProjectSettings extends Metadata {
|
|
60
59
|
thresholds?: Partial<VerificationThresholds>;
|
|
61
60
|
allowed_origins?: string[];
|
|
62
61
|
/** Maximum verification attempts before a session is hard-failed. */
|
|
@@ -72,7 +71,7 @@ interface ProjectSettings extends Metadata {
|
|
|
72
71
|
* A specific application, environment, or product integration owned by a
|
|
73
72
|
* organization. Sessions, API keys, and webhooks are scoped to a project.
|
|
74
73
|
*/
|
|
75
|
-
interface Project extends Entity, OrganizationScoped {
|
|
74
|
+
export interface Project extends Entity, OrganizationScoped {
|
|
76
75
|
name: string;
|
|
77
76
|
slug: string;
|
|
78
77
|
environment: ProjectEnvironment;
|
|
@@ -82,7 +81,7 @@ interface Project extends Entity, OrganizationScoped {
|
|
|
82
81
|
has_ai_grant?: boolean;
|
|
83
82
|
}
|
|
84
83
|
/** Links a user to a project with a role (narrower tha organization membership). */
|
|
85
|
-
interface ProjectMember extends Entity, ProjectScoped {
|
|
84
|
+
export interface ProjectMember extends Entity, ProjectScoped {
|
|
86
85
|
user_id: Id;
|
|
87
86
|
role_id: Id;
|
|
88
87
|
status: MembershipStatus;
|
|
@@ -91,7 +90,7 @@ interface ProjectMember extends Entity, ProjectScoped {
|
|
|
91
90
|
* A project API key. Only `key_prefix` is stored in clear; the secret is hashed
|
|
92
91
|
* (`key_hash`) and shown to the integrator exactly once at creation.
|
|
93
92
|
*/
|
|
94
|
-
interface ApiKey extends Entity, ProjectScoped {
|
|
93
|
+
export interface ApiKey extends Entity, ProjectScoped {
|
|
95
94
|
name: string;
|
|
96
95
|
key_prefix: string;
|
|
97
96
|
key_hash: string;
|
|
@@ -100,17 +99,16 @@ interface ApiKey extends Entity, ProjectScoped {
|
|
|
100
99
|
revoked_at: IsoDateTime | null;
|
|
101
100
|
}
|
|
102
101
|
/** An API key plus its one-time-visible secret, returned only at creation. */
|
|
103
|
-
interface ApiKeyWithSecret {
|
|
102
|
+
export interface ApiKeyWithSecret {
|
|
104
103
|
api_key: ApiKey;
|
|
105
104
|
/** The full secret key, e.g. `sk_live_…`. Never persisted in clear. */
|
|
106
105
|
secret: string;
|
|
107
106
|
}
|
|
108
107
|
/** Resolves the organization + project + (optionally) acting user for a request. */
|
|
109
|
-
interface ProjectContext {
|
|
108
|
+
export interface ProjectContext {
|
|
110
109
|
organization_id: Id;
|
|
111
110
|
project_id: Id;
|
|
112
111
|
api_key_id?: Id;
|
|
113
112
|
}
|
|
114
113
|
//#endregion
|
|
115
|
-
export { ApiKey, ApiKeyWithSecret, DEFAULT_VERIFICATION_THRESHOLDS, Project, ProjectBranding, ProjectContext, ProjectEnvironment, ProjectHandoffSettings, ProjectMember, ProjectSettings, ProjectStatus, VerificationThresholds };
|
|
116
114
|
//# sourceMappingURL=project.d.mts.map
|
package/dist/project.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.mts","names":[],"sources":["../src/project.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"project.d.mts","names":[],"sources":["../src/project.ts"],"mappings":";;;;;;YAOY;;YAGA;;;;;iBAMK;EACf;EACA;EACA;EACA;;EAEA;;;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/providers.d.mts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Entity, Id, IsoDate, ProjectScoped } from "./common.mjs";
|
|
2
2
|
import { AddressMethod } from "./workflow.mjs";
|
|
3
|
-
|
|
4
3
|
//#region src/providers.d.ts
|
|
5
4
|
/** Supported identity document categories. */
|
|
6
|
-
type DocumentType = 'passport' | 'id_card' | 'drivers_license' | 'residence_permit';
|
|
5
|
+
export type DocumentType = 'passport' | 'id_card' | 'drivers_license' | 'residence_permit';
|
|
7
6
|
/** Structured identity fields extracted from a document via OCR. */
|
|
8
|
-
interface OcrFields {
|
|
7
|
+
export interface OcrFields {
|
|
9
8
|
firstName?: string;
|
|
10
9
|
lastName?: string;
|
|
11
10
|
fullName?: string;
|
|
@@ -20,7 +19,7 @@ interface OcrFields {
|
|
|
20
19
|
* (the `ai` vision driver). Advisory anti-spoofing signals — a flagged document
|
|
21
20
|
* is routed to manual review, never auto-rejected on the model's say-so.
|
|
22
21
|
*/
|
|
23
|
-
interface OcrAuthenticity {
|
|
22
|
+
export interface OcrAuthenticity {
|
|
24
23
|
/** False when any tamper/replay signal fired. */
|
|
25
24
|
genuine: boolean;
|
|
26
25
|
/** Model's authenticity confidence in [0, 1]: 1 = clearly an original, 0 = clearly fake/replayed. */
|
|
@@ -37,7 +36,7 @@ interface OcrAuthenticity {
|
|
|
37
36
|
observations: string[];
|
|
38
37
|
}
|
|
39
38
|
/** The shape returned by any OCR driver. */
|
|
40
|
-
interface OcrResultData {
|
|
39
|
+
export interface OcrResultData {
|
|
41
40
|
fields: OcrFields;
|
|
42
41
|
/** Overall extraction confidence in [0, 1]. */
|
|
43
42
|
confidence: number;
|
|
@@ -47,7 +46,7 @@ interface OcrResultData {
|
|
|
47
46
|
raw?: unknown;
|
|
48
47
|
}
|
|
49
48
|
/** Anti-spoofing signals surfaced by a liveness driver. */
|
|
50
|
-
interface SpoofSignals {
|
|
49
|
+
export interface SpoofSignals {
|
|
51
50
|
screenReplay?: boolean;
|
|
52
51
|
printedPhoto?: boolean;
|
|
53
52
|
maskDetected?: boolean;
|
|
@@ -56,7 +55,7 @@ interface SpoofSignals {
|
|
|
56
55
|
poorLighting?: boolean;
|
|
57
56
|
}
|
|
58
57
|
/** The shape returned by any passive-liveness driver. */
|
|
59
|
-
interface LivenessResultData {
|
|
58
|
+
export interface LivenessResultData {
|
|
60
59
|
passed: boolean;
|
|
61
60
|
/** Liveness confidence in [0, 1]. */
|
|
62
61
|
score: number;
|
|
@@ -64,7 +63,7 @@ interface LivenessResultData {
|
|
|
64
63
|
raw?: unknown;
|
|
65
64
|
}
|
|
66
65
|
/** The shape returned by any face-match driver. */
|
|
67
|
-
interface FaceMatchResultData {
|
|
66
|
+
export interface FaceMatchResultData {
|
|
68
67
|
passed: boolean;
|
|
69
68
|
/** Similarity between document portrait and selfie in [0, 1]. */
|
|
70
69
|
similarityScore: number;
|
|
@@ -73,7 +72,7 @@ interface FaceMatchResultData {
|
|
|
73
72
|
raw?: unknown;
|
|
74
73
|
}
|
|
75
74
|
/** A normalized postal address. Any field may be absent depending on the source. */
|
|
76
|
-
interface PostalAddress {
|
|
75
|
+
export interface PostalAddress {
|
|
77
76
|
line1?: string;
|
|
78
77
|
line2?: string;
|
|
79
78
|
city?: string;
|
|
@@ -87,7 +86,7 @@ interface PostalAddress {
|
|
|
87
86
|
longitude?: number;
|
|
88
87
|
}
|
|
89
88
|
/** One method's contribution to address verification. */
|
|
90
|
-
interface AddressMethodResult {
|
|
89
|
+
export interface AddressMethodResult {
|
|
91
90
|
method: AddressMethod;
|
|
92
91
|
/** Whether this method produced a usable, valid result. */
|
|
93
92
|
passed: boolean;
|
|
@@ -106,7 +105,7 @@ interface AddressMethodResult {
|
|
|
106
105
|
raw?: unknown;
|
|
107
106
|
}
|
|
108
107
|
/** The shape returned by an address verifier — the aggregate of its methods. */
|
|
109
|
-
interface AddressResultData {
|
|
108
|
+
export interface AddressResultData {
|
|
110
109
|
passed: boolean;
|
|
111
110
|
/** Overall confidence in [0, 1]. */
|
|
112
111
|
score: number;
|
|
@@ -117,7 +116,7 @@ interface AddressResultData {
|
|
|
117
116
|
raw?: unknown;
|
|
118
117
|
}
|
|
119
118
|
/** A captured identity document (front and optional back) for a session. */
|
|
120
|
-
interface DocumentCapture extends Entity, ProjectScoped {
|
|
119
|
+
export interface DocumentCapture extends Entity, ProjectScoped {
|
|
121
120
|
session_id: Id;
|
|
122
121
|
country: string | null;
|
|
123
122
|
document_type: DocumentType | null;
|
|
@@ -126,7 +125,7 @@ interface DocumentCapture extends Entity, ProjectScoped {
|
|
|
126
125
|
quality_score: number | null;
|
|
127
126
|
}
|
|
128
127
|
/** Persisted OCR output for a document capture. */
|
|
129
|
-
interface OcrResult extends Entity, ProjectScoped {
|
|
128
|
+
export interface OcrResult extends Entity, ProjectScoped {
|
|
130
129
|
session_id: Id;
|
|
131
130
|
document_capture_id: Id;
|
|
132
131
|
fields: OcrFields;
|
|
@@ -134,14 +133,14 @@ interface OcrResult extends Entity, ProjectScoped {
|
|
|
134
133
|
raw_response: unknown;
|
|
135
134
|
}
|
|
136
135
|
/** The portrait region extracted from a document, used for face matching. */
|
|
137
|
-
interface DocumentPortrait extends Entity, ProjectScoped {
|
|
136
|
+
export interface DocumentPortrait extends Entity, ProjectScoped {
|
|
138
137
|
session_id: Id;
|
|
139
138
|
document_capture_id: Id;
|
|
140
139
|
portrait_image_path: string;
|
|
141
140
|
detection_confidence: number;
|
|
142
141
|
}
|
|
143
142
|
/** Persisted passive-liveness result for a session. */
|
|
144
|
-
interface LivenessCheck extends Entity, ProjectScoped {
|
|
143
|
+
export interface LivenessCheck extends Entity, ProjectScoped {
|
|
145
144
|
session_id: Id;
|
|
146
145
|
selfie_image_path: string | null;
|
|
147
146
|
video_path: string | null;
|
|
@@ -152,7 +151,7 @@ interface LivenessCheck extends Entity, ProjectScoped {
|
|
|
152
151
|
raw_response: unknown;
|
|
153
152
|
}
|
|
154
153
|
/** Persisted face-match result comparing document portrait to selfie. */
|
|
155
|
-
interface FaceMatchCheck extends Entity, ProjectScoped {
|
|
154
|
+
export interface FaceMatchCheck extends Entity, ProjectScoped {
|
|
156
155
|
session_id: Id;
|
|
157
156
|
id_portrait_image_path: string | null;
|
|
158
157
|
selfie_image_path: string | null;
|
|
@@ -163,7 +162,7 @@ interface FaceMatchCheck extends Entity, ProjectScoped {
|
|
|
163
162
|
raw_response: unknown;
|
|
164
163
|
}
|
|
165
164
|
/** Persisted address-verification result for a session. */
|
|
166
|
-
interface AddressVerification extends Entity, ProjectScoped {
|
|
165
|
+
export interface AddressVerification extends Entity, ProjectScoped {
|
|
167
166
|
session_id: Id;
|
|
168
167
|
/** The address the user claimed (typed in the widget), when provided. */
|
|
169
168
|
claimed_address: PostalAddress | null;
|
|
@@ -181,5 +180,4 @@ interface AddressVerification extends Entity, ProjectScoped {
|
|
|
181
180
|
raw_response: unknown;
|
|
182
181
|
}
|
|
183
182
|
//#endregion
|
|
184
|
-
export { AddressMethodResult, AddressResultData, AddressVerification, DocumentCapture, DocumentPortrait, DocumentType, FaceMatchCheck, FaceMatchResultData, LivenessCheck, LivenessResultData, OcrAuthenticity, OcrFields, OcrResult, OcrResultData, PostalAddress, SpoofSignals };
|
|
185
183
|
//# sourceMappingURL=providers.d.mts.map
|
package/dist/providers.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.mts","names":[],"sources":["../src/providers.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"providers.d.mts","names":[],"sources":["../src/providers.ts"],"mappings":";;;;YAIY;;iBAGK;EACf;EACA;EACA;EACA,cAAc;EACd;EACA,aAAa;EACb,YAAY;EACZ;;;;;;;iBAQe;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;iBAIe;EACf,QAAQ;;EAER;;EAEA,eAAe;;EAEf;;;iBAIe;EACf;EACA;EACA;EACA;EACA;EACA;;;iBAIe;EACf;;EAEA;EACA,cAAc;EACd;;;iBAIe;EACf;;EAEA;;EAEA;EACA;;;iBAIe;EACf;EACA;EACA;;EAEA;EACA;;EAEA;;EAEA;EACA;;;iBAIe;EACf,QAAQ;;EAER;;EAEA;;EAEA,WAAW;;;;;;EAMX;;EAEA;EACA;;;iBAIe;EACf;;EAEA;;EAEA,SAAS;;EAET;EACA;;;iBAIe,wBAAwB,QAAQ;EAC/C,YAAY;EACZ;EACA,eAAe;EACf;EACA;EACA;;;iBAIe,kBAAkB,QAAQ;EACzC,YAAY;EACZ,qBAAqB;EACrB,QAAQ;EACR;EACA;;;iBAIe,yBAAyB,QAAQ;EAChD,YAAY;EACZ,qBAAqB;EACrB;EACA;;;iBAIe,sBAAsB,QAAQ;EAC7C,YAAY;EACZ;EACA;EACA;EACA;EACA,eAAe;EACf;EACA;;;iBAIe,uBAAuB,QAAQ;EAC9C,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;;;iBAIe,4BAA4B,QAAQ;EACnD,YAAY;;EAEZ,iBAAiB;;EAEjB;;EAEA;EACA;EACA;;EAEA;;EAEA,SAAS;EACT;EACA"}
|
package/dist/rbac.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Entity, Id, OrganizationScoped } from "./common.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/rbac.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* The full catalogue of permission strings recognised by Arkyc.
|
|
@@ -8,27 +7,27 @@ import { Entity, Id, OrganizationScoped } from "./common.mjs";
|
|
|
8
7
|
* a user is the union of their role permissions and any directly-assigned
|
|
9
8
|
* permissions (see `@arkyc/permissions`).
|
|
10
9
|
*/
|
|
11
|
-
type PermissionKey = 'organizations.view' | 'organizations.update' | 'organizations.delete' | 'members.view' | 'members.invite' | 'members.update' | 'members.remove' | 'projects.view' | 'projects.create' | 'projects.update' | 'projects.delete' | 'api_keys.view' | 'api_keys.create' | 'api_keys.revoke' | 'webhooks.view' | 'webhooks.create' | 'webhooks.update' | 'webhooks.delete' | 'webhooks.test' | 'workflows.view' | 'workflows.create' | 'workflows.update' | 'workflows.delete' | 'sessions.view' | 'sessions.create' | 'sessions.cancel' | 'sessions.retry' | 'sessions.export' | 'reviews.view' | 'reviews.assign' | 'reviews.approve' | 'reviews.reject' | 'reviews.request_retry' | 'reviews.note' | 'audit_logs.view' | 'settings.view' | 'settings.update' | 'billing.view' | 'billing.update';
|
|
10
|
+
export type PermissionKey = 'organizations.view' | 'organizations.update' | 'organizations.delete' | 'members.view' | 'members.invite' | 'members.update' | 'members.remove' | 'projects.view' | 'projects.create' | 'projects.update' | 'projects.delete' | 'api_keys.view' | 'api_keys.create' | 'api_keys.revoke' | 'webhooks.view' | 'webhooks.create' | 'webhooks.update' | 'webhooks.delete' | 'webhooks.test' | 'workflows.view' | 'workflows.create' | 'workflows.update' | 'workflows.delete' | 'sessions.view' | 'sessions.create' | 'sessions.cancel' | 'sessions.retry' | 'sessions.export' | 'reviews.view' | 'reviews.assign' | 'reviews.approve' | 'reviews.reject' | 'reviews.request_retry' | 'reviews.note' | 'audit_logs.view' | 'settings.view' | 'settings.update' | 'billing.view' | 'billing.update';
|
|
12
11
|
/** The domain groups permissions are organised under. */
|
|
13
|
-
type PermissionGroup = 'organizations' | 'members' | 'projects' | 'api_keys' | 'webhooks' | 'workflows' | 'sessions' | 'reviews' | 'audit_logs' | 'settings' | 'billing';
|
|
12
|
+
export type PermissionGroup = 'organizations' | 'members' | 'projects' | 'api_keys' | 'webhooks' | 'workflows' | 'sessions' | 'reviews' | 'audit_logs' | 'settings' | 'billing';
|
|
14
13
|
/** The built-in system roles seeded for every organization. */
|
|
15
|
-
type SystemRoleSlug = 'owner' | 'admin' | 'reviewer' | 'developer' | 'readonly';
|
|
14
|
+
export type SystemRoleSlug = 'owner' | 'admin' | 'reviewer' | 'developer' | 'readonly';
|
|
16
15
|
/**
|
|
17
16
|
* Platform-scope permission strings, distinct from organization {@link PermissionKey}.
|
|
18
17
|
* These gate the super-admin surface above organizations and are only ever granted
|
|
19
18
|
* through {@link AdminPermission} (never an organization role). Rows carry `admin: true`.
|
|
20
19
|
*/
|
|
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';
|
|
20
|
+
export 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
21
|
/** The domain groups platform-admin permissions are organised under. */
|
|
23
|
-
type AdminPermissionGroup = 'admin.organizations' | 'admin.users' | 'admin.settings' | 'admin.audit' | 'admin.billing' | 'admin.extended_access';
|
|
22
|
+
export type AdminPermissionGroup = 'admin.organizations' | 'admin.users' | 'admin.settings' | 'admin.audit' | 'admin.billing' | 'admin.extended_access';
|
|
24
23
|
/** Any permission string, organization- or platform-scope. */
|
|
25
|
-
type AnyPermissionKey = PermissionKey | AdminPermissionKey;
|
|
24
|
+
export type AnyPermissionKey = PermissionKey | AdminPermissionKey;
|
|
26
25
|
/** Any permission group, organization- or platform-scope. */
|
|
27
|
-
type AnyPermissionGroup = PermissionGroup | AdminPermissionGroup;
|
|
26
|
+
export type AnyPermissionGroup = PermissionGroup | AdminPermissionGroup;
|
|
28
27
|
/** The built-in platform-admin role slug. */
|
|
29
|
-
type AdminRoleSlug = 'platform-owner';
|
|
28
|
+
export type AdminRoleSlug = 'platform-owner';
|
|
30
29
|
/** A permission definition row. Permissions are global (not organization-scoped). */
|
|
31
|
-
interface Permission extends Entity {
|
|
30
|
+
export interface Permission extends Entity {
|
|
32
31
|
/** The permission string, e.g. `sessions.view` or `admin.settings.view`. */
|
|
33
32
|
name: AnyPermissionKey;
|
|
34
33
|
description: string | null;
|
|
@@ -40,7 +39,7 @@ interface Permission extends Entity {
|
|
|
40
39
|
* A role within an organization. System roles (`is_system`) are seeded and cannot be
|
|
41
40
|
* deleted; organizations may also define custom roles.
|
|
42
41
|
*/
|
|
43
|
-
interface Role extends Entity {
|
|
42
|
+
export interface Role extends Entity {
|
|
44
43
|
/** Null for platform-admin roles (`admin: true`); set for organization roles. */
|
|
45
44
|
organization_id: Id | null;
|
|
46
45
|
name: string;
|
|
@@ -51,7 +50,7 @@ interface Role extends Entity {
|
|
|
51
50
|
admin: boolean;
|
|
52
51
|
}
|
|
53
52
|
/** Join row granting a {@link Permission} to a {@link Role}. */
|
|
54
|
-
interface RolePermission extends Entity {
|
|
53
|
+
export interface RolePermission extends Entity {
|
|
55
54
|
role_id: Id;
|
|
56
55
|
permission_id: Id;
|
|
57
56
|
}
|
|
@@ -59,7 +58,7 @@ interface RolePermission extends Entity {
|
|
|
59
58
|
* A permission assigned directly to a user, on top of their role permissions.
|
|
60
59
|
* `project_id` is null for organization-level grants, set for project-level grants.
|
|
61
60
|
*/
|
|
62
|
-
interface UserPermission extends Entity, OrganizationScoped {
|
|
61
|
+
export interface UserPermission extends Entity, OrganizationScoped {
|
|
63
62
|
project_id: Id | null;
|
|
64
63
|
user_id: Id;
|
|
65
64
|
permission_id: Id;
|
|
@@ -70,11 +69,10 @@ interface UserPermission extends Entity, OrganizationScoped {
|
|
|
70
69
|
* permission grant (`permission_id` set). Effective admin access is the union of
|
|
71
70
|
* both, resolved by `@arkyc/permissions`.
|
|
72
71
|
*/
|
|
73
|
-
interface AdminPermission extends Entity {
|
|
72
|
+
export interface AdminPermission extends Entity {
|
|
74
73
|
user_id: Id;
|
|
75
74
|
permission_id: Id | null;
|
|
76
75
|
role_id: Id | null;
|
|
77
76
|
}
|
|
78
77
|
//#endregion
|
|
79
|
-
export { AdminPermission, AdminPermissionGroup, AdminPermissionKey, AdminRoleSlug, AnyPermissionGroup, AnyPermissionKey, Permission, PermissionGroup, PermissionKey, Role, RolePermission, SystemRoleSlug, UserPermission };
|
|
80
78
|
//# sourceMappingURL=rbac.d.mts.map
|