@domino-sdk/relay 1.55.0 → 1.56.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/CHANGELOG.md +11 -0
  2. package/dist/authoring.d.ts +146 -64
  3. package/dist/authoring.js +36 -6
  4. package/dist/browser.d.ts +5 -5
  5. package/dist/browser.js +10 -10
  6. package/dist/{chunk-VFBQVY4X.js → chunk-ABJ4G47X.js} +1 -1
  7. package/dist/{chunk-YCOKTQ4E.js → chunk-BHHUSBSD.js} +1 -1
  8. package/dist/{chunk-C7QZ4UBB.js → chunk-BJYMTCWG.js} +16 -3
  9. package/dist/{chunk-YEVD4A5X.js → chunk-CK7HO32Z.js} +1 -1
  10. package/dist/{chunk-IUF7DW76.js → chunk-CXKXPB7K.js} +12 -7
  11. package/dist/{chunk-WUEQOKJH.js → chunk-G6XVBYH7.js} +4 -4
  12. package/dist/{chunk-SABMNPF2.js → chunk-H2MD6E7Z.js} +1 -1
  13. package/dist/{chunk-WHG5WE43.js → chunk-INSWI2VZ.js} +1 -1
  14. package/dist/{chunk-TLK2MD4S.js → chunk-KBVH4XZC.js} +1 -1
  15. package/dist/{chunk-MLIXJPKL.js → chunk-MHPKEVEW.js} +1 -0
  16. package/dist/{chunk-XALIFNMD.js → chunk-MNU6UPXY.js} +1 -1
  17. package/dist/{chunk-GL43VQ5D.js → chunk-NK6EER33.js} +38 -8
  18. package/dist/{chunk-IZRITLVV.js → chunk-OTITLABX.js} +2 -2
  19. package/dist/{chunk-56DBFNR2.js → chunk-QNQNKIAA.js} +1 -1
  20. package/dist/{chunk-UY6KMLQG.js → chunk-RBPMT53S.js} +125 -99
  21. package/dist/{chunk-F6HECAXA.js → chunk-ULQU7KC4.js} +144 -101
  22. package/dist/{chunk-WHMXXHPX.js → chunk-VSHV7FEA.js} +1 -1
  23. package/dist/{chunk-YE3XYB2F.js → chunk-W5U2WXG3.js} +2 -2
  24. package/dist/{client-C4zUZKpj.d.ts → client-bX3oTpRu.d.ts} +79 -4
  25. package/dist/{deployments-B32QS1CI.d.ts → deployments-D3lxfQMB.d.ts} +824 -400
  26. package/dist/{groups-O6onGPmC.d.ts → groups-DPE004_V.d.ts} +4 -2
  27. package/dist/index.d.ts +5 -5
  28. package/dist/index.js +9 -9
  29. package/dist/{integrations-C6_uUh-s.d.ts → integrations-CcD5NPEA.d.ts} +50 -1
  30. package/dist/internal.d.ts +5 -5
  31. package/dist/internal.js +9 -9
  32. package/dist/{offers-BMDNcvwB.d.ts → offers-CtzMeB7O.d.ts} +206 -1
  33. package/dist/{pages-BFloMpyQ.d.ts → pages-BlLqB8ZQ.d.ts} +57 -1
  34. package/dist/portal-proxy.js +4 -4
  35. package/dist/react/index.d.ts +86 -8
  36. package/dist/react/index.js +65 -10
  37. package/dist/runtime/authoring.js +1 -1
  38. package/dist/runtime/chunks/NDB42VFF.js +1 -0
  39. package/dist/runtime/manifest.json +3 -3
  40. package/dist/runtime/schema.js +1 -1
  41. package/dist/schema.d.ts +634 -388
  42. package/dist/schema.js +30 -10
  43. package/dist/server/index.d.ts +5 -5
  44. package/dist/server/index.js +1232 -1072
  45. package/dist/{submission-input-BbdawqVy.d.ts → submission-input-wTiYGdgA.d.ts} +1 -1
  46. package/dist/{telegram-browser-CwaxROAZ.d.ts → telegram-browser-Bh3i0HiH.d.ts} +1 -1
  47. package/dist/testing.js +5 -5
  48. package/dist/{transport-CZJOW5Sr.d.ts → transport-CnKA-_RL.d.ts} +6451 -4210
  49. package/package.json +1 -1
  50. package/dist/runtime/chunks/WKATKZXE.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  pointEntrySchema,
3
3
  profileSummarySchema
4
- } from "./chunk-WHMXXHPX.js";
4
+ } from "./chunk-VSHV7FEA.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-BHHUSBSD.js";
20
22
 
21
23
  // src/badges.ts
22
24
  import * as z from "zod";
@@ -760,6 +762,11 @@ 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({
@@ -787,7 +794,13 @@ var offerSchema = responseShape(
787
794
  revision: z5.number().int().positive(),
788
795
  available: quantity,
789
796
  redeemed: quantity,
790
- availability: offerAvailabilitySchema
797
+ availability: offerAvailabilitySchema,
798
+ /**
799
+ * The prerequisites the signed-in member has not met yet, so an app can show the offer locked
800
+ * and why. Empty when nothing is missing or the read has no member; redeeming while it is not
801
+ * empty fails with `prerequisites-incomplete`.
802
+ */
803
+ missing: z5.array(missingPrerequisiteSchema).default([])
791
804
  })
792
805
  );
