@domino-sdk/relay 1.55.0 → 1.56.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 +11 -0
- package/dist/authoring.d.ts +146 -64
- package/dist/authoring.js +36 -6
- package/dist/browser.d.ts +5 -5
- package/dist/browser.js +10 -10
- package/dist/{chunk-VFBQVY4X.js → chunk-ABJ4G47X.js} +1 -1
- package/dist/{chunk-YCOKTQ4E.js → chunk-BHHUSBSD.js} +1 -1
- package/dist/{chunk-C7QZ4UBB.js → chunk-BJYMTCWG.js} +16 -3
- package/dist/{chunk-YEVD4A5X.js → chunk-CK7HO32Z.js} +1 -1
- package/dist/{chunk-IUF7DW76.js → chunk-CXKXPB7K.js} +12 -7
- package/dist/{chunk-WUEQOKJH.js → chunk-G6XVBYH7.js} +4 -4
- package/dist/{chunk-SABMNPF2.js → chunk-H2MD6E7Z.js} +1 -1
- package/dist/{chunk-WHG5WE43.js → chunk-INSWI2VZ.js} +1 -1
- package/dist/{chunk-TLK2MD4S.js → chunk-KBVH4XZC.js} +1 -1
- package/dist/{chunk-MLIXJPKL.js → chunk-MHPKEVEW.js} +1 -0
- package/dist/{chunk-XALIFNMD.js → chunk-MNU6UPXY.js} +1 -1
- package/dist/{chunk-GL43VQ5D.js → chunk-NK6EER33.js} +38 -8
- package/dist/{chunk-IZRITLVV.js → chunk-OTITLABX.js} +2 -2
- package/dist/{chunk-56DBFNR2.js → chunk-QNQNKIAA.js} +1 -1
- package/dist/{chunk-UY6KMLQG.js → chunk-RBPMT53S.js} +125 -99
- package/dist/{chunk-F6HECAXA.js → chunk-ULQU7KC4.js} +144 -101
- package/dist/{chunk-WHMXXHPX.js → chunk-VSHV7FEA.js} +1 -1
- package/dist/{chunk-YE3XYB2F.js → chunk-W5U2WXG3.js} +2 -2
- package/dist/{client-C4zUZKpj.d.ts → client-bX3oTpRu.d.ts} +79 -4
- package/dist/{deployments-B32QS1CI.d.ts → deployments-D3lxfQMB.d.ts} +824 -400
- package/dist/{groups-O6onGPmC.d.ts → groups-DPE004_V.d.ts} +4 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +9 -9
- package/dist/{integrations-C6_uUh-s.d.ts → integrations-CcD5NPEA.d.ts} +50 -1
- package/dist/internal.d.ts +5 -5
- package/dist/internal.js +9 -9
- package/dist/{offers-BMDNcvwB.d.ts → offers-CtzMeB7O.d.ts} +206 -1
- package/dist/{pages-BFloMpyQ.d.ts → pages-BlLqB8ZQ.d.ts} +57 -1
- package/dist/portal-proxy.js +4 -4
- package/dist/react/index.d.ts +86 -8
- package/dist/react/index.js +65 -10
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/NDB42VFF.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/schema.d.ts +634 -388
- package/dist/schema.js +30 -10
- package/dist/server/index.d.ts +5 -5
- package/dist/server/index.js +1232 -1072
- package/dist/{submission-input-BbdawqVy.d.ts → submission-input-wTiYGdgA.d.ts} +1 -1
- package/dist/{telegram-browser-CwaxROAZ.d.ts → telegram-browser-Bh3i0HiH.d.ts} +1 -1
- package/dist/testing.js +5 -5
- package/dist/{transport-CZJOW5Sr.d.ts → transport-CnKA-_RL.d.ts} +6451 -4210
- package/package.json +1 -1
- package/dist/runtime/chunks/WKATKZXE.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @domino-sdk/relay
|
|
2
2
|
|
|
3
|
+
## 1.56.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 9ec9f2f: Publishing creates the groups code names. A deployment whose quest `groupMembership(group)` reward or `inGroup(group)` prerequisite, offer `inGroup(group)` requirement, leaderboard `group` or referral `inviterGroup` names a group the environment doesn't have now creates it, with no members and the `defineGroup` handle's title (the key when only a leaderboard or referral program names it), instead of refusing with 422 `validation-failed`. Approving a promotion creates the groups live lacks the same way. The deployment preview and result, and the prepared promotion, list each such group as a `group-created` warning, and the audit history records `group-created` with the deployment or promotion as its reason. An existing group keeps its title and members, and publishing never unarchives one: a `groupMembership` reward naming an archived group still refuses. A project whose code uses groups no longer needs `domino groups create` before its first deployment or promotion.
|
|
8
|
+
- fbe8e64: Offers take prerequisites. `defineOffer({ ..., requires })` accepts the prerequisites quests do, `completed(quest)`, `balanceAtLeast(ledger, minimum)` and `inGroup(group)`, at most 30; `offerDefinitionSchema` and `offerAuthoringSchema` gain an optional `requires`. Publication refuses a required quest or ledger the deployment doesn't know. Redeeming as a member who misses one fails with 409 `prerequisites-incomplete` and `missing`, the shape quest admission uses, before any points or stock are spent. `Offer` gains `requires` and `missing`: for a signed-in member, `relay.offers.list()` and `useOffers()` list the prerequisites they have not met, empty for a read without a member or an offer without `requires`. `availability` keeps its four kinds. Console Rewards shows an offer's requirements on its card, and a promotion carries them to live.
|
|
9
|
+
- cba70f4: Add the organization's billing read. `management.billing.organization()` and `domino billing organization` (`GET /management/v1/organization/billing`) are open to any member of the organization and need no project. They list the projects the caller may read, each with its plan, `live` and `liveState` as `management.usage.plan()` reports them, and its Stripe subscription. They also return the organization's Free projects against their limit (`freeProjects`), the free AI allowance its Free projects share (`freeAi`), the monthly AI allowance across the organization, the trial, whether plan limits are enforced, and whether the caller may open the customer portal (`billing`). `management.billing.organizationPortal()` (`POST /management/v1/organization/billing/portal`) opens the customer portal as `management.billing.portal()` does, returning to Console's organization billing page. `organizationBillingSchema` and the `OrganizationBilling` type are exported from `@domino-sdk/relay/server`, with a reader in `managementResponses`.
|
|
10
|
+
- 6458ebe: Add the project's plan read. `management.usage.plan()` and `domino usage plan` (`GET /management/v1/usage/plan`, `read` permission) return the project's plan and where it came from (`source`), whether it may serve live and why (`live`), live's notice or offline state (`liveState`), the organization's one live trial (`trial`), whether the plan includes a custom domain, the AI builder balance by pool with when it renews (`ai`), the Stripe subscription as `management.billing.read()` reports it, and whether plan limits are enforced. Unlike `management.billing`, it is open to anyone who can read the project. `projectPlanSchema` and the `ProjectPlan` type are exported from `@domino-sdk/relay/server`, with a reader in `managementResponses`.
|
|
11
|
+
- 62c3791: Add TikTok creator accounts and the `tiktok.videos()` tracker source. A signed-in member links their TikTok account through TikTok's consent screen with `relay.auth.creatorAccounts.connect("tiktok")` (`useCreatorAccounts()` in React); the account's subject is its `open_id`, its profile a display name and avatar, and `knownCreatorAccountProviders` now lists `"tiktok"`. Operators read and unlink it like a YouTube channel. `tiktok.videos()` from `@domino-sdk/relay/authoring` reads the public videos on the accounts members linked, only with each member's own token, every `refreshSeconds` of the tracker, as content with a `TikTokVideoBody` (`title`, `description`, `durationSeconds`, `width`, `height`, `createdAt`, `shareUrl`, `isAigc`) and the metrics `views`, `likes`, `comments` and `shares`, so `content()` quests, `performance` and engagement rules use it. A known video the account no longer returns is a content removal; an account whose token needs reconnecting is not read, as `provider-unavailable`. It is a custom source on the reserved namespace `tiktok-videos`, which ingestion refuses. Both are inert until Domino configures TikTok. The `tiktok-videos` capability and the participant and authoring references describe them.
|
|
12
|
+
- a533f93: Add creator accounts and the `youtube.shorts()` tracker source. A signed-in member links the YouTube channel they publish from as a creator account: `relay.auth.creatorAccounts.list()` (`GET /v1/auth/creator-accounts`), `connect(provider)` and `disconnect(provider)`, and `useCreatorAccounts()` in React. A creator account is never a sign-in method, linking another channel replaces the current one, and the account's subject is the channel ID picked on Google's consent screen. Each entry mirrors `AccountConnection` with the channel's `profile`; `provider` is an open string, with `knownCreatorAccountProviders` in `@domino-sdk/relay/schema` listing `"youtube"`, so `CreatorAccount`, `CreatorAccounts` and their schemas sit beside SDK 1.x's closed provider lists. Operators read them on `management.members.get(member).creatorAccounts` and `management.members.creatorAccounts(member)`, and `management.members.unlinkCreatorAccount(member, { provider, subject, revision, reason })` unlinks one with `review` permission; `managedCreatorAccountSchema`, `managedCreatorAccountsSchema` and `memberCreatorAccountUnlinkInputSchema` are exported from `@domino-sdk/relay/server`. `youtube.shorts()` from `@domino-sdk/relay/authoring` reads the Shorts on the channels members linked, every `refreshSeconds` of the tracker, as content with a `YouTubeShortBody` (`title`, `description`, `tags`, `durationSeconds`, `publishedAt`) and the metrics `views`, `likes` and `comments`, so `content()` quests, `performance` and engagement rules use it. It is a custom source on the reserved namespace `youtube-shorts`, which ingestion refuses. Both are inert until Domino configures YouTube. The `creator-accounts` and `youtube-shorts` capabilities and the participant and authoring references describe them.
|
|
13
|
+
|
|
3
14
|
## 1.55.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
package/dist/authoring.d.ts
CHANGED
|
@@ -5,17 +5,17 @@ export { C as CapabilityError, a as CapabilityErrorCode, c as capabilityErrorCod
|
|
|
5
5
|
import { d as ProfileReferral } from './profiles-BoOK03cR.js';
|
|
6
6
|
import * as z from 'zod';
|
|
7
7
|
export { z } from 'zod';
|
|
8
|
-
import { f as badgeDeclarationSchema, B as Badge } from './offers-
|
|
9
|
-
export { g as defineOffer } from './offers-
|
|
10
|
-
import { E as EngagementBudget, l as leaderboardDefinitionSchema, m as AuthoringIdentity, r as referralAuthoringSchema, C as CampaignDefinition, A as AvailabilityWindow } from './groups-
|
|
11
|
-
export { n as defineCampaign, o as defineGroup } from './groups-
|
|
8
|
+
import { f as badgeDeclarationSchema, B as Badge } from './offers-CtzMeB7O.js';
|
|
9
|
+
export { g as defineOffer } from './offers-CtzMeB7O.js';
|
|
10
|
+
import { E as EngagementBudget, l as leaderboardDefinitionSchema, m as AuthoringIdentity, r as referralAuthoringSchema, C as CampaignDefinition, A as AvailabilityWindow } from './groups-DPE004_V.js';
|
|
11
|
+
export { n as defineCampaign, o as defineGroup } from './groups-DPE004_V.js';
|
|
12
12
|
import { d as discordMessagesSourceSchema, D as DiscordMessageData, c as DiscordMessageTextData, e as discordReactionsSourceSchema, f as DiscordReactionData, g as TelegramReader, h as DiscordReader } from './accounts-DRPENuZe.js';
|
|
13
13
|
export { i as TelegramChatMember, j as TelegramChatMemberStatus, k as TelegramReactionData } from './accounts-DRPENuZe.js';
|
|
14
14
|
import { a as StreakPolicy, Q as QuizContent } from './streaks-0YuipsUQ.js';
|
|
15
|
-
import { R as ResourceSource, S as Setting, A as AmountSetting, B as BalanceChain, I as IntegrationModule, a as BoundSettings } from './integrations-
|
|
16
|
-
export { D as DashboardInput, b as DashboardPanelInput, d as defineDashboard } from './integrations-
|
|
17
|
-
import { P as Prerequisite, T as TextEvidence, U as UrlEvidence, a as TextOptions, b as UrlOptions } from './submission-input-
|
|
18
|
-
export { c as balanceAtLeast, d as completed, i as inGroup } from './submission-input-
|
|
15
|
+
import { R as ResourceSource, S as Setting, A as AmountSetting, B as BalanceChain, I as IntegrationModule, a as BoundSettings } from './integrations-CcD5NPEA.js';
|
|
16
|
+
export { D as DashboardInput, b as DashboardPanelInput, T as TikTokVideoBody, c as TikTokVideoMetric, Y as YouTubeShortBody, d as YouTubeShortMetric, e as defineDashboard } from './integrations-CcD5NPEA.js';
|
|
17
|
+
import { P as Prerequisite, T as TextEvidence, U as UrlEvidence, a as TextOptions, b as UrlOptions } from './submission-input-wTiYGdgA.js';
|
|
18
|
+
export { c as balanceAtLeast, d as completed, i as inGroup } from './submission-input-wTiYGdgA.js';
|
|
19
19
|
import { I as ImageReader, X as XReader } from './x-1czZFVUW.js';
|
|
20
20
|
import { h as WalletReader } from './wallet-Ac7OFpOr.js';
|
|
21
21
|
export { i as CosmosDenom, a as CosmosNetwork, E as EvmChainId, j as WalletBalance, k as WalletBalanceQuery, l as cosmosDenomSchema, m as cosmosNetworkSchema, n as isEvmChainId } from './wallet-Ac7OFpOr.js';
|
|
@@ -183,6 +183,15 @@ declare function defineReferral(input: Omit<ReferralInput, "qualification" | "in
|
|
|
183
183
|
amount: number;
|
|
184
184
|
})[];
|
|
185
185
|
};
|
|
186
|
+
qualification: {
|
|
187
|
+
kind: "signup";
|
|
188
|
+
} | {
|
|
189
|
+
kind: "quest";
|
|
190
|
+
quest: string;
|
|
191
|
+
} | {
|
|
192
|
+
kind: "external";
|
|
193
|
+
};
|
|
194
|
+
enabled: boolean;
|
|
186
195
|
milestones: {
|
|
187
196
|
id: string;
|
|
188
197
|
count: number;
|
|
@@ -213,15 +222,6 @@ declare function defineReferral(input: Omit<ReferralInput, "qualification" | "in
|
|
|
213
222
|
amount: number;
|
|
214
223
|
})[];
|
|
215
224
|
}[];
|
|
216
|
-
qualification: {
|
|
217
|
-
kind: "signup";
|
|
218
|
-
} | {
|
|
219
|
-
kind: "quest";
|
|
220
|
-
quest: string;
|
|
221
|
-
} | {
|
|
222
|
-
kind: "external";
|
|
223
|
-
};
|
|
224
|
-
enabled: boolean;
|
|
225
225
|
bonuses: {
|
|
226
226
|
id: string;
|
|
227
227
|
balance: string;
|
|
@@ -275,8 +275,8 @@ declare function defineLeaderboard(input: Omit<LeaderboardInput, "key" | "id" |
|
|
|
275
275
|
};
|
|
276
276
|
};
|
|
277
277
|
}): {
|
|
278
|
-
balance: string;
|
|
279
278
|
title: string;
|
|
279
|
+
balance: string;
|
|
280
280
|
access: "participants" | "public";
|
|
281
281
|
score: {
|
|
282
282
|
kind: "balance";
|
|
@@ -474,7 +474,7 @@ declare const telegram: {
|
|
|
474
474
|
reactions(): {
|
|
475
475
|
kind: "custom";
|
|
476
476
|
namespace: string;
|
|
477
|
-
identities?: ("
|
|
477
|
+
identities?: ("x" | "discord" | "member" | "wallet" | `app:${string}`)[] | undefined;
|
|
478
478
|
accounts?: string[] | undefined;
|
|
479
479
|
data?: TrackerDataSchema | undefined;
|
|
480
480
|
content?: {
|
|
@@ -491,6 +491,88 @@ declare const telegram: {
|
|
|
491
491
|
reactorIsAdmin: boolean;
|
|
492
492
|
}> & WithAccountRoles<"author" | "messageAuthor">;
|
|
493
493
|
};
|
|
494
|
+
/**
|
|
495
|
+
* YouTube, read through the channels members link as creator accounts.
|
|
496
|
+
*
|
|
497
|
+
* - `youtube.shorts()`: a tracker source of the Shorts members publish on their linked channels.
|
|
498
|
+
* Each record is one Short, keyed by its video ID: its `author` is the channel, attributed to the
|
|
499
|
+
* member who linked it, and `occurredAt` is when it was published. Its content is
|
|
500
|
+
* `YouTubeShortBody`, measured by `views`, `likes` and `comments`, so `content()` quests,
|
|
501
|
+
* `performance` and engagement rules work on it. Relay looks for new Shorts and refreshes the
|
|
502
|
+
* counters every `refreshSeconds` of the tracker. A video that is deleted or made private is a
|
|
503
|
+
* content removal.
|
|
504
|
+
*
|
|
505
|
+
* In SDK 1.x the source is a custom source whose namespace Relay reserves: only Relay writes its
|
|
506
|
+
* records, and their accounts are YouTube channels whatever `identities` says.
|
|
507
|
+
*/
|
|
508
|
+
declare const youtube: {
|
|
509
|
+
shorts(): {
|
|
510
|
+
kind: "custom";
|
|
511
|
+
namespace: string;
|
|
512
|
+
identities?: ("x" | "discord" | "member" | "wallet" | `app:${string}`)[] | undefined;
|
|
513
|
+
accounts?: string[] | undefined;
|
|
514
|
+
data?: TrackerDataSchema | undefined;
|
|
515
|
+
content?: {
|
|
516
|
+
metrics: string[];
|
|
517
|
+
} | undefined;
|
|
518
|
+
} & WithRecordData<ContentData<{
|
|
519
|
+
title: string;
|
|
520
|
+
description: string;
|
|
521
|
+
tags: string[];
|
|
522
|
+
durationSeconds: number;
|
|
523
|
+
publishedAt: number;
|
|
524
|
+
}, "likes" | "views" | "comments">> & WithContent<{
|
|
525
|
+
title: string;
|
|
526
|
+
description: string;
|
|
527
|
+
tags: string[];
|
|
528
|
+
durationSeconds: number;
|
|
529
|
+
publishedAt: number;
|
|
530
|
+
}, "likes" | "views" | "comments"> & WithAccountRoles<"author">;
|
|
531
|
+
};
|
|
532
|
+
/**
|
|
533
|
+
* TikTok, read through the accounts members link as creator accounts.
|
|
534
|
+
*
|
|
535
|
+
* - `tiktok.videos()`: a tracker source of the public videos members post on their linked TikTok
|
|
536
|
+
* accounts, read with each member's own token. Each record is one video, keyed by its video ID:
|
|
537
|
+
* its `author` is the account's `open_id`, attributed to the member who linked it, and
|
|
538
|
+
* `occurredAt` is when it was posted. Its content is `TikTokVideoBody`, measured by `views`,
|
|
539
|
+
* `likes`, `comments` and `shares`, so `content()` quests, `performance` and engagement rules
|
|
540
|
+
* work on it. Relay looks for new videos and refreshes the counters every `refreshSeconds` of the
|
|
541
|
+
* tracker. A video its owner's account no longer returns is a content removal.
|
|
542
|
+
*
|
|
543
|
+
* In SDK 1.x the source is a custom source whose namespace Relay reserves: only Relay writes its
|
|
544
|
+
* records, and their accounts are TikTok accounts whatever `identities` says.
|
|
545
|
+
*/
|
|
546
|
+
declare const tiktok: {
|
|
547
|
+
videos(): {
|
|
548
|
+
kind: "custom";
|
|
549
|
+
namespace: string;
|
|
550
|
+
identities?: ("x" | "discord" | "member" | "wallet" | `app:${string}`)[] | undefined;
|
|
551
|
+
accounts?: string[] | undefined;
|
|
552
|
+
data?: TrackerDataSchema | undefined;
|
|
553
|
+
content?: {
|
|
554
|
+
metrics: string[];
|
|
555
|
+
} | undefined;
|
|
556
|
+
} & WithRecordData<ContentData<{
|
|
557
|
+
title: string;
|
|
558
|
+
description: string;
|
|
559
|
+
durationSeconds: number;
|
|
560
|
+
width: number;
|
|
561
|
+
height: number;
|
|
562
|
+
createdAt: number;
|
|
563
|
+
shareUrl: string;
|
|
564
|
+
isAigc: boolean;
|
|
565
|
+
}, "likes" | "views" | "comments" | "shares">> & WithContent<{
|
|
566
|
+
title: string;
|
|
567
|
+
description: string;
|
|
568
|
+
durationSeconds: number;
|
|
569
|
+
width: number;
|
|
570
|
+
height: number;
|
|
571
|
+
createdAt: number;
|
|
572
|
+
shareUrl: string;
|
|
573
|
+
isAigc: boolean;
|
|
574
|
+
}, "likes" | "views" | "comments" | "shares"> & WithAccountRoles<"author">;
|
|
575
|
+
};
|
|
494
576
|
declare const pointLedgers: () => ResourceSource;
|
|
495
577
|
type Label = {
|
|
496
578
|
label: string;
|
|
@@ -587,10 +669,10 @@ declare const badge: (definition: BadgeHandle & Pick<Badge, "name">) => {
|
|
|
587
669
|
tier: string;
|
|
588
670
|
};
|
|
589
671
|
/**
|
|
590
|
-
* A reward that adds the member to a group when the completion's rewards are delivered.
|
|
591
|
-
*
|
|
592
|
-
*
|
|
593
|
-
*
|
|
672
|
+
* A reward that adds the member to a group when the completion's rewards are delivered. Publishing
|
|
673
|
+
* the quest creates the group, with no members, where it is missing; an archived group refuses.
|
|
674
|
+
* Revoking the completion removes the membership unless an operator's add or another unrevoked
|
|
675
|
+
* completion also backs it.
|
|
594
676
|
*/
|
|
595
677
|
declare const groupMembership: (group: GroupHandle) => {
|
|
596
678
|
reward: {
|
|
@@ -1276,15 +1358,15 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1276
1358
|
group?: string | undefined;
|
|
1277
1359
|
};
|
|
1278
1360
|
tier: string;
|
|
1279
|
-
} | {
|
|
1280
|
-
kind: "points";
|
|
1281
|
-
balance: string;
|
|
1282
|
-
amount: number;
|
|
1283
1361
|
} | {
|
|
1284
1362
|
kind: "integration";
|
|
1285
1363
|
provider: "discord";
|
|
1286
1364
|
action: "grant-role";
|
|
1287
1365
|
roleId: string;
|
|
1366
|
+
} | {
|
|
1367
|
+
kind: "points";
|
|
1368
|
+
balance: string;
|
|
1369
|
+
amount: number;
|
|
1288
1370
|
})[] | ((ctx: {
|
|
1289
1371
|
settings: z.core.$InferObjectOutput<T, {}>;
|
|
1290
1372
|
}) => Reward[]);
|
|
@@ -1320,7 +1402,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1320
1402
|
imageAlt?: string | undefined;
|
|
1321
1403
|
requirements?: ({
|
|
1322
1404
|
kind: "account";
|
|
1323
|
-
provider: "
|
|
1405
|
+
provider: "x" | "discord" | "google" | "apple";
|
|
1324
1406
|
} | {
|
|
1325
1407
|
kind: "wallet";
|
|
1326
1408
|
chain?: "solana" | "eip155" | "cosmos" | undefined;
|
|
@@ -1344,7 +1426,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1344
1426
|
} | undefined;
|
|
1345
1427
|
} | undefined;
|
|
1346
1428
|
};
|
|
1347
|
-
integrations: ("
|
|
1429
|
+
integrations: ("x" | "discord")[];
|
|
1348
1430
|
fields: Record<string, {
|
|
1349
1431
|
kind: "point-ledger";
|
|
1350
1432
|
default: string;
|
|
@@ -1359,9 +1441,6 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1359
1441
|
kind: "resource";
|
|
1360
1442
|
default: string;
|
|
1361
1443
|
source: {
|
|
1362
|
-
provider: "domino";
|
|
1363
|
-
resource: "point-ledger";
|
|
1364
|
-
} | {
|
|
1365
1444
|
provider: "discord";
|
|
1366
1445
|
resource: "channel";
|
|
1367
1446
|
types: ("text" | "announcement")[];
|
|
@@ -1369,6 +1448,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1369
1448
|
provider: "discord";
|
|
1370
1449
|
resource: "role";
|
|
1371
1450
|
assignable: boolean;
|
|
1451
|
+
} | {
|
|
1452
|
+
provider: "domino";
|
|
1453
|
+
resource: "point-ledger";
|
|
1372
1454
|
};
|
|
1373
1455
|
label: string;
|
|
1374
1456
|
description?: string | undefined;
|
|
@@ -1444,15 +1526,15 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1444
1526
|
group?: string | undefined;
|
|
1445
1527
|
};
|
|
1446
1528
|
tier: string;
|
|
1447
|
-
} | {
|
|
1448
|
-
kind: "points";
|
|
1449
|
-
balance: string;
|
|
1450
|
-
amount: number;
|
|
1451
1529
|
} | {
|
|
1452
1530
|
kind: "integration";
|
|
1453
1531
|
provider: "discord";
|
|
1454
1532
|
action: "grant-role";
|
|
1455
1533
|
roleId: string;
|
|
1534
|
+
} | {
|
|
1535
|
+
kind: "points";
|
|
1536
|
+
balance: string;
|
|
1537
|
+
amount: number;
|
|
1456
1538
|
})[];
|
|
1457
1539
|
humanReview: boolean;
|
|
1458
1540
|
trigger: {
|
|
@@ -1474,7 +1556,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1474
1556
|
actor?: "staff" | "member" | undefined;
|
|
1475
1557
|
} | {
|
|
1476
1558
|
kind: "manual";
|
|
1477
|
-
input: "
|
|
1559
|
+
input: "none" | "quiz" | "photo";
|
|
1478
1560
|
actor?: "staff" | "member" | undefined;
|
|
1479
1561
|
} | {
|
|
1480
1562
|
kind: "automatic";
|
|
@@ -1518,9 +1600,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1518
1600
|
path: string;
|
|
1519
1601
|
equals: string | number | boolean;
|
|
1520
1602
|
})[] | undefined;
|
|
1521
|
-
enrollment?: "
|
|
1603
|
+
enrollment?: "none" | "required" | undefined;
|
|
1522
1604
|
since?: "activation" | "window" | "enrollment" | undefined;
|
|
1523
|
-
historical?: "
|
|
1605
|
+
historical?: "staff" | "claim" | "automatic" | undefined;
|
|
1524
1606
|
content?: true | undefined;
|
|
1525
1607
|
} | undefined;
|
|
1526
1608
|
};
|
|
@@ -1543,9 +1625,6 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1543
1625
|
title: string;
|
|
1544
1626
|
})[];
|
|
1545
1627
|
completion: {
|
|
1546
|
-
kind: "streak";
|
|
1547
|
-
days: number;
|
|
1548
|
-
} | {
|
|
1549
1628
|
kind: "progress";
|
|
1550
1629
|
goal: {
|
|
1551
1630
|
kind: "count";
|
|
@@ -1562,6 +1641,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1562
1641
|
durationMs: number;
|
|
1563
1642
|
};
|
|
1564
1643
|
repeat: "repeat" | "once";
|
|
1644
|
+
} | {
|
|
1645
|
+
kind: "streak";
|
|
1646
|
+
days: number;
|
|
1565
1647
|
} | {
|
|
1566
1648
|
kind: "once";
|
|
1567
1649
|
} | {
|
|
@@ -1587,7 +1669,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1587
1669
|
campaign?: {
|
|
1588
1670
|
key: string;
|
|
1589
1671
|
title: string;
|
|
1590
|
-
enrollment: "
|
|
1672
|
+
enrollment: "none" | "required";
|
|
1591
1673
|
window?: {
|
|
1592
1674
|
from: number;
|
|
1593
1675
|
until: number;
|
|
@@ -1726,15 +1808,15 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1726
1808
|
group?: string | undefined;
|
|
1727
1809
|
};
|
|
1728
1810
|
tier: string;
|
|
1729
|
-
} | {
|
|
1730
|
-
kind: "points";
|
|
1731
|
-
balance: string;
|
|
1732
|
-
amount: number;
|
|
1733
1811
|
} | {
|
|
1734
1812
|
kind: "integration";
|
|
1735
1813
|
provider: "discord";
|
|
1736
1814
|
action: "grant-role";
|
|
1737
1815
|
roleId: string;
|
|
1816
|
+
} | {
|
|
1817
|
+
kind: "points";
|
|
1818
|
+
balance: string;
|
|
1819
|
+
amount: number;
|
|
1738
1820
|
})[] | ((ctx: {
|
|
1739
1821
|
settings: z.core.$InferObjectOutput<T, {}>;
|
|
1740
1822
|
}) => Reward[]);
|
|
@@ -1770,7 +1852,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1770
1852
|
imageAlt?: string | undefined;
|
|
1771
1853
|
requirements?: ({
|
|
1772
1854
|
kind: "account";
|
|
1773
|
-
provider: "
|
|
1855
|
+
provider: "x" | "discord" | "google" | "apple";
|
|
1774
1856
|
} | {
|
|
1775
1857
|
kind: "wallet";
|
|
1776
1858
|
chain?: "solana" | "eip155" | "cosmos" | undefined;
|
|
@@ -1794,7 +1876,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1794
1876
|
} | undefined;
|
|
1795
1877
|
} | undefined;
|
|
1796
1878
|
};
|
|
1797
|
-
integrations: ("
|
|
1879
|
+
integrations: ("x" | "discord")[];
|
|
1798
1880
|
fields: Record<string, {
|
|
1799
1881
|
kind: "point-ledger";
|
|
1800
1882
|
default: string;
|
|
@@ -1809,9 +1891,6 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1809
1891
|
kind: "resource";
|
|
1810
1892
|
default: string;
|
|
1811
1893
|
source: {
|
|
1812
|
-
provider: "domino";
|
|
1813
|
-
resource: "point-ledger";
|
|
1814
|
-
} | {
|
|
1815
1894
|
provider: "discord";
|
|
1816
1895
|
resource: "channel";
|
|
1817
1896
|
types: ("text" | "announcement")[];
|
|
@@ -1819,6 +1898,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1819
1898
|
provider: "discord";
|
|
1820
1899
|
resource: "role";
|
|
1821
1900
|
assignable: boolean;
|
|
1901
|
+
} | {
|
|
1902
|
+
provider: "domino";
|
|
1903
|
+
resource: "point-ledger";
|
|
1822
1904
|
};
|
|
1823
1905
|
label: string;
|
|
1824
1906
|
description?: string | undefined;
|
|
@@ -1894,15 +1976,15 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1894
1976
|
group?: string | undefined;
|
|
1895
1977
|
};
|
|
1896
1978
|
tier: string;
|
|
1897
|
-
} | {
|
|
1898
|
-
kind: "points";
|
|
1899
|
-
balance: string;
|
|
1900
|
-
amount: number;
|
|
1901
1979
|
} | {
|
|
1902
1980
|
kind: "integration";
|
|
1903
1981
|
provider: "discord";
|
|
1904
1982
|
action: "grant-role";
|
|
1905
1983
|
roleId: string;
|
|
1984
|
+
} | {
|
|
1985
|
+
kind: "points";
|
|
1986
|
+
balance: string;
|
|
1987
|
+
amount: number;
|
|
1906
1988
|
})[];
|
|
1907
1989
|
humanReview: boolean;
|
|
1908
1990
|
trigger: {
|
|
@@ -1924,7 +2006,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1924
2006
|
actor?: "staff" | "member" | undefined;
|
|
1925
2007
|
} | {
|
|
1926
2008
|
kind: "manual";
|
|
1927
|
-
input: "
|
|
2009
|
+
input: "none" | "quiz" | "photo";
|
|
1928
2010
|
actor?: "staff" | "member" | undefined;
|
|
1929
2011
|
} | {
|
|
1930
2012
|
kind: "automatic";
|
|
@@ -1968,9 +2050,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1968
2050
|
path: string;
|
|
1969
2051
|
equals: string | number | boolean;
|
|
1970
2052
|
})[] | undefined;
|
|
1971
|
-
enrollment?: "
|
|
2053
|
+
enrollment?: "none" | "required" | undefined;
|
|
1972
2054
|
since?: "activation" | "window" | "enrollment" | undefined;
|
|
1973
|
-
historical?: "
|
|
2055
|
+
historical?: "staff" | "claim" | "automatic" | undefined;
|
|
1974
2056
|
content?: true | undefined;
|
|
1975
2057
|
} | undefined;
|
|
1976
2058
|
};
|
|
@@ -1993,9 +2075,6 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1993
2075
|
title: string;
|
|
1994
2076
|
})[];
|
|
1995
2077
|
completion: {
|
|
1996
|
-
kind: "streak";
|
|
1997
|
-
days: number;
|
|
1998
|
-
} | {
|
|
1999
2078
|
kind: "progress";
|
|
2000
2079
|
goal: {
|
|
2001
2080
|
kind: "count";
|
|
@@ -2012,6 +2091,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
2012
2091
|
durationMs: number;
|
|
2013
2092
|
};
|
|
2014
2093
|
repeat: "repeat" | "once";
|
|
2094
|
+
} | {
|
|
2095
|
+
kind: "streak";
|
|
2096
|
+
days: number;
|
|
2015
2097
|
} | {
|
|
2016
2098
|
kind: "once";
|
|
2017
2099
|
} | {
|
|
@@ -2037,7 +2119,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
2037
2119
|
campaign?: {
|
|
2038
2120
|
key: string;
|
|
2039
2121
|
title: string;
|
|
2040
|
-
enrollment: "
|
|
2122
|
+
enrollment: "none" | "required";
|
|
2041
2123
|
window?: {
|
|
2042
2124
|
from: number;
|
|
2043
2125
|
until: number;
|
|
@@ -2110,4 +2192,4 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
2110
2192
|
}): Promise<Decision>;
|
|
2111
2193
|
} & ResourceHandle<"quest">;
|
|
2112
2194
|
|
|
2113
|
-
export { AmountSetting, BalanceChain, ContentBody, type ContentData, ContentMetricName, type ContentTrigger, type ContentTriggerInput, DiscordMessageData, DiscordMessageTextData, DiscordReactionData, DiscordReader, type EvaluationCalendar, type EvaluationCalendarDay, type EvaluationContext, type EvaluationMember, GroupHandle, IdentityKind, ImageReader, IntegrationModule, type KeyedContext, LedgerHandle, LedgerReference, MemberCompletion, type MemberCompletionQuery, MemberIdentity, type Outcome, type PerformanceContext, type PerformanceOutcome, PointBalance, ProfileReferral, QuestHandle, type QuestKeyedContext, ReferralHandle, RoleOf, Setting, TelegramReader, Tracker, TrackerData, TrackerDataSchema, TrackerReader, type TrackerTrigger, TrackerTriggerContext, type TrackerTriggerInput, type TriggerAdmission, WalletReader, 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, keyed, manual, once, pointLedgers, points, progress, questCompleted, rolling, settings, staffHandover, streak, telegram, untracked, x };
|
|
2195
|
+
export { AmountSetting, BalanceChain, ContentBody, type ContentData, ContentMetricName, type ContentTrigger, type ContentTriggerInput, DiscordMessageData, DiscordMessageTextData, DiscordReactionData, DiscordReader, type EvaluationCalendar, type EvaluationCalendarDay, type EvaluationContext, type EvaluationMember, GroupHandle, IdentityKind, ImageReader, IntegrationModule, type KeyedContext, LedgerHandle, LedgerReference, MemberCompletion, type MemberCompletionQuery, MemberIdentity, type Outcome, type PerformanceContext, type PerformanceOutcome, PointBalance, ProfileReferral, QuestHandle, type QuestKeyedContext, ReferralHandle, RoleOf, Setting, TelegramReader, Tracker, TrackerData, TrackerDataSchema, TrackerReader, type TrackerTrigger, TrackerTriggerContext, type TrackerTriggerInput, type TriggerAdmission, WalletReader, 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, keyed, manual, once, pointLedgers, points, progress, questCompleted, rolling, settings, staffHandover, streak, telegram, tiktok, untracked, x, youtube };
|
package/dist/authoring.js
CHANGED
|
@@ -3,8 +3,14 @@ import {
|
|
|
3
3
|
parseUnits
|
|
4
4
|
} from "./chunk-V7UKZLHA.js";
|
|
5
5
|
import {
|
|
6
|
-
defineDashboard
|
|
7
|
-
|
|
6
|
+
defineDashboard,
|
|
7
|
+
tiktokVideoBodySchema,
|
|
8
|
+
tiktokVideoMetrics,
|
|
9
|
+
tiktokVideosNamespace,
|
|
10
|
+
youtubeShortBodySchema,
|
|
11
|
+
youtubeShortMetrics,
|
|
12
|
+
youtubeShortsNamespace
|
|
13
|
+
} from "./chunk-ULQU7KC4.js";
|
|
8
14
|
import {
|
|
9
15
|
CapabilityError,
|
|
10
16
|
capabilityErrorCodes
|
|
@@ -13,7 +19,7 @@ import {
|
|
|
13
19
|
sourceDataSchema,
|
|
14
20
|
sourceRoles,
|
|
15
21
|
validateQuestShape
|
|
16
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-H2MD6E7Z.js";
|
|
17
23
|
import {
|
|
18
24
|
badgeDeclarationSchema,
|
|
19
25
|
defineOffer,
|
|
@@ -22,12 +28,12 @@ import {
|
|
|
22
28
|
engagementScoreSchema,
|
|
23
29
|
leaderboardAuthoringSchema,
|
|
24
30
|
referralAuthoringSchema
|
|
25
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-BJYMTCWG.js";
|
|
26
32
|
import {
|
|
27
33
|
pointLedgerDeclarationSchema,
|
|
28
34
|
telegramReactionDataSchema,
|
|
29
35
|
telegramReactionsNamespace
|
|
30
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-VSHV7FEA.js";
|
|
31
37
|
import {
|
|
32
38
|
authoringKey,
|
|
33
39
|
badgeReward,
|
|
@@ -91,7 +97,7 @@ import {
|
|
|
91
97
|
whereSchemaIssue,
|
|
92
98
|
whereSettings,
|
|
93
99
|
xSearchSourceSchema
|
|
94
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-BHHUSBSD.js";
|
|
95
101
|
|
|
96
102
|
// src/builders.ts
|
|
97
103
|
import * as z from "zod";
|
|
@@ -294,6 +300,28 @@ var telegram = {
|
|
|
294
300
|
});
|
|
295
301
|
}
|
|
296
302
|
};
|
|
303
|
+
var youtube = {
|
|
304
|
+
shorts() {
|
|
305
|
+
return customSource(youtubeShortsNamespace, {
|
|
306
|
+
identities: ["member"],
|
|
307
|
+
content: {
|
|
308
|
+
body: youtubeShortBodySchema,
|
|
309
|
+
metrics: youtubeShortMetrics
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
var tiktok = {
|
|
315
|
+
videos() {
|
|
316
|
+
return customSource(tiktokVideosNamespace, {
|
|
317
|
+
identities: ["member"],
|
|
318
|
+
content: {
|
|
319
|
+
body: tiktokVideoBodySchema,
|
|
320
|
+
metrics: tiktokVideoMetrics
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
};
|
|
297
325
|
var pointLedgers = () => ({
|
|
298
326
|
provider: "domino",
|
|
299
327
|
resource: "point-ledger"
|
|
@@ -971,9 +999,11 @@ export {
|
|
|
971
999
|
staffHandover,
|
|
972
1000
|
streak,
|
|
973
1001
|
telegram,
|
|
1002
|
+
tiktok,
|
|
974
1003
|
trackerDataSchema,
|
|
975
1004
|
trackerTriggerContextSchema,
|
|
976
1005
|
untracked,
|
|
977
1006
|
x,
|
|
1007
|
+
youtube,
|
|
978
1008
|
z2 as z
|
|
979
1009
|
};
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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-bX3oTpRu.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-Bh3i0HiH.js';
|
|
3
3
|
export { H as HostEnvironment, g as getHostEnvironment } from './host-environment-FN4zg3hw.js';
|
|
4
4
|
import './schema-C4m9RhCR.js';
|
|
5
5
|
import 'zod';
|
|
6
|
-
import './pages-
|
|
7
|
-
import './submission-input-
|
|
8
|
-
import './groups-
|
|
6
|
+
import './pages-BlLqB8ZQ.js';
|
|
7
|
+
import './submission-input-wTiYGdgA.js';
|
|
8
|
+
import './groups-DPE004_V.js';
|
|
9
9
|
import './action-DBzILFx9.js';
|
|
10
10
|
import './participant-activity-iciCEs_8.js';
|
|
11
11
|
import './accounts-DRPENuZe.js';
|
package/dist/browser.js
CHANGED
|
@@ -12,19 +12,19 @@ import {
|
|
|
12
12
|
solanaSigner,
|
|
13
13
|
telegramMiniAppInitData,
|
|
14
14
|
walletStandardSolanaSigner
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-OTITLABX.js";
|
|
16
|
+
import "./chunk-NK6EER33.js";
|
|
17
|
+
import "./chunk-INSWI2VZ.js";
|
|
18
|
+
import "./chunk-RBPMT53S.js";
|
|
19
|
+
import "./chunk-BJYMTCWG.js";
|
|
20
|
+
import "./chunk-VSHV7FEA.js";
|
|
21
21
|
import {
|
|
22
22
|
getHostEnvironment
|
|
23
23
|
} from "./chunk-KDR2VAJP.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-KBVH4XZC.js";
|
|
25
|
+
import "./chunk-ABJ4G47X.js";
|
|
26
|
+
import "./chunk-QNQNKIAA.js";
|
|
27
|
+
import "./chunk-BHHUSBSD.js";
|
|
28
28
|
export {
|
|
29
29
|
browserSubmissionStore,
|
|
30
30
|
cosmosChainList,
|
|
@@ -110,7 +110,7 @@ var RelayErrorCode = {
|
|
|
110
110
|
Credential: "credential",
|
|
111
111
|
/** A wallet signer failed or the member refused to sign; `cause` is the wallet's own error. */
|
|
112
112
|
WalletSigner: "wallet-signer",
|
|
113
|
-
/** The member has not met the quest's prerequisites; `missing` lists them. */
|
|
113
|
+
/** The member has not met the quest's or offer's prerequisites; `missing` lists them. */
|
|
114
114
|
PrerequisitesIncomplete: "prerequisites-incomplete",
|
|
115
115
|
/** The quest is archived or retired: it takes no new participation. */
|
|
116
116
|
QuestClosed: "quest-closed",
|