@domino-sdk/relay 0.23.1 → 0.25.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/authoring.d.ts +52 -10
- package/dist/authoring.js +48 -8
- package/dist/browser.d.ts +412 -8
- package/dist/browser.js +22 -7
- package/dist/chunk-7QICEKC2.js +229 -0
- package/dist/{chunk-ZOL7RYHW.js → chunk-AKB266O5.js} +46 -3
- package/dist/chunk-D6BX627V.js +175 -0
- package/dist/{chunk-UYS522ER.js → chunk-IXLY3A7B.js} +550 -396
- package/dist/chunk-MZFUQQDP.js +355 -0
- package/dist/{chunk-RTBIXGMH.js → chunk-S44XSDW2.js} +779 -46
- package/dist/index.d.ts +1142 -12
- package/dist/index.js +123 -11
- package/dist/portal-proxy.js +10 -5
- package/dist/react/index.d.ts +498 -13
- package/dist/react/index.js +316 -40
- package/dist/schema.d.ts +82 -2
- package/dist/schema.js +1 -1
- package/dist/{submission-input-CK4Dy19H.d.ts → submission-input-Ckpb4sBv.d.ts} +1899 -2
- package/package.json +5 -3
- package/dist/chunk-57TGYC5Y.js +0 -37
- package/dist/chunk-ND3CVNIW.js +0 -61
|
@@ -96,12 +96,24 @@ var trackerSourceSchema = z2.discriminatedUnion("kind", [
|
|
|
96
96
|
kind: z2.literal("x-search"),
|
|
97
97
|
query: z2.string().trim().min(1).max(2e3)
|
|
98
98
|
}).strict(),
|
|
99
|
-
z2.object({
|
|
99
|
+
z2.object({
|
|
100
|
+
kind: z2.literal("custom"),
|
|
101
|
+
namespace: identifier,
|
|
102
|
+
/**
|
|
103
|
+
* Record authors are canonical CAIP-10 wallet account IDs, attributed to members through
|
|
104
|
+
* their verified wallet links. Omitted when authors are opaque IDs.
|
|
105
|
+
*/
|
|
106
|
+
authors: z2.literal("wallet").optional()
|
|
107
|
+
}).strict()
|
|
100
108
|
]);
|
|
101
109
|
var x = {
|
|
102
110
|
search: (input) => trackerSourceSchema.options[0].parse({ kind: "x-search", ...input })
|
|
103
111
|
};
|
|
104
|
-
var customSource = (namespace) => trackerSourceSchema.options[1].parse({
|
|
112
|
+
var customSource = (namespace, options = {}) => trackerSourceSchema.options[1].parse({
|
|
113
|
+
kind: "custom",
|
|
114
|
+
namespace,
|
|
115
|
+
...options
|
|
116
|
+
});
|
|
105
117
|
var windowSchema = z2.object({ start: timestamp, end: timestamp.optional() }).strict().refine(
|
|
106
118
|
(w) => w.end === void 0 || w.end > w.start,
|
|
107
119
|
"End must follow start"
|
|
@@ -167,7 +179,69 @@ var trackerIngestSchema = z2.object({
|
|
|
167
179
|
actionId: identifier,
|
|
168
180
|
records: z2.array(trackerRecordInputSchema).min(1).max(100)
|
|
169
181
|
}).strict();
|
|
170
|
-
var trackerIngestResultSchema = z2.object({
|
|
182
|
+
var trackerIngestResultSchema = z2.object({
|
|
183
|
+
stored: count,
|
|
184
|
+
/** Tracker-trigger decisions this ingest caused. Absent from servers without tracker triggers. */
|
|
185
|
+
admissions: z2.object({ admitted: count, skipped: count }).optional()
|
|
186
|
+
});
|
|
187
|
+
var trackerOutcomeFields = {
|
|
188
|
+
/** Stable quest ID. */
|
|
189
|
+
quest: identifier,
|
|
190
|
+
/** Stable tracker ID. */
|
|
191
|
+
tracker: identifier,
|
|
192
|
+
record: externalId,
|
|
193
|
+
observedAt: timestamp,
|
|
194
|
+
/** The release admitted, or the one active when the observation was skipped. */
|
|
195
|
+
release: identifier,
|
|
196
|
+
/** The account attribution resolved or failed to resolve, such as a CAIP-10 wallet ID. */
|
|
197
|
+
account: z2.string().nullable(),
|
|
198
|
+
createdAt: timestamp,
|
|
199
|
+
updatedAt: timestamp,
|
|
200
|
+
/** Null for automatic decisions; the staff actor after a retry. */
|
|
201
|
+
actor: z2.string().nullable()
|
|
202
|
+
};
|
|
203
|
+
var trackerOutcomeSchema = z2.discriminatedUnion("state", [
|
|
204
|
+
z2.strictObject({
|
|
205
|
+
...trackerOutcomeFields,
|
|
206
|
+
state: z2.literal("admitted"),
|
|
207
|
+
reason: z2.null(),
|
|
208
|
+
/** The attributed member. */
|
|
209
|
+
member: identifier,
|
|
210
|
+
/** The admitted attempt. Its evaluation, decision and rewards live on the attempt. */
|
|
211
|
+
attempt: identifier
|
|
212
|
+
}),
|
|
213
|
+
z2.strictObject({
|
|
214
|
+
...trackerOutcomeFields,
|
|
215
|
+
state: z2.literal("skipped"),
|
|
216
|
+
/** Why the observation was skipped. */
|
|
217
|
+
reason: z2.string(),
|
|
218
|
+
/** The attributed member, when attribution got that far. */
|
|
219
|
+
member: identifier.nullable(),
|
|
220
|
+
attempt: identifier.nullable()
|
|
221
|
+
})
|
|
222
|
+
]);
|
|
223
|
+
var trackerOutcomeQuerySchema = z2.strictObject({
|
|
224
|
+
/** Quest key or ID. */
|
|
225
|
+
quest: identifier.optional(),
|
|
226
|
+
record: externalId.optional(),
|
|
227
|
+
member: identifier.optional(),
|
|
228
|
+
state: z2.enum(["admitted", "skipped"]).optional(),
|
|
229
|
+
limit: z2.coerce.number().int().min(1).max(100).default(25),
|
|
230
|
+
/** Opaque cursor from `next`: older outcomes. */
|
|
231
|
+
before: z2.string().max(512).optional()
|
|
232
|
+
});
|
|
233
|
+
var trackerOutcomePageSchema = z2.strictObject({
|
|
234
|
+
/** Newest first. */
|
|
235
|
+
items: z2.array(trackerOutcomeSchema).max(100),
|
|
236
|
+
next: z2.string().nullable()
|
|
237
|
+
});
|
|
238
|
+
var trackerOutcomeRetrySchema = z2.strictObject({
|
|
239
|
+
actionId: identifier,
|
|
240
|
+
/** Quest key or ID. */
|
|
241
|
+
quest: identifier,
|
|
242
|
+
record: externalId,
|
|
243
|
+
observedAt: timestamp
|
|
244
|
+
});
|
|
171
245
|
var booleanQuery = z2.union([
|
|
172
246
|
z2.boolean(),
|
|
173
247
|
z2.enum(["true", "false"]).transform((v) => v === "true")
|
|
@@ -421,121 +495,190 @@ var streakProgressSchema = z4.object({
|
|
|
421
495
|
])
|
|
422
496
|
});
|
|
423
497
|
|
|
424
|
-
// src/
|
|
498
|
+
// src/tracker-triggers.ts
|
|
425
499
|
import { z as z5 } from "zod";
|
|
426
|
-
var
|
|
427
|
-
var
|
|
500
|
+
var timestamp3 = z5.number().int().safe().nonnegative().max(864e13);
|
|
501
|
+
var count2 = z5.number().int().safe().nonnegative();
|
|
502
|
+
var trackerBeneficiarySchema = z5.enum(["author", "replied-to"]);
|
|
503
|
+
var trackerTriggerPolicySchema = z5.strictObject({
|
|
504
|
+
/** The tracker's authoring key; publication binds it to the tracker's stable ID. */
|
|
505
|
+
tracker: identifier,
|
|
506
|
+
source: z5.enum(["x-search", "custom"]),
|
|
507
|
+
beneficiary: trackerBeneficiarySchema
|
|
508
|
+
});
|
|
509
|
+
var accountId = z5.string().min(5).max(256);
|
|
510
|
+
var trackerAttributionSchema = z5.strictObject({
|
|
511
|
+
member: identifier,
|
|
512
|
+
capturedAt: timestamp3,
|
|
513
|
+
account: z5.discriminatedUnion("provider", [
|
|
514
|
+
z5.strictObject({
|
|
515
|
+
provider: z5.literal("wallet"),
|
|
516
|
+
/** Canonical CAIP-10 account ID, as the record's author. */
|
|
517
|
+
id: accountId,
|
|
518
|
+
/** The wallet link's revision. */
|
|
519
|
+
revision: count2,
|
|
520
|
+
/** When the member verified the wallet. */
|
|
521
|
+
linkedAt: timestamp3.nullable()
|
|
522
|
+
}),
|
|
523
|
+
z5.strictObject({
|
|
524
|
+
provider: z5.literal("x"),
|
|
525
|
+
issuer: z5.string().min(1),
|
|
526
|
+
/** The X account's stable user ID. */
|
|
527
|
+
subject: z5.string().min(1).max(256),
|
|
528
|
+
/** The member's X account selection revision. */
|
|
529
|
+
revision: count2,
|
|
530
|
+
/** When the member linked the X account; null when unknown. */
|
|
531
|
+
linkedAt: timestamp3.nullable()
|
|
532
|
+
})
|
|
533
|
+
])
|
|
534
|
+
});
|
|
535
|
+
var trackerTriggerRecordSchema = z5.strictObject({
|
|
536
|
+
id: z5.string().min(1).max(256),
|
|
537
|
+
source: z5.string(),
|
|
538
|
+
occurredAt: timestamp3,
|
|
539
|
+
observedAt: timestamp3,
|
|
540
|
+
firstSeenAt: timestamp3,
|
|
541
|
+
author: z5.strictObject({
|
|
542
|
+
id: z5.string().min(1).max(256),
|
|
543
|
+
verified: z5.boolean().nullable()
|
|
544
|
+
}).nullable(),
|
|
545
|
+
data: z5.record(z5.string(), z5.json()),
|
|
546
|
+
removed: z5.boolean()
|
|
547
|
+
});
|
|
548
|
+
var trackerTriggerContextSchema = z5.strictObject({
|
|
549
|
+
/** The tracker's stable ID. */
|
|
550
|
+
tracker: identifier,
|
|
551
|
+
/** The tracker's authoring key. */
|
|
552
|
+
key: identifier,
|
|
553
|
+
beneficiary: trackerBeneficiarySchema,
|
|
554
|
+
record: trackerTriggerRecordSchema,
|
|
555
|
+
/** The captured X post of this observation; null for custom trackers. */
|
|
556
|
+
x: z5.strictObject({
|
|
557
|
+
evidence: trackerEvidenceSchema,
|
|
558
|
+
content: xContentBodySchema
|
|
559
|
+
}).nullable(),
|
|
560
|
+
attribution: trackerAttributionSchema
|
|
561
|
+
});
|
|
562
|
+
|
|
563
|
+
// src/observations.ts
|
|
564
|
+
import { z as z6 } from "zod";
|
|
565
|
+
var name = z6.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,199}$/);
|
|
566
|
+
var observationInputSchema = z6.object({
|
|
428
567
|
id: name,
|
|
429
568
|
source: name,
|
|
430
569
|
type: name,
|
|
431
570
|
member: identifier,
|
|
432
|
-
actor:
|
|
433
|
-
occurredAt:
|
|
434
|
-
data:
|
|
571
|
+
actor: z6.object({ provider: identifier, subject: z6.string().min(1).max(200) }).strict().optional(),
|
|
572
|
+
occurredAt: z6.number().int().nonnegative().max(864e13),
|
|
573
|
+
data: z6.record(z6.string(), z6.json())
|
|
435
574
|
}).strict().refine(
|
|
436
575
|
(value) => JSON.stringify(value.data).length <= 32768,
|
|
437
576
|
"Observation data exceeds 32 KB"
|
|
438
577
|
);
|
|
439
578
|
var observationSchema = observationInputSchema.safeExtend({
|
|
440
|
-
receivedAt:
|
|
579
|
+
receivedAt: z6.number().int().nonnegative()
|
|
441
580
|
});
|
|
442
|
-
var observationTriggerSchema =
|
|
443
|
-
var completionPolicySchema =
|
|
581
|
+
var observationTriggerSchema = z6.object({ source: name, type: name }).strict();
|
|
582
|
+
var completionPolicySchema = z6.discriminatedUnion("kind", [
|
|
444
583
|
streakPolicySchema,
|
|
445
|
-
|
|
446
|
-
|
|
584
|
+
z6.object({ kind: z6.literal("once") }).strict(),
|
|
585
|
+
z6.object({ kind: z6.literal("keyed") }).strict()
|
|
447
586
|
]);
|
|
448
|
-
var completionKeySchema =
|
|
449
|
-
var budgetSchema =
|
|
587
|
+
var completionKeySchema = z6.string().min(1).max(500);
|
|
588
|
+
var budgetSchema = z6.object({
|
|
450
589
|
id: name,
|
|
451
|
-
scope:
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
590
|
+
scope: z6.enum(["member", "project"]),
|
|
591
|
+
/**
|
|
592
|
+
* `"day"` buckets by UTC date and `"week"` by ISO week (UTC, weeks start on Monday), both of
|
|
593
|
+
* the attempt's eligibility time; `"lifetime"` never resets.
|
|
594
|
+
*/
|
|
595
|
+
period: z6.enum(["lifetime", "day", "week"]),
|
|
596
|
+
limit: z6.number().int().positive().max(Number.MAX_SAFE_INTEGER),
|
|
597
|
+
cost: z6.union([
|
|
598
|
+
z6.number().int().positive().max(Number.MAX_SAFE_INTEGER),
|
|
599
|
+
z6.object({ balance: name }).strict()
|
|
457
600
|
])
|
|
458
601
|
}).strict();
|
|
459
|
-
var observationReceiptSchema =
|
|
602
|
+
var observationReceiptSchema = z6.object({
|
|
460
603
|
id: name,
|
|
461
604
|
source: name,
|
|
462
|
-
attempts:
|
|
463
|
-
receivedAt:
|
|
605
|
+
attempts: z6.array(z6.string()),
|
|
606
|
+
receivedAt: z6.number()
|
|
464
607
|
});
|
|
465
|
-
var discordReactionSchema =
|
|
466
|
-
guildId:
|
|
467
|
-
channelId:
|
|
468
|
-
messageId:
|
|
469
|
-
userId:
|
|
470
|
-
messageAuthorId:
|
|
471
|
-
actorRoles:
|
|
472
|
-
emoji:
|
|
473
|
-
messagePublishedAt:
|
|
608
|
+
var discordReactionSchema = z6.object({
|
|
609
|
+
guildId: z6.string(),
|
|
610
|
+
channelId: z6.string(),
|
|
611
|
+
messageId: z6.string(),
|
|
612
|
+
userId: z6.string(),
|
|
613
|
+
messageAuthorId: z6.string().nullable().default(null),
|
|
614
|
+
actorRoles: z6.array(z6.string()).default([]),
|
|
615
|
+
emoji: z6.object({ id: z6.string().nullable(), name: z6.string() }),
|
|
616
|
+
messagePublishedAt: z6.number()
|
|
474
617
|
}).strict();
|
|
475
|
-
var discordMessageSchema =
|
|
476
|
-
guildId:
|
|
477
|
-
channelId:
|
|
478
|
-
messageId:
|
|
479
|
-
userId:
|
|
480
|
-
content:
|
|
481
|
-
replyTo:
|
|
482
|
-
publishedAt:
|
|
618
|
+
var discordMessageSchema = z6.object({
|
|
619
|
+
guildId: z6.string(),
|
|
620
|
+
channelId: z6.string(),
|
|
621
|
+
messageId: z6.string(),
|
|
622
|
+
userId: z6.string(),
|
|
623
|
+
content: z6.string().nullable(),
|
|
624
|
+
replyTo: z6.string().nullable(),
|
|
625
|
+
publishedAt: z6.number()
|
|
483
626
|
}).strict();
|
|
484
627
|
|
|
485
628
|
// src/integrations.ts
|
|
486
|
-
import { z as
|
|
487
|
-
var integrationProviderSchema =
|
|
488
|
-
var discordServerSchema =
|
|
489
|
-
id:
|
|
490
|
-
name:
|
|
491
|
-
icon:
|
|
629
|
+
import { z as z7 } from "zod";
|
|
630
|
+
var integrationProviderSchema = z7.enum(["discord"]);
|
|
631
|
+
var discordServerSchema = z7.object({
|
|
632
|
+
id: z7.string().regex(/^[0-9]{1,20}$/),
|
|
633
|
+
name: z7.string().min(1),
|
|
634
|
+
icon: z7.string().nullable()
|
|
492
635
|
});
|
|
493
|
-
var projectIntegrationSchema =
|
|
636
|
+
var projectIntegrationSchema = z7.object({
|
|
494
637
|
provider: integrationProviderSchema,
|
|
495
|
-
configured:
|
|
496
|
-
status:
|
|
497
|
-
revision:
|
|
638
|
+
configured: z7.boolean(),
|
|
639
|
+
status: z7.enum(["disconnected", "ready", "attention"]),
|
|
640
|
+
revision: z7.number().int().nonnegative(),
|
|
498
641
|
server: discordServerSchema.nullable(),
|
|
499
|
-
issue:
|
|
500
|
-
connectedAt:
|
|
642
|
+
issue: z7.string().nullable(),
|
|
643
|
+
connectedAt: z7.number().default(0)
|
|
501
644
|
});
|
|
502
645
|
|
|
503
646
|
// src/accounts.ts
|
|
504
|
-
import { z as
|
|
505
|
-
var authProviderSchema =
|
|
506
|
-
var accountConnectionSchema =
|
|
647
|
+
import { z as z8 } from "zod";
|
|
648
|
+
var authProviderSchema = z8.enum(["google", "apple", "x", "discord"]);
|
|
649
|
+
var accountConnectionSchema = z8.object({
|
|
507
650
|
provider: authProviderSchema,
|
|
508
|
-
configured:
|
|
509
|
-
status:
|
|
510
|
-
subject:
|
|
511
|
-
revision:
|
|
651
|
+
configured: z8.boolean(),
|
|
652
|
+
status: z8.enum(["disconnected", "connected", "reconnect"]),
|
|
653
|
+
subject: z8.string().nullable(),
|
|
654
|
+
revision: z8.number().int().nonnegative()
|
|
512
655
|
});
|
|
513
|
-
var discordMemberInputSchema =
|
|
514
|
-
var discordMessageInputSchema =
|
|
515
|
-
channelId:
|
|
516
|
-
messageId:
|
|
656
|
+
var discordMemberInputSchema = z8.object({}).strict();
|
|
657
|
+
var discordMessageInputSchema = z8.object({
|
|
658
|
+
channelId: z8.string().regex(/^[0-9]{1,20}$/),
|
|
659
|
+
messageId: z8.string().regex(/^[0-9]{1,20}$/)
|
|
517
660
|
}).strict();
|
|
518
|
-
var discordMemberSchema =
|
|
519
|
-
userId:
|
|
520
|
-
nickname:
|
|
521
|
-
displayName:
|
|
522
|
-
boostingSince:
|
|
523
|
-
roles:
|
|
524
|
-
joinedAt:
|
|
525
|
-
pending:
|
|
661
|
+
var discordMemberSchema = z8.object({
|
|
662
|
+
userId: z8.string().regex(/^[0-9]{1,20}$/).nullable().default(null),
|
|
663
|
+
nickname: z8.string().nullable().default(null),
|
|
664
|
+
displayName: z8.string().nullable().default(null),
|
|
665
|
+
boostingSince: z8.string().datetime({ offset: true }).nullable().default(null),
|
|
666
|
+
roles: z8.array(z8.string().regex(/^[0-9]{1,20}$/)),
|
|
667
|
+
joinedAt: z8.string().datetime({ offset: true }).nullable(),
|
|
668
|
+
pending: z8.boolean()
|
|
526
669
|
});
|
|
527
670
|
|
|
528
671
|
// src/submission-input.ts
|
|
529
|
-
import { z as
|
|
530
|
-
var textOptionsSchema =
|
|
531
|
-
required:
|
|
532
|
-
minLength:
|
|
533
|
-
maxLength:
|
|
672
|
+
import { z as z9 } from "zod";
|
|
673
|
+
var textOptionsSchema = z9.object({
|
|
674
|
+
required: z9.boolean().default(true),
|
|
675
|
+
minLength: z9.number().int().min(0).max(1e4).default(1),
|
|
676
|
+
maxLength: z9.number().int().min(1).max(1e4).default(1e4)
|
|
534
677
|
}).strict().refine(
|
|
535
678
|
(v) => v.minLength <= v.maxLength,
|
|
536
679
|
"minLength must not exceed maxLength"
|
|
537
680
|
);
|
|
538
|
-
var hostSchema =
|
|
681
|
+
var hostSchema = z9.string().min(1).max(253).refine((host) => {
|
|
539
682
|
if (!/^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$/i.test(host) || host.includes("..")) {
|
|
540
683
|
return false;
|
|
541
684
|
}
|
|
@@ -546,13 +689,13 @@ var hostSchema = z8.string().min(1).max(253).refine((host) => {
|
|
|
546
689
|
return false;
|
|
547
690
|
}
|
|
548
691
|
}, "Use a hostname without a scheme, path, port, or wildcard");
|
|
549
|
-
var urlOptionsSchema =
|
|
550
|
-
required:
|
|
551
|
-
allowedHosts:
|
|
692
|
+
var urlOptionsSchema = z9.object({
|
|
693
|
+
required: z9.boolean().default(true),
|
|
694
|
+
allowedHosts: z9.array(hostSchema).min(1).max(100).optional()
|
|
552
695
|
}).strict();
|
|
553
|
-
var textEvidenceSchema =
|
|
554
|
-
var urlEvidenceSchema =
|
|
555
|
-
var valueEvidenceSchema =
|
|
696
|
+
var textEvidenceSchema = z9.object({ kind: z9.literal("text"), value: z9.string().max(1e4) }).strict();
|
|
697
|
+
var urlEvidenceSchema = z9.object({ kind: z9.literal("url"), value: z9.string().max(2048) }).strict();
|
|
698
|
+
var valueEvidenceSchema = z9.discriminatedUnion("kind", [
|
|
556
699
|
textEvidenceSchema,
|
|
557
700
|
urlEvidenceSchema
|
|
558
701
|
]);
|
|
@@ -615,22 +758,22 @@ function xPostId(value) {
|
|
|
615
758
|
}
|
|
616
759
|
|
|
617
760
|
// src/quiz.ts
|
|
618
|
-
import { z as
|
|
619
|
-
var quizId =
|
|
620
|
-
var quizChoiceSchema =
|
|
621
|
-
var quizQuestionSchema =
|
|
761
|
+
import { z as z10 } from "zod";
|
|
762
|
+
var quizId = z10.string().regex(/^[a-zA-Z0-9_-]+$/).max(100);
|
|
763
|
+
var quizChoiceSchema = z10.object({ id: quizId, label: z10.string().trim().min(1).max(500) }).strict();
|
|
764
|
+
var quizQuestionSchema = z10.object({
|
|
622
765
|
id: quizId,
|
|
623
|
-
prompt:
|
|
624
|
-
choices:
|
|
766
|
+
prompt: z10.string().trim().min(1).max(1e3),
|
|
767
|
+
choices: z10.array(quizChoiceSchema).min(2).max(8).refine(
|
|
625
768
|
(choices) => new Set(choices.map((choice) => choice.id)).size === choices.length,
|
|
626
769
|
"Choice IDs must be unique"
|
|
627
770
|
)
|
|
628
771
|
}).strict();
|
|
629
|
-
var quizQuestionsSchema =
|
|
772
|
+
var quizQuestionsSchema = z10.array(quizQuestionSchema).min(1).max(20).refine(
|
|
630
773
|
(questions) => new Set(questions.map((question) => question.id)).size === questions.length,
|
|
631
774
|
"Question IDs must be unique"
|
|
632
775
|
);
|
|
633
|
-
var quizContentSchema =
|
|
776
|
+
var quizContentSchema = z10.array(
|
|
634
777
|
quizQuestionSchema.extend({ correct: quizId }).refine(
|
|
635
778
|
(question) => question.choices.some((choice) => choice.id === question.correct),
|
|
636
779
|
"Choose a correct answer from the available choices"
|
|
@@ -641,48 +784,48 @@ var quizContentSchema = z9.array(
|
|
|
641
784
|
);
|
|
642
785
|
|
|
643
786
|
// src/schema.ts
|
|
644
|
-
import { z as
|
|
787
|
+
import { z as z13 } from "zod";
|
|
645
788
|
|
|
646
789
|
// src/settings.ts
|
|
647
|
-
import { z as
|
|
790
|
+
import { z as z12 } from "zod";
|
|
648
791
|
|
|
649
792
|
// src/resources.ts
|
|
650
|
-
import { z as
|
|
651
|
-
var channelSourceSchema =
|
|
652
|
-
provider:
|
|
653
|
-
resource:
|
|
654
|
-
types:
|
|
793
|
+
import { z as z11 } from "zod";
|
|
794
|
+
var channelSourceSchema = z11.object({
|
|
795
|
+
provider: z11.literal("discord"),
|
|
796
|
+
resource: z11.literal("channel"),
|
|
797
|
+
types: z11.array(z11.enum(["text", "announcement"])).min(1)
|
|
655
798
|
}).strict();
|
|
656
|
-
var resourceSourceSchema =
|
|
657
|
-
|
|
658
|
-
provider:
|
|
659
|
-
resource:
|
|
799
|
+
var resourceSourceSchema = z11.union([
|
|
800
|
+
z11.object({
|
|
801
|
+
provider: z11.literal("domino"),
|
|
802
|
+
resource: z11.literal("point-ledger")
|
|
660
803
|
}).strict(),
|
|
661
804
|
channelSourceSchema,
|
|
662
|
-
|
|
663
|
-
provider:
|
|
664
|
-
resource:
|
|
665
|
-
assignable:
|
|
805
|
+
z11.object({
|
|
806
|
+
provider: z11.literal("discord"),
|
|
807
|
+
resource: z11.literal("role"),
|
|
808
|
+
assignable: z11.boolean().default(false)
|
|
666
809
|
}).strict()
|
|
667
810
|
]);
|
|
668
|
-
var resourceRequestSchema =
|
|
811
|
+
var resourceRequestSchema = z11.object({
|
|
669
812
|
source: resourceSourceSchema,
|
|
670
|
-
query:
|
|
671
|
-
cursor:
|
|
672
|
-
ids:
|
|
813
|
+
query: z11.string().max(100).optional(),
|
|
814
|
+
cursor: z11.string().regex(/^\d{1,6}$/).optional(),
|
|
815
|
+
ids: z11.array(z11.string().min(1).max(100)).max(50).optional()
|
|
673
816
|
}).strict();
|
|
674
|
-
var resourceOptionsSchema =
|
|
675
|
-
revision:
|
|
676
|
-
options:
|
|
677
|
-
|
|
678
|
-
id:
|
|
679
|
-
label:
|
|
680
|
-
description:
|
|
681
|
-
group:
|
|
682
|
-
disabledReason:
|
|
817
|
+
var resourceOptionsSchema = z11.object({
|
|
818
|
+
revision: z11.number().int(),
|
|
819
|
+
options: z11.array(
|
|
820
|
+
z11.object({
|
|
821
|
+
id: z11.string(),
|
|
822
|
+
label: z11.string(),
|
|
823
|
+
description: z11.string().optional(),
|
|
824
|
+
group: z11.string().optional(),
|
|
825
|
+
disabledReason: z11.string().optional()
|
|
683
826
|
})
|
|
684
827
|
),
|
|
685
|
-
cursor:
|
|
828
|
+
cursor: z11.string().nullable()
|
|
686
829
|
});
|
|
687
830
|
var discord = {
|
|
688
831
|
roles(options = {}) {
|
|
@@ -706,49 +849,49 @@ var pointLedgers = () => ({
|
|
|
706
849
|
});
|
|
707
850
|
|
|
708
851
|
// src/settings.ts
|
|
709
|
-
var instant =
|
|
710
|
-
var resourceId =
|
|
711
|
-
var base = { label:
|
|
712
|
-
var settingFieldSchema =
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
852
|
+
var instant = z12.iso.datetime({ offset: true }).transform((value) => new Date(value).toISOString());
|
|
853
|
+
var resourceId = z12.union([z12.literal(""), z12.string().regex(/^\S{1,200}$/)]);
|
|
854
|
+
var base = { label: z12.string().min(1), description: z12.string().optional() };
|
|
855
|
+
var settingFieldSchema = z12.discriminatedUnion("kind", [
|
|
856
|
+
z12.object({ ...base, kind: z12.literal("point-ledger"), default: identifier }).strict(),
|
|
857
|
+
z12.object({ ...base, kind: z12.literal("datetime"), default: instant }).strict(),
|
|
858
|
+
z12.object({
|
|
716
859
|
...base,
|
|
717
|
-
kind:
|
|
860
|
+
kind: z12.literal("resource"),
|
|
718
861
|
default: resourceId,
|
|
719
862
|
source: resourceSourceSchema
|
|
720
863
|
}).strict(),
|
|
721
|
-
|
|
722
|
-
|
|
864
|
+
z12.object({ ...base, kind: z12.literal("quiz"), default: quizContentSchema }).strict(),
|
|
865
|
+
z12.object({
|
|
723
866
|
...base,
|
|
724
|
-
kind:
|
|
725
|
-
default:
|
|
726
|
-
minLength:
|
|
727
|
-
maxLength:
|
|
728
|
-
multiline:
|
|
867
|
+
kind: z12.literal("text"),
|
|
868
|
+
default: z12.string(),
|
|
869
|
+
minLength: z12.number().int().nonnegative(),
|
|
870
|
+
maxLength: z12.number().int().positive(),
|
|
871
|
+
multiline: z12.boolean()
|
|
729
872
|
}).strict(),
|
|
730
|
-
|
|
873
|
+
z12.object({
|
|
731
874
|
...base,
|
|
732
|
-
kind:
|
|
733
|
-
default:
|
|
734
|
-
min:
|
|
735
|
-
max:
|
|
875
|
+
kind: z12.literal("integer"),
|
|
876
|
+
default: z12.number().int(),
|
|
877
|
+
min: z12.number().int(),
|
|
878
|
+
max: z12.number().int()
|
|
736
879
|
}).strict(),
|
|
737
|
-
|
|
738
|
-
|
|
880
|
+
z12.object({ ...base, kind: z12.literal("boolean"), default: z12.boolean() }).strict(),
|
|
881
|
+
z12.object({
|
|
739
882
|
...base,
|
|
740
|
-
kind:
|
|
741
|
-
default:
|
|
742
|
-
options:
|
|
883
|
+
kind: z12.literal("choice"),
|
|
884
|
+
default: z12.string(),
|
|
885
|
+
options: z12.array(z12.string().min(1)).min(1)
|
|
743
886
|
}).strict()
|
|
744
887
|
]);
|
|
745
|
-
var settingsFieldsSchema =
|
|
746
|
-
|
|
888
|
+
var settingsFieldsSchema = z12.record(
|
|
889
|
+
z12.string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/),
|
|
747
890
|
settingFieldSchema
|
|
748
891
|
);
|
|
749
|
-
var settingsValuesSchema =
|
|
750
|
-
|
|
751
|
-
|
|
892
|
+
var settingsValuesSchema = z12.record(
|
|
893
|
+
z12.string(),
|
|
894
|
+
z12.union([z12.string(), z12.number().finite(), z12.boolean(), quizContentSchema])
|
|
752
895
|
);
|
|
753
896
|
var settings = {
|
|
754
897
|
pointLedger(options) {
|
|
@@ -788,19 +931,19 @@ var settings = {
|
|
|
788
931
|
maxLength: options.maxLength ?? 2e3,
|
|
789
932
|
multiline: options.multiline ?? false
|
|
790
933
|
};
|
|
791
|
-
return
|
|
934
|
+
return z12.string().min(field.minLength).max(field.maxLength).default(field.default).meta(field);
|
|
792
935
|
},
|
|
793
936
|
integer(options) {
|
|
794
|
-
return
|
|
937
|
+
return z12.number().int().min(options.min).max(options.max).default(options.default).meta({ ...options, kind: "integer" });
|
|
795
938
|
},
|
|
796
939
|
boolean(options) {
|
|
797
|
-
return
|
|
940
|
+
return z12.boolean().default(options.default).meta({ ...options, kind: "boolean" });
|
|
798
941
|
},
|
|
799
942
|
choice(options) {
|
|
800
|
-
return
|
|
943
|
+
return z12.enum(options.options).default(options.default).meta({ ...options, kind: "choice" });
|
|
801
944
|
},
|
|
802
945
|
object(shape) {
|
|
803
|
-
return
|
|
946
|
+
return z12.object(shape).strict();
|
|
804
947
|
}
|
|
805
948
|
};
|
|
806
949
|
function parseSettings(fields, input) {
|
|
@@ -820,20 +963,20 @@ function parseSettings(fields, input) {
|
|
|
820
963
|
shape[key] = quizContentSchema.default(field.default);
|
|
821
964
|
break;
|
|
822
965
|
case "text":
|
|
823
|
-
shape[key] =
|
|
966
|
+
shape[key] = z12.string().min(field.minLength).max(field.maxLength).default(field.default);
|
|
824
967
|
break;
|
|
825
968
|
case "integer":
|
|
826
|
-
shape[key] =
|
|
969
|
+
shape[key] = z12.number().int().min(field.min).max(field.max).default(field.default);
|
|
827
970
|
break;
|
|
828
971
|
case "boolean":
|
|
829
|
-
shape[key] =
|
|
972
|
+
shape[key] = z12.boolean().default(field.default);
|
|
830
973
|
break;
|
|
831
974
|
case "choice":
|
|
832
|
-
shape[key] =
|
|
975
|
+
shape[key] = z12.enum(field.options).default(field.default);
|
|
833
976
|
break;
|
|
834
977
|
}
|
|
835
978
|
}
|
|
836
|
-
return settingsValuesSchema.parse(
|
|
979
|
+
return settingsValuesSchema.parse(z12.object(shape).strict().parse(input));
|
|
837
980
|
}
|
|
838
981
|
function missingResourceSettings(fields, values) {
|
|
839
982
|
return Object.entries(fields).filter(([key, field]) => field.kind === "resource" && !values[key]).map(([key]) => key);
|
|
@@ -843,42 +986,42 @@ function compatibleSettingKinds(previous, next) {
|
|
|
843
986
|
}
|
|
844
987
|
|
|
845
988
|
// src/schema.ts
|
|
846
|
-
var pointsRewardSchema =
|
|
847
|
-
kind:
|
|
989
|
+
var pointsRewardSchema = z13.object({
|
|
990
|
+
kind: z13.literal("points").default("points"),
|
|
848
991
|
balance: identifier,
|
|
849
|
-
amount:
|
|
992
|
+
amount: z13.number().int().min(0).max(1e4)
|
|
850
993
|
}).strict();
|
|
851
|
-
var tieredRewardDefinitionSchema =
|
|
994
|
+
var tieredRewardDefinitionSchema = z13.object({
|
|
852
995
|
id: identifier,
|
|
853
|
-
title:
|
|
854
|
-
tiers:
|
|
855
|
-
|
|
996
|
+
title: z13.string().min(1).max(120),
|
|
997
|
+
tiers: z13.array(
|
|
998
|
+
z13.object({ id: identifier, title: z13.string().min(1).max(120) }).strict()
|
|
856
999
|
).min(1).max(20).refine(
|
|
857
1000
|
(tiers) => new Set(tiers.map((t) => t.id)).size === tiers.length,
|
|
858
1001
|
"Tier IDs must be unique"
|
|
859
1002
|
),
|
|
860
|
-
inventory:
|
|
861
|
-
fulfillment:
|
|
1003
|
+
inventory: z13.object({ kind: z13.literal("untracked") }).strict(),
|
|
1004
|
+
fulfillment: z13.object({ kind: z13.literal("staff-handover") }).strict()
|
|
862
1005
|
}).strict();
|
|
863
|
-
var tieredRewardReferenceSchema =
|
|
1006
|
+
var tieredRewardReferenceSchema = z13.object({
|
|
864
1007
|
id: identifier,
|
|
865
1008
|
key: identifier.nullable()
|
|
866
1009
|
});
|
|
867
|
-
var tierRewardSchema =
|
|
868
|
-
kind:
|
|
1010
|
+
var tierRewardSchema = z13.object({
|
|
1011
|
+
kind: z13.literal("tier"),
|
|
869
1012
|
reward: tieredRewardDefinitionSchema,
|
|
870
1013
|
tier: identifier
|
|
871
1014
|
}).strict().refine(
|
|
872
1015
|
(value) => value.reward.tiers.some((t) => t.id === value.tier),
|
|
873
1016
|
"Unknown reward tier"
|
|
874
1017
|
);
|
|
875
|
-
var integrationRewardSchema =
|
|
876
|
-
kind:
|
|
877
|
-
provider:
|
|
878
|
-
action:
|
|
879
|
-
roleId:
|
|
1018
|
+
var integrationRewardSchema = z13.object({
|
|
1019
|
+
kind: z13.literal("integration"),
|
|
1020
|
+
provider: z13.literal("discord"),
|
|
1021
|
+
action: z13.literal("grant-role"),
|
|
1022
|
+
roleId: z13.string().regex(/^[0-9]{1,20}$/)
|
|
880
1023
|
}).strict();
|
|
881
|
-
var rewardSchema =
|
|
1024
|
+
var rewardSchema = z13.union([
|
|
882
1025
|
pointsRewardSchema,
|
|
883
1026
|
tierRewardSchema,
|
|
884
1027
|
integrationRewardSchema
|
|
@@ -889,70 +1032,71 @@ function rewardKey(reward) {
|
|
|
889
1032
|
}
|
|
890
1033
|
return reward.kind === "points" ? "points:" + reward.balance : "tier:" + reward.reward.id;
|
|
891
1034
|
}
|
|
892
|
-
var triggerSchema =
|
|
893
|
-
|
|
894
|
-
kind:
|
|
895
|
-
input:
|
|
1035
|
+
var triggerSchema = z13.union([
|
|
1036
|
+
z13.object({
|
|
1037
|
+
kind: z13.literal("manual"),
|
|
1038
|
+
input: z13.literal("text"),
|
|
896
1039
|
constraints: textOptionsSchema,
|
|
897
|
-
actor:
|
|
1040
|
+
actor: z13.enum(["member", "staff"]).optional()
|
|
898
1041
|
}).strict(),
|
|
899
|
-
|
|
900
|
-
kind:
|
|
901
|
-
input:
|
|
1042
|
+
z13.object({
|
|
1043
|
+
kind: z13.literal("manual"),
|
|
1044
|
+
input: z13.literal("url"),
|
|
902
1045
|
constraints: urlOptionsSchema,
|
|
903
|
-
actor:
|
|
1046
|
+
actor: z13.enum(["member", "staff"]).optional()
|
|
904
1047
|
}).strict(),
|
|
905
|
-
|
|
906
|
-
kind:
|
|
907
|
-
input:
|
|
908
|
-
actor:
|
|
1048
|
+
z13.object({
|
|
1049
|
+
kind: z13.literal("manual"),
|
|
1050
|
+
input: z13.enum(["photo", "quiz", "none"]),
|
|
1051
|
+
actor: z13.enum(["member", "staff"]).optional()
|
|
909
1052
|
}).strict(),
|
|
910
|
-
|
|
911
|
-
kind:
|
|
1053
|
+
z13.object({
|
|
1054
|
+
kind: z13.literal("automatic"),
|
|
912
1055
|
observation: observationTriggerSchema.optional(),
|
|
913
|
-
content: contentPolicySchema.optional()
|
|
1056
|
+
content: contentPolicySchema.optional(),
|
|
1057
|
+
tracker: trackerTriggerPolicySchema.optional()
|
|
914
1058
|
}).strict().refine(
|
|
915
|
-
(value) =>
|
|
1059
|
+
(value) => [value.observation, value.content, value.tracker].filter(Boolean).length <= 1,
|
|
916
1060
|
"Choose one automatic trigger source"
|
|
917
1061
|
)
|
|
918
1062
|
]);
|
|
919
|
-
var prerequisiteSchema =
|
|
920
|
-
var photoResultSchema =
|
|
921
|
-
kind:
|
|
922
|
-
reason:
|
|
1063
|
+
var prerequisiteSchema = z13.object({ quest: identifier, scope: z13.literal("ever") }).strict();
|
|
1064
|
+
var photoResultSchema = z13.object({
|
|
1065
|
+
kind: z13.enum(["pass", "fail", "unclear"]),
|
|
1066
|
+
reason: z13.string().min(1).max(2e3)
|
|
923
1067
|
}).strict();
|
|
924
|
-
var textReviewInputSchema =
|
|
925
|
-
text:
|
|
926
|
-
criteria:
|
|
1068
|
+
var textReviewInputSchema = z13.object({
|
|
1069
|
+
text: z13.string().min(1).max(16e3).refine((value) => value.trim().length > 0, "Text must not be blank"),
|
|
1070
|
+
criteria: z13.string().trim().min(1).max(2e3)
|
|
927
1071
|
}).strict();
|
|
928
1072
|
var textResultSchema = photoResultSchema;
|
|
929
|
-
var decisionSchema =
|
|
930
|
-
|
|
931
|
-
kind:
|
|
932
|
-
rewards:
|
|
1073
|
+
var decisionSchema = z13.discriminatedUnion("kind", [
|
|
1074
|
+
z13.object({
|
|
1075
|
+
kind: z13.literal("accept"),
|
|
1076
|
+
rewards: z13.array(rewardSchema).max(10),
|
|
933
1077
|
completionKey: completionKeySchema.optional()
|
|
934
1078
|
}).strict(),
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
kind:
|
|
938
|
-
reason:
|
|
939
|
-
rewards:
|
|
1079
|
+
z13.object({ kind: z13.literal("reject"), reason: z13.string().min(1).max(2e3) }).strict(),
|
|
1080
|
+
z13.object({
|
|
1081
|
+
kind: z13.literal("review"),
|
|
1082
|
+
reason: z13.string().min(1).max(2e3),
|
|
1083
|
+
rewards: z13.array(rewardSchema).max(10).optional(),
|
|
940
1084
|
completionKey: completionKeySchema.optional()
|
|
941
1085
|
}).strict()
|
|
942
1086
|
]);
|
|
943
|
-
var reviewModeSchema =
|
|
944
|
-
var storedReviewModeSchema =
|
|
1087
|
+
var reviewModeSchema = z13.enum(["workers-ai"]);
|
|
1088
|
+
var storedReviewModeSchema = z13.enum([
|
|
945
1089
|
"fixture-pass",
|
|
946
1090
|
"fixture-fail",
|
|
947
1091
|
"fixture-unclear",
|
|
948
1092
|
"fixture-error",
|
|
949
1093
|
"workers-ai"
|
|
950
1094
|
]);
|
|
951
|
-
var rewardBundleSchema =
|
|
1095
|
+
var rewardBundleSchema = z13.array(rewardSchema).max(10).refine(
|
|
952
1096
|
(rewards) => new Set(rewards.map(rewardKey)).size === rewards.length,
|
|
953
1097
|
"Use one entry per balance or shared reward"
|
|
954
1098
|
);
|
|
955
|
-
var mediaUrlSchema =
|
|
1099
|
+
var mediaUrlSchema = z13.string().max(2e3).refine((value) => {
|
|
956
1100
|
if (/^\/(?!\/)[^\\\s]*$/.test(value)) {
|
|
957
1101
|
return true;
|
|
958
1102
|
}
|
|
@@ -962,75 +1106,75 @@ var mediaUrlSchema = z12.string().max(2e3).refine((value) => {
|
|
|
962
1106
|
return false;
|
|
963
1107
|
}
|
|
964
1108
|
}, "Use an HTTPS URL or a same-site path beginning with /");
|
|
965
|
-
var questPresentationSchema =
|
|
1109
|
+
var questPresentationSchema = z13.object({
|
|
966
1110
|
quiz: quizQuestionsSchema.optional(),
|
|
967
|
-
instructions:
|
|
968
|
-
video:
|
|
1111
|
+
instructions: z13.string().max(4e3).optional(),
|
|
1112
|
+
video: z13.object({
|
|
969
1113
|
url: mediaUrlSchema,
|
|
970
1114
|
poster: mediaUrlSchema.optional(),
|
|
971
|
-
captions:
|
|
1115
|
+
captions: z13.object({
|
|
972
1116
|
url: mediaUrlSchema,
|
|
973
|
-
language:
|
|
974
|
-
label:
|
|
1117
|
+
language: z13.string().min(2).max(20),
|
|
1118
|
+
label: z13.string().min(1).max(80)
|
|
975
1119
|
}).strict().optional()
|
|
976
1120
|
}).strict().optional()
|
|
977
1121
|
}).strict();
|
|
978
|
-
var questDescriptionSchema =
|
|
1122
|
+
var questDescriptionSchema = z13.object({
|
|
979
1123
|
quest: identifier,
|
|
980
|
-
runtimeVersion:
|
|
981
|
-
title:
|
|
1124
|
+
runtimeVersion: z13.union([z13.literal(1), z13.literal(2)]).default(1),
|
|
1125
|
+
title: z13.string().min(1).max(120),
|
|
982
1126
|
presentation: questPresentationSchema.default({}),
|
|
983
|
-
integrations:
|
|
1127
|
+
integrations: z13.array(integrationProviderSchema).max(10).default([]),
|
|
984
1128
|
fields: settingsFieldsSchema,
|
|
985
1129
|
values: settingsValuesSchema,
|
|
986
1130
|
rewards: rewardBundleSchema,
|
|
987
|
-
humanReview:
|
|
1131
|
+
humanReview: z13.boolean(),
|
|
988
1132
|
trigger: triggerSchema,
|
|
989
1133
|
performance: contentPerformancePolicySchema.optional(),
|
|
990
|
-
requires:
|
|
1134
|
+
requires: z13.array(prerequisiteSchema).max(30).default([]),
|
|
991
1135
|
completion: completionPolicySchema,
|
|
992
|
-
visibility:
|
|
993
|
-
budgets:
|
|
1136
|
+
visibility: z13.enum(["visible", "hidden"]).default("visible"),
|
|
1137
|
+
budgets: z13.array(budgetSchema).max(20).default([])
|
|
994
1138
|
}).strict();
|
|
995
|
-
var artifactSchema =
|
|
1139
|
+
var artifactSchema = z13.object({ code: z13.string().min(1).max(1e6) }).strict();
|
|
996
1140
|
var releaseSchema = artifactSchema.extend({
|
|
997
1141
|
settings: settingsValuesSchema,
|
|
998
1142
|
provider: reviewModeSchema,
|
|
999
1143
|
expectedRelease: identifier.nullable().optional(),
|
|
1000
|
-
settingRenames:
|
|
1144
|
+
settingRenames: z13.record(z13.string(), z13.string()).optional()
|
|
1001
1145
|
}).strict();
|
|
1002
|
-
var batchReleaseSchema =
|
|
1003
|
-
var questSettingsInputSchema =
|
|
1146
|
+
var batchReleaseSchema = z13.object({ releases: z13.array(releaseSchema).min(1).max(50) }).strict();
|
|
1147
|
+
var questSettingsInputSchema = z13.object({
|
|
1004
1148
|
quest: identifier,
|
|
1005
1149
|
expectedRelease: identifier,
|
|
1006
1150
|
set: settingsValuesSchema,
|
|
1007
|
-
reset:
|
|
1151
|
+
reset: z13.array(z13.string())
|
|
1008
1152
|
}).strict();
|
|
1009
1153
|
var storedReleaseSchema = questDescriptionSchema.extend({
|
|
1010
1154
|
key: identifier.optional(),
|
|
1011
|
-
code:
|
|
1155
|
+
code: z13.string(),
|
|
1012
1156
|
provider: storedReviewModeSchema,
|
|
1013
1157
|
id: identifier,
|
|
1014
|
-
createdAt:
|
|
1015
|
-
legacy:
|
|
1016
|
-
origin:
|
|
1017
|
-
lifecycle:
|
|
1018
|
-
configuration:
|
|
1158
|
+
createdAt: z13.number(),
|
|
1159
|
+
legacy: z13.boolean().default(false),
|
|
1160
|
+
origin: z13.object({ typeVersion: identifier }).strict().optional(),
|
|
1161
|
+
lifecycle: z13.enum(["active", "paused", "archived"]).default("active"),
|
|
1162
|
+
configuration: z13.object({
|
|
1019
1163
|
defaults: settingsValuesSchema,
|
|
1020
1164
|
overrides: settingsValuesSchema,
|
|
1021
|
-
preserved:
|
|
1165
|
+
preserved: z13.array(z13.string())
|
|
1022
1166
|
}).strict().optional()
|
|
1023
1167
|
});
|
|
1024
|
-
var legacyReleaseSchema =
|
|
1168
|
+
var legacyReleaseSchema = z13.object({
|
|
1025
1169
|
quest: identifier,
|
|
1026
|
-
title:
|
|
1027
|
-
criteria:
|
|
1028
|
-
humanReview:
|
|
1170
|
+
title: z13.string(),
|
|
1171
|
+
criteria: z13.string(),
|
|
1172
|
+
humanReview: z13.boolean(),
|
|
1029
1173
|
rewards: rewardBundleSchema,
|
|
1030
|
-
code:
|
|
1174
|
+
code: z13.string(),
|
|
1031
1175
|
provider: storedReviewModeSchema,
|
|
1032
1176
|
id: identifier,
|
|
1033
|
-
createdAt:
|
|
1177
|
+
createdAt: z13.number()
|
|
1034
1178
|
}).transform((r) => {
|
|
1035
1179
|
const { criteria, ...stored } = r;
|
|
1036
1180
|
return storedReleaseSchema.parse({
|
|
@@ -1042,15 +1186,15 @@ var legacyReleaseSchema = z12.object({
|
|
|
1042
1186
|
legacy: true
|
|
1043
1187
|
});
|
|
1044
1188
|
});
|
|
1045
|
-
var publishedReleaseSchema =
|
|
1189
|
+
var publishedReleaseSchema = z13.union([
|
|
1046
1190
|
storedReleaseSchema,
|
|
1047
1191
|
legacyReleaseSchema
|
|
1048
1192
|
]);
|
|
1049
|
-
var templateSchema =
|
|
1050
|
-
code:
|
|
1193
|
+
var templateSchema = z13.object({
|
|
1194
|
+
code: z13.string(),
|
|
1051
1195
|
definition: questDescriptionSchema
|
|
1052
1196
|
});
|
|
1053
|
-
var quizAnswersSchema =
|
|
1197
|
+
var quizAnswersSchema = z13.record(identifier, identifier).refine(
|
|
1054
1198
|
(answers) => Object.keys(answers).length > 0 && Object.keys(answers).length <= 50,
|
|
1055
1199
|
"Provide between 1 and 50 answers"
|
|
1056
1200
|
).transform(
|
|
@@ -1058,33 +1202,33 @@ var quizAnswersSchema = z12.record(identifier, identifier).refine(
|
|
|
1058
1202
|
Object.entries(answers).sort(([a], [b]) => a.localeCompare(b))
|
|
1059
1203
|
)
|
|
1060
1204
|
);
|
|
1061
|
-
var quizEvidenceSchema =
|
|
1062
|
-
kind:
|
|
1205
|
+
var quizEvidenceSchema = z13.object({
|
|
1206
|
+
kind: z13.literal("quiz"),
|
|
1063
1207
|
release: identifier.optional(),
|
|
1064
1208
|
answers: quizAnswersSchema
|
|
1065
1209
|
}).strict();
|
|
1066
|
-
var submissionEvidenceSchema =
|
|
1210
|
+
var submissionEvidenceSchema = z13.union([
|
|
1067
1211
|
quizEvidenceSchema,
|
|
1068
1212
|
textEvidenceSchema,
|
|
1069
1213
|
urlEvidenceSchema
|
|
1070
1214
|
]);
|
|
1071
|
-
var submitSchema =
|
|
1215
|
+
var submitSchema = z13.object({
|
|
1072
1216
|
actionId: identifier,
|
|
1073
1217
|
quest: identifier,
|
|
1074
1218
|
member: identifier,
|
|
1075
1219
|
evidence: identifier.optional(),
|
|
1076
1220
|
input: submissionEvidenceSchema.optional(),
|
|
1077
1221
|
release: identifier.optional(),
|
|
1078
|
-
faultAfterReview:
|
|
1222
|
+
faultAfterReview: z13.boolean().optional()
|
|
1079
1223
|
}).strict();
|
|
1080
|
-
var attemptSchema =
|
|
1224
|
+
var attemptSchema = z13.object({
|
|
1081
1225
|
id: identifier,
|
|
1082
1226
|
release: identifier,
|
|
1083
1227
|
quest: identifier,
|
|
1084
1228
|
member: identifier,
|
|
1085
1229
|
evidence: identifier.nullable(),
|
|
1086
1230
|
input: submissionEvidenceSchema.optional(),
|
|
1087
|
-
status:
|
|
1231
|
+
status: z13.enum([
|
|
1088
1232
|
"queued",
|
|
1089
1233
|
"evaluating",
|
|
1090
1234
|
"accepted",
|
|
@@ -1093,70 +1237,70 @@ var attemptSchema = z12.object({
|
|
|
1093
1237
|
"needs-review",
|
|
1094
1238
|
"failed"
|
|
1095
1239
|
]),
|
|
1096
|
-
reason:
|
|
1097
|
-
retries:
|
|
1098
|
-
generation:
|
|
1099
|
-
completion:
|
|
1240
|
+
reason: z13.string().nullable(),
|
|
1241
|
+
retries: z13.number(),
|
|
1242
|
+
generation: z13.number(),
|
|
1243
|
+
completion: z13.string().nullable(),
|
|
1100
1244
|
reviewRewards: rewardBundleSchema.nullable().default(null),
|
|
1101
|
-
createdAt:
|
|
1245
|
+
createdAt: z13.number()
|
|
1102
1246
|
});
|
|
1103
|
-
var eventSchema =
|
|
1104
|
-
id:
|
|
1105
|
-
attempt:
|
|
1106
|
-
kind:
|
|
1107
|
-
detail:
|
|
1108
|
-
actor:
|
|
1109
|
-
at:
|
|
1247
|
+
var eventSchema = z13.object({
|
|
1248
|
+
id: z13.number(),
|
|
1249
|
+
attempt: z13.string().nullable(),
|
|
1250
|
+
kind: z13.string(),
|
|
1251
|
+
detail: z13.string(),
|
|
1252
|
+
actor: z13.string().nullable().default(null),
|
|
1253
|
+
at: z13.number()
|
|
1110
1254
|
});
|
|
1111
|
-
var pickupSelectionSchema =
|
|
1255
|
+
var pickupSelectionSchema = z13.object({
|
|
1112
1256
|
item: identifier,
|
|
1113
|
-
revision:
|
|
1257
|
+
revision: z13.number().int().nonnegative()
|
|
1114
1258
|
}).strict();
|
|
1115
|
-
var pickupAllocationSchema =
|
|
1259
|
+
var pickupAllocationSchema = z13.object({
|
|
1116
1260
|
item: identifier,
|
|
1117
|
-
label:
|
|
1261
|
+
label: z13.string().min(1).max(80)
|
|
1118
1262
|
}).strict();
|
|
1119
|
-
var pickupPolicySchema =
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
kind:
|
|
1123
|
-
tiers:
|
|
1124
|
-
|
|
1263
|
+
var pickupPolicySchema = z13.discriminatedUnion("kind", [
|
|
1264
|
+
z13.object({ kind: z13.literal("untracked") }).strict(),
|
|
1265
|
+
z13.object({
|
|
1266
|
+
kind: z13.literal("at-pickup"),
|
|
1267
|
+
tiers: z13.array(
|
|
1268
|
+
z13.object({
|
|
1125
1269
|
tier: identifier,
|
|
1126
|
-
variants:
|
|
1270
|
+
variants: z13.array(pickupAllocationSchema).min(1).max(100)
|
|
1127
1271
|
}).strict()
|
|
1128
1272
|
).min(1).max(100)
|
|
1129
1273
|
}).strict()
|
|
1130
1274
|
]);
|
|
1131
|
-
var pickupCatalogSchema =
|
|
1275
|
+
var pickupCatalogSchema = z13.object({
|
|
1132
1276
|
reward: tieredRewardDefinitionSchema,
|
|
1133
|
-
revision:
|
|
1277
|
+
revision: z13.number().int().nonnegative(),
|
|
1134
1278
|
policy: pickupPolicySchema
|
|
1135
1279
|
});
|
|
1136
|
-
var pickupAvailabilitySchema =
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
kind:
|
|
1140
|
-
revision:
|
|
1141
|
-
variants:
|
|
1280
|
+
var pickupAvailabilitySchema = z13.discriminatedUnion("kind", [
|
|
1281
|
+
z13.object({ kind: z13.literal("untracked") }).strict(),
|
|
1282
|
+
z13.object({
|
|
1283
|
+
kind: z13.literal("at-pickup"),
|
|
1284
|
+
revision: z13.number().int().nonnegative(),
|
|
1285
|
+
variants: z13.array(
|
|
1142
1286
|
pickupAllocationSchema.extend({
|
|
1143
|
-
available:
|
|
1287
|
+
available: z13.number().int().nonnegative()
|
|
1144
1288
|
})
|
|
1145
1289
|
)
|
|
1146
1290
|
}).strict()
|
|
1147
1291
|
]);
|
|
1148
|
-
var configurePickupSchema =
|
|
1292
|
+
var configurePickupSchema = z13.object({
|
|
1149
1293
|
reward: identifier,
|
|
1150
|
-
revision:
|
|
1294
|
+
revision: z13.number().int().nonnegative(),
|
|
1151
1295
|
actionId: identifier,
|
|
1152
|
-
policy:
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
kind:
|
|
1156
|
-
tiers:
|
|
1157
|
-
|
|
1296
|
+
policy: z13.discriminatedUnion("kind", [
|
|
1297
|
+
z13.object({ kind: z13.literal("untracked") }).strict(),
|
|
1298
|
+
z13.object({
|
|
1299
|
+
kind: z13.literal("at-pickup"),
|
|
1300
|
+
tiers: z13.array(
|
|
1301
|
+
z13.object({
|
|
1158
1302
|
tier: identifier,
|
|
1159
|
-
variants:
|
|
1303
|
+
variants: z13.array(
|
|
1160
1304
|
pickupAllocationSchema.extend({
|
|
1161
1305
|
item: identifier.optional()
|
|
1162
1306
|
})
|
|
@@ -1172,164 +1316,164 @@ var entitlementBase = {
|
|
|
1172
1316
|
reward: tieredRewardDefinitionSchema,
|
|
1173
1317
|
earnedTier: identifier,
|
|
1174
1318
|
tier: identifier,
|
|
1175
|
-
revision:
|
|
1319
|
+
revision: z13.number().int().positive()
|
|
1176
1320
|
};
|
|
1177
|
-
var entitlementSchema =
|
|
1178
|
-
|
|
1179
|
-
|
|
1321
|
+
var entitlementSchema = z13.discriminatedUnion("status", [
|
|
1322
|
+
z13.object({ ...entitlementBase, status: z13.literal("available") }).strict(),
|
|
1323
|
+
z13.object({
|
|
1180
1324
|
...entitlementBase,
|
|
1181
|
-
status:
|
|
1325
|
+
status: z13.literal("handing-over"),
|
|
1182
1326
|
handover: identifier,
|
|
1183
|
-
startedAt:
|
|
1327
|
+
startedAt: z13.number(),
|
|
1184
1328
|
allocation: pickupAllocationSchema.optional()
|
|
1185
1329
|
}).strict(),
|
|
1186
|
-
|
|
1330
|
+
z13.object({
|
|
1187
1331
|
...entitlementBase,
|
|
1188
|
-
status:
|
|
1332
|
+
status: z13.literal("collected"),
|
|
1189
1333
|
handover: identifier,
|
|
1190
|
-
startedAt:
|
|
1334
|
+
startedAt: z13.number(),
|
|
1191
1335
|
allocation: pickupAllocationSchema.optional(),
|
|
1192
|
-
collectedAt:
|
|
1336
|
+
collectedAt: z13.number()
|
|
1193
1337
|
}).strict()
|
|
1194
1338
|
]);
|
|
1195
|
-
var beginHandoverSchema =
|
|
1339
|
+
var beginHandoverSchema = z13.object({
|
|
1196
1340
|
actionId: identifier,
|
|
1197
|
-
revision:
|
|
1341
|
+
revision: z13.number().int().positive(),
|
|
1198
1342
|
selection: pickupSelectionSchema.optional()
|
|
1199
1343
|
}).strict();
|
|
1200
|
-
var confirmHandoverSchema =
|
|
1201
|
-
var completionRecordSchema =
|
|
1202
|
-
key:
|
|
1344
|
+
var confirmHandoverSchema = z13.object({ actionId: identifier, handover: identifier }).strict();
|
|
1345
|
+
var completionRecordSchema = z13.object({
|
|
1346
|
+
key: z13.string().default("once"),
|
|
1203
1347
|
id: identifier,
|
|
1204
1348
|
quest: identifier,
|
|
1205
1349
|
member: identifier
|
|
1206
1350
|
});
|
|
1207
|
-
var questAvailabilitySchema =
|
|
1208
|
-
|
|
1209
|
-
kind:
|
|
1210
|
-
input:
|
|
1351
|
+
var questAvailabilitySchema = z13.discriminatedUnion("kind", [
|
|
1352
|
+
z13.object({
|
|
1353
|
+
kind: z13.literal("available"),
|
|
1354
|
+
input: z13.enum(["photo", "quiz", "none", "text", "url"])
|
|
1211
1355
|
}).strict(),
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
kind:
|
|
1215
|
-
missing:
|
|
1356
|
+
z13.object({ kind: z13.literal("completed") }).strict(),
|
|
1357
|
+
z13.object({
|
|
1358
|
+
kind: z13.literal("locked"),
|
|
1359
|
+
missing: z13.array(z13.object({ quest: identifier, title: z13.string() })).min(1)
|
|
1216
1360
|
}).strict(),
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
kind:
|
|
1361
|
+
z13.object({ kind: z13.literal("staff-required") }).strict(),
|
|
1362
|
+
z13.object({
|
|
1363
|
+
kind: z13.literal("automatic"),
|
|
1220
1364
|
observation: observationTriggerSchema.optional()
|
|
1221
1365
|
}).strict(),
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1366
|
+
z13.object({ kind: z13.literal("checking"), attempt: identifier }).strict(),
|
|
1367
|
+
z13.object({ kind: z13.literal("needs-review"), attempt: identifier }).strict(),
|
|
1368
|
+
z13.object({ kind: z13.literal("retryable"), attempt: identifier }).strict()
|
|
1225
1369
|
]);
|
|
1226
|
-
var memberProgressSchema =
|
|
1370
|
+
var memberProgressSchema = z13.object({
|
|
1227
1371
|
member: identifier,
|
|
1228
|
-
quests:
|
|
1229
|
-
|
|
1372
|
+
quests: z13.array(
|
|
1373
|
+
z13.object({
|
|
1230
1374
|
quest: identifier,
|
|
1231
1375
|
key: identifier.optional(),
|
|
1232
1376
|
release: identifier.optional(),
|
|
1233
|
-
title:
|
|
1377
|
+
title: z13.string(),
|
|
1234
1378
|
presentation: questPresentationSchema.default({}),
|
|
1235
|
-
connections:
|
|
1379
|
+
connections: z13.array(authProviderSchema).default([]),
|
|
1236
1380
|
trigger: triggerSchema,
|
|
1237
1381
|
availability: questAvailabilitySchema,
|
|
1238
|
-
completed:
|
|
1382
|
+
completed: z13.boolean(),
|
|
1239
1383
|
completion: completionPolicySchema.default({ kind: "once" }),
|
|
1240
1384
|
streak: streakProgressSchema.nullable().optional(),
|
|
1241
|
-
completionCount:
|
|
1242
|
-
visibility:
|
|
1243
|
-
missing:
|
|
1385
|
+
completionCount: z13.number().int().nonnegative().default(0),
|
|
1386
|
+
visibility: z13.enum(["visible", "hidden"]).default("visible"),
|
|
1387
|
+
missing: z13.array(z13.object({ quest: identifier, title: z13.string() })),
|
|
1244
1388
|
attempt: attemptSchema.nullable()
|
|
1245
1389
|
})
|
|
1246
1390
|
),
|
|
1247
|
-
entitlements:
|
|
1391
|
+
entitlements: z13.array(entitlementSchema)
|
|
1248
1392
|
});
|
|
1249
|
-
var snapshotSchema =
|
|
1250
|
-
releases:
|
|
1251
|
-
completions:
|
|
1252
|
-
entitlements:
|
|
1253
|
-
attempts:
|
|
1254
|
-
balances:
|
|
1255
|
-
|
|
1256
|
-
member:
|
|
1257
|
-
balance:
|
|
1258
|
-
earned:
|
|
1259
|
-
held:
|
|
1260
|
-
available:
|
|
1393
|
+
var snapshotSchema = z13.object({
|
|
1394
|
+
releases: z13.array(publishedReleaseSchema),
|
|
1395
|
+
completions: z13.array(completionRecordSchema),
|
|
1396
|
+
entitlements: z13.array(entitlementSchema),
|
|
1397
|
+
attempts: z13.array(attemptSchema),
|
|
1398
|
+
balances: z13.array(
|
|
1399
|
+
z13.object({
|
|
1400
|
+
member: z13.string(),
|
|
1401
|
+
balance: z13.string(),
|
|
1402
|
+
earned: z13.number(),
|
|
1403
|
+
held: z13.number(),
|
|
1404
|
+
available: z13.number()
|
|
1261
1405
|
})
|
|
1262
1406
|
),
|
|
1263
|
-
events:
|
|
1407
|
+
events: z13.array(eventSchema)
|
|
1264
1408
|
});
|
|
1265
|
-
var evidenceSchema =
|
|
1409
|
+
var evidenceSchema = z13.object({
|
|
1266
1410
|
id: identifier,
|
|
1267
1411
|
member: identifier,
|
|
1268
|
-
type:
|
|
1269
|
-
size:
|
|
1412
|
+
type: z13.enum(["image/jpeg", "image/png"]),
|
|
1413
|
+
size: z13.number()
|
|
1270
1414
|
});
|
|
1271
|
-
var errorSchema =
|
|
1272
|
-
error:
|
|
1273
|
-
code:
|
|
1274
|
-
missing:
|
|
1415
|
+
var errorSchema = z13.object({
|
|
1416
|
+
error: z13.string(),
|
|
1417
|
+
code: z13.enum(["stale-quiz", "quest-updated", "invalid-submission"]).optional(),
|
|
1418
|
+
missing: z13.array(z13.object({ quest: identifier, title: z13.string() })).optional()
|
|
1275
1419
|
});
|
|
1276
|
-
var staffDecisionSchema =
|
|
1420
|
+
var staffDecisionSchema = z13.object({
|
|
1277
1421
|
actionId: identifier,
|
|
1278
|
-
generation:
|
|
1279
|
-
decision:
|
|
1280
|
-
reason:
|
|
1422
|
+
generation: z13.number().int().nonnegative(),
|
|
1423
|
+
decision: z13.enum(["accept", "reject"]),
|
|
1424
|
+
reason: z13.string().trim().min(1).max(2e3)
|
|
1281
1425
|
}).strict();
|
|
1282
|
-
var stockSchema =
|
|
1283
|
-
var reservationSchema =
|
|
1426
|
+
var stockSchema = z13.object({ item: identifier, quantity: z13.number().int().min(0).max(1e4) }).strict();
|
|
1427
|
+
var reservationSchema = z13.object({
|
|
1284
1428
|
actionId: identifier,
|
|
1285
1429
|
member: identifier,
|
|
1286
1430
|
item: identifier,
|
|
1287
1431
|
balance: identifier,
|
|
1288
|
-
price:
|
|
1432
|
+
price: z13.number().int().positive().max(1e4)
|
|
1289
1433
|
}).strict();
|
|
1290
1434
|
var pageOptions = {
|
|
1291
|
-
limit:
|
|
1292
|
-
cursor:
|
|
1435
|
+
limit: z13.number().int().min(1).max(100).default(25),
|
|
1436
|
+
cursor: z13.string().min(1).max(4096).optional()
|
|
1293
1437
|
};
|
|
1294
|
-
var reviewListSchema =
|
|
1438
|
+
var reviewListSchema = z13.object({
|
|
1295
1439
|
...pageOptions,
|
|
1296
1440
|
member: identifier.optional(),
|
|
1297
1441
|
quest: identifier.optional()
|
|
1298
1442
|
}).strict();
|
|
1299
|
-
var memberListSchema =
|
|
1443
|
+
var memberListSchema = z13.object({
|
|
1300
1444
|
...pageOptions,
|
|
1301
1445
|
prefix: identifier.optional()
|
|
1302
1446
|
}).strict();
|
|
1303
|
-
var reviewItemSchema =
|
|
1447
|
+
var reviewItemSchema = z13.object({
|
|
1304
1448
|
attempt: attemptSchema,
|
|
1305
|
-
title:
|
|
1306
|
-
checks:
|
|
1307
|
-
|
|
1449
|
+
title: z13.string(),
|
|
1450
|
+
checks: z13.array(
|
|
1451
|
+
z13.object({ criteria: z13.string(), result: photoResultSchema })
|
|
1308
1452
|
)
|
|
1309
1453
|
});
|
|
1310
|
-
var reviewPageSchema =
|
|
1311
|
-
items:
|
|
1312
|
-
nextCursor:
|
|
1454
|
+
var reviewPageSchema = z13.object({
|
|
1455
|
+
items: z13.array(reviewItemSchema).max(100),
|
|
1456
|
+
nextCursor: z13.string().nullable()
|
|
1313
1457
|
});
|
|
1314
|
-
var memberPageSchema =
|
|
1315
|
-
items:
|
|
1316
|
-
nextCursor:
|
|
1458
|
+
var memberPageSchema = z13.object({
|
|
1459
|
+
items: z13.array(z13.object({ member: identifier })).max(100),
|
|
1460
|
+
nextCursor: z13.string().nullable()
|
|
1317
1461
|
});
|
|
1318
|
-
var createStockItemSchema =
|
|
1319
|
-
var stockItemSchema =
|
|
1320
|
-
var contentPerformanceSnapshotSchema =
|
|
1462
|
+
var createStockItemSchema = z13.object({ actionId: identifier, name: z13.string().trim().min(1).max(80) }).strict();
|
|
1463
|
+
var stockItemSchema = z13.object({ id: identifier, name: z13.string() });
|
|
1464
|
+
var contentPerformanceSnapshotSchema = z13.strictObject({
|
|
1321
1465
|
contentAttempt: identifier,
|
|
1322
1466
|
observation: identifier,
|
|
1323
|
-
observedAt:
|
|
1467
|
+
observedAt: z13.number().int().safe().nonnegative(),
|
|
1324
1468
|
metrics: contentMetricsSchema,
|
|
1325
1469
|
rewards: rewardBundleSchema
|
|
1326
1470
|
});
|
|
1327
1471
|
var contentPerformanceQuerySchema = contentQualificationQuerySchema.extend({
|
|
1328
|
-
content:
|
|
1472
|
+
content: z13.string().min(1).max(256)
|
|
1329
1473
|
});
|
|
1330
|
-
var contentPerformancePageSchema =
|
|
1331
|
-
current:
|
|
1332
|
-
state:
|
|
1474
|
+
var contentPerformancePageSchema = z13.strictObject({
|
|
1475
|
+
current: z13.strictObject({
|
|
1476
|
+
state: z13.enum([
|
|
1333
1477
|
"content-pending",
|
|
1334
1478
|
"content-unqualified",
|
|
1335
1479
|
"waiting",
|
|
@@ -1340,19 +1484,19 @@ var contentPerformancePageSchema = z12.strictObject({
|
|
|
1340
1484
|
"failed",
|
|
1341
1485
|
"superseded"
|
|
1342
1486
|
]),
|
|
1343
|
-
reason:
|
|
1487
|
+
reason: z13.string().nullable(),
|
|
1344
1488
|
contentAttempt: identifier,
|
|
1345
1489
|
attempt: identifier.nullable(),
|
|
1346
1490
|
reward: contentQualificationSchema.shape.reward
|
|
1347
1491
|
}),
|
|
1348
|
-
items:
|
|
1349
|
-
|
|
1492
|
+
items: z13.array(
|
|
1493
|
+
z13.strictObject({
|
|
1350
1494
|
attempt: identifier,
|
|
1351
1495
|
contentAttempt: identifier,
|
|
1352
1496
|
observation: identifier,
|
|
1353
|
-
observedAt:
|
|
1497
|
+
observedAt: z13.number(),
|
|
1354
1498
|
metrics: contentMetricsSchema,
|
|
1355
|
-
state:
|
|
1499
|
+
state: z13.enum([
|
|
1356
1500
|
"pending",
|
|
1357
1501
|
"qualified",
|
|
1358
1502
|
"unqualified",
|
|
@@ -1360,10 +1504,10 @@ var contentPerformancePageSchema = z12.strictObject({
|
|
|
1360
1504
|
"failed",
|
|
1361
1505
|
"superseded"
|
|
1362
1506
|
]),
|
|
1363
|
-
reason:
|
|
1507
|
+
reason: z13.string().nullable()
|
|
1364
1508
|
})
|
|
1365
1509
|
),
|
|
1366
|
-
next:
|
|
1510
|
+
next: z13.number().int().positive().safe().nullable()
|
|
1367
1511
|
});
|
|
1368
1512
|
|
|
1369
1513
|
export {
|
|
@@ -1372,6 +1516,7 @@ export {
|
|
|
1372
1516
|
xContentBodySchema,
|
|
1373
1517
|
trackerContentQuerySchema,
|
|
1374
1518
|
trackerContentReadSchema,
|
|
1519
|
+
trackerEvidenceSchema,
|
|
1375
1520
|
trackerContentSchema,
|
|
1376
1521
|
trackerSourceSchema,
|
|
1377
1522
|
x,
|
|
@@ -1386,6 +1531,10 @@ export {
|
|
|
1386
1531
|
trackerRecordSchema,
|
|
1387
1532
|
trackerIngestSchema,
|
|
1388
1533
|
trackerIngestResultSchema,
|
|
1534
|
+
trackerOutcomeSchema,
|
|
1535
|
+
trackerOutcomeQuerySchema,
|
|
1536
|
+
trackerOutcomePageSchema,
|
|
1537
|
+
trackerOutcomeRetrySchema,
|
|
1389
1538
|
trackerQuerySchema,
|
|
1390
1539
|
trackerPageSchema,
|
|
1391
1540
|
trackerSummarySchema,
|
|
@@ -1414,6 +1563,11 @@ export {
|
|
|
1414
1563
|
streakPolicySchema,
|
|
1415
1564
|
streak,
|
|
1416
1565
|
streakProgressSchema,
|
|
1566
|
+
trackerBeneficiarySchema,
|
|
1567
|
+
trackerTriggerPolicySchema,
|
|
1568
|
+
trackerAttributionSchema,
|
|
1569
|
+
trackerTriggerRecordSchema,
|
|
1570
|
+
trackerTriggerContextSchema,
|
|
1417
1571
|
observationInputSchema,
|
|
1418
1572
|
observationSchema,
|
|
1419
1573
|
observationTriggerSchema,
|