@domino-sdk/relay 1.5.2 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/{activity-DeKJsRry.d.ts → activity-Br6vyYze.d.ts} +147 -116
  2. package/dist/authoring.d.ts +59 -47
  3. package/dist/authoring.js +3 -3
  4. package/dist/{automatic-outcomes-B1xrETxm.d.ts → automatic-outcomes-C1Q9LrDb.d.ts} +224 -13
  5. package/dist/browser.d.ts +22 -10
  6. package/dist/browser.js +6 -6
  7. package/dist/{capability-error-DNMwKmlL.d.ts → capability-error-Bv996M-h.d.ts} +2 -0
  8. package/dist/{chunk-GQKYAQM6.js → chunk-23QJ7WH4.js} +1 -1
  9. package/dist/{chunk-WJSSJ7AF.js → chunk-5ECM6AWV.js} +24 -4
  10. package/dist/{chunk-XFMSUPNS.js → chunk-6ON4RMEN.js} +1 -1
  11. package/dist/{chunk-VFHHLN6A.js → chunk-6RBF3UDA.js} +49 -6
  12. package/dist/chunk-AXRMT33W.js +112 -0
  13. package/dist/{chunk-24AFCBZN.js → chunk-BFZHJA2B.js} +2 -2
  14. package/dist/{chunk-EYH5RDIE.js → chunk-C25TDFHN.js} +4 -2
  15. package/dist/{chunk-36HTX2BM.js → chunk-GMPPLZKH.js} +61 -4
  16. package/dist/{chunk-BGGKNIRP.js → chunk-JW4G3SY5.js} +1 -1
  17. package/dist/{chunk-JON5SESL.js → chunk-KGJSKGKI.js} +84 -6
  18. package/dist/{chunk-DGWMLN35.js → chunk-ZOUEEK5L.js} +16 -5
  19. package/dist/{client-gqnRUHpC.d.ts → client-pfml_XAa.d.ts} +88 -41
  20. package/dist/{groups-Ck-OxzjD.d.ts → groups-BpWEqaPn.d.ts} +175 -3
  21. package/dist/{images-Dv-P5VBw.d.ts → images-BaKYd0fl.d.ts} +1 -1
  22. package/dist/index.d.ts +9 -9
  23. package/dist/index.js +5 -5
  24. package/dist/internal.d.ts +6 -113
  25. package/dist/internal.js +18 -24
  26. package/dist/{offers-Cy-e4o5x.d.ts → offers-CYtal8jO.d.ts} +3 -2
  27. package/dist/{outcomes-kVB-Juzs.d.ts → pages-CixTNnF4.d.ts} +142 -99
  28. package/dist/{pages-BBYD21IE.d.ts → participant-activity-DkL3nY5a.d.ts} +1 -14
  29. package/dist/portal-proxy.js +48 -36
  30. package/dist/react/index.d.ts +25 -3949
  31. package/dist/react/index.js +8 -7
  32. package/dist/referral-reward-kinds-ClxAuCGx.d.ts +171 -0
  33. package/dist/{request-error-DWduJCGV.d.ts → request-error-D_dUPLwo.d.ts} +5 -0
  34. package/dist/{schema-DfJzH2ci.d.ts → schema-CQydLqw4.d.ts} +122 -37
  35. package/dist/schema.d.ts +10 -10
  36. package/dist/schema.js +48 -6
  37. package/dist/server/index.d.ts +9673 -66110
  38. package/dist/server/index.js +1048 -550
  39. package/dist/sign-in-options-CtXUFV7E.d.ts +202 -0
  40. package/dist/{submission-input-BZkm6ohU.d.ts → submission-input-CLefHTrj.d.ts} +2 -2
  41. package/package.json +1 -1
  42. package/dist/browser-D_3s8B5e.d.ts +0 -4154
  43. package/dist/chunk-GUP7YRR4.js +0 -42
  44. package/dist/identity-integration-GxAHdKR2.d.ts +0 -58
