@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
@@ -0,0 +1,90 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const observationInputSchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ source: z.ZodString;
6
+ type: z.ZodString;
7
+ member: z.ZodString;
8
+ actor: z.ZodOptional<z.ZodObject<{
9
+ provider: z.ZodString;
10
+ subject: z.ZodString;
11
+ }, z.core.$strict>>;
12
+ occurredAt: z.ZodNumber;
13
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
14
+ }, z.core.$strict>;
15
+ declare const observationSchema: z.ZodObject<{
16
+ id: z.ZodString;
17
+ source: z.ZodString;
18
+ type: z.ZodString;
19
+ member: z.ZodString;
20
+ actor: z.ZodOptional<z.ZodObject<{
21
+ provider: z.ZodString;
22
+ subject: z.ZodString;
23
+ }, z.core.$strict>>;
24
+ occurredAt: z.ZodNumber;
25
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
26
+ receivedAt: z.ZodNumber;
27
+ }, z.core.$strict>;
28
+ type Observation = z.infer<typeof observationSchema>;
29
+ declare const observationTriggerSchema: z.ZodObject<{
30
+ source: z.ZodString;
31
+ type: z.ZodString;
32
+ }, z.core.$strict>;
33
+ declare const completionPolicySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
34
+ kind: z.ZodLiteral<"streak">;
35
+ days: z.ZodNumber;
36
+ }, z.core.$strip>, z.ZodObject<{
37
+ kind: z.ZodLiteral<"once">;
38
+ }, z.core.$strict>, z.ZodObject<{
39
+ kind: z.ZodLiteral<"keyed">;
40
+ }, z.core.$strict>], "kind">;
41
+ declare const completionKeySchema: z.ZodString;
42
+ declare const budgetSchema: z.ZodObject<{
43
+ id: z.ZodString;
44
+ scope: z.ZodEnum<{
45
+ member: "member";
46
+ project: "project";
47
+ }>;
48
+ period: z.ZodEnum<{
49
+ lifetime: "lifetime";
50
+ day: "day";
51
+ week: "week";
52
+ month: "month";
53
+ }>;
54
+ limit: z.ZodNumber;
55
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
56
+ balance: z.ZodString;
57
+ }, z.core.$strict>]>;
58
+ }, z.core.$strict>;
59
+ type Budget = z.infer<typeof budgetSchema>;
60
+ declare const observationReceiptSchema: z.ZodObject<{
61
+ id: z.ZodString;
62
+ source: z.ZodString;
63
+ attempts: z.ZodArray<z.ZodString>;
64
+ receivedAt: z.ZodNumber;
65
+ }, z.core.$strip>;
66
+ declare const discordReactionSchema: z.ZodObject<{
67
+ guildId: z.ZodString;
68
+ channelId: z.ZodString;
69
+ messageId: z.ZodString;
70
+ userId: z.ZodString;
71
+ messageAuthorId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
72
+ actorRoles: z.ZodDefault<z.ZodArray<z.ZodString>>;
73
+ emoji: z.ZodObject<{
74
+ id: z.ZodNullable<z.ZodString>;
75
+ name: z.ZodString;
76
+ }, z.core.$strip>;
77
+ messagePublishedAt: z.ZodNumber;
78
+ }, z.core.$strict>;
79
+ declare const discordMessageSchema: z.ZodObject<{
80
+ guildId: z.ZodString;
81
+ channelId: z.ZodString;
82
+ messageId: z.ZodString;
83
+ userId: z.ZodString;
84
+ content: z.ZodNullable<z.ZodString>;
85
+ replyTo: z.ZodNullable<z.ZodString>;
86
+ publishedAt: z.ZodNumber;
87
+ }, z.core.$strict>;
88
+ type DiscordMessage = z.infer<typeof discordMessageSchema>;
89
+
90
+ export { type Budget as B, type DiscordMessage as D, type Observation as O, completionPolicySchema as a, budgetSchema as b, completionKeySchema as c, discordMessageSchema as d, discordReactionSchema as e, observationReceiptSchema as f, observationSchema as g, observationTriggerSchema as h, observationInputSchema as o };
@@ -0,0 +1,152 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const authScopeSchema: z.ZodObject<{
4
+ organization: z.ZodString;
5
+ project: z.ZodString;
6
+ environment: z.ZodEnum<{
7
+ test: "test";
8
+ live: "live";
9
+ }>;
10
+ }, z.core.$strict>;
11
+ declare const principalSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
12
+ kind: z.ZodLiteral<"member">;
13
+ member: z.ZodString;
14
+ }, z.core.$strip>, z.ZodObject<{
15
+ kind: z.ZodLiteral<"staff">;
16
+ subject: z.ZodString;
17
+ }, z.core.$strip>, z.ZodObject<{
18
+ kind: z.ZodLiteral<"operator">;
19
+ subject: z.ZodString;
20
+ }, z.core.$strip>], "kind">;
21
+ declare const sessionSchema: z.ZodObject<{
22
+ id: z.ZodString;
23
+ principal: z.ZodDiscriminatedUnion<[z.ZodObject<{
24
+ kind: z.ZodLiteral<"member">;
25
+ member: z.ZodString;
26
+ }, z.core.$strip>, z.ZodObject<{
27
+ kind: z.ZodLiteral<"staff">;
28
+ subject: z.ZodString;
29
+ }, z.core.$strip>, z.ZodObject<{
30
+ kind: z.ZodLiteral<"operator">;
31
+ subject: z.ZodString;
32
+ }, z.core.$strip>], "kind">;
33
+ expiresAt: z.ZodNumber;
34
+ organization: z.ZodString;
35
+ project: z.ZodString;
36
+ environment: z.ZodEnum<{
37
+ test: "test";
38
+ live: "live";
39
+ }>;
40
+ }, z.core.$strip>;
41
+ type Session = z.infer<typeof sessionSchema>;
42
+ /**
43
+ * A session's principal as the participant client reads it: a known kind, or `{ kind }` alone for
44
+ * a kind a newer Relay added, so reading the session never fails on it.
45
+ */
46
+ declare const participantPrincipalSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
47
+ kind: z.ZodLiteral<"member">;
48
+ member: z.ZodString;
49
+ }, z.core.$strip>, z.ZodObject<{
50
+ kind: z.ZodLiteral<"staff">;
51
+ subject: z.ZodString;
52
+ }, z.core.$strip>, z.ZodObject<{
53
+ kind: z.ZodLiteral<"operator">;
54
+ subject: z.ZodString;
55
+ }, z.core.$strip>], "kind">, z.ZodObject<{
56
+ kind: z.ZodString;
57
+ }, z.core.$strip>]>;
58
+ type ParticipantPrincipal = z.infer<typeof participantPrincipalSchema>;
59
+ /** The session the participant client returns (`auth.session()`). */
60
+ declare const participantSessionSchema: z.ZodObject<{
61
+ id: z.ZodString;
62
+ principal: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
63
+ kind: z.ZodLiteral<"member">;
64
+ member: z.ZodString;
65
+ }, z.core.$strip>, z.ZodObject<{
66
+ kind: z.ZodLiteral<"staff">;
67
+ subject: z.ZodString;
68
+ }, z.core.$strip>, z.ZodObject<{
69
+ kind: z.ZodLiteral<"operator">;
70
+ subject: z.ZodString;
71
+ }, z.core.$strip>], "kind">, z.ZodObject<{
72
+ kind: z.ZodString;
73
+ }, z.core.$strip>]>;
74
+ expiresAt: z.ZodNumber;
75
+ organization: z.ZodString;
76
+ project: z.ZodString;
77
+ environment: z.ZodEnum<{
78
+ test: "test";
79
+ live: "live";
80
+ }>;
81
+ }, z.core.$strip>;
82
+ type ParticipantSession = z.infer<typeof participantSessionSchema>;
83
+ /** The member a session signs in, or null for a signed-out visitor or another principal kind. */
84
+ declare function sessionMember(session: {
85
+ principal: ParticipantPrincipal;
86
+ } | null | undefined): string | null;
87
+ /**
88
+ * The signed-in member (`GET /v1/me`). `avatarSeed` seeds the member's generated avatar
89
+ * (`defaultAvatar`): an HMAC of the member ID under a per-project secret, so it is stable in the
90
+ * project, whatever the member links, and reveals nothing. Not strict: newer servers may add fields.
91
+ */
92
+ declare const memberSummarySchema: z.ZodObject<{
93
+ member: z.ZodString;
94
+ avatarSeed: z.ZodString;
95
+ }, z.core.$strip>;
96
+ type MemberSummary = z.infer<typeof memberSummarySchema>;
97
+ declare const exchangeSchema: z.ZodObject<{
98
+ organization: z.ZodString;
99
+ project: z.ZodString;
100
+ environment: z.ZodEnum<{
101
+ test: "test";
102
+ live: "live";
103
+ }>;
104
+ identity: z.ZodObject<{
105
+ issuer: z.ZodString;
106
+ subject: z.ZodString;
107
+ }, z.core.$strict>;
108
+ role: z.ZodEnum<{
109
+ member: "member";
110
+ staff: "staff";
111
+ operator: "operator";
112
+ }>;
113
+ }, z.core.$strict>;
114
+ type ExchangeInput = z.infer<typeof exchangeSchema>;
115
+ declare const exchangeResultSchema: z.ZodObject<{
116
+ token: z.ZodString;
117
+ session: z.ZodObject<{
118
+ id: z.ZodString;
119
+ principal: z.ZodDiscriminatedUnion<[z.ZodObject<{
120
+ kind: z.ZodLiteral<"member">;
121
+ member: z.ZodString;
122
+ }, z.core.$strip>, z.ZodObject<{
123
+ kind: z.ZodLiteral<"staff">;
124
+ subject: z.ZodString;
125
+ }, z.core.$strip>, z.ZodObject<{
126
+ kind: z.ZodLiteral<"operator">;
127
+ subject: z.ZodString;
128
+ }, z.core.$strip>], "kind">;
129
+ expiresAt: z.ZodNumber;
130
+ organization: z.ZodString;
131
+ project: z.ZodString;
132
+ environment: z.ZodEnum<{
133
+ test: "test";
134
+ live: "live";
135
+ }>;
136
+ }, z.core.$strip>;
137
+ }, z.core.$strip>;
138
+
139
+ /** A cursor as a client passes it back. */
140
+ declare const pageCursorSchema: z.ZodString;
141
+ /** A query that pages by cursor only. */
142
+ declare const pageQuerySchema: z.ZodObject<{
143
+ cursor: z.ZodOptional<z.ZodString>;
144
+ }, z.core.$strict>;
145
+ type PageQuery = z.input<typeof pageQuerySchema>;
146
+ /** One page of a paged read. */
147
+ type Page<T> = {
148
+ items: T[];
149
+ nextCursor: string | null;
150
+ };
151
+
152
+ export { type ExchangeInput as E, type MemberSummary as M, type Page as P, type Session as S, type PageQuery as a, type ParticipantPrincipal as b, type ParticipantSession as c, authScopeSchema as d, exchangeResultSchema as e, exchangeSchema as f, pageQuerySchema as g, participantPrincipalSchema as h, participantSessionSchema as i, principalSchema as j, sessionSchema as k, memberSummarySchema as m, pageCursorSchema as p, sessionMember as s };
@@ -1,13 +1,14 @@
1
1
  import {
2
2
  isContentParticipantRoute,
3
+ isPointsParticipantRoute,
3
4
  isProfileParticipantRoute,
4
5
  isWalletParticipantRoute,
5
6
  isWalletSignInRoute
6
- } from "./chunk-ZWY3R6B3.js";
7
+ } from "./chunk-6A2V4L3T.js";
7
8
  import {
8
9
  exchangeResultSchema
9
- } from "./chunk-7Q4BGGT6.js";
10
- import "./chunk-YYD4QUBO.js";
10
+ } from "./chunk-FXYJ4OMX.js";
11
+ import "./chunk-CRNQP7NV.js";
11
12
 
