@domino-sdk/relay 1.63.0 → 1.65.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 (69) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/{accounts-nz3mzfRQ.d.ts → accounts-_lNsiR2k.d.ts} +22 -2
  3. package/dist/{attempt-captures-DMi8oR9T.d.ts → attempt-captures-BqPggxTU.d.ts} +1 -1
  4. package/dist/authoring.d.ts +11 -11
  5. package/dist/authoring.js +15 -20
  6. package/dist/{automatic-outcomes-C_LLQU1p.d.ts → automatic-outcomes-BzAvfcpd.d.ts} +2 -2
  7. package/dist/browser.d.ts +9 -9
  8. package/dist/browser.js +11 -14
  9. package/dist/{catalog-BaTOKpNw.d.ts → catalog-ByZMRS7I.d.ts} +1 -1
  10. package/dist/{chunk-VWQGWGCH.js → chunk-4NIV4NPV.js} +1 -1
  11. package/dist/{chunk-ICXZZNPS.js → chunk-7H4MRVQF.js} +1 -1
  12. package/dist/{chunk-NQDEWJWE.js → chunk-CVQZ2YP7.js} +6 -232
  13. package/dist/{chunk-3RFP6GT5.js → chunk-DLABJSBO.js} +2 -2
  14. package/dist/{chunk-AQOL3SK5.js → chunk-E22XSC4L.js} +1 -1
  15. package/dist/{chunk-N4LNEGQX.js → chunk-EDNKKVGU.js} +2 -2
  16. package/dist/{chunk-GLH6MEI2.js → chunk-EOUEAOWJ.js} +28 -2
  17. package/dist/{chunk-MTKRIQEU.js → chunk-EUEW2APU.js} +1 -1
  18. package/dist/{chunk-ID3BZXFZ.js → chunk-HNR6G3GV.js} +1939 -1211
  19. package/dist/{chunk-5XLZ34PV.js → chunk-KCUUHT2V.js} +3 -3
  20. package/dist/{chunk-EHUSD3O2.js → chunk-MPTE7EIV.js} +2 -4
  21. package/dist/{chunk-QR6HH4DI.js → chunk-NG4GZ54I.js} +4 -4
  22. package/dist/chunk-R2KZFX6E.js +405 -0
  23. package/dist/{chunk-4GQW43UU.js → chunk-RD3XJ4DH.js} +26 -30
  24. package/dist/{chunk-7Z4SZ6YM.js → chunk-SE7XHQFP.js} +1 -1
  25. package/dist/{chunk-LZWXCBUB.js → chunk-VBYOAT46.js} +41 -45
  26. package/dist/{chunk-7X67QLPB.js → chunk-XVZ4YOF2.js} +1 -1
  27. package/dist/{chunk-FU5CGNTR.js → chunk-ZQ3IPCI6.js} +44 -5
  28. package/dist/chunk-ZXGBDLVB.js +1510 -0
  29. package/dist/{client-DHmG7rn6.d.ts → client-D7IiwEq2.d.ts} +12 -7
  30. package/dist/{dashboards-CLemT6kj.d.ts → dashboards-pVfclkyh.d.ts} +2 -2
  31. package/dist/{deployments-DTULi7dF.d.ts → deployments-Cr1tfqrr.d.ts} +2 -2
  32. package/dist/{identity-integration-DOeNZaxF.d.ts → identity-integration-Ci2vGKtX.d.ts} +37 -2
  33. package/dist/index.d.ts +10 -10
  34. package/dist/index.js +11 -15
  35. package/dist/internal.d.ts +12 -12
  36. package/dist/internal.js +21 -16
  37. package/dist/{limits-kNzYdZ00.d.ts → limits-pE04y9O2.d.ts} +8 -1
  38. package/dist/{offers-CYeN_I0Y.d.ts → offers-Hw2P6tcK.d.ts} +2 -2
  39. package/dist/{participant-activity-D-Drp24G.d.ts → participant-activity-DXRq4s6K.d.ts} +1 -0
  40. package/dist/portal-proxy.d.ts +4 -2
  41. package/dist/portal-proxy.js +13 -5
  42. package/dist/react/index.d.ts +20 -13
  43. package/dist/react/index.js +11 -14
  44. package/dist/{reward-deliveries-drp-x1G-.d.ts → reward-deliveries-BCV8hznc.d.ts} +1 -1
  45. package/dist/runtime/authoring.js +1 -1
  46. package/dist/runtime/chunks/6EBN6IZU.js +1 -0
  47. package/dist/runtime/manifest.json +3 -3
  48. package/dist/runtime/schema.js +1 -1
  49. package/dist/schema.d.ts +19 -16
  50. package/dist/schema.js +109 -112
  51. package/dist/server/index.d.ts +11 -11
  52. package/dist/server/index.js +775 -1037
  53. package/dist/{sign-in-providers-B1Q9eDRm.d.ts → sign-in-providers-BAkGjSXo.d.ts} +2 -2
  54. package/dist/{submission-input-DZCbjQUH.d.ts → submission-input-ChL1aYNH.d.ts} +2 -2
  55. package/dist/{telegram-browser-NL0Asmsi.d.ts → telegram-browser-K27t4TwM.d.ts} +4 -4
  56. package/dist/telegram.d.ts +8 -8
  57. package/dist/telegram.js +2 -2
  58. package/dist/testing.d.ts +10 -10
  59. package/dist/testing.js +19 -23
  60. package/dist/{tracker-data-esm3WG8R.d.ts → tracker-data-Bl-qPIvZ.d.ts} +3 -1
  61. package/dist/{transport-Czht_irp.d.ts → transport-DC1m73Tp.d.ts} +1065 -14
  62. package/package.json +1 -1
  63. package/dist/chunk-4NOFSGAL.js +0 -320
  64. package/dist/chunk-FO2LCZTL.js +0 -19
  65. package/dist/chunk-KP2MCX3R.js +0 -587
  66. package/dist/chunk-N4BDKS6Y.js +0 -87
  67. package/dist/chunk-TLSQETTY.js +0 -41
  68. package/dist/chunk-W7YSMSGC.js +0 -725
  69. package/dist/runtime/chunks/UGDV5W4N.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @domino-sdk/relay
2
2
 
