@domino-sdk/relay 1.5.2 → 1.6.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 (43) hide show
  1. package/dist/{activity-DeKJsRry.d.ts → activity-mPUN4v5Q.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-DmuqzQiH.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-XFMSUPNS.js → chunk-6ON4RMEN.js} +1 -1
  10. package/dist/{chunk-VFHHLN6A.js → chunk-6RBF3UDA.js} +49 -6
  11. package/dist/chunk-AXRMT33W.js +112 -0
  12. package/dist/{chunk-24AFCBZN.js → chunk-BFZHJA2B.js} +2 -2
  13. package/dist/{chunk-EYH5RDIE.js → chunk-C25TDFHN.js} +4 -2
  14. package/dist/{chunk-36HTX2BM.js → chunk-GMPPLZKH.js} +61 -4
  15. package/dist/{chunk-BGGKNIRP.js → chunk-JW4G3SY5.js} +1 -1
  16. package/dist/{chunk-JON5SESL.js → chunk-KGJSKGKI.js} +84 -6
  17. package/dist/{chunk-WJSSJ7AF.js → chunk-QGLHZ2E5.js} +24 -4
  18. package/dist/{chunk-DGWMLN35.js → chunk-ZOUEEK5L.js} +16 -5
  19. package/dist/{client-gqnRUHpC.d.ts → client-CQuTAjSs.d.ts} +88 -41
  20. package/dist/{groups-Ck-OxzjD.d.ts → groups-D08JtrZu.d.ts} +175 -3
  21. package/dist/{identity-integration-GxAHdKR2.d.ts → identity-integration-BPovus6e.d.ts} +1 -1
  22. package/dist/{images-Dv-P5VBw.d.ts → images-D7en0Awp.d.ts} +1 -1
  23. package/dist/index.d.ts +9 -9
  24. package/dist/index.js +5 -5
  25. package/dist/internal.d.ts +34 -27
  26. package/dist/internal.js +18 -24
  27. package/dist/{offers-Cy-e4o5x.d.ts → offers-BENZl5l5.d.ts} +3 -2
  28. package/dist/{outcomes-kVB-Juzs.d.ts → pages-CBa-_u_n.d.ts} +142 -99
  29. package/dist/{pages-BBYD21IE.d.ts → participant-activity-DkL3nY5a.d.ts} +1 -14
  30. package/dist/portal-proxy.js +48 -36
  31. package/dist/react/index.d.ts +25 -3949
  32. package/dist/react/index.js +8 -7
  33. package/dist/{request-error-DWduJCGV.d.ts → request-error-D_dUPLwo.d.ts} +5 -0
  34. package/dist/{schema-DfJzH2ci.d.ts → schema-BPdHSCAc.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 +9672 -66110
  38. package/dist/server/index.js +1009 -548
  39. package/dist/sign-in-options-FPKoZMfo.d.ts +202 -0
  40. package/dist/{submission-input-BZkm6ohU.d.ts → submission-input-BzIWutQi.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
@@ -1,16 +1,16 @@
1
- import { cB as xContentBodySchema, I as IdentityKind, aM as customSourceSchema, at as WithRecordData, as as WithContent, ar as WithAccountRoles, cG as QuestHandle, cH as LedgerReference, cI as GroupHandle, cF as ResourceHandle, ad as TrackerSource, c1 as trackerDefinitionSchema, U as Tracker, $ as TrackerData, H as SourceRoles, cJ as LedgerHandle, cD as xSearchSourceSchema, av as XTweet, au as XContentMetric, aj as TrackerTriggerPolicy, ap as Where, r as MemberIdentity, ah as TrackerTriggerContext, ab as TrackerReader, L as TextReviewInput, J as TextResult, P as PhotoResult, n as Decision, by as rewardSchema, ai as TrackerTriggerMode, F as RoleOf, aq as WhereSetting, k as ContentBody, l as ContentMetricName, cw as triggerSchema, d as QuestPresentation, e as QuestProfile, f as QuizEvidence, N as TieredRewardDefinition } from './schema-DfJzH2ci.js';
2
- export { cK as LedgerSetting, a1 as TrackerDataSchema, a6 as TrackerPage, aa as TrackerReadQuery, cL as trackerDataSchema, cn as trackerTriggerContextSchema } from './schema-DfJzH2ci.js';
1
+ import { cJ as xContentBodySchema, I as IdentityKind, aS as customSourceSchema, ay as WithRecordData, ax as WithContent, aw as WithAccountRoles, cO as QuestHandle, cP as LedgerReference, cQ as GroupHandle, cN as ResourceHandle, ag as TrackerSource, c7 as trackerDefinitionSchema, X as Tracker, a2 as TrackerData, N as SourceRoles, cR as LedgerHandle, cL as xSearchSourceSchema, aA as XTweet, az as XContentMetric, ao as TrackerTriggerPolicy, au as Where, u as MemberIdentity, ak as TrackerTriggerContext, ae as TrackerReader, V as TextReviewInput, U as TextResult, P as PhotoResult, p as Decision, bE as rewardSchema, al as TrackerTriggerMode, J as RoleOf, av as WhereSetting, m as ContentBody, n as ContentMetricName, cE as triggerSchema, d as QuestPresentation, e as QuestProfile, f as QuizEvidence, W as TieredRewardDefinition } from './schema-BPdHSCAc.js';
2
+ export { cS as LedgerSetting, a4 as TrackerDataSchema, a9 as TrackerPage, ad as TrackerReadQuery, cT as trackerDataSchema, ct as trackerTriggerContextSchema } from './schema-BPdHSCAc.js';
3
3
  import { z } from 'zod';
4
4
  export { z } from 'zod';
5
- import { E as EngagementBudget, a4 as leaderboardDefinitionSchema, aQ as AuthoringIdentity, au as pointLedgerDeclarationSchema, aJ as referralAuthoringSchema, C as CampaignDefinition, A as AvailabilityWindow } from './groups-Ck-OxzjD.js';
6
- export { G as defineCampaign, H as defineGroup } from './groups-Ck-OxzjD.js';
7
- import { u as discordMessagesSourceSchema, e as DiscordMessageData, f as DiscordMessageTextData, w as discordReactionsSourceSchema, g as DiscordReactionData, h as DiscordReader, P as Prerequisite, T as TextEvidence, U as UrlEvidence, b as TextOptions, c as UrlOptions } from './submission-input-BZkm6ohU.js';
8
- export { k as balanceAtLeast, m as completed, B as inGroup } from './submission-input-BZkm6ohU.js';
5
+ import { E as EngagementBudget, ai as leaderboardDefinitionSchema, b9 as AuthoringIdentity, aK as pointLedgerDeclarationSchema, aZ as referralAuthoringSchema, C as CampaignDefinition, A as AvailabilityWindow } from './groups-D08JtrZu.js';
6
+ export { U as defineCampaign, V as defineGroup } from './groups-D08JtrZu.js';
7
+ import { u as discordMessagesSourceSchema, e as DiscordMessageData, f as DiscordMessageTextData, w as discordReactionsSourceSchema, g as DiscordReactionData, h as DiscordReader, P as Prerequisite, T as TextEvidence, U as UrlEvidence, b as TextOptions, c as UrlOptions } from './submission-input-BzIWutQi.js';
8
+ export { k as balanceAtLeast, m as completed, B as inGroup } from './submission-input-BzIWutQi.js';
9
9
  import { Q as QuizContent, a as StreakPolicy } from './streaks-CWyq8Px5.js';
10
- import { d as ResourceSource, S as Setting, b as IntegrationModule, i as XReader, B as Budget, I as IntegerSettings } from './capability-error-DNMwKmlL.js';
11
- export { L as CapabilityError, C as CapabilityErrorCode, k as capabilityErrorCodes } from './capability-error-DNMwKmlL.js';
12
- import { e as ImageReader } from './images-Dv-P5VBw.js';
13
- export { e as defineOffer } from './offers-Cy-e4o5x.js';
10
+ import { d as ResourceSource, S as Setting, b as IntegrationModule, i as XReader, B as Budget, I as IntegerSettings } from './capability-error-Bv996M-h.js';
11
+ export { L as CapabilityError, C as CapabilityErrorCode, k as capabilityErrorCodes } from './capability-error-Bv996M-h.js';
12
+ import { e as ImageReader } from './images-D7en0Awp.js';
13
+ export { e as defineOffer } from './offers-BENZl5l5.js';
14
14
  import { l as WalletReader } from './wallet-YssWxGg8.js';
15
15
  export { h as CosmosDenom, a as CosmosNetwork, E as EvmChainId, j as WalletBalance, k as WalletBalanceQuery, p as cosmosDenomSchema, q as cosmosNetworkSchema, t as isEvmChainId } from './wallet-YssWxGg8.js';
16
16
  export { f as formatUnits, p as parseUnits } from './units-CwgsPB_r.js';
@@ -245,8 +245,8 @@ declare function defineLeaderboard(input: Omit<LeaderboardInput, "key" | "id" |
245
245
  kind: "earned";
246
246
  }> | ReturnType<typeof earned>;
247
247
  }): {
248
- balance: string;
249
248
  title: string;
249
+ balance: string;
250
250
  access: "participants" | "public";
251
251
  score: {
252
252
  kind: "balance";
@@ -885,6 +885,10 @@ type EvaluationContext<T, I = {
885
885
  images: ImageReader;
886
886
  review: {
887
887
  text(options: TextReviewInput): Promise<TextResult>;
888
+ /**
889
+ * @deprecated Use `ctx.images.review({ images: [{ evidence: ctx.input.photo }], criteria })`
890
+ * instead, which also reviews X and reference images. Removed in 2.0.0.
891
+ */
888
892
  photo(options: {
889
893
  image: string;
890
894
  criteria: string;
@@ -1008,15 +1012,15 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1008
1012
  };
1009
1013
  };
1010
1014
  tier: string;
1011
- } | {
1012
- kind: "points";
1013
- balance: string;
1014
- amount: number;
1015
1015
  } | {
1016
1016
  kind: "integration";
1017
1017
  provider: "discord";
1018
1018
  action: "grant-role";
1019
1019
  roleId: string;
1020
+ } | {
1021
+ kind: "points";
1022
+ balance: string;
1023
+ amount: number;
1020
1024
  })[] | ((ctx: {
1021
1025
  settings: z.core.$InferObjectOutput<T, {}>;
1022
1026
  }) => Reward[]);
@@ -1073,9 +1077,6 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1073
1077
  kind: "resource";
1074
1078
  default: string;
1075
1079
  source: {
1076
- provider: "domino";
1077
- resource: "point-ledger";
1078
- } | {
1079
1080
  provider: "discord";
1080
1081
  resource: "channel";
1081
1082
  types: ("text" | "announcement")[];
@@ -1083,6 +1084,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1083
1084
  provider: "discord";
1084
1085
  resource: "role";
1085
1086
  assignable: boolean;
1087
+ } | {
1088
+ provider: "domino";
1089
+ resource: "point-ledger";
1086
1090
  };
1087
1091
  label: string;
1088
1092
  description?: string | undefined;
@@ -1154,15 +1158,15 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1154
1158
  };
1155
1159
  };
