@domino-sdk/relay 1.0.0-next.3 → 1.0.0-next.5
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.
- package/dist/authoring.d.ts +2 -2
- package/dist/authoring.js +2 -8
- package/dist/browser.d.ts +163 -163
- package/dist/index.d.ts +394 -394
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +12 -4
- package/dist/{submission-input-jVvTh4Ed.d.ts → submission-input-CZDukyb3.d.ts} +7 -1
- package/package.json +1 -1
package/dist/authoring.d.ts
CHANGED
|
@@ -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-
|
|
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-
|
|
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
|
|
197
|
+
if (bareAutomatic && definition.completion.kind !== "once") {
|
|
204
198
|
throw new Error(
|
|
205
|
-
|
|
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) {
|