12
13
  // src/portal-proxy.ts
13
14
  async function proxyParticipant(request, upstream) {
@@ -17,7 +18,7 @@ async function proxyParticipant(request, upstream) {
17
18
  path
18
19
  ) || /^\/v1\/me\/(progress|experience|attempts|evidence|collection-pass)$/.test(
19
20
  path
20
- ) || isWalletParticipantRoute(path) || isWalletSignInRoute(path) || path === "/v1/me" && request.method === "GET" || /^\/v1\/attempts\/[\w-]+\/retry$/.test(path) || /^\/v1\/referrals(?:\/(me|history))?$/.test(path) && request.method === "GET" || isContentParticipantRoute(path, request.method) || isProfileParticipantRoute(path, request.method) || path === "/v1/reward-deliveries" && request.method === "GET" || path === "/v1/referrals/accept" && request.method === "POST" || request.method === "GET" && /^\/v1\/leaderboards(?:\/[\w-]+)?$/.test(path) || request.method === "GET" && (path === "/v1/point-ledgers" || path === "/v1/tiered-rewards"));
21
+ ) || isWalletParticipantRoute(path) || isWalletSignInRoute(path) || path === "/v1/me" && request.method === "GET" || /^\/v1\/attempts\/[\w-]+\/retry$/.test(path) || /^\/v1\/referrals(?:\/(me|history))?$/.test(path) && request.method === "GET" || isContentParticipantRoute(path, request.method) || isProfileParticipantRoute(path, request.method) || isPointsParticipantRoute(path, request.method) || path === "/v1/reward-deliveries" && request.method === "GET" || path === "/v1/referrals/accept" && request.method === "POST" || request.method === "GET" && /^\/v1\/leaderboards(?:\/[\w-]+)?$/.test(path) || request.method === "GET" && (path === "/v1/point-ledgers" || path === "/v1/tiered-rewards"));
21
22
  if (!allowed || !["GET", "POST"].includes(request.method)) {
22
23
  return Response.json({ error: "Route not found" }, { status: 404 });
23
24
  }