1156
1160
  tier: string;
1157
- } | {
1158
- kind: "points";
1159
- balance: string;
1160
- amount: number;
1161
1161
  } | {
1162
1162
  kind: "integration";
1163
1163
  provider: "discord";
1164
1164
  action: "grant-role";
1165
1165
  roleId: string;
1166
+ } | {
1167
+ kind: "points";
1168
+ balance: string;
1169
+ amount: number;
1166
1170
  })[];
1167
1171
  humanReview: boolean;
1168
1172
  trigger: {
@@ -1184,7 +1188,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1184
1188
  actor?: "staff" | "member" | undefined;
1185
1189
  } | {
1186
1190
  kind: "manual";
1187
- input: "photo" | "quiz" | "none";
1191
+ input: "none" | "quiz" | "photo";
1188
1192
  actor?: "staff" | "member" | undefined;
1189
1193
  } | {
1190
1194
  kind: "automatic";
@@ -1228,9 +1232,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1228
1232
  path: string;
1229
1233
  equals: string | number | boolean;
1230
1234
  })[] | undefined;
1231
- enrollment?: "required" | "none" | undefined;
1235
+ enrollment?: "none" | "required" | undefined;
1232
1236
  since?: "activation" | "window" | "enrollment" | undefined;
1233
- historical?: "automatic" | "staff" | "claim" | undefined;
1237
+ historical?: "staff" | "claim" | "automatic" | undefined;
1234
1238
  content?: true | undefined;
