@domino-sdk/relay 1.15.0 → 1.18.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 (50) hide show
  1. package/dist/{attempt-captures-DHwIVoRP.d.ts → attempt-captures-ByzZyggX.d.ts} +5 -1
  2. package/dist/authoring.d.ts +119 -46
  3. package/dist/authoring.js +14 -9
  4. package/dist/{automatic-outcomes-BcEn_L46.d.ts → automatic-outcomes-BBSdMf0R.d.ts} +2 -1
  5. package/dist/avatar.d.ts +1 -1
  6. package/dist/browser.d.ts +7 -7
  7. package/dist/browser.js +9 -11
  8. package/dist/{chunk-PJXBW754.js → chunk-4VWMY4II.js} +32 -25
  9. package/dist/{chunk-6QJ3LADK.js → chunk-5P5PTZ3T.js} +1 -1
  10. package/dist/{chunk-PUY35TH3.js → chunk-BWW3XLEE.js} +2 -2
  11. package/dist/{chunk-W335CWYJ.js → chunk-CVQG2AZZ.js} +2 -2
  12. package/dist/{chunk-ZLYBUM7K.js → chunk-DQWRDRVO.js} +26 -14
  13. package/dist/{chunk-46C33ASD.js → chunk-EMLDFUTV.js} +1314 -908
  14. package/dist/{chunk-4OLQYRSA.js → chunk-GMKJPHN4.js} +1 -1
  15. package/dist/{chunk-CHD6HHWG.js → chunk-HQBCFU5G.js} +6 -8
  16. package/dist/{chunk-3PPEXDWR.js → chunk-I525XMUY.js} +1 -1
  17. package/dist/{chunk-LLMJ2SUT.js → chunk-IE4QOQUI.js} +21 -4
  18. package/dist/{chunk-ZGH6NEG6.js → chunk-JIQHUDVZ.js} +1 -1
  19. package/dist/{chunk-NIYCAW2I.js → chunk-NGP2NMZ4.js} +1 -1
  20. package/dist/{chunk-XMBM2XD5.js → chunk-T47OFHHX.js} +2 -4
  21. package/dist/{chunk-AXRMT33W.js → chunk-UIHPWC4C.js} +3 -0
  22. package/dist/{chunk-UJACD6K2.js → chunk-XSLRNFIY.js} +346 -304
  23. package/dist/{chunk-PT5STHFH.js → chunk-YXAK2637.js} +1 -1
  24. package/dist/{client-DFSCmf3H.d.ts → client-93pUw04R.d.ts} +182 -14
  25. package/dist/{deployments-Ci6GyANg.d.ts → deployments-D0mrWCsp.d.ts} +931 -115
  26. package/dist/{groups-Bi7lc54m.d.ts → groups-jLLG7MML.d.ts} +27 -2
  27. package/dist/{images-Cb8QHGjn.d.ts → images-BPiPqVKn.d.ts} +1 -1
  28. package/dist/index.d.ts +8 -8
  29. package/dist/index.js +12 -16
  30. package/dist/internal.d.ts +10 -10
  31. package/dist/internal.js +9 -10
  32. package/dist/{offers-Catj06u7.d.ts → offers-CPqiF3dZ.d.ts} +92 -3
  33. package/dist/{pages-CpYt56Km.d.ts → pages-1h1387a3.d.ts} +757 -3
  34. package/dist/portal-proxy.js +4 -4
  35. package/dist/react/index.d.ts +47 -19
  36. package/dist/react/index.js +361 -340
  37. package/dist/{schema-BaVl2VBS.d.ts → schema-Br3c1GOu.d.ts} +508 -2
  38. package/dist/schema.d.ts +866 -325
  39. package/dist/schema.js +61 -32
  40. package/dist/server/index.d.ts +10 -10
  41. package/dist/server/index.js +799 -541
  42. package/dist/{sign-in-options-CU1ND6-y.d.ts → sign-in-options--25uHySG.d.ts} +1 -1
  43. package/dist/{submission-input-Bi4HipqI.d.ts → submission-input-BEJ9qENg.d.ts} +2 -2
  44. package/dist/testing.d.ts +3 -3
  45. package/dist/testing.js +10 -13
  46. package/dist/{transport-0ttRwUat.d.ts → transport-C2cK-6wO.d.ts} +8598 -2008
  47. package/package.json +2 -1
  48. package/dist/chunk-2UAVZCMH.js +0 -314
  49. package/dist/chunk-NPGENI7K.js +0 -37
  50. package/dist/{profiles-BHMVj0kM.d.ts → profiles-D29SS12z.d.ts} +1 -1
@@ -1,4 +1,4 @@
1
- import { O as OpenIdentityKind } from './schema-BaVl2VBS.js';
1
+ import { O as OpenIdentityKind } from './schema-Br3c1GOu.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  /** One capability call of the captured evaluation run, as Relay stored it. */
@@ -54,6 +54,7 @@ declare const attemptCaptureSchema: z.ZodObject<{
54
54
  }, z.core.$strict>, z.ZodObject<{
55
55
  kind: z.ZodLiteral<"tier">;
56
56
  reward: z.ZodObject<{
57
+ badge: z.ZodOptional<z.ZodString>;
57
58
  id: z.ZodString;
58
59
  title: z.ZodString;
59
60
  tiers: z.ZodArray<z.ZodObject<{
@@ -160,6 +161,7 @@ declare const attemptCaptureSchema: z.ZodObject<{
160
161
  }, z.core.$strict>, z.ZodObject<{
161
162
  kind: z.ZodLiteral<"tier">;
162
163
  reward: z.ZodObject<{
164
+ badge: z.ZodOptional<z.ZodString>;
163
165
  id: z.ZodString;
164
166
  title: z.ZodString;
165
167
  tiers: z.ZodArray<z.ZodObject<{
@@ -217,6 +219,7 @@ declare const attemptCaptureSchema: z.ZodObject<{
217
219
  }, z.core.$strict>, z.ZodObject<{
218
220
  kind: z.ZodLiteral<"tier">;
219
221
  reward: z.ZodObject<{
222
+ badge: z.ZodOptional<z.ZodString>;
220
223
  id: z.ZodString;
221
224
  title: z.ZodString;
222
225
  tiers: z.ZodArray<z.ZodObject<{
@@ -254,6 +257,7 @@ declare const attemptCaptureSchema: z.ZodObject<{
254
257
  }, z.core.$strict>, z.ZodObject<{
255
258
  kind: z.ZodLiteral<"tier">;
256
259
  reward: z.ZodObject<{
260
+ badge: z.ZodOptional<z.ZodString>;
257
261
  id: z.ZodString;
258
262
  title: z.ZodString;
259
263
  tiers: z.ZodArray<z.ZodObject<{
@@ -1,22 +1,29 @@
1
- import { x as xContentBodySchema, I as IdentityKind, o as customSourceSchema, W as WithRecordData, p as WithContent, q as WithAccountRoles, r as QuestHandle, L as LedgerReference, G as GroupHandle, n as ResourceHandle, u as TrackerSource, v as trackerDefinitionSchema, y as Tracker, z as TrackerData, B as SourceRoles, C as LedgerHandle, D as xSearchSourceSchema, X as XTweet, F as XContentMetric, H as TrackerTriggerPolicy, J as Where, N as MemberIdentity, U as TrackerTriggerContext, V as TrackerReader, Y as TextReviewInput, Z as TextResult, P as PhotoResult, _ as Decision, $ as rewardSchema, a0 as TrackerTriggerMode, a1 as RoleOf, a2 as WhereSetting, a3 as ContentBody, a4 as ContentMetricName, a5 as triggerSchema, d as QuestPresentation, e as QuestProfile, f as QuizEvidence, a6 as TieredRewardDefinition } from './schema-BaVl2VBS.js';
2
- export { a7 as LedgerSetting, a8 as TrackerDataSchema, a9 as TrackerPage, aa as TrackerReadQuery, ab as trackerDataSchema, ac as trackerTriggerContextSchema } from './schema-BaVl2VBS.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 xSearchSourceSchema, X as XTweet, F as XContentMetric, H as TrackerTriggerPolicy, J as Where, N as MemberIdentity, U as TrackerTriggerContext, V as TrackerReader, Y as TextReviewInput, Z as TextResult, P as PhotoResult, _ as Decision, $ as rewardSchema, a0 as TrackerTriggerMode, a1 as RoleOf, a2 as WhereSetting, a3 as ContentBody, a4 as BadgeHandle, a5 as ContentMetricName, a6 as triggerSchema, d as QuestPresentation, e as QuestProfile, f as QuizEvidence, a7 as TieredRewardDefinition } from './schema-Br3c1GOu.js';
2
+ export { a8 as LedgerSetting, a9 as TrackerDataSchema, aa as TrackerPage, ab as TrackerReadQuery, ac as trackerDataSchema, ad as trackerTriggerContextSchema } from './schema-Br3c1GOu.js';
3
3
  import { z } from 'zod';
4
4
  export { z } from 'zod';
5
- import { E as EngagementBudget, r as leaderboardDefinitionSchema, q as AuthoringIdentity, s as pointLedgerDeclarationSchema, t as referralAuthoringSchema, C as CampaignDefinition, A as AvailabilityWindow } from './groups-Bi7lc54m.js';
6
- export { u as defineCampaign, v as defineGroup } from './groups-Bi7lc54m.js';
5
+ import { f as badgeDeclarationSchema, B as Badge } from './offers-CPqiF3dZ.js';
6
+ export { g as defineOffer } from './offers-CPqiF3dZ.js';
7
+ import { E as EngagementBudget, q as leaderboardDefinitionSchema, r as AuthoringIdentity, s as pointLedgerDeclarationSchema, t as referralAuthoringSchema, C as CampaignDefinition, A as AvailabilityWindow } from './groups-jLLG7MML.js';
8
+ export { u as defineCampaign, v as defineGroup } from './groups-jLLG7MML.js';
7
9
  import { d as discordMessagesSourceSchema, D as DiscordMessageData, b as DiscordMessageTextData, c as discordReactionsSourceSchema, e as DiscordReactionData, f as DiscordReader } from './accounts-5ciAkCMP.js';
8
10
  import { Q as QuizContent, a as StreakPolicy } from './streaks-CWyq8Px5.js';
9
11
  import { R as ResourceSource, S as Setting, I as IntegrationModule, B as Budget, a as IntegerSettings } from './integrations-Cr9EhGI_.js';
10
- import { P as Prerequisite, T as TextEvidence, U as UrlEvidence, a as TextOptions, b as UrlOptions } from './submission-input-Bi4HipqI.js';
11
- export { c as balanceAtLeast, d as completed, i as inGroup } from './submission-input-Bi4HipqI.js';
12
- import { I as ImageReader } from './images-Cb8QHGjn.js';
12
+ import { P as Prerequisite, T as TextEvidence, U as UrlEvidence, a as TextOptions, b as UrlOptions } from './submission-input-BEJ9qENg.js';
13
+ export { c as balanceAtLeast, d as completed, i as inGroup } from './submission-input-BEJ9qENg.js';
14
+ import { I as ImageReader } from './images-BPiPqVKn.js';
13
15
  import { X as XReader } from './capability-error-oTd3eYFH.js';
14
16
  export { C as CapabilityError, a as CapabilityErrorCode, c as capabilityErrorCodes } from './capability-error-oTd3eYFH.js';
15
- export { d as defineOffer } from './offers-Catj06u7.js';
16
17
  import { h as WalletReader } from './wallet-CDyo-U4n.js';
17
18
  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-CDyo-U4n.js';
18
19
  export { f as formatUnits, p as parseUnits } from './units-CwgsPB_r.js';
19
20
 
21
+ declare function defineBadge(input: z.input<typeof badgeDeclarationSchema>): {
22
+ name: string;
23
+ description: string;
24
+ image: string;
25
+ key: string;
26
+ } & ResourceHandle<"badge">;
20
27
  declare function defineLedger(input: z.input<typeof pointLedgerDeclarationSchema>): {
21
28
  name: string;
22
29
  description: string;
@@ -136,6 +143,7 @@ declare function defineReferral(input: Omit<ReferralInput, "qualification" | "in
136
143
  } | {
137
144
  kind: "automatic";
138
145
  };
146
+ badge?: string | undefined;
139
147
  };
140
148
  tier: string;
141
149
  } | {
@@ -160,6 +168,7 @@ declare function defineReferral(input: Omit<ReferralInput, "qualification" | "in
160
168
  } | {
161
169
  kind: "automatic";
162
170
  };
171
+ badge?: string | undefined;
163
172
  };
164
173
  tier: string;
165
174
  } | {
@@ -197,6 +206,7 @@ declare function defineReferral(input: Omit<ReferralInput, "qualification" | "in
197
206
  } | {
198
207
  kind: "automatic";
199
208
  };
209
+ badge?: string | undefined;
200
210
  };
201
211
  tier: string;
202
212
  } | {
@@ -247,8 +257,8 @@ declare function defineLeaderboard(input: Omit<LeaderboardInput, "key" | "id" |
247
257
  kind: "earned";
248
258
  }> | ReturnType<typeof earned>;
249
259
  }): {
250
- balance: string;
251
260
  title: string;
261
+ balance: string;
252
262
  access: "participants" | "public";
253
263
  score: {
254
264
  kind: "balance";
@@ -307,6 +317,7 @@ declare function defineLeaderboard(input: Omit<LeaderboardInput, "key" | "id" |
307
317
  } | {
308
318
  kind: "automatic";
309
319
  };
320
+ badge?: string | undefined;
310
321
  };
311
322
  tier: string;
312
323
  } | {
@@ -465,6 +476,27 @@ declare const settings: {
465
476
  object<T extends Record<string, Setting>>(shape: T): z.ZodObject<{ -readonly [P in keyof T]: T[P]; }, z.core.$strict>;
466
477
  };
467
478
 
479
+ declare const badge: (definition: BadgeHandle & Pick<Badge, "name">) => {
480
+ reward: {
481
+ badge: string;
482
+ id: string;
483
+ title: string;
484
+ tiers: {
485
+ id: string;
486
+ title: string;
487
+ }[];
488
+ inventory: {
489
+ kind: "untracked";
490
+ };
491
+ fulfillment: {
492
+ kind: "staff-handover";
493
+ } | {
494
+ kind: "automatic";
495
+ };
496
+ };
497
+ kind: "tier";
498
+ tier: string;
499
+ };
468
500
  type Reward = z.infer<typeof rewardSchema>;
469
501
  declare const points: (ledger: LedgerReference, amount: number) => {
470
502
  kind: "points";
@@ -751,6 +783,7 @@ declare function defineTieredReward<const T extends readonly {
751
783
  } | {
752
784
  kind: "automatic";
753
785
  };
786
+ badge?: string | undefined;
754
787
  };
755
788
  tier: string;
756
789
  };
@@ -1012,17 +1045,18 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1012
1045
  } | {
1013
1046
  kind: "automatic";
1014
1047
  };
1048
+ badge?: string | undefined;
1015
1049
  };
1016
1050
  tier: string;
1017
- } | {
1018
- kind: "points";
1019
- balance: string;
1020
- amount: number;
1021
1051
  } | {
1022
1052
  kind: "integration";
1023
1053
  provider: "discord";
1024
1054
  action: "grant-role";
1025
1055
  roleId: string;
1056
+ } | {
1057
+ kind: "points";
1058
+ balance: string;
1059
+ amount: number;
1026
1060
  })[] | ((ctx: {
1027
1061
  settings: z.core.$InferObjectOutput<T, {}>;
1028
1062
  }) => Reward[]);
@@ -1045,6 +1079,24 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1045
1079
  evaluatorProtocol: 2;
1046
1080
  title: string;
1047
1081
  presentation: {
1082
+ steps?: {
1083
+ title: string;
1084
+ description?: string | undefined;
1085
+ action?: {
1086
+ kind: "link";
1087
+ url: string;
1088
+ label: string;
1089
+ } | undefined;
1090
+ }[] | undefined;
1091
+ image?: string | undefined;
1092
+ imageAlt?: string | undefined;
1093
+ requirements?: ({
1094
+ kind: "account";
1095
+ provider: "discord" | "x" | "google" | "apple";
1096
+ } | {
1097
+ kind: "wallet";
1098
+ chain?: "solana" | "eip155" | "cosmos" | undefined;
1099
+ })[] | undefined;
1048
1100
  quiz?: {
1049
1101
  id: string;
1050
1102
  prompt: string;
@@ -1079,9 +1131,6 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1079
1131
  kind: "resource";
1080
1132
  default: string;
1081
1133
  source: {
1082
- provider: "domino";
1083
- resource: "point-ledger";
1084
- } | {
1085
1134
  provider: "discord";
1086
1135
  resource: "channel";
1087
1136
  types: ("text" | "announcement")[];
@@ -1089,6 +1138,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1089
1138
  provider: "discord";
1090
1139
  resource: "role";
1091
1140
  assignable: boolean;
1141
+ } | {
1142
+ provider: "domino";
1143
+ resource: "point-ledger";
1092
1144
  };
1093
1145
  label: string;
1094
1146
  description?: string | undefined;
@@ -1158,17 +1210,18 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1158
1210
  } | {
1159
1211
  kind: "automatic";
1160
1212
  };
1213
+ badge?: string | undefined;
1161
1214
  };
1162
1215
  tier: string;
1163
- } | {
1164
- kind: "points";
1165
- balance: string;
1166
- amount: number;
1167
1216
  } | {
1168
1217
  kind: "integration";
1169
1218
  provider: "discord";
1170
1219
  action: "grant-role";
1171
1220
  roleId: string;
1221
+ } | {
1222
+ kind: "points";
1223
+ balance: string;
1224
+ amount: number;
1172
1225
  })[];
1173
1226
  humanReview: boolean;
1174
1227
  trigger: {
@@ -1190,7 +1243,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1190
1243
  actor?: "staff" | "member" | undefined;
1191
1244
  } | {
1192
1245
  kind: "manual";
1193
- input: "photo" | "quiz" | "none";
1246
+ input: "none" | "quiz" | "photo";
1194
1247
  actor?: "staff" | "member" | undefined;
1195
1248
  } | {
1196
1249
  kind: "automatic";
@@ -1234,9 +1287,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1234
1287
  path: string;
1235
1288
  equals: string | number | boolean;
1236
1289
  })[] | undefined;
1237
- enrollment?: "required" | "none" | undefined;
1290
+ enrollment?: "none" | "required" | undefined;
1238
1291
  since?: "activation" | "window" | "enrollment" | undefined;
1239
- historical?: "automatic" | "staff" | "claim" | undefined;
1292
+ historical?: "staff" | "claim" | "automatic" | undefined;
1240
1293
  content?: true | undefined;
1241
1294
  } | undefined;
