@domino-sdk/relay 1.0.0-next.16 → 1.0.0-next.17

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.
package/dist/browser.d.ts CHANGED
@@ -607,7 +607,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
607
607
  seed: string;
608
608
  };
609
609
  displayName: string | null;
610
- avatarChoice: "default" | "account" | "upload" | "generated";
610
+ avatarChoice: "default" | "upload" | "account" | "generated";
611
611
  avatarProvider: "x" | "discord" | "google" | null;
612
612
  hidden: boolean;
613
613
  locked: boolean;
@@ -635,7 +635,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
635
635
  seed: string;
636
636
  };
637
637
  displayName: string | null;
638
- avatarChoice: "default" | "account" | "upload" | "generated";
638
+ avatarChoice: "default" | "upload" | "account" | "generated";
639
639
  avatarProvider: "x" | "discord" | "google" | null;
640
640
  hidden: boolean;
641
641
  locked: boolean;
@@ -665,7 +665,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
665
665
  seed: string;
666
666
  };
667
667
  displayName: string | null;
668
- avatarChoice: "default" | "account" | "upload" | "generated";
668
+ avatarChoice: "default" | "upload" | "account" | "generated";
669
669
  avatarProvider: "x" | "discord" | "google" | null;
670
670
  hidden: boolean;
671
671
  locked: boolean;
@@ -818,7 +818,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
818
818
  };
819
819
  availability: {
820
820
  kind: "available";
821
- input: "text" | "url" | "none" | "quiz" | "photo";
821
+ input: "url" | "text" | "none" | "quiz" | "photo";
822
822
  } | {
823
823
  kind: "completed";
824
824
  } | {
@@ -911,7 +911,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
911
911
  } | undefined;
912
912
  } | null;
913
913
  release: string;
914
- interaction: "text" | "url" | "automatic" | "claim" | "staff" | "quiz" | "photo";
914
+ interaction: "url" | "text" | "automatic" | "claim" | "staff" | "quiz" | "photo";
915
915
  lifecycle: "paused" | "active" | "archived";
916
916
  rewards: ({
917
917
  kind: "points";
@@ -1124,7 +1124,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1124
1124
  };
1125
1125
  availability: {
1126
1126
  kind: "available";
1127
- input: "text" | "url" | "none" | "quiz" | "photo";
1127
+ input: "url" | "text" | "none" | "quiz" | "photo";
1128
1128
  } | {
1129
1129
  kind: "completed";
1130
1130
  } | {
@@ -1217,7 +1217,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1217
1217
  } | undefined;
1218
1218
  } | null;
1219
1219
  release: string;
1220
- interaction: "text" | "url" | "automatic" | "claim" | "staff" | "quiz" | "photo";
1220
+ interaction: "url" | "text" | "automatic" | "claim" | "staff" | "quiz" | "photo";
1221
1221
  lifecycle: "paused" | "active" | "archived";
1222
1222
  rewards: ({
1223
1223
  kind: "points";
@@ -1377,7 +1377,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1377
1377
  };
1378
1378
  availability: {
1379
1379
  kind: "available";
1380
- input: "text" | "url" | "none" | "quiz" | "photo";
1380
+ input: "url" | "text" | "none" | "quiz" | "photo";
1381
1381
  } | {
1382
1382
  kind: "completed";
1383
1383
  } | {
@@ -1470,7 +1470,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1470
1470
  } | undefined;
1471
1471
  } | null;
1472
1472
  release: string;
1473
- interaction: "text" | "url" | "automatic" | "claim" | "staff" | "quiz" | "photo";
1473
+ interaction: "url" | "text" | "automatic" | "claim" | "staff" | "quiz" | "photo";
1474
1474
  lifecycle: "paused" | "active" | "archived";
1475
1475
  rewards: ({
1476
1476
  kind: "points";
@@ -1633,7 +1633,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1633
1633
  };
1634
1634
  availability: {
1635
1635
  kind: "available";
1636
- input: "text" | "url" | "none" | "quiz" | "photo";
1636
+ input: "url" | "text" | "none" | "quiz" | "photo";
1637
1637
  } | {
1638
1638
  kind: "completed";
1639
1639
  } | {
@@ -1726,7 +1726,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
1726
1726
  } | undefined;
1727
1727
  } | null;
1728
1728
  release: string;
1729
- interaction: "text" | "url" | "automatic" | "claim" | "staff" | "quiz" | "photo";
1729
+ interaction: "url" | "text" | "automatic" | "claim" | "staff" | "quiz" | "photo";
1730
1730
  lifecycle: "paused" | "active" | "archived";