1235
1239
  } | undefined;
1236
1240
  };
@@ -1253,9 +1257,6 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1253
1257
  title: string;
1254
1258
  })[];
1255
1259
  completion: {
1256
- kind: "streak";
1257
- days: number;
1258
- } | {
1259
1260
  kind: "progress";
1260
1261
  goal: {
1261
1262
  kind: "count";
@@ -1272,6 +1273,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1272
1273
  durationMs: number;
1273
1274
  };
1274
1275
  repeat: "repeat" | "once";
1276
+ } | {
1277
+ kind: "streak";
1278
+ days: number;
1275
1279
  } | {
1276
1280
  kind: "once";
1277
1281
  } | {
@@ -1297,7 +1301,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1297
1301
  campaign?: {
1298
1302
  key: string;
1299
1303
  title: string;
1300
- enrollment: "required" | "none";
1304
+ enrollment: "none" | "required";
1301
1305
  window?: {
1302
1306
  from: number;
1303
1307
  until: number;
@@ -1337,6 +1341,10 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1337
1341
  images: ImageReader;
1338
1342
  review: {
1339
1343
  text(options: TextReviewInput): Promise<TextResult>;
1344
+ /**
1345
+ * @deprecated Use `ctx.images.review({ images: [{ evidence: ctx.input.photo }], criteria })`
1346
+ * instead, which also reviews X and reference images. Removed in 2.0.0.
1347
+ */
1340
1348
  photo(options: {
1341
1349
  image: string;
1342
1350
  criteria: string;
@@ -1401,15 +1409,15 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1401
1409
  };
1402
1410
  };
1403
1411
  tier: string;
1404
- } | {
1405
- kind: "points";
1406
- balance: string;
1407
- amount: number;
1408
1412
  } | {
1409
1413
  kind: "integration";
1410
1414
  provider: "discord";
1411
1415
  action: "grant-role";
1412
1416
  roleId: string;
1417
+ } | {
1418
+ kind: "points";
1419
+ balance: string;
1420
+ amount: number;
1413
1421
  })[] | ((ctx: {
1414
1422
  settings: z.core.$InferObjectOutput<T, {}>;
1415
1423
  }) => Reward[]);
@@ -1466,9 +1474,6 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1466
1474
  kind: "resource";
1467
1475
  default: string;
1468
1476
  source: {
1469
- provider: "domino";
1470
- resource: "point-ledger";
1471
- } | {
1472
1477
  provider: "discord";
1473
1478
  resource: "channel";
1474
1479
  types: ("text" | "announcement")[];
@@ -1476,6 +1481,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1476
1481
  provider: "discord";
1477
1482
  resource: "role";
1478
1483
  assignable: boolean;
1484
+ } | {
1485
+ provider: "domino";
1486
+ resource: "point-ledger";
1479
1487
  };
1480
1488
  label: string;
1481
1489
  description?: string | undefined;
@@ -1547,15 +1555,15 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1547
1555
  };
1548
1556
  };