3
+ ## 1.65.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 9a37fe5: Clear test data in hosted app storage. `domino storage clear sql DB --table tickets` (or `--all-tables --keep settings`) empties SQL tables and keeps their schema and `d1_migrations`; `domino storage clear kv PHOTOS --prefix photo:` (or `--all-keys`) deletes KV keys. `--dry-run` counts first, and without `--yes` the command asks in a terminal and refuses unattended. The management API has the same operation as `POST /management/v1/storage/{kind}/{name}/clear`, and `createManagementClient` as `storage.clear(kind, name, input)`. It works only in the test environment: live refuses with `test-environment-required`. It needs `publish`, and each clear is audited. A KV clear deletes at most `limits.apps.storageClearKeys` (10,000) keys a call and answers `complete: false` while keys remain; the CLI repeats until none do. Test member reset, purge and erase still leave app storage alone.
8
+
9
+ ## 1.64.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 0a4d580: Domino now deletes the evidence members submit (photos, text, links and quiz answers) 90 days after the attempt is decided, in test and live, unless you change it. Nothing was deleted when this shipped: evidence that already existed is first deleted 90 days after the change reached Domino, on 18 January 2027 for projects that existed on 20 October 2026, and 90 days after creation for newer projects. Attempts waiting for a decision keep their evidence. Each project's date shows in Console's project settings and in `noticeEndsAt`.
14
+
15
+ To keep evidence longer, or until you delete it, change the period in Console's project settings, with `management.attempts.setEvidenceRetention({ evidenceRetention: { days } })` (1 to 3650 days) or `{ evidenceRetention: "keep" }`, or with `domino attempts set-evidence-retention --days N` or `--keep`. Changing it needs `publish`; shortening it, or switching from keep to days, also needs an organization admin or a service key. `management.attempts.evidenceRetention()` and `domino attempts evidence-retention` read it. Both methods are experimental. Each change is recorded in the project's access history, and each deletion pass as an `evidence-redacted-before` event with no actor and no quest. To delete sooner, or per quest, keep using `attempts.redactEvidenceBefore`.
16
+
17
+ - 59cf5db: `management.identityIntegrations.createIntoAppSecret(input, name)` and `addSecretIntoAppSecret(id, name)` create an app login key, or add a secret to one, and store the new secret as the hosted app secret `name` in the key's environment instead of returning it. The response has `appSecret` and no `token`. They need publish permission, and like every app login key change they work only from an organization administrator's Console session. When the app secret is refused, no key or secret is created. The CLI skill reference and capabilities describe Console's matching "Also save it as an app secret" option.
18
+ - 0b1f8de: Operators can ban a member, and optionally take back what they earned. While banned, a member's attempts, completions and invitation acceptances are refused with 403 `member-banned`, their invitation code answers `invitation-not-found`, attempts waiting for a decision are rejected, tracker records that would count for them are skipped with `member-banned`, leaderboards and settlements leave them out, and referral payouts to and from them stop. `relay.me.get()` now answers `eligible`, false while the member is banned (true from older Relay versions).
19
+
20
+ `management.members.ban(member, { reason, rollback })` bans, where `rollback` can revoke all their completions, reverse the referral payouts they received, and reverse manual awards, imported opening balances and engagement payouts, a step at a time in the background. `management.members.previewBan(member, { rollback })` previews it per point ledger, and `management.members.unban(member, { reason, restoreCompletions })` lifts it. Banning and unbanning need `review` permission; reversing referral payouts or point awards also needs `publish`. `members.get` answers the member's latest ban as `ban`, and member lists answer `bannedAt`. The CLI adds `domino members ban` (with `--rollback` and `--dry-run`) and `domino members unban`. Member bans are experimental. Member imports refuse rows naming a banned member with `member-banned`.
21
+
22
+ ### Patch Changes
23
+
24
+ - 166254b: App login now works on a private staging address. `createParticipantBackend` no longer sends `X-Relay-App-Origin` with its proxied calls, and Relay selects a request that carries an app login key by the key even when it also names an app origin, so a Test key registered for `https://<slug>--staging.domino.page` signs members in there without a workaround. Apps on SDK 1.63.0 work without upgrading. The `staging-access-required` error reference says a request with an app login key needs no staging pass.
25
+ - ff6c976: The editor help for `useSession` and `createParticipantBackend` now says what an app with its own login does when it signs members in or out without a page load: call `useSession().refresh()` after its own sign-in route succeeds and again after its logout route, and sign out through the app rather than `useSignOut()`.
26
+ - 7bd9a79: A refused ID now says what it may hold: an `actionId`, reference or other ID with a `:`, `.` or space is refused with "use 1–100 letters, digits, _ or - (no :, . or spaces)" instead of a regular expression. A management call refused before sending puts each failing field and its reason on one line, such as `Invalid management request: actionId: use 1–100 letters, digits, _ or - (no :, . or spaces)`; `kind`, `code` (`invalid-input`) and `cause` are unchanged. Relay's own refusal of an invalid request body names the failing fields too, such as `Invalid request: actionId`, with the same status and `code`.
27
+
3
28
  ## 1.63.0
4
29
 
5
30
  ### Minor Changes
@@ -1,5 +1,5 @@
1
1
  import * as z from 'zod';
2
- import { R as ResourceHandle, G as GroupHandle } from './tracker-data-esm3WG8R.js';
2
+ import { R as ResourceHandle, G as GroupHandle } from './tracker-data-Bl-qPIvZ.js';
3
3
  import { S as SolanaIdlSource } from './wallet-B7e06v4m.js';
4
4
 
5
5
  /**
@@ -8020,6 +8020,26 @@ declare const evidenceRetentionInputSchema: z.ZodObject<{
8020
8020
  decidedBefore: z.ZodNumber;
8021
8021
  reason: z.ZodString;
8022
8022
  }, z.core.$strict>;
8023
+ /**
8024
+ * How long a project keeps the evidence of decided attempts: `{ days }`, 1 to 3650 days after the
8025
+ * decision, or `"keep"` for no automatic deletion.
8026
+ *
8027
+ * @experimental A minor release can change this shape.
8028
+ */
8029
+ declare const evidenceRetentionPeriodSchema: z.ZodUnion<readonly [z.ZodObject<{
8030
+ days: z.ZodNumber;
8031
+ }, z.core.$strict>, z.ZodLiteral<"keep">]>;
8032
+ /**
8033
+ * Changes the project's evidence retention period (`attempts.setEvidenceRetention`).
8034
+ *
8035
+ * @experimental A minor release can change this shape.
8036
+ */
8037
+ declare const evidenceRetentionSettingInputSchema: z.ZodObject<{
8038
+ actionId: z.ZodString;
8039
+ evidenceRetention: z.ZodUnion<readonly [z.ZodObject<{
8040
+ days: z.ZodNumber;
8041
+ }, z.core.$strict>, z.ZodLiteral<"keep">]>;
8042
+ }, z.core.$strict>;
8023
8043
  declare const stockSchema: z.ZodObject<{
8024
8044
  item: z.ZodString;
8025
8045
  quantity: z.ZodNumber;
@@ -8433,4 +8453,4 @@ interface DiscordReader {
8433
8453
  }): Promise<DiscordMessage | null>;
8434
8454
  }
8435
8455
 
