@domino-sdk/relay 1.61.0 → 1.63.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 (88) hide show
  1. package/CHANGELOG.md +276 -8
  2. package/README.md +3 -2
  3. package/dist/{schema-CZ6Rj0ZF.d.ts → accounts-nz3mzfRQ.d.ts} +3146 -1765
  4. package/dist/action-9Xl0StBg.d.ts +33 -0
  5. package/dist/{attempt-captures-DYnJVkfg.d.ts → attempt-captures-DMi8oR9T.d.ts} +1 -1
  6. package/dist/authoring.d.ts +171 -49
  7. package/dist/authoring.js +158 -49
  8. package/dist/{automatic-outcomes-If88LR9f.d.ts → automatic-outcomes-C_LLQU1p.d.ts} +15 -1
  9. package/dist/avatar.d.ts +1 -1
  10. package/dist/browser.d.ts +15 -11
  11. package/dist/browser.js +18 -12
  12. package/dist/capability-error-CuI_F7yM.d.ts +296 -0
  13. package/dist/{pages-K7-KjSXw.d.ts → catalog-BaTOKpNw.d.ts} +56 -567
  14. package/dist/{chunk-XBV2CK2H.js → chunk-3RFP6GT5.js} +15 -3
  15. package/dist/{chunk-VURRFVNP.js → chunk-4GQW43UU.js} +239 -361
  16. package/dist/chunk-4NOFSGAL.js +320 -0
  17. package/dist/{chunk-24I4R732.js → chunk-5XLZ34PV.js} +34 -19
  18. package/dist/{chunk-L77O64I4.js → chunk-7X67QLPB.js} +43 -43
  19. package/dist/{chunk-RHBS5FJL.js → chunk-7Z4SZ6YM.js} +3 -3
  20. package/dist/{chunk-QEAS4ZGS.js → chunk-AQOL3SK5.js} +1 -1
  21. package/dist/chunk-EHUSD3O2.js +377 -0
  22. package/dist/chunk-FO2LCZTL.js +19 -0
  23. package/dist/{chunk-DYXDZFKA.js → chunk-FU5CGNTR.js} +166 -178
  24. package/dist/chunk-FWLQ5XCS.js +21 -0
  25. package/dist/chunk-GLH6MEI2.js +193 -0
  26. package/dist/chunk-ICXZZNPS.js +199 -0
  27. package/dist/{chunk-ZDJLPN4L.js → chunk-ID3BZXFZ.js} +2696 -2693
  28. package/dist/chunk-KP2MCX3R.js +587 -0
  29. package/dist/{chunk-SKGTNTLF.js → chunk-LZWXCBUB.js} +213 -297
  30. package/dist/chunk-MTKRIQEU.js +31 -0
  31. package/dist/{chunk-4OC7REYX.js → chunk-MWMCQLCG.js} +3 -3
  32. package/dist/{chunk-PPB7HALD.js → chunk-N4BDKS6Y.js} +27 -26
  33. package/dist/{chunk-5I54XBK2.js → chunk-N4LNEGQX.js} +2 -2
  34. package/dist/chunk-NQDEWJWE.js +554 -0
  35. package/dist/chunk-QR6HH4DI.js +508 -0
  36. package/dist/chunk-TLSQETTY.js +41 -0
  37. package/dist/{chunk-MHPKEVEW.js → chunk-U66GUVSG.js} +7 -2
  38. package/dist/{chunk-KDR2VAJP.js → chunk-UYVJZR33.js} +2 -2
  39. package/dist/chunk-UZ765UGH.js +18 -0
  40. package/dist/{chunk-7A4J67ZL.js → chunk-VWQGWGCH.js} +7 -7
  41. package/dist/chunk-W7YSMSGC.js +725 -0
  42. package/dist/{client-C51w7fMb.d.ts → client-DHmG7rn6.d.ts} +126 -93
  43. package/dist/{announcements-CHx3-HBw.d.ts → dashboards-CLemT6kj.d.ts} +14 -137
  44. package/dist/{deployments-kWoHFaqj.d.ts → deployments-DTULi7dF.d.ts} +450 -18
  45. package/dist/identity-integration-DOeNZaxF.d.ts +1271 -0
  46. package/dist/index.d.ts +13 -11
  47. package/dist/index.js +16 -11
  48. package/dist/internal.d.ts +29 -13
  49. package/dist/internal.js +57 -17
  50. package/dist/{integrations-B3y36OaB.d.ts → limits-kNzYdZ00.d.ts} +464 -53
  51. package/dist/{offers-BoV4ryUc.d.ts → offers-CYeN_I0Y.d.ts} +22 -4
  52. package/dist/{participant-activity-DHL8QYks.d.ts → participant-activity-D-Drp24G.d.ts} +16 -3
  53. package/dist/portal-proxy.d.ts +75 -2
  54. package/dist/portal-proxy.js +153 -25
  55. package/dist/react/index.d.ts +214 -27
  56. package/dist/react/index.js +196 -42
  57. package/dist/{action-DBzILFx9.d.ts → request-error-D_dUPLwo.d.ts} +1 -31
  58. package/dist/reward-deliveries-drp-x1G-.d.ts +782 -0
  59. package/dist/runtime/authoring.js +1 -1
  60. package/dist/runtime/chunks/UGDV5W4N.js +1 -0
  61. package/dist/runtime/manifest.json +3 -3
  62. package/dist/runtime/schema.js +1 -1
  63. package/dist/schema.d.ts +330 -31
  64. package/dist/schema.js +147 -91
  65. package/dist/server/index.d.ts +14 -12
  66. package/dist/server/index.js +6425 -6260
  67. package/dist/sign-in-providers-B1Q9eDRm.d.ts +44 -0
  68. package/dist/submission-input-DZCbjQUH.d.ts +343 -0
  69. package/dist/{telegram-browser-BUceZIGZ.d.ts → telegram-browser-NL0Asmsi.d.ts} +46 -6
  70. package/dist/telegram.d.ts +64 -0
  71. package/dist/telegram.js +23 -0
  72. package/dist/testing.d.ts +326 -27
  73. package/dist/testing.js +440 -90
  74. package/dist/tracker-data-esm3WG8R.d.ts +1881 -0
  75. package/dist/{transport-BrX9pIGN.d.ts → transport-Czht_irp.d.ts} +43483 -38512
  76. package/dist/{wallet-CIqFoxdm.d.ts → wallet-B7e06v4m.d.ts} +32 -9
  77. package/package.json +5 -1
  78. package/dist/accounts-DoabriBX.d.ts +0 -306
  79. package/dist/capability-error-DufwG3G0.d.ts +0 -159
  80. package/dist/chunk-3Y3L2F54.js +0 -982
  81. package/dist/chunk-DHXDBAJF.js +0 -544
  82. package/dist/chunk-EN3M5Z4J.js +0 -13
  83. package/dist/chunk-QNUHWK7R.js +0 -602
  84. package/dist/chunk-SE4PFJPT.js +0 -247
  85. package/dist/groups-CqcA2Ycs.d.ts +0 -2827
  86. package/dist/runtime/chunks/5QVFB4TU.js +0 -1
  87. package/dist/submission-input-C54Q8yAD.d.ts +0 -146
  88. package/dist/x-D1PGi8Sq.d.ts +0 -331