1549
1557
  tier: string;
1550
- } | {
1551
- kind: "points";
1552
- balance: string;
1553
- amount: number;
1554
1558
  } | {
1555
1559
  kind: "integration";
1556
1560
  provider: "discord";
1557
1561
  action: "grant-role";
1558
1562
  roleId: string;
1563
+ } | {
1564
+ kind: "points";
1565
+ balance: string;
1566
+ amount: number;
1559
1567
  })[];
1560
1568
  humanReview: boolean;
1561
1569
  trigger: {
@@ -1577,7 +1585,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1577
1585
  actor?: "staff" | "member" | undefined;
1578
1586
  } | {
1579
1587
  kind: "manual";
1580
- input: "photo" | "quiz" | "none";
1588
+ input: "none" | "quiz" | "photo";
1581
1589
  actor?: "staff" | "member" | undefined;
1582
1590
  } | {
1583
1591
  kind: "automatic";
@@ -1621,9 +1629,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1621
1629
  path: string;
1622
1630
  equals: string | number | boolean;
1623
1631
  })[] | undefined;
1624
- enrollment?: "required" | "none" | undefined;
1632
+ enrollment?: "none" | "required" | undefined;
1625
1633
  since?: "activation" | "window" | "enrollment" | undefined;
1626
- historical?: "automatic" | "staff" | "claim" | undefined;
1634
+ historical?: "staff" | "claim" | "automatic" | undefined;
1627
1635
  content?: true | undefined;
1628
1636
  } | undefined;
1629
1637
  };
@@ -1646,9 +1654,6 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1646
1654
  title: string;
1647
1655
  })[];
1648
1656
  completion: {
1649
- kind: "streak";
1650
- days: number;
1651
- } | {
1652
1657
  kind: "progress";
1653
1658
  goal: {
1654
1659
  kind: "count";
@@ -1665,6 +1670,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1665
1670
  durationMs: number;
1666
1671
  };
1667
1672
  repeat: "repeat" | "once";
1673
+ } | {
1674
+ kind: "streak";
1675
+ days: number;
1668
1676
  } | {
1669
1677
  kind: "once";
1670
1678
  } | {
@@ -1690,7 +1698,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1690
1698
  campaign?: {
1691
1699
  key: string;
1692
1700
  title: string;
1693
- enrollment: "required" | "none";
1701
+ enrollment: "none" | "required";
1694
1702
  window?: {
1695
1703
  from: number;
1696
1704
  until: number;
@@ -1730,6 +1738,10 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1730
1738
  images: ImageReader;
1731
1739
  review: {
1732
1740
  text(options: TextReviewInput): Promise<TextResult>;
1741
+ /**
1742
+ * @deprecated Use `ctx.images.review({ images: [{ evidence: ctx.input.photo }], criteria })`
1743
+ * instead, which also reviews X and reference images. Removed in 2.0.0.
1744
+ */
1733
1745
  photo(options: {
1734
1746
  image: string;
1735
1747
  criteria: string;
package/dist/authoring.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  sourceDataSchema,
11
11
  sourceRoles,
12
12
  validateQuestShape
13
- } from "./chunk-GQKYAQM6.js";
13
+ } from "./chunk-23QJ7WH4.js";
14
14
  import {
15
15
  cosmosDenomSchema,
16
16
  cosmosNetworkSchema,
@@ -22,7 +22,7 @@ import {
22
22
  leaderboardAuthoringSchema,
23
23
  pointLedgerDeclarationSchema,
24
24
  referralAuthoringSchema
25
- } from "./chunk-36HTX2BM.js";
25
+ } from "./chunk-GMPPLZKH.js";
26
26
  import "./chunk-NPGENI7K.js";
27
27
  import {
28
28
  authoringKey,
@@ -76,7 +76,7 @@ import {
76
76
  whereSchemaIssue,
77
77
  whereSettings,
78
78
  xSearchSourceSchema
79
- } from "./chunk-JON5SESL.js";
79
+ } from "./chunk-KGJSKGKI.js";
80
80
 
81
81
  // src/builders.ts
82
82
  import { z } from "zod";
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { a as AttemptStatus } from './schema-BPdHSCAc.js';
2
3
 
3
4
  declare const collectionCodeSchema: z.ZodString;
4
5
  declare const collectionPassSchema: z.ZodObject<{
@@ -432,7 +433,9 @@ declare const automaticEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
432
433
  action: z.ZodString;
433
434
  }, z.core.$strip>], "kind">;
434
435
  type AutomaticEvent = z.infer<typeof automaticEventSchema>;
435
- declare const automaticOutcomeSchema: z.ZodObject<{
436
+ declare const automaticOutcomeSchema: z.ZodUnion<readonly [z.ZodObject<{
437
+ attempt: z.ZodNull;
438
+ linkedAttempt: z.ZodOptional<z.ZodNull>;
436
439
  id: z.ZodString;
437
440
  quest: z.ZodString;
438
441
  member: z.ZodString;
@@ -465,12 +468,63 @@ declare const automaticOutcomeSchema: z.ZodObject<{
465
468
  }>;
466
469
  code: z.ZodNullable<z.ZodString>;
467
470
  reason: z.ZodNullable<z.ZodString>;
468
- attempt: z.ZodNullable<z.ZodString>;
471
+ window: z.ZodOptional<z.ZodEnum<{
472
+ quest: "quest";
473
+ tracker: "tracker";
474
+ }>>;
469
475
  revision: z.ZodNumber;
470
476
  createdAt: z.ZodNumber;
471
477
  updatedAt: z.ZodNumber;
472
- }, z.core.$strip>;
478
+ }, z.core.$strip>, z.ZodObject<{
479
+ attempt: z.ZodString;
480
+ linkedAttempt: z.ZodOptional<z.ZodNullable<z.ZodObject<{
481
+ id: z.ZodString;
482
+ status: z.ZodType<AttemptStatus, unknown, z.core.$ZodTypeInternals<AttemptStatus, unknown>>;
483
+ code: z.ZodNullable<z.ZodString>;
484
+ }, z.core.$strip>>>;
485
+ id: z.ZodString;
486
+ quest: z.ZodString;
487
+ member: z.ZodString;
488
+ release: z.ZodString;
489
+ event: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
490
+ kind: z.ZodLiteral<"completion">;
491
+ attempt: z.ZodString;
492
+ generation: z.ZodNumber;
493
+ }, z.core.$strip>, z.ZodObject<{
494
+ kind: z.ZodLiteral<"points">;
495
+ entry: z.ZodString;
496
+ }, z.core.$strip>, z.ZodObject<{
497
+ kind: z.ZodLiteral<"group">;
498
+ action: z.ZodString;
499
+ }, z.core.$strip>, z.ZodObject<{
500
+ kind: z.ZodLiteral<"campaign">;
501
+ action: z.ZodString;
502
+ }, z.core.$strip>, z.ZodObject<{
503
+ kind: z.ZodLiteral<"publication">;
504
+ revision: z.ZodString;
505
+ }, z.core.$strip>, z.ZodObject<{
506
+ kind: z.ZodLiteral<"revocation">;
507
+ action: z.ZodString;
508
+ }, z.core.$strip>], "kind">, z.ZodObject<{
509
+ kind: z.ZodString;
510
+ }, z.core.$catchall<z.ZodJSONSchema>>]>;
511
+ state: z.ZodEnum<{
512
+ admitted: "admitted";
513
+ skipped: "skipped";
514
+ }>;
515
+ code: z.ZodNullable<z.ZodString>;
516
+ reason: z.ZodNullable<z.ZodString>;
517
+ window: z.ZodOptional<z.ZodEnum<{
518
+ quest: "quest";
519
+ tracker: "tracker";
520
+ }>>;
521
+ revision: z.ZodNumber;
522
+ createdAt: z.ZodNumber;
523
+ updatedAt: z.ZodNumber;
524
+ }, z.core.$strip>]>;
473
525
  type AutomaticOutcome = z.infer<typeof automaticOutcomeSchema>;