8436
- export { leaderboardDefinitionSchema as $, type AccountConnection as A, type ProjectGroupReference as B, type CampaignDefinition as C, type QuestPresentation as D, type Entitlement as E, type QuestProfile as F, type QuizEvidence as G, type Reward as H, SignInAccountStatus as I, SignInProvider as J, type KnownAttemptStatus as K, type LeaderboardDefinition as L, type MemberCampaignEnrollmentInput as M, type SignInProviderOption as N, type SubmissionEvidence as O, type PointBalance as P, type QuestBudgetView as Q, type ReferralDefinition as R, type SignInAccount as S, type SubmitInput as T, type TieredRewardReference as U, AttemptCodeSource as V, type IntegrationModuleProvider as W, type RewardType as X, questDescriptionSchema as Y, type AuthoringIdentity as Z, type EngagementBudget as _, type Attempt as a, type QuestSettingsInput as a$, pointLedgerDeclarationSchema as a0, referralAuthoringSchema as a1, discordMessagesSourceSchema as a2, type DiscordMessageData as a3, type DiscordMessageTextData as a4, discordReactionsSourceSchema as a5, type DiscordReactionData as a6, type KnownIntegrationModule as a7, type TextReviewInput as a8, type TextResult as a9, type GroupMemberPage as aA, type GroupPage as aB, type GroupPageQuery as aC, type IntegrationProvider as aD, type KnownAttemptCodeSource as aE, type KnownCompletionSourceKind as aF, type KnownQuestSubmissionStatus as aG, type KnownRewardType as aH, type LeaderboardExclusionGroup as aI, type LeaderboardPool as aJ, type LeaderboardPoolUnit as aK, type LeaderboardSettlement as aL, type LeaderboardSettlementPolicy as aM, type LeaderboardSettlementPool as aN, type LeaderboardSettlementSummary as aO, type ManagedGroup as aP, type ManagedPointHistoryPage as aQ, type ManagedPointLedger as aR, type MemberPage as aS, type OrganizationDiscordServers as aT, type PickupAvailability as aU, type PointLedger as aV, type ProjectIntegration as aW, type PublishedRelease as aX, type QuestAvailability as aY, type QuestDescription as aZ, type QuestPresentationContent as a_, type PhotoResult as aa, type DiscordReader as ab, type Decision as ac, rewardSchema as ad, triggerSchema as ae, type IntegrationModule as af, type TieredRewardDefinition as ag, type KnownIntegrationModuleProvider as ah, defineCampaign as ai, defineGroup as aj, referralAcceptSchema as ak, submitSchema as al, engagementPageQuerySchema as am, contentPerformanceQuerySchema as an, type CompletionSource as ao, CompletionSourceKind as ap, type ContentPerformanceSnapshot as aq, type DiscordMember as ar, type DiscordMessage as as, type EngagementDefinition as at, type EngagementRuleVersionPage as au, type EntitlementCorrection as av, type EntitlementState as aw, type EvaluatorIntegrationProvider as ax, type GroupArchiveInput as ay, type GroupMember as az, AttemptStatus as b, engagementVersionPageSchema as b$, type QuestStep as b0, type QuestStepAction as b1, type QuestSubmission as b2, type QuestSubmissionResult as b3, QuestSubmissionStatus as b4, type QuestSubmissionUpdate as b5, type ReleaseInput as b6, type ReviewPage as b7, type RewardEntry as b8, type Snapshot as b9, decisionSchema as bA, deferPolicy as bB, discordMemberInputSchema as bC, discordMemberSchema as bD, discordMessageDataSchema as bE, discordMessageInputSchema as bF, discordMessageSchema as bG, discordMessageTextDataSchema as bH, discordReactionDataSchema as bI, discordResourceSourceSchema as bJ, discordRewardSchema as bK, discordServerSchema as bL, engagementArtifactSchema as bM, engagementBoundaryPageSchema as bN, engagementBudgetSchema as bO, engagementChangePreviewInputSchema as bP, engagementChangePreviewSchema as bQ, engagementChangeSchema as bR, engagementDefinitionSchema as bS, engagementDeploymentEntrySchema as bT, engagementPageSchema as bU, engagementPublishSchema as bV, engagementRuleSchema as bW, engagementRuleVersionPageSchema as bX, engagementScoreInputSchema as bY, engagementScoreSchema as bZ, engagementSettlementSchema as b_, acceptAnywaySchema as ba, accountConnectionSchema as bb, addGroupMemberSchema as bc, artifactSchema as bd, attemptSchema as be, authProviderSchema as bf, availabilityWindowSchema as bg, badgeReward as bh, badgeRewardSchema as bi, baseUnitsSchema as bj, batchReleaseSchema as bk, beginHandoverSchema as bl, campaignDefinitionSchema as bm, campaignEnrollmentInputSchema as bn, campaignEnrollmentSchema as bo, campaignViewSchema as bp, campaignWithdrawalInputSchema as bq, completionRecordSchema as br, completionSourceSchema as bs, configurePickupSchema as bt, confirmHandoverSchema as bu, contentPerformancePageSchema as bv, contentPerformanceSnapshotSchema as bw, createGroupSchema as bx, createPointLedgerSchema as by, createStockItemSchema as bz, type AuthProvider as c, pickupAvailabilitySchema as c$, engagementVersionQuerySchema as c0, entitlementCorrectionSchema as c1, entitlementRecoverySchema as c2, entitlementSchema as c3, entitlementStateSchema as c4, errorSchema as c5, evaluatorIntegrationProviderSchema as c6, evaluatorProgressSchema as c7, evaluatorProtocol as c8, evaluatorProtocolSchema as c9, leaderboardPoolUnitSchema as cA, leaderboardPreviewSchema as cB, leaderboardPrizeRewardSchema as cC, leaderboardPrizeSchema as cD, leaderboardQuerySchema as cE, leaderboardRowSchema as cF, leaderboardSettlementApprovalSchema as cG, leaderboardSettlementPolicySchema as cH, leaderboardSettlementPoolSchema as cI, leaderboardSettlementRowSchema as cJ, leaderboardSettlementSchema as cK, leaderboardSettlementStatusSchema as cL, leaderboardSettlementSummarySchema as cM, leaderboardSettlementUnmeasuredSchema as cN, leaderboardWindowSchema as cO, managedGroupSchema as cP, managedPointHistoryPageSchema as cQ, managedPointLedgerSchema as cR, mediaUrlSchema as cS, memberCampaignEnrollmentInputSchema as cT, memberCampaignWithdrawalInputSchema as cU, memberListSchema as cV, memberPageSchema as cW, memberProgressSchema as cX, organizationDiscordServersSchema as cY, photoResultSchema as cZ, pickupAllocationSchema as c_, eventSchema as ca, evidenceRedactionInputSchema as cb, evidenceRetentionInputSchema as cc, evidenceSchema as cd, groupArchiveInputSchema as ce, groupMemberPageSchema as cf, groupMemberSchema as cg, groupPageQuerySchema as ch, groupPageSchema as ci, groupReward as cj, groupRewardSchema as ck, integrationModuleProviderSchema as cl, integrationProviderSchema as cm, integrationRewardSchema as cn, leaderboardArtifactSchema as co, leaderboardAuthoringSchema as cp, leaderboardDefinitionResponseSchema as cq, leaderboardExclusionGroupBindingSchema as cr, leaderboardExclusionGroupSchema as cs, leaderboardExclusionSchema as ct, leaderboardGroupSchema as cu, leaderboardHistoryPageSchema as cv, leaderboardHistoryQuerySchema as cw, leaderboardPageSchema as cx, leaderboardPlacementSchema as cy, leaderboardPoolSchema as cz, type AvailabilityWindow as d, signInProviderOptionSchema as d$, pickupCatalogSchema as d0, pickupPolicySchema as d1, pickupSelectionSchema as d2, pointBalanceSchema as d3, pointBalancesSchema as d4, pointEntrySchema as d5, pointHistoryPageSchema as d6, pointHistoryQuerySchema as d7, pointLedgerArtifactSchema as d8, pointLedgerPropertiesSchema as d9, quizAnswersSchema as dA, quizEvidenceSchema as dB, referralAccountSchema as dC, referralArtifactSchema as dD, referralControlSchema as dE, referralDefinitionSchema as dF, referralHistorySchema as dG, referralManagementSchema as dH, referralQualificationSchema as dI, referralRelationshipSchema as dJ, referralRewardResolutionSchema as dK, referralSummarySchema as dL, referralSuspensionSchema as dM, releaseSchema as dN, removeGroupMemberSchema as dO, reservationSchema as dP, retryCooldownMsSchema as dQ, retryCooldownPolicy as dR, reviewItemSchema as dS, reviewListSchema as dT, reviewModeSchema as dU, reviewPageSchema as dV, rewardBundleSchema as dW, rewardEntrySchema as dX, rewardKey as dY, signInAccountSchema as dZ, signInProviderInputSchema as d_, pointLedgerReferenceSchema as da, pointLedgerSchema as db, pointsAccountSchema as dc, pointsEntrySchema as dd, pointsMutationSchema as de, pointsResultSchema as df, pointsRewardSchema as dg, projectGroupKey as dh, projectGroupSchema as di, projectIntegrationSchema as dj, publishedLeaderboardSchema as dk, publishedReferralSchema as dl, publishedReleaseSchema as dm, questAvailabilitySchema as dn, questBudgetViewSchema as dp, questPresentationContentSchema as dq, questPresentationRequirementSchema as dr, questPresentationSchema as ds, questProfileSchema as dt, questSettingsInputSchema as du, questStepActionSchema as dv, questStepSchema as dw, questSubmissionResultSchema as dx, questSubmissionSchema as dy, questSubmissionUpdateSchema as dz, type CampaignEnrollment as e, signInProviderSchema as e0, snapshotSchema as e1, staffDecisionSchema as e2, stockItemSchema as e3, stockSchema as e4, storedQuestDescriptionSchema as e5, storedReviewModeSchema as e6, submissionEvidenceSchema as e7, templateSchema as e8, textResultSchema as e9, textReviewInputSchema as ea, tierRewardSchema as eb, tieredRewardDefinitionSchema as ec, tieredRewardReferenceSchema as ed, updateGroupSchema as ee, type CampaignEnrollmentInput as f, type CampaignView as g, type CampaignWithdrawalInput as h, type EvaluatorProgress as i, type KnownPointEntryKind as j, type KnownSignInAccountStatus as k, type KnownSignInProvider as l, type LeaderboardHistoryPage as m, type LeaderboardHistoryQuery as n, type LeaderboardPage as o, type LeaderboardPlacement as p, type LeaderboardQuery as q, type MemberCampaignWithdrawalInput as r, type MemberProgress as s, type PointBalances as t, type PointEntry as u, PointEntryKind as v, type PointHistoryPage as w, type PointHistoryQuery as x, type PointLedgerReference as y, type ProjectGroup as z };
8456
+ export { leaderboardDefinitionSchema as $, type AccountConnection as A, type ProjectGroupReference as B, type CampaignDefinition as C, type QuestPresentation as D, type Entitlement as E, type QuestProfile as F, type QuizEvidence as G, type Reward as H, SignInAccountStatus as I, SignInProvider as J, type KnownAttemptStatus as K, type LeaderboardDefinition as L, type MemberCampaignEnrollmentInput as M, type SignInProviderOption as N, type SubmissionEvidence as O, type PointBalance as P, type QuestBudgetView as Q, type ReferralDefinition as R, type SignInAccount as S, type SubmitInput as T, type TieredRewardReference as U, AttemptCodeSource as V, type IntegrationModuleProvider as W, type RewardType as X, questDescriptionSchema as Y, type AuthoringIdentity as Z, type EngagementBudget as _, type Attempt as a, type QuestSettingsInput as a$, pointLedgerDeclarationSchema as a0, referralAuthoringSchema as a1, discordMessagesSourceSchema as a2, type DiscordMessageData as a3, type DiscordMessageTextData as a4, discordReactionsSourceSchema as a5, type DiscordReactionData as a6, type KnownIntegrationModule as a7, type TextReviewInput as a8, type TextResult as a9, type GroupMemberPage as aA, type GroupPage as aB, type GroupPageQuery as aC, type IntegrationProvider as aD, type KnownAttemptCodeSource as aE, type KnownCompletionSourceKind as aF, type KnownQuestSubmissionStatus as aG, type KnownRewardType as aH, type LeaderboardExclusionGroup as aI, type LeaderboardPool as aJ, type LeaderboardPoolUnit as aK, type LeaderboardSettlement as aL, type LeaderboardSettlementPolicy as aM, type LeaderboardSettlementPool as aN, type LeaderboardSettlementSummary as aO, type ManagedGroup as aP, type ManagedPointHistoryPage as aQ, type ManagedPointLedger as aR, type MemberPage as aS, type OrganizationDiscordServers as aT, type PickupAvailability as aU, type PointLedger as aV, type ProjectIntegration as aW, type PublishedRelease as aX, type QuestAvailability as aY, type QuestDescription as aZ, type QuestPresentationContent as a_, type PhotoResult as aa, type DiscordReader as ab, type Decision as ac, rewardSchema as ad, triggerSchema as ae, type IntegrationModule as af, type TieredRewardDefinition as ag, type KnownIntegrationModuleProvider as ah, defineCampaign as ai, defineGroup as aj, referralAcceptSchema as ak, submitSchema as al, engagementPageQuerySchema as am, contentPerformanceQuerySchema as an, type CompletionSource as ao, CompletionSourceKind as ap, type ContentPerformanceSnapshot as aq, type DiscordMember as ar, type DiscordMessage as as, type EngagementDefinition as at, type EngagementRuleVersionPage as au, type EntitlementCorrection as av, type EntitlementState as aw, type EvaluatorIntegrationProvider as ax, type GroupArchiveInput as ay, type GroupMember as az, AttemptStatus as b, engagementVersionPageSchema as b$, type QuestStep as b0, type QuestStepAction as b1, type QuestSubmission as b2, type QuestSubmissionResult as b3, QuestSubmissionStatus as b4, type QuestSubmissionUpdate as b5, type ReleaseInput as b6, type ReviewPage as b7, type RewardEntry as b8, type Snapshot as b9, decisionSchema as bA, deferPolicy as bB, discordMemberInputSchema as bC, discordMemberSchema as bD, discordMessageDataSchema as bE, discordMessageInputSchema as bF, discordMessageSchema as bG, discordMessageTextDataSchema as bH, discordReactionDataSchema as bI, discordResourceSourceSchema as bJ, discordRewardSchema as bK, discordServerSchema as bL, engagementArtifactSchema as bM, engagementBoundaryPageSchema as bN, engagementBudgetSchema as bO, engagementChangePreviewInputSchema as bP, engagementChangePreviewSchema as bQ, engagementChangeSchema as bR, engagementDefinitionSchema as bS, engagementDeploymentEntrySchema as bT, engagementPageSchema as bU, engagementPublishSchema as bV, engagementRuleSchema as bW, engagementRuleVersionPageSchema as bX, engagementScoreInputSchema as bY, engagementScoreSchema as bZ, engagementSettlementSchema as b_, acceptAnywaySchema as ba, accountConnectionSchema as bb, addGroupMemberSchema as bc, artifactSchema as bd, attemptSchema as be, authProviderSchema as bf, availabilityWindowSchema as bg, badgeReward as bh, badgeRewardSchema as bi, baseUnitsSchema as bj, batchReleaseSchema as bk, beginHandoverSchema as bl, campaignDefinitionSchema as bm, campaignEnrollmentInputSchema as bn, campaignEnrollmentSchema as bo, campaignViewSchema as bp, campaignWithdrawalInputSchema as bq, completionRecordSchema as br, completionSourceSchema as bs, configurePickupSchema as bt, confirmHandoverSchema as bu, contentPerformancePageSchema as bv, contentPerformanceSnapshotSchema as bw, createGroupSchema as bx, createPointLedgerSchema as by, createStockItemSchema as bz, type AuthProvider as c, photoResultSchema as c$, engagementVersionQuerySchema as c0, entitlementCorrectionSchema as c1, entitlementRecoverySchema as c2, entitlementSchema as c3, entitlementStateSchema as c4, errorSchema as c5, evaluatorIntegrationProviderSchema as c6, evaluatorProgressSchema as c7, evaluatorProtocol as c8, evaluatorProtocolSchema as c9, leaderboardPlacementSchema as cA, leaderboardPoolSchema as cB, leaderboardPoolUnitSchema as cC, leaderboardPreviewSchema as cD, leaderboardPrizeRewardSchema as cE, leaderboardPrizeSchema as cF, leaderboardQuerySchema as cG, leaderboardRowSchema as cH, leaderboardSettlementApprovalSchema as cI, leaderboardSettlementPolicySchema as cJ, leaderboardSettlementPoolSchema as cK, leaderboardSettlementRowSchema as cL, leaderboardSettlementSchema as cM, leaderboardSettlementStatusSchema as cN, leaderboardSettlementSummarySchema as cO, leaderboardSettlementUnmeasuredSchema as cP, leaderboardWindowSchema as cQ, managedGroupSchema as cR, managedPointHistoryPageSchema as cS, managedPointLedgerSchema as cT, mediaUrlSchema as cU, memberCampaignEnrollmentInputSchema as cV, memberCampaignWithdrawalInputSchema as cW, memberListSchema as cX, memberPageSchema as cY, memberProgressSchema as cZ, organizationDiscordServersSchema as c_, eventSchema as ca, evidenceRedactionInputSchema as cb, evidenceRetentionInputSchema as cc, evidenceRetentionPeriodSchema as cd, evidenceRetentionSettingInputSchema as ce, evidenceSchema as cf, groupArchiveInputSchema as cg, groupMemberPageSchema as ch, groupMemberSchema as ci, groupPageQuerySchema as cj, groupPageSchema as ck, groupReward as cl, groupRewardSchema as cm, integrationModuleProviderSchema as cn, integrationProviderSchema as co, integrationRewardSchema as cp, leaderboardArtifactSchema as cq, leaderboardAuthoringSchema as cr, leaderboardDefinitionResponseSchema as cs, leaderboardExclusionGroupBindingSchema as ct, leaderboardExclusionGroupSchema as cu, leaderboardExclusionSchema as cv, leaderboardGroupSchema as cw, leaderboardHistoryPageSchema as cx, leaderboardHistoryQuerySchema as cy, leaderboardPageSchema as cz, type AvailabilityWindow as d, signInAccountSchema as d$, pickupAllocationSchema as d0, pickupAvailabilitySchema as d1, pickupCatalogSchema as d2, pickupPolicySchema as d3, pickupSelectionSchema as d4, pointBalanceSchema as d5, pointBalancesSchema as d6, pointEntrySchema as d7, pointHistoryPageSchema as d8, pointHistoryQuerySchema as d9, questSubmissionSchema as dA, questSubmissionUpdateSchema as dB, quizAnswersSchema as dC, quizEvidenceSchema as dD, referralAccountSchema as dE, referralArtifactSchema as dF, referralControlSchema as dG, referralDefinitionSchema as dH, referralHistorySchema as dI, referralManagementSchema as dJ, referralQualificationSchema as dK, referralRelationshipSchema as dL, referralRewardResolutionSchema as dM, referralSummarySchema as dN, referralSuspensionSchema as dO, releaseSchema as dP, removeGroupMemberSchema as dQ, reservationSchema as dR, retryCooldownMsSchema as dS, retryCooldownPolicy as dT, reviewItemSchema as dU, reviewListSchema as dV, reviewModeSchema as dW, reviewPageSchema as dX, rewardBundleSchema as dY, rewardEntrySchema as dZ, rewardKey as d_, pointLedgerArtifactSchema as da, pointLedgerPropertiesSchema as db, pointLedgerReferenceSchema as dc, pointLedgerSchema as dd, pointsAccountSchema as de, pointsEntrySchema as df, pointsMutationSchema as dg, pointsResultSchema as dh, pointsRewardSchema as di, projectGroupKey as dj, projectGroupSchema as dk, projectIntegrationSchema as dl, publishedLeaderboardSchema as dm, publishedReferralSchema as dn, publishedReleaseSchema as dp, questAvailabilitySchema as dq, questBudgetViewSchema as dr, questPresentationContentSchema as ds, questPresentationRequirementSchema as dt, questPresentationSchema as du, questProfileSchema as dv, questSettingsInputSchema as dw, questStepActionSchema as dx, questStepSchema as dy, questSubmissionResultSchema as dz, type CampaignEnrollment as e, signInProviderInputSchema as e0, signInProviderOptionSchema as e1, signInProviderSchema as e2, snapshotSchema as e3, staffDecisionSchema as e4, stockItemSchema as e5, stockSchema as e6, storedQuestDescriptionSchema as e7, storedReviewModeSchema as e8, submissionEvidenceSchema as e9, templateSchema as ea, textResultSchema as eb, textReviewInputSchema as ec, tierRewardSchema as ed, tieredRewardDefinitionSchema as ee, tieredRewardReferenceSchema as ef, updateGroupSchema as eg, type CampaignEnrollmentInput as f, type CampaignView as g, type CampaignWithdrawalInput as h, type EvaluatorProgress as i, type KnownPointEntryKind as j, type KnownSignInAccountStatus as k, type KnownSignInProvider as l, type LeaderboardHistoryPage as m, type LeaderboardHistoryQuery as n, type LeaderboardPage as o, type LeaderboardPlacement as p, type LeaderboardQuery as q, type MemberCampaignWithdrawalInput as r, type MemberProgress as s, type PointBalances as t, type PointEntry as u, PointEntryKind as v, type PointHistoryPage as w, type PointHistoryQuery as x, type PointLedgerReference as y, type ProjectGroup as z };
@@ -1,4 +1,4 @@
1
- import { O as OpenIdentityKind } from './tracker-data-esm3WG8R.js';
1
+ import { O as OpenIdentityKind } from './tracker-data-Bl-qPIvZ.js';
2
2
  import * as z from 'zod';
3
3
 
4
4
  /** One capability call of the captured evaluation run, as Relay stored it. */
@@ -1,21 +1,21 @@
1
- import { _ as EngagementBudget, $ as leaderboardDefinitionSchema, Z as AuthoringIdentity, a0 as pointLedgerDeclarationSchema, a1 as referralAuthoringSchema, a2 as discordMessagesSourceSchema, a3 as DiscordMessageData, a4 as DiscordMessageTextData, a5 as discordReactionsSourceSchema, a6 as DiscordReactionData, a7 as KnownIntegrationModule, P as PointBalance, C as CampaignDefinition, a8 as TextReviewInput, a9 as TextResult, aa as PhotoResult, ab as DiscordReader, ac as Decision, ad as rewardSchema, ae as triggerSchema, af as IntegrationModule, D as QuestPresentation, d as AvailabilityWindow, F as QuestProfile, G as QuizEvidence, W as IntegrationModuleProvider, ag as TieredRewardDefinition } from './accounts-nz3mzfRQ.js';
2
- export { ah as KnownIntegrationModuleProvider, ai as defineCampaign, aj as defineGroup } from './accounts-nz3mzfRQ.js';
3
- import { x as xContentBodySchema, I as IdentityKind, j as customSourceSchema, W as WithRecordData, k as WithContent, l as WithAccountRoles, R as ResourceHandle, Q as QuestHandle, L as LedgerReference, G as GroupHandle, m as TrackerSource, n as trackerDefinitionSchema, o as Tracker, p as TrackerData, q as SourceRoles, r as LedgerHandle, i as TrackerDataSchema, u as xSearchSourceSchema, X as XTweet, v as XContentMetric, y as TrackerTriggerPolicy, z as Where, M as MemberIdentity, A as ReferralHandle, B as TrackerTriggerContext, C as TrackerReader, D as TrackerTriggerMode, E as RoleOf, F as WhereSetting, H as ContentBody, J as BadgeHandle, N as ContentMetricName } from './tracker-data-esm3WG8R.js';
4
- export { P as LedgerSetting, U as TrackerPage, V as TrackerReadQuery, Y as trackerDataSchema, Z as trackerTriggerContextSchema } from './tracker-data-esm3WG8R.js';
1
+ import { _ as EngagementBudget, $ as leaderboardDefinitionSchema, Z as AuthoringIdentity, a0 as pointLedgerDeclarationSchema, a1 as referralAuthoringSchema, a2 as discordMessagesSourceSchema, a3 as DiscordMessageData, a4 as DiscordMessageTextData, a5 as discordReactionsSourceSchema, a6 as DiscordReactionData, a7 as KnownIntegrationModule, P as PointBalance, C as CampaignDefinition, a8 as TextReviewInput, a9 as TextResult, aa as PhotoResult, ab as DiscordReader, ac as Decision, ad as rewardSchema, ae as triggerSchema, af as IntegrationModule, D as QuestPresentation, d as AvailabilityWindow, F as QuestProfile, G as QuizEvidence, W as IntegrationModuleProvider, ag as TieredRewardDefinition } from './accounts-_lNsiR2k.js';
2
+ export { ah as KnownIntegrationModuleProvider, ai as defineCampaign, aj as defineGroup } from './accounts-_lNsiR2k.js';
3
+ import { x as xContentBodySchema, I as IdentityKind, j as customSourceSchema, W as WithRecordData, k as WithContent, l as WithAccountRoles, R as ResourceHandle, Q as QuestHandle, L as LedgerReference, G as GroupHandle, m as TrackerSource, n as trackerDefinitionSchema, o as Tracker, p as TrackerData, q as SourceRoles, r as LedgerHandle, i as TrackerDataSchema, u as xSearchSourceSchema, X as XTweet, v as XContentMetric, y as TrackerTriggerPolicy, z as Where, M as MemberIdentity, A as ReferralHandle, B as TrackerTriggerContext, C as TrackerReader, D as TrackerTriggerMode, E as RoleOf, F as WhereSetting, H as ContentBody, J as BadgeHandle, N as ContentMetricName } from './tracker-data-Bl-qPIvZ.js';
4
+ export { P as LedgerSetting, U as TrackerPage, V as TrackerReadQuery, Y as trackerDataSchema, Z as trackerTriggerContextSchema } from './tracker-data-Bl-qPIvZ.js';
5
5
  import { R as ResourceSource, M as MemberCompletion, B as Budget, A as AuthorBudget, a as Announcement } from './capability-error-CuI_F7yM.js';
