@domino-sdk/relay 1.0.0-next.13 → 1.0.0-next.15

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 (35) hide show
  1. package/README.md +1 -1
  2. package/dist/authoring.d.ts +58 -44
  3. package/dist/authoring.js +58 -45
  4. package/dist/browser.d.ts +111 -151
  5. package/dist/browser.js +6 -6
  6. package/dist/{catalog-C85V1NgW.d.ts → catalog-CVXUHxiO.d.ts} +12 -99
  7. package/dist/{chunk-M64XHC42.js → chunk-76F4LSFP.js} +2 -2
  8. package/dist/{chunk-II7DRZSL.js → chunk-CYD6QMHU.js} +1 -1
  9. package/dist/{chunk-KS33GOUL.js → chunk-EJWDAF7I.js} +4 -4
  10. package/dist/chunk-FJ6O44NE.js +51 -0
  11. package/dist/{chunk-WQ24ILGO.js → chunk-G3YSBMJH.js} +7 -3
  12. package/dist/{chunk-MNQI35OG.js → chunk-HWRBLM7E.js} +3 -3
  13. package/dist/{chunk-CRNQP7NV.js → chunk-J4OYDYJE.js} +693 -676
  14. package/dist/{chunk-OA2KMQVZ.js → chunk-J52HD4AA.js} +11 -1
  15. package/dist/{chunk-EZWNGI5B.js → chunk-RCBJBFLC.js} +4 -4
  16. package/dist/{chunk-FXYJ4OMX.js → chunk-WMTROSYF.js} +1 -1
  17. package/dist/{client-Bf9PNUIi.d.ts → client-dfXT6hhq.d.ts} +7 -47
  18. package/dist/{deployments-CNCP0JnD.d.ts → deployments-C9wkQ06n.d.ts} +109 -125
  19. package/dist/{images-BG4pdO4y.d.ts → images-CRxHUuG5.d.ts} +1 -1
  20. package/dist/index.d.ts +3 -3
  21. package/dist/index.js +5 -5
  22. package/dist/{integrations-EjQzIApL.d.ts → integrations-C1vB6Ry6.d.ts} +93 -1
  23. package/dist/internal.d.ts +13 -4
  24. package/dist/internal.js +10 -4
  25. package/dist/portal-proxy.js +2 -2
  26. package/dist/react/index.d.ts +441 -655
  27. package/dist/react/index.js +1190 -810
  28. package/dist/{schema-BF_TQsmT.d.ts → schema-C4F2K9cm.d.ts} +9 -74
  29. package/dist/schema.d.ts +6 -7
  30. package/dist/schema.js +18 -16
  31. package/dist/server/index.d.ts +125 -233
  32. package/dist/server/index.js +16 -22
  33. package/dist/{trackers-W7nRdRr7.d.ts → trackers-7lxSWp2g.d.ts} +56 -14
  34. package/package.json +4 -2
  35. package/dist/observations-CQ6IcNuQ.d.ts +0 -90
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { P as PhotoResult } from './schema-BF_TQsmT.js';
2
+ import { P as PhotoResult } from './schema-C4F2K9cm.js';
3
3
 
