@domino-sdk/relay 1.70.0 → 1.72.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 +28 -0
  2. package/dist/{accounts-B49TGZLk.d.ts → accounts-COLmXRbW.d.ts} +144 -11
  3. package/dist/{attempt-captures-Dn-oGE1o.d.ts → attempt-captures-CVl161qB.d.ts} +3 -2
  4. package/dist/authoring.d.ts +68 -25
  5. package/dist/authoring.js +12 -8
  6. package/dist/{automatic-outcomes-DeRyox-X.d.ts → automatic-outcomes-5l68PGr1.d.ts} +2 -2
  7. package/dist/browser.d.ts +9 -9
  8. package/dist/browser.js +11 -9
  9. package/dist/{catalog-CR_2iacf.d.ts → catalog-BR3g-1H9.d.ts} +41 -2
  10. package/dist/{chunk-NOQSKRSS.js → chunk-2UELTHW6.js} +12 -4
  11. package/dist/{chunk-SELJYCYY.js → chunk-3KKRXN5E.js} +1 -1
  12. package/dist/{chunk-4VDRNYUG.js → chunk-74SMLZZ5.js} +710 -677
  13. package/dist/{chunk-4BBDHTBF.js → chunk-ASBDB436.js} +1 -1
  14. package/dist/{chunk-3DUNFRKJ.js → chunk-BXUF3CRL.js} +32 -6
  15. package/dist/{chunk-BJ2W5ZVQ.js → chunk-CVJTIVAP.js} +1 -1
  16. package/dist/{chunk-FHOKCBTJ.js → chunk-ETGKC2SB.js} +1 -1
  17. package/dist/{chunk-XD6EUA27.js → chunk-FGZGL5PG.js} +1 -1
  18. package/dist/{chunk-OKKZPDCQ.js → chunk-GHBYWDEZ.js} +8 -1
  19. package/dist/{chunk-SDWG7CWQ.js → chunk-HN7DE2UN.js} +2 -2
  20. package/dist/{chunk-25WA4XYZ.js → chunk-I7XIBXT2.js} +74 -5
  21. package/dist/{chunk-UKUIE2ND.js → chunk-KIRXE37T.js} +6 -6
  22. package/dist/{chunk-VAGGGB6B.js → chunk-MDSSIOBC.js} +58 -1
  23. package/dist/{chunk-LZXDYSUH.js → chunk-PYZSCFMJ.js} +4 -0
  24. package/dist/{chunk-XZCTCSDG.js → chunk-QG6XVOOO.js} +153 -4
  25. package/dist/{chunk-2GVGZ7AN.js → chunk-TW4RABVS.js} +1 -1
  26. package/dist/{chunk-RYUM6X2K.js → chunk-UEVZ3TST.js} +29 -2
  27. package/dist/{chunk-HICAGUT5.js → chunk-VFHLMNYV.js} +1 -1
  28. package/dist/{chunk-RSZAYW3T.js → chunk-W6DBNBMT.js} +2 -2
  29. package/dist/{client-gJEheT2C.d.ts → client-B__hMWtK.d.ts} +104 -7
  30. package/dist/{dashboards-DZaB94sz.d.ts → dashboards-DXpjHnq-.d.ts} +3 -3
  31. package/dist/{deployments-QVGxC-fT.d.ts → deployments-CT2kQloT.d.ts} +199 -3
  32. package/dist/{identity-integration-BAJdzbdl.d.ts → identity-integration-ClX4oUAu.d.ts} +4 -4
  33. package/dist/index.d.ts +10 -10
  34. package/dist/index.js +7 -7
  35. package/dist/internal.d.ts +44 -26
  36. package/dist/internal.js +26 -50
  37. package/dist/{limits-UawUbr0S.d.ts → limits-B7wbnWhd.d.ts} +1 -1
  38. package/dist/{offers-0hqbnogq.d.ts → offers-D4pyeY9b.d.ts} +2 -2
  39. package/dist/portal-proxy.d.ts +2 -2
  40. package/dist/portal-proxy.js +10 -10
  41. package/dist/react/index.d.ts +31 -12
  42. package/dist/react/index.js +115 -41
  43. package/dist/{reward-deliveries-ARvt1UXb.d.ts → reward-deliveries-HGpj1VFz.d.ts} +1 -1
  44. package/dist/runtime/authoring.js +1 -1
  45. package/dist/runtime/chunks/A7G5P76B.js +1 -0
  46. package/dist/runtime/manifest.json +3 -3
  47. package/dist/runtime/schema.js +1 -1
  48. package/dist/schema.d.ts +40 -16
  49. package/dist/schema.js +7 -7
  50. package/dist/server/index.d.ts +12 -12
  51. package/dist/server/index.js +956 -576
  52. package/dist/{sign-in-providers-DCiufSGG.d.ts → sign-in-providers-lbOXCF8N.d.ts} +2 -2
  53. package/dist/solana.d.ts +12 -12
  54. package/dist/solana.js +8 -8
  55. package/dist/{telegram-browser-yx9WuNLX.d.ts → station-check-in-qBiaftfE.d.ts} +89 -7
  56. package/dist/{submission-input-C0DLv5Dj.d.ts → submission-input-U4aIkJuT.d.ts} +2 -2
  57. package/dist/telegram.d.ts +7 -7
  58. package/dist/testing.d.ts +15 -11
  59. package/dist/testing.js +23 -12
  60. package/dist/{tracker-data-CUopgomU.d.ts → tracker-data-2BYXZjsN.d.ts} +3 -3
  61. package/dist/{transport-e0uY1R7z.d.ts → transport-DcRXDZ1j.d.ts} +1838 -19
  62. package/dist/{wallet-CJTULM0Q.d.ts → wallet-BqswMAqZ.d.ts} +2 -2
  63. package/dist/{wallet-browser-DScvrvIj.d.ts → wallet-browser-B5r7u3xB.d.ts} +1 -1
  64. package/package.json +1 -1
  65. package/dist/runtime/chunks/447P2VLY.js +0 -1
