@domino-sdk/relay 1.50.0 → 1.52.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 (51) hide show
  1. package/dist/{attempt-captures-DF--rIgJ.d.ts → attempt-captures-QC4kTA44.d.ts} +2 -1
  2. package/dist/authoring.d.ts +59 -49
  3. package/dist/authoring.js +21 -5
  4. package/dist/{automatic-outcomes-C7f5-N0M.d.ts → automatic-outcomes-CVyZHxir.d.ts} +1 -1
  5. package/dist/browser.d.ts +6 -6
  6. package/dist/browser.js +10 -10
  7. package/dist/{chunk-MMR6CZEJ.js → chunk-2NUD237O.js} +1 -1
  8. package/dist/{chunk-DP7FGRUW.js → chunk-53JMTUWG.js} +1 -1
  9. package/dist/{chunk-56THZOIA.js → chunk-6AMIMYRD.js} +4 -4
  10. package/dist/{chunk-GYXYZL5E.js → chunk-7BNCLWAO.js} +1 -1
  11. package/dist/{chunk-DMG7CCMX.js → chunk-ACVBQK55.js} +1 -1
  12. package/dist/{chunk-K7CBVB3P.js → chunk-B44SRIQ4.js} +8 -8
  13. package/dist/{chunk-SGWAVIEP.js → chunk-CCE2JWES.js} +1 -1
  14. package/dist/{chunk-PBCJDKCV.js → chunk-EFSAQESN.js} +2 -2
  15. package/dist/{chunk-7WVTYMFA.js → chunk-GTQJSDBS.js} +6 -6
  16. package/dist/{chunk-VTD4YDEO.js → chunk-IELNFM3V.js} +581 -537
  17. package/dist/{chunk-3LK6JIBY.js → chunk-K6TVMNU4.js} +1 -1
  18. package/dist/{chunk-CHURQQBP.js → chunk-LPHXTZDA.js} +2 -2
  19. package/dist/{chunk-O5WR2JT4.js → chunk-S2PMKZSX.js} +1 -1
  20. package/dist/{chunk-W3SQLZRA.js → chunk-XFAYQFRO.js} +1 -1
  21. package/dist/{chunk-NAEVXBSF.js → chunk-YVC3B72P.js} +1 -1
  22. package/dist/{chunk-4Y5AYL3C.js → chunk-ZJ3FVZRP.js} +2 -2
  23. package/dist/{client-C5sCO45H.d.ts → client-CzNtl8UO.d.ts} +4 -4
  24. package/dist/{deployments-DQX7Yz5x.d.ts → deployments-DkoBtC5t.d.ts} +241 -241
  25. package/dist/{groups-DG7_3ipk.d.ts → groups-B5R1RCsl.d.ts} +1 -1
  26. package/dist/index.d.ts +7 -7
  27. package/dist/index.js +9 -9
  28. package/dist/internal.d.ts +9 -9
  29. package/dist/internal.js +8 -8
  30. package/dist/{offers-yZTUWHSp.d.ts → offers-CH1RZekg.d.ts} +2 -2
  31. package/dist/{pages-DLFRK5l7.d.ts → pages-BTlOg8sl.d.ts} +1 -1
  32. package/dist/portal-proxy.js +3 -3
  33. package/dist/react/index.d.ts +8 -8
  34. package/dist/react/index.js +10 -10
  35. package/dist/runtime/authoring.js +1 -1
  36. package/dist/runtime/chunks/AVRVSLHX.js +1 -0
  37. package/dist/runtime/manifest.json +3 -3
  38. package/dist/runtime/schema.js +1 -1
  39. package/dist/{schema-6uU1s4if.d.ts → schema-BJ9bOgpN.d.ts} +1 -0
  40. package/dist/schema.d.ts +357 -343
  41. package/dist/schema.js +9 -7
  42. package/dist/server/index.d.ts +9 -9
  43. package/dist/server/index.js +58 -14
  44. package/dist/{submission-input-DtNMoL30.d.ts → submission-input-BNah53go.d.ts} +2 -2
  45. package/dist/{telegram-browser-DE9d1M-g.d.ts → telegram-browser-C36j_6v-.d.ts} +1 -1
  46. package/dist/testing.d.ts +3 -3
  47. package/dist/testing.js +5 -5
  48. package/dist/{transport-E82gSEB-.d.ts → transport-B8w9oqCY.d.ts} +3431 -3326
  49. package/dist/{x-B6mbKgoQ.d.ts → x-BfQcsDp0.d.ts} +1 -1
  50. package/package.json +1 -1
  51. package/dist/runtime/chunks/4O3MZT45.js +0 -1