6
6
  export { C as CapabilityError, b as CapabilityErrorCode, T as TikTokVideoBody, c as TikTokVideoMetric, Y as YouTubeShortBody, d as YouTubeShortMetric, e as capabilityErrorCodes } from './capability-error-CuI_F7yM.js';
7
7
  import { N as NftCollection, p as ContractCall, q as ContractEvent, r as SolanaProgram, s as WalletBalanceSourceQuery, t as WalletTransaction, u as WalletInstruction, e as ProfileReferral, v as WalletReader } from './wallet-B7e06v4m.js';
8
8
  export { w as ContractCallParts, x as ContractCallReturnType, y as ContractEventInput, z as ContractEventParts, B as ContractFunction, D as CosmosDenom, a as CosmosNetwork, E as EvmChainId, F as NftCollectionParts, G as NftStandard, H as WalletBalance, I as WalletBalanceChange, o as WalletBalanceQuery, J as WalletBalanceSample, K as WalletCall, M as WalletCallArgument, Q as WalletCallQuery, R as WalletDelegations, T as WalletDelegationsQuery, U as WalletEventCondition, V as WalletEventValue, X as WalletEvents, Y as WalletEventsQuery, Z as WalletNfts, _ as WalletNftsQuery, $ as WalletTransactions, a0 as WalletTransactionsQuery, a1 as cosmosDenomSchema, a2 as cosmosNetworkSchema, a3 as isContractCall, a4 as isContractEvent, a5 as isEvmChainId, a6 as isNftCollection, a7 as isSolanaProgram, a8 as maxWalletEventLogs, a9 as maxWalletEventLookback, aa as maxWalletTransactionLookback, ab as maxWalletTransactions, ac as parseContractCall, ad as parseContractEvent, ae as parseContractFunction, af as parseNftCollection } from './wallet-B7e06v4m.js';
9
9
  import * as z from 'zod';
10
10
  export { z } from 'zod';
11
- import { g as badgeDeclarationSchema, h as OfferAuthoring, B as Badge } from './offers-CYeN_I0Y.js';
11
+ import { g as badgeDeclarationSchema, h as OfferAuthoring, B as Badge } from './offers-Hw2P6tcK.js';
12
12
  import { a as StreakPolicy, Q as QuizContent } from './streaks-0YuipsUQ.js';