4
4
  /**
5
5
  * Quest code names an image; the platform fetches, decodes and pins it. No bytes or URLs cross the
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- export { C as ClaimSubmission, K as KnownRelayErrorCode, P as PhotoSubmission, a as ProgressObservation, b as ProgressObserver, Q as QuestActionResult, c as QuestController, d as QuestUpdatedError, e as QuizSubmission, R as RelayClient, f as RelayClientOptions, g as RelayError, h as RelayErrorCode, i as RelayErrorDetails, j as RelayErrorKind, k as RelayRequestOptions, S as SubmissionDraft, l as SubmissionStatus, m as SubmissionStore, V as ValueSubmission, n as createRelayClient, o as isRelayError } from './client-Bf9PNUIi.js';
1
+ export { C as ClaimSubmission, K as KnownRelayErrorCode, P as PhotoSubmission, a as ProgressObservation, b as ProgressObserver, Q as QuestActionResult, c as QuestController, d as QuestUpdatedError, e as QuizSubmission, R as RelayClient, f as RelayClientOptions, g as RelayError, h as RelayErrorCode, i as RelayErrorDetails, j as RelayErrorKind, k as RelayRequestOptions, S as SubmissionDraft, l as SubmissionStatus, m as SubmissionStore, V as ValueSubmission, n as createRelayClient, o as isRelayError } from './client-dfXT6hhq.js';
2
2
  export { R as RequestError, a as RequestErrorDetails, b as RequestErrorKind, c as RequestRecovery, i as isRequestError } from './request-error-VnTiMXc3.js';
3
3
  export { f as formatUnits, p as parseUnits } from './units-CwgsPB_r.js';
4
4
  export { A as AccountConnection, a as AuthProvider, T as TextEvidence, b as TextOptions, U as UrlEvidence, c as UrlOptions, V as ValueEvidence } from './submission-input-CccwAl5Z.js';
5
5
  export { E as ExchangeInput, M as MemberSummary, P as Page, a as PageQuery, b as ParticipantPrincipal, c as ParticipantSession, S as Session, s as sessionMember } from './pages-KYK1L60W.js';
6
- export { K as KnownPointEntryKind, P as PointBalance, a as PointBalances, b as PointEntry, c as PointEntryKind, d as PointHistoryPage, e as PointHistoryQuery, f as PointLedgerReference, Q as QuestInteraction, g as QuestRewardView, h as QuestView } from './catalog-C85V1NgW.js';
6
+ export { K as KnownPointEntryKind, P as PointBalance, a as PointBalances, b as PointEntry, c as PointEntryKind, d as PointHistoryPage, e as PointHistoryQuery, f as PointLedgerReference, Q as QuestInteraction, g as QuestRewardView, h as QuestView } from './catalog-CVXUHxiO.js';
7
7
  export { C as CollectionPass } from './collection-BGneJ6Bk.js';
8
8
  export { L as LeaderboardDefinition, a as LeaderboardPage, b as LeaderboardPlacement, c as LeaderboardQuery, R as ReferralDefinition } from './referrals-KQfP4pBf.js';
9
9
  export { A as AvatarProvider, O as OwnProfile, P as ProfileAvatar, a as ProfileCompletion, b as ProfileCompletionPage, c as ProfileCompletionQuery, d as ProfileReferral, e as ProfileSummary, f as ProfileUpdate, g as ProfileVisibility } from './profiles-BtOXMGcC.js';
10
10
  export { Q as QuizContent, S as StreakProgress } from './streaks-CWyq8Px5.js';
11
- export { A as Attempt, E as Entitlement, M as MemberProgress, Q as QuestPresentation, a as QuestProfile, b as QuizEvidence, R as Reward, S as SubmissionEvidence, c as SubmitInput, T as TieredRewardReference } from './schema-BF_TQsmT.js';
11
+ export { A as Attempt, E as Entitlement, M as MemberProgress, Q as QuestPresentation, a as QuestProfile, b as QuizEvidence, R as Reward, S as SubmissionEvidence, c as SubmitInput, T as TieredRewardReference } from './schema-C4F2K9cm.js';
12
12
  export { C as CosmosChain, a as CosmosNetwork, L as LinkedWallet, W as WalletAddressInput, b as WalletChain, c as WalletMessageChallenge, d as WalletSignInNetwork, e as WalletSignature, f as WalletSigner, g as WalletUnlinkInput } from './wallet-BtiG0Xhr.js';
13
13
  import 'zod';
package/dist/index.js CHANGED
@@ -5,21 +5,21 @@ import {
5
5
  import {
6
6
  QuestUpdatedError,
7
7
  createRelayClient
8
- } from "./chunk-EZWNGI5B.js";
8
+ } from "./chunk-RCBJBFLC.js";
9
9
  import {
10
10
  PointEntryKind
11
- } from "./chunk-M64XHC42.js";
11
+ } from "./chunk-76F4LSFP.js";
12
12
  import {
13
13
  RelayError,
14
14
  RelayErrorCode,
15
15
  RequestError,
16
16
  isRelayError,
17
17
  isRequestError
18
- } from "./chunk-OA2KMQVZ.js";
18
+ } from "./chunk-J52HD4AA.js";
19
19
  import {
20
20
  sessionMember
21
- } from "./chunk-FXYJ4OMX.js";
22
- import "./chunk-CRNQP7NV.js";
21
+ } from "./chunk-WMTROSYF.js";
22
+ import "./chunk-J4OYDYJE.js";
23
23
  export {
24
24
  PointEntryKind,
25
25
  QuestUpdatedError,
@@ -1,5 +1,69 @@
1
1
  import { z } from 'zod';
2
2
 
3
+ /** A Discord message as `ctx.discord.message()` reads it, from the project's Discord server. */
4
+ declare const discordMessageSchema: z.ZodObject<{
5
+ guildId: z.ZodString;
6
+ channelId: z.ZodString;
7
+ messageId: z.ZodString;
8
+ userId: z.ZodString;
9
+ content: z.ZodNullable<z.ZodString>;
10
+ replyTo: z.ZodNullable<z.ZodString>;
11
+ publishedAt: z.ZodNumber;
12
+ }, z.core.$strict>;
13
+ type DiscordMessage = z.infer<typeof discordMessageSchema>;
14
+ /**
15
+ * Messages posted in the project's Discord server, written by the Discord gateway. The record's
16
+ * `author` is the message author's Discord account. Message text is stored only with `text: true`.
17
+ */
18
+ declare const discordMessagesSourceSchema: z.ZodObject<{
19
+ kind: z.ZodLiteral<"discord-messages">;
20
+ /** Store each message's text in `data.text`. Off unless set. */
21
+ text: z.ZodOptional<z.ZodBoolean>;
22
+ }, z.core.$strict>;
23
+ /**
24
+ * Reactions added in the project's Discord server, written by the Discord gateway. The record's
25
+ * `author` is the reactor's Discord account and its `messageAuthor` account is the message's
26
+ * author, when Discord could name it.
27
+ */
28
+ declare const discordReactionsSourceSchema: z.ZodObject<{
29
+ kind: z.ZodLiteral<"discord-reactions">;
30
+ }, z.core.$strict>;
31
+ /** The `data` of a `discord.messages()` record. IDs are Discord snowflakes. */
32
+ declare const discordMessageDataSchema: z.ZodObject<{
33
+ guildId: z.ZodString;
34
+ channelId: z.ZodString;
35
+ messageId: z.ZodString;
36
+ replyTo: z.ZodNullable<z.ZodString>;
37
+ publishedAt: z.ZodNumber;
38
+ }, z.core.$strip>;
39
+ type DiscordMessageData = z.infer<typeof discordMessageDataSchema>;
40
+ /**
41
+ * The `data` of a `discord.messages({ text: true })` record. `text` is null when the platform's
42
+ * bot does not receive message content.
43
+ */
44
+ declare const discordMessageTextDataSchema: z.ZodObject<{
45
+ guildId: z.ZodString;
46
+ channelId: z.ZodString;
47
+ messageId: z.ZodString;
48
+ replyTo: z.ZodNullable<z.ZodString>;
49
+ publishedAt: z.ZodNumber;
50
+ text: z.ZodNullable<z.ZodString>;
51
+ }, z.core.$strip>;
52
+ type DiscordMessageTextData = z.infer<typeof discordMessageTextDataSchema>;
53
+ /** The `data` of a `discord.reactions()` record. IDs are Discord snowflakes. */
54
+ declare const discordReactionDataSchema: z.ZodObject<{
55
+ guildId: z.ZodString;
56
+ channelId: z.ZodString;
57
+ messageId: z.ZodString;
58
+ emoji: z.ZodObject<{
59
+ id: z.ZodNullable<z.ZodString>;
60
+ name: z.ZodString;
61
+ }, z.core.$strip>;
62
+ reactorRoles: z.ZodArray<z.ZodString>;
63
+ messagePublishedAt: z.ZodNumber;
64
+ }, z.core.$strip>;
65
+ type DiscordReactionData = z.infer<typeof discordReactionDataSchema>;
66
+
3
67
  declare const resourceSourceSchema: z.ZodUnion<readonly [z.ZodObject<{
4
68
  provider: z.ZodLiteral<"domino">;
5
69
  resource: z.ZodLiteral<"point-ledger">;
@@ -290,6 +354,34 @@ interface XReader {
290
354
  }): Promise<boolean>;
291
355
  }