@@ -1,4 +1,4 @@
1
- import { O as OpenIdentityKind } from './schema-6uU1s4if.js';
1
+ import { O as OpenIdentityKind } from './schema-BJ9bOgpN.js';
2
2
  import * as z from 'zod';
3
3
 
4
4
  /** One capability call of the captured evaluation run, as Relay stored it. */
@@ -249,6 +249,7 @@ declare const attemptCaptureSchema: z.ZodObject<{
249
249
  }, z.core.$strict>, z.ZodObject<{
250
250
  kind: z.ZodLiteral<"reject">;
251
251
  reason: z.ZodString;
252
+ code: z.ZodOptional<z.ZodString>;
252
253
  requestedReview: z.ZodOptional<z.ZodLiteral<true>>;
253
254
  }, z.core.$strict>, z.ZodObject<{
254
255
  kind: z.ZodLiteral<"review">;
@@ -1,18 +1,18 @@
1
- import { x as xContentBodySchema, I as IdentityKind, n as customSourceSchema, W as WithRecordData, o as WithContent, p as WithAccountRoles, q as ResourceHandle, r as QuestHandle, L as LedgerReference, G as GroupHandle, u as TrackerSource, v as trackerDefinitionSchema, y as Tracker, z as TrackerData, B as SourceRoles, C as LedgerHandle, D as TrackerDataSchema, F as xSearchSourceSchema, X as XTweet, H as XContentMetric, J as TrackerTriggerPolicy, N as Where, P as MemberIdentity, U as TrackerTriggerContext, V as TrackerReader, Y as TextReviewInput, Z as TextResult, _ as PhotoResult, $ as Decision, a0 as rewardSchema, a1 as TrackerTriggerMode, a2 as RoleOf, a3 as WhereSetting, a4 as ContentBody, a5 as BadgeHandle, a6 as ContentMetricName, a7 as triggerSchema, d as QuestPresentation, e as QuestProfile, f as QuizEvidence, a8 as TieredRewardDefinition } from './schema-6uU1s4if.js';
2
- export { a9 as LedgerSetting, aa as TrackerPage, ab as TrackerReadQuery, ac as trackerDataSchema, ad as trackerTriggerContextSchema } from './schema-6uU1s4if.js';
1
+ import { x as xContentBodySchema, I as IdentityKind, n as customSourceSchema, W as WithRecordData, o as WithContent, p as WithAccountRoles, q as ResourceHandle, r as QuestHandle, L as LedgerReference, G as GroupHandle, u as TrackerSource, v as trackerDefinitionSchema, y as Tracker, z as TrackerData, B as SourceRoles, C as LedgerHandle, D as TrackerDataSchema, F as xSearchSourceSchema, X as XTweet, H as XContentMetric, J as TrackerTriggerPolicy, N as Where, P as MemberIdentity, U as TrackerTriggerContext, V as TrackerReader, Y as TextReviewInput, Z as TextResult, _ as PhotoResult, $ as Decision, a0 as rewardSchema, a1 as TrackerTriggerMode, a2 as RoleOf, a3 as WhereSetting, a4 as ContentBody, a5 as BadgeHandle, a6 as ContentMetricName, a7 as triggerSchema, d as QuestPresentation, e as QuestProfile, f as QuizEvidence, a8 as TieredRewardDefinition } from './schema-BJ9bOgpN.js';
2
+ export { a9 as LedgerSetting, aa as TrackerPage, ab as TrackerReadQuery, ac as trackerDataSchema, ad as trackerTriggerContextSchema } from './schema-BJ9bOgpN.js';
3
3
  import * as z from 'zod';
4
4
  export { z } from 'zod';
5
- import { f as badgeDeclarationSchema, B as Badge } from './offers-yZTUWHSp.js';
6
- export { g as defineOffer } from './offers-yZTUWHSp.js';
7
- import { E as EngagementBudget, s as leaderboardDefinitionSchema, t as AuthoringIdentity, u as pointLedgerDeclarationSchema, v as referralAuthoringSchema, C as CampaignDefinition, A as AvailabilityWindow } from './groups-DG7_3ipk.js';
8
- export { w as defineCampaign, x as defineGroup } from './groups-DG7_3ipk.js';
5
+ import { f as badgeDeclarationSchema, B as Badge } from './offers-CH1RZekg.js';
6
+ export { g as defineOffer } from './offers-CH1RZekg.js';
7
+ import { E as EngagementBudget, s as leaderboardDefinitionSchema, t as AuthoringIdentity, u as pointLedgerDeclarationSchema, v as referralAuthoringSchema, C as CampaignDefinition, A as AvailabilityWindow } from './groups-B5R1RCsl.js';
8
+ export { w as defineCampaign, x as defineGroup } from './groups-B5R1RCsl.js';
9
9
  import { d as discordMessagesSourceSchema, D as DiscordMessageData, c as DiscordMessageTextData, e as discordReactionsSourceSchema, f as DiscordReactionData, g as TelegramReader, h as DiscordReader } from './accounts-DRPENuZe.js';
10
10
  export { i as TelegramChatMember, j as TelegramChatMemberStatus, k as TelegramReactionData } from './accounts-DRPENuZe.js';
11
11
  import { Q as QuizContent, a as StreakPolicy } from './streaks-0YuipsUQ.js';
12
12
  import { R as ResourceSource, S as Setting, I as IntegrationModule, B as Budget, a as IntegerSettings } from './integrations-CllF-kWg.js';
13
- import { P as Prerequisite, T as TextEvidence, U as UrlEvidence, a as TextOptions, b as UrlOptions } from './submission-input-DtNMoL30.js';
14
- export { c as balanceAtLeast, d as completed, i as inGroup } from './submission-input-DtNMoL30.js';
15
- import { I as ImageReader, X as XReader } from './x-B6mbKgoQ.js';
13
+ import { P as Prerequisite, T as TextEvidence, U as UrlEvidence, a as TextOptions, b as UrlOptions } from './submission-input-BNah53go.js';
14
+ export { c as balanceAtLeast, d as completed, i as inGroup } from './submission-input-BNah53go.js';
15
+ import { I as ImageReader, X as XReader } from './x-BfQcsDp0.js';
16
16
  import { h as WalletReader } from './wallet-Ac7OFpOr.js';
17
17
  export { i as CosmosDenom, a as CosmosNetwork, E as EvmChainId, j as WalletBalance, k as WalletBalanceQuery, l as cosmosDenomSchema, m as cosmosNetworkSchema, n as isEvmChainId } from './wallet-Ac7OFpOr.js';
18
18
  export { C as CapabilityError, a as CapabilityErrorCode, c as capabilityErrorCodes } from './capability-error-FQGGb5xS.js';
@@ -260,8 +260,8 @@ declare function defineLeaderboard(input: Omit<LeaderboardInput, "key" | "id" |
260
260
  kind: "earned";
261
261
  }> | ReturnType<typeof earned>;
262
262
  }): {
263
- title: string;
264
263
  balance: string;
264
+ title: string;
265
265
  access: "participants" | "public";
266
266
  score: {
267
267
  kind: "balance";
@@ -450,7 +450,7 @@ declare const telegram: {
450
450
  reactions(): {
451
451
  kind: "custom";
452
452
  namespace: string;
453
- identities?: ("discord" | "member" | "wallet" | "x" | `app:${string}`)[] | undefined;
453
+ identities?: ("discord" | "wallet" | "x" | "member" | `app:${string}`)[] | undefined;
454
454
  accounts?: string[] | undefined;
455
455
  data?: TrackerDataSchema | undefined;
456
456
  content?: {
@@ -889,6 +889,7 @@ type PerformanceOutcome = {
889
889
  } | {
890
890
  kind: "reject";
891
891
  reason: string;
892
+ code?: string;
892
893
  };
893
894
  declare function accept(): {
894
895
  kind: "accept";
@@ -922,11 +923,20 @@ declare const decision: {
922
923
  }>, "kind">) => Extract<Decision, {
923
924
  kind: "progress";
924
925
  }>;
926
+ /**
927
+ * Rejects the attempt with `reason`, which the member sees. `code` is an optional stable key for
928
+ * the cause, such as `wrong-answers`, stored as the attempt's `code` for operators and never
929
+ * shown to members: lowercase letters, digits and hyphens, at most 64 characters, and none of
930
+ * the codes Relay writes itself, such as `budget-exhausted`. Keep one code per distinct cause,
931
+ * and keep it when you reword the reason.
932
+ */
925
933
  reject: (options: {
926
934
  reason: string;
935
+ code?: string;
927
936
  }) => {
928
937
  kind: "reject";
929
938
  reason: string;
939
+ code?: string;
930
940
  };
931
941
  review: typeof review;
932
942
  };
@@ -1138,15 +1148,15 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1138
1148
  group?: string | undefined;
1139
1149
  };
1140
1150
  tier: string;
1151
+ } | {
1152
+ kind: "points";
1153
+ balance: string;
1154
+ amount: number;
1141
1155
  } | {
1142
1156
  kind: "integration";
1143
1157
  provider: "discord";
1144
1158
  action: "grant-role";
1145
1159
  roleId: string;
1146
- } | {
1147
- kind: "points";
1148
- balance: string;
1149
- amount: number;
1150
1160
  })[] | ((ctx: {
1151
1161
  settings: z.core.$InferObjectOutput<T, {}>;
1152
1162
  }) => Reward[]);
@@ -1221,6 +1231,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1221
1231
  kind: "resource";
1222
1232
  default: string;
1223
1233
  source: {
1234
+ provider: "domino";
1235
+ resource: "point-ledger";
1236
+ } | {
1224
1237
  provider: "discord";
1225
1238
  resource: "channel";
1226
1239
  types: ("text" | "announcement")[];
@@ -1228,9 +1241,6 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1228
1241
  provider: "discord";
1229
1242
  resource: "role";
1230
1243
  assignable: boolean;
1231
- } | {
1232
- provider: "domino";
1233
- resource: "point-ledger";
1234
1244
  };
1235
1245
  label: string;
1236
1246
  description?: string | undefined;
@@ -1305,15 +1315,15 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1305
1315
  group?: string | undefined;
1306
1316
  };
