antifraud-data-utils-ts 0.0.0-stage → 0.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/LICENSE +13 -0
  3. package/README.md +155 -2
  4. package/dist/identity-assurance/claim-proofs.d.ts +62 -0
  5. package/dist/identity-assurance/claim-proofs.d.ts.map +1 -0
  6. package/dist/identity-assurance/claim-proofs.js +50 -0
  7. package/dist/identity-assurance/claim-proofs.js.map +1 -0
  8. package/dist/identity-assurance/converters.d.ts +10 -0
  9. package/dist/identity-assurance/converters.d.ts.map +1 -0
  10. package/dist/identity-assurance/converters.js +47 -0
  11. package/dist/identity-assurance/converters.js.map +1 -0
  12. package/dist/identity-assurance/identity-evidence.d.ts +124 -0
  13. package/dist/identity-assurance/identity-evidence.d.ts.map +1 -0
  14. package/dist/identity-assurance/identity-evidence.js +247 -0
  15. package/dist/identity-assurance/identity-evidence.js.map +1 -0
  16. package/dist/identity-assurance/index.d.ts +11 -0
  17. package/dist/identity-assurance/index.d.ts.map +1 -0
  18. package/dist/identity-assurance/index.js +11 -0
  19. package/dist/identity-assurance/index.js.map +1 -0
  20. package/dist/identity-assurance/professional-qualification.d.ts +150 -0
  21. package/dist/identity-assurance/professional-qualification.d.ts.map +1 -0
  22. package/dist/identity-assurance/professional-qualification.js +234 -0
  23. package/dist/identity-assurance/professional-qualification.js.map +1 -0
  24. package/dist/identity-assurance/schema-org-evidence.d.ts +30 -0
  25. package/dist/identity-assurance/schema-org-evidence.d.ts.map +1 -0
  26. package/dist/identity-assurance/schema-org-evidence.js +50 -0
  27. package/dist/identity-assurance/schema-org-evidence.js.map +1 -0
  28. package/dist/identity-assurance/schemas.d.ts +256 -0
  29. package/dist/identity-assurance/schemas.d.ts.map +1 -0
  30. package/dist/identity-assurance/schemas.js +163 -0
  31. package/dist/identity-assurance/schemas.js.map +1 -0
  32. package/dist/identity-assurance/tenant-trust.d.ts +29 -0
  33. package/dist/identity-assurance/tenant-trust.d.ts.map +1 -0
  34. package/dist/identity-assurance/tenant-trust.js +37 -0
  35. package/dist/identity-assurance/tenant-trust.js.map +1 -0
  36. package/dist/identity-assurance/types.d.ts +35 -0
  37. package/dist/identity-assurance/types.d.ts.map +1 -0
  38. package/dist/identity-assurance/types.js +2 -0
  39. package/dist/identity-assurance/types.js.map +1 -0
  40. package/dist/identity-assurance/vocabulary.d.ts +52 -0
  41. package/dist/identity-assurance/vocabulary.d.ts.map +1 -0
  42. package/dist/identity-assurance/vocabulary.js +48 -0
  43. package/dist/identity-assurance/vocabulary.js.map +1 -0
  44. package/dist/identity-assurance/workforce-assignment.d.ts +47 -0
  45. package/dist/identity-assurance/workforce-assignment.d.ts.map +1 -0
  46. package/dist/identity-assurance/workforce-assignment.js +52 -0
  47. package/dist/identity-assurance/workforce-assignment.js.map +1 -0
  48. package/dist/index.d.ts +2 -0
  49. package/dist/index.d.ts.map +1 -0
  50. package/dist/index.js +2 -0
  51. package/dist/index.js.map +1 -0
  52. package/package.json +38 -4