793
806
  var redeemOfferSchema = z5.object({ actionId: identifier }).strict();
@@ -2,7 +2,7 @@ import {
2
2
  identifier,
3
3
  responseShape,
4
4
  xTweetSchema
5
- } from "./chunk-YCOKTQ4E.js";
5
+ } from "./chunk-BHHUSBSD.js";
6
6
 
7
7
  // src/x.ts
8
8
  import * as z from "zod";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  dashboardArtifactSchema,
3
3
  dashboardPreviewSchema
4
- } from "./chunk-F6HECAXA.js";
4
+ } from "./chunk-ULQU7KC4.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-CK7HO32Z.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-RBPMT53S.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-BJYMTCWG.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-VSHV7FEA.js";
69
70
  import {
70
71
  exchangeResultSchema,
71
72
  memberSummarySchema,
72
73
  participantSessionSchema
73
- } from "./chunk-56DBFNR2.js";
74
+ } from "./chunk-QNQNKIAA.js";
74
75
  import {
75
76
  accountConnectionSchema,
76
77
  attemptSchema,
@@ -103,7 +104,7 @@ import {
103
104
  walletBalanceSchema,
104
105
  walletMessageChallengeSchema,
105
106
  walletSignInNetworksSchema
106
- } from "./chunk-YCOKTQ4E.js";
107
+ } from "./chunk-BHHUSBSD.js";
107
108
 
108
109
  // src/deployments.ts
109
110
  import * as z from "zod";
@@ -448,6 +449,9 @@ var participantResponseSchemas = lazyResponseReaders({
448
449
  get telegramAccountConnectionSchema() {
449
450
  return knownResponse(telegramAccountConnectionSchema);
450
451
  },
452
+ get creatorAccountsSchema() {
453
+ return knownResponse(creatorAccountsSchema);
454
+ },
451
455
  get accountConnectionSchema() {
452
456
  return knownResponse(accountConnectionSchema);
453
457
  },
@@ -581,6 +585,7 @@ var participantResponses = {
581
585
  telegramAccountConnectionSchema: responseSchema(
582
586
  telegramAccountConnectionSchema
583
587
  ),
588
+ creatorAccountsSchema: responseSchema(creatorAccountsSchema),
584
589
  accountConnectionSchema: responseSchema(accountConnectionSchema),
585
590
  attemptSchema: responseSchema(attemptSchema),
586
591
  authProviderSchema: responseSchema(authProviderSchema),
@@ -4,20 +4,20 @@ import {
4
4
  retryAfter,
5
5
  retrying,
6
6
  validTimeout
7
- } from "./chunk-TLK2MD4S.js";
7
+ } from "./chunk-KBVH4XZC.js";
8
8
  import {
9
9
  clientIdentity
10
- } from "./chunk-VFBQVY4X.js";
10
+ } from "./chunk-ABJ4G47X.js";
11
11
  import {
12
12
  authScopeSchema
13
- } from "./chunk-56DBFNR2.js";
13
+ } from "./chunk-QNQNKIAA.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-BHHUSBSD.js";
21
21
 
22
22
  // src/configuration.ts
23
23
  function questConfiguration(release) {
@@ -5,7 +5,7 @@ import {
5
5
  isKnownTrackerSource,
6
6
  trackerDataSchema,
7
7
  xAccountRoles
8
- } from "./chunk-YCOKTQ4E.js";
8
+ } from "./chunk-BHHUSBSD.js";
9
9
 
10
10
  // src/quest-shape.ts
11
11
  function validateQuestShape(description, options = {}) {
@@ -2,7 +2,7 @@ import {
2
2
  RelayErrorCode,
3
3
  clientError,
4
4
  isRequestError
5
- } from "./chunk-YCOKTQ4E.js";
5
+ } from "./chunk-BHHUSBSD.js";
6
6
 
7
7
  // src/action.ts
8
8
  function withActionId(value) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isRequestError
3
- } from "./chunk-YCOKTQ4E.js";
3
+ } from "./chunk-BHHUSBSD.js";
4
4
 
5
5
  // src/request-lifetime.ts
6
6
  var PARTICIPANT_TIMEOUT = 15e3;
@@ -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.
@@ -8,7 +8,7 @@ import {
8
8
  rewardBundleSchema,
9
9
  settingsValuesSchema,
10
10
  trackerTriggerContextSchema
11
- } from "./chunk-YCOKTQ4E.js";
11
+ } from "./chunk-BHHUSBSD.js";
12
12
 
13
13
  // src/server/attempt-captures.ts
14
14
  import * as z from "zod";