1307
1317
  tier: string;
1318
+ } | {
1319
+ kind: "points";
1320
+ balance: string;
1321
+ amount: number;
1308
1322
  } | {
1309
1323
  kind: "integration";
1310
1324
  provider: "discord";
1311
1325
  action: "grant-role";
1312
1326
  roleId: string;
1313
- } | {
1314
- kind: "points";
1315
- balance: string;
1316
- amount: number;
1317
1327
  })[];
1318
1328
  humanReview: boolean;
1319
1329
  trigger: {
@@ -1335,7 +1345,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1335
1345
  actor?: "staff" | "member" | undefined;
1336
1346
  } | {
1337
1347
  kind: "manual";
1338
- input: "none" | "quiz" | "photo";
1348
+ input: "photo" | "quiz" | "none";
1339
1349
  actor?: "staff" | "member" | undefined;
1340
1350
  } | {
1341
1351
  kind: "automatic";
@@ -1379,9 +1389,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1379
1389
  path: string;
1380
1390
  equals: string | number | boolean;
1381
1391
  })[] | undefined;
1382
- enrollment?: "none" | "required" | undefined;
1383
- since?: "window" | "activation" | "enrollment" | undefined;
1384
- historical?: "staff" | "claim" | "automatic" | undefined;
1392
+ enrollment?: "required" | "none" | undefined;
1393
+ since?: "activation" | "window" | "enrollment" | undefined;
1394
+ historical?: "automatic" | "staff" | "claim" | undefined;
1385
1395
  content?: true | undefined;