@@ -0,0 +1,234 @@
1
+ export const QualificationType = Object.freeze({
2
+ Degree: 'degree',
3
+ Certificate: 'certificate',
4
+ Licence: 'licence',
5
+ Accreditation: 'accreditation',
6
+ Training: 'training',
7
+ });
8
+ export const QualificationAuthorityKind = Object.freeze({
9
+ Employer: 'employer',
10
+ QualificationIssuer: 'qualification-issuer',
11
+ ProfessionalBody: 'professional-body',
12
+ });
13
+ /** Product-neutral result of checking one authoritative proof. */
14
+ export const QualificationVerificationStatus = Object.freeze({
15
+ Attested: 'attested',
16
+ Verified: 'verified',
17
+ InProcess: 'in-process',
18
+ RequiresReverification: 'requires-reverification',
19
+ VerificationFailed: 'verification-failed',
20
+ ReverificationFailed: 'reverification-failed',
21
+ EnteredInError: 'entered-in-error',
22
+ });
23
+ export const QualificationLifecycleStatus = Object.freeze({
24
+ Active: 'active',
25
+ Suspended: 'suspended',
26
+ Revoked: 'revoked',
27
+ Expired: 'expired',
28
+ Unknown: 'unknown',
29
+ });
30
+ function requireNonEmpty(value, path) {
31
+ if (value.trim().length === 0) {
32
+ throw new TypeError(`${path} must not be empty`);
33
+ }
34
+ }
35
+ function assertKnownValue(value, values, path) {
36
+ if (!Object.values(values).includes(value)) {
37
+ throw new TypeError(`Unsupported ${path}: ${value}`);
38
+ }
39
+ }
40
+ function freezeProof(proof) {
41
+ requireNonEmpty(proof.id, 'proof.id');
42
+ requireNonEmpty(proof.organizationReference, 'proof.organizationReference');
43
+ requireNonEmpty(proof.legalIdentifier, 'proof.legalIdentifier');
44
+ requireNonEmpty(proof.jurisdiction, 'proof.jurisdiction');
45
+ requireNonEmpty(proof.verifiedAt, 'proof.verifiedAt');
46
+ requireNonEmpty(proof.proofReference, 'proof.proofReference');
47
+ assertKnownValue(proof.authorityKind, QualificationAuthorityKind, 'proof.authorityKind');
48
+ assertKnownValue(proof.verificationStatus, QualificationVerificationStatus, 'proof.verificationStatus');
49
+ return Object.freeze({ ...proof });
50
+ }
51
+ /**
52
+ * Defines the claims-first qualification and its independent verification
53
+ * proofs. Native FHIR and Schema.org objects are generated only by explicit
54
+ * projection functions below.
55
+ */
56
+ export function defineProfessionalQualification(input) {
57
+ requireNonEmpty(input.id, 'id');
58
+ requireNonEmpty(input.subjectReference, 'subjectReference');
59
+ requireNonEmpty(input.identifier.value, 'identifier.value');
60
+ requireNonEmpty(input.code.system, 'code.system');
61
+ requireNonEmpty(input.code.code, 'code.code');
62
+ requireNonEmpty(input.issuer.organizationReference, 'issuer.organizationReference');
63
+ requireNonEmpty(input.issuer.legalIdentifier, 'issuer.legalIdentifier');
64
+ requireNonEmpty(input.issuer.jurisdiction, 'issuer.jurisdiction');
65
+ assertKnownValue(input.type, QualificationType, 'qualification type');
66
+ assertKnownValue(input.lifecycleStatus, QualificationLifecycleStatus, 'qualification lifecycle status');
67
+ if (!Array.isArray(input.proofs) || input.proofs.length === 0) {
68
+ throw new TypeError('A professional qualification requires at least one proof');
69
+ }
70
+ const proofs = input.proofs.map(freezeProof);
71
+ for (const proof of proofs) {
72
+ if (proof.authorityKind === QualificationAuthorityKind.QualificationIssuer
73
+ && (proof.organizationReference !== input.issuer.organizationReference
74
+ || proof.legalIdentifier !== input.issuer.legalIdentifier
75
+ || proof.jurisdiction !== input.issuer.jurisdiction)) {
76
+ throw new TypeError('Qualification issuer proof must match issuer organization, legal identifier and jurisdiction');
77
+ }
78
+ }
79
+ return Object.freeze({
80
+ ...input,
81
+ identifier: Object.freeze({ ...input.identifier }),
82
+ code: Object.freeze({ ...input.code }),
83
+ issuer: Object.freeze({ ...input.issuer }),
84
+ ...(input.period ? { period: Object.freeze({ ...input.period }) } : {}),
85
+ proofs: Object.freeze(proofs),
86
+ });
87
+ }
88
+ function badgeStatus(status) {
89
+ return status === QualificationVerificationStatus.Attested
90
+ || status === QualificationVerificationStatus.Verified
91
+ ? 'current'
92
+ : 'attention';
93
+ }
94
+ export function deriveQualificationTrustBadges(qualification) {
95
+ const badges = qualification.proofs.map((proof) => {
96
+ const kind = proof.authorityKind === QualificationAuthorityKind.Employer
97
+ ? 'employer-attested'
98
+ : proof.authorityKind === QualificationAuthorityKind.QualificationIssuer
99
+ ? 'issuer-verified'
100
+ : 'professional-body-verified';
101
+ return Object.freeze({
102
+ kind,
103
+ status: badgeStatus(proof.verificationStatus),
104
+ proofId: proof.id,
105
+ });
106
+ });
107
+ if (qualification.type === QualificationType.Licence) {
108
+ const lifecycleKind = qualification.lifecycleStatus === QualificationLifecycleStatus.Active
109
+ ? 'licence-active'
110
+ : qualification.lifecycleStatus === QualificationLifecycleStatus.Suspended
111
+ ? 'licence-suspended'
112
+ : qualification.lifecycleStatus === QualificationLifecycleStatus.Revoked
113
+ ? 'licence-revoked'
114
+ : qualification.lifecycleStatus === QualificationLifecycleStatus.Expired
115
+ ? 'licence-expired'
116
+ : 'licence-status-unknown';
117
+ badges.push(Object.freeze({
118
+ kind: lifecycleKind,
119
+ status: qualification.lifecycleStatus === QualificationLifecycleStatus.Active
120
+ ? 'current'
121
+ : 'attention',
122
+ }));
123
+ }
124
+ return Object.freeze(badges);
125
+ }
126
+ /** Schema.org flat-claim names shared by forms, indexes and credential exchange. */
127
+ export const SchemaOrgQualificationClaim = Object.freeze({
128
+ Id: 'org.schema.EducationalOccupationalCredential.id',
129
+ IdentifierPropertyId: 'org.schema.EducationalOccupationalCredential.identifier.propertyID',
130
+ IdentifierValue: 'org.schema.EducationalOccupationalCredential.identifier.value',
131
+ Name: 'org.schema.EducationalOccupationalCredential.name',
132
+ CredentialCategory: 'org.schema.EducationalOccupationalCredential.credentialCategory',
133
+ PublisherIdentifierValue: 'org.schema.EducationalOccupationalCredential.publisher.identifier.value',
134
+ ValidInIdentifier: 'org.schema.EducationalOccupationalCredential.validIn.identifier',
135
+ ValidFrom: 'org.schema.EducationalOccupationalCredential.validFrom',
136
+ Expires: 'org.schema.EducationalOccupationalCredential.expires',
137
+ });
138
+ export function toSchemaOrgQualificationFlatClaims(qualification) {
139
+ return Object.freeze({
140
+ [SchemaOrgQualificationClaim.Id]: qualification.id,
141
+ ...(qualification.identifier.system
142
+ ? { [SchemaOrgQualificationClaim.IdentifierPropertyId]: qualification.identifier.system }
143
+ : {}),
144
+ [SchemaOrgQualificationClaim.IdentifierValue]: qualification.identifier.value,
145
+ ...(qualification.code.display
146
+ ? { [SchemaOrgQualificationClaim.Name]: qualification.code.display }
147
+ : {}),
148
+ [SchemaOrgQualificationClaim.CredentialCategory]: qualification.type,
149
+ [SchemaOrgQualificationClaim.PublisherIdentifierValue]: qualification.issuer.legalIdentifier,
150
+ [SchemaOrgQualificationClaim.ValidInIdentifier]: qualification.issuer.jurisdiction,
151
+ ...(qualification.period?.start
152
+ ? { [SchemaOrgQualificationClaim.ValidFrom]: qualification.period.start }
153
+ : {}),
154
+ ...(qualification.period?.end
155
+ ? { [SchemaOrgQualificationClaim.Expires]: qualification.period.end }
156
+ : {}),
157
+ });
158
+ }
159
+ function schemaOrganization(input) {
160
+ return {
161
+ '@type': 'Organization',
162
+ '@id': input.organizationReference,
163
+ identifier: {
164
+ '@type': 'PropertyValue',
165
+ propertyID: 'legal-identifier',
166
+ value: input.legalIdentifier,
167
+ },
168
+ };
169
+ }
170
+ export function projectProfessionalQualificationToSchemaOrg(qualification) {
171
+ const recognizers = qualification.proofs
172
+ .filter((proof) => proof.authorityKind !== QualificationAuthorityKind.Employer
173
+ && proof.verificationStatus === QualificationVerificationStatus.Verified)
174
+ .map(schemaOrganization);
175
+ return Object.freeze({
176
+ '@context': 'https://schema.org',
177
+ '@type': 'Person',
178
+ '@id': qualification.subjectReference,
179
+ hasCredential: {
180
+ '@type': 'EducationalOccupationalCredential',
181
+ '@id': qualification.id,
182
+ identifier: {
183
+ '@type': 'PropertyValue',
184
+ ...(qualification.identifier.system
185
+ ? { propertyID: qualification.identifier.system }
186
+ : {}),
187
+ value: qualification.identifier.value,
188
+ },
189
+ ...(qualification.code.display ? { name: qualification.code.display } : {}),
190
+ credentialCategory: qualification.type,
191
+ publisher: schemaOrganization(qualification.issuer),
192
+ validIn: {
193
+ '@type': 'AdministrativeArea',
194
+ identifier: qualification.issuer.jurisdiction,
195
+ },
196
+ recognizedBy: recognizers,
197
+ },
198
+ });
199
+ }
200
+ const OPAQUE_SHA3_384_PREFIX = 'urn:sha3-384:';
201
+ function requireOpaqueLink(value, path) {
202
+ requireNonEmpty(value, path);
203
+ if (!value.startsWith(OPAQUE_SHA3_384_PREFIX)) {
204
+ throw new TypeError(`${path} must be an opaque SHA3-384 URN`);
205
+ }
206
+ }
207
+ /**
208
+ * Builds the only qualification projection suitable for a shared ledger.
209
+ * Personal claims, qualification values, legal identifiers, documents,
210
+ * credentials and signatures remain in confidential off-ledger storage.
211
+ */
212
+ export function buildQualificationLedgerAnchor(input) {
213
+ requireNonEmpty(input.evidenceId, 'evidenceId');
214
+ requireOpaqueLink(input.subjectLink, 'subjectLink');
215
+ requireOpaqueLink(input.issuerLink, 'issuerLink');
216
+ requireOpaqueLink(input.contentHash, 'contentHash');
217
+ input.verifierLinks.forEach((value, index) => requireOpaqueLink(value, `verifierLinks[${index}]`));
218
+ requireNonEmpty(input.jurisdiction, 'jurisdiction');
219
+ requireNonEmpty(input.recordedAt, 'recordedAt');
220
+ assertKnownValue(input.lifecycleStatus, QualificationLifecycleStatus, 'qualification lifecycle status');
221
+ return Object.freeze({
222
+ assetType: 'qualification-evidence',
223
+ evidenceId: input.evidenceId,
224
+ subjectLink: input.subjectLink,
225
+ issuerLink: input.issuerLink,
226
+ verifierLinks: Object.freeze([...input.verifierLinks]),
227
+ contentHash: input.contentHash,
228
+ lifecycleStatus: input.lifecycleStatus,
229
+ jurisdiction: input.jurisdiction,
230
+ recordedAt: input.recordedAt,
231
+ });
232
+ }
233
+ // Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
234
+ //# sourceMappingURL=professional-qualification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"professional-qualification.js","sourceRoot":"","sources":["../../src/identity-assurance/professional-qualification.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7C,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,eAAe;IAC9B,QAAQ,EAAE,UAAU;CACZ,CAAC,CAAA;AAKX,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC;IACtD,QAAQ,EAAE,UAAU;IACpB,mBAAmB,EAAE,sBAAsB;IAC3C,gBAAgB,EAAE,mBAAmB;CAC7B,CAAC,CAAA;AAKX,kEAAkE;AAClE,MAAM,CAAC,MAAM,+BAA+B,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3D,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,YAAY;IACvB,sBAAsB,EAAE,yBAAyB;IACjD,kBAAkB,EAAE,qBAAqB;IACzC,oBA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,gBAAgB,CACd,KAAK,CAAC,eAAe,EACrB,4BAA4B,EAC5B,gCAAgC,CACjC,CAAA;IACD,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,SAAS,EAAE,wBAAwB;QACnC,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC;QACtD,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,eAAe,EAAE,KAAK,CAAC,eAAe;QACtC,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,UAAU,EAAE,KAAK,CAAC,UAAU;KAC7B,CAAC,CAAA;AACJ,CAAC;AACD,gFAAgF"}
@@ -0,0 +1,30 @@
1
+ import type { IdentityEvidenceAttachmentReference } from './identity-evidence.js';
2
+ export declare const SchemaOrgMediaObjectClaim: Readonly<{
3
+ readonly Id: "org.schema.MediaObject.id";
4
+ readonly IdentifierPropertyId: "org.schema.MediaObject.identifier.propertyID";
5
+ readonly IdentifierValue: "org.schema.MediaObject.identifier.value";
6
+ readonly ContentUrl: "org.schema.MediaObject.contentUrl";
7
+ readonly EncodingFormat: "org.schema.MediaObject.encodingFormat";
8
+ readonly ContentSize: "org.schema.MediaObject.contentSize";
9
+ }>;
10
+ export type SchemaOrgEvidenceMediaAttachment = IdentityEvidenceAttachmentReference & Readonly<{
11
+ mediaType: string;
12
+ contentUrl: string;
13
+ contentSize: number;
14
+ contentId: string;
15
+ }>;
16
+ export declare function projectEvidenceAttachmentToSchemaOrgMediaObject(attachment: SchemaOrgEvidenceMediaAttachment): Readonly<{
17
+ '@context': "https://schema.org";
18
+ '@type': "MediaObject";
19
+ '@id': string;
20
+ identifier: Readonly<{
21
+ '@type': "PropertyValue";
22
+ propertyID: "cidv1-raw-sha3-384";
23
+ value: string;
24
+ }>;
25
+ contentUrl: string;
26
+ encodingFormat: string;
27
+ contentSize: string;
28
+ }>;
29
+ export declare function toSchemaOrgEvidenceMediaFlatClaims(attachment: SchemaOrgEvidenceMediaAttachment): Readonly<Record<string, string>>;
30
+ //# sourceMappingURL=schema-org-evidence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-org-evidence.d.ts","sourceRoot":"","sources":["../../src/identity-assurance/schema-org-evidence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAA;AAEjF,eAAO,MAAM,yBAAyB;;;;;;;EAO3B,CAAA;AAEX,MAAM,MAAM,gCAAgC,GAAG,mCAAmC,GAAG,QAAQ,CAAC;IAC5F,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAC,CAAA;AAmBF,wBAAgB,+CAA+C,CAC7D,UAAU,EAAE,gCAAgC;;;;;;;;;;;;GAgB7C;AAED,wBAAgB,kCAAkC,CAChD,UAAU,EAAE,gCAAgC,GAC3C,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAUlC"}
@@ -0,0 +1,50 @@
1
+ export const SchemaOrgMediaObjectClaim = Object.freeze({
2
+ Id: 'org.schema.MediaObject.id',
3
+ IdentifierPropertyId: 'org.schema.MediaObject.identifier.propertyID',
4
+ IdentifierValue: 'org.schema.MediaObject.identifier.value',
5
+ ContentUrl: 'org.schema.MediaObject.contentUrl',
6
+ EncodingFormat: 'org.schema.MediaObject.encodingFormat',
7
+ ContentSize: 'org.schema.MediaObject.contentSize',
8
+ });
9
+ function requireSchemaOrgEvidenceMediaAttachment(attachment) {
10
+ if (attachment.digestAlgorithm !== 'sha3-384') {
11
+ throw new TypeError('Schema.org evidence MediaObject requires the governed SHA3-384 CID profile');
12
+ }
13
+ if (!attachment.contentUrl.trim()) {
14
+ throw new TypeError('Schema.org evidence MediaObject contentUrl must not be empty');
15
+ }
16
+ if (!attachment.mediaType.trim()) {
17
+ throw new TypeError('Schema.org evidence MediaObject encodingFormat must not be empty');
18
+ }
19
+ if (!Number.isSafeInteger(attachment.contentSize) || attachment.contentSize < 0) {
20
+ throw new TypeError('Schema.org evidence MediaObject contentSize must be a non-negative safe integer');
21
+ }
22
+ }
23
+ export function projectEvidenceAttachmentToSchemaOrgMediaObject(attachment) {
24
+ requireSchemaOrgEvidenceMediaAttachment(attachment);
25
+ return Object.freeze({
26
+ '@context': 'https://schema.org',
27
+ '@type': 'MediaObject',
28
+ '@id': attachment.id,
29
+ identifier: Object.freeze({
30
+ '@type': 'PropertyValue',
31
+ propertyID: 'cidv1-raw-sha3-384',
32
+ value: attachment.contentId,
33
+ }),
34
+ contentUrl: attachment.contentUrl,
35
+ encodingFormat: attachment.mediaType,
36
+ contentSize: String(attachment.contentSize),
37
+ });
38
+ }
39
+ export function toSchemaOrgEvidenceMediaFlatClaims(attachment) {
40
+ requireSchemaOrgEvidenceMediaAttachment(attachment);
41
+ return Object.freeze({
42
+ [SchemaOrgMediaObjectClaim.Id]: attachment.id,
43
+ [SchemaOrgMediaObjectClaim.IdentifierPropertyId]: 'cidv1-raw-sha3-384',
44
+ [SchemaOrgMediaObjectClaim.IdentifierValue]: attachment.contentId,
45
+ [SchemaOrgMediaObjectClaim.ContentUrl]: attachment.contentUrl,
46
+ [SchemaOrgMediaObjectClaim.EncodingFormat]: attachment.mediaType,
47
+ [SchemaOrgMediaObjectClaim.ContentSize]: String(attachment.contentSize),
48
+ });
49
+ }
50
+ //# sourceMappingURL=schema-org-evidence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-org-evidence.js","sourceRoot":"","sources":["../../src/identity-assurance/schema-org-evidence.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC;IACrD,EAAE,EAAE,2BAA2B;IAC/B,oB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J,CAAC;AAED,MAAM,UAAU,kCAAkC,CAChD,UAA4C;IAE5C,uCAAuC,CAAC,UAAU,CAAC,CAAA;IACnD,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,CAAC,yBAAyB,CAAC,EAAE,CAAC,EAAE,UAAU,CAAC,EAAE;QAC7C,CAAC,yBAAyB,CAAC,oBAAoB,CAAC,EAAE,oBAAoB;QACtE,CAAC,yBAAyB,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,SAAS;QACjE,CAAC,yBAAyB,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,UAAU;QAC7D,CAAC,yBAAyB,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,SAAS;QAChE,CAAC,yBAAyB,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC;KACxE,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,256 @@
1
+ export declare const verifiedClaimsJsonSchema: Readonly<{
2
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
3
+ readonly $id: "https://antifraudservices.github.io/antifraud-data-utils-ts/schemas/oidc4ida-verified-claims.json";
4
+ readonly title: "OIDC4IDA Verified Claims";
5
+ readonly type: "object";
6
+ readonly required: readonly ["claims", "verification"];
7
+ readonly properties: {
8
+ readonly claims: {
9
+ readonly type: "object";
10
+ readonly additionalProperties: true;
11
+ };
12
+ readonly verification: {
13
+ readonly type: "object";
14
+ readonly required: readonly ["evidence"];
15
+ readonly properties: {
16
+ readonly trust_framework: {
17
+ readonly type: readonly ["string", "null"];
18
+ };
19
+ readonly assurance_level: {
20
+ readonly type: readonly ["string", "null"];
21
+ };
22
+ readonly assurance_process: {
23
+ readonly type: readonly ["string", "null"];
24
+ };
25
+ readonly verification_process: {
26
+ readonly type: readonly ["string", "null"];
27
+ };
28
+ readonly time: {
29
+ readonly type: readonly ["string", "null"];
30
+ readonly format: "date-time";
31
+ };
32
+ readonly evidence: {
33
+ readonly type: "array";
34
+ readonly minItems: 1;
35
+ readonly items: {
36
+ readonly type: "object";
37
+ readonly required: readonly ["type"];
38
+ readonly properties: {
39
+ readonly type: {
40
+ readonly type: "string";
41
+ readonly minLength: 1;
42
+ };
43
+ };
44
+ readonly additionalProperties: true;
45
+ };
46
+ };
47
+ };
48
+ readonly additionalProperties: true;
49
+ };
50
+ };
51
+ readonly additionalProperties: false;
52
+ }>;
53
+ /**
54
+ * Stored-statement schema. A form may render its evidence fields, but the host
55
+ * must populate the read-only actor and authorization fields from its trusted
56
+ * session, active group membership and reusable group authorization.
57
+ */
58
+ export declare const workforceIdentityEvidenceStatementJsonSchema: Readonly<{
59
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
60
+ readonly $id: "https://antifraudservices.github.io/antifraud-data-utils-ts/schemas/workforce-identity-evidence-statement.json";
61
+ readonly title: "Authorized workforce identity evidence statement";
62
+ readonly type: "object";
63
+ readonly required: readonly ["operationId", "subjectReference", "capability", "createdBy", "authorization", "targets", "evidence"];
64
+ readonly properties: {
65
+ readonly operationId: {
66
+ readonly type: "string";
67
+ readonly minLength: 1;
68
+ };
69
+ readonly subjectReference: {
70
+ readonly type: "string";
71
+ readonly minLength: 1;
72
+ };
73
+ readonly capability: {
74
+ readonly const: "identity.evidence.record";
75
+ readonly readOnly: true;
76
+ };
77
+ readonly createdBy: {
78
+ readonly type: "object";
79
+ readonly readOnly: true;
80
+ readonly required: readonly ["actorReference", "assignmentReference", "organizationReference"];
81
+ readonly properties: {
82
+ readonly actorReference: {
83
+ readonly type: "string";
84
+ readonly minLength: 1;
85
+ };
86
+ readonly assignmentReference: {
87
+ readonly type: "string";
88
+ readonly minLength: 1;
89
+ };
90
+ readonly organizationReference: {
91
+ readonly type: "string";
92
+ readonly minLength: 1;
93
+ };
94
+ };
95
+ readonly additionalProperties: false;
96
+ };
97
+ readonly authorization: {
98
+ readonly type: "object";
99
+ readonly readOnly: true;
100
+ readonly required: readonly ["groupReference", "groupAuthorizationReference", "controllerReference"];
101
+ readonly properties: {
102
+ readonly groupReference: {
103
+ readonly type: "string";
104
+ readonly minLength: 1;
105
+ };
106
+ readonly groupAuthorizationReference: {
107
+ readonly type: "string";
108
+ readonly minLength: 1;
109
+ };
110
+ readonly controllerReference: {
111
+ readonly type: "string";
112
+ readonly minLength: 1;
113
+ };
114
+ readonly subjectAuthorizationReference: {
115
+ readonly type: "string";
116
+ readonly minLength: 1;
117
+ };
118
+ };
119
+ readonly additionalProperties: false;
120
+ };
121
+ readonly targets: {
122
+ readonly type: "array";
123
+ readonly minItems: 1;
124
+ readonly items: {
125
+ readonly type: "object";
126
+ readonly required: readonly ["kind"];
127
+ readonly properties: {
128
+ readonly kind: {
129
+ readonly enum: readonly ["subject", "claim", "relationship", "predicate"];
130
+ };
131
+ readonly claimPath: {
132
+ readonly type: "string";
133
+ readonly minLength: 1;
134
+ };
135
+ readonly relationshipType: {
136
+ readonly type: "string";
137
+ readonly minLength: 1;
138
+ };
139
+ readonly relatedSubjectReference: {
140
+ readonly type: "string";
141
+ readonly minLength: 1;
142
+ };
143
+ readonly predicate: {
144
+ readonly const: "age-over";
145
+ };
146
+ readonly sourceSubjectReference: {
147
+ readonly type: "string";
148
+ readonly minLength: 1;
149
+ };
150
+ readonly sourceClaimPath: {
151
+ readonly const: "org.schema.Person.birthDate";
152
+ };
153
+ readonly threshold: {
154
+ readonly type: "integer";
155
+ readonly minimum: 1;
156
+ readonly maximum: 150;
157
+ };
158
+ readonly result: {
159
+ readonly type: "boolean";
160
+ };
161
+ };
162
+ readonly additionalProperties: false;
163
+ };
164
+ };
165
+ readonly evidence: {
166
+ readonly type: "array";
167
+ readonly minItems: 1;
168
+ readonly items: {
169
+ readonly type: "object";
170
+ readonly required: readonly ["id", "type", "observedAt", "checks"];
171
+ readonly properties: {
172
+ readonly id: {
173
+ readonly type: "string";
174
+ readonly minLength: 1;
175
+ };
176
+ readonly type: {
177
+ readonly enum: readonly ["document", "electronic_record", "vouch", "electronic_signature"];
178
+ };
179
+ readonly observedAt: {
180
+ readonly type: "string";
181
+ readonly format: "date-time";
182
+ };
183
+ readonly checks: {
184
+ readonly type: "array";
185
+ readonly minItems: 1;
186
+ readonly items: {
187
+ readonly type: "object";
188
+ readonly required: readonly ["checkMethod", "checkId"];
189
+ readonly properties: {
190
+ readonly checkMethod: {
191
+ readonly type: "string";
192
+ readonly minLength: 1;
193
+ };
194
+ readonly organizationReference: {
195
+ readonly type: "string";
196
+ readonly minLength: 1;
197
+ };
198
+ readonly checkId: {
199
+ readonly type: "string";
200
+ readonly minLength: 1;
201
+ };
202
+ readonly checkedAt: {
203
+ readonly type: "string";
204
+ readonly format: "date-time";
205
+ };
206
+ };
207
+ readonly additionalProperties: false;
208
+ };
209
+ };
210
+ readonly attachments: {
211
+ readonly type: "array";
212
+ readonly items: {
213
+ readonly type: "object";
214
+ readonly required: readonly ["id", "digestAlgorithm", "digest"];
215
+ readonly properties: {
216
+ readonly id: {
217
+ readonly type: "string";
218
+ readonly minLength: 1;
219
+ };
220
+ readonly mediaType: {
221
+ readonly type: "string";
222
+ readonly minLength: 1;
223
+ };
224
+ readonly contentUrl: {
225
+ readonly type: "string";
226
+ readonly minLength: 1;
227
+ readonly format: "uri";
228
+ };
229
+ readonly contentSize: {
230
+ readonly type: "integer";
231
+ readonly minimum: 0;
232
+ };
233
+ readonly digestAlgorithm: {
234
+ readonly enum: readonly ["sha-256", "sha-384", "sha-512", "sha3-384"];
235
+ };
236
+ readonly digest: {
237
+ readonly type: "string";
238
+ readonly minLength: 1;
239
+ };
240
+ readonly contentId: {
241
+ readonly type: "string";
242
+ readonly pattern: "^z[1-9A-HJ-NP-Za-km-z]+$";
243
+ readonly description: "Optional CIDv1(raw, SHA3-384) encoded with multibase base58btc.";
244
+ };
245
+ };
246
+ readonly additionalProperties: false;
247
+ };
248
+ };
249
+ };
250
+ readonly additionalProperties: false;
251
+ };
252
+ };
253
+ };
254
+ readonly additionalProperties: false;
255
+ }>;
256
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/identity-assurance/schemas.ts"],"names":[],"mappings":"AA8DA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8B1B,CAAA;AAEX;;;;GAIG;AACH,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoE9C,CAAA"}