@domino-sdk/relay 0.15.0 → 0.16.1

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/schema.d.ts CHANGED
@@ -76,6 +76,29 @@ declare const rewardSchema: z.ZodUnion<readonly [z.ZodObject<{
76
76
  type Reward = z.infer<typeof rewardSchema>;
77
77
  declare function rewardKey(reward: Reward): string;
78
78
  declare const triggerSchema: z.ZodUnion<readonly [z.ZodObject<{
79
+ kind: z.ZodLiteral<"manual">;
80
+ input: z.ZodLiteral<"text">;
81
+ constraints: z.ZodObject<{
82
+ required: z.ZodDefault<z.ZodBoolean>;
83
+ minLength: z.ZodDefault<z.ZodNumber>;
84
+ maxLength: z.ZodDefault<z.ZodNumber>;
85
+ }, z.core.$strict>;
86
+ actor: z.ZodOptional<z.ZodEnum<{
87
+ staff: "staff";
88
+ member: "member";
89
+ }>>;
90
+ }, z.core.$strict>, z.ZodObject<{
91
+ kind: z.ZodLiteral<"manual">;
92
+ input: z.ZodLiteral<"url">;
93
+ constraints: z.ZodObject<{
94
+ required: z.ZodDefault<z.ZodBoolean>;
95
+ allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
96
+ }, z.core.$strict>;
97
+ actor: z.ZodOptional<z.ZodEnum<{
98
+ staff: "staff";
99
+ member: "member";
100
+ }>>;
101
+ }, z.core.$strict>, z.ZodObject<{
79
102
  kind: z.ZodLiteral<"manual">;
80
103
  input: z.ZodEnum<{
81
104
  photo: "photo";
@@ -106,6 +129,21 @@ declare const photoResultSchema: z.ZodObject<{
106
129
  reason: z.ZodString;
107
130
  }, z.core.$strict>;
108
131
  type PhotoResult = z.infer<typeof photoResultSchema>;
132
+ /** Text is evidence, never an instruction source. Lengths use JavaScript string units. */
133
+ declare const textReviewInputSchema: z.ZodObject<{
134
+ text: z.ZodString;
135
+ criteria: z.ZodString;
136
+ }, z.core.$strict>;
137
+ type TextReviewInput = z.infer<typeof textReviewInputSchema>;
138
+ declare const textResultSchema: z.ZodObject<{
139
+ kind: z.ZodEnum<{
140
+ pass: "pass";
141
+ fail: "fail";
142
+ unclear: "unclear";
143
+ }>;
144
+ reason: z.ZodString;
145
+ }, z.core.$strict>;
146
+ type TextResult = z.infer<typeof textResultSchema>;
109
147
  declare const decisionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
110
148
  kind: z.ZodLiteral<"accept">;
111
149
  rewards: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
@@ -366,6 +404,29 @@ declare const questDescriptionSchema: z.ZodObject<{
366
404
  }, z.core.$strict>]>>;
367
405
  humanReview: z.ZodBoolean;
368
406
  trigger: z.ZodUnion<readonly [z.ZodObject<{
407
+ kind: z.ZodLiteral<"manual">;
408
+ input: z.ZodLiteral<"text">;
409
+ constraints: z.ZodObject<{
410
+ required: z.ZodDefault<z.ZodBoolean>;
411
+ minLength: z.ZodDefault<z.ZodNumber>;
412
+ maxLength: z.ZodDefault<z.ZodNumber>;
413
+ }, z.core.$strict>;
414
+ actor: z.ZodOptional<z.ZodEnum<{
415
+ staff: "staff";
416
+ member: "member";
417
+ }>>;
418
+ }, z.core.$strict>, z.ZodObject<{
419
+ kind: z.ZodLiteral<"manual">;
420
+ input: z.ZodLiteral<"url">;
421
+ constraints: z.ZodObject<{
422
+ required: z.ZodDefault<z.ZodBoolean>;
423
+ allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
424
+ }, z.core.$strict>;
425
+ actor: z.ZodOptional<z.ZodEnum<{
426
+ staff: "staff";
427
+ member: "member";
428
+ }>>;
429
+ }, z.core.$strict>, z.ZodObject<{
369
430
  kind: z.ZodLiteral<"manual">;
370
431
  input: z.ZodEnum<{
371
432
  photo: "photo";
@@ -607,6 +668,29 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
607
668
  }, z.core.$strict>]>>;
608
669
  humanReview: z.ZodBoolean;
609
670
  trigger: z.ZodUnion<readonly [z.ZodObject<{
671
+ kind: z.ZodLiteral<"manual">;
672
+ input: z.ZodLiteral<"text">;
673
+ constraints: z.ZodObject<{
674
+ required: z.ZodDefault<z.ZodBoolean>;
675
+ minLength: z.ZodDefault<z.ZodNumber>;
676
+ maxLength: z.ZodDefault<z.ZodNumber>;
677
+ }, z.core.$strict>;
678
+ actor: z.ZodOptional<z.ZodEnum<{
679
+ staff: "staff";
680
+ member: "member";
681
+ }>>;
682
+ }, z.core.$strict>, z.ZodObject<{
683
+ kind: z.ZodLiteral<"manual">;
684
+ input: z.ZodLiteral<"url">;
685
+ constraints: z.ZodObject<{
686
+ required: z.ZodDefault<z.ZodBoolean>;
687
+ allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
688
+ }, z.core.$strict>;
689
+ actor: z.ZodOptional<z.ZodEnum<{
690
+ staff: "staff";
691
+ member: "member";
692
+ }>>;
693
+ }, z.core.$strict>, z.ZodObject<{
610
694
  kind: z.ZodLiteral<"manual">;
611
695
  input: z.ZodEnum<{
612
696
  photo: "photo";
@@ -869,6 +953,23 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
869
953
  })[];
870
954
  humanReview: boolean;
871
955
  trigger: {
956
+ kind: "manual";
957
+ input: "text";
958
+ constraints: {
959
+ required: boolean;
960
+ minLength: number;
961
+ maxLength: number;
962
+ };
963
+ actor?: "staff" | "member" | undefined;
964
+ } | {
965
+ kind: "manual";
966
+ input: "url";
967
+ constraints: {
968
+ required: boolean;
969
+ allowedHosts?: string[] | undefined;
970
+ };
971
+ actor?: "staff" | "member" | undefined;
972
+ } | {
872
973
  kind: "manual";
873
974
  input: "photo" | "quiz" | "none";
874
975
  actor?: "staff" | "member" | undefined;
@@ -1108,6 +1209,29 @@ declare const templateSchema: z.ZodObject<{
1108
1209
  }, z.core.$strict>]>>;
1109
1210
  humanReview: z.ZodBoolean;
1110
1211
  trigger: z.ZodUnion<readonly [z.ZodObject<{
1212
+ kind: z.ZodLiteral<"manual">;
1213
+ input: z.ZodLiteral<"text">;
1214
+ constraints: z.ZodObject<{
1215
+ required: z.ZodDefault<z.ZodBoolean>;
1216
+ minLength: z.ZodDefault<z.ZodNumber>;
1217
+ maxLength: z.ZodDefault<z.ZodNumber>;
1218
+ }, z.core.$strict>;
1219
+ actor: z.ZodOptional<z.ZodEnum<{
1220
+ staff: "staff";
1221
+ member: "member";
1222
+ }>>;
1223
+ }, z.core.$strict>, z.ZodObject<{
1224
+ kind: z.ZodLiteral<"manual">;
1225
+ input: z.ZodLiteral<"url">;
1226
+ constraints: z.ZodObject<{
1227
+ required: z.ZodDefault<z.ZodBoolean>;
1228
+ allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
1229
+ }, z.core.$strict>;
1230
+ actor: z.ZodOptional<z.ZodEnum<{
1231
+ staff: "staff";
1232
+ member: "member";
1233
+ }>>;
1234
+ }, z.core.$strict>, z.ZodObject<{
1111
1235
  kind: z.ZodLiteral<"manual">;
1112
1236
  input: z.ZodEnum<{
1113
1237
  photo: "photo";
@@ -1170,18 +1294,38 @@ declare const quizEvidenceSchema: z.ZodObject<{
1170
1294
  }, Record<string, string>>>;
1171
1295
  }, z.core.$strict>;
1172
1296
  type QuizEvidence = z.infer<typeof quizEvidenceSchema>;
1297
+ declare const submissionEvidenceSchema: z.ZodUnion<readonly [z.ZodObject<{
1298
+ kind: z.ZodLiteral<"quiz">;
1299
+ release: z.ZodOptional<z.ZodString>;
1300
+ answers: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<{
1301
+ [k: string]: string;
1302
+ }, Record<string, string>>>;
1303
+ }, z.core.$strict>, z.ZodObject<{
1304
+ kind: z.ZodLiteral<"text">;
1305
+ value: z.ZodString;
1306
+ }, z.core.$strict>, z.ZodObject<{
1307
+ kind: z.ZodLiteral<"url">;
1308
+ value: z.ZodString;
1309
+ }, z.core.$strict>]>;
1310
+ type SubmissionEvidence = z.infer<typeof submissionEvidenceSchema>;
1173
1311
  declare const submitSchema: z.ZodObject<{
1174
1312
  actionId: z.ZodString;
1175
1313
  quest: z.ZodString;
1176
1314
  member: z.ZodString;
1177
1315
  evidence: z.ZodOptional<z.ZodString>;
1178
- input: z.ZodOptional<z.ZodObject<{
1316
+ input: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1179
1317
  kind: z.ZodLiteral<"quiz">;
1180
1318
  release: z.ZodOptional<z.ZodString>;
1181
1319
  answers: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<{
1182
1320
  [k: string]: string;
1183
1321
  }, Record<string, string>>>;
1184
- }, z.core.$strict>>;
1322
+ }, z.core.$strict>, z.ZodObject<{
1323
+ kind: z.ZodLiteral<"text">;
1324
+ value: z.ZodString;
1325
+ }, z.core.$strict>, z.ZodObject<{
1326
+ kind: z.ZodLiteral<"url">;
1327
+ value: z.ZodString;
1328
+ }, z.core.$strict>]>>;
1185
1329
  release: z.ZodOptional<z.ZodString>;
1186
1330
  faultAfterReview: z.ZodOptional<z.ZodBoolean>;
1187
1331
  }, z.core.$strict>;
@@ -1192,13 +1336,19 @@ declare const attemptSchema: z.ZodObject<{
1192
1336
  quest: z.ZodString;
1193
1337
  member: z.ZodString;
1194
1338
  evidence: z.ZodNullable<z.ZodString>;
1195
- input: z.ZodOptional<z.ZodObject<{
1339
+ input: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1196
1340
  kind: z.ZodLiteral<"quiz">;
1197
1341
  release: z.ZodOptional<z.ZodString>;
1198
1342
  answers: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<{
1199
1343
  [k: string]: string;
1200
1344
  }, Record<string, string>>>;
1201
- }, z.core.$strict>>;
1345
+ }, z.core.$strict>, z.ZodObject<{
1346
+ kind: z.ZodLiteral<"text">;
1347
+ value: z.ZodString;
1348
+ }, z.core.$strict>, z.ZodObject<{
1349
+ kind: z.ZodLiteral<"url">;
1350
+ value: z.ZodString;
1351
+ }, z.core.$strict>]>>;
1202
1352
  status: z.ZodEnum<{
1203
1353
  queued: "queued";
1204
1354
  evaluating: "evaluating";
@@ -1427,6 +1577,8 @@ declare const completionRecordSchema: z.ZodObject<{
1427
1577
  declare const questAvailabilitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1428
1578
  kind: z.ZodLiteral<"available">;
1429
1579
  input: z.ZodEnum<{
1580
+ text: "text";
1581
+ url: "url";
1430
1582
  photo: "photo";
1431
1583
  quiz: "quiz";
1432
1584
  none: "none";
@@ -1492,6 +1644,29 @@ declare const memberProgressSchema: z.ZodObject<{
1492
1644
  x: "x";
1493
1645
  }>>>;
1494
1646
  trigger: z.ZodUnion<readonly [z.ZodObject<{
1647
+ kind: z.ZodLiteral<"manual">;
1648
+ input: z.ZodLiteral<"text">;
1649
+ constraints: z.ZodObject<{
1650
+ required: z.ZodDefault<z.ZodBoolean>;
1651
+ minLength: z.ZodDefault<z.ZodNumber>;
1652
+ maxLength: z.ZodDefault<z.ZodNumber>;
1653
+ }, z.core.$strict>;
1654
+ actor: z.ZodOptional<z.ZodEnum<{
1655
+ staff: "staff";
1656
+ member: "member";
1657
+ }>>;
1658
+ }, z.core.$strict>, z.ZodObject<{
1659
+ kind: z.ZodLiteral<"manual">;
1660
+ input: z.ZodLiteral<"url">;
1661
+ constraints: z.ZodObject<{
1662
+ required: z.ZodDefault<z.ZodBoolean>;
1663
+ allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
1664
+ }, z.core.$strict>;
1665
+ actor: z.ZodOptional<z.ZodEnum<{
1666
+ staff: "staff";
1667
+ member: "member";
1668
+ }>>;
1669
+ }, z.core.$strict>, z.ZodObject<{
1495
1670
  kind: z.ZodLiteral<"manual">;
1496
1671
  input: z.ZodEnum<{
1497
1672
  photo: "photo";
@@ -1512,6 +1687,8 @@ declare const memberProgressSchema: z.ZodObject<{
1512
1687
  availability: z.ZodDiscriminatedUnion<[z.ZodObject<{
1513
1688
  kind: z.ZodLiteral<"available">;
1514
1689
  input: z.ZodEnum<{
1690
+ text: "text";
1691
+ url: "url";
1515
1692
  photo: "photo";
1516
1693
  quiz: "quiz";
1517
1694
  none: "none";
@@ -1597,13 +1774,19 @@ declare const memberProgressSchema: z.ZodObject<{
1597
1774
  quest: z.ZodString;
1598
1775
  member: z.ZodString;
1599
1776
  evidence: z.ZodNullable<z.ZodString>;
1600
- input: z.ZodOptional<z.ZodObject<{
1777
+ input: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1601
1778
  kind: z.ZodLiteral<"quiz">;
1602
1779
  release: z.ZodOptional<z.ZodString>;
1603
1780
  answers: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<{
1604
1781
  [k: string]: string;
1605
1782
  }, Record<string, string>>>;
1606
- }, z.core.$strict>>;
1783
+ }, z.core.$strict>, z.ZodObject<{
1784
+ kind: z.ZodLiteral<"text">;
1785
+ value: z.ZodString;
1786
+ }, z.core.$strict>, z.ZodObject<{
1787
+ kind: z.ZodLiteral<"url">;
1788
+ value: z.ZodString;
1789
+ }, z.core.$strict>]>>;
1607
1790
  status: z.ZodEnum<{
1608
1791
  queued: "queued";
1609
1792
  evaluating: "evaluating";
@@ -1861,6 +2044,29 @@ declare const snapshotSchema: z.ZodObject<{
1861
2044
  }, z.core.$strict>]>>;
1862
2045
  humanReview: z.ZodBoolean;
1863
2046
  trigger: z.ZodUnion<readonly [z.ZodObject<{
2047
+ kind: z.ZodLiteral<"manual">;
2048
+ input: z.ZodLiteral<"text">;
2049
+ constraints: z.ZodObject<{
2050
+ required: z.ZodDefault<z.ZodBoolean>;
2051
+ minLength: z.ZodDefault<z.ZodNumber>;
2052
+ maxLength: z.ZodDefault<z.ZodNumber>;
2053
+ }, z.core.$strict>;
2054
+ actor: z.ZodOptional<z.ZodEnum<{
2055
+ staff: "staff";
2056
+ member: "member";
2057
+ }>>;
2058
+ }, z.core.$strict>, z.ZodObject<{
2059
+ kind: z.ZodLiteral<"manual">;
2060
+ input: z.ZodLiteral<"url">;
2061
+ constraints: z.ZodObject<{
2062
+ required: z.ZodDefault<z.ZodBoolean>;
2063
+ allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
2064
+ }, z.core.$strict>;
2065
+ actor: z.ZodOptional<z.ZodEnum<{
2066
+ staff: "staff";
2067
+ member: "member";
2068
+ }>>;
2069
+ }, z.core.$strict>, z.ZodObject<{
1864
2070
  kind: z.ZodLiteral<"manual">;
1865
2071
  input: z.ZodEnum<{
1866
2072
  photo: "photo";
@@ -2123,6 +2329,23 @@ declare const snapshotSchema: z.ZodObject<{
2123
2329
  })[];
2124
2330
  humanReview: boolean;
2125
2331
  trigger: {
2332
+ kind: "manual";
2333
+ input: "text";
2334
+ constraints: {
2335
+ required: boolean;
2336
+ minLength: number;
2337
+ maxLength: number;
2338
+ };
2339
+ actor?: "staff" | "member" | undefined;
2340
+ } | {
2341
+ kind: "manual";
2342
+ input: "url";
2343
+ constraints: {
2344
+ required: boolean;
2345
+ allowedHosts?: string[] | undefined;
2346
+ };
2347
+ actor?: "staff" | "member" | undefined;
2348
+ } | {
2126
2349
  kind: "manual";
2127
2350
  input: "photo" | "quiz" | "none";
2128
2351
  actor?: "staff" | "member" | undefined;
@@ -2313,13 +2536,19 @@ declare const snapshotSchema: z.ZodObject<{
2313
2536
  quest: z.ZodString;
2314
2537
  member: z.ZodString;
2315
2538
  evidence: z.ZodNullable<z.ZodString>;
2316
- input: z.ZodOptional<z.ZodObject<{
2539
+ input: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2317
2540
  kind: z.ZodLiteral<"quiz">;
2318
2541
  release: z.ZodOptional<z.ZodString>;
2319
2542
  answers: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<{
2320
2543
  [k: string]: string;
2321
2544
  }, Record<string, string>>>;
2322
- }, z.core.$strict>>;
2545
+ }, z.core.$strict>, z.ZodObject<{
2546
+ kind: z.ZodLiteral<"text">;
2547
+ value: z.ZodString;
2548
+ }, z.core.$strict>, z.ZodObject<{
2549
+ kind: z.ZodLiteral<"url">;
2550
+ value: z.ZodString;
2551
+ }, z.core.$strict>]>>;
2323
2552
  status: z.ZodEnum<{
2324
2553
  queued: "queued";
2325
2554
  evaluating: "evaluating";
@@ -2393,6 +2622,7 @@ declare const errorSchema: z.ZodObject<{
2393
2622
  code: z.ZodOptional<z.ZodEnum<{
2394
2623
  "stale-quiz": "stale-quiz";
2395
2624
  "quest-updated": "quest-updated";
2625
+ "invalid-submission": "invalid-submission";
2396
2626
  }>>;
2397
2627
  missing: z.ZodOptional<z.ZodArray<z.ZodObject<{
2398
2628
  quest: z.ZodString;
@@ -2440,13 +2670,19 @@ declare const reviewItemSchema: z.ZodObject<{
2440
2670
  quest: z.ZodString;
2441
2671
  member: z.ZodString;
2442
2672
  evidence: z.ZodNullable<z.ZodString>;
2443
- input: z.ZodOptional<z.ZodObject<{
2673
+ input: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2444
2674
  kind: z.ZodLiteral<"quiz">;
2445
2675
  release: z.ZodOptional<z.ZodString>;
2446
2676
  answers: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<{
2447
2677
  [k: string]: string;
2448
2678
  }, Record<string, string>>>;
2449
- }, z.core.$strict>>;
2679
+ }, z.core.$strict>, z.ZodObject<{
2680
+ kind: z.ZodLiteral<"text">;
2681
+ value: z.ZodString;
2682
+ }, z.core.$strict>, z.ZodObject<{
2683
+ kind: z.ZodLiteral<"url">;
2684
+ value: z.ZodString;
2685
+ }, z.core.$strict>]>>;
2450
2686
  status: z.ZodEnum<{
2451
2687
  queued: "queued";
2452
2688
  evaluating: "evaluating";
@@ -2510,13 +2746,19 @@ declare const reviewPageSchema: z.ZodObject<{
2510
2746
  quest: z.ZodString;
2511
2747
  member: z.ZodString;
2512
2748
  evidence: z.ZodNullable<z.ZodString>;
2513
- input: z.ZodOptional<z.ZodObject<{
2749
+ input: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2514
2750
  kind: z.ZodLiteral<"quiz">;
2515
2751
  release: z.ZodOptional<z.ZodString>;
2516
2752
  answers: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodString>, z.ZodTransform<{
2517
2753
  [k: string]: string;
2518
2754
  }, Record<string, string>>>;
2519
- }, z.core.$strict>>;
2755
+ }, z.core.$strict>, z.ZodObject<{
2756
+ kind: z.ZodLiteral<"text">;
2757
+ value: z.ZodString;
2758
+ }, z.core.$strict>, z.ZodObject<{
2759
+ kind: z.ZodLiteral<"url">;
2760
+ value: z.ZodString;
2761
+ }, z.core.$strict>]>>;
2520
2762
  status: z.ZodEnum<{
2521
2763
  queued: "queued";
2522
2764
  evaluating: "evaluating";
@@ -2591,4 +2833,4 @@ declare const stockItemSchema: z.ZodObject<{
2591
2833
  name: z.ZodString;
2592
2834
  }, z.core.$strip>;
2593
2835
 
2594
- export { type Attempt, type Decision, type Entitlement, type MemberListOptions, type MemberPage, type MemberProgress, type PhotoResult, type PickupAvailability, type PublishedRelease, type QuestAvailability, type QuestDescription, type QuestPresentation, type QuestSettingsInput, type QuizEvidence, type ReleaseInput, type ReviewListOptions, type ReviewPage, type Reward, type Snapshot, type SubmitInput, type TieredRewardDefinition, artifactSchema, attemptSchema, batchReleaseSchema, beginHandoverSchema, completionRecordSchema, configurePickupSchema, confirmHandoverSchema, createStockItemSchema, decisionSchema, entitlementSchema, errorSchema, eventSchema, evidenceSchema, identifier, integrationRewardSchema, mediaUrlSchema, memberListSchema, memberPageSchema, memberProgressSchema, photoResultSchema, pickupAllocationSchema, pickupAvailabilitySchema, pickupCatalogSchema, pickupPolicySchema, pickupSelectionSchema, pointsRewardSchema, prerequisiteSchema, publishedReleaseSchema, questAvailabilitySchema, questDescriptionSchema, questPresentationSchema, questSettingsInputSchema, quizAnswersSchema, quizEvidenceSchema, releaseSchema, reservationSchema, reviewItemSchema, reviewListSchema, reviewModeSchema, reviewPageSchema, rewardBundleSchema, rewardKey, rewardSchema, snapshotSchema, staffDecisionSchema, stockItemSchema, stockSchema, storedReviewModeSchema, submitSchema, templateSchema, tierRewardSchema, tieredRewardDefinitionSchema, triggerSchema };
2836
+ export { type Attempt, type Decision, type Entitlement, type MemberListOptions, type MemberPage, type MemberProgress, type PhotoResult, type PickupAvailability, type PublishedRelease, type QuestAvailability, type QuestDescription, type QuestPresentation, type QuestSettingsInput, type QuizEvidence, type ReleaseInput, type ReviewListOptions, type ReviewPage, type Reward, type Snapshot, type SubmissionEvidence, type SubmitInput, type TextResult, type TextReviewInput, type TieredRewardDefinition, artifactSchema, attemptSchema, batchReleaseSchema, beginHandoverSchema, completionRecordSchema, configurePickupSchema, confirmHandoverSchema, createStockItemSchema, decisionSchema, entitlementSchema, errorSchema, eventSchema, evidenceSchema, identifier, integrationRewardSchema, mediaUrlSchema, memberListSchema, memberPageSchema, memberProgressSchema, photoResultSchema, pickupAllocationSchema, pickupAvailabilitySchema, pickupCatalogSchema, pickupPolicySchema, pickupSelectionSchema, pointsRewardSchema, prerequisiteSchema, publishedReleaseSchema, questAvailabilitySchema, questDescriptionSchema, questPresentationSchema, questSettingsInputSchema, quizAnswersSchema, quizEvidenceSchema, releaseSchema, reservationSchema, reviewItemSchema, reviewListSchema, reviewModeSchema, reviewPageSchema, rewardBundleSchema, rewardKey, rewardSchema, snapshotSchema, staffDecisionSchema, stockItemSchema, stockSchema, storedReviewModeSchema, submissionEvidenceSchema, submitSchema, templateSchema, textResultSchema, textReviewInputSchema, tierRewardSchema, tieredRewardDefinitionSchema, triggerSchema };
package/dist/schema.js CHANGED
@@ -47,12 +47,15 @@ import {
47
47
  stockItemSchema,
48
48
  stockSchema,
49
49
  storedReviewModeSchema,
50
+ submissionEvidenceSchema,
50
51
  submitSchema,
51
52
  templateSchema,
53
+ textResultSchema,
54
+ textReviewInputSchema,
52
55
  tierRewardSchema,
53
56
  tieredRewardDefinitionSchema,
54
57
  triggerSchema
55
- } from "./chunk-FUQYKTOJ.js";
58
+ } from "./chunk-YUAE6PFY.js";
56
59
  export {
57
60
  artifactSchema,
58
61
  attemptSchema,
@@ -102,8 +105,11 @@ export {
102
105
  stockItemSchema,
103
106
  stockSchema,
104
107
  storedReviewModeSchema,
108
+ submissionEvidenceSchema,
105
109
  submitSchema,
106
110
  templateSchema,
111
+ textResultSchema,
112
+ textReviewInputSchema,
107
113
  tierRewardSchema,
108
114
  tieredRewardDefinitionSchema,
109
115
  triggerSchema
@@ -381,6 +381,75 @@ type TrackerReader = {
381
381
  }, query?: TrackerQuery): Promise<z.infer<typeof trackerSummarySchema>>;
382
382
  };
383
383
 
384
+ declare const xIdSchema: z.ZodString;
385
+ declare const xConnectionSchema: z.ZodObject<{
386
+ userId: z.ZodString;
387
+ }, z.core.$strip>;
388
+ declare const xProfileSchema: z.ZodObject<{
389
+ id: z.ZodString;
390
+ username: z.ZodString;
391
+ name: z.ZodString;
392
+ bio: z.ZodNullable<z.ZodString>;
393
+ profileImageUrl: z.ZodNullable<z.ZodString>;
394
+ followersCount: z.ZodNullable<z.ZodNumber>;
395
+ verified: z.ZodNullable<z.ZodBoolean>;
396
+ }, z.core.$strip>;
397
+ declare const xPostSchema: z.ZodObject<{
398
+ id: z.ZodString;
399
+ userId: z.ZodString;
400
+ content: z.ZodString;
401
+ createdAt: z.ZodISODateTime;
402
+ author: z.ZodObject<{
403
+ id: z.ZodString;
404
+ username: z.ZodString;
405
+ name: z.ZodString;
406
+ verified: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
407
+ }, z.core.$loose>;
408
+ likeCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
409
+ replyCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
410
+ retweetCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
411
+ quoteCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
412
+ viewCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
413
+ bookmarkCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
414
+ isReply: z.ZodBoolean;
415
+ isRetweet: z.ZodBoolean;
416
+ isQuoteTweet: z.ZodBoolean;
417
+ quotedTweetId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
418
+ inReplyToUserId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
419
+ inReplyToStatusId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
420
+ retweetedTweetId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
421
+ }, z.core.$loose>;
422
+ declare const xRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
423
+ operation: z.ZodLiteral<"connection">;
424
+ }, z.core.$strict>, z.ZodObject<{
425
+ operation: z.ZodLiteral<"profile">;
426
+ }, z.core.$strict>, z.ZodObject<{
427
+ operation: z.ZodLiteral<"post">;
428
+ postId: z.ZodString;
429
+ }, z.core.$strict>, z.ZodObject<{
430
+ operation: z.ZodLiteral<"follows">;
431
+ userId: z.ZodString;
432
+ }, z.core.$strict>, z.ZodObject<{
433
+ operation: z.ZodLiteral<"reposted">;
434
+ postId: z.ZodString;
435
+ }, z.core.$strict>], "operation">;
436
+ type XConnection = z.infer<typeof xConnectionSchema>;
437
+ type XProfile = z.infer<typeof xProfileSchema>;
438
+ type XPost = z.infer<typeof xPostSchema>;
439
+ interface XReader {
440
+ connection(): Promise<XConnection | null>;
441
+ profile(): Promise<XProfile>;
442
+ post(input: {
443
+ postId: string;
444
+ }): Promise<XPost>;
445
+ follows(input: {
446
+ userId: string;
447
+ }): Promise<boolean>;
448
+ reposted(input: {
449
+ postId: string;
450
+ }): Promise<boolean>;
451
+ }
452
+
384
453
  declare const communityTimeZoneSchema: z.ZodString;
385
454
  declare const streakPolicySchema: z.ZodObject<{
386
455
  kind: z.ZodLiteral<"streak">;
@@ -2765,4 +2834,44 @@ declare function parseSettings(fields: Record<string, SettingField>, input: unkn
2765
2834
  declare function missingResourceSettings(fields: Record<string, SettingField>, values: SettingsValues): string[];
2766
2835
  declare function compatibleSettingKinds(previous: SettingField, next: SettingField): boolean;
2767
2836
 
2768
- export { discordMessageInputSchema as $, type AuthoringIdentity as A, type Budget as B, type TrackerPreview as C, type DiscordMember as D, type TrackerPreviewInput as E, type TrackerQuery as F, type TrackerRecord as G, type TrackerStatus as H, type IntegrationProvider as I, accountConnectionSchema as J, authProviderSchema as K, type LeaderboardQuery as L, budgetSchema as M, communityTimeZoneSchema as N, type Observation as O, type ProjectIntegration as P, type QuizContent as Q, type ReferralDefinition as R, type SolanaBalance as S, type TrackerReader as T, compatibleSettingKinds as U, completionKeySchema as V, type WalletConnection as W, type XTweet as X, completionPolicySchema as Y, discordMemberInputSchema as Z, discordMemberSchema as _, type DiscordMessage as a, trackerSummarySchema as a$, discordMessageSchema as a0, discordReactionSchema as a1, discordServerSchema as a2, integrationProviderSchema as a3, leaderboardArtifactSchema as a4, leaderboardAuthoringSchema as a5, leaderboardDefinitionSchema as a6, leaderboardExclusionSchema as a7, leaderboardGroupSchema as a8, leaderboardPageSchema as a9, referralHistorySchema as aA, referralManagementSchema as aB, referralRelationshipSchema as aC, resourceOptionsSchema as aD, resourceRequestSchema as aE, resourceSourceSchema as aF, settingFieldSchema as aG, settingsFieldsSchema as aH, settingsValuesSchema as aI, solanaAddressSchema as aJ, solanaBalanceSchema as aK, streakPolicySchema as aL, streakProgressSchema as aM, trackerArtifactSchema as aN, trackerControlSchema as aO, trackerDefinitionSchema as aP, trackerIngestResultSchema as aQ, trackerIngestSchema as aR, trackerPageSchema as aS, trackerPreviewInputSchema as aT, trackerPreviewLimits as aU, trackerPreviewSchema as aV, trackerQuerySchema as aW, trackerRecordInputSchema as aX, trackerRecordSchema as aY, trackerSourceSchema as aZ, trackerStatusSchema as a_, leaderboardPreviewSchema as aa, leaderboardQuerySchema as ab, leaderboardRowSchema as ac, leaderboardWindowSchema as ad, missingResourceSettings as ae, observationInputSchema as af, observationReceiptSchema as ag, observationSchema as ah, parseSettings as ai, pointsAccountSchema as aj, pointsEntrySchema as ak, pointsMutationSchema as al, pointsResultSchema as am, projectIntegrationSchema as an, publishedLeaderboardSchema as ao, publishedReferralSchema as ap, publishedTrackerSchema as aq, quizChoiceSchema as ar, quizContentSchema as as, quizQuestionSchema as at, quizQuestionsSchema as au, referralAccountSchema as av, referralArtifactSchema as aw, referralAuthoringSchema as ax, referralControlSchema as ay, referralDefinitionSchema as az, type StreakPolicy as b, walletChallengeSchema as b0, walletConnectionSchema as b1, xTweetSchema as b2, customSource as c, defineLeaderboard as d, defineReferral as e, defineTracker as f, discord as g, streak as h, walletProofSchema as i, type AuthProvider as j, type AccountConnection as k, referralSummarySchema as l, type LeaderboardPage as m, type LeaderboardDefinition as n, observationTriggerSchema as o, pointLedgers as p, type ResourceOption as q, referralAcceptSchema as r, settings as s, type ResourceSource as t, type SettingField as u, type SettingsValues as v, walletChallengeInputSchema as w, x, type StreakProgress as y, type TrackerDefinition as z };
2837
+ declare const textOptionsSchema: z.ZodObject<{
2838
+ required: z.ZodDefault<z.ZodBoolean>;
2839
+ minLength: z.ZodDefault<z.ZodNumber>;
2840
+ maxLength: z.ZodDefault<z.ZodNumber>;
2841
+ }, z.core.$strict>;
2842
+ declare const urlOptionsSchema: z.ZodObject<{
2843
+ required: z.ZodDefault<z.ZodBoolean>;
2844
+ allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
2845
+ }, z.core.$strict>;
2846
+ type TextOptions = z.input<typeof textOptionsSchema>;
2847
+ type UrlOptions = z.input<typeof urlOptionsSchema>;
2848
+ declare const textEvidenceSchema: z.ZodObject<{
2849
+ kind: z.ZodLiteral<"text">;
2850
+ value: z.ZodString;
2851
+ }, z.core.$strict>;
2852
+ declare const urlEvidenceSchema: z.ZodObject<{
2853
+ kind: z.ZodLiteral<"url">;
2854
+ value: z.ZodString;
2855
+ }, z.core.$strict>;
2856
+ declare const valueEvidenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2857
+ kind: z.ZodLiteral<"text">;
2858
+ value: z.ZodString;
2859
+ }, z.core.$strict>, z.ZodObject<{
2860
+ kind: z.ZodLiteral<"url">;
2861
+ value: z.ZodString;
2862
+ }, z.core.$strict>], "kind">;
2863
+ type TextEvidence = z.infer<typeof textEvidenceSchema>;
2864
+ type UrlEvidence = z.infer<typeof urlEvidenceSchema>;
2865
+ type ValueEvidence = z.infer<typeof valueEvidenceSchema>;
2866
+ /** Validates a claim without fetching it or changing the captured value. */
2867
+ declare function validateSubmissionValue(input: ValueEvidence, contract: {
2868
+ input: "text";
2869
+ constraints: z.output<typeof textOptionsSchema>;
2870
+ } | {
2871
+ input: "url";
2872
+ constraints: z.output<typeof urlOptionsSchema>;
2873
+ }): string | null;
2874
+ /** Extract an ID only. The URL and its author name are untrusted claims. */
2875
+ declare function xPostId(value: string): string | null;
2876
+
2877
+ export { accountConnectionSchema as $, type AuthoringIdentity as A, type Budget as B, type SettingsValues as C, type DiscordMember as D, type StreakProgress as E, type TrackerDefinition as F, type TrackerPreview as G, type TrackerPreviewInput as H, type IntegrationProvider as I, type TrackerQuery as J, type TrackerRecord as K, type LeaderboardQuery as L, type TrackerStatus as M, type XConnection as N, type Observation as O, type ProjectIntegration as P, type QuizContent as Q, type ReferralDefinition as R, type SolanaBalance as S, type TrackerReader as T, type UrlEvidence as U, type ValueEvidence as V, type WalletConnection as W, type XReader as X, type XPost as Y, type XProfile as Z, type XTweet as _, type DiscordMessage as a, trackerIngestResultSchema as a$, authProviderSchema as a0, budgetSchema as a1, communityTimeZoneSchema as a2, compatibleSettingKinds as a3, completionKeySchema as a4, completionPolicySchema as a5, discordMemberInputSchema as a6, discordMemberSchema as a7, discordMessageInputSchema as a8, discordMessageSchema as a9, quizChoiceSchema as aA, quizContentSchema as aB, quizQuestionSchema as aC, quizQuestionsSchema as aD, referralAccountSchema as aE, referralArtifactSchema as aF, referralAuthoringSchema as aG, referralControlSchema as aH, referralDefinitionSchema as aI, referralHistorySchema as aJ, referralManagementSchema as aK, referralRelationshipSchema as aL, resourceOptionsSchema as aM, resourceRequestSchema as aN, resourceSourceSchema as aO, settingFieldSchema as aP, settingsFieldsSchema as aQ, settingsValuesSchema as aR, solanaAddressSchema as aS, solanaBalanceSchema as aT, streakPolicySchema as aU, streakProgressSchema as aV, textEvidenceSchema as aW, textOptionsSchema as aX, trackerArtifactSchema as aY, trackerControlSchema as aZ, trackerDefinitionSchema as a_, discordReactionSchema as aa, discordServerSchema as ab, integrationProviderSchema as ac, leaderboardArtifactSchema as ad, leaderboardAuthoringSchema as ae, leaderboardDefinitionSchema as af, leaderboardExclusionSchema as ag, leaderboardGroupSchema as ah, leaderboardPageSchema as ai, leaderboardPreviewSchema as aj, leaderboardQuerySchema as ak, leaderboardRowSchema as al, leaderboardWindowSchema as am, missingResourceSettings as an, observationInputSchema as ao, observationReceiptSchema as ap, observationSchema as aq, parseSettings as ar, pointsAccountSchema as as, pointsEntrySchema as at, pointsMutationSchema as au, pointsResultSchema as av, projectIntegrationSchema as aw, publishedLeaderboardSchema as ax, publishedReferralSchema as ay, publishedTrackerSchema as az, type StreakPolicy as b, trackerIngestSchema as b0, trackerPageSchema as b1, trackerPreviewInputSchema as b2, trackerPreviewLimits as b3, trackerPreviewSchema as b4, trackerQuerySchema as b5, trackerRecordInputSchema as b6, trackerRecordSchema as b7, trackerSourceSchema as b8, trackerStatusSchema as b9, trackerSummarySchema as ba, urlEvidenceSchema as bb, urlOptionsSchema as bc, validateSubmissionValue as bd, valueEvidenceSchema as be, walletChallengeSchema as bf, walletConnectionSchema as bg, xConnectionSchema as bh, xIdSchema as bi, xPostId as bj, xPostSchema as bk, xProfileSchema as bl, xRequestSchema as bm, xTweetSchema as bn, type TextEvidence as c, type TextOptions as d, type UrlOptions as e, customSource as f, defineLeaderboard as g, defineReferral as h, defineTracker as i, discord as j, streak as k, walletProofSchema as l, type AuthProvider as m, type AccountConnection as n, observationTriggerSchema as o, pointLedgers as p, referralSummarySchema as q, referralAcceptSchema as r, settings as s, type LeaderboardPage as t, type LeaderboardDefinition as u, type ResourceOption as v, walletChallengeInputSchema as w, x, type ResourceSource as y, type SettingField as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domino-sdk/relay",
3
- "version": "0.15.0",
3
+ "version": "0.16.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {