@domino-sdk/relay 1.55.0 → 1.59.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 (65) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/dist/{accounts-DRPENuZe.d.ts → accounts-CVonEkdb.d.ts} +18 -7
  3. package/dist/{attempt-captures-CxxO7DeD.d.ts → attempt-captures-DBj-rxak.d.ts} +1 -1
  4. package/dist/authoring.d.ts +306 -72
  5. package/dist/authoring.js +264 -9
  6. package/dist/{automatic-outcomes-DxW_v5Wc.d.ts → automatic-outcomes-FS9okvBP.d.ts} +1 -1
  7. package/dist/avatar.d.ts +1 -2
  8. package/dist/browser.d.ts +8 -9
  9. package/dist/browser.js +10 -10
  10. package/dist/{capability-error-DSd8EMQC.d.ts → capability-error-DDJl0LY-.d.ts} +0 -6
  11. package/dist/{chunk-IZRITLVV.js → chunk-2LKGAL63.js} +2 -2
  12. package/dist/{chunk-GL43VQ5D.js → chunk-577DG2IT.js} +38 -8
  13. package/dist/{chunk-UY6KMLQG.js → chunk-6U5WWH3W.js} +141 -100
  14. package/dist/{chunk-YCOKTQ4E.js → chunk-AWWCEP7F.js} +1403 -882
  15. package/dist/{chunk-56DBFNR2.js → chunk-EQF4ID47.js} +1 -1
  16. package/dist/{chunk-YEVD4A5X.js → chunk-IBROKMFV.js} +2 -2
  17. package/dist/{chunk-XALIFNMD.js → chunk-KBCTII6C.js} +1 -1
  18. package/dist/{chunk-WHG5WE43.js → chunk-KYUQEZZA.js} +1 -1
  19. package/dist/{chunk-WUEQOKJH.js → chunk-LDLOB2UZ.js} +4 -4
  20. package/dist/{chunk-IUF7DW76.js → chunk-M2JQPDUX.js} +39 -9
  21. package/dist/{chunk-MLIXJPKL.js → chunk-MHPKEVEW.js} +1 -0
  22. package/dist/{chunk-TLK2MD4S.js → chunk-R4S6BFOH.js} +1 -1
  23. package/dist/{chunk-VFBQVY4X.js → chunk-TZJT5CRF.js} +1 -1
  24. package/dist/{chunk-C7QZ4UBB.js → chunk-UEMLYPKJ.js} +21 -5
  25. package/dist/{chunk-F6HECAXA.js → chunk-W42KMMH5.js} +140 -101
  26. package/dist/{chunk-WHMXXHPX.js → chunk-XGXDINGM.js} +16 -3
  27. package/dist/{chunk-SABMNPF2.js → chunk-YMWRLAAP.js} +1 -1
  28. package/dist/{chunk-YE3XYB2F.js → chunk-YRSU2X2P.js} +2 -2
  29. package/dist/{client-C4zUZKpj.d.ts → client-3b9HjSzZ.d.ts} +191 -117
  30. package/dist/{deployments-B32QS1CI.d.ts → deployments-BydFVj4Q.d.ts} +798 -235
  31. package/dist/{groups-O6onGPmC.d.ts → groups-CFuTfFqG.d.ts} +15 -9
  32. package/dist/index.d.ts +9 -10
  33. package/dist/index.js +9 -9
  34. package/dist/{integrations-C6_uUh-s.d.ts → integrations-DrbKQSTD.d.ts} +42 -22
  35. package/dist/internal.d.ts +10 -10
  36. package/dist/internal.js +9 -9
  37. package/dist/{offers-BMDNcvwB.d.ts → offers-DAfe1O3_.d.ts} +211 -2
  38. package/dist/{pages-BFloMpyQ.d.ts → pages-ChDVLrgR.d.ts} +95 -10
  39. package/dist/portal-proxy.js +4 -4
  40. package/dist/react/index.d.ts +149 -72
  41. package/dist/react/index.js +65 -10
  42. package/dist/runtime/authoring.js +1 -1
  43. package/dist/runtime/chunks/BG43KQ2T.js +1 -0
  44. package/dist/runtime/chunks/EWU4OKSY.js +62 -0
  45. package/dist/runtime/manifest.json +5 -5
  46. package/dist/runtime/schema.js +1 -1
  47. package/dist/runtime/zod.js +1 -1
  48. package/dist/{schema-C4m9RhCR.d.ts → schema-BA0nRRlt.d.ts} +184 -35
  49. package/dist/schema.d.ts +1265 -697
  50. package/dist/schema.js +96 -12
  51. package/dist/server/index.d.ts +10 -10
  52. package/dist/server/index.js +1644 -1105
  53. package/dist/{submission-input-BbdawqVy.d.ts → submission-input-DxQ6RnKo.d.ts} +2 -2
  54. package/dist/{telegram-browser-CwaxROAZ.d.ts → telegram-browser-o3OIxGrJ.d.ts} +3 -3
  55. package/dist/testing.d.ts +89 -9
  56. package/dist/testing.js +215 -10
  57. package/dist/{transport-CZJOW5Sr.d.ts → transport-D_Eqf78J.d.ts} +8592 -4384
  58. package/dist/wallet-B06zvDXp.d.ts +972 -0
  59. package/dist/{x-1czZFVUW.d.ts → x-C28SNifw.d.ts} +2 -2
  60. package/package.json +2 -2
  61. package/dist/profiles-BoOK03cR.d.ts +0 -299
  62. package/dist/runtime/chunks/IDOMZWRY.js +0 -40
  63. package/dist/runtime/chunks/WKATKZXE.js +0 -1
  64. package/dist/util.d-w9f9t3ua.d.ts +0 -5
  65. package/dist/wallet-Ac7OFpOr.d.ts +0 -228
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  identifier
3
- } from "./chunk-YCOKTQ4E.js";
3
+ } from "./chunk-AWWCEP7F.js";
4
4
 