1386
1396
  } | undefined;
1387
1397
  };
@@ -1404,6 +1414,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1404
1414
  title: string;
1405
1415
  })[];
1406
1416
  completion: {
1417
+ kind: "streak";
1418
+ days: number;
1419
+ } | {
1407
1420
  kind: "progress";
1408
1421
  goal: {
1409
1422
  kind: "count";
@@ -1420,9 +1433,6 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1420
1433
  durationMs: number;
1421
1434
  };
1422
1435
  repeat: "repeat" | "once";
1423
- } | {
1424
- kind: "streak";
1425
- days: number;
1426
1436
  } | {
1427
1437
  kind: "once";
1428
1438
  } | {
@@ -1448,7 +1458,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1448
1458
  campaign?: {
1449
1459
  key: string;
1450
1460
  title: string;
1451
- enrollment: "none" | "required";
1461
+ enrollment: "required" | "none";
1452
1462
  window?: {
1453
1463
  from: number;
1454
1464
  until: number;
@@ -1571,15 +1581,15 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1571
1581
  group?: string | undefined;
1572
1582
  };
1573
1583
  tier: string;
1584
+ } | {
1585
+ kind: "points";
1586
+ balance: string;
1587
+ amount: number;
1574
1588
  } | {
1575
1589
  kind: "integration";
1576
1590
  provider: "discord";
1577
1591
  action: "grant-role";
1578
1592
  roleId: string;
1579
- } | {
1580
- kind: "points";
1581
- balance: string;
1582
- amount: number;
1583
1593
  })[] | ((ctx: {
1584
1594
  settings: z.core.$InferObjectOutput<T, {}>;
1585
1595
  }) => Reward[]);
@@ -1654,6 +1664,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1654
1664
  kind: "resource";
1655
1665
  default: string;
1656
1666
  source: {
1667
+ provider: "domino";
1668
+ resource: "point-ledger";
1669
+ } | {
1657
1670
  provider: "discord";
1658
1671
  resource: "channel";
1659
1672
  types: ("text" | "announcement")[];
@@ -1661,9 +1674,6 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1661
1674
  provider: "discord";
1662
1675
  resource: "role";
1663
1676
  assignable: boolean;
1664
- } | {
1665
- provider: "domino";
1666
- resource: "point-ledger";
1667
1677
  };