526
+ /** Whether a linked attempt can be replaced after current admission rules pass. */
527
+ declare const isRetryableAutomaticOutcome: (outcome: Pick<z.input<typeof automaticOutcomeSchema>, "linkedAttempt">) => boolean;
474
528
  declare const automaticOutcomeQuerySchema: z.ZodObject<{
475
529
  quest: z.ZodOptional<z.ZodString>;
476
530
  member: z.ZodOptional<z.ZodString>;
@@ -482,7 +536,9 @@ declare const automaticOutcomeQuerySchema: z.ZodObject<{
482
536
  cursor: z.ZodOptional<z.ZodString>;
483
537
  }, z.core.$strict>;
484
538
  declare const automaticOutcomePageSchema: z.ZodObject<{
485
- items: z.ZodArray<z.ZodObject<{
539
+ items: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
540
+ attempt: z.ZodNull;
541
+ linkedAttempt: z.ZodOptional<z.ZodNull>;
486
542
  id: z.ZodString;
487
543
  quest: z.ZodString;
488
544
  member: z.ZodString;
@@ -515,11 +571,60 @@ declare const automaticOutcomePageSchema: z.ZodObject<{
515
571
  }>;
516
572
  code: z.ZodNullable<z.ZodString>;
517
573
  reason: z.ZodNullable<z.ZodString>;
518
- attempt: z.ZodNullable<z.ZodString>;
574
+ window: z.ZodOptional<z.ZodEnum<{
575
+ quest: "quest";
576
+ tracker: "tracker";
577
+ }>>;
519
578
  revision: z.ZodNumber;
520
579
  createdAt: z.ZodNumber;
521
580
  updatedAt: z.ZodNumber;
522
- }, z.core.$strip>>;
581
+ }, z.core.$strip>, z.ZodObject<{
582
+ attempt: z.ZodString;
583
+ linkedAttempt: z.ZodOptional<z.ZodNullable<z.ZodObject<{
584
+ id: z.ZodString;
585
+ status: z.ZodType<AttemptStatus, unknown, z.core.$ZodTypeInternals<AttemptStatus, unknown>>;
586
+ code: z.ZodNullable<z.ZodString>;
587
+ }, z.core.$strip>>>;
588
+ id: z.ZodString;
589
+ quest: z.ZodString;
590
+ member: z.ZodString;
591
+ release: z.ZodString;
592
+ event: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
593
+ kind: z.ZodLiteral<"completion">;
594
+ attempt: z.ZodString;
595
+ generation: z.ZodNumber;
596
+ }, z.core.$strip>, z.ZodObject<{
597
+ kind: z.ZodLiteral<"points">;
598
+ entry: z.ZodString;
599
+ }, z.core.$strip>, z.ZodObject<{
600
+ kind: z.ZodLiteral<"group">;
601
+ action: z.ZodString;
602
+ }, z.core.$strip>, z.ZodObject<{
603
+ kind: z.ZodLiteral<"campaign">;
604
+ action: z.ZodString;
605
+ }, z.core.$strip>, z.ZodObject<{
606
+ kind: z.ZodLiteral<"publication">;
607
+ revision: z.ZodString;
608
+ }, z.core.$strip>, z.ZodObject<{
609
+ kind: z.ZodLiteral<"revocation">;
610
+ action: z.ZodString;
611
+ }, z.core.$strip>], "kind">, z.ZodObject<{
612
+ kind: z.ZodString;
613
+ }, z.core.$catchall<z.ZodJSONSchema>>]>;
614
+ state: z.ZodEnum<{
615
+ admitted: "admitted";
616
+ skipped: "skipped";
617
+ }>;
618
+ code: z.ZodNullable<z.ZodString>;
619
+ reason: z.ZodNullable<z.ZodString>;
620
+ window: z.ZodOptional<z.ZodEnum<{
621
+ quest: "quest";
622
+ tracker: "tracker";
623
+ }>>;
624
+ revision: z.ZodNumber;
625
+ createdAt: z.ZodNumber;
626
+ updatedAt: z.ZodNumber;
627
+ }, z.core.$strip>]>>;
523
628
  nextCursor: z.ZodNullable<z.ZodString>;