1242
1295
  };
@@ -1259,9 +1312,6 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1259
1312
  title: string;
1260
1313
  })[];
1261
1314
  completion: {
1262
- kind: "streak";
1263
- days: number;
1264
- } | {
1265
1315
  kind: "progress";
1266
1316
  goal: {
1267
1317
  kind: "count";
@@ -1278,6 +1328,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1278
1328
  durationMs: number;
1279
1329
  };
1280
1330
  repeat: "repeat" | "once";
1331
+ } | {
1332
+ kind: "streak";
1333
+ days: number;
1281
1334
  } | {
1282
1335
  kind: "once";
1283
1336
  } | {
@@ -1303,7 +1356,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
1303
1356
  campaign?: {
1304
1357
  key: string;
1305
1358
  title: string;
1306
- enrollment: "required" | "none";
1359
+ enrollment: "none" | "required";
1307
1360
  window?: {
1308
1361
  from: number;
1309
1362
  until: number;
@@ -1409,17 +1462,18 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1409
1462
  } | {
1410
1463
  kind: "automatic";
1411
1464
  };
1465
+ badge?: string | undefined;
1412
1466
  };
1413
1467
  tier: string;
1414
- } | {
1415
- kind: "points";
1416
- balance: string;
1417
- amount: number;
1418
1468
  } | {
1419
1469
  kind: "integration";
1420
1470
  provider: "discord";
1421
1471
  action: "grant-role";
1422
1472
  roleId: string;
1473
+ } | {
1474
+ kind: "points";
1475
+ balance: string;
1476
+ amount: number;
1423
1477
  })[] | ((ctx: {
1424
1478
  settings: z.core.$InferObjectOutput<T, {}>;
1425
1479
  }) => Reward[]);