@@ -294,4 +294,4 @@ type ManagedProfile = z.infer<typeof managedProfileSchema>;
294
294
  declare const AVATAR_UPLOAD_LIMIT: number;
295
295
  declare const avatarUploadTypes: string[];
296
296
 
297
- export { type AvatarProvider as A, profileModerationSchema as B, profileReferralSchema as C, profileSettingsInputSchema as D, profileSettingsSchema as E, profileSummarySchema as F, profileVisibilitySchema as G, type ManagedProfile as M, type OwnProfile as O, type ProfileAvatar as P, type ProfileCompletion as a, type ProfileCompletionPage as b, type ProfileCompletionQuery as c, type ProfileReferral as d, type ProfileSummary as e, type ProfileUpdate as f, type ProfileVisibility as g, AVATAR_UPLOAD_LIMIT as h, type ProfileDefaultProvider as i, type ProfileDefaults as j, type ProfileModeration as k, type ProfileSettings as l, type ProfileSettingsInput as m, avatarProviderSchema as n, avatarSeedSchema as o, profileUpdateSchema as p, avatarUploadTypes as q, displayNameSchema as r, managedProfileSchema as s, ownProfileSchema as t, profileAvatarSchema as u, profileCompletionPageSchema as v, profileCompletionQuerySchema as w, profileCompletionSchema as x, profileDefaultProviderSchema as y, profileDefaultsSchema as z };
297
+ export { type AvatarProvider as A, profileReferralSchema as B, profileSettingsInputSchema as C, profileSettingsSchema as D, profileSummarySchema as E, profileUpdateSchema as F, profileVisibilitySchema as G, type ManagedProfile as M, type OwnProfile as O, type ProfileAvatar as P, type ProfileCompletion as a, type ProfileCompletionPage as b, type ProfileCompletionQuery as c, type ProfileReferral as d, type ProfileSummary as e, type ProfileUpdate as f, type ProfileVisibility as g, AVATAR_UPLOAD_LIMIT as h, type ProfileDefaultProvider as i, type ProfileDefaults as j, type ProfileModeration as k, type ProfileSettings as l, type ProfileSettingsInput as m, avatarProviderSchema as n, avatarSeedSchema as o, avatarUploadTypes as p, displayNameSchema as q, managedProfileSchema as r, ownProfileSchema as s, profileAvatarSchema as t, profileCompletionPageSchema as u, profileCompletionQuerySchema as v, profileCompletionSchema as w, profileDefaultProviderSchema as x, profileDefaultsSchema as y, profileModerationSchema as z };
@@ -1,16 +1,18 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { i as referralAcceptSchema, d as LeaderboardQuery, a as AuthProvider, j as engagementPageQuerySchema, k as contentQualificationQuerySchema, m as contentAdmissionQuerySchema, n as contentEnrollmentInputSchema, o as contentReleaseInputSchema, A as AccountConnection, aq as referralSummarySchema, b as LeaderboardPage } from '../submission-input-0OOGaq8c.js';
4
- import { s as submitSchema, g as contentPerformanceQuerySchema, T as TieredRewardReference } from '../schema-Di3aLSiK.js';
5
- import { a as PageQuery, e as QuestView, q as questExperienceSchema, f as exchangeSchema } from '../pages-D3titw5B.js';
6
- import { w as walletAddressInputSchema, l as walletSignatureSchema, L as LinkedWallet, f as WalletSigner, d as WalletSignInNetwork } from '../wallet-BGOfFkG9.js';
7
- import { p as profileUpdateSchema, c as ProfileCompletionQuery, a as ProfileCompletion, e as ProfileSummary, f as ProfileUpdate } from '../profiles-DDMFBRKe.js';
3
+ import { a6 as referralAcceptSchema, c as LeaderboardQuery, G as engagementPageQuerySchema, s as contentQualificationQuerySchema, i as contentAdmissionQuerySchema, k as contentEnrollmentInputSchema, u as contentReleaseInputSchema, af as referralSummarySchema, a as LeaderboardPage } from '../referrals-KQfP4pBf.js';
4
+ import { ao as submitSchema, x as contentPerformanceQuerySchema, T as TieredRewardReference } from '../schema-BF_TQsmT.js';
5
+ import { a as PageQuery, f as exchangeSchema } from '../pages-KYK1L60W.js';
6
+ import { x as walletAddressInputSchema, M as walletSignatureSchema, L as LinkedWallet, f as WalletSigner, d as WalletSignInNetwork } from '../wallet-BtiG0Xhr.js';
7
+ import { h as QuestView, J as questExperienceSchema, e as PointHistoryQuery, c as PointEntryKind, P as PointBalance, b as PointEntry, f as PointLedgerReference } from '../catalog-C85V1NgW.js';
8
+ import { F as profileUpdateSchema, c as ProfileCompletionQuery, a as ProfileCompletion, e as ProfileSummary, f as ProfileUpdate } from '../profiles-BtOXMGcC.js';
8
9
  import * as zod from 'zod';
