@domino-sdk/relay 0.17.2 → 0.18.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.
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createBrowserRelayClient
3
- } from "../chunk-MK2E36HR.js";
3
+ } from "../chunk-MVDIVWR5.js";
4
4
  import {
5
5
  RelayError
6
- } from "../chunk-TI22MU2X.js";
7
- import "../chunk-XNS25KST.js";
8
- import "../chunk-GEJK7LMK.js";
9
- import "../chunk-YUAE6PFY.js";
6
+ } from "../chunk-TQUK4DIW.js";
7
+ import "../chunk-FBOW2TLN.js";
8
+ import "../chunk-6GH4NC2T.js";
9
+ import "../chunk-23ZZTCDK.js";
10
10
 
11
11
  // src/react/provider.tsx
12
12
  import { useState as useState3 } from "react";
package/dist/schema.d.ts CHANGED
@@ -84,8 +84,8 @@ declare const triggerSchema: z.ZodUnion<readonly [z.ZodObject<{
84
84
  maxLength: z.ZodDefault<z.ZodNumber>;
85
85
  }, z.core.$strict>;
86
86
  actor: z.ZodOptional<z.ZodEnum<{
87
- staff: "staff";
88
87
  member: "member";
88
+ staff: "staff";
89
89
  }>>;
90
90
  }, z.core.$strict>, z.ZodObject<{
91
91
  kind: z.ZodLiteral<"manual">;
@@ -95,8 +95,8 @@ declare const triggerSchema: z.ZodUnion<readonly [z.ZodObject<{
95
95
  allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
96
96
  }, z.core.$strict>;
97
97
  actor: z.ZodOptional<z.ZodEnum<{
98
- staff: "staff";
99
98
  member: "member";
99
+ staff: "staff";
100
100
  }>>;
101
101
  }, z.core.$strict>, z.ZodObject<{
102
102
  kind: z.ZodLiteral<"manual">;
@@ -106,8 +106,8 @@ declare const triggerSchema: z.ZodUnion<readonly [z.ZodObject<{
106
106
  none: "none";
107
107
  }>;
108
108
  actor: z.ZodOptional<z.ZodEnum<{
109
- staff: "staff";
110
109
  member: "member";
110
+ staff: "staff";
111
111
  }>>;
112
112
  }, z.core.$strict>, z.ZodObject<{
113
113
  kind: z.ZodLiteral<"automatic">;
@@ -115,6 +115,26 @@ declare const triggerSchema: z.ZodUnion<readonly [z.ZodObject<{
115
115
  source: z.ZodString;
116
116
  type: z.ZodString;
117
117
  }, z.core.$strict>>;
118
+ content: z.ZodOptional<z.ZodObject<{
119
+ tracker: z.ZodString;
120
+ window: z.ZodObject<{
121
+ start: z.ZodNumber;
122
+ end: z.ZodOptional<z.ZodNumber>;
123
+ }, z.core.$strict>;
124
+ enrollment: z.ZodDefault<z.ZodEnum<{
125
+ required: "required";
126
+ none: "none";
127
+ }>>;
128
+ posts: z.ZodDefault<z.ZodEnum<{
129
+ "after-enrollment": "after-enrollment";
130
+ "since-start": "since-start";
131
+ }>>;
132
+ historical: z.ZodDefault<z.ZodEnum<{
133
+ staff: "staff";
134
+ automatic: "automatic";
135
+ claim: "claim";
136
+ }>>;
137
+ }, z.core.$strict>>;
118
138
  }, z.core.$strict>]>;
119
139
  declare const prerequisiteSchema: z.ZodObject<{
120
140
  quest: z.ZodString;
@@ -412,8 +432,8 @@ declare const questDescriptionSchema: z.ZodObject<{
412
432
  maxLength: z.ZodDefault<z.ZodNumber>;
413
433
  }, z.core.$strict>;
414
434
  actor: z.ZodOptional<z.ZodEnum<{
415
- staff: "staff";
416
435
  member: "member";
436
+ staff: "staff";
417
437
  }>>;
418
438
  }, z.core.$strict>, z.ZodObject<{
419
439
  kind: z.ZodLiteral<"manual">;
@@ -423,8 +443,8 @@ declare const questDescriptionSchema: z.ZodObject<{
423
443
  allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
424
444
  }, z.core.$strict>;
425
445
  actor: z.ZodOptional<z.ZodEnum<{
426
- staff: "staff";
427
446
  member: "member";
447
+ staff: "staff";
428
448
  }>>;
429
449
  }, z.core.$strict>, z.ZodObject<{
430
450
  kind: z.ZodLiteral<"manual">;
@@ -434,8 +454,8 @@ declare const questDescriptionSchema: z.ZodObject<{
434
454
  none: "none";
435
455
  }>;
436
456
  actor: z.ZodOptional<z.ZodEnum<{
437
- staff: "staff";
438
457
  member: "member";
458
+ staff: "staff";
439
459
  }>>;
440
460
  }, z.core.$strict>, z.ZodObject<{
441
461
  kind: z.ZodLiteral<"automatic">;
@@ -443,7 +463,38 @@ declare const questDescriptionSchema: z.ZodObject<{
443
463
  source: z.ZodString;
444
464
  type: z.ZodString;
445
465
  }, z.core.$strict>>;
466
+ content: z.ZodOptional<z.ZodObject<{
467
+ tracker: z.ZodString;
468
+ window: z.ZodObject<{
469
+ start: z.ZodNumber;
470
+ end: z.ZodOptional<z.ZodNumber>;
471
+ }, z.core.$strict>;
472
+ enrollment: z.ZodDefault<z.ZodEnum<{
473
+ required: "required";
474
+ none: "none";
475
+ }>>;
476
+ posts: z.ZodDefault<z.ZodEnum<{
477
+ "after-enrollment": "after-enrollment";
478
+ "since-start": "since-start";
479
+ }>>;
480
+ historical: z.ZodDefault<z.ZodEnum<{
481
+ staff: "staff";
482
+ automatic: "automatic";
483
+ claim: "claim";
484
+ }>>;
485
+ }, z.core.$strict>>;
446
486
  }, z.core.$strict>]>;
487
+ performance: z.ZodOptional<z.ZodObject<{
488
+ metrics: z.ZodArray<z.ZodEnum<{
489
+ likes: "likes";
490
+ replies: "replies";
491
+ reposts: "reposts";
492
+ quotes: "quotes";
493
+ views: "views";
494
+ bookmarks: "bookmarks";
495
+ }>>;
496
+ maxAgeMs: z.ZodDefault<z.ZodNumber>;
497
+ }, z.core.$strict>>;
447
498
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
448
499
  quest: z.ZodString;
449
500
  scope: z.ZodLiteral<"ever">;
@@ -676,8 +727,8 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
676
727
  maxLength: z.ZodDefault<z.ZodNumber>;
677
728
  }, z.core.$strict>;
