@domino-sdk/relay 1.0.0-next.7 → 1.0.0-next.8

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 (30) hide show
  1. package/dist/authoring.d.ts +11 -11
  2. package/dist/authoring.js +2 -2
  3. package/dist/avatar.d.ts +2 -2
  4. package/dist/browser.d.ts +217 -2285
  5. package/dist/browser.js +6 -6
  6. package/dist/{chunk-AWLLGCKU.js → chunk-6A6K5RUD.js} +22 -8
  7. package/dist/{chunk-SKETUPST.js → chunk-77H7APVD.js} +1 -1
  8. package/dist/{chunk-UFXBQ6FN.js → chunk-MRIURJE3.js} +2 -2
  9. package/dist/{chunk-ADSP377G.js → chunk-QBOHLT7M.js} +26 -5
  10. package/dist/{chunk-X6FJIPXR.js → chunk-V5R2DMGY.js} +553 -435
  11. package/dist/{chunk-DJZB5RY5.js → chunk-V7EZUZ3Z.js} +345 -243
  12. package/dist/{chunk-UW6R2QGT.js → chunk-VARGF4JS.js} +619 -610
  13. package/dist/{chunk-7HSTFBMO.js → chunk-ZWY3R6B3.js} +5 -3
  14. package/dist/{client-BufGakEt.d.ts → client-CK4nwt7V.d.ts} +307 -2253
  15. package/dist/{images-e6FW9QSx.d.ts → images--vZ9U0kr.d.ts} +2 -2
  16. package/dist/index.d.ts +6 -6
  17. package/dist/index.js +19 -7
  18. package/dist/internal.d.ts +16 -5
  19. package/dist/internal.js +12 -5
  20. package/dist/{catalog-C09gnPYT.d.ts → pages-BzqJuI69.d.ts} +79 -21
  21. package/dist/portal-proxy.js +6 -6
  22. package/dist/{profiles-BtOXMGcC.d.ts → profiles-DDMFBRKe.d.ts} +1 -1
  23. package/dist/react/index.d.ts +156 -2224
  24. package/dist/react/index.js +12 -10
  25. package/dist/{schema-DCapSPHz.d.ts → schema-pnuWqvGn.d.ts} +8 -8
  26. package/dist/schema.d.ts +64 -64
  27. package/dist/schema.js +15 -5
  28. package/dist/{submission-input-Bter6XiI.d.ts → submission-input-C9qm9ixd.d.ts} +8 -8
  29. package/dist/{wallet-Bu6sqJvQ.d.ts → wallet-BGOfFkG9.d.ts} +1 -1
  30. package/package.json +1 -1
@@ -2,9 +2,10 @@ import {
2
2
  contentMetricSchema,
3
3
  contentMetricsSchema,
4
4
  identifier,
5
+ pageCursorSchema,
5
6
  pointsRewardSchema,
6
7
  tierRewardSchema
7
- } from "./chunk-UW6R2QGT.js";
8
+ } from "./chunk-VARGF4JS.js";
8
9
 
9
10
  // src/authoring-identity.ts
10
11
  import { z } from "zod";
@@ -75,7 +76,7 @@ var engagementPageQuerySchema = z2.strictObject({
75
76
  rule: identifier,
76
77
  content: z2.string().min(1).max(256),
77
78
  member: identifier.optional(),
78
- before: z2.coerce.number().int().positive().safe().optional()
79
+ cursor: pageCursorSchema.optional()
79
80
  });
80
81
  var engagementSettlementSchema = z2.strictObject({
81
82
  id: identifier,
@@ -105,7 +106,7 @@ var engagementPageSchema = z2.strictObject({
105
106
  reason: z2.string().nullable()
106
107
  }).nullable(),
107
108
  items: z2.array(engagementSettlementSchema),
108
- next: amount.nullable()
109
+ nextCursor: pageCursorSchema.nullable()
109
110
  });
110
111
  var engagementChangePreviewInputSchema = z2.strictObject({
111
112
  code: z2.string().min(1).max(1e6)
@@ -156,7 +157,7 @@ var engagementBoundaryPageSchema = z2.strictObject({
156
157
  settlement: engagementSettlementSchema
157
158
  })
158
159
  ),
159
- next: amount.nullable()
160
+ nextCursor: pageCursorSchema.nullable()
160
161
  });
161
162
  var engagementArtifactSchema = engagementPublishSchema.omit({
162
163
  actionId: true
@@ -173,128 +174,219 @@ var engagementDeploymentEntrySchema = z2.discriminatedUnion("kind", [
173
174
  })
174
175
  ]);
175
176
 
176
- // src/profiles.ts
177
+ // src/request-error.ts
178
+ var requestErrorBrand = /* @__PURE__ */ Symbol.for("@domino-sdk/relay.RequestError");
179
+ function isRequestError(value) {
180
+ return typeof value === "object" && value !== null && value[requestErrorBrand] === true;
181
+ }
182
+ var RequestError = class extends Error {
183
+ name = "RequestError";
184
+ [requestErrorBrand] = true;
185
+ kind;
186
+ uncertain;
187
+ status;
188
+ code;
189
+ operationId;
190
+ /** `replay` when there is an `operationId`, else `reconcile`; only when `uncertain`. */
191
+ recovery;
192
+ constructor(message, details) {
193
+ super(message, details.cause === void 0 ? {} : { cause: details.cause });
194
+ this.kind = details.kind;
195
+ this.uncertain = details.uncertain ?? false;
196
+ this.status = details.status;
197
+ this.code = details.code;
198
+ this.operationId = details.operationId;
199
+ this.recovery = this.uncertain ? details.operationId ? "replay" : "reconcile" : void 0;
200
+ }
201
+ };
202
+
203
+ // src/errors.ts
177
204
  import { z as z3 } from "zod";
