@domino-sdk/relay 1.22.0 → 1.23.1

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-EMLDFUTV.js → chunk-6UFXPKLA.js} +6 -1
  9. package/dist/{chunk-GMKJPHN4.js → chunk-AXQYGVOP.js} +1 -1
  10. package/dist/{chunk-JIQHUDVZ.js → chunk-B4EZ76WX.js} +1 -1
  11. package/dist/{chunk-T47OFHHX.js → chunk-E7MVYASS.js} +1 -1
  12. package/dist/{chunk-CVQG2AZZ.js → chunk-ENBQ6UEE.js} +2 -2
  13. package/dist/{chunk-NGP2NMZ4.js → chunk-G75JVB4D.js} +1 -1
  14. package/dist/{chunk-5ZRDK4KQ.js → chunk-GB26FIZT.js} +96 -118
  15. package/dist/{chunk-4LKSBBWD.js → chunk-HNWBRLFR.js} +4 -4
  16. package/dist/{chunk-H2QDYEA4.js → chunk-JMGRA5W7.js} +2 -2
  17. package/dist/{chunk-YXAK2637.js → chunk-JUQ2GNMD.js} +1 -1
  18. package/dist/{chunk-XSLRNFIY.js → chunk-MRU7GX2V.js} +1 -1
  19. package/dist/{chunk-NSLQLGHF.js → chunk-PEVDXO3K.js} +13 -11
  20. package/dist/{chunk-7YRXDG7R.js → chunk-UCZGXYCN.js} +9 -7
  21. package/dist/{chunk-VJ7TTLFL.js → chunk-USDFIAHW.js} +1 -1
  22. package/dist/chunk-W33PYWYQ.js +102 -0
  23. package/dist/{chunk-5P5PTZ3T.js → chunk-WOGCRDFT.js} +1 -1
  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 +66 -18
  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-C6QJseIM.d.ts → transport-DV6fs_zK.d.ts} +2221 -2012
  49. package/package.json +1 -1
  50. package/dist/accounts-5ciAkCMP.d.ts +0 -147
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createRelayAction,
3
3
  withActionId
4
- } from "./chunk-T47OFHHX.js";
4
+ } from "./chunk-E7MVYASS.js";
5
5
  import {
6
6
  collectionPassSchema,
7
7
  participantActivityQuerySchema,
@@ -15,11 +15,8 @@ import {
15
15
  questOutcomePageSchema,
16
16
  questOutcomeQuerySchema,
17
17
  questOutcomeSchema,
18
- rewardDeliveriesSchema,
19
- telegramAccountConnectionSchema,
20
- telegramMiniAppSignInSchema,
21
- telegramSignInMethodsSchema
22
- } from "./chunk-5ZRDK4KQ.js";
18
+ rewardDeliveriesSchema
19
+ } from "./chunk-GB26FIZT.js";
23
20
  import {
24
21
  AVATAR_UPLOAD_LIMIT,
25
22
  avatarUploadTypes,
@@ -48,24 +45,29 @@ import {
48
45
  referralDefinitionSchema,
49
46
  referralHistorySchema,
50
47
  referralSummarySchema
51
- } from "./chunk-XSLRNFIY.js";
48
+ } from "./chunk-MRU7GX2V.js";
49
+ import {
50
+ telegramAccountConnectionSchema,
51
+ telegramMiniAppSignInSchema,
52
+ telegramSignInMethodsSchema
53
+ } from "./chunk-W33PYWYQ.js";
52
54
  import {
53
55
  PARTICIPANT_TIMEOUT,
54
56
  lifetime,
55
57
  retryAfter,
56
58
  retrying,
57
59
  validTimeout
58
- } from "./chunk-5P5PTZ3T.js";
60
+ } from "./chunk-WOGCRDFT.js";
59
61
  import {
60
62
  clientIdentity
61
- } from "./chunk-VJ7TTLFL.js";
63
+ } from "./chunk-USDFIAHW.js";
62
64
  import {
63
65
  exchangeResultSchema,
64
66
  exchangeSchema,
65
67
  memberSummarySchema,
66
68
  participantSessionSchema,
67
69
  sessionMember
68
- } from "./chunk-YXAK2637.js";
70
+ } from "./chunk-JUQ2GNMD.js";
69
71
  import {
70
72
  RelayError,
71
73
  RelayErrorCode,
@@ -102,7 +104,7 @@ import {
102
104
  walletSignInNetworksSchema,
103
105
  walletSignatureSchema,
104
106
  walletUnlinkInputSchema
105
- } from "./chunk-EMLDFUTV.js";
107
+ } from "./chunk-6UFXPKLA.js";
106
108
 
107
109
  // src/submissions.ts
108
110
  import { z } from "zod";
