@domino-sdk/relay 1.0.0-next.12 → 1.0.0-next.14
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 +34 -34
- package/dist/authoring.js +10 -3
- package/dist/browser.d.ts +95 -102
- package/dist/browser.js +6 -6
- package/dist/{catalog-qrYne8qV.d.ts → catalog-C85V1NgW.d.ts} +73 -79
- package/dist/{chunk-YYD4QUBO.js → chunk-CRNQP7NV.js} +550 -470
- package/dist/{chunk-22J4K7ED.js → chunk-F5OCJE52.js} +4 -4
- package/dist/{chunk-EWFB35JW.js → chunk-FWRP6YAQ.js} +7 -3
- package/dist/{chunk-7Q4BGGT6.js → chunk-FXYJ4OMX.js} +1 -1
- package/dist/{chunk-NZA2TLBF.js → chunk-HAOW4ERY.js} +23 -8
- package/dist/{chunk-4LBUTHD6.js → chunk-II7DRZSL.js} +1 -1
- package/dist/{chunk-LY7SXUNW.js → chunk-K4ANDR6G.js} +4 -4
- package/dist/{chunk-UW5CQHPQ.js → chunk-MNQI35OG.js} +3 -3
- package/dist/{chunk-5L7XZA4Y.js → chunk-TLGCEVG5.js} +41 -25
- package/dist/{client-CW72TaAs.d.ts → client-Bf9PNUIi.d.ts} +18 -25
- package/dist/{deployments-Bc0dPSXN.d.ts → deployments-gbA8IZCK.d.ts} +365 -234
- package/dist/{images-D0Txfte6.d.ts → images-BG4pdO4y.d.ts} +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/internal.d.ts +3 -3
- package/dist/internal.js +4 -4
- package/dist/{observations-bFY4yv2K.d.ts → observations-CQ6IcNuQ.d.ts} +3 -3
- package/dist/portal-proxy.js +2 -2
- package/dist/react/index.d.ts +450 -624
- package/dist/react/index.js +1189 -809
- package/dist/{referrals-CvSmxvjm.d.ts → referrals-KQfP4pBf.d.ts} +189 -102
- package/dist/{schema-ZfjL-d1N.d.ts → schema-BF_TQsmT.d.ts} +338 -47
- package/dist/schema.d.ts +8 -8
- package/dist/schema.js +28 -8
- package/dist/server/index.d.ts +542 -508
- package/dist/server/index.js +31 -7
- package/dist/{streaks-CwGReWGt.d.ts → streaks-CWyq8Px5.d.ts} +2 -4
- package/dist/{trackers-BsUh5Ky0.d.ts → trackers-W7nRdRr7.d.ts} +1 -1
- package/package.json +4 -2
package/dist/authoring.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export { z } from 'zod';
|
|
3
|
-
import { e as ContentPolicy, C as ContentMetric, E as
|
|
4
|
-
import { Q as QuizContent, a as StreakPolicy } from './streaks-
|
|
3
|
+
import { e as ContentPolicy, C as ContentMetric, E as EngagementBudget, T as leaderboardDefinitionSchema, a9 as referralAuthoringSchema, A as AdmittedContent } from './referrals-KQfP4pBf.js';
|
|
4
|
+
import { Q as QuizContent, a as StreakPolicy } from './streaks-CWyq8Px5.js';
|
|
5
5
|
import { b as ResourceSource, S as Setting, g as XReader, I as IntegerSettings, a as IntegrationProvider } from './integrations-EjQzIApL.js';
|
|
6
|
-
import { j as TrackerDefinition, I as IdentityKind, J as customSourceSchema, F as WithRecordData, t as TrackerSource, a1 as trackerDefinitionSchema,
|
|
7
|
-
export {
|
|
8
|
-
import { e as ImageReader } from './images-
|
|
9
|
-
import { O as Observation, D as DiscordMessage, h as observationTriggerSchema, B as Budget } from './observations-
|
|
6
|
+
import { j as TrackerDefinition, I as IdentityKind, J as customSourceSchema, F as WithRecordData, t as TrackerSource, a1 as trackerDefinitionSchema, T as Tracker, g as TrackerData, au as xSearchSourceSchema, X as XTweet, v as TrackerTriggerContext, x as TrackerTriggerPolicy, q as TrackerReader, W as Where, w as TrackerTriggerMode, E as WhereSetting } from './trackers-W7nRdRr7.js';
|
|
7
|
+
export { i as TrackerDataSchema, m as TrackerPage, aw as trackerDataSchema, ak as trackerTriggerContextSchema } from './trackers-W7nRdRr7.js';
|
|
8
|
+
import { e as ImageReader } from './images-BG4pdO4y.js';
|
|
9
|
+
import { O as Observation, D as DiscordMessage, h as observationTriggerSchema, B as Budget } from './observations-CQ6IcNuQ.js';
|
|
10
10
|
import { D as DiscordMember, T as TextEvidence, U as UrlEvidence, b as TextOptions, c as UrlOptions } from './submission-input-CccwAl5Z.js';
|
|
11
|
-
import { n as TextReviewInput, m as TextResult, P as PhotoResult, ag as rewardSchema,
|
|
11
|
+
import { n as TextReviewInput, m as TextResult, P as PhotoResult, ag as rewardSchema, av as triggerSchema, Q as QuestPresentation, a as QuestProfile, b as QuizEvidence, D as Decision, o as TieredRewardDefinition } from './schema-BF_TQsmT.js';
|
|
12
12
|
import { k as WalletConnection, S as SolanaBalance, L as LinkedWallet, j as WalletBalanceQuery, i as WalletBalance } from './wallet-BtiG0Xhr.js';
|
|
13
13
|
export { E as EvmChainId, r as isEvmChainId } from './wallet-BtiG0Xhr.js';
|
|
14
14
|
export { f as formatUnits, p as parseUnits } from './units-CwgsPB_r.js';
|
|
@@ -53,7 +53,7 @@ declare function defineEngagementReward<const M extends readonly [ContentMetric,
|
|
|
53
53
|
metrics: M;
|
|
54
54
|
baseline: "historical";
|
|
55
55
|
maxAgeMs?: number;
|
|
56
|
-
|
|
56
|
+
budgets?: EngagementBudget[];
|
|
57
57
|
target: (input: {
|
|
58
58
|
metrics: Record<M[number], number>;
|
|
59
59
|
}) => number;
|
|
@@ -66,11 +66,11 @@ declare function defineEngagementReward<const M extends readonly [ContentMetric,
|
|
|
66
66
|
metrics: ("likes" | "replies" | "reposts" | "quotes" | "views" | "bookmarks")[];
|
|
67
67
|
baseline: "historical";
|
|
68
68
|
maxAgeMs: number;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
};
|
|
69
|
+
budgets: {
|
|
70
|
+
scope: "member" | "project";
|
|
71
|
+
period: "day" | "lifetime" | "week" | "month";
|
|
72
|
+
limit: number;
|
|
73
|
+
}[];
|
|
74
74
|
};
|
|
75
75
|
score(raw: unknown): {
|
|
76
76
|
target: number;
|
|
@@ -78,13 +78,16 @@ declare function defineEngagementReward<const M extends readonly [ContentMetric,
|
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
80
|
/**
|
|
81
|
-
* One milestone per quest, after `days` consecutive
|
|
82
|
-
* Multiple accepted attempts occupy one day. The day comes from the attempt's trusted
|
|
83
|
-
* time: a tracker record's (or observation's) `occurredAt` for `automatic({ tracker })`,
|
|
84
|
-
* submission's admission time for `manual()`, so a manual streak counts the days a member
|
|
85
|
-
* submitted.
|
|
81
|
+
* One milestone per quest, after `days` consecutive project calendar days with an accepted
|
|
82
|
+
* attempt. Multiple accepted attempts occupy one day. The day comes from the attempt's trusted
|
|
83
|
+
* occurrence time: a tracker record's (or observation's) `occurredAt` for `automatic({ tracker })`,
|
|
84
|
+
* and the submission's admission time for `manual()`, so a manual streak counts the days a member
|
|
85
|
+
* submitted. Days begin at midnight in the project timezone (`calendar.timeZone` in relay.json, or
|
|
86
|
+
* Console settings). Not available on content quests or prerequisite-only `automatic()`.
|
|
86
87
|
*/
|
|
87
|
-
declare const streak: (options:
|
|
88
|
+
declare const streak: (options: {
|
|
89
|
+
days: number;
|
|
90
|
+
}) => StreakPolicy;
|
|
88
91
|
declare function defineReferral(input: Omit<z.input<typeof referralAuthoringSchema>, "key" | "id"> & AuthoringIdentity): {
|
|
89
92
|
id: string;
|
|
90
93
|
title: string;
|
|
@@ -181,10 +184,10 @@ declare function defineReferral(input: Omit<z.input<typeof referralAuthoringSche
|
|
|
181
184
|
}[];
|
|
182
185
|
key: string;
|
|
183
186
|
};
|
|
184
|
-
declare function defineLeaderboard(input: Omit<z.input<typeof
|
|
187
|
+
declare function defineLeaderboard(input: Omit<z.input<typeof leaderboardDefinitionSchema>, "key" | "id"> & AuthoringIdentity): {
|
|
185
188
|
id: string;
|
|
186
|
-
balance: string;
|
|
187
189
|
title: string;
|
|
190
|
+
balance: string;
|
|
188
191
|
group?: string | undefined;
|
|
189
192
|
score: {
|
|
190
193
|
kind: "balance";
|
|
@@ -201,7 +204,6 @@ declare function defineLeaderboard(input: Omit<z.input<typeof leaderboardAuthori
|
|
|
201
204
|
} | {
|
|
202
205
|
kind: "calendar";
|
|
203
206
|
period: "day" | "week" | "month";
|
|
204
|
-
timeZone: string;
|
|
205
207
|
};
|
|
206
208
|
kind: "earned";
|
|
207
209
|
quests?: string[] | undefined;
|
|
@@ -219,7 +221,6 @@ declare function defineLeaderboard(input: Omit<z.input<typeof leaderboardAuthori
|
|
|
219
221
|
} | {
|
|
220
222
|
kind: "calendar";
|
|
221
223
|
period: "day" | "week" | "month";
|
|
222
|
-
timeZone: string;
|
|
223
224
|
};
|
|
224
225
|
};
|
|
225
226
|
access: "participants" | "public";
|
|
@@ -449,7 +450,7 @@ type KeyedContext = {
|
|
|
449
450
|
declare const budget: (definition: Budget) => {
|
|
450
451
|
id: string;
|
|
451
452
|
scope: "member" | "project";
|
|
452
|
-
period: "
|
|
453
|
+
period: "day" | "lifetime" | "week" | "month";
|
|
453
454
|
limit: number;
|
|
454
455
|
cost: number | {
|
|
455
456
|
balance: string;
|
|
@@ -743,12 +744,12 @@ declare function defineQuest<T extends Record<string, Setting>, const G extends
|
|
|
743
744
|
kind: "resource";
|
|
744
745
|
default: string;
|
|
745
746
|
source: {
|
|
746
|
-
provider: "domino";
|
|
747
|
-
resource: "point-ledger";
|
|
748
|
-
} | {
|
|
749
747
|
provider: "discord";
|
|
750
748
|
resource: "channel";
|
|
751
749
|
types: ("text" | "announcement")[];
|
|
750
|
+
} | {
|
|
751
|
+
provider: "domino";
|
|
752
|
+
resource: "point-ledger";
|
|
752
753
|
} | {
|
|
753
754
|
provider: "discord";
|
|
754
755
|
resource: "role";
|
|
@@ -898,7 +899,7 @@ declare function defineQuest<T extends Record<string, Setting>, const G extends
|
|
|
898
899
|
minLength: number;
|
|
899
900
|
maxLength: number;
|
|
900
901
|
};
|
|
901
|
-
actor?: "
|
|
902
|
+
actor?: "member" | "staff" | undefined;
|
|
902
903
|
} | {
|
|
903
904
|
kind: "manual";
|
|
904
905
|
input: "url";
|
|
@@ -906,11 +907,11 @@ declare function defineQuest<T extends Record<string, Setting>, const G extends
|
|
|
906
907
|
required: boolean;
|
|
907
908
|
allowedHosts?: string[] | undefined;
|
|
908
909
|
};
|
|
909
|
-
actor?: "
|
|
910
|
+
actor?: "member" | "staff" | undefined;
|
|
910
911
|
} | {
|
|
911
912
|
kind: "manual";
|
|
912
|
-
input: "
|
|
913
|
-
actor?: "
|
|
913
|
+
input: "quiz" | "photo" | "none";
|
|
914
|
+
actor?: "member" | "staff" | undefined;
|
|
914
915
|
};
|
|
915
916
|
requires: {
|
|
916
917
|
quest: string;
|
|
@@ -918,17 +919,16 @@ declare function defineQuest<T extends Record<string, Setting>, const G extends
|
|
|
918
919
|
completion: {
|
|
919
920
|
kind: "streak";
|
|
920
921
|
days: number;
|
|
921
|
-
timeZone: string;
|
|
922
922
|
} | {
|
|
923
923
|
kind: "once";
|
|
924
924
|
} | {
|
|
925
925
|
kind: "keyed";
|
|
926
926
|
};
|
|
927
|
-
visibility: "
|
|
927
|
+
visibility: "hidden" | "visible";
|
|
928
928
|
budgets: {
|
|
929
929
|
id: string;
|
|
930
930
|
scope: "member" | "project";
|
|
931
|
-
period: "
|
|
931
|
+
period: "day" | "lifetime" | "week" | "month";
|
|
932
932
|
limit: number;
|
|
933
933
|
cost: number | {
|
|
934
934
|
balance: string;
|
package/dist/authoring.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
isEvmChainId,
|
|
11
11
|
leaderboardAuthoringSchema,
|
|
12
12
|
referralAuthoringSchema
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TLGCEVG5.js";
|
|
14
14
|
import {
|
|
15
15
|
admittedContentSchema,
|
|
16
16
|
budgetSchema,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
whereSettings,
|
|
49
49
|
xAccountRoles,
|
|
50
50
|
xSearchSourceSchema
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-CRNQP7NV.js";
|
|
52
52
|
|
|
53
53
|
// src/builders.ts
|
|
54
54
|
import { z } from "zod";
|
|
@@ -99,7 +99,14 @@ function defineEngagementReward(input) {
|
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
var streak = (options) =>
|
|
102
|
+
var streak = (options) => {
|
|
103
|
+
if ("timeZone" in options) {
|
|
104
|
+
throw new Error(
|
|
105
|
+
"streak() no longer takes a timeZone. Set the project timezone with calendar.timeZone in relay.json or in Console settings."
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
return streakPolicySchema.strict().parse({ kind: "streak", ...options });
|
|
109
|
+
};
|
|
103
110
|
function defineReferral(input) {
|
|
104
111
|
const definition = referralAuthoringSchema.parse(input);
|
|
105
112
|
return {
|