package/dist/browser.js CHANGED
@@ -11,14 +11,14 @@ import {
11
11
  signInOptions,
12
12
  solanaSigner,
13
13
  walletStandardSolanaSigner
14
- } from "./chunk-24AFCBZN.js";
15
- import "./chunk-DGWMLN35.js";
16
- import "./chunk-EYH5RDIE.js";
17
- import "./chunk-36HTX2BM.js";
14
+ } from "./chunk-BFZHJA2B.js";
15
+ import "./chunk-ZOUEEK5L.js";
16
+ import "./chunk-C25TDFHN.js";
17
+ import "./chunk-GMPPLZKH.js";
18
18
  import "./chunk-6QJ3LADK.js";
19
19
  import "./chunk-NPGENI7K.js";
20
- import "./chunk-XFMSUPNS.js";
21
- import "./chunk-JON5SESL.js";
20
+ import "./chunk-6ON4RMEN.js";
21
+ import "./chunk-KGJSKGKI.js";
22
22
  export {
23
23
  browserSubmissionStore,
24
24
  cosmosChainList,
@@ -45,6 +45,7 @@ declare const resourceOptionsSchema: z.ZodObject<{
45
45
  group: z.ZodOptional<z.ZodString>;
46
46
  disabledReason: z.ZodOptional<z.ZodString>;
47
47
  }, z.core.$strip>>;
48
+ nextCursor: z.ZodDefault<z.ZodNullable<z.ZodString>>;
48
49
  cursor: z.ZodNullable<z.ZodString>;
49
50
  }, z.core.$strip>;
50
51
  type ResourceOption = z.infer<typeof resourceOptionsSchema>["options"][number];
@@ -403,6 +404,7 @@ type ProjectIntegration = z.infer<typeof projectIntegrationSchema>;
403
404
  * Later versions can add codes. Treat an unknown code as a failure its `message` explains.
404
405
  */
405
406
  declare const capabilityErrorCodes: readonly ["not-linked", "provider-unavailable", "author-error"];
407
+ /** @compat open */
406
408
  type KnownCapabilityErrorCode = (typeof capabilityErrorCodes)[number];
407
409
  /** A known code, or one a newer Relay added. */
408
410
  type CapabilityErrorCode = KnownCapabilityErrorCode | (string & {});
@@ -5,7 +5,7 @@ import {
5
5
  isKnownTrackerSource,
6
6
  trackerDataSchema,
7
7
  xAccountRoles
8
- } from "./chunk-JON5SESL.js";
8
+ } from "./chunk-KGJSKGKI.js";
9
9
 
10
10
  // src/quest-shape.ts
11
11
  function validateQuestShape(description, options = {}) {
@@ -4,15 +4,15 @@ import {
4
4
  imageFieldsSchema,
5
5
  imageInspectionSchema,
6
6
  imageSightingsSchema
7
- } from "./chunk-BGGKNIRP.js";
7
+ } from "./chunk-JW4G3SY5.js";
8
8
  import {
9
9
  authScopeSchema
10
- } from "./chunk-XFMSUPNS.js";
10
+ } from "./chunk-6ON4RMEN.js";
11
11
  import {
12
12
  appIdentityKindSchema,
13
13
  openIdentityKindSchema,
14
14
  photoResultSchema
15
- } from "./chunk-JON5SESL.js";
15
+ } from "./chunk-KGJSKGKI.js";
16
16
 
17
17
  // src/configuration.ts