package/dist/index.d.ts CHANGED
@@ -1,18 +1,18 @@
1
- export { B as Badge, a as BadgeCatalog, M as ManagedBadge, b as MemberBadge, c as MemberBadges, O as Offer, d as OfferDefinition, e as OfferPrice, R as RedeemOfferInput, f as Redemption } from './offers-0hqbnogq.js';
1
+ export { B as Badge, a as BadgeCatalog, M as ManagedBadge, b as MemberBadge, c as MemberBadges, O as Offer, d as OfferDefinition, e as OfferPrice, R as RedeemOfferInput, f as Redemption } from './offers-D4pyeY9b.js';
2
2
  export { R as RelayAction, c as createRelayAction } from './action-BDFKqGlH.js';
3
- export { A as AuthStartInput, C as ClaimSubmission, E as EmailVerification, 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, l as RelayResponseOptions, S as SubmissionCallOptions, m as SubmissionDraft, n as SubmissionStatus, o as SubmissionStore, V as ValueSubmission, p as createRelayClient, q as isRelayError } from './client-gJEheT2C.js';
3
+ export { A as AuthStartInput, C as ClaimSubmission, E as EmailVerification, 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, l as RelayResponseOptions, S as SubmissionCallOptions, m as SubmissionDraft, n as SubmissionStatus, o as SubmissionStore, V as ValueSubmission, p as createRelayClient, q as isRelayError } from './client-B__hMWtK.js';
4
4
  export { R as RequestError, a as RequestErrorDetails, b as RequestErrorKind, c as RequestRecovery, i as isRequestError } from './request-error-C24SY7n9.js';
5
- export { A as AccountConnection, a as Attempt, b as AttemptStatus, c as AuthProvider, d as AvailabilityWindow, C as CampaignDefinition, e as CampaignEnrollment, f as CampaignEnrollmentInput, g as CampaignView, h as CampaignWithdrawalInput, E as Entitlement, i as EvaluatorProgress, K as KnownAttemptStatus, j as KnownPointEntryKind, k as KnownSignInAccountStatus, l as KnownSignInProvider, L as LeaderboardDefinition, m as LeaderboardHistoryPage, n as LeaderboardHistoryQuery, o as LeaderboardPage, p as LeaderboardPlacement, q as LeaderboardQuery, M as MemberCampaignEnrollmentInput, r as MemberCampaignWithdrawalInput, s as MemberProgress, P as PointBalance, t as PointBalances, u as PointEntry, v as PointEntryKind, w as PointHistoryPage, x as PointHistoryQuery, y as PointLedgerReference, z as ProjectGroup, B as ProjectGroupReference, Q as QuestBudgetView, D as QuestPresentation, F as QuestProfile, G as QuizEvidence, R as ReferralDefinition, H as Reward, S as SignInAccount, I as SignInAccountStatus, J as SignInProvider, N as SignInProviderOption, O as SubmissionEvidence, T as SubmitInput, U as TieredRewardReference } from './accounts-B49TGZLk.js';
5
+ export { A as AccountConnection, a as Attempt, b as AttemptStatus, c as AuthProvider, d as AvailabilityWindow, C as CampaignDefinition, e as CampaignEnrollment, f as CampaignEnrollmentInput, g as CampaignView, h as CampaignWithdrawalInput, E as Entitlement, i as EvaluatorProgress, K as KnownAttemptStatus, j as KnownPointEntryKind, k as KnownSignInAccountStatus, l as KnownSignInProvider, L as LeaderboardDefinition, m as LeaderboardHistoryPage, n as LeaderboardHistoryQuery, o as LeaderboardPage, p as LeaderboardPlacement, q as LeaderboardQuery, M as MemberCampaignEnrollmentInput, r as MemberCampaignWithdrawalInput, s as MemberProgress, P as PointBalance, t as PointBalances, u as PointEntry, v as PointEntryKind, w as PointHistoryPage, x as PointHistoryQuery, y as PointLedgerReference, z as ProjectGroup, B as ProjectGroupReference, Q as QuestBudgetView, D as QuestPresentation, F as QuestProfile, G as QuizEvidence, R as ReferralDefinition, H as Reward, S as SignInAccount, I as SignInAccountStatus, J as SignInProvider, N as SignInProviderOption, O as StationCheckIn, T as SubmissionEvidence, U as SubmitInput, V as TieredRewardReference } from './accounts-COLmXRbW.js';
6
6
  export { f as formatUnits, p as parseUnits } from './units-CwgsPB_r.js';
7
- export { C as ConsentChannel, a as ConsentInput, b as ConsentSource, c as ConsentState, d as CreatorAccount, e as CreatorAccountProvider, f as CreatorAccounts, K as KnownConsentChannel, g as KnownConsentSource, h as KnownConsentState, M as MemberConsent, P as Page, i as PageQuery, Q as QuestClaimInput, j as QuestEnrollment, k as QuestEnrollmentInput, l as QuestOutcome, m as QuestOutcomePage, n as QuestOutcomeQuery, o as QuestOutcomeState, R as ResponseResult, U as UnsupportedResponse, p as paginate } from './reward-deliveries-ARvt1UXb.js';
8
- export { M as MissingPrerequisite, P as Prerequisite, T as TelegramAccountConnection, a as TelegramSignInMethods, b as TextEvidence, c as TextOptions, U as UrlEvidence, d as UrlOptions, V as ValueEvidence } from './submission-input-C0DLv5Dj.js';
7
+ export { C as ConsentChannel, a as ConsentInput, b as ConsentSource, c as ConsentState, d as CreatorAccount, e as CreatorAccountProvider, f as CreatorAccounts, K as KnownConsentChannel, g as KnownConsentSource, h as KnownConsentState, M as MemberConsent, P as Page, i as PageQuery, Q as QuestClaimInput, j as QuestEnrollment, k as QuestEnrollmentInput, l as QuestOutcome, m as QuestOutcomePage, n as QuestOutcomeQuery, o as QuestOutcomeState, R as ResponseResult, U as UnsupportedResponse, p as paginate } from './reward-deliveries-HGpj1VFz.js';
8
+ export { M as MissingPrerequisite, P as Prerequisite, T as TelegramAccountConnection, a as TelegramSignInMethods, b as TextEvidence, c as TextOptions, U as UrlEvidence, d as UrlOptions, V as ValueEvidence } from './submission-input-U4aIkJuT.js';
9
9
  export { E as ExchangeInput, M as MemberSummary, P as ParticipantActivity, a as ParticipantPrincipal, b as ParticipantSession, R as RelayEvent, S as Session, s as sessionMember } from './participant-activity-BznrcePT.js';