678
729
  actor: z.ZodOptional<z.ZodEnum<{
679
- staff: "staff";
680
730
  member: "member";
731
+ staff: "staff";
681
732
  }>>;
682
733
  }, z.core.$strict>, z.ZodObject<{
683
734
  kind: z.ZodLiteral<"manual">;
@@ -687,8 +738,8 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
687
738
  allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
688
739
  }, z.core.$strict>;
689
740
  actor: z.ZodOptional<z.ZodEnum<{
690
- staff: "staff";
691
741
  member: "member";
742
+ staff: "staff";
692
743
  }>>;
693
744
  }, z.core.$strict>, z.ZodObject<{
694
745
  kind: z.ZodLiteral<"manual">;
@@ -698,8 +749,8 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
698
749
  none: "none";
699
750
  }>;
700
751
  actor: z.ZodOptional<z.ZodEnum<{
701
- staff: "staff";
702
752
  member: "member";
753
+ staff: "staff";
703
754
  }>>;
704
755
  }, z.core.$strict>, z.ZodObject<{
705
756
  kind: z.ZodLiteral<"automatic">;
@@ -707,7 +758,38 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
707
758
  source: z.ZodString;
708
759
  type: z.ZodString;
709
760
  }, z.core.$strict>>;
761
+ content: z.ZodOptional<z.ZodObject<{
762
+ tracker: z.ZodString;
763
+ window: z.ZodObject<{
764
+ start: z.ZodNumber;
765
+ end: z.ZodOptional<z.ZodNumber>;
766
+ }, z.core.$strict>;
767
+ enrollment: z.ZodDefault<z.ZodEnum<{
768
+ required: "required";
769
+ none: "none";
770
+ }>>;
771
+ posts: z.ZodDefault<z.ZodEnum<{
772
+ "after-enrollment": "after-enrollment";
773
+ "since-start": "since-start";
774
+ }>>;
775
+ historical: z.ZodDefault<z.ZodEnum<{
776
+ staff: "staff";
777
+ automatic: "automatic";
778
+ claim: "claim";
779
+ }>>;
780
+ }, z.core.$strict>>;
710
781
  }, z.core.$strict>]>;