18
18
  function questConfiguration(release) {
@@ -138,6 +138,24 @@ function parseImageResult(request, value) {
138
138
  import { z as z3 } from "zod";
139
139
  var sequenceCursorSchema = z3.string().regex(/^[1-9][0-9]{0,15}$/, "Invalid cursor").transform(Number).pipe(z3.number().int().positive().safe());
140
140
 
141
+ // src/referral-reward-kinds.ts
142
+ var REFERRAL_INTEGRATION_REWARD_ERROR = "Referral programs can grant points and tiered rewards; Discord roles need a quest";
143
+ var isRecord = (value) => typeof value === "object" && value !== null;
144
+ function containsReferralIntegrationReward(value) {
145
+ if (Array.isArray(value)) {
146
+ return value.some(
147
+ (reward) => isRecord(reward) && reward.kind === "integration"
148
+ );
149
+ }
150
+ if (!isRecord(value)) {
151
+ return false;
152
+ }
153
+ const definition = isRecord(value.definition) ? value.definition : value;
154
+ return isRecord(definition.rewards) && (containsReferralIntegrationReward(definition.rewards.inviter) || containsReferralIntegrationReward(definition.rewards.invitee)) || Array.isArray(definition.milestones) && definition.milestones.some(
155
+ (milestone) => isRecord(milestone) && containsReferralIntegrationReward(milestone.rewards)
156
+ );
157
+ }
158
+
141
159
  export {
142
160
  questConfiguration,
143
161
  identityIntegrationInputSchema,
@@ -147,5 +165,7 @@ export {
147
165
  participantExchangeSchema,
148
166
  parseImageExtraction,
149
167
  parseImageResult,
150
- sequenceCursorSchema
168
+ sequenceCursorSchema,
169
+ REFERRAL_INTEGRATION_REWARD_ERROR,
170
+ containsReferralIntegrationReward
151
171
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  identifier
3
- } from "./chunk-JON5SESL.js";
3
+ } from "./chunk-KGJSKGKI.js";
4
4
 
5
5
  // src/auth.ts
6
6
  import { z } from "zod";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  imageAssetArtifactSchema,
3
3
  publishedImageSchema
4
- } from "./chunk-BGGKNIRP.js";
4
+ } from "./chunk-JW4G3SY5.js";
5
5
  import {
6
6
  catalogDeploymentSchema,
7
7
  interactionSchema,
8
8
  questCollectionSchema,
9
9
  questTypeVersionSchema
10
- } from "./chunk-EYH5RDIE.js";
10
+ } from "./chunk-C25TDFHN.js";
11
11
  import {
12
12
  engagementArtifactSchema,
13
13
  engagementDeploymentEntrySchema,
@@ -19,8 +19,9 @@ import {
19
19
  pointLedgerSchema,
20
20
  publishedReferralSchema,
21
21
  referralArtifactSchema
22
- } from "./chunk-36HTX2BM.js";
22
+ } from "./chunk-GMPPLZKH.js";
23
23
  import {
24
+ attemptSchema,
24
25
  identifier,
25
26
  pageCursorSchema,
26
27
  projectCalendarDeclarationSchema,
@@ -31,7 +32,7 @@ import {
31
32
  rewardSchema,
32
33
  timeZoneNameSchema,
33
34
  trackerArtifactSchema
34
- } from "./chunk-JON5SESL.js";
35
+ } from "./chunk-KGJSKGKI.js";
35
36
 
36
37
  // src/deployments.ts
37
38
  import { z } from "zod";
@@ -126,6 +127,10 @@ var rejectDeploymentSchema = z.object({
126
127
  id: identifier,
127
128
  reason: z.string().trim().min(1).max(1e3)
128
129
  }).strict();
130
+ var deploymentRejectionSchema = rejectDeploymentSchema.omit({
131
+ id: true
132
+ });
133
+ var deploymentActionSchema = z.object({ actionId: z.string().uuid() }).strict();
129
134
  var repeatableDeploymentSchema = z.object({ actionId: z.string().uuid(), id: identifier }).strict();
130
135
  var promoteDeploymentSchema = repeatableDeploymentSchema;
131
136
  var rollbackDeploymentSchema = repeatableDeploymentSchema;
@@ -168,7 +173,13 @@ var automaticEventResponseSchema = z3.union([
168
173
  kind: z3.string().refine((kind) => !knownEventKinds.has(kind))
169
174
  }).catchall(z3.json())
170
175
  ]);
