@domino-sdk/relay 1.21.0 → 1.23.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/accounts-B31dWEYD.d.ts +292 -0
  2. package/dist/{attempt-captures-ByzZyggX.d.ts → attempt-captures-JDIgz2lY.d.ts} +1 -1
  3. package/dist/authoring.d.ts +112 -49
  4. package/dist/authoring.js +37 -3
  5. package/dist/{automatic-outcomes-BBSdMf0R.d.ts → automatic-outcomes-T9lEIvTj.d.ts} +1 -1
  6. package/dist/browser.d.ts +8 -8
  7. package/dist/browser.js +10 -9
  8. package/dist/{chunk-WQT4H2PI.js → chunk-57KARWUC.js} +1 -1
  9. package/dist/{chunk-EMLDFUTV.js → chunk-6UFXPKLA.js} +6 -1
  10. package/dist/{chunk-GMKJPHN4.js → chunk-AXQYGVOP.js} +1 -1
  11. package/dist/{chunk-JIQHUDVZ.js → chunk-B4EZ76WX.js} +1 -1
  12. package/dist/{chunk-T47OFHHX.js → chunk-E7MVYASS.js} +1 -1
  13. package/dist/{chunk-CVQG2AZZ.js → chunk-ENBQ6UEE.js} +2 -2
  14. package/dist/{chunk-NGP2NMZ4.js → chunk-G75JVB4D.js} +1 -1
  15. package/dist/{chunk-5ZRDK4KQ.js → chunk-GB26FIZT.js} +96 -118
  16. package/dist/{chunk-YXAK2637.js → chunk-JUQ2GNMD.js} +1 -1
  17. package/dist/{chunk-XSLRNFIY.js → chunk-MRU7GX2V.js} +1 -1
  18. package/dist/{chunk-YVBWCT4S.js → chunk-RPEGZW27.js} +2 -2
  19. package/dist/{chunk-NHHM5ASX.js → chunk-SMUYGCGP.js} +4 -4
  20. package/dist/{chunk-7YRXDG7R.js → chunk-UCZGXYCN.js} +9 -7
  21. package/dist/chunk-W33PYWYQ.js +102 -0
  22. package/dist/{chunk-5P5PTZ3T.js → chunk-WOGCRDFT.js} +1 -1
  23. package/dist/{chunk-H4FL5WA5.js → chunk-XQE22UKY.js} +13 -11
  24. package/dist/{client-DSlycgar.d.ts → client-HG0uMG0Q.d.ts} +6 -6
  25. package/dist/{deployments-nNS4spO9.d.ts → deployments-B--Shwgx.d.ts} +121 -109
  26. package/dist/{groups-jLLG7MML.d.ts → groups-CfyRewkJ.d.ts} +1 -1
  27. package/dist/{images-BPiPqVKn.d.ts → images-DwNmzqWv.d.ts} +1 -1
  28. package/dist/index.d.ts +9 -9
  29. package/dist/index.js +9 -8
  30. package/dist/{integrations-Cr9EhGI_.d.ts → integrations-BMNtARU_.d.ts} +2 -0
  31. package/dist/internal.d.ts +9 -9
  32. package/dist/internal.js +8 -8
  33. package/dist/{offers-CPqiF3dZ.d.ts → offers-CEwkAGsB.d.ts} +2 -2
  34. package/dist/{pages-1h1387a3.d.ts → pages-D1xrbGJl.d.ts} +6 -1
  35. package/dist/{telegram-DALZ7GdF.d.ts → participant-activity-DYdUUhw2.d.ts} +1 -40
  36. package/dist/portal-proxy.js +3 -3
  37. package/dist/react/index.d.ts +11 -11
  38. package/dist/react/index.js +10 -9
  39. package/dist/{schema-Br3c1GOu.d.ts → schema-D57mhL2q.d.ts} +1427 -1422
  40. package/dist/schema.d.ts +325 -323
  41. package/dist/schema.js +29 -11
  42. package/dist/server/index.d.ts +9 -9
  43. package/dist/server/index.js +59 -15
  44. package/dist/{submission-input-BEJ9qENg.d.ts → submission-input-DjXg0o-r.d.ts} +2 -2
  45. package/dist/{telegram-browser-CGB01TaB.d.ts → telegram-browser-DaP0Rawg.d.ts} +2 -3
  46. package/dist/testing.d.ts +18 -6
  47. package/dist/testing.js +42 -7
  48. package/dist/{transport-DUc8QwDl.d.ts → transport-BZbTTtBk.d.ts} +2216 -2007
  49. package/package.json +1 -1
  50. package/dist/accounts-5ciAkCMP.d.ts +0 -147