9
10
  import { z } from 'zod';
10
- import { k as RelayRequestOptions, c as QuestController, a as ProgressObservation, b as ProgressObserver, P as PhotoSubmission, e as QuizSubmission, C as ClaimSubmission, V as ValueSubmission, S as SubmissionDraft } from '../client-CT4-S5vc.js';
11
+ import { k as RelayRequestOptions, c as QuestController, a as ProgressObservation, b as ProgressObserver, P as PhotoSubmission, e as QuizSubmission, C as ClaimSubmission, V as ValueSubmission, S as SubmissionDraft } from '../client-Bf9PNUIi.js';
12
+ import { a as AuthProvider, A as AccountConnection } from '../submission-input-CccwAl5Z.js';
11
13
  import { createBrowserRelayClient, SignInMethods, CosmosChains, SignInOption, SignInUnavailable, SignInWallet, DiscoveredWallet } from '../browser.js';
12
14
  export { EmailSignInOption, OAuthSignInOption, SignInIcon, WalletSignInOption } from '../browser.js';
13
- import { P as PointLedgerReference } from '../point-ledgers-iS00Z_v0.js';
15
+ import '../request-error-VnTiMXc3.js';
14
16
 
15
17
  type RelayClient = ReturnType<typeof createBrowserRelayClient>;
