@domino-sdk/relay 1.29.0 → 1.30.1
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/dist/{attempt-captures-BPMbTDYG.d.ts → attempt-captures-nMDnKGdI.d.ts} +1 -1
- package/dist/authoring.d.ts +48 -49
- package/dist/authoring.js +4 -4
- package/dist/{automatic-outcomes-CGAxTwEj.d.ts → automatic-outcomes-CHiFP_U-.d.ts} +1 -1
- package/dist/browser.d.ts +6 -6
- package/dist/browser.js +10 -10
- package/dist/capability-error-FQGGb5xS.d.ts +71 -0
- package/dist/{chunk-DDA7G23P.js → chunk-32UPB7Q3.js} +1 -1
- package/dist/{chunk-LPURBE7D.js → chunk-3WJBL74Q.js} +1 -1
- package/dist/{chunk-PNCLJOUD.js → chunk-466IRAJP.js} +1 -1
- package/dist/{chunk-V4FGPIR3.js → chunk-4EX7JIGW.js} +4 -4
- package/dist/{chunk-MNL5NSC4.js → chunk-6NWCLBXR.js} +2 -2
- package/dist/{chunk-JNBNL7FE.js → chunk-BUHGXKPY.js} +1 -1
- package/dist/{chunk-5FQ2BNG2.js → chunk-FTZG6KMQ.js} +1 -1
- package/dist/{chunk-6YLULKQM.js → chunk-FU2KGJMQ.js} +6 -6
- package/dist/{chunk-VP63H7IE.js → chunk-HSF75ZA6.js} +2 -2
- package/dist/{chunk-W7PDXGYB.js → chunk-IJT4EKFY.js} +1 -1
- package/dist/{chunk-22QERRAG.js → chunk-KUZXNKHL.js} +18 -1
- package/dist/{chunk-ZLYVOLU2.js → chunk-MWPAOC56.js} +8 -8
- package/dist/{chunk-BVEWY2ZL.js → chunk-OW22TOV7.js} +1 -0
- package/dist/{chunk-W2HGXOZ5.js → chunk-V36CPSZW.js} +2 -2
- package/dist/{chunk-CCTZIHWN.js → chunk-V7K7XXFB.js} +1 -1
- package/dist/{chunk-C3KL5SGM.js → chunk-WPD4N3OP.js} +1 -1
- package/dist/{client-D4WMWeWC.d.ts → client-Ciy0g8Hx.d.ts} +4 -4
- package/dist/{deployments-r5RxhZ9x.d.ts → deployments-Dx81-x1v.d.ts} +109 -109
- package/dist/{groups-BNUhmxYY.d.ts → groups-sgKusEzF.d.ts} +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +9 -9
- package/dist/internal.d.ts +9 -9
- package/dist/internal.js +8 -8
- package/dist/{offers-CdB5jnRl.d.ts → offers-DzdzB2ZI.d.ts} +2 -2
- package/dist/{pages-BUmWkUu2.d.ts → pages-DFZThUH7.d.ts} +1 -1
- package/dist/portal-proxy.js +3 -3
- package/dist/react/index.d.ts +8 -8
- package/dist/react/index.js +10 -10
- package/dist/{schema-lmOnv5C5.d.ts → schema-DquhoBae.d.ts} +1 -1
- package/dist/schema.d.ts +321 -321
- package/dist/schema.js +15 -9
- package/dist/server/index.d.ts +9 -9
- package/dist/server/index.js +37 -16
- package/dist/{submission-input-DdvTz7ac.d.ts → submission-input-Dr0v6J9N.d.ts} +2 -2
- package/dist/{telegram-browser-SK3KxXBL.d.ts → telegram-browser-DJiawHY-.d.ts} +1 -1
- package/dist/testing.d.ts +5 -5
- package/dist/testing.js +5 -5
- package/dist/{transport-BNdKQ_m4.d.ts → transport-CEAQv15w.d.ts} +2137 -2112
- package/dist/{images-PPPTL2Ct.d.ts → x-58jkoblN.d.ts} +99 -2
- package/package.json +1 -1
- package/dist/capability-error-CvSZaif2.d.ts +0 -151
package/dist/authoring.d.ts
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { x as xContentBodySchema, I as IdentityKind, n as customSourceSchema, W as WithRecordData, o as WithContent, p as WithAccountRoles, q as ResourceHandle, r as QuestHandle, L as LedgerReference, G as GroupHandle, u as TrackerSource, v as trackerDefinitionSchema, y as Tracker, z as TrackerData, B as SourceRoles, C as LedgerHandle, D as TrackerDataSchema, F as xSearchSourceSchema, X as XTweet, H as XContentMetric, J as TrackerTriggerPolicy, N as Where,
|
|
2
|
-
export { a9 as LedgerSetting, aa as TrackerPage, ab as TrackerReadQuery, ac as trackerDataSchema, ad as trackerTriggerContextSchema } from './schema-
|
|
1
|
+
import { x as xContentBodySchema, I as IdentityKind, n as customSourceSchema, W as WithRecordData, o as WithContent, p as WithAccountRoles, q as ResourceHandle, r as QuestHandle, L as LedgerReference, G as GroupHandle, u as TrackerSource, v as trackerDefinitionSchema, y as Tracker, z as TrackerData, B as SourceRoles, C as LedgerHandle, D as TrackerDataSchema, F as xSearchSourceSchema, X as XTweet, H as XContentMetric, J as TrackerTriggerPolicy, N as Where, P as MemberIdentity, U as TrackerTriggerContext, V as TrackerReader, Y as TextReviewInput, Z as TextResult, _ as PhotoResult, $ as Decision, a0 as rewardSchema, a1 as TrackerTriggerMode, a2 as RoleOf, a3 as WhereSetting, a4 as ContentBody, a5 as BadgeHandle, a6 as ContentMetricName, a7 as triggerSchema, d as QuestPresentation, e as QuestProfile, f as QuizEvidence, a8 as TieredRewardDefinition } from './schema-DquhoBae.js';
|
|
2
|
+
export { a9 as LedgerSetting, aa as TrackerPage, ab as TrackerReadQuery, ac as trackerDataSchema, ad as trackerTriggerContextSchema } from './schema-DquhoBae.js';
|
|
3
3
|
import * as z from 'zod';
|
|
4
4
|
export { z } from 'zod';
|
|
5
|
-
import { f as badgeDeclarationSchema, B as Badge } from './offers-
|
|
6
|
-
export { g as defineOffer } from './offers-
|
|
7
|
-
import { E as EngagementBudget, q as leaderboardDefinitionSchema, r as AuthoringIdentity, s as pointLedgerDeclarationSchema, t as referralAuthoringSchema, C as CampaignDefinition, A as AvailabilityWindow } from './groups-
|
|
8
|
-
export { u as defineCampaign, v as defineGroup } from './groups-
|
|
5
|
+
import { f as badgeDeclarationSchema, B as Badge } from './offers-DzdzB2ZI.js';
|
|
6
|
+
export { g as defineOffer } from './offers-DzdzB2ZI.js';
|
|
7
|
+
import { E as EngagementBudget, q as leaderboardDefinitionSchema, r as AuthoringIdentity, s as pointLedgerDeclarationSchema, t as referralAuthoringSchema, C as CampaignDefinition, A as AvailabilityWindow } from './groups-sgKusEzF.js';
|
|
8
|
+
export { u as defineCampaign, v as defineGroup } from './groups-sgKusEzF.js';
|
|
9
9
|
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';
|
|
10
10
|
export { i as TelegramChatMember, j as TelegramChatMemberStatus, k as TelegramReactionData } from './accounts-DRPENuZe.js';
|
|
11
11
|
import { Q as QuizContent, a as StreakPolicy } from './streaks-0YuipsUQ.js';
|
|
12
12
|
import { R as ResourceSource, S as Setting, I as IntegrationModule, B as Budget, a as IntegerSettings } from './integrations-CllF-kWg.js';
|
|
13
|
-
import { P as Prerequisite, T as TextEvidence, U as UrlEvidence, a as TextOptions, b as UrlOptions } from './submission-input-
|
|
14
|
-
export { c as balanceAtLeast, d as completed, i as inGroup } from './submission-input-
|
|
15
|
-
import { I as ImageReader } from './
|
|
16
|
-
import { X as XReader } from './capability-error-CvSZaif2.js';
|
|
17
|
-
export { C as CapabilityError, a as CapabilityErrorCode, c as capabilityErrorCodes } from './capability-error-CvSZaif2.js';
|
|
13
|
+
import { P as Prerequisite, T as TextEvidence, U as UrlEvidence, a as TextOptions, b as UrlOptions } from './submission-input-Dr0v6J9N.js';
|
|
14
|
+
export { c as balanceAtLeast, d as completed, i as inGroup } from './submission-input-Dr0v6J9N.js';
|
|
15
|
+
import { I as ImageReader, X as XReader } from './x-58jkoblN.js';
|
|
18
16
|
import { h as WalletReader } from './wallet-t7uNDg9p.js';
|
|
19
17
|
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-t7uNDg9p.js';
|
|
18
|
+
export { C as CapabilityError, a as CapabilityErrorCode, c as capabilityErrorCodes } from './capability-error-FQGGb5xS.js';
|
|
20
19
|
export { f as formatUnits, p as parseUnits } from './units-CwgsPB_r.js';
|
|
21
20
|
|
|
22
21
|
declare function defineBadge(input: z.input<typeof badgeDeclarationSchema>): {
|
|
@@ -258,8 +257,8 @@ declare function defineLeaderboard(input: Omit<LeaderboardInput, "key" | "id" |
|
|
|
258
257
|
kind: "earned";
|
|
259
258
|
}> | ReturnType<typeof earned>;
|
|
260
259
|
}): {
|
|
261
|
-
balance: string;
|
|
262
260
|
title: string;
|
|
261
|
+
balance: string;
|
|
263
262
|
access: "participants" | "public";
|
|
264
263
|
score: {
|
|
265
264
|
kind: "balance";
|
|
@@ -446,7 +445,7 @@ declare const telegram: {
|
|
|
446
445
|
reactions(): {
|
|
447
446
|
kind: "custom";
|
|
448
447
|
namespace: string;
|
|
449
|
-
identities?: ("discord" | "
|
|
448
|
+
identities?: ("discord" | "member" | "wallet" | "x" | `app:${string}`)[] | undefined;
|
|
450
449
|
accounts?: string[] | undefined;
|
|
451
450
|
data?: TrackerDataSchema | undefined;
|
|
452
451
|
content?: {
|
|
@@ -1097,15 +1096,15 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1097
1096
|
badge?: string | undefined;
|
|
1098
1097
|
};
|
|
1099
1098
|
tier: string;
|
|
1100
|
-
} | {
|
|
1101
|
-
kind: "points";
|
|
1102
|
-
balance: string;
|
|
1103
|
-
amount: number;
|
|
1104
1099
|
} | {
|
|
1105
1100
|
kind: "integration";
|
|
1106
1101
|
provider: "discord";
|
|
1107
1102
|
action: "grant-role";
|
|
1108
1103
|
roleId: string;
|
|
1104
|
+
} | {
|
|
1105
|
+
kind: "points";
|
|
1106
|
+
balance: string;
|
|
1107
|
+
amount: number;
|
|
1109
1108
|
})[] | ((ctx: {
|
|
1110
1109
|
settings: z.core.$InferObjectOutput<T, {}>;
|
|
1111
1110
|
}) => Reward[]);
|
|
@@ -1180,9 +1179,6 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1180
1179
|
kind: "resource";
|
|
1181
1180
|
default: string;
|
|
1182
1181
|
source: {
|
|
1183
|
-
provider: "domino";
|
|
1184
|
-
resource: "point-ledger";
|
|
1185
|
-
} | {
|
|
1186
1182
|
provider: "discord";
|
|
1187
1183
|
resource: "channel";
|
|
1188
1184
|
types: ("text" | "announcement")[];
|
|
@@ -1190,6 +1186,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1190
1186
|
provider: "discord";
|
|
1191
1187
|
resource: "role";
|
|
1192
1188
|
assignable: boolean;
|
|
1189
|
+
} | {
|
|
1190
|
+
provider: "domino";
|
|
1191
|
+
resource: "point-ledger";
|
|
1193
1192
|
};
|
|
1194
1193
|
label: string;
|
|
1195
1194
|
description?: string | undefined;
|
|
@@ -1263,15 +1262,15 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1263
1262
|
badge?: string | undefined;
|
|
1264
1263
|
};
|
|
1265
1264
|
tier: string;
|
|
1266
|
-
} | {
|
|
1267
|
-
kind: "points";
|
|
1268
|
-
balance: string;
|
|
1269
|
-
amount: number;
|
|
1270
1265
|
} | {
|
|
1271
1266
|
kind: "integration";
|
|
1272
1267
|
provider: "discord";
|
|
1273
1268
|
action: "grant-role";
|
|
1274
1269
|
roleId: string;
|
|
1270
|
+
} | {
|
|
1271
|
+
kind: "points";
|
|
1272
|
+
balance: string;
|
|
1273
|
+
amount: number;
|
|
1275
1274
|
})[];
|
|
1276
1275
|
humanReview: boolean;
|
|
1277
1276
|
trigger: {
|
|
@@ -1293,7 +1292,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1293
1292
|
actor?: "staff" | "member" | undefined;
|
|
1294
1293
|
} | {
|
|
1295
1294
|
kind: "manual";
|
|
1296
|
-
input: "
|
|
1295
|
+
input: "none" | "quiz" | "photo";
|
|
1297
1296
|
actor?: "staff" | "member" | undefined;
|
|
1298
1297
|
} | {
|
|
1299
1298
|
kind: "automatic";
|
|
@@ -1337,9 +1336,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1337
1336
|
path: string;
|
|
1338
1337
|
equals: string | number | boolean;
|
|
1339
1338
|
})[] | undefined;
|
|
1340
|
-
enrollment?: "
|
|
1339
|
+
enrollment?: "none" | "required" | undefined;
|
|
1341
1340
|
since?: "activation" | "window" | "enrollment" | undefined;
|
|
1342
|
-
historical?: "
|
|
1341
|
+
historical?: "staff" | "claim" | "automatic" | undefined;
|
|
1343
1342
|
content?: true | undefined;
|
|
1344
1343
|
} | undefined;
|
|
1345
1344
|
};
|
|
@@ -1362,9 +1361,6 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1362
1361
|
title: string;
|
|
1363
1362
|
})[];
|
|
1364
1363
|
completion: {
|
|
1365
|
-
kind: "streak";
|
|
1366
|
-
days: number;
|
|
1367
|
-
} | {
|
|
1368
1364
|
kind: "progress";
|
|
1369
1365
|
goal: {
|
|
1370
1366
|
kind: "count";
|
|
@@ -1381,6 +1377,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1381
1377
|
durationMs: number;
|
|
1382
1378
|
};
|
|
1383
1379
|
repeat: "repeat" | "once";
|
|
1380
|
+
} | {
|
|
1381
|
+
kind: "streak";
|
|
1382
|
+
days: number;
|
|
1384
1383
|
} | {
|
|
1385
1384
|
kind: "once";
|
|
1386
1385
|
} | {
|
|
@@ -1406,7 +1405,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1406
1405
|
campaign?: {
|
|
1407
1406
|
key: string;
|
|
1408
1407
|
title: string;
|
|
1409
|
-
enrollment: "
|
|
1408
|
+
enrollment: "none" | "required";
|
|
1410
1409
|
window?: {
|
|
1411
1410
|
from: number;
|
|
1412
1411
|
until: number;
|
|
@@ -1521,15 +1520,15 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1521
1520
|
badge?: string | undefined;
|
|
1522
1521
|
};
|
|
1523
1522
|
tier: string;
|
|
1524
|
-
} | {
|
|
1525
|
-
kind: "points";
|
|
1526
|
-
balance: string;
|
|
1527
|
-
amount: number;
|
|
1528
1523
|
} | {
|
|
1529
1524
|
kind: "integration";
|
|
1530
1525
|
provider: "discord";
|
|
1531
1526
|
action: "grant-role";
|
|
1532
1527
|
roleId: string;
|
|
1528
|
+
} | {
|
|
1529
|
+
kind: "points";
|
|
1530
|
+
balance: string;
|
|
1531
|
+
amount: number;
|
|
1533
1532
|
})[] | ((ctx: {
|
|
1534
1533
|
settings: z.core.$InferObjectOutput<T, {}>;
|
|
1535
1534
|
}) => Reward[]);
|
|
@@ -1604,9 +1603,6 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1604
1603
|
kind: "resource";
|
|
1605
1604
|
default: string;
|
|
1606
1605
|
source: {
|
|
1607
|
-
provider: "domino";
|
|
1608
|
-
resource: "point-ledger";
|
|
1609
|
-
} | {
|
|
1610
1606
|
provider: "discord";
|
|
1611
1607
|
resource: "channel";
|
|
1612
1608
|
types: ("text" | "announcement")[];
|
|
@@ -1614,6 +1610,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1614
1610
|
provider: "discord";
|
|
1615
1611
|
resource: "role";
|
|
1616
1612
|
assignable: boolean;
|
|
1613
|
+
} | {
|
|
1614
|
+
provider: "domino";
|
|
1615
|
+
resource: "point-ledger";
|
|
1617
1616
|
};
|
|
1618
1617
|
label: string;
|
|
1619
1618
|
description?: string | undefined;
|
|
@@ -1687,15 +1686,15 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1687
1686
|
badge?: string | undefined;
|
|
1688
1687
|
};
|
|
1689
1688
|
tier: string;
|
|
1690
|
-
} | {
|
|
1691
|
-
kind: "points";
|
|
1692
|
-
balance: string;
|
|
1693
|
-
amount: number;
|
|
1694
1689
|
} | {
|
|
1695
1690
|
kind: "integration";
|
|
1696
1691
|
provider: "discord";
|
|
1697
1692
|
action: "grant-role";
|
|
1698
1693
|
roleId: string;
|
|
1694
|
+
} | {
|
|
1695
|
+
kind: "points";
|
|
1696
|
+
balance: string;
|
|
1697
|
+
amount: number;
|
|
1699
1698
|
})[];
|
|
1700
1699
|
humanReview: boolean;
|
|
1701
1700
|
trigger: {
|
|
@@ -1717,7 +1716,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1717
1716
|
actor?: "staff" | "member" | undefined;
|
|
1718
1717
|
} | {
|
|
1719
1718
|
kind: "manual";
|
|
1720
|
-
input: "
|
|
1719
|
+
input: "none" | "quiz" | "photo";
|
|
1721
1720
|
actor?: "staff" | "member" | undefined;
|
|
1722
1721
|
} | {
|
|
1723
1722
|
kind: "automatic";
|
|
@@ -1761,9 +1760,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1761
1760
|
path: string;
|
|
1762
1761
|
equals: string | number | boolean;
|
|
1763
1762
|
})[] | undefined;
|
|
1764
|
-
enrollment?: "
|
|
1763
|
+
enrollment?: "none" | "required" | undefined;
|
|
1765
1764
|
since?: "activation" | "window" | "enrollment" | undefined;
|
|
1766
|
-
historical?: "
|
|
1765
|
+
historical?: "staff" | "claim" | "automatic" | undefined;
|
|
1767
1766
|
content?: true | undefined;
|
|
1768
1767
|
} | undefined;
|
|
1769
1768
|
};
|
|
@@ -1786,9 +1785,6 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1786
1785
|
title: string;
|
|
1787
1786
|
})[];
|
|
1788
1787
|
completion: {
|
|
1789
|
-
kind: "streak";
|
|
1790
|
-
days: number;
|
|
1791
|
-
} | {
|
|
1792
1788
|
kind: "progress";
|
|
1793
1789
|
goal: {
|
|
1794
1790
|
kind: "count";
|
|
@@ -1805,6 +1801,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1805
1801
|
durationMs: number;
|
|
1806
1802
|
};
|
|
1807
1803
|
repeat: "repeat" | "once";
|
|
1804
|
+
} | {
|
|
1805
|
+
kind: "streak";
|
|
1806
|
+
days: number;
|
|
1808
1807
|
} | {
|
|
1809
1808
|
kind: "once";
|
|
1810
1809
|
} | {
|
|
@@ -1830,7 +1829,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1830
1829
|
campaign?: {
|
|
1831
1830
|
key: string;
|
|
1832
1831
|
title: string;
|
|
1833
|
-
enrollment: "
|
|
1832
|
+
enrollment: "none" | "required";
|
|
1834
1833
|
window?: {
|
|
1835
1834
|
from: number;
|
|
1836
1835
|
until: number;
|
package/dist/authoring.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
sourceDataSchema,
|
|
11
11
|
sourceRoles,
|
|
12
12
|
validateQuestShape
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3WJBL74Q.js";
|
|
14
14
|
import {
|
|
15
15
|
badgeDeclarationSchema,
|
|
16
16
|
defineOffer,
|
|
@@ -20,11 +20,11 @@ import {
|
|
|
20
20
|
leaderboardAuthoringSchema,
|
|
21
21
|
pointLedgerDeclarationSchema,
|
|
22
22
|
referralAuthoringSchema
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-WPD4N3OP.js";
|
|
24
24
|
import {
|
|
25
25
|
telegramReactionDataSchema,
|
|
26
26
|
telegramReactionsNamespace
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-BUHGXKPY.js";
|
|
28
28
|
import {
|
|
29
29
|
authoringKey,
|
|
30
30
|
badgeReward,
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
whereSchemaIssue,
|
|
82
82
|
whereSettings,
|
|
83
83
|
xSearchSourceSchema
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-OW22TOV7.js";
|
|
85
85
|
|
|
86
86
|
// src/builders.ts
|
|
87
87
|
import * as z from "zod";
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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-
|
|
3
|
-
import './groups-
|
|
1
|
+
import { o as SubmissionStore, f as RelayClientOptions, R as RelayClient } from './client-Ciy0g8Hx.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-DJiawHY-.js';
|
|
3
|
+
import './groups-sgKusEzF.js';
|
|
4
4
|
import 'zod';
|
|
5
|
-
import './schema-
|
|
6
|
-
import './pages-
|
|
7
|
-
import './submission-input-
|
|
5
|
+
import './schema-DquhoBae.js';
|
|
6
|
+
import './pages-DFZThUH7.js';
|
|
7
|
+
import './submission-input-Dr0v6J9N.js';
|
|
8
8
|
import './action-DBzILFx9.js';
|
|
9
9
|
import './participant-activity-BPZiW7m7.js';
|
|
10
10
|
import './accounts-DRPENuZe.js';
|
package/dist/browser.js
CHANGED
|
@@ -12,16 +12,16 @@ 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-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-HSF75ZA6.js";
|
|
16
|
+
import "./chunk-MWPAOC56.js";
|
|
17
|
+
import "./chunk-IJT4EKFY.js";
|
|
18
|
+
import "./chunk-6NWCLBXR.js";
|
|
19
|
+
import "./chunk-WPD4N3OP.js";
|
|
20
|
+
import "./chunk-BUHGXKPY.js";
|
|
21
|
+
import "./chunk-V7K7XXFB.js";
|
|
22
|
+
import "./chunk-FTZG6KMQ.js";
|
|
23
|
+
import "./chunk-466IRAJP.js";
|
|
24
|
+
import "./chunk-OW22TOV7.js";
|
|
25
25
|
export {
|
|
26
26
|
browserSubmissionStore,
|
|
27
27
|
cosmosChainList,
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Why an evaluator capability could not answer:
|
|
5
|
+
*
|
|
6
|
+
* - `not-linked`: the call needs a member account that is not linked, and its result cannot be
|
|
7
|
+
* null, such as an image check of the member's X profile picture. Readers of the member's own
|
|
8
|
+
* accounts return `null` instead.
|
|
9
|
+
* - `provider-unavailable`: the provider (X, Discord, a chain RPC, AI review) did not answer, or
|
|
10
|
+
* the project's integration cannot reach it.
|
|
11
|
+
* - `author-error`: the call cannot be answered as written: invalid input, an undeclared
|
|
12
|
+
* integration, an unknown tracker, a chain Relay does not read, a wallet the member never
|
|
13
|
+
* linked, or an image that does not exist.
|
|
14
|
+
*
|
|
15
|
+
* Later versions can add codes. Treat an unknown code as a failure its `message` explains.
|
|
16
|
+
*/
|
|
17
|
+
declare const capabilityErrorCodes: readonly ["not-linked", "provider-unavailable", "author-error"];
|
|
18
|
+
/** @compat open */
|
|
19
|
+
type KnownCapabilityErrorCode = (typeof capabilityErrorCodes)[number];
|
|
20
|
+
/** A known code, or one a newer Relay added. */
|
|
21
|
+
type CapabilityErrorCode = KnownCapabilityErrorCode | (string & {});
|
|
22
|
+
/**
|
|
23
|
+
* A capability failure as it crosses the sandbox boundary and as Relay captures it. Open, so a
|
|
24
|
+
* newer Relay can add codes and fields without breaking an older evaluator or Worker.
|
|
25
|
+
*/
|
|
26
|
+
declare const capabilityFailureSchema: z.ZodObject<{
|
|
27
|
+
code: z.ZodString;
|
|
28
|
+
message: z.ZodString;
|
|
29
|
+
/**
|
|
30
|
+
* True when Relay retries the attempt if the error reaches it uncaught, and calls the provider
|
|
31
|
+
* again. A failure that is not retryable is captured (or follows from the attempt's pinned
|
|
32
|
+
* inputs), so every run of the attempt sees it again. A retryable failure that quest code
|
|
33
|
+
* handles and moves past is final for the attempt; one that escapes the evaluation is retried.
|
|
34
|
+
*/
|
|
35
|
+
retryable: z.ZodBoolean;
|
|
36
|
+
}, z.core.$loose>;
|
|
37
|
+
type CapabilityFailure = z.infer<typeof capabilityFailureSchema>;
|
|
38
|
+
/**
|
|
39
|
+
* Thrown by an evaluator capability (`ctx.x`, `ctx.discord`, `ctx.wallet`, `ctx.trackers`,
|
|
40
|
+
* `ctx.images`, `ctx.review`) that could not answer. A capability whose subject is missing (an
|
|
41
|
+
* account the member has not linked, a deleted post or message) returns `null` instead of
|
|
42
|
+
* throwing.
|
|
43
|
+
*
|
|
44
|
+
* Catch it to decide yourself; rethrow anything else. An uncaught retryable error makes Relay
|
|
45
|
+
* retry the attempt later; an uncaught one that is not retryable fails it.
|
|
46
|
+
*
|
|
47
|
+
* ```ts
|
|
48
|
+
* try {
|
|
49
|
+
* return (await ctx.x.follows({ userId })) ? decision.accept() : decision.reject({ reason })
|
|
50
|
+
* } catch (error) {
|
|
51
|
+
* if (error instanceof CapabilityError && error.code === "provider-unavailable")
|
|
52
|
+
* return decision.review({ reason: "X is unavailable" })
|
|
53
|
+
* throw error
|
|
54
|
+
* }
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
declare class CapabilityError extends Error {
|
|
58
|
+
readonly code: CapabilityErrorCode;
|
|
59
|
+
readonly retryable: boolean;
|
|
60
|
+
constructor(code: CapabilityErrorCode, message: string, options?: {
|
|
61
|
+
retryable?: boolean;
|
|
62
|
+
});
|
|
63
|
+
static [Symbol.hasInstance](value: unknown): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* The error for a captured or transported failure. A code this SDK does not know is never
|
|
66
|
+
* retryable: nothing tells it a retry would help.
|
|
67
|
+
*/
|
|
68
|
+
static from(failure: CapabilityFailure): CapabilityError;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { CapabilityError as C, type KnownCapabilityErrorCode as K, type CapabilityErrorCode as a, type CapabilityFailure as b, capabilityErrorCodes as c, capabilityFailureSchema as d };
|
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
retryAfter,
|
|
5
5
|
retrying,
|
|
6
6
|
validTimeout
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-V7K7XXFB.js";
|
|
8
8
|
import {
|
|
9
9
|
clientIdentity
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FTZG6KMQ.js";
|
|
11
11
|
import {
|
|
12
12
|
authScopeSchema
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-466IRAJP.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-OW22TOV7.js";
|
|
21
21
|
|
|
22
22
|
// src/configuration.ts
|
|
23
23
|
function questConfiguration(release) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
badgeSchema,
|
|
3
3
|
pointLedgerReferenceSchema
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WPD4N3OP.js";
|
|
5
5
|
import {
|
|
6
6
|
authoringIdentityShape,
|
|
7
7
|
entitlementSchema,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
storedQuestDescriptionSchema,
|
|
21
21
|
storedReviewModeSchema,
|
|
22
22
|
tieredRewardReferenceSchema
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-OW22TOV7.js";
|
|
24
24
|
|
|
25
25
|
// src/participant-activity.ts
|
|
26
26
|
import * as z from "zod";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
imageSightingsSchema,
|
|
7
7
|
imageUploadsSchema,
|
|
8
8
|
publishedImageSchema
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KUZXNKHL.js";
|
|
10
10
|
import {
|
|
11
11
|
catalogDeploymentSchema,
|
|
12
12
|
collectionPassSchema,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
questTypeVersionSchema,
|
|
25
25
|
questViewSchema,
|
|
26
26
|
rewardDeliveriesSchema
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-6NWCLBXR.js";
|
|
28
28
|
import {
|
|
29
29
|
badgeArtifactSchema,
|
|
30
30
|
badgeSchema,
|
|
@@ -57,15 +57,15 @@ import {
|
|
|
57
57
|
referralDefinitionSchema,
|
|
58
58
|
referralHistorySchema,
|
|
59
59
|
referralSummarySchema
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-WPD4N3OP.js";
|
|
61
61
|
import {
|
|
62
62
|
telegramAccountConnectionSchema
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-BUHGXKPY.js";
|
|
64
64
|
import {
|
|
65
65
|
exchangeResultSchema,
|
|
66
66
|
memberSummarySchema,
|
|
67
67
|
participantSessionSchema
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-466IRAJP.js";
|
|
69
69
|
import {
|
|
70
70
|
accountConnectionSchema,
|
|
71
71
|
attemptSchema,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
walletBalanceSchema,
|
|
97
97
|
walletMessageChallengeSchema,
|
|
98
98
|
walletSignInNetworksSchema
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-OW22TOV7.js";
|
|
100
100
|
|
|
101
101
|
// src/deployments.ts
|
|
102
102
|
import * as z from "zod";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRelayClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MWPAOC56.js";
|
|
4
4
|
import {
|
|
5
5
|
RelayErrorCode,
|
|
6
6
|
asRelayError,
|
|
7
7
|
clientError,
|
|
8
8
|
cosmosChain
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OW22TOV7.js";
|
|
10
10
|
|
|
11
11
|
// src/base58.ts
|
|
12
12
|
var alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
identifier,
|
|
3
3
|
responseShape,
|
|
4
4
|
xTweetSchema
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OW22TOV7.js";
|
|
6
6
|
|
|
7
7
|
// src/x.ts
|
|
8
8
|
import * as z from "zod";
|
|
@@ -17,6 +17,20 @@ var xProfileSchema = z.object({
|
|
|
17
17
|
followersCount: z.number().int().nonnegative().nullable(),
|
|
18
18
|
verified: z.boolean().nullable()
|
|
19
19
|
});
|
|
20
|
+
var xUsernameSchema = z.string().trim().transform((value) => value.replace(/^@/, "")).pipe(
|
|
21
|
+
z.string().regex(
|
|
22
|
+
/^[A-Za-z0-9_]{1,15}$/,
|
|
23
|
+
"Use an X handle: 1 to 15 letters, digits or underscores"
|
|
24
|
+
)
|
|
25
|
+
);
|
|
26
|
+
var xUserLookupInputSchema = z.object({ username: xUsernameSchema }).strict();
|
|
27
|
+
var xUserSchema = z.object({
|
|
28
|
+
id: xIdSchema,
|
|
29
|
+
/** The handle as X shows it, without `@`. */
|
|
30
|
+
username: z.string(),
|
|
31
|
+
/** The display name. */
|
|
32
|
+
name: z.string()
|
|
33
|
+
});
|
|
20
34
|
var xPostSchema = xTweetSchema.extend({
|
|
21
35
|
quotedTweetId: xIdSchema.nullish().transform((v) => v ?? null),
|
|
22
36
|
inReplyToUserId: xIdSchema.nullish().transform((v) => v ?? null),
|
|
@@ -167,6 +181,9 @@ export {
|
|
|
167
181
|
xIdSchema,
|
|
168
182
|
xConnectionSchema,
|
|
169
183
|
xProfileSchema,
|
|
184
|
+
xUsernameSchema,
|
|
185
|
+
xUserLookupInputSchema,
|
|
186
|
+
xUserSchema,
|
|
170
187
|
xPostSchema,
|
|
171
188
|
xRequestSchema,
|
|
172
189
|
imageReferenceSchema,
|