package/dist/authoring.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  sourceDataSchema,
11
11
  sourceRoles,
12
12
  validateQuestShape
13
- } from "./chunk-GMKJPHN4.js";
13
+ } from "./chunk-AXQYGVOP.js";
14
14
  import {
15
15
  badgeDeclarationSchema,
16
16
  defineOffer,
@@ -20,7 +20,11 @@ import {
20
20
  leaderboardAuthoringSchema,
21
21
  pointLedgerDeclarationSchema,
22
22
  referralAuthoringSchema
23
- } from "./chunk-XSLRNFIY.js";
23
+ } from "./chunk-MRU7GX2V.js";
24
+ import {
25
+ telegramReactionDataSchema,
26
+ telegramReactionsNamespace
27
+ } from "./chunk-W33PYWYQ.js";
24
28
  import {
25
29
  authoringKey,
26
30
  badgeReward,
@@ -77,7 +81,7 @@ import {
77
81
  whereSchemaIssue,
78
82
  whereSettings,
79
83
  xSearchSourceSchema
80
- } from "./chunk-EMLDFUTV.js";
84
+ } from "./chunk-6UFXPKLA.js";
81
85
 
82
86
  // src/builders.ts
83
87
  import { z } from "zod";
@@ -258,6 +262,15 @@ var discord = {
258
262
  });
259
263
  }
260
264
  };
