@learncard/react 3.0.4 → 3.0.5
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/cjs/{BoostGenericCard-dd6ee2ee.js → BoostGenericCard-7f8c99e8.js} +2 -2
- package/dist/cjs/{BoostGenericCard-dd6ee2ee.js.map → BoostGenericCard-7f8c99e8.js.map} +1 -1
- package/dist/cjs/{CertificateDisplayCard-e61d6a67.js → CertificateDisplayCard-b5bc9b13.js} +3 -3
- package/dist/cjs/{CertificateDisplayCard-e61d6a67.js.map → CertificateDisplayCard-b5bc9b13.js.map} +1 -1
- package/dist/cjs/{MeritBadgeDisplayCard-c2828cd3.js → MeritBadgeDisplayCard-e5adf548.js} +3 -3
- package/dist/cjs/{MeritBadgeDisplayCard-c2828cd3.js.map → MeritBadgeDisplayCard-e5adf548.js.map} +1 -1
- package/dist/cjs/{MeritBadgeSkillsCount-49ad7127.js → MeritBadgeSkillsCount-e5b5090e.js} +2 -2
- package/dist/cjs/{MeritBadgeSkillsCount-49ad7127.js.map → MeritBadgeSkillsCount-e5b5090e.js.map} +1 -1
- package/dist/cjs/{VCCard-90275f9d.js → VCCard-fe6cb0da.js} +3 -3
- package/dist/cjs/{VCCard-90275f9d.js.map → VCCard-fe6cb0da.js.map} +1 -1
- package/dist/cjs/{VCDisplayBackFace-98de13be.js → VCDisplayBackFace-9afda05a.js} +3 -3
- package/dist/cjs/{VCDisplayBackFace-98de13be.js.map → VCDisplayBackFace-9afda05a.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard-ab2bf298.js → VCDisplayCard-cbe71ecd.js} +3 -3
- package/dist/cjs/{VCDisplayCard-ab2bf298.js.map → VCDisplayCard-cbe71ecd.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard2-dd3c011e.js → VCDisplayCard2-4324e97c.js} +5 -5
- package/dist/cjs/{VCDisplayCard2-dd3c011e.js.map → VCDisplayCard2-4324e97c.js.map} +1 -1
- package/dist/cjs/{VCVerificationPill-008c25aa.js → VCVerificationPill-e6b52da2.js} +2 -2
- package/dist/cjs/{VCVerificationPill-008c25aa.js.map → VCVerificationPill-e6b52da2.js.map} +1 -1
- package/dist/cjs/{credential.helpers-c4f9d5be.js → credential.helpers-9849239f.js} +2 -2
- package/dist/cjs/{credential.helpers-c4f9d5be.js.map → credential.helpers-9849239f.js.map} +1 -1
- package/dist/cjs/index.js +11 -11
- package/dist/cjs/index14.js +11 -11
- package/dist/cjs/index22.js +4 -4
- package/dist/cjs/index39.js +9 -9
- package/dist/cjs/index4.js +3 -3
- package/dist/cjs/index40.js +4 -4
- package/dist/cjs/index41.js +5 -5
- package/dist/cjs/index42.js +5 -5
- package/dist/cjs/index43.js +1 -1
- package/dist/cjs/index46.js +2 -2
- package/dist/cjs/index7.js +3 -3
- package/dist/cjs/{types.esm-95ade0c0.js → types.esm-56901371.js} +596 -53
- package/dist/cjs/types.esm-56901371.js.map +1 -0
- package/dist/esm/{BoostGenericCard-c28f8b30.js → BoostGenericCard-9c79cb20.js} +2 -2
- package/dist/esm/{BoostGenericCard-c28f8b30.js.map → BoostGenericCard-9c79cb20.js.map} +1 -1
- package/dist/esm/{CertificateDisplayCard-109f14c5.js → CertificateDisplayCard-c97f00ab.js} +3 -3
- package/dist/esm/{CertificateDisplayCard-109f14c5.js.map → CertificateDisplayCard-c97f00ab.js.map} +1 -1
- package/dist/esm/{MeritBadgeDisplayCard-eafb2e2d.js → MeritBadgeDisplayCard-f863388b.js} +3 -3
- package/dist/esm/{MeritBadgeDisplayCard-eafb2e2d.js.map → MeritBadgeDisplayCard-f863388b.js.map} +1 -1
- package/dist/esm/{MeritBadgeSkillsCount-4715deb0.js → MeritBadgeSkillsCount-f0012302.js} +2 -2
- package/dist/esm/{MeritBadgeSkillsCount-4715deb0.js.map → MeritBadgeSkillsCount-f0012302.js.map} +1 -1
- package/dist/esm/{VCCard-d9789c00.js → VCCard-d63736c5.js} +3 -3
- package/dist/esm/{VCCard-d9789c00.js.map → VCCard-d63736c5.js.map} +1 -1
- package/dist/esm/{VCDisplayBackFace-1ca3bf88.js → VCDisplayBackFace-0ede9620.js} +3 -3
- package/dist/esm/{VCDisplayBackFace-1ca3bf88.js.map → VCDisplayBackFace-0ede9620.js.map} +1 -1
- package/dist/esm/{VCDisplayCard-915308ce.js → VCDisplayCard-7504227f.js} +3 -3
- package/dist/esm/{VCDisplayCard-915308ce.js.map → VCDisplayCard-7504227f.js.map} +1 -1
- package/dist/esm/{VCDisplayCard2-40b36e67.js → VCDisplayCard2-1c1413b9.js} +5 -5
- package/dist/esm/{VCDisplayCard2-40b36e67.js.map → VCDisplayCard2-1c1413b9.js.map} +1 -1
- package/dist/esm/{VCVerificationPill-be4fcdd3.js → VCVerificationPill-f111195c.js} +2 -2
- package/dist/esm/{VCVerificationPill-be4fcdd3.js.map → VCVerificationPill-f111195c.js.map} +1 -1
- package/dist/esm/{credential.helpers-a7b12dd7.js → credential.helpers-688d1a6d.js} +2 -2
- package/dist/esm/{credential.helpers-a7b12dd7.js.map → credential.helpers-688d1a6d.js.map} +1 -1
- package/dist/esm/index.js +11 -11
- package/dist/esm/index14.js +11 -11
- package/dist/esm/index22.js +4 -4
- package/dist/esm/index39.js +9 -9
- package/dist/esm/index4.js +3 -3
- package/dist/esm/index40.js +4 -4
- package/dist/esm/index41.js +5 -5
- package/dist/esm/index42.js +5 -5
- package/dist/esm/index43.js +1 -1
- package/dist/esm/index46.js +2 -2
- package/dist/esm/index7.js +3 -3
- package/dist/esm/{types.esm-80957345.js → types.esm-b1fb8920.js} +596 -53
- package/dist/esm/types.esm-b1fb8920.js.map +1 -0
- package/package.json +4 -4
- package/dist/cjs/types.esm-95ade0c0.js.map +0 -1
- package/dist/esm/types.esm-80957345.js.map +0 -1
|
@@ -9719,12 +9719,46 @@ var StringQuery = union([
|
|
|
9719
9719
|
$or: BaseStringQuery.array()
|
|
9720
9720
|
})
|
|
9721
9721
|
]);
|
|
9722
|
+
var BITSTRING_STATUS_PURPOSES = ["revocation", "suspension"];
|
|
9723
|
+
var BitstringStatusPurposeValidator = _enum(BITSTRING_STATUS_PURPOSES);
|
|
9724
|
+
var BitstringStatusListEntryValidator = object({
|
|
9725
|
+
id: string().optional(),
|
|
9726
|
+
type: literal("BitstringStatusListEntry"),
|
|
9727
|
+
statusPurpose: BitstringStatusPurposeValidator,
|
|
9728
|
+
statusListIndex: string().or(number().int().nonnegative()),
|
|
9729
|
+
statusListCredential: string()
|
|
9730
|
+
});
|
|
9731
|
+
BitstringStatusListEntryValidator.extend({
|
|
9732
|
+
id: string()
|
|
9733
|
+
});
|
|
9734
|
+
object({
|
|
9735
|
+
id: string().optional(),
|
|
9736
|
+
type: literal("BitstringStatusList"),
|
|
9737
|
+
statusPurpose: BitstringStatusPurposeValidator,
|
|
9738
|
+
encodedList: string()
|
|
9739
|
+
});
|
|
9740
|
+
object({
|
|
9741
|
+
statusPurposes: array(BitstringStatusPurposeValidator).optional(),
|
|
9742
|
+
listSize: number().int().positive().optional()
|
|
9743
|
+
}).default({});
|
|
9744
|
+
object({
|
|
9745
|
+
refreshId: string().min(1),
|
|
9746
|
+
credentialStatus: CredentialStatusValidator.or(CredentialStatusValidator.array()).nullable()
|
|
9747
|
+
});
|
|
9722
9748
|
var LearnCardRefreshAuthorizationValidator = object({ type: literal("LearnCardDIDAuth") }).catchall(any());
|
|
9723
9749
|
var ManagedCredentialRefreshServiceValidator = object({
|
|
9724
9750
|
id: string().min(1),
|
|
9725
9751
|
type: literal("LearnCardCredentialRefresh2026"),
|
|
9726
9752
|
authorization: LearnCardRefreshAuthorizationValidator.optional()
|
|
9727
9753
|
}).catchall(any());
|
|
9754
|
+
var ManagedCredentialRefreshBindingValidator = ManagedCredentialRefreshServiceValidator.or(
|
|
9755
|
+
RefreshServiceValidator.array().refine(
|
|
9756
|
+
(services) => services.some(
|
|
9757
|
+
(service) => ManagedCredentialRefreshServiceValidator.safeParse(service).success
|
|
9758
|
+
),
|
|
9759
|
+
"A managed refresh service is required"
|
|
9760
|
+
)
|
|
9761
|
+
);
|
|
9728
9762
|
var StandardCredentialRefreshServiceValidator = object({
|
|
9729
9763
|
id: string().min(1),
|
|
9730
9764
|
type: literal("1EdTechCredentialRefresh")
|
|
@@ -9748,7 +9782,9 @@ object({
|
|
|
9748
9782
|
});
|
|
9749
9783
|
var ManagedCredentialRefreshReceiptValidator = object({
|
|
9750
9784
|
refreshId: string().min(1),
|
|
9751
|
-
refreshService:
|
|
9785
|
+
refreshService: ManagedCredentialRefreshBindingValidator,
|
|
9786
|
+
/** Legacy receipts authenticate only the allocated managed entry, not other services. */
|
|
9787
|
+
refreshServiceBinding: literal("managed-entry").optional(),
|
|
9752
9788
|
credentialId: string().min(1),
|
|
9753
9789
|
issuerDid: string().min(1),
|
|
9754
9790
|
holderDid: string().min(1),
|
|
@@ -9756,14 +9792,43 @@ var ManagedCredentialRefreshReceiptValidator = object({
|
|
|
9756
9792
|
CredentialStatusValidator.array()
|
|
9757
9793
|
).optional()
|
|
9758
9794
|
}).strip();
|
|
9795
|
+
object({ uri: string().min(1) });
|
|
9796
|
+
ManagedCredentialRefreshReceiptValidator.extend({
|
|
9797
|
+
encryptionMode: _enum(["network", "holder"])
|
|
9798
|
+
});
|
|
9799
|
+
var HolderEncryptedHandoffValidator = object({
|
|
9800
|
+
refreshId: string().min(1),
|
|
9801
|
+
credentialId: string().min(1),
|
|
9802
|
+
holderDid: string().min(1),
|
|
9803
|
+
issuerDid: string().min(1),
|
|
9804
|
+
credentialStatus: CredentialStatusValidator.or(CredentialStatusValidator.array()),
|
|
9805
|
+
refreshService: ManagedCredentialRefreshBindingValidator.optional(),
|
|
9806
|
+
jwe: JWEValidator
|
|
9807
|
+
}).strict();
|
|
9808
|
+
object({
|
|
9809
|
+
handoff: HolderEncryptedHandoffValidator,
|
|
9810
|
+
idempotencyKey: string().min(1).optional(),
|
|
9811
|
+
boostUri: string().optional(),
|
|
9812
|
+
skipNotification: boolean().optional()
|
|
9813
|
+
});
|
|
9814
|
+
object({ refreshId: string().min(1) });
|
|
9815
|
+
object({
|
|
9816
|
+
recipientKeyIds: array(string())
|
|
9817
|
+
});
|
|
9759
9818
|
var InboxCredentialRefreshReceiptValidator = ManagedCredentialRefreshReceiptValidator.omit(
|
|
9760
9819
|
{ holderDid: true }
|
|
9761
9820
|
).extend({ holderDid: string().min(1).optional() });
|
|
9762
9821
|
var CredentialRefreshSigningModeValidator = _enum(["issuer-signed", "signing-authority"]);
|
|
9822
|
+
var CredentialRefreshUpdateReasonValidator = _enum(["corrected", "updated", "reissued"]);
|
|
9763
9823
|
var PublishCredentialRefreshBaseFields = {
|
|
9764
9824
|
refreshId: string().min(1),
|
|
9765
9825
|
notifyHolder: boolean().optional(),
|
|
9766
|
-
updateSummary: string().optional()
|
|
9826
|
+
updateSummary: string().max(280).optional().describe(
|
|
9827
|
+
"Public legacy update summary. Do not include private claims; prefer updateReason."
|
|
9828
|
+
),
|
|
9829
|
+
updateReason: CredentialRefreshUpdateReasonValidator.optional().describe(
|
|
9830
|
+
"Public reason for this update"
|
|
9831
|
+
),
|
|
9767
9832
|
idempotencyKey: string().optional()
|
|
9768
9833
|
};
|
|
9769
9834
|
object(__spreadProps(__spreadValues({}, PublishCredentialRefreshBaseFields), {
|
|
@@ -9836,13 +9901,25 @@ object({
|
|
|
9836
9901
|
publishedAt: string().min(1),
|
|
9837
9902
|
notification: PublishCredentialRefreshNotificationValidator
|
|
9838
9903
|
});
|
|
9904
|
+
object({
|
|
9905
|
+
handoff: HolderEncryptedHandoffValidator,
|
|
9906
|
+
notify: boolean(),
|
|
9907
|
+
updateSummary: string().max(280).optional().describe(
|
|
9908
|
+
"Public legacy update summary. Do not include private claims; prefer updateReason."
|
|
9909
|
+
),
|
|
9910
|
+
updateReason: CredentialRefreshUpdateReasonValidator.optional().describe(
|
|
9911
|
+
"Public reason for this update"
|
|
9912
|
+
),
|
|
9913
|
+
idempotencyKey: string().optional()
|
|
9914
|
+
});
|
|
9839
9915
|
var CredentialRefreshVersionMetadataValidator = object({
|
|
9840
9916
|
version: number().int().positive(),
|
|
9841
9917
|
publishedAt: string().min(1),
|
|
9842
9918
|
effectiveAt: string().optional(),
|
|
9843
9919
|
etag: string().optional(),
|
|
9844
9920
|
signingMode: CredentialRefreshSigningModeValidator.optional(),
|
|
9845
|
-
updateSummary: string().optional()
|
|
9921
|
+
updateSummary: string().optional(),
|
|
9922
|
+
updateReason: CredentialRefreshUpdateReasonValidator.optional()
|
|
9846
9923
|
});
|
|
9847
9924
|
object({
|
|
9848
9925
|
refreshId: string().min(1),
|
|
@@ -9885,6 +9962,7 @@ var CredentialRefreshFailureCodeValidator = _enum([
|
|
|
9885
9962
|
"INVALID_PROOF",
|
|
9886
9963
|
"ISSUER_MISMATCH",
|
|
9887
9964
|
"ID_MISMATCH",
|
|
9965
|
+
"BINDING_MISMATCH",
|
|
9888
9966
|
"ROLLBACK",
|
|
9889
9967
|
"REVOKED",
|
|
9890
9968
|
"UNSAFE_ENDPOINT"
|
|
@@ -10202,13 +10280,18 @@ object({
|
|
|
10202
10280
|
isPrimary: boolean().optional()
|
|
10203
10281
|
})
|
|
10204
10282
|
});
|
|
10205
|
-
object({
|
|
10283
|
+
var AutoBoostConfigValidator = object({
|
|
10206
10284
|
boostUri: string(),
|
|
10207
10285
|
signingAuthority: object({
|
|
10208
10286
|
endpoint: string(),
|
|
10209
10287
|
name: string()
|
|
10210
10288
|
})
|
|
10211
10289
|
});
|
|
10290
|
+
var CredentialDisplayValidator = object({
|
|
10291
|
+
name: string().trim().min(1).max(280).optional(),
|
|
10292
|
+
category: string().max(280).optional(),
|
|
10293
|
+
image: string().max(2048).url().refine((url) => url.startsWith("https://"), { message: "Image URL must use https" }).optional()
|
|
10294
|
+
});
|
|
10212
10295
|
var SendBoostTemplateValidator = BoostValidator.partial().omit({ uri: true, claimPermissions: true }).extend({
|
|
10213
10296
|
credential: VCValidator.or(UnsignedVCValidator),
|
|
10214
10297
|
claimPermissions: BoostPermissionsValidator.partial().optional(),
|
|
@@ -10247,6 +10330,10 @@ var SendBoostInputValidator = object({
|
|
|
10247
10330
|
templateUri: string().optional(),
|
|
10248
10331
|
template: SendBoostTemplateValidator.optional(),
|
|
10249
10332
|
signedCredential: VCValidator.optional(),
|
|
10333
|
+
display: CredentialDisplayValidator.optional().describe(
|
|
10334
|
+
"Public display metadata for managed and signed-only sends. Nothing is inferred from credential content; omitted names use generic copy. The exception is category: when display.category is omitted for an inline template, the template's category is copied, since consent-flow write authorization is keyed on it."
|
|
10335
|
+
),
|
|
10336
|
+
statusPurposes: array(BitstringStatusPurposeValidator).optional(),
|
|
10250
10337
|
options: SendOptionsValidator.optional().describe(
|
|
10251
10338
|
"Options for email/phone recipients (Universal Inbox)"
|
|
10252
10339
|
),
|
|
@@ -10286,7 +10373,10 @@ var SendInboxResponseValidator = object({
|
|
|
10286
10373
|
"Present when guardianEmail was specified"
|
|
10287
10374
|
)
|
|
10288
10375
|
});
|
|
10376
|
+
var StatusManagementValidator = _enum(["network", "external", "mixed", "none"]);
|
|
10289
10377
|
var SendBoostResponseValidator = object({
|
|
10378
|
+
/** Public status providers for a managed send; external entries require provider-side updates. */
|
|
10379
|
+
statusManagement: StatusManagementValidator.optional(),
|
|
10290
10380
|
type: literal("boost"),
|
|
10291
10381
|
credentialUri: string(),
|
|
10292
10382
|
uri: string(),
|
|
@@ -10299,19 +10389,33 @@ var SendBoostResponseValidator = object({
|
|
|
10299
10389
|
)
|
|
10300
10390
|
});
|
|
10301
10391
|
object({
|
|
10392
|
+
/** Opt in to signing the server-bound statusEntries; omission preserves client allocation. */
|
|
10393
|
+
statusBinding: literal("server").optional(),
|
|
10394
|
+
statusPurposes: array(BitstringStatusPurposeValidator).optional(),
|
|
10302
10395
|
recipient: string(),
|
|
10303
10396
|
templateUri: string().optional(),
|
|
10304
10397
|
template: SendBoostTemplateValidator.optional(),
|
|
10398
|
+
display: CredentialDisplayValidator.optional().describe("Public display metadata only"),
|
|
10305
10399
|
contractUri: string().optional(),
|
|
10306
10400
|
templateData: record(string(), unknown()).optional(),
|
|
10307
10401
|
integrationId: string().optional(),
|
|
10308
10402
|
/** Credential ID to allocate for; generated server-side when omitted. */
|
|
10309
10403
|
credentialId: string().min(1).optional(),
|
|
10310
|
-
idempotencyKey: string().min(1).max(200).optional()
|
|
10311
|
-
|
|
10312
|
-
|
|
10404
|
+
idempotencyKey: string().min(1).max(200).optional(),
|
|
10405
|
+
/**
|
|
10406
|
+
* `'holder'` requests student-only encryption (LC-2345): the SDK signs and
|
|
10407
|
+
* encrypts locally and the server never receives plaintext. Requires a
|
|
10408
|
+
* profile or DID recipient; rejected for signedCredential-only sends and for
|
|
10409
|
+
* inbox (email/phone) recipients. Defaults to `'network'`.
|
|
10410
|
+
*/
|
|
10411
|
+
encryption: _enum(["network", "holder"]).optional()
|
|
10412
|
+
}).refine((data) => !(data.templateUri && data.template), {
|
|
10413
|
+
message: "Provide at most one of templateUri or template."
|
|
10313
10414
|
});
|
|
10314
10415
|
object({
|
|
10416
|
+
/** Public status providers known at preparation; final send reports the signed entries. */
|
|
10417
|
+
statusManagement: StatusManagementValidator.optional(),
|
|
10418
|
+
statusEntries: array(BitstringStatusListEntryValidator).optional(),
|
|
10315
10419
|
boostUri: string(),
|
|
10316
10420
|
credentialId: string(),
|
|
10317
10421
|
refreshId: string(),
|
|
@@ -10319,11 +10423,110 @@ object({
|
|
|
10319
10423
|
/** The DID to use as credentialSubject.id (recipient DID, or the profile's did:web). */
|
|
10320
10424
|
holderDid: string(),
|
|
10321
10425
|
/** Present when this idempotencyKey already completed: return it without signing. */
|
|
10322
|
-
completed: SendBoostResponseValidator.optional()
|
|
10426
|
+
completed: SendBoostResponseValidator.optional(),
|
|
10427
|
+
/**
|
|
10428
|
+
* Present only when `encryption: 'holder'` was requested: the exact
|
|
10429
|
+
* key-agreement verification-method ids (holder + current managers) the SDK
|
|
10430
|
+
* must encrypt to. Recomputed on every call, so a later manager change can
|
|
10431
|
+
* make a previously-prepared set stale (see `credentialRefresh.sendHolderEncryptedRefreshable`
|
|
10432
|
+
* and `credentialRefresh.getEncryptionRecipients`).
|
|
10433
|
+
*/
|
|
10434
|
+
recipientKeyIds: array(string()).optional()
|
|
10323
10435
|
});
|
|
10324
10436
|
discriminatedUnion("type", [SendBoostInputValidator]);
|
|
10325
10437
|
discriminatedUnion("type", [SendBoostResponseValidator]);
|
|
10326
|
-
var ConsentFlowTermsStatusValidator = _enum([
|
|
10438
|
+
var ConsentFlowTermsStatusValidator = _enum([
|
|
10439
|
+
"live",
|
|
10440
|
+
"consumed",
|
|
10441
|
+
"withdrawn",
|
|
10442
|
+
"needs_reconsent",
|
|
10443
|
+
"suspended"
|
|
10444
|
+
]);
|
|
10445
|
+
var ConsentFlowContractChangeKindValidator = _enum([
|
|
10446
|
+
"relaxed",
|
|
10447
|
+
"expanded_optional",
|
|
10448
|
+
"requires_consent"
|
|
10449
|
+
]);
|
|
10450
|
+
var ConsentFlowContractScopeValidator = object({
|
|
10451
|
+
area: _enum(["read", "write"]),
|
|
10452
|
+
type: _enum(["credential", "personal"]),
|
|
10453
|
+
key: string(),
|
|
10454
|
+
required: boolean(),
|
|
10455
|
+
reason: string().optional()
|
|
10456
|
+
});
|
|
10457
|
+
var ConsentFlowContractDetailValueValidator = union([
|
|
10458
|
+
string(),
|
|
10459
|
+
boolean(),
|
|
10460
|
+
string().array()
|
|
10461
|
+
]);
|
|
10462
|
+
var ConsentFlowContractDetailChangeValidator = object({
|
|
10463
|
+
field: _enum([
|
|
10464
|
+
"name",
|
|
10465
|
+
"subtitle",
|
|
10466
|
+
"description",
|
|
10467
|
+
"reasonForAccessing",
|
|
10468
|
+
"image",
|
|
10469
|
+
"needsGuardianConsent",
|
|
10470
|
+
"redirectUrl",
|
|
10471
|
+
"frontDoorBoostUri",
|
|
10472
|
+
"expiresAt",
|
|
10473
|
+
"writers",
|
|
10474
|
+
"autoboosts"
|
|
10475
|
+
]),
|
|
10476
|
+
before: ConsentFlowContractDetailValueValidator.optional(),
|
|
10477
|
+
after: ConsentFlowContractDetailValueValidator.optional()
|
|
10478
|
+
});
|
|
10479
|
+
var ConsentFlowContractDiffValidator = object({
|
|
10480
|
+
added: ConsentFlowContractScopeValidator.array(),
|
|
10481
|
+
removed: ConsentFlowContractScopeValidator.array(),
|
|
10482
|
+
changed: ConsentFlowContractScopeValidator.array(),
|
|
10483
|
+
details: ConsentFlowContractDetailChangeValidator.array().optional()
|
|
10484
|
+
});
|
|
10485
|
+
var ConsentFlowContractUpdatePreviewValidator = object({
|
|
10486
|
+
headline: string(),
|
|
10487
|
+
subhead: string(),
|
|
10488
|
+
rows: array(
|
|
10489
|
+
object({
|
|
10490
|
+
scope: ConsentFlowContractScopeValidator,
|
|
10491
|
+
change: _enum(["added", "removed", "changed"]),
|
|
10492
|
+
label: string(),
|
|
10493
|
+
subtitle: string()
|
|
10494
|
+
})
|
|
10495
|
+
),
|
|
10496
|
+
primaryLabel: string()
|
|
10497
|
+
});
|
|
10498
|
+
var ConsentFlowContractStatusValidator = _enum(["active", "retired"]);
|
|
10499
|
+
object({
|
|
10500
|
+
version: number().int().positive(),
|
|
10501
|
+
createdAt: string(),
|
|
10502
|
+
reason: string().optional(),
|
|
10503
|
+
kind: ConsentFlowContractChangeKindValidator.optional()
|
|
10504
|
+
});
|
|
10505
|
+
object({
|
|
10506
|
+
version: number().int().positive(),
|
|
10507
|
+
kind: ConsentFlowContractChangeKindValidator,
|
|
10508
|
+
affectedUsers: number().int().nonnegative(),
|
|
10509
|
+
preview: ConsentFlowContractUpdatePreviewValidator
|
|
10510
|
+
});
|
|
10511
|
+
object({
|
|
10512
|
+
status: ConsentFlowTermsStatusValidator.or(literal("not_consented")),
|
|
10513
|
+
consentedVersion: number().int().positive().optional(),
|
|
10514
|
+
currentVersion: number().int().positive(),
|
|
10515
|
+
needsReconsent: boolean(),
|
|
10516
|
+
reviewUrl: string().optional()
|
|
10517
|
+
});
|
|
10518
|
+
object({
|
|
10519
|
+
contractUri: string(),
|
|
10520
|
+
contractName: string().optional(),
|
|
10521
|
+
fromVersion: number().int().positive(),
|
|
10522
|
+
toVersion: number().int().positive(),
|
|
10523
|
+
kind: ConsentFlowContractChangeKindValidator,
|
|
10524
|
+
reason: string().optional(),
|
|
10525
|
+
diff: ConsentFlowContractDiffValidator,
|
|
10526
|
+
reconsentDeadline: string().optional(),
|
|
10527
|
+
reviewUrl: string(),
|
|
10528
|
+
preview: ConsentFlowContractUpdatePreviewValidator.optional()
|
|
10529
|
+
});
|
|
10327
10530
|
var ConsentFlowContractValidator = object({
|
|
10328
10531
|
read: object({
|
|
10329
10532
|
anonymize: boolean().optional(),
|
|
@@ -10332,13 +10535,18 @@ var ConsentFlowContractValidator = object({
|
|
|
10332
10535
|
string(),
|
|
10333
10536
|
object({
|
|
10334
10537
|
required: boolean(),
|
|
10335
|
-
defaultEnabled: boolean().optional()
|
|
10538
|
+
defaultEnabled: boolean().optional(),
|
|
10539
|
+
reason: string().optional()
|
|
10336
10540
|
})
|
|
10337
10541
|
).default({})
|
|
10338
10542
|
}).prefault({ categories: {} }),
|
|
10339
10543
|
personal: record(
|
|
10340
10544
|
string(),
|
|
10341
|
-
object({
|
|
10545
|
+
object({
|
|
10546
|
+
required: boolean(),
|
|
10547
|
+
defaultEnabled: boolean().optional(),
|
|
10548
|
+
reason: string().optional()
|
|
10549
|
+
})
|
|
10342
10550
|
).default({})
|
|
10343
10551
|
}).prefault({ credentials: { categories: {} }, personal: {} }),
|
|
10344
10552
|
write: object({
|
|
@@ -10347,16 +10555,55 @@ var ConsentFlowContractValidator = object({
|
|
|
10347
10555
|
string(),
|
|
10348
10556
|
object({
|
|
10349
10557
|
required: boolean(),
|
|
10350
|
-
defaultEnabled: boolean().optional()
|
|
10558
|
+
defaultEnabled: boolean().optional(),
|
|
10559
|
+
reason: string().optional()
|
|
10351
10560
|
})
|
|
10352
10561
|
).default({})
|
|
10353
10562
|
}).prefault({ categories: {} }),
|
|
10354
10563
|
personal: record(
|
|
10355
10564
|
string(),
|
|
10356
|
-
object({
|
|
10565
|
+
object({
|
|
10566
|
+
required: boolean(),
|
|
10567
|
+
defaultEnabled: boolean().optional(),
|
|
10568
|
+
reason: string().optional()
|
|
10569
|
+
})
|
|
10357
10570
|
).default({})
|
|
10358
10571
|
}).prefault({ credentials: { categories: {} }, personal: {} })
|
|
10359
10572
|
});
|
|
10573
|
+
var ConsentFlowContractScopePatchValidator = object({
|
|
10574
|
+
required: boolean(),
|
|
10575
|
+
defaultEnabled: boolean().optional(),
|
|
10576
|
+
reason: string().optional()
|
|
10577
|
+
}).nullable();
|
|
10578
|
+
object({
|
|
10579
|
+
contract: object({
|
|
10580
|
+
read: object({
|
|
10581
|
+
anonymize: boolean().optional(),
|
|
10582
|
+
credentials: object({
|
|
10583
|
+
categories: record(string(), ConsentFlowContractScopePatchValidator).optional()
|
|
10584
|
+
}).optional(),
|
|
10585
|
+
personal: record(string(), ConsentFlowContractScopePatchValidator).optional()
|
|
10586
|
+
}).optional(),
|
|
10587
|
+
write: object({
|
|
10588
|
+
credentials: object({
|
|
10589
|
+
categories: record(string(), ConsentFlowContractScopePatchValidator).optional()
|
|
10590
|
+
}).optional(),
|
|
10591
|
+
personal: record(string(), ConsentFlowContractScopePatchValidator).optional()
|
|
10592
|
+
}).optional()
|
|
10593
|
+
}).optional(),
|
|
10594
|
+
name: string().optional(),
|
|
10595
|
+
subtitle: string().optional(),
|
|
10596
|
+
description: string().optional(),
|
|
10597
|
+
reasonForAccessing: string().optional(),
|
|
10598
|
+
image: string().optional(),
|
|
10599
|
+
needsGuardianConsent: boolean().optional(),
|
|
10600
|
+
redirectUrl: string().optional(),
|
|
10601
|
+
frontDoorBoostUri: string().optional(),
|
|
10602
|
+
expiresAt: string().nullable().optional(),
|
|
10603
|
+
autoboosts: AutoBoostConfigValidator.array().optional(),
|
|
10604
|
+
writers: string().array().optional(),
|
|
10605
|
+
recipients: string().array().optional()
|
|
10606
|
+
});
|
|
10360
10607
|
var ConsentFlowContractDetailsValidator = object({
|
|
10361
10608
|
contract: ConsentFlowContractValidator,
|
|
10362
10609
|
owner: LCNProfileValidator,
|
|
@@ -10375,7 +10622,19 @@ var ConsentFlowContractDetailsValidator = object({
|
|
|
10375
10622
|
autoBoosts: string().array().optional(),
|
|
10376
10623
|
writers: array(LCNProfileValidator).optional(),
|
|
10377
10624
|
recipients: array(LCNPublicProfileValidator.extend({ did: string() })).optional(),
|
|
10378
|
-
audienceVersion: number().int().nonnegative().optional()
|
|
10625
|
+
audienceVersion: number().int().nonnegative().optional(),
|
|
10626
|
+
version: number().int().positive(),
|
|
10627
|
+
status: ConsentFlowContractStatusValidator.optional(),
|
|
10628
|
+
latestUpdate: object({
|
|
10629
|
+
fromVersion: number().int().positive(),
|
|
10630
|
+
toVersion: number().int().positive(),
|
|
10631
|
+
kind: ConsentFlowContractChangeKindValidator,
|
|
10632
|
+
reason: string().optional(),
|
|
10633
|
+
diff: ConsentFlowContractDiffValidator,
|
|
10634
|
+
reconsentDeadline: string().optional(),
|
|
10635
|
+
createdAt: string(),
|
|
10636
|
+
preview: ConsentFlowContractUpdatePreviewValidator
|
|
10637
|
+
}).optional()
|
|
10379
10638
|
});
|
|
10380
10639
|
var ConsentFlowContractRequestStatusValidator = _enum(["pending", "accepted", "denied", "cancelled"]).nullable();
|
|
10381
10640
|
var ConsentFlowContractRequestReadStatusValidator = _enum(["unseen", "seen"]).nullable();
|
|
@@ -10464,7 +10723,12 @@ PaginationResponseValidator.extend({
|
|
|
10464
10723
|
contract: ConsentFlowContractDetailsValidator,
|
|
10465
10724
|
uri: string(),
|
|
10466
10725
|
consenter: LCNProfileValidator,
|
|
10467
|
-
status: ConsentFlowTermsStatusValidator
|
|
10726
|
+
status: ConsentFlowTermsStatusValidator,
|
|
10727
|
+
consentedVersion: number().int().positive(),
|
|
10728
|
+
lastReviewedVersion: number().int().positive().optional(),
|
|
10729
|
+
reconsentDeadline: string().optional(),
|
|
10730
|
+
newOptionsUntil: string().optional(),
|
|
10731
|
+
cumulativeUpdate: ConsentFlowContractDetailsValidator.shape.latestUpdate
|
|
10468
10732
|
}).array()
|
|
10469
10733
|
});
|
|
10470
10734
|
var ConsentFlowGuardianApprovalValidator = object({
|
|
@@ -10540,7 +10804,8 @@ var ConsentFlowTransactionActionValidator = _enum([
|
|
|
10540
10804
|
"update",
|
|
10541
10805
|
"sync",
|
|
10542
10806
|
"withdraw",
|
|
10543
|
-
"write"
|
|
10807
|
+
"write",
|
|
10808
|
+
"reconsent"
|
|
10544
10809
|
]);
|
|
10545
10810
|
object({
|
|
10546
10811
|
terms: ConsentFlowTermsQueryValidator.optional(),
|
|
@@ -10559,8 +10824,12 @@ var ConsentFlowTransactionValidator = object({
|
|
|
10559
10824
|
referral: ConsentFlowReferralValidator.optional(),
|
|
10560
10825
|
id: string(),
|
|
10561
10826
|
action: ConsentFlowTransactionActionValidator,
|
|
10827
|
+
kind: ConsentFlowContractChangeKindValidator.optional(),
|
|
10562
10828
|
date: string(),
|
|
10563
|
-
uris: string().array().optional()
|
|
10829
|
+
uris: string().array().optional(),
|
|
10830
|
+
consentedVersion: number().int().positive().optional(),
|
|
10831
|
+
reconsentDeadline: string().optional(),
|
|
10832
|
+
newOptionsUntil: string().optional()
|
|
10564
10833
|
});
|
|
10565
10834
|
var HolderExportConsentRecordValidator = object({
|
|
10566
10835
|
termsUri: string(),
|
|
@@ -10568,6 +10837,10 @@ var HolderExportConsentRecordValidator = object({
|
|
|
10568
10837
|
contract: ConsentFlowContractDetailsValidator,
|
|
10569
10838
|
terms: ConsentFlowTermsValidator,
|
|
10570
10839
|
referral: ConsentFlowReferralValidator.optional(),
|
|
10840
|
+
consentedVersion: number().int().positive(),
|
|
10841
|
+
reconsentDeadline: string().optional(),
|
|
10842
|
+
newOptionsUntil: string().optional(),
|
|
10843
|
+
cumulativeUpdate: ConsentFlowContractDetailsValidator.shape.latestUpdate,
|
|
10571
10844
|
transactions: ConsentFlowTransactionValidator.array()
|
|
10572
10845
|
});
|
|
10573
10846
|
object({
|
|
@@ -10628,10 +10901,12 @@ var LCNNotificationTypeEnumValidator = _enum([
|
|
|
10628
10901
|
"GUARDIAN_APPROVED",
|
|
10629
10902
|
"GUARDIAN_REJECTED",
|
|
10630
10903
|
"APP_NOTIFICATION",
|
|
10904
|
+
"ANNOUNCEMENT",
|
|
10631
10905
|
"CREDENTIAL_REVOKED",
|
|
10632
10906
|
"CREDENTIAL_SUSPENDED",
|
|
10633
10907
|
"CREDENTIAL_UNSUSPENDED",
|
|
10634
|
-
"CREDENTIAL_REFRESHED"
|
|
10908
|
+
"CREDENTIAL_REFRESHED",
|
|
10909
|
+
"CONSENT_FLOW_CONTRACT_UPDATED"
|
|
10635
10910
|
]);
|
|
10636
10911
|
var LCNNotificationMessageValidator = object({
|
|
10637
10912
|
title: string().optional(),
|
|
@@ -10660,12 +10935,26 @@ var LCNNotificationInboxValidator = object({
|
|
|
10660
10935
|
timestamp: datetime().optional()
|
|
10661
10936
|
});
|
|
10662
10937
|
var LCNNotificationMetadataValidator = object({
|
|
10663
|
-
connectionPrompt: LCNConnectionPromptMetadataValidator.optional()
|
|
10938
|
+
connectionPrompt: LCNConnectionPromptMetadataValidator.optional(),
|
|
10939
|
+
campaignId: string().regex(/^[a-z0-9-]{3,64}$/).optional(),
|
|
10940
|
+
campaignCreatedAt: datetime().optional(),
|
|
10941
|
+
campaignHasInApp: boolean().optional(),
|
|
10942
|
+
campaignTestId: uuid().optional()
|
|
10664
10943
|
}).catchall(unknown());
|
|
10665
10944
|
var LCNNotificationDataValidator = object({
|
|
10666
10945
|
vcUris: array(string()).optional(),
|
|
10667
10946
|
vpUris: array(string()).optional(),
|
|
10668
10947
|
transaction: ConsentFlowTransactionValidator.optional(),
|
|
10948
|
+
contractUri: string().optional(),
|
|
10949
|
+
contractName: string().optional(),
|
|
10950
|
+
fromVersion: number().int().positive().optional(),
|
|
10951
|
+
toVersion: number().int().positive().optional(),
|
|
10952
|
+
kind: ConsentFlowContractChangeKindValidator.optional(),
|
|
10953
|
+
reason: string().optional(),
|
|
10954
|
+
diff: ConsentFlowContractDiffValidator.optional(),
|
|
10955
|
+
reconsentDeadline: string().optional(),
|
|
10956
|
+
reviewUrl: string().optional(),
|
|
10957
|
+
preview: ConsentFlowContractUpdatePreviewValidator.optional(),
|
|
10669
10958
|
inbox: LCNNotificationInboxValidator.optional(),
|
|
10670
10959
|
metadata: LCNNotificationMetadataValidator.optional()
|
|
10671
10960
|
}).loose();
|
|
@@ -11764,28 +12053,6 @@ object({
|
|
|
11764
12053
|
*/
|
|
11765
12054
|
wrongAttempts: number().int().nonnegative().optional()
|
|
11766
12055
|
});
|
|
11767
|
-
var BITSTRING_STATUS_PURPOSES = ["revocation", "suspension"];
|
|
11768
|
-
var BitstringStatusPurposeValidator = _enum(BITSTRING_STATUS_PURPOSES);
|
|
11769
|
-
var BitstringStatusListEntryValidator = object({
|
|
11770
|
-
id: string().optional(),
|
|
11771
|
-
type: literal("BitstringStatusListEntry"),
|
|
11772
|
-
statusPurpose: BitstringStatusPurposeValidator,
|
|
11773
|
-
statusListIndex: string().or(number().int().nonnegative()),
|
|
11774
|
-
statusListCredential: string()
|
|
11775
|
-
});
|
|
11776
|
-
BitstringStatusListEntryValidator.extend({
|
|
11777
|
-
id: string()
|
|
11778
|
-
});
|
|
11779
|
-
object({
|
|
11780
|
-
id: string().optional(),
|
|
11781
|
-
type: literal("BitstringStatusList"),
|
|
11782
|
-
statusPurpose: BitstringStatusPurposeValidator,
|
|
11783
|
-
encodedList: string()
|
|
11784
|
-
});
|
|
11785
|
-
object({
|
|
11786
|
-
statusPurposes: array(BitstringStatusPurposeValidator).optional(),
|
|
11787
|
-
listSize: number().int().positive().optional()
|
|
11788
|
-
}).default({});
|
|
11789
12056
|
var isSafeInAppMessagePath = /* @__PURE__ */ __name((path) => {
|
|
11790
12057
|
let decoded = path;
|
|
11791
12058
|
for (let depth = 0; depth < 5; depth += 1) {
|
|
@@ -12066,24 +12333,46 @@ object({
|
|
|
12066
12333
|
}).passthrough();
|
|
12067
12334
|
var CampaignIdValidator = string().regex(/^[a-z0-9-]{3,64}$/);
|
|
12068
12335
|
var CampaignStatusValidator = _enum(["draft", "live", "paused", "archived"]);
|
|
12069
|
-
var CampaignChannelValidator = _enum(["inApp", "notify"]);
|
|
12336
|
+
var CampaignChannelValidator = _enum(["inApp", "notify", "email"]);
|
|
12070
12337
|
_enum(["shown", "clicked", "dismissed", "converted"]);
|
|
12071
|
-
var timestamp = datetime({ offset: true }).overwrite((value) =>
|
|
12338
|
+
var timestamp = datetime({ offset: true }).overwrite((value) => {
|
|
12339
|
+
const date = new Date(value);
|
|
12340
|
+
return Number.isFinite(date.getTime()) ? date.toISOString() : value;
|
|
12341
|
+
});
|
|
12072
12342
|
var notification = object({ title: string().min(1), body: string().min(1) }).strict();
|
|
12073
|
-
var
|
|
12343
|
+
var CampaignEmailValidator = object({
|
|
12344
|
+
subject: string().trim().min(1).max(200).regex(/^[^\r\n]+$/),
|
|
12345
|
+
title: string().trim().min(1).max(200),
|
|
12346
|
+
body: string().trim().min(1).max(2e4),
|
|
12347
|
+
heroImageUrl: url().startsWith("https://").max(2048).optional(),
|
|
12348
|
+
ctaLabel: string().trim().min(1).max(100)
|
|
12349
|
+
}).strict();
|
|
12350
|
+
object({
|
|
12351
|
+
announcementEmailOptOut: boolean(),
|
|
12352
|
+
announcementPushOptOut: boolean()
|
|
12353
|
+
}).strict();
|
|
12354
|
+
var channels = array(CampaignChannelValidator).min(1).max(3).refine((values) => new Set(values).size === values.length, "Channels must be unique");
|
|
12074
12355
|
var campaignDefinition = object({
|
|
12075
12356
|
id: CampaignIdValidator,
|
|
12076
12357
|
name: string().trim().min(1).max(200),
|
|
12077
12358
|
status: CampaignStatusValidator.default("draft"),
|
|
12078
12359
|
channels,
|
|
12079
|
-
message: inAppMessageValidator,
|
|
12360
|
+
message: inAppMessageValidator.optional(),
|
|
12080
12361
|
notification: notification.optional(),
|
|
12362
|
+
email: CampaignEmailValidator.optional(),
|
|
12081
12363
|
startsAt: timestamp.optional(),
|
|
12082
12364
|
endsAt: timestamp.optional(),
|
|
12083
12365
|
excludeMinors: boolean().default(true),
|
|
12084
12366
|
selfEnroll: boolean().default(false)
|
|
12085
12367
|
}).strict();
|
|
12086
12368
|
var validDefinition = /* @__PURE__ */ __name((value, ctx) => {
|
|
12369
|
+
if (value.channels.includes("inApp") && !value.message) {
|
|
12370
|
+
ctx.addIssue({
|
|
12371
|
+
code: "custom",
|
|
12372
|
+
path: ["message"],
|
|
12373
|
+
message: "In-app requires a message"
|
|
12374
|
+
});
|
|
12375
|
+
}
|
|
12087
12376
|
if (value.channels.includes("notify") && !value.notification) {
|
|
12088
12377
|
ctx.addIssue({
|
|
12089
12378
|
code: "custom",
|
|
@@ -12091,15 +12380,23 @@ var validDefinition = /* @__PURE__ */ __name((value, ctx) => {
|
|
|
12091
12380
|
message: "Notify requires a title and body"
|
|
12092
12381
|
});
|
|
12093
12382
|
}
|
|
12383
|
+
if (value.channels.includes("email") && !value.email) {
|
|
12384
|
+
ctx.addIssue({
|
|
12385
|
+
code: "custom",
|
|
12386
|
+
path: ["email"],
|
|
12387
|
+
message: "Email requires announcement content"
|
|
12388
|
+
});
|
|
12389
|
+
}
|
|
12094
12390
|
if (value.startsAt && value.endsAt && value.startsAt >= value.endsAt) {
|
|
12095
12391
|
ctx.addIssue({ code: "custom", path: ["endsAt"], message: "End must be after start" });
|
|
12096
12392
|
}
|
|
12097
12393
|
}, "validDefinition");
|
|
12098
12394
|
var CampaignValidator = campaignDefinition.extend({
|
|
12395
|
+
tenantId: string().optional(),
|
|
12099
12396
|
createdAt: timestamp,
|
|
12100
12397
|
updatedAt: timestamp
|
|
12101
12398
|
}).superRefine(validDefinition).superRefine((value, ctx) => {
|
|
12102
|
-
if (value.message.id !== value.id) {
|
|
12399
|
+
if (value.message && value.message.id !== value.id) {
|
|
12103
12400
|
ctx.addIssue({
|
|
12104
12401
|
code: "custom",
|
|
12105
12402
|
path: ["message", "id"],
|
|
@@ -12108,21 +12405,23 @@ var CampaignValidator = campaignDefinition.extend({
|
|
|
12108
12405
|
}
|
|
12109
12406
|
});
|
|
12110
12407
|
campaignDefinition.extend({
|
|
12111
|
-
message: inAppMessageAuthoringValidator
|
|
12408
|
+
message: inAppMessageAuthoringValidator.optional()
|
|
12112
12409
|
}).superRefine(validDefinition);
|
|
12113
12410
|
var CampaignUpdatesValidator = campaignDefinition.omit({ id: true }).partial().extend({
|
|
12114
12411
|
// A PATCH must not apply creation defaults to fields the caller omitted.
|
|
12115
12412
|
status: CampaignStatusValidator.optional(),
|
|
12116
12413
|
excludeMinors: boolean().optional(),
|
|
12117
12414
|
selfEnroll: boolean().optional(),
|
|
12118
|
-
message: inAppMessageAuthoringValidator.optional(),
|
|
12415
|
+
message: inAppMessageAuthoringValidator.nullable().optional(),
|
|
12119
12416
|
notification: notification.nullable().optional(),
|
|
12417
|
+
email: CampaignEmailValidator.nullable().optional(),
|
|
12120
12418
|
startsAt: timestamp.nullable().optional(),
|
|
12121
12419
|
endsAt: timestamp.nullable().optional()
|
|
12122
12420
|
}).strict();
|
|
12123
12421
|
object({
|
|
12124
12422
|
campaignId: CampaignIdValidator,
|
|
12125
|
-
updates: CampaignUpdatesValidator
|
|
12423
|
+
updates: CampaignUpdatesValidator,
|
|
12424
|
+
expectedUpdatedAt: timestamp.optional()
|
|
12126
12425
|
}).strict();
|
|
12127
12426
|
var identifier = string().trim().min(1).max(2048);
|
|
12128
12427
|
var metadataKey = string().regex(/^[a-zA-Z_][a-zA-Z0-9_.-]{0,63}$/).refine(
|
|
@@ -12174,7 +12473,8 @@ var CampaignUserStateValidator = object({
|
|
|
12174
12473
|
clickedAt: timestamp.optional(),
|
|
12175
12474
|
dismissedAt: timestamp.optional(),
|
|
12176
12475
|
convertedAt: timestamp.optional(),
|
|
12177
|
-
notifiedAt: timestamp.optional()
|
|
12476
|
+
notifiedAt: timestamp.optional(),
|
|
12477
|
+
emailedAt: timestamp.optional()
|
|
12178
12478
|
});
|
|
12179
12479
|
object({
|
|
12180
12480
|
campaign: campaignDefinition.pick({
|
|
@@ -12183,12 +12483,19 @@ object({
|
|
|
12183
12483
|
startsAt: true,
|
|
12184
12484
|
endsAt: true,
|
|
12185
12485
|
selfEnroll: true
|
|
12186
|
-
}),
|
|
12187
|
-
state: CampaignUserStateValidator
|
|
12486
|
+
}).extend({ message: inAppMessageValidator }),
|
|
12487
|
+
state: CampaignUserStateValidator,
|
|
12488
|
+
testId: uuid().optional()
|
|
12489
|
+
});
|
|
12490
|
+
object({
|
|
12491
|
+
id: uuid(),
|
|
12492
|
+
campaignId: CampaignIdValidator,
|
|
12493
|
+
message: inAppMessageValidator
|
|
12188
12494
|
});
|
|
12189
12495
|
object({
|
|
12190
12496
|
audience: number().int().nonnegative(),
|
|
12191
12497
|
notified: number().int().nonnegative(),
|
|
12498
|
+
emailed: number().int().nonnegative(),
|
|
12192
12499
|
shown: number().int().nonnegative(),
|
|
12193
12500
|
clicked: number().int().nonnegative(),
|
|
12194
12501
|
dismissed: number().int().nonnegative(),
|
|
@@ -12215,6 +12522,31 @@ object({
|
|
|
12215
12522
|
hasMore: boolean(),
|
|
12216
12523
|
cursor: string().optional()
|
|
12217
12524
|
});
|
|
12525
|
+
var CampaignDispatchPreviewValidator = object({
|
|
12526
|
+
campaignId: CampaignIdValidator,
|
|
12527
|
+
audienceCount: number().int().nonnegative(),
|
|
12528
|
+
alreadyNotifiedCount: number().int().nonnegative(),
|
|
12529
|
+
recipientCount: number().int().nonnegative(),
|
|
12530
|
+
notificationRecipientCount: number().int().nonnegative().optional(),
|
|
12531
|
+
emailRecipientCount: number().int().nonnegative().optional(),
|
|
12532
|
+
previewToken: string().regex(/^[a-f0-9]{64}$/),
|
|
12533
|
+
blockedReason: _enum([
|
|
12534
|
+
"not_live",
|
|
12535
|
+
"notify_disabled",
|
|
12536
|
+
"email_confirmation_required",
|
|
12537
|
+
"not_started",
|
|
12538
|
+
"ended",
|
|
12539
|
+
"no_recipients"
|
|
12540
|
+
]).optional()
|
|
12541
|
+
});
|
|
12542
|
+
object({
|
|
12543
|
+
expectedPreviewToken: CampaignDispatchPreviewValidator.shape.previewToken.optional()
|
|
12544
|
+
}).strict();
|
|
12545
|
+
object({
|
|
12546
|
+
count: number().int().nonnegative(),
|
|
12547
|
+
added: number().int().nonnegative(),
|
|
12548
|
+
notFound: array(string())
|
|
12549
|
+
});
|
|
12218
12550
|
var SHARE_LINK_ID_BYTES = 16;
|
|
12219
12551
|
var SHARE_CONTENT_KEY_BYTES = 32;
|
|
12220
12552
|
var SHARE_IV_BYTES = 12;
|
|
@@ -12741,6 +13073,217 @@ var SkillIconNamesValidator = array(string().nonempty()).min(1).max(SKILL_ICON_M
|
|
|
12741
13073
|
}
|
|
12742
13074
|
);
|
|
12743
13075
|
object({ names: SkillIconNamesValidator });
|
|
13076
|
+
var RoleValidator = _enum(["user", "assistant", "tool", "system"]);
|
|
13077
|
+
var AiSessionMode = {
|
|
13078
|
+
tutor: "ai-tutor",
|
|
13079
|
+
insights: "ai-insights"
|
|
13080
|
+
};
|
|
13081
|
+
var AiSessionModeValidator = _enum([AiSessionMode.tutor, AiSessionMode.insights]);
|
|
13082
|
+
object({
|
|
13083
|
+
notes: string().optional(),
|
|
13084
|
+
questions: array(string())
|
|
13085
|
+
});
|
|
13086
|
+
var IntroStreamModeValidator = _enum(["formatted", "structured"]);
|
|
13087
|
+
var ChatMessageValidator = object({
|
|
13088
|
+
role: RoleValidator,
|
|
13089
|
+
content: string().nullable(),
|
|
13090
|
+
tool_call_id: string().optional(),
|
|
13091
|
+
tool_calls: array(
|
|
13092
|
+
object({
|
|
13093
|
+
id: string(),
|
|
13094
|
+
type: literal("function"),
|
|
13095
|
+
function: object({
|
|
13096
|
+
name: string(),
|
|
13097
|
+
arguments: string()
|
|
13098
|
+
})
|
|
13099
|
+
})
|
|
13100
|
+
).optional()
|
|
13101
|
+
});
|
|
13102
|
+
var InsightArtifactValidator = object({
|
|
13103
|
+
title: string(),
|
|
13104
|
+
summary: string(),
|
|
13105
|
+
category: string(),
|
|
13106
|
+
question: string(),
|
|
13107
|
+
narrative: string()
|
|
13108
|
+
});
|
|
13109
|
+
var ArtifactSuggestionValidator = object({
|
|
13110
|
+
artifact: InsightArtifactValidator,
|
|
13111
|
+
source_text: string().optional(),
|
|
13112
|
+
created_at: string()
|
|
13113
|
+
});
|
|
13114
|
+
var ThreadCredentialContextValidator = object({
|
|
13115
|
+
uri: string(),
|
|
13116
|
+
type: string(),
|
|
13117
|
+
context: string(),
|
|
13118
|
+
score: number(),
|
|
13119
|
+
strongestScore: number().optional(),
|
|
13120
|
+
averageScore: number().optional(),
|
|
13121
|
+
matchCount: number().optional(),
|
|
13122
|
+
title: string().optional()
|
|
13123
|
+
});
|
|
13124
|
+
object({
|
|
13125
|
+
id: string(),
|
|
13126
|
+
did: string(),
|
|
13127
|
+
topicCredentialUri: string().nullable().optional(),
|
|
13128
|
+
title: string(),
|
|
13129
|
+
created_at: string(),
|
|
13130
|
+
last_message_at: string(),
|
|
13131
|
+
active: boolean().optional(),
|
|
13132
|
+
ended_at: string().optional(),
|
|
13133
|
+
plan_started_at: string().optional(),
|
|
13134
|
+
summaries: array(
|
|
13135
|
+
object({
|
|
13136
|
+
summary_data: string(),
|
|
13137
|
+
credential_uri: string(),
|
|
13138
|
+
created_at: string()
|
|
13139
|
+
})
|
|
13140
|
+
).optional(),
|
|
13141
|
+
plans: array(
|
|
13142
|
+
object({
|
|
13143
|
+
plan_data: string(),
|
|
13144
|
+
created_at: string(),
|
|
13145
|
+
consentRevision: string().optional()
|
|
13146
|
+
})
|
|
13147
|
+
).optional(),
|
|
13148
|
+
credentials: array(ThreadCredentialContextValidator).optional(),
|
|
13149
|
+
credentialSearchTopic: string().optional(),
|
|
13150
|
+
credentialContextStatus: _enum(["pending", "ready", "empty", "error"]).optional(),
|
|
13151
|
+
mode: AiSessionModeValidator.optional(),
|
|
13152
|
+
artifactSuggestions: array(ArtifactSuggestionValidator).optional()
|
|
13153
|
+
});
|
|
13154
|
+
var CredentialVerificationMetadataValidator = object({
|
|
13155
|
+
credentialUri: string(),
|
|
13156
|
+
contentHash: string().regex(/^[a-f0-9]{64}$/),
|
|
13157
|
+
status: _enum(["valid", "invalid"]),
|
|
13158
|
+
checkedAt: string().datetime(),
|
|
13159
|
+
verifier: object({
|
|
13160
|
+
name: string(),
|
|
13161
|
+
version: string()
|
|
13162
|
+
}),
|
|
13163
|
+
verifiedPayload: _enum(["credential", "boostCredential"]),
|
|
13164
|
+
checks: array(string()),
|
|
13165
|
+
errors: array(string()),
|
|
13166
|
+
warnings: array(string()),
|
|
13167
|
+
provenance: object({
|
|
13168
|
+
source: _enum(["wallet", "generated"]),
|
|
13169
|
+
retrievedAt: string().datetime()
|
|
13170
|
+
}),
|
|
13171
|
+
consent: object({
|
|
13172
|
+
contractUri: string(),
|
|
13173
|
+
receiptId: string().min(1),
|
|
13174
|
+
grantedAt: string().datetime().optional(),
|
|
13175
|
+
updatedAt: string().datetime(),
|
|
13176
|
+
contractUpdatedAt: string().min(1),
|
|
13177
|
+
status: literal("live"),
|
|
13178
|
+
expiresAt: string().datetime().optional(),
|
|
13179
|
+
contractExpiresAt: string().datetime().optional(),
|
|
13180
|
+
categories: array(string()),
|
|
13181
|
+
credentialUris: array(string()),
|
|
13182
|
+
personalFields: array(string()),
|
|
13183
|
+
purpose: _enum(["credential-ingestion", "model-inference", "embedding"]),
|
|
13184
|
+
revision: string().min(1),
|
|
13185
|
+
guardian: object({ required: boolean(), approved: boolean() })
|
|
13186
|
+
})
|
|
13187
|
+
});
|
|
13188
|
+
var ModelSafeCredentialFactValidator = object({
|
|
13189
|
+
kind: _enum([
|
|
13190
|
+
"skill",
|
|
13191
|
+
"goal",
|
|
13192
|
+
"achievement",
|
|
13193
|
+
"course",
|
|
13194
|
+
"experience",
|
|
13195
|
+
"competency",
|
|
13196
|
+
"title",
|
|
13197
|
+
"summary",
|
|
13198
|
+
"assessment",
|
|
13199
|
+
"grade",
|
|
13200
|
+
"date",
|
|
13201
|
+
"alignment",
|
|
13202
|
+
"criteria",
|
|
13203
|
+
"pathway",
|
|
13204
|
+
"topic"
|
|
13205
|
+
]),
|
|
13206
|
+
value: string().min(1).max(240),
|
|
13207
|
+
label: string().min(1).max(120).optional()
|
|
13208
|
+
});
|
|
13209
|
+
var ModelSafeCredentialProjectionValidator = object({
|
|
13210
|
+
schemaVersion: literal("1"),
|
|
13211
|
+
category: string().min(1).max(120),
|
|
13212
|
+
credentialTypes: array(string().min(1).max(120)).max(20),
|
|
13213
|
+
facts: array(ModelSafeCredentialFactValidator).max(100),
|
|
13214
|
+
// Present only on credentials that are past their expiry, so the model can
|
|
13215
|
+
// tell a lapsed credential from a current one.
|
|
13216
|
+
expired: literal(true).optional(),
|
|
13217
|
+
expirationDate: string().datetime().optional()
|
|
13218
|
+
});
|
|
13219
|
+
object({
|
|
13220
|
+
id: string(),
|
|
13221
|
+
uri: string(),
|
|
13222
|
+
category: string(),
|
|
13223
|
+
credential: VCValidator,
|
|
13224
|
+
aiContext: string(),
|
|
13225
|
+
generalSummary: string().optional(),
|
|
13226
|
+
createdAt: string(),
|
|
13227
|
+
verification: CredentialVerificationMetadataValidator.optional(),
|
|
13228
|
+
projection: ModelSafeCredentialProjectionValidator.optional()
|
|
13229
|
+
});
|
|
13230
|
+
object({
|
|
13231
|
+
message: ChatMessageValidator.optional(),
|
|
13232
|
+
threadId: string().optional(),
|
|
13233
|
+
selectedQuestion: string().optional(),
|
|
13234
|
+
action: _enum([
|
|
13235
|
+
"start_topic",
|
|
13236
|
+
"continue_plan",
|
|
13237
|
+
"start_topic_uri",
|
|
13238
|
+
"start_learning_pathway",
|
|
13239
|
+
"start_insights_session",
|
|
13240
|
+
"close_insights_session",
|
|
13241
|
+
"artifact_suggestion"
|
|
13242
|
+
]).optional(),
|
|
13243
|
+
topic: string().optional(),
|
|
13244
|
+
topicUri: string().optional(),
|
|
13245
|
+
pathwayUri: string().optional(),
|
|
13246
|
+
mode: AiSessionModeValidator.optional(),
|
|
13247
|
+
introStreamMode: IntroStreamModeValidator.optional(),
|
|
13248
|
+
// BCP-47 language for AI responses (LC-1901). This has to live on the
|
|
13249
|
+
// validator, not just the inferred type — z.object strips unknown keys, so an
|
|
13250
|
+
// undeclared `locale` would be dropped before the WS handler ever saw it.
|
|
13251
|
+
locale: string().nullish()
|
|
13252
|
+
});
|
|
13253
|
+
object({
|
|
13254
|
+
operation: string(),
|
|
13255
|
+
collection: string(),
|
|
13256
|
+
input: unknown().optional(),
|
|
13257
|
+
output: unknown().optional(),
|
|
13258
|
+
timestamp: string(),
|
|
13259
|
+
duration: number().optional()
|
|
13260
|
+
});
|
|
13261
|
+
object({
|
|
13262
|
+
event: literal("timing"),
|
|
13263
|
+
operation: string(),
|
|
13264
|
+
phase: _enum(["start", "end", "complete"]),
|
|
13265
|
+
duration: number().optional(),
|
|
13266
|
+
metadata: record(string(), unknown()).optional(),
|
|
13267
|
+
timestamp: string()
|
|
13268
|
+
});
|
|
13269
|
+
object({
|
|
13270
|
+
id: string(),
|
|
13271
|
+
learningPathway: object({
|
|
13272
|
+
stepIndex: number(),
|
|
13273
|
+
step: object({
|
|
13274
|
+
title: string(),
|
|
13275
|
+
description: string(),
|
|
13276
|
+
summary: string(),
|
|
13277
|
+
learned: array(string()),
|
|
13278
|
+
skills: array(
|
|
13279
|
+
object({
|
|
13280
|
+
title: string(),
|
|
13281
|
+
description: string()
|
|
13282
|
+
})
|
|
13283
|
+
)
|
|
13284
|
+
})
|
|
13285
|
+
})
|
|
13286
|
+
});
|
|
12744
13287
|
|
|
12745
13288
|
export { VerificationStatusEnum as V };
|
|
12746
|
-
//# sourceMappingURL=types.esm-
|
|
13289
|
+
//# sourceMappingURL=types.esm-b1fb8920.js.map
|