1731
1731
  rewards: ({
1732
1732
  kind: "points";
@@ -2108,7 +2108,7 @@ declare function createBrowserRelayClient(options: Parameters<typeof createRelay
2108
2108
  };
2109
2109
  availability: {
2110
2110
  kind: "available";
2111
- input: "text" | "url" | "none" | "quiz" | "photo";
2111
+ input: "url" | "text" | "none" | "quiz" | "photo";
2112
2112
  } | {
2113
2113
  kind: "completed";
2114
2114
  } | {
@@ -2598,7 +2598,7 @@ type RoleDeliveryStatus = KnownRoleDeliveryStatus | (string & {});
2598
2598
  * changes whether the quest is completed: the role follows the completion.
2599
2599
  * `failed` means Domino gave up; only the organizer can grant the role now.
2600
2600
  */
2601
- declare function roleDeliveryStatus(deliveries: RoleDelivery[], quest: string): KnownRoleDeliveryStatus | null;
2601
+ declare function roleDeliveryStatus(deliveries: readonly RoleDelivery[], quest: string): RoleDeliveryStatus | null;
2602
2602
  /** `roleDeliveryStatus` in English, or null for null. */
2603
2603
  declare function roleDeliveryLabel(status: RoleDeliveryStatus | null): "Role delivery pending" | "Role delivery failed" | "Role granted" | null;
2604
2604
 
@@ -2609,7 +2609,7 @@ declare function roleDeliveryLabel(status: RoleDeliveryStatus | null): "Role del
2609
2609
  * has arrived yet.
2610
2610
  */
2611
2611
  declare function useExperience(): MemberQuery<ExperienceData> & {
2612
- deliveries: RoleDelivery[];
2612
+ deliveries: readonly RoleDelivery[];
2613
2613
  };
2614
2614
 
2615
2615
  type QuestInput = {
@@ -2636,8 +2636,20 @@ type QuestNotice = "received" | "quest-updated" | null;
2636
2636
  * - When the quest changed underneath the participant, nothing is resubmitted
2637
2637
  * for them. They see the latest version with whatever draft still applies.
2638
2638
  * - An interrupted submission is resumed, never duplicated.
2639
+ *
2640
+ * The actions keep their identity across renders and act on the latest `view`; the returned object
2641
+ * changes only when something in it does.
2639
2642
  */
2640
2643
  declare function useQuest(observed: QuestView): {
2644
+ restart: () => Promise<void>;
2645
+ submit: (input: QuestInput) => Promise<void>;
2646
+ /** Finish an interrupted submission, or reopen an outdated draft. */
2647
+ resume: () => Promise<void>;
2648
+ /**
2649
+ * Re-run verification that failed to run. Never creates a new attempt.
2650
+ * Domino refuses this for automatic quests, so never offer it for them.
2651
+ */
2652
+ retry: () => Promise<void>;
2641
2653
  /** The newest known version of the quest. Render this, not the prop. */
2642
2654
  view: {
2643
2655
  quest: string;
@@ -2898,15 +2910,6 @@ declare function useQuest(observed: QuestView): {
2898
2910
  /** The attempt the last "received" notice is about. */
2899
2911
  receipt: string | null;
2900
2912
  startingFresh: boolean;
2901
- restart: () => Promise<void>;
2902
- submit: (input: QuestInput) => Promise<void>;
2903
- /** Finish an interrupted submission, or reopen an outdated draft. */
2904
- resume: () => Promise<void>;
2905
- /**
2906
- * Re-run verification that failed to run. Never creates a new attempt.
2907
- * Domino refuses this for automatic quests, so never offer it for them.
2908
- */
2909
- retry: () => Promise<void>;
2910
2913
  };
2911
2914
 
2912
2915
  type QuestTone = "open" | "done" | "waiting" | "attention" | "locked" | "off";
@@ -2956,8 +2959,12 @@ declare function isFinished(view: QuestView): boolean;
2956
2959
  * status and nothing to press.
2957
2960
  */
2958
2961
  declare function isAutomatic(view: QuestView): boolean;
2959
- /** "Completed 3 times" for repeatable quests, otherwise nothing. */
2960
- declare function completionCountLabel(view: QuestView): string | null;
2962
+ /**
2963
+ * How often a repeatable quest was completed, in English ("Completed once", "Completed 3 times"),
2964
+ * or null for a quest that is not repeatable or was never completed. To use your own words, read
2965
+ * `view.completionCount` where `view.completion.kind` is `keyed`.
2966
+ */
2967
+ declare function completionCountText(view: QuestView): string | null;
2961
2968
  /**
2962
2969
  * True when a repeatable quest's latest submission was accepted. The quest is
2963
2970
  * open again, so show the normal submit action rather than a finished state.
@@ -2965,11 +2972,10 @@ declare function completionCountLabel(view: QuestView): string | null;
2965
2972
  declare function canRepeat(view: QuestView): boolean;
2966
2973
  /**
2967
2974
  * What a QuestView means for the participant, as a tone and a code. Pure and free of copy: render
2968
- * the code in your own words, or call `questStatusText` for English.
2975
+ * the code in your own words, or call `questStatusText` for English. The code is an open string,
2976
+ * so a `switch` over it needs a `default` for codes a newer SDK adds.
2969
2977
  */
2970
- declare function questStatus(view: QuestView): QuestStatus & {
2971
- code: KnownQuestStatusCode;
2972
- };
2978
+ declare function questStatus(view: QuestView): QuestStatus;
2973
2979
  /**
2974
2980
  * `questStatus` in English, for apps that do not localize: a `label` such as "In review", and a
2975
2981
  * `detail` sentence when there is more to say.
@@ -2977,6 +2983,12 @@ declare function questStatus(view: QuestView): QuestStatus & {
2977
2983
  declare function questStatusText(view: QuestView): QuestStatusText;
2978
2984
  /** True when the participant can submit something right now. */
2979
2985
  declare function canSubmit(view: QuestView): boolean;
2986
+ /**
2987
+ * "x of y completed" for a list of quests: `total` counts every quest that is not archived or
2988
+ * repeatable, including locked and paused ones, because they are still part of what the
2989
+ * participant works through; `done` counts those that are finished (`isFinished`). A repeatable
2990
+ * quest is never finished, so it stays out of both.
2991
+ */
2980
2992
  declare function progressOf(quests: QuestView[]): {
2981
2993
  total: number;
2982
2994
  done: number;
@@ -3012,6 +3024,11 @@ declare function useSignIn(): {
3012
3024
  /** Signs in, or signs up, with a wallet; the wallet asks the participant to sign a message. */
3013
3025
  withWallet: (signer: WalletSigner) => Promise<void>;
3014
3026
  };
3027
+ /**
3028
+ * Signs the participant out. Once Relay confirms, the previous member's cached values are gone and
3029
+ * the member hooks report `signed-out`. `signOut` keeps its identity across renders, and rejects
3030
+ * when Relay could not sign out.
3031
+ */
3015
3032
  declare function useSignOut(): {
3016
3033
  busy: boolean;
3017
3034
  signOut: () => Promise<void>;
@@ -3296,7 +3313,7 @@ declare function useProfileReferral(profile: string, program: string, options?:
3296
3313
  * A profile's completions of quests that show on profiles (`relay.profiles.completions`), most
3297
3314
  * recently completed first, `limit` quests at a time: `data.items`, and `data.nextCursor` while
3298
3315
  * there are more. `loadMore()` appends the next page; `refresh()` starts again from the first, as a
3299
- * quest submission or a profile change does.
3316
+ * new completion in the experience or a profile change does.
3300
3317
  */
3301
3318
  declare function useProfileCompletions(profile: string, options?: {
3302
3319
  limit?: number;
@@ -3349,11 +3366,14 @@ declare function useInvitation(param?: string): {
3349
3366
  /**
3350
3367
  * The signed-in participant's invitation code and progress in `data`: attributed friends,
3351
3368
  * qualified friends per program, milestones, and points. `link` is the share link, null until the
3352
- * summary is read. Read again after an invitation is accepted and after a quest submission.
3369
+ * summary is read. Read again every `intervalMs` (default 60 seconds) while the page is visible, so
3370
+ * friends who qualify show up, after an invitation is accepted, and when a new completion appears
3371
+ * in the experience.
3353
3372
  */
3354
3373
  declare function useReferralSummary(options?: {
3355
3374
  path?: string;
3356
3375
  param?: string;
3376
+ intervalMs?: number;
3357
3377
  }): MemberQuery<ReferralSummary> & {
3358
3378
  link: string | null;
3359
3379
  };
@@ -3361,9 +3381,9 @@ declare function useReferralSummary(options?: {
3361
3381
  /**
3362
3382
  * One leaderboard's top rows plus the participant's own row and neighbours, in `data`.
3363
3383
  *
3364
- * Read again every `intervalMs` while the page is visible, after a quest submission, and for each
3365
- * participant who signs in. Boards default to participants-only access: signed-out visitors get
3366
- * an error unless the board is published as public.
3384
+ * Read again every `intervalMs` while the page is visible, when a new completion appears in the
3385
+ * experience, and for each participant who signs in. Boards default to participants-only access:
3386
+ * signed-out visitors get an error unless the board is published as public.
3367
3387
  */
3368
3388
  declare function useLeaderboard(board: string, options?: {
3369
3389
  limit?: number;
@@ -3402,4 +3422,4 @@ declare function usePointLedgers(): Query<PointLedgerReference[]>;
3402
3422
  */
3403
3423
  declare function useTieredRewards(): Query<TieredRewardReference[]>;
3404
3424
 
3405
- export { type Collection, CosmosChains, DiscoveredWallet, type ExperienceData, type Invitation, type KnownQuestStatusCode, type KnownRoleDeliveryStatus, type MemberPagedQuery, type MemberQuery, type MemberSnapshot, 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 RelayClient, RelayProvider, type RoleDelivery, type RoleDeliveryStatus, type SavedSubmission, SignInMethods, SignInOption, SignInUnavailable, SignInWallet, canRepeat, canSubmit, captureReferralCode, completionCountLabel, isAutomatic, isConnected, isFinished, progressOf, questGroups, questStatus, questStatusText, relayKeys, roleDeliveryLabel, roleDeliveryStatus, useAccounts, useBalances, useExperience, useInvalidate, useInvitation, useLeaderboard, useLeaderboardPlacement, useMe, useMemberPages, useMemberQuery, useMyProfile, usePointHistory, usePointLedgers, useProfile, useProfileCompletions, useProfileReferral, useQuest, useReferralSummary, useRelay, useRelayPages, useRelayQuery, useSession, useSignIn, useSignInMethods, useSignInOptions, useSignInWallets, useSignOut, useTieredRewards, useWalletDiscovery, useWallets };
3425
+ export { type Collection, CosmosChains, DiscoveredWallet, type ExperienceData, type Invitation, type KnownQuestStatusCode, type KnownRoleDeliveryStatus, type MemberPagedQuery, type MemberQuery, type MemberSnapshot, 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 RelayClient, RelayProvider, 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, useBalances, useExperience, useInvalidate, useInvitation, useLeaderboard, useLeaderboardPlacement, useMe, useMemberPages, useMemberQuery, useMyProfile, usePointHistory, usePointLedgers, useProfile, useProfileCompletions, useProfileReferral, useQuest, useReferralSummary, useRelay, useRelayPages, useRelayQuery, useSession, useSignIn, useSignInMethods, useSignInOptions, useSignInWallets, useSignOut, useTieredRewards, useWalletDiscovery, useWallets };
@@ -146,6 +146,7 @@ function watchRoleDeliveries(options) {
146
146
 
147
147
  // src/react/use-role-deliveries.ts
148
148
  import { useEffect, useState } from "react";
149
+ var NONE = Object.freeze([]);
149
150
  function useRoleDeliveries(relay, member, completions) {
150
151
  const [state, setState] = useState(null);
151
152
  useEffect(() => {
@@ -169,12 +170,12 @@ function useRoleDeliveries(relay, member, completions) {
169
170
  document.removeEventListener("visibilitychange", wake);
170
171
  };
171
172
  }, [relay, member, completions]);
172
- return member && completions && state?.member === member ? state.deliveries : [];
173
+ return member && completions && state?.member === member ? state.deliveries : NONE;
173
174
  }
174
175
 
175
176
  // src/react/experience.tsx
176
177
  import { jsx } from "react/jsx-runtime";
177
- var Deliveries = createContext2([]);
178
+ var Deliveries = createContext2(Object.freeze([]));
178
179
  function useExperienceSnapshot() {
179
180
  const store = useStore();
180
181
  const get = () => store.experience;
@@ -503,7 +504,7 @@ function isAutomatic(view) {
503
504
  function runsSilently(view) {
504
505
  return view.trigger.kind === "automatic" && (view.completion.kind === "keyed" || Boolean(view.trigger.tracker));
505
506
  }
506
- function completionCountLabel(view) {
507
+ function completionCountText(view) {
507
508
  if (view.completion.kind !== "keyed" || view.completionCount < 1) {
508
509
  return null;
509
510
  }
@@ -516,6 +517,9 @@ function visibleQuests(quests) {
516
517
  return quests.filter((q) => q.visibility !== "hidden");
517
518
  }
518
519
  function questStatus(view) {
520
+ return knownStatus(view);
521
+ }
522
+ function knownStatus(view) {
519
523
  if (isFinished(view)) {
520
524
  return { tone: "done", code: "completed" };
521
525
  }
@@ -569,7 +573,7 @@ function questStatus(view) {
569
573
  }
570
574
  }
571
575
  function questStatusText(view) {
572
- const status = questStatus(view);
576
+ const status = knownStatus(view);
573
577
  const words = (label, detail) => detail === void 0 ? { ...status, label } : { ...status, label, detail };
574
578
  const rejection = status.reason === void 0 ? null : sentence(status.reason || "That submission wasn't accepted.");
575
579
  switch (status.code) {
@@ -604,7 +608,7 @@ function questStatusText(view) {
604
608
  return words(
605
609
  "Automatic",
606
610
  view.completion.kind === "keyed" ? [
607
- completionCountLabel(view),
611
+ completionCountText(view),
608
612
  "This counts by itself each time you qualify."
609
613
  ].filter(Boolean).join(". ") : "This updates by itself when you qualify."
610
614
  );
@@ -789,9 +793,21 @@ var RelayStore = class {
789
793
  }
790
794
  }
791
795
  }
792
- /** Writes a value a change returned into the current participant's cache (`QueryCache.set`). */
793
- set(key, data) {
794
- this.#scope?.cache.set(key, data);
796
+ /**
797
+ * Signs the participant out through the client, and drops their scope as soon as Relay confirms:
798
+ * the previous member's values never wait on the next session read, which may fail. Only the
799
+ * scope that signed out is dropped: someone who signed in while the request was in flight stays.
800
+ */
801
+ async signOut() {
802
+ const scope = this.#scope;
803
+ await this.client.auth.signOut();
804
+ if (!this.#mounted || this.#scope !== scope) {
805
+ return;
806
+ }
807
+ this.#sessionVersion++;
808
+ this.#sessionRead?.abort();
809
+ this.#setSession({ status: "ready", data: null, error: null });
810
+ this.#emit();
795
811
  }
796
812
  refreshExperience() {
797
813
  return this.#observer?.refresh() ?? Promise.resolve();
@@ -1202,7 +1218,14 @@ function questGroups(experience, order = []) {
1202
1218
  }
1203
1219
 
1204
1220
  // src/react/use-quest.ts
1205
- import { useCallback as useCallback3, useEffect as useEffect4, useState as useState3 } from "react";
1221
+ import {
1222
+ useCallback as useCallback3,
1223
+ useEffect as useEffect4,
1224
+ useLayoutEffect as useLayoutEffect2,
1225
+ useMemo as useMemo4,
1226
+ useRef as useRef2,
1227
+ useState as useState3
1228
+ } from "react";
1206
1229
  function useQuest(observed) {
1207
1230
  const store = useStore();
1208
1231
  const relay = store.client;
@@ -1259,83 +1282,100 @@ function useQuest(observed) {
1259
1282
  },
1260
1283
  [store]
1261
1284
  );
1262
- return {
1263
- /** The newest known version of the quest. Render this, not the prop. */
1264
- view,
1265
- /** Input recovered after the quest changed. Prefill the form with it. */
1266
- draft,
1267
- notice,
1268
- error,
1269
- busy,
1270
- saved,
1271
- /** The attempt the last "received" notice is about. */
1272
- receipt,
1273
- startingFresh: view.attempt?.id === discardedAttempt && view.attempt?.status === "failed",
1274
- restart: async () => {
1275
- setBusy(true);
1276
- setError(null);
1277
- try {
1278
- await (await relay.quests.open(view)).discard();
1279
- setDiscardedAttempt(view.attempt?.id ?? null);
1280
- setSaved("none");
1281
- setDraft(null);
1282
- setNotice(null);
1283
- } catch (cause) {
1284
- setError(asRelayError(cause, "Could not start a new submission."));
1285
- } finally {
1286
- setBusy(false);
1287
- }
1288
- },
1289
- submit: (input) => run(async () => {
1290
- if (view.connections.length) {
1291
- const accounts = await relay.auth.accounts();
1292
- const missing = view.connections.find(
1293
- (provider) => !accounts.some(
1294
- (account) => account.provider === provider && account.configured && account.status === "connected"
1295
- )
1296
- );
1297
- if (missing) {
1298
- throw new Error(`Connect ${missing} before verifying.`);
1285
+ const shown = useRef2(view);
1286
+ useLayoutEffect2(() => {
1287
+ shown.current = view;
1288
+ });
1289
+ const actions = useMemo4(
1290
+ () => ({
1291
+ restart: async () => {
1292
+ const current = shown.current;
1293
+ setBusy(true);
1294
+ setError(null);
1295
+ try {
1296
+ await (await relay.quests.open(current)).discard();
1297
+ setDiscardedAttempt(current.attempt?.id ?? null);
1298
+ setSaved("none");
1299
+ setDraft(null);
1300
+ setNotice(null);
1301
+ } catch (cause) {
1302
+ setError(asRelayError(cause, "Could not start a new submission."));
1303
+ } finally {
1304
+ setBusy(false);
1299
1305
  }
1300
- }
1301
- const controller = await relay.quests.open(view);
1302
- if ((controller.kind === "text" || controller.kind === "url") && input.kind === controller.kind) {
1303
- return controller.submit(input.value);
1304
- }
1305
- if (controller.kind === "claim" && input.kind === "claim") {
1306
- return controller.submit();
1307
- }
1308
- if (controller.kind === "quiz" && input.kind === "quiz") {
1309
- return controller.submit(input.answers);
1310
- }
1311
- if (controller.kind === "photo" && input.kind === "photo") {
1312
- return controller.submit(input.file);
1313
- }
1314
- throw new Error("This activity changed. Reload and try again.");
1306
+ },
1307
+ submit: (input) => run(async () => {
1308
+ const current = shown.current;
1309
+ if (current.connections.length) {
1310
+ const accounts = await relay.auth.accounts();
1311
+ const missing = current.connections.find(
1312
+ (provider) => !accounts.some(
1313
+ (account) => account.provider === provider && account.configured && account.status === "connected"
1314
+ )
1315
+ );
1316
+ if (missing) {
1317
+ throw new Error(`Connect ${missing} before verifying.`);
1318
+ }
1319
+ }
1320
+ const controller = await relay.quests.open(current);
1321
+ if ((controller.kind === "text" || controller.kind === "url") && input.kind === controller.kind) {
1322
+ return controller.submit(input.value);
1323
+ }
1324
+ if (controller.kind === "claim" && input.kind === "claim") {
1325
+ return controller.submit();
1326
+ }
1327
+ if (controller.kind === "quiz" && input.kind === "quiz") {
1328
+ return controller.submit(input.answers);
1329
+ }
1330
+ if (controller.kind === "photo" && input.kind === "photo") {
1331
+ return controller.submit(input.file);
1332
+ }
1333
+ throw new Error("This activity changed. Reload and try again.");
1334
+ }),
1335
+ /** Finish an interrupted submission, or reopen an outdated draft. */
1336
+ resume: () => run(async () => (await relay.quests.open(shown.current)).resume()),
1337
+ /**
1338
+ * Re-run verification that failed to run. Never creates a new attempt.
1339
+ * Domino refuses this for automatic quests, so never offer it for them.
1340
+ */
1341
+ retry: () => run(async () => {
1342
+ const current = shown.current;
1343
+ if (isAutomatic(current)) {
1344
+ throw new Error("This activity updates by itself.");
1345
+ }
1346
+ return {
1347
+ kind: "submitted",
1348
+ attempt: await relay.quests.retry(current)
1349
+ };
1350
+ })
1315
1351
  }),
1316
- /** Finish an interrupted submission, or reopen an outdated draft. */
1317
- resume: () => run(async () => (await relay.quests.open(view)).resume()),
1318
- /**
1319
- * Re-run verification that failed to run. Never creates a new attempt.
1320
- * Domino refuses this for automatic quests, so never offer it for them.
1321
- */
1322
- retry: () => run(async () => {
1323
- if (isAutomatic(view)) {
1324
- throw new Error("This activity updates by itself.");
1325
- }
1326
- return {
1327
- kind: "submitted",
1328
- attempt: await relay.quests.retry(view)
1329
- };
1330
- })
1331
- };
1352
+ [relay, run]
1353
+ );
1354
+ const startingFresh = view.attempt?.id === discardedAttempt && view.attempt?.status === "failed";
1355
+ return useMemo4(
1356
+ () => ({
1357
+ /** The newest known version of the quest. Render this, not the prop. */
1358
+ view,
1359
+ /** Input recovered after the quest changed. Prefill the form with it. */
1360
+ draft,
1361
+ notice,
1362
+ error,
1363
+ busy,
1364
+ saved,
1365
+ /** The attempt the last "received" notice is about. */
1366
+ receipt,
1367
+ startingFresh,
1368
+ ...actions
1369
+ }),
1370
+ [view, draft, notice, error, busy, saved, receipt, startingFresh, actions]
1371
+ );
1332
1372
  }
1333
1373
 
1334
1374
  // src/react/auth.ts
1335
- import { useCallback as useCallback4, useMemo as useMemo5, useRef as useRef2, useState as useState5 } from "react";
1375
+ import { useCallback as useCallback4, useMemo as useMemo6, useRef as useRef3, useState as useState5 } from "react";
1336
1376
 
1337
1377
  // src/react/wallets.ts
1338
- import { useEffect as useEffect5, useMemo as useMemo4, useState as useState4 } from "react";
1378
+ import { useEffect as useEffect5, useMemo as useMemo5, useState as useState4 } from "react";
1339
1379
  function useWallets() {
1340
1380
  const relay = useRelay();
1341
1381
  const invalidate = useInvalidate();
@@ -1346,7 +1386,7 @@ function useWallets() {
1346
1386
  { refetchOnFocus: true }
1347
1387
  );
1348
1388
  const { busy, actionError, run } = useAction();
1349
- const actions = useMemo4(() => {
1389
+ const actions = useMemo5(() => {
1350
1390
  const changed = () => void invalidate([relayKeys.wallets, relayKeys.experience]);
1351
1391
  return {
1352
1392
  /** Links the wallet to the member the list was read for; another session is refused. */
@@ -1363,7 +1403,7 @@ function useWallets() {
1363
1403
  })
1364
1404
  };
1365
1405
  }, [relay, invalidate, session, run]);
1366
- return useMemo4(
1406
+ return useMemo5(
1367
1407
  () => ({ ...query, busy, actionError, ...actions }),
1368
1408
  [query, busy, actionError, actions]
1369
1409
  );
@@ -1421,6 +1461,7 @@ ${chains}` : null;
1421
1461
  }
1422
1462
 
1423
1463
  // src/react/auth.ts
1464
+ var NONE_UNAVAILABLE = [];
1424
1465
  function useSignInMethods() {
1425
1466
  const relay = useRelay();
1426
1467
  return useRelayQuery(relayKeys.signInMethods, () => readSignInMethods(relay));
@@ -1432,7 +1473,7 @@ function useMe() {
1432
1473
  function useSignIn() {
1433
1474
  const relay = useRelay();
1434
1475
  const [challenge, setChallengeState] = useState5(null);
1435
- const latest = useRef2(null);
1476
+ const latest = useRef3(null);
1436
1477
  const [busy, setBusy] = useState5(false);
1437
1478
  const [error, setError] = useState5(null);
1438
1479
  const setChallenge = useCallback4((value) => {
@@ -1489,37 +1530,48 @@ function useSignIn() {
1489
1530
  }, "Couldn't sign in with this wallet. Try again."),
1490
1531
  [relay, run, setChallenge]
1491
1532
  );
1492
- return {
1493
- busy,
1494
- error,
1495
- /** True once a code was sent and the form should ask for it. */
1496
- codeSent: challenge !== null,
1497
- sendCode,
1498
- verifyCode,
1499
- startOver,
1500
- withProvider,
1501
- /** Signs in, or signs up, with a wallet; the wallet asks the participant to sign a message. */
1502
- withWallet
1503
- };
1533
+ const codeSent = challenge !== null;
1534
+ return useMemo6(
1535
+ () => ({
1536
+ busy,
1537
+ error,
1538
+ /** True once a code was sent and the form should ask for it. */
1539
+ codeSent,
1540
+ sendCode,
1541
+ verifyCode,
1542
+ startOver,
1543
+ withProvider,
1544
+ /** Signs in, or signs up, with a wallet; the wallet asks the participant to sign a message. */
1545
+ withWallet
1546
+ }),
1547
+ [
1548
+ busy,
1549
+ error,
1550
+ codeSent,
1551
+ sendCode,
1552
+ verifyCode,
1553
+ startOver,
1554
+ withProvider,
1555
+ withWallet
1556
+ ]
1557
+ );
1504
1558
  }
1505
1559
  function useSignOut() {
1506
- const relay = useRelay();
1560
+ const store = useStore();
1507
1561
  const [busy, setBusy] = useState5(false);
1508
- return {
1509
- busy,
1510
- signOut: async () => {
1511
- setBusy(true);
1512
- try {
1513
- await relay.auth.signOut();
1514
- } finally {
1515
- setBusy(false);
1516
- }
1562
+ const signOut = useCallback4(async () => {
1563
+ setBusy(true);
1564
+ try {
1565
+ await store.signOut();
1566
+ } finally {
1567
+ setBusy(false);
1517
1568
  }
1518
- };
1569
+ }, [store]);
1570
+ return useMemo6(() => ({ busy, signOut }), [busy, signOut]);
1519
1571
  }
1520
1572
  function useSignInOptions(input = {}) {
1521
1573
  const chains = JSON.stringify(cosmosChainList(input.cosmos));
1522
- const cosmos = useMemo5(
1574
+ const cosmos = useMemo6(
1523
1575
  () => JSON.parse(chains),
1524
1576
  [chains]
1525
1577
  );
@@ -1535,7 +1587,7 @@ function useSignInOptions(input = {}) {
1535
1587
  withProvider,
1536
1588
  withWallet
1537
1589
  } = useSignIn();
1538
- const built = useMemo5(() => {
1590
+ const built = useMemo6(() => {
1539
1591
  if (!methods) {
1540
1592
  return null;
1541
1593
  }
@@ -1553,19 +1605,23 @@ function useSignInOptions(input = {}) {
1553
1605
  }
1554
1606
  });
1555
1607
  }, [methods, wallets, cosmos, withProvider, sendCode, verifyCode, withWallet]);
1556
- return {
1557
- options: built?.options ?? null,
1558
- unavailable: built?.unavailable ?? [],
1559
- methodsError: methods?.error ?? null,
1560
- busy,
1561
- error,
1562
- codeSent,
1563
- startOver
1564
- };
1608
+ const methodsError = methods?.error ?? null;
1609
+ return useMemo6(
1610
+ () => ({
1611
+ options: built?.options ?? null,
1612
+ unavailable: built?.unavailable ?? NONE_UNAVAILABLE,
1613
+ methodsError,
1614
+ busy,
1615
+ error,
1616
+ codeSent,
1617
+ startOver
1618
+ }),
1619
+ [built, methodsError, busy, error, codeSent, startOver]
1620
+ );
1565
1621
  }
1566
1622
 
1567
1623
  // src/react/accounts.ts
1568
- import { useMemo as useMemo6 } from "react";
1624
+ import { useMemo as useMemo7 } from "react";
1569
1625
  function isConnected(accounts, provider) {
1570
1626
  return Boolean(
1571
1627
  accounts?.some(
@@ -1583,7 +1639,7 @@ function useAccounts() {
1583
1639
  { refetchOnFocus: true }
1584
1640
  );
1585
1641
  const { busy, actionError, run } = useAction();
1586
- const actions = useMemo6(
1642
+ const actions = useMemo7(
1587
1643
  () => ({
1588
1644
  connect: (provider) => run(async () => {
1589
1645
  const { url } = await relay.auth.start(provider, "connect", {
@@ -1603,7 +1659,7 @@ function useAccounts() {
1603
1659
  [relay, invalidate, session, run]
1604
1660
  );
1605
1661
  const accounts = query.data;
1606
- return useMemo6(
1662
+ return useMemo7(
1607
1663
  () => ({
1608
1664
  ...query,
1609
1665
  busy,
@@ -1616,12 +1672,11 @@ function useAccounts() {
1616
1672
  }
1617
1673
 
1618
1674
  // src/react/profiles.ts
1619
- import { useMemo as useMemo7 } from "react";
1675
+ import { useMemo as useMemo8 } from "react";
1620
1676
  var MINE = [...relayKeys.profiles, "mine"];
1621
1677
  function useMyProfile() {
1622
1678
  const relay = useRelay();
1623
1679
  const store = useStore();
1624
- const invalidate = useInvalidate();
1625
1680
  const session = useScopeSession();
1626
1681
  const query = useMemberQuery(
1627
1682
  MINE,
@@ -1629,10 +1684,12 @@ function useMyProfile() {
1629
1684
  { refetchOnFocus: true }
1630
1685
  );
1631
1686
  const { busy, actionError, run } = useAction();
1632
- const actions = useMemo7(() => {
1687
+ const actions = useMemo8(() => {
1633
1688
  const change = (task) => run(async () => {
1634
- store.set(MINE, await task());
1635
- void invalidate([
1689
+ const cache = store.scope?.cache;
1690
+ const saved = await task();
1691
+ cache?.set(MINE, saved);
1692
+ void cache?.invalidate([
1636
1693
  [...relayKeys.profiles, "get"],
1637
1694
  relayKeys.leaderboards
1638
1695
  ]);
@@ -1647,8 +1704,8 @@ function useMyProfile() {
1647
1704
  })
1648
1705
  )
1649
1706
  };
1650
- }, [relay, store, invalidate, session, run]);
1651
- return useMemo7(
1707
+ }, [relay, store, session, run]);
1708
+ return useMemo8(
1652
1709
  () => ({ ...query, busy, actionError, ...actions }),
1653
1710
  [query, busy, actionError, actions]
1654
1711
  );
@@ -1691,7 +1748,7 @@ function useProfileCompletions(profile, options = {}) {
1691
1748
  }
1692
1749
 
1693
1750
  // src/react/referrals.ts
1694
- import { useCallback as useCallback5, useEffect as useEffect6, useMemo as useMemo8, useRef as useRef3, useState as useState6 } from "react";
1751
+ import { useCallback as useCallback5, useEffect as useEffect6, useMemo as useMemo9, useRef as useRef4, useState as useState6 } from "react";
1695
1752
  var PENDING = "domino:pending-referral";
1696
1753
  var CODE = /^[a-zA-Z0-9_-]{1,100}$/;
1697
1754
  function captureReferralCode(param = "ref") {
@@ -1722,7 +1779,7 @@ function useInvitation(param = "ref") {
1722
1779
  const code = captureReferralCode(param);
1723
1780
  return code ? { status: "pending", code } : { status: "none" };
1724
1781
  });
1725
- const started = useRef3(null);
1782
+ const started = useRef4(null);
1726
1783
  const accept = useCallback5(
1727
1784
  async (code) => {
1728
1785
  setState({ status: "accepting", code });
@@ -1751,16 +1808,17 @@ function useInvitation(param = "ref") {
1751
1808
  void accept(state.code);
1752
1809
  }
1753
1810
  }, [member, state, accept]);
1754
- return { invitation: state, accept };
1811
+ return useMemo9(() => ({ invitation: state, accept }), [state, accept]);
1755
1812
  }
1756
1813
  function useReferralSummary(options = {}) {
1757
1814
  const relay = useRelay();
1815
+ const { path = "/", param = "ref", intervalMs = 6e4 } = options;
1758
1816
  const query = useMemberQuery(
1759
1817
  [...relayKeys.referrals, "summary"],
1760
- (request) => relay.referrals.summary(request)
1818
+ (request) => relay.referrals.summary(request),
1819
+ { intervalMs }
1761
1820
  );
1762
- const { path = "/", param = "ref" } = options;
1763
- return useMemo8(() => {
1821
+ return useMemo9(() => {
1764
1822
  let link = null;
1765
1823
  if (query.data && typeof window !== "undefined") {
1766
1824
  const url = new URL(path, window.location.origin);
@@ -1818,7 +1876,7 @@ export {
1818
1876
  canRepeat,
1819
1877
  canSubmit,
1820
1878
  captureReferralCode,
1821
- completionCountLabel,
1879
+ completionCountText,
1822
1880
  isAutomatic,
1823
1881
  isConnected,
1824
1882
  isFinished,
package/dist/schema.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { A as Attempt, C as ContentPerformanceSnapshot, D as Decision, E as Entitlement, d as MemberPage, M as MemberProgress, P as PhotoResult, e as PickupAvailability, f as PublishedRelease, g as QuestAvailability, h as QuestDescription, Q as QuestPresentation, a as QuestProfile, i as QuestSettingsInput, b as QuizEvidence, j as ReleaseInput, k as ReviewPage, R as Reward, l as Snapshot, S as SubmissionEvidence, c as SubmitInput, m as TextResult, n as TextReviewInput, o as TieredRewardDefinition, T as TieredRewardReference, p as artifactSchema, q as attemptSchema, r as batchReleaseSchema, s as beginHandoverSchema, t as completionRecordSchema, u as configurePickupSchema, v as confirmHandoverSchema, w as contentPerformancePageSchema, x as contentPerformanceQuerySchema, y as contentPerformanceSnapshotSchema, z as createStockItemSchema, B as decisionSchema, F as entitlementSchema, G as errorSchema, H as eventSchema, I as evidenceSchema, J as integrationRewardSchema, K as mediaUrlSchema, L as memberListSchema, N as memberPageSchema, O as memberProgressSchema, U as photoResultSchema, V as pickupAllocationSchema, W as pickupAvailabilitySchema, X as pickupCatalogSchema, Y as pickupPolicySchema, Z as pickupSelectionSchema, _ as pointsRewardSchema, $ as prerequisiteSchema, a0 as publishedReleaseSchema, a1 as questAvailabilitySchema, a2 as questDescriptionSchema, a3 as questPresentationSchema, a4 as questProfileSchema, a5 as questSettingsInputSchema, a6 as quizAnswersSchema, a7 as quizEvidenceSchema, a8 as releaseSchema, a9 as reservationSchema, aa as reviewItemSchema, ab as reviewListSchema, ac as reviewModeSchema, ad as reviewPageSchema, ae as rewardBundleSchema, af as rewardKey, ag as rewardSchema, ah as snapshotSchema, ai as staffDecisionSchema, aj as stockItemSchema, ak as stockSchema, al as storedQuestDescriptionSchema, am as storedReviewModeSchema, an as submissionEvidenceSchema, ao as submitSchema, ap as templateSchema, aq as textResultSchema, ar as textReviewInputSchema, as as tierRewardSchema, at as tieredRewardDefinitionSchema, au as tieredRewardReferenceSchema, av as triggerSchema } from './schema-C4F2K9cm.js';
2
2
  export { A as AccountConnection, a as AuthProvider, D as DiscordMember, d as DiscordMessage, e as DiscordMessageData, f as DiscordMessageTextData, g as DiscordReactionData, h as DiscordReader, T as TextEvidence, b as TextOptions, U as UrlEvidence, c as UrlOptions, V as ValueEvidence, i as accountConnectionSchema, j as authProviderSchema, k as discordMemberInputSchema, l as discordMemberSchema, m as discordMessageDataSchema, n as discordMessageInputSchema, o as discordMessageSchema, p as discordMessageTextDataSchema, q as discordMessagesSourceSchema, r as discordReactionDataSchema, s as discordReactionsSourceSchema, t as textEvidenceSchema, u as textOptionsSchema, v as urlEvidenceSchema, w as urlOptionsSchema, x as validateSubmissionValue, y as valueEvidenceSchema, z as xPostId } from './submission-input-CkmBmSL1.js';
3
3
  export { E as ExchangeInput, M as MemberSummary, P as Page, a as PageQuery, b as ParticipantPrincipal, c as ParticipantSession, S as Session, d as authScopeSchema, e as exchangeResultSchema, f as exchangeSchema, m as memberSummarySchema, p as pageCursorSchema, g as pageQuerySchema, h as participantPrincipalSchema, i as participantSessionSchema, j as principalSchema, s as sessionMember, k as sessionSchema } from './pages-KYK1L60W.js';
4
- export { C as CalendarPeriod, D as DeploymentPreview, P as ProjectCalendar, a as ProjectCalendarInput, c as calendarPeriodSchema, b as canonicalTimeZone, d as deploymentPreviewSchema, e as deploymentResultSchema, p as projectCalendarDeclarationSchema, f as projectCalendarInputSchema, g as projectCalendarSchema, h as projectCatalogArtifactSchema, i as projectDeploymentSchema, j as publishDeploymentSchema, r as refuseStreakTimeZone, k as refuseWindowTimeZone, t as timeZoneNameSchema, l as timeZoneSchema } from './deployments-Ds34v0M8.js';
4
+ export { C as CalendarPeriod, D as DeploymentPreview, P as ProjectCalendar, a as ProjectCalendarInput, c as calendarPeriodSchema, b as canonicalTimeZone, d as deploymentPreviewSchema, e as deploymentResultSchema, p as projectCalendarDeclarationSchema, f as projectCalendarInputSchema, g as projectCalendarSchema, h as projectCatalogArtifactSchema, i as projectDeploymentSchema, j as publishDeploymentSchema, r as refuseStreakTimeZone, k as refuseWindowTimeZone, t as timeZoneNameSchema, l as timeZoneSchema } from './deployments-STMb3vdt.js';
5
5
  export { K as KnownPointEntryKind, P as PointBalance, a as PointBalances, b as PointEntry, c as PointEntryKind, d as PointHistoryPage, e as PointHistoryQuery, i as PointLedger, f as PointLedgerReference, j as QuestCatalog, k as QuestDraft, l as QuestInstance, Q as QuestInteraction, g as QuestRewardView, h as QuestView, m as allocateQuestSchema, n as allocatedQuestSchema, o as catalogDeploymentPreviewSchema, p as catalogDeploymentSchema, q as collectionSlotDeclarationSchema, r as collectionSlotSchema, s as collectionViewSchema, t as createPointLedgerSchema, u as interactionSchema, v as pointBalanceSchema, w as pointBalancesSchema, x as pointEntrySchema, y as pointHistoryPageSchema, z as pointHistoryQuerySchema, A as pointLedgerDeclarationSchema, B as pointLedgerPropertiesSchema, C as pointLedgerReferenceSchema, D as pointLedgerSchema, E as publishQuestDraftSchema, F as questCatalogSchema, G as questCollectionSchema, H as questDraftChangesSchema, I as questDraftSchema, J as questExperienceSchema, L as questInstanceSchema, M as questInteraction, N as questPublicationPreviewSchema, O as questRewardViewSchema, R as questTypeVersionSchema, S as questViewSchema, T as saveQuestDraftSchema } from './catalog-CVXUHxiO.js';
6
6
  export { C as CollectionPass, c as collectionBeginSchema, a as collectionCodeSchema, b as collectionPassSchema, d as collectionPreviewSchema, e as collectionResolveSchema } from './collection-BGneJ6Bk.js';
7
7
  export { B as Budget, C as CapabilityErrorCode, a as CapabilityFailure, I as IntegerSettings, b as IntegrationProvider, K as KnownCapabilityErrorCode, P as ProjectIntegration, R as ResourceOption, c as ResourceSource, S as Setting, d as SettingField, e as SettingsValues, X as XConnection, f as XPost, g as XProfile, h as XReader, i as budgetSchema, j as capabilityErrorCodes, k as capabilityFailureSchema, l as compatibleSettingKinds, m as completionKeySchema, n as completionPolicySchema, o as discordServerSchema, p as integrationProviderSchema, q as missingResourceSettings, r as parseSettings, s as projectIntegrationSchema, t as resourceOptionsSchema, u as resourceRequestSchema, v as resourceSourceSchema, w as settingFieldSchema, x as settingsFieldsSchema, y as settingsValuesSchema, z as xConnectionSchema, A as xIdSchema, D as xPostSchema, E as xProfileSchema, F as xRequestSchema } from './capability-error-DO6Q0Qwe.js';
@@ -1,7 +1,7 @@
1
1
  import { i as TrackerDataSchema, p as TrackerQuery, Z as trackerContentReadSchema, $ as trackerControlSchema, a6 as trackerIngestSchema, l as TrackerOutcomeQuery, a9 as trackerOutcomeRetrySchema, o as TrackerPreviewInput } from '../trackers-Cg2MzFEf.js';
2
2
  import { x as contentPerformanceQuerySchema, u as configurePickupSchema, a5 as questSettingsInputSchema, ao as submitSchema, ai as staffDecisionSchema, s as beginHandoverSchema, v as confirmHandoverSchema, z as createStockItemSchema } from '../schema-C4F2K9cm.js';
3
3
  import { z } from 'zod';
4
- import { i as projectDeploymentSchema, j as publishDeploymentSchema, f as projectCalendarInputSchema } from '../deployments-Ds34v0M8.js';
4
+ import { i as projectDeploymentSchema, j as publishDeploymentSchema, f as projectCalendarInputSchema } from '../deployments-STMb3vdt.js';
5
5
  import { D as pointLedgerSchema, p as catalogDeploymentSchema, T as saveQuestDraftSchema, E as publishQuestDraftSchema, t as createPointLedgerSchema, m as allocateQuestSchema } from '../catalog-CVXUHxiO.js';
6
6
  import { c as collectionBeginSchema } from '../collection-BGneJ6Bk.js';
7
7
  import { y as engagementChangePreviewInputSchema, B as engagementChangeSchema, P as engagementVersionQuerySchema, G as engagementPageQuerySchema, I as engagementPublishSchema, s as contentQualificationQuerySchema, i as contentAdmissionQuerySchema, k as contentEnrollmentInputSchema, u as contentReleaseInputSchema, a2 as pointsMutationSchema, aa as referralControlSchema, Z as leaderboardQuerySchema, U as leaderboardExclusionSchema, V as leaderboardGroupSchema } from '../referrals-KQfP4pBf.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domino-sdk/relay",
3
- "version": "1.0.0-next.16",
3
+ "version": "1.0.0-next.17",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -96,8 +96,8 @@ declare const projectCatalogArtifactSchema: z.ZodObject<{
96
96
  id?: string | undefined;
97
97
  }>>>>;
98
98
  supportedInteractions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
99
- text: "text";
100
99
  url: "url";
100
+ text: "text";
101
101
  automatic: "automatic";
102
102
  claim: "claim";
103
103
  staff: "staff";
@@ -117,10 +117,10 @@ declare const projectCatalogArtifactSchema: z.ZodObject<{
117
117
  kind: z.ZodLiteral<"custom">;
118
118
  namespace: z.ZodString;
119
119
  identities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
120
- member: "member";
121
- wallet: "wallet";
122
120
  x: "x";
123
121
  discord: "discord";
122
+ member: "member";
123
+ wallet: "wallet";
124
124
  }>>>;
125
125
  accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
126
126
  authors: z.ZodOptional<z.ZodLiteral<"wallet">>;
@@ -608,8 +608,8 @@ declare const projectDeploymentSchema: z.ZodObject<{
608
608
  id?: string | undefined;
609
609
  }>>>>;
610
610
  supportedInteractions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
611
- text: "text";
612
611
  url: "url";
612
+ text: "text";
613
613
  automatic: "automatic";
614
614
  claim: "claim";
615
615
  staff: "staff";
@@ -629,10 +629,10 @@ declare const projectDeploymentSchema: z.ZodObject<{
629
629
  kind: z.ZodLiteral<"custom">;
630
630
  namespace: z.ZodString;
631
631
  identities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
632
- member: "member";
633
- wallet: "wallet";
634
632
  x: "x";
635
633
  discord: "discord";
634
+ member: "member";
635
+ wallet: "wallet";
636
636
  }>>>;
637
637
  accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
638
638
  authors: z.ZodOptional<z.ZodLiteral<"wallet">>;
@@ -1280,10 +1280,10 @@ declare const deploymentPreviewSchema: z.ZodObject<{
1280
1280
  kind: z.ZodLiteral<"custom">;
1281
1281
  namespace: z.ZodString;
1282
1282
  identities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1283
- member: "member";
1284
- wallet: "wallet";
1285
1283
  x: "x";
1286
1284
  discord: "discord";
1285
+ member: "member";
1286
+ wallet: "wallet";
1287
1287
  }>>>;
1288
1288
  accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
1289
1289
  authors: z.ZodOptional<z.ZodLiteral<"wallet">>;
@@ -2279,8 +2279,8 @@ declare const deploymentPreviewSchema: z.ZodObject<{
2279
2279
  quests: z.ZodArray<z.ZodString>;
2280
2280
  }, z.core.$strict>>;
2281
2281
  supportedInteractions: z.ZodArray<z.ZodEnum<{
2282
- text: "text";
2283
2282
  url: "url";
2283
+ text: "text";
2284
2284
  automatic: "automatic";
2285
2285
  claim: "claim";
2286
2286
  staff: "staff";
@@ -2839,10 +2839,10 @@ declare const deploymentResultSchema: z.ZodObject<{
2839
2839
  kind: z.ZodLiteral<"custom">;
2840
2840
  namespace: z.ZodString;
2841
2841
  identities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
2842
- member: "member";
2843
- wallet: "wallet";
2844
2842
  x: "x";
2845
2843
  discord: "discord";
2844
+ member: "member";
2845
+ wallet: "wallet";
2846
2846
  }>>>;
2847
2847
  accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
2848
2848
  authors: z.ZodOptional<z.ZodLiteral<"wallet">>;
@@ -3838,8 +3838,8 @@ declare const deploymentResultSchema: z.ZodObject<{
3838
3838
  quests: z.ZodArray<z.ZodString>;
3839
3839
  }, z.core.$strict>>;
3840
3840
  supportedInteractions: z.ZodArray<z.ZodEnum<{
3841
- text: "text";
3842
3841
  url: "url";
3842
+ text: "text";
3843
3843
  automatic: "automatic";
3844
3844
  claim: "claim";
3845
3845
  staff: "staff";