265
+ var telegram = {
266
+ reactions() {
267
+ return customSource(telegramReactionsNamespace, {
268
+ identities: ["member"],
269
+ accounts: ["messageAuthor"],
270
+ data: telegramReactionDataSchema
271
+ });
272
+ }
273
+ };
261
274
  var pointLedgers = () => ({
262
275
  provider: "domino",
263
276
  resource: "point-ledger"
@@ -320,6 +333,25 @@ var settings = {
320
333
  z.string().min(field.minLength).max(field.maxLength).default(field.default).meta(field)
321
334
  );
322
335
  },
336
+ /**
337
+ * A Telegram chat the project connected, by its numeric ID: Console lists the connected chats
338
+ * to choose from. Pass it to `ctx.telegram.member({ chat })`.
339
+ */
340
+ telegramChat(options) {
341
+ const field = {
342
+ ...options,
343
+ kind: "text",
344
+ default: options.default ?? "",
345
+ minLength: 0,
346
+ maxLength: 64,
347
+ multiline: false,
348
+ picker: "telegram-chat"
349
+ };
350
+ return setting(
351
+ "text",
352
+ z.string().max(field.maxLength).default(field.default).meta(field)
353
+ );
354
+ },
323
355
  integer(options) {
324
356
  return setting(
325
357
  "integer",
@@ -735,6 +767,7 @@ function questBuilder(template) {
735
767
  trackers: schemaCheckedReader(ctx.trackers),
736
768
  wallet: ctx.wallet,
737
769
  images: ctx.images,
770
+ ...ctx.telegram ? { telegram: ctx.telegram } : {},
738
771
  // The declared module providers select these keys; unrelated host readers are omitted.
739
772
  ...Object.fromEntries(
740
773
  integrations.map((provider) => [provider, ctx[provider]])
@@ -812,6 +845,7 @@ export {
812
845
  settings,
813
846
  staffHandover,
814
847
  streak,
848
+ telegram,
815
849
  trackerDataSchema,
816
850
  trackerTriggerContextSchema,
817
851
  untracked,
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { a as AttemptStatus } from './schema-Br3c1GOu.js';
2
+ import { a as AttemptStatus } from './schema-D57mhL2q.js';
3
3
 
4
4
  declare const collectionCodeSchema: z.ZodString;
5
5
  declare const collectionPassSchema: z.ZodObject<{
package/dist/browser.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { n as SubmissionStore, f as RelayClientOptions, R as RelayClient } from './client-DSlycgar.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-CGB01TaB.js';
3
- import './groups-jLLG7MML.js';
1
+ import { n as SubmissionStore, f as RelayClientOptions, R as RelayClient } from './client-HG0uMG0Q.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-DaP0Rawg.js';
3
+ import './groups-CfyRewkJ.js';
4
4
  import 'zod';
5
- import './schema-Br3c1GOu.js';
6
- import './pages-1h1387a3.js';
7
- import './submission-input-BEJ9qENg.js';
5
+ import './schema-D57mhL2q.js';
6
+ import './pages-D1xrbGJl.js';
7
+ import './submission-input-DjXg0o-r.js';
8
8
  import './action-DBzILFx9.js';
9
- import './telegram-DALZ7GdF.js';
10
- import './accounts-5ciAkCMP.js';
9
+ import './participant-activity-DYdUUhw2.js';
10
+ import './accounts-B31dWEYD.js';
11
11
  import './profiles-D29SS12z.js';
12
12
  import './wallet-CDyo-U4n.js';
13
13
 
package/dist/browser.js CHANGED
@@ -12,15 +12,16 @@ import {
12
12
  solanaSigner,
13
13
  telegramMiniAppInitData,
14
14
  walletStandardSolanaSigner
15
- } from "./chunk-YVBWCT4S.js";
16
- import "./chunk-H4FL5WA5.js";
17
- import "./chunk-T47OFHHX.js";
18
- import "./chunk-5ZRDK4KQ.js";
19
- import "./chunk-XSLRNFIY.js";
20
- import "./chunk-5P5PTZ3T.js";
21
- import "./chunk-WQT4H2PI.js";
22
- import "./chunk-YXAK2637.js";
23
- import "./chunk-EMLDFUTV.js";
15
+ } from "./chunk-RPEGZW27.js";
16
+ import "./chunk-XQE22UKY.js";
17
+ import "./chunk-E7MVYASS.js";
18
+ import "./chunk-GB26FIZT.js";
19
+ import "./chunk-MRU7GX2V.js";
20
+ import "./chunk-W33PYWYQ.js";
21
+ import "./chunk-WOGCRDFT.js";
22
+ import "./chunk-57KARWUC.js";
23
+ import "./chunk-JUQ2GNMD.js";
24
+ import "./chunk-6UFXPKLA.js";
24
25
  export {
25
26
  browserSubmissionStore,
26
27
  cosmosChainList,
@@ -1,6 +1,6 @@
1
1
  // package.json
2
2
  var name = "@domino-sdk/relay";
3
- var version = "1.21.0";
3
+ var version = "1.23.0";
4
4
 
5
5
  // src/client-identity.ts
6
6
  function clientIdentity() {
@@ -2424,7 +2424,12 @@ var settingFieldSchema = z21.discriminatedUnion("kind", [
2424
2424
  default: z21.string(),
2425
2425
  minLength: z21.number().int().nonnegative(),
2426
2426
  maxLength: z21.number().int().positive(),
2427
- multiline: z21.boolean()
2427
+ multiline: z21.boolean(),
2428
+ /**
2429
+ * A list Console offers the value from, beside free text: `telegram-chat` lists the
2430
+ * project's connected Telegram chats. Unknown pickers read as free text.
2431
+ */
2432
+ picker: z21.string().optional()
2428
2433
  }).strict(),
2429
2434
  z21.object({
2430
2435
  ...base,
@@ -5,7 +5,7 @@ import {
5
5
  isKnownTrackerSource,
6
6
  trackerDataSchema,
7
7
  xAccountRoles
8
- } from "./chunk-EMLDFUTV.js";
8
+ } from "./chunk-6UFXPKLA.js";
9
9
 
10
10
  // src/quest-shape.ts
11
11
  function validateQuestShape(description, options = {}) {
@@ -2,7 +2,7 @@ import {
2
2
  identifier,
3
3
  responseShape,
4
4
  xTweetSchema
5
- } from "./chunk-EMLDFUTV.js";
5
+ } from "./chunk-6UFXPKLA.js";
6
6
 
7
7
  // src/x.ts
8
8
  import { z } from "zod";
@@ -2,7 +2,7 @@ import {
2
2
  RelayErrorCode,
3
3
  clientError,
4
4
  isRequestError
5
- } from "./chunk-EMLDFUTV.js";
5
+ } from "./chunk-6UFXPKLA.js";
6
6
 
7
7
  // src/action.ts
8
8
  function withActionId(value) {
@@ -4,10 +4,10 @@ import {
4
4
  imageFieldsSchema,
5
5
  imageInspectionSchema,
6
6
  imageSightingsSchema
7
- } from "./chunk-JIQHUDVZ.js";
7
+ } from "./chunk-B4EZ76WX.js";
8
8
  import {
9
9
  photoResultSchema
10
- } from "./chunk-EMLDFUTV.js";
10
+ } from "./chunk-6UFXPKLA.js";
11
11
 
12
12
  // src/image-results.ts
13
13
  import { z } from "zod";
@@ -8,7 +8,7 @@ import {
8
8
  rewardBundleSchema,
9
9
  settingsValuesSchema,
10
10
  trackerTriggerContextSchema
11
- } from "./chunk-EMLDFUTV.js";
11
+ } from "./chunk-6UFXPKLA.js";
12
12
 
13
13
  // src/server/attempt-captures.ts
14
14
  import { z } from "zod";
@@ -1,9 +1,8 @@
1
1
  import {
2
2
  badgeSchema,
3
3
  pointLedgerReferenceSchema
4
- } from "./chunk-XSLRNFIY.js";
4
+ } from "./chunk-MRU7GX2V.js";
5
5
  import {
6
- accountConnectionSchema,
7
6
  authoringIdentityShape,
8
7
  entitlementSchema,
9
8
  identifier,
@@ -21,7 +20,7 @@ import {
21
20
  storedQuestDescriptionSchema,
22
21
  storedReviewModeSchema,
23
22
  tieredRewardReferenceSchema
24
- } from "./chunk-EMLDFUTV.js";
23
+ } from "./chunk-6UFXPKLA.js";
25
24
 
26
25
  // src/participant-activity.ts
27
26
  import { z } from "zod";
@@ -271,47 +270,30 @@ var questPublicationPreviewSchema = responseShape(
271
270
  var allocateQuestSchema = z2.object({ actionId: identifier }).strict();
272
271
  var allocatedQuestSchema = z2.object({ id: identifier });
273
272
 
274
- // src/telegram.ts
275
- import { z as z3 } from "zod";
276
- var telegramSignInMethodsSchema = z3.object({
277
- /** Telegram Login, the OpenID Connect sign-in Domino configures for the platform. */
278
- login: z3.boolean(),
279
- /** Mini App sign-in, which the project enables in Console with its bot's ID. */
280
- miniApp: z3.boolean()
281
- });
282
- var telegramAccountConnectionSchema = accountConnectionSchema.extend({
283
- provider: z3.literal("telegram")
284
- });
285
- var telegramInitDataSchema = z3.string().min(1, "Pass the Mini App's Telegram.WebApp.initData").max(8192);
286
- var telegramMiniAppSignInSchema = z3.object({
287
- initData: telegramInitDataSchema,
288
- mode: z3.enum(["sign-in", "connect"])
289
- }).strict();
290
-
291
273
  // src/collection.ts
292
- import { z as z4 } from "zod";
293
- var collectionCodeSchema = z4.string().regex(/^relay:collect:[a-f0-9]{64}$/);
294
- var collectionPassSchema = z4.object({
274
+ import { z as z3 } from "zod";
275
+ var collectionCodeSchema = z3.string().regex(/^relay:collect:[a-f0-9]{64}$/);
276
+ var collectionPassSchema = z3.object({
295
277
  code: collectionCodeSchema,
296
- expiresAt: z4.number(),
278
+ expiresAt: z3.number(),
297
279
  entitlement: identifier
298
280
  });
299
- var collectionResolveSchema = z4.object({ code: collectionCodeSchema }).strict();
281
+ var collectionResolveSchema = z3.object({ code: collectionCodeSchema }).strict();
300
282
  var collectionBeginSchema = collectionResolveSchema.extend({
301
283
  actionId: identifier,
302
- revision: z4.number().int().positive(),
284
+ revision: z3.number().int().positive(),
303
285
  selection: pickupSelectionSchema.optional()
304
286
  });
305
- var collectionPreviewSchema = z4.object({
287
+ var collectionPreviewSchema = z3.object({
306
288
  entitlement: entitlementSchema,
307
289
  inventory: pickupAvailabilitySchema,
308
- expiresAt: z4.number()
290
+ expiresAt: z3.number()
309
291
  });
310
292
 
311
293
  // src/outcomes.ts
312
- import { z as z5 } from "zod";
313
- var timestamp = z5.number().int().safe().nonnegative();
314
- var questEnrollmentInputSchema = z5.strictObject({
294
+ import { z as z4 } from "zod";
295
+ var timestamp = z4.number().int().safe().nonnegative();
296
+ var questEnrollmentInputSchema = z4.strictObject({
315
297
  actionId: identifier,
316
298
  /** Quest key or ID. */
317
299
  quest: identifier
@@ -319,26 +301,26 @@ var questEnrollmentInputSchema = z5.strictObject({
319
301
  var memberEnrollmentInputSchema = questEnrollmentInputSchema.extend({
320
302
  member: identifier
321
303
  });
322
- var questEnrollmentSchema = z5.object({
304
+ var questEnrollmentSchema = z4.object({
323
305
  /** Stable quest ID. */
324
306
  quest: identifier,
325
307
  member: identifier,
326
308
  enrolledAt: timestamp
327
309
  });
328
- var questClaimInputSchema = z5.strictObject({
310
+ var questClaimInputSchema = z4.strictObject({
329
311
  actionId: identifier,
330
312
  /** Quest key or ID. */
331
313
  quest: identifier,
332
314
  /** The outcome's tracker, as `QuestOutcome.tracker` names it. */
333
315
  tracker: identifier,
334
- record: z5.string().min(1).max(256),
316
+ record: z4.string().min(1).max(256),
335
317
  observedAt: timestamp
336
318
  });
337
319
  var QuestOutcomeState = {
338
320
  Admitted: "admitted",
339
321
  Skipped: "skipped"
340
322
  };
341
- var questOutcomeSchema = z5.object({
323
+ var questOutcomeSchema = z4.object({
342
324
  /** Prerequisite transition identity; absent on older tracker responses. */
343
325
  automatic: identifier.optional(),
344
326
  /** Stable quest ID. */
@@ -346,156 +328,156 @@ var questOutcomeSchema = z5.object({
346
328
  /** Stable tracker ID of the record decided. */
347
329
  tracker: identifier.nullable(),
348
330
  /** The record's ID in its tracker. */
349
- record: z5.string().nullable(),
331
+ record: z4.string().nullable(),
350
332
  /** Which observation of the record was decided. */
351
333
  observedAt: timestamp.nullable(),
352
- state: z5.enum(["admitted", "skipped"]),
334
+ state: z4.enum(["admitted", "skipped"]),
353
335
  /**
354
336
  * Why it was skipped, one of `trackerSkipCodes` or a code a newer Relay sends; null when
355
337
  * admitted. Show an unknown code by its `reason`.
356
338
  */
357
- code: z5.string().nullable(),
339
+ code: z4.string().nullable(),
358
340
  /** Why it was skipped, for people; null when admitted. */
359
- reason: z5.string().nullable(),
341
+ reason: z4.string().nullable(),
360
342
  /** Which window refused admission when `code` is `outside-window`. */
361
- window: z5.enum(["tracker", "quest"]).optional(),
343
+ window: z4.enum(["tracker", "quest"]).optional(),
362
344
  /** The admitted attempt. */
363
345
  attempt: identifier.nullable(),
364
346
  /** The member can claim it with `relay.quests.claim()`. */
365
- claimable: z5.boolean(),
347
+ claimable: z4.boolean(),
366
348
  createdAt: timestamp,
367
349
  updatedAt: timestamp
368
350
  });
369
- var questOutcomeQuerySchema = z5.strictObject({
351
+ var questOutcomeQuerySchema = z4.strictObject({
370
352
  /** Quest key or ID. */
371
353
  quest: identifier.optional(),
372
- state: z5.enum(["admitted", "skipped"]).optional(),
354
+ state: z4.enum(["admitted", "skipped"]).optional(),
373
355
  /** Only skips with this code, such as `historical`. */
374
- code: z5.string().min(1).max(100).optional(),
356
+ code: z4.string().min(1).max(100).optional(),
375
357
  cursor: pageCursorSchema.optional()
376
358
  });
377
- var questOutcomePageSchema = z5.object({
378
- items: z5.array(questOutcomeSchema),
359
+ var questOutcomePageSchema = z4.object({
360
+ items: z4.array(questOutcomeSchema),
379
361
  nextCursor: pageCursorSchema.nullable()
380
362
  });
381
363
 
382
364
  // src/participant-rewards.ts
383
- import { z as z6 } from "zod";
384
- var participantEntitlementsSchema = z6.object({
385
- items: z6.array(entitlementSchema)
365
+ import { z as z5 } from "zod";
366
+ var participantEntitlementsSchema = z5.object({
367
+ items: z5.array(entitlementSchema)
386
368
  });
387
369
  var base2 = {
388
- id: z6.string(),
389
- status: z6.string(),
390
- at: z6.number().nullable(),
391
- quest: z6.string().nullable(),
392
- completion: z6.string().nullable()
370
+ id: z5.string(),
371
+ status: z5.string(),
372
+ at: z5.number().nullable(),
373
+ quest: z5.string().nullable(),
374
+ completion: z5.string().nullable()
393
375
  };
394
- var known = z6.discriminatedUnion("kind", [
395
- z6.object({
376
+ var known = z5.discriminatedUnion("kind", [
377
+ z5.object({
396
378
  ...base2,
397
- kind: z6.literal("points"),
379
+ kind: z5.literal("points"),
398
380
  ledger: pointLedgerReferenceSchema,
399
- amount: z6.number(),
400
- reversed: z6.number()
401
- }).catchall(z6.json()),
402
- z6.object({
381
+ amount: z5.number(),
382
+ reversed: z5.number()
383
+ }).catchall(z5.json()),
384
+ z5.object({
403
385
  ...base2,
404
- kind: z6.literal("tier"),
386
+ kind: z5.literal("tier"),
405
387
  entitlement: entitlementSchema
406
- }).catchall(z6.json().transform((value) => value)),
407
- z6.object({
388
+ }).catchall(z5.json().transform((value) => value)),
389
+ z5.object({
408
390
  ...base2,
409
- kind: z6.literal("integration"),
410
- provider: z6.string(),
411
- action: z6.string(),
412
- roleId: z6.string().optional(),
413
- deliveredAt: z6.number().nullable(),
414
- revokedAt: z6.number().nullable(),
415
- reconciliation: z6.object({ status: z6.string(), ownership: z6.string(), at: z6.number() }).catchall(z6.json()).nullable()
416
- }).catchall(z6.json().optional())
391
+ kind: z5.literal("integration"),
392
+ provider: z5.string(),
393
+ action: z5.string(),
394
+ roleId: z5.string().optional(),
395
+ deliveredAt: z5.number().nullable(),
396
+ revokedAt: z5.number().nullable(),
397
+ reconciliation: z5.object({ status: z5.string(), ownership: z5.string(), at: z5.number() }).catchall(z5.json()).nullable()
398
+ }).catchall(z5.json().optional())
417
399
  ]);
418
- var participantDeliverySchema = z6.union([
400
+ var participantDeliverySchema = z5.union([
419
401
  known,
420
- z6.object({
402
+ z5.object({
421
403
  ...base2,
422
- kind: z6.string().refine((kind) => !["points", "tier", "integration"].includes(kind))
423
- }).catchall(z6.json()).transform(({ kind, ...item }) => ({
404
+ kind: z5.string().refine((kind) => !["points", "tier", "integration"].includes(kind))
405
+ }).catchall(z5.json()).transform(({ kind, ...item }) => ({
424
406
  ...item,
425
407
  kind: "unknown",
426
408
  reportedKind: kind
427
409
  }))
428
410
  ]);
429
- var participantDeliveriesSchema = z6.object({
430
- items: z6.array(participantDeliverySchema)
411
+ var participantDeliveriesSchema = z5.object({
412
+ items: z5.array(participantDeliverySchema)
431
413
  });
432
414
 
433
415
  // src/reward-deliveries.ts
434
- import { z as z7 } from "zod";
416
+ import { z as z6 } from "zod";
435
417
  var RewardDeliveryAction = {
436
418
  /** Delivers a quest's Discord role reward. */
437
419
  GrantRole: "grant-role"
438
420
  };
439
- var rewardDeliveryActionSchema = z7.string().min(1).max(64);
440
- var roleReconciliationSchema = z7.object({
441
- status: z7.enum(["pending", "granted", "removed", "preserved", "failed"]),
442
- ownership: z7.enum(["unclaimed", "relay", "external"]),
443
- at: z7.number(),
444
- reason: z7.string().nullable()
421
+ var rewardDeliveryActionSchema = z6.string().min(1).max(64);
422
+ var roleReconciliationSchema = z6.object({
423
+ status: z6.enum(["pending", "granted", "removed", "preserved", "failed"]),
424
+ ownership: z6.enum(["unclaimed", "relay", "external"]),
425
+ at: z6.number(),
426
+ reason: z6.string().nullable()
445
427
  });
446
- var knownRewardDeliverySchema = z7.object({
447
- id: z7.string(),
448
- quest: z7.string(),
449
- completion: z7.string(),
450
- member: z7.string(),
451
- provider: z7.literal("discord"),
428
+ var knownRewardDeliverySchema = z6.object({
429
+ id: z6.string(),
430
+ quest: z6.string(),
431
+ completion: z6.string(),
432
+ member: z6.string(),
433
+ provider: z6.literal("discord"),
452
434
  /** `RewardDeliveryAction`, such as `grant-role`. */
453
435
  action: rewardDeliveryActionSchema,
454
- roleId: z7.string(),
436
+ roleId: z6.string(),
455
437
  /**
456
438
  * `failed` is terminal: Discord rejected the grant permanently (unknown role,
457
439
  * member left the server, missing permissions) or retries ran out after about
458
440
  * a day. An operator can retry it once the cause is fixed, unless revokedAt is set.
459
441
  * Revoke stops pending grants; a late success records deliveredAt but leaves status failed.
460
442
  */
461
- status: z7.enum(["pending", "delivered", "failed"]),
443
+ status: z6.enum(["pending", "delivered", "failed"]),
462
444
  /** Provider attempts in the current round; an operator retry starts a new round at zero. */
463
- attempts: z7.number().int(),
445
+ attempts: z6.number().int(),
464
446
  /** While pending with a `lastError`, when the next attempt is scheduled. */
465
- nextAt: z7.number(),
466
- lastError: z7.string().nullable(),
467
- createdAt: z7.number(),
468
- deliveredAt: z7.number().nullable(),
447
+ nextAt: z6.number(),
448
+ lastError: z6.string().nullable(),
449
+ createdAt: z6.number(),
450
+ deliveredAt: z6.number().nullable(),
469
451
  /** First dispatch attempt, retained across retries. Legacy rows use creation time when dispatch timing is unknown. */
470
- dispatchedAt: z7.number().nullable().optional(),
452
+ dispatchedAt: z6.number().nullable().optional(),
471
453
  /** Completion revocation stops retries, including deliveries that had already failed. */
472
- revokedAt: z7.number().nullable().optional(),
454
+ revokedAt: z6.number().nullable().optional(),
473
455
  /** Current reconciliation of the pinned Discord membership; original delivery and revoke history stay intact. */
474
456
  reconciliation: roleReconciliationSchema.nullable().optional()
475
457
  });
476
458
  var futureRewardDeliverySchema = knownRewardDeliverySchema.extend({
477
- provider: z7.string(),
478
- status: z7.string(),
479
- roleId: z7.string().optional(),
480
- reconciliation: z7.object({
481
- status: z7.string(),
482
- ownership: z7.string(),
483
- at: z7.number(),
484
- reason: z7.string().nullable()
485
- }).catchall(z7.json()).nullable().optional()
486
- }).catchall(z7.json().optional()).refine(
459
+ provider: z6.string(),
460
+ status: z6.string(),
461
+ roleId: z6.string().optional(),
462
+ reconciliation: z6.object({
463
+ status: z6.string(),
464
+ ownership: z6.string(),
465
+ at: z6.number(),
466
+ reason: z6.string().nullable()
467
+ }).catchall(z6.json()).nullable().optional()
468
+ }).catchall(z6.json().optional()).refine(
487
469
  (delivery) => delivery.provider !== "discord" || !["pending", "delivered", "failed"].includes(delivery.status) || delivery.reconciliation && (!["pending", "granted", "removed", "preserved", "failed"].includes(
488
470
  delivery.reconciliation.status
489
471
  ) || !["unclaimed", "relay", "external"].includes(
490
472
  delivery.reconciliation.ownership
491
473
  ))
492
474
  );
493
- var rewardDeliverySchema = z7.union([
494
- knownRewardDeliverySchema.catchall(z7.json().optional()),
475
+ var rewardDeliverySchema = z6.union([
476
+ knownRewardDeliverySchema.catchall(z6.json().optional()),
495
477
  futureRewardDeliverySchema
496
478
  ]);
497
- var rewardDeliveriesSchema = z7.object({
498
- deliveries: z7.array(rewardDeliverySchema)
479
+ var rewardDeliveriesSchema = z6.object({
480
+ deliveries: z6.array(rewardDeliverySchema)
499
481
  });
500
482
 
501
483
  export {
@@ -524,10 +506,6 @@ export {
524
506
  questPublicationPreviewSchema,
525
507
  allocateQuestSchema,
526
508
  allocatedQuestSchema,
527
- telegramSignInMethodsSchema,
528
- telegramAccountConnectionSchema,
529
- telegramInitDataSchema,
530
- telegramMiniAppSignInSchema,
531
509
  collectionCodeSchema,
532
510
  collectionPassSchema,
533
511
  collectionResolveSchema,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  identifier
3
- } from "./chunk-EMLDFUTV.js";
3
+ } from "./chunk-6UFXPKLA.js";
4
4
 
5
5
  // src/auth.ts
6
6
  import { z } from "zod";
@@ -11,7 +11,7 @@ import {
11
11
  responseShape,
12
12
  rewardKey,
13
13
  tierRewardSchema
14
- } from "./chunk-EMLDFUTV.js";
14
+ } from "./chunk-6UFXPKLA.js";
15
15
 
16
16
  // src/badges.ts
17
17
  import { z } from "zod";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createRelayClient
3
- } from "./chunk-H4FL5WA5.js";
3
+ } from "./chunk-XQE22UKY.js";
4
4
  import {
5
5
  RelayErrorCode,
6
6
  asRelayError,
7
7
  clientError,
8
8
  cosmosChain
9
- } from "./chunk-EMLDFUTV.js";
9
+ } from "./chunk-6UFXPKLA.js";
10
10
 
11
11
  // src/base58.ts
12
12
  var alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
@@ -4,20 +4,20 @@ import {
4
4
  retryAfter,
5
5
  retrying,
6
6
  validTimeout
7
- } from "./chunk-5P5PTZ3T.js";
7
+ } from "./chunk-WOGCRDFT.js";
8
8
  import {
9
9
  clientIdentity
10
- } from "./chunk-WQT4H2PI.js";
10
+ } from "./chunk-57KARWUC.js";
11
11
  import {
12
12
  authScopeSchema
13
- } from "./chunk-YXAK2637.js";
13
+ } from "./chunk-JUQ2GNMD.js";
14
14
  import {
15
15
  RequestError,
16
16
  appIdentityKindSchema,
17
17
  isRequestError,
18
18
  knownResponse,
19
19
  openIdentityKindSchema
20
- } from "./chunk-EMLDFUTV.js";
20
+ } from "./chunk-6UFXPKLA.js";
21
21
 
22
22
  // src/configuration.ts
23
23
  function questConfiguration(release) {