292
356
 
357
+ declare const completionPolicySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
358
+ kind: z.ZodLiteral<"streak">;
359
+ days: z.ZodNumber;
360
+ }, z.core.$strip>, z.ZodObject<{
361
+ kind: z.ZodLiteral<"once">;
362
+ }, z.core.$strict>, z.ZodObject<{
363
+ kind: z.ZodLiteral<"keyed">;
364
+ }, z.core.$strict>], "kind">;
365
+ declare const completionKeySchema: z.ZodString;
366
+ declare const budgetSchema: z.ZodObject<{
367
+ id: z.ZodString;
368
+ scope: z.ZodEnum<{
369
+ member: "member";
370
+ project: "project";
371
+ }>;
372
+ period: z.ZodEnum<{
373
+ lifetime: "lifetime";
374
+ day: "day";
375
+ week: "week";
376
+ month: "month";
377
+ }>;
378
+ limit: z.ZodNumber;
379
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
380
+ balance: z.ZodString;
381
+ }, z.core.$strict>]>;
382
+ }, z.core.$strict>;
383
+ type Budget = z.infer<typeof budgetSchema>;
384
+
293
385
  declare const integrationProviderSchema: z.ZodEnum<{
294
386
  discord: "discord";
295
387
  }>;
@@ -320,4 +412,4 @@ declare const projectIntegrationSchema: z.ZodObject<{
320
412
  }, z.core.$strip>;
