@domino-sdk/relay 1.16.0 → 1.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.
Files changed (50) hide show
  1. package/dist/{attempt-captures-DHwIVoRP.d.ts → attempt-captures-ByzZyggX.d.ts} +5 -1
  2. package/dist/authoring.d.ts +82 -9
  3. package/dist/authoring.js +14 -9
  4. package/dist/{automatic-outcomes-BcEn_L46.d.ts → automatic-outcomes-BBSdMf0R.d.ts} +2 -1
  5. package/dist/avatar.d.ts +1 -1
  6. package/dist/browser.d.ts +7 -7
  7. package/dist/browser.js +9 -11
  8. package/dist/{chunk-Y6SRF54G.js → chunk-4VWMY4II.js} +32 -25
  9. package/dist/{chunk-6QJ3LADK.js → chunk-5P5PTZ3T.js} +1 -1
  10. package/dist/{chunk-3YCCHTCU.js → chunk-BWW3XLEE.js} +2 -2
  11. package/dist/{chunk-W335CWYJ.js → chunk-CVQG2AZZ.js} +2 -2
  12. package/dist/{chunk-ZLYBUM7K.js → chunk-DQWRDRVO.js} +26 -14
  13. package/dist/{chunk-46C33ASD.js → chunk-EMLDFUTV.js} +1314 -908
  14. package/dist/{chunk-4OLQYRSA.js → chunk-GMKJPHN4.js} +1 -1
  15. package/dist/{chunk-NM3IYYPG.js → chunk-HQBCFU5G.js} +6 -8
  16. package/dist/{chunk-YT3QKV2L.js → chunk-I525XMUY.js} +1 -1
  17. package/dist/{chunk-LLMJ2SUT.js → chunk-IE4QOQUI.js} +21 -4
  18. package/dist/{chunk-ZGH6NEG6.js → chunk-JIQHUDVZ.js} +1 -1
  19. package/dist/{chunk-NIYCAW2I.js → chunk-NGP2NMZ4.js} +1 -1
  20. package/dist/{chunk-XMBM2XD5.js → chunk-T47OFHHX.js} +2 -4
  21. package/dist/{chunk-AXRMT33W.js → chunk-UIHPWC4C.js} +3 -0
  22. package/dist/{chunk-UJACD6K2.js → chunk-XSLRNFIY.js} +346 -304
  23. package/dist/{chunk-PT5STHFH.js → chunk-YXAK2637.js} +1 -1
  24. package/dist/{client-DFSCmf3H.d.ts → client-93pUw04R.d.ts} +182 -14
  25. package/dist/{deployments-DIbKJO_Y.d.ts → deployments-D0mrWCsp.d.ts} +817 -1
  26. package/dist/{groups-Bi7lc54m.d.ts → groups-jLLG7MML.d.ts} +27 -2
  27. package/dist/{images-Cb8QHGjn.d.ts → images-BPiPqVKn.d.ts} +1 -1
  28. package/dist/index.d.ts +8 -8
  29. package/dist/index.js +12 -16
  30. package/dist/internal.d.ts +10 -10
  31. package/dist/internal.js +9 -10
  32. package/dist/{offers-Catj06u7.d.ts → offers-CPqiF3dZ.d.ts} +92 -3
  33. package/dist/{pages-CpYt56Km.d.ts → pages-1h1387a3.d.ts} +757 -3
  34. package/dist/portal-proxy.js +4 -4
  35. package/dist/react/index.d.ts +47 -19
  36. package/dist/react/index.js +361 -340
  37. package/dist/{schema-BaVl2VBS.d.ts → schema-Br3c1GOu.d.ts} +508 -2
  38. package/dist/schema.d.ts +565 -24
  39. package/dist/schema.js +61 -32
  40. package/dist/server/index.d.ts +10 -10
  41. package/dist/server/index.js +82 -24
  42. package/dist/{sign-in-options-CU1ND6-y.d.ts → sign-in-options--25uHySG.d.ts} +1 -1
  43. package/dist/{submission-input-Bi4HipqI.d.ts → submission-input-BEJ9qENg.d.ts} +2 -2
  44. package/dist/testing.d.ts +3 -3
  45. package/dist/testing.js +10 -13
  46. package/dist/{transport-BdrcbKi_.d.ts → transport-C2cK-6wO.d.ts} +6411 -72
  47. package/package.json +1 -1
  48. package/dist/chunk-2UAVZCMH.js +0 -314
  49. package/dist/chunk-NPGENI7K.js +0 -37
  50. package/dist/{profiles-BHMVj0kM.d.ts → profiles-D29SS12z.d.ts} +1 -1
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  isParticipantRoute
3
- } from "./chunk-AXRMT33W.js";
3
+ } from "./chunk-UIHPWC4C.js";
4
4
  import {
5
5
  clientIdentity
6
- } from "./chunk-YT3QKV2L.js";
6
+ } from "./chunk-I525XMUY.js";
7
7
  import {
8
8
  exchangeResultSchema
9
- } from "./chunk-PT5STHFH.js";
10
- import "./chunk-46C33ASD.js";
9
+ } from "./chunk-YXAK2637.js";
10
+ import "./chunk-EMLDFUTV.js";
11
11
 