1668
1678
  label: string;
1669
1679
  description?: string | undefined;
@@ -1738,15 +1748,15 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1738
1748
  group?: string | undefined;
1739
1749
  };
1740
1750
  tier: string;
1751
+ } | {
1752
+ kind: "points";
1753
+ balance: string;
1754
+ amount: number;
1741
1755
  } | {
1742
1756
  kind: "integration";
1743
1757
  provider: "discord";
1744
1758
  action: "grant-role";
1745
1759
  roleId: string;
1746
- } | {
1747
- kind: "points";
1748
- balance: string;
1749
- amount: number;
1750
1760
  })[];
1751
1761
  humanReview: boolean;
1752
1762
  trigger: {
@@ -1768,7 +1778,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1768
1778
  actor?: "staff" | "member" | undefined;
1769
1779
  } | {
1770
1780
  kind: "manual";
1771
- input: "none" | "quiz" | "photo";
1781
+ input: "photo" | "quiz" | "none";
1772
1782
  actor?: "staff" | "member" | undefined;
1773
1783
  } | {
1774
1784
  kind: "automatic";
@@ -1812,9 +1822,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1812
1822
  path: string;
1813
1823
  equals: string | number | boolean;
1814
1824
  })[] | undefined;
1815
- enrollment?: "none" | "required" | undefined;
1816
- since?: "window" | "activation" | "enrollment" | undefined;
1817
- historical?: "staff" | "claim" | "automatic" | undefined;
1825
+ enrollment?: "required" | "none" | undefined;
1826
+ since?: "activation" | "window" | "enrollment" | undefined;
1827
+ historical?: "automatic" | "staff" | "claim" | undefined;
1818
1828
  content?: true | undefined;
1819
1829
  } | undefined;
1820
1830
  };
@@ -1837,6 +1847,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1837
1847
  title: string;
1838
1848
  })[];
1839
1849
  completion: {
1850
+ kind: "streak";
1851
+ days: number;
1852
+ } | {
1840
1853
  kind: "progress";
1841
1854
  goal: {
1842
1855
  kind: "count";
@@ -1853,9 +1866,6 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1853
1866
  durationMs: number;
1854
1867
  };
1855
1868
  repeat: "repeat" | "once";
1856
- } | {
1857
- kind: "streak";
1858
- days: number;
1859
1869
  } | {
1860
1870
  kind: "once";
1861
1871
  } | {
@@ -1881,7 +1891,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1881
1891
  campaign?: {
1882
1892
  key: string;
1883
1893
  title: string;
1884
- enrollment: "none" | "required";
1894
+ enrollment: "required" | "none";
1885
1895
  window?: {
1886
1896
  from: number;
1887
1897
  until: number;
package/dist/authoring.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  sourceDataSchema,
11
11
  sourceRoles,
12
12
  validateQuestShape
13
- } from "./chunk-O5WR2JT4.js";
13
+ } from "./chunk-S2PMKZSX.js";
14
14
  import {
15
15
  badgeDeclarationSchema,
16
16
  defineOffer,
@@ -20,11 +20,11 @@ import {
20
20
  leaderboardAuthoringSchema,
21
21
  pointLedgerDeclarationSchema,
22
22
  referralAuthoringSchema
23
- } from "./chunk-SGWAVIEP.js";
23
+ } from "./chunk-CCE2JWES.js";
24
24
  import {
25
25
  telegramReactionDataSchema,
26
26
  telegramReactionsNamespace
27
- } from "./chunk-MMR6CZEJ.js";
27
+ } from "./chunk-2NUD237O.js";
28
28
  import {
29
29
  authoringKey,
30
30
  badgeReward,
@@ -60,6 +60,7 @@ import {
60
60
  questDescriptionSchema,
61
61
  quizAnswersSchema,
62
62
  quizContentSchema,
63
+ rejectCodeIssue,
63
64
  resourceHandle,
64
65
  resourceSourceSchema,
65
66
  retryCooldownMsSchema,
@@ -83,7 +84,7 @@ import {
83
84
  whereSchemaIssue,
84
85
  whereSettings,
85
86
  xSearchSourceSchema
86
- } from "./chunk-VTD4YDEO.js";
87
+ } from "./chunk-IELNFM3V.js";
87
88
 
88
89
  // src/builders.ts
89
90
  import * as z from "zod";
@@ -553,12 +554,25 @@ var decision = {
553
554
  kind: "progress",
554
555
  ...options
555
556
  }),