524
629
  }, z.core.$strip>;
525
630
  declare const automaticCatchUpInputSchema: z.ZodObject<{
@@ -531,7 +636,9 @@ declare const automaticCatchUpPreviewSchema: z.ZodObject<{
531
636
  release: z.ZodString;
532
637
  token: z.ZodString;
533
638
  items: z.ZodArray<z.ZodObject<{
534
- outcome: z.ZodObject<{
639
+ outcome: z.ZodUnion<readonly [z.ZodObject<{
640
+ attempt: z.ZodNull;
641
+ linkedAttempt: z.ZodOptional<z.ZodNull>;
535
642
  id: z.ZodString;
536
643
  quest: z.ZodString;
537
644
  member: z.ZodString;
@@ -564,13 +671,66 @@ declare const automaticCatchUpPreviewSchema: z.ZodObject<{
564
671
  }>;
565
672
  code: z.ZodNullable<z.ZodString>;
566
673
  reason: z.ZodNullable<z.ZodString>;
567
- attempt: z.ZodNullable<z.ZodString>;
674
+ window: z.ZodOptional<z.ZodEnum<{
675
+ quest: "quest";
676
+ tracker: "tracker";
677
+ }>>;
568
678
  revision: z.ZodNumber;
569
679
  createdAt: z.ZodNumber;
570
680
  updatedAt: z.ZodNumber;
571
- }, z.core.$strip>;
681
+ }, z.core.$strip>, z.ZodObject<{
682
+ attempt: z.ZodString;
683
+ linkedAttempt: z.ZodOptional<z.ZodNullable<z.ZodObject<{
684
+ id: z.ZodString;
685
+ status: z.ZodType<AttemptStatus, unknown, z.core.$ZodTypeInternals<AttemptStatus, unknown>>;
686
+ code: z.ZodNullable<z.ZodString>;
687
+ }, z.core.$strip>>>;
688
+ id: z.ZodString;
689
+ quest: z.ZodString;
690
+ member: z.ZodString;
691
+ release: z.ZodString;
692
+ event: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
693
+ kind: z.ZodLiteral<"completion">;
694
+ attempt: z.ZodString;
695
+ generation: z.ZodNumber;
696
+ }, z.core.$strip>, z.ZodObject<{
697
+ kind: z.ZodLiteral<"points">;
698
+ entry: z.ZodString;
699
+ }, z.core.$strip>, z.ZodObject<{
700
+ kind: z.ZodLiteral<"group">;
701
+ action: z.ZodString;
702
+ }, z.core.$strip>, z.ZodObject<{
703
+ kind: z.ZodLiteral<"campaign">;
704
+ action: z.ZodString;
705
+ }, z.core.$strip>, z.ZodObject<{
706
+ kind: z.ZodLiteral<"publication">;
707
+ revision: z.ZodString;
708
+ }, z.core.$strip>, z.ZodObject<{
709
+ kind: z.ZodLiteral<"revocation">;
710
+ action: z.ZodString;
711
+ }, z.core.$strip>], "kind">, z.ZodObject<{
712
+ kind: z.ZodString;
713
+ }, z.core.$catchall<z.ZodJSONSchema>>]>;
714
+ state: z.ZodEnum<{
715
+ admitted: "admitted";
716
+ skipped: "skipped";
717
+ }>;
718
+ code: z.ZodNullable<z.ZodString>;
719
+ reason: z.ZodNullable<z.ZodString>;
720
+ window: z.ZodOptional<z.ZodEnum<{
721
+ quest: "quest";
722
+ tracker: "tracker";
723
+ }>>;
724
+ revision: z.ZodNumber;
725
+ createdAt: z.ZodNumber;
726
+ updatedAt: z.ZodNumber;
727
+ }, z.core.$strip>]>;
572
728
  code: z.ZodNullable<z.ZodString>;