178
- var count = z3.number().int().nonnegative().safe();
179
- var profileVisibilitySchema = z3.enum([
205
+ var RelayErrorCode = {
206
+ /** The call needs a signed-in member. */
207
+ NotSignedIn: "not-signed-in",
208
+ /** The session changed since the app read it (the `session` option). Reload before retrying. */
209
+ StaleSession: "stale-session",
210
+ /** The input failed validation before it was sent. */
211
+ InvalidInput: "invalid-input",
212
+ /** Relay's answer was not JSON or not the expected shape (kind `invalid-response`). */
213
+ InvalidResponse: "invalid-response",
214
+ /** The transport failed, before a response or while reading its body (kind `network`). */
215
+ Network: "network",
216
+ /** The client's deadline elapsed (kind `timeout`). */
217
+ Timeout: "timeout",
218
+ /** The caller cancelled the request (kind `aborted`). */
219
+ Aborted: "aborted",
220
+ /** A quest or collection the call named is not in the member's experience. */
221
+ NotFound: "not-found",
222
+ /** The quest has no failed attempt the member can retry. */
223
+ RetryUnavailable: "retry-unavailable",
224
+ /** Durable submission storage is missing, blocked or unreadable. */
225
+ SubmissionStorage: "submission-storage",
226
+ /** The saved submission is in a state that does not allow this action. */
227
+ SubmissionConflict: "submission-conflict",
228
+ /** The quest changed since the member saw it; review it before submitting again. */
229
+ QuestUpdated: "quest-updated",
230
+ /** The quiz changed since the member answered it. */
231
+ StaleQuiz: "stale-quiz",
232
+ /** Relay refused the submitted evidence. */
233
+ InvalidSubmission: "invalid-submission",
234
+ /** A page cursor Relay cannot read; start again from the first page. */
235
+ InvalidCursor: "invalid-cursor",
236
+ /** A wallet signer failed or the member refused to sign; `cause` is the wallet's own error. */
237
+ WalletSigner: "wallet-signer"
238
+ };
239
+ var relayErrorBrand = /* @__PURE__ */ Symbol.for("@domino-sdk/relay.RelayError");
240
+ function isRelayError(value) {
241
+ return isRequestError(value) && value[relayErrorBrand] === true;
242
+ }
243
+ var RelayError = class extends RequestError {
244
+ name = "RelayError";
245
+ [relayErrorBrand] = true;
246
+ /** Prerequisite quests the member has not completed, when Relay refused for that reason. */
247
+ missing;
248
+ constructor(message, details) {
249
+ super(message, details);
250
+ this.missing = details.missing ?? [];
251
+ }
252
+ };
253
+ function clientError(message, code, details = {}) {
254
+ return new RelayError(message, { ...details, kind: "client", code });
255
+ }
256
+ function parseInput(schema, value) {
257
+ const parsed = schema.safeParse(value);
258
+ if (!parsed.success) {
259
+ throw clientError(
260
+ z3.prettifyError(parsed.error),
261
+ RelayErrorCode.InvalidInput,
262
+ { cause: parsed.error }
263
+ );
264
+ }
265
+ return parsed.data;
266
+ }
267
+
268
+ // src/profiles.ts
269
+ import { z as z4 } from "zod";
270
+ var count = z4.number().int().nonnegative().safe();
271
+ var profileVisibilitySchema = z4.enum([
180
272
  "private",
181
273
  "participants",
182
274
  "public"
183
275
  ]);
184
- var avatarProviderSchema = z3.enum(["x", "discord", "google"]);
185
- var profileDefaultProviderSchema = z3.enum(["x", "discord"]);
186
- var profileDefaultsSchema = z3.array(profileDefaultProviderSchema).max(profileDefaultProviderSchema.options.length).refine(
276
+ var avatarProviderSchema = z4.enum(["x", "discord", "google"]);
277
+ var profileDefaultProviderSchema = z4.enum(["x", "discord"]);
278
+ var profileDefaultsSchema = z4.array(profileDefaultProviderSchema).max(profileDefaultProviderSchema.options.length).refine(
187
279
  (providers) => new Set(providers).size === providers.length,
188
280
  "List each provider once"
189
281
  );
190
- var avatarSeedSchema = z3.string().min(1).max(100);
191
- var profileAvatarSchema = z3.discriminatedUnion("source", [
192
- z3.object({
193
- source: z3.literal("upload"),
194
- url: z3.string().url(),
282
+ var avatarSeedSchema = z4.string().min(1).max(100);
283
+ var profileAvatarSchema = z4.discriminatedUnion("source", [
284
+ z4.object({
285
+ source: z4.literal("upload"),
286
+ url: z4.string().url(),
195
287
  seed: avatarSeedSchema
196
288
  }),
197
- z3.object({
198
- source: z3.literal("account"),
289
+ z4.object({
290
+ source: z4.literal("account"),
199
291
  provider: avatarProviderSchema,
200
- url: z3.string().url(),
292
+ url: z4.string().url(),
201
293
  seed: avatarSeedSchema
202
294
  }),
203
- z3.object({ source: z3.literal("generated"), seed: avatarSeedSchema })
295
+ z4.object({ source: z4.literal("generated"), seed: avatarSeedSchema })
204
296
  ]);
205
- var profileSummarySchema = z3.object({
297
+ var profileSummarySchema = z4.object({
206
298
  id: identifier,
207
- name: z3.string(),
299
+ name: z4.string(),
208
300
  avatar: profileAvatarSchema
209
301
  });
210
302
  var invisible = /[\p{Cc}؜᠎​-‏‪-‮⁠-⁤⁦-⁩]/u;
211
- var displayNameSchema = z3.string().max(200).transform((value) => value.normalize("NFC").replace(/\s+/g, " ").trim()).pipe(
212
- z3.string().min(1, "Enter a name").max(40, "Use at most 40 characters").refine((value) => !invisible.test(value), "Use visible characters only")
303
+ var displayNameSchema = z4.string().max(200).transform((value) => value.normalize("NFC").replace(/\s+/g, " ").trim()).pipe(
304
+ z4.string().min(1, "Enter a name").max(40, "Use at most 40 characters").refine((value) => !invisible.test(value), "Use visible characters only")
213
305
  );
214
- var profileUpdateSchema = z3.object({
306
+ var profileUpdateSchema = z4.object({
215
307
  displayName: displayNameSchema.nullable().optional(),
216
- avatar: z3.discriminatedUnion("source", [
217
- z3.object({
218
- source: z3.literal("account"),
308
+ avatar: z4.discriminatedUnion("source", [
309
+ z4.object({
310
+ source: z4.literal("account"),
219
311
  provider: avatarProviderSchema
220
312
  }).strict(),
221
- z3.object({ source: z3.literal("generated") }).strict()
313
+ z4.object({ source: z4.literal("generated") }).strict()
222
314
  ]).nullable().optional(),
223
- hidden: z3.boolean().optional()
315
+ hidden: z4.boolean().optional()
224
316
  }).strict().refine(
225
317
  (value) => Object.values(value).some((field) => field !== void 0),
226
318
  "Change at least one field"
227
319
  );
228
320
  var ownProfileSchema = profileSummarySchema.extend({
229
321
  /** The name the member chose, or null for the default. */
230
- displayName: z3.string().nullable(),
322
+ displayName: z4.string().nullable(),
231
323
  /** The avatar the member chose: `default` follows the project's defaults. */
232
- avatarChoice: z3.enum(["default", "upload", "account", "generated"]),
324
+ avatarChoice: z4.enum(["default", "upload", "account", "generated"]),
233
325
  /** The account of an `account` choice. */
234
326
  avatarProvider: avatarProviderSchema.nullable(),
235
- hidden: z3.boolean(),
327
+ hidden: z4.boolean(),
236
328
  /** An operator locked the name and avatar; the member can still hide the profile. */
237
- locked: z3.boolean(),
329
+ locked: z4.boolean(),
238
330
  /** Who can see profiles in this project, so the app can explain it. */
239
331
  visibility: profileVisibilitySchema,
240
332
  /** The member's connected accounts a picture or name can come from. */
241
- options: z3.array(
242
- z3.object({
333
+ options: z4.array(
334
+ z4.object({
243
335
  provider: avatarProviderSchema,
244
- name: z3.string().nullable(),
245
- imageUrl: z3.string().url().nullable()
336
+ name: z4.string().nullable(),
337
+ imageUrl: z4.string().url().nullable()
246
338
  })
247
339
  )
248
340
  });
249
- var cursor = z3.string().min(1).max(512);
250
- var profileCompletionQuerySchema = z3.object({
251
- limit: z3.coerce.number().int().min(1).max(100).default(20),
341
+ var cursor = z4.string().min(1).max(512);
342
+ var profileCompletionQuerySchema = z4.object({
343
+ limit: z4.coerce.number().int().min(1).max(100).default(20),
252
344
  cursor: cursor.optional()
253
345
  }).strict();
254
- var profileCompletionSchema = z3.object({
346
+ var profileCompletionSchema = z4.object({
255
347
  quest: identifier,
256
348
  key: identifier.optional(),
257
- title: z3.string(),
349
+ title: z4.string(),
258
350
  completions: count.positive(),
259
351
  /** Null for completions recorded before completion times were. */
260
352
  lastCompletedAt: count.nullable()
261
353
  });
262
- var profileCompletionPageSchema = z3.object({
263
- items: z3.array(profileCompletionSchema),
354
+ var profileCompletionPageSchema = z4.object({
355
+ items: z4.array(profileCompletionSchema),
264
356
  nextCursor: cursor.nullable()
265
357
  });
266
- var profileReferralSchema = z3.object({
358
+ var profileReferralSchema = z4.object({
267
359
  program: identifier,
268
360
  key: identifier.optional(),
269
- title: z3.string(),
361
+ title: z4.string(),
270
362
  /** Members this member invited. Invitations are shared by every program. */
271
363
  invited: count,
272
364
  /** Invited members who qualified in this program. */
273
365
  qualified: count,
274
- milestones: z3.array(
275
- z3.object({ id: identifier, count, reached: z3.boolean() })
366
+ milestones: z4.array(
367
+ z4.object({ id: identifier, count, reached: z4.boolean() })
276
368
  )
277
369
  });
278
- var profileSettingsSchema = z3.object({
370
+ var profileSettingsSchema = z4.object({
279
371
  visibility: profileVisibilitySchema,
280
372
  defaults: profileDefaultsSchema,
281
373
  revision: count,
282
- actor: z3.string().nullable(),
374
+ actor: z4.string().nullable(),
283
375
  updatedAt: count.nullable()
284
376
  });
285
377
  var profileSettingsInputSchema = profileSettingsSchema.omit({ revision: true, actor: true, updatedAt: true }).extend({
286
378
  actionId: identifier,
287
379
  /** The revision the change was made against; a newer one is a 409. */
288
380
  expectedRevision: count,
289
- reason: z3.string().trim().min(1).max(500)
381
+ reason: z4.string().trim().min(1).max(500)
290
382
  }).strict();
291
- var profileModerationSchema = z3.object({
383
+ var profileModerationSchema = z4.object({
292
384
  actionId: identifier,
293
- resetName: z3.boolean().default(false),
294
- removeAvatar: z3.boolean().default(false),
385
+ resetName: z4.boolean().default(false),
386
+ removeAvatar: z4.boolean().default(false),
295
387
  /** True locks the name and avatar, false unlocks them. */
296
- lock: z3.boolean().optional(),
297
- reason: z3.string().trim().min(1).max(1e3)
388
+ lock: z4.boolean().optional(),
389
+ reason: z4.string().trim().min(1).max(1e3)
298
390
  }).strict().refine(
299
391
  (value) => value.resetName || value.removeAvatar || value.lock !== void 0,
300
392
  "Choose an action"
@@ -302,25 +394,25 @@ var profileModerationSchema = z3.object({
302
394
  var managedProfileSchema = ownProfileSchema.omit({ options: true }).extend({
303
395
  member: identifier,
304
396
  lockedAt: count.nullable(),
305
- lockedBy: z3.string().nullable(),
306
- lockedReason: z3.string().nullable(),
397
+ lockedBy: z4.string().nullable(),
398
+ lockedReason: z4.string().nullable(),
307
399
  updatedAt: count
308
400
  });
309
401
  var AVATAR_UPLOAD_LIMIT = 5 * 1024 * 1024;
310
402
  var avatarUploadTypes = ["image/jpeg", "image/png", "image/webp"];
311
403
 
312
404
  // src/leaderboards.ts
313
- import { z as z4 } from "zod";
314
- var integer = z4.number().int().safe();
405
+ import { z as z5 } from "zod";
406
+ var integer = z5.number().int().safe();
315
407
  var timestamp = integer.nonnegative().max(864e13);
316
- var leaderboardWindowSchema = z4.discriminatedUnion("kind", [
317
- z4.object({ kind: z4.literal("all-time") }).strict(),
318
- z4.object({ kind: z4.literal("fixed"), start: timestamp, end: timestamp }).strict().refine((w) => w.end > w.start, "Window end must follow its start"),
319
- z4.object({ kind: z4.literal("rolling"), days: integer.min(1).max(3660) }).strict(),
320
- z4.object({
321
- kind: z4.literal("calendar"),
322
- period: z4.enum(["day", "week", "month"]),
323
- timeZone: z4.string().min(1).max(100).refine((zone) => {
408
+ var leaderboardWindowSchema = z5.discriminatedUnion("kind", [
409
+ z5.object({ kind: z5.literal("all-time") }).strict(),
410
+ z5.object({ kind: z5.literal("fixed"), start: timestamp, end: timestamp }).strict().refine((w) => w.end > w.start, "Window end must follow its start"),
411
+ z5.object({ kind: z5.literal("rolling"), days: integer.min(1).max(3660) }).strict(),
412
+ z5.object({
413
+ kind: z5.literal("calendar"),
414
+ period: z5.enum(["day", "week", "month"]),
415
+ timeZone: z5.string().min(1).max(100).refine((zone) => {
324
416
  try {
325
417
  new Intl.DateTimeFormat("en", { timeZone: zone });
326
418
  return true;
@@ -332,45 +424,45 @@ var leaderboardWindowSchema = z4.discriminatedUnion("kind", [
332
424
  ]);
333
425
  var periodScore = {
334
426
  window: leaderboardWindowSchema.default({ kind: "all-time" }),
335
- quests: z4.array(identifier).min(1).max(100).optional()
427
+ quests: z5.array(identifier).min(1).max(100).optional()
336
428
  };
337
- var leaderboardDefinitionSchema = z4.object({
429
+ var leaderboardDefinitionSchema = z5.object({
338
430
  id: identifier,
339
431
  key: identifier.optional(),
340
- title: z4.string().trim().min(1).max(120),
432
+ title: z5.string().trim().min(1).max(120),
341
433
  balance: identifier,
342
- score: z4.discriminatedUnion("kind", [
343
- z4.object({ kind: z4.literal("balance") }).strict(),
344
- z4.object({ kind: z4.literal("earned"), ...periodScore }).strict(),
345
- z4.object({
346
- kind: z4.literal("net"),
434
+ score: z5.discriminatedUnion("kind", [
435
+ z5.object({ kind: z5.literal("balance") }).strict(),
436
+ z5.object({ kind: z5.literal("earned"), ...periodScore }).strict(),
437
+ z5.object({
438
+ kind: z5.literal("net"),
347
439
  window: leaderboardWindowSchema.default({ kind: "all-time" })
348
440
  }).strict()
349
441
  ]).default({ kind: "balance" }),
350
- access: z4.enum(["participants", "public"]).default("participants"),
442
+ access: z5.enum(["participants", "public"]).default("participants"),
351
443
  group: identifier.optional()
352
444
  }).strict();
353
445
  var leaderboardAuthoringSchema = leaderboardDefinitionSchema.omit({ id: true }).extend(authoringIdentityShape).strict().superRefine(validateAuthoringIdentity).transform(normalizeAuthoringIdentity);
354
- var leaderboardArtifactSchema = z4.union([
446
+ var leaderboardArtifactSchema = z5.union([
355
447
  leaderboardAuthoringSchema,
356
- z4.object({ code: z4.string().min(1).max(2e6) }).strict()
448
+ z5.object({ code: z5.string().min(1).max(2e6) }).strict()
357
449
  ]);
358
- var publishedLeaderboardSchema = z4.object({
450
+ var publishedLeaderboardSchema = z5.object({
359
451
  version: identifier,
360
452
  definition: leaderboardDefinitionSchema,
361
453
  publishedAt: timestamp,
362
- actor: z4.string().nullable()
454
+ actor: z5.string().nullable()
363
455
  });
364
- var leaderboardQuerySchema = z4.object({
365
- limit: z4.coerce.number().int().min(1).max(100).default(25),
366
- cursor: z4.string().max(4096).optional()
456
+ var leaderboardQuerySchema = z5.object({
457
+ limit: z5.coerce.number().int().min(1).max(100).default(25),
458
+ cursor: z5.string().max(4096).optional()
367
459
  }).strict();
368
- var leaderboardRowSchema = z4.object({
460
+ var leaderboardRowSchema = z5.object({
369
461
  /** The row's stable key: a pseudonym per board and member. */
370
462
  participant: identifier,
371
463
  member: identifier.optional(),
372
464
  /** The profile's name where the viewer can see it, otherwise the pseudonym's. */
373
- name: z4.string(),
465
+ name: z5.string(),
374
466
  score: integer,
375
467
  rank: integer.positive(),
376
468
  /**
@@ -379,31 +471,31 @@ var leaderboardRowSchema = z4.object({
379
471
  */
380
472
  profile: profileSummarySchema.nullable().default(null)
381
473
  });
382
- var leaderboardPageSchema = z4.object({
474
+ var leaderboardPageSchema = z5.object({
383
475
  leaderboard: identifier,
384
- title: z4.string(),
476
+ title: z5.string(),
385
477
  version: identifier,
386
- calculation: z4.enum(["balance", "earned", "net"]),
387
- period: z4.object({ start: timestamp.nullable(), end: timestamp.nullable() }),
478
+ calculation: z5.enum(["balance", "earned", "net"]),
479
+ period: z5.object({ start: timestamp.nullable(), end: timestamp.nullable() }),
388
480
  calculatedAt: timestamp,
389
481
  lastEntryAt: timestamp.nullable(),
390
482
  total: integer.nonnegative(),
391
- items: z4.array(leaderboardRowSchema),
483
+ items: z5.array(leaderboardRowSchema),
392
484
  me: leaderboardRowSchema.nullable(),
393
- nearby: z4.array(leaderboardRowSchema),
394
- nextCursor: z4.string().nullable()
485
+ nearby: z5.array(leaderboardRowSchema),
486
+ nextCursor: z5.string().nullable()
395
487
  });
396
- var leaderboardPlacementSchema = z4.object({
488
+ var leaderboardPlacementSchema = z5.object({
397
489
  leaderboard: identifier,
398
490
  key: identifier.optional(),
399
- title: z4.string(),
491
+ title: z5.string(),
400
492
  profile: identifier,
401
493
  rank: integer.positive().nullable(),
402
494
  score: integer.nullable(),
403
495
  /** Ranked participants on the board. */
404
496
  total: integer.nonnegative()
405
497
  });
406
- var leaderboardPreviewSchema = z4.object({
498
+ var leaderboardPreviewSchema = z5.object({
407
499
  published: publishedLeaderboardSchema,
408
500
  before: leaderboardPageSchema.nullable(),
409
501
  after: leaderboardPageSchema
@@ -412,111 +504,111 @@ var mutationBase = {
412
504
  actionId: identifier,
413
505
  member: identifier,
414
506
  balance: identifier,
415
- reason: z4.string().trim().min(1).max(1e3)
507
+ reason: z5.string().trim().min(1).max(1e3)
416
508
  };
417
509
  var datedMutation = { ...mutationBase, effectiveAt: timestamp.optional() };
418
- var pointsMutationSchema = z4.discriminatedUnion("kind", [
419
- z4.object({
510
+ var pointsMutationSchema = z5.discriminatedUnion("kind", [
511
+ z5.object({
420
512
  ...datedMutation,
421
- kind: z4.literal("award"),
422
- referralEligible: z4.boolean().optional(),
513
+ kind: z5.literal("award"),
514
+ referralEligible: z5.boolean().optional(),
423
515
  amount: integer.positive()
424
516
  }).strict(),
425
- z4.object({
517
+ z5.object({
426
518
  ...datedMutation,
427
- kind: z4.literal("spend"),
519
+ kind: z5.literal("spend"),
428
520
  amount: integer.positive()
429
521
  }).strict(),
430
- z4.object({
522
+ z5.object({
431
523
  ...datedMutation,
432
- kind: z4.literal("adjust"),
524
+ kind: z5.literal("adjust"),
433
525
  amount: integer.refine((n) => n !== 0)
434
526
  }).strict(),
435
- z4.object({
527
+ z5.object({
436
528
  ...datedMutation,
437
- kind: z4.literal("set"),
529
+ kind: z5.literal("set"),
438
530
  total: integer.nonnegative(),
439
531
  expectedTotal: integer.nonnegative(),
440
- classification: z4.enum(["earned", "spend"])
532
+ classification: z5.enum(["earned", "spend"])
441
533
  }).strict(),
442
- z4.object({
534
+ z5.object({
443
535
  ...mutationBase,
444
- kind: z4.literal("reverse"),
536
+ kind: z5.literal("reverse"),
445
537
  entry: identifier,
446
538
  amount: integer.positive()
447
539
  }).strict()
448
540
  ]);
449
- var pointsEntrySchema = z4.object({
541
+ var pointsEntrySchema = z5.object({
450
542
  id: identifier,
451
- completion: z4.string().nullable(),
543
+ completion: z5.string().nullable(),
452
544
  member: identifier,
453
545
  balance: identifier,
454
546
  amount: integer,
455
- kind: z4.enum(["award", "spend", "adjust", "reverse"]),
547
+ kind: z5.enum(["award", "spend", "adjust", "reverse"]),
456
548
  effectiveAt: timestamp,
457
549
  receivedAt: timestamp,
458
550
  quest: identifier.nullable(),
459
551
  original: identifier.nullable(),
460
- reason: z4.string(),
461
- actor: z4.string().nullable()
552
+ reason: z5.string(),
553
+ actor: z5.string().nullable()
462
554
  });
463
- var pointsResultSchema = z4.object({
555
+ var pointsResultSchema = z5.object({
464
556
  entry: pointsEntrySchema,
465
557
  total: integer.nonnegative()
466
558
  });
467
- var pointsAccountSchema = z4.object({
559
+ var pointsAccountSchema = z5.object({
468
560
  member: identifier,
469
561
  balance: identifier,
470
562
  total: integer.nonnegative(),
471
563
  held: integer.nonnegative()
472
564
  });
473
- var leaderboardExclusionSchema = z4.object({
565
+ var leaderboardExclusionSchema = z5.object({
474
566
  actionId: identifier,
475
567
  member: identifier,
476
- excluded: z4.boolean(),
477
- reason: z4.string().trim().min(1).max(1e3)
568
+ excluded: z5.boolean(),
569
+ reason: z5.string().trim().min(1).max(1e3)
478
570
  }).strict();
479
- var leaderboardGroupSchema = z4.object({
571
+ var leaderboardGroupSchema = z5.object({
480
572
  actionId: identifier,
481
573
  member: identifier,
482
- included: z4.boolean(),
483
- reason: z4.string().trim().min(1).max(1e3)
574
+ included: z5.boolean(),
575
+ reason: z5.string().trim().min(1).max(1e3)
484
576
  }).strict();
485
577
 
486
578
  // src/referrals.ts
487
- import { z as z5 } from "zod";
488
- var rewardSchema = z5.union([pointsRewardSchema, tierRewardSchema]);
489
- var amount2 = z5.number().int().safe().nonnegative();
490
- var reason = z5.string().trim().min(1).max(1e3);
491
- var referralDefinitionSchema = z5.object({
579
+ import { z as z6 } from "zod";
580
+ var rewardSchema = z6.union([pointsRewardSchema, tierRewardSchema]);
581
+ var amount2 = z6.number().int().safe().nonnegative();
582
+ var reason = z6.string().trim().min(1).max(1e3);
583
+ var referralDefinitionSchema = z6.object({
492
584
  id: identifier,
493
585
  key: identifier.optional(),
494
- title: z5.string().trim().min(1).max(120),
495
- enabled: z5.boolean().default(true),
496
- qualification: z5.discriminatedUnion("kind", [
497
- z5.object({ kind: z5.literal("signup") }).strict(),
498
- z5.object({ kind: z5.literal("quest"), quest: identifier }).strict(),
499
- z5.object({ kind: z5.literal("external") }).strict()
586
+ title: z6.string().trim().min(1).max(120),
587
+ enabled: z6.boolean().default(true),
588
+ qualification: z6.discriminatedUnion("kind", [
589
+ z6.object({ kind: z6.literal("signup") }).strict(),
590
+ z6.object({ kind: z6.literal("quest"), quest: identifier }).strict(),
591
+ z6.object({ kind: z6.literal("external") }).strict()
500
592
  ]),
501
593
  inviterGroup: identifier.optional(),
502
- rewards: z5.object({
503
- inviter: z5.array(rewardSchema).max(10).default([]),
504
- invitee: z5.array(rewardSchema).max(10).default([])
594
+ rewards: z6.object({
595
+ inviter: z6.array(rewardSchema).max(10).default([]),
596
+ invitee: z6.array(rewardSchema).max(10).default([])
505
597
  }).strict().default({ inviter: [], invitee: [] }),
506
- milestones: z5.array(
507
- z5.object({
598
+ milestones: z6.array(
599
+ z6.object({
508
600
  id: identifier,
509
601
  count: amount2.min(1),
510
- rewards: z5.array(rewardSchema).min(1).max(10)
602
+ rewards: z6.array(rewardSchema).min(1).max(10)
511
603
  }).strict()
512
604
  ).max(30).default([]),
513
- bonuses: z5.array(
514
- z5.object({
605
+ bonuses: z6.array(
606
+ z6.object({
515
607
  id: identifier,
516
608
  balance: identifier,
517
609
  basisPoints: amount2.min(1).max(1e4),
518
- quests: z5.array(identifier).min(1).max(100).optional(),
519
- external: z5.boolean().default(false),
610
+ quests: z6.array(identifier).min(1).max(100).optional(),
611
+ external: z6.boolean().default(false),
520
612
  durationDays: amount2.min(1).max(36500).optional(),
521
613
  maxPoints: amount2.min(1).optional()
522
614
  }).strict()
@@ -528,145 +620,145 @@ var referralDefinitionSchema = z5.object({
528
620
  }
529
621
  }
530
622
  });
531
- var referralAuthoringSchema = z5.object(referralDefinitionSchema.shape).omit({ id: true }).extend(authoringIdentityShape).strict().superRefine(validateAuthoringIdentity).superRefine((value, ctx) => {
623
+ var referralAuthoringSchema = z6.object(referralDefinitionSchema.shape).omit({ id: true }).extend(authoringIdentityShape).strict().superRefine(validateAuthoringIdentity).superRefine((value, ctx) => {
532
624
  for (const entries of [value.milestones, value.bonuses]) {
533
625
  if (new Set(entries.map((entry) => entry.id)).size !== entries.length) {
534
626
  ctx.addIssue({ code: "custom", message: "Rule keys must be unique" });
535
627
  }
536
628
  }
537
629
  }).transform(normalizeAuthoringIdentity);
538
- var referralArtifactSchema = z5.union([
630
+ var referralArtifactSchema = z6.union([
539
631
  referralAuthoringSchema,
540
- z5.object({ code: z5.string().min(1).max(2e6) }).strict()
632
+ z6.object({ code: z6.string().min(1).max(2e6) }).strict()
541
633
  ]);
542
- var publishedReferralSchema = z5.object({
634
+ var publishedReferralSchema = z6.object({
543
635
  version: identifier,
544
636
  definition: referralDefinitionSchema,
545
637
  publishedAt: amount2,
546
- actor: z5.string().nullable()
638
+ actor: z6.string().nullable()
547
639
  });
548
- var referralAcceptSchema = z5.object({ actionId: identifier, code: identifier }).strict();
549
- var referralControlSchema = z5.discriminatedUnion("kind", [
550
- z5.object({
551
- kind: z5.literal("suspend"),
640
+ var referralAcceptSchema = z6.object({ actionId: identifier, code: identifier }).strict();
641
+ var referralControlSchema = z6.discriminatedUnion("kind", [
642
+ z6.object({
643
+ kind: z6.literal("suspend"),
552
644
  actionId: identifier,
553
645
  member: identifier,
554
- suspended: z5.boolean(),
646
+ suspended: z6.boolean(),
555
647
  reason
556
648
  }).strict(),
557
- z5.object({
558
- kind: z5.literal("qualify"),
649
+ z6.object({
650
+ kind: z6.literal("qualify"),
559
651
  actionId: identifier,
560
652
  member: identifier,
561
653
  program: identifier,
562
- qualified: z5.boolean(),
654
+ qualified: z6.boolean(),
563
655
  reason
564
656
  }).strict(),
565
- z5.object({
566
- kind: z5.literal("resolve-reward"),
657
+ z6.object({
658
+ kind: z6.literal("resolve-reward"),
567
659
  actionId: identifier,
568
660
  entitlement: identifier,
569
661
  reason
570
662
  }).strict()
571
663
  ]);
572
- var referralRelationshipSchema = z5.object({
664
+ var referralRelationshipSchema = z6.object({
573
665
  member: identifier,
574
666
  inviter: identifier,
575
667
  acceptedAt: amount2,
576
- suspended: z5.boolean()
668
+ suspended: z6.boolean()
577
669
  });
578
- var referralAccountSchema = z5.object({
670
+ var referralAccountSchema = z6.object({
579
671
  id: identifier,
580
672
  program: identifier,
581
- kind: z5.enum(["bonus", "fixed", "milestone"]),
673
+ kind: z6.enum(["bonus", "fixed", "milestone"]),
582
674
  balance: identifier,
583
675
  earned: amount2,
584
676
  settled: amount2,
585
677
  outstanding: amount2
586
678
  });
587
- var referralSummarySchema = z5.object({
679
+ var referralSummarySchema = z6.object({
588
680
  code: identifier,
589
681
  attributed: amount2,
590
- programs: z5.array(
591
- z5.object({
682
+ programs: z6.array(
683
+ z6.object({
592
684
  definition: referralDefinitionSchema,
593
685
  qualified: amount2,
594
- milestones: z5.array(
595
- z5.object({ id: identifier, count: amount2, reached: z5.boolean() })
686
+ milestones: z6.array(
687
+ z6.object({ id: identifier, count: amount2, reached: z6.boolean() })
596
688
  )
597
689
  })
598
690
  ),
599
- accounts: z5.array(referralAccountSchema)
691
+ accounts: z6.array(referralAccountSchema)
600
692
  });
601
- var referralHistorySchema = z5.object({
602
- items: z5.array(
603
- z5.object({
693
+ var referralHistorySchema = z6.object({
694
+ items: z6.array(
695
+ z6.object({
604
696
  id: amount2,
605
697
  program: identifier,
606
698
  balance: identifier,
607
- amount: z5.number().int().safe(),
699
+ amount: z6.number().int().safe(),
608
700
  at: amount2,
609
- reason: z5.string()
701
+ reason: z6.string()
610
702
  })
611
703
  ),
612
- next: amount2.nullable()
704
+ nextCursor: pageCursorSchema.nullable()
613
705
  });
614
- var referralManagementSchema = z5.object({
615
- relationships: z5.array(referralRelationshipSchema),
616
- qualifications: z5.array(
617
- z5.object({
706
+ var referralManagementSchema = z6.object({
707
+ relationships: z6.array(referralRelationshipSchema),
708
+ qualifications: z6.array(
709
+ z6.object({
618
710
  member: identifier,
619
711
  program: identifier,
620
- qualified: z5.boolean(),
712
+ qualified: z6.boolean(),
621
713
  qualifiedAt: amount2
622
714
  })
623
715
  ),
624
- accounts: z5.array(
625
- referralAccountSchema.extend({ member: identifier, invitee: z5.string() })
716
+ accounts: z6.array(
717
+ referralAccountSchema.extend({ member: identifier, invitee: z6.string() })
626
718
  ),
627
- reviews: z5.array(
628
- z5.object({
719
+ reviews: z6.array(
720
+ z6.object({
629
721
  entitlement: identifier,
630
722
  member: identifier,
631
723
  program: identifier,
632
- reason: z5.string()
724
+ reason: z6.string()
633
725
  })
634
726
  ),
635
727
  next: amount2.nullable()
636
728
  });
637
729
 
638
730
  // src/wallet.ts
639
- import { z as z6 } from "zod";
640
- var solanaAddressSchema = z6.string().min(32).max(44).regex(/^[1-9A-HJ-NP-Za-km-z]+$/);
641
- var walletConnectionSchema = z6.object({
642
- chain: z6.literal("solana"),
731
+ import { z as z7 } from "zod";
732
+ var solanaAddressSchema = z7.string().min(32).max(44).regex(/^[1-9A-HJ-NP-Za-km-z]+$/);
733
+ var walletConnectionSchema = z7.object({
734
+ chain: z7.literal("solana"),
643
735
  address: solanaAddressSchema,
644
- verifiedAt: z6.number().int().nonnegative(),
645
- revision: z6.number().int().positive()
736
+ verifiedAt: z7.number().int().nonnegative(),
737
+ revision: z7.number().int().positive()
646
738
  }).strict();
647
- var walletChallengeInputSchema = z6.object({
648
- chain: z6.literal("solana"),
739
+ var walletChallengeInputSchema = z7.object({
740
+ chain: z7.literal("solana"),
649
741
  address: solanaAddressSchema
650
742
  }).strict();
651
743
  var walletChallengeSchema = walletChallengeInputSchema.extend({
652
- id: z6.string().uuid(),
653
- message: z6.string(),
654
- expiresAt: z6.number()
744
+ id: z7.string().uuid(),
745
+ message: z7.string(),
746
+ expiresAt: z7.number()
655
747
  });
656
- var walletProofSchema = z6.object({
657
- challenge: z6.string().uuid(),
658
- signature: z6.string().min(64).max(88).regex(/^[1-9A-HJ-NP-Za-km-z]+$/)
748
+ var walletProofSchema = z7.object({
749
+ challenge: z7.string().uuid(),
750
+ signature: z7.string().min(64).max(88).regex(/^[1-9A-HJ-NP-Za-km-z]+$/)
659
751
  }).strict();
660
- var solanaBalanceSchema = z6.object({
752
+ var solanaBalanceSchema = z7.object({
661
753
  address: solanaAddressSchema,
662
- network: z6.literal("mainnet-beta"),
663
- lamports: z6.string().regex(/^(0|[1-9][0-9]*)$/),
664
- slot: z6.number().int().nonnegative().safe(),
665
- observedAt: z6.number().int().nonnegative()
754
+ network: z7.literal("mainnet-beta"),
755
+ lamports: z7.string().regex(/^(0|[1-9][0-9]*)$/),
756
+ slot: z7.number().int().nonnegative().safe(),
757
+ observedAt: z7.number().int().nonnegative()
666
758
  }).strict();
667
- var walletChainSchema = z6.enum(["solana", "eip155", "cosmos"]);
759
+ var walletChainSchema = z7.enum(["solana", "eip155", "cosmos"]);
668
760
  var cosmosNetworkPattern = /^cosmos:[-_a-zA-Z0-9]{1,32}$/;
669
- var cosmosNetworkSchema = z6.custom(
761
+ var cosmosNetworkSchema = z7.custom(
670
762
  (value) => typeof value === "string" && cosmosNetworkPattern.test(value),
671
763
  "Use a Cosmos network: cosmos:<chain ID>"
672
764
  );
@@ -692,51 +784,51 @@ function cosmosChain(chain) {
692
784
  return { ...value, network };
693
785
  }
694
786
  var solanaMainnet = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
695
- var evmAddressSchema = z6.string().regex(/^0x[0-9a-fA-F]{40}$/);
696
- var cosmosAddressSchema = z6.string().min(8).max(90).regex(
787
+ var evmAddressSchema = z7.string().regex(/^0x[0-9a-fA-F]{40}$/);
788
+ var cosmosAddressSchema = z7.string().min(8).max(90).regex(
697
789
  /^(?:[a-z][a-z0-9]{0,82}1[02-9ac-hj-np-z]{38,}|[A-Z][A-Z0-9]{0,82}1[02-9AC-HJ-NP-Z]{38,})$/
698
790
  );
699
- var walletAddressInputSchema = z6.discriminatedUnion("chain", [
700
- z6.object({ chain: z6.literal("solana"), address: solanaAddressSchema }).strict(),
701
- z6.object({
702
- chain: z6.literal("eip155"),
791
+ var walletAddressInputSchema = z7.discriminatedUnion("chain", [
792
+ z7.object({ chain: z7.literal("solana"), address: solanaAddressSchema }).strict(),
793
+ z7.object({
794
+ chain: z7.literal("eip155"),
703
795
  address: evmAddressSchema,
704
796
  /** Shown in the sign-in message's Chain ID line only: links are chain-agnostic. Defaults to 1. */
705
- chainId: z6.number().int().positive().safe().optional()
797
+ chainId: z7.number().int().positive().safe().optional()
706
798
  }).strict(),
707
- z6.object({
708
- chain: z6.literal("cosmos"),
799
+ z7.object({
800
+ chain: z7.literal("cosmos"),
709
801
  network: cosmosNetworkSchema,
710
802
  address: cosmosAddressSchema
711
803
  }).strict()
712
804
  ]);
713
- var walletMessageChallengeSchema = z6.object({
714
- id: z6.string().min(1).max(200),
715
- purpose: z6.enum(["link", "sign-in"]),
805
+ var walletMessageChallengeSchema = z7.object({
806
+ id: z7.string().min(1).max(200),
807
+ purpose: z7.enum(["link", "sign-in"]),
716
808
  chain: walletChainSchema,
717
809
  network: cosmosNetworkSchema.nullable(),
718
810
  /** Canonical (base58, EIP-55 or lowercase bech32). The signer must sign with this address. */
719
- address: z6.string(),
720
- message: z6.string().max(4096),
721
- expiresAt: z6.number().int()
811
+ address: z7.string(),
812
+ message: z7.string().max(4096),
813
+ expiresAt: z7.number().int()
722
814
  });
723
- var walletSignatureSchema = z6.object({
724
- challenge: z6.string().min(1).max(200),
815
+ var walletSignatureSchema = z7.object({
816
+ challenge: z7.string().min(1).max(200),
725
817
  /** solana: base58, 64 bytes · eip155: 0x and 130 hex digits (65 bytes) · cosmos: base64, 64 bytes (r‖s) */
726
- signature: z6.string().min(1).max(256),
818
+ signature: z7.string().min(1).max(256),
727
819
  /** cosmos only: the base64 33-byte compressed secp256k1 key from signArbitrary's pub_key.value */
728
- publicKey: z6.string().max(128).optional()
820
+ publicKey: z7.string().max(128).optional()
729
821
  }).strict();
730
- var linkedWalletSchema = z6.object({
822
+ var linkedWalletSchema = z7.object({
731
823
  chain: walletChainSchema,
732
824
  network: cosmosNetworkSchema.nullable(),
733
- address: z6.string(),
734
- verifiedAt: z6.number().int().nonnegative(),
735
- revision: z6.number().int().positive(),
825
+ address: z7.string(),
826
+ verifiedAt: z7.number().int().nonnegative(),
827
+ revision: z7.number().int().positive(),
736
828
  /** True when this wallet can sign in: it was first used through wallet sign-in. Linking never enables sign-in. */
737
- signIn: z6.boolean()
829
+ signIn: z7.boolean()
738
830
  });
739
- var walletUnlinkInputSchema = z6.object({ chain: walletChainSchema, address: z6.string().min(1).max(100) }).strict();
831
+ var walletUnlinkInputSchema = z7.object({ chain: walletChainSchema, address: z7.string().min(1).max(100) }).strict();
740
832
  async function walletAddressInput(signer) {
741
833
  const address = await signer.address();
742
834
  switch (signer.chain) {
@@ -750,17 +842,20 @@ async function walletAddressInput(signer) {
750
842
  };
751
843
  case "cosmos":
752
844
  if (!signer.network) {
753
- throw new Error("Choose the Cosmos chain for this wallet");
845
+ throw clientError(
846
+ "Choose the Cosmos chain for this wallet",
847
+ RelayErrorCode.InvalidInput
848
+ );
754
849
  }
755
850
  return { chain: "cosmos", network: signer.network, address };
756
851
  }
757
852
  }
758
853
  var WALLETS_PER_CHAIN = 5;
759
854
  var walletSignInFamilies = ["solana", "eip155", "cosmos"];
760
- var walletSignInNetworkSchema = z6.union([z6.enum(walletSignInFamilies), z6.string().regex(cosmosNetworkPattern)]).transform(
855
+ var walletSignInNetworkSchema = z7.union([z7.enum(walletSignInFamilies), z7.string().regex(cosmosNetworkPattern)]).transform(
761
856
  (value) => value.startsWith("cosmos:") ? "cosmos" : value
762
857
  );
763
- var walletSignInNetworksSchema = z6.array(walletSignInNetworkSchema).transform(
858
+ var walletSignInNetworksSchema = z7.array(walletSignInNetworkSchema).transform(
764
859
  (values) => walletSignInFamilies.filter((family) => values.includes(family))
765
860
  );
766
861
  function walletSignInNetwork(wallet) {
@@ -783,24 +878,24 @@ function caip10(wallet, network) {
783
878
  function isEvmChainId(value) {
784
879
  return /^eip155:[1-9][0-9]{0,15}$/.test(value);
785
880
  }
786
- var evmChainIdSchema = z6.custom(
881
+ var evmChainIdSchema = z7.custom(
787
882
  (value) => typeof value === "string" && isEvmChainId(value),
788
883
  'Use an EVM chain ID such as "eip155:8453"'
789
884
  );
790
- var units = z6.string().regex(/^(0|[1-9][0-9]*)$/);
791
- var walletBalanceSchema = z6.object({
885
+ var units = z7.string().regex(/^(0|[1-9][0-9]*)$/);
886
+ var walletBalanceSchema = z7.object({
792
887
  /** Canonical CAIP-2 ID: `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` or `eip155:<chain ID>`. */
793
- chain: z6.string(),
888
+ chain: z7.string(),
794
889
  /** The canonical mint (base58) or EIP-55 contract address; null for the native coin. */
795
- token: z6.string().nullable(),
890
+ token: z7.string().nullable(),
796
891
  /** Null only for an ERC-20 contract without `decimals()`. */
797
- decimals: z6.number().int().min(0).max(255).nullable(),
892
+ decimals: z7.number().int().min(0).max(255).nullable(),
798
893
  /** The sum over `wallets`. */
799
894
  total: units,
800
- wallets: z6.array(z6.object({ address: z6.string(), amount: units }).strict()),
895
+ wallets: z7.array(z7.object({ address: z7.string(), amount: units }).strict()),
801
896
  /** Solana: the lowest slot the reads saw. EVM: the latest block when the read started (approximate). */
802
- at: z6.object({ kind: z6.enum(["slot", "block"]), number: units }).strict(),
803
- observedAt: z6.number().int().nonnegative()
897
+ at: z7.object({ kind: z7.enum(["slot", "block"]), number: units }).strict(),
898
+ observedAt: z7.number().int().nonnegative()
804
899
  }).strict();
805
900
 
806
901
  export {
@@ -824,6 +919,13 @@ export {
824
919
  engagementBoundaryPageSchema,
825
920
  engagementArtifactSchema,
826
921
  engagementDeploymentEntrySchema,
922
+ isRequestError,
923
+ RequestError,
924
+ RelayErrorCode,
925
+ isRelayError,
926
+ RelayError,
927
+ clientError,
928
+ parseInput,
827
929
  profileVisibilitySchema,
828
930
  avatarProviderSchema,
829
931
  profileDefaultProviderSchema,