@domino-sdk/relay 1.0.0-next.10 → 1.0.0-next.13

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 (46) hide show
  1. package/dist/authoring.d.ts +39 -36
  2. package/dist/authoring.js +10 -3
  3. package/dist/avatar.d.ts +2 -2
  4. package/dist/browser.d.ts +153 -129
  5. package/dist/browser.js +6 -6
  6. package/dist/{pages-D3titw5B.d.ts → catalog-C85V1NgW.d.ts} +178 -216
  7. package/dist/{chunk-ZWY3R6B3.js → chunk-6A2V4L3T.js} +4 -0
  8. package/dist/{chunk-YYD4QUBO.js → chunk-CRNQP7NV.js} +550 -470
  9. package/dist/{chunk-X2F2RAR3.js → chunk-EZWNGI5B.js} +23 -4
  10. package/dist/{chunk-7Q4BGGT6.js → chunk-FXYJ4OMX.js} +1 -1
  11. package/dist/{chunk-4LBUTHD6.js → chunk-II7DRZSL.js} +1 -1
  12. package/dist/chunk-KS33GOUL.js +83 -0
  13. package/dist/{chunk-QR7ZA2BJ.js → chunk-M64XHC42.js} +48 -4
  14. package/dist/chunk-MNQI35OG.js +100 -0
  15. package/dist/{chunk-PHU5VDLR.js → chunk-OA2KMQVZ.js} +41 -26
  16. package/dist/{chunk-P6FK43GG.js → chunk-WQ24ILGO.js} +140 -41
  17. package/dist/{client-CT4-S5vc.d.ts → client-Bf9PNUIi.d.ts} +61 -80
  18. package/dist/deployments-CNCP0JnD.d.ts +4250 -0
  19. package/dist/identity-integration-CBR8l3ju.d.ts +37 -0
  20. package/dist/images-BG4pdO4y.d.ts +234 -0
  21. package/dist/index.d.ts +10 -8
  22. package/dist/index.js +8 -5
  23. package/dist/{integrations-Ba5TtqTv.d.ts → integrations-EjQzIApL.d.ts} +1 -88
  24. package/dist/internal.d.ts +7 -38
  25. package/dist/internal.js +15 -88
  26. package/dist/observations-CQ6IcNuQ.d.ts +90 -0
  27. package/dist/pages-KYK1L60W.d.ts +152 -0
  28. package/dist/portal-proxy.js +5 -4
  29. package/dist/{profiles-DDMFBRKe.d.ts → profiles-BtOXMGcC.d.ts} +1 -1
  30. package/dist/react/index.d.ts +150 -31
  31. package/dist/react/index.js +149 -11
  32. package/dist/{submission-input-0OOGaq8c.d.ts → referrals-KQfP4pBf.d.ts} +189 -182
  33. package/dist/request-error-VnTiMXc3.d.ts +52 -0
  34. package/dist/{schema-Di3aLSiK.d.ts → schema-BF_TQsmT.d.ts} +338 -47
  35. package/dist/schema.d.ts +14 -4126
  36. package/dist/schema.js +46 -40
  37. package/dist/server/index.d.ts +19445 -0
  38. package/dist/server/index.js +1884 -0
  39. package/dist/{streaks-CwGReWGt.d.ts → streaks-CWyq8Px5.d.ts} +2 -4
  40. package/dist/submission-input-CccwAl5Z.d.ts +83 -0
  41. package/dist/{images-BTgk6OmC.d.ts → trackers-W7nRdRr7.d.ts} +1 -232
  42. package/dist/vite.d.ts +1 -1
  43. package/dist/vite.js +1 -0
  44. package/dist/{wallet-BGOfFkG9.d.ts → wallet-BtiG0Xhr.d.ts} +1 -1
  45. package/package.json +5 -1
  46. package/dist/point-ledgers-iS00Z_v0.d.ts +0 -37
@@ -1,13 +1,16 @@
1
1
  import { z } from 'zod';
2
2
  export { z } from 'zod';
