@domino-sdk/relay 0.5.0 → 0.6.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/dist/authoring.d.ts +88 -5
- package/dist/authoring.js +42 -6
- package/dist/browser.d.ts +382 -1
- package/dist/browser.js +4 -4
- package/dist/{chunk-LUCL63DS.js → chunk-CCLIDCUU.js} +191 -158
- package/dist/chunk-MXK7KEDA.js +819 -0
- package/dist/{chunk-QWRSUSNB.js → chunk-PLO5PPLU.js} +1 -1
- package/dist/{chunk-TXL43HL3.js → chunk-UIC6OF3C.js} +4 -2
- package/dist/index.d.ts +1205 -22
- package/dist/index.js +42 -4
- package/dist/portal-proxy.js +3 -3
- package/dist/schema.d.ts +399 -9
- package/dist/schema.js +3 -1
- package/dist/{settings-B7vsT8nd.d.ts → settings-BrC6C9yl.d.ts} +204 -1
- package/package.json +1 -1
- package/dist/chunk-3IQ4KUKF.js +0 -613
package/dist/schema.js
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
eventSchema,
|
|
13
13
|
evidenceSchema,
|
|
14
14
|
identifier,
|
|
15
|
+
integrationRewardSchema,
|
|
15
16
|
mediaUrlSchema,
|
|
16
17
|
memberListSchema,
|
|
17
18
|
memberPageSchema,
|
|
@@ -48,7 +49,7 @@ import {
|
|
|
48
49
|
tierRewardSchema,
|
|
49
50
|
tieredRewardDefinitionSchema,
|
|
50
51
|
triggerSchema
|
|
51
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-MXK7KEDA.js";
|
|
52
53
|
export {
|
|
53
54
|
artifactSchema,
|
|
54
55
|
attemptSchema,
|
|
@@ -63,6 +64,7 @@ export {
|
|
|
63
64
|
eventSchema,
|
|
64
65
|
evidenceSchema,
|
|
65
66
|
identifier,
|
|
67
|
+
integrationRewardSchema,
|
|
66
68
|
mediaUrlSchema,
|
|
67
69
|
memberListSchema,
|
|
68
70
|
memberPageSchema,
|
|
@@ -1,5 +1,87 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
+
declare const observationInputSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
source: z.ZodString;
|
|
6
|
+
type: z.ZodString;
|
|
7
|
+
member: z.ZodString;
|
|
8
|
+
actor: z.ZodOptional<z.ZodObject<{
|
|
9
|
+
provider: z.ZodString;
|
|
10
|
+
subject: z.ZodString;
|
|
11
|
+
}, z.core.$strict>>;
|
|
12
|
+
occurredAt: z.ZodNumber;
|
|
13
|
+
data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
14
|
+
}, z.core.$strict>;
|
|
15
|
+
declare const observationSchema: z.ZodObject<{
|
|
16
|
+
id: z.ZodString;
|
|
17
|
+
source: z.ZodString;
|
|
18
|
+
type: z.ZodString;
|
|
19
|
+
member: z.ZodString;
|
|
20
|
+
actor: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
provider: z.ZodString;
|
|
22
|
+
subject: z.ZodString;
|
|
23
|
+
}, z.core.$strict>>;
|
|
24
|
+
occurredAt: z.ZodNumber;
|
|
25
|
+
data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
26
|
+
receivedAt: z.ZodNumber;
|
|
27
|
+
}, z.core.$strict>;
|
|
28
|
+
type Observation = z.infer<typeof observationSchema>;
|
|
29
|
+
declare const observationTriggerSchema: z.ZodObject<{
|
|
30
|
+
source: z.ZodString;
|
|
31
|
+
type: z.ZodString;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
declare const completionPolicySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
34
|
+
kind: z.ZodLiteral<"once">;
|
|
35
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
36
|
+
kind: z.ZodLiteral<"keyed">;
|
|
37
|
+
}, z.core.$strict>], "kind">;
|
|
38
|
+
declare const completionKeySchema: z.ZodString;
|
|
39
|
+
declare const budgetSchema: z.ZodObject<{
|
|
40
|
+
id: z.ZodString;
|
|
41
|
+
scope: z.ZodEnum<{
|
|
42
|
+
member: "member";
|
|
43
|
+
project: "project";
|
|
44
|
+
}>;
|
|
45
|
+
period: z.ZodEnum<{
|
|
46
|
+
lifetime: "lifetime";
|
|
47
|
+
day: "day";
|
|
48
|
+
}>;
|
|
49
|
+
limit: z.ZodNumber;
|
|
50
|
+
cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
51
|
+
balance: z.ZodString;
|
|
52
|
+
}, z.core.$strict>]>;
|
|
53
|
+
}, z.core.$strict>;
|
|
54
|
+
type Budget = z.infer<typeof budgetSchema>;
|
|
55
|
+
declare const observationReceiptSchema: z.ZodObject<{
|
|
56
|
+
id: z.ZodString;
|
|
57
|
+
source: z.ZodString;
|
|
58
|
+
attempts: z.ZodArray<z.ZodString>;
|
|
59
|
+
receivedAt: z.ZodNumber;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
declare const discordReactionSchema: z.ZodObject<{
|
|
62
|
+
guildId: z.ZodString;
|
|
63
|
+
channelId: z.ZodString;
|
|
64
|
+
messageId: z.ZodString;
|
|
65
|
+
userId: z.ZodString;
|
|
66
|
+
messageAuthorId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
67
|
+
actorRoles: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
68
|
+
emoji: z.ZodObject<{
|
|
69
|
+
id: z.ZodNullable<z.ZodString>;
|
|
70
|
+
name: z.ZodString;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
messagePublishedAt: z.ZodNumber;
|
|
73
|
+
}, z.core.$strict>;
|
|
74
|
+
declare const discordMessageSchema: z.ZodObject<{
|
|
75
|
+
guildId: z.ZodString;
|
|
76
|
+
channelId: z.ZodString;
|
|
77
|
+
messageId: z.ZodString;
|
|
78
|
+
userId: z.ZodString;
|
|
79
|
+
content: z.ZodNullable<z.ZodString>;
|
|
80
|
+
replyTo: z.ZodNullable<z.ZodString>;
|
|
81
|
+
publishedAt: z.ZodNumber;
|
|
82
|
+
}, z.core.$strict>;
|
|
83
|
+
type DiscordMessage = z.infer<typeof discordMessageSchema>;
|
|
84
|
+
|
|
3
85
|
declare const integrationProviderSchema: z.ZodEnum<{
|
|
4
86
|
discord: "discord";
|
|
5
87
|
}>;
|
|
@@ -26,6 +108,7 @@ declare const projectIntegrationSchema: z.ZodObject<{
|
|
|
26
108
|
icon: z.ZodNullable<z.ZodString>;
|
|
27
109
|
}, z.core.$strip>>;
|
|
28
110
|
issue: z.ZodNullable<z.ZodString>;
|
|
111
|
+
connectedAt: z.ZodDefault<z.ZodNumber>;
|
|
29
112
|
}, z.core.$strip>;
|
|
30
113
|
type ProjectIntegration = z.infer<typeof projectIntegrationSchema>;
|
|
31
114
|
|
|
@@ -54,7 +137,15 @@ declare const accountConnectionSchema: z.ZodObject<{
|
|
|
54
137
|
}, z.core.$strip>;
|
|
55
138
|
type AccountConnection = z.infer<typeof accountConnectionSchema>;
|
|
56
139
|
declare const discordMemberInputSchema: z.ZodObject<{}, z.core.$strict>;
|
|
140
|
+
declare const discordMessageInputSchema: z.ZodObject<{
|
|
141
|
+
channelId: z.ZodString;
|
|
142
|
+
messageId: z.ZodString;
|
|
143
|
+
}, z.core.$strict>;
|
|
57
144
|
declare const discordMemberSchema: z.ZodObject<{
|
|
145
|
+
userId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
146
|
+
nickname: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
147
|
+
displayName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
148
|
+
boostingSince: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
58
149
|
roles: z.ZodArray<z.ZodString>;
|
|
59
150
|
joinedAt: z.ZodNullable<z.ZodString>;
|
|
60
151
|
pending: z.ZodBoolean;
|
|
@@ -1251,7 +1342,88 @@ declare const quizContentSchema: z.ZodArray<z.ZodObject<{
|
|
|
1251
1342
|
}, z.core.$strict>>;
|
|
1252
1343
|
type QuizContent = z.infer<typeof quizContentSchema>;
|
|
1253
1344
|
|
|
1345
|
+
declare const channelSourceSchema: z.ZodObject<{
|
|
1346
|
+
provider: z.ZodLiteral<"discord">;
|
|
1347
|
+
resource: z.ZodLiteral<"channel">;
|
|
1348
|
+
types: z.ZodArray<z.ZodEnum<{
|
|
1349
|
+
text: "text";
|
|
1350
|
+
announcement: "announcement";
|
|
1351
|
+
}>>;
|
|
1352
|
+
}, z.core.$strict>;
|
|
1353
|
+
declare const resourceSourceSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1354
|
+
provider: z.ZodLiteral<"discord">;
|
|
1355
|
+
resource: z.ZodLiteral<"channel">;
|
|
1356
|
+
types: z.ZodArray<z.ZodEnum<{
|
|
1357
|
+
text: "text";
|
|
1358
|
+
announcement: "announcement";
|
|
1359
|
+
}>>;
|
|
1360
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1361
|
+
provider: z.ZodLiteral<"discord">;
|
|
1362
|
+
resource: z.ZodLiteral<"role">;
|
|
1363
|
+
assignable: z.ZodDefault<z.ZodBoolean>;
|
|
1364
|
+
}, z.core.$strict>]>;
|
|
1365
|
+
type ResourceSource = z.infer<typeof resourceSourceSchema>;
|
|
1366
|
+
declare const resourceRequestSchema: z.ZodObject<{
|
|
1367
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
1368
|
+
provider: z.ZodLiteral<"discord">;
|
|
1369
|
+
resource: z.ZodLiteral<"channel">;
|
|
1370
|
+
types: z.ZodArray<z.ZodEnum<{
|
|
1371
|
+
text: "text";
|
|
1372
|
+
announcement: "announcement";
|
|
1373
|
+
}>>;
|
|
1374
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1375
|
+
provider: z.ZodLiteral<"discord">;
|
|
1376
|
+
resource: z.ZodLiteral<"role">;
|
|
1377
|
+
assignable: z.ZodDefault<z.ZodBoolean>;
|
|
1378
|
+
}, z.core.$strict>]>;
|
|
1379
|
+
query: z.ZodOptional<z.ZodString>;
|
|
1380
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
1381
|
+
ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1382
|
+
}, z.core.$strict>;
|
|
1383
|
+
declare const resourceOptionsSchema: z.ZodObject<{
|
|
1384
|
+
revision: z.ZodNumber;
|
|
1385
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1386
|
+
id: z.ZodString;
|
|
1387
|
+
label: z.ZodString;
|
|
1388
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1389
|
+
group: z.ZodOptional<z.ZodString>;
|
|
1390
|
+
disabledReason: z.ZodOptional<z.ZodString>;
|
|
1391
|
+
}, z.core.$strip>>;
|
|
1392
|
+
cursor: z.ZodNullable<z.ZodString>;
|
|
1393
|
+
}, z.core.$strip>;
|
|
1394
|
+
type ResourceOption = z.infer<typeof resourceOptionsSchema>["options"][number];
|
|
1395
|
+
declare const discord: {
|
|
1396
|
+
roles(options?: {
|
|
1397
|
+
assignable?: boolean;
|
|
1398
|
+
}): ResourceSource;
|
|
1399
|
+
channels(options?: {
|
|
1400
|
+
types?: z.infer<typeof channelSourceSchema>["types"];
|
|
1401
|
+
}): ResourceSource;
|
|
1402
|
+
};
|
|
1403
|
+
|
|
1254
1404
|
declare const settingFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1405
|
+
kind: z.ZodLiteral<"datetime">;
|
|
1406
|
+
default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
|
|
1407
|
+
label: z.ZodString;
|
|
1408
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1409
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1410
|
+
kind: z.ZodLiteral<"resource">;
|
|
1411
|
+
default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
|
|
1412
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
1413
|
+
provider: z.ZodLiteral<"discord">;
|
|
1414
|
+
resource: z.ZodLiteral<"channel">;
|
|
1415
|
+
types: z.ZodArray<z.ZodEnum<{
|
|
1416
|
+
text: "text";
|
|
1417
|
+
announcement: "announcement";
|
|
1418
|
+
}>>;
|
|
1419
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1420
|
+
provider: z.ZodLiteral<"discord">;
|
|
1421
|
+
resource: z.ZodLiteral<"role">;
|
|
1422
|
+
assignable: z.ZodDefault<z.ZodBoolean>;
|
|
1423
|
+
}, z.core.$strict>]>;
|
|
1424
|
+
label: z.ZodString;
|
|
1425
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1426
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1255
1427
|
kind: z.ZodLiteral<"quiz">;
|
|
1256
1428
|
default: z.ZodArray<z.ZodObject<{
|
|
1257
1429
|
id: z.ZodString;
|
|
@@ -1293,6 +1465,28 @@ declare const settingFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1293
1465
|
}, z.core.$strict>], "kind">;
|
|
1294
1466
|
type SettingField = z.infer<typeof settingFieldSchema>;
|
|
1295
1467
|
declare const settingsFieldsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1468
|
+
kind: z.ZodLiteral<"datetime">;
|
|
1469
|
+
default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
|
|
1470
|
+
label: z.ZodString;
|
|
1471
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1472
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1473
|
+
kind: z.ZodLiteral<"resource">;
|
|
1474
|
+
default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
|
|
1475
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
1476
|
+
provider: z.ZodLiteral<"discord">;
|
|
1477
|
+
resource: z.ZodLiteral<"channel">;
|
|
1478
|
+
types: z.ZodArray<z.ZodEnum<{
|
|
1479
|
+
text: "text";
|
|
1480
|
+
announcement: "announcement";
|
|
1481
|
+
}>>;
|
|
1482
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1483
|
+
provider: z.ZodLiteral<"discord">;
|
|
1484
|
+
resource: z.ZodLiteral<"role">;
|
|
1485
|
+
assignable: z.ZodDefault<z.ZodBoolean>;
|
|
1486
|
+
}, z.core.$strict>]>;
|
|
1487
|
+
label: z.ZodString;
|
|
1488
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1489
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1296
1490
|
kind: z.ZodLiteral<"quiz">;
|
|
1297
1491
|
default: z.ZodArray<z.ZodObject<{
|
|
1298
1492
|
id: z.ZodString;
|
|
@@ -1347,6 +1541,13 @@ type Label = {
|
|
|
1347
1541
|
description?: string;
|
|
1348
1542
|
};
|
|
1349
1543
|
declare const settings: {
|
|
1544
|
+
datetime(options: Label & {
|
|
1545
|
+
default: string;
|
|
1546
|
+
}): z.ZodDefault<z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>>;
|
|
1547
|
+
resource(options: Label & {
|
|
1548
|
+
source: ResourceSource;
|
|
1549
|
+
default?: string;
|
|
1550
|
+
}): z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>;
|
|
1350
1551
|
quiz(options: Label & {
|
|
1351
1552
|
default: QuizContent;
|
|
1352
1553
|
}): z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -1379,5 +1580,7 @@ declare const settings: {
|
|
|
1379
1580
|
object<T extends Record<string, z.ZodType>>(shape: T): z.ZodObject<{ -readonly [P in keyof T]: T[P]; }, z.core.$strict>;
|
|
1380
1581
|
};
|
|
1381
1582
|
declare function parseSettings(fields: Record<string, SettingField>, input: unknown): SettingsValues;
|
|
1583
|
+
declare function missingResourceSettings(fields: Record<string, SettingField>, values: SettingsValues): string[];
|
|
1584
|
+
declare function compatibleSettingKinds(previous: SettingField, next: SettingField): boolean;
|
|
1382
1585
|
|
|
1383
|
-
export {
|
|
1586
|
+
export { parseSettings as $, type AuthProvider as A, type Budget as B, discordReactionSchema as C, type DiscordMember as D, discordServerSchema as E, integrationProviderSchema as F, leaderboardArtifactSchema as G, leaderboardDefinitionSchema as H, type IntegrationProvider as I, leaderboardExclusionSchema as J, leaderboardGroupSchema as K, type LeaderboardQuery as L, leaderboardPageSchema as M, leaderboardPreviewSchema as N, type Observation as O, type ProjectIntegration as P, type QuizContent as Q, type ReferralDefinition as R, type SolanaBalance as S, leaderboardQuerySchema as T, leaderboardRowSchema as U, leaderboardWindowSchema as V, type WalletConnection as W, missingResourceSettings as X, observationInputSchema as Y, observationReceiptSchema as Z, observationSchema as _, type DiscordMessage as a, pointsAccountSchema as a0, pointsEntrySchema as a1, pointsMutationSchema as a2, pointsResultSchema as a3, projectIntegrationSchema as a4, publishedLeaderboardSchema as a5, publishedReferralSchema as a6, quizChoiceSchema as a7, quizContentSchema as a8, quizQuestionSchema as a9, quizQuestionsSchema as aa, referralAccountSchema as ab, referralArtifactSchema as ac, referralControlSchema as ad, referralDefinitionSchema as ae, referralHistorySchema as af, referralManagementSchema as ag, referralRelationshipSchema as ah, referralSummarySchema as ai, resourceOptionsSchema as aj, resourceRequestSchema as ak, resourceSourceSchema as al, settingFieldSchema as am, settingsFieldsSchema as an, settingsValuesSchema as ao, solanaAddressSchema as ap, solanaBalanceSchema as aq, walletChallengeSchema as ar, walletConnectionSchema as as, defineReferral as b, discord as c, defineLeaderboard as d, walletProofSchema as e, type AccountConnection as f, type LeaderboardDefinition as g, type LeaderboardPage as h, type ResourceOption as i, type ResourceSource as j, type SettingField as k, type SettingsValues as l, accountConnectionSchema as m, authProviderSchema as n, observationTriggerSchema as o, budgetSchema as p, compatibleSettingKinds as q, referralAcceptSchema as r, settings as s, completionKeySchema as t, completionPolicySchema as u, discordMemberInputSchema as v, walletChallengeInputSchema as w, discordMemberSchema as x, discordMessageInputSchema as y, discordMessageSchema as z };
|