5
5
  // src/auth.ts
6
6
  import * as z from "zod";
@@ -2,7 +2,7 @@ import {
2
2
  identifier,
3
3
  responseShape,
4
4
  xTweetSchema
5
- } from "./chunk-YCOKTQ4E.js";
5
+ } from "./chunk-AWWCEP7F.js";
6
6
 
7
7
  // src/x.ts
8
8
  import * as z from "zod";
@@ -41,7 +41,7 @@ var xPostSchema = xTweetSchema.extend({
41
41
  * projection (migration 0056), a list with any malformed item is dropped whole, so positions
42
42
  * never shift and a bad entry never fails the post read.
43
43
  */
44
- media: z.unknown().transform(
44
+ media: z.unknown().optional().transform(
45
45
  (value) => z.array(z.object({ type: z.string(), url: z.string() })).safeParse(value).data ?? []
46
46
  )
47
47
  });
@@ -8,7 +8,7 @@ import {
8
8
  rewardBundleSchema,
9
9
  settingsValuesSchema,
10
10
  trackerTriggerContextSchema
11
- } from "./chunk-YCOKTQ4E.js";
11
+ } from "./chunk-AWWCEP7F.js";
12
12
 
13
13
  // src/server/attempt-captures.ts
14
14
  import * as z from "zod";
@@ -2,7 +2,7 @@ import {
2
2
  RelayErrorCode,
3
3
  clientError,
4
4
  isRequestError
5
- } from "./chunk-YCOKTQ4E.js";
5
+ } from "./chunk-AWWCEP7F.js";
6
6
 
7
7
  // src/action.ts
8
8
  function withActionId(value) {
@@ -4,20 +4,20 @@ import {
4
4
  retryAfter,
5
5
  retrying,
6
6
  validTimeout
7
- } from "./chunk-TLK2MD4S.js";
7
+ } from "./chunk-R4S6BFOH.js";
8
8
  import {
9
9
  clientIdentity
10
- } from "./chunk-VFBQVY4X.js";
10
+ } from "./chunk-TZJT5CRF.js";
11
11
  import {
12
12
  authScopeSchema
13
- } from "./chunk-56DBFNR2.js";
13
+ } from "./chunk-EQF4ID47.js";
14
14
  import {
15
15
  RequestError,
16
16
  appIdentityKindSchema,
17
17
  isRequestError,
18
18
  knownResponse,
19
19
  openIdentityKindSchema
20
- } from "./chunk-YCOKTQ4E.js";
20
+ } from "./chunk-AWWCEP7F.js";
21
21
 
22
22
  // src/configuration.ts
23
23
  function questConfiguration(release) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  dashboardArtifactSchema,
3
3
  dashboardPreviewSchema