321
413
  type ProjectIntegration = z.infer<typeof projectIntegrationSchema>;
322
414
 
323
- export { type IntegerSettings as I, type ProjectIntegration as P, type ResourceOption as R, type Setting as S, type XConnection as X, type IntegrationProvider as a, type ResourceSource as b, type SettingField as c, type SettingsValues as d, type XPost as e, type XProfile as f, type XReader as g, compatibleSettingKinds as h, discordServerSchema as i, integrationProviderSchema as j, projectIntegrationSchema as k, resourceRequestSchema as l, missingResourceSettings as m, resourceSourceSchema as n, settingsFieldsSchema as o, parseSettings as p, settingsValuesSchema as q, resourceOptionsSchema as r, settingFieldSchema as s, xIdSchema as t, xPostSchema as u, xProfileSchema as v, xRequestSchema as w, xConnectionSchema as x };
415
+ export { resourceRequestSchema as A, type Budget as B, resourceSourceSchema as C, type DiscordMessage as D, settingFieldSchema as E, settingsFieldsSchema as F, settingsValuesSchema as G, xConnectionSchema as H, type IntegerSettings as I, xIdSchema as J, xPostSchema as K, xProfileSchema as L, xRequestSchema as M, type ProjectIntegration as P, type ResourceOption as R, type Setting as S, type XConnection as X, type DiscordMessageData as a, type DiscordMessageTextData as b, type DiscordReactionData as c, type IntegrationProvider as d, type ResourceSource as e, type SettingField as f, type SettingsValues as g, type XPost as h, type XProfile as i, type XReader as j, budgetSchema as k, compatibleSettingKinds as l, completionKeySchema as m, completionPolicySchema as n, discordMessageDataSchema as o, discordMessageSchema as p, discordMessageTextDataSchema as q, discordMessagesSourceSchema as r, discordReactionDataSchema as s, discordReactionsSourceSchema as t, discordServerSchema as u, integrationProviderSchema as v, missingResourceSettings as w, parseSettings as x, projectIntegrationSchema as y, resourceOptionsSchema as z };
@@ -1,8 +1,9 @@
1
- import { f as PublishedRelease } from './schema-BF_TQsmT.js';
1
+ import { f as PublishedRelease } from './schema-C4F2K9cm.js';
2
2
  export { i as identityIntegrationInputSchema, a as identityIntegrationSchema, b as identityIntegrationSecretSchema, p as participantExchangeSchema } from './identity-integration-CBR8l3ju.js';
3
- import { c as ImageFields, g as ImageRequest } from './images-BG4pdO4y.js';
3
+ import { c as ImageFields, g as ImageRequest } from './images-CRxHUuG5.js';
4
4
  import { z } from 'zod';