@@ -1442,6 +1496,24 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1442
1496
  evaluatorProtocol: 2;
1443
1497
  title: string;
1444
1498
  presentation: {
1499
+ steps?: {
1500
+ title: string;
1501
+ description?: string | undefined;
1502
+ action?: {
1503
+ kind: "link";
1504
+ url: string;
1505
+ label: string;
1506
+ } | undefined;
1507
+ }[] | undefined;
1508
+ image?: string | undefined;
1509
+ imageAlt?: string | undefined;
1510
+ requirements?: ({
1511
+ kind: "account";
1512
+ provider: "discord" | "x" | "google" | "apple";
1513
+ } | {
1514
+ kind: "wallet";
1515
+ chain?: "solana" | "eip155" | "cosmos" | undefined;
1516
+ })[] | undefined;
1445
1517
  quiz?: {
1446
1518
  id: string;
1447
1519
  prompt: string;
@@ -1476,9 +1548,6 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1476
1548
  kind: "resource";
1477
1549
  default: string;
1478
1550
  source: {
1479
- provider: "domino";
1480
- resource: "point-ledger";
1481
- } | {
1482
1551
  provider: "discord";
1483
1552
  resource: "channel";
1484
1553
  types: ("text" | "announcement")[];
@@ -1486,6 +1555,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1486
1555
  provider: "discord";
1487
1556
  resource: "role";
1488
1557
  assignable: boolean;
1558
+ } | {
1559
+ provider: "domino";
1560
+ resource: "point-ledger";
1489
1561
  };
1490
1562
  label: string;
1491
1563
  description?: string | undefined;
@@ -1555,17 +1627,18 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1555
1627
  } | {
1556
1628
  kind: "automatic";
1557
1629
  };
1630
+ badge?: string | undefined;
1558
1631
  };
