@domino-sdk/relay 1.54.0 → 1.56.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.
Files changed (65) hide show
  1. package/CHANGELOG.md +1859 -0
  2. package/dist/analytics-URV-mxjH.d.ts +482 -0
  3. package/dist/{attempt-captures-QC4kTA44.d.ts → attempt-captures-CxxO7DeD.d.ts} +1 -1
  4. package/dist/authoring.d.ts +277 -40
  5. package/dist/authoring.js +142 -14
  6. package/dist/{automatic-outcomes-CVyZHxir.d.ts → automatic-outcomes-DxW_v5Wc.d.ts} +5 -2
  7. package/dist/avatar.d.ts +1 -1
  8. package/dist/browser.d.ts +7 -7
  9. package/dist/browser.js +10 -10
  10. package/dist/{capability-error-FQGGb5xS.d.ts → capability-error-DSd8EMQC.d.ts} +76 -2
  11. package/dist/{chunk-RP4LLEON.js → chunk-ABJ4G47X.js} +1 -1
  12. package/dist/{chunk-IELNFM3V.js → chunk-BHHUSBSD.js} +97 -8
  13. package/dist/chunk-BJYMTCWG.js +950 -0
  14. package/dist/{chunk-K6TVMNU4.js → chunk-CK7HO32Z.js} +1 -1
  15. package/dist/{chunk-GTQJSDBS.js → chunk-CXKXPB7K.js} +32 -16
  16. package/dist/{chunk-TL5TL5RD.js → chunk-G6XVBYH7.js} +4 -4
  17. package/dist/{chunk-S2PMKZSX.js → chunk-H2MD6E7Z.js} +21 -2
  18. package/dist/{chunk-YVC3B72P.js → chunk-INSWI2VZ.js} +1 -1
  19. package/dist/{chunk-XFAYQFRO.js → chunk-KBVH4XZC.js} +1 -1
  20. package/dist/{chunk-MLIXJPKL.js → chunk-MHPKEVEW.js} +1 -0
  21. package/dist/{chunk-7BNCLWAO.js → chunk-MNU6UPXY.js} +1 -1
  22. package/dist/{chunk-JL7J3EQQ.js → chunk-NK6EER33.js} +46 -16
  23. package/dist/{chunk-QIDQWXSF.js → chunk-OTITLABX.js} +2 -2
  24. package/dist/{chunk-53JMTUWG.js → chunk-QNQNKIAA.js} +1 -1
  25. package/dist/{chunk-ZJ3FVZRP.js → chunk-RBPMT53S.js} +132 -99
  26. package/dist/chunk-ULQU7KC4.js +704 -0
  27. package/dist/chunk-VSHV7FEA.js +344 -0
  28. package/dist/{chunk-LPHXTZDA.js → chunk-W5U2WXG3.js} +2 -2
  29. package/dist/{client-CzNtl8UO.d.ts → client-bX3oTpRu.d.ts} +111 -8
  30. package/dist/{deployments-ovtqtAcx.d.ts → deployments-D3lxfQMB.d.ts} +1436 -185
  31. package/dist/{groups-B5R1RCsl.d.ts → groups-DPE004_V.d.ts} +135 -139
  32. package/dist/index.d.ts +8 -8
  33. package/dist/index.js +9 -9
  34. package/dist/integrations-CcD5NPEA.d.ts +633 -0
  35. package/dist/internal.d.ts +11 -10
  36. package/dist/internal.js +9 -9
  37. package/dist/{offers-CH1RZekg.d.ts → offers-CtzMeB7O.d.ts} +207 -2
  38. package/dist/{pages-BTlOg8sl.d.ts → pages-BlLqB8ZQ.d.ts} +82 -2
  39. package/dist/portal-proxy.d.ts +11 -1
  40. package/dist/portal-proxy.js +27 -6
  41. package/dist/{profiles-Cdv4BSd_.d.ts → profiles-BoOK03cR.d.ts} +2 -0
  42. package/dist/react/index.d.ts +566 -13
  43. package/dist/react/index.js +105 -15
  44. package/dist/runtime/authoring.js +1 -1
  45. package/dist/runtime/chunks/NDB42VFF.js +1 -0
  46. package/dist/runtime/manifest.json +3 -3
  47. package/dist/runtime/schema.js +1 -1
  48. package/dist/{schema-BJ9bOgpN.d.ts → schema-C4m9RhCR.d.ts} +166 -6
  49. package/dist/schema.d.ts +383 -79
  50. package/dist/schema.js +105 -41
  51. package/dist/server/index.d.ts +11 -10
  52. package/dist/server/index.js +1590 -1175
  53. package/dist/{submission-input-BNah53go.d.ts → submission-input-wTiYGdgA.d.ts} +2 -2
  54. package/dist/{telegram-browser-C36j_6v-.d.ts → telegram-browser-Bh3i0HiH.d.ts} +1 -1
  55. package/dist/testing.d.ts +85 -12
  56. package/dist/testing.js +322 -37
  57. package/dist/{transport-C8BlCzmF.d.ts → transport-CnKA-_RL.d.ts} +7625 -1265
  58. package/dist/vite.d.ts +54 -1
  59. package/dist/vite.js +35 -0
  60. package/dist/{x-BfQcsDp0.d.ts → x-1czZFVUW.d.ts} +1 -1
  61. package/package.json +3 -2
  62. package/dist/chunk-2NUD237O.js +0 -102
  63. package/dist/chunk-CCE2JWES.js +0 -1083
  64. package/dist/integrations-CllF-kWg.d.ts +0 -314
  65. package/dist/runtime/chunks/AVRVSLHX.js +0 -1