557
+ /**
558
+ * Rejects the attempt with `reason`, which the member sees. `code` is an optional stable key for
559
+ * the cause, such as `wrong-answers`, stored as the attempt's `code` for operators and never
560
+ * shown to members: lowercase letters, digits and hyphens, at most 64 characters, and none of
561
+ * the codes Relay writes itself, such as `budget-exhausted`. Keep one code per distinct cause,
562
+ * and keep it when you reword the reason.
563
+ */
556
564
  reject: (options) => ({
557
565
  kind: "reject",
558
566
  ...options
559
567
  }),
560
568
  review
561
569
  };
570
+ function assertRejectCode(result) {
571
+ const issue = result.kind === "reject" && result.code !== void 0 ? rejectCodeIssue(result.code) : null;
572
+ if (issue) {
573
+ throw new Error(issue);
574
+ }
575
+ }
562
576
  var evaluators = {
563
577
  quiz(answerKey, options = {}) {
564
578
  const expected = quizAnswersSchema.parse(answerKey);
@@ -753,6 +767,7 @@ function questBuilder(template) {
753
767
  "A performance evaluator cannot select rewards. It gates the rewards content evaluation selected: return accept, review or reject with a reason only."
754
768
  );
755
769
  }
770
+ assertRejectCode(result2);
756
771
  return decisionSchema.parse(
757
772
  result2.kind === "accept" ? { kind: "accept", rewards: sample.rewards } : result2.kind === "review" && ctx.humanReview ? {
758
773
  kind: "review",
@@ -761,7 +776,7 @@ function questBuilder(template) {
761
776
  } : {
762
777
  kind: "reject",
763
778
  reason: result2.reason,
764
- ...result2.kind === "review" ? { requestedReview: true } : {}
779
+ ...result2.kind === "review" ? { requestedReview: true } : result2.code === void 0 ? {} : { code: result2.code }
765
780
  }
766
781
  );
767
782
  }
@@ -786,6 +801,7 @@ function questBuilder(template) {
786
801
  if (!result) {
787
802
  throw new Error("Evaluator returned no decision");
788
803
  }
804
+ assertRejectCode(result);
789
805
  if (result.kind === "review" && !ctx.humanReview) {
790
806
  return decisionSchema.parse({
791
807
  kind: "reject",
@@ -1,5 +1,5 @@
1
1
  import * as z from 'zod';
2
- import { a as AttemptStatus } from './schema-6uU1s4if.js';
2
+ import { a as AttemptStatus } from './schema-BJ9bOgpN.js';
3
3
 
4
4
  declare const collectionCodeSchema: z.ZodString;
5
5
  declare const collectionPassSchema: z.ZodObject<{
package/dist/browser.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { o as SubmissionStore, f as RelayClientOptions, R as RelayClient } from './client-C5sCO45H.js';
2
- export { C as CosmosChains, D as DiscoveredWallet, E as Eip1193Provider, a as EmailSignInOption, K as KeplrLike, O as OAuthSignInOption, S as SignInClient, b as SignInIcon, c as SignInMethods, d as SignInOption, e as SignInOptions, f as SignInUnavailable, g as SignInWallet, h as SolanaInjectedProvider, i as StandardWallet, j as StandardWalletAccount, T as TelegramSignInOption, W as WalletSignInOption, k as cosmosChainList, l as cosmosSigner, m as discoverCosmosWallets, n as discoverEvmWallets, o as discoverSignInWallets, p as discoverSolanaWallets, q as evmSigner, s as signInOptions, r as solanaSigner, t as telegramMiniAppInitData, w as walletStandardSolanaSigner } from './telegram-browser-DE9d1M-g.js';
3
- import './groups-DG7_3ipk.js';
1
+ import { o as SubmissionStore, f as RelayClientOptions, R as RelayClient } from './client-CzNtl8UO.js';
2
+ export { C as CosmosChains, D as DiscoveredWallet, E as Eip1193Provider, a as EmailSignInOption, K as KeplrLike, O as OAuthSignInOption, S as SignInClient, b as SignInIcon, c as SignInMethods, d as SignInOption, e as SignInOptions, f as SignInUnavailable, g as SignInWallet, h as SolanaInjectedProvider, i as StandardWallet, j as StandardWalletAccount, T as TelegramSignInOption, W as WalletSignInOption, k as cosmosChainList, l as cosmosSigner, m as discoverCosmosWallets, n as discoverEvmWallets, o as discoverSignInWallets, p as discoverSolanaWallets, q as evmSigner, s as signInOptions, r as solanaSigner, t as telegramMiniAppInitData, w as walletStandardSolanaSigner } from './telegram-browser-C36j_6v-.js';
3
+ import './groups-B5R1RCsl.js';
4
4
  import 'zod';
5
- import './schema-6uU1s4if.js';
6
- import './pages-DLFRK5l7.js';
7
- import './submission-input-DtNMoL30.js';
5
+ import './schema-BJ9bOgpN.js';
6
+ import './pages-BTlOg8sl.js';
7
+ import './submission-input-BNah53go.js';
8
8
  import './action-DBzILFx9.js';
9
9
  import './participant-activity-iciCEs_8.js';
10
10
  import './accounts-DRPENuZe.js';
package/dist/browser.js CHANGED
@@ -12,16 +12,16 @@ import {
12
12
  solanaSigner,
13
13
  telegramMiniAppInitData,
14
14
  walletStandardSolanaSigner
15
- } from "./chunk-PBCJDKCV.js";
16
- import "./chunk-K7CBVB3P.js";
17
- import "./chunk-NAEVXBSF.js";
18
- import "./chunk-4Y5AYL3C.js";
19
- import "./chunk-SGWAVIEP.js";
20
- import "./chunk-MMR6CZEJ.js";
21
- import "./chunk-W3SQLZRA.js";
22
- import "./chunk-DMG7CCMX.js";
23
- import "./chunk-DP7FGRUW.js";
24
- import "./chunk-VTD4YDEO.js";
15
+ } from "./chunk-EFSAQESN.js";
16
+ import "./chunk-B44SRIQ4.js";
17
+ import "./chunk-YVC3B72P.js";
18
+ import "./chunk-ZJ3FVZRP.js";
19
+ import "./chunk-CCE2JWES.js";
20
+ import "./chunk-2NUD237O.js";
21
+ import "./chunk-XFAYQFRO.js";
22
+ import "./chunk-ACVBQK55.js";
23
+ import "./chunk-53JMTUWG.js";
24
+ import "./chunk-IELNFM3V.js";
25
25
  export {
26
26
  browserSubmissionStore,
27
27
  cosmosChainList,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  accountConnectionSchema
3
- } from "./chunk-VTD4YDEO.js";
3
+ } from "./chunk-IELNFM3V.js";
4
4
 
5
5
  // src/telegram.ts
6
6
  import * as z from "zod";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  identifier
3
- } from "./chunk-VTD4YDEO.js";
3
+ } from "./chunk-IELNFM3V.js";
4
4
 
5
5
  // src/auth.ts
6
6
  import * as z from "zod";
@@ -4,20 +4,20 @@ import {
4
4
  retryAfter,
5
5
  retrying,
6
6
  validTimeout
7
- } from "./chunk-W3SQLZRA.js";
7
+ } from "./chunk-XFAYQFRO.js";
8
8
  import {
9
9
  clientIdentity
10
- } from "./chunk-DMG7CCMX.js";
10
+ } from "./chunk-ACVBQK55.js";
11
11
  import {
12
12
  authScopeSchema
13
- } from "./chunk-DP7FGRUW.js";
13
+ } from "./chunk-53JMTUWG.js";
14
14
  import {
15
15
  RequestError,
16
16
  appIdentityKindSchema,
17
17
  isRequestError,
18
18
  knownResponse,
19
19
  openIdentityKindSchema
20
- } from "./chunk-VTD4YDEO.js";
20
+ } from "./chunk-IELNFM3V.js";
21
21
 
