@domino-sdk/relay 1.60.0 → 1.61.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 +19 -0
- package/dist/{integrations-CmIkP1Gi.d.ts → announcements-CHx3-HBw.d.ts} +4 -43
- package/dist/{attempt-captures-W2dgzGqE.d.ts → attempt-captures-DYnJVkfg.d.ts} +1 -1
- package/dist/authoring.d.ts +14 -14
- package/dist/authoring.js +38 -27
- package/dist/{automatic-outcomes-Cmou89IS.d.ts → automatic-outcomes-If88LR9f.d.ts} +1 -1
- package/dist/avatar.d.ts +1 -1
- package/dist/browser.d.ts +7 -7
- package/dist/browser.js +10 -10
- package/dist/{chunk-2FHNY52R.js → chunk-24I4R732.js} +33 -2
- package/dist/{chunk-MJEJQH5A.js → chunk-3Y3L2F54.js} +23 -3
- package/dist/{chunk-KUPVQXUJ.js → chunk-5I54XBK2.js} +2 -2
- package/dist/{chunk-OTEUP2SG.js → chunk-7A4J67ZL.js} +1 -1
- package/dist/{chunk-KWFY7L7X.js → chunk-DHXDBAJF.js} +4 -4
- package/dist/{chunk-N3LJ6GFK.js → chunk-DYXDZFKA.js} +5 -2
- package/dist/{chunk-N7YOS4ZU.js → chunk-EN3M5Z4J.js} +1 -1
- package/dist/{chunk-YOAPPIWN.js → chunk-L77O64I4.js} +1 -1
- package/dist/{chunk-422J3QRW.js → chunk-PPB7HALD.js} +1 -1
- package/dist/{chunk-4OFH4BNX.js → chunk-QEAS4ZGS.js} +1 -1
- package/dist/{chunk-XQKUJL7H.js → chunk-QNUHWK7R.js} +3 -3
- package/dist/{chunk-VWMIA2TT.js → chunk-RHBS5FJL.js} +1 -1
- package/dist/{chunk-YNW2ZUUP.js → chunk-SE4PFJPT.js} +1 -1
- package/dist/{chunk-VVRQQRMQ.js → chunk-SKGTNTLF.js} +8 -8
- package/dist/{chunk-Y2IGFLD2.js → chunk-VURRFVNP.js} +7 -7
- package/dist/{chunk-6ZG7WNYX.js → chunk-XBV2CK2H.js} +1 -1
- package/dist/{chunk-GBSDAD3N.js → chunk-ZDJLPN4L.js} +4 -0
- package/dist/{client-Cw1pB5sv.d.ts → client-C51w7fMb.d.ts} +5 -5
- package/dist/{deployments-DI-W7fBq.d.ts → deployments-kWoHFaqj.d.ts} +2 -2
- package/dist/{groups-9Jm3peq3.d.ts → groups-CqcA2Ycs.d.ts} +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.js +9 -9
- package/dist/{analytics-URV-mxjH.d.ts → integrations-B3y36OaB.d.ts} +55 -1
- package/dist/internal.d.ts +11 -11
- package/dist/internal.js +8 -8
- package/dist/{offers-CqXfMIxq.d.ts → offers-BoV4ryUc.d.ts} +2 -2
- package/dist/{pages-Bti7g5mX.d.ts → pages-K7-KjSXw.d.ts} +2 -2
- package/dist/portal-proxy.js +3 -3
- package/dist/react/index.d.ts +15 -11
- package/dist/react/index.js +143 -14
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/5QVFB4TU.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/{schema-CwbRkmlr.d.ts → schema-CZ6Rj0ZF.d.ts} +1 -1
- package/dist/schema.d.ts +14 -14
- package/dist/schema.js +10 -8
- package/dist/server/index.d.ts +11 -11
- package/dist/server/index.js +69 -15
- package/dist/{submission-input-D9EGH_yb.d.ts → submission-input-C54Q8yAD.d.ts} +2 -2
- package/dist/{telegram-browser-CTJh4Ro_.d.ts → telegram-browser-BUceZIGZ.d.ts} +5 -2
- package/dist/testing.d.ts +4 -4
- package/dist/testing.js +5 -5
- package/dist/{transport-B8Ss5lcz.d.ts → transport-BrX9pIGN.d.ts} +109 -10
- package/dist/{wallet-DZWL7lJH.d.ts → wallet-CIqFoxdm.d.ts} +7 -0
- package/dist/{x-KFJD2x8y.d.ts → x-D1PGi8Sq.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/runtime/chunks/ADUMK6CR.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @domino-sdk/relay
|
|
2
2
|
|
|
3
|
+
## 1.61.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f0ce453: `RelayProvider` follows the EVM wallet a participant signed in with through `useSignIn().withWallet()` or a wallet option of `useSignInOptions()`, so the starters need no code for it. When the wallet switches to another account (`accountsChanged`, compared case-insensitively) or reports none because it was locked or disconnected, the provider signs out as `useSignOut()` does and the app shows its sign-in again; it does not sign the new account in. The same account, including the event wallets send on first connect, changes nothing. After a reload the provider finds the wallet again by name and checks `eth_accounts` without a prompt. `WalletSigner` gains an optional `watchAccounts(listener)`, which `evmSigner()` implements, and `Eip1193Provider` an optional `on` and `removeListener`.
|
|
8
|
+
- b369a75: A project connects a Discord server that another project of its organization already connects, ready, in the same environment, without installing Domino's bot again. Any credential with `publish` permission can: an automation key, a CLI session, a personal API key or Console (**Integrations**, **Or reuse**). Installing the bot into a new server stays with an organization administrator in Console.
|
|
9
|
+
|
|
10
|
+
- `management.discord.servers()` and `domino integrations discord servers` list the servers the project can connect.
|
|
11
|
+
- `management.discord.connect(server)` and `domino integrations discord connect --server <id>` connect one, once the bot still sees it. They refuse with 409 `server-not-connected-in-organization` for any other server, 409 `integration-connected` when the project already has a Discord connection, and 422 `server-not-reachable` when the bot lost the server. Connecting the server the project already connects changes nothing.
|
|
12
|
+
- `management.discord.connection()` and `domino integrations discord status` read the project's Discord connection.
|
|
13
|
+
|
|
14
|
+
The project's audit records each connection as `discord-server-connected`, with who connected it and the project whose connection it reused. An automation key and a CLI session connect only in test.
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- e71f881: `domino check` runs each badge, point ledger, offer, leaderboard, referral, dashboard and tracker entry in a separate Node process and parses its export with the schema Relay parses it with at deployment. A definition that fails, such as an offer without `stock`, reports a `DEFINITION_INVALID` error diagnostic with its `file`, `export`, field `path` and message, and fails the check instead of failing later in staging.
|
|
19
|
+
`defineOffer`, `defineBadge`, `defineLedger`, `defineLeaderboard`, `defineReferral`, `defineDashboard` and `defineTracker` still throw a `ZodError` for invalid input, and its message now names the kind, key and fields, for example `Offer "ladder" is invalid: stock: Invalid input: expected number, received undefined`. Staging shows that message when its data setup fails.
|
|
20
|
+
A deployment, preview or staging activation with an inline or described definition that fails its schema now answers 422 `validation-failed` with that message, where it answered 400 `Invalid request`.
|
|
21
|
+
|
|
3
22
|
## 1.60.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import { H as WalletBalanceQuery } from './wallet-
|
|
3
|
-
import { y as ResourceHandle } from './schema-
|
|
4
|
-
import { A as AnalyticsMetricId, a as analyticsCatalog } from './
|
|
2
|
+
import { H as WalletBalanceQuery } from './wallet-CIqFoxdm.js';
|
|
3
|
+
import { y as ResourceHandle } from './schema-CZ6Rj0ZF.js';
|
|
4
|
+
import { A as AnalyticsMetricId, a as analyticsCatalog } from './integrations-B3y36OaB.js';
|
|
5
5
|
|
|
6
6
|
declare const resourceSourceSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
7
7
|
provider: z.ZodLiteral<"domino">;
|
|
@@ -607,43 +607,4 @@ declare const announcementSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
607
607
|
}, z.core.$strict>], "provider">;
|
|
608
608
|
type Announcement = z.infer<typeof announcementSchema>;
|
|
609
609
|
|
|
610
|
-
|
|
611
|
-
declare const evaluatorIntegrationProviderSchema: z.ZodEnum<{
|
|
612
|
-
discord: "discord";
|
|
613
|
-
x: "x";
|
|
614
|
-
}>;
|
|
615
|
-
type EvaluatorIntegrationProvider = z.infer<typeof evaluatorIntegrationProviderSchema>;
|
|
616
|
-
type IntegrationModule = {
|
|
617
|
-
readonly provider: EvaluatorIntegrationProvider;
|
|
618
|
-
};
|
|
619
|
-
declare const integrationProviderSchema: z.ZodEnum<{
|
|
620
|
-
discord: "discord";
|
|
621
|
-
}>;
|
|
622
|
-
type IntegrationProvider = z.infer<typeof integrationProviderSchema>;
|
|
623
|
-
declare const discordServerSchema: z.ZodObject<{
|
|
624
|
-
id: z.ZodString;
|
|
625
|
-
name: z.ZodString;
|
|
626
|
-
icon: z.ZodNullable<z.ZodString>;
|
|
627
|
-
}, z.core.$strip>;
|
|
628
|
-
declare const projectIntegrationSchema: z.ZodObject<{
|
|
629
|
-
provider: z.ZodEnum<{
|
|
630
|
-
discord: "discord";
|
|
631
|
-
}>;
|
|
632
|
-
configured: z.ZodBoolean;
|
|
633
|
-
status: z.ZodEnum<{
|
|
634
|
-
disconnected: "disconnected";
|
|
635
|
-
ready: "ready";
|
|
636
|
-
attention: "attention";
|
|
637
|
-
}>;
|
|
638
|
-
revision: z.ZodNumber;
|
|
639
|
-
server: z.ZodNullable<z.ZodObject<{
|
|
640
|
-
id: z.ZodString;
|
|
641
|
-
name: z.ZodString;
|
|
642
|
-
icon: z.ZodNullable<z.ZodString>;
|
|
643
|
-
}, z.core.$strip>>;
|
|
644
|
-
issue: z.ZodNullable<z.ZodString>;
|
|
645
|
-
connectedAt: z.ZodDefault<z.ZodNumber>;
|
|
646
|
-
}, z.core.$strip>;
|
|
647
|
-
type ProjectIntegration = z.infer<typeof projectIntegrationSchema>;
|
|
648
|
-
|
|
649
|
-
export { settingsFieldsSchema as $, type AmountSetting as A, type BalanceChain as B, dashboardPreviewSchema as C, type DashboardInput as D, type EvaluatorIntegrationProvider as E, defaultPanelWidths as F, discordAnnouncementSchema as G, discordServerSchema as H, type IntegrationModule as I, evaluatorIntegrationProviderSchema as J, integrationProviderSchema as K, isAmount as L, isBalanceChain as M, isBoundSetting as N, missingResourceSettings as O, type ProjectIntegration as P, normalizeDashboard as Q, type ResourceSource as R, type Setting as S, type TikTokVideoBody as T, parseSettings as U, projectIntegrationSchema as V, resourceOptionsSchema as W, resourceRequestSchema as X, type YouTubeShortBody as Y, resourceSourceSchema as Z, settingFieldSchema as _, type BoundSettings as a, settingsValuesSchema as a0, telegramAnnouncementSchema as a1, textSettingSchema as a2, tiktokVideoBodySchema as a3, tiktokVideoMetrics as a4, youtubeShortBodySchema as a5, youtubeShortMetrics as a6, type Announcement as b, type DashboardPanelInput as c, type TikTokVideoMetric as d, type YouTubeShortMetric as e, defineDashboard as f, type DashboardAuthoring as g, type DashboardDefinition as h, type DashboardIssue as i, type DashboardPanel as j, type DashboardPreview as k, type IntegerSettings as l, type IntegrationProvider as m, type ResourceOption as n, type SettingField as o, type SettingsValues as p, announcementSchema as q, announcementTextSchema as r, compatibleSettingKinds as s, dashboardArtifactSchema as t, dashboardAuthoringSchema as u, dashboardDefinitionSchema as v, dashboardIssue as w, dashboardLimits as x, dashboardPanelAuthoringSchema as y, dashboardPanels as z };
|
|
610
|
+
export { type AmountSetting as A, type BalanceChain as B, discordAnnouncementSchema as C, type DashboardInput as D, isAmount as E, isBalanceChain as F, isBoundSetting as G, missingResourceSettings as H, type IntegerSettings as I, normalizeDashboard as J, parseSettings as K, resourceOptionsSchema as L, resourceRequestSchema as M, resourceSourceSchema as N, settingFieldSchema as O, settingsFieldsSchema as P, settingsValuesSchema as Q, type ResourceSource as R, type Setting as S, type TikTokVideoBody as T, telegramAnnouncementSchema as U, textSettingSchema as V, tiktokVideoBodySchema as W, tiktokVideoMetrics as X, type YouTubeShortBody as Y, youtubeShortBodySchema as Z, youtubeShortMetrics as _, type BoundSettings as a, type Announcement as b, type DashboardPanelInput as c, type TikTokVideoMetric as d, type YouTubeShortMetric as e, defineDashboard as f, type DashboardAuthoring as g, type DashboardDefinition as h, type DashboardIssue as i, type DashboardPanel as j, type DashboardPreview as k, type ResourceOption as l, type SettingField as m, type SettingsValues as n, announcementSchema as o, announcementTextSchema as p, compatibleSettingKinds as q, dashboardArtifactSchema as r, dashboardAuthoringSchema as s, dashboardDefinitionSchema as t, dashboardIssue as u, dashboardLimits as v, dashboardPanelAuthoringSchema as w, dashboardPanels as x, dashboardPreviewSchema as y, defaultPanelWidths as z };
|
package/dist/authoring.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { B as xContentBodySchema, I as IdentityKind, C as customSourceSchema, W as WithRecordData, D as WithContent, F as WithAccountRoles, y as ResourceHandle, x as QuestHandle, L as LedgerReference, G as GroupHandle, H as pointLedgerDeclarationSchema, J as TrackerSource, N as trackerDefinitionSchema, U as Tracker, V as TrackerData, X as SourceRoles, Y as LedgerHandle, Z as TrackerDataSchema, _ as xSearchSourceSchema, $ as XTweet, a0 as XContentMetric, a1 as TrackerTriggerPolicy, a2 as Where, a3 as MemberIdentity, P as PointBalance, a4 as ReferralHandle, a5 as TrackerTriggerContext, a6 as TrackerReader, a7 as TextReviewInput, a8 as TextResult, z as PhotoResult, a9 as Decision, aa as rewardSchema, ab as TrackerTriggerMode, ac as RoleOf, ad as WhereSetting, ae as ContentBody, af as BadgeHandle, ag as ContentMetricName, ah as triggerSchema, k as QuestPresentation, l as QuestProfile, m as QuizEvidence, ai as TieredRewardDefinition } from './schema-
|
|
2
|
-
export { aj as LedgerSetting, ak as TrackerPage, al as TrackerReadQuery, am as trackerDataSchema, an as trackerTriggerContextSchema } from './schema-
|
|
1
|
+
import { B as xContentBodySchema, I as IdentityKind, C as customSourceSchema, W as WithRecordData, D as WithContent, F as WithAccountRoles, y as ResourceHandle, x as QuestHandle, L as LedgerReference, G as GroupHandle, H as pointLedgerDeclarationSchema, J as TrackerSource, N as trackerDefinitionSchema, U as Tracker, V as TrackerData, X as SourceRoles, Y as LedgerHandle, Z as TrackerDataSchema, _ as xSearchSourceSchema, $ as XTweet, a0 as XContentMetric, a1 as TrackerTriggerPolicy, a2 as Where, a3 as MemberIdentity, P as PointBalance, a4 as ReferralHandle, a5 as TrackerTriggerContext, a6 as TrackerReader, a7 as TextReviewInput, a8 as TextResult, z as PhotoResult, a9 as Decision, aa as rewardSchema, ab as TrackerTriggerMode, ac as RoleOf, ad as WhereSetting, ae as ContentBody, af as BadgeHandle, ag as ContentMetricName, ah as triggerSchema, k as QuestPresentation, l as QuestProfile, m as QuizEvidence, ai as TieredRewardDefinition } from './schema-CZ6Rj0ZF.js';
|
|
2
|
+
export { aj as LedgerSetting, ak as TrackerPage, al as TrackerReadQuery, am as trackerDataSchema, an as trackerTriggerContextSchema } from './schema-CZ6Rj0ZF.js';
|
|
3
3
|
import { M as MemberCompletion, B as Budget, A as AuthorBudget } from './capability-error-DufwG3G0.js';
|
|
4
4
|
export { C as CapabilityError, a as CapabilityErrorCode, c as capabilityErrorCodes } from './capability-error-DufwG3G0.js';
|
|
5
|
-
import { N as NftCollection, o as ContractCall, p as ContractEvent, S as SolanaProgram, q as WalletBalanceSourceQuery, r as WalletTransaction, s as WalletInstruction, e as ProfileReferral, t as WalletReader } from './wallet-
|
|
6
|
-
export { u as ContractCallParts, v as ContractCallReturnType, w as ContractEventInput, x as ContractEventParts, y as ContractFunction, z as CosmosDenom, a as CosmosNetwork, E as EvmChainId, B as NftCollectionParts, D as NftStandard, F as WalletBalance, G as WalletBalanceChange, H as WalletBalanceQuery, I as WalletBalanceSample, J as WalletCall, K as WalletCallArgument, M as WalletCallQuery, Q as WalletDelegations, R as WalletDelegationsQuery, T as WalletEventCondition, U as WalletEventValue, V as WalletEvents, X as WalletEventsQuery, Y as WalletNfts, Z as WalletNftsQuery, _ as WalletTransactions, $ as WalletTransactionsQuery, a0 as cosmosDenomSchema, a1 as cosmosNetworkSchema, a2 as isContractCall, a3 as isContractEvent, a4 as isEvmChainId, a5 as isNftCollection, a6 as isSolanaProgram, a7 as maxWalletEventLogs, a8 as maxWalletEventLookback, a9 as maxWalletTransactionLookback, aa as maxWalletTransactions, ab as parseContractCall, ac as parseContractEvent, ad as parseContractFunction, ae as parseNftCollection } from './wallet-
|
|
5
|
+
import { N as NftCollection, o as ContractCall, p as ContractEvent, S as SolanaProgram, q as WalletBalanceSourceQuery, r as WalletTransaction, s as WalletInstruction, e as ProfileReferral, t as WalletReader } from './wallet-CIqFoxdm.js';
|
|
6
|
+
export { u as ContractCallParts, v as ContractCallReturnType, w as ContractEventInput, x as ContractEventParts, y as ContractFunction, z as CosmosDenom, a as CosmosNetwork, E as EvmChainId, B as NftCollectionParts, D as NftStandard, F as WalletBalance, G as WalletBalanceChange, H as WalletBalanceQuery, I as WalletBalanceSample, J as WalletCall, K as WalletCallArgument, M as WalletCallQuery, Q as WalletDelegations, R as WalletDelegationsQuery, T as WalletEventCondition, U as WalletEventValue, V as WalletEvents, X as WalletEventsQuery, Y as WalletNfts, Z as WalletNftsQuery, _ as WalletTransactions, $ as WalletTransactionsQuery, a0 as cosmosDenomSchema, a1 as cosmosNetworkSchema, a2 as isContractCall, a3 as isContractEvent, a4 as isEvmChainId, a5 as isNftCollection, a6 as isSolanaProgram, a7 as maxWalletEventLogs, a8 as maxWalletEventLookback, a9 as maxWalletTransactionLookback, aa as maxWalletTransactions, ab as parseContractCall, ac as parseContractEvent, ad as parseContractFunction, ae as parseNftCollection } from './wallet-CIqFoxdm.js';
|
|
7
7
|
import * as z from 'zod';
|
|
8
8
|
export { z } from 'zod';
|
|
9
|
-
import { f as badgeDeclarationSchema, B as Badge } from './offers-
|
|
10
|
-
export { g as defineOffer } from './offers-
|
|
11
|
-
import { E as EngagementBudget, m as leaderboardDefinitionSchema, l as AuthoringIdentity, r as referralAuthoringSchema, C as CampaignDefinition, A as AvailabilityWindow } from './groups-
|
|
12
|
-
export { n as defineCampaign, o as defineGroup } from './groups-
|
|
9
|
+
import { f as badgeDeclarationSchema, B as Badge } from './offers-BoV4ryUc.js';
|
|
10
|
+
export { g as defineOffer } from './offers-BoV4ryUc.js';
|
|
11
|
+
import { E as EngagementBudget, m as leaderboardDefinitionSchema, l as AuthoringIdentity, r as referralAuthoringSchema, C as CampaignDefinition, A as AvailabilityWindow } from './groups-CqcA2Ycs.js';
|
|
12
|
+
export { n as defineCampaign, o as defineGroup } from './groups-CqcA2Ycs.js';
|
|
13
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
14
|
export { i as TelegramChatMember, j as TelegramChatMemberStatus, k as TelegramMessageData, l as TelegramReactionData } from './accounts-DoabriBX.js';
|
|
15
15
|
import { a as StreakPolicy, Q as QuizContent } from './streaks-0YuipsUQ.js';
|
|
16
|
-
import { R as ResourceSource, S as Setting, A as AmountSetting, B as BalanceChain,
|
|
17
|
-
export { D as DashboardInput, c as DashboardPanelInput, T as TikTokVideoBody, d as TikTokVideoMetric, Y as YouTubeShortBody, e as YouTubeShortMetric, f as defineDashboard } from './
|
|
18
|
-
import { P as Prerequisite, T as TextEvidence, U as UrlEvidence, a as TextOptions, b as UrlOptions } from './submission-input-
|
|
19
|
-
export { c as balanceAtLeast, d as completed, i as inGroup } from './submission-input-
|
|
20
|
-
import { I as ImageReader, X as XReader } from './x-
|
|
16
|
+
import { R as ResourceSource, S as Setting, A as AmountSetting, B as BalanceChain, a as BoundSettings, b as Announcement } from './announcements-CHx3-HBw.js';
|
|
17
|
+
export { D as DashboardInput, c as DashboardPanelInput, T as TikTokVideoBody, d as TikTokVideoMetric, Y as YouTubeShortBody, e as YouTubeShortMetric, f as defineDashboard } from './announcements-CHx3-HBw.js';
|
|
18
|
+
import { P as Prerequisite, T as TextEvidence, U as UrlEvidence, a as TextOptions, b as UrlOptions } from './submission-input-C54Q8yAD.js';
|
|
19
|
+
export { c as balanceAtLeast, d as completed, i as inGroup } from './submission-input-C54Q8yAD.js';
|
|
20
|
+
import { I as ImageReader, X as XReader } from './x-D1PGi8Sq.js';
|
|
21
|
+
import { I as IntegrationModule } from './integrations-B3y36OaB.js';
|
|
21
22
|
export { f as formatUnits, p as parseUnits } from './units-CwgsPB_r.js';
|
|
22
|
-
import './analytics-URV-mxjH.js';
|
|
23
23
|
|
|
24
24
|
declare function defineBadge(input: z.input<typeof badgeDeclarationSchema>): {
|
|
25
25
|
name: string;
|
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-DYXDZFKA.js";
|
|
12
12
|
import {
|
|
13
13
|
CapabilityError,
|
|
14
14
|
capabilityErrorCodes
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
sourceDataSchema,
|
|
18
18
|
sourceRoles,
|
|
19
19
|
validateQuestShape
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-RHBS5FJL.js";
|
|
21
21
|
import {
|
|
22
22
|
badgeDeclarationSchema,
|
|
23
23
|
defineOffer,
|
|
@@ -25,11 +25,12 @@ import {
|
|
|
25
25
|
engagementScoreInputSchema,
|
|
26
26
|
engagementScoreSchema,
|
|
27
27
|
leaderboardAuthoringSchema,
|
|
28
|
+
parseDefinition,
|
|
28
29
|
referralAuthoringSchema
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-3Y3L2F54.js";
|
|
30
31
|
import {
|
|
31
32
|
pointLedgerDeclarationSchema
|
|
32
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-SE4PFJPT.js";
|
|
33
34
|
import {
|
|
34
35
|
announcementSchema,
|
|
35
36
|
authorBudgetSchema,
|
|
@@ -120,15 +121,21 @@ import {
|
|
|
120
121
|
whereSettings,
|
|
121
122
|
xSearchSourceSchema,
|
|
122
123
|
youtubeShortsNamespace
|
|
123
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-ZDJLPN4L.js";
|
|
124
125
|
|
|
125
126
|
// src/builders.ts
|
|
126
127
|
import * as z from "zod";
|
|
127
128
|
function defineBadge(input) {
|
|
128
|
-
return resourceHandle(
|
|
129
|
+
return resourceHandle(
|
|
130
|
+
"badge",
|
|
131
|
+
parseDefinition("Badge", badgeDeclarationSchema, input)
|
|
132
|
+
);
|
|
129
133
|
}
|
|
130
134
|
function defineLedger(input) {
|
|
131
|
-
return resourceHandle(
|
|
135
|
+
return resourceHandle(
|
|
136
|
+
"ledger",
|
|
137
|
+
parseDefinition("Point ledger", pointLedgerDeclarationSchema, input)
|
|
138
|
+
);
|
|
132
139
|
}
|
|
133
140
|
function defineEngagementReward(input) {
|
|
134
141
|
const { target, ledger, ...config } = input;
|
|
@@ -170,7 +177,7 @@ var questCompleted = (quest) => ({
|
|
|
170
177
|
});
|
|
171
178
|
function defineReferral(input) {
|
|
172
179
|
const { qualification, inviterGroup, milestones, bonuses, ...properties } = input;
|
|
173
|
-
const definition = referralAuthoringSchema
|
|
180
|
+
const definition = parseDefinition("Referral", referralAuthoringSchema, {
|
|
174
181
|
...properties,
|
|
175
182
|
qualification: qualification.kind === "quest" ? { kind: "quest", quest: qualification.quest.key } : qualification,
|
|
176
183
|
...inviterGroup ? { inviterGroup: identifier.parse(inviterGroup.key) } : {},
|
|
@@ -193,24 +200,28 @@ function earned(options = {}) {
|
|
|
193
200
|
function defineLeaderboard(input) {
|
|
194
201
|
const { ledger, group, score, settle, ...properties } = input;
|
|
195
202
|
const pool = settle?.pool;
|
|
196
|
-
const definition =
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
203
|
+
const definition = parseDefinition(
|
|
204
|
+
"Leaderboard",
|
|
205
|
+
leaderboardAuthoringSchema,
|
|
206
|
+
{
|
|
207
|
+
...properties,
|
|
208
|
+
...settle ? {
|
|
209
|
+
settle: {
|
|
210
|
+
...settle,
|
|
211
|
+
prizes: settle.prizes ?? [],
|
|
212
|
+
...pool ? {
|
|
213
|
+
pool: {
|
|
214
|
+
...pool,
|
|
215
|
+
...pool.ledger === void 0 ? {} : { ledger: ledgerKey(pool.ledger) }
|
|
216
|
+
}
|
|
217
|
+
} : {}
|
|
218
|
+
}
|
|
219
|
+
} : {},
|
|
220
|
+
balance: ledgerKey(ledger),
|
|
221
|
+
...group ? { group: identifier.parse(group.key) } : {},
|
|
222
|
+
score: score?.kind === "earned" ? { ...score, quests: score.quests?.map((quest) => quest.key) } : score
|
|
223
|
+
}
|
|
224
|
+
);
|
|
214
225
|
return resourceHandle("leaderboard", definition);
|
|
215
226
|
}
|
|
216
227
|
var x = {
|
|
@@ -277,7 +288,7 @@ function isZodSchema(value) {
|
|
|
277
288
|
function defineTracker(input) {
|
|
278
289
|
return resourceHandle(
|
|
279
290
|
"tracker",
|
|
280
|
-
trackerDefinitionSchema
|
|
291
|
+
parseDefinition("Tracker", trackerDefinitionSchema, input)
|
|
281
292
|
);
|
|
282
293
|
}
|
|
283
294
|
function messages(options = {}) {
|
package/dist/avatar.d.ts
CHANGED
package/dist/browser.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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-C51w7fMb.js';
|
|
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-BUceZIGZ.js';
|
|
3
3
|
export { H as HostEnvironment, g as getHostEnvironment } from './host-environment-FN4zg3hw.js';
|
|
4
4
|
import { M as MemberSummary } from './participant-activity-DHL8QYks.js';
|
|
5
|
-
import './schema-
|
|
5
|
+
import './schema-CZ6Rj0ZF.js';
|
|
6
6
|
import 'zod';
|
|
7
|
-
import './wallet-
|
|
8
|
-
import './pages-
|
|
9
|
-
import './submission-input-
|
|
10
|
-
import './groups-
|
|
7
|
+
import './wallet-CIqFoxdm.js';
|
|
8
|
+
import './pages-K7-KjSXw.js';
|
|
9
|
+
import './submission-input-C54Q8yAD.js';
|
|
10
|
+
import './groups-CqcA2Ycs.js';
|
|
11
11
|
import './action-DBzILFx9.js';
|
|
12
12
|
import './accounts-DoabriBX.js';
|
|
13
13
|
|
package/dist/browser.js
CHANGED
|
@@ -13,19 +13,19 @@ import {
|
|
|
13
13
|
solanaSigner,
|
|
14
14
|
telegramMiniAppInitData,
|
|
15
15
|
walletStandardSolanaSigner
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-24I4R732.js";
|
|
17
|
+
import "./chunk-SKGTNTLF.js";
|
|
18
|
+
import "./chunk-QEAS4ZGS.js";
|
|
19
|
+
import "./chunk-QNUHWK7R.js";
|
|
20
|
+
import "./chunk-3Y3L2F54.js";
|
|
21
|
+
import "./chunk-SE4PFJPT.js";
|
|
22
22
|
import {
|
|
23
23
|
getHostEnvironment
|
|
24
24
|
} from "./chunk-KDR2VAJP.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-XBV2CK2H.js";
|
|
26
|
+
import "./chunk-EN3M5Z4J.js";
|
|
27
|
+
import "./chunk-PPB7HALD.js";
|
|
28
|
+
import "./chunk-ZDJLPN4L.js";
|
|
29
29
|
export {
|
|
30
30
|
browserSubmissionStore,
|
|
31
31
|
cosmosChainList,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRelayClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SKGTNTLF.js";
|
|
4
4
|
import {
|
|
5
5
|
RelayErrorCode,
|
|
6
6
|
asRelayError,
|
|
7
7
|
clientError,
|
|
8
8
|
cosmosChain
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZDJLPN4L.js";
|
|
10
10
|
|
|
11
11
|
// src/base58.ts
|
|
12
12
|
var alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
@@ -78,6 +78,37 @@ function evmSigner(provider, info = {}) {
|
|
|
78
78
|
throw new Error("The wallet returned no signature.");
|
|
79
79
|
}
|
|
80
80
|
return { signature };
|
|
81
|
+
},
|
|
82
|
+
watchAccounts(listener) {
|
|
83
|
+
let stopped = false;
|
|
84
|
+
let heard = false;
|
|
85
|
+
const report = (accounts) => {
|
|
86
|
+
if (!stopped && Array.isArray(accounts)) {
|
|
87
|
+
listener(
|
|
88
|
+
accounts.filter(
|
|
89
|
+
(account) => typeof account === "string"
|
|
90
|
+
)
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const changed = (accounts) => {
|
|
95
|
+
heard = true;
|
|
96
|
+
report(accounts);
|
|
97
|
+
};
|
|
98
|
+
provider.on?.("accountsChanged", changed);
|
|
99
|
+
provider.request({ method: "eth_accounts" }).then(
|
|
100
|
+
(accounts) => {
|
|
101
|
+
if (!heard) {
|
|
102
|
+
report(accounts);
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
() => {
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
return () => {
|
|
109
|
+
stopped = true;
|
|
110
|
+
provider.removeListener?.("accountsChanged", changed);
|
|
111
|
+
};
|
|
81
112
|
}
|
|
82
113
|
};
|
|
83
114
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pointEntrySchema,
|
|
3
3
|
profileSummarySchema
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SE4PFJPT.js";
|
|
5
5
|
import {
|
|
6
6
|
authoringIdentityShape,
|
|
7
7
|
calendarPeriodSchema,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
responseShape,
|
|
19
19
|
rewardKey,
|
|
20
20
|
tierRewardSchema
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ZDJLPN4L.js";
|
|
22
22
|
|
|
23
23
|
// src/badges.ts
|
|
24
24
|
import * as z from "zod";
|
|
@@ -751,6 +751,22 @@ var referralManagementSchema = z4.object({
|
|
|
751
751
|
next: amount2.nullable()
|
|
752
752
|
});
|
|
753
753
|
|
|
754
|
+
// src/definition-error.ts
|
|
755
|
+
function issueText(issues) {
|
|
756
|
+
return issues.map(
|
|
757
|
+
(issue) => issue.path.length ? issue.path.map(String).join(".") + ": " + issue.message : issue.message
|
|
758
|
+
).join("; ");
|
|
759
|
+
}
|
|
760
|
+
function parseDefinition(kind, schema, input) {
|
|
761
|
+
const parsed = schema.safeParse(input);
|
|
762
|
+
if (parsed.success) {
|
|
763
|
+
return parsed.data;
|
|
764
|
+
}
|
|
765
|
+
const key = typeof input === "object" && input !== null && "key" in input && typeof input.key === "string" ? ` "${input.key}"` : "";
|
|
766
|
+
parsed.error.message = `${kind}${key} is invalid: ${issueText(parsed.error.issues)}`;
|
|
767
|
+
throw parsed.error;
|
|
768
|
+
}
|
|
769
|
+
|
|
754
770
|
// src/offers.ts
|
|
755
771
|
import * as z5 from "zod";
|
|
756
772
|
var quantity = z5.number().int().safe().nonnegative();
|
|
@@ -864,7 +880,10 @@ var redemptionCancellationSchema = z5.object({
|
|
|
864
880
|
reason: z5.string().trim().min(1).max(500)
|
|
865
881
|
}).strict();
|
|
866
882
|
function defineOffer(input) {
|
|
867
|
-
return resourceHandle(
|
|
883
|
+
return resourceHandle(
|
|
884
|
+
"offer",
|
|
885
|
+
parseDefinition("Offer", offerAuthoringSchema, input)
|
|
886
|
+
);
|
|
868
887
|
}
|
|
869
888
|
|
|
870
889
|
export {
|
|
@@ -945,6 +964,7 @@ export {
|
|
|
945
964
|
referralSummarySchema,
|
|
946
965
|
referralHistorySchema,
|
|
947
966
|
referralManagementSchema,
|
|
967
|
+
parseDefinition,
|
|
948
968
|
offerPriceSchema,
|
|
949
969
|
offerLimitSchema,
|
|
950
970
|
offerDefinitionSchema,
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
imageFieldsSchema,
|
|
5
5
|
imageInspectionSchema,
|
|
6
6
|
imageSightingsSchema
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-L77O64I4.js";
|
|
8
8
|
import {
|
|
9
9
|
photoResultSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZDJLPN4L.js";
|
|
11
11
|
|
|
12
12
|
// src/image-results.ts
|
|
13
13
|
import * as z from "zod";
|
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
retryAfter,
|
|
5
5
|
retrying,
|
|
6
6
|
validTimeout
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XBV2CK2H.js";
|
|
8
8
|
import {
|
|
9
9
|
clientIdentity
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EN3M5Z4J.js";
|
|
11
11
|
import {
|
|
12
12
|
authScopeSchema
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PPB7HALD.js";
|
|
14
14
|
import {
|
|
15
15
|
RequestError,
|
|
16
16
|
appIdentityKindSchema,
|
|
17
17
|
isRequestError,
|
|
18
18
|
knownResponse,
|
|
19
19
|
openIdentityKindSchema
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ZDJLPN4L.js";
|
|
21
21
|
|
|
22
22
|
// src/configuration.ts
|
|
23
23
|
function questConfiguration(release) {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
parseDefinition
|
|
3
|
+
} from "./chunk-3Y3L2F54.js";
|
|
1
4
|
import {
|
|
2
5
|
identifier,
|
|
3
6
|
resourceHandle,
|
|
4
7
|
responseShape
|
|
5
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZDJLPN4L.js";
|
|
6
9
|
|
|
7
10
|
// src/youtube.ts
|
|
8
11
|
import * as z from "zod";
|
|
@@ -648,7 +651,7 @@ var dashboardPreviewSchema = responseShape(
|
|
|
648
651
|
);
|
|
649
652
|
var keyOf = (reference) => typeof reference === "string" ? reference : reference.key;
|
|
650
653
|
function defineDashboard(input) {
|
|
651
|
-
const authored = dashboardAuthoringSchema
|
|
654
|
+
const authored = parseDefinition("Dashboard", dashboardAuthoringSchema, {
|
|
652
655
|
...input,
|
|
653
656
|
sections: input.sections.map((section) => ({
|
|
654
657
|
...section,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
badgeSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3Y3L2F54.js";
|
|
4
4
|
import {
|
|
5
5
|
pointLedgerReferenceSchema
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SE4PFJPT.js";
|
|
7
7
|
import {
|
|
8
8
|
authoringIdentityShape,
|
|
9
9
|
entitlementSchema,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
storedQuestDescriptionSchema,
|
|
26
26
|
storedReviewModeSchema,
|
|
27
27
|
tieredRewardReferenceSchema
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-ZDJLPN4L.js";
|
|
29
29
|
|
|
30
30
|
// src/participant-activity.ts
|
|
31
31
|
import * as z from "zod";
|