3
- import { C as ContentPolicy, g as ContentMetric, E as EngagementDefinition, l as leaderboardAuthoringSchema, r as referralAuthoringSchema, h as AdmittedContent, D as DiscordMember, T as TextEvidence, U as UrlEvidence, e as TextOptions, f as UrlOptions } from './submission-input-0OOGaq8c.js';
4
- import { Q as QuizContent, a as StreakPolicy } from './streaks-CwGReWGt.js';
5
- import { R as ResourceSource, S as Setting, O as Observation, X as XReader, D as DiscordMessage, o as observationTriggerSchema, B as Budget, I as IntegerSettings, a as IntegrationProvider } from './integrations-Ba5TtqTv.js';
6
- import { T as TrackerDefinition, I as IdentityKind, c as customSourceSchema, W as WithRecordData, a as TrackerSource, t as trackerDefinitionSchema, b as Tracker, d as TrackerData, x as xSearchSourceSchema, X as XTweet, e as TrackerTriggerContext, f as TrackerTriggerPolicy, g as TrackerReader, h as ImageReader, i as Where, j as TrackerTriggerMode, k as WhereSetting } from './images-BTgk6OmC.js';
7
- export { l as TrackerDataSchema, m as TrackerPage, n as trackerDataSchema, o as trackerTriggerContextSchema } from './images-BTgk6OmC.js';
8
- import { d as TextReviewInput, e as TextResult, P as PhotoResult, r as rewardSchema, t as triggerSchema, Q as QuestPresentation, a as QuestProfile, b as QuizEvidence, D as Decision, f as TieredRewardDefinition } from './schema-Di3aLSiK.js';
9
- import { h as WalletConnection, S as SolanaBalance, L as LinkedWallet, i as WalletBalanceQuery, j as WalletBalance } from './wallet-BGOfFkG9.js';
10
- export { E as EvmChainId, k as isEvmChainId } from './wallet-BGOfFkG9.js';
3
+ import { e as ContentPolicy, C as ContentMetric, E as EngagementBudget, T as leaderboardDefinitionSchema, a9 as referralAuthoringSchema, A as AdmittedContent } from './referrals-KQfP4pBf.js';
4
+ import { Q as QuizContent, a as StreakPolicy } from './streaks-CWyq8Px5.js';
5
+ import { b as ResourceSource, S as Setting, g as XReader, I as IntegerSettings, a as IntegrationProvider } from './integrations-EjQzIApL.js';
6
+ import { j as TrackerDefinition, I as IdentityKind, J as customSourceSchema, F as WithRecordData, t as TrackerSource, a1 as trackerDefinitionSchema, T as Tracker, g as TrackerData, au as xSearchSourceSchema, X as XTweet, v as TrackerTriggerContext, x as TrackerTriggerPolicy, q as TrackerReader, W as Where, w as TrackerTriggerMode, E as WhereSetting } from './trackers-W7nRdRr7.js';
7
+ export { i as TrackerDataSchema, m as TrackerPage, aw as trackerDataSchema, ak as trackerTriggerContextSchema } from './trackers-W7nRdRr7.js';
8
+ import { e as ImageReader } from './images-BG4pdO4y.js';
9
+ import { O as Observation, D as DiscordMessage, h as observationTriggerSchema, B as Budget } from './observations-CQ6IcNuQ.js';
10
+ import { D as DiscordMember, T as TextEvidence, U as UrlEvidence, b as TextOptions, c as UrlOptions } from './submission-input-CccwAl5Z.js';
11
+ import { n as TextReviewInput, m as TextResult, P as PhotoResult, ag as rewardSchema, av as triggerSchema, Q as QuestPresentation, a as QuestProfile, b as QuizEvidence, D as Decision, o as TieredRewardDefinition } from './schema-BF_TQsmT.js';
12
+ import { k as WalletConnection, S as SolanaBalance, L as LinkedWallet, j as WalletBalanceQuery, i as WalletBalance } from './wallet-BtiG0Xhr.js';
13
+ export { E as EvmChainId, r as isEvmChainId } from './wallet-BtiG0Xhr.js';
11
14
  export { f as formatUnits, p as parseUnits } from './units-CwgsPB_r.js';
12
15
 
13
16
  /** Legacy `id` names an authoring key, never a server resource ID. */
@@ -30,7 +33,7 @@ declare function content(tracker: TrackerDefinition, policy?: Partial<Pick<Conte
30
33
  };
31
34
  enrollment: "required" | "none";
32
35
  posts: "after-enrollment" | "since-start";
33
- historical: "automatic" | "claim" | "staff";
36
+ historical: "staff" | "automatic" | "claim";
34
37
  };
35
38
  };