22
22
  // src/configuration.ts
23
23
  function questConfiguration(release) {
@@ -8,7 +8,7 @@ import {
8
8
  rewardBundleSchema,
9
9
  settingsValuesSchema,
10
10
  trackerTriggerContextSchema
11
- } from "./chunk-VTD4YDEO.js";
11
+ } from "./chunk-IELNFM3V.js";
12
12
 
13
13
  // src/server/attempt-captures.ts
14
14
  import * as z from "zod";
@@ -1,6 +1,6 @@
1
1
  // package.json
2
2
  var name = "@domino-sdk/relay";
3
- var version = "1.50.0";
3
+ var version = "1.52.0";
4
4
 
5
5
  // src/client-identity.ts
6
6
  function clientIdentity() {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createRelayAction,
3
3
  withActionId
4
- } from "./chunk-NAEVXBSF.js";
4
+ } from "./chunk-YVC3B72P.js";
5
5
  import {
6
6
  collectionPassSchema,
7
7
  participantActivityQuerySchema,
@@ -17,7 +17,7 @@ import {
17
17
  questOutcomeSchema,
18
18
  rewardDeliveriesSchema,
19
19
  rewardDeliveryQuerySchema
20
- } from "./chunk-4Y5AYL3C.js";
20
+ } from "./chunk-ZJ3FVZRP.js";
21
21
  import {
22
22
  AVATAR_UPLOAD_LIMIT,
23
23
  avatarUploadTypes,
@@ -48,29 +48,29 @@ import {
48
48
  referralDefinitionSchema,
49
49
  referralHistorySchema,
50
50
  referralSummarySchema
51
- } from "./chunk-SGWAVIEP.js";
51
+ } from "./chunk-CCE2JWES.js";
52
52
  import {
53
53
  telegramAccountConnectionSchema,
54
54
  telegramMiniAppSignInSchema,
55
55
  telegramSignInMethodsSchema
56
- } from "./chunk-MMR6CZEJ.js";
56
+ } from "./chunk-2NUD237O.js";
57
57
  import {
58
58
  PARTICIPANT_TIMEOUT,
59
59
  lifetime,
60
60
  retryAfter,
61
61
  retrying,
62
62
  validTimeout
63
- } from "./chunk-W3SQLZRA.js";
63
+ } from "./chunk-XFAYQFRO.js";
64
64
  import {
65
65
  clientIdentity
66
- } from "./chunk-DMG7CCMX.js";
66
+ } from "./chunk-ACVBQK55.js";
67
67
  import {
68
68
  exchangeResultSchema,
69
69
  exchangeSchema,
70
70
  memberSummarySchema,
71
71
  participantSessionSchema,
72
72
  sessionMember
73
- } from "./chunk-DP7FGRUW.js";
73
+ } from "./chunk-53JMTUWG.js";
74
74
  import {
75
75
  RelayError,
76
76
  RelayErrorCode,
@@ -109,7 +109,7 @@ import {
109
109
  walletSignInNetworksSchema,
110
110
  walletSignatureSchema,
111
111
  walletUnlinkInputSchema
112
- } from "./chunk-VTD4YDEO.js";
112
+ } from "./chunk-IELNFM3V.js";
113
113
 