16
18
  /** The participant client, for calls no hook covers. */
@@ -277,7 +279,6 @@ declare function useRelay(): {
277
279
  } | {
278
280
  kind: "calendar";
279
281
  period: "day" | "week" | "month";
280
- timeZone: string;
281
282
  };
282
283
  kind: "earned";
283
284
  quests?: string[] | undefined;
@@ -295,7 +296,6 @@ declare function useRelay(): {
295
296
  } | {
296
297
  kind: "calendar";
297
298
  period: "day" | "week" | "month";
298
- timeZone: string;
299
299
  };
300
300
  };
301
301
  access: "participants" | "public";
@@ -662,7 +662,6 @@ declare function useRelay(): {
662
662
  completion: {
663
663
  kind: "streak";
664
664
  days: number;
665
- timeZone: string;
666
665
  } | {
667
666
  kind: "once";
668
667
  } | {
@@ -977,7 +976,6 @@ declare function useRelay(): {
977
976
  completion: {
978
977
  kind: "streak";
979
978
  days: number;
980
- timeZone: string;
981
979
  } | {
982
980
  kind: "once";
983
981
  } | {
@@ -1239,7 +1237,6 @@ declare function useRelay(): {
1239
1237
  completion: {
1240
1238
  kind: "streak";
1241
1239
  days: number;
1242
- timeZone: string;
1243
1240
  } | {
1244
1241
  kind: "once";
1245
1242
  } | {
@@ -1504,7 +1501,6 @@ declare function useRelay(): {
1504
1501
  completion: {
1505
1502
  kind: "streak";
1506
1503
  days: number;
1507
- timeZone: string;
1508
1504
  } | {
1509
1505
  kind: "once";
1510
1506
  } | {
@@ -1988,7 +1984,6 @@ declare function useRelay(): {
1988
1984
  completion: {
1989
1985
  kind: "streak";
1990
1986
  days: number;
1991
- timeZone: string;
1992
1987
  } | {
1993
1988
  kind: "once";
1994
1989
  } | {
@@ -2182,6 +2177,28 @@ declare function useRelay(): {
2182
2177
  deliveredAt: number | null;
2183
2178
  }[];
2184
2179
  }>;
2180
+ balances: (requestOptions?: RelayRequestOptions) => Promise<{
2181
+ items: {
2182
+ ledger: {
2183
+ id: string;
2184
+ key: string | null;
2185
+ name: string;
2186
+ };
2187
+ balance: number;
2188
+ available: number;
2189
+ }[];
2190
+ }>;
2191
+ pointHistory: (query: PointHistoryQuery, requestOptions?: RelayRequestOptions) => Promise<{
2192
+ items: {
2193
+ id: string;
2194
+ amount: number;
2195
+ kind: PointEntryKind;
2196
+ at: number;
2197
+ quest: string | null;
2198
+ reverses: string | null;
2199
+ }[];
2200
+ nextCursor: string | null;
2201
+ }>;
2185
2202
  claim: (value: Omit<zod.input<typeof submitSchema>, "member">, requestOptions?: RelayRequestOptions) => Promise<{
2186
2203
  id: string;
2187
2204
  release: string;
@@ -2257,11 +2274,11 @@ declare function useRelay(): {
2257
2274
  metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
2258
2275
  baseline: "historical";
2259
2276
  maxAgeMs: number;
2260
- budget: {
2261
- projectDaily?: number | undefined;
2262
- memberDaily?: number | undefined;
2263
- projectLifetime?: number | undefined;
2264
- };
2277
+ budgets: {
2278
+ scope: "member" | "project";
2279
+ period: "lifetime" | "day" | "week" | "month";
2280
+ limit: number;
2281
+ }[];
2265
2282
  };
2266
2283
  publishedAt: number;
2267
2284
  };
@@ -2302,11 +2319,11 @@ declare function useRelay(): {
2302
2319
  metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
2303
2320
  baseline: "historical";
2304
2321
  maxAgeMs: number;
2305
- budget: {
2306
- projectDaily?: number | undefined;
2307
- memberDaily?: number | undefined;
2308
- projectLifetime?: number | undefined;
2309
- };
2322
+ budgets: {
2323
+ scope: "member" | "project";
2324
+ period: "lifetime" | "day" | "week" | "month";
2325
+ limit: number;
2326
+ }[];
2310
2327
  };
2311
2328
  publishedAt: number;
2312
2329
  } | null;
@@ -2319,11 +2336,11 @@ declare function useRelay(): {
2319
2336
  metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
2320
2337
  baseline: "historical";
2321
2338
  maxAgeMs: number;
2322
- budget: {
2323
- projectDaily?: number | undefined;
2324
- memberDaily?: number | undefined;
2325
- projectLifetime?: number | undefined;
2326
- };
2339
+ budgets: {
2340
+ scope: "member" | "project";
2341
+ period: "lifetime" | "day" | "week" | "month";
2342
+ limit: number;
2343
+ }[];
2327
2344
  };
2328
2345
  publishedAt: number;
2329
2346
  };
@@ -2679,7 +2696,6 @@ declare function useQuest(observed: QuestView): {
2679
2696
  completion: {
2680
2697
  kind: "streak";
2681
2698
  days: number;
2682
- timeZone: string;
2683
2699
  } | {
2684
2700
  kind: "once";
2685
2701
  } | {
@@ -3440,6 +3456,109 @@ declare function useLeaderboard(board: string, options?: {
3440
3456
  stale: string | null;
3441
3457
  };
3442
3458
 
3459
+ type BalancesState = {
3460
+ status: "loading";
3461
+ } | {
3462
+ status: "signed-out";
3463
+ } | {
3464
+ status: "error";
3465
+ message: string;
3466
+ } | {
3467
+ status: "ready";
3468
+ items: PointBalance[];
3469
+ stale: string | null;
3470
+ };
3471
+ type PointHistoryState = {
3472
+ status: "loading";
3473
+ } | {
3474
+ status: "signed-out";
3475
+ }
3476
+ /** No ledger has this key or ID in the project (`point-ledger-not-found`). */
3477
+ | {
3478
+ status: "missing";
3479
+ }
3480
+ /** The member has not joined this project, so it has no points here (`not-joined`). */
3481
+ | {
3482
+ status: "not-joined";
3483
+ } | {
3484
+ status: "error";
3485
+ message: string;
3486
+ } | {
3487
+ status: "ready";
3488
+ items: PointEntry[];
3489
+ /** Whether `loadMore()` has another page to read. */
3490
+ more: boolean;
3491
+ /** A next page is loading. */
3492
+ loading: boolean;
3493
+ /** Why the last next page failed; the items read so far stay. */
3494
+ error: string | null;
3495
+ };
3496
+ /**
3497
+ * The signed-in participant's balance in each of the project's point ledgers: `balance` counts
3498
+ * every entry, `available` leaves out points reservations hold. Read again when the participant
3499
+ * signs in or out and after a quest completes. Find a ledger by the key your app declared:
3500
+ * `items.find((b) => b.ledger.key === "points")`.
3501
+ */
3502
+ declare function useBalances(): {
3503
+ refresh: () => Promise<void>;
3504
+ status: "loading";
3505
+ } | {
3506
+ refresh: () => Promise<void>;
3507
+ status: "signed-out";
3508
+ } | {
3509
+ refresh: () => Promise<void>;
3510
+ status: "error";
3511
+ message: string;
3512
+ } | {
3513
+ refresh: () => Promise<void>;
3514
+ status: "ready";
3515
+ items: PointBalance[];
3516
+ stale: string | null;
3517
+ };
3518
+ /**
3519
+ * The signed-in participant's own entries in one ledger, by key or ID, most recently recorded first, a page at a
3520
+ * time. Starts over when the participant signs in or out and after a quest completes.
3521
+ */
3522
+ declare function usePointHistory(ledger: string): {
3523
+ refresh: () => Promise<void>;
3524
+ /** Appends the next page; does nothing while a page loads or when there is none. */
3525
+ loadMore: () => Promise<void>;
3526
+ status: "loading";
3527
+ } | {
3528
+ refresh: () => Promise<void>;
3529
+ /** Appends the next page; does nothing while a page loads or when there is none. */
3530
+ loadMore: () => Promise<void>;
3531
+ status: "signed-out";
3532
+ } | {
3533
+ refresh: () => Promise<void>;
3534
+ /** Appends the next page; does nothing while a page loads or when there is none. */
3535
+ loadMore: () => Promise<void>;
3536
+ status: "missing";
3537
+ } | {
3538
+ refresh: () => Promise<void>;
3539
+ /** Appends the next page; does nothing while a page loads or when there is none. */
3540
+ loadMore: () => Promise<void>;
3541
+ status: "not-joined";
3542
+ } | {
3543
+ refresh: () => Promise<void>;
3544
+ /** Appends the next page; does nothing while a page loads or when there is none. */
3545
+ loadMore: () => Promise<void>;
3546
+ status: "error";
3547
+ message: string;
3548
+ } | {
3549
+ refresh: () => Promise<void>;
3550
+ /** Appends the next page; does nothing while a page loads or when there is none. */
3551
+ loadMore: () => Promise<void>;
3552
+ status: "ready";
3553
+ items: PointEntry[];
3554
+ /** Whether `loadMore()` has another page to read. */
3555
+ more: boolean;
3556
+ /** A next page is loading. */
3557
+ loading: boolean;
3558
+ /** Why the last next page failed; the items read so far stay. */
3559
+ error: string | null;
3560
+ };
3561
+
3443
3562
  type ReferencesState<T> = {
3444
3563
  status: "loading";
3445
3564
  } | {
@@ -3497,4 +3616,4 @@ declare function useTieredRewards(): {
3497
3616
  }[];
3498
3617
  };
3499
3618
 
3500
- export { type Collection, CosmosChains, DiscoveredWallet, type Experience, type Invitation, type LeaderboardState, type OAuthProvider, PENDING_POLL_MS, PROFILE_CHANGED, type PointLedgersState, type ProfileCompletionsState, type ProfileReadState, type ProfileState, type QuestInput, type QuestNotice, type QuestStatus, type QuestTone, RETRY_DELAYS_MS, type ReferencesState, type ReferralSummary, type RelayClient, RelayProvider, type RoleDelivery, type SavedSubmission, SignInMethods, SignInOption, SignInUnavailable, SignInWallet, type TieredRewardsState, canRepeat, canSubmit, captureReferralCode, completionCountLabel, completionMark, hasPending, isAutomatic, isConnected, isFinished, progressOf, questGroups, questStatus, roleDeliveryLabel, runsSilently, sanitizeDeliveries, useAccounts, useExperience, useInvitation, useLeaderboard, useLeaderboardPlacement, useMe, useMyProfile, usePointLedgers, useProfile, useProfileCompletions, useProfileReferral, useQuest, useReferralSummary, useRelay, useSignIn, useSignInMethods, useSignInOptions, useSignInWallets, useSignOut, useTieredRewards, useWalletDiscovery, useWallets, visibleQuests, watchRoleDeliveries };
3619
+ export { type BalancesState, type Collection, CosmosChains, DiscoveredWallet, type Experience, type Invitation, type LeaderboardState, type OAuthProvider, PENDING_POLL_MS, PROFILE_CHANGED, type PointHistoryState, type PointLedgersState, type ProfileCompletionsState, type ProfileReadState, type ProfileState, type QuestInput, type QuestNotice, type QuestStatus, type QuestTone, RETRY_DELAYS_MS, type ReferencesState, type ReferralSummary, type RelayClient, RelayProvider, type RoleDelivery, type SavedSubmission, SignInMethods, SignInOption, SignInUnavailable, SignInWallet, type TieredRewardsState, canRepeat, canSubmit, captureReferralCode, completionCountLabel, completionMark, hasPending, isAutomatic, isConnected, isFinished, progressOf, questGroups, questStatus, roleDeliveryLabel, runsSilently, sanitizeDeliveries, useAccounts, useBalances, useExperience, useInvitation, useLeaderboard, useLeaderboardPlacement, useMe, useMyProfile, usePointHistory, usePointLedgers, useProfile, useProfileCompletions, useProfileReferral, useQuest, useReferralSummary, useRelay, useSignIn, useSignInMethods, useSignInOptions, useSignInWallets, useSignOut, useTieredRewards, useWalletDiscovery, useWallets, visibleQuests, watchRoleDeliveries };