10
- export { Q as QuestInteraction, a as QuestRewardView, b as QuestView } from './catalog-CR_2iacf.js';
11
- export { A as AutomaticCatchUpPreview, a as AutomaticEvent, b as AutomaticOutcome, C as CollectionPass, c as CounterAchievement, d as CounterPolicy, e as CounterProgress } from './automatic-outcomes-DeRyox-X.js';
12
- export { K as KnownSkipEnrollment, a as KnownTrackerSkipCode, S as SkipEnrollment, T as TrackerSkipCode } from './tracker-data-CUopgomU.js';
10
+ export { Q as QuestInteraction, a as QuestRewardView, b as QuestView } from './catalog-BR3g-1H9.js';
11
+ export { A as AutomaticCatchUpPreview, a as AutomaticEvent, b as AutomaticOutcome, C as CollectionPass, c as CounterAchievement, d as CounterPolicy, e as CounterProgress } from './automatic-outcomes-5l68PGr1.js';
12
+ export { K as KnownSkipEnrollment, a as KnownTrackerSkipCode, S as SkipEnrollment, T as TrackerSkipCode } from './tracker-data-2BYXZjsN.js';
13
13
  export { A as AvatarProvider, O as OwnProfile, P as ProfileAvatar, a as ProfileCompletion, b as ProfileCompletionPage, c as ProfileCompletionQuery, d as ProfileNameSource, e as ProfileReferral, f as ProfileSummary, g as ProfileUpdate, h as ProfileVisibility } from './profiles-CLDKZVFx.js';
14
14
  export { Q as QuizContent, S as StreakProgress } from './streaks-MAqKHbHC.js';
15
- export { C as CosmosChain, a as CosmosNetwork, L as LinkedWallet, W as WalletAddressInput, b as WalletChain, c as WalletMessageChallenge, d as WalletProofKind, e as WalletSignInNetwork, f as WalletSignature, g as WalletSigner, h as WalletTransactionChallenge, i as WalletTransactionProof, j as WalletUnlinkInput } from './wallet-CJTULM0Q.js';
15
+ export { C as CosmosChain, a as CosmosNetwork, L as LinkedWallet, W as WalletAddressInput, b as WalletChain, c as WalletMessageChallenge, d as WalletProofKind, e as WalletSignInNetwork, f as WalletSignature, g as WalletSigner, h as WalletTransactionChallenge, i as WalletTransactionProof, j as WalletUnlinkInput } from './wallet-BqswMAqZ.js';
16
16
  export { P as ParticipantDelivery } from './participant-rewards-s5Gn23qb.js';
17
17
  import 'zod';
18
- import './sign-in-providers-DCiufSGG.js';
18
+ import './sign-in-providers-lbOXCF8N.js';
package/dist/index.js CHANGED
@@ -5,25 +5,25 @@ import {
5
5
  import {
6
6
  QuestUpdatedError,
7
7
  createRelayClient
8
- } from "./chunk-3DUNFRKJ.js";
8
+ } from "./chunk-BXUF3CRL.js";
9
9
  import {
10
10
  createRelayAction
11
11
  } from "./chunk-5RLIPTL7.js";
12
12
  import "./chunk-LDO5GP7G.js";
