@domino-sdk/relay 1.0.0-next.4 → 1.0.0-next.6
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 +6 -0
- package/dist/authoring.js +13 -5
- package/dist/browser.d.ts +198 -185
- package/dist/browser.js +6 -6
- package/dist/{chunk-VH4OQ5VX.js → chunk-5IIWKDFX.js} +1 -1
- package/dist/{chunk-NKGJEYZM.js → chunk-BRESOTKV.js} +11 -1
- package/dist/{chunk-4KNTMNXA.js → chunk-ERBVT7GE.js} +4 -4
- package/dist/{chunk-FDWRBMB3.js → chunk-RTHN22KO.js} +2 -2
- package/dist/{chunk-ONDBQSMU.js → chunk-XEQDW7FM.js} +1 -1
- package/dist/{chunk-B76BAJ25.js → chunk-ZKJBCQNI.js} +2 -2
- package/dist/index.d.ts +415 -398
- package/dist/index.js +5 -5
- package/dist/portal-proxy.js +3 -3
- package/dist/react/index.d.ts +14 -0
- package/dist/react/index.js +6 -6
- package/dist/schema.d.ts +6 -0
- package/dist/schema.js +1 -1
- package/package.json +1 -1
package/dist/authoring.d.ts
CHANGED
|
@@ -326,6 +326,12 @@ declare function defineQuest<T extends Record<string, z.ZodType>, const G extend
|
|
|
326
326
|
*/
|
|
327
327
|
profile?: QuestProfile;
|
|
328
328
|
budgets?: Budget[];
|
|
329
|
+
/**
|
|
330
|
+
* Whether staff can review this quest's attempts. Human review is on unless this returns
|
|
331
|
+
* `{ enabled: false }`. With it off, `decision.review(...)` becomes a reject that keeps the
|
|
332
|
+
* review reason, and the attempt records `requestedReview: true`; Console shows "Would have
|
|
333
|
+
* gone to review; human review is off".
|
|
334
|
+
*/
|
|
329
335
|
review?: (ctx: {
|
|
330
336
|
settings: z.output<z.ZodObject<T>>;
|
|
331
337
|
}) => {
|
package/dist/authoring.js
CHANGED
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
defineReferral,
|
|
6
6
|
formatUnits,
|
|
7
7
|
parseUnits
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZKJBCQNI.js";
|
|
9
9
|
import {
|
|
10
10
|
isEvmChainId
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XEQDW7FM.js";
|
|
12
12
|
import {
|
|
13
13
|
admittedContentSchema,
|
|
14
14
|
budgetSchema,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
urlOptionsSchema,
|
|
41
41
|
x,
|
|
42
42
|
xAccountRoles
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-BRESOTKV.js";
|
|
44
44
|
|
|
45
45
|
// src/authoring.ts
|
|
46
46
|
import { z } from "zod";
|
|
@@ -298,7 +298,11 @@ function defineQuest(definition) {
|
|
|
298
298
|
kind: "review",
|
|
299
299
|
reason: result2.reason,
|
|
300
300
|
rewards: sample.rewards
|
|
301
|
-
} : {
|
|
301
|
+
} : {
|
|
302
|
+
kind: "reject",
|
|
303
|
+
reason: result2.reason,
|
|
304
|
+
...result2.kind === "review" ? { requestedReview: true } : {}
|
|
305
|
+
}
|
|
302
306
|
);
|
|
303
307
|
}
|
|
304
308
|
const result = definition.evaluate ? await definition.evaluate({
|
|
@@ -321,7 +325,11 @@ function defineQuest(definition) {
|
|
|
321
325
|
throw new Error("Evaluator returned no decision");
|
|
322
326
|
}
|
|
323
327
|
if (result.kind === "review" && !ctx.humanReview) {
|
|
324
|
-
return decisionSchema.parse({
|
|
328
|
+
return decisionSchema.parse({
|
|
329
|
+
kind: "reject",
|
|
330
|
+
reason: result.reason,
|
|
331
|
+
requestedReview: true
|
|
332
|
+
});
|
|
325
333
|
}
|
|
326
334
|
return decisionSchema.parse(
|
|
327
335
|
result.kind === "accept" || result.kind === "review" ? {
|