@learncard/types 5.21.0 → 5.22.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/auth.d.ts +216 -5
- package/dist/auth.d.ts.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/lcn.d.ts +6 -6
- package/dist/share-links.d.ts +1846 -0
- package/dist/share-links.d.ts.map +1 -0
- package/dist/types.cjs.development.cjs +523 -0
- package/dist/types.cjs.development.cjs.map +4 -4
- package/dist/types.cjs.production.min.cjs +22 -22
- package/dist/types.cjs.production.min.cjs.map +4 -4
- package/dist/types.esm.js +591 -66
- package/dist/types.esm.js.map +4 -4
- package/package.json +1 -1
- package/src/auth.ts +225 -4
- package/src/index.ts +1 -0
- package/src/share-links.ts +856 -0
package/dist/types.esm.js
CHANGED
|
@@ -2406,6 +2406,7 @@ var CredentialActivityStatsValidator = z12.object({
|
|
|
2406
2406
|
});
|
|
2407
2407
|
|
|
2408
2408
|
// src/auth.ts
|
|
2409
|
+
import { z as z13 } from "zod";
|
|
2409
2410
|
var AuthSessionError = class extends Error {
|
|
2410
2411
|
constructor(message, reason) {
|
|
2411
2412
|
super(message);
|
|
@@ -2416,126 +2417,591 @@ var AuthSessionError = class extends Error {
|
|
|
2416
2417
|
__name(this, "AuthSessionError");
|
|
2417
2418
|
}
|
|
2418
2419
|
};
|
|
2420
|
+
var ESCROW_PIN_LOCKED_MESSAGE = "Too many incorrect PIN attempts. You can still recover by waiting.";
|
|
2421
|
+
var ESCROW_PIN_UNAVAILABLE_MESSAGE = "PIN recovery is not available for this account.";
|
|
2422
|
+
var ESCROW_PIN_MISMATCH_PATTERN = /^Incorrect PIN\. (\d+) attempts left\.$/;
|
|
2423
|
+
var escrowPinMismatchMessage = /* @__PURE__ */ __name((attemptsRemaining) => `Incorrect PIN. ${attemptsRemaining} attempts left.`, "escrowPinMismatchMessage");
|
|
2424
|
+
var EscrowPinStatusValidator = z13.object({
|
|
2425
|
+
state: z13.enum(["none", "enabled", "locked", "stale"]),
|
|
2426
|
+
enabled: z13.boolean(),
|
|
2427
|
+
attemptsRemaining: z13.number().int().nonnegative(),
|
|
2428
|
+
salt: z13.string().optional()
|
|
2429
|
+
});
|
|
2419
2430
|
|
|
2420
2431
|
// src/bitstring-status-list.ts
|
|
2421
|
-
import { z as
|
|
2432
|
+
import { z as z14 } from "zod/v4";
|
|
2422
2433
|
var BITSTRING_STATUS_PURPOSES = ["revocation", "suspension"];
|
|
2423
2434
|
var DEFAULT_BITSTRING_STATUS_LIST_SIZE = 131072;
|
|
2424
|
-
var BitstringStatusPurposeValidator =
|
|
2425
|
-
var BitstringStatusListEntryValidator =
|
|
2426
|
-
id:
|
|
2427
|
-
type:
|
|
2435
|
+
var BitstringStatusPurposeValidator = z14.enum(BITSTRING_STATUS_PURPOSES);
|
|
2436
|
+
var BitstringStatusListEntryValidator = z14.object({
|
|
2437
|
+
id: z14.string().optional(),
|
|
2438
|
+
type: z14.literal("BitstringStatusListEntry"),
|
|
2428
2439
|
statusPurpose: BitstringStatusPurposeValidator,
|
|
2429
|
-
statusListIndex:
|
|
2430
|
-
statusListCredential:
|
|
2440
|
+
statusListIndex: z14.string().or(z14.number().int().nonnegative()),
|
|
2441
|
+
statusListCredential: z14.string()
|
|
2431
2442
|
});
|
|
2432
2443
|
var AllocatedBitstringStatusListEntryValidator = BitstringStatusListEntryValidator.extend({
|
|
2433
|
-
id:
|
|
2444
|
+
id: z14.string()
|
|
2434
2445
|
});
|
|
2435
|
-
var BitstringStatusListCredentialSubjectValidator =
|
|
2436
|
-
id:
|
|
2437
|
-
type:
|
|
2446
|
+
var BitstringStatusListCredentialSubjectValidator = z14.object({
|
|
2447
|
+
id: z14.string().optional(),
|
|
2448
|
+
type: z14.literal("BitstringStatusList"),
|
|
2438
2449
|
statusPurpose: BitstringStatusPurposeValidator,
|
|
2439
|
-
encodedList:
|
|
2450
|
+
encodedList: z14.string()
|
|
2440
2451
|
});
|
|
2441
|
-
var AllocateCredentialStatusInputValidator =
|
|
2442
|
-
statusPurposes:
|
|
2443
|
-
listSize:
|
|
2452
|
+
var AllocateCredentialStatusInputValidator = z14.object({
|
|
2453
|
+
statusPurposes: z14.array(BitstringStatusPurposeValidator).optional(),
|
|
2454
|
+
listSize: z14.number().int().positive().optional()
|
|
2444
2455
|
}).default({});
|
|
2445
2456
|
|
|
2446
2457
|
// src/inAppMessages.ts
|
|
2447
|
-
import { z as
|
|
2448
|
-
var inAppMessagePlatformValidator =
|
|
2449
|
-
var inAppMessageVersionSourceValidator =
|
|
2450
|
-
var inAppMessageVersionOpValidator =
|
|
2451
|
-
var platformPredicateValidator =
|
|
2452
|
-
var rolePredicateValidator =
|
|
2453
|
-
var versionPredicateValidator =
|
|
2454
|
-
version:
|
|
2458
|
+
import { z as z15 } from "zod";
|
|
2459
|
+
var inAppMessagePlatformValidator = z15.enum(["ios", "android", "web"]);
|
|
2460
|
+
var inAppMessageVersionSourceValidator = z15.enum(["native", "web", "capgo"]);
|
|
2461
|
+
var inAppMessageVersionOpValidator = z15.enum(["lt", "lte", "eq", "gte", "gt"]);
|
|
2462
|
+
var platformPredicateValidator = z15.object({ platform: z15.array(inAppMessagePlatformValidator).nonempty() }).strict();
|
|
2463
|
+
var rolePredicateValidator = z15.object({ role: z15.array(z15.string()).nonempty() }).strict();
|
|
2464
|
+
var versionPredicateValidator = z15.object({
|
|
2465
|
+
version: z15.object({
|
|
2455
2466
|
source: inAppMessageVersionSourceValidator,
|
|
2456
2467
|
op: inAppMessageVersionOpValidator,
|
|
2457
|
-
value:
|
|
2468
|
+
value: z15.string()
|
|
2458
2469
|
}).strict()
|
|
2459
2470
|
}).strict();
|
|
2460
|
-
var inAppMessagePredicateValidator =
|
|
2461
|
-
() =>
|
|
2471
|
+
var inAppMessagePredicateValidator = z15.lazy(
|
|
2472
|
+
() => z15.union([
|
|
2462
2473
|
platformPredicateValidator,
|
|
2463
2474
|
rolePredicateValidator,
|
|
2464
2475
|
versionPredicateValidator,
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2476
|
+
z15.object({ all: z15.array(inAppMessagePredicateValidator) }).strict(),
|
|
2477
|
+
z15.object({ any: z15.array(inAppMessagePredicateValidator) }).strict(),
|
|
2478
|
+
z15.object({ not: inAppMessagePredicateValidator }).strict()
|
|
2468
2479
|
])
|
|
2469
2480
|
);
|
|
2470
|
-
var inAppMessageActionStyleValidator =
|
|
2471
|
-
var internalLinkActionValidator =
|
|
2472
|
-
var externalLinkActionValidator =
|
|
2473
|
-
var appStoreActionValidator =
|
|
2474
|
-
type:
|
|
2475
|
-
iosUrl:
|
|
2476
|
-
androidUrl:
|
|
2477
|
-
webUrl:
|
|
2481
|
+
var inAppMessageActionStyleValidator = z15.enum(["primary", "secondary", "positive", "dismiss"]).default("secondary");
|
|
2482
|
+
var internalLinkActionValidator = z15.object({ type: z15.literal("internalLink"), path: z15.string() }).passthrough();
|
|
2483
|
+
var externalLinkActionValidator = z15.object({ type: z15.literal("externalLink"), url: z15.string() }).passthrough();
|
|
2484
|
+
var appStoreActionValidator = z15.object({
|
|
2485
|
+
type: z15.literal("appStore"),
|
|
2486
|
+
iosUrl: z15.string().optional(),
|
|
2487
|
+
androidUrl: z15.string().optional(),
|
|
2488
|
+
webUrl: z15.string().optional()
|
|
2478
2489
|
}).passthrough();
|
|
2479
|
-
var capgoUpdateActionValidator =
|
|
2480
|
-
var dismissActionValidator =
|
|
2481
|
-
var inAppMessageActionTargetValidator =
|
|
2490
|
+
var capgoUpdateActionValidator = z15.object({ type: z15.literal("capgoUpdate") }).passthrough();
|
|
2491
|
+
var dismissActionValidator = z15.object({ type: z15.literal("dismiss") }).passthrough();
|
|
2492
|
+
var inAppMessageActionTargetValidator = z15.union([
|
|
2482
2493
|
internalLinkActionValidator,
|
|
2483
2494
|
externalLinkActionValidator,
|
|
2484
2495
|
appStoreActionValidator,
|
|
2485
2496
|
capgoUpdateActionValidator,
|
|
2486
2497
|
dismissActionValidator
|
|
2487
2498
|
]);
|
|
2488
|
-
var inAppMessageActionValidator =
|
|
2489
|
-
label:
|
|
2499
|
+
var inAppMessageActionValidator = z15.object({
|
|
2500
|
+
label: z15.string(),
|
|
2490
2501
|
style: inAppMessageActionStyleValidator,
|
|
2491
2502
|
action: inAppMessageActionTargetValidator,
|
|
2492
2503
|
/** When true, the message closes after this action runs (default true). */
|
|
2493
|
-
closeOnComplete:
|
|
2504
|
+
closeOnComplete: z15.boolean().default(true)
|
|
2494
2505
|
}).passthrough();
|
|
2495
|
-
var inAppMessageMediaValidator =
|
|
2496
|
-
type:
|
|
2497
|
-
url:
|
|
2506
|
+
var inAppMessageMediaValidator = z15.object({
|
|
2507
|
+
type: z15.enum(["youtube", "image", "gif"]),
|
|
2508
|
+
url: z15.string(),
|
|
2498
2509
|
/** Aspect ratio hint, e.g. "16:9" or "1:1". Defaults to 16:9. */
|
|
2499
|
-
aspect:
|
|
2510
|
+
aspect: z15.string().default("16:9"),
|
|
2500
2511
|
/** Alt text for images/gifs (accessibility). */
|
|
2501
|
-
alt:
|
|
2512
|
+
alt: z15.string().optional()
|
|
2502
2513
|
}).passthrough();
|
|
2503
|
-
var inAppMessageFrequencyValidator =
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2514
|
+
var inAppMessageFrequencyValidator = z15.union([
|
|
2515
|
+
z15.literal("once"),
|
|
2516
|
+
z15.literal("session"),
|
|
2517
|
+
z15.literal("always"),
|
|
2518
|
+
z15.object({ everyDays: z15.number().positive() }).strict()
|
|
2508
2519
|
]).default("once");
|
|
2509
|
-
var inAppMessagePresentationValidator =
|
|
2510
|
-
var inAppMessageValidator =
|
|
2520
|
+
var inAppMessagePresentationValidator = z15.enum(["modal", "banner", "toast"]).default("modal");
|
|
2521
|
+
var inAppMessageValidator = z15.object({
|
|
2511
2522
|
/** Stable identifier — used to persist dismissal / frequency state. */
|
|
2512
|
-
id:
|
|
2523
|
+
id: z15.string(),
|
|
2513
2524
|
/** Higher priority wins when multiple messages match. Default 0. */
|
|
2514
|
-
priority:
|
|
2525
|
+
priority: z15.number().default(0),
|
|
2515
2526
|
/** When false, the message is required/blocking (no dismiss affordance). */
|
|
2516
|
-
dismissible:
|
|
2527
|
+
dismissible: z15.boolean().default(true),
|
|
2517
2528
|
frequency: inAppMessageFrequencyValidator,
|
|
2518
2529
|
presentation: inAppMessagePresentationValidator,
|
|
2519
2530
|
media: inAppMessageMediaValidator.optional(),
|
|
2520
2531
|
/** Optional emoji hero glyph — rendered only when `media` is not set. */
|
|
2521
|
-
emoji:
|
|
2522
|
-
title:
|
|
2523
|
-
body:
|
|
2524
|
-
actions:
|
|
2532
|
+
emoji: z15.string().optional(),
|
|
2533
|
+
title: z15.string(),
|
|
2534
|
+
body: z15.string().optional(),
|
|
2535
|
+
actions: z15.array(inAppMessageActionValidator).default([]),
|
|
2525
2536
|
/** Targeting predicate tree. Omitted → matches everyone. */
|
|
2526
2537
|
targeting: inAppMessagePredicateValidator.optional(),
|
|
2527
2538
|
/** Allow disabling a message without removing it from the flag. */
|
|
2528
|
-
enabled:
|
|
2539
|
+
enabled: z15.boolean().default(true)
|
|
2529
2540
|
}).passthrough();
|
|
2530
|
-
var inAppMessagesFlagValidator =
|
|
2531
|
-
version:
|
|
2532
|
-
messages:
|
|
2541
|
+
var inAppMessagesFlagValidator = z15.object({
|
|
2542
|
+
version: z15.number().default(1),
|
|
2543
|
+
messages: z15.array(inAppMessageValidator).default([])
|
|
2533
2544
|
}).passthrough();
|
|
2534
2545
|
var EMPTY_IN_APP_MESSAGES_FLAG = { version: 1, messages: [] };
|
|
2535
2546
|
var parseInAppMessagesFlag = /* @__PURE__ */ __name((raw) => {
|
|
2536
2547
|
const result = inAppMessagesFlagValidator.safeParse(raw);
|
|
2537
2548
|
return result.success ? result.data : EMPTY_IN_APP_MESSAGES_FLAG;
|
|
2538
2549
|
}, "parseInAppMessagesFlag");
|
|
2550
|
+
|
|
2551
|
+
// src/share-links.ts
|
|
2552
|
+
import { z as z16 } from "zod/v4";
|
|
2553
|
+
var SHARE_LINK_ID_BYTES = 16;
|
|
2554
|
+
var SHARE_CONTENT_KEY_BYTES = 32;
|
|
2555
|
+
var SHARE_IV_BYTES = 12;
|
|
2556
|
+
var SHARE_TAG_BYTES = 16;
|
|
2557
|
+
var MAX_SHARE_CIPHERTEXT_BYTES = 512 * 1024;
|
|
2558
|
+
var MAX_SHARE_RECOVERY_JWE_BYTES = 64 * 1024;
|
|
2559
|
+
var MAX_SELECTED_CREDENTIALS = 50;
|
|
2560
|
+
var MAX_ENDORSEMENTS = 200;
|
|
2561
|
+
var MAX_VP_MEMBERS = MAX_SELECTED_CREDENTIALS + MAX_ENDORSEMENTS;
|
|
2562
|
+
var MAX_SHARE_SOURCE_URI_CHARS = 2048;
|
|
2563
|
+
var MAX_SHARE_LINK_REQUEST_BYTES = 1024 * 1024;
|
|
2564
|
+
var SHARE_LINK_PROTOCOL = "lc-share/v1";
|
|
2565
|
+
var SHARE_RECOVERY_PROTOCOL = "lc-share-recovery/v1";
|
|
2566
|
+
var SHARE_AAD_PREFIX = "lc-share:v1";
|
|
2567
|
+
var BASE64URL_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
2568
|
+
var BASE64URL_LOOKUP = (() => {
|
|
2569
|
+
const table = new Int16Array(128).fill(-1);
|
|
2570
|
+
for (let index = 0; index < BASE64URL_ALPHABET.length; index += 1) {
|
|
2571
|
+
table[BASE64URL_ALPHABET.charCodeAt(index)] = index;
|
|
2572
|
+
}
|
|
2573
|
+
return table;
|
|
2574
|
+
})();
|
|
2575
|
+
var encodeBase64Url = /* @__PURE__ */ __name((bytes) => {
|
|
2576
|
+
let output = "";
|
|
2577
|
+
for (let index = 0; index < bytes.length; index += 3) {
|
|
2578
|
+
const first = bytes[index];
|
|
2579
|
+
const second = bytes[index + 1];
|
|
2580
|
+
const third = bytes[index + 2];
|
|
2581
|
+
output += BASE64URL_ALPHABET[first >> 2];
|
|
2582
|
+
output += BASE64URL_ALPHABET[(first & 3) << 4 | (second ?? 0) >> 4];
|
|
2583
|
+
if (second === void 0) break;
|
|
2584
|
+
output += BASE64URL_ALPHABET[(second & 15) << 2 | (third ?? 0) >> 6];
|
|
2585
|
+
if (third === void 0) break;
|
|
2586
|
+
output += BASE64URL_ALPHABET[third & 63];
|
|
2587
|
+
}
|
|
2588
|
+
return output;
|
|
2589
|
+
}, "encodeBase64Url");
|
|
2590
|
+
var decodeBase64Url = /* @__PURE__ */ __name((value) => {
|
|
2591
|
+
if (typeof value !== "string") return null;
|
|
2592
|
+
const output = new Uint8Array(Math.floor(value.length * 6 / 8));
|
|
2593
|
+
let bits = 0;
|
|
2594
|
+
let bitCount = 0;
|
|
2595
|
+
let outputIndex = 0;
|
|
2596
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
2597
|
+
const code = value.charCodeAt(index);
|
|
2598
|
+
const digit = code < 128 ? BASE64URL_LOOKUP[code] : -1;
|
|
2599
|
+
if (digit < 0) return null;
|
|
2600
|
+
bits = bits << 6 | digit;
|
|
2601
|
+
bitCount += 6;
|
|
2602
|
+
if (bitCount >= 8) {
|
|
2603
|
+
bitCount -= 8;
|
|
2604
|
+
output[outputIndex] = bits >> bitCount & 255;
|
|
2605
|
+
outputIndex += 1;
|
|
2606
|
+
}
|
|
2607
|
+
}
|
|
2608
|
+
return output;
|
|
2609
|
+
}, "decodeBase64Url");
|
|
2610
|
+
var isCanonicalBase64Url = /* @__PURE__ */ __name((value, expectedBytes) => {
|
|
2611
|
+
if (typeof value !== "string") return false;
|
|
2612
|
+
if (expectedBytes !== void 0 && value.length !== Math.ceil(expectedBytes * 4 / 3))
|
|
2613
|
+
return false;
|
|
2614
|
+
const decoded = decodeBase64Url(value);
|
|
2615
|
+
if (decoded === null) return false;
|
|
2616
|
+
if (expectedBytes !== void 0 && decoded.length !== expectedBytes) return false;
|
|
2617
|
+
return encodeBase64Url(decoded) === value;
|
|
2618
|
+
}, "isCanonicalBase64Url");
|
|
2619
|
+
var decodedBase64UrlByteLength = /* @__PURE__ */ __name((value) => decodeBase64Url(value)?.length ?? null, "decodedBase64UrlByteLength");
|
|
2620
|
+
var utf8ByteLength = /* @__PURE__ */ __name((value) => new TextEncoder().encode(value).length, "utf8ByteLength");
|
|
2621
|
+
var canonicalBase64Url = /* @__PURE__ */ __name((bytes) => z16.string().refine((value) => isCanonicalBase64Url(value, bytes), {
|
|
2622
|
+
message: `must be canonical base64url for exactly ${bytes} bytes`
|
|
2623
|
+
}), "canonicalBase64Url");
|
|
2624
|
+
var ShareLinkIdValidator = canonicalBase64Url(SHARE_LINK_ID_BYTES);
|
|
2625
|
+
var ShareContentKeyValidator = canonicalBase64Url(SHARE_CONTENT_KEY_BYTES);
|
|
2626
|
+
var ShareIvValidator = canonicalBase64Url(SHARE_IV_BYTES);
|
|
2627
|
+
var ShareCiphertextValidator = z16.string().refine(
|
|
2628
|
+
(value) => {
|
|
2629
|
+
if (value.length > Math.ceil(MAX_SHARE_CIPHERTEXT_BYTES * 4 / 3)) return false;
|
|
2630
|
+
const decoded = decodeBase64Url(value);
|
|
2631
|
+
if (decoded === null) return false;
|
|
2632
|
+
if (encodeBase64Url(decoded) !== value) return false;
|
|
2633
|
+
return decoded.length >= SHARE_TAG_BYTES && decoded.length <= MAX_SHARE_CIPHERTEXT_BYTES;
|
|
2634
|
+
},
|
|
2635
|
+
{
|
|
2636
|
+
message: `must be canonical base64url decoding to ${SHARE_TAG_BYTES}..${MAX_SHARE_CIPHERTEXT_BYTES} bytes`
|
|
2637
|
+
}
|
|
2638
|
+
);
|
|
2639
|
+
var ShareEnvelopeValidator = z16.object({
|
|
2640
|
+
v: z16.literal(1),
|
|
2641
|
+
alg: z16.literal("A256GCM"),
|
|
2642
|
+
iv: ShareIvValidator,
|
|
2643
|
+
ct: ShareCiphertextValidator
|
|
2644
|
+
}).strict();
|
|
2645
|
+
var safeVersion = z16.number().int().min(1).max(2 ** 31 - 1);
|
|
2646
|
+
var safeCredentialIndex = z16.number().int().min(0).max(MAX_VP_MEMBERS - 1);
|
|
2647
|
+
var ShareSelectionEntryValidator = z16.object({ credentialIndex: safeCredentialIndex }).strict();
|
|
2648
|
+
var ShareEndorsementEntryValidator = z16.object({ credentialIndex: safeCredentialIndex, targetCredentialIndex: safeCredentialIndex }).strict();
|
|
2649
|
+
var ShareSharerValidator = z16.object({
|
|
2650
|
+
profileId: z16.string().min(1).max(128),
|
|
2651
|
+
displayName: z16.string().min(1).max(120),
|
|
2652
|
+
avatar: z16.string().max(2048).optional()
|
|
2653
|
+
}).strict();
|
|
2654
|
+
var presentationShape = VPValidator.extend({
|
|
2655
|
+
verifiableCredential: VCValidator.array().min(1).max(MAX_VP_MEMBERS)
|
|
2656
|
+
});
|
|
2657
|
+
var hasBoundedPresentation = /* @__PURE__ */ __name((value) => {
|
|
2658
|
+
let credentialCount = 0;
|
|
2659
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
2660
|
+
const visit = /* @__PURE__ */ __name((node, depth) => {
|
|
2661
|
+
if (node === null || typeof node !== "object") return true;
|
|
2662
|
+
if (depth > 32 || ancestors.has(node)) return false;
|
|
2663
|
+
ancestors.add(node);
|
|
2664
|
+
try {
|
|
2665
|
+
for (const [key, child] of Object.entries(node)) {
|
|
2666
|
+
if (key === "verifiableCredential") {
|
|
2667
|
+
credentialCount += Array.isArray(child) ? child.length : 1;
|
|
2668
|
+
if (credentialCount > MAX_VP_MEMBERS) return false;
|
|
2669
|
+
}
|
|
2670
|
+
if (!visit(child, depth + 1)) return false;
|
|
2671
|
+
}
|
|
2672
|
+
return true;
|
|
2673
|
+
} finally {
|
|
2674
|
+
ancestors.delete(node);
|
|
2675
|
+
}
|
|
2676
|
+
}, "visit");
|
|
2677
|
+
return visit(value, 0);
|
|
2678
|
+
}, "hasBoundedPresentation");
|
|
2679
|
+
var ShareManifestPresentationValidator = z16.custom(
|
|
2680
|
+
(value) => hasBoundedPresentation(value) && presentationShape.safeParse(value).success,
|
|
2681
|
+
{ message: "invalid share presentation" }
|
|
2682
|
+
);
|
|
2683
|
+
var SharePayloadValidatorShape = z16.object({
|
|
2684
|
+
protocol: z16.literal(SHARE_LINK_PROTOCOL),
|
|
2685
|
+
shareId: ShareLinkIdValidator,
|
|
2686
|
+
contentVersion: safeVersion,
|
|
2687
|
+
createdAt: z16.iso.datetime(),
|
|
2688
|
+
sharer: ShareSharerValidator,
|
|
2689
|
+
presentation: ShareManifestPresentationValidator,
|
|
2690
|
+
selection: ShareSelectionEntryValidator.array().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
2691
|
+
endorsements: ShareEndorsementEntryValidator.array().max(MAX_ENDORSEMENTS).default([])
|
|
2692
|
+
}).strict();
|
|
2693
|
+
var classificationFailure = /* @__PURE__ */ __name((code, message, path = []) => ({ ok: false, code, message, path }), "classificationFailure");
|
|
2694
|
+
var readSignedClaimId = /* @__PURE__ */ __name((member) => {
|
|
2695
|
+
if (member === null || typeof member !== "object") return void 0;
|
|
2696
|
+
const record = member;
|
|
2697
|
+
const claim = record.credentialSubject ?? record.endorsement;
|
|
2698
|
+
if (claim === null || typeof claim !== "object") return void 0;
|
|
2699
|
+
const claimRecord = claim;
|
|
2700
|
+
const nested = claimRecord.endorsement;
|
|
2701
|
+
const nestedId = nested !== null && typeof nested === "object" ? nested.id : void 0;
|
|
2702
|
+
return claimRecord.id ?? nestedId;
|
|
2703
|
+
}, "readSignedClaimId");
|
|
2704
|
+
var classifyShareManifest = /* @__PURE__ */ __name((payload) => {
|
|
2705
|
+
const members = payload.presentation?.verifiableCredential;
|
|
2706
|
+
if (!Array.isArray(members) || members.length === 0) {
|
|
2707
|
+
return classificationFailure("NO_PRESENTATION_MEMBERS", "presentation has no credentials");
|
|
2708
|
+
}
|
|
2709
|
+
if (members.length > MAX_VP_MEMBERS) {
|
|
2710
|
+
return classificationFailure(
|
|
2711
|
+
"TOO_MANY_VP_MEMBERS",
|
|
2712
|
+
`presentation has ${members.length} members, over the ${MAX_VP_MEMBERS} bound`
|
|
2713
|
+
);
|
|
2714
|
+
}
|
|
2715
|
+
const selection = payload.selection;
|
|
2716
|
+
const endorsements = payload.endorsements ?? [];
|
|
2717
|
+
if (!Array.isArray(selection) || selection.length < 1 || selection.length > MAX_SELECTED_CREDENTIALS) {
|
|
2718
|
+
return classificationFailure("BAD_SELECTION", "selection must contain 1..50 entries");
|
|
2719
|
+
}
|
|
2720
|
+
if (!Array.isArray(endorsements) || endorsements.length > MAX_ENDORSEMENTS) {
|
|
2721
|
+
return classificationFailure(
|
|
2722
|
+
"BAD_ENDORSEMENTS",
|
|
2723
|
+
"endorsements must contain at most 200 entries"
|
|
2724
|
+
);
|
|
2725
|
+
}
|
|
2726
|
+
const selectedIndices = [];
|
|
2727
|
+
const selected = /* @__PURE__ */ new Set();
|
|
2728
|
+
for (let index = 0; index < selection.length; index += 1) {
|
|
2729
|
+
const entry = selection[index];
|
|
2730
|
+
const credentialIndex = entry?.credentialIndex;
|
|
2731
|
+
if (!Number.isSafeInteger(credentialIndex) || credentialIndex < 0 || credentialIndex >= members.length) {
|
|
2732
|
+
return classificationFailure(
|
|
2733
|
+
"SELECTION_INDEX_OUT_OF_BOUNDS",
|
|
2734
|
+
`selection[${index}].credentialIndex is out of bounds`,
|
|
2735
|
+
["selection", index, "credentialIndex"]
|
|
2736
|
+
);
|
|
2737
|
+
}
|
|
2738
|
+
if (selected.has(credentialIndex)) {
|
|
2739
|
+
return classificationFailure(
|
|
2740
|
+
"SELECTION_INDEX_DUPLICATE",
|
|
2741
|
+
`selection[${index}].credentialIndex is duplicated`,
|
|
2742
|
+
["selection", index, "credentialIndex"]
|
|
2743
|
+
);
|
|
2744
|
+
}
|
|
2745
|
+
selected.add(credentialIndex);
|
|
2746
|
+
selectedIndices.push(credentialIndex);
|
|
2747
|
+
}
|
|
2748
|
+
const classified = new Set(selected);
|
|
2749
|
+
const endorsementIndices = [];
|
|
2750
|
+
for (let index = 0; index < endorsements.length; index += 1) {
|
|
2751
|
+
const entry = endorsements[index];
|
|
2752
|
+
const credentialIndex = entry?.credentialIndex;
|
|
2753
|
+
const targetIndex = entry?.targetCredentialIndex;
|
|
2754
|
+
if (!Number.isSafeInteger(credentialIndex) || credentialIndex < 0 || credentialIndex >= members.length) {
|
|
2755
|
+
return classificationFailure(
|
|
2756
|
+
"ENDORSEMENT_INDEX_OUT_OF_BOUNDS",
|
|
2757
|
+
`endorsements[${index}].credentialIndex is out of bounds`,
|
|
2758
|
+
["endorsements", index, "credentialIndex"]
|
|
2759
|
+
);
|
|
2760
|
+
}
|
|
2761
|
+
if (classified.has(credentialIndex)) {
|
|
2762
|
+
return classificationFailure(
|
|
2763
|
+
"VP_MEMBER_CLASSIFIED_TWICE",
|
|
2764
|
+
`endorsements[${index}].credentialIndex was already classified`,
|
|
2765
|
+
["endorsements", index, "credentialIndex"]
|
|
2766
|
+
);
|
|
2767
|
+
}
|
|
2768
|
+
if (!selected.has(targetIndex)) {
|
|
2769
|
+
return classificationFailure(
|
|
2770
|
+
"ENDORSEMENT_TARGET_NOT_SELECTED",
|
|
2771
|
+
`endorsements[${index}].targetCredentialIndex must reference a selected credential`,
|
|
2772
|
+
["endorsements", index, "targetCredentialIndex"]
|
|
2773
|
+
);
|
|
2774
|
+
}
|
|
2775
|
+
const referenced = readSignedClaimId(members[credentialIndex]);
|
|
2776
|
+
const target = members[targetIndex];
|
|
2777
|
+
const targetId = target !== null && typeof target === "object" ? target.id : void 0;
|
|
2778
|
+
if (typeof referenced !== "string" || typeof targetId !== "string" || referenced !== targetId) {
|
|
2779
|
+
return classificationFailure(
|
|
2780
|
+
"ENDORSEMENT_TARGET_UNBOUND",
|
|
2781
|
+
`endorsements[${index}] claim does not reference the target credential id`,
|
|
2782
|
+
["endorsements", index]
|
|
2783
|
+
);
|
|
2784
|
+
}
|
|
2785
|
+
classified.add(credentialIndex);
|
|
2786
|
+
endorsementIndices.push(credentialIndex);
|
|
2787
|
+
}
|
|
2788
|
+
if (classified.size !== members.length) {
|
|
2789
|
+
return classificationFailure(
|
|
2790
|
+
"UNCLASSIFIED_VP_MEMBER",
|
|
2791
|
+
"every presentation member must be classified exactly once",
|
|
2792
|
+
["presentation", "verifiableCredential"]
|
|
2793
|
+
);
|
|
2794
|
+
}
|
|
2795
|
+
return {
|
|
2796
|
+
ok: true,
|
|
2797
|
+
classification: { selectedIndices, endorsementIndices, memberCount: members.length }
|
|
2798
|
+
};
|
|
2799
|
+
}, "classifyShareManifest");
|
|
2800
|
+
var SharePayloadValidator = SharePayloadValidatorShape.superRefine((payload, ctx) => {
|
|
2801
|
+
const result = classifyShareManifest(payload);
|
|
2802
|
+
if (!result.ok) {
|
|
2803
|
+
ctx.addIssue({
|
|
2804
|
+
code: "custom",
|
|
2805
|
+
message: result.message,
|
|
2806
|
+
path: result.path,
|
|
2807
|
+
params: { shareLinkCode: result.code }
|
|
2808
|
+
});
|
|
2809
|
+
}
|
|
2810
|
+
});
|
|
2811
|
+
var ShareRecoverySelectionValidator = z16.object({
|
|
2812
|
+
ref: z16.string().min(1).max(MAX_SHARE_SOURCE_URI_CHARS),
|
|
2813
|
+
order: z16.number().int().min(0).max(MAX_SELECTED_CREDENTIALS - 1)
|
|
2814
|
+
}).strict();
|
|
2815
|
+
var ShareRecoveryEndorsementValidator = z16.object({ targetRef: z16.string().min(1).max(MAX_SHARE_SOURCE_URI_CHARS) }).strict();
|
|
2816
|
+
var ShareRecoveryPlaintextValidator = z16.object({
|
|
2817
|
+
protocol: z16.literal(SHARE_RECOVERY_PROTOCOL),
|
|
2818
|
+
shareId: ShareLinkIdValidator,
|
|
2819
|
+
ownerProfileId: z16.string().min(1).max(128),
|
|
2820
|
+
createdAt: z16.iso.datetime(),
|
|
2821
|
+
latest: z16.object({ contentVersion: safeVersion, key: ShareContentKeyValidator }).strict(),
|
|
2822
|
+
selection: ShareRecoverySelectionValidator.array().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
2823
|
+
endorsements: ShareRecoveryEndorsementValidator.array().max(MAX_ENDORSEMENTS).default([])
|
|
2824
|
+
}).strict().superRefine((recovery, ctx) => {
|
|
2825
|
+
const orders = /* @__PURE__ */ new Set();
|
|
2826
|
+
recovery.selection.forEach((entry, index) => {
|
|
2827
|
+
if (entry.order >= recovery.selection.length) {
|
|
2828
|
+
ctx.addIssue({
|
|
2829
|
+
code: "custom",
|
|
2830
|
+
message: "order must be within the selection bounds",
|
|
2831
|
+
path: ["selection", index, "order"]
|
|
2832
|
+
});
|
|
2833
|
+
}
|
|
2834
|
+
if (orders.has(entry.order)) {
|
|
2835
|
+
ctx.addIssue({
|
|
2836
|
+
code: "custom",
|
|
2837
|
+
message: "order must be unique within the selection",
|
|
2838
|
+
path: ["selection", index, "order"]
|
|
2839
|
+
});
|
|
2840
|
+
}
|
|
2841
|
+
orders.add(entry.order);
|
|
2842
|
+
});
|
|
2843
|
+
});
|
|
2844
|
+
var ShareOwnerRecoveryValidator = JWEValidator.refine(
|
|
2845
|
+
(value) => utf8ByteLength(JSON.stringify(value)) <= MAX_SHARE_RECOVERY_JWE_BYTES,
|
|
2846
|
+
{ message: `serialized recovery JWE must be at most ${MAX_SHARE_RECOVERY_JWE_BYTES} bytes` }
|
|
2847
|
+
);
|
|
2848
|
+
var ShareLinkStatusValidator = z16.enum(["pending", "active", "stopped"]);
|
|
2849
|
+
var ShareContentStateValidator = z16.enum(["staging", "finalized", "content_missing"]);
|
|
2850
|
+
var ShareLinkValidator = z16.object({
|
|
2851
|
+
id: ShareLinkIdValidator,
|
|
2852
|
+
title: z16.string().min(1).max(120),
|
|
2853
|
+
note: z16.string().max(500).optional(),
|
|
2854
|
+
selectedCount: z16.number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
2855
|
+
version: safeVersion,
|
|
2856
|
+
contentVersion: safeVersion,
|
|
2857
|
+
status: ShareLinkStatusValidator,
|
|
2858
|
+
contentState: ShareContentStateValidator,
|
|
2859
|
+
createdAt: z16.iso.datetime(),
|
|
2860
|
+
updatedAt: z16.iso.datetime(),
|
|
2861
|
+
expiresAt: z16.iso.datetime().nullable(),
|
|
2862
|
+
stoppedAt: z16.iso.datetime().nullable(),
|
|
2863
|
+
lastViewedAt: z16.iso.datetime().nullable(),
|
|
2864
|
+
viewCount: z16.number().int().min(0).optional(),
|
|
2865
|
+
passcodeProtected: z16.boolean(),
|
|
2866
|
+
notifyOnView: z16.boolean(),
|
|
2867
|
+
minorPolicy: z16.object({
|
|
2868
|
+
isMinor: z16.boolean().nullable(),
|
|
2869
|
+
policyResolved: z16.boolean(),
|
|
2870
|
+
defaultExpiryDays: z16.union([z16.literal(30), z16.literal(365)]),
|
|
2871
|
+
viewCountingEnabled: z16.boolean()
|
|
2872
|
+
}),
|
|
2873
|
+
/**
|
|
2874
|
+
* Guarded application/API URL for the content. Optional because owner APIs in
|
|
2875
|
+
* D1 have no public resolve/content endpoint yet; it must never be a
|
|
2876
|
+
* LearnCloud object URL or carry a fabricated decryption key.
|
|
2877
|
+
*/
|
|
2878
|
+
contentUrl: z16.string().optional()
|
|
2879
|
+
});
|
|
2880
|
+
var clientRequestId = z16.string().uuid();
|
|
2881
|
+
var CreateShareLinkInputValidator = z16.object({
|
|
2882
|
+
id: ShareLinkIdValidator,
|
|
2883
|
+
clientRequestId,
|
|
2884
|
+
title: z16.string().min(1).max(120),
|
|
2885
|
+
note: z16.string().max(500).optional(),
|
|
2886
|
+
expiresAt: z16.iso.datetime().nullable().optional(),
|
|
2887
|
+
passcode: z16.string().min(8).max(64).optional(),
|
|
2888
|
+
notifyOnView: z16.boolean().default(false),
|
|
2889
|
+
selectedCount: z16.number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
2890
|
+
contentVersion: z16.literal(1),
|
|
2891
|
+
envelope: ShareEnvelopeValidator,
|
|
2892
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator
|
|
2893
|
+
}).strict();
|
|
2894
|
+
var UpdateShareLinkInputValidator = z16.object({
|
|
2895
|
+
id: ShareLinkIdValidator,
|
|
2896
|
+
expectedVersion: safeVersion,
|
|
2897
|
+
clientRequestId,
|
|
2898
|
+
title: z16.string().min(1).max(120).optional(),
|
|
2899
|
+
note: z16.string().max(500).nullable().optional(),
|
|
2900
|
+
expiresAt: z16.iso.datetime().nullable().optional(),
|
|
2901
|
+
/** Omitted preserves the current passcode, null removes it, and a string replaces it. */
|
|
2902
|
+
passcode: z16.string().min(8).max(64).nullable().optional(),
|
|
2903
|
+
notifyOnView: z16.boolean().optional(),
|
|
2904
|
+
contentVersion: safeVersion.optional(),
|
|
2905
|
+
selectedCount: z16.number().int().min(1).max(MAX_SELECTED_CREDENTIALS).optional(),
|
|
2906
|
+
envelope: ShareEnvelopeValidator.optional(),
|
|
2907
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator.optional()
|
|
2908
|
+
}).strict().superRefine((value, ctx) => {
|
|
2909
|
+
const provided = [
|
|
2910
|
+
value.contentVersion,
|
|
2911
|
+
value.selectedCount,
|
|
2912
|
+
value.envelope,
|
|
2913
|
+
value.ownerEncryptedRecovery
|
|
2914
|
+
].filter((field) => field !== void 0).length;
|
|
2915
|
+
if (provided !== 0 && provided !== 4) {
|
|
2916
|
+
ctx.addIssue({
|
|
2917
|
+
code: "custom",
|
|
2918
|
+
message: "content replacement requires contentVersion, selectedCount, envelope and ownerEncryptedRecovery together"
|
|
2919
|
+
});
|
|
2920
|
+
}
|
|
2921
|
+
});
|
|
2922
|
+
var ShareLinkIdInputValidator = z16.object({ id: ShareLinkIdValidator }).strict();
|
|
2923
|
+
var ShareLinkOperationKeyInputValidator = z16.object({ id: ShareLinkIdValidator, operationId: z16.string().uuid() }).strict();
|
|
2924
|
+
var ShareLinkOwnerCommitOutputValidator = z16.discriminatedUnion("status", [
|
|
2925
|
+
z16.object({ status: z16.literal("completed"), share: ShareLinkValidator }).strict(),
|
|
2926
|
+
z16.object({
|
|
2927
|
+
status: z16.literal("pending"),
|
|
2928
|
+
id: ShareLinkIdValidator,
|
|
2929
|
+
operationId: z16.string().uuid()
|
|
2930
|
+
}).strict()
|
|
2931
|
+
]);
|
|
2932
|
+
var ShareLinkOwnerStatusOutputValidator = z16.discriminatedUnion("status", [
|
|
2933
|
+
z16.object({ status: z16.literal("found"), share: ShareLinkValidator }).strict(),
|
|
2934
|
+
z16.object({
|
|
2935
|
+
status: z16.literal("pending"),
|
|
2936
|
+
id: ShareLinkIdValidator,
|
|
2937
|
+
operationId: z16.string().uuid()
|
|
2938
|
+
}).strict(),
|
|
2939
|
+
z16.object({ status: z16.literal("not_found"), id: ShareLinkIdValidator }).strict()
|
|
2940
|
+
]);
|
|
2941
|
+
var ShareLinkOwnerRecoveryOutputValidator = z16.object({ recovery: ShareOwnerRecoveryValidator }).strict();
|
|
2942
|
+
var ShareLinkOwnerContentOutputValidator = z16.object({
|
|
2943
|
+
id: ShareLinkIdValidator,
|
|
2944
|
+
contentVersion: safeVersion,
|
|
2945
|
+
envelope: ShareEnvelopeValidator
|
|
2946
|
+
}).strict();
|
|
2947
|
+
var ResolveShareLinkInputValidator = z16.object({
|
|
2948
|
+
id: ShareLinkIdValidator,
|
|
2949
|
+
/** Sent only in a POST body; it must never be placed in a share URL. */
|
|
2950
|
+
passcode: z16.string().min(4).max(64).optional()
|
|
2951
|
+
}).strict();
|
|
2952
|
+
var ShareLinkPublicStateValidator = z16.discriminatedUnion("state", [
|
|
2953
|
+
z16.object({
|
|
2954
|
+
state: z16.literal("passcode_required"),
|
|
2955
|
+
id: ShareLinkIdValidator
|
|
2956
|
+
}).strict(),
|
|
2957
|
+
z16.object({ state: z16.literal("try_later"), id: ShareLinkIdValidator }).strict(),
|
|
2958
|
+
z16.object({
|
|
2959
|
+
state: z16.literal("active"),
|
|
2960
|
+
id: ShareLinkIdValidator,
|
|
2961
|
+
title: z16.string().max(120),
|
|
2962
|
+
note: z16.string().max(500).optional(),
|
|
2963
|
+
selectedCount: z16.number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
2964
|
+
contentVersion: safeVersion,
|
|
2965
|
+
contentUrl: z16.string(),
|
|
2966
|
+
sharer: z16.object({
|
|
2967
|
+
displayName: z16.string().max(120),
|
|
2968
|
+
avatar: z16.string().max(2048).optional()
|
|
2969
|
+
}),
|
|
2970
|
+
createdAt: z16.iso.datetime(),
|
|
2971
|
+
updatedAt: z16.iso.datetime(),
|
|
2972
|
+
expiresAt: z16.iso.datetime().nullable()
|
|
2973
|
+
}).strict(),
|
|
2974
|
+
z16.object({
|
|
2975
|
+
state: z16.literal("expired"),
|
|
2976
|
+
id: ShareLinkIdValidator,
|
|
2977
|
+
expiresAt: z16.iso.datetime()
|
|
2978
|
+
}).strict(),
|
|
2979
|
+
z16.object({
|
|
2980
|
+
state: z16.literal("stopped"),
|
|
2981
|
+
id: ShareLinkIdValidator,
|
|
2982
|
+
stoppedAt: z16.iso.datetime()
|
|
2983
|
+
}).strict(),
|
|
2984
|
+
z16.object({ state: z16.literal("not_found"), id: ShareLinkIdValidator }).strict()
|
|
2985
|
+
]);
|
|
2986
|
+
var ListShareLinksInputValidator = z16.object({
|
|
2987
|
+
limit: z16.number().int().min(1).max(50).default(25),
|
|
2988
|
+
cursor: z16.string().max(512).optional()
|
|
2989
|
+
}).strict();
|
|
2990
|
+
var PaginatedShareLinksValidator = PaginationResponseValidator.extend({
|
|
2991
|
+
records: ShareLinkValidator.array()
|
|
2992
|
+
});
|
|
2993
|
+
var AcknowledgeViewInputValidator = z16.object({
|
|
2994
|
+
receipt: z16.string().min(22).max(128).regex(/^[A-Za-z0-9_-]+$/)
|
|
2995
|
+
}).strict();
|
|
2996
|
+
var AcknowledgeViewOutputValidator = z16.object({ ok: z16.literal(true) }).strict();
|
|
2997
|
+
var SHARE_VIEW_RECEIPT_TTL_SECONDS = 10 * 60;
|
|
2998
|
+
var ShareLinkPublicContentViewValidator = z16.object({
|
|
2999
|
+
id: ShareLinkIdValidator,
|
|
3000
|
+
contentVersion: safeVersion,
|
|
3001
|
+
envelope: ShareEnvelopeValidator,
|
|
3002
|
+
contentUrl: z16.string(),
|
|
3003
|
+
receipt: z16.string().min(22).max(128).regex(/^[A-Za-z0-9_-]+$/)
|
|
3004
|
+
}).strict();
|
|
2539
3005
|
export {
|
|
2540
3006
|
ACT_AS_HEADER,
|
|
2541
3007
|
AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX,
|
|
@@ -2544,6 +3010,8 @@ export {
|
|
|
2544
3010
|
AchievementSubjectValidator,
|
|
2545
3011
|
AchievementTypeValidator,
|
|
2546
3012
|
AchievementValidator,
|
|
3013
|
+
AcknowledgeViewInputValidator,
|
|
3014
|
+
AcknowledgeViewOutputValidator,
|
|
2547
3015
|
AddTagInputValidator,
|
|
2548
3016
|
AddressValidator,
|
|
2549
3017
|
AgeRatingValidator,
|
|
@@ -2621,6 +3089,7 @@ export {
|
|
|
2621
3089
|
CreateContactMethodSessionValidator,
|
|
2622
3090
|
CreateManagedFrameworkBatchInputValidator,
|
|
2623
3091
|
CreateManagedFrameworkInputValidator,
|
|
3092
|
+
CreateShareLinkInputValidator,
|
|
2624
3093
|
CreateSkillInputValidator,
|
|
2625
3094
|
CreateSkillsBatchInputValidator,
|
|
2626
3095
|
CredentialActivityEventTypeValidator,
|
|
@@ -2652,10 +3121,14 @@ export {
|
|
|
2652
3121
|
DeleteSkillInputValidator,
|
|
2653
3122
|
DidDocumentValidator,
|
|
2654
3123
|
EMPTY_IN_APP_MESSAGES_FLAG,
|
|
3124
|
+
ESCROW_PIN_LOCKED_MESSAGE,
|
|
3125
|
+
ESCROW_PIN_MISMATCH_PATTERN,
|
|
3126
|
+
ESCROW_PIN_UNAVAILABLE_MESSAGE,
|
|
2655
3127
|
EncryptedCredentialRecordValidator,
|
|
2656
3128
|
EncryptedRecordValidator,
|
|
2657
3129
|
EndorsementCredentialValidator,
|
|
2658
3130
|
EndorsementSubjectValidator,
|
|
3131
|
+
EscrowPinStatusValidator,
|
|
2659
3132
|
EvidenceValidator,
|
|
2660
3133
|
FlatAuthGrantValidator,
|
|
2661
3134
|
FrameworkWithSkillsValidator,
|
|
@@ -2737,6 +3210,14 @@ export {
|
|
|
2737
3210
|
LaunchTypeValidator,
|
|
2738
3211
|
LearnCardRefreshAuthorizationValidator,
|
|
2739
3212
|
LinkProviderFrameworkInputValidator,
|
|
3213
|
+
ListShareLinksInputValidator,
|
|
3214
|
+
MAX_ENDORSEMENTS,
|
|
3215
|
+
MAX_SELECTED_CREDENTIALS,
|
|
3216
|
+
MAX_SHARE_CIPHERTEXT_BYTES,
|
|
3217
|
+
MAX_SHARE_LINK_REQUEST_BYTES,
|
|
3218
|
+
MAX_SHARE_RECOVERY_JWE_BYTES,
|
|
3219
|
+
MAX_SHARE_SOURCE_URI_CHARS,
|
|
3220
|
+
MAX_VP_MEMBERS,
|
|
2740
3221
|
ManagedCredentialRefreshReceiptValidator,
|
|
2741
3222
|
ManagedCredentialRefreshServiceValidator,
|
|
2742
3223
|
PaginatedAppStoreListingsValidator,
|
|
@@ -2759,6 +3240,7 @@ export {
|
|
|
2759
3240
|
PaginatedLCNProfileManagersValidator,
|
|
2760
3241
|
PaginatedLCNProfilesAndManagersValidator,
|
|
2761
3242
|
PaginatedLCNProfilesValidator,
|
|
3243
|
+
PaginatedShareLinksValidator,
|
|
2762
3244
|
PaginatedSkillFrameworksValidator,
|
|
2763
3245
|
PaginatedSkillTreeValidator,
|
|
2764
3246
|
PaginatedVisibleLCNProfilesValidator,
|
|
@@ -2783,11 +3265,20 @@ export {
|
|
|
2783
3265
|
ReplaceSkillFrameworkSkillsInputValidator,
|
|
2784
3266
|
ReplaceSkillFrameworkSkillsResultValidator,
|
|
2785
3267
|
RequestLearnerContextEventValidator,
|
|
3268
|
+
ResolveShareLinkInputValidator,
|
|
2786
3269
|
ResultDescriptionValidator,
|
|
2787
3270
|
ResultStatusTypeValidator,
|
|
2788
3271
|
ResultTypeValidator,
|
|
2789
3272
|
ResultValidator,
|
|
2790
3273
|
RubricCriterionValidator,
|
|
3274
|
+
SHARE_AAD_PREFIX,
|
|
3275
|
+
SHARE_CONTENT_KEY_BYTES,
|
|
3276
|
+
SHARE_IV_BYTES,
|
|
3277
|
+
SHARE_LINK_ID_BYTES,
|
|
3278
|
+
SHARE_LINK_PROTOCOL,
|
|
3279
|
+
SHARE_RECOVERY_PROTOCOL,
|
|
3280
|
+
SHARE_TAG_BYTES,
|
|
3281
|
+
SHARE_VIEW_RECEIPT_TTL_SECONDS,
|
|
2791
3282
|
SendAiSessionCredentialEventValidator,
|
|
2792
3283
|
SendBoostInputValidator,
|
|
2793
3284
|
SendBoostResponseValidator,
|
|
@@ -2802,6 +3293,32 @@ export {
|
|
|
2802
3293
|
SentCredentialInfoValidator,
|
|
2803
3294
|
ServiceValidator,
|
|
2804
3295
|
SetPrimaryContactMethodValidator,
|
|
3296
|
+
ShareCiphertextValidator,
|
|
3297
|
+
ShareContentKeyValidator,
|
|
3298
|
+
ShareContentStateValidator,
|
|
3299
|
+
ShareEndorsementEntryValidator,
|
|
3300
|
+
ShareEnvelopeValidator,
|
|
3301
|
+
ShareIvValidator,
|
|
3302
|
+
ShareLinkIdInputValidator,
|
|
3303
|
+
ShareLinkIdValidator,
|
|
3304
|
+
ShareLinkOperationKeyInputValidator,
|
|
3305
|
+
ShareLinkOwnerCommitOutputValidator,
|
|
3306
|
+
ShareLinkOwnerContentOutputValidator,
|
|
3307
|
+
ShareLinkOwnerRecoveryOutputValidator,
|
|
3308
|
+
ShareLinkOwnerStatusOutputValidator,
|
|
3309
|
+
ShareLinkPublicContentViewValidator,
|
|
3310
|
+
ShareLinkPublicStateValidator,
|
|
3311
|
+
ShareLinkStatusValidator,
|
|
3312
|
+
ShareLinkValidator,
|
|
3313
|
+
ShareManifestPresentationValidator,
|
|
3314
|
+
ShareOwnerRecoveryValidator,
|
|
3315
|
+
SharePayloadValidator,
|
|
3316
|
+
SharePayloadValidatorShape,
|
|
3317
|
+
ShareRecoveryEndorsementValidator,
|
|
3318
|
+
ShareRecoveryPlaintextValidator,
|
|
3319
|
+
ShareRecoverySelectionValidator,
|
|
3320
|
+
ShareSelectionEntryValidator,
|
|
3321
|
+
ShareSharerValidator,
|
|
2805
3322
|
SkillDeletionStrategyValidator,
|
|
2806
3323
|
SkillFrameworkAdminInputValidator,
|
|
2807
3324
|
SkillFrameworkAdminsValidator,
|
|
@@ -2833,6 +3350,7 @@ export {
|
|
|
2833
3350
|
UnsignedVCValidator,
|
|
2834
3351
|
UnsignedVPValidator,
|
|
2835
3352
|
UpdateFrameworkInputValidator,
|
|
3353
|
+
UpdateShareLinkInputValidator,
|
|
2836
3354
|
UpdateSkillInputValidator,
|
|
2837
3355
|
VC2EvidenceValidator,
|
|
2838
3356
|
VCValidator,
|
|
@@ -2844,7 +3362,12 @@ export {
|
|
|
2844
3362
|
VerificationStatusValidator,
|
|
2845
3363
|
appStoreActionValidator,
|
|
2846
3364
|
capgoUpdateActionValidator,
|
|
3365
|
+
classifyShareManifest,
|
|
3366
|
+
decodeBase64Url,
|
|
3367
|
+
decodedBase64UrlByteLength,
|
|
2847
3368
|
dismissActionValidator,
|
|
3369
|
+
encodeBase64Url,
|
|
3370
|
+
escrowPinMismatchMessage,
|
|
2848
3371
|
externalLinkActionValidator,
|
|
2849
3372
|
inAppMessageActionStyleValidator,
|
|
2850
3373
|
inAppMessageActionTargetValidator,
|
|
@@ -2859,9 +3382,11 @@ export {
|
|
|
2859
3382
|
inAppMessageVersionSourceValidator,
|
|
2860
3383
|
inAppMessagesFlagValidator,
|
|
2861
3384
|
internalLinkActionValidator,
|
|
3385
|
+
isCanonicalBase64Url,
|
|
2862
3386
|
isStoredCredentialEnvelope,
|
|
2863
3387
|
parseInAppMessagesFlag,
|
|
2864
3388
|
platformPredicateValidator,
|
|
2865
3389
|
rolePredicateValidator,
|
|
3390
|
+
utf8ByteLength,
|
|
2866
3391
|
versionPredicateValidator
|
|
2867
3392
|
};
|