1559
1632
  tier: string;
1560
- } | {
1561
- kind: "points";
1562
- balance: string;
1563
- amount: number;
1564
1633
  } | {
1565
1634
  kind: "integration";
1566
1635
  provider: "discord";
1567
1636
  action: "grant-role";
1568
1637
  roleId: string;
1638
+ } | {
1639
+ kind: "points";
1640
+ balance: string;
1641
+ amount: number;
1569
1642
  })[];
1570
1643
  humanReview: boolean;
1571
1644
  trigger: {
@@ -1587,7 +1660,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1587
1660
  actor?: "staff" | "member" | undefined;
1588
1661
  } | {
1589
1662
  kind: "manual";
1590
- input: "photo" | "quiz" | "none";
1663
+ input: "none" | "quiz" | "photo";
1591
1664
  actor?: "staff" | "member" | undefined;
1592
1665
  } | {
1593
1666
  kind: "automatic";
@@ -1631,9 +1704,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1631
1704
  path: string;
1632
1705
  equals: string | number | boolean;
1633
1706
  })[] | undefined;
1634
- enrollment?: "required" | "none" | undefined;
1707
+ enrollment?: "none" | "required" | undefined;
1635
1708
  since?: "activation" | "window" | "enrollment" | undefined;
1636
- historical?: "automatic" | "staff" | "claim" | undefined;
1709
+ historical?: "staff" | "claim" | "automatic" | undefined;
1637
1710
  content?: true | undefined;