782
+ performance: z.ZodOptional<z.ZodObject<{
783
+ metrics: z.ZodArray<z.ZodEnum<{
784
+ likes: "likes";
785
+ replies: "replies";
786
+ reposts: "reposts";
787
+ quotes: "quotes";
788
+ views: "views";
789
+ bookmarks: "bookmarks";
790
+ }>>;
791
+ maxAgeMs: z.ZodDefault<z.ZodNumber>;
792
+ }, z.core.$strict>>;
711
793
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
712
794
  quest: z.ZodString;
713
795
  scope: z.ZodLiteral<"ever">;
@@ -756,8 +838,8 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
756
838
  typeVersion: z.ZodString;
757
839
  }, z.core.$strict>>;
758
840
  lifecycle: z.ZodDefault<z.ZodEnum<{
759
- paused: "paused";
760
841
  active: "active";
842
+ paused: "paused";
761
843
  archived: "archived";
762
844
  }>>;
763
845
  configuration: z.ZodOptional<z.ZodObject<{
@@ -953,6 +1035,22 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
953
1035
  })[];
954
1036
  humanReview: boolean;
955
1037
  trigger: {
1038
+ kind: "automatic";
1039
+ observation?: {
1040
+ source: string;
1041
+ type: string;
1042
+ } | undefined;
1043
+ content?: {
1044
+ tracker: string;
1045
+ window: {
1046
+ start: number;
1047
+ end?: number | undefined;
1048
+ };
1049
+ enrollment: "required" | "none";
1050
+ posts: "after-enrollment" | "since-start";
1051
+ historical: "staff" | "automatic" | "claim";
1052
+ } | undefined;
1053
+ } | {
956
1054
  kind: "manual";
957
1055
  input: "text";
958
1056
  constraints: {
@@ -960,7 +1058,7 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
960
1058
  minLength: number;
961
1059
  maxLength: number;
962
1060
  };
963
- actor?: "staff" | "member" | undefined;
1061
+ actor?: "member" | "staff" | undefined;
964
1062
  } | {
965
1063
  kind: "manual";
966
1064
  input: "url";
@@ -968,17 +1066,11 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
968
1066
  required: boolean;
969
1067
  allowedHosts?: string[] | undefined;
970
1068
  };
971
- actor?: "staff" | "member" | undefined;
1069
+ actor?: "member" | "staff" | undefined;
972
1070
  } | {
973
1071
  kind: "manual";
974
1072
  input: "photo" | "quiz" | "none";
975
- actor?: "staff" | "member" | undefined;
976
- } | {
977
- kind: "automatic";
978
- observation?: {
979
- source: string;
980
- type: string;
981
- } | undefined;
1073
+ actor?: "member" | "staff" | undefined;
982
1074
  };