13
- import "./chunk-4BBDHTBF.js";
14
- import "./chunk-FHOKCBTJ.js";
13
+ import "./chunk-ASBDB436.js";
14
+ import "./chunk-ETGKC2SB.js";
15
15
  import {
16
16
  QuestOutcomeState
17
- } from "./chunk-SELJYCYY.js";
17
+ } from "./chunk-3KKRXN5E.js";
18
18
  import {
19
19
  sessionMember
20
- } from "./chunk-2GVGZ7AN.js";
21
- import "./chunk-XD6EUA27.js";
20
+ } from "./chunk-TW4RABVS.js";
21
+ import "./chunk-FGZGL5PG.js";
22
22
  import {
23
23
  AttemptStatus,
24
24
  PointEntryKind,
25
25
  paginate
26
- } from "./chunk-4VDRNYUG.js";
26
+ } from "./chunk-74SMLZZ5.js";
27
27
  import {
28
28
  RelayError,
29
29
  RelayErrorCode,
@@ -1,24 +1,50 @@
1
- export { a as ManagementTransportOptions, P as ParticipantRoute, R as REFERRAL_INTEGRATION_REWARD_ERROR, c as containsReferralIntegrationReward, i as isIntegrationParticipantPath, b as isParticipantRoute, m as managementTransport, n as nextScheduleRun, p as parseImageExtraction, d as parseImageResult, e as participantRoutePattern, f as participantRoutes, q as questConfiguration, s as sequenceCursorSchema, g as sourceDataSchema, h as sourceRoles, v as validateQuestShape } from './transport-e0uY1R7z.js';
2
- export { A as AccountVouchedBy, b as IdentityIntegration, c as IdentityIntegrationAccountVouchingInput, d as IdentityIntegrationAppSecret, I as IdentityIntegrationKey, e as IdentityKindClaim, K as KnownIdentityIntegrationEnvironment, P as ParticipantExchangeAccountResult, f as ParticipantExchangeInput, a as ParticipantExchangeResult, g as accountVouchedBySchema, h as appLoginOriginSchema, i as httpsOriginSchema, j as identityIntegrationAccountVouchingInputSchema, k as identityIntegrationAppSecretSchema, l as identityIntegrationInputSchema, m as identityIntegrationKeySchema, n as identityIntegrationSchema, o as identityIntegrationSecretSchema, p as identityKindClaimSchema, q as participantExchangeAccountResultSchema, r as participantExchangeAccountsSchema, s as participantExchangeResultSchema, t as participantExchangeSchema } from './identity-integration-BAJdzbdl.js';
3
- export { E as Extracted } from './limits-UawUbr0S.js';
4
- export { ar as stationRefusal } from './accounts-B49TGZLk.js';
1
+ export { a as ManagementTransportOptions, P as ParticipantRoute, Q as QuestShapeError, R as REFERRAL_INTEGRATION_REWARD_ERROR, c as containsReferralIntegrationReward, i as isIntegrationParticipantPath, b as isParticipantRoute, m as managementTransport, n as nextScheduleRun, p as parseImageExtraction, d as parseImageResult, e as participantRoutePattern, f as participantRoutes, q as questConfiguration, s as sequenceCursorSchema, g as sourceDataSchema, h as sourceRoles, v as validateQuestShape } from './transport-DcRXDZ1j.js';
2
+ export { A as AccountVouchedBy, b as IdentityIntegration, c as IdentityIntegrationAccountVouchingInput, d as IdentityIntegrationAppSecret, I as IdentityIntegrationKey, e as IdentityKindClaim, K as KnownIdentityIntegrationEnvironment, P as ParticipantExchangeAccountResult, f as ParticipantExchangeInput, a as ParticipantExchangeResult, g as accountVouchedBySchema, h as appLoginOriginSchema, i as httpsOriginSchema, j as identityIntegrationAccountVouchingInputSchema, k as identityIntegrationAppSecretSchema, l as identityIntegrationInputSchema, m as identityIntegrationKeySchema, n as identityIntegrationSchema, o as identityIntegrationSecretSchema, p as identityKindClaimSchema, q as participantExchangeAccountResultSchema, r as participantExchangeAccountsSchema, s as participantExchangeResultSchema, t as participantExchangeSchema } from './identity-integration-ClX4oUAu.js';
3
+ export { E as Extracted } from './limits-B7wbnWhd.js';
4
+ export { ew as stationRefusal } from './accounts-COLmXRbW.js';
5
5
  import { StandardWallet, StandardWalletAccount } from './browser.js';
6
6
  import { SolanaSeed } from './authoring.js';
7
7
  import { SolanaNetwork } from './schema.js';
8
- export { au as evmWalletOn } from './wallet-CJTULM0Q.js';
8
+ export { bc as evmWalletOn } from './wallet-BqswMAqZ.js';
9
9
  import { RequestErrorKind } from './index.js';
10
- export { E as TrackerDataBudget, F as schemaCheckedReader, H as sourceContent, J as trackerDataBatchSteps, N as trackerDataIssue, P as trackerDataIssues, U as trackerDataPathTypes, V as trackerDataRecordSteps, Y as whereSchemaIssue, Z as whereSettings } from './tracker-data-CUopgomU.js';
10
+ export { bS as TrackerDataBudget, bT as schemaCheckedReader, E as sourceContent, bU as trackerDataBatchSteps, bV as trackerDataIssue, bW as trackerDataIssues, bX as trackerDataPathTypes, bY as trackerDataRecordSteps, bZ as whereSchemaIssue, F as whereSettings } from './tracker-data-2BYXZjsN.js';
11
11
  export { H as HostEnvironment, h as hostEnvironmentPath, a as hostEnvironmentSchema } from './host-environment-DUw5-Cvj.js';
12
- export { c as compatibleSettingKinds, e as dashboardIssue, i as isBoundSetting, n as normalizeDashboard } from './dashboards-DZaB94sz.js';
12
+ export { c as compatibleSettingKinds, e as dashboardIssue, i as isBoundSetting, n as normalizeDashboard } from './dashboards-DXpjHnq-.js';
13
13
  import 'zod';
14
- import './reward-deliveries-ARvt1UXb.js';
14
+ import './reward-deliveries-HGpj1VFz.js';
15
15
  import './action-BDFKqGlH.js';
16
- import './automatic-outcomes-DeRyox-X.js';
16
+ import './automatic-outcomes-5l68PGr1.js';
17
17
  import './profiles-CLDKZVFx.js';
18
- import './deployments-QVGxC-fT.js';
19
- import './offers-0hqbnogq.js';
20
- import './catalog-CR_2iacf.js';
21
- import './attempt-captures-Dn-oGE1o.js';
18
+ import './deployments-CT2kQloT.js';
19
+ import './offers-D4pyeY9b.js';
20
+ import './catalog-BR3g-1H9.js';
21
+ import './attempt-captures-CVl161qB.js';
22
+
23
+ /**
24
+ * The Solana Pay link a station's QR code encodes: `solana:` and the URL-encoded app URL that
25
+ * serves the quest with `defineStationAction`, with `?station=<key>` added.
26
+ */
27
+ declare function stationPayLink(url: string | URL, station: string): string;
28
+ /** A check-in at a code station, as its printed QR code's link carries it. */
29
+ type StationCodeCheckIn = {
30
+ quest: string;
31
+ station: string;
32
+ code: string;
33
+ };
34
+ /**
35
+ * The link a code station's QR code encodes: the app's scan page `url` with the `quest` key,
36
+ * `station` key and `code` added as query parameters, keeping any it already has. Relay draws it
37
+ * (`GET /management/v1/quests/<quest>/stations/<station>/code/qr`), and the scan page reads it
38
+ * back with `parseStationCodeLink`.
39
+ */
40
+ declare function stationCodeLink(url: string | URL, { quest, station, code }: StationCodeCheckIn): string;
41
+ /** The check-in a `stationCodeLink` carries, or null when it lacks the quest, station or code. */
42
+ declare function parseStationCodeLink(link: string | URL): StationCodeCheckIn | null;
43
+ /**
44
+ * An SVG of `link`'s QR code, black modules on white with the four-module quiet zone scanners
45
+ * need, and `label` centred under it.
46
+ */
47
+ declare function stationQrSvg(link: string, label: string): Promise<string>;
22
48
 
23
49
  /** The hosts a developer machine serves over plain HTTP: browser tests, `vite` dev and the local stack. */
24
50
  declare const loopbackHosts: readonly string[];
@@ -51,17 +77,6 @@ declare function walletSignatureValid(input: {
51
77
  signature: string;
52
78
  }): Promise<boolean>;
53
79
 
54
- /**
55
- * The Solana Pay link a station's QR code encodes: `solana:` and the URL-encoded app URL that
56
- * serves the quest with `defineStationAction`, with `?station=<key>` added.
57
- */
58
- declare function stationPayLink(url: string | URL, station: string): string;
59
- /**
60
- * An SVG of `link`'s QR code, black modules on white with the four-module quiet zone scanners
61
- * need, and `label` centred under it.
62
- */
63
- declare function stationQrSvg(link: string, label: string): Promise<string>;
64
-
65
80
  type Window = {
66
81
  from?: number;
67
82
  until?: number;
@@ -229,5 +244,8 @@ type Rules = {
229
244
  */
230
245
  declare function retrying<T>(life: Lifetime, rules: Rules, attempt: () => Promise<T>): Promise<T>;
231
246
 
232
- export { MANAGEMENT_TIMEOUT, anchorIdlAccountBytes, anchorIdlAddress, bareOrigin, base58, canonicalWalletAddress, checkedInteger, confirmedSignature, connectSolanaAccount, idlTooLarge, inWindow, lifetime, littleEndianBytes, loopbackHosts, maxAnchorIdlBytes, parseSolanaSeeds, programMetadataIdlAddress, programMetadataIdlBytes, programMetadataProgram, registeredWallets, retryAfter, retrying, secureOrLoopbackOrigin, solanaAddressBytes, solanaProgramAddress, solanaPublicEndpoints, solanaRpc, solanaSeedBytes, stationPayLink, stationQrSvg, storedIdlJson, walletSignatureValid, zeroCopyAccount };
233
- export type { AttemptFailure, IdlCompression, IdlDecompressors, Lifetime };
247
+ /** Rows as CSV lines ending in `\n`, with none after the last. */
248
+ declare const csvLines: (rows: (string | number | null)[][]) => string;
249
+
250
+ export { MANAGEMENT_TIMEOUT, anchorIdlAccountBytes, anchorIdlAddress, bareOrigin, base58, canonicalWalletAddress, checkedInteger, confirmedSignature, connectSolanaAccount, csvLines, idlTooLarge, inWindow, lifetime, littleEndianBytes, loopbackHosts, maxAnchorIdlBytes, parseSolanaSeeds, parseStationCodeLink, programMetadataIdlAddress, programMetadataIdlBytes, programMetadataProgram, registeredWallets, retryAfter, retrying, secureOrLoopbackOrigin, solanaAddressBytes, solanaProgramAddress, solanaPublicEndpoints, solanaRpc, solanaSeedBytes, stationCodeLink, stationPayLink, stationQrSvg, storedIdlJson, walletSignatureValid, zeroCopyAccount };
251
+ export type { AttemptFailure, IdlCompression, IdlDecompressors, Lifetime, StationCodeCheckIn };
package/dist/internal.js CHANGED
@@ -3,22 +3,24 @@ import {
3
3
  canonicalWalletAddress,
4
4
  confirmedSignature,
5
5
  containsReferralIntegrationReward,
6
+ csvLines,
6
7
  managementTransport,
7
8
  questConfiguration,
8
9
  sequenceCursorSchema,
9
10
  solanaPublicEndpoints,
10
11
  solanaRpc,
11
12
  walletSignatureValid
12
- } from "./chunk-NOQSKRSS.js";
13
+ } from "./chunk-2UELTHW6.js";
13
14
  import {
14
15
  parseImageExtraction,
15
16
  parseImageResult
16
- } from "./chunk-SDWG7CWQ.js";
17
+ } from "./chunk-HN7DE2UN.js";
17
18
  import {
19
+ QuestShapeError,
18
20
  sourceDataSchema,
19
21
  sourceRoles,
20
22
  validateQuestShape
21
- } from "./chunk-RYUM6X2K.js";
23
+ } from "./chunk-UEVZ3TST.js";
22
24
  import {
23
25
  accountVouchedBySchema,
24
26
  appLoginOriginSchema,
@@ -38,36 +40,40 @@ import {
38
40
  participantExchangeResultSchema,
39
41
  participantExchangeSchema,
40
42
  secureOrLoopbackOrigin
41
- } from "./chunk-25WA4XYZ.js";
43
+ } from "./chunk-I7XIBXT2.js";
42
44
  import {
43
45
  isIntegrationParticipantPath,
44
46
  isParticipantRoute,
45
47
  participantRoutePattern,
46
48
  participantRoutes
47
- } from "./chunk-LZXDYSUH.js";
48
- import "./chunk-UKUIE2ND.js";
49
- import "./chunk-HICAGUT5.js";
49
+ } from "./chunk-PYZSCFMJ.js";
50
+ import "./chunk-KIRXE37T.js";
51
+ import "./chunk-VFHLMNYV.js";
50
52
  import {
51
53
  dashboardIssue,
52
54
  normalizeDashboard
53
- } from "./chunk-BJ2W5ZVQ.js";
55
+ } from "./chunk-CVJTIVAP.js";
54
56
  import "./chunk-MWMCQLCG.js";
55
57
  import {
56
58
  connectSolanaAccount,
57
59
  hostEnvironmentPath,
58
60
  hostEnvironmentSchema,
59
- registeredWallets
60
- } from "./chunk-VAGGGB6B.js";
61
- import "./chunk-4BBDHTBF.js";
61
+ parseStationCodeLink,
62
+ registeredWallets,
63
+ stationCodeLink,
64
+ stationPayLink,
65
+ stationQrSvg
66
+ } from "./chunk-MDSSIOBC.js";
67
+ import "./chunk-ASBDB436.js";
62
68
  import {
63
69
  MANAGEMENT_TIMEOUT,
64
70
  lifetime,
65
71
  retryAfter,
66
72
  retrying
67
- } from "./chunk-FHOKCBTJ.js";
68
- import "./chunk-SELJYCYY.js";
69
- import "./chunk-2GVGZ7AN.js";
70
- import "./chunk-XD6EUA27.js";
73
+ } from "./chunk-ETGKC2SB.js";
74
+ import "./chunk-3KKRXN5E.js";
75
+ import "./chunk-TW4RABVS.js";
76
+ import "./chunk-FGZGL5PG.js";
71
77
  import {
72
78
  base58,
73
79
  base58Bytes,
@@ -85,43 +91,9 @@ import {
85
91
  trackerDataRecordSteps,
86
92
  whereSchemaIssue,
87
93
  whereSettings
88
- } from "./chunk-4VDRNYUG.js";
94
+ } from "./chunk-74SMLZZ5.js";
89
95
  import "./chunk-VNEJH4NT.js";
90
96
 
91
- // src/station-qr.ts
92
- function stationPayLink(url, station) {
93
- const target = new URL(url);
94
- target.searchParams.set("station", station);
95
- return `solana:${encodeURIComponent(target.href)}`;
96
- }
97
- var escapeXml = (text) => text.replace(
98
- /[&<>"']/g,
99
- (character) => ({
100
- "&": "&amp;",
101
- "<": "&lt;",
102
- ">": "&gt;",
103
- '"': "&quot;",
104
- "'": "&apos;"
105
- })[character] ?? character
106
- );
107
- async function stationQrSvg(link, label) {
108
- const { encodeQR } = await import("qr");
109
- const modules = encodeQR(link, "raw", { ecc: "medium", border: 4 });
110
- const size = modules.length;
111
- const scale = 10;
112
- const width = size * scale;
113
- const labelHeight = 6 * scale;
114
- const path = modules.flatMap(
115
- (row, y) => row.flatMap((dark, x) => dark ? [`M${x} ${y}h1v1h-1z`] : [])
116
- ).join("");
117
- return `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${width + labelHeight}" viewBox="0 0 ${width} ${width + labelHeight}">
118
- <rect width="100%" height="100%" fill="#fff"/>
119
- <path transform="scale(${scale})" fill="#000" shape-rendering="crispEdges" d="${path}"/>
120
- <text x="${width / 2}" y="${width + labelHeight / 2}" font-family="sans-serif" font-size="${2.4 * scale}" text-anchor="middle" dominant-baseline="middle" fill="#000">${escapeXml(label)}</text>
121
- </svg>
122
- `;
123
- }
124
-
125
97
  // src/solana-idl-accounts.ts
126
98
  import { sha256 } from "@noble/hashes/sha2.js";
127
99
  import { concatBytes } from "@noble/hashes/utils.js";
@@ -303,6 +275,7 @@ function programMetadataIdlBytes(data, program) {
303
275
  }
304
276
  export {
305
277
  MANAGEMENT_TIMEOUT,
278
+ QuestShapeError,
306
279
  REFERRAL_INTEGRATION_REWARD_ERROR,
307
280
  accountVouchedBySchema,
308
281
  anchorIdlAccountBytes,
@@ -316,6 +289,7 @@ export {
316
289
  confirmedSignature,
317
290
  connectSolanaAccount,
318
291
  containsReferralIntegrationReward,
292
+ csvLines,
319
293
  dashboardIssue,
320
294
  evmWalletOn,
321
295
  hostEnvironmentPath,
@@ -343,6 +317,7 @@ export {
343
317
  parseImageExtraction,
344
318
  parseImageResult,
345
319
  parseSolanaSeeds,
320
+ parseStationCodeLink,
346
321
  participantExchangeAccountResultSchema,
347
322
  participantExchangeAccountsSchema,
348
323
  participantExchangeResultSchema,
@@ -367,6 +342,7 @@ export {
367
342
  sourceContent,
368
343
  sourceDataSchema,
369
344
  sourceRoles,
345
+ stationCodeLink,
370
346
  stationPayLink,
371
347
  stationQrSvg,
372
348
  stationRefusal,
@@ -1,5 +1,5 @@
1
1
  import * as z from 'zod';
2
- import { ac as PhotoResult, W as AttemptCodeSource } from './accounts-B49TGZLk.js';
2
+ import { ae as PhotoResult, X as AttemptCodeSource } from './accounts-COLmXRbW.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
@@ -1,6 +1,6 @@
1
1
  import * as z from 'zod';
2
- import { R as ResourceHandle } from './tracker-data-CUopgomU.js';
3
- import { _ as AuthoringIdentity } from './accounts-B49TGZLk.js';
2
+ import { R as ResourceHandle } from './tracker-data-2BYXZjsN.js';
3
+ import { a0 as AuthoringIdentity } from './accounts-COLmXRbW.js';
4
4
 
5
5
  declare const badgePropertiesSchema: z.ZodObject<{
6
6
  name: z.ZodString;
@@ -1,9 +1,9 @@
1
1
  import { ParticipantExchangeAccountResult, ParticipantExchangeResult, IdentityIntegrationKey } from './internal.js';
2
2
  import { MemberImportVouchedAccount } from './server/index.js';
3
3
  import { RequestError } from './index.js';
4
- import './tracker-data-CUopgomU.js';
4
+ import './tracker-data-2BYXZjsN.js';
5
5
  import 'zod';
6
- import './wallet-CJTULM0Q.js';
6
+ import './wallet-BqswMAqZ.js';
7
7
 
8
8
  /**
9
9
  * Server-only proxy: browser cookies stay on the participant origin.
@@ -3,25 +3,25 @@ import {
3
3
  participantExchangeAccountsSchema,
4
4
  participantExchangeResultSchema,
5
5
  secureOrLoopbackOrigin
6
- } from "./chunk-25WA4XYZ.js";
6
+ } from "./chunk-I7XIBXT2.js";
7
7
  import {
8
8
  isParticipantRoute
9
- } from "./chunk-LZXDYSUH.js";
10
- import "./chunk-UKUIE2ND.js";
11
- import "./chunk-HICAGUT5.js";
12
- import "./chunk-BJ2W5ZVQ.js";
9
+ } from "./chunk-PYZSCFMJ.js";
10
+ import "./chunk-KIRXE37T.js";
11
+ import "./chunk-VFHLMNYV.js";
12
+ import "./chunk-CVJTIVAP.js";
13
13
  import "./chunk-MWMCQLCG.js";
14
14
  import {
15
15
  clientIdentity,
16
16
  retryAfter
17
- } from "./chunk-FHOKCBTJ.js";
18
- import "./chunk-SELJYCYY.js";
17
+ } from "./chunk-ETGKC2SB.js";
18
+ import "./chunk-3KKRXN5E.js";
19
19
  import {
20
20
  participantPrincipalSchema,
21
21
  sessionMember
22
- } from "./chunk-2GVGZ7AN.js";
23
- import "./chunk-XD6EUA27.js";
24
- import "./chunk-4VDRNYUG.js";
22
+ } from "./chunk-TW4RABVS.js";
23
+ import "./chunk-FGZGL5PG.js";
24
+ import "./chunk-74SMLZZ5.js";
25
25
  import {
26
26
  RequestError,
27
27
  isRequestError
@@ -1,32 +1,32 @@
1
1
  import { Badge, MemberBadges, Offer, Redemption } from '../index.js';
2
2
  import { ParticipantSession, RelayEvent, ParticipantActivity, MemberSummary } from '../index.js';
3
- import { R as RelayClient } from '../client-gJEheT2C.js';
3
+ import { R as RelayClient } from '../client-B__hMWtK.js';
4
4
  import { RelayError, SubmissionDraft } from '../index.js';
5
- import { P as Page, e as CreatorAccountProvider, K as KnownConsentChannel, M as MemberConsent } from '../reward-deliveries-ARvt1UXb.js';
5
+ import { P as Page, e as CreatorAccountProvider, K as KnownConsentChannel, M as MemberConsent } from '../reward-deliveries-HGpj1VFz.js';
6
6
  import { QuestOutcomeQuery, QuestOutcome } from '../index.js';
7
7
  import { RewardDeliveryAction } from '../schema.js';
8
- export { C as ConsentChannel, b as ConsentSource, c as ConsentState, d as CreatorAccount, f as CreatorAccounts, g as KnownConsentSource, h as KnownConsentState } from '../reward-deliveries-ARvt1UXb.js';
8
+ export { C as ConsentChannel, b as ConsentSource, c as ConsentState, d as CreatorAccount, f as CreatorAccounts, g as KnownConsentSource, h as KnownConsentState } from '../reward-deliveries-HGpj1VFz.js';
9
9
  import * as react from 'react';
10
10
  import { ReactNode } from 'react';
11
11
  import * as z from 'zod';
12
12
  import { z as z$1 } from 'zod';
13
13
  import { QuestView } from '../index.js';
14
14
  import { collectionViewSchema } from '../schema.js';
15
- import { J as SignInProvider } from '../accounts-B49TGZLk.js';
15
+ import { J as SignInProvider } from '../accounts-COLmXRbW.js';
16
16
  import { Entitlement, AttemptStatus, AuthProvider, AccountConnection, SignInAccountStatus, LeaderboardPlacement, LeaderboardPage, PointEntry, PointBalances, PointLedgerReference, TieredRewardReference } from '../index.js';
17
17
  import { AttemptCodeSource, referralSummarySchema } from '../schema.js';
18
- export { S as SignInAccount, N as SignInProviderOption } from '../accounts-B49TGZLk.js';
19
- import { b as SignInMethods, c as SignInOption, P as ProviderSignInOption, e as SignInUnavailable, T as TelegramSignInOption } from '../telegram-browser-yx9WuNLX.js';
20
- export { E as EmailSignInOption, O as OAuthSignInOption, a as SignInIcon, W as WalletSignInOption, t as telegramMiniAppInitData } from '../telegram-browser-yx9WuNLX.js';
18
+ export { S as SignInAccount, N as SignInProviderOption } from '../accounts-COLmXRbW.js';
19
+ import { b as SignInMethods, c as SignInOption, P as ProviderSignInOption, e as SignInUnavailable, T as TelegramSignInOption, f as StationCheckInOptions, h as StationCheckInState } from '../station-check-in-qBiaftfE.js';
20
+ export { E as EmailSignInOption, K as KnownStationCheckInRefusal, O as OAuthSignInOption, a as SignInIcon, g as StationCheckInRefusal, i as StationCheckInStation, W as WalletSignInOption, t as telegramMiniAppInitData } from '../station-check-in-qBiaftfE.js';
21
21
  import { WalletSigner, WalletSignInNetwork, LinkedWallet, WalletProofKind } from '../index.js';
22
- import { C as CosmosChains, S as SignInWallet, D as DiscoveredWallet } from '../wallet-browser-DScvrvIj.js';
23
- export { T as TelegramAccountConnection, a as TelegramSignInMethods } from '../submission-input-C0DLv5Dj.js';
22
+ import { C as CosmosChains, S as SignInWallet, D as DiscoveredWallet } from '../wallet-browser-B5r7u3xB.js';
23
+ export { T as TelegramAccountConnection, a as TelegramSignInMethods } from '../submission-input-U4aIkJuT.js';
24
24
  import { ProfileReferral } from '../authoring.js';
25
25
  import { ProfileUpdate, ProfileSummary, ProfileCompletion } from '../index.js';
26
- import '../tracker-data-CUopgomU.js';
26
+ import '../tracker-data-2BYXZjsN.js';
27
27
  import '../request-error-C24SY7n9.js';
28
28
  import '../action-BDFKqGlH.js';
29
- import '../sign-in-providers-DCiufSGG.js';
29
+ import '../sign-in-providers-lbOXCF8N.js';
30
30
 
31
31
  /**
32
32
  * A query's identity: plain JSON values, outermost group first, such as
@@ -1191,6 +1191,7 @@ declare function useQuest(observed: QuestView): {
1191
1191
  wallet: string;
1192
1192
  reference: string | null;
1193
1193
  } | null | undefined;
1194
+ station?: string | undefined;
1194
1195
  } | null;
1195
1196
  release: string;
1196
1197
  interaction: "url" | "text" | "staff" | "claim" | "automatic" | "quiz" | "photo";
@@ -1644,6 +1645,7 @@ declare function useQuestAction(observed: QuestView): {
1644
1645
  wallet: string;
1645
1646
  reference: string | null;
1646
1647
  } | null | undefined;
1648
+ station?: string | undefined;
1647
1649
  } | null;
1648
1650
  release: string;
1649
1651
  interaction: "url" | "text" | "staff" | "claim" | "automatic" | "quiz" | "photo";
@@ -2735,6 +2737,23 @@ declare function usePointHistory(ledger: string): MemberPagedQuery<PointEntry>;
2735
2737
  */
2736
2738
  declare function useQuestOutcomes(query?: Omit<QuestOutcomeQuery, "cursor">): MemberPagedQuery<QuestOutcome>;
2737
2739
 
2740
+ /**
2741
+ * A code station's scan page: reads the check-in from the station's link (the address its printed
2742
+ * QR code opens, with `quest`, `station` and `code` query parameters), takes the code out of the
2743
+ * address bar with `history.replaceState`, and checks the signed-in member in with
2744
+ * `quests.checkIn()` as soon as someone is signed in. Until then it reports `sign-in-required`
2745
+ * and keeps the check-in in the tab's session storage, so it survives a sign-in that leaves the
2746
+ * page and goes ahead wherever the hook renders next in the tab. `retry()` sends a `failed`
2747
+ * check-in, or one refused with `rate-limited` or `attempt-pending`, again with the same action
2748
+ * ID. Pass the quest's `stations` to name the station by its label. Once checked in, the quest
2749
+ * experience is read again.
2750
+ *
2751
+ * @experimental A minor release can change check-in stations.
2752
+ */
2753
+ declare function useStationCheckIn(options?: StationCheckInOptions): StationCheckInState & {
2754
+ retry: () => Promise<void>;
2755
+ };
2756
+
2738
2757
  /** Offers with stock and availability for the current participant, or public availability. */
2739
2758
  declare function useOffers(): Query<Offer[]>;
2740
2759
  /**
@@ -2768,5 +2787,5 @@ declare function usePointLedgers(): Query<PointLedgerReference[]>;
2768
2787
  */
2769
2788
  declare function useTieredRewards(): Query<TieredRewardReference[]>;
2770
2789
 
2771
- export { CosmosChains, CreatorAccountProvider, DiscoveredWallet, KnownConsentChannel, MemberConsent, Page, ProviderSignInOption, RelayClient, RelayProvider, SignInMethods, SignInOption, SignInProvider, SignInUnavailable, SignInWallet, TelegramSignInOption, canRepeat, canSubmit, captureReferralCode, completionCountText, isAutomatic, isConnected, isCoolingDown, isFinished, progressOf, questActionState, questGroups, questStatus, questStatusText, relayKeys, roleDeliveryLabel, roleDeliveryStatus, useAccount, useAccounts, useActivity, useBadgeCatalog, useBadges, useBalances, useConsent, useCreatorAccounts, useDeliveries, useEntitlements, useExperience, useInvalidate, useInvitation, useLeaderboard, useLeaderboardHistory, useLeaderboardPlacement, useMe, useMemberPages, useMemberQuery, useMyProfile, useOffers, usePointHistory, usePointLedgers, useProfile, useProfileBadges, useProfileCompletions, useProfileReferral, useQuest, useQuestAction, useQuestOutcomes, useRedeemOffer, useReferralSummary, useRelay, useRelayAction, useRelayMutation, useRelayPages, useRelayQuery, useSession, useSetQueryData, useSignIn, useSignInMethods, useSignInOptions, useSignInWallets, useSignOut, useTelegramAccount, useTieredRewards, useWalletDiscovery, useWallets };
2790
+ export { CosmosChains, CreatorAccountProvider, DiscoveredWallet, KnownConsentChannel, MemberConsent, Page, ProviderSignInOption, RelayClient, RelayProvider, SignInMethods, SignInOption, SignInProvider, SignInUnavailable, SignInWallet, StationCheckInOptions, StationCheckInState, TelegramSignInOption, canRepeat, canSubmit, captureReferralCode, completionCountText, isAutomatic, isConnected, isCoolingDown, isFinished, progressOf, questActionState, questGroups, questStatus, questStatusText, relayKeys, roleDeliveryLabel, roleDeliveryStatus, useAccount, useAccounts, useActivity, useBadgeCatalog, useBadges, useBalances, useConsent, useCreatorAccounts, useDeliveries, useEntitlements, useExperience, useInvalidate, useInvitation, useLeaderboard, useLeaderboardHistory, useLeaderboardPlacement, useMe, useMemberPages, useMemberQuery, useMyProfile, useOffers, usePointHistory, usePointLedgers, useProfile, useProfileBadges, useProfileCompletions, useProfileReferral, useQuest, useQuestAction, useQuestOutcomes, useRedeemOffer, useReferralSummary, useRelay, useRelayAction, useRelayMutation, useRelayPages, useRelayQuery, useSession, useSetQueryData, useSignIn, useSignInMethods, useSignInOptions, useSignInWallets, useSignOut, useStationCheckIn, useTelegramAccount, useTieredRewards, useWalletDiscovery, useWallets };
2772
2791
  export type { Collection, ExperienceData, Invitation, KnownQuestStatusCode, KnownRoleDeliveryStatus, MemberPagedQuery, MemberQuery, MemberQueryOptions, MemberSnapshot, Mutation, MutationContext, MutationOptions, MutationStatus, OAuthProvider, PageLoader, PageRead, PagedQuery, Query, QueryContext, QueryKey, QueryOptions, QueryRead, QuerySnapshot, QuestActionState, QuestInput, QuestNotice, QuestStatus, QuestStatusCode, QuestStatusText, QuestTone, ReferralSummary, RelayActionResult, RelayPolling, RelayQueryOptions, RoleDelivery, RoleDeliveryStatus, SavedSubmission };