5
- export { ax as TrackerDataBudget, ay as schemaCheckedReader, az as trackerDataBatchSteps, aA as trackerDataIssue, aB as trackerDataIssues, aC as trackerDataPathTypes, aD as trackerDataRecordSteps, aE as whereSchemaIssue } from './trackers-W7nRdRr7.js';
5
+ import { t as TrackerSource, i as TrackerDataSchema } from './trackers-7lxSWp2g.js';
6
+ export { az as TrackerDataBudget, aA as schemaCheckedReader, aB as trackerDataBatchSteps, aC as trackerDataIssue, aD as trackerDataIssues, aE as trackerDataPathTypes, aF as trackerDataRecordSteps, aG as whereSchemaIssue } from './trackers-7lxSWp2g.js';
6
7
 
7
8
  /** Older releases did not record ownership. Preserve every value, including defaults. */
8
9
  declare function questConfiguration(release: PublishedRelease): {
@@ -87,4 +88,12 @@ declare function isWalletSignInRoute(path: string): boolean;
87
88
  */
88
89
  declare const sequenceCursorSchema: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>, z.ZodNumber>;
89
90
 
90
- export { isContentParticipantRoute, isLegacyWalletRoute, isPointsParticipantRoute, isProfileParticipantRoute, isWalletParticipantRoute, isWalletSignInRoute, parseImageExtraction, parseImageResult, questConfiguration, sequenceCursorSchema };
91
+ /** The account roles a source's records can name: `author` and any others the source declares. */
92
+ declare function sourceRoles(source: TrackerSource): readonly string[];
93
+ /**
94
+ * The schema a source's record `data` matches: a custom source's declared schema, a Discord
95
+ * source's fixed one, or undefined for X (provider payloads) and untyped custom trackers.
96
+ */
97
+ declare function sourceDataSchema(source: TrackerSource): TrackerDataSchema | undefined;
98
+
99
+ export { isContentParticipantRoute, isLegacyWalletRoute, isPointsParticipantRoute, isProfileParticipantRoute, isWalletParticipantRoute, isWalletSignInRoute, parseImageExtraction, parseImageResult, questConfiguration, sequenceCursorSchema, sourceDataSchema, sourceRoles };
package/dist/internal.js CHANGED
@@ -7,8 +7,12 @@ import {
7
7
  participantExchangeSchema,
8
8
  questConfiguration,
9
9
  sequenceCursorSchema
10
- } from "./chunk-MNQI35OG.js";
11
- import "./chunk-II7DRZSL.js";
10
+ } from "./chunk-HWRBLM7E.js";
11
+ import "./chunk-CYD6QMHU.js";
12
+ import {
13
+ sourceDataSchema,
14
+ sourceRoles
15
+ } from "./chunk-FJ6O44NE.js";
12
16
  import {
13
17
  isContentParticipantRoute,
14
18
  isLegacyWalletRoute,
@@ -17,7 +21,7 @@ import {
17
21
  isWalletParticipantRoute,
18
22
  isWalletSignInRoute
19
23
  } from "./chunk-6A2V4L3T.js";
20
- import "./chunk-FXYJ4OMX.js";
24
+ import "./chunk-WMTROSYF.js";
21
25
  import {
22
26
  schemaCheckedReader,
23
27
  trackerDataBatchSteps,
@@ -26,7 +30,7 @@ import {
26
30
  trackerDataPathTypes,
27
31
  trackerDataRecordSteps,
28
32
  whereSchemaIssue
29
- } from "./chunk-CRNQP7NV.js";
33
+ } from "./chunk-J4OYDYJE.js";
30
34
  export {
31
35
  identityIntegrationInputSchema,
32
36
  identityIntegrationSchema,
@@ -43,6 +47,8 @@ export {
43
47
  questConfiguration,
44
48
  schemaCheckedReader,
45
49
  sequenceCursorSchema,
50
+ sourceDataSchema,
51
+ sourceRoles,
46
52
  trackerDataBatchSteps,
47
53
  trackerDataIssue,
48
54
  trackerDataIssues,
@@ -7,8 +7,8 @@ import {
7
7
  } from "./chunk-6A2V4L3T.js";
8
8
  import {
9
9
  exchangeResultSchema
10
- } from "./chunk-FXYJ4OMX.js";
11
- import "./chunk-CRNQP7NV.js";
10
+ } from "./chunk-WMTROSYF.js";
11
+ import "./chunk-J4OYDYJE.js";
12
12
 
13
13
  // src/portal-proxy.ts
14
14
  async function proxyParticipant(request, upstream) {