12
12
  // src/portal-proxy.ts
13
13
  var statusCode = (status) => ({
@@ -1,19 +1,19 @@
1
+ import { B as Badge, b as MemberBadges, O as Offer, e as Redemption } from '../offers-CPqiF3dZ.js';
1
2
  import { b as ParticipantSession, R as RelayEvent, P as ParticipantActivity, M as MemberSummary } from '../participant-activity-DYdUUhw2.js';
2
- import { g as RelayError, R as RelayClient, S as SubmissionDraft } from '../client-DFSCmf3H.js';
3
- import { P as Page, j as QuestView, g as QuestOutcomeQuery, e as QuestOutcome } from '../pages-CpYt56Km.js';
3
+ import { g as RelayError, R as RelayClient, S as SubmissionDraft } from '../client-93pUw04R.js';
4
+ import { P as Page, y as collectionViewSchema, j as QuestView, g as QuestOutcomeQuery, e as QuestOutcome } from '../pages-1h1387a3.js';
4
5
  import * as react from 'react';
5
6
  import { ReactNode } from 'react';
6
7
  import { J as JSONType } from '../util.d-w9f9t3ua.js';
7
- import { E as Entitlement, a as AttemptStatus, T as TieredRewardReference } from '../schema-BaVl2VBS.js';
8
+ import { z } from 'zod';
9
+ import { E as Entitlement, a as AttemptStatus, T as TieredRewardReference } from '../schema-Br3c1GOu.js';
8
10
  import { a as AuthProvider, A as AccountConnection } from '../accounts-5ciAkCMP.js';
9
- import { c as SignInMethods, C as CosmosChains, d as SignInOption, f as SignInUnavailable, g as SignInWallet, D as DiscoveredWallet } from '../sign-in-options-CU1ND6-y.js';
10
- export { a as EmailSignInOption, O as OAuthSignInOption, b as SignInIcon, W as WalletSignInOption } from '../sign-in-options-CU1ND6-y.js';
11
+ import { c as SignInMethods, C as CosmosChains, d as SignInOption, f as SignInUnavailable, g as SignInWallet, D as DiscoveredWallet } from '../sign-in-options--25uHySG.js';
12
+ export { a as EmailSignInOption, O as OAuthSignInOption, b as SignInIcon, W as WalletSignInOption } from '../sign-in-options--25uHySG.js';
11
13
  import { f as WalletSigner, d as WalletSignInNetwork, L as LinkedWallet } from '../wallet-CDyo-U4n.js';
12
- import { f as LeaderboardPlacement, b7 as referralSummarySchema, e as LeaderboardPage, i as PointBalances, j as PointEntry, n as PointLedgerReference } from '../groups-Bi7lc54m.js';
13
- import { f as ProfileUpdate, e as ProfileSummary, a as ProfileCompletion, d as ProfileReferral } from '../profiles-BHMVj0kM.js';
14
- import { z } from 'zod';
15
- import { O as Offer, c as Redemption } from '../offers-Catj06u7.js';
16
- import '../submission-input-Bi4HipqI.js';
14
+ import { f as LeaderboardPlacement, b7 as referralSummarySchema, e as LeaderboardPage, i as PointBalances, j as PointEntry, n as PointLedgerReference } from '../groups-jLLG7MML.js';
15
+ import { f as ProfileUpdate, e as ProfileSummary, a as ProfileCompletion, d as ProfileReferral } from '../profiles-D29SS12z.js';
16
+ import '../submission-input-BEJ9qENg.js';
17
17
  import '../action-DBzILFx9.js';
18
18
 
19
19
  /**
@@ -191,6 +191,13 @@ declare function useSession(): Query<ParticipantSession | null> & {
191
191
  member: string | null;
192
192
  };
193
193
 
194
+ /** The active badge catalog, in `data`. */
195
+ declare function useBadgeCatalog(): Query<Badge[]>;
196
+ /** The member's badges, read again after quest completion. */
197
+ declare function useBadges(): MemberQuery<MemberBadges>;
198
+ /** A profile's badges under the project's profile visibility rules. */
199
+ declare function useProfileBadges(profile: string): Query<MemberBadges>;
200
+
194
201
  /** Cursor-polls committed events, retaining the latest 100 locally. Mount once for app-wide notifications. */
195
202
  declare function useActivity(options?: {
196
203
  onEvent?: (event: RelayEvent) => void;
@@ -289,13 +296,7 @@ type MutationOptions<TData, TVariables> = {
289
296
  */
290
297
  declare function useRelayMutation<TData = unknown, TVariables = void>(mutation: (variables: TVariables, context: MutationContext) => Promise<TData>, options?: MutationOptions<TData, TVariables>): Mutation<TData, TVariables>;
291
298
 
292
- type Collection = {
293
- id: string;
294
- /** The collection's authoring key, when it has one. */
295
- key?: string;
296
- title: string;
297
- quests: QuestView[];
298
- };
299
+ type Collection = z.infer<typeof collectionViewSchema>;
299
300
  /** The participant's quests and collections, as `useExperience().data` holds them. */
300
301
  type ExperienceData = {
301
302
  entitlements: Entitlement[];
@@ -367,6 +368,7 @@ declare const relayKeys: {
367
368
  readonly referrals: readonly ["referrals"];
368
369
  /** `usePointLedgers`. */
369
370
  readonly pointLedgers: readonly ["point-ledgers"];
371
+ readonly badges: readonly ["badges"];
370
372
  /** `useTieredRewards`. */
371
373
  readonly tieredRewards: readonly ["tiered-rewards"];
372
374
  /** `useSignInMethods`. */
@@ -830,6 +832,24 @@ declare function useQuest(observed: QuestView): {
830
832
  quest: string;
831
833
  title: string;
832
834
  presentation: {
835
+ steps?: {
836
+ title: string;
837
+ description?: string | undefined;
838
+ action?: {
839
+ kind: "link";
840
+ url: string;
841
+ label: string;
842
+ } | undefined;
843
+ }[] | undefined;
844
+ image?: string | undefined;
845
+ imageAlt?: string | undefined;
846
+ requirements?: ({
847
+ kind: "account";
848
+ provider: "discord" | "x" | "google" | "apple";
849
+ } | {
850
+ kind: "wallet";
851
+ chain?: "solana" | "eip155" | "cosmos" | undefined;
852
+ })[] | undefined;
833
853
  quiz?: {
834
854
  id: string;
835
855
  prompt: string;
@@ -951,7 +971,7 @@ declare function useQuest(observed: QuestView): {
951
971
  })[];
952
972
  } | {
953
973
  kind: "blocked";
954
- reason: "paused" | "outside-window" | "budget-exhausted" | "connection-required" | "wallet-required" | "enrollment-required";
974
+ reason: "paused" | "outside-window" | "budget-exhausted" | "enrollment-required" | "connection-required" | "wallet-required";
955
975
  window?: "quest" | "tracker" | undefined;
956
976
  resetsAt?: number | undefined;
957
977
  } | {
@@ -1075,6 +1095,7 @@ declare function useQuest(observed: QuestView): {
1075
1095
  } | {
1076
1096
  kind: "automatic";
1077
1097
  };
1098
+ badge?: string | undefined;
1078
1099
  };
1079
1100
  tier: string;
1080
1101
  } | {
@@ -1132,6 +1153,13 @@ declare function useQuest(observed: QuestView): {
1132
1153
  id: string;
1133
1154
  key: string | null;
1134
1155
  title: string;
1156
+ badge?: {
1157
+ name: string;
1158
+ description: string;
1159
+ image: string;
1160
+ id: string;
1161
+ key: string | null;
1162
+ } | undefined;
1135
1163
  };
1136
1164
  tier: string;
1137
1165
  } | {
@@ -1836,4 +1864,4 @@ declare function usePointLedgers(): Query<PointLedgerReference[]>;
1836
1864
  */
1837
1865
  declare function useTieredRewards(): Query<TieredRewardReference[]>;
1838
1866
 
1839
- 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, canRepeat, canSubmit, captureReferralCode, completionCountText, isAutomatic, isConnected, isFinished, progressOf, questGroups, questStatus, questStatusText, relayKeys, roleDeliveryLabel, roleDeliveryStatus, useAccounts, useActivity, useBalances, useDeliveries, useEntitlements, useExperience, useInvalidate, useInvitation, useLeaderboard, useLeaderboardPlacement, useMe, useMemberPages, useMemberQuery, useMyProfile, useOffers, usePointHistory, usePointLedgers, useProfile, useProfileCompletions, useProfileReferral, useQuest, useQuestOutcomes, useRedeemOffer, useReferralSummary, useRelay, useRelayAction, useRelayMutation, useRelayPages, useRelayQuery, useSession, useSetQueryData, useSignIn, useSignInMethods, useSignInOptions, useSignInWallets, useSignOut, useTieredRewards, useWalletDiscovery, useWallets };
1867
+ 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, canRepeat, canSubmit, captureReferralCode, completionCountText, isAutomatic, isConnected, isFinished, progressOf, questGroups, questStatus, questStatusText, relayKeys, roleDeliveryLabel, roleDeliveryStatus, useAccounts, useActivity, useBadgeCatalog, useBadges, useBalances, useDeliveries, useEntitlements, useExperience, useInvalidate, useInvitation, useLeaderboard, 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, useTieredRewards, useWalletDiscovery, useWallets };