983
1075
  requires: {
984
1076
  quest: string;
@@ -1008,7 +1100,11 @@ declare const publishedReleaseSchema: z.ZodUnion<readonly [z.ZodObject<{
1008
1100
  id: string;
1009
1101
  createdAt: number;
1010
1102
  legacy: boolean;
1011
- lifecycle: "paused" | "active" | "archived";
1103
+ lifecycle: "active" | "paused" | "archived";
1104
+ performance?: {
1105
+ metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
1106
+ maxAgeMs: number;
1107
+ } | undefined;
1012
1108
  key?: string | undefined;
1013
1109
  origin?: {
1014
1110
  typeVersion: string;
@@ -1217,8 +1313,8 @@ declare const templateSchema: z.ZodObject<{
1217
1313
  maxLength: z.ZodDefault<z.ZodNumber>;
1218
1314
  }, z.core.$strict>;
1219
1315
  actor: z.ZodOptional<z.ZodEnum<{
1220
- staff: "staff";
1221
1316
  member: "member";
1317
+ staff: "staff";
1222
1318
  }>>;
1223
1319
  }, z.core.$strict>, z.ZodObject<{
1224
1320
  kind: z.ZodLiteral<"manual">;
@@ -1228,8 +1324,8 @@ declare const templateSchema: z.ZodObject<{
1228
1324
  allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
1229
1325
  }, z.core.$strict>;
1230
1326
  actor: z.ZodOptional<z.ZodEnum<{
1231
- staff: "staff";
1232
1327
  member: "member";
1328
+ staff: "staff";
1233
1329
  }>>;
1234
1330
  }, z.core.$strict>, z.ZodObject<{
1235
1331
  kind: z.ZodLiteral<"manual">;
@@ -1239,8 +1335,8 @@ declare const templateSchema: z.ZodObject<{
1239
1335
  none: "none";
1240
1336
  }>;
1241
1337
  actor: z.ZodOptional<z.ZodEnum<{
1242
- staff: "staff";
1243
1338
  member: "member";
1339
+ staff: "staff";
1244
1340
  }>>;
1245
1341
  }, z.core.$strict>, z.ZodObject<{
1246
1342
  kind: z.ZodLiteral<"automatic">;
@@ -1248,7 +1344,38 @@ declare const templateSchema: z.ZodObject<{
1248
1344
  source: z.ZodString;
1249
1345
  type: z.ZodString;
1250
1346
  }, z.core.$strict>>;
1347
+ content: z.ZodOptional<z.ZodObject<{
1348
+ tracker: z.ZodString;
1349
+ window: z.ZodObject<{
1350
+ start: z.ZodNumber;
1351
+ end: z.ZodOptional<z.ZodNumber>;
1352
+ }, z.core.$strict>;
1353
+ enrollment: z.ZodDefault<z.ZodEnum<{
1354
+ required: "required";
1355
+ none: "none";
1356
+ }>>;
1357
+ posts: z.ZodDefault<z.ZodEnum<{
1358
+ "after-enrollment": "after-enrollment";
1359
+ "since-start": "since-start";
1360
+ }>>;
1361
+ historical: z.ZodDefault<z.ZodEnum<{
1362
+ staff: "staff";
1363
+ automatic: "automatic";
1364
+ claim: "claim";
1365
+ }>>;
1366
+ }, z.core.$strict>>;
1251
1367
  }, z.core.$strict>]>;
1368
+ performance: z.ZodOptional<z.ZodObject<{
1369
+ metrics: z.ZodArray<z.ZodEnum<{
1370
+ likes: "likes";
1371
+ replies: "replies";
1372
+ reposts: "reposts";
1373
+ quotes: "quotes";
1374
+ views: "views";
1375
+ bookmarks: "bookmarks";
1376
+ }>>;
1377
+ maxAgeMs: z.ZodDefault<z.ZodNumber>;
1378
+ }, z.core.$strict>>;
1252
1379
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
1253
1380
  quest: z.ZodString;
1254
1381
  scope: z.ZodLiteral<"ever">;
@@ -1652,8 +1779,8 @@ declare const memberProgressSchema: z.ZodObject<{
1652
1779
  maxLength: z.ZodDefault<z.ZodNumber>;
1653
1780
  }, z.core.$strict>;
1654
1781
  actor: z.ZodOptional<z.ZodEnum<{
1655
- staff: "staff";
1656
1782
  member: "member";
1783
+ staff: "staff";
1657
1784
  }>>;
1658
1785
  }, z.core.$strict>, z.ZodObject<{
1659
1786
  kind: z.ZodLiteral<"manual">;
@@ -1663,8 +1790,8 @@ declare const memberProgressSchema: z.ZodObject<{
1663
1790
  allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
1664
1791
  }, z.core.$strict>;
1665
1792
  actor: z.ZodOptional<z.ZodEnum<{
1666
- staff: "staff";
1667
1793
  member: "member";
1794
+ staff: "staff";
1668
1795
  }>>;
1669
1796
  }, z.core.$strict>, z.ZodObject<{
1670
1797
  kind: z.ZodLiteral<"manual">;
@@ -1674,8 +1801,8 @@ declare const memberProgressSchema: z.ZodObject<{
1674
1801
  none: "none";
1675
1802
  }>;
1676
1803
  actor: z.ZodOptional<z.ZodEnum<{
1677
- staff: "staff";
1678
1804
  member: "member";
1805
+ staff: "staff";
1679
1806
  }>>;
1680
1807
  }, z.core.$strict>, z.ZodObject<{
1681
1808
  kind: z.ZodLiteral<"automatic">;
@@ -1683,6 +1810,26 @@ declare const memberProgressSchema: z.ZodObject<{
1683
1810
  source: z.ZodString;
1684
1811
  type: z.ZodString;
1685
1812
  }, z.core.$strict>>;
1813
+ content: z.ZodOptional<z.ZodObject<{
1814
+ tracker: z.ZodString;
1815
+ window: z.ZodObject<{
1816
+ start: z.ZodNumber;
1817
+ end: z.ZodOptional<z.ZodNumber>;
1818
+ }, z.core.$strict>;
1819
+ enrollment: z.ZodDefault<z.ZodEnum<{
1820
+ required: "required";
1821
+ none: "none";
1822
+ }>>;
1823
+ posts: z.ZodDefault<z.ZodEnum<{
1824
+ "after-enrollment": "after-enrollment";
1825
+ "since-start": "since-start";
1826
+ }>>;
1827
+ historical: z.ZodDefault<z.ZodEnum<{
1828
+ staff: "staff";
1829
+ automatic: "automatic";
1830
+ claim: "claim";
1831
+ }>>;
1832
+ }, z.core.$strict>>;
1686
1833
  }, z.core.$strict>]>;