@@ -1,12 +1,14 @@
1
- import { m as QuizEvidence, A as Attempt, M as MemberProgress, a as AttemptStatus, o as TrackerSkipCode, i as PointHistoryQuery, g as PointEntryKind, ao as submitSchema, ap as contentPerformanceQuerySchema } from './schema-CZ6Rj0ZF.js';
2
- import { l as QuestView, m as ResponseSchema, c as PageQuery, e as QuestEnrollmentInput, Q as QuestClaimInput, i as QuestOutcomeQuery, q as questExperienceSchema, a as CreatorAccountProvider, n as RewardDeliveryQuery, o as RewardDeliveryAction, r as contentQualificationQuerySchema } from './pages-K7-KjSXw.js';
3
- import { M as MissingPrerequisite, V as ValueEvidence } from './submission-input-C54Q8yAD.js';
4
- import { a as RequestError, b as RequestErrorDetails, c as RequestErrorKind, e as createRelayAction, O as OptionalActionId } from './action-DBzILFx9.js';
5
- import { b as ParticipantSession, e as exchangeSchema, R as RelayEvent, P as ParticipantActivity } from './participant-activity-DHL8QYks.js';
1
+ import { G as QuizEvidence, a as Attempt, s as MemberProgress, ak as referralAcceptSchema, q as LeaderboardQuery, b as AttemptStatus, V as AttemptCodeSource, f as CampaignEnrollmentInput, h as CampaignWithdrawalInput, J as SignInProvider, c as AuthProvider, I as SignInAccountStatus, x as PointHistoryQuery, v as PointEntryKind, n as LeaderboardHistoryQuery, al as submitSchema, am as engagementPageQuerySchema, an as contentPerformanceQuerySchema } from './accounts-nz3mzfRQ.js';
2
+ import { M as MissingPrerequisite, V as ValueEvidence } from './submission-input-DZCbjQUH.js';
3
+ import { R as RequestError, a as RequestErrorDetails, b as RequestErrorKind } from './request-error-D_dUPLwo.js';
4
+ import { q as ResponseSchema, i as PageQuery, k as QuestEnrollmentInput, Q as QuestClaimInput, n as QuestOutcomeQuery, M as MemberConsent, a as ConsentInput, e as CreatorAccountProvider, r as RewardDeliveryQuery, s as RewardDeliveryPage, t as contentQualificationQuerySchema } from './reward-deliveries-drp-x1G-.js';
5
+ import { b as QuestView, q as questExperienceSchema } from './catalog-BaTOKpNw.js';
6
+ import { T as TrackerSkipCode, S as SkipEnrollment } from './tracker-data-esm3WG8R.js';
7
+ import { b as ParticipantSession, e as exchangeSchema, R as RelayEvent, P as ParticipantActivity, M as MemberSummary } from './participant-activity-D-Drp24G.js';
6
8
  import * as z from 'zod';
7
- import { a as AuthProvider } from './accounts-DoabriBX.js';
8
- import { p as referralAcceptSchema, i as LeaderboardQuery, b as CampaignEnrollmentInput, d as CampaignWithdrawalInput, f as LeaderboardHistoryQuery, q as engagementPageQuerySchema } from './groups-CqcA2Ycs.js';
9
- import { ag as profileUpdateSchema, d as ProfileCompletionQuery, ah as walletAddressInputSchema, ai as walletSignatureSchema, L as LinkedWallet, m as WalletSigner } from './wallet-CIqFoxdm.js';
9
+ import { c as createRelayAction, O as OptionalActionId } from './action-9Xl0StBg.js';
10
+ import { A as AuthProviders } from './sign-in-providers-B1Q9eDRm.js';
11
+ import { ag as profileUpdateSchema, d as ProfileCompletionQuery, ah as walletAddressInputSchema, ai as walletSignatureSchema, L as LinkedWallet, m as WalletSigner } from './wallet-B7e06v4m.js';
10
12
 
11
13
  /** What happened, as in every Domino client error (see `RequestError`). */
12
14
  type RelayErrorKind = RequestErrorKind;