@@ -1,20 +1,21 @@
1
- import { B as Badge, b as MemberBadges, O as Offer, e as Redemption } from '../offers-CH1RZekg.js';
1
+ import { B as Badge, b as MemberBadges, O as Offer, e as Redemption } from '../offers-CtzMeB7O.js';
2
2
  import { b as ParticipantSession, R as RelayEvent, P as ParticipantActivity, M as MemberSummary } from '../participant-activity-iciCEs_8.js';
3
- import { g as RelayError, R as RelayClient, m as SubmissionDraft } from '../client-CzNtl8UO.js';
4
- import { P as Page, D as collectionViewSchema, j as QuestView, g as QuestOutcomeQuery, e as QuestOutcome } from '../pages-BTlOg8sl.js';
3
+ import { g as RelayError, R as RelayClient, m as SubmissionDraft } from '../client-bX3oTpRu.js';
4
+ import { P as Page, G as collectionViewSchema, l as QuestView, a as CreatorAccountProvider, i as QuestOutcomeQuery, g as QuestOutcome } from '../pages-BlLqB8ZQ.js';
5
+ export { C as CreatorAccount, b as CreatorAccounts } from '../pages-BlLqB8ZQ.js';
5
6
  import * as react from 'react';
6
7
  import { ReactNode } from 'react';
7
8
  import { J as JSONType } from '../util.d-w9f9t3ua.js';
8
9
  import { z } from 'zod';
9
- import { E as Entitlement, a as AttemptStatus, T as TieredRewardReference } from '../schema-BJ9bOgpN.js';
10
+ import { E as Entitlement, a as AttemptStatus, f as PointEntry, e as PointBalances, j as PointLedgerReference, T as TieredRewardReference } from '../schema-C4m9RhCR.js';
10
11
  import { a as AuthProvider, A as AccountConnection } from '../accounts-DRPENuZe.js';
11
12
  export { T as TelegramAccountConnection, b as TelegramSignInMethods } from '../accounts-DRPENuZe.js';
12
- import { c as SignInMethods, C as CosmosChains, d as SignInOption, f as SignInUnavailable, T as TelegramSignInOption, g as SignInWallet, D as DiscoveredWallet } from '../telegram-browser-C36j_6v-.js';
13
- export { a as EmailSignInOption, O as OAuthSignInOption, b as SignInIcon, W as WalletSignInOption, t as telegramMiniAppInitData } from '../telegram-browser-C36j_6v-.js';
13
+ import { c as SignInMethods, C as CosmosChains, d as SignInOption, f as SignInUnavailable, T as TelegramSignInOption, g as SignInWallet, D as DiscoveredWallet } from '../telegram-browser-Bh3i0HiH.js';
14
+ export { a as EmailSignInOption, O as OAuthSignInOption, b as SignInIcon, W as WalletSignInOption, t as telegramMiniAppInitData } from '../telegram-browser-Bh3i0HiH.js';
14
15
  import { f as WalletSigner, d as WalletSignInNetwork, L as LinkedWallet } from '../wallet-Ac7OFpOr.js';
15
- import { h as LeaderboardPlacement, be as referralSummarySchema, g as LeaderboardPage, l as PointEntry, k as PointBalances, p as PointLedgerReference } from '../groups-B5R1RCsl.js';
16
- import { f as ProfileUpdate, e as ProfileSummary, a as ProfileCompletion, d as ProfileReferral } from '../profiles-Cdv4BSd_.js';
17
- import '../submission-input-BNah53go.js';
16
+ import { h as LeaderboardPlacement, b0 as referralSummarySchema, g as LeaderboardPage } from '../groups-DPE004_V.js';
17
+ import { f as ProfileUpdate, e as ProfileSummary, a as ProfileCompletion, d as ProfileReferral } from '../profiles-BoOK03cR.js';
18
+ import '../submission-input-wTiYGdgA.js';
18
19
  import '../action-DBzILFx9.js';