1638
1711
  } | undefined;
1639
1712
  };
@@ -1656,9 +1729,6 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1656
1729
  title: string;
1657
1730
  })[];
1658
1731
  completion: {
1659
- kind: "streak";
1660
- days: number;
1661
- } | {
1662
1732
  kind: "progress";
1663
1733
  goal: {
1664
1734
  kind: "count";
@@ -1675,6 +1745,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1675
1745
  durationMs: number;
1676
1746
  };
1677
1747
  repeat: "repeat" | "once";
1748
+ } | {
1749
+ kind: "streak";
1750
+ days: number;
1678
1751
  } | {
1679
1752
  kind: "once";
1680
1753
  } | {
@@ -1700,7 +1773,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1700
1773
  campaign?: {
1701
1774
  key: string;
1702
1775
  title: string;
1703
- enrollment: "required" | "none";
1776
+ enrollment: "none" | "required";
1704
1777
  window?: {
1705
1778
  from: number;
1706
1779
  until: number;
@@ -1757,4 +1830,4 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
1757
1830
  }): Promise<Decision>;
1758
1831
  } & ResourceHandle<"quest">;
1759
1832
 
1760
- export { ContentBody, type ContentData, ContentMetricName, type ContentTrigger, type ContentTriggerInput, DiscordMessageData, DiscordMessageTextData, DiscordReactionData, DiscordReader, type EvaluationCalendar, type EvaluationCalendarDay, type EvaluationContext, type EvaluationMember, GroupHandle, IdentityKind, ImageReader, IntegrationModule, type KeyedContext, LedgerHandle, LedgerReference, MemberIdentity, type Outcome, type PerformanceContext, type PerformanceOutcome, QuestHandle, RoleOf, Setting, Tracker, TrackerData, TrackerReader, type TrackerTrigger, TrackerTriggerContext, type TrackerTriggerInput, type TriggerAdmission, WalletReader, Where, type XContentBody, XReader, automatic, automaticFulfillment, budget, calendar, content, count, customSource, decision, defineEngagementReward, defineLeaderboard, defineLedger, defineQuest, defineQuestType, defineReferral, defineTieredReward, defineTracker, discord, earned, evaluators, evidence, keyed, manual, once, pointLedgers, points, progress, questCompleted, rolling, settings, staffHandover, streak, untracked, x };
1833
+ export { ContentBody, type ContentData, ContentMetricName, type ContentTrigger, type ContentTriggerInput, DiscordMessageData, DiscordMessageTextData, DiscordReactionData, DiscordReader, type EvaluationCalendar, type EvaluationCalendarDay, type EvaluationContext, type EvaluationMember, GroupHandle, IdentityKind, ImageReader, IntegrationModule, type KeyedContext, LedgerHandle, LedgerReference, MemberIdentity, type Outcome, type PerformanceContext, type PerformanceOutcome, QuestHandle, RoleOf, Setting, Tracker, TrackerData, TrackerReader, type TrackerTrigger, TrackerTriggerContext, type TrackerTriggerInput, type TriggerAdmission, WalletReader, Where, type XContentBody, XReader, automatic, automaticFulfillment, badge, budget, calendar, content, count, customSource, decision, defineBadge, defineEngagementReward, defineLeaderboard, defineLedger, defineQuest, defineQuestType, defineReferral, defineTieredReward, defineTracker, discord, earned, evaluators, evidence, keyed, manual, once, pointLedgers, points, progress, questCompleted, rolling, settings, staffHandover, streak, untracked, x };
package/dist/authoring.js CHANGED
@@ -10,8 +10,9 @@ import {
10
10
  sourceDataSchema,
11
11
  sourceRoles,
12
12
  validateQuestShape
13
- } from "./chunk-4OLQYRSA.js";
13
+ } from "./chunk-GMKJPHN4.js";
14
14
  import {
15
+ badgeDeclarationSchema,
15
16
  defineOffer,
16
17
  engagementDefinitionSchema,
17
18
  engagementScoreInputSchema,
@@ -19,21 +20,18 @@ import {
19
20
  leaderboardAuthoringSchema,
20
21
  pointLedgerDeclarationSchema,
21
22
  referralAuthoringSchema
22
- } from "./chunk-UJACD6K2.js";
23
- import {
24
- cosmosDenomSchema,
25
- cosmosNetworkSchema,
26
- isEvmChainId
27
- } from "./chunk-2UAVZCMH.js";
28
- import "./chunk-NPGENI7K.js";
23
+ } from "./chunk-XSLRNFIY.js";
29
24
  import {
30
25
  authoringKey,
26
+ badgeReward,
31
27
  balanceAtLeast,
32
28
  budgetSchema,
33
29
  completed,
34
30
  contentMetricNameSchema,
35
31
  contentPerformancePolicySchema,
36
32
  contentPerformanceSnapshotSchema,
33
+ cosmosDenomSchema,
34
+ cosmosNetworkSchema,
37
35
  counterGoalSchema,
38
36
  counterPolicySchema,
39
37
  counterWindowSchema,
@@ -49,6 +47,7 @@ import {
49
47
  evaluatorProtocol,
50
48
  identifier,
51
49
  inGroup,
50
+ isEvmChainId,
52
51
  ledgerKey,
53
52
  ledgerSettingSchema,
54
53
  parseSettings,
@@ -78,10 +77,13 @@ import {
78
77
  whereSchemaIssue,
79
78
  whereSettings,
80
79
  xSearchSourceSchema
81
- } from "./chunk-46C33ASD.js";
80
+ } from "./chunk-EMLDFUTV.js";
82
81
 
83
82
  // src/builders.ts
84
83
  import { z } from "zod";
84
+ function defineBadge(input) {
85
+ return resourceHandle("badge", badgeDeclarationSchema.parse(input));
86
+ }
85
87
  function defineLedger(input) {
86
88
  return resourceHandle("ledger", pointLedgerDeclarationSchema.parse(input));
87
89
  }
@@ -345,6 +347,7 @@ var settings = {
345
347
  // src/authoring.ts
346
348
  import { z as z2 } from "zod";
347
349
  import { z as z3 } from "zod";
350
+ var badge = (definition) => badgeReward(definition.key, definition.name);
348
351
  var points = (ledger, amount) => pointsRewardSchema.parse({
349
352
  kind: "points",
350
353
  balance: ledgerKey(ledger),
@@ -766,6 +769,7 @@ export {
766
769
  CapabilityError,
767
770
  automatic,
768
771
  automaticFulfillment,
772
+ badge,
769
773
  balanceAtLeast,
770
774
  budget,
771
775
  calendar,
@@ -777,6 +781,7 @@ export {
777
781
  count,
778
782
  customSource,
779
783
  decision,
784
+ defineBadge,
780
785
  defineCampaign,
781
786
  defineEngagementReward,
782
787
  defineGroup,
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { a as AttemptStatus } from './schema-BaVl2VBS.js';
2
+ import { a as AttemptStatus } from './schema-Br3c1GOu.js';
3
3
 
4
4
  declare const collectionCodeSchema: z.ZodString;
5
5
  declare const collectionPassSchema: z.ZodObject<{
@@ -756,6 +756,7 @@ declare const automaticCatchUpPreviewSchema: z.ZodObject<{
756
756
  }, z.core.$strict>, z.ZodObject<{
757
757
  kind: z.ZodLiteral<"tier">;
758
758
  reward: z.ZodObject<{
759
+ badge: z.ZodOptional<z.ZodString>;
759
760
  id: z.ZodString;
760
761
  title: z.ZodString;
761
762
  tiers: z.ZodArray<z.ZodObject<{
package/dist/avatar.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { L as LinkedWallet } from './wallet-CDyo-U4n.js';
2
- import { P as ProfileAvatar } from './profiles-BHMVj0kM.js';
2
+ import { P as ProfileAvatar } from './profiles-D29SS12z.js';
3
3
  import 'zod';
4
4
 
5
5
  /**
package/dist/browser.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- import { n as SubmissionStore, f as RelayClientOptions, R as RelayClient } from './client-DFSCmf3H.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-CU1ND6-y.js';
3
- import './groups-Bi7lc54m.js';
1
+ import { n as SubmissionStore, f as RelayClientOptions, R as RelayClient } from './client-93pUw04R.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--25uHySG.js';
3
+ import './groups-jLLG7MML.js';
4
4
  import 'zod';
5
- import './schema-BaVl2VBS.js';
6
- import './pages-CpYt56Km.js';
7
- import './submission-input-Bi4HipqI.js';
5
+ import './schema-Br3c1GOu.js';
6
+ import './pages-1h1387a3.js';
7
+ import './submission-input-BEJ9qENg.js';
8
8
  import './action-DBzILFx9.js';
9
9
  import './participant-activity-DYdUUhw2.js';
10
10
  import './accounts-5ciAkCMP.js';
11
- import './profiles-BHMVj0kM.js';
11
+ import './profiles-D29SS12z.js';
12
12
  import './wallet-CDyo-U4n.js';
13
13
 
14
14
  /** Browser client with durable submission recovery; safe to construct during SSR. */
package/dist/browser.js CHANGED
@@ -11,17 +11,15 @@ import {
11
11
  signInOptions,
12
12
  solanaSigner,
13
13
  walletStandardSolanaSigner
14
- } from "./chunk-PUY35TH3.js";
15
- import "./chunk-PJXBW754.js";
16
- import "./chunk-XMBM2XD5.js";
17
- import "./chunk-LLMJ2SUT.js";
18
- import "./chunk-UJACD6K2.js";
19
- import "./chunk-2UAVZCMH.js";
20
- import "./chunk-6QJ3LADK.js";
21
- import "./chunk-NPGENI7K.js";
22
- import "./chunk-3PPEXDWR.js";
23
- import "./chunk-PT5STHFH.js";
24
- import "./chunk-46C33ASD.js";
14
+ } from "./chunk-BWW3XLEE.js";
15
+ import "./chunk-4VWMY4II.js";
16
+ import "./chunk-T47OFHHX.js";
17
+ import "./chunk-IE4QOQUI.js";
18
+ import "./chunk-XSLRNFIY.js";
19
+ import "./chunk-5P5PTZ3T.js";
20
+ import "./chunk-I525XMUY.js";
21
+ import "./chunk-YXAK2637.js";
22
+ import "./chunk-EMLDFUTV.js";
25
23
  export {
26
24
  browserSubmissionStore,
27
25
  cosmosChainList,