171
- var automaticOutcomeSchema = z3.object({
176
+ var automaticLinkedAttemptSchema = z3.object({
177
+ id: identifier,
178
+ status: attemptSchema.shape.status,
179
+ /** Open code for the linked attempt. Consumers must tolerate new values. */
180
+ code: z3.string().nullable()
181
+ });
182
+ var automaticOutcomeFields = {
172
183
  id: identifier,
173
184
  quest: identifier,
174
185
  member: identifier,
@@ -177,11 +188,39 @@ var automaticOutcomeSchema = z3.object({
177
188
  state: z3.enum(["admitted", "skipped"]),
178
189
  code: z3.string().nullable(),
179
190
  reason: z3.string().nullable(),
180
- attempt: identifier.nullable(),
191
+ /** Which window refused admission when `code` is `outside-window`. */
192
+ window: z3.enum(["tracker", "quest"]).optional(),
181
193
  revision: z3.number().int().nonnegative(),
182
194
  createdAt: z3.number().int().safe(),
183
195
  updatedAt: z3.number().int().safe()
196
+ };
197
+ var automaticOutcomeWithoutAttemptSchema = z3.object({
198
+ ...automaticOutcomeFields,
199
+ /** @deprecated Use `linkedAttempt` instead. Removed in 2.0.0. */
200
+ attempt: z3.null(),
201
+ /** Current linked attempt. Optional so responses from older Relay versions remain readable. */
202
+ linkedAttempt: z3.null().optional()
184
203
  });
204
+ var automaticOutcomeWithAttemptSchema = z3.object({
205
+ ...automaticOutcomeFields,
206
+ /** @deprecated Use `linkedAttempt` instead. Removed in 2.0.0. */
207
+ attempt: identifier,
208
+ /** Current linked attempt. Optional so responses from older Relay versions remain readable. */
209
+ linkedAttempt: automaticLinkedAttemptSchema.nullable().optional()
210
+ }).superRefine((outcome, context) => {
211
+ if (outcome.linkedAttempt !== null && outcome.linkedAttempt !== void 0 && outcome.linkedAttempt.id !== outcome.attempt) {
212
+ context.addIssue({
213
+ code: "custom",
214
+ path: ["linkedAttempt", "id"],
215
+ message: "Linked attempt ID must match the legacy attempt ID"
216
+ });
217
+ }
218
+ });
219
+ var automaticOutcomeSchema = z3.union([
220
+ automaticOutcomeWithoutAttemptSchema,
221
+ automaticOutcomeWithAttemptSchema
222
+ ]);
223
+ var isRetryableAutomaticOutcome = (outcome) => outcome.linkedAttempt?.status === "rejected" && outcome.linkedAttempt.code === "budget-exhausted";
185
224
  var automaticOutcomeQuerySchema = z3.strictObject({
186
225
  quest: identifier.optional(),
187
226
  member: identifier.optional(),
@@ -206,6 +245,7 @@ var automaticCatchUpPreviewSchema = z3.object({
206
245
  outcome: automaticOutcomeSchema,
207
246
  code: z3.string().nullable(),
208
247
  reason: z3.string().nullable(),
248
+ window: z3.enum(["tracker", "quest"]).optional(),
209
249
  attempt: identifier.nullable(),
210
250
  wouldAdmit: z3.boolean(),
211
251
  budgets: z3.array(questBudgetViewSchema)
@@ -265,12 +305,15 @@ export {
265
305
  deploymentRecordSchema,
266
306
  submitDeploymentSchema,
267
307
  rejectDeploymentSchema,
308
+ deploymentRejectionSchema,
309
+ deploymentActionSchema,
268
310
  promoteDeploymentSchema,
269
311
  rollbackDeploymentSchema,
270
312
  activityTypes,
271
313
  activityTypeSchema,
272
314
  automaticEventSchema,
273
315
  automaticOutcomeSchema,
316
+ isRetryableAutomaticOutcome,
274
317
  automaticOutcomeQuerySchema,
275
318
  automaticOutcomePageSchema,
276
319
  automaticCatchUpInputSchema,
@@ -0,0 +1,112 @@
1
+ // src/participant-routes.ts
2
+ var id = "{[\\w-]+}";
3
+ var participantRoutes = [
4
+ // Sign-in, the session and connected accounts. Integrations reach /v1/auth/start in connect
5
+ // mode only (Relay checks the mode).
6
+ { method: "GET", path: "/v1/auth/providers", hostedOnly: true },
7
+ { method: "POST", path: "/v1/auth/start" },
8
+ { method: "GET", path: "/v1/auth/authorize", hostedOnly: true },
9
+ {
10
+ method: "GET",
11
+ path: "/v1/auth/callback/:provider{[a-z][a-z0-9-]*}",
12
+ hostedOnly: true
13
+ },
14
+ { method: "GET", path: "/v1/auth/complete" },
15
+ { method: "POST", path: "/v1/auth/email/start", hostedOnly: true },
16
+ { method: "POST", path: "/v1/auth/email/verify", hostedOnly: true },
17
+ { method: "POST", path: "/v1/auth/wallet/start", hostedOnly: true },
18
+ { method: "POST", path: "/v1/auth/wallet/verify", hostedOnly: true },
19
+ { method: "GET", path: "/v1/auth/session" },
20
+ { method: "POST", path: "/v1/auth/logout" },
21
+ { method: "GET", path: "/v1/auth/accounts" },
22
+ { method: "POST", path: "/v1/auth/accounts/disconnect" },
23
+ // The signed-in member: progress, submissions, rewards, points, activity and linked wallets.
24
+ { method: "GET", path: "/v1/me" },
25
+ { method: "GET", path: "/v1/me/progress" },
26
+ { method: "GET", path: "/v1/me/experience" },
27
+ { method: "POST", path: "/v1/me/attempts" },
28
+ { method: "POST", path: `/v1/attempts/:attempt${id}/retry` },
29
+ { method: "POST", path: "/v1/me/evidence" },
30
+ { method: "POST", path: "/v1/me/collection-pass" },
31
+ { method: "GET", path: "/v1/me/entitlements" },
32
+ { method: "GET", path: "/v1/me/deliveries" },
33
+ { method: "GET", path: "/v1/me/points" },
34
+ { method: "GET", path: `/v1/me/points/:ledger${id}/history` },
35
+ { method: "GET", path: "/v1/me/activity" },
36
+ { method: "GET", path: "/v1/me/wallets" },
37
+ { method: "POST", path: "/v1/me/wallets/challenge" },
38
+ { method: "POST", path: "/v1/me/wallets/verify" },
39
+ { method: "POST", path: "/v1/me/wallets/unlink" },
40
+ // Profiles: the member's own, and the reads keyed by a public profile ID.
41
+ { method: "GET", path: "/v1/me/profile" },
42
+ { method: "POST", path: "/v1/me/profile" },
43
+ { method: "POST", path: "/v1/me/profile/avatar" },
44
+ { method: "GET", path: `/v1/profiles/:profile${id}` },
45
+ { method: "GET", path: `/v1/profiles/:profile${id}/completions` },
46
+ {
47
+ method: "GET",
48
+ path: `/v1/profiles/:profile${id}/referrals/:program${id}`
49
+ },
50
+ {
51
+ method: "GET",
52
+ path: `/v1/leaderboards/:board${id}/profiles/:profile${id}`
53
+ },
54
+ // Quest and campaign enrollment, automatic-quest outcomes and historical claims.
55
+ { method: "POST", path: "/v1/quests/enrollments" },
56
+ { method: "POST", path: "/v1/quests/claims" },
57
+ { method: "GET", path: "/v1/quests/outcomes" },
58
+ { method: "POST", path: "/v1/campaigns/enrollments" },
59
+ { method: "POST", path: "/v1/campaigns/enrollments/withdraw" },
60
+ // Content stages and engagement.
61
+ { method: "GET", path: "/v1/content/qualifications" },
62
+ { method: "GET", path: "/v1/content/performance" },
63
+ { method: "GET", path: "/v1/engagement/history" },
64
+ { method: "GET", path: "/v1/engagement/boundaries" },
65
+ // Referrals, offers, reward deliveries, leaderboards and the project's reference lists.
66
+ { method: "GET", path: "/v1/referrals" },
67
+ { method: "GET", path: "/v1/referrals/me" },
68
+ { method: "GET", path: "/v1/referrals/history" },
69
+ { method: "POST", path: "/v1/referrals/accept" },
70
+ { method: "GET", path: "/v1/offers" },
71
+ { method: "POST", path: `/v1/offers/:offer${id}/redeem` },
72
+ { method: "GET", path: "/v1/reward-deliveries" },
73
+ { method: "GET", path: "/v1/leaderboards" },
74
+ { method: "GET", path: `/v1/leaderboards/:board${id}` },
75
+ { method: "GET", path: "/v1/point-ledgers" },
76
+ { method: "GET", path: "/v1/tiered-rewards" }
77
+ ];
78
+ function participantRoutePattern(path) {
79
+ const parts = path.split(/:\w+\{([^}]+)\}/);
80
+ const source = parts.map((part, index) => {
81
+ if (index % 2 === 0) {
82
+ if (/[:{}]/.test(part)) {
83
+ throw new Error(`${path}: write each parameter as :name{pattern}`);
84
+ }
85
+ return part.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
86
+ }
87
+ if (part.includes("/") || new RegExp(`^(?:${part})$`).test("/")) {
88
+ throw new Error(`${path}: a parameter pattern cannot match "/"`);
89
+ }
90
+ return `(?:${part})`;
91
+ });
92
+ return new RegExp("^" + source.join("") + "$");
93
+ }
94
+ var compiled = participantRoutes.map((route) => ({
95
+ ...route,
96
+ pattern: participantRoutePattern(route.path)
97
+ }));
98
+ function isParticipantRoute(path, method) {
99
+ return compiled.some(
100
+ (route) => route.method === method && route.pattern.test(path)
101
+ );
102
+ }
103
+ function isIntegrationParticipantPath(path) {
104
+ return compiled.some((route) => !route.hostedOnly && route.pattern.test(path));
105
+ }
106
+
107
+ export {
108
+ participantRoutes,
109
+ participantRoutePattern,
110
+ isParticipantRoute,
111
+ isIntegrationParticipantPath
112
+ };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createRelayClient
3
- } from "./chunk-DGWMLN35.js";
3
+ } from "./chunk-ZOUEEK5L.js";
4
4
  import {
5
5
  RelayErrorCode,
6
6
  asRelayError,
7
7
  clientError,
8
8
  cosmosChain
9
- } from "./chunk-36HTX2BM.js";
9
+ } from "./chunk-GMPPLZKH.js";
10
10
 
11
11
  // src/base58.ts
12
12
  var alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pointLedgerReferenceSchema
3
- } from "./chunk-36HTX2BM.js";
3
+ } from "./chunk-GMPPLZKH.js";
4
4
  import {
5
5
  authoringIdentityShape,
6
6
  entitlementSchema,
@@ -16,7 +16,7 @@ import {
16
16
  storedQuestDescriptionSchema,
17
17
  storedReviewModeSchema,
18
18
  tieredRewardReferenceSchema
19
- } from "./chunk-JON5SESL.js";
19
+ } from "./chunk-KGJSKGKI.js";
20
20
 
21
21
  // src/participant-activity.ts
22
22
  import { z } from "zod";
@@ -307,6 +307,8 @@ var questOutcomeSchema = z4.object({
307
307
  code: z4.string().nullable(),
308
308
  /** Why it was skipped, for people; null when admitted. */
309
309
  reason: z4.string().nullable(),
310
+ /** Which window refused admission when `code` is `outside-window`. */
311
+ window: z4.enum(["tracker", "quest"]).optional(),
310
312
  /** The admitted attempt. */
311
313
  attempt: identifier.nullable(),
312
314
  /** The member can claim it with `relay.quests.claim()`. */
@@ -14,7 +14,7 @@ import {
14
14
  resourceHandle,
15
15
  rewardKey,
16
16
  tierRewardSchema
17
- } from "./chunk-JON5SESL.js";
17
+ } from "./chunk-KGJSKGKI.js";
18
18
 
19
19
  // src/point-ledgers.ts
20
20
  import { z } from "zod";
@@ -180,10 +180,25 @@ var engagementChangePreviewSchema = z2.strictObject({
180
180
  pending: total
181
181
  })
182
182
  });
183
- var engagementVersionPageSchema = z2.strictObject({
183
+ var engagementVersionSchema = engagementRuleSchema.extend({
184
+ previousVersion: identifier.nullable()
185
+ });
186
+ var engagementRuleVersionPageSchema = z2.object({
184
187
  items: z2.array(
185
- engagementRuleSchema.extend({ previousVersion: identifier.nullable() })
188
+ z2.object({
189
+ version: identifier,
190
+ definition: z2.object({
191
+ ...engagementDefinitionSchema.shape,
192
+ budgets: z2.array(z2.object(engagementBudgetSchema.shape)).max(8).default([])
193
+ }),
194
+ publishedAt: amount,
195
+ previousVersion: identifier.nullable()
196
+ })
186
197
  ),
198
+ nextCursor: pageCursorSchema.nullable()
199
+ });
200
+ var engagementVersionPageSchema = z2.strictObject({
201
+ items: z2.array(engagementVersionSchema),
187
202
  next: amount.nullable()
188
203
  });
189
204
  var engagementVersionQuerySchema = z2.strictObject({
@@ -280,7 +295,25 @@ var RelayErrorCode = {
280
295
  /** The participant's available point balance is below the offer price. */
281
296
  InsufficientPoints: "insufficient-points",
282
297
  /** A wallet signer failed or the member refused to sign; `cause` is the wallet's own error. */
283
- WalletSigner: "wallet-signer"
298
+ WalletSigner: "wallet-signer",
299
+ /** The member has not met the quest's prerequisites; `missing` lists them. */
300
+ PrerequisitesIncomplete: "prerequisites-incomplete",
301
+ /** The quest is archived or retired: it takes no new participation. */
302
+ QuestClosed: "quest-closed",
303
+ /** An operator paused the quest. */
304
+ QuestPaused: "quest-paused",
305
+ /** An operator locked the member's profile; hiding it is still allowed. */
306
+ ProfileLocked: "profile-locked",
307
+ /** No member in the project has the invitation code the member accepted. */
308
+ InvitationNotFound: "invitation-not-found",
309
+ /** The email sign-in code is wrong; the member can type it again. */
310
+ InvalidCode: "invalid-code",
311
+ /** The email sign-in code expired, was used or had too many attempts; request another. */
312
+ CodeExpired: "code-expired",
313
+ /** The wallet sign-in challenge expired, was used or changed; start sign-in again. */
314
+ ChallengeExpired: "challenge-expired",
315
+ /** Too many requests; `retryAfter` says how long to wait when Relay knows. */
316
+ RateLimited: "rate-limited"
284
317
  };
285
318
  var relayErrorBrand = /* @__PURE__ */ Symbol.for("@domino-sdk/relay.RelayError");
286
319
  function isRelayError(value) {
@@ -289,10 +322,13 @@ function isRelayError(value) {
289
322
  var RelayError = class extends RequestError {
290
323
  name = "RelayError";
291
324
  [relayErrorBrand] = true;
325
+ /** Which window refused admission when `code` is `outside-window`. */
326
+ window;
292
327
  /** Prerequisites the member does not currently meet, when Relay refused for that reason. */
293
328
  missing;
294
329
  constructor(message, details) {
295
330
  super(message, details);
331
+ this.window = details.window;
296
332
  this.missing = details.missing ?? [];
297
333
  }
298
334
  };
@@ -653,6 +689,12 @@ var pointsEntrySchema = z5.object({
653
689
  reason: z5.string(),
654
690
  actor: z5.string().nullable()
655
691
  });
692
+ var managedPointHistoryPageSchema = z5.object({
693
+ items: z5.array(pointsEntrySchema),
694
+ nextCursor: pageCursorSchema.nullable(),
695
+ /** @deprecated Use `nextCursor`, passed back as `cursor`. Removed in 2.0.0. */
696
+ next: z5.number().nullable()
697
+ });
656
698
  var pointsResultSchema = z5.object({
657
699
  entry: pointsEntrySchema,
658
700
  total: integer.nonnegative()
@@ -778,6 +820,9 @@ var publishedReferralSchema = z6.object({
778
820
  actor: z6.string().nullable()
779
821
  });
780
822
  var referralAcceptSchema = z6.object({ actionId: identifier, code: identifier }).strict();
823
+ var referralSuspensionSchema = z6.object({ actionId: identifier, suspended: z6.boolean(), reason }).strict();
824
+ var referralQualificationSchema = z6.object({ actionId: identifier, qualified: z6.boolean(), reason }).strict();
825
+ var referralRewardResolutionSchema = z6.object({ actionId: identifier, reason }).strict();
781
826
  var referralControlSchema = z6.discriminatedUnion("kind", [
782
827
  z6.object({
783
828
  kind: z6.literal("suspend"),
@@ -864,6 +909,8 @@ var referralManagementSchema = z6.object({
864
909
  reason: z6.string()
865
910
  })
866
911
  ),
912
+ nextCursor: pageCursorSchema.nullable().default(null),
913
+ /** @deprecated Use `nextCursor`, passed back as `cursor`. Removed in 2.0.0. */
867
914
  next: amount2.nullable()
868
915
  });
869
916
 
@@ -913,6 +960,11 @@ var redemptionBase = {
913
960
  id: identifier,
914
961
  offer: identifier,
915
962
  member: identifier,
963
+ /**
964
+ * @deprecated Use `id` to refer to a redemption. A redemption is fulfilled in the request that
965
+ * makes it, so nothing is reserved beforehand; the ID refers to no other record. Removed in
966
+ * 2.0.0.
967
+ */
916
968
  reservation: identifier,
917
969
  price: offerPriceSchema,
918
970
  reward: tierRewardSchema,
@@ -1119,6 +1171,7 @@ export {
1119
1171
  engagementChangePreviewInputSchema,
1120
1172
  engagementChangeSchema,
1121
1173
  engagementChangePreviewSchema,
1174
+ engagementRuleVersionPageSchema,
1122
1175
  engagementVersionPageSchema,
1123
1176
  engagementVersionQuerySchema,
1124
1177
  engagementBoundaryPageSchema,
@@ -1165,6 +1218,7 @@ export {
1165
1218
  leaderboardPreviewSchema,
1166
1219
  pointsMutationSchema,
1167
1220
  pointsEntrySchema,
1221
+ managedPointHistoryPageSchema,
1168
1222
  pointsResultSchema,
1169
1223
  pointsAccountSchema,
1170
1224
  leaderboardExclusionSchema,
@@ -1179,6 +1233,9 @@ export {
1179
1233
  referralArtifactSchema,
1180
1234
  publishedReferralSchema,
1181
1235
  referralAcceptSchema,
1236
+ referralSuspensionSchema,
1237
+ referralQualificationSchema,
1238
+ referralRewardResolutionSchema,
1182
1239
  referralControlSchema,
1183
1240
  referralRelationshipSchema,
1184
1241
  referralAccountSchema,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  identifier,
3
3
  xTweetSchema
4
- } from "./chunk-JON5SESL.js";
4
+ } from "./chunk-KGJSKGKI.js";
5
5
 
6
6
  // src/x.ts
7
7
  import { z } from "zod";