@@ -21,6 +23,11 @@ declare const RelayErrorCode: {
21
23
  readonly NotSignedIn: "not-signed-in";
22
24
  /** The session changed since the app read it (the `session` option). Reload before retrying. */
23
25
  readonly StaleSession: "stale-session";
26
+ /**
27
+ * A participant backend (`createParticipantBackend`) refused the call because the app's own
28
+ * sign-in ended. The SDK treats it like `not-signed-in`: the member is signed out.
29
+ */
30
+ readonly Unauthenticated: "unauthenticated";
24
31
  /** The input failed validation before it was sent. */
25
32
  readonly InvalidInput: "invalid-input";
26
33
  /** Relay's answer was not JSON or not the expected shape (kind `invalid-response`). */
@@ -336,12 +343,12 @@ type RelayClientOptions = {
336
343
  };
337
344
  /**
338
345
  * What `auth.start` takes: the provider, and whether to sign in (or sign up) or link it to the
339
- * signed-in member.
346
+ * signed-in member. `provider` is any of `providers().signInProviders`, Telegram included.
340
347
  *
341
348
  * @compat input
342
349
  */
343
350
  type AuthStartInput = {
344
- provider: AuthProvider;
351
+ provider: SignInProvider;
345
352
  mode: "sign-in" | "connect";
346
353
  };
347
354
  /**
@@ -1175,6 +1182,11 @@ declare function relayClient(options: RelayClientOptions): {
1175
1182
  }[]>;
1176
1183
  };
1177
1184
  badges: {
1185
+ /**
1186
+ * The project's active badge catalog, as an array.
1187
+ *
1188
+ * @deprecated Use `catalog`, which answers `{ items }` like `me.badges`. Removed in 2.0.0.
1189
+ */
1178
1190
  list: (options?: RelayRequestOptions) => Promise<{
1179
1191
  name: string;
1180
1192
  description: string;
@@ -1182,6 +1194,19 @@ declare function relayClient(options: RelayClientOptions): {
1182
1194
  id: string;
1183
1195
  key: string | null;
1184
1196
  }[]>;
1197
+ /**
1198
+ * The project's active badge catalog, oldest definition first, in `items`. Archived badges
1199
+ * are left out. Open to signed-out visitors.
1200
+ */
1201
+ catalog: (options?: RelayRequestOptions) => Promise<{
1202
+ items: {
1203
+ name: string;
1204
+ description: string;
1205
+ image: string;
1206
+ id: string;
1207
+ key: string | null;
1208
+ }[];
1209
+ }>;
1185
1210
  };
1186
1211
  pointLedgers: {
1187
1212
  /**
@@ -1237,6 +1262,7 @@ declare function relayClient(options: RelayClientOptions): {
1237
1262
  key?: string | undefined;
1238
1263
  group?: string | undefined;
1239
1264
  includeUnscored?: boolean | undefined;
1265
+ ties?: "shared" | "earliest" | undefined;
1240
1266
  settle?: {
1241
1267
  at: "window-end";
1242
1268
  ties: "shared" | "earliest";
@@ -1739,6 +1765,7 @@ declare function relayClient(options: RelayClientOptions): {
1739
1765
  kind: "once";
1740
1766
  } | {
1741
1767
  kind: "keyed";
1768
+ across?: "members" | undefined;
1742
1769
  };
1743
1770
  progress: {
1744
1771
  current: number;
@@ -1860,6 +1887,7 @@ declare function relayClient(options: RelayClientOptions): {
1860
1887
  };
1861
1888
  release?: string | undefined;
1862
1889
  } | undefined;
1890
+ codeSource?: AttemptCodeSource | null | undefined;
1863
1891
  } | null;
1864
1892
  release: string;
1865
1893
  interaction: "url" | "text" | "staff" | "claim" | "automatic" | "quiz" | "photo";
@@ -1979,7 +2007,8 @@ declare function relayClient(options: RelayClientOptions): {
1979
2007
  * Claims one of the signed-in member's outcomes skipped as `historical`, on a quest whose
1980
2008
  * historical policy is `"claim"` (`outcome.claimable`). Relay decides it again with
1981
2009
  * historical activity released and returns the outcome; a rule that still fails rejects
1982
- * with a `RelayError` whose code is that rule's skip code.
2010
+ * with a `RelayError` whose code is that rule's skip code. This claim is of a skipped
2011
+ * outcome; `me.claim` submits an attempt.
1983
2012
  */
1984
2013
  claim: (value: OptionalActionId<QuestClaimInput>, requestOptions?: RelayRequestOptions) => Promise<{
1985
2014
  quest: string;
@@ -1995,6 +2024,7 @@ declare function relayClient(options: RelayClientOptions): {
1995
2024
  updatedAt: number;
1996
2025
  automatic?: string | undefined;
1997
2026
  window?: "quest" | "tracker" | undefined;
2027
+ enrollment?: SkipEnrollment | undefined;
1998
2028
  }>;
1999
2029
  /**
2000
2030
  * Why automatic quests did or did not run for the signed-in member's activity, newest first:
@@ -2015,6 +2045,7 @@ declare function relayClient(options: RelayClientOptions): {
2015
2045
  updatedAt: number;
2016
2046
  automatic?: string | undefined;
2017
2047
  window?: "quest" | "tracker" | undefined;
2048
+ enrollment?: SkipEnrollment | undefined;
2018
2049
  }[];
2019
2050
  nextCursor: string | null;
2020
2051
  }>;
@@ -2086,6 +2117,7 @@ declare function relayClient(options: RelayClientOptions): {
2086
2117
  };
2087
2118
  release?: string | undefined;
2088
2119
  } | undefined;
2120
+ codeSource?: AttemptCodeSource | null | undefined;
2089
2121
  }>;
2090
2122
  experience: (requestOptions?: RelayRequestOptions) => Promise<{
2091
2123
  entitlements: ({
@@ -2427,6 +2459,7 @@ declare function relayClient(options: RelayClientOptions): {
2427
2459
  kind: "once";
2428
2460
  } | {
2429
2461
  kind: "keyed";
2462
+ across?: "members" | undefined;
2430
2463
  };
2431
2464
  progress: {
2432
2465
  current: number;
@@ -2548,6 +2581,7 @@ declare function relayClient(options: RelayClientOptions): {
2548
2581
  };
2549
2582
  release?: string | undefined;
2550
2583
  } | undefined;
2584
+ codeSource?: AttemptCodeSource | null | undefined;
2551
2585
  } | null;
2552
2586
  release: string;
2553
2587
  interaction: "url" | "text" | "staff" | "claim" | "automatic" | "quiz" | "photo";
@@ -2841,6 +2875,7 @@ declare function relayClient(options: RelayClientOptions): {
2841
2875
  kind: "once";
2842
2876
  } | {
2843
2877
  kind: "keyed";
2878
+ across?: "members" | undefined;
2844
2879
  };
2845
2880
  progress: {
2846
2881
  current: number;
@@ -2962,6 +2997,7 @@ declare function relayClient(options: RelayClientOptions): {
2962
2997
  };
2963
2998
  release?: string | undefined;
2964
2999
  } | undefined;
3000
+ codeSource?: AttemptCodeSource | null | undefined;
2965
3001
  } | null;
2966
3002
  release: string;
2967
3003
  interaction: "url" | "text" | "staff" | "claim" | "automatic" | "quiz" | "photo";
@@ -3261,6 +3297,7 @@ declare function relayClient(options: RelayClientOptions): {
3261
3297
  kind: "once";
3262
3298
  } | {
3263
3299
  kind: "keyed";
3300
+ across?: "members" | undefined;
3264
3301
  };
3265
3302
  progress: {
3266
3303
  current: number;
@@ -3382,6 +3419,7 @@ declare function relayClient(options: RelayClientOptions): {
3382
3419
  };
3383
3420
  release?: string | undefined;
3384
3421
  } | undefined;
3422
+ codeSource?: AttemptCodeSource | null | undefined;
3385
3423
  } | null;
3386
3424
  release: string;
3387
3425
  interaction: "url" | "text" | "staff" | "claim" | "automatic" | "quiz" | "photo";
@@ -3518,6 +3556,25 @@ declare function relayClient(options: RelayClientOptions): {
3518
3556
  withdrawalReason: string | null;
3519
3557
  }>;
3520
3558
  };
3559
+ /**
3560
+ * The signed-in member's marketing consent, per channel. The app shows the checkbox and sends
3561
+ * the wording beside it; Relay records the choice with its own time, and only members who
3562
+ * opted in reach the project's destinations.
3563
+ *
3564
+ * @experimental A minor release can change the consent API.
3565
+ */
3566
+ consent: {
3567
+ /**
3568
+ * The member's current consent on each channel they chose on. A channel missing from the
3569
+ * list has no record, which is not the same as withdrawn.
3570
+ */
3571
+ get: (requestOptions?: RelayRequestOptions) => Promise<MemberConsent[]>;
3572
+ /**
3573
+ * Grants (`granted: true`, with the `wording` the member saw) or withdraws one channel.
3574
+ * Repeating the current state and wording records nothing and answers the current state.
3575
+ */
3576
+ set: (value: OptionalActionId<ConsentInput>, requestOptions?: RelayRequestOptions) => Promise<MemberConsent>;
3577
+ };
3521
3578
  /** The signed-in member's linked Solana, EVM and Cosmos wallets for this project. */
3522
3579
  wallets: {
3523
3580
  list: (requestOptions?: RelayRequestOptions) => Promise<{
@@ -3564,19 +3621,7 @@ declare function relayClient(options: RelayClientOptions): {
3564
3621
  }>;
3565
3622
  };
3566
3623
  auth: {
3567
- providers: (requestOptions?: RelayRequestOptions) => Promise<{
3568
- providers: {
3569
- provider: "discord" | "google" | "apple" | "x";
3570
- configured: boolean;
3571
- }[];
3572
- email: boolean;
3573
- wallets: ("solana" | "eip155" | "cosmos")[];
3574
- demo: boolean;
3575
- telegram?: {
3576
- login: boolean;
3577
- miniApp: boolean;
3578
- } | undefined;
3579
- }>;
3624
+ providers: (requestOptions?: RelayRequestOptions) => Promise<AuthProviders>;
3580
3625
  start: {
3581
3626
  (start: AuthStartInput, requestOptions?: RelayRequestOptions): Promise<{
3582
3627
  url: string;
@@ -3653,17 +3698,24 @@ declare function relayClient(options: RelayClientOptions): {
3653
3698
  };
3654
3699
  /**
3655
3700
  * Telegram sign-in and the member's Telegram account. Telegram is not an `AuthProvider` in
3656
- * SDK 1.x, so `accounts()`, `start()` and `disconnect()` leave it out and these take its place.
3701
+ * SDK 1.x, so `accounts()` leaves it out; `signInAccounts()`, `start()` and `disconnect()`
3702
+ * take it like any other sign-in provider. Mini App sign-in is Telegram's own.
3657
3703
  */
3658
3704
  telegram: {
3659
3705
  /**
3660
3706
  * Leaves for Telegram Login when the platform configured it (`providers().telegram.login`):
3661
3707
  * `"sign-in"` signs in, or signs up; `"connect"` links Telegram to the signed-in member.
3708
+ *
3709
+ * @deprecated Use `auth.start({ provider: "telegram", mode })`. Removed in 2.0.0.
3662
3710
  */
3663
3711
  start: (mode: "sign-in" | "connect", requestOptions?: RelayRequestOptions) => Promise<{
3664
3712
  url: string;
3665
3713
  }>;
3666
- /** The member's Telegram account. */
3714
+ /**
3715
+ * The member's Telegram account.
3716
+ *
3717
+ * @deprecated Use the `"telegram"` entry of `auth.signInAccounts()`. Removed in 2.0.0.
3718
+ */
3667
3719
  account: (requestOptions?: RelayRequestOptions) => Promise<{
3668
3720
  configured: boolean;
3669
3721
  status: "disconnected" | "connected" | "reconnect";
@@ -3671,7 +3723,11 @@ declare function relayClient(options: RelayClientOptions): {
3671
3723
  revision: number;
3672
3724
  provider: "telegram";
3673
3725
  }>;
3674
- /** Unlinks the member's Telegram account, as `disconnect()` does for the other providers. */
3726
+ /**
3727
+ * Unlinks the member's Telegram account, as `disconnect()` does for the other providers.
3728
+ *
3729
+ * @deprecated Use `auth.disconnect("telegram")`. Removed in 2.0.0.
3730
+ */
3675
3731
  disconnect: (requestOptions?: RelayRequestOptions) => Promise<{
3676
3732
  ok: boolean;
3677
3733
  }>;
@@ -3680,6 +3736,9 @@ declare function relayClient(options: RelayClientOptions): {
3680
3736
  * (`providers().telegram.miniApp`). Pass the Mini App's signed launch data,
3681
3737
  * `telegramMiniAppInitData()`. Relay checks Telegram's signature for the project's bot and
3682
3738
  * accepts launch data at most five minutes old, once.
3739
+ *
3740
+ * @deprecated Use `relay.telegram.miniApp` from `@domino-sdk/relay/telegram`
3741
+ * (`withTelegram(relay)`). Removed in 2.0.0.
3683
3742
  */
3684
3743
  miniApp: {
3685
3744
  /** Signs in, or signs up, as the Telegram user who opened the Mini App. */
@@ -3742,7 +3801,7 @@ declare function relayClient(options: RelayClientOptions): {
3742
3801
  ok: boolean;
3743
3802
  }>;
3744
3803
  };
3745
- /** The member's connected sign-in accounts, one per provider. */
3804
+ /** The member's connected sign-in accounts, one per `AuthProvider`. */
3746
3805
  accounts: (requestOptions?: RelayRequestOptions) => Promise<{
3747
3806
  provider: "discord" | "google" | "apple" | "x";
3748
3807
  configured: boolean;
@@ -3750,7 +3809,19 @@ declare function relayClient(options: RelayClientOptions): {
3750
3809
  subject: string | null;
3751
3810
  revision: number;
3752
3811
  }[]>;
3753
- disconnect: (provider: AuthProvider, requestOptions?: RelayRequestOptions) => Promise<{
3812
+ /**
3813
+ * The member's account on every sign-in provider the platform has, one entry each, Telegram
3814
+ * included: `accounts()` with an open `provider`, as `providers().signInProviders` lists them.
3815
+ */
3816
+ signInAccounts: (requestOptions?: RelayRequestOptions) => Promise<{
3817
+ provider: SignInProvider;
3818
+ configured: boolean;
3819
+ status: SignInAccountStatus;
3820
+ subject: string | null;
3821
+ revision: number;
3822
+ }[]>;
3823
+ /** Unlinks the member's account on `provider`, any of `signInAccounts()`'s. */
3824
+ disconnect: (provider: SignInProvider, requestOptions?: RelayRequestOptions) => Promise<{
3754
3825
  ok: boolean;
3755
3826
  }>;
3756
3827
  session: (requestOptions?: RelayRequestOptions) => Promise<{
@@ -3775,7 +3846,13 @@ declare function relayClient(options: RelayClientOptions): {
3775
3846
  signOut: (requestOptions?: RelayRequestOptions) => Promise<{
3776
3847
  ok: boolean;
3777
3848
  }>;
3778
- /** Local development only. Existing hosted apps use createParticipantBackend from /portal-proxy. */
3849
+ /**
3850
+ * @deprecated `POST /v1/auth/exchange` refuses this body with 400: the route takes
3851
+ * `{ subject, accounts?, previousToken? }` with an identity integration server key as the
3852
+ * bearer, which a participant client does not hold. A server signs a user in with
3853
+ * `exchangeParticipant` from `@domino-sdk/relay/portal-proxy`; a hosted app proxies with
3854
+ * `createParticipantBackend` from the same entry. Removed in 2.0.0.
3855
+ */
3779
3856
  exchange: (value: z.input<typeof exchangeSchema>, requestOptions?: RelayRequestOptions) => Promise<{
3780
3857
  token: string;
3781
3858
  session: {
@@ -3811,6 +3888,12 @@ declare function relayClient(options: RelayClientOptions): {
3811
3888
  }[];
3812
3889
  }>;
3813
3890
  activity: {
3891
+ /**
3892
+ * One page of the signed-in member's activity feed, oldest event first. A feed never
3893
+ * ends: every page, even an empty one, answers a `nextCursor` to read from next, so a
3894
+ * loop such as `paginate` never finishes on its own. Stop when a page comes back empty
3895
+ * or after as many events as you need, or follow the feed with `observe`.
3896
+ */
3814
3897
  list: (query?: {
3815
3898
  cursor?: string;
3816
3899
  start?: "latest";
@@ -3899,16 +3982,7 @@ declare function relayClient(options: RelayClientOptions): {
3899
3982
  * The signed-in member, the seed of their generated avatar (`defaultAvatar(avatarSeed)`), and
3900
3983
  * their own verified sign-in email addresses: `email` (or null) and `emails`.
3901
3984
  */
3902
- get: (requestOptions?: RelayRequestOptions) => Promise<{
3903
- member: string;
3904
- avatarSeed: string;
3905
- email?: string | null | undefined;
3906
- emails?: string[] | undefined;
3907
- clock?: {
3908
- now: number;
3909
- offsetMs: number;
3910
- } | undefined;
3911
- }>;
3985
+ get: (requestOptions?: RelayRequestOptions) => Promise<MemberSummary>;
3912
3986
  observeProgress: (listener: (value: ProgressObservation) => void, observeOptions?: {
3913
3987
  intervalMs?: number;
3914
3988
  maxBackoffMs?: number;
@@ -4141,6 +4215,7 @@ declare function relayClient(options: RelayClientOptions): {
4141
4215
  kind: "once";
4142
4216
  } | {
4143
4217
  kind: "keyed";
4218
+ across?: "members" | undefined;
4144
4219
  };
4145
4220
  progress: {
4146
4221
  current: number;
@@ -4262,6 +4337,7 @@ declare function relayClient(options: RelayClientOptions): {
4262
4337
  };
4263
4338
  release?: string | undefined;
4264
4339
  } | undefined;
4340
+ codeSource?: AttemptCodeSource | null | undefined;
4265
4341
  } | null;
4266
4342
  key?: string | undefined;
4267
4343
  release?: string | undefined;
@@ -4488,59 +4564,11 @@ declare function relayClient(options: RelayClientOptions): {
4488
4564
  }>;
4489
4565
  /**
4490
4566
  * The member's reward deliveries, newest first, one page at a time. Pass a page's
4491
- * `nextCursor` back as `cursor` for older ones; `limit` is 1 to 500, 500 by default.
4567
+ * `nextCursor` back as `cursor` for older ones; `limit` is 1 to 500, 500 by default. The
4568
+ * page answers its deliveries as `items` (and, for 1.x callers, as `deliveries`), so
4569
+ * `paginate((cursor) => relay.me.rewardDeliveries({ cursor }))` reads them all.
4492
4570
  */
4493
- rewardDeliveries: (requestOptions?: RelayRequestOptions & RewardDeliveryQuery) => Promise<{
4494
- deliveries: ({
4495
- [x: string]: z.core.util.JSONType | undefined;
4496
- id: string;
4497
- quest: string;
4498
- completion: string;
4499
- member: string;
4500
- action: RewardDeliveryAction;
4501
- attempts: number;
4502
- nextAt: number;
4503
- lastError: string | null;
4504
- createdAt: number;
4505
- deliveredAt: number | null;
4506
- provider: string;
4507
- status: string;
4508
- dispatchedAt?: number | null | undefined;
4509
- revokedAt?: number | null | undefined;
4510
- roleId?: string | undefined;
4511
- reconciliation?: {
4512
- [x: string]: z.core.util.JSONType;
4513
- status: string;
4514
- ownership: string;
4515
- at: number;
4516
- reason: string | null;
4517
- } | null | undefined;
4518
- } | {
4519
- [x: string]: z.core.util.JSONType | undefined;
4520
- id: string;
4521
- quest: string;
4522
- completion: string;
4523
- member: string;
4524
- provider: "discord";
4525
- action: RewardDeliveryAction;
4526
- roleId: string;
4527
- status: "pending" | "failed" | "delivered";
4528
- attempts: number;
4529
- nextAt: number;
4530
- lastError: string | null;
4531
- createdAt: number;
4532
- deliveredAt: number | null;
4533
- dispatchedAt?: number | null | undefined;
4534
- revokedAt?: number | null | undefined;
4535
- reconciliation?: {
4536
- status: "pending" | "removed" | "failed" | "preserved" | "granted";
4537
- ownership: "external" | "unclaimed" | "relay";
4538
- at: number;
4539
- reason: string | null;
4540
- } | null | undefined;
4541
- })[];
4542
- nextCursor: string | null;
4543
- }>;
4571
+ rewardDeliveries: (requestOptions?: RelayRequestOptions & RewardDeliveryQuery) => Promise<RewardDeliveryPage>;
4544
4572
  /**
4545
4573
  * `{ items }`: the member's balance in each of the project's point ledgers, in the project's
4546
4574
  * ledger order, zero in a ledger they have no entries in.
@@ -4593,7 +4621,11 @@ declare function relayClient(options: RelayClientOptions): {
4593
4621
  }[];
4594
4622
  nextCursor: string | null;
4595
4623
  }>;
4596
- /** Claims a quest for the signed-in member. Quest controllers (`quests.open`) call this. */
4624
+ /**
4625
+ * Submits an attempt at a quest for the signed-in member, whatever input the quest takes;
4626
+ * a quest whose interaction is `"claim"` takes none. Quest controllers (`quests.open`) call
4627
+ * this. `quests.claim` is different: it claims an outcome skipped as historical.
4628
+ */
4597
4629
  claim: (value: OptionalActionId<Omit<z.input<typeof submitSchema>, "member">>, requestOptions?: RelayRequestOptions) => Promise<{
4598
4630
  id: string;
4599
4631
  release: string;
@@ -4661,6 +4693,7 @@ declare function relayClient(options: RelayClientOptions): {
4661
4693
  };
4662
4694
  release?: string | undefined;
4663
4695
  } | undefined;
4696
+ codeSource?: AttemptCodeSource | null | undefined;
4664
4697
  }>;
4665
4698
  /** Uploads evidence with a generated key; reuse `actionId` and the same file to replay. */
4666
4699
  upload: (file: Blob, requestOptions?: RelayRequestOptions & {
@@ -1,59 +1,7 @@
1
1
  import * as z from 'zod';
2
- import { H as WalletBalanceQuery } from './wallet-CIqFoxdm.js';
3
- import { y as ResourceHandle } from './schema-CZ6Rj0ZF.js';
4
- import { A as AnalyticsMetricId, a as analyticsCatalog } from './integrations-B3y36OaB.js';
5
-
6
- declare const resourceSourceSchema: z.ZodUnion<readonly [z.ZodObject<{
7
- provider: z.ZodLiteral<"domino">;
8
- resource: z.ZodLiteral<"point-ledger">;
9
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
10
- provider: z.ZodLiteral<"discord">;
11
- resource: z.ZodLiteral<"channel">;
12
- types: z.ZodArray<z.ZodEnum<{
13
- text: "text";
14
- announcement: "announcement";
15
- }>>;
16
- postable: z.ZodOptional<z.ZodLiteral<true>>;
17
- }, z.core.$strict>, z.ZodObject<{
18
- provider: z.ZodLiteral<"discord">;
19
- resource: z.ZodLiteral<"role">;
20
- assignable: z.ZodDefault<z.ZodBoolean>;
21
- }, z.core.$strict>]>]>;
22
- type ResourceSource = z.infer<typeof resourceSourceSchema>;
23
- declare const resourceRequestSchema: z.ZodObject<{
24
- source: z.ZodUnion<readonly [z.ZodObject<{
25
- provider: z.ZodLiteral<"domino">;
26
- resource: z.ZodLiteral<"point-ledger">;
27
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
28
- provider: z.ZodLiteral<"discord">;
29
- resource: z.ZodLiteral<"channel">;
30
- types: z.ZodArray<z.ZodEnum<{
31
- text: "text";
32
- announcement: "announcement";
33
- }>>;
34
- postable: z.ZodOptional<z.ZodLiteral<true>>;
35
- }, z.core.$strict>, z.ZodObject<{
36
- provider: z.ZodLiteral<"discord">;
37
- resource: z.ZodLiteral<"role">;
38
- assignable: z.ZodDefault<z.ZodBoolean>;
39
- }, z.core.$strict>]>]>;
40
- query: z.ZodOptional<z.ZodString>;
41
- cursor: z.ZodOptional<z.ZodString>;
42
- ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
43
- }, z.core.$strict>;
44
- declare const resourceOptionsSchema: z.ZodObject<{
45
- revision: z.ZodNumber;
46
- options: z.ZodArray<z.ZodObject<{
47
- id: z.ZodString;
48
- label: z.ZodString;
49
- description: z.ZodOptional<z.ZodString>;
50
- group: z.ZodOptional<z.ZodString>;
51
- disabledReason: z.ZodOptional<z.ZodString>;
52
- }, z.core.$strip>>;
53
- nextCursor: z.ZodDefault<z.ZodNullable<z.ZodString>>;
54
- cursor: z.ZodNullable<z.ZodString>;
55
- }, z.core.$strip>;
56
- type ResourceOption = z.infer<typeof resourceOptionsSchema>["options"][number];
2
+ import { o as WalletBalanceQuery } from './wallet-B7e06v4m.js';
3
+ import { R as ResourceHandle } from './tracker-data-esm3WG8R.js';
4
+ import { A as AnalyticsMetricId, a as analyticsCatalog } from './limits-kNzYdZ00.js';
57
5
 
58
6
  declare const settingFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
59
7
  kind: z.ZodLiteral<"point-ledger">;
@@ -107,6 +55,7 @@ declare const settingFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
107
55
  multiline: z.ZodBoolean;
108
56
  picker: z.ZodOptional<z.ZodString>;
109
57
  decimals: z.ZodOptional<z.ZodNumber>;
58
+ secret: z.ZodOptional<z.ZodLiteral<true>>;
110
59
  label: z.ZodString;
111
60
  description: z.ZodOptional<z.ZodString>;
112
61
  }, z.core.$strict>, z.ZodObject<{
@@ -181,6 +130,7 @@ declare const settingsFieldsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedU
181
130
  multiline: z.ZodBoolean;
182
131
  picker: z.ZodOptional<z.ZodString>;
183
132
  decimals: z.ZodOptional<z.ZodNumber>;
133
+ secret: z.ZodOptional<z.ZodLiteral<true>>;
184
134
  label: z.ZodString;
185
135
  description: z.ZodOptional<z.ZodString>;
186
136
  }, z.core.$strict>, z.ZodObject<{
@@ -243,58 +193,26 @@ declare function isAmount(value: string): boolean;
243
193
  declare function isBalanceChain(value: string): value is BalanceChain;
244
194
  /** Whether a tracker filter may compare with `field`: an integer or amount setting. */
245
195
  declare function isBoundSetting(field: SettingField | undefined): boolean;
246
- /** The value schema of a text setting, with the checks its picker adds. */
196
+ /**
197
+ * The value schema of a text setting, with the checks its picker adds. A secret setting may also
198
+ * be `""`, its value until an operator sets it, whatever its `minLength`.
199
+ */
247
200
  declare function textSettingSchema(field: {
248
201
  minLength: number;
249
202
  maxLength: number;
250
203
  picker?: string;
204
+ secret?: true;
251
205
  }): z.ZodString;
252
206
  declare function parseSettings(fields: Record<string, SettingField>, input: unknown): SettingsValues;
253
207
  declare function missingResourceSettings(fields: Record<string, SettingField>, values: SettingsValues): string[];
254
208
  declare function compatibleSettingKinds(previous: SettingField, next: SettingField): boolean;
255
209
 
256
- /**
257
- * A YouTube Short's body, as `content()` quests read it in `ctx.tracker.content.body`. Every field
258
- * is what YouTube reported when Relay last read the video.
259
- *
260
- * @compat output
261
- */
262
- declare const youtubeShortBodySchema: z.ZodObject<{
263
- title: z.ZodString;
264
- description: z.ZodString;
265
- tags: z.ZodArray<z.ZodString>;
266
- durationSeconds: z.ZodNumber;
267
- publishedAt: z.ZodNumber;
268
- }, z.core.$strip>;
269
- type YouTubeShortBody = z.infer<typeof youtubeShortBodySchema>;
270
- /** The counters a YouTube Short's samples measure. A counter YouTube hides is unknown, never zero. */
271
- declare const youtubeShortMetrics: readonly ["views", "likes", "comments"];
272
- type YouTubeShortMetric = (typeof youtubeShortMetrics)[number];
273
-
274
- /**
275
- * A TikTok video's body, as `content()` quests read it in `ctx.tracker.content.body`. Every field
276
- * is what TikTok reported when Relay last read the video.
277
- *
278
- * @compat output
279
- */
280
- declare const tiktokVideoBodySchema: z.ZodObject<{
281
- title: z.ZodString;
282
- description: z.ZodString;
283
- durationSeconds: z.ZodNumber;
284
- width: z.ZodNumber;
285
- height: z.ZodNumber;
286
- createdAt: z.ZodNumber;
287
- shareUrl: z.ZodString;
288
- isAigc: z.ZodBoolean;
289
- }, z.core.$strip>;
290
- type TikTokVideoBody = z.infer<typeof tiktokVideoBodySchema>;
291
- /** The counters a TikTok video's samples measure. A counter TikTok omits is unknown, never zero. */
292
- declare const tiktokVideoMetrics: readonly ["views", "likes", "comments", "shares"];
293
- type TikTokVideoMetric = (typeof tiktokVideoMetrics)[number];
294
-
295
210
  /**
296
211
  * How many panels one dashboard holds and how many dashboards that are not archived a project
297
212
  * holds. Panels are computed at read time without rollups, so the caps keep a read affordable.
213
+ *
214
+ * @deprecated Use `limits.dashboardPanels` and `limits.dashboards`, which a 1.x release can
215
+ * raise.
298
216
  */
299
217
  declare const dashboardLimits: {
300
218
  readonly panels: 24;
@@ -566,45 +484,4 @@ declare function defineDashboard(input: DashboardInput): {
566
484
  position?: number | undefined;
567
485
  } & ResourceHandle<"dashboard">;
568
486
 
569
- /**
570
- * An announcement's text, at most 1000 characters, with `{placeholder}`s (`announcementPlaceholders`)
571
- * that Relay fills when it posts. `{{` and `}}` are literal braces.
572
- */
573
- declare const announcementTextSchema: z.ZodString;
574
- /** An announcement Domino's bot posts in one of the project's connected Telegram chats. */
575
- declare const telegramAnnouncementSchema: z.ZodObject<{
576
- action: z.ZodLiteral<"post-message">;
577
- text: z.ZodString;
578
- replyToTriggeringMessage: z.ZodOptional<z.ZodBoolean>;
579
- provider: z.ZodLiteral<"telegram">;
580
- chat: z.ZodString;
581
- }, z.core.$strict>;
582
- /** An announcement Domino's bot posts in a channel of the project's connected Discord server. */
583
- declare const discordAnnouncementSchema: z.ZodObject<{
584
- action: z.ZodLiteral<"post-message">;
585
- text: z.ZodString;
586
- replyToTriggeringMessage: z.ZodOptional<z.ZodBoolean>;
587
- provider: z.ZodLiteral<"discord">;
588
- channel: z.ZodString;
589
- }, z.core.$strict>;
590
- /**
591
- * A message Relay posts when a completion of the quest pays, after its rewards commit. A failed
592
- * post never undoes the rewards. Build one with `telegram.postMessage()` or
593
- * `discord.postMessage()`.
594
- */
595
- declare const announcementSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
596
- action: z.ZodLiteral<"post-message">;
597
- text: z.ZodString;
598
- replyToTriggeringMessage: z.ZodOptional<z.ZodBoolean>;
599
- provider: z.ZodLiteral<"telegram">;
600
- chat: z.ZodString;
601
- }, z.core.$strict>, z.ZodObject<{
602
- action: z.ZodLiteral<"post-message">;
603
- text: z.ZodString;
604
- replyToTriggeringMessage: z.ZodOptional<z.ZodBoolean>;
605
- provider: z.ZodLiteral<"discord">;
606
- channel: z.ZodString;
607
- }, z.core.$strict>], "provider">;
608
- type Announcement = z.infer<typeof announcementSchema>;
609
-
610
- export { type AmountSetting as A, type BalanceChain as B, discordAnnouncementSchema as C, type DashboardInput as D, isAmount as E, isBalanceChain as F, isBoundSetting as G, missingResourceSettings as H, type IntegerSettings as I, normalizeDashboard as J, parseSettings as K, resourceOptionsSchema as L, resourceRequestSchema as M, resourceSourceSchema as N, settingFieldSchema as O, settingsFieldsSchema as P, settingsValuesSchema as Q, type ResourceSource as R, type Setting as S, type TikTokVideoBody as T, telegramAnnouncementSchema as U, textSettingSchema as V, tiktokVideoBodySchema as W, tiktokVideoMetrics as X, type YouTubeShortBody as Y, youtubeShortBodySchema as Z, youtubeShortMetrics as _, type BoundSettings as a, type Announcement as b, type DashboardPanelInput as c, type TikTokVideoMetric as d, type YouTubeShortMetric as e, defineDashboard as f, type DashboardAuthoring as g, type DashboardDefinition as h, type DashboardIssue as i, type DashboardPanel as j, type DashboardPreview as k, type ResourceOption as l, type SettingField as m, type SettingsValues as n, announcementSchema as o, announcementTextSchema as p, compatibleSettingKinds as q, dashboardArtifactSchema as r, dashboardAuthoringSchema as s, dashboardDefinitionSchema as t, dashboardIssue as u, dashboardLimits as v, dashboardPanelAuthoringSchema as w, dashboardPanels as x, dashboardPreviewSchema as y, defaultPanelWidths as z };
487
+ export { type AmountSetting as A, type BalanceChain as B, settingFieldSchema as C, type DashboardInput as D, settingsFieldsSchema as E, settingsValuesSchema as F, textSettingSchema as G, type IntegerSettings as I, type Setting as S, type BoundSettings as a, type DashboardPanelInput as b, compatibleSettingKinds as c, dashboardIssue as d, defineDashboard as e, type DashboardAuthoring as f, type DashboardDefinition as g, type DashboardIssue as h, isBoundSetting as i, type DashboardPanel as j, type DashboardPreview as k, type SettingField as l, type SettingsValues as m, normalizeDashboard as n, dashboardArtifactSchema as o, dashboardAuthoringSchema as p, dashboardDefinitionSchema as q, dashboardLimits as r, dashboardPanelAuthoringSchema as s, dashboardPanels as t, dashboardPreviewSchema as u, defaultPanelWidths as v, isAmount as w, isBalanceChain as x, missingResourceSettings as y, parseSettings as z };