114
114
  // src/legacy-submissions.ts
115
115
  import * as z from "zod";
@@ -12,7 +12,7 @@ import {
12
12
  responseShape,
13
13
  rewardKey,
14
14
  tierRewardSchema
15
- } from "./chunk-VTD4YDEO.js";
15
+ } from "./chunk-IELNFM3V.js";
16
16
 
17
17
  // src/badges.ts
18
18
  import * as z from "zod";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createRelayClient
3
- } from "./chunk-K7CBVB3P.js";
3
+ } from "./chunk-B44SRIQ4.js";
4
4
  import {
5
5
  RelayErrorCode,
6
6
  asRelayError,
7
7
  clientError,
8
8
  cosmosChain
9
- } from "./chunk-VTD4YDEO.js";
9
+ } from "./chunk-IELNFM3V.js";
10
10
 
11
11
  // src/base58.ts
12
12
  var alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
@@ -6,7 +6,7 @@ import {
6
6
  imageSightingsSchema,
7
7
  imageUploadsSchema,
8
8
  publishedImageSchema
9
- } from "./chunk-3LK6JIBY.js";
9
+ } from "./chunk-K6TVMNU4.js";
10
10
  import {
11
11
  catalogDeploymentSchema,
12
12
  collectionPassSchema,
@@ -24,7 +24,7 @@ import {
24
24
  questTypeVersionSchema,
25
25
  questViewSchema,
26
26
  rewardDeliveriesSchema
27
- } from "./chunk-4Y5AYL3C.js";
27
+ } from "./chunk-ZJ3FVZRP.js";
28
28
  import {
29
29
  badgeArtifactSchema,
30
30
  badgeSchema,
@@ -58,15 +58,15 @@ import {
58
58
  referralDefinitionSchema,
59
59
  referralHistorySchema,
60
60
  referralSummarySchema
61
- } from "./chunk-SGWAVIEP.js";
61
+ } from "./chunk-CCE2JWES.js";
62
62
  import {
63
63
  telegramAccountConnectionSchema
64
- } from "./chunk-MMR6CZEJ.js";
64
+ } from "./chunk-2NUD237O.js";
65
65
  import {
66
66
  exchangeResultSchema,
67
67
  memberSummarySchema,
68
68
  participantSessionSchema
69
- } from "./chunk-DP7FGRUW.js";
69
+ } from "./chunk-53JMTUWG.js";
70
70
  import {
71
71
  accountConnectionSchema,
72
72
  attemptSchema,
@@ -99,7 +99,7 @@ import {
99
99
  walletBalanceSchema,
100
100
  walletMessageChallengeSchema,
101
101
  walletSignInNetworksSchema
102
- } from "./chunk-VTD4YDEO.js";
102
+ } from "./chunk-IELNFM3V.js";
103
103
 
104
104
  // src/deployments.ts
105
105
  import * as z from "zod";