4
- } from "./chunk-F6HECAXA.js";
4
+ } from "./chunk-W42KMMH5.js";
5
5
  import {
6
6
  imageAssetArtifactSchema,
7
7
  imageComparisonSchema,
@@ -10,11 +10,12 @@ import {
10
10
  imageSightingsSchema,
11
11
  imageUploadsSchema,
12
12
  publishedImageSchema
13
- } from "./chunk-YEVD4A5X.js";
13
+ } from "./chunk-IBROKMFV.js";
14
14
  import {
15
15
  catalogDeploymentSchema,
16
16
  collectionPassSchema,
17
17
  collectionViewSchema,
18
+ creatorAccountsSchema,
18
19
  interactionSchema,
19
20
  participantActivitySchema,
20
21
  participantDeliveriesSchema,
@@ -28,7 +29,7 @@ import {
28
29
  questTypeVersionSchema,
29
30
  questViewSchema,
30
31
  rewardDeliveriesSchema
31
- } from "./chunk-UY6KMLQG.js";
32
+ } from "./chunk-6U5WWH3W.js";
32
33
  import {
33
34
  badgeArtifactSchema,
34
35
  badgeSchema,
@@ -53,7 +54,7 @@ import {
53
54
  referralDefinitionSchema,
54
55
  referralHistorySchema,
55
56
  referralSummarySchema
56
- } from "./chunk-C7QZ4UBB.js";
57
+ } from "./chunk-UEMLYPKJ.js";
57
58
  import {
58
59
  ownProfileSchema,
59
60
  pointBalancesSchema,
@@ -65,12 +66,12 @@ import {
65
66
  profileReferralSchema,
66
67
  profileSummarySchema,
67
68
  telegramAccountConnectionSchema
68
- } from "./chunk-WHMXXHPX.js";
69
+ } from "./chunk-XGXDINGM.js";
69
70
  import {
70
71
  exchangeResultSchema,
71
72
  memberSummarySchema,
72
73
  participantSessionSchema
73
- } from "./chunk-56DBFNR2.js";
74
+ } from "./chunk-EQF4ID47.js";
74
75
  import {
75
76
  accountConnectionSchema,
76
77
  attemptSchema,
@@ -101,9 +102,14 @@ import {
101
102
  timeZoneNameSchema,
102
103
  trackerArtifactSchema,
103
104
  walletBalanceSchema,
105
+ walletCallSchema,
106
+ walletDelegationsSchema,
107
+ walletEventsSchema,
104
108
  walletMessageChallengeSchema,
105
- walletSignInNetworksSchema
106
- } from "./chunk-YCOKTQ4E.js";
109
+ walletNftsSchema,
110
+ walletSignInNetworksSchema,
111
+ walletTransactionsSchema
112
+ } from "./chunk-AWWCEP7F.js";
107
113
 
108
114
  // src/deployments.ts
109
115
  import * as z from "zod";
@@ -265,6 +271,21 @@ var capabilityResponseSchemas = lazyResponseReaders({
265
271
  },
266
272
  get walletBalanceSchema() {
267
273
  return knownResponse(walletBalanceSchema);
274
+ },
275
+ get walletNftsSchema() {
276
+ return knownResponse(walletNftsSchema);
277
+ },
278
+ get walletCallSchema() {
279
+ return knownResponse(walletCallSchema);
280
+ },
281
+ get walletDelegationsSchema() {
282
+ return knownResponse(walletDelegationsSchema);
283
+ },
284
+ get walletEventsSchema() {
285
+ return knownResponse(walletEventsSchema);
286
+ },
287
+ get walletTransactionsSchema() {
288
+ return knownResponse(walletTransactionsSchema);
268
289
  }
269
290
  });