19
20
 
20
21
  /**
@@ -1241,6 +1242,451 @@ declare function useQuest(observed: QuestView): {
1241
1242
  } | null;
1242
1243
  } | null | undefined;
1243
1244
  retryAt?: number | undefined;
1245
+ nextAvailableAt?: number | undefined;
1246
+ };
1247
+ /** Input recovered after the quest changed. Prefill the form with it. */
1248
+ draft: SubmissionDraft | null;
1249
+ notice: QuestNotice;
1250
+ error: RelayError | null;
1251
+ /** True while `submit`, `resume`, `retry` or `restart` runs. */
1252
+ isPending: boolean;
1253
+ /** @deprecated Use `isPending`. Removed in 2.0.0. */
1254
+ busy: boolean;
1255
+ saved: SavedSubmission;
1256
+ /** Review and explicitly restart this terminally retired saved submission. */
1257
+ retired: boolean;
1258
+ /** The attempt the last "received" notice is about. */
1259
+ receipt: string | null;
1260
+ startingFresh: boolean;
1261
+ };
1262
+ /**
1263
+ * `useQuest()` plus its `questActionState()`: `open`, `counted` and `automatic` next to the
1264
+ * submission state and actions.
1265
+ */
1266
+ declare function useQuestAction(observed: QuestView): {
1267
+ open: boolean;
1268
+ counted: boolean;
1269
+ automatic: boolean;
1270
+ restart: () => Promise<void>;
1271
+ submit: (input: QuestInput) => Promise<void>;
1272
+ /** Finish an interrupted submission, or reopen an outdated draft. */
1273
+ resume: () => Promise<void>;
1274
+ /**
1275
+ * Re-run verification that failed to run. Never creates a new attempt.
1276
+ * Domino refuses this for automatic quests, so never offer it for them.
1277
+ */
1278
+ retry: () => Promise<void>;
1279
+ /** The newest known version of the quest. Render this, not the prop. */
1280
+ view: {
1281
+ quest: string;
1282
+ title: string;
1283
+ presentation: {
1284
+ steps?: {
1285
+ title: string;
1286
+ description?: string | undefined;
1287
+ action?: {
1288
+ kind: "link";
1289
+ url: string;
1290
+ label: string;
1291
+ } | undefined;
1292
+ }[] | undefined;
1293
+ image?: string | undefined;
1294
+ imageAlt?: string | undefined;
1295
+ requirements?: ({
1296
+ kind: "account";
1297
+ provider: "discord" | "x" | "google" | "apple";
1298
+ } | {
1299
+ kind: "wallet";
1300
+ chain?: "solana" | "eip155" | "cosmos" | undefined;
1301
+ })[] | undefined;
1302
+ quiz?: {
1303
+ id: string;
1304
+ prompt: string;
1305
+ choices: {
1306
+ id: string;
1307
+ label: string;
1308
+ }[];
1309
+ }[] | undefined;
1310
+ instructions?: string | undefined;
1311
+ video?: {
1312
+ url: string;
1313
+ poster?: string | undefined;
1314
+ captions?: {
1315
+ url: string;
1316
+ language: string;
1317
+ label: string;
1318
+ } | undefined;
1319
+ } | undefined;
1320
+ };
1321
+ connections: ("discord" | "x" | "google" | "apple")[];
1322
+ trigger: {
1323
+ kind: "manual";
1324
+ input: "text";
1325
+ constraints: {
1326
+ required: boolean;
1327
+ minLength: number;
1328
+ maxLength: number;
1329
+ };
1330
+ actor?: "member" | "staff" | undefined;
1331
+ } | {
1332
+ kind: "manual";
1333
+ input: "url";
1334
+ constraints: {
1335
+ required: boolean;
1336
+ allowedHosts?: string[] | undefined;
1337
+ };
1338
+ actor?: "member" | "staff" | undefined;
1339
+ } | {
1340
+ kind: "manual";
1341
+ input: "none" | "quiz" | "photo";
1342
+ actor?: "member" | "staff" | undefined;
1343
+ } | {
1344
+ kind: "automatic";
1345
+ tracker?: {
1346
+ tracker: string;
1347
+ source: string;
1348
+ on: "new-record" | "new-observation" | "data-changed";
1349
+ beneficiary: string;
1350
+ where?: {
1351
+ path: string;
1352
+ gt?: number | {
1353
+ setting: string;
1354
+ } | undefined;
1355
+ gte?: number | {
1356
+ setting: string;
1357
+ } | undefined;
1358
+ lt?: number | {
1359
+ setting: string;
1360
+ } | undefined;
1361
+ lte?: number | {
1362
+ setting: string;
1363
+ } | undefined;
1364
+ } | {
1365
+ path: string;
1366
+ equals: string | number | boolean;
1367
+ } | ({
1368
+ path: string;
1369
+ gt?: number | {
1370
+ setting: string;
1371
+ } | undefined;
1372
+ gte?: number | {
1373
+ setting: string;
1374
+ } | undefined;
1375
+ lt?: number | {
1376
+ setting: string;
1377
+ } | undefined;
1378
+ lte?: number | {
1379
+ setting: string;
1380
+ } | undefined;
1381
+ } | {
1382
+ path: string;
1383
+ equals: string | number | boolean;
1384
+ })[] | undefined;
1385
+ enrollment?: "none" | "required" | undefined;
1386
+ since?: "activation" | "window" | "enrollment" | undefined;
1387
+ historical?: "staff" | "claim" | "automatic" | undefined;
1388
+ content?: true | undefined;
1389
+ } | undefined;
1390
+ };
1391
+ availability: {
1392
+ kind: "available";
1393
+ input: "url" | "text" | "none" | "quiz" | "photo";
1394
+ } | {
1395
+ kind: "completed";
1396
+ } | {
1397
+ kind: "locked";
1398
+ missing: ({
1399
+ kind: "completion";
1400
+ quest: string;
1401
+ title: string;
1402
+ scope: "ever";
1403
+ } | {
1404
+ kind: "completion";
1405
+ quest: string;
1406
+ title: string;
1407
+ scope: "period";
1408
+ period: "day" | "week" | "month";
1409
+ resetsAt: number;
1410
+ } | {
1411
+ kind: "balance";
1412
+ balance: string;
1413
+ title: string;
1414
+ minimum: number;
1415
+ current: number;
1416
+ } | {
1417
+ kind: "group";
1418
+ group: string;
1419
+ title: string;
1420
+ })[];
1421
+ } | {
1422
+ kind: "blocked";
1423
+ reason: "paused" | "outside-window" | "budget-exhausted" | "enrollment-required" | "connection-required" | "wallet-required";
1424
+ window?: "quest" | "tracker" | undefined;
1425
+ resetsAt?: number | undefined;
1426
+ } | {
1427
+ kind: "staff-required";
1428
+ } | {
1429
+ kind: "automatic";
1430
+ } | {
1431
+ kind: "checking";
1432
+ attempt: string;
1433
+ } | {
1434
+ kind: "needs-review";
1435
+ attempt: string;
1436
+ } | {
1437
+ kind: "retryable";
1438
+ attempt: string;
1439
+ };
1440
+ completed: boolean;
1441
+ completion: {
1442
+ kind: "progress";
1443
+ goal: {
1444
+ kind: "count";
1445
+ count: number;
1446
+ };
1447
+ window: {
1448
+ kind: "lifetime";
1449
+ } | {
1450
+ kind: "calendar";
1451
+ period: "day" | "week" | "month";
1452
+ latenessMs: number;
1453
+ } | {
1454
+ kind: "rolling";
1455
+ durationMs: number;
1456
+ };
1457
+ repeat: "repeat" | "once";
1458
+ } | {
1459
+ kind: "streak";
1460
+ days: number;
1461
+ } | {
1462
+ kind: "once";
1463
+ } | {
1464
+ kind: "keyed";
1465
+ };
1466
+ progress: {
1467
+ current: number;
1468
+ target: number;
1469
+ reason: string;
1470
+ } | null;
1471
+ completionCount: number;
1472
+ visibility: "visible" | "hidden";
1473
+ missing: ({
1474
+ kind: "completion";
1475
+ quest: string;
1476
+ title: string;
1477
+ scope: "ever";
1478
+ } | {
1479
+ kind: "completion";
1480
+ quest: string;
1481
+ title: string;
1482
+ scope: "period";
1483
+ period: "day" | "week" | "month";
1484
+ resetsAt: number;
1485
+ } | {
1486
+ kind: "balance";
1487
+ balance: string;
1488
+ title: string;
1489
+ minimum: number;
1490
+ current: number;
1491
+ } | {
1492
+ kind: "group";
1493
+ group: string;
1494
+ title: string;
1495
+ })[];
1496
+ campaign: {
1497
+ key: string;
1498
+ title: string;
1499
+ enrollment: "none" | "required";
1500
+ enrolledAt: number | null;
1501
+ withdrawnAt: number | null;
1502
+ withdrawalReason: string | null;
1503
+ window?: {
1504
+ from: number;
1505
+ until: number;
1506
+ } | undefined;
1507
+ } | null;
1508
+ window: {
1509
+ from: number;
1510
+ until: number;
1511
+ } | null;
1512
+ budgets: {
1513
+ id: string;
1514
+ scope: "member" | "project";
1515
+ period: "lifetime" | "day" | "week" | "month";
1516
+ remaining: number;
1517
+ resetsAt: number | null;
1518
+ }[];
1519
+ attempt: {
1520
+ id: string;
1521
+ release: string;
1522
+ quest: string;
1523
+ member: string;
1524
+ evidence: string | null;
1525
+ status: AttemptStatus;
1526
+ reason: string | null;
1527
+ retries: number;
1528
+ generation: number;
1529
+ completion: string | null;
1530
+ reviewRewards: ({
1531
+ kind: "tier";
1532
+ reward: {
1533
+ id: string;
1534
+ title: string;
1535
+ tiers: {
1536
+ id: string;
1537
+ title: string;
1538
+ }[];
1539
+ inventory: {
1540
+ kind: "untracked";
1541
+ };
1542
+ fulfillment: {
1543
+ kind: "staff-handover";
1544
+ } | {
1545
+ kind: "automatic";
1546
+ };
1547
+ badge?: string | undefined;
1548
+ group?: string | undefined;
1549
+ };
1550
+ tier: string;
1551
+ } | {
1552
+ kind: "integration";
1553
+ provider: "discord";
1554
+ action: "grant-role";
1555
+ roleId: string;
1556
+ } | {
1557
+ kind: "points";
1558
+ balance: string;
1559
+ amount: number;
1560
+ })[] | null;
1561
+ evaluationRun: number;
1562
+ deferCount: number;
1563
+ deferUntil: number | null;
1564
+ nextEvaluationAt: number | null;
1565
+ code: string | null;
1566
+ progress: {
1567
+ current: number;
1568
+ target: number;
1569
+ reason: string;
1570
+ } | null;
1571
+ requestedReview: boolean;
1572
+ createdAt: number;
1573
+ input?: {
1574
+ kind: "text";
1575
+ value: string;
1576
+ } | {
1577
+ kind: "url";
1578
+ value: string;
1579
+ } | {
1580
+ kind: "quiz";
1581
+ answers: {
1582
+ [k: string]: string;
1583
+ };
1584
+ release?: string | undefined;
1585
+ } | undefined;
1586
+ } | null;
1587
+ release: string;
1588
+ interaction: "url" | "text" | "staff" | "claim" | "automatic" | "quiz" | "photo";
1589
+ lifecycle: "paused" | "active" | "archived";
1590
+ rewards: ({
1591
+ kind: "points";
1592
+ label: string;
1593
+ amount: number;
1594
+ ledger: {
1595
+ id: string;
1596
+ key: string | null;
1597
+ name: string;
1598
+ };
1599
+ } | {
1600
+ kind: "tier";
1601
+ label: string;
1602
+ reward: {
1603
+ id: string;
1604
+ key: string | null;
1605
+ title: string;
1606
+ badge?: {
1607
+ name: string;
1608
+ description: string;
1609
+ image: string;
1610
+ id: string;
1611
+ key: string | null;
1612
+ } | undefined;
1613
+ group?: {
1614
+ key: string;
1615
+ title: string;
1616
+ } | undefined;
1617
+ };
1618
+ tier: string;
1619
+ } | {
1620
+ kind: "integration";
1621
+ label: string;
1622
+ })[];
1623
+ key?: string | undefined;
1624
+ streak?: {
1625
+ goal: number;
1626
+ current: number;
1627
+ best: number;
1628
+ today: string;
1629
+ todayQualified: boolean;
1630
+ timeZone: string;
1631
+ nextBoundary: number;
1632
+ pendingTimeZone: {
1633
+ timeZone: string;
1634
+ effectiveAt: number;
1635
+ } | null;
1636
+ days: {
1637
+ day: number;
1638
+ date: string;
1639
+ timeZone: string;
1640
+ occurredAt: number;
1641
+ }[];
1642
+ milestone: {
1643
+ status: "pending";
1644
+ } | {
1645
+ status: "awarded";
1646
+ completion: string;
1647
+ achievedAt: number;
1648
+ } | {
1649
+ status: "budget-exhausted";
1650
+ budget: string;
1651
+ achievedAt: number;
1652
+ };
1653
+ } | null | undefined;
1654
+ counter?: {
1655
+ goal: number;
1656
+ current: number;
1657
+ window: {
1658
+ key: string;
1659
+ start: number | null;
1660
+ end: number | null;
1661
+ };
1662
+ repeat: "repeat" | "once";
1663
+ settled: number;
1664
+ latest: {
1665
+ id: string;
1666
+ ordinal: number;
1667
+ achievedAt: number;
1668
+ window: string;
1669
+ status: "revoked";
1670
+ completion: string;
1671
+ revokedAt: number;
1672
+ } | {
1673
+ id: string;
1674
+ ordinal: number;
1675
+ achievedAt: number;
1676
+ window: string;
1677
+ status: "awarded";
1678
+ completion: string;
1679
+ } | {
1680
+ id: string;
1681
+ ordinal: number;
1682
+ achievedAt: number;
1683
+ window: string;
1684
+ status: "budget-exhausted";
1685
+ budget: string;
1686
+ } | null;
1687
+ } | null | undefined;
1688
+ retryAt?: number | undefined;
1689
+ nextAvailableAt?: number | undefined;
1244
1690
  };
1245
1691
  /** Input recovered after the quest changed. Prefill the form with it. */
1246
1692
  draft: SubmissionDraft | null;
@@ -1278,11 +1724,13 @@ type QuestTone = "open" | "done" | "waiting" | "attention" | "locked" | "off";
1278
1724
  * - `rejected`: the last submission was not accepted; the participant can try again.
1279
1725
  * - `retry-cooldown`: the last submission was not accepted, and the quest's retry cooldown runs
1280
1726
  * until `retryAt`.
1727
+ * - `completion-cooldown`: the last completion was accepted, and the quest's completion cooldown
1728
+ * runs until `retryAt`.
1281
1729
  * - `ready`: the participant can act now.
1282
1730
  *
1283
1731
  * @compat open
1284
1732
  */
1285
- type KnownQuestStatusCode = "completed" | "paused" | "closed" | "counter" | "counter-budget-exhausted" | "counter-revoked" | "streak" | "streak-budget-exhausted" | "automatic" | "in-progress" | "locked" | "budget-exhausted" | "connection-required" | "wallet-required" | "outside-window" | "enrollment-required" | "checking" | "evaluator-deferred" | "evaluator-progress" | "in-review" | "retryable" | "staff-required" | "rejected" | "retry-cooldown" | "ready";
1733
+ type KnownQuestStatusCode = "completed" | "paused" | "closed" | "counter" | "counter-budget-exhausted" | "counter-revoked" | "streak" | "streak-budget-exhausted" | "automatic" | "in-progress" | "locked" | "budget-exhausted" | "connection-required" | "wallet-required" | "outside-window" | "enrollment-required" | "checking" | "evaluator-deferred" | "evaluator-progress" | "in-review" | "retryable" | "staff-required" | "rejected" | "retry-cooldown" | "completion-cooldown" | "ready";
1286
1734
  /** A known code, or one a newer SDK adds: render unknown codes with a neutral fallback. */
1287
1735
  type QuestStatusCode = KnownQuestStatusCode | (string & {});
1288
1736
  type QuestStatus = {
@@ -1295,7 +1743,10 @@ type QuestStatus = {
1295
1743
  * string when it gave none.
1296
1744
  */
1297
1745
  reason?: string;
1298
- /** Unix milliseconds when the participant may submit again, when `code` is `retry-cooldown`. */
1746
+ /**
1747
+ * Unix milliseconds when the participant may submit again, when `code` is `retry-cooldown` or
1748
+ * `completion-cooldown`.
1749
+ */
1299
1750
  retryAt?: number;
1300
1751
  };
1301
1752
  /** `QuestStatus` in English: a short `label`, and a sentence of `detail` when there is more. */
@@ -1342,9 +1793,33 @@ declare function isCoolingDown(view: QuestView, now?: number): boolean;
1342
1793
  declare function questStatusText(view: QuestView, now?: number): QuestStatusText;
1343
1794
  /**
1344
1795
  * True when the participant can submit something right now (`now`, Unix milliseconds, the current
1345
- * time by default): not while a retry cooldown runs.
1796
+ * time by default): not while a retry or completion cooldown runs.
1346
1797
  */
1347
1798
  declare function canSubmit(view: QuestView, now?: number): boolean;
1799
+ /** What a quest page shows for one quest; see `questActionState`. */
1800
+ type QuestActionState = {
1801
+ /**
1802
+ * True when the page shows the quest's input: the participant can submit now, or has just
1803
+ * discarded a failed attempt on an active quest and starts a new submission.
1804
+ */
1805
+ open: boolean;
1806
+ /**
1807
+ * True once the submission just sent was accepted on a repeatable quest. Show "accepted" rather
1808
+ * than "received", and clear the form for the next round.
1809
+ */
1810
+ counted: boolean;
1811
+ /** The server owns every automatic run: offer no input, resume, retry, or restart. */
1812
+ automatic: boolean;
1813
+ };
1814
+ /**
1815
+ * What a quest page shows for a `useQuest()` result (`now`, Unix milliseconds, the current time by
1816
+ * default). The same rules every starter's quest component follows.
1817
+ */
1818
+ declare function questActionState(quest: {
1819
+ view: QuestView;
1820
+ startingFresh: boolean;
1821
+ receipt: string | null;
1822
+ }, now?: number): QuestActionState;
1348
1823
  /**
1349
1824
  * "x of y completed" for a list of quests: `total` counts every quest that is not archived or
1350
1825
  * repeatable, including locked and paused ones, because they are still part of what the
@@ -1604,6 +2079,83 @@ declare function useTelegramAccount(): {
1604
2079
  error: RelayError | null;
1605
2080
  refresh(): Promise<void>;
1606
2081
  };
2082
+ /**
2083
+ * The signed-in participant's creator accounts in `data` (`{ accounts }`): the platform accounts
2084
+ * they publish from, such as a YouTube channel. Creator accounts are not `useAccounts()`'s
2085
+ * providers in SDK 1.x, so they have this hook of their own, with the same behavior: `connect()`
2086
+ * leaves for the provider's consent screen and comes back linked, linking another account on the
2087
+ * same platform replaces it, and a failure lands in `actionError`.
2088
+ */
2089
+ declare function useCreatorAccounts(): {
2090
+ connect: (provider: CreatorAccountProvider) => Promise<boolean>;
2091
+ disconnect: (provider: CreatorAccountProvider) => Promise<boolean>;
2092
+ isPending: boolean;
2093
+ actionError: RelayError | null;
2094
+ resetAction: () => void;
2095
+ retry: () => Promise<boolean>;
2096
+ settle: () => boolean;
2097
+ /** True when the member's account on `provider` is linked and readable right now. */
2098
+ isConnected: (provider: CreatorAccountProvider) => boolean;
2099
+ status: "loading";
2100
+ data: undefined;
2101
+ error: null;
2102
+ refresh(): Promise<void>;
2103
+ } | {
2104
+ connect: (provider: CreatorAccountProvider) => Promise<boolean>;
2105
+ disconnect: (provider: CreatorAccountProvider) => Promise<boolean>;
2106
+ isPending: boolean;
2107
+ actionError: RelayError | null;
2108
+ resetAction: () => void;
2109
+ retry: () => Promise<boolean>;
2110
+ settle: () => boolean;
2111
+ /** True when the member's account on `provider` is linked and readable right now. */
2112
+ isConnected: (provider: CreatorAccountProvider) => boolean;
2113
+ status: "error";
2114
+ data: undefined;
2115
+ error: RelayError;
2116
+ refresh(): Promise<void>;
2117
+ } | {
2118
+ connect: (provider: CreatorAccountProvider) => Promise<boolean>;
2119
+ disconnect: (provider: CreatorAccountProvider) => Promise<boolean>;
2120
+ isPending: boolean;
2121
+ actionError: RelayError | null;
2122
+ resetAction: () => void;
2123
+ retry: () => Promise<boolean>;
2124
+ settle: () => boolean;
2125
+ /** True when the member's account on `provider` is linked and readable right now. */
2126
+ isConnected: (provider: CreatorAccountProvider) => boolean;
2127
+ status: "signed-out";
2128
+ data: undefined;
2129
+ error: null;
2130
+ refresh(): Promise<void>;
2131
+ } | {
2132
+ connect: (provider: CreatorAccountProvider) => Promise<boolean>;
2133
+ disconnect: (provider: CreatorAccountProvider) => Promise<boolean>;
2134
+ isPending: boolean;
2135
+ actionError: RelayError | null;
2136
+ resetAction: () => void;
2137
+ retry: () => Promise<boolean>;
2138
+ settle: () => boolean;
2139
+ /** True when the member's account on `provider` is linked and readable right now. */
2140
+ isConnected: (provider: CreatorAccountProvider) => boolean;
2141
+ status: "ready";
2142
+ data: {
2143
+ accounts: {
2144
+ provider: CreatorAccountProvider;
2145
+ configured: boolean;
2146
+ status: "disconnected" | "connected" | "reconnect";
2147
+ subject: string | null;
2148
+ revision: number;
2149
+ profile: {
2150
+ name?: string | undefined;
2151
+ username?: string | undefined;
2152
+ imageUrl?: string | undefined;
2153
+ } | null;
2154
+ }[];
2155
+ };
2156
+ error: RelayError | null;
2157
+ refresh(): Promise<void>;
2158
+ };
1607
2159
 
1608
2160
  /**
1609
2161
  * The signed-in participant's linked Solana, EVM and Cosmos wallets, in `data`.
@@ -1800,6 +2352,7 @@ declare function useMyProfile(): {
1800
2352
  options: {
1801
2353
  provider: "discord" | "x" | "google";
1802
2354
  name: string | null;
2355
+ givenName: string | null;
1803
2356
  imageUrl: string | null;
1804
2357
  }[];
1805
2358
  };
@@ -1976,4 +2529,4 @@ declare function usePointLedgers(): Query<PointLedgerReference[]>;
1976
2529
  */
1977
2530
  declare function useTieredRewards(): Query<TieredRewardReference[]>;
1978
2531
 
1979
- export { type Collection, CosmosChains, DiscoveredWallet, type ExperienceData, type Invitation, type KnownQuestStatusCode, type KnownRoleDeliveryStatus, type MemberPagedQuery, type MemberQuery, type MemberQueryOptions, type MemberSnapshot, type Mutation, type MutationContext, type MutationOptions, type MutationStatus, type OAuthProvider, Page, type PageLoader, type PageRead, type PagedQuery, type Query, type QueryContext, type QueryKey, type QueryOptions, type QueryRead, type QuerySnapshot, type QuestInput, type QuestNotice, type QuestStatus, type QuestStatusCode, type QuestStatusText, type QuestTone, type ReferralSummary, type RelayActionResult, RelayClient, type RelayPolling, RelayProvider, type RelayQueryOptions, type RoleDelivery, type RoleDeliveryStatus, type SavedSubmission, SignInMethods, SignInOption, SignInUnavailable, SignInWallet, TelegramSignInOption, canRepeat, canSubmit, captureReferralCode, completionCountText, isAutomatic, isConnected, isCoolingDown, isFinished, progressOf, questGroups, questStatus, questStatusText, relayKeys, roleDeliveryLabel, roleDeliveryStatus, useAccounts, useActivity, useBadgeCatalog, useBadges, useBalances, useDeliveries, useEntitlements, useExperience, useInvalidate, useInvitation, useLeaderboard, useLeaderboardHistory, useLeaderboardPlacement, useMe, useMemberPages, useMemberQuery, useMyProfile, useOffers, usePointHistory, usePointLedgers, useProfile, useProfileBadges, useProfileCompletions, useProfileReferral, useQuest, useQuestOutcomes, useRedeemOffer, useReferralSummary, useRelay, useRelayAction, useRelayMutation, useRelayPages, useRelayQuery, useSession, useSetQueryData, useSignIn, useSignInMethods, useSignInOptions, useSignInWallets, useSignOut, useTelegramAccount, useTieredRewards, useWalletDiscovery, useWallets };
2532
+ export { type Collection, CosmosChains, CreatorAccountProvider, DiscoveredWallet, type ExperienceData, type Invitation, type KnownQuestStatusCode, type KnownRoleDeliveryStatus, type MemberPagedQuery, type MemberQuery, type MemberQueryOptions, type MemberSnapshot, type Mutation, type MutationContext, type MutationOptions, type MutationStatus, type OAuthProvider, Page, type PageLoader, type PageRead, type PagedQuery, type Query, type QueryContext, type QueryKey, type QueryOptions, type QueryRead, type QuerySnapshot, type QuestActionState, type QuestInput, type QuestNotice, type QuestStatus, type QuestStatusCode, type QuestStatusText, type QuestTone, type ReferralSummary, type RelayActionResult, RelayClient, type RelayPolling, RelayProvider, type RelayQueryOptions, type RoleDelivery, type RoleDeliveryStatus, type SavedSubmission, SignInMethods, SignInOption, SignInUnavailable, SignInWallet, TelegramSignInOption, canRepeat, canSubmit, captureReferralCode, completionCountText, isAutomatic, isConnected, isCoolingDown, isFinished, progressOf, questActionState, questGroups, questStatus, questStatusText, relayKeys, roleDeliveryLabel, roleDeliveryStatus, useAccounts, useActivity, useBadgeCatalog, useBadges, useBalances, useCreatorAccounts, useDeliveries, useEntitlements, useExperience, useInvalidate, useInvitation, useLeaderboard, useLeaderboardHistory, useLeaderboardPlacement, useMe, useMemberPages, useMemberQuery, useMyProfile, useOffers, usePointHistory, usePointLedgers, useProfile, useProfileBadges, useProfileCompletions, useProfileReferral, useQuest, useQuestAction, useQuestOutcomes, useRedeemOffer, useReferralSummary, useRelay, useRelayAction, useRelayMutation, useRelayPages, useRelayQuery, useSession, useSetQueryData, useSignIn, useSignInMethods, useSignInOptions, useSignInWallets, useSignOut, useTelegramAccount, useTieredRewards, useWalletDiscovery, useWallets };