@@ -6,7 +6,7 @@ import {
6
6
  imageSightingsSchema,
7
7
  imageUploadsSchema,
8
8
  publishedImageSchema
9
- } from "./chunk-JIQHUDVZ.js";
9
+ } from "./chunk-B4EZ76WX.js";
10
10
  import {
11
11
  catalogDeploymentSchema,
12
12
  collectionPassSchema,
@@ -23,9 +23,8 @@ import {
23
23
  questOutcomeSchema,
24
24
  questTypeVersionSchema,
25
25
  questViewSchema,
26
- rewardDeliveriesSchema,
27
- telegramAccountConnectionSchema
28
- } from "./chunk-5ZRDK4KQ.js";
26
+ rewardDeliveriesSchema
27
+ } from "./chunk-GB26FIZT.js";
29
28
  import {
30
29
  badgeArtifactSchema,
31
30
  badgeSchema,
@@ -58,12 +57,15 @@ import {
58
57
  referralDefinitionSchema,
59
58
  referralHistorySchema,
60
59
  referralSummarySchema
61
- } from "./chunk-XSLRNFIY.js";
60
+ } from "./chunk-MRU7GX2V.js";
61
+ import {
62
+ telegramAccountConnectionSchema
63
+ } from "./chunk-W33PYWYQ.js";
62
64
  import {
63
65
  exchangeResultSchema,
64
66
  memberSummarySchema,
65
67
  participantSessionSchema
66
- } from "./chunk-YXAK2637.js";
68
+ } from "./chunk-JUQ2GNMD.js";
67
69
  import {
68
70
  accountConnectionSchema,
69
71
  attemptSchema,
@@ -94,7 +96,7 @@ import {
94
96
  walletBalanceSchema,
95
97
  walletMessageChallengeSchema,
96
98
  walletSignInNetworksSchema
97
- } from "./chunk-EMLDFUTV.js";
99
+ } from "./chunk-6UFXPKLA.js";
98
100
 
99
101
  // src/deployments.ts
100
102
  import { z } from "zod";
@@ -1,6 +1,6 @@
1
1
  // package.json
2
2
  var name = "@domino-sdk/relay";
3
- var version = "1.22.0";
3
+ var version = "1.23.1";
4
4
 
5
5
  // src/client-identity.ts
6
6
  function clientIdentity() {
@@ -0,0 +1,102 @@
1
+ import {
2
+ accountConnectionSchema
3
+ } from "./chunk-6UFXPKLA.js";
4
+
5
+ // src/telegram.ts
6
+ import { z } from "zod";
7
+ var telegramSignInMethodsSchema = z.object({
8
+ /** Telegram Login, the OpenID Connect sign-in Domino configures for the platform. */
9
+ login: z.boolean(),
10
+ /** Mini App sign-in, which the project enables in Console with its bot's ID. */
11
+ miniApp: z.boolean()
12
+ });
13
+ var telegramAccountConnectionSchema = accountConnectionSchema.extend({
14
+ provider: z.literal("telegram")
15
+ });
16
+ var telegramInitDataSchema = z.string().min(1, "Pass the Mini App's Telegram.WebApp.initData").max(8192);
17
+ var telegramMiniAppSignInSchema = z.object({
18
+ initData: telegramInitDataSchema,
19
+ mode: z.enum(["sign-in", "connect"])
20
+ }).strict();
21
+ var telegramChatIdSchema = z.string().regex(
22
+ /^-?[1-9][0-9]{0,19}$/,
23
+ "Use the chat's numeric ID, such as -1001234567890"
24
+ );
25
+ var telegramChatSchema = z.object({
26
+ /** The numeric chat ID, as a string. */
27
+ id: telegramChatIdSchema,
28
+ /** `group`, `supergroup` or `channel`; a later Telegram may add others. */
29
+ type: z.string(),
30
+ title: z.string(),
31
+ /** The public @username, without the @, or null for a private chat. */
32
+ username: z.string().nullable(),
33
+ status: z.string(),
34
+ issue: z.string().nullable(),
35
+ connectedAt: z.number()
36
+ });
37
+ var telegramChatsSchema = z.object({
38
+ configured: z.boolean(),
39
+ /** Domino's bot, the one operators add to their chats. */
40
+ bot: z.object({ username: z.string() }).nullable(),
41
+ chats: z.array(telegramChatSchema)
42
+ });
43
+ var telegramChatConnectionSchema = z.object({
44
+ url: z.string(),
45
+ expiresAt: z.number()
46
+ });
47
+ var telegramMemberInputSchema = z.object({
48
+ chat: z.string().regex(
49
+ /^(-?[1-9][0-9]{0,19}|@[A-Za-z][A-Za-z0-9_]{3,31})$/,
50
+ "Name a chat the project connected, by its numeric ID or @username"
51
+ )
52
+ }).strict();
53
+ var telegramChatMemberSchema = z.object({
54
+ /** The numeric Telegram user ID. */
55
+ userId: z.string(),
56
+ username: z.string().nullable(),
57
+ status: z.custom(
58
+ (value) => typeof value === "string"
59
+ ),
60
+ /** Whether they are in the chat now: a creator, administrator, member, or restricted member. */
61
+ isMember: z.boolean(),
62
+ /** Whether they are its creator or an administrator. */
63
+ isAdmin: z.boolean(),
64
+ /** When a paid subscription or a restriction ends, epoch milliseconds; null when it does not. */
65
+ untilDate: z.number().nullable()
66
+ });
67
+ var telegramReactionsNamespace = "telegram-reactions";
68
+ var telegramReactionDataSchema = z.object({
69
+ /** The chat's numeric ID, as a string. */
70
+ chatId: z.string(),
71
+ /** `group` or `supergroup`: channel reactions are anonymous and never recorded. */
72
+ chatType: z.string(),
73
+ messageId: z.number(),
74
+ /** `emoji`, `custom_emoji` or `paid`. */
75
+ reactionType: z.string(),
76
+ /** The emoji, such as "❤", for an `emoji` reaction; null otherwise. */
77
+ emoji: z.string().nullable(),
78
+ /** The custom emoji's ID for a `custom_emoji` reaction; null otherwise. */
79
+ customEmojiId: z.string().nullable(),
80
+ /**
81
+ * `creator` or `administrator` for one of the chat's administrators, read at most ten minutes
82
+ * before Relay recorded the reaction; `member` for anyone else.
83
+ */
84
+ reactorStatus: z.string(),
85
+ /** Whether the reactor was the chat's creator or an administrator then. */
86
+ reactorIsAdmin: z.boolean()
87
+ });
88
+
89
+ export {
90
+ telegramSignInMethodsSchema,
91
+ telegramAccountConnectionSchema,
92
+ telegramInitDataSchema,
93
+ telegramMiniAppSignInSchema,
94
+ telegramChatIdSchema,
95
+ telegramChatSchema,
96
+ telegramChatsSchema,
97
+ telegramChatConnectionSchema,
98
+ telegramMemberInputSchema,
99
+ telegramChatMemberSchema,
100
+ telegramReactionsNamespace,
101
+ telegramReactionDataSchema
102
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isRequestError
3
- } from "./chunk-EMLDFUTV.js";
3
+ } from "./chunk-6UFXPKLA.js";
4
4
 