270
291
  var capabilityResponses = {
@@ -274,7 +295,12 @@ var capabilityResponses = {
274
295
  imageSightingsSchema: responseSchema(imageSightingsSchema),
275
296
  imageUploadsSchema: responseSchema(imageUploadsSchema),
276
297
  publishedImageSchema: responseSchema(publishedImageSchema),
277
- walletBalanceSchema: responseSchema(walletBalanceSchema)
298
+ walletBalanceSchema: responseSchema(walletBalanceSchema),
299
+ walletNftsSchema: responseSchema(walletNftsSchema),
300
+ walletCallSchema: responseSchema(walletCallSchema),
301
+ walletDelegationsSchema: responseSchema(walletDelegationsSchema),
302
+ walletEventsSchema: responseSchema(walletEventsSchema),
303
+ walletTransactionsSchema: responseSchema(walletTransactionsSchema)
278
304
  };
279
305
 
280
306
  // src/activity.ts
@@ -448,6 +474,9 @@ var participantResponseSchemas = lazyResponseReaders({
448
474
  get telegramAccountConnectionSchema() {
449
475
  return knownResponse(telegramAccountConnectionSchema);
450
476
  },
477
+ get creatorAccountsSchema() {
478
+ return knownResponse(creatorAccountsSchema);
479
+ },
451
480
  get accountConnectionSchema() {
452
481
  return knownResponse(accountConnectionSchema);
453
482
  },
@@ -581,6 +610,7 @@ var participantResponses = {
581
610
  telegramAccountConnectionSchema: responseSchema(
582
611
  telegramAccountConnectionSchema
583
612
  ),
613
+ creatorAccountsSchema: responseSchema(creatorAccountsSchema),
584
614
  accountConnectionSchema: responseSchema(accountConnectionSchema),
585
615
  attemptSchema: responseSchema(attemptSchema),
586
616
  authProviderSchema: responseSchema(authProviderSchema),
@@ -20,6 +20,7 @@ var participantRoutes = [
20
20
  { method: "POST", path: "/v1/auth/logout" },
21
21
  { method: "GET", path: "/v1/auth/accounts" },
22
22
  { method: "GET", path: "/v1/auth/accounts/telegram" },
23
+ { method: "GET", path: "/v1/auth/creator-accounts" },
23
24
  { method: "POST", path: "/v1/auth/accounts/disconnect" },
24
25
  { method: "POST", path: "/v1/auth/telegram/mini-app" },
25
26
  // The signed-in member: progress, submissions, rewards, points, activity and linked wallets.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isRequestError
3
- } from "./chunk-YCOKTQ4E.js";
3
+ } from "./chunk-AWWCEP7F.js";
4
4
 
5
5
  // src/request-lifetime.ts
6
6
  var PARTICIPANT_TIMEOUT = 15e3;
@@ -1,6 +1,6 @@
1
1
  // package.json
2
2
  var name = "@domino-sdk/relay";
3
- var version = "1.55.0";
3
+ var version = "1.59.0";
4
4
 
5
5
  // src/client-identity.ts
6
6
  function clientIdentity() {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  pointEntrySchema,
3
3
  profileSummarySchema
4
- } from "./chunk-WHMXXHPX.js";
4
+ } from "./chunk-XGXDINGM.js";
5
5
  import {
6
6
  authoringIdentityShape,
7
7
  calendarPeriodSchema,
@@ -9,14 +9,16 @@ import {
9
9
  contentMetricsSchema,
10
10
  identifier,
11
11
  maxPointsAmount,
12
+ missingPrerequisiteSchema,
12
13
  pageCursorSchema,
13
14
  pointsRewardSchema,
15
+ prerequisiteSchema,
14
16
  refuseWindowTimeZone,
15
17
  resourceHandle,
16
18
  responseShape,
17
19
  rewardKey,
18
20
  tierRewardSchema
19
- } from "./chunk-YCOKTQ4E.js";
21
+ } from "./chunk-AWWCEP7F.js";
20
22
 
21
23
  // src/badges.ts
22
24
  import * as z from "zod";
@@ -760,12 +762,20 @@ var offerDefinitionSchema = z5.object({
760
762
  reward: tierRewardSchema,
761
763
  stock: quantity.max(1e6),
762
764
  limit: offerLimitSchema.default({ perMember: 1 }),
765
+ /**
766
+ * What a member must meet to redeem, the same prerequisites quests take: `completed`,
767
+ * `balanceAtLeast` and `inGroup`. Checked when the member redeems; absent, anyone can.
768
+ */
769
+ requires: z5.array(prerequisiteSchema).max(30).optional(),
763
770
  enabled: z5.boolean().default(true)
764
771
  }).strict();
765
772
  var offerAuthoringSchema = offerDefinitionSchema.omit({ id: true, title: true, enabled: true }).extend({
766
773
  ...authoringIdentityShape,
767
- title: z5.string().trim().min(1).max(120).optional()
768
- }).strict().transform((offer) => ({
774
+ title: z5.string().trim().min(1).max(120).optional(),
775
+ // `defineOffer` returns `enabled: true`, and a deployment describes the module's default
776
+ // export and parses it again, so the output has to read back. Pause an offer in Console.
777
+ enabled: z5.literal(true).optional()
778
+ }).strict().transform(({ enabled: _, ...offer }) => ({
769
779
  ...offer,
770
780
  title: offer.title ?? offer.reward.reward.title,
771
781
  enabled: true
@@ -787,7 +797,13 @@ var offerSchema = responseShape(
787
797
  revision: z5.number().int().positive(),
788
798
  available: quantity,
789
799
  redeemed: quantity,
790
- availability: offerAvailabilitySchema
800
+ availability: offerAvailabilitySchema,
801
+ /**
802
+ * The prerequisites the signed-in member has not met yet, so an app can show the offer locked
803
+ * and why. Empty when nothing is missing or the read has no member; redeeming while it is not
804
+ * empty fails with `prerequisites-incomplete`.
805
+ */
806
+ missing: z5.array(missingPrerequisiteSchema).default([])
791
807
  })
792
808
  );
793
809
  var redeemOfferSchema = z5.object({ actionId: identifier }).strict();