@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.
@@ -3,8 +3,8 @@ import { ReactNode } from 'react';
3
3
  import * as zod from 'zod';
4
4
  import { z } from 'zod';
5
5
  import { QuestView, QuestController, ProgressObservation, questExperienceSchema, ProgressObserver, ExchangeInput, PhotoSubmission, QuizSubmission, ClaimSubmission, ValueSubmission, SubmissionDraft } from '../index.js';
6
- import { r as referralAcceptSchema, L as LeaderboardQuery, w as walletChallengeInputSchema, l as walletProofSchema, m as AuthProvider, n as AccountConnection, q as referralSummarySchema, t as LeaderboardPage } from '../submission-input-Cktvl71b.js';
7
- import { SubmitInput, ReviewListOptions, MemberListOptions, ReleaseInput, beginHandoverSchema } from '../schema.js';
6
+ import { r as referralAcceptSchema, L as LeaderboardQuery, w as walletChallengeInputSchema, t as walletProofSchema, u as AuthProvider, v as engagementPageQuerySchema, y as contentQualificationQuerySchema, z as contentAdmissionQuerySchema, E as contentEnrollmentInputSchema, F as contentReleaseInputSchema, G as AccountConnection, H as referralSummarySchema, J as LeaderboardPage } from '../submission-input-DWlvrAQY.js';
7
+ import { SubmitInput, ReviewListOptions, MemberListOptions, ReleaseInput, beginHandoverSchema, contentPerformanceQuerySchema } from '../schema.js';
8
8
  import { createBrowserRelayClient } from '../browser.js';
9
9
 
10
10
  type RelayClient = ReturnType<typeof createBrowserRelayClient>;
@@ -217,7 +217,7 @@ declare function useRelay(): {
217
217
  accounts: {
218
218
  id: string;
219
219
  program: string;
220
- kind: "milestone" | "fixed" | "bonus";
220
+ kind: "fixed" | "milestone" | "bonus";
221
221
  balance: string;
222
222
  earned: number;
223
223
  settled: number;
@@ -344,8 +344,24 @@ declare function useRelay(): {
344
344
  } | undefined;
345
345
  } | undefined;
346
346
  };