13
- import { S as Setting, A as AmountSetting, B as BalanceChain, a as BoundSettings } from './dashboards-CLemT6kj.js';
14
- export { D as DashboardInput, b as DashboardPanelInput, e as defineDashboard } from './dashboards-CLemT6kj.js';
15
- import { e as TelegramReader, P as Prerequisite, b as TextEvidence, U as UrlEvidence, c as TextOptions, d as UrlOptions } from './submission-input-DZCbjQUH.js';
16
- export { f as TelegramChatMember, g as TelegramChatMemberStatus, h as TelegramConnection, i as TelegramMessageData, j as TelegramReactionData, k as balanceAtLeast, l as completed, m as inGroup } from './submission-input-DZCbjQUH.js';
17
- import { I as ImageReader, X as XReader } from './limits-kNzYdZ00.js';
18
- export { L as Limits, l as limits } from './limits-kNzYdZ00.js';
13
+ import { S as Setting, A as AmountSetting, B as BalanceChain, a as BoundSettings } from './dashboards-pVfclkyh.js';
14
+ export { D as DashboardInput, b as DashboardPanelInput, e as defineDashboard } from './dashboards-pVfclkyh.js';
15
+ import { e as TelegramReader, P as Prerequisite, b as TextEvidence, U as UrlEvidence, c as TextOptions, d as UrlOptions } from './submission-input-ChL1aYNH.js';
16
+ export { f as TelegramChatMember, g as TelegramChatMemberStatus, h as TelegramConnection, i as TelegramMessageData, j as TelegramReactionData, k as balanceAtLeast, l as completed, m as inGroup } from './submission-input-ChL1aYNH.js';
17
+ import { I as ImageReader, X as XReader } from './limits-pE04y9O2.js';
18
+ export { L as Limits, l as limits } from './limits-pE04y9O2.js';
19
19
  export { f as formatUnits, p as parseUnits } from './units-CwgsPB_r.js';
20
20
 
21
21
  declare function defineBadge(input: z.input<typeof badgeDeclarationSchema>): {
package/dist/authoring.js CHANGED
@@ -3,42 +3,33 @@ import {
3
3
  parseUnits
4
4
  } from "./chunk-V7UKZLHA.js";
5
5
  import {
6
+ sourceDataSchema,
7
+ sourceRoles,
8
+ validateQuestShape
9
+ } from "./chunk-SE7XHQFP.js";
10
+ import {
11
+ defineDashboard,
6
12
  tiktokVideoBodySchema,
7
13
  tiktokVideoMetrics,
8
14
  youtubeShortBodySchema,
9
15
  youtubeShortMetrics
10
- } from "./chunk-TLSQETTY.js";
16
+ } from "./chunk-ZQ3IPCI6.js";
11
17
  import {
12
18
  CapabilityError,
13
19
  capabilityErrorCodes
14
20
  } from "./chunk-MWMCQLCG.js";
15
- import {
16
- sourceDataSchema,
17
- sourceRoles,
18
- validateQuestShape
19
- } from "./chunk-7Z4SZ6YM.js";
20
- import {
21
- defineDashboard
22
- } from "./chunk-FU5CGNTR.js";
23
21
  import {
24
22
  engagementDefinitionSchema,
25
23
  engagementScoreInputSchema,
26
24
  engagementScoreSchema,
27
25
  offerAuthoringSchema,
28
26
  referralAuthoringSchema
29
- } from "./chunk-QR6HH4DI.js";
30
- import {
31
- badgeDeclarationSchema,
32
- leaderboardAuthoringSchema,
33
- pointLedgerDeclarationSchema
34
- } from "./chunk-W7YSMSGC.js";
35
- import {
36
- parseDefinition
37
- } from "./chunk-FO2LCZTL.js";
27
+ } from "./chunk-NG4GZ54I.js";
38
28
  import {
39
29
  announcementSchema,
40
30
  authorBudgetSchema,
41
31
  authoringKey,
32
+ badgeDeclarationSchema,
42
33
  badgeReward,
43
34
  balanceAtLeast,
44
35
  budgetSchema,
@@ -74,6 +65,7 @@ import {
74
65
  isEvmChainId,
75
66
  isNftCollection,
76
67
  isSolanaProgram,
68
+ leaderboardAuthoringSchema,
77
69
  ledgerKey,
78
70
  ledgerSettingSchema,
79
71
  limits,
@@ -87,6 +79,7 @@ import {
87
79
  parseContractFunction,
88
80
  parseNftCollection,
89
81
  parseSettings,
82
+ pointLedgerDeclarationSchema,
90
83
  pointsRewardSchema,
91
84
  questDescriptionSchema,
92
85
  quizAnswersSchema,
@@ -127,8 +120,10 @@ import {
127
120
  whereSettings,
128
121
  xSearchSourceSchema,
129
122
  youtubeShortsNamespace
130
- } from "./chunk-ID3BZXFZ.js";
131
- import "./chunk-GLH6MEI2.js";
123
+ } from "./chunk-HNR6G3GV.js";
124
+ import {
125
+ parseDefinition
126
+ } from "./chunk-EOUEAOWJ.js";
132
127
 
133
128
  // src/builders.ts
134
129
  import * as z from "zod";
@@ -1,6 +1,6 @@
1
1
  import * as z from 'zod';
2
- import { b as AttemptStatus, X as RewardType } from './accounts-nz3mzfRQ.js';
3
- import { S as SkipEnrollment } from './tracker-data-esm3WG8R.js';
2
+ import { b as AttemptStatus, X as RewardType } from './accounts-_lNsiR2k.js';
3
+ import { S as SkipEnrollment } from './tracker-data-Bl-qPIvZ.js';
4
4
 
5
5
  declare const collectionCodeSchema: z.ZodString;
6
6
  declare const collectionPassSchema: z.ZodObject<{
package/dist/browser.d.ts CHANGED
@@ -1,17 +1,17 @@
1
- import { o as SubmissionStore, f as RelayClientOptions, R as RelayClient } from './client-DHmG7rn6.js';
2
- export { C as CosmosChains, D as DiscoveredWallet, E as Eip1193Provider, a as EmailSignInOption, K as KeplrLike, O as OAuthSignInOption, P as ProviderSignInOption, S as SignInClient, b as SignInIcon, c as SignInMethods, d as SignInOption, e as SignInOptions, f as SignInUnavailable, g as SignInWallet, h as SolanaInjectedProvider, i as StandardWallet, j as StandardWalletAccount, T as TelegramSignInOption, W as WalletSignInOption, k as cosmosChainList, l as cosmosSigner, m as discoverCosmosWallets, n as discoverEvmWallets, o as discoverSignInWallets, p as discoverSolanaWallets, q as evmSigner, s as signInOptions, r as solanaSigner, t as telegramMiniAppInitData, w as walletStandardSolanaSigner } from './telegram-browser-NL0Asmsi.js';
1
+ import { o as SubmissionStore, f as RelayClientOptions, R as RelayClient } from './client-D7IiwEq2.js';
2
+ export { C as CosmosChains, D as DiscoveredWallet, E as Eip1193Provider, a as EmailSignInOption, K as KeplrLike, O as OAuthSignInOption, P as ProviderSignInOption, S as SignInClient, b as SignInIcon, c as SignInMethods, d as SignInOption, e as SignInOptions, f as SignInUnavailable, g as SignInWallet, h as SolanaInjectedProvider, i as StandardWallet, j as StandardWalletAccount, T as TelegramSignInOption, W as WalletSignInOption, k as cosmosChainList, l as cosmosSigner, m as discoverCosmosWallets, n as discoverEvmWallets, o as discoverSignInWallets, p as discoverSolanaWallets, q as evmSigner, s as signInOptions, r as solanaSigner, t as telegramMiniAppInitData, w as walletStandardSolanaSigner } from './telegram-browser-K27t4TwM.js';
3
3
  export { H as HostEnvironment, g as getHostEnvironment } from './host-environment-FN4zg3hw.js';
4
- import { M as MemberSummary } from './participant-activity-D-Drp24G.js';
5
- import './accounts-nz3mzfRQ.js';
4
+ import { M as MemberSummary } from './participant-activity-DXRq4s6K.js';
5
+ import './accounts-_lNsiR2k.js';
6
6
  import 'zod';
7
- import './tracker-data-esm3WG8R.js';
7
+ import './tracker-data-Bl-qPIvZ.js';
8
8
  import './wallet-B7e06v4m.js';
9
- import './submission-input-DZCbjQUH.js';
9
+ import './submission-input-ChL1aYNH.js';
10
10
  import './request-error-D_dUPLwo.js';
11
- import './reward-deliveries-drp-x1G-.js';
12
- import './catalog-BaTOKpNw.js';
11
+ import './reward-deliveries-BCV8hznc.js';
12
+ import './catalog-ByZMRS7I.js';
13
13
  import './action-9Xl0StBg.js';
14
- import './sign-in-providers-B1Q9eDRm.js';
14
+ import './sign-in-providers-BAkGjSXo.js';
15
15
 
16
16
  /**
17
17
  * The member's time at the real instant `at` (default now), in epoch milliseconds: what an app
package/dist/browser.js CHANGED
@@ -12,26 +12,23 @@ import {
12
12
  signInOptions,
13
13
  solanaSigner,
14
14
  walletStandardSolanaSigner
15
- } from "./chunk-5XLZ34PV.js";
15
+ } from "./chunk-KCUUHT2V.js";
16
16
  import {
17
17
  telegramMiniAppInitData
18
18
  } from "./chunk-FWLQ5XCS.js";
19
- import "./chunk-LZWXCBUB.js";
20
- import "./chunk-AQOL3SK5.js";
21
- import "./chunk-MTKRIQEU.js";
22
- import "./chunk-EHUSD3O2.js";
23
- import "./chunk-4NOFSGAL.js";
24
- import "./chunk-QR6HH4DI.js";
25
- import "./chunk-W7YSMSGC.js";
19
+ import "./chunk-VBYOAT46.js";
20
+ import "./chunk-E22XSC4L.js";
21
+ import "./chunk-EUEW2APU.js";
26
22
  import {
27
23
  getHostEnvironment
28
24
  } from "./chunk-UYVJZR33.js";
29
- import "./chunk-ICXZZNPS.js";
30
- import "./chunk-FO2LCZTL.js";
31
- import "./chunk-3RFP6GT5.js";
32
- import "./chunk-N4BDKS6Y.js";
33
- import "./chunk-ID3BZXFZ.js";
34
- import "./chunk-GLH6MEI2.js";
25
+ import "./chunk-7H4MRVQF.js";
26
+ import "./chunk-DLABJSBO.js";
27
+ import "./chunk-MPTE7EIV.js";
28
+ import "./chunk-R2KZFX6E.js";
29
+ import "./chunk-NG4GZ54I.js";
30
+ import "./chunk-HNR6G3GV.js";
31
+ import "./chunk-EOUEAOWJ.js";
35
32
  export {
36
33
  browserSubmissionStore,
37
34
  cosmosChainList,
@@ -1,5 +1,5 @@
1
1
  import { S as SolanaIdlSource } from './wallet-B7e06v4m.js';
2
- import { b as AttemptStatus, V as AttemptCodeSource, W as IntegrationModuleProvider, X as RewardType, Y as questDescriptionSchema } from './accounts-nz3mzfRQ.js';
2
+ import { b as AttemptStatus, V as AttemptCodeSource, W as IntegrationModuleProvider, X as RewardType, Y as questDescriptionSchema } from './accounts-_lNsiR2k.js';
3
3
  import * as z from 'zod';
4
4
 
5
5
  /**
@@ -8,7 +8,7 @@ import {
8
8
  rewardBundleSchema,
9
9
  settingsValuesSchema,
10
10
  trackerTriggerContextSchema
11
- } from "./chunk-ID3BZXFZ.js";
11
+ } from "./chunk-HNR6G3GV.js";
12
12
 
13
13
  // src/server/attempt-captures.ts
14
14
  import * as z from "zod";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  clientIdentity,
3
3
  retryAfter
4
- } from "./chunk-3RFP6GT5.js";
4
+ } from "./chunk-DLABJSBO.js";
5
5
 
6
6
  // src/http-exchange.ts
7
7
  var uncertainStatuses = /* @__PURE__ */ (() => /* @__PURE__ */ new Set([500, 502, 504]))();
@@ -1,22 +1,20 @@
1
1
  import {
2
2
  createHttpExchange,
3
3
  uncertainStatuses
4
- } from "./chunk-ICXZZNPS.js";
4
+ } from "./chunk-7H4MRVQF.js";
5
5
  import {
6
6
  MANAGEMENT_TIMEOUT,
7
7
  lifetime,
8
8
  retrying,
9
9
  validTimeout
10
- } from "./chunk-3RFP6GT5.js";
10
+ } from "./chunk-DLABJSBO.js";
11
11
  import {
12
- knownResponse,
13
- lifecycleReasonSchema,
14
- limits
15
- } from "./chunk-ID3BZXFZ.js";
12
+ knownResponse
13
+ } from "./chunk-HNR6G3GV.js";
16
14
  import {
17
15
  RequestError,
18
16
  isRequestError
19
- } from "./chunk-GLH6MEI2.js";
17
+ } from "./chunk-EOUEAOWJ.js";
20
18
 
