@domino-sdk/relay 1.62.0 → 1.65.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 +145 -0
- package/dist/{accounts-CCqCKCVx.d.ts → accounts-_lNsiR2k.d.ts} +42 -4
- package/dist/{attempt-captures-Cm-5G0PC.d.ts → attempt-captures-BqPggxTU.d.ts} +1 -1
- package/dist/authoring.d.ts +54 -20
- package/dist/authoring.js +60 -31
- package/dist/{automatic-outcomes-pAsOyIVp.d.ts → automatic-outcomes-BzAvfcpd.d.ts} +11 -1
- package/dist/avatar.d.ts +1 -1
- package/dist/browser.d.ts +10 -10
- package/dist/browser.js +12 -13
- package/dist/capability-error-CuI_F7yM.d.ts +296 -0
- package/dist/{catalog--ZIlskAo.d.ts → catalog-ByZMRS7I.d.ts} +21 -10
- package/dist/{chunk-XNKSSE32.js → chunk-4NIV4NPV.js} +7 -7
- package/dist/chunk-7H4MRVQF.js +199 -0
- package/dist/{chunk-UPQPUJOU.js → chunk-CVQZ2YP7.js} +73 -202
- package/dist/{chunk-3PYYGFSB.js → chunk-DLABJSBO.js} +3 -3
- package/dist/{chunk-Y322OTCH.js → chunk-E22XSC4L.js} +1 -1
- package/dist/{chunk-E6IKQHTX.js → chunk-EDNKKVGU.js} +2 -2
- package/dist/{chunk-K2KS3JLY.js → chunk-EOUEAOWJ.js} +35 -4
- package/dist/{chunk-6WCIWXUV.js → chunk-EUEW2APU.js} +2 -2
- package/dist/{chunk-MK425RXJ.js → chunk-HNR6G3GV.js} +2335 -1538
- package/dist/{chunk-UW5232GG.js → chunk-KCUUHT2V.js} +5 -5
- package/dist/{chunk-CICDIBOF.js → chunk-MPTE7EIV.js} +76 -74
- package/dist/{chunk-4OC7REYX.js → chunk-MWMCQLCG.js} +3 -3
- package/dist/{chunk-GTDW453U.js → chunk-NG4GZ54I.js} +100 -114
- package/dist/chunk-R2KZFX6E.js +405 -0
- package/dist/{chunk-HTZHBTIL.js → chunk-RD3XJ4DH.js} +208 -376
- package/dist/{chunk-5TEYFX6X.js → chunk-SE7XHQFP.js} +2 -2
- package/dist/{chunk-CZFXGGEK.js → chunk-U66GUVSG.js} +2 -2
- package/dist/{chunk-KDR2VAJP.js → chunk-UYVJZR33.js} +2 -2
- package/dist/chunk-UZ765UGH.js +18 -0
- package/dist/{chunk-GKIFABGN.js → chunk-VBYOAT46.js} +100 -277
- package/dist/{chunk-QYPMPWVX.js → chunk-XVZ4YOF2.js} +43 -43
- package/dist/{chunk-3KLC4AMA.js → chunk-ZQ3IPCI6.js} +177 -176
- package/dist/chunk-ZXGBDLVB.js +1510 -0
- package/dist/{client-B-hbHX30.d.ts → client-D7IiwEq2.d.ts} +31 -62
- package/dist/{capability-error-DFMwSuSf.d.ts → dashboards-pVfclkyh.d.ts} +14 -294
- package/dist/{deployments-M4OHn7G3.d.ts → deployments-Cr1tfqrr.d.ts} +46 -3
- package/dist/{identity-integration-3mX6b5iH.d.ts → identity-integration-Ci2vGKtX.d.ts} +67 -2
- package/dist/index.d.ts +11 -11
- package/dist/index.js +11 -13
- package/dist/internal.d.ts +27 -13
- package/dist/internal.js +46 -13
- package/dist/{analytics-BwAKLi7O.d.ts → limits-pE04y9O2.d.ts} +131 -3
- package/dist/{offers-DhAtss4_.d.ts → offers-Hw2P6tcK.d.ts} +3 -2
- package/dist/{participant-activity-D-Drp24G.d.ts → participant-activity-DXRq4s6K.d.ts} +1 -0
- package/dist/portal-proxy.d.ts +21 -3
- package/dist/portal-proxy.js +72 -22
- package/dist/react/index.d.ts +29 -15
- package/dist/react/index.js +52 -29
- package/dist/{pages-B8q8Y_dQ.d.ts → reward-deliveries-BCV8hznc.d.ts} +300 -233
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/6EBN6IZU.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/schema.d.ts +197 -19
- package/dist/schema.js +126 -124
- package/dist/server/index.d.ts +13 -13
- package/dist/server/index.js +5701 -6302
- package/dist/{sign-in-providers-BkjcDsFF.d.ts → sign-in-providers-BAkGjSXo.d.ts} +7 -2
- package/dist/{submission-input-DHGKhXfp.d.ts → submission-input-ChL1aYNH.d.ts} +3 -2
- package/dist/{telegram-browser-BCE7zdOb.d.ts → telegram-browser-K27t4TwM.d.ts} +5 -5
- package/dist/telegram.d.ts +9 -9
- package/dist/telegram.js +2 -2
- package/dist/testing.d.ts +229 -27
- package/dist/testing.js +146 -105
- package/dist/{tracker-data-Hb1uQnk5.d.ts → tracker-data-Bl-qPIvZ.d.ts} +37 -9
- package/dist/{transport-DkhX2Cbs.d.ts → transport-DC1m73Tp.d.ts} +40211 -37736
- package/dist/{wallet-DTO7SXj7.d.ts → wallet-B7e06v4m.d.ts} +14 -4
- package/package.json +1 -1
- package/dist/chunk-D26YNACF.js +0 -320
- package/dist/chunk-UAKYDVT3.js +0 -565
- package/dist/chunk-WSBYWVTZ.js +0 -717
- package/dist/chunk-XJFYAXET.js +0 -87
- package/dist/runtime/chunks/Y4OAVXFR.js +0 -1
package/dist/authoring.d.ts
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
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-
|
|
2
|
-
export { ah as KnownIntegrationModuleProvider, ai as defineCampaign, aj as defineGroup } from './accounts-
|
|
3
|
-
import { x as xContentBodySchema, I as IdentityKind,
|
|
4
|
-
export {
|
|
5
|
-
import { R as ResourceSource,
|
|
6
|
-
export { C as CapabilityError,
|
|
7
|
-
import { N as NftCollection,
|
|
8
|
-
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-_lNsiR2k.js';
|
|
2
|
+
export { ah as KnownIntegrationModuleProvider, ai as defineCampaign, aj as defineGroup } from './accounts-_lNsiR2k.js';
|
|
3
|
+
import { x as xContentBodySchema, I as IdentityKind, j as customSourceSchema, W as WithRecordData, k as WithContent, l as WithAccountRoles, R as ResourceHandle, Q as QuestHandle, L as LedgerReference, G as GroupHandle, m as TrackerSource, n as trackerDefinitionSchema, o as Tracker, p as TrackerData, q as SourceRoles, r as LedgerHandle, i as TrackerDataSchema, u as xSearchSourceSchema, X as XTweet, v as XContentMetric, y as TrackerTriggerPolicy, z as Where, M as MemberIdentity, A as ReferralHandle, B as TrackerTriggerContext, C as TrackerReader, D as TrackerTriggerMode, E as RoleOf, F as WhereSetting, H as ContentBody, J as BadgeHandle, N as ContentMetricName } from './tracker-data-Bl-qPIvZ.js';
|
|
4
|
+
export { P as LedgerSetting, U as TrackerPage, V as TrackerReadQuery, Y as trackerDataSchema, Z as trackerTriggerContextSchema } from './tracker-data-Bl-qPIvZ.js';
|
|
5
|
+
import { R as ResourceSource, M as MemberCompletion, B as Budget, A as AuthorBudget, a as Announcement } from './capability-error-CuI_F7yM.js';
|
|
6
|
+
export { C as CapabilityError, b as CapabilityErrorCode, T as TikTokVideoBody, c as TikTokVideoMetric, Y as YouTubeShortBody, d as YouTubeShortMetric, e as capabilityErrorCodes } from './capability-error-CuI_F7yM.js';
|
|
7
|
+
import { N as NftCollection, p as ContractCall, q as ContractEvent, r as SolanaProgram, s as WalletBalanceSourceQuery, t as WalletTransaction, u as WalletInstruction, e as ProfileReferral, v as WalletReader } from './wallet-B7e06v4m.js';
|
|
8
|
+
export { w as ContractCallParts, x as ContractCallReturnType, y as ContractEventInput, z as ContractEventParts, B as ContractFunction, D as CosmosDenom, a as CosmosNetwork, E as EvmChainId, F as NftCollectionParts, G as NftStandard, H as WalletBalance, I as WalletBalanceChange, o 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-B7e06v4m.js';
|
|
9
9
|
import * as z from 'zod';
|
|
10
10
|
export { z } from 'zod';
|
|
11
|
-
import { g as badgeDeclarationSchema, h as OfferAuthoring, B as Badge } from './offers-
|
|
11
|
+
import { g as badgeDeclarationSchema, h as OfferAuthoring, B as Badge } from './offers-Hw2P6tcK.js';
|
|
12
12
|
import { a as StreakPolicy, Q as QuizContent } from './streaks-0YuipsUQ.js';
|
|
13
|
-
import {
|
|
14
|
-
export {
|
|
15
|
-
import {
|
|
13
|
+
import { S as Setting, A as AmountSetting, B as BalanceChain, a as BoundSettings } from './dashboards-pVfclkyh.js';
|
|
14
|
+
export { D as DashboardInput, b as DashboardPanelInput, e as defineDashboard } from './dashboards-pVfclkyh.js';
|
|
15
|
+
import { e as TelegramReader, P as Prerequisite, b as TextEvidence, U as UrlEvidence, c as TextOptions, d as UrlOptions } from './submission-input-ChL1aYNH.js';
|
|
16
|
+
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-ChL1aYNH.js';
|
|
17
|
+
import { I as ImageReader, X as XReader } from './limits-pE04y9O2.js';
|
|
18
|
+
export { L as Limits, l as limits } from './limits-pE04y9O2.js';
|
|
16
19
|
export { f as formatUnits, p as parseUnits } from './units-CwgsPB_r.js';
|
|
17
20
|
|
|
18
21
|
declare function defineBadge(input: z.input<typeof badgeDeclarationSchema>): {
|
|
@@ -309,6 +312,20 @@ declare function earned(options?: Omit<EarnedScore, "kind" | "quests"> & {
|
|
|
309
312
|
kind: "earned";
|
|
310
313
|
};
|
|
311
314
|
type SettlementInput = NonNullable<LeaderboardInput["settle"]>;
|
|
315
|
+
/**
|
|
316
|
+
* Why `board`'s live standings order equal scores differently from its settlement, or null when
|
|
317
|
+
* they agree or it has no settlement. `ties` defaults to `"shared"` and is not taken from
|
|
318
|
+
* `settle.ties`, so a board that sets only `settle.ties: "earliest"` shows shared ranks live and
|
|
319
|
+
* pays first-to-reach. `defineLeaderboard` and `domino check` warn with it. Exported from `/authoring`, not `/schema`, to keep
|
|
320
|
+
* the schema entry's browser size down.
|
|
321
|
+
*/
|
|
322
|
+
declare function leaderboardTiesWarning(board: {
|
|
323
|
+
key?: string;
|
|
324
|
+
ties?: string;
|
|
325
|
+
settle?: {
|
|
326
|
+
ties: string;
|
|
327
|
+
};
|
|
328
|
+
}): string | null;
|
|
312
329
|
declare function defineLeaderboard(input: Omit<LeaderboardInput, "key" | "id" | "balance" | "group" | "score" | "settle"> & AuthoringIdentity & {
|
|
313
330
|
ledger: LedgerReference;
|
|
314
331
|
group?: GroupHandle;
|
|
@@ -774,12 +791,21 @@ declare const settings: {
|
|
|
774
791
|
}, z.core.$strict>>;
|
|
775
792
|
correct: z.ZodString;
|
|
776
793
|
}, z.core.$strict>>>>;
|
|
794
|
+
/**
|
|
795
|
+
* Free text. With `secret: true`, operators set the value in Console and it never leaves Relay:
|
|
796
|
+
* management responses, `domino deploy` and Console withhold it, and the quest's code reads it as
|
|
797
|
+
* usual. A secret setting has no default, so it reads `""` until an operator sets it.
|
|
798
|
+
*/
|
|
777
799
|
text(options: Label & {
|
|
778
|
-
default: string;
|
|
779
800
|
minLength?: number;
|
|
780
801
|
maxLength?: number;
|
|
781
802
|
multiline?: boolean;
|
|
782
|
-
}
|
|
803
|
+
} & ({
|
|
804
|
+
default: string;
|
|
805
|
+
secret?: false;
|
|
806
|
+
} | {
|
|
807
|
+
secret: true;
|
|
808
|
+
})): Setting<"text", z.ZodDefault<z.ZodString>>;
|
|
783
809
|
/**
|
|
784
810
|
* A Telegram chat the project connected, by its numeric ID: Console lists the connected chats
|
|
785
811
|
* to choose from. Pass it to `ctx.telegram.member({ chat })`.
|
|
@@ -1025,10 +1051,11 @@ type TrackerTriggerInput<T extends Tracker = Tracker, W extends Where<TrackerDat
|
|
|
1025
1051
|
/** The tracker handle `defineTracker` returns. */
|
|
1026
1052
|
tracker: T;
|
|
1027
1053
|
/**
|
|
1028
|
-
* Which observations fire. `"new-record"`: each record's first observation (the default for X
|
|
1029
|
-
* and
|
|
1030
|
-
*
|
|
1031
|
-
* custom trackers
|
|
1054
|
+
* Which observations fire. `"new-record"`: each record's first observation (the default for X,
|
|
1055
|
+
* Discord and Telegram trackers, where it means each newly collected post, message or reaction,
|
|
1056
|
+
* so a removed and re-added Telegram reaction does not fire again). `"new-observation"`: each
|
|
1057
|
+
* observation that becomes its record's current one (the default for other custom trackers,
|
|
1058
|
+
* YouTube and TikTok included, where every refresh observes each video again). `"data-changed"`: a
|
|
1032
1059
|
* new record, or a current observation whose `data` differs from the previous one.
|
|
1033
1060
|
*/
|
|
1034
1061
|
on?: TrackerTriggerMode;
|
|
@@ -1206,7 +1233,12 @@ type ProgressDefinition<C> = {
|
|
|
1206
1233
|
window?: ReturnType<typeof calendar>;
|
|
1207
1234
|
repeat?: "once" | "repeat";
|
|
1208
1235
|
};
|
|
1209
|
-
/**
|
|
1236
|
+
/**
|
|
1237
|
+
* A counter completion policy: accepted evidence contributes once under its distinct key, and
|
|
1238
|
+
* the quest completes when `goal` distinct actions fall in the window. Relay commits the count
|
|
1239
|
+
* with rewards. Not evaluator progress (`decision.progress`), which reports how far a member is
|
|
1240
|
+
* toward a target the evaluator measures and never counts toward a counter.
|
|
1241
|
+
*/
|
|
1210
1242
|
declare const progress: (definition: ProgressDefinition<KeyedContext>) => {
|
|
1211
1243
|
distinct: (ctx: KeyedContext) => string;
|
|
1212
1244
|
kind: "progress";
|
|
@@ -1774,6 +1806,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1774
1806
|
label: string;
|
|
1775
1807
|
picker?: string | undefined;
|
|
1776
1808
|
decimals?: number | undefined;
|
|
1809
|
+
secret?: true | undefined;
|
|
1777
1810
|
description?: string | undefined;
|
|
1778
1811
|
} | {
|
|
1779
1812
|
kind: "integer";
|
|
@@ -2274,6 +2307,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
2274
2307
|
label: string;
|
|
2275
2308
|
picker?: string | undefined;
|
|
2276
2309
|
decimals?: number | undefined;
|
|
2310
|
+
secret?: true | undefined;
|
|
2277
2311
|
description?: string | undefined;
|
|
2278
2312
|
} | {
|
|
2279
2313
|
kind: "integer";
|
|
@@ -2564,4 +2598,4 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
2564
2598
|
}): Promise<Decision>;
|
|
2565
2599
|
} & ResourceHandle<"quest">;
|
|
2566
2600
|
|
|
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 };
|
|
2601
|
+
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, leaderboardTiesWarning, manual, once, pointLedgers, points, progress, questCompleted, received, rolling, settings, spent, staffHandover, streak, swapped, telegram, tiktok, untracked, wallet, x, youtube };
|
package/dist/authoring.js
CHANGED
|
@@ -2,39 +2,34 @@ import {
|
|
|
2
2
|
formatUnits,
|
|
3
3
|
parseUnits
|
|
4
4
|
} from "./chunk-V7UKZLHA.js";
|
|
5
|
+
import {
|
|
6
|
+
sourceDataSchema,
|
|
7
|
+
sourceRoles,
|
|
8
|
+
validateQuestShape
|
|
9
|
+
} from "./chunk-SE7XHQFP.js";
|
|
5
10
|
import {
|
|
6
11
|
defineDashboard,
|
|
7
12
|
tiktokVideoBodySchema,
|
|
8
13
|
tiktokVideoMetrics,
|
|
9
14
|
youtubeShortBodySchema,
|
|
10
15
|
youtubeShortMetrics
|
|
11
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZQ3IPCI6.js";
|
|
12
17
|
import {
|
|
13
18
|
CapabilityError,
|
|
14
19
|
capabilityErrorCodes
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
sourceDataSchema,
|
|
18
|
-
sourceRoles,
|
|
19
|
-
validateQuestShape
|
|
20
|
-
} from "./chunk-5TEYFX6X.js";
|
|
20
|
+
} from "./chunk-MWMCQLCG.js";
|
|
21
21
|
import {
|
|
22
22
|
engagementDefinitionSchema,
|
|
23
23
|
engagementScoreInputSchema,
|
|
24
24
|
engagementScoreSchema,
|
|
25
25
|
offerAuthoringSchema,
|
|
26
|
-
parseDefinition,
|
|
27
26
|
referralAuthoringSchema
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import {
|
|
30
|
-
badgeDeclarationSchema,
|
|
31
|
-
leaderboardAuthoringSchema,
|
|
32
|
-
pointLedgerDeclarationSchema
|
|
33
|
-
} from "./chunk-WSBYWVTZ.js";
|
|
27
|
+
} from "./chunk-NG4GZ54I.js";
|
|
34
28
|
import {
|
|
35
29
|
announcementSchema,
|
|
36
30
|
authorBudgetSchema,
|
|
37
31
|
authoringKey,
|
|
32
|
+
badgeDeclarationSchema,
|
|
38
33
|
badgeReward,
|
|
39
34
|
balanceAtLeast,
|
|
40
35
|
budgetSchema,
|
|
@@ -70,8 +65,10 @@ import {
|
|
|
70
65
|
isEvmChainId,
|
|
71
66
|
isNftCollection,
|
|
72
67
|
isSolanaProgram,
|
|
68
|
+
leaderboardAuthoringSchema,
|
|
73
69
|
ledgerKey,
|
|
74
70
|
ledgerSettingSchema,
|
|
71
|
+
limits,
|
|
75
72
|
maxWalletEventLogs,
|
|
76
73
|
maxWalletEventLookback,
|
|
77
74
|
maxWalletTransactionLookback,
|
|
@@ -82,6 +79,7 @@ import {
|
|
|
82
79
|
parseContractFunction,
|
|
83
80
|
parseNftCollection,
|
|
84
81
|
parseSettings,
|
|
82
|
+
pointLedgerDeclarationSchema,
|
|
85
83
|
pointsRewardSchema,
|
|
86
84
|
questDescriptionSchema,
|
|
87
85
|
quizAnswersSchema,
|
|
@@ -122,8 +120,10 @@ import {
|
|
|
122
120
|
whereSettings,
|
|
123
121
|
xSearchSourceSchema,
|
|
124
122
|
youtubeShortsNamespace
|
|
125
|
-
} from "./chunk-
|
|
126
|
-
import
|
|
123
|
+
} from "./chunk-HNR6G3GV.js";
|
|
124
|
+
import {
|
|
125
|
+
parseDefinition
|
|
126
|
+
} from "./chunk-EOUEAOWJ.js";
|
|
127
127
|
|
|
128
128
|
// src/builders.ts
|
|
129
129
|
import * as z from "zod";
|
|
@@ -199,21 +199,21 @@ var questCompleted = (quest) => ({
|
|
|
199
199
|
kind: "quest",
|
|
200
200
|
quest
|
|
201
201
|
});
|
|
202
|
-
var offerBuilderSchema = offerAuthoringSchema.superRefine(
|
|
202
|
+
var offerBuilderSchema = /* @__PURE__ */ (() => offerAuthoringSchema.superRefine(
|
|
203
203
|
(offer, context) => {
|
|
204
204
|
const message = questOnlyRewardError(offer.reward, "offers");
|
|
205
205
|
if (message) {
|
|
206
206
|
context.addIssue({ code: "custom", message, path: ["reward"] });
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
);
|
|
209
|
+
))();
|
|
210
210
|
function defineOffer(input) {
|
|
211
211
|
return resourceHandle(
|
|
212
212
|
"offer",
|
|
213
213
|
parseDefinition("Offer", offerBuilderSchema, input)
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
|
-
var referralBuilderSchema = referralAuthoringSchema.superRefine(
|
|
216
|
+
var referralBuilderSchema = /* @__PURE__ */ (() => referralAuthoringSchema.superRefine(
|
|
217
217
|
(referral, context) => {
|
|
218
218
|
for (const side of ["inviter", "invitee"]) {
|
|
219
219
|
refuseQuestOnlyRewards(
|
|
@@ -232,7 +232,7 @@ var referralBuilderSchema = referralAuthoringSchema.superRefine(
|
|
|
232
232
|
);
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
);
|
|
235
|
+
))();
|
|
236
236
|
function defineReferral(input) {
|
|
237
237
|
const { qualification, inviterGroup, milestones, bonuses, ...properties } = input;
|
|
238
238
|
const definition = parseDefinition("Referral", referralBuilderSchema, {
|
|
@@ -255,7 +255,7 @@ function defineReferral(input) {
|
|
|
255
255
|
function earned(options = {}) {
|
|
256
256
|
return { kind: "earned", ...options };
|
|
257
257
|
}
|
|
258
|
-
var leaderboardBuilderSchema = leaderboardAuthoringSchema.superRefine(
|
|
258
|
+
var leaderboardBuilderSchema = /* @__PURE__ */ (() => leaderboardAuthoringSchema.superRefine(
|
|
259
259
|
(board, context) => {
|
|
260
260
|
for (const [index, prize] of (board.settle?.prizes ?? []).entries()) {
|
|
261
261
|
refuseQuestOnlyRewards(
|
|
@@ -266,7 +266,14 @@ var leaderboardBuilderSchema = leaderboardAuthoringSchema.superRefine(
|
|
|
266
266
|
);
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
);
|
|
269
|
+
))();
|
|
270
|
+
function leaderboardTiesWarning(board) {
|
|
271
|
+
const live = board.ties ?? "shared";
|
|
272
|
+
if (!board.settle || board.settle.ties === live) {
|
|
273
|
+
return null;
|
|
274
|
+
}
|
|
275
|
+
return `Leaderboard${board.key ? ` "${board.key}"` : ""} orders equal scores "${live}" in its live standings${board.ties === void 0 ? " (ties left out)" : ""} but "${board.settle.ties}" when it settles, so the ranks members see are not the ranks prizes pay. Set ties: "${board.settle.ties}" beside settle.ties to show the order prizes pay.`;
|
|
276
|
+
}
|
|
270
277
|
function defineLeaderboard(input) {
|
|
271
278
|
const { ledger, group, score, settle, ...properties } = input;
|
|
272
279
|
const pool = settle?.pool;
|
|
@@ -288,6 +295,10 @@ function defineLeaderboard(input) {
|
|
|
288
295
|
...group ? { group: identifier.parse(group.key) } : {},
|
|
289
296
|
score: score?.kind === "earned" ? { ...score, quests: score.quests?.map((quest) => quest.key) } : score
|
|
290
297
|
});
|
|
298
|
+
const ties = leaderboardTiesWarning(definition);
|
|
299
|
+
if (ties) {
|
|
300
|
+
console.warn(ties);
|
|
301
|
+
}
|
|
291
302
|
return resourceHandle("leaderboard", definition);
|
|
292
303
|
}
|
|
293
304
|
var x = {
|
|
@@ -553,17 +564,25 @@ var settings = {
|
|
|
553
564
|
quizContentSchema.default(value).meta({ ...options, default: value, kind: "quiz" })
|
|
554
565
|
);
|
|
555
566
|
},
|
|
567
|
+
/**
|
|
568
|
+
* Free text. With `secret: true`, operators set the value in Console and it never leaves Relay:
|
|
569
|
+
* management responses, `domino deploy` and Console withhold it, and the quest's code reads it as
|
|
570
|
+
* usual. A secret setting has no default, so it reads `""` until an operator sets it.
|
|
571
|
+
*/
|
|
556
572
|
text(options) {
|
|
573
|
+
const { secret, ...rest } = options;
|
|
557
574
|
const field = {
|
|
558
|
-
...
|
|
575
|
+
...rest,
|
|
559
576
|
kind: "text",
|
|
560
|
-
|
|
577
|
+
default: "default" in options ? options.default : "",
|
|
578
|
+
minLength: options.minLength ?? (secret ? 0 : 1),
|
|
561
579
|
maxLength: options.maxLength ?? 2e3,
|
|
562
|
-
multiline: options.multiline ?? false
|
|
580
|
+
multiline: options.multiline ?? false,
|
|
581
|
+
...secret ? { secret } : {}
|
|
563
582
|
};
|
|
564
583
|
return setting(
|
|
565
584
|
"text",
|
|
566
|
-
|
|
585
|
+
textSettingSchema(field).default(field.default).meta(field)
|
|
567
586
|
);
|
|
568
587
|
},
|
|
569
588
|
/**
|
|
@@ -833,8 +852,8 @@ function manual(options) {
|
|
|
833
852
|
...options?.actor ? { actor: options.actor } : {}
|
|
834
853
|
};
|
|
835
854
|
}
|
|
836
|
-
var triggerDataSchemas = /* @__PURE__ */ new WeakMap();
|
|
837
|
-
var triggerContentMetrics = /* @__PURE__ */ new WeakMap();
|
|
855
|
+
var triggerDataSchemas = /* @__PURE__ */ (() => /* @__PURE__ */ new WeakMap())();
|
|
856
|
+
var triggerContentMetrics = /* @__PURE__ */ (() => /* @__PURE__ */ new WeakMap())();
|
|
838
857
|
function trackerTrigger(input, constructor) {
|
|
839
858
|
const {
|
|
840
859
|
tracker,
|
|
@@ -877,7 +896,10 @@ function trackerTrigger(input, constructor) {
|
|
|
877
896
|
tracker: tracker.key,
|
|
878
897
|
source: source.kind,
|
|
879
898
|
// A content item is decided by its first observation; later observations run its stage.
|
|
880
|
-
on: content2 ? "new-record" : on ?? defaultTriggerMode(
|
|
899
|
+
on: content2 ? "new-record" : on ?? defaultTriggerMode(
|
|
900
|
+
source.kind,
|
|
901
|
+
source.kind === "custom" ? source.namespace : void 0
|
|
902
|
+
),
|
|
881
903
|
...where ? { where } : {},
|
|
882
904
|
beneficiary,
|
|
883
905
|
// Defaults are left out too: "none", "activation", and "staff" ("claim" on content).
|
|
@@ -1098,6 +1120,11 @@ function questBuilder(template) {
|
|
|
1098
1120
|
`Setting "${key2}" is not a quest setting: build it with a settings builder, such as settings.integer({ label, default, min, max })`
|
|
1099
1121
|
);
|
|
1100
1122
|
}
|
|
1123
|
+
if (field.data.kind === "text" && field.data.secret && field.data.default !== "") {
|
|
1124
|
+
throw new Error(
|
|
1125
|
+
`Secret setting "${key2}" must default to "": set its value in Console, not in source or deploy settings`
|
|
1126
|
+
);
|
|
1127
|
+
}
|
|
1101
1128
|
return [key2, field.data];
|
|
1102
1129
|
})
|
|
1103
1130
|
);
|
|
@@ -1309,8 +1336,8 @@ function ignoredCompletionKey(completion, key) {
|
|
|
1309
1336
|
return `progress(...) keys each contribution with its distinct(...) and ${ignored}: derive the key in distinct(...)`;
|
|
1310
1337
|
}
|
|
1311
1338
|
}
|
|
1312
|
-
var defineQuest = questBuilder(false);
|
|
1313
|
-
var defineQuestType = questBuilder(true);
|
|
1339
|
+
var defineQuest = /* @__PURE__ */ (() => questBuilder(false))();
|
|
1340
|
+
var defineQuestType = /* @__PURE__ */ (() => questBuilder(true))();
|
|
1314
1341
|
export {
|
|
1315
1342
|
CapabilityError,
|
|
1316
1343
|
automatic,
|
|
@@ -1355,6 +1382,8 @@ export {
|
|
|
1355
1382
|
isNftCollection,
|
|
1356
1383
|
isSolanaProgram,
|
|
1357
1384
|
keyed,
|
|
1385
|
+
leaderboardTiesWarning,
|
|
1386
|
+
limits,
|
|
1358
1387
|
manual,
|
|
1359
1388
|
maxWalletEventLogs,
|
|
1360
1389
|
maxWalletEventLookback,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import { b as AttemptStatus, X as RewardType } from './accounts-
|
|
2
|
+
import { b as AttemptStatus, X as RewardType } from './accounts-_lNsiR2k.js';
|
|
3
|
+
import { S as SkipEnrollment } from './tracker-data-Bl-qPIvZ.js';
|
|
3
4
|
|
|
4
5
|
declare const collectionCodeSchema: z.ZodString;
|
|
5
6
|
declare const collectionPassSchema: z.ZodObject<{
|
|
@@ -472,6 +473,7 @@ declare const automaticOutcomeSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
472
473
|
quest: "quest";
|
|
473
474
|
tracker: "tracker";
|
|
474
475
|
}>>;
|
|
476
|
+
enrollment: z.ZodOptional<z.ZodType<SkipEnrollment, unknown, z.core.$ZodTypeInternals<SkipEnrollment, unknown>>>;
|
|
475
477
|
revision: z.ZodNumber;
|
|
476
478
|
createdAt: z.ZodNumber;
|
|
477
479
|
updatedAt: z.ZodNumber;
|
|
@@ -518,6 +520,7 @@ declare const automaticOutcomeSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
518
520
|
quest: "quest";
|
|
519
521
|
tracker: "tracker";
|
|
520
522
|
}>>;
|
|
523
|
+
enrollment: z.ZodOptional<z.ZodType<SkipEnrollment, unknown, z.core.$ZodTypeInternals<SkipEnrollment, unknown>>>;
|
|
521
524
|
revision: z.ZodNumber;
|
|
522
525
|
createdAt: z.ZodNumber;
|
|
523
526
|
updatedAt: z.ZodNumber;
|
|
@@ -578,6 +581,7 @@ declare const automaticOutcomePageSchema: z.ZodObject<{
|
|
|
578
581
|
quest: "quest";
|
|
579
582
|
tracker: "tracker";
|
|
580
583
|
}>>;
|
|
584
|
+
enrollment: z.ZodOptional<z.ZodType<SkipEnrollment, unknown, z.core.$ZodTypeInternals<SkipEnrollment, unknown>>>;
|
|
581
585
|
revision: z.ZodNumber;
|
|
582
586
|
createdAt: z.ZodNumber;
|
|
583
587
|
updatedAt: z.ZodNumber;
|
|
@@ -624,6 +628,7 @@ declare const automaticOutcomePageSchema: z.ZodObject<{
|
|
|
624
628
|
quest: "quest";
|
|
625
629
|
tracker: "tracker";
|
|
626
630
|
}>>;
|
|
631
|
+
enrollment: z.ZodOptional<z.ZodType<SkipEnrollment, unknown, z.core.$ZodTypeInternals<SkipEnrollment, unknown>>>;
|
|
627
632
|
revision: z.ZodNumber;
|
|
628
633
|
createdAt: z.ZodNumber;
|
|
629
634
|
updatedAt: z.ZodNumber;
|
|
@@ -678,6 +683,7 @@ declare const automaticCatchUpPreviewSchema: z.ZodObject<{
|
|
|
678
683
|
quest: "quest";
|
|
679
684
|
tracker: "tracker";
|
|
680
685
|
}>>;
|
|
686
|
+
enrollment: z.ZodOptional<z.ZodType<SkipEnrollment, unknown, z.core.$ZodTypeInternals<SkipEnrollment, unknown>>>;
|
|
681
687
|
revision: z.ZodNumber;
|
|
682
688
|
createdAt: z.ZodNumber;
|
|
683
689
|
updatedAt: z.ZodNumber;
|
|
@@ -724,6 +730,7 @@ declare const automaticCatchUpPreviewSchema: z.ZodObject<{
|
|
|
724
730
|
quest: "quest";
|
|
725
731
|
tracker: "tracker";
|
|
726
732
|
}>>;
|
|
733
|
+
enrollment: z.ZodOptional<z.ZodType<SkipEnrollment, unknown, z.core.$ZodTypeInternals<SkipEnrollment, unknown>>>;
|
|
727
734
|
revision: z.ZodNumber;
|
|
728
735
|
createdAt: z.ZodNumber;
|
|
729
736
|
updatedAt: z.ZodNumber;
|
|
@@ -734,6 +741,7 @@ declare const automaticCatchUpPreviewSchema: z.ZodObject<{
|
|
|
734
741
|
quest: "quest";
|
|
735
742
|
tracker: "tracker";
|
|
736
743
|
}>>;
|
|
744
|
+
enrollment: z.ZodOptional<z.ZodType<SkipEnrollment, unknown, z.core.$ZodTypeInternals<SkipEnrollment, unknown>>>;
|
|
737
745
|
attempt: z.ZodNullable<z.ZodString>;
|
|
738
746
|
wouldAdmit: z.ZodBoolean;
|
|
739
747
|
budgets: z.ZodArray<z.ZodObject<{
|
|
@@ -840,6 +848,7 @@ declare const automaticCatchUpResultSchema: z.ZodObject<{
|
|
|
840
848
|
quest: "quest";
|
|
841
849
|
tracker: "tracker";
|
|
842
850
|
}>>;
|
|
851
|
+
enrollment: z.ZodOptional<z.ZodType<SkipEnrollment, unknown, z.core.$ZodTypeInternals<SkipEnrollment, unknown>>>;
|
|
843
852
|
revision: z.ZodNumber;
|
|
844
853
|
createdAt: z.ZodNumber;
|
|
845
854
|
updatedAt: z.ZodNumber;
|
|
@@ -886,6 +895,7 @@ declare const automaticCatchUpResultSchema: z.ZodObject<{
|
|
|
886
895
|
quest: "quest";
|
|
887
896
|
tracker: "tracker";
|
|
888
897
|
}>>;
|
|
898
|
+
enrollment: z.ZodOptional<z.ZodType<SkipEnrollment, unknown, z.core.$ZodTypeInternals<SkipEnrollment, unknown>>>;
|
|
889
899
|
revision: z.ZodNumber;
|
|
890
900
|
createdAt: z.ZodNumber;
|
|
891
901
|
updatedAt: z.ZodNumber;
|
package/dist/avatar.d.ts
CHANGED
package/dist/browser.d.ts
CHANGED
|
@@ -1,17 +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, 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-
|
|
1
|
+
import { o as SubmissionStore, f as RelayClientOptions, R as RelayClient } from './client-D7IiwEq2.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-K27t4TwM.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 './accounts-
|
|
4
|
+
import { M as MemberSummary } from './participant-activity-DXRq4s6K.js';
|
|
5
|
+
import './accounts-_lNsiR2k.js';
|
|
6
6
|
import 'zod';
|
|
7
|
-
import './tracker-data-
|
|
8
|
-
import './wallet-
|
|
9
|
-
import './
|
|
10
|
-
import './submission-input-DHGKhXfp.js';
|
|
7
|
+
import './tracker-data-Bl-qPIvZ.js';
|
|
8
|
+
import './wallet-B7e06v4m.js';
|
|
9
|
+
import './submission-input-ChL1aYNH.js';
|
|
11
10
|
import './request-error-D_dUPLwo.js';
|
|
12
|
-
import './
|
|
11
|
+
import './reward-deliveries-BCV8hznc.js';
|
|
12
|
+
import './catalog-ByZMRS7I.js';
|
|
13
13
|
import './action-9Xl0StBg.js';
|
|
14
|
-
import './sign-in-providers-
|
|
14
|
+
import './sign-in-providers-BAkGjSXo.js';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* The member's time at the real instant `at` (default now), in epoch milliseconds: what an app
|
package/dist/browser.js
CHANGED
|
@@ -12,24 +12,23 @@ import {
|
|
|
12
12
|
signInOptions,
|
|
13
13
|
solanaSigner,
|
|
14
14
|
walletStandardSolanaSigner
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KCUUHT2V.js";
|
|
16
16
|
import {
|
|
17
17
|
telegramMiniAppInitData
|
|
18
18
|
} from "./chunk-FWLQ5XCS.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-CICDIBOF.js";
|
|
23
|
-
import "./chunk-D26YNACF.js";
|
|
24
|
-
import "./chunk-GTDW453U.js";
|
|
25
|
-
import "./chunk-WSBYWVTZ.js";
|
|
19
|
+
import "./chunk-VBYOAT46.js";
|
|
20
|
+
import "./chunk-E22XSC4L.js";
|
|
21
|
+
import "./chunk-EUEW2APU.js";
|
|
26
22
|
import {
|
|
27
23
|
getHostEnvironment
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-UYVJZR33.js";
|
|
25
|
+
import "./chunk-7H4MRVQF.js";
|
|
26
|
+
import "./chunk-DLABJSBO.js";
|
|
27
|
+
import "./chunk-MPTE7EIV.js";
|
|
28
|
+
import "./chunk-R2KZFX6E.js";
|
|
29
|
+
import "./chunk-NG4GZ54I.js";
|
|
30
|
+
import "./chunk-HNR6G3GV.js";
|
|
31
|
+
import "./chunk-EOUEAOWJ.js";
|
|
33
32
|
export {
|
|
34
33
|
browserSubmissionStore,
|
|
35
34
|
cosmosChainList,
|