@domino-sdk/relay 1.60.0 → 1.62.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.
- package/CHANGELOG.md +175 -8
- package/README.md +3 -2
- package/dist/{schema-CwbRkmlr.d.ts → accounts-CCqCKCVx.d.ts} +3127 -1764
- package/dist/action-9Xl0StBg.d.ts +33 -0
- package/dist/{analytics-URV-mxjH.d.ts → analytics-BwAKLi7O.d.ts} +347 -3
- package/dist/{attempt-captures-W2dgzGqE.d.ts → attempt-captures-Cm-5G0PC.d.ts} +1 -1
- package/dist/authoring.d.ts +130 -42
- package/dist/authoring.js +105 -19
- package/dist/{automatic-outcomes-Cmou89IS.d.ts → automatic-outcomes-pAsOyIVp.d.ts} +5 -1
- package/dist/avatar.d.ts +1 -1
- package/dist/browser.d.ts +15 -11
- package/dist/browser.js +15 -11
- package/dist/{integrations-CmIkP1Gi.d.ts → capability-error-DFMwSuSf.d.ts} +160 -42
- package/dist/{pages-Bti7g5mX.d.ts → catalog--ZIlskAo.d.ts} +39 -561
- package/dist/{chunk-N3LJ6GFK.js → chunk-3KLC4AMA.js} +40 -11
- package/dist/{chunk-6ZG7WNYX.js → chunk-3PYYGFSB.js} +14 -2
- package/dist/{chunk-VWMIA2TT.js → chunk-5TEYFX6X.js} +2 -2
- package/dist/chunk-6WCIWXUV.js +31 -0
- package/dist/chunk-CICDIBOF.js +373 -0
- package/dist/{chunk-MHPKEVEW.js → chunk-CZFXGGEK.js} +5 -0
- package/dist/chunk-D26YNACF.js +320 -0
- package/dist/{chunk-KUPVQXUJ.js → chunk-E6IKQHTX.js} +2 -2
- package/dist/chunk-FWLQ5XCS.js +21 -0
- package/dist/{chunk-VVRQQRMQ.js → chunk-GKIFABGN.js} +150 -61
- package/dist/chunk-GTDW453U.js +522 -0
- package/dist/{chunk-Y2IGFLD2.js → chunk-HTZHBTIL.js} +69 -27
- package/dist/chunk-K2KS3JLY.js +188 -0
- package/dist/{chunk-GBSDAD3N.js → chunk-MK425RXJ.js} +3140 -3202
- package/dist/{chunk-YOAPPIWN.js → chunk-QYPMPWVX.js} +1 -1
- package/dist/chunk-UAKYDVT3.js +565 -0
- package/dist/{chunk-KWFY7L7X.js → chunk-UPQPUJOU.js} +36 -123
- package/dist/{chunk-2FHNY52R.js → chunk-UW5232GG.js} +65 -19
- package/dist/chunk-WSBYWVTZ.js +717 -0
- package/dist/{chunk-422J3QRW.js → chunk-XJFYAXET.js} +9 -8
- package/dist/{chunk-OTEUP2SG.js → chunk-XNKSSE32.js} +1 -1
- package/dist/{chunk-4OFH4BNX.js → chunk-Y322OTCH.js} +1 -1
- package/dist/{client-Cw1pB5sv.d.ts → client-B-hbHX30.d.ts} +109 -40
- package/dist/{deployments-DI-W7fBq.d.ts → deployments-M4OHn7G3.d.ts} +407 -18
- package/dist/identity-integration-3mX6b5iH.d.ts +1241 -0
- package/dist/index.d.ts +13 -11
- package/dist/index.js +14 -11
- package/dist/internal.d.ts +14 -12
- package/dist/internal.js +26 -14
- package/dist/{offers-CqXfMIxq.d.ts → offers-DhAtss4_.d.ts} +21 -4
- package/dist/pages-B8q8Y_dQ.d.ts +715 -0
- package/dist/{participant-activity-DHL8QYks.d.ts → participant-activity-D-Drp24G.d.ts} +16 -3
- package/dist/portal-proxy.d.ts +59 -2
- package/dist/portal-proxy.js +109 -23
- package/dist/react/index.d.ts +211 -27
- package/dist/react/index.js +286 -29
- package/dist/{action-DBzILFx9.d.ts → request-error-D_dUPLwo.d.ts} +1 -31
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/Y4OAVXFR.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/schema.d.ts +154 -30
- package/dist/schema.js +128 -75
- package/dist/server/index.d.ts +14 -12
- package/dist/server/index.js +2189 -1631
- package/dist/sign-in-providers-BkjcDsFF.d.ts +39 -0
- package/dist/submission-input-DHGKhXfp.d.ts +342 -0
- package/dist/{telegram-browser-CTJh4Ro_.d.ts → telegram-browser-BCE7zdOb.d.ts} +49 -6
- package/dist/telegram.d.ts +64 -0
- package/dist/telegram.js +23 -0
- package/dist/testing.d.ts +112 -15
- package/dist/testing.js +321 -16
- package/dist/tracker-data-Hb1uQnk5.d.ts +1855 -0
- package/dist/{transport-B8Ss5lcz.d.ts → transport-DkhX2Cbs.d.ts} +5863 -2217
- package/dist/{wallet-DZWL7lJH.d.ts → wallet-DTO7SXj7.d.ts} +27 -7
- package/package.json +5 -1
- package/dist/accounts-DoabriBX.d.ts +0 -306
- package/dist/capability-error-DufwG3G0.d.ts +0 -159
- package/dist/chunk-MJEJQH5A.js +0 -962
- package/dist/chunk-N7YOS4ZU.js +0 -13
- package/dist/chunk-XQKUJL7H.js +0 -602
- package/dist/chunk-YNW2ZUUP.js +0 -247
- package/dist/groups-9Jm3peq3.d.ts +0 -2827
- package/dist/runtime/chunks/ADUMK6CR.js +0 -1
- package/dist/submission-input-D9EGH_yb.d.ts +0 -146
- package/dist/x-KFJD2x8y.d.ts +0 -331
package/dist/authoring.d.ts
CHANGED
|
@@ -1,25 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import { M as
|
|
4
|
-
export {
|
|
5
|
-
import {
|
|
6
|
-
export {
|
|
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-CCqCKCVx.js';
|
|
2
|
+
export { ah as KnownIntegrationModuleProvider, ai as defineCampaign, aj as defineGroup } from './accounts-CCqCKCVx.js';
|
|
3
|
+
import { x as xContentBodySchema, I as IdentityKind, g as customSourceSchema, W as WithRecordData, h as WithContent, i as WithAccountRoles, R as ResourceHandle, Q as QuestHandle, L as LedgerReference, G as GroupHandle, j as TrackerSource, k as trackerDefinitionSchema, l as Tracker, m as TrackerData, S as SourceRoles, n as LedgerHandle, f as TrackerDataSchema, o as xSearchSourceSchema, X as XTweet, p as XContentMetric, q as TrackerTriggerPolicy, r as Where, M as MemberIdentity, u as ReferralHandle, v as TrackerTriggerContext, y as TrackerReader, z as TrackerTriggerMode, A as RoleOf, B as WhereSetting, C as ContentBody, D as BadgeHandle, E as ContentMetricName } from './tracker-data-Hb1uQnk5.js';
|
|
4
|
+
export { F as LedgerSetting, H as TrackerPage, J as TrackerReadQuery, N as trackerDataSchema, P as trackerTriggerContextSchema } from './tracker-data-Hb1uQnk5.js';
|
|
5
|
+
import { R as ResourceSource, S as Setting, A as AmountSetting, B as BalanceChain, M as MemberCompletion, a as Budget, b as AuthorBudget, c as BoundSettings, d as Announcement } from './capability-error-DFMwSuSf.js';
|
|
6
|
+
export { C as CapabilityError, e as CapabilityErrorCode, D as DashboardInput, f as DashboardPanelInput, T as TikTokVideoBody, g as TikTokVideoMetric, Y as YouTubeShortBody, h as YouTubeShortMetric, i as capabilityErrorCodes, j as defineDashboard } from './capability-error-DFMwSuSf.js';
|
|
7
|
+
import { N as NftCollection, o as ContractCall, p as ContractEvent, q as SolanaProgram, r as WalletBalanceSourceQuery, s as WalletTransaction, t as WalletInstruction, e as ProfileReferral, u as WalletReader } from './wallet-DTO7SXj7.js';
|
|
8
|
+
export { v as ContractCallParts, w as ContractCallReturnType, x as ContractEventInput, y as ContractEventParts, z as ContractFunction, B as CosmosDenom, a as CosmosNetwork, E as EvmChainId, D as NftCollectionParts, F as NftStandard, G as WalletBalance, H as WalletBalanceChange, I 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-DTO7SXj7.js';
|
|
7
9
|
import * as z from 'zod';
|
|
8
10
|
export { z } from 'zod';
|
|
9
|
-
import {
|
|
10
|
-
export { g as defineOffer } from './offers-CqXfMIxq.js';
|
|
11
|
-
import { E as EngagementBudget, m as leaderboardDefinitionSchema, l as AuthoringIdentity, r as referralAuthoringSchema, C as CampaignDefinition, A as AvailabilityWindow } from './groups-9Jm3peq3.js';
|
|
12
|
-
export { n as defineCampaign, o as defineGroup } from './groups-9Jm3peq3.js';
|
|
13
|
-
import { d as discordMessagesSourceSchema, D as DiscordMessageData, c as DiscordMessageTextData, e as discordReactionsSourceSchema, f as DiscordReactionData, g as TelegramReader, h as DiscordReader } from './accounts-DoabriBX.js';
|
|
14
|
-
export { i as TelegramChatMember, j as TelegramChatMemberStatus, k as TelegramMessageData, l as TelegramReactionData } from './accounts-DoabriBX.js';
|
|
11
|
+
import { g as badgeDeclarationSchema, h as OfferAuthoring, B as Badge } from './offers-DhAtss4_.js';
|
|
15
12
|
import { a as StreakPolicy, Q as QuizContent } from './streaks-0YuipsUQ.js';
|
|
16
|
-
import {
|
|
17
|
-
export {
|
|
18
|
-
import {
|
|
19
|
-
export { c as balanceAtLeast, d as completed, i as inGroup } from './submission-input-D9EGH_yb.js';
|
|
20
|
-
import { I as ImageReader, X as XReader } from './x-KFJD2x8y.js';
|
|
13
|
+
import { e as TelegramReader, P as Prerequisite, b as TextEvidence, U as UrlEvidence, c as TextOptions, d as UrlOptions } from './submission-input-DHGKhXfp.js';
|
|
14
|
+
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-DHGKhXfp.js';
|
|
15
|
+
import { I as ImageReader, X as XReader } from './analytics-BwAKLi7O.js';
|
|
21
16
|
export { f as formatUnits, p as parseUnits } from './units-CwgsPB_r.js';
|
|
22
|
-
import './analytics-URV-mxjH.js';
|
|
23
17
|
|
|
24
18
|
declare function defineBadge(input: z.input<typeof badgeDeclarationSchema>): {
|
|
25
19
|
name: string;
|
|
@@ -110,6 +104,64 @@ declare const questCompleted: (quest: QuestHandle) => {
|
|
|
110
104
|
kind: "quest";
|
|
111
105
|
quest: QuestHandle;
|
|
112
106
|
};
|
|
107
|
+
/**
|
|
108
|
+
* Define one points-priced offer for a tier reward. The reward title is used when no title is set.
|
|
109
|
+
* Badge and group rewards throw: only quests grant them.
|
|
110
|
+
*/
|
|
111
|
+
declare function defineOffer(input: OfferAuthoring & AuthoringIdentity): {
|
|
112
|
+
title: string;
|
|
113
|
+
enabled: boolean;
|
|
114
|
+
limit: {
|
|
115
|
+
perMember: number;
|
|
116
|
+
};
|
|
117
|
+
reward: {
|
|
118
|
+
kind: "tier";
|
|
119
|
+
reward: {
|
|
120
|
+
id: string;
|
|
121
|
+
title: string;
|
|
122
|
+
tiers: {
|
|
123
|
+
id: string;
|
|
124
|
+
title: string;
|
|
125
|
+
}[];
|
|
126
|
+
inventory: {
|
|
127
|
+
kind: "untracked";
|
|
128
|
+
};
|
|
129
|
+
fulfillment: {
|
|
130
|
+
kind: "staff-handover";
|
|
131
|
+
} | {
|
|
132
|
+
kind: "automatic";
|
|
133
|
+
};
|
|
134
|
+
badge?: string | undefined;
|
|
135
|
+
group?: string | undefined;
|
|
136
|
+
};
|
|
137
|
+
tier: string;
|
|
138
|
+
};
|
|
139
|
+
price: {
|
|
140
|
+
kind: "points";
|
|
141
|
+
balance: string;
|
|
142
|
+
amount: number;
|
|
143
|
+
};
|
|
144
|
+
stock: number;
|
|
145
|
+
key: string;
|
|
146
|
+
requires?: ({
|
|
147
|
+
kind: "completion";
|
|
148
|
+
quest: string;
|
|
149
|
+
scope: "ever";
|
|
150
|
+
} | {
|
|
151
|
+
kind: "completion";
|
|
152
|
+
quest: string;
|
|
153
|
+
scope: "period";
|
|
154
|
+
period: "day" | "week" | "month";
|
|
155
|
+
} | {
|
|
156
|
+
kind: "balance";
|
|
157
|
+
balance: string;
|
|
158
|
+
minimum: number;
|
|
159
|
+
} | {
|
|
160
|
+
kind: "group";
|
|
161
|
+
group: string;
|
|
162
|
+
title: string;
|
|
163
|
+
})[] | undefined;
|
|
164
|
+
} & ResourceHandle<"offer">;
|
|
113
165
|
type ReferralInput = z.input<typeof referralAuthoringSchema>;
|
|
114
166
|
type ReferralBonus = NonNullable<ReferralInput["bonuses"]>[number];
|
|
115
167
|
type ReferralMilestone = NonNullable<ReferralInput["milestones"]>[number];
|
|
@@ -312,6 +364,7 @@ declare function defineLeaderboard(input: Omit<LeaderboardInput, "key" | "id" |
|
|
|
312
364
|
};
|
|
313
365
|
};
|
|
314
366
|
key: string;
|
|
367
|
+
ties?: "shared" | "earliest" | undefined;
|
|
315
368
|
includeUnscored?: boolean | undefined;
|
|
316
369
|
settle?: {
|
|
317
370
|
at: "window-end";
|
|
@@ -840,6 +893,10 @@ declare function invoked(tx: WalletTransaction, program: string): boolean;
|
|
|
840
893
|
*/
|
|
841
894
|
declare function instruction(tx: WalletTransaction, name: string): WalletInstruction["args"] | null;
|
|
842
895
|
|
|
896
|
+
/**
|
|
897
|
+
* A reward that awards the member this badge. Quests grant it, and operators by hand; offers,
|
|
898
|
+
* leaderboard prizes and referral programs throw when given one.
|
|
899
|
+
*/
|
|
843
900
|
declare const badge: (definition: BadgeHandle & Pick<Badge, "name">) => {
|
|
844
901
|
reward: {
|
|
845
902
|
badge: string;
|
|
@@ -866,7 +923,8 @@ declare const badge: (definition: BadgeHandle & Pick<Badge, "name">) => {
|
|
|
866
923
|
* A reward that adds the member to a group when the completion's rewards are delivered. Publishing
|
|
867
924
|
* the quest creates the group, with no members, where it is missing; an archived group refuses.
|
|
868
925
|
* Revoking the completion removes the membership unless an operator's add or another unrevoked
|
|
869
|
-
* completion also backs it.
|
|
926
|
+
* completion also backs it. Only quests grant it; offers, leaderboard prizes and referral programs
|
|
927
|
+
* throw when given one.
|
|
870
928
|
*/
|
|
871
929
|
declare const groupMembership: (group: GroupHandle) => {
|
|
872
930
|
reward: {
|
|
@@ -982,10 +1040,11 @@ type TrackerTriggerInput<T extends Tracker = Tracker, W extends Where<TrackerDat
|
|
|
982
1040
|
*/
|
|
983
1041
|
where?: W;
|
|
984
1042
|
/**
|
|
985
|
-
* The record account whose member the quest pays: `"author"` (the default), `"inReplyTo"
|
|
986
|
-
* an X tracker, `"messageAuthor"` on a Discord reactions tracker,
|
|
987
|
-
* source declares in `accounts`. Skipped when that account is the
|
|
988
|
-
* belongs to the author's member, such as a reaction to one's own
|
|
1043
|
+
* The record account whose member the quest pays: `"author"` (the default), `"inReplyTo"`,
|
|
1044
|
+
* `"quoted"` or `"reposted"` on an X tracker, `"messageAuthor"` on a Discord reactions tracker,
|
|
1045
|
+
* or a named account a custom source declares in `accounts`. Skipped when that account is the
|
|
1046
|
+
* record's author account or belongs to the author's member, such as a reaction to one's own
|
|
1047
|
+
* message.
|
|
989
1048
|
*/
|
|
990
1049
|
beneficiary?: RoleOf<T>;
|
|
991
1050
|
/**
|
|
@@ -1126,7 +1185,18 @@ declare const budget: {
|
|
|
1126
1185
|
(definition: BudgetDefinition<Budget>): Budget;
|
|
1127
1186
|
(definition: BudgetDefinition<AuthorBudget>): AuthorBudget;
|
|
1128
1187
|
};
|
|
1129
|
-
|
|
1188
|
+
/** Options of a `keyed(...)` completion. */
|
|
1189
|
+
type KeyedOptions = {
|
|
1190
|
+
/**
|
|
1191
|
+
* `"members"`: each key completes the quest once in the whole project and environment, for
|
|
1192
|
+
* whichever member uses it first, such as a single-use code or a post that pays once. Another
|
|
1193
|
+
* member's attempt with a used key is rejected with `key-used`. Without it, each member
|
|
1194
|
+
* completes the quest once per key.
|
|
1195
|
+
*/
|
|
1196
|
+
across?: "members";
|
|
1197
|
+
};
|
|
1198
|
+
declare const keyed: (key: (ctx: KeyedContext) => string, options?: KeyedOptions) => {
|
|
1199
|
+
across?: "members" | undefined;
|
|
1130
1200
|
kind: "keyed";
|
|
1131
1201
|
key: (ctx: KeyedContext) => string;
|
|
1132
1202
|
};
|
|
@@ -1358,13 +1428,19 @@ type EvaluationCalendar = {
|
|
|
1358
1428
|
* the trigger that supplies them and null otherwise. `G` defaults to `any`, which
|
|
1359
1429
|
* leaves them nullable and lets a shared evaluator, such as `evaluators.photo()`, fit every quest.
|
|
1360
1430
|
*/
|
|
1361
|
-
|
|
1431
|
+
/**
|
|
1432
|
+
* The declared modules this SDK has readers for. A module it does not know types no reader; an
|
|
1433
|
+
* array typed `IntegrationModule[]`, whose providers are not literals, types every known reader,
|
|
1434
|
+
* as before modules opened.
|
|
1435
|
+
*/
|
|
1436
|
+
type KnownModules<D extends readonly IntegrationModule[]> = readonly (D[number] extends infer Module extends IntegrationModule ? Module extends KnownIntegrationModule ? Module : string extends Module["provider"] ? KnownIntegrationModule : never : never)[];
|
|
1437
|
+
type IntegrationReaders<D extends readonly KnownIntegrationModule[]> = Pick<{
|
|
1362
1438
|
x: XReader;
|
|
1363
1439
|
discord: DiscordReader;
|
|
1364
1440
|
}, D[number]["provider"]>;
|
|
1365
1441
|
type EvaluationContext<T, I = {
|
|
1366
1442
|
photo: string;
|
|
1367
|
-
}, G = any, D extends readonly
|
|
1443
|
+
}, G = any, D extends readonly KnownIntegrationModule[] = readonly KnownIntegrationModule[]> = {
|
|
1368
1444
|
settings: T;
|
|
1369
1445
|
member: EvaluationMember;
|
|
1370
1446
|
input: I;
|
|
@@ -1404,15 +1480,15 @@ type EvaluationContext<T, I = {
|
|
|
1404
1480
|
};
|
|
1405
1481
|
wallet: WalletReader;
|
|
1406
1482
|
/**
|
|
1407
|
-
* Telegram membership in the chats the project connected.
|
|
1408
|
-
* Relay provides it to every quest from SDK 1.23.0 on, and it
|
|
1409
|
-
* test contexts that do not supply it.
|
|
1483
|
+
* The member's linked Telegram account and their membership in the chats the project connected.
|
|
1484
|
+
* It needs no `integrations` entry; Relay provides it to every quest from SDK 1.23.0 on, and it
|
|
1485
|
+
* is absent from older runtimes and test contexts that do not supply it.
|
|
1410
1486
|
*/
|
|
1411
1487
|
telegram?: TelegramReader;
|
|
1412
1488
|
} & IntegrationReaders<D>;
|
|
1413
1489
|
type Evaluator<T, I = {
|
|
1414
1490
|
photo: string;
|
|
1415
|
-
}, G = any, D extends readonly
|
|
1491
|
+
}, G = any, D extends readonly KnownIntegrationModule[] = readonly []> = (ctx: EvaluationContext<T, I, G, D>) => Promise<Outcome>;
|
|
1416
1492
|
declare const evaluators: {
|
|
1417
1493
|
quiz(answerKey: QuizEvidence["answers"], options?: {
|
|
1418
1494
|
minimumCorrect?: number;
|
|
@@ -1449,7 +1525,7 @@ type CompletionPolicy = ReturnType<typeof once> | ReturnType<typeof keyed> | Str
|
|
|
1449
1525
|
/** The completion builders, with key callbacks reading quest `G`'s typed context. */
|
|
1450
1526
|
type CompletionPolicies<S, G> = {
|
|
1451
1527
|
once: typeof once;
|
|
1452
|
-
keyed: (key: (ctx: QuestKeyedContext<S, G>) => string) => ReturnType<typeof keyed>;
|
|
1528
|
+
keyed: (key: (ctx: QuestKeyedContext<S, G>) => string, options?: KeyedOptions) => ReturnType<typeof keyed>;
|
|
1453
1529
|
streak: typeof streak;
|
|
1454
1530
|
progress: (definition: ProgressDefinition<QuestKeyedContext<S, G>>) => ReturnType<typeof progress>;
|
|
1455
1531
|
};
|
|
@@ -1498,6 +1574,10 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1498
1574
|
settings: z.core.$InferObjectOutput<T, {}>;
|
|
1499
1575
|
}) => QuestPresentation) | undefined;
|
|
1500
1576
|
trigger: G & NoInfer<IntegerSettingBounds<G, T>>;
|
|
1577
|
+
/**
|
|
1578
|
+
* The modules the quest uses: `discord` and `x` from this module enable their readers. A
|
|
1579
|
+
* module this SDK does not know, `{ provider }`, builds but types no reader.
|
|
1580
|
+
*/
|
|
1501
1581
|
integrations?: D | undefined;
|
|
1502
1582
|
requires?: readonly Prerequisite[];
|
|
1503
1583
|
campaign?: CampaignDefinition;
|
|
@@ -1587,7 +1667,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1587
1667
|
})[] | ((ctx: {
|
|
1588
1668
|
settings: z.core.$InferObjectOutput<T, {}>;
|
|
1589
1669
|
}) => Announcement[]) | undefined;
|
|
1590
|
-
evaluate?: Evaluator<z.core.$InferObjectOutput<T, {}>, QuestInput<G>, NoInfer<G>, NoInfer<D
|
|
1670
|
+
evaluate?: Evaluator<z.core.$InferObjectOutput<T, {}>, QuestInput<G>, NoInfer<G>, NoInfer<KnownModules<D>>> | undefined;
|
|
1591
1671
|
/**
|
|
1592
1672
|
* A content quest's performance stage: once content evaluation accepts an item, each later
|
|
1593
1673
|
* complete and fresh sample of `metrics` (a subset of the tracker's declared metrics) gates the
|
|
@@ -1866,6 +1946,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1866
1946
|
kind: "once";
|
|
1867
1947
|
} | {
|
|
1868
1948
|
kind: "keyed";
|
|
1949
|
+
across?: "members" | undefined;
|
|
1869
1950
|
};
|
|
1870
1951
|
visibility: "visible" | "hidden";
|
|
1871
1952
|
profile: {
|
|
@@ -1880,6 +1961,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1880
1961
|
balance: string;
|
|
1881
1962
|
};
|
|
1882
1963
|
}[];
|
|
1964
|
+
integrationModules?: IntegrationModuleProvider[] | undefined;
|
|
1883
1965
|
announcements?: ({
|
|
1884
1966
|
action: "post-message";
|
|
1885
1967
|
text: string;
|
|
@@ -1962,12 +2044,12 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1962
2044
|
};
|
|
1963
2045
|
wallet: WalletReader;
|
|
1964
2046
|
/**
|
|
1965
|
-
* Telegram membership in the chats the project connected.
|
|
1966
|
-
* Relay provides it to every quest from SDK 1.23.0 on, and it
|
|
1967
|
-
* test contexts that do not supply it.
|
|
2047
|
+
* The member's linked Telegram account and their membership in the chats the project connected.
|
|
2048
|
+
* It needs no `integrations` entry; Relay provides it to every quest from SDK 1.23.0 on, and it
|
|
2049
|
+
* is absent from older runtimes and test contexts that do not supply it.
|
|
1968
2050
|
*/
|
|
1969
2051
|
telegram?: TelegramReader;
|
|
1970
|
-
} & IntegrationReaders<readonly
|
|
2052
|
+
} & IntegrationReaders<readonly KnownIntegrationModule[]> & {
|
|
1971
2053
|
rewards: Reward[];
|
|
1972
2054
|
humanReview: boolean;
|
|
1973
2055
|
performance?: unknown;
|
|
@@ -1992,6 +2074,10 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1992
2074
|
settings: z.core.$InferObjectOutput<T, {}>;
|
|
1993
2075
|
}) => QuestPresentation) | undefined;
|
|
1994
2076
|
trigger: G & NoInfer<IntegerSettingBounds<G, T>>;
|
|
2077
|
+
/**
|
|
2078
|
+
* The modules the quest uses: `discord` and `x` from this module enable their readers. A
|
|
2079
|
+
* module this SDK does not know, `{ provider }`, builds but types no reader.
|
|
2080
|
+
*/
|
|
1995
2081
|
integrations?: D | undefined;
|
|
1996
2082
|
requires?: readonly Prerequisite[];
|
|
1997
2083
|
campaign?: CampaignDefinition;
|
|
@@ -2081,7 +2167,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
2081
2167
|
})[] | ((ctx: {
|
|
2082
2168
|
settings: z.core.$InferObjectOutput<T, {}>;
|
|
2083
2169
|
}) => Announcement[]) | undefined;
|
|
2084
|
-
evaluate?: Evaluator<z.core.$InferObjectOutput<T, {}>, QuestInput<G>, NoInfer<G>, NoInfer<D
|
|
2170
|
+
evaluate?: Evaluator<z.core.$InferObjectOutput<T, {}>, QuestInput<G>, NoInfer<G>, NoInfer<KnownModules<D>>> | undefined;
|
|
2085
2171
|
/**
|
|
2086
2172
|
* A content quest's performance stage: once content evaluation accepts an item, each later
|
|
2087
2173
|
* complete and fresh sample of `metrics` (a subset of the tracker's declared metrics) gates the
|
|
@@ -2360,6 +2446,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
2360
2446
|
kind: "once";
|
|
2361
2447
|
} | {
|
|
2362
2448
|
kind: "keyed";
|
|
2449
|
+
across?: "members" | undefined;
|
|
2363
2450
|
};
|
|
2364
2451
|
visibility: "visible" | "hidden";
|
|
2365
2452
|
profile: {
|
|
@@ -2374,6 +2461,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
2374
2461
|
balance: string;
|
|
2375
2462
|
};
|
|
2376
2463
|
}[];
|
|
2464
|
+
integrationModules?: IntegrationModuleProvider[] | undefined;
|
|
2377
2465
|
announcements?: ({
|
|
2378
2466
|
action: "post-message";
|
|
2379
2467
|
text: string;
|
|
@@ -2456,12 +2544,12 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
2456
2544
|
};
|
|
2457
2545
|
wallet: WalletReader;
|
|
2458
2546
|
/**
|
|
2459
|
-
* Telegram membership in the chats the project connected.
|
|
2460
|
-
* Relay provides it to every quest from SDK 1.23.0 on, and it
|
|
2461
|
-
* test contexts that do not supply it.
|
|
2547
|
+
* The member's linked Telegram account and their membership in the chats the project connected.
|
|
2548
|
+
* It needs no `integrations` entry; Relay provides it to every quest from SDK 1.23.0 on, and it
|
|
2549
|
+
* is absent from older runtimes and test contexts that do not supply it.
|
|
2462
2550
|
*/
|
|
2463
2551
|
telegram?: TelegramReader;
|
|
2464
|
-
} & IntegrationReaders<readonly
|
|
2552
|
+
} & IntegrationReaders<readonly KnownIntegrationModule[]> & {
|
|
2465
2553
|
rewards: Reward[];
|
|
2466
2554
|
humanReview: boolean;
|
|
2467
2555
|
performance?: unknown;
|
|
@@ -2476,4 +2564,4 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
2476
2564
|
}): Promise<Decision>;
|
|
2477
2565
|
} & ResourceHandle<"quest">;
|
|
2478
2566
|
|
|
2479
|
-
export { AmountSetting, BalanceChain, ContentBody, type ContentData, ContentMetricName, type ContentTrigger, type ContentTriggerInput, ContractCall, ContractEvent, DiscordMessageData, DiscordMessageTextData, DiscordReactionData, DiscordReader, type EvaluationCalendar, type EvaluationCalendarDay, type EvaluationContext, type EvaluationMember, GroupHandle, IdentityKind, ImageReader, IntegrationModule, type KeyedContext, LedgerHandle, LedgerReference, MemberCompletion, type MemberCompletionQuery, MemberIdentity, NftCollection, type Outcome, type PerformanceContext, type PerformanceOutcome, PointBalance, ProfileReferral, QuestHandle, type QuestKeyedContext, ReferralHandle, RoleOf, Setting, SolanaProgram, TelegramReader, Tracker, TrackerData, TrackerDataSchema, TrackerReader, type TrackerTrigger, TrackerTriggerContext, type TrackerTriggerInput, type TriggerAdmission, WalletBalanceSourceQuery, WalletInstruction, WalletReader, WalletTransaction, Where, type XContentBody, XReader, automatic, automaticFulfillment, badge, budget, calendar, content, count, customSource, decision, defineBadge, defineEngagementReward, defineLeaderboard, defineLedger, defineQuest, defineQuestType, defineReferral, defineTieredReward, defineTracker, discord, earned, evaluators, evidence, groupMembership, instruction, invoked, keyed, manual, once, pointLedgers, points, progress, questCompleted, received, rolling, settings, spent, staffHandover, streak, swapped, telegram, tiktok, untracked, wallet, x, youtube };
|
|
2567
|
+
export { AmountSetting, BalanceChain, ContentBody, type ContentData, ContentMetricName, type ContentTrigger, type ContentTriggerInput, ContractCall, ContractEvent, DiscordMessageData, DiscordMessageTextData, DiscordReactionData, DiscordReader, type EvaluationCalendar, type EvaluationCalendarDay, type EvaluationContext, type EvaluationMember, GroupHandle, IdentityKind, ImageReader, IntegrationModule, IntegrationModuleProvider, type KeyedContext, type KeyedOptions, KnownIntegrationModule, LedgerHandle, LedgerReference, MemberCompletion, type MemberCompletionQuery, MemberIdentity, NftCollection, type Outcome, type PerformanceContext, type PerformanceOutcome, PointBalance, ProfileReferral, QuestHandle, type QuestKeyedContext, ReferralHandle, RoleOf, Setting, SolanaProgram, TelegramReader, Tracker, TrackerData, TrackerDataSchema, TrackerReader, type TrackerTrigger, TrackerTriggerContext, type TrackerTriggerInput, type TriggerAdmission, WalletBalanceSourceQuery, WalletInstruction, WalletReader, WalletTransaction, Where, type XContentBody, XReader, automatic, automaticFulfillment, badge, budget, calendar, content, count, customSource, decision, defineBadge, defineEngagementReward, defineLeaderboard, defineLedger, defineOffer, defineQuest, defineQuestType, defineReferral, defineTieredReward, defineTracker, discord, earned, evaluators, evidence, groupMembership, instruction, invoked, keyed, manual, once, pointLedgers, points, progress, questCompleted, received, rolling, settings, spent, staffHandover, streak, swapped, telegram, tiktok, untracked, wallet, x, youtube };
|
package/dist/authoring.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
tiktokVideoMetrics,
|
|
9
9
|
youtubeShortBodySchema,
|
|
10
10
|
youtubeShortMetrics
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3KLC4AMA.js";
|
|
12
12
|
import {
|
|
13
13
|
CapabilityError,
|
|
14
14
|
capabilityErrorCodes
|
|
@@ -17,19 +17,20 @@ import {
|
|
|
17
17
|
sourceDataSchema,
|
|
18
18
|
sourceRoles,
|
|
19
19
|
validateQuestShape
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5TEYFX6X.js";
|
|
21
21
|
import {
|
|
22
|
-
badgeDeclarationSchema,
|
|
23
|
-
defineOffer,
|
|
24
22
|
engagementDefinitionSchema,
|
|
25
23
|
engagementScoreInputSchema,
|
|
26
24
|
engagementScoreSchema,
|
|
27
|
-
|
|
25
|
+
offerAuthoringSchema,
|
|
26
|
+
parseDefinition,
|
|
28
27
|
referralAuthoringSchema
|
|
29
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-GTDW453U.js";
|
|
30
29
|
import {
|
|
30
|
+
badgeDeclarationSchema,
|
|
31
|
+
leaderboardAuthoringSchema,
|
|
31
32
|
pointLedgerDeclarationSchema
|
|
32
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-WSBYWVTZ.js";
|
|
33
34
|
import {
|
|
34
35
|
announcementSchema,
|
|
35
36
|
authorBudgetSchema,
|
|
@@ -60,6 +61,7 @@ import {
|
|
|
60
61
|
groupReward,
|
|
61
62
|
identifier,
|
|
62
63
|
inGroup,
|
|
64
|
+
integrationModuleProviderSchema,
|
|
63
65
|
isAmount,
|
|
64
66
|
isBalanceChain,
|
|
65
67
|
isBoundSetting,
|
|
@@ -120,15 +122,44 @@ import {
|
|
|
120
122
|
whereSettings,
|
|
121
123
|
xSearchSourceSchema,
|
|
122
124
|
youtubeShortsNamespace
|
|
123
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-MK425RXJ.js";
|
|
126
|
+
import "./chunk-K2KS3JLY.js";
|
|
124
127
|
|
|
125
128
|
// src/builders.ts
|
|
126
129
|
import * as z from "zod";
|
|
130
|
+
|
|
131
|
+
// src/quest-only-rewards.ts
|
|
132
|
+
function questOnlyRewardError(reward, surface) {
|
|
133
|
+
const definition = typeof reward === "object" && reward !== null && "kind" in reward && reward.kind === "tier" && "reward" in reward && typeof reward.reward === "object" && reward.reward !== null ? reward.reward : null;
|
|
134
|
+
if (definition && "badge" in definition && definition.badge !== void 0) {
|
|
135
|
+
return `Badge rewards can only be granted by quests or manually, not by ${surface}`;
|
|
136
|
+
}
|
|
137
|
+
if (definition && "group" in definition && definition.group !== void 0) {
|
|
138
|
+
return `Group membership rewards can only be granted by quests, not by ${surface}`;
|
|
139
|
+
}
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
function refuseQuestOnlyRewards(context, rewards, path, surface) {
|
|
143
|
+
for (const [index, reward] of rewards.entries()) {
|
|
144
|
+
const message = questOnlyRewardError(reward, surface);
|
|
145
|
+
if (message) {
|
|
146
|
+
context.addIssue({ code: "custom", message, path: [...path, index] });
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// src/builders.ts
|
|
127
152
|
function defineBadge(input) {
|
|
128
|
-
return resourceHandle(
|
|
153
|
+
return resourceHandle(
|
|
154
|
+
"badge",
|
|
155
|
+
parseDefinition("Badge", badgeDeclarationSchema, input)
|
|
156
|
+
);
|
|
129
157
|
}
|
|
130
158
|
function defineLedger(input) {
|
|
131
|
-
return resourceHandle(
|
|
159
|
+
return resourceHandle(
|
|
160
|
+
"ledger",
|
|
161
|
+
parseDefinition("Point ledger", pointLedgerDeclarationSchema, input)
|
|
162
|
+
);
|
|
132
163
|
}
|
|
133
164
|
function defineEngagementReward(input) {
|
|
134
165
|
const { target, ledger, ...config } = input;
|
|
@@ -168,9 +199,43 @@ var questCompleted = (quest) => ({
|
|
|
168
199
|
kind: "quest",
|
|
169
200
|
quest
|
|
170
201
|
});
|
|
202
|
+
var offerBuilderSchema = offerAuthoringSchema.superRefine(
|
|
203
|
+
(offer, context) => {
|
|
204
|
+
const message = questOnlyRewardError(offer.reward, "offers");
|
|
205
|
+
if (message) {
|
|
206
|
+
context.addIssue({ code: "custom", message, path: ["reward"] });
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
);
|
|
210
|
+
function defineOffer(input) {
|
|
211
|
+
return resourceHandle(
|
|
212
|
+
"offer",
|
|
213
|
+
parseDefinition("Offer", offerBuilderSchema, input)
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
var referralBuilderSchema = referralAuthoringSchema.superRefine(
|
|
217
|
+
(referral, context) => {
|
|
218
|
+
for (const side of ["inviter", "invitee"]) {
|
|
219
|
+
refuseQuestOnlyRewards(
|
|
220
|
+
context,
|
|
221
|
+
referral.rewards[side],
|
|
222
|
+
["rewards", side],
|
|
223
|
+
"referral programs"
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
for (const [index, milestone] of referral.milestones.entries()) {
|
|
227
|
+
refuseQuestOnlyRewards(
|
|
228
|
+
context,
|
|
229
|
+
milestone.rewards,
|
|
230
|
+
["milestones", index, "rewards"],
|
|
231
|
+
"referral programs"
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
);
|
|
171
236
|
function defineReferral(input) {
|
|
172
237
|
const { qualification, inviterGroup, milestones, bonuses, ...properties } = input;
|
|
173
|
-
const definition =
|
|
238
|
+
const definition = parseDefinition("Referral", referralBuilderSchema, {
|
|
174
239
|
...properties,
|
|
175
240
|
qualification: qualification.kind === "quest" ? { kind: "quest", quest: qualification.quest.key } : qualification,
|
|
176
241
|
...inviterGroup ? { inviterGroup: identifier.parse(inviterGroup.key) } : {},
|
|
@@ -190,10 +255,22 @@ function defineReferral(input) {
|
|
|
190
255
|
function earned(options = {}) {
|
|
191
256
|
return { kind: "earned", ...options };
|
|
192
257
|
}
|
|
258
|
+
var leaderboardBuilderSchema = leaderboardAuthoringSchema.superRefine(
|
|
259
|
+
(board, context) => {
|
|
260
|
+
for (const [index, prize] of (board.settle?.prizes ?? []).entries()) {
|
|
261
|
+
refuseQuestOnlyRewards(
|
|
262
|
+
context,
|
|
263
|
+
prize.rewards,
|
|
264
|
+
["settle", "prizes", index, "rewards"],
|
|
265
|
+
"leaderboard prizes"
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
);
|
|
193
270
|
function defineLeaderboard(input) {
|
|
194
271
|
const { ledger, group, score, settle, ...properties } = input;
|
|
195
272
|
const pool = settle?.pool;
|
|
196
|
-
const definition =
|
|
273
|
+
const definition = parseDefinition("Leaderboard", leaderboardBuilderSchema, {
|
|
197
274
|
...properties,
|
|
198
275
|
...settle ? {
|
|
199
276
|
settle: {
|
|
@@ -277,7 +354,7 @@ function isZodSchema(value) {
|
|
|
277
354
|
function defineTracker(input) {
|
|
278
355
|
return resourceHandle(
|
|
279
356
|
"tracker",
|
|
280
|
-
trackerDefinitionSchema
|
|
357
|
+
parseDefinition("Tracker", trackerDefinitionSchema, input)
|
|
281
358
|
);
|
|
282
359
|
}
|
|
283
360
|
function messages(options = {}) {
|
|
@@ -793,7 +870,7 @@ function trackerTrigger(input, constructor) {
|
|
|
793
870
|
const roles = sourceRoles(source);
|
|
794
871
|
if (!roles.includes(beneficiary)) {
|
|
795
872
|
throw new Error(
|
|
796
|
-
source.kind === "custom" ? `Tracker "${tracker.key}" has no "${beneficiary}" account: declare it in customSource(namespace, { accounts: ["${beneficiary}"] })` : `Tracker "${tracker.key}" pays ${roles.map((role) => `"${role}"`)
|
|
873
|
+
source.kind === "custom" ? `Tracker "${tracker.key}" has no "${beneficiary}" account: declare it in customSource(namespace, { accounts: ["${beneficiary}"] })` : `Tracker "${tracker.key}" pays ${new Intl.ListFormat("en", { type: "disjunction" }).format(roles.map((role) => `"${role}"`))}, not "${beneficiary}"`
|
|
797
874
|
);
|
|
798
875
|
}
|
|
799
876
|
const policy = trackerTriggerPolicySchema.parse({
|
|
@@ -849,9 +926,10 @@ function defineBudget(definition) {
|
|
|
849
926
|
}
|
|
850
927
|
var budget = defineBudget;
|
|
851
928
|
var authorBudgets = (budgets = []) => budgets.filter((value) => value.scope === "author");
|
|
852
|
-
var keyed = (key) => ({
|
|
929
|
+
var keyed = (key, options = {}) => ({
|
|
853
930
|
kind: "keyed",
|
|
854
|
-
key
|
|
931
|
+
key,
|
|
932
|
+
...options.across ? { across: options.across } : {}
|
|
855
933
|
});
|
|
856
934
|
var progress = (definition) => {
|
|
857
935
|
const { distinct, ...policy } = definition;
|
|
@@ -947,13 +1025,17 @@ var completionPolicies = { once, keyed, streak, progress };
|
|
|
947
1025
|
function questBuilder(template) {
|
|
948
1026
|
return function defineQuest2(definition) {
|
|
949
1027
|
const key = authoringKey(definition);
|
|
950
|
-
const
|
|
1028
|
+
const integrationModules = [
|
|
951
1029
|
...new Set(
|
|
952
1030
|
(definition.integrations ?? []).map(
|
|
953
|
-
(module) =>
|
|
1031
|
+
(module) => integrationModuleProviderSchema.parse(module.provider)
|
|
954
1032
|
)
|
|
955
1033
|
)
|
|
956
1034
|
];
|
|
1035
|
+
const integrations = integrationModules.flatMap((provider) => {
|
|
1036
|
+
const known = evaluatorIntegrationProviderSchema.safeParse(provider);
|
|
1037
|
+
return known.success ? [known.data] : [];
|
|
1038
|
+
});
|
|
957
1039
|
const contentTrigger = definition.trigger.kind === "automatic" && definition.trigger.tracker?.content === true;
|
|
958
1040
|
const trackerTrigger2 = definition.trigger.kind === "automatic" && definition.trigger.tracker !== void 0;
|
|
959
1041
|
const declared = definition.completion;
|
|
@@ -1088,13 +1170,17 @@ function questBuilder(template) {
|
|
|
1088
1170
|
})
|
|
1089
1171
|
} : {},
|
|
1090
1172
|
integrations,
|
|
1173
|
+
// Written only when it holds a module `integrations` lacks, so a quest declaring known
|
|
1174
|
+
// modules describes itself as SDKs before `integrationModules` did, and a Relay that
|
|
1175
|
+
// predates the field still accepts it.
|
|
1176
|
+
...integrationModules.length > integrations.length ? { integrationModules } : {},
|
|
1091
1177
|
// A content quest's completion is keyed by its content item, with a key Relay owns.
|
|
1092
1178
|
completion: !completion ? { kind: "keyed" } : completion.kind === "progress" ? {
|
|
1093
1179
|
kind: completion.kind,
|
|
1094
1180
|
goal: completion.goal,
|
|
1095
1181
|
window: completion.window,
|
|
1096
1182
|
repeat: completion.repeat
|
|
1097
|
-
} : completion.kind === "streak" ? completion : { kind: completion.kind },
|
|
1183
|
+
} : completion.kind === "streak" ? completion : completion.kind === "keyed" && completion.across ? { kind: completion.kind, across: completion.across } : { kind: completion.kind },
|
|
1098
1184
|
visibility: definition.visibility ?? "visible",
|
|
1099
1185
|
profile: definition.profile ?? { visible: false },
|
|
1100
1186
|
budgets: (definition.budgets ?? []).filter(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { b as AttemptStatus, X as RewardType } from './accounts-CCqCKCVx.js';
|
|
3
3
|
|
|
4
4
|
declare const collectionCodeSchema: z.ZodString;
|
|
5
5
|
declare const collectionPassSchema: z.ZodObject<{
|
|
@@ -783,6 +783,10 @@ declare const automaticCatchUpPreviewSchema: z.ZodObject<{
|
|
|
783
783
|
action: z.ZodLiteral<"grant-role">;
|
|
784
784
|
roleId: z.ZodString;
|
|
785
785
|
}, z.core.$strict>]>>;
|
|
786
|
+
rewardEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
787
|
+
type: z.ZodType<RewardType, unknown, z.core.$ZodTypeInternals<RewardType, unknown>>;
|
|
788
|
+
data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
789
|
+
}, z.core.$strip>>>;
|
|
786
790
|
costs: z.ZodArray<z.ZodObject<{
|
|
787
791
|
budget: z.ZodString;
|
|
788
792
|
cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"dynamic">]>;
|
package/dist/avatar.d.ts
CHANGED
package/dist/browser.d.ts
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { o as SubmissionStore, f as RelayClientOptions, R as RelayClient } from './client-
|
|
2
|
-
export { C as CosmosChains, D as DiscoveredWallet, E as Eip1193Provider, a as EmailSignInOption, K as KeplrLike, O as OAuthSignInOption, 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-
|
|
1
|
+
import { o as SubmissionStore, f as RelayClientOptions, R as RelayClient } from './client-B-hbHX30.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-BCE7zdOb.js';
|
|
3
3
|
export { H as HostEnvironment, g as getHostEnvironment } from './host-environment-FN4zg3hw.js';
|
|
4
|
-
import { M as MemberSummary } from './participant-activity-
|
|
5
|
-
import './
|
|
4
|
+
import { M as MemberSummary } from './participant-activity-D-Drp24G.js';
|
|
5
|
+
import './accounts-CCqCKCVx.js';
|
|
6
6
|
import 'zod';
|
|
7
|
-
import './
|
|
8
|
-
import './
|
|
9
|
-
import './
|
|
10
|
-
import './
|
|
11
|
-
import './
|
|
12
|
-
import './
|
|
7
|
+
import './tracker-data-Hb1uQnk5.js';
|
|
8
|
+
import './wallet-DTO7SXj7.js';
|
|
9
|
+
import './pages-B8q8Y_dQ.js';
|
|
10
|
+
import './submission-input-DHGKhXfp.js';
|
|
11
|
+
import './request-error-D_dUPLwo.js';
|
|
12
|
+
import './catalog--ZIlskAo.js';
|
|
13
|
+
import './action-9Xl0StBg.js';
|
|
14
|
+
import './sign-in-providers-BkjcDsFF.js';
|
|
13
15
|
|
|
14
16
|
/**
|
|
15
17
|
* The member's time at the real instant `at` (default now), in epoch milliseconds: what an app
|
|
@@ -18,7 +20,9 @@ import './accounts-DoabriBX.js';
|
|
|
18
20
|
* clock; read `/v1/me` again on `domino:test-state-changed`. Without `clock` (a Relay older than
|
|
19
21
|
* it) the member's time is real time.
|
|
20
22
|
*/
|
|
21
|
-
declare function memberTime(me:
|
|
23
|
+
declare function memberTime(me: {
|
|
24
|
+
clock?: MemberSummary["clock"];
|
|
25
|
+
}, at?: number): number;
|
|
22
26
|
|
|
23
27
|
/** Browser client with durable submission recovery; safe to construct during SSR. */
|
|
24
28
|
declare function createBrowserRelayClient(options: RelayClientOptions): RelayClient;
|