@domino-sdk/relay 1.61.0 → 1.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +156 -8
- package/README.md +3 -2
- package/dist/{schema-CZ6Rj0ZF.d.ts → accounts-CCqCKCVx.d.ts} +3127 -1764
- package/dist/action-9Xl0StBg.d.ts +33 -0
- package/dist/{integrations-B3y36OaB.d.ts → analytics-BwAKLi7O.d.ts} +347 -57
- package/dist/{attempt-captures-DYnJVkfg.d.ts → attempt-captures-Cm-5G0PC.d.ts} +1 -1
- package/dist/authoring.d.ts +130 -42
- package/dist/authoring.js +112 -37
- package/dist/{automatic-outcomes-If88LR9f.d.ts → automatic-outcomes-pAsOyIVp.d.ts} +5 -1
- package/dist/avatar.d.ts +1 -1
- package/dist/browser.d.ts +15 -11
- package/dist/browser.js +15 -11
- package/dist/{announcements-CHx3-HBw.d.ts → capability-error-DFMwSuSf.d.ts} +161 -4
- package/dist/{pages-K7-KjSXw.d.ts → catalog--ZIlskAo.d.ts} +39 -561
- package/dist/{chunk-DYXDZFKA.js → chunk-3KLC4AMA.js} +37 -11
- package/dist/{chunk-XBV2CK2H.js → chunk-3PYYGFSB.js} +14 -2
- package/dist/{chunk-RHBS5FJL.js → chunk-5TEYFX6X.js} +2 -2
- package/dist/chunk-6WCIWXUV.js +31 -0
- package/dist/chunk-CICDIBOF.js +373 -0
- package/dist/{chunk-MHPKEVEW.js → chunk-CZFXGGEK.js} +5 -0
- package/dist/chunk-D26YNACF.js +320 -0
- package/dist/{chunk-5I54XBK2.js → chunk-E6IKQHTX.js} +2 -2
- package/dist/chunk-FWLQ5XCS.js +21 -0
- package/dist/{chunk-SKGTNTLF.js → chunk-GKIFABGN.js} +150 -61
- package/dist/chunk-GTDW453U.js +522 -0
- package/dist/{chunk-VURRFVNP.js → chunk-HTZHBTIL.js} +69 -27
- package/dist/chunk-K2KS3JLY.js +188 -0
- package/dist/{chunk-ZDJLPN4L.js → chunk-MK425RXJ.js} +3143 -3209
- package/dist/{chunk-L77O64I4.js → chunk-QYPMPWVX.js} +1 -1
- package/dist/chunk-UAKYDVT3.js +565 -0
- package/dist/{chunk-DHXDBAJF.js → chunk-UPQPUJOU.js} +36 -123
- package/dist/{chunk-24I4R732.js → chunk-UW5232GG.js} +34 -19
- package/dist/chunk-WSBYWVTZ.js +717 -0
- package/dist/{chunk-PPB7HALD.js → chunk-XJFYAXET.js} +9 -8
- package/dist/{chunk-7A4J67ZL.js → chunk-XNKSSE32.js} +1 -1
- package/dist/{chunk-QEAS4ZGS.js → chunk-Y322OTCH.js} +1 -1
- package/dist/{client-C51w7fMb.d.ts → client-B-hbHX30.d.ts} +109 -40
- package/dist/{deployments-kWoHFaqj.d.ts → deployments-M4OHn7G3.d.ts} +407 -18
- package/dist/identity-integration-3mX6b5iH.d.ts +1241 -0
- package/dist/index.d.ts +13 -11
- package/dist/index.js +14 -11
- package/dist/internal.d.ts +14 -12
- package/dist/internal.js +26 -14
- package/dist/{offers-BoV4ryUc.d.ts → offers-DhAtss4_.d.ts} +21 -4
- package/dist/pages-B8q8Y_dQ.d.ts +715 -0
- package/dist/{participant-activity-DHL8QYks.d.ts → participant-activity-D-Drp24G.d.ts} +16 -3
- package/dist/portal-proxy.d.ts +59 -2
- package/dist/portal-proxy.js +109 -23
- package/dist/react/index.d.ts +206 -26
- package/dist/react/index.js +153 -25
- package/dist/{action-DBzILFx9.d.ts → request-error-D_dUPLwo.d.ts} +1 -31
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/Y4OAVXFR.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/schema.d.ts +154 -30
- package/dist/schema.js +126 -75
- package/dist/server/index.d.ts +14 -12
- package/dist/server/index.js +2137 -1633
- package/dist/sign-in-providers-BkjcDsFF.d.ts +39 -0
- package/dist/submission-input-DHGKhXfp.d.ts +342 -0
- package/dist/{telegram-browser-BUceZIGZ.d.ts → telegram-browser-BCE7zdOb.d.ts} +46 -6
- package/dist/telegram.d.ts +64 -0
- package/dist/telegram.js +23 -0
- package/dist/testing.d.ts +112 -15
- package/dist/testing.js +321 -16
- package/dist/tracker-data-Hb1uQnk5.d.ts +1855 -0
- package/dist/{transport-BrX9pIGN.d.ts → transport-DkhX2Cbs.d.ts} +5764 -2217
- package/dist/{wallet-CIqFoxdm.d.ts → wallet-DTO7SXj7.d.ts} +20 -7
- package/package.json +5 -1
- package/dist/accounts-DoabriBX.d.ts +0 -306
- package/dist/capability-error-DufwG3G0.d.ts +0 -159
- package/dist/chunk-3Y3L2F54.js +0 -982
- package/dist/chunk-EN3M5Z4J.js +0 -13
- package/dist/chunk-QNUHWK7R.js +0 -602
- package/dist/chunk-SE4PFJPT.js +0 -247
- package/dist/groups-CqcA2Ycs.d.ts +0 -2827
- package/dist/runtime/chunks/5QVFB4TU.js +0 -1
- package/dist/submission-input-C54Q8yAD.d.ts +0 -146
- package/dist/x-D1PGi8Sq.d.ts +0 -331
package/dist/browser.js
CHANGED
|
@@ -11,21 +11,25 @@ import {
|
|
|
11
11
|
memberTime,
|
|
12
12
|
signInOptions,
|
|
13
13
|
solanaSigner,
|
|
14
|
-
telegramMiniAppInitData,
|
|
15
14
|
walletStandardSolanaSigner
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-UW5232GG.js";
|
|
16
|
+
import {
|
|
17
|
+
telegramMiniAppInitData
|
|
18
|
+
} from "./chunk-FWLQ5XCS.js";
|
|
19
|
+
import "./chunk-GKIFABGN.js";
|
|
20
|
+
import "./chunk-Y322OTCH.js";
|
|
21
|
+
import "./chunk-6WCIWXUV.js";
|
|
22
|
+
import "./chunk-CICDIBOF.js";
|
|
23
|
+
import "./chunk-D26YNACF.js";
|
|
24
|
+
import "./chunk-GTDW453U.js";
|
|
25
|
+
import "./chunk-WSBYWVTZ.js";
|
|
22
26
|
import {
|
|
23
27
|
getHostEnvironment
|
|
24
28
|
} from "./chunk-KDR2VAJP.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-3PYYGFSB.js";
|
|
30
|
+
import "./chunk-XJFYAXET.js";
|
|
31
|
+
import "./chunk-MK425RXJ.js";
|
|
32
|
+
import "./chunk-K2KS3JLY.js";
|
|
29
33
|
export {
|
|
30
34
|
browserSubmissionStore,
|
|
31
35
|
cosmosChainList,
|
|
@@ -1,7 +1,94 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { I as WalletBalanceQuery } from './wallet-DTO7SXj7.js';
|
|
3
|
+
import { R as ResourceHandle } from './tracker-data-Hb1uQnk5.js';
|
|
4
|
+
import { J as AnalyticsMetricId, K as analyticsCatalog } from './analytics-BwAKLi7O.js';
|
|
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;
|
|
5
92
|
|
|
6
93
|
declare const resourceSourceSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
7
94
|
provider: z.ZodLiteral<"domino">;
|
|
@@ -607,4 +694,74 @@ declare const announcementSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
607
694
|
}, z.core.$strict>], "provider">;
|
|
608
695
|
type Announcement = z.infer<typeof announcementSchema>;
|
|
609
696
|
|
|
610
|
-
|
|
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 };
|