1687
1834
  availability: z.ZodDiscriminatedUnion<[z.ZodObject<{
1688
1835
  kind: z.ZodLiteral<"available">;
@@ -2052,8 +2199,8 @@ declare const snapshotSchema: z.ZodObject<{
2052
2199
  maxLength: z.ZodDefault<z.ZodNumber>;
2053
2200
  }, z.core.$strict>;
2054
2201
  actor: z.ZodOptional<z.ZodEnum<{
2055
- staff: "staff";
2056
2202
  member: "member";
2203
+ staff: "staff";
2057
2204
  }>>;
2058
2205
  }, z.core.$strict>, z.ZodObject<{
2059
2206
  kind: z.ZodLiteral<"manual">;
@@ -2063,8 +2210,8 @@ declare const snapshotSchema: z.ZodObject<{
2063
2210
  allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
2064
2211
  }, z.core.$strict>;
2065
2212
  actor: z.ZodOptional<z.ZodEnum<{
2066
- staff: "staff";
2067
2213
  member: "member";
2214
+ staff: "staff";
2068
2215
  }>>;
2069
2216
  }, z.core.$strict>, z.ZodObject<{
2070
2217
  kind: z.ZodLiteral<"manual">;
@@ -2074,8 +2221,8 @@ declare const snapshotSchema: z.ZodObject<{
2074
2221
  none: "none";
2075
2222
  }>;
2076
2223
  actor: z.ZodOptional<z.ZodEnum<{
2077
- staff: "staff";
2078
2224
  member: "member";
2225
+ staff: "staff";
2079
2226
  }>>;
2080
2227
  }, z.core.$strict>, z.ZodObject<{
2081
2228
  kind: z.ZodLiteral<"automatic">;
@@ -2083,7 +2230,38 @@ declare const snapshotSchema: z.ZodObject<{
2083
2230
  source: z.ZodString;
2084
2231
  type: z.ZodString;
2085
2232
  }, z.core.$strict>>;
2233
+ content: z.ZodOptional<z.ZodObject<{
2234
+ tracker: z.ZodString;
2235
+ window: z.ZodObject<{
2236
+ start: z.ZodNumber;
2237
+ end: z.ZodOptional<z.ZodNumber>;
2238
+ }, z.core.$strict>;
2239
+ enrollment: z.ZodDefault<z.ZodEnum<{
2240
+ required: "required";
2241
+ none: "none";
2242
+ }>>;
2243
+ posts: z.ZodDefault<z.ZodEnum<{
2244
+ "after-enrollment": "after-enrollment";
2245
+ "since-start": "since-start";
2246
+ }>>;
2247
+ historical: z.ZodDefault<z.ZodEnum<{
2248
+ staff: "staff";
2249
+ automatic: "automatic";
2250
+ claim: "claim";
2251
+ }>>;
2252
+ }, z.core.$strict>>;
2086
2253
  }, z.core.$strict>]>;