573
729
  reason: z.ZodNullable<z.ZodString>;
730
+ window: z.ZodOptional<z.ZodEnum<{
731
+ quest: "quest";
732
+ tracker: "tracker";
733
+ }>>;
574
734
  attempt: z.ZodNullable<z.ZodString>;
575
735
  wouldAdmit: z.ZodBoolean;
576
736
  budgets: z.ZodArray<z.ZodObject<{
@@ -632,7 +792,9 @@ declare const automaticCatchUpConfirmSchema: z.ZodObject<{
632
792
  reason: z.ZodString;
633
793
  }, z.core.$strict>;
634
794
  declare const automaticCatchUpResultSchema: z.ZodObject<{
635
- items: z.ZodArray<z.ZodObject<{
795
+ items: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
796
+ attempt: z.ZodNull;
797
+ linkedAttempt: z.ZodOptional<z.ZodNull>;
636
798
  id: z.ZodString;
637
799
  quest: z.ZodString;
638
800
  member: z.ZodString;
@@ -665,11 +827,60 @@ declare const automaticCatchUpResultSchema: z.ZodObject<{
665
827
  }>;
666
828
  code: z.ZodNullable<z.ZodString>;
667
829
  reason: z.ZodNullable<z.ZodString>;
668
- attempt: z.ZodNullable<z.ZodString>;
830
+ window: z.ZodOptional<z.ZodEnum<{
831
+ quest: "quest";
832
+ tracker: "tracker";
833
+ }>>;
669
834
  revision: z.ZodNumber;
670
835
  createdAt: z.ZodNumber;
671
836
  updatedAt: z.ZodNumber;
672
- }, z.core.$strip>>;
837
+ }, z.core.$strip>, z.ZodObject<{
838
+ attempt: z.ZodString;
839
+ linkedAttempt: z.ZodOptional<z.ZodNullable<z.ZodObject<{
840
+ id: z.ZodString;
841
+ status: z.ZodType<AttemptStatus, unknown, z.core.$ZodTypeInternals<AttemptStatus, unknown>>;
842
+ code: z.ZodNullable<z.ZodString>;
843
+ }, z.core.$strip>>>;
844
+ id: z.ZodString;
845
+ quest: z.ZodString;
846
+ member: z.ZodString;
847
+ release: z.ZodString;
848
+ event: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
849
+ kind: z.ZodLiteral<"completion">;
850
+ attempt: z.ZodString;
851
+ generation: z.ZodNumber;
852
+ }, z.core.$strip>, z.ZodObject<{
853
+ kind: z.ZodLiteral<"points">;
854
+ entry: z.ZodString;
855
+ }, z.core.$strip>, z.ZodObject<{
856
+ kind: z.ZodLiteral<"group">;
857
+ action: z.ZodString;
858
+ }, z.core.$strip>, z.ZodObject<{
859
+ kind: z.ZodLiteral<"campaign">;
860
+ action: z.ZodString;
861
+ }, z.core.$strip>, z.ZodObject<{
862
+ kind: z.ZodLiteral<"publication">;
863
+ revision: z.ZodString;
864
+ }, z.core.$strip>, z.ZodObject<{
865
+ kind: z.ZodLiteral<"revocation">;
866
+ action: z.ZodString;
867
+ }, z.core.$strip>], "kind">, z.ZodObject<{
868
+ kind: z.ZodString;
869
+ }, z.core.$catchall<z.ZodJSONSchema>>]>;
870
+ state: z.ZodEnum<{
871
+ admitted: "admitted";
872
+ skipped: "skipped";
873
+ }>;
874
+ code: z.ZodNullable<z.ZodString>;
875
+ reason: z.ZodNullable<z.ZodString>;
876
+ window: z.ZodOptional<z.ZodEnum<{
877
+ quest: "quest";
878
+ tracker: "tracker";
879
+ }>>;
880
+ revision: z.ZodNumber;
881
+ createdAt: z.ZodNumber;
882
+ updatedAt: z.ZodNumber;
883
+ }, z.core.$strip>]>>;
673
884
  }, z.core.$strip>;
674
885
  /** Pending or failed point-change scheduling. Provider diagnostics are operator-only. */