347
- connections: ("discord" | "google" | "apple" | "x")[];
347
+ connections: ("x" | "discord" | "google" | "apple")[];
348
348
  trigger: {
349
+ kind: "automatic";
350
+ observation?: {
351
+ source: string;
352
+ type: string;
353
+ } | undefined;
354
+ content?: {
355
+ tracker: string;
356
+ window: {
357
+ start: number;
358
+ end?: number | undefined;
359
+ };
360
+ enrollment: "none" | "required";
361
+ posts: "after-enrollment" | "since-start";
362
+ historical: "automatic" | "claim" | "staff";
363
+ } | undefined;
364
+ } | {
349
365
  kind: "manual";
350
366
  input: "text";
351
367
  constraints: {
@@ -364,18 +380,12 @@ declare function useRelay(): {
364
380
  actor?: "member" | "staff" | undefined;
365
381
  } | {
366
382
  kind: "manual";
367
- input: "quiz" | "photo" | "none";
383
+ input: "none" | "quiz" | "photo";
368
384
  actor?: "member" | "staff" | undefined;
369
- } | {
370
- kind: "automatic";
371
- observation?: {
372
- source: string;
373
- type: string;
374
- } | undefined;
375
385
  };
376
386
  availability: {
377
387
  kind: "available";
378
- input: "url" | "text" | "quiz" | "photo" | "none";
388
+ input: "text" | "url" | "none" | "quiz" | "photo";
379
389
  } | {
380
390
  kind: "completed";
381
391
  } | {
@@ -424,7 +434,7 @@ declare function useRelay(): {
424
434
  quest: string;
425
435
  member: string;
426
436
  evidence: string | null;
427
- status: "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review";
437
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
428
438
  reason: string | null;
429
439
  retries: number;
430
440
  generation: number;
@@ -472,7 +482,7 @@ declare function useRelay(): {
472
482
  } | undefined;
473
483
  } | null;
474
484
  release: string;
475
- interaction: "url" | "text" | "quiz" | "staff" | "photo" | "automatic" | "claim";
485
+ interaction: "text" | "url" | "automatic" | "claim" | "staff" | "quiz" | "photo";
476
486
  lifecycle: "paused" | "active" | "archived";
477
487
  rewards: {
478
488
  label: string;
@@ -515,7 +525,7 @@ declare function useRelay(): {
515
525
  quest: string;
516
526
  member: string;
517
527
  evidence: string | null;
518
- status: "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review";
528
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
519
529
  reason: string | null;
520
530
  retries: number;
521
531
  generation: number;
@@ -587,8 +597,24 @@ declare function useRelay(): {
587
597
  } | undefined;
588
598
  } | undefined;
589
599
  };
590
- connections: ("discord" | "google" | "apple" | "x")[];
600
+ connections: ("x" | "discord" | "google" | "apple")[];
591
601
  trigger: {
602
+ kind: "automatic";
603
+ observation?: {
604
+ source: string;
605
+ type: string;
606
+ } | undefined;
607
+ content?: {
608
+ tracker: string;
609
+ window: {
610
+ start: number;
611
+ end?: number | undefined;
612
+ };
613
+ enrollment: "none" | "required";
614
+ posts: "after-enrollment" | "since-start";
615
+ historical: "automatic" | "claim" | "staff";
616
+ } | undefined;
617
+ } | {
592
618
  kind: "manual";
593
619
  input: "text";
594
620
  constraints: {
@@ -607,18 +633,12 @@ declare function useRelay(): {
607
633
  actor?: "member" | "staff" | undefined;
608
634
  } | {
609
635
  kind: "manual";
610
- input: "quiz" | "photo" | "none";
636
+ input: "none" | "quiz" | "photo";
611
637
  actor?: "member" | "staff" | undefined;
612
- } | {
613
- kind: "automatic";
614
- observation?: {
615
- source: string;
616
- type: string;
617
- } | undefined;
618
638
  };
619
639
  availability: {
620
640
  kind: "available";
621
- input: "url" | "text" | "quiz" | "photo" | "none";
641
+ input: "text" | "url" | "none" | "quiz" | "photo";
622
642
  } | {
623
643
  kind: "completed";
624
644
  } | {
@@ -667,7 +687,7 @@ declare function useRelay(): {
667
687
  quest: string;
668
688
  member: string;
669
689
  evidence: string | null;
670
- status: "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review";
690
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
671
691
  reason: string | null;
672
692
  retries: number;
673
693
  generation: number;
@@ -715,7 +735,7 @@ declare function useRelay(): {
715
735
  } | undefined;
716
736
  } | null;
717
737
  release: string;
718
- interaction: "url" | "text" | "quiz" | "staff" | "photo" | "automatic" | "claim";
738
+ interaction: "text" | "url" | "automatic" | "claim" | "staff" | "quiz" | "photo";
719
739
  lifecycle: "paused" | "active" | "archived";
720
740
  rewards: {
721
741
  label: string;
@@ -778,8 +798,24 @@ declare function useRelay(): {
778
798
  } | undefined;
779
799
  } | undefined;
780
800
  };
781
- connections: ("discord" | "google" | "apple" | "x")[];
801
+ connections: ("x" | "discord" | "google" | "apple")[];
782
802
  trigger: {
803
+ kind: "automatic";
804
+ observation?: {
805
+ source: string;
806
+ type: string;
807
+ } | undefined;
808
+ content?: {
809
+ tracker: string;
810
+ window: {
811
+ start: number;
812
+ end?: number | undefined;
813
+ };
814
+ enrollment: "none" | "required";
815
+ posts: "after-enrollment" | "since-start";
816
+ historical: "automatic" | "claim" | "staff";
817
+ } | undefined;
818
+ } | {
783
819
  kind: "manual";
784
820
  input: "text";
785
821
  constraints: {
@@ -798,18 +834,12 @@ declare function useRelay(): {
798
834
  actor?: "member" | "staff" | undefined;
799
835
  } | {
800
836
  kind: "manual";
801
- input: "quiz" | "photo" | "none";
837
+ input: "none" | "quiz" | "photo";
802
838
  actor?: "member" | "staff" | undefined;
803
- } | {
804
- kind: "automatic";
805
- observation?: {
806
- source: string;
807
- type: string;
808
- } | undefined;
809
839
  };
810
840
  availability: {
811
841
  kind: "available";
812
- input: "url" | "text" | "quiz" | "photo" | "none";
842
+ input: "text" | "url" | "none" | "quiz" | "photo";
813
843
  } | {
814
844
  kind: "completed";
815
845
  } | {
@@ -858,7 +888,7 @@ declare function useRelay(): {
858
888
  quest: string;
859
889
  member: string;
860
890
  evidence: string | null;
861
- status: "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review";
891
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
862
892
  reason: string | null;
863
893
  retries: number;
864
894
  generation: number;
@@ -906,7 +936,7 @@ declare function useRelay(): {
906
936
  } | undefined;
907
937
  } | null;
908
938
  release: string;
909
- interaction: "url" | "text" | "quiz" | "staff" | "photo" | "automatic" | "claim";
939
+ interaction: "text" | "url" | "automatic" | "claim" | "staff" | "quiz" | "photo";
910
940
  lifecycle: "paused" | "active" | "archived";
911
941
  rewards: {
912
942
  label: string;
@@ -972,8 +1002,24 @@ declare function useRelay(): {
972
1002
  } | undefined;
973
1003
  } | undefined;
974
1004
  };
975
- connections: ("discord" | "google" | "apple" | "x")[];
1005
+ connections: ("x" | "discord" | "google" | "apple")[];
976
1006
  trigger: {
1007
+ kind: "automatic";
1008
+ observation?: {
1009
+ source: string;
1010
+ type: string;
1011
+ } | undefined;
1012
+ content?: {
1013
+ tracker: string;
1014
+ window: {
1015
+ start: number;
1016
+ end?: number | undefined;
1017
+ };
1018
+ enrollment: "none" | "required";
1019
+ posts: "after-enrollment" | "since-start";
1020
+ historical: "automatic" | "claim" | "staff";
1021
+ } | undefined;
1022
+ } | {
977
1023
  kind: "manual";
978
1024
  input: "text";
979
1025
  constraints: {
@@ -992,18 +1038,12 @@ declare function useRelay(): {
992
1038
  actor?: "member" | "staff" | undefined;
993
1039
  } | {
994
1040
  kind: "manual";
995
- input: "quiz" | "photo" | "none";
1041
+ input: "none" | "quiz" | "photo";
996
1042
  actor?: "member" | "staff" | undefined;
997
- } | {
998
- kind: "automatic";
999
- observation?: {
1000
- source: string;
1001
- type: string;
1002
- } | undefined;
1003
1043
  };
1004
1044
  availability: {
1005
1045
  kind: "available";
1006
- input: "url" | "text" | "quiz" | "photo" | "none";
1046
+ input: "text" | "url" | "none" | "quiz" | "photo";
1007
1047
  } | {
1008
1048
  kind: "completed";
1009
1049
  } | {
@@ -1052,7 +1092,7 @@ declare function useRelay(): {
1052
1092
  quest: string;
1053
1093
  member: string;
1054
1094
  evidence: string | null;
1055
- status: "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review";
1095
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
1056
1096
  reason: string | null;
1057
1097
  retries: number;
1058
1098
  generation: number;
@@ -1100,7 +1140,7 @@ declare function useRelay(): {
1100
1140
  } | undefined;
1101
1141
  } | null;
1102
1142
  release: string;
1103
- interaction: "url" | "text" | "quiz" | "staff" | "photo" | "automatic" | "claim";
1143
+ interaction: "text" | "url" | "automatic" | "claim" | "staff" | "quiz" | "photo";
1104
1144
  lifecycle: "paused" | "active" | "archived";
1105
1145
  rewards: {
1106
1146
  label: string;
@@ -1169,7 +1209,7 @@ declare function useRelay(): {
1169
1209
  auth: {
1170
1210
  providers: () => Promise<{
1171
1211
  providers: {
1172
- provider: "discord" | "google" | "apple" | "x";
1212
+ provider: "x" | "discord" | "google" | "apple";
1173
1213
  configured: boolean;
1174
1214
  }[];
1175
1215
  email: boolean;
@@ -1199,7 +1239,7 @@ declare function useRelay(): {
1199
1239
  expiresAt: number;
1200
1240
  }>;
1201
1241
  accounts: () => Promise<{
1202
- provider: "discord" | "google" | "apple" | "x";
1242
+ provider: "x" | "discord" | "google" | "apple";
1203
1243
  configured: boolean;
1204
1244
  status: "disconnected" | "connected" | "reconnect";
1205
1245
  subject: string | null;
@@ -1296,7 +1336,7 @@ declare function useRelay(): {
1296
1336
  quest: string;
1297
1337
  member: string;
1298
1338
  evidence: string | null;
1299
- status: "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review";
1339
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
1300
1340
  reason: string | null;
1301
1341
  retries: number;
1302
1342
  generation: number;
@@ -1368,8 +1408,24 @@ declare function useRelay(): {
1368
1408
  } | undefined;
1369
1409
  } | undefined;
1370
1410
  };
1371
- connections: ("discord" | "google" | "apple" | "x")[];
1411
+ connections: ("x" | "discord" | "google" | "apple")[];
1372
1412
  trigger: {
1413
+ kind: "automatic";
1414
+ observation?: {
1415
+ source: string;
1416
+ type: string;
1417
+ } | undefined;
1418
+ content?: {
1419
+ tracker: string;
1420
+ window: {
1421
+ start: number;
1422
+ end?: number | undefined;
1423
+ };
1424
+ enrollment: "none" | "required";
1425
+ posts: "after-enrollment" | "since-start";
1426
+ historical: "automatic" | "claim" | "staff";
1427
+ } | undefined;
1428
+ } | {
1373
1429
  kind: "manual";
1374
1430
  input: "text";
1375
1431
  constraints: {
@@ -1388,18 +1444,12 @@ declare function useRelay(): {
1388
1444
  actor?: "member" | "staff" | undefined;
1389
1445
  } | {
1390
1446
  kind: "manual";
1391
- input: "quiz" | "photo" | "none";
1447
+ input: "none" | "quiz" | "photo";
1392
1448
  actor?: "member" | "staff" | undefined;
1393
- } | {
1394
- kind: "automatic";
1395
- observation?: {
1396
- source: string;
1397
- type: string;
1398
- } | undefined;
1399
1449
  };
1400
1450
  availability: {
1401
1451
  kind: "available";
1402
- input: "url" | "text" | "quiz" | "photo" | "none";
1452
+ input: "text" | "url" | "none" | "quiz" | "photo";
1403
1453
  } | {
1404
1454
  kind: "completed";
1405
1455
  } | {
@@ -1448,7 +1498,7 @@ declare function useRelay(): {
1448
1498
  quest: string;
1449
1499
  member: string;
1450
1500
  evidence: string | null;
1451
- status: "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review";
1501
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
1452
1502
  reason: string | null;
1453
1503
  retries: number;
1454
1504
  generation: number;
@@ -1615,7 +1665,7 @@ declare function useRelay(): {
1615
1665
  provider: "discord";
1616
1666
  action: "grant-role";
1617
1667
  roleId: string;
1618
- status: "pending" | "delivered" | "failed";
1668
+ status: "pending" | "failed" | "delivered";
1619
1669
  attempts: number;
1620
1670
  nextAt: number;
1621
1671
  lastError: string | null;
@@ -1631,7 +1681,7 @@ declare function useRelay(): {
1631
1681
  quest: string;
1632
1682
  member: string;
1633
1683
  evidence: string | null;
1634
- status: "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review";
1684
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
1635
1685
  reason: string | null;
1636
1686
  retries: number;
1637
1687
  generation: number;
@@ -1696,7 +1746,7 @@ declare function useRelay(): {
1696
1746
  quest: string;
1697
1747
  member: string;
1698
1748
  evidence: string | null;
1699
- status: "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review";
1749
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
1700
1750
  reason: string | null;
1701
1751
  retries: number;
1702
1752
  generation: number;
@@ -1905,6 +1955,22 @@ declare function useRelay(): {
1905
1955
  })[];
1906
1956
  humanReview: boolean;
1907
1957
  trigger: {
1958
+ kind: "automatic";
1959
+ observation?: {
1960
+ source: string;
1961
+ type: string;
1962
+ } | undefined;
1963
+ content?: {
1964
+ tracker: string;
1965
+ window: {
1966
+ start: number;
1967
+ end?: number | undefined;
1968
+ };
1969
+ enrollment: "none" | "required";
1970
+ posts: "after-enrollment" | "since-start";
1971
+ historical: "automatic" | "claim" | "staff";
1972
+ } | undefined;
1973
+ } | {
1908
1974
  kind: "manual";
1909
1975
  input: "text";
1910
1976
  constraints: {
@@ -1923,14 +1989,8 @@ declare function useRelay(): {
1923
1989
  actor?: "member" | "staff" | undefined;
1924
1990
  } | {
1925
1991
  kind: "manual";
1926
- input: "quiz" | "photo" | "none";
1992
+ input: "none" | "quiz" | "photo";
1927
1993
  actor?: "member" | "staff" | undefined;
1928
- } | {
1929
- kind: "automatic";
1930
- observation?: {
1931
- source: string;
1932
- type: string;
1933
- } | undefined;
1934
1994
  };
1935
1995
  requires: {
1936
1996
  quest: string;
@@ -1955,6 +2015,10 @@ declare function useRelay(): {
1955
2015
  balance: string;
1956
2016
  };
1957
2017
  }[];
2018
+ performance?: {
2019
+ metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
2020
+ maxAgeMs: number;
2021
+ } | undefined;
1958
2022
  };
1959
2023
  }[]>;
1960
2024
  template: () => Promise<{
@@ -2089,6 +2153,22 @@ declare function useRelay(): {
2089
2153
  })[];
2090
2154
  humanReview: boolean;
2091
2155
  trigger: {
2156
+ kind: "automatic";
2157
+ observation?: {
2158
+ source: string;
2159
+ type: string;
2160
+ } | undefined;
2161
+ content?: {
2162
+ tracker: string;
2163
+ window: {
2164
+ start: number;
2165
+ end?: number | undefined;
2166
+ };
2167
+ enrollment: "none" | "required";
2168
+ posts: "after-enrollment" | "since-start";
2169
+ historical: "automatic" | "claim" | "staff";
2170
+ } | undefined;
2171
+ } | {
2092
2172
  kind: "manual";
2093
2173
  input: "text";
2094
2174
  constraints: {
@@ -2107,14 +2187,8 @@ declare function useRelay(): {
2107
2187
  actor?: "member" | "staff" | undefined;
2108
2188
  } | {
2109
2189
  kind: "manual";
2110
- input: "quiz" | "photo" | "none";
2190
+ input: "none" | "quiz" | "photo";
2111
2191
  actor?: "member" | "staff" | undefined;
2112
- } | {
2113
- kind: "automatic";
2114
- observation?: {
2115
- source: string;
2116
- type: string;
2117
- } | undefined;
2118
2192
  };
2119
2193
  requires: {
2120
2194
  quest: string;
@@ -2139,6 +2213,10 @@ declare function useRelay(): {
2139
2213
  balance: string;
2140
2214
  };
2141
2215
  }[];
2216
+ performance?: {
2217
+ metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
2218
+ maxAgeMs: number;
2219
+ } | undefined;
2142
2220
  };
2143
2221
  }>;
2144
2222
  snapshot: () => Promise<{
@@ -2272,6 +2350,22 @@ declare function useRelay(): {
2272
2350
  })[];
2273
2351
  humanReview: boolean;
2274
2352
  trigger: {
2353
+ kind: "automatic";
2354
+ observation?: {
2355
+ source: string;
2356
+ type: string;
2357
+ } | undefined;
2358
+ content?: {
2359
+ tracker: string;
2360
+ window: {
2361
+ start: number;
2362
+ end?: number | undefined;
2363
+ };
2364
+ enrollment: "none" | "required";
2365
+ posts: "after-enrollment" | "since-start";
2366
+ historical: "automatic" | "claim" | "staff";
2367
+ } | undefined;
2368
+ } | {
2275
2369
  kind: "manual";
2276
2370
  input: "text";
2277
2371
  constraints: {
@@ -2290,14 +2384,8 @@ declare function useRelay(): {
2290
2384
  actor?: "member" | "staff" | undefined;
2291
2385
  } | {
2292
2386
  kind: "manual";
2293
- input: "quiz" | "photo" | "none";
2387
+ input: "none" | "quiz" | "photo";
2294
2388
  actor?: "member" | "staff" | undefined;
2295
- } | {
2296
- kind: "automatic";
2297
- observation?: {
2298
- source: string;
2299
- type: string;
2300
- } | undefined;
2301
2389
  };
2302
2390
  requires: {
2303
2391
  quest: string;
@@ -2328,6 +2416,10 @@ declare function useRelay(): {
2328
2416
  createdAt: number;
2329
2417
  legacy: boolean;
2330
2418
  lifecycle: "paused" | "active" | "archived";
2419
+ performance?: {
2420
+ metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
2421
+ maxAgeMs: number;
2422
+ } | undefined;
2331
2423
  key?: string | undefined;
2332
2424
  origin?: {
2333
2425
  typeVersion: string;
@@ -2443,7 +2535,7 @@ declare function useRelay(): {
2443
2535
  quest: string;
2444
2536
  member: string;
2445
2537
  evidence: string | null;
2446
- status: "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review";
2538
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
2447
2539
  reason: string | null;
2448
2540
  retries: number;
2449
2541
  generation: number;
@@ -2636,6 +2728,22 @@ declare function useRelay(): {
2636
2728
  })[];
2637
2729
  humanReview: boolean;
2638
2730
  trigger: {
2731
+ kind: "automatic";
2732
+ observation?: {
2733
+ source: string;
2734
+ type: string;
2735
+ } | undefined;
2736
+ content?: {
2737
+ tracker: string;
2738
+ window: {
2739
+ start: number;
2740
+ end?: number | undefined;
2741
+ };
2742
+ enrollment: "none" | "required";
2743
+ posts: "after-enrollment" | "since-start";
2744
+ historical: "automatic" | "claim" | "staff";
2745
+ } | undefined;
2746
+ } | {
2639
2747
  kind: "manual";
2640
2748
  input: "text";
2641
2749
  constraints: {
@@ -2654,14 +2762,8 @@ declare function useRelay(): {
2654
2762
  actor?: "member" | "staff" | undefined;
2655
2763
  } | {
2656
2764
  kind: "manual";
2657
- input: "quiz" | "photo" | "none";
2765
+ input: "none" | "quiz" | "photo";
2658
2766
  actor?: "member" | "staff" | undefined;
2659
- } | {
2660
- kind: "automatic";
2661
- observation?: {
2662
- source: string;
2663
- type: string;
2664
- } | undefined;
2665
2767
  };
2666
2768
  requires: {
2667
2769
  quest: string;
@@ -2692,6 +2794,10 @@ declare function useRelay(): {
2692
2794
  createdAt: number;
2693
2795
  legacy: boolean;
2694
2796
  lifecycle: "paused" | "active" | "archived";
2797
+ performance?: {
2798
+ metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
2799
+ maxAgeMs: number;
2800
+ } | undefined;
2695
2801
  key?: string | undefined;
2696
2802
  origin?: {
2697
2803
  typeVersion: string;
@@ -2848,6 +2954,22 @@ declare function useRelay(): {
2848
2954
  })[];
2849
2955
  humanReview: boolean;
2850
2956
  trigger: {
2957
+ kind: "automatic";
2958
+ observation?: {
2959
+ source: string;
2960
+ type: string;
2961
+ } | undefined;
2962
+ content?: {
2963
+ tracker: string;
2964
+ window: {
2965
+ start: number;
2966
+ end?: number | undefined;
2967
+ };
2968
+ enrollment: "none" | "required";
2969
+ posts: "after-enrollment" | "since-start";
2970
+ historical: "automatic" | "claim" | "staff";
2971
+ } | undefined;
2972
+ } | {
2851
2973
  kind: "manual";
2852
2974
  input: "text";
2853
2975
  constraints: {
@@ -2866,14 +2988,8 @@ declare function useRelay(): {
2866
2988
  actor?: "member" | "staff" | undefined;
2867
2989
  } | {
2868
2990
  kind: "manual";
2869
- input: "quiz" | "photo" | "none";
2991
+ input: "none" | "quiz" | "photo";
2870
2992
  actor?: "member" | "staff" | undefined;
2871
- } | {
2872
- kind: "automatic";
2873
- observation?: {
2874
- source: string;
2875
- type: string;
2876
- } | undefined;
2877
2993
  };
2878
2994
  requires: {
2879
2995
  quest: string;
@@ -2904,6 +3020,10 @@ declare function useRelay(): {
2904
3020
  createdAt: number;
2905
3021
  legacy: boolean;
2906
3022
  lifecycle: "paused" | "active" | "archived";
3023
+ performance?: {
3024
+ metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
3025
+ maxAgeMs: number;
3026
+ } | undefined;
2907
3027
  key?: string | undefined;
2908
3028
  origin?: {
2909
3029
  typeVersion: string;
@@ -2955,8 +3075,24 @@ declare function useRelay(): {
2955
3075
  } | undefined;
2956
3076
  } | undefined;
2957
3077
  };
2958
- connections: ("discord" | "google" | "apple" | "x")[];
3078
+ connections: ("x" | "discord" | "google" | "apple")[];
2959
3079
  trigger: {
3080
+ kind: "automatic";
3081
+ observation?: {
3082
+ source: string;
3083
+ type: string;
3084
+ } | undefined;
3085
+ content?: {
3086
+ tracker: string;
3087
+ window: {
3088
+ start: number;
3089
+ end?: number | undefined;
3090
+ };
3091
+ enrollment: "none" | "required";
3092
+ posts: "after-enrollment" | "since-start";
3093
+ historical: "automatic" | "claim" | "staff";
3094
+ } | undefined;
3095
+ } | {
2960
3096
  kind: "manual";
2961
3097
  input: "text";
2962
3098
  constraints: {
@@ -2975,18 +3111,12 @@ declare function useRelay(): {
2975
3111
  actor?: "member" | "staff" | undefined;
2976
3112
  } | {
2977
3113
  kind: "manual";
2978
- input: "quiz" | "photo" | "none";
3114
+ input: "none" | "quiz" | "photo";
2979
3115
  actor?: "member" | "staff" | undefined;
2980
- } | {
2981
- kind: "automatic";
2982
- observation?: {
2983
- source: string;
2984
- type: string;
2985
- } | undefined;
2986
3116
  };
2987
3117
  availability: {
2988
3118
  kind: "available";
2989
- input: "url" | "text" | "quiz" | "photo" | "none";
3119
+ input: "text" | "url" | "none" | "quiz" | "photo";
2990
3120
  } | {
2991
3121
  kind: "completed";
2992
3122
  } | {
@@ -3035,7 +3165,7 @@ declare function useRelay(): {
3035
3165
  quest: string;
3036
3166
  member: string;
3037
3167
  evidence: string | null;
3038
- status: "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review";
3168
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
3039
3169
  reason: string | null;
3040
3170
  retries: number;
3041
3171
  generation: number;
@@ -3356,13 +3486,184 @@ declare function useRelay(): {
3356
3486
  type: "image/jpeg" | "image/png";
3357
3487
  size: number;
3358
3488
  }>;
3489
+ engagement: {
3490
+ boundaries: (input: zod.infer<typeof engagementPageQuerySchema>) => Promise<{
3491
+ current: {
3492
+ version: string;
3493
+ definition: {
3494
+ key: string;
3495
+ qualifiedBy: string;
3496
+ balance: string;
3497
+ metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
3498
+ baseline: "historical";
3499
+ maxAgeMs: number;
3500
+ budget: {
3501
+ projectDaily?: number | undefined;
3502
+ memberDaily?: number | undefined;
3503
+ projectLifetime?: number | undefined;
3504
+ };
3505
+ };
3506
+ publishedAt: number;
3507
+ } | null;
3508
+ requested: {
3509
+ version: string;
3510
+ definition: {
3511
+ key: string;
3512
+ qualifiedBy: string;
3513
+ balance: string;
3514
+ metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
3515
+ baseline: "historical";
3516
+ maxAgeMs: number;
3517
+ budget: {
3518
+ projectDaily?: number | undefined;
3519
+ memberDaily?: number | undefined;
3520
+ projectLifetime?: number | undefined;
3521
+ };
3522
+ };
3523
+ publishedAt: number;
3524
+ };
3525
+ items: {
3526
+ from: string;
3527
+ to: string;
3528
+ baseline: Partial<Record<"likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks", number>>;
3529
+ observedAt: number;
3530
+ settlement: {
3531
+ id: string;
3532
+ day: string;
3533
+ observation: string;
3534
+ qualification: string;
3535
+ earned: number;
3536
+ growth: number;
3537
+ paid: number;
3538
+ excluded: number;
3539
+ entry: string | null;
3540
+ createdAt: number;
3541
+ };
3542
+ }[];
3543
+ next: number | null;
3544
+ }>;
3545
+ page: (input: zod.infer<typeof engagementPageQuerySchema>) => Promise<{
3546
+ rule: {
3547
+ version: string;
3548
+ definition: {
3549
+ key: string;
3550
+ qualifiedBy: string;
3551
+ balance: string;
3552
+ metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
3553
+ baseline: "historical";
3554
+ maxAgeMs: number;
3555
+ budget: {
3556
+ projectDaily?: number | undefined;
3557
+ memberDaily?: number | undefined;
3558
+ projectLifetime?: number | undefined;
3559
+ };
3560
+ };
3561
+ publishedAt: number;
3562
+ };
3563
+ account: {
3564
+ member: string;
3565
+ earned: number;
3566
+ accounted: number;
3567
+ paid: number;
3568
+ excluded: number;
3569
+ pending: number;
3570
+ counters: Partial<Record<"likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks", number>>;
3571
+ baseline: Partial<Record<"likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks", number>>;
3572
+ observation: string | null;
3573
+ nextSettlementAt: number | null;
3574
+ reason: string | null;
3575
+ } | null;
3576
+ items: {
3577
+ id: string;
3578
+ day: string;
3579
+ observation: string;
3580
+ qualification: string;
3581
+ earned: number;
3582
+ growth: number;
3583
+ paid: number;
3584
+ excluded: number;
3585
+ entry: string | null;
3586
+ createdAt: number;
3587
+ }[];
3588
+ next: number | null;
3589
+ }>;
3590
+ };
3591
+ content: {
3592
+ performance: (input: zod.infer<typeof contentPerformanceQuerySchema>) => Promise<{
3593
+ current: {
3594
+ state: "pending" | "superseded" | "qualified" | "unqualified" | "needs-review" | "failed" | "content-pending" | "content-unqualified" | "waiting";
3595
+ reason: string | null;
3596
+ contentAttempt: string;
3597
+ attempt: string | null;
3598
+ reward: {
3599
+ attempt: string | null;
3600
+ completion: string | null;
3601
+ state: "excluded" | "unresolved" | "awarded";
3602
+ };
3603
+ };
3604
+ items: {
3605
+ attempt: string;
3606
+ contentAttempt: string;
3607
+ observation: string;
3608
+ observedAt: number;
3609
+ metrics: Partial<Record<"likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks", number>>;
3610
+ state: "pending" | "superseded" | "qualified" | "unqualified" | "needs-review" | "failed";
3611
+ reason: string | null;
3612
+ }[];
3613
+ next: number | null;
3614
+ }>;
3615
+ qualifications: (input: zod.infer<typeof contentQualificationQuerySchema>) => Promise<{
3616
+ items: {
3617
+ quest: string;
3618
+ content: string;
3619
+ member: string;
3620
+ release: string;
3621
+ attempt: string;
3622
+ revision: string;
3623
+ observation: string;
3624
+ current: boolean;
3625
+ state: "pending" | "superseded" | "qualified" | "unqualified" | "needs-review" | "failed" | "stale" | "blocked" | "unavailable";
3626
+ reason: string | null;
3627
+ reward: {
3628
+ attempt: string | null;
3629
+ completion: string | null;
3630
+ state: "excluded" | "unresolved" | "awarded";
3631
+ };
3632
+ }[];
3633
+ next: number | null;
3634
+ }>;
3635
+ admissions: (input: zod.input<typeof contentAdmissionQuerySchema>) => Promise<{
3636
+ items: {
3637
+ quest: string;
3638
+ content: string;
3639
+ release: string;
3640
+ state: "pending" | "admitted" | "excluded";
3641
+ reason: string | null;
3642
+ attempt: string | null;
3643
+ }[];
3644
+ next: string | null;
3645
+ }>;
3646
+ enroll: (input: zod.input<typeof contentEnrollmentInputSchema>) => Promise<{
3647
+ quest: string;
3648
+ member: string;
3649
+ enrolledAt: number;
3650
+ }>;
3651
+ claim: (input: zod.input<typeof contentReleaseInputSchema>) => Promise<{
3652
+ quest: string;
3653
+ content: string;
3654
+ release: string;
3655
+ state: "pending" | "admitted" | "excluded";
3656
+ reason: string | null;
3657
+ attempt: string | null;
3658
+ }>;
3659
+ };
3359
3660
  submit: (input: SubmitInput) => Promise<{
3360
3661
  id: string;
3361
3662
  release: string;
3362
3663
  quest: string;
3363
3664
  member: string;
3364
3665
  evidence: string | null;
3365
- status: "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review";
3666
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
3366
3667
  reason: string | null;
3367
3668
  retries: number;
3368
3669
  generation: number;
@@ -3415,7 +3716,7 @@ declare function useRelay(): {
3415
3716
  quest: string;
3416
3717
  member: string;
3417
3718
  evidence: string | null;
3418
- status: "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review";
3719
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
3419
3720
  reason: string | null;
3420
3721
  retries: number;
3421
3722
  generation: number;
@@ -3473,7 +3774,7 @@ declare function useRelay(): {
3473
3774
  quest: string;
3474
3775
  member: string;
3475
3776
  evidence: string | null;
3476
- status: "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review";
3777
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
3477
3778
  reason: string | null;
3478
3779
  retries: number;
3479
3780
  generation: number;
@@ -3669,8 +3970,24 @@ declare function useQuest(observed: QuestView): {
3669
3970
  } | undefined;
3670
3971
  } | undefined;
3671
3972
  };
3672
- connections: ("discord" | "google" | "apple" | "x")[];
3973
+ connections: ("x" | "discord" | "google" | "apple")[];
3673
3974
  trigger: {
3975
+ kind: "automatic";
3976
+ observation?: {
3977
+ source: string;
3978
+ type: string;
3979
+ } | undefined;
3980
+ content?: {
3981
+ tracker: string;
3982
+ window: {
3983
+ start: number;
3984
+ end?: number | undefined;
3985
+ };
3986
+ enrollment: "none" | "required";
3987
+ posts: "after-enrollment" | "since-start";
3988
+ historical: "automatic" | "claim" | "staff";
3989
+ } | undefined;
3990
+ } | {
3674
3991
  kind: "manual";
3675
3992
  input: "text";
3676
3993
  constraints: {
@@ -3689,18 +4006,12 @@ declare function useQuest(observed: QuestView): {
3689
4006
  actor?: "member" | "staff" | undefined;
3690
4007
  } | {
3691
4008
  kind: "manual";
3692
- input: "quiz" | "photo" | "none";
4009
+ input: "none" | "quiz" | "photo";
3693
4010
  actor?: "member" | "staff" | undefined;
3694
- } | {
3695
- kind: "automatic";
3696
- observation?: {
3697
- source: string;
3698
- type: string;
3699
- } | undefined;
3700
4011
  };
3701
4012
  availability: {
3702
4013
  kind: "available";
3703
- input: "url" | "text" | "quiz" | "photo" | "none";
4014
+ input: "text" | "url" | "none" | "quiz" | "photo";
3704
4015
  } | {
3705
4016
  kind: "completed";
3706
4017
  } | {
@@ -3749,7 +4060,7 @@ declare function useQuest(observed: QuestView): {
3749
4060
  quest: string;
3750
4061
  member: string;
3751
4062
  evidence: string | null;
3752
- status: "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected" | "needs-review";
4063
+ status: "needs-review" | "failed" | "queued" | "evaluating" | "accepted" | "progressed" | "rejected";
3753
4064
  reason: string | null;
3754
4065
  retries: number;
3755
4066
  generation: number;
@@ -3797,7 +4108,7 @@ declare function useQuest(observed: QuestView): {
3797
4108
  } | undefined;
3798
4109
  } | null;
3799
4110
  release: string;
3800
- interaction: "url" | "text" | "quiz" | "staff" | "photo" | "automatic" | "claim";
4111
+ interaction: "text" | "url" | "automatic" | "claim" | "staff" | "quiz" | "photo";
3801
4112
  lifecycle: "paused" | "active" | "archived";
3802
4113
  rewards: {
3803
4114
  label: string;
@@ -3930,7 +4241,7 @@ declare function isConnected(accounts: AccountConnection[] | null, provider: Aut
3930
4241
  declare function useAccounts(): {
3931
4242
  /** Null until read, and while nobody is signed in. */
3932
4243
  accounts: {
3933
- provider: "discord" | "google" | "apple" | "x";
4244
+ provider: "x" | "discord" | "google" | "apple";
3934
4245
  configured: boolean;
3935
4246
  status: "disconnected" | "connected" | "reconnect";
3936
4247
  subject: string | null;
@@ -4101,7 +4412,7 @@ declare function useReferralSummary(options?: {
4101
4412
  accounts: {
4102
4413
  id: string;
4103
4414
  program: string;
4104
- kind: "milestone" | "fixed" | "bonus";
4415
+ kind: "fixed" | "milestone" | "bonus";
4105
4416
  balance: string;
4106
4417
  earned: number;
4107
4418
  settled: number;