@@ -1,9 +1,11 @@
1
1
  import {
2
2
  createRelayAction,
3
3
  withActionId
4
- } from "./chunk-WHG5WE43.js";
4
+ } from "./chunk-INSWI2VZ.js";
5
5
  import {
6
6
  collectionPassSchema,
7
+ creatorAccountProviderSchema,
8
+ creatorAccountsSchema,
7
9
  participantActivityQuerySchema,
8
10
  participantActivitySchema,
9
11
  participantDeliveriesSchema,
@@ -17,7 +19,7 @@ import {
17
19
  questOutcomeSchema,
18
20
  rewardDeliveriesSchema,
19
21
  rewardDeliveryQuerySchema
20
- } from "./chunk-UY6KMLQG.js";
22
+ } from "./chunk-RBPMT53S.js";
21
23
  import {
22
24
  badgeSchema,
23
25
  engagementBoundaryPageSchema,
@@ -36,7 +38,7 @@ import {
36
38
  referralDefinitionSchema,
37
39
  referralHistorySchema,
38
40
  referralSummarySchema
39
- } from "./chunk-C7QZ4UBB.js";
41
+ } from "./chunk-BJYMTCWG.js";
40
42
  import {
41
43
  AVATAR_UPLOAD_LIMIT,
42
44
  avatarUploadTypes,
@@ -53,24 +55,24 @@ import {
53
55
  telegramAccountConnectionSchema,
54
56
  telegramMiniAppSignInSchema,
55
57
  telegramSignInMethodsSchema
56
- } from "./chunk-WHMXXHPX.js";
58
+ } from "./chunk-VSHV7FEA.js";
57
59
  import {
58
60
  PARTICIPANT_TIMEOUT,
59
61
  lifetime,
60
62
  retryAfter,
61
63
  retrying,
62
64
  validTimeout
63
- } from "./chunk-TLK2MD4S.js";
65
+ } from "./chunk-KBVH4XZC.js";
64
66
  import {
65
67
  clientIdentity
66
- } from "./chunk-VFBQVY4X.js";
68
+ } from "./chunk-ABJ4G47X.js";
67
69
  import {
68
70
  exchangeResultSchema,
69
71
  exchangeSchema,
70
72
  memberSummarySchema,
71
73
  participantSessionSchema,
72
74
  sessionMember
73
- } from "./chunk-56DBFNR2.js";
75
+ } from "./chunk-QNQNKIAA.js";
74
76
  import {
75
77
  RelayError,
76
78
  RelayErrorCode,
@@ -109,7 +111,7 @@ import {
109
111
  walletSignInNetworksSchema,
110
112
  walletSignatureSchema,
111
113
  walletUnlinkInputSchema
112
- } from "./chunk-YCOKTQ4E.js";
114
+ } from "./chunk-BHHUSBSD.js";
113
115
 
114
116
  // src/legacy-submissions.ts
115
117
  import * as z from "zod";
@@ -2114,6 +2116,34 @@ function relayClient(options) {
2114
2116
  })
2115
2117
  }
2116
2118
  },
2119
+ /**
2120
+ * The member's creator accounts: the platform accounts they publish from, such as a YouTube
2121
+ * channel, which managed tracker sources read. A creator account is linked only to a
2122
+ * signed-in member, never used to sign in, and linking another one on the same platform
2123
+ * replaces it.
2124
+ */
2125
+ creatorAccounts: {
2126
+ /** One entry per creator-account provider the platform configured. */
2127
+ list: (requestOptions) => request("/v1/auth/creator-accounts", creatorAccountsSchema, {
2128
+ options: requestOptions
2129
+ }),
2130
+ /**
2131
+ * Leaves for the provider's consent screen to link an account to the signed-in member.
2132
+ * Answers the URL to open; the browser comes back to the app linked.
2133
+ */
2134
+ connect: async (provider, requestOptions) => request("/v1/auth/start", z2.object({ url: z2.string() }), {
2135
+ json: {
2136
+ provider: parseInput(creatorAccountProviderSchema, provider),
2137
+ mode: "connect"
2138
+ },
2139
+ options: requestOptions
2140
+ }),
2141
+ /** Unlinks the member's account on `provider`. Records it authored stay. */
2142
+ disconnect: async (provider, requestOptions) => request("/v1/auth/accounts/disconnect", acknowledged, {
2143
+ json: { provider: parseInput(creatorAccountProviderSchema, provider) },
2144
+ options: requestOptions
2145
+ })
2146
+ },
2117
2147
  /** The member's connected sign-in accounts, one per provider. */
2118
2148
  accounts: (requestOptions) => request("/v1/auth/accounts", z2.array(accountConnectionSchema), {
2119
2149
  options: requestOptions
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createRelayClient
3
- } from "./chunk-GL43VQ5D.js";
3
+ } from "./chunk-NK6EER33.js";
4
4
  import {
5
5
  RelayErrorCode,
6
6
  asRelayError,
7
7
  clientError,
8
8
  cosmosChain
9
- } from "./chunk-YCOKTQ4E.js";
9
+ } from "./chunk-BHHUSBSD.js";
10
10
 
11
11
  // src/base58.ts
12
12
  var alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  identifier
3
- } from "./chunk-YCOKTQ4E.js";
3
+ } from "./chunk-BHHUSBSD.js";
4
4
 
5
5
  // src/auth.ts
6
6
  import * as z from "zod";