5
5
  // src/request-lifetime.ts
6
6
  var PARTICIPANT_TIMEOUT = 15e3;
@@ -1,11 +1,11 @@
1
- import { aZ as referralAcceptSchema, g as LeaderboardQuery, b as CampaignEnrollmentInput, d as CampaignWithdrawalInput, m as PointHistoryQuery, k as PointEntryKind, a6 as engagementPageQuerySchema } from './groups-jLLG7MML.js';
2
- import { j as QuestView, k as ResponseSchema, a as PageQuery, c as QuestEnrollmentInput, Q as QuestClaimInput, g as QuestOutcomeQuery, _ as questExperienceSchema, l as RewardDeliveryAction, F as contentQualificationQuerySchema } from './pages-1h1387a3.js';
3
- import { M as MissingPrerequisite, V as ValueEvidence } from './submission-input-BEJ9qENg.js';
1
+ import { aZ as referralAcceptSchema, g as LeaderboardQuery, b as CampaignEnrollmentInput, d as CampaignWithdrawalInput, m as PointHistoryQuery, k as PointEntryKind, a6 as engagementPageQuerySchema } from './groups-CfyRewkJ.js';
2
+ import { j as QuestView, k as ResponseSchema, a as PageQuery, c as QuestEnrollmentInput, Q as QuestClaimInput, g as QuestOutcomeQuery, _ as questExperienceSchema, l as RewardDeliveryAction, F as contentQualificationQuerySchema } from './pages-D1xrbGJl.js';
3
+ import { M as MissingPrerequisite, V as ValueEvidence } from './submission-input-DjXg0o-r.js';
4
4
  import { a as RequestError, b as RequestErrorDetails, c as RequestErrorKind, e as createRelayAction, O as OptionalActionId } from './action-DBzILFx9.js';
5
- import { f as QuizEvidence, A as Attempt, M as MemberProgress, a as AttemptStatus, h as TrackerSkipCode, cg as submitSchema, be as contentPerformanceQuerySchema } from './schema-Br3c1GOu.js';
6
- import { b as ParticipantSession, f as exchangeSchema, R as RelayEvent, P as ParticipantActivity } from './telegram-DALZ7GdF.js';
5
+ import { f as QuizEvidence, A as Attempt, M as MemberProgress, a as AttemptStatus, h as TrackerSkipCode, cg as submitSchema, be as contentPerformanceQuerySchema } from './schema-D57mhL2q.js';
6
+ import { b as ParticipantSession, d as exchangeSchema, R as RelayEvent, P as ParticipantActivity } from './participant-activity-DYdUUhw2.js';
7
7
  import { z } from 'zod';
8
- import { a as AuthProvider } from './accounts-5ciAkCMP.js';
8
+ import { a as AuthProvider } from './accounts-B31dWEYD.js';
9
9
  import { F as profileUpdateSchema, c as ProfileCompletionQuery } from './profiles-D29SS12z.js';
10
10
  import { y as walletAddressInputSchema, I as walletSignatureSchema, L as LinkedWallet, f as WalletSigner } from './wallet-CDyo-U4n.js';
11
11