675
886
  declare const automaticSchedulingQuerySchema: z.ZodObject<{
@@ -755,4 +966,4 @@ declare const automaticSchedulingRetrySchema: z.ZodObject<{
755
966
  reason: z.ZodString;
756
967
  }, z.core.$strict>;
757
968
 
758
- export { type AutomaticCatchUpPreview as A, counterHistorySchema as B, type CollectionPass as C, counterModerationResultSchema as D, counterModerationSchema as E, counterPolicySchema as F, counterProgressSchema as G, counterWindowSchema as H, type AutomaticEvent as a, type AutomaticOutcome as b, type CounterAchievement as c, type CounterPolicy as d, type CounterProgress as e, automaticCatchUpConfirmSchema as f, automaticCatchUpInputSchema as g, automaticCatchUpPreviewSchema as h, automaticCatchUpResultSchema as i, automaticEventSchema as j, automaticOutcomePageSchema as k, automaticOutcomeQuerySchema as l, automaticOutcomeSchema as m, automaticSchedulingPageSchema as n, automaticSchedulingQuerySchema as o, automaticSchedulingRetrySchema as p, automaticSchedulingSchema as q, collectionBeginSchema as r, collectionCodeSchema as s, collectionPassSchema as t, collectionPreviewSchema as u, collectionResolveSchema as v, counterAchievementSchema as w, counterContributionSchema as x, counterGoalSchema as y, counterHistoryQuerySchema as z };
969
+ export { type AutomaticCatchUpPreview as A, counterHistorySchema as B, type CollectionPass as C, counterModerationResultSchema as D, counterModerationSchema as E, counterPolicySchema as F, counterProgressSchema as G, counterWindowSchema as H, isRetryableAutomaticOutcome as I, type AutomaticEvent as a, type AutomaticOutcome as b, type CounterAchievement as c, type CounterPolicy as d, type CounterProgress as e, automaticCatchUpConfirmSchema as f, automaticCatchUpInputSchema as g, automaticCatchUpPreviewSchema as h, automaticCatchUpResultSchema as i, automaticEventSchema as j, automaticOutcomePageSchema as k, automaticOutcomeQuerySchema as l, automaticOutcomeSchema as m, automaticSchedulingPageSchema as n, automaticSchedulingQuerySchema as o, automaticSchedulingRetrySchema as p, automaticSchedulingSchema as q, collectionBeginSchema as r, collectionCodeSchema as s, collectionPassSchema as t, collectionPreviewSchema as u, collectionResolveSchema as v, counterAchievementSchema as w, counterContributionSchema as x, counterGoalSchema as y, counterHistoryQuerySchema as z };
package/dist/browser.d.ts CHANGED
@@ -1,11 +1,23 @@
1
- import './outcomes-kVB-Juzs.js';
2
- import './groups-Ck-OxzjD.js';
3
- import './client-gqnRUHpC.js';
4
- import './pages-BBYD21IE.js';
5
- import './submission-input-BZkm6ohU.js';
6
- import './wallet-YssWxGg8.js';
7
- import './schema-DfJzH2ci.js';
8
- import './profiles-D2aFcOxu.js';
9
- export { C as CosmosChains, D as DiscoveredWallet, f as Eip1193Provider, E as EmailSignInOption, K as KeplrLike, O as OAuthSignInOption, g as SignInClient, e as SignInIcon, S as SignInMethods, a as SignInOption, h as SignInOptions, b as SignInUnavailable, d as SignInWallet, i as SolanaInjectedProvider, j as StandardWallet, k as StandardWalletAccount, W as WalletSignInOption, l as browserSubmissionStore, m as cosmosChainList, n as cosmosSigner, c as createBrowserRelayClient, o as discoverCosmosWallets, p as discoverEvmWallets, q as discoverSignInWallets, r as discoverSolanaWallets, s as evmSigner, t as signInOptions, u as solanaSigner, w as walletStandardSolanaSigner } from './browser-D_3s8B5e.js';
1
+ import { m as SubmissionStore, f as RelayClientOptions, R as RelayClient } from './client-CQuTAjSs.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, 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, w as walletStandardSolanaSigner } from './sign-in-options-FPKoZMfo.js';
3
+ import './groups-D08JtrZu.js';
10
4
  import 'zod';
11
- import './request-error-DWduJCGV.js';
5
+ import './schema-BPdHSCAc.js';
6
+ import './pages-CBa-_u_n.js';
7
+ import './submission-input-BzIWutQi.js';
8
+ import './request-error-D_dUPLwo.js';
9
+ import './participant-activity-DkL3nY5a.js';
10
+ import './profiles-D2aFcOxu.js';
11
+ import './wallet-YssWxGg8.js';
12
+
13
+ /** Browser client with durable submission recovery; safe to construct during SSR. */
14
+ declare function createBrowserRelayClient(options: RelayClientOptions): RelayClient;
15
+ /**
16
+ * IndexedDB-backed store with Web Locks. A failed or blocked open is never remembered: the next
17
+ * call opens again, and a connection the browser or another tab closes is replaced on demand.
18
+ * Failures reject, never read as "nothing saved", so a caller cannot start a new claim over a
19
+ * saved one it could not see.
20
+ */
21
+ declare function browserSubmissionStore(): SubmissionStore;
22
+
23
+ export { browserSubmissionStore, createBrowserRelayClient };