36
39
  declare function perContent(): {
@@ -50,7 +53,7 @@ declare function defineEngagementReward<const M extends readonly [ContentMetric,
50
53
  metrics: M;
51
54
  baseline: "historical";
52
55
  maxAgeMs?: number;
53
- budget?: EngagementDefinition["budget"];
56
+ budgets?: EngagementBudget[];
54
57
  target: (input: {
55
58
  metrics: Record<M[number], number>;
56
59
  }) => number;
@@ -63,11 +66,11 @@ declare function defineEngagementReward<const M extends readonly [ContentMetric,
63
66
  metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
64
67
  baseline: "historical";
65
68
  maxAgeMs: number;
66
- budget: {
67
- projectDaily?: number | undefined;
68
- memberDaily?: number | undefined;
69
- projectLifetime?: number | undefined;
70
- };
69
+ budgets: {
70
+ scope: "member" | "project";
71
+ period: "lifetime" | "day" | "week" | "month";
72
+ limit: number;
73
+ }[];
71
74
  };
72
75
  score(raw: unknown): {
73
76
  target: number;
@@ -75,13 +78,16 @@ declare function defineEngagementReward<const M extends readonly [ContentMetric,
75
78
  };
76
79
  };
77
80
  /**
78
- * One milestone per quest, after `days` consecutive community days with an accepted attempt.
79
- * Multiple accepted attempts occupy one day. The day comes from the attempt's trusted occurrence
80
- * time: a tracker record's (or observation's) `occurredAt` for `automatic({ tracker })`, and the
81
- * submission's admission time for `manual()`, so a manual streak counts the days a member
82
- * submitted. Not available on content quests or prerequisite-only `automatic()`.
81
+ * One milestone per quest, after `days` consecutive project calendar days with an accepted
82
+ * attempt. Multiple accepted attempts occupy one day. The day comes from the attempt's trusted
83
+ * occurrence time: a tracker record's (or observation's) `occurredAt` for `automatic({ tracker })`,
84
+ * and the submission's admission time for `manual()`, so a manual streak counts the days a member
85
+ * submitted. Days begin at midnight in the project timezone (`calendar.timeZone` in relay.json, or
86
+ * Console settings). Not available on content quests or prerequisite-only `automatic()`.
83
87
  */
84
- declare const streak: (options: Omit<StreakPolicy, "kind">) => StreakPolicy;
88
+ declare const streak: (options: {
89
+ days: number;
90
+ }) => StreakPolicy;
85
91
  declare function defineReferral(input: Omit<z.input<typeof referralAuthoringSchema>, "key" | "id"> & AuthoringIdentity): {
86
92
  id: string;
87
93
  title: string;
@@ -178,10 +184,10 @@ declare function defineReferral(input: Omit<z.input<typeof referralAuthoringSche
178
184
  }[];
179
185
  key: string;
180
186
  };
181
- declare function defineLeaderboard(input: Omit<z.input<typeof leaderboardAuthoringSchema>, "key" | "id"> & AuthoringIdentity): {
187
+ declare function defineLeaderboard(input: Omit<z.input<typeof leaderboardDefinitionSchema>, "key" | "id"> & AuthoringIdentity): {
182
188
  id: string;
183
- title: string;
184
189
  balance: string;
190
+ title: string;
185
191
  group?: string | undefined;
186
192
  score: {
187
193
  kind: "balance";
@@ -198,7 +204,6 @@ declare function defineLeaderboard(input: Omit<z.input<typeof leaderboardAuthori
198
204
  } | {
199
205
  kind: "calendar";
200
206
  period: "day" | "week" | "month";
201
- timeZone: string;
202
207
  };
203
208
  kind: "earned";
204
209
  quests?: string[] | undefined;
@@ -216,7 +221,6 @@ declare function defineLeaderboard(input: Omit<z.input<typeof leaderboardAuthori
216
221
  } | {
217
222
  kind: "calendar";
218
223
  period: "day" | "week" | "month";
219
- timeZone: string;
220
224
  };
221
225
  };
222
226
  access: "participants" | "public";
@@ -446,7 +450,7 @@ type KeyedContext = {
446
450
  declare const budget: (definition: Budget) => {
447
451
  id: string;
448
452
  scope: "member" | "project";
449
- period: "day" | "lifetime" | "week";
453
+ period: "lifetime" | "day" | "week" | "month";
450
454
  limit: number;
451
455
  cost: number | {
452
456
  balance: string;
@@ -740,12 +744,12 @@ declare function defineQuest<T extends Record<string, Setting>, const G extends
740
744
  kind: "resource";
741
745
  default: string;
742
746
  source: {
747
+ provider: "domino";
748
+ resource: "point-ledger";
749
+ } | {
743
750
  provider: "discord";
744
751
  resource: "channel";
745
752
  types: ("text" | "announcement")[];
746
- } | {
747
- provider: "domino";
748
- resource: "point-ledger";
749
753
  } | {
750
754
  provider: "discord";
751
755
  resource: "role";
@@ -844,7 +848,7 @@ declare function defineQuest<T extends Record<string, Setting>, const G extends
844
848
  };
845
849
  enrollment: "required" | "none";
846
850
  posts: "after-enrollment" | "since-start";
847
- historical: "automatic" | "claim" | "staff";
851
+ historical: "staff" | "automatic" | "claim";
848
852
  } | undefined;
849
853
  tracker?: {
850
854
  tracker: string;
@@ -895,7 +899,7 @@ declare function defineQuest<T extends Record<string, Setting>, const G extends
895
899
  minLength: number;
896
900
  maxLength: number;
897
901
  };
898
- actor?: "member" | "staff" | undefined;
902
+ actor?: "staff" | "member" | undefined;
899
903
  } | {
900
904
  kind: "manual";
901
905
  input: "url";
@@ -903,11 +907,11 @@ declare function defineQuest<T extends Record<string, Setting>, const G extends
903
907
  required: boolean;
904
908
  allowedHosts?: string[] | undefined;
905
909
  };
906
- actor?: "member" | "staff" | undefined;
910
+ actor?: "staff" | "member" | undefined;
907
911
  } | {
908
912
  kind: "manual";
909
- input: "none" | "quiz" | "photo";
910
- actor?: "member" | "staff" | undefined;
913
+ input: "photo" | "quiz" | "none";
914
+ actor?: "staff" | "member" | undefined;
911
915
  };
912
916
  requires: {
913
917
  quest: string;
@@ -915,7 +919,6 @@ declare function defineQuest<T extends Record<string, Setting>, const G extends
915
919
  completion: {
916
920
  kind: "streak";
917
921
  days: number;
918
- timeZone: string;
919
922
  } | {
920
923
  kind: "once";
921
924
  } | {
@@ -925,7 +928,7 @@ declare function defineQuest<T extends Record<string, Setting>, const G extends
925
928
  budgets: {
926
929
  id: string;
927
930
  scope: "member" | "project";
928
- period: "day" | "lifetime" | "week";
931
+ period: "lifetime" | "day" | "week" | "month";
929
932
  limit: number;
930
933
  cost: number | {
931
934
  balance: string;
package/dist/authoring.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  isEvmChainId,
11
11
  leaderboardAuthoringSchema,
12
12
  referralAuthoringSchema
13
- } from "./chunk-PHU5VDLR.js";
13
+ } from "./chunk-OA2KMQVZ.js";
14
14
  import {
15
15
  admittedContentSchema,
16
16
  budgetSchema,
@@ -48,7 +48,7 @@ import {
48
48
  whereSettings,
49
49
  xAccountRoles,
50
50
  xSearchSourceSchema
51
- } from "./chunk-YYD4QUBO.js";
51
+ } from "./chunk-CRNQP7NV.js";
52
52
 
53
53
  // src/builders.ts
54
54
  import { z } from "zod";
@@ -99,7 +99,14 @@ function defineEngagementReward(input) {
99
99
  }
100
100
  };
101
101
  }
102
- var streak = (options) => streakPolicySchema.parse({ kind: "streak", ...options });
102
+ var streak = (options) => {
103
+ if ("timeZone" in options) {
104
+ throw new Error(
105
+ "streak() no longer takes a timeZone. Set the project timezone with calendar.timeZone in relay.json or in Console settings."
106
+ );
107
+ }
108
+ return streakPolicySchema.strict().parse({ kind: "streak", ...options });
109
+ };
103
110
  function defineReferral(input) {
104
111
  const definition = referralAuthoringSchema.parse(input);
105
112
  return {
package/dist/avatar.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { L as LinkedWallet } from './wallet-BGOfFkG9.js';
2
- import { P as ProfileAvatar } from './profiles-DDMFBRKe.js';
1
+ import { L as LinkedWallet } from './wallet-BtiG0Xhr.js';
2
+ import { P as ProfileAvatar } from './profiles-BtOXMGcC.js';
3
3
  import 'zod';
4
4
 
5
5
  /**