2254
+ performance: z.ZodOptional<z.ZodObject<{
2255
+ metrics: z.ZodArray<z.ZodEnum<{
2256
+ likes: "likes";
2257
+ replies: "replies";
2258
+ reposts: "reposts";
2259
+ quotes: "quotes";
2260
+ views: "views";
2261
+ bookmarks: "bookmarks";
2262
+ }>>;
2263
+ maxAgeMs: z.ZodDefault<z.ZodNumber>;
2264
+ }, z.core.$strict>>;
2087
2265
  requires: z.ZodDefault<z.ZodArray<z.ZodObject<{
2088
2266
  quest: z.ZodString;
2089
2267
  scope: z.ZodLiteral<"ever">;
@@ -2132,8 +2310,8 @@ declare const snapshotSchema: z.ZodObject<{
2132
2310
  typeVersion: z.ZodString;
2133
2311
  }, z.core.$strict>>;
2134
2312
  lifecycle: z.ZodDefault<z.ZodEnum<{
2135
- paused: "paused";
2136
2313
  active: "active";
2314
+ paused: "paused";
2137
2315
  archived: "archived";
2138
2316
  }>>;
2139
2317
  configuration: z.ZodOptional<z.ZodObject<{
@@ -2329,6 +2507,22 @@ declare const snapshotSchema: z.ZodObject<{
2329
2507
  })[];
2330
2508
  humanReview: boolean;
2331
2509
  trigger: {
2510
+ kind: "automatic";
2511
+ observation?: {
2512
+ source: string;
2513
+ type: string;
2514
+ } | undefined;
2515
+ content?: {
2516
+ tracker: string;
2517
+ window: {
2518
+ start: number;
2519
+ end?: number | undefined;
2520
+ };
2521
+ enrollment: "required" | "none";
2522
+ posts: "after-enrollment" | "since-start";
2523
+ historical: "staff" | "automatic" | "claim";
2524
+ } | undefined;
2525
+ } | {
2332
2526
  kind: "manual";
2333
2527
  input: "text";
2334
2528
  constraints: {
@@ -2336,7 +2530,7 @@ declare const snapshotSchema: z.ZodObject<{
2336
2530
  minLength: number;
2337
2531
  maxLength: number;
2338
2532
  };
2339
- actor?: "staff" | "member" | undefined;
2533
+ actor?: "member" | "staff" | undefined;
2340
2534
  } | {
2341
2535
  kind: "manual";
2342
2536
  input: "url";
@@ -2344,17 +2538,11 @@ declare const snapshotSchema: z.ZodObject<{
2344
2538
  required: boolean;
2345
2539
  allowedHosts?: string[] | undefined;
2346
2540
  };
2347
- actor?: "staff" | "member" | undefined;
2541
+ actor?: "member" | "staff" | undefined;
2348
2542
  } | {
2349
2543
  kind: "manual";
2350
2544
  input: "photo" | "quiz" | "none";
2351
- actor?: "staff" | "member" | undefined;
2352
- } | {
2353
- kind: "automatic";
2354
- observation?: {
2355
- source: string;
2356
- type: string;
2357
- } | undefined;
2545
+ actor?: "member" | "staff" | undefined;
2358
2546
  };
2359
2547
  requires: {
2360
2548
  quest: string;
@@ -2384,7 +2572,11 @@ declare const snapshotSchema: z.ZodObject<{
2384
2572
  id: string;
2385
2573
  createdAt: number;
2386
2574
  legacy: boolean;
2387
- lifecycle: "paused" | "active" | "archived";
2575
+ lifecycle: "active" | "paused" | "archived";
2576
+ performance?: {
2577
+ metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
2578
+ maxAgeMs: number;
2579
+ } | undefined;
2388
2580
  key?: string | undefined;
2389
2581
  origin?: {
2390
2582
  typeVersion: string;
@@ -2832,5 +3024,104 @@ declare const stockItemSchema: z.ZodObject<{
2832
3024
  id: z.ZodString;
2833
3025
  name: z.ZodString;
2834
3026
  }, z.core.$strip>;
3027
+ /** Immutable performance input, including the content-approved reward selection. */
3028
+ declare const contentPerformanceSnapshotSchema: z.ZodObject<{
3029
+ contentAttempt: z.ZodString;
3030
+ observation: z.ZodString;
3031
+ observedAt: z.ZodNumber;
3032
+ metrics: z.ZodRecord<z.ZodEnum<{
3033
+ likes: "likes";
3034
+ replies: "replies";
3035
+ reposts: "reposts";
3036
+ quotes: "quotes";
3037
+ views: "views";
3038
+ bookmarks: "bookmarks";
3039
+ }> & z.core.$partial, z.ZodNumber>;
3040
+ rewards: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
3041
+ kind: z.ZodDefault<z.ZodLiteral<"points">>;
3042
+ balance: z.ZodString;
3043
+ amount: z.ZodNumber;
3044
+ }, z.core.$strict>, z.ZodObject<{
3045
+ kind: z.ZodLiteral<"tier">;
3046
+ reward: z.ZodObject<{
3047
+ id: z.ZodString;
3048
+ title: z.ZodString;
3049
+ tiers: z.ZodArray<z.ZodObject<{
3050
+ id: z.ZodString;
3051
+ title: z.ZodString;
3052
+ }, z.core.$strict>>;
3053
+ inventory: z.ZodObject<{
3054
+ kind: z.ZodLiteral<"untracked">;
3055
+ }, z.core.$strict>;
3056
+ fulfillment: z.ZodObject<{
3057
+ kind: z.ZodLiteral<"staff-handover">;
3058
+ }, z.core.$strict>;
3059
+ }, z.core.$strict>;
3060
+ tier: z.ZodString;
3061
+ }, z.core.$strict>, z.ZodObject<{
3062
+ kind: z.ZodLiteral<"integration">;
3063
+ provider: z.ZodLiteral<"discord">;
3064
+ action: z.ZodLiteral<"grant-role">;
3065
+ roleId: z.ZodString;
3066
+ }, z.core.$strict>]>>;
3067
+ }, z.core.$strict>;
3068
+ type ContentPerformanceSnapshot = z.infer<typeof contentPerformanceSnapshotSchema>;
3069
+ declare const contentPerformanceQuerySchema: z.ZodObject<{
3070
+ quest: z.ZodString;
3071
+ member: z.ZodOptional<z.ZodString>;
3072
+ before: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
3073
+ content: z.ZodString;
3074
+ }, z.core.$strict>;
3075
+ declare const contentPerformancePageSchema: z.ZodObject<{
3076
+ current: z.ZodObject<{
3077
+ state: z.ZodEnum<{
3078
+ "needs-review": "needs-review";
3079
+ failed: "failed";
3080
+ pending: "pending";
3081
+ "content-pending": "content-pending";
3082
+ "content-unqualified": "content-unqualified";
3083
+ waiting: "waiting";
3084
+ qualified: "qualified";
3085
+ unqualified: "unqualified";
3086
+ superseded: "superseded";
3087
+ }>;
3088
+ reason: z.ZodNullable<z.ZodString>;
3089
+ contentAttempt: z.ZodString;
3090
+ attempt: z.ZodNullable<z.ZodString>;
3091
+ reward: z.ZodObject<{
3092
+ attempt: z.ZodNullable<z.ZodString>;
3093
+ completion: z.ZodNullable<z.ZodString>;
3094
+ state: z.ZodEnum<{
3095
+ awarded: "awarded";
3096
+ unresolved: "unresolved";
3097
+ excluded: "excluded";
3098
+ }>;
3099
+ }, z.core.$strict>;
3100
+ }, z.core.$strict>;
3101
+ items: z.ZodArray<z.ZodObject<{
3102
+ attempt: z.ZodString;
3103
+ contentAttempt: z.ZodString;
3104
+ observation: z.ZodString;
3105
+ observedAt: z.ZodNumber;
3106
+ metrics: z.ZodRecord<z.ZodEnum<{
3107
+ likes: "likes";
3108
+ replies: "replies";
3109
+ reposts: "reposts";
3110
+ quotes: "quotes";
3111
+ views: "views";
3112
+ bookmarks: "bookmarks";
3113
+ }> & z.core.$partial, z.ZodNumber>;
3114
+ state: z.ZodEnum<{
3115
+ "needs-review": "needs-review";
3116
+ failed: "failed";
3117
+ pending: "pending";
3118
+ qualified: "qualified";
3119
+ unqualified: "unqualified";
3120
+ superseded: "superseded";
3121
+ }>;
3122
+ reason: z.ZodNullable<z.ZodString>;
3123
+ }, z.core.$strict>>;
3124
+ next: z.ZodNullable<z.ZodNumber>;
3125
+ }, z.core.$strict>;
2835
3126
 
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 };
3127
+ export { type Attempt, type ContentPerformanceSnapshot, 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, contentPerformancePageSchema, contentPerformanceQuerySchema, contentPerformanceSnapshotSchema, 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
@@ -6,6 +6,9 @@ import {
6
6
  completionRecordSchema,
7
7
  configurePickupSchema,
8
8
  confirmHandoverSchema,
9
+ contentPerformancePageSchema,
10
+ contentPerformanceQuerySchema,
11
+ contentPerformanceSnapshotSchema,
9
12
  createStockItemSchema,
10
13
  decisionSchema,
11
14
  entitlementSchema,
@@ -55,7 +58,7 @@ import {
55
58
  tierRewardSchema,
56
59
  tieredRewardDefinitionSchema,
57
60
  triggerSchema
58
- } from "./chunk-YUAE6PFY.js";
61
+ } from "./chunk-23ZZTCDK.js";
59
62
  export {
60
63
  artifactSchema,
61
64
  attemptSchema,
@@ -64,6 +67,9 @@ export {
64
67
  completionRecordSchema,
65
68
  configurePickupSchema,
66
69
  confirmHandoverSchema,
70
+ contentPerformancePageSchema,
71
+ contentPerformanceQuerySchema,
72
+ contentPerformanceSnapshotSchema,
67
73
  createStockItemSchema,
68
74
  decisionSchema,
69
75
  entitlementSchema,