@domino-sdk/relay 1.62.0 → 1.63.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 +120 -0
- package/dist/{accounts-CCqCKCVx.d.ts → accounts-nz3mzfRQ.d.ts} +21 -3
- package/dist/{attempt-captures-Cm-5G0PC.d.ts → attempt-captures-DMi8oR9T.d.ts} +1 -1
- package/dist/authoring.d.ts +54 -20
- package/dist/authoring.js +58 -24
- package/dist/{automatic-outcomes-pAsOyIVp.d.ts → automatic-outcomes-C_LLQU1p.d.ts} +11 -1
- package/dist/avatar.d.ts +1 -1
- package/dist/browser.d.ts +9 -9
- package/dist/browser.js +15 -13
- package/dist/capability-error-CuI_F7yM.d.ts +296 -0
- package/dist/{catalog--ZIlskAo.d.ts → catalog-BaTOKpNw.d.ts} +21 -10
- package/dist/{chunk-3PYYGFSB.js → chunk-3RFP6GT5.js} +3 -3
- package/dist/{chunk-HTZHBTIL.js → chunk-4GQW43UU.js} +193 -357
- package/dist/{chunk-D26YNACF.js → chunk-4NOFSGAL.js} +56 -56
- package/dist/{chunk-UW5232GG.js → chunk-5XLZ34PV.js} +5 -5
- package/dist/{chunk-QYPMPWVX.js → chunk-7X67QLPB.js} +43 -43
- package/dist/{chunk-5TEYFX6X.js → chunk-7Z4SZ6YM.js} +2 -2
- package/dist/{chunk-Y322OTCH.js → chunk-AQOL3SK5.js} +1 -1
- package/dist/{chunk-CICDIBOF.js → chunk-EHUSD3O2.js} +76 -72
- package/dist/chunk-FO2LCZTL.js +19 -0
- package/dist/{chunk-3KLC4AMA.js → chunk-FU5CGNTR.js} +135 -173
- package/dist/{chunk-K2KS3JLY.js → chunk-GLH6MEI2.js} +7 -2
- package/dist/chunk-ICXZZNPS.js +199 -0
- package/dist/{chunk-MK425RXJ.js → chunk-ID3BZXFZ.js} +709 -640
- package/dist/{chunk-UAKYDVT3.js → chunk-KP2MCX3R.js} +111 -89
- package/dist/{chunk-GKIFABGN.js → chunk-LZWXCBUB.js} +74 -247
- package/dist/{chunk-6WCIWXUV.js → chunk-MTKRIQEU.js} +2 -2
- package/dist/{chunk-4OC7REYX.js → chunk-MWMCQLCG.js} +3 -3
- package/dist/{chunk-XJFYAXET.js → chunk-N4BDKS6Y.js} +19 -19
- package/dist/{chunk-E6IKQHTX.js → chunk-N4LNEGQX.js} +2 -2
- package/dist/chunk-NQDEWJWE.js +554 -0
- package/dist/{chunk-GTDW453U.js → chunk-QR6HH4DI.js} +100 -114
- package/dist/chunk-TLSQETTY.js +41 -0
- 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-XNKSSE32.js → chunk-VWQGWGCH.js} +7 -7
- package/dist/{chunk-WSBYWVTZ.js → chunk-W7YSMSGC.js} +166 -158
- package/dist/{client-B-hbHX30.d.ts → client-DHmG7rn6.d.ts} +25 -61
- package/dist/{capability-error-DFMwSuSf.d.ts → dashboards-CLemT6kj.d.ts} +14 -294
- package/dist/{deployments-M4OHn7G3.d.ts → deployments-DTULi7dF.d.ts} +46 -3
- package/dist/{identity-integration-3mX6b5iH.d.ts → identity-integration-DOeNZaxF.d.ts} +32 -2
- package/dist/index.d.ts +10 -10
- package/dist/index.js +13 -11
- package/dist/internal.d.ts +27 -13
- package/dist/internal.js +41 -13
- package/dist/{analytics-BwAKLi7O.d.ts → limits-kNzYdZ00.d.ts} +124 -3
- package/dist/{offers-DhAtss4_.d.ts → offers-CYeN_I0Y.d.ts} +3 -2
- package/dist/portal-proxy.d.ts +19 -3
- package/dist/portal-proxy.js +64 -22
- package/dist/react/index.d.ts +21 -14
- package/dist/react/index.js +55 -29
- package/dist/{pages-B8q8Y_dQ.d.ts → reward-deliveries-drp-x1G-.d.ts} +300 -233
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/UGDV5W4N.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/schema.d.ts +193 -18
- package/dist/schema.js +31 -26
- package/dist/server/index.d.ts +13 -13
- package/dist/server/index.js +5885 -6224
- package/dist/{sign-in-providers-BkjcDsFF.d.ts → sign-in-providers-B1Q9eDRm.d.ts} +7 -2
- package/dist/{submission-input-DHGKhXfp.d.ts → submission-input-DZCbjQUH.d.ts} +3 -2
- package/dist/{telegram-browser-BCE7zdOb.d.ts → telegram-browser-NL0Asmsi.d.ts} +4 -4
- package/dist/telegram.d.ts +8 -8
- package/dist/telegram.js +2 -2
- package/dist/testing.d.ts +228 -26
- package/dist/testing.js +137 -92
- package/dist/{tracker-data-Hb1uQnk5.d.ts → tracker-data-esm3WG8R.d.ts} +34 -8
- package/dist/{transport-DkhX2Cbs.d.ts → transport-Czht_irp.d.ts} +41259 -39835
- package/dist/{wallet-DTO7SXj7.d.ts → wallet-B7e06v4m.d.ts} +14 -4
- package/package.json +1 -1
- package/dist/chunk-UPQPUJOU.js +0 -457
- package/dist/runtime/chunks/Y4OAVXFR.js +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { G as QuizEvidence, a as Attempt, s as MemberProgress, ak as referralAcceptSchema, q as LeaderboardQuery, b as AttemptStatus, V as AttemptCodeSource, f as CampaignEnrollmentInput, h as CampaignWithdrawalInput, J as SignInProvider, c as AuthProvider, I as SignInAccountStatus, x as PointHistoryQuery, v as PointEntryKind, n as LeaderboardHistoryQuery, al as submitSchema, am as engagementPageQuerySchema, an as contentPerformanceQuerySchema } from './accounts-
|
|
2
|
-
import {
|
|
3
|
-
import { M as MissingPrerequisite, V as ValueEvidence } from './submission-input-DHGKhXfp.js';
|
|
1
|
+
import { G as QuizEvidence, a as Attempt, s as MemberProgress, ak as referralAcceptSchema, q as LeaderboardQuery, b as AttemptStatus, V as AttemptCodeSource, f as CampaignEnrollmentInput, h as CampaignWithdrawalInput, J as SignInProvider, c as AuthProvider, I as SignInAccountStatus, x as PointHistoryQuery, v as PointEntryKind, n as LeaderboardHistoryQuery, al as submitSchema, am as engagementPageQuerySchema, an as contentPerformanceQuerySchema } from './accounts-nz3mzfRQ.js';
|
|
2
|
+
import { M as MissingPrerequisite, V as ValueEvidence } from './submission-input-DZCbjQUH.js';
|
|
4
3
|
import { R as RequestError, a as RequestErrorDetails, b as RequestErrorKind } from './request-error-D_dUPLwo.js';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { q as ResponseSchema, i as PageQuery, k as QuestEnrollmentInput, Q as QuestClaimInput, n as QuestOutcomeQuery, M as MemberConsent, a as ConsentInput, e as CreatorAccountProvider, r as RewardDeliveryQuery, s as RewardDeliveryPage, t as contentQualificationQuerySchema } from './reward-deliveries-drp-x1G-.js';
|
|
5
|
+
import { b as QuestView, q as questExperienceSchema } from './catalog-BaTOKpNw.js';
|
|
6
|
+
import { T as TrackerSkipCode, S as SkipEnrollment } from './tracker-data-esm3WG8R.js';
|
|
7
7
|
import { b as ParticipantSession, e as exchangeSchema, R as RelayEvent, P as ParticipantActivity, M as MemberSummary } from './participant-activity-D-Drp24G.js';
|
|
8
8
|
import * as z from 'zod';
|
|
9
9
|
import { c as createRelayAction, O as OptionalActionId } from './action-9Xl0StBg.js';
|
|
10
|
-
import { A as AuthProviders } from './sign-in-providers-
|
|
11
|
-
import { ag as profileUpdateSchema, d as ProfileCompletionQuery, ah as walletAddressInputSchema, ai as walletSignatureSchema, L as LinkedWallet, m as WalletSigner } from './wallet-
|
|
10
|
+
import { A as AuthProviders } from './sign-in-providers-B1Q9eDRm.js';
|
|
11
|
+
import { ag as profileUpdateSchema, d as ProfileCompletionQuery, ah as walletAddressInputSchema, ai as walletSignatureSchema, L as LinkedWallet, m as WalletSigner } from './wallet-B7e06v4m.js';
|
|
12
12
|
|
|
13
13
|
/** What happened, as in every Domino client error (see `RequestError`). */
|
|
14
14
|
type RelayErrorKind = RequestErrorKind;
|
|
@@ -23,6 +23,11 @@ declare const RelayErrorCode: {
|
|
|
23
23
|
readonly NotSignedIn: "not-signed-in";
|
|
24
24
|
/** The session changed since the app read it (the `session` option). Reload before retrying. */
|
|
25
25
|
readonly StaleSession: "stale-session";
|
|
26
|
+
/**
|
|
27
|
+
* A participant backend (`createParticipantBackend`) refused the call because the app's own
|
|
28
|
+
* sign-in ended. The SDK treats it like `not-signed-in`: the member is signed out.
|
|
29
|
+
*/
|
|
30
|
+
readonly Unauthenticated: "unauthenticated";
|
|
26
31
|
/** The input failed validation before it was sent. */
|
|
27
32
|
readonly InvalidInput: "invalid-input";
|
|
28
33
|
/** Relay's answer was not JSON or not the expected shape (kind `invalid-response`). */
|
|
@@ -2002,7 +2007,8 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
2002
2007
|
* Claims one of the signed-in member's outcomes skipped as `historical`, on a quest whose
|
|
2003
2008
|
* historical policy is `"claim"` (`outcome.claimable`). Relay decides it again with
|
|
2004
2009
|
* historical activity released and returns the outcome; a rule that still fails rejects
|
|
2005
|
-
* with a `RelayError` whose code is that rule's skip code.
|
|
2010
|
+
* with a `RelayError` whose code is that rule's skip code. This claim is of a skipped
|
|
2011
|
+
* outcome; `me.claim` submits an attempt.
|
|
2006
2012
|
*/
|
|
2007
2013
|
claim: (value: OptionalActionId<QuestClaimInput>, requestOptions?: RelayRequestOptions) => Promise<{
|
|
2008
2014
|
quest: string;
|
|
@@ -2018,6 +2024,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
2018
2024
|
updatedAt: number;
|
|
2019
2025
|
automatic?: string | undefined;
|
|
2020
2026
|
window?: "quest" | "tracker" | undefined;
|
|
2027
|
+
enrollment?: SkipEnrollment | undefined;
|
|
2021
2028
|
}>;
|
|
2022
2029
|
/**
|
|
2023
2030
|
* Why automatic quests did or did not run for the signed-in member's activity, newest first:
|
|
@@ -2038,6 +2045,7 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
2038
2045
|
updatedAt: number;
|
|
2039
2046
|
automatic?: string | undefined;
|
|
2040
2047
|
window?: "quest" | "tracker" | undefined;
|
|
2048
|
+
enrollment?: SkipEnrollment | undefined;
|
|
2041
2049
|
}[];
|
|
2042
2050
|
nextCursor: string | null;
|
|
2043
2051
|
}>;
|
|
@@ -4556,59 +4564,11 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
4556
4564
|
}>;
|
|
4557
4565
|
/**
|
|
4558
4566
|
* The member's reward deliveries, newest first, one page at a time. Pass a page's
|
|
4559
|
-
* `nextCursor` back as `cursor` for older ones; `limit` is 1 to 500, 500 by default.
|
|
4567
|
+
* `nextCursor` back as `cursor` for older ones; `limit` is 1 to 500, 500 by default. The
|
|
4568
|
+
* page answers its deliveries as `items` (and, for 1.x callers, as `deliveries`), so
|
|
4569
|
+
* `paginate((cursor) => relay.me.rewardDeliveries({ cursor }))` reads them all.
|
|
4560
4570
|
*/
|
|
4561
|
-
rewardDeliveries: (requestOptions?: RelayRequestOptions & RewardDeliveryQuery) => Promise<
|
|
4562
|
-
deliveries: ({
|
|
4563
|
-
[x: string]: z.core.util.JSONType | undefined;
|
|
4564
|
-
id: string;
|
|
4565
|
-
quest: string;
|
|
4566
|
-
completion: string;
|
|
4567
|
-
member: string;
|
|
4568
|
-
action: RewardDeliveryAction;
|
|
4569
|
-
attempts: number;
|
|
4570
|
-
nextAt: number;
|
|
4571
|
-
lastError: string | null;
|
|
4572
|
-
createdAt: number;
|
|
4573
|
-
deliveredAt: number | null;
|
|
4574
|
-
provider: string;
|
|
4575
|
-
status: string;
|
|
4576
|
-
dispatchedAt?: number | null | undefined;
|
|
4577
|
-
revokedAt?: number | null | undefined;
|
|
4578
|
-
roleId?: string | undefined;
|
|
4579
|
-
reconciliation?: {
|
|
4580
|
-
[x: string]: z.core.util.JSONType;
|
|
4581
|
-
status: string;
|
|
4582
|
-
ownership: string;
|
|
4583
|
-
at: number;
|
|
4584
|
-
reason: string | null;
|
|
4585
|
-
} | null | undefined;
|
|
4586
|
-
} | {
|
|
4587
|
-
[x: string]: z.core.util.JSONType | undefined;
|
|
4588
|
-
id: string;
|
|
4589
|
-
quest: string;
|
|
4590
|
-
completion: string;
|
|
4591
|
-
member: string;
|
|
4592
|
-
provider: "discord";
|
|
4593
|
-
action: RewardDeliveryAction;
|
|
4594
|
-
roleId: string;
|
|
4595
|
-
status: "pending" | "failed" | "delivered";
|
|
4596
|
-
attempts: number;
|
|
4597
|
-
nextAt: number;
|
|
4598
|
-
lastError: string | null;
|
|
4599
|
-
createdAt: number;
|
|
4600
|
-
deliveredAt: number | null;
|
|
4601
|
-
dispatchedAt?: number | null | undefined;
|
|
4602
|
-
revokedAt?: number | null | undefined;
|
|
4603
|
-
reconciliation?: {
|
|
4604
|
-
status: "pending" | "removed" | "failed" | "preserved" | "granted";
|
|
4605
|
-
ownership: "external" | "relay" | "unclaimed";
|
|
4606
|
-
at: number;
|
|
4607
|
-
reason: string | null;
|
|
4608
|
-
} | null | undefined;
|
|
4609
|
-
})[];
|
|
4610
|
-
nextCursor: string | null;
|
|
4611
|
-
}>;
|
|
4571
|
+
rewardDeliveries: (requestOptions?: RelayRequestOptions & RewardDeliveryQuery) => Promise<RewardDeliveryPage>;
|
|
4612
4572
|
/**
|
|
4613
4573
|
* `{ items }`: the member's balance in each of the project's point ledgers, in the project's
|
|
4614
4574
|
* ledger order, zero in a ledger they have no entries in.
|
|
@@ -4661,7 +4621,11 @@ declare function relayClient(options: RelayClientOptions): {
|
|
|
4661
4621
|
}[];
|
|
4662
4622
|
nextCursor: string | null;
|
|
4663
4623
|
}>;
|
|
4664
|
-
/**
|
|
4624
|
+
/**
|
|
4625
|
+
* Submits an attempt at a quest for the signed-in member, whatever input the quest takes;
|
|
4626
|
+
* a quest whose interaction is `"claim"` takes none. Quest controllers (`quests.open`) call
|
|
4627
|
+
* this. `quests.claim` is different: it claims an outcome skipped as historical.
|
|
4628
|
+
*/
|
|
4665
4629
|
claim: (value: OptionalActionId<Omit<z.input<typeof submitSchema>, "member">>, requestOptions?: RelayRequestOptions) => Promise<{
|
|
4666
4630
|
id: string;
|
|
4667
4631
|
release: string;
|
|
@@ -1,146 +1,7 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
import { R as ResourceHandle } from './tracker-data-
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
declare const completionPolicySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7
|
-
kind: z.ZodLiteral<"streak">;
|
|
8
|
-
days: z.ZodNumber;
|
|
9
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
10
|
-
kind: z.ZodLiteral<"progress">;
|
|
11
|
-
goal: z.ZodObject<{
|
|
12
|
-
kind: z.ZodLiteral<"count">;
|
|
13
|
-
count: z.ZodNumber;
|
|
14
|
-
}, z.core.$strict>;
|
|
15
|
-
window: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
16
|
-
kind: z.ZodLiteral<"lifetime">;
|
|
17
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
18
|
-
kind: z.ZodLiteral<"calendar">;
|
|
19
|
-
period: z.ZodEnum<{
|
|
20
|
-
day: "day";
|
|
21
|
-
week: "week";
|
|
22
|
-
month: "month";
|
|
23
|
-
}>;
|
|
24
|
-
latenessMs: z.ZodDefault<z.ZodNumber>;
|
|
25
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
26
|
-
kind: z.ZodLiteral<"rolling">;
|
|
27
|
-
durationMs: z.ZodNumber;
|
|
28
|
-
}, z.core.$strict>], "kind">;
|
|
29
|
-
repeat: z.ZodDefault<z.ZodEnum<{
|
|
30
|
-
repeat: "repeat";
|
|
31
|
-
once: "once";
|
|
32
|
-
}>>;
|
|
33
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
34
|
-
kind: z.ZodLiteral<"once">;
|
|
35
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
36
|
-
kind: z.ZodLiteral<"keyed">;
|
|
37
|
-
across: z.ZodOptional<z.ZodLiteral<"members">>;
|
|
38
|
-
}, z.core.$strict>], "kind">;
|
|
39
|
-
declare const completionKeySchema: z.ZodString;
|
|
40
|
-
declare const budgetSchema: z.ZodObject<{
|
|
41
|
-
id: z.ZodString;
|
|
42
|
-
scope: z.ZodEnum<{
|
|
43
|
-
member: "member";
|
|
44
|
-
project: "project";
|
|
45
|
-
}>;
|
|
46
|
-
period: z.ZodEnum<{
|
|
47
|
-
lifetime: "lifetime";
|
|
48
|
-
day: "day";
|
|
49
|
-
week: "week";
|
|
50
|
-
month: "month";
|
|
51
|
-
}>;
|
|
52
|
-
limit: z.ZodNumber;
|
|
53
|
-
cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
54
|
-
balance: z.ZodString;
|
|
55
|
-
}, z.core.$strict>]>;
|
|
56
|
-
}, z.core.$strict>;
|
|
57
|
-
type Budget = z.infer<typeof budgetSchema>;
|
|
58
|
-
/**
|
|
59
|
-
* A budget counted per tracker record author: the account that caused the record, such as a
|
|
60
|
-
* reaction's reactor, whether or not it belongs to a member. It caps what one person gives when a
|
|
61
|
-
* quest pays someone else. Only quests with a tracker trigger take one, in their `authorBudgets`.
|
|
62
|
-
*/
|
|
63
|
-
declare const authorBudgetSchema: z.ZodObject<{
|
|
64
|
-
id: z.ZodString;
|
|
65
|
-
period: z.ZodEnum<{
|
|
66
|
-
lifetime: "lifetime";
|
|
67
|
-
day: "day";
|
|
68
|
-
week: "week";
|
|
69
|
-
month: "month";
|
|
70
|
-
}>;
|
|
71
|
-
limit: z.ZodNumber;
|
|
72
|
-
cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
73
|
-
balance: z.ZodString;
|
|
74
|
-
}, z.core.$strict>]>;
|
|
75
|
-
scope: z.ZodLiteral<"author">;
|
|
76
|
-
}, z.core.$strict>;
|
|
77
|
-
type AuthorBudget = z.infer<typeof authorBudgetSchema>;
|
|
78
|
-
/**
|
|
79
|
-
* One of the member's accepted, unrevoked quest completions, as `ctx.member.completions()` reads
|
|
80
|
-
* it. `quest` is the quest's key and `key` the completion key. `completedAt` is when it was
|
|
81
|
-
* recorded, in epoch milliseconds on the member's clock (a test member's advanced one); null for
|
|
82
|
-
* older completions recorded without a time.
|
|
83
|
-
*/
|
|
84
|
-
declare const memberCompletionSchema: z.ZodObject<{
|
|
85
|
-
quest: z.ZodString;
|
|
86
|
-
key: z.ZodString;
|
|
87
|
-
completedAt: z.ZodNullable<z.ZodNumber>;
|
|
88
|
-
}, z.core.$strip>;
|
|
89
|
-
type MemberCompletion = z.infer<typeof memberCompletionSchema>;
|
|
90
|
-
/** The most completions one `ctx.member.completions()` call returns, and its default `limit`. */
|
|
91
|
-
declare const maxMemberCompletions = 100;
|
|
92
|
-
|
|
93
|
-
declare const resourceSourceSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
94
|
-
provider: z.ZodLiteral<"domino">;
|
|
95
|
-
resource: z.ZodLiteral<"point-ledger">;
|
|
96
|
-
}, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
|
|
97
|
-
provider: z.ZodLiteral<"discord">;
|
|
98
|
-
resource: z.ZodLiteral<"channel">;
|
|
99
|
-
types: z.ZodArray<z.ZodEnum<{
|
|
100
|
-
text: "text";
|
|
101
|
-
announcement: "announcement";
|
|
102
|
-
}>>;
|
|
103
|
-
postable: z.ZodOptional<z.ZodLiteral<true>>;
|
|
104
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
105
|
-
provider: z.ZodLiteral<"discord">;
|
|
106
|
-
resource: z.ZodLiteral<"role">;
|
|
107
|
-
assignable: z.ZodDefault<z.ZodBoolean>;
|
|
108
|
-
}, z.core.$strict>]>]>;
|
|
109
|
-
type ResourceSource = z.infer<typeof resourceSourceSchema>;
|
|
110
|
-
declare const resourceRequestSchema: z.ZodObject<{
|
|
111
|
-
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
112
|
-
provider: z.ZodLiteral<"domino">;
|
|
113
|
-
resource: z.ZodLiteral<"point-ledger">;
|
|
114
|
-
}, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
|
|
115
|
-
provider: z.ZodLiteral<"discord">;
|
|
116
|
-
resource: z.ZodLiteral<"channel">;
|
|
117
|
-
types: z.ZodArray<z.ZodEnum<{
|
|
118
|
-
text: "text";
|
|
119
|
-
announcement: "announcement";
|
|
120
|
-
}>>;
|
|
121
|
-
postable: z.ZodOptional<z.ZodLiteral<true>>;
|
|
122
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
123
|
-
provider: z.ZodLiteral<"discord">;
|
|
124
|
-
resource: z.ZodLiteral<"role">;
|
|
125
|
-
assignable: z.ZodDefault<z.ZodBoolean>;
|
|
126
|
-
}, z.core.$strict>]>]>;
|
|
127
|
-
query: z.ZodOptional<z.ZodString>;
|
|
128
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
129
|
-
ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
130
|
-
}, z.core.$strict>;
|
|
131
|
-
declare const resourceOptionsSchema: z.ZodObject<{
|
|
132
|
-
revision: z.ZodNumber;
|
|
133
|
-
options: z.ZodArray<z.ZodObject<{
|
|
134
|
-
id: z.ZodString;
|
|
135
|
-
label: z.ZodString;
|
|
136
|
-
description: z.ZodOptional<z.ZodString>;
|
|
137
|
-
group: z.ZodOptional<z.ZodString>;
|
|
138
|
-
disabledReason: z.ZodOptional<z.ZodString>;
|
|
139
|
-
}, z.core.$strip>>;
|
|
140
|
-
nextCursor: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
141
|
-
cursor: z.ZodNullable<z.ZodString>;
|
|
142
|
-
}, z.core.$strip>;
|
|
143
|
-
type ResourceOption = z.infer<typeof resourceOptionsSchema>["options"][number];
|
|
2
|
+
import { o as WalletBalanceQuery } from './wallet-B7e06v4m.js';
|
|
3
|
+
import { R as ResourceHandle } from './tracker-data-esm3WG8R.js';
|
|
4
|
+
import { A as AnalyticsMetricId, a as analyticsCatalog } from './limits-kNzYdZ00.js';
|
|
144
5
|
|
|
145
6
|
declare const settingFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
146
7
|
kind: z.ZodLiteral<"point-ledger">;
|
|
@@ -194,6 +55,7 @@ declare const settingFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
194
55
|
multiline: z.ZodBoolean;
|
|
195
56
|
picker: z.ZodOptional<z.ZodString>;
|
|
196
57
|
decimals: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
secret: z.ZodOptional<z.ZodLiteral<true>>;
|
|
197
59
|
label: z.ZodString;
|
|
198
60
|
description: z.ZodOptional<z.ZodString>;
|
|
199
61
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -268,6 +130,7 @@ declare const settingsFieldsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedU
|
|
|
268
130
|
multiline: z.ZodBoolean;
|
|
269
131
|
picker: z.ZodOptional<z.ZodString>;
|
|
270
132
|
decimals: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
secret: z.ZodOptional<z.ZodLiteral<true>>;
|
|
271
134
|
label: z.ZodString;
|
|
272
135
|
description: z.ZodOptional<z.ZodString>;
|
|
273
136
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -330,58 +193,26 @@ declare function isAmount(value: string): boolean;
|
|
|
330
193
|
declare function isBalanceChain(value: string): value is BalanceChain;
|
|
331
194
|
/** Whether a tracker filter may compare with `field`: an integer or amount setting. */
|
|
332
195
|
declare function isBoundSetting(field: SettingField | undefined): boolean;
|
|
333
|
-
/**
|
|
196
|
+
/**
|
|
197
|
+
* The value schema of a text setting, with the checks its picker adds. A secret setting may also
|
|
198
|
+
* be `""`, its value until an operator sets it, whatever its `minLength`.
|
|
199
|
+
*/
|
|
334
200
|
declare function textSettingSchema(field: {
|
|
335
201
|
minLength: number;
|
|
336
202
|
maxLength: number;
|
|
337
203
|
picker?: string;
|
|
204
|
+
secret?: true;
|
|
338
205
|
}): z.ZodString;
|
|
339
206
|
declare function parseSettings(fields: Record<string, SettingField>, input: unknown): SettingsValues;
|
|
340
207
|
declare function missingResourceSettings(fields: Record<string, SettingField>, values: SettingsValues): string[];
|
|
341
208
|
declare function compatibleSettingKinds(previous: SettingField, next: SettingField): boolean;
|
|
342
209
|
|
|
343
|
-
/**
|
|
344
|
-
* A YouTube Short's body, as `content()` quests read it in `ctx.tracker.content.body`. Every field
|
|
345
|
-
* is what YouTube reported when Relay last read the video.
|
|
346
|
-
*
|
|
347
|
-
* @compat output
|
|
348
|
-
*/
|
|
349
|
-
declare const youtubeShortBodySchema: z.ZodObject<{
|
|
350
|
-
title: z.ZodString;
|
|
351
|
-
description: z.ZodString;
|
|
352
|
-
tags: z.ZodArray<z.ZodString>;
|
|
353
|
-
durationSeconds: z.ZodNumber;
|
|
354
|
-
publishedAt: z.ZodNumber;
|
|
355
|
-
}, z.core.$strip>;
|
|
356
|
-
type YouTubeShortBody = z.infer<typeof youtubeShortBodySchema>;
|
|
357
|
-
/** The counters a YouTube Short's samples measure. A counter YouTube hides is unknown, never zero. */
|
|
358
|
-
declare const youtubeShortMetrics: readonly ["views", "likes", "comments"];
|
|
359
|
-
type YouTubeShortMetric = (typeof youtubeShortMetrics)[number];
|
|
360
|
-
|
|
361
|
-
/**
|
|
362
|
-
* A TikTok video's body, as `content()` quests read it in `ctx.tracker.content.body`. Every field
|
|
363
|
-
* is what TikTok reported when Relay last read the video.
|
|
364
|
-
*
|
|
365
|
-
* @compat output
|
|
366
|
-
*/
|
|
367
|
-
declare const tiktokVideoBodySchema: z.ZodObject<{
|
|
368
|
-
title: z.ZodString;
|
|
369
|
-
description: z.ZodString;
|
|
370
|
-
durationSeconds: z.ZodNumber;
|
|
371
|
-
width: z.ZodNumber;
|
|
372
|
-
height: z.ZodNumber;
|
|
373
|
-
createdAt: z.ZodNumber;
|
|
374
|
-
shareUrl: z.ZodString;
|
|
375
|
-
isAigc: z.ZodBoolean;
|
|
376
|
-
}, z.core.$strip>;
|
|
377
|
-
type TikTokVideoBody = z.infer<typeof tiktokVideoBodySchema>;
|
|
378
|
-
/** The counters a TikTok video's samples measure. A counter TikTok omits is unknown, never zero. */
|
|
379
|
-
declare const tiktokVideoMetrics: readonly ["views", "likes", "comments", "shares"];
|
|
380
|
-
type TikTokVideoMetric = (typeof tiktokVideoMetrics)[number];
|
|
381
|
-
|
|
382
210
|
/**
|
|
383
211
|
* How many panels one dashboard holds and how many dashboards that are not archived a project
|
|
384
212
|
* holds. Panels are computed at read time without rollups, so the caps keep a read affordable.
|
|
213
|
+
*
|
|
214
|
+
* @deprecated Use `limits.dashboardPanels` and `limits.dashboards`, which a 1.x release can
|
|
215
|
+
* raise.
|
|
385
216
|
*/
|
|
386
217
|
declare const dashboardLimits: {
|
|
387
218
|
readonly panels: 24;
|
|
@@ -653,115 +484,4 @@ declare function defineDashboard(input: DashboardInput): {
|
|
|
653
484
|
position?: number | undefined;
|
|
654
485
|
} & ResourceHandle<"dashboard">;
|
|
655
486
|
|
|
656
|
-
|
|
657
|
-
* An announcement's text, at most 1000 characters, with `{placeholder}`s (`announcementPlaceholders`)
|
|
658
|
-
* that Relay fills when it posts. `{{` and `}}` are literal braces.
|
|
659
|
-
*/
|
|
660
|
-
declare const announcementTextSchema: z.ZodString;
|
|
661
|
-
/** An announcement Domino's bot posts in one of the project's connected Telegram chats. */
|
|
662
|
-
declare const telegramAnnouncementSchema: z.ZodObject<{
|
|
663
|
-
action: z.ZodLiteral<"post-message">;
|
|
664
|
-
text: z.ZodString;
|
|
665
|
-
replyToTriggeringMessage: z.ZodOptional<z.ZodBoolean>;
|
|
666
|
-
provider: z.ZodLiteral<"telegram">;
|
|
667
|
-
chat: z.ZodString;
|
|
668
|
-
}, z.core.$strict>;
|
|
669
|
-
/** An announcement Domino's bot posts in a channel of the project's connected Discord server. */
|
|
670
|
-
declare const discordAnnouncementSchema: z.ZodObject<{
|
|
671
|
-
action: z.ZodLiteral<"post-message">;
|
|
672
|
-
text: z.ZodString;
|
|
673
|
-
replyToTriggeringMessage: z.ZodOptional<z.ZodBoolean>;
|
|
674
|
-
provider: z.ZodLiteral<"discord">;
|
|
675
|
-
channel: z.ZodString;
|
|
676
|
-
}, z.core.$strict>;
|
|
677
|
-
/**
|
|
678
|
-
* A message Relay posts when a completion of the quest pays, after its rewards commit. A failed
|
|
679
|
-
* post never undoes the rewards. Build one with `telegram.postMessage()` or
|
|
680
|
-
* `discord.postMessage()`.
|
|
681
|
-
*/
|
|
682
|
-
declare const announcementSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
683
|
-
action: z.ZodLiteral<"post-message">;
|
|
684
|
-
text: z.ZodString;
|
|
685
|
-
replyToTriggeringMessage: z.ZodOptional<z.ZodBoolean>;
|
|
686
|
-
provider: z.ZodLiteral<"telegram">;
|
|
687
|
-
chat: z.ZodString;
|
|
688
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
689
|
-
action: z.ZodLiteral<"post-message">;
|
|
690
|
-
text: z.ZodString;
|
|
691
|
-
replyToTriggeringMessage: z.ZodOptional<z.ZodBoolean>;
|
|
692
|
-
provider: z.ZodLiteral<"discord">;
|
|
693
|
-
channel: z.ZodString;
|
|
694
|
-
}, z.core.$strict>], "provider">;
|
|
695
|
-
type Announcement = z.infer<typeof announcementSchema>;
|
|
696
|
-
|
|
697
|
-
/**
|
|
698
|
-
* Why an evaluator capability could not answer:
|
|
699
|
-
*
|
|
700
|
-
* - `not-linked`: the call needs a member account that is not linked, and its result cannot be
|
|
701
|
-
* null, such as an image check of the member's X profile picture. Readers of the member's own
|
|
702
|
-
* accounts return `null` instead.
|
|
703
|
-
* - `provider-unavailable`: the provider (X, Discord, a chain RPC, AI review) did not answer, or
|
|
704
|
-
* the project's integration cannot reach it.
|
|
705
|
-
* - `author-error`: the call cannot be answered as written: invalid input, an undeclared
|
|
706
|
-
* integration, an unknown tracker, a chain Relay does not read, a wallet the member never
|
|
707
|
-
* linked, or an image that does not exist.
|
|
708
|
-
*
|
|
709
|
-
* Later versions can add codes. Relay also sends codes this tuple does not list, as SDK 1.x keeps
|
|
710
|
-
* it fixed:
|
|
711
|
-
*
|
|
712
|
-
* - `integration-required`: the project's integration needs configuration before the call can
|
|
713
|
-
* answer.
|
|
714
|
-
* - `capability-limit`: the evaluation run already made its eight capability calls, which all
|
|
715
|
-
* capabilities share. Never retryable: the run makes the same calls again.
|
|
716
|
-
*
|
|
717
|
-
* Treat an unknown code as a failure its `message` explains.
|
|
718
|
-
*/
|
|
719
|
-
declare const capabilityErrorCodes: readonly ["not-linked", "provider-unavailable", "author-error"];
|
|
720
|
-
/** @compat open */
|
|
721
|
-
type KnownCapabilityErrorCode = (typeof capabilityErrorCodes)[number];
|
|
722
|
-
/** A known code, or one a newer Relay added. */
|
|
723
|
-
type CapabilityErrorCode = KnownCapabilityErrorCode | (string & {});
|
|
724
|
-
/**
|
|
725
|
-
* A capability failure as it crosses the sandbox boundary and as Relay captures it. Open, so a
|
|
726
|
-
* newer Relay can add codes and fields without breaking an older evaluator or Worker.
|
|
727
|
-
*/
|
|
728
|
-
declare const capabilityFailureSchema: z.ZodObject<{
|
|
729
|
-
code: z.ZodString;
|
|
730
|
-
message: z.ZodString;
|
|
731
|
-
retryable: z.ZodBoolean;
|
|
732
|
-
}, z.core.$loose>;
|
|
733
|
-
type CapabilityFailure = z.infer<typeof capabilityFailureSchema>;
|
|
734
|
-
/**
|
|
735
|
-
* Thrown by an evaluator capability (`ctx.x`, `ctx.discord`, `ctx.wallet`, `ctx.trackers`,
|
|
736
|
-
* `ctx.images`, `ctx.review`) that could not answer. A capability whose subject is missing (an
|
|
737
|
-
* account the member has not linked, a deleted post or message) returns `null` instead of
|
|
738
|
-
* throwing.
|
|
739
|
-
*
|
|
740
|
-
* Catch it to decide yourself; rethrow anything else. An uncaught retryable error makes Relay
|
|
741
|
-
* retry the attempt later; an uncaught one that is not retryable fails it.
|
|
742
|
-
*
|
|
743
|
-
* ```ts
|
|
744
|
-
* try {
|
|
745
|
-
* return (await ctx.x.follows({ userId })) ? decision.accept() : decision.reject({ reason })
|
|
746
|
-
* } catch (error) {
|
|
747
|
-
* if (error instanceof CapabilityError && error.code === "provider-unavailable")
|
|
748
|
-
* return decision.review({ reason: "X is unavailable" })
|
|
749
|
-
* throw error
|
|
750
|
-
* }
|
|
751
|
-
* ```
|
|
752
|
-
*/
|
|
753
|
-
declare class CapabilityError extends Error {
|
|
754
|
-
readonly code: CapabilityErrorCode;
|
|
755
|
-
readonly retryable: boolean;
|
|
756
|
-
constructor(code: CapabilityErrorCode, message: string, options?: {
|
|
757
|
-
retryable?: boolean;
|
|
758
|
-
});
|
|
759
|
-
static [Symbol.hasInstance](value: unknown): boolean;
|
|
760
|
-
/**
|
|
761
|
-
* The error for a captured or transported failure. A code this SDK does not know is never
|
|
762
|
-
* retryable: nothing tells it a retry would help.
|
|
763
|
-
*/
|
|
764
|
-
static from(failure: CapabilityFailure): CapabilityError;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
export { missingResourceSettings as $, type AmountSetting as A, type BalanceChain as B, CapabilityError as C, type DashboardInput as D, completionPolicySchema as E, dashboardArtifactSchema as F, dashboardAuthoringSchema as G, dashboardDefinitionSchema as H, type IntegerSettings as I, dashboardIssue as J, type KnownCapabilityErrorCode as K, dashboardLimits as L, type MemberCompletion as M, dashboardPanelAuthoringSchema as N, dashboardPanels as O, dashboardPreviewSchema as P, defaultPanelWidths as Q, type ResourceSource as R, type Setting as S, type TikTokVideoBody as T, discordAnnouncementSchema as U, isAmount as V, isBalanceChain as W, isBoundSetting as X, type YouTubeShortBody as Y, maxMemberCompletions as Z, memberCompletionSchema as _, type Budget as a, normalizeDashboard as a0, parseSettings as a1, resourceOptionsSchema as a2, resourceRequestSchema as a3, resourceSourceSchema as a4, settingFieldSchema as a5, settingsFieldsSchema as a6, settingsValuesSchema as a7, telegramAnnouncementSchema as a8, textSettingSchema as a9, tiktokVideoBodySchema as aa, tiktokVideoMetrics as ab, youtubeShortBodySchema as ac, youtubeShortMetrics as ad, type AuthorBudget as b, type BoundSettings as c, type Announcement as d, type CapabilityErrorCode as e, type DashboardPanelInput as f, type TikTokVideoMetric as g, type YouTubeShortMetric as h, capabilityErrorCodes as i, defineDashboard as j, type CapabilityFailure as k, type DashboardAuthoring as l, type DashboardDefinition as m, type DashboardIssue as n, type DashboardPanel as o, type DashboardPreview as p, type ResourceOption as q, type SettingField as r, type SettingsValues as s, announcementSchema as t, announcementTextSchema as u, authorBudgetSchema as v, budgetSchema as w, capabilityFailureSchema as x, compatibleSettingKinds as y, completionKeySchema as z };
|
|
487
|
+
export { type AmountSetting as A, type BalanceChain as B, settingFieldSchema as C, type DashboardInput as D, settingsFieldsSchema as E, settingsValuesSchema as F, textSettingSchema as G, type IntegerSettings as I, type Setting as S, type BoundSettings as a, type DashboardPanelInput as b, compatibleSettingKinds as c, dashboardIssue as d, defineDashboard as e, type DashboardAuthoring as f, type DashboardDefinition as g, type DashboardIssue as h, isBoundSetting as i, type DashboardPanel as j, type DashboardPreview as k, type SettingField as l, type SettingsValues as m, normalizeDashboard as n, dashboardArtifactSchema as o, dashboardAuthoringSchema as p, dashboardDefinitionSchema as q, dashboardLimits as r, dashboardPanelAuthoringSchema as s, dashboardPanels as t, dashboardPreviewSchema as u, defaultPanelWidths as v, isAmount as w, isBalanceChain as x, missingResourceSettings as y, parseSettings as z };
|