@domino-sdk/relay 1.0.0-next.3 → 1.0.0-next.4

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.
@@ -1,5 +1,5 @@
1
- import { A as AdmittedContent, O as Observation, T as TrackerTriggerContext, a as TrackerReader, X as XReader, I as ImageReader, D as DiscordMember, b as DiscordMessage, W as WalletConnection, S as SolanaBalance, L as LinkedWallet, c as WalletBalanceQuery, d as WalletBalance, e as TrackerDefinition, f as TrackerTriggerMode, g as TrackerWhere, o as observationTriggerSchema, h as TrackerTriggerPolicy, B as Budget, i as AuthoringIdentity, C as ContentMetric, j as IntegrationProvider, k as StreakPolicy, l as TextEvidence, U as UrlEvidence, m as TextOptions, n as UrlOptions } from './submission-input-jVvTh4Ed.js';
2
- export { E as EvmChainId, p as content, q as customSource, r as defineEngagementReward, s as defineLeaderboard, t as defineReferral, u as defineTracker, v as discord, w as formatUnits, x as isEvmChainId, y as parseUnits, z as perContent, F as pointLedgers, G as settings, H as streak, J as trackerTriggerContextSchema, K as x } from './submission-input-jVvTh4Ed.js';
1
+ import { A as AdmittedContent, O as Observation, T as TrackerTriggerContext, a as TrackerReader, X as XReader, I as ImageReader, D as DiscordMember, b as DiscordMessage, W as WalletConnection, S as SolanaBalance, L as LinkedWallet, c as WalletBalanceQuery, d as WalletBalance, e as TrackerDefinition, f as TrackerTriggerMode, g as TrackerWhere, o as observationTriggerSchema, h as TrackerTriggerPolicy, B as Budget, i as AuthoringIdentity, C as ContentMetric, j as IntegrationProvider, k as StreakPolicy, l as TextEvidence, U as UrlEvidence, m as TextOptions, n as UrlOptions } from './submission-input-CZDukyb3.js';
2
+ export { E as EvmChainId, p as content, q as customSource, r as defineEngagementReward, s as defineLeaderboard, t as defineReferral, u as defineTracker, v as discord, w as formatUnits, x as isEvmChainId, y as parseUnits, z as perContent, F as pointLedgers, G as settings, H as streak, J as trackerTriggerContextSchema, K as x } from './submission-input-CZDukyb3.js';
3
3
  import { z } from 'zod';
4
4
  import { TextReviewInput, TextResult, PhotoResult, rewardSchema, triggerSchema, QuestPresentation, QuestProfile, QuizEvidence, Decision, TieredRewardDefinition } from './schema.js';
5
5
 
package/dist/authoring.js CHANGED
@@ -182,27 +182,21 @@ function defineQuest(definition) {
182
182
  throw new Error("Performance requires a content trigger");
183
183
  }
184
184
  const trackerTrigger = definition.trigger.kind === "automatic" && definition.trigger.tracker !== void 0;
185
- if (trackerTrigger && definition.completion.kind === "streak") {
186
- throw new Error("Tracker triggers complete once() or keyed()");
187
- }
188
185
  const contentCompletion = "perContent" in definition.completion;
189
186
  if (contentTrigger !== contentCompletion) {
190
187
  throw new Error(
191
188
  "Content triggers require perContent completion, and perContent requires a content trigger"
192
189
  );
193
190
  }
194
- if (definition.completion.kind === "streak" && (definition.trigger.kind !== "automatic" || !definition.trigger.observation)) {
195
- throw new Error("Streaks require an automatic observation trigger");
196
- }
197
191
  const bareAutomatic = definition.trigger.kind === "automatic" && !definition.trigger.observation && !definition.trigger.content && !definition.trigger.tracker;
198
192
  if (bareAutomatic && !definition.requires?.length) {
199
193
  throw new Error(
200
194
  "A bare automatic() quest needs at least one requires entry, such as requires: [completed(quest)]. Give it an observation, content or tracker trigger, or a prerequisite."
201
195
  );
202
196
  }
203
- if (bareAutomatic && definition.completion.kind === "keyed") {
197
+ if (bareAutomatic && definition.completion.kind !== "once") {
204
198
  throw new Error(
205
- "A bare automatic() quest cannot use keyed() completion. Give it an observation, content or tracker trigger, or use once()."
199
+ `A bare automatic() quest cannot use ${definition.completion.kind}() completion. Give it a tracker or observation trigger, or use once().`
206
200
  );
207
201
  }
208
202
  if (definition.trigger.kind === "manual" && definition.trigger.input !== "none" && !definition.evaluate) {