21
19
  // src/configuration.ts
22
20
  function questConfiguration(release) {
@@ -314,211 +312,6 @@ function containsReferralIntegrationReward(value) {
314
312
  );
315
313
  }
316
314
 
317
- // src/server/schedules.ts
318
- import * as z4 from "zod";
319
- import { Cron } from "croner";
320
- var APP_SCHEDULE_LIMIT = 10;
321
- var APP_SCHEDULE_MIN_INTERVAL = 3e5;
322
- var APP_SCHEDULE_TIMEOUT = 3e4;
323
- var appScheduleNameSchema = /* @__PURE__ */ (() => z4.string().regex(/^[a-z][a-z0-9-]{0,63}$/))();
324
- var appSchedulePathSchema = /* @__PURE__ */ (() => z4.string().min(2).max(512).refine((path) => {
325
- if (!/^\/[a-zA-Z0-9_/-]+$/.test(path) || path.startsWith("//")) {
326
- return false;
327
- }
328
- return path.split("/").slice(1).every((part) => part.length > 0) && new URL(path, "https://app.invalid").pathname === path;
329
- }, "Expected an absolute route path without a query or hidden segments"))();
330
- function interval(value) {
331
- const amount = Number(value.slice(0, -1));
332
- const unit = value.slice(-1);
333
- return amount * (unit === "m" ? 6e4 : unit === "h" ? 36e5 : 864e5);
334
- }
335
- var everySchema = /* @__PURE__ */ (() => z4.string().regex(/^[1-9]\d{0,3}[mhd]$/).refine(
336
- (value) => interval(value) >= limits.apps.scheduleMinIntervalMs && interval(value) <= 365 * 864e5,
337
- "Use an interval from 5 minutes to 365 days, such as 5m, 1h or 1d"
338
- ))();
339
- var cronSchema = /* @__PURE__ */ (() => z4.string().max(120).refine((value) => {
340
- const fields = value.trim().split(/\s+/);
341
- if (fields.length !== 5 || fields.some((field) => !/^[\d*,/-]+$/.test(field))) {
342
- return false;
343
- }
344
- try {
345
- const job = new Cron(value, { paused: true, timezone: "UTC" });
346
- if (!job.nextRun()) {
347
- return false;
348
- }
349
- const minutes = new Cron(`${fields[0]} * * * *`, {
350
- paused: true,
351
- timezone: "UTC"
352
- });
353
- const times = minutes.nextRuns(13, /* @__PURE__ */ new Date("2024-01-01T00:00:00Z"));
354
- return times.every(
355
- (time, i) => i === 0 || time.getTime() - times[i - 1].getTime() >= limits.apps.scheduleMinIntervalMs
356
- );
357
- } catch {
358
- return false;
359
- }
360
- }, "Expected a five-field UTC cron expression with minute slots at least five minutes apart"))();
361
- var declaration = /* @__PURE__ */ (() => ({
362
- name: appScheduleNameSchema,
363
- path: appSchedulePathSchema,
364
- description: z4.string().min(1).max(500)
365
- }))();
366
- var everySchedule = /* @__PURE__ */ (() => z4.object({ ...declaration, every: everySchema }))();
367
- var cronSchedule = /* @__PURE__ */ (() => z4.object({ ...declaration, cron: cronSchema }))();
368
- var appScheduleSchema = /* @__PURE__ */ (() => z4.union([
369
- everySchedule.strict(),
370
- cronSchedule.strict()
371
- ]))();
372
- var appSchedulesSchema = /* @__PURE__ */ (() => z4.array(appScheduleSchema).max(limits.apps.schedules).refine(
373
- (items) => new Set(items.map((item) => item.name)).size === items.length,
374
- "Schedule names must be unique"
375
- ))();
376
- function nextScheduleRun(schedule, after) {
377
- if ("every" in schedule) {
378
- return after + interval(schedule.every);
379
- }
380
- const next = new Cron(schedule.cron, {
381
- paused: true,
382
- timezone: "UTC"
383
- }).nextRun(new Date(after));
384
- if (!next) {
385
- throw new Error("Schedule has no next occurrence");
386
- }
387
- return next.getTime();
388
- }
389
- var appScheduleStateSchema = /* @__PURE__ */ (() => z4.enum(["active", "paused", "archived"]))();
390
- var appScheduleStateInputSchema = /* @__PURE__ */ (() => z4.object({
391
- state: appScheduleStateSchema,
392
- reason: lifecycleReasonSchema.optional()
393
- }).strict())();
394
- var APP_SCHEDULE_RESULT_BYTES = 16384;
395
- var appScheduleDiagnosticSchema = /* @__PURE__ */ (() => z4.object({
396
- level: z4.enum(["error", "warning", "info"]),
397
- message: z4.string().min(1).max(500),
398
- /** What the line is about, such as a member, record or tracker ID. */
399
- subject: z4.string().min(1).max(200).optional(),
400
- /** A stable code the app chooses, such as `ingest-timeout`. */
401
- code: z4.string().min(1).max(100).optional()
402
- }))();
403
- var appScheduleResultSchema = /* @__PURE__ */ (() => z4.object({
404
- outcome: z4.enum(["succeeded", "partial", "failed"]),
405
- summary: z4.string().min(1).max(500).optional(),
406
- /** Counts and gauges, such as processed and failed members. */
407
- metrics: z4.record(z4.string().regex(/^[A-Za-z][\w.-]{0,63}$/), z4.number()).refine(
408
- (metrics) => Object.keys(metrics).length <= 50,
409
- "Report at most 50 metrics"
410
- ).optional(),
411
- diagnostics: z4.array(appScheduleDiagnosticSchema).max(50).optional()
412
- }))();
413
- function scheduleResult(result) {
414
- const body = JSON.stringify(appScheduleResultSchema.parse(result));
415
- if (new TextEncoder().encode(body).byteLength > limits.apps.scheduleResultBytes) {
416
- throw new Error(
417
- `A schedule result must be at most ${limits.apps.scheduleResultBytes.toLocaleString("en-US")} bytes of JSON: send fewer or shorter diagnostics`
418
- );
419
- }
420
- return new Response(body, {
421
- headers: { "Content-Type": "application/json" }
422
- });
423
- }
424
- var appScheduleRunSchema = /* @__PURE__ */ (() => z4.object({
425
- id: z4.string().uuid(),
426
- build: z4.string().uuid(),
427
- startedAt: z4.number(),
428
- scheduledAt: z4.number(),
429
- manual: z4.boolean(),
430
- status: z4.enum(["queued", "running", "succeeded", "failed", "uncertain"]),
431
- duration: z4.number().nullable(),
432
- /** Why the run failed or is uncertain, or why Relay ignored the app's result. */
433
- error: z4.string().nullable(),
434
- /** The app's JSON answer when it sent a valid result. Absent on runs from before results. */
435
- result: appScheduleResultSchema.nullable().optional()
436
- }))();
437
- var appScheduleRunsSchema = /* @__PURE__ */ (() => z4.object({
438
- /** Newest first: the latest twenty runs of one schedule, including a queued or running one. */
439
- runs: z4.array(appScheduleRunSchema)
440
- }))();
441
- var appScheduleListSchema = /* @__PURE__ */ (() => z4.object({
442
- state: appScheduleStateSchema,
443
- schedules: z4.array(
444
- z4.object({
445
- declaration: z4.union([everySchedule, cronSchedule]),
446
- nextRun: z4.number().nullable(),
447
- blocked: z4.boolean(),
448
- lastRun: appScheduleRunSchema.nullable()
449
- })
450
- )
451
- }))();
452
- var scheduledInvocationSchema = /* @__PURE__ */ (() => z4.object({
453
- id: z4.string().uuid(),
454
- build: z4.string().uuid(),
455
- name: appScheduleNameSchema,
456
- scheduledAt: z4.number().int(),
457
- startedAt: z4.number().int(),
458
- manual: z4.boolean()
459
- }).strict())();
460
- async function verifyScheduledRequest(request, key) {
461
- const signature = request.headers.get("X-Domino-Schedule-Signature");
462
- const url = new URL(request.url);
463
- if (request.method !== "POST" || url.search !== "" || url.hash !== "" || !key || !signature || !/^[a-f0-9]{64}$/.test(signature)) {
464
- return null;
465
- }
466
- const reader = request.clone().body?.getReader();
467
- if (!reader) {
468
- return null;
469
- }
470
- let body = "";
471
- let size = 0;
472
- const decoder = new TextDecoder();
473
- try {
474
- for (; ; ) {
475
- const chunk = await reader.read();
476
- if (chunk.done) {
477
- break;
478
- }
479
- size += chunk.value.byteLength;
480
- if (size > 4096) {
481
- void reader.cancel().catch(() => {
482
- });
483
- return null;
484
- }
485
- body += decoder.decode(chunk.value, { stream: true });
486
- }
487
- body += decoder.decode();
488
- } catch {
489
- return null;
490
- }
491
- const secret = await crypto.subtle.importKey(
492
- "raw",
493
- new TextEncoder().encode(key),
494
- { name: "HMAC", hash: "SHA-256" },
495
- false,
496
- ["verify"]
497
- );
498
- const bytes = Uint8Array.from(
499
- signature.match(/../g) ?? [],
500
- (byte) => Number.parseInt(byte, 16)
501
- );
502
- const valid = await crypto.subtle.verify(
503
- "HMAC",
504
- secret,
505
- bytes,
506
- new TextEncoder().encode(`POST
507
- ${url.pathname}
508
- ${body}`)
509
- );
510
- if (!valid) {
511
- return null;
512
- }
513
- const parsed = scheduledInvocationSchema.safeParse(
514
- await new Response(body).json().catch(() => null)
515
- );
516
- if (!parsed.success || Math.abs(Date.now() - parsed.data.startedAt) > 6e4) {
517
- return null;
518
- }
519
- return parsed.data;
520
- }
521
-
522
315
  export {
523
316
  questConfiguration,
524
317
  ManagementErrorCode,
@@ -531,24 +324,5 @@ export {
531
324
  managementTransport,
532
325
  sequenceCursorSchema,
533
326
  REFERRAL_INTEGRATION_REWARD_ERROR,
534
- containsReferralIntegrationReward,
535
- APP_SCHEDULE_LIMIT,
536
- APP_SCHEDULE_MIN_INTERVAL,
537
- APP_SCHEDULE_TIMEOUT,
538
- appScheduleNameSchema,
539
- appSchedulePathSchema,
540
- appScheduleSchema,
541
- appSchedulesSchema,
542
- nextScheduleRun,
543
- appScheduleStateSchema,
544
- appScheduleStateInputSchema,
545
- APP_SCHEDULE_RESULT_BYTES,
546
- appScheduleDiagnosticSchema,
547
- appScheduleResultSchema,
548
- scheduleResult,
549
- appScheduleRunSchema,
550
- appScheduleRunsSchema,
551
- appScheduleListSchema,
552
- scheduledInvocationSchema,
553
- verifyScheduledRequest
327
+ containsReferralIntegrationReward
554
328
  };
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  isRequestError
3
- } from "./chunk-GLH6MEI2.js";
3
+ } from "./chunk-EOUEAOWJ.js";
4
4
 
5
5
  // package.json
6
6
  var name = "@domino-sdk/relay";
7
- var version = "1.63.0";
7
+ var version = "1.65.0";
8
8
 
9
9
  // src/client-identity.ts
10
10
  function clientIdentity() {
@@ -2,7 +2,7 @@ import {
2
2
  RelayErrorCode,
3
3
  clientError,
4
4
  isRequestError
5
- } from "./chunk-GLH6MEI2.js";
5
+ } from "./chunk-EOUEAOWJ.js";
6
6
 
7
7
  // src/action.ts
8
8
  function withActionId(value) {