@domino-sdk/relay 1.36.0 → 1.38.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/{attempt-captures-B2Clh9Df.d.ts → attempt-captures-CSiN1HKd.d.ts} +1 -1
- package/dist/authoring.d.ts +62 -47
- package/dist/authoring.js +14 -6
- package/dist/{automatic-outcomes-BiarOoiy.d.ts → automatic-outcomes-DDbgRubQ.d.ts} +1 -1
- package/dist/browser.d.ts +6 -6
- package/dist/browser.js +10 -10
- package/dist/{chunk-2A4LCKTU.js → chunk-2CP3SULY.js} +9 -2
- package/dist/{chunk-FTB7F5IP.js → chunk-B65YJ6K4.js} +1 -1
- package/dist/{chunk-LNPV4J53.js → chunk-BYX27T2S.js} +2 -2
- package/dist/{chunk-K7PUCZJY.js → chunk-CHQWG5KQ.js} +12 -10
- package/dist/{chunk-JXFRKZGL.js → chunk-CRX274HO.js} +1 -1
- package/dist/{chunk-R5NQEW5J.js → chunk-DZZ5GSJ6.js} +2 -2
- package/dist/{chunk-SB3ODDGR.js → chunk-FTGW72A6.js} +1 -1
- package/dist/{chunk-GI6RO43K.js → chunk-JYHRPMCE.js} +8 -2
- package/dist/{chunk-JHHTQ73D.js → chunk-KEYQHJHU.js} +6 -6
- package/dist/{chunk-S37JPI5O.js → chunk-KTHHGZSJ.js} +1 -1
- package/dist/{chunk-RIMESZ4X.js → chunk-OEO5OBY5.js} +35 -3
- package/dist/{chunk-U735N4KB.js → chunk-SBW52XXL.js} +1 -1
- package/dist/{chunk-Z2EN4ERZ.js → chunk-V7KYVH3Z.js} +1 -1
- package/dist/{chunk-NQDZX3D2.js → chunk-YNQPFRQO.js} +7 -2
- package/dist/{chunk-L33BQLNF.js → chunk-Z3SG7LKF.js} +4 -4
- package/dist/{chunk-3KCKA2XH.js → chunk-ZT7FPD7B.js} +1 -1
- package/dist/{client-CraOIr8b.d.ts → client-DjwKrpFo.d.ts} +19 -4
- package/dist/{deployments-DTaJPDsl.d.ts → deployments-DYeuxXYg.d.ts} +257 -213
- package/dist/{groups-DTsvf0Z2.d.ts → groups-JzAQ2JIN.d.ts} +9 -2
- 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-DFJ4dmR3.d.ts → offers-CIDAJEYs.d.ts} +2 -2
- package/dist/{pages-B5agdH0f.d.ts → pages-DR2YRvAp.d.ts} +20 -1
- package/dist/portal-proxy.js +3 -3
- package/dist/react/index.d.ts +29 -18
- package/dist/react/index.js +60 -17
- package/dist/{schema--jNn3OfJ.d.ts → schema-Cgmj-CbC.d.ts} +18 -1
- package/dist/schema.d.ts +341 -320
- package/dist/schema.js +11 -7
- package/dist/server/index.d.ts +9 -9
- package/dist/server/index.js +104 -16
- package/dist/{submission-input-BHzSin84.d.ts → submission-input-UBqB8NFC.d.ts} +2 -2
- package/dist/{telegram-browser-B1LFWF_v.d.ts → telegram-browser-2IllFeh-.d.ts} +1 -1
- package/dist/testing.d.ts +3 -3
- package/dist/testing.js +5 -5
- package/dist/{transport-4QyqeZLU.d.ts → transport-B3DkXMNu.d.ts} +3612 -3080
- package/dist/{x-imfTy_I1.d.ts → x-vVG6gZqi.d.ts} +1 -1
- package/package.json +1 -1
package/dist/authoring.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
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
|
|
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-Cgmj-CbC.js';
|
|
2
|
+
export { a9 as LedgerSetting, aa as TrackerPage, ab as TrackerReadQuery, ac as trackerDataSchema, ad as trackerTriggerContextSchema } from './schema-Cgmj-CbC.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-CIDAJEYs.js';
|
|
6
|
+
export { g as defineOffer } from './offers-CIDAJEYs.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-JzAQ2JIN.js';
|
|
8
|
+
export { u as defineCampaign, v as defineGroup } from './groups-JzAQ2JIN.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, X as XReader } from './x-
|
|
13
|
+
import { P as Prerequisite, T as TextEvidence, U as UrlEvidence, a as TextOptions, b as UrlOptions } from './submission-input-UBqB8NFC.js';
|
|
14
|
+
export { c as balanceAtLeast, d as completed, i as inGroup } from './submission-input-UBqB8NFC.js';
|
|
15
|
+
import { I as ImageReader, X as XReader } from './x-vVG6gZqi.js';
|
|
16
16
|
import { h as WalletReader } from './wallet-t7uNDg9p.js';
|
|
17
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
18
|
export { C as CapabilityError, a as CapabilityErrorCode, c as capabilityErrorCodes } from './capability-error-FQGGb5xS.js';
|
|
@@ -257,8 +257,8 @@ declare function defineLeaderboard(input: Omit<LeaderboardInput, "key" | "id" |
|
|
|
257
257
|
kind: "earned";
|
|
258
258
|
}> | ReturnType<typeof earned>;
|
|
259
259
|
}): {
|
|
260
|
-
balance: string;
|
|
261
260
|
title: string;
|
|
261
|
+
balance: string;
|
|
262
262
|
access: "participants" | "public";
|
|
263
263
|
score: {
|
|
264
264
|
kind: "balance";
|
|
@@ -295,6 +295,7 @@ declare function defineLeaderboard(input: Omit<LeaderboardInput, "key" | "id" |
|
|
|
295
295
|
};
|
|
296
296
|
};
|
|
297
297
|
key: string;
|
|
298
|
+
includeUnscored?: boolean | undefined;
|
|
298
299
|
settle?: {
|
|
299
300
|
at: "window-end";
|
|
300
301
|
ties: "shared" | "earliest";
|
|
@@ -445,7 +446,7 @@ declare const telegram: {
|
|
|
445
446
|
reactions(): {
|
|
446
447
|
kind: "custom";
|
|
447
448
|
namespace: string;
|
|
448
|
-
identities?: ("discord" | "
|
|
449
|
+
identities?: ("discord" | "member" | "wallet" | "x" | `app:${string}`)[] | undefined;
|
|
449
450
|
accounts?: string[] | undefined;
|
|
450
451
|
data?: TrackerDataSchema | undefined;
|
|
451
452
|
content?: {
|
|
@@ -1065,6 +1066,12 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1065
1066
|
*/
|
|
1066
1067
|
profile?: QuestProfile;
|
|
1067
1068
|
budgets?: Budget[];
|
|
1069
|
+
/**
|
|
1070
|
+
* Milliseconds a member waits after an attempt is rejected, by the evaluator or a
|
|
1071
|
+
* reviewer, before submitting again: `300_000` lets a quiz be retried every five minutes.
|
|
1072
|
+
* Only for quests members submit. Omit it for no cooldown.
|
|
1073
|
+
*/
|
|
1074
|
+
retryCooldownMs?: number;
|
|
1068
1075
|
/**
|
|
1069
1076
|
* Whether staff can review this quest's attempts. Human review is on unless this returns
|
|
1070
1077
|
* `{ enabled: false }`. With it off, `decision.review(...)` becomes a reject that keeps the
|
|
@@ -1096,15 +1103,15 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1096
1103
|
badge?: string | undefined;
|
|
1097
1104
|
};
|
|
1098
1105
|
tier: string;
|
|
1099
|
-
} | {
|
|
1100
|
-
kind: "points";
|
|
1101
|
-
balance: string;
|
|
1102
|
-
amount: number;
|
|
1103
1106
|
} | {
|
|
1104
1107
|
kind: "integration";
|
|
1105
1108
|
provider: "discord";
|
|
1106
1109
|
action: "grant-role";
|
|
1107
1110
|
roleId: string;
|
|
1111
|
+
} | {
|
|
1112
|
+
kind: "points";
|
|
1113
|
+
balance: string;
|
|
1114
|
+
amount: number;
|
|
1108
1115
|
})[] | ((ctx: {
|
|
1109
1116
|
settings: z.core.$InferObjectOutput<T, {}>;
|
|
1110
1117
|
}) => Reward[]);
|
|
@@ -1179,9 +1186,6 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1179
1186
|
kind: "resource";
|
|
1180
1187
|
default: string;
|
|
1181
1188
|
source: {
|
|
1182
|
-
provider: "domino";
|
|
1183
|
-
resource: "point-ledger";
|
|
1184
|
-
} | {
|
|
1185
1189
|
provider: "discord";
|
|
1186
1190
|
resource: "channel";
|
|
1187
1191
|
types: ("text" | "announcement")[];
|
|
@@ -1189,6 +1193,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1189
1193
|
provider: "discord";
|
|
1190
1194
|
resource: "role";
|
|
1191
1195
|
assignable: boolean;
|
|
1196
|
+
} | {
|
|
1197
|
+
provider: "domino";
|
|
1198
|
+
resource: "point-ledger";
|
|
1192
1199
|
};
|
|
1193
1200
|
label: string;
|
|
1194
1201
|
description?: string | undefined;
|
|
@@ -1262,15 +1269,15 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1262
1269
|
badge?: string | undefined;
|
|
1263
1270
|
};
|
|
1264
1271
|
tier: string;
|
|
1265
|
-
} | {
|
|
1266
|
-
kind: "points";
|
|
1267
|
-
balance: string;
|
|
1268
|
-
amount: number;
|
|
1269
1272
|
} | {
|
|
1270
1273
|
kind: "integration";
|
|
1271
1274
|
provider: "discord";
|
|
1272
1275
|
action: "grant-role";
|
|
1273
1276
|
roleId: string;
|
|
1277
|
+
} | {
|
|
1278
|
+
kind: "points";
|
|
1279
|
+
balance: string;
|
|
1280
|
+
amount: number;
|
|
1274
1281
|
})[];
|
|
1275
1282
|
humanReview: boolean;
|
|
1276
1283
|
trigger: {
|
|
@@ -1292,7 +1299,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1292
1299
|
actor?: "staff" | "member" | undefined;
|
|
1293
1300
|
} | {
|
|
1294
1301
|
kind: "manual";
|
|
1295
|
-
input: "
|
|
1302
|
+
input: "none" | "quiz" | "photo";
|
|
1296
1303
|
actor?: "staff" | "member" | undefined;
|
|
1297
1304
|
} | {
|
|
1298
1305
|
kind: "automatic";
|
|
@@ -1336,9 +1343,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1336
1343
|
path: string;
|
|
1337
1344
|
equals: string | number | boolean;
|
|
1338
1345
|
})[] | undefined;
|
|
1339
|
-
enrollment?: "
|
|
1346
|
+
enrollment?: "none" | "required" | undefined;
|
|
1340
1347
|
since?: "activation" | "window" | "enrollment" | undefined;
|
|
1341
|
-
historical?: "
|
|
1348
|
+
historical?: "staff" | "claim" | "automatic" | undefined;
|
|
1342
1349
|
content?: true | undefined;
|
|
1343
1350
|
} | undefined;
|
|
1344
1351
|
};
|
|
@@ -1361,9 +1368,6 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1361
1368
|
title: string;
|
|
1362
1369
|
})[];
|
|
1363
1370
|
completion: {
|
|
1364
|
-
kind: "streak";
|
|
1365
|
-
days: number;
|
|
1366
|
-
} | {
|
|
1367
1371
|
kind: "progress";
|
|
1368
1372
|
goal: {
|
|
1369
1373
|
kind: "count";
|
|
@@ -1380,6 +1384,9 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1380
1384
|
durationMs: number;
|
|
1381
1385
|
};
|
|
1382
1386
|
repeat: "repeat" | "once";
|
|
1387
|
+
} | {
|
|
1388
|
+
kind: "streak";
|
|
1389
|
+
days: number;
|
|
1383
1390
|
} | {
|
|
1384
1391
|
kind: "once";
|
|
1385
1392
|
} | {
|
|
@@ -1405,7 +1412,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1405
1412
|
campaign?: {
|
|
1406
1413
|
key: string;
|
|
1407
1414
|
title: string;
|
|
1408
|
-
enrollment: "
|
|
1415
|
+
enrollment: "none" | "required";
|
|
1409
1416
|
window?: {
|
|
1410
1417
|
from: number;
|
|
1411
1418
|
until: number;
|
|
@@ -1415,6 +1422,7 @@ declare const defineQuest: <T extends Record<string, Setting>, const G extends T
|
|
|
1415
1422
|
from: number;
|
|
1416
1423
|
until: number;
|
|
1417
1424
|
} | undefined;
|
|
1425
|
+
retryCooldownMs?: number | undefined;
|
|
1418
1426
|
};
|
|
1419
1427
|
evaluate(ctx: {
|
|
1420
1428
|
settings: unknown;
|
|
@@ -1489,6 +1497,12 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1489
1497
|
*/
|
|
1490
1498
|
profile?: QuestProfile;
|
|
1491
1499
|
budgets?: Budget[];
|
|
1500
|
+
/**
|
|
1501
|
+
* Milliseconds a member waits after an attempt is rejected, by the evaluator or a
|
|
1502
|
+
* reviewer, before submitting again: `300_000` lets a quiz be retried every five minutes.
|
|
1503
|
+
* Only for quests members submit. Omit it for no cooldown.
|
|
1504
|
+
*/
|
|
1505
|
+
retryCooldownMs?: number;
|
|
1492
1506
|
/**
|
|
1493
1507
|
* Whether staff can review this quest's attempts. Human review is on unless this returns
|
|
1494
1508
|
* `{ enabled: false }`. With it off, `decision.review(...)` becomes a reject that keeps the
|
|
@@ -1520,15 +1534,15 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1520
1534
|
badge?: string | undefined;
|
|
1521
1535
|
};
|
|
1522
1536
|
tier: string;
|
|
1523
|
-
} | {
|
|
1524
|
-
kind: "points";
|
|
1525
|
-
balance: string;
|
|
1526
|
-
amount: number;
|
|
1527
1537
|
} | {
|
|
1528
1538
|
kind: "integration";
|
|
1529
1539
|
provider: "discord";
|
|
1530
1540
|
action: "grant-role";
|
|
1531
1541
|
roleId: string;
|
|
1542
|
+
} | {
|
|
1543
|
+
kind: "points";
|
|
1544
|
+
balance: string;
|
|
1545
|
+
amount: number;
|
|
1532
1546
|
})[] | ((ctx: {
|
|
1533
1547
|
settings: z.core.$InferObjectOutput<T, {}>;
|
|
1534
1548
|
}) => Reward[]);
|
|
@@ -1603,9 +1617,6 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1603
1617
|
kind: "resource";
|
|
1604
1618
|
default: string;
|
|
1605
1619
|
source: {
|
|
1606
|
-
provider: "domino";
|
|
1607
|
-
resource: "point-ledger";
|
|
1608
|
-
} | {
|
|
1609
1620
|
provider: "discord";
|
|
1610
1621
|
resource: "channel";
|
|
1611
1622
|
types: ("text" | "announcement")[];
|
|
@@ -1613,6 +1624,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1613
1624
|
provider: "discord";
|
|
1614
1625
|
resource: "role";
|
|
1615
1626
|
assignable: boolean;
|
|
1627
|
+
} | {
|
|
1628
|
+
provider: "domino";
|
|
1629
|
+
resource: "point-ledger";
|
|
1616
1630
|
};
|
|
1617
1631
|
label: string;
|
|
1618
1632
|
description?: string | undefined;
|
|
@@ -1686,15 +1700,15 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1686
1700
|
badge?: string | undefined;
|
|
1687
1701
|
};
|
|
1688
1702
|
tier: string;
|
|
1689
|
-
} | {
|
|
1690
|
-
kind: "points";
|
|
1691
|
-
balance: string;
|
|
1692
|
-
amount: number;
|
|
1693
1703
|
} | {
|
|
1694
1704
|
kind: "integration";
|
|
1695
1705
|
provider: "discord";
|
|
1696
1706
|
action: "grant-role";
|
|
1697
1707
|
roleId: string;
|
|
1708
|
+
} | {
|
|
1709
|
+
kind: "points";
|
|
1710
|
+
balance: string;
|
|
1711
|
+
amount: number;
|
|
1698
1712
|
})[];
|
|
1699
1713
|
humanReview: boolean;
|
|
1700
1714
|
trigger: {
|
|
@@ -1716,7 +1730,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1716
1730
|
actor?: "staff" | "member" | undefined;
|
|
1717
1731
|
} | {
|
|
1718
1732
|
kind: "manual";
|
|
1719
|
-
input: "
|
|
1733
|
+
input: "none" | "quiz" | "photo";
|
|
1720
1734
|
actor?: "staff" | "member" | undefined;
|
|
1721
1735
|
} | {
|
|
1722
1736
|
kind: "automatic";
|
|
@@ -1760,9 +1774,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1760
1774
|
path: string;
|
|
1761
1775
|
equals: string | number | boolean;
|
|
1762
1776
|
})[] | undefined;
|
|
1763
|
-
enrollment?: "
|
|
1777
|
+
enrollment?: "none" | "required" | undefined;
|
|
1764
1778
|
since?: "activation" | "window" | "enrollment" | undefined;
|
|
1765
|
-
historical?: "
|
|
1779
|
+
historical?: "staff" | "claim" | "automatic" | undefined;
|
|
1766
1780
|
content?: true | undefined;
|
|
1767
1781
|
} | undefined;
|
|
1768
1782
|
};
|
|
@@ -1785,9 +1799,6 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1785
1799
|
title: string;
|
|
1786
1800
|
})[];
|
|
1787
1801
|
completion: {
|
|
1788
|
-
kind: "streak";
|
|
1789
|
-
days: number;
|
|
1790
|
-
} | {
|
|
1791
1802
|
kind: "progress";
|
|
1792
1803
|
goal: {
|
|
1793
1804
|
kind: "count";
|
|
@@ -1804,6 +1815,9 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1804
1815
|
durationMs: number;
|
|
1805
1816
|
};
|
|
1806
1817
|
repeat: "repeat" | "once";
|
|
1818
|
+
} | {
|
|
1819
|
+
kind: "streak";
|
|
1820
|
+
days: number;
|
|
1807
1821
|
} | {
|
|
1808
1822
|
kind: "once";
|
|
1809
1823
|
} | {
|
|
@@ -1829,7 +1843,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1829
1843
|
campaign?: {
|
|
1830
1844
|
key: string;
|
|
1831
1845
|
title: string;
|
|
1832
|
-
enrollment: "
|
|
1846
|
+
enrollment: "none" | "required";
|
|
1833
1847
|
window?: {
|
|
1834
1848
|
from: number;
|
|
1835
1849
|
until: number;
|
|
@@ -1839,6 +1853,7 @@ declare const defineQuestType: <T extends Record<string, Setting>, const G exten
|
|
|
1839
1853
|
from: number;
|
|
1840
1854
|
until: number;
|
|
1841
1855
|
} | undefined;
|
|
1856
|
+
retryCooldownMs?: number | undefined;
|
|
1842
1857
|
};
|
|
1843
1858
|
evaluate(ctx: {
|
|
1844
1859
|
settings: unknown;
|
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-YNQPFRQO.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-2CP3SULY.js";
|
|
24
24
|
import {
|
|
25
25
|
telegramReactionDataSchema,
|
|
26
26
|
telegramReactionsNamespace
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-B65YJ6K4.js";
|
|
28
28
|
import {
|
|
29
29
|
authoringKey,
|
|
30
30
|
badgeReward,
|
|
@@ -61,6 +61,7 @@ import {
|
|
|
61
61
|
quizContentSchema,
|
|
62
62
|
resourceHandle,
|
|
63
63
|
resourceSourceSchema,
|
|
64
|
+
retryCooldownMsSchema,
|
|
64
65
|
rewardBundleSchema,
|
|
65
66
|
schemaCheckedReader,
|
|
66
67
|
settingFieldSchema,
|
|
@@ -81,7 +82,7 @@ import {
|
|
|
81
82
|
whereSchemaIssue,
|
|
82
83
|
whereSettings,
|
|
83
84
|
xSearchSourceSchema
|
|
84
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-OEO5OBY5.js";
|
|
85
86
|
|
|
86
87
|
// src/builders.ts
|
|
87
88
|
import * as z from "zod";
|
|
@@ -614,10 +615,16 @@ function questBuilder(template) {
|
|
|
614
615
|
performance: definition.performance ? contentPerformancePolicySchema.parse({
|
|
615
616
|
metrics: definition.performance.metrics,
|
|
616
617
|
maxAgeMs: definition.performance.maxAgeMs
|
|
617
|
-
}) : void 0
|
|
618
|
+
}) : void 0,
|
|
619
|
+
...definition.retryCooldownMs === void 0 ? {} : { retryCooldownMs: definition.retryCooldownMs }
|
|
618
620
|
},
|
|
619
621
|
{ template }
|
|
620
622
|
);
|
|
623
|
+
if (definition.retryCooldownMs !== void 0 && !retryCooldownMsSchema.safeParse(definition.retryCooldownMs).success) {
|
|
624
|
+
throw new Error(
|
|
625
|
+
"retryCooldownMs must be whole milliseconds from 1000 (one second) to 604800000 (seven days)"
|
|
626
|
+
);
|
|
627
|
+
}
|
|
621
628
|
if (definition.performance) {
|
|
622
629
|
const declared = triggerContentMetrics.get(definition.trigger) ?? [];
|
|
623
630
|
const unknown = definition.performance.metrics.filter(
|
|
@@ -700,7 +707,8 @@ function questBuilder(template) {
|
|
|
700
707
|
budgets: definition.budgets ?? [],
|
|
701
708
|
requires: definition.requires ?? [],
|
|
702
709
|
...definition.campaign ? { campaign: definition.campaign } : {},
|
|
703
|
-
...definition.availability ? { availability: definition.availability } : {}
|
|
710
|
+
...definition.availability ? { availability: definition.availability } : {},
|
|
711
|
+
...definition.retryCooldownMs === void 0 ? {} : { retryCooldownMs: definition.retryCooldownMs }
|
|
704
712
|
});
|
|
705
713
|
}
|
|
706
714
|
return resourceHandle("quest", {
|
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-DjwKrpFo.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-2IllFeh-.js';
|
|
3
|
+
import './groups-JzAQ2JIN.js';
|
|
4
4
|
import 'zod';
|
|
5
|
-
import './schema
|
|
6
|
-
import './pages-
|
|
7
|
-
import './submission-input-
|
|
5
|
+
import './schema-Cgmj-CbC.js';
|
|
6
|
+
import './pages-DR2YRvAp.js';
|
|
7
|
+
import './submission-input-UBqB8NFC.js';
|
|
8
8
|
import './action-DBzILFx9.js';
|
|
9
9
|
import './participant-activity-CoB2F30C.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-DZZ5GSJ6.js";
|
|
16
|
+
import "./chunk-CHQWG5KQ.js";
|
|
17
|
+
import "./chunk-CRX274HO.js";
|
|
18
|
+
import "./chunk-JYHRPMCE.js";
|
|
19
|
+
import "./chunk-2CP3SULY.js";
|
|
20
|
+
import "./chunk-B65YJ6K4.js";
|
|
21
|
+
import "./chunk-SBW52XXL.js";
|
|
22
|
+
import "./chunk-KTHHGZSJ.js";
|
|
23
|
+
import "./chunk-FTGW72A6.js";
|
|
24
|
+
import "./chunk-OEO5OBY5.js";
|
|
25
25
|
export {
|
|
26
26
|
browserSubmissionStore,
|
|
27
27
|
cosmosChainList,
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
contentMetricSchema,
|
|
5
5
|
contentMetricsSchema,
|
|
6
6
|
identifier,
|
|
7
|
+
maxPointsAmount,
|
|
7
8
|
pageCursorSchema,
|
|
8
9
|
pointsRewardSchema,
|
|
9
10
|
refuseWindowTimeZone,
|
|
@@ -11,7 +12,7 @@ import {
|
|
|
11
12
|
responseShape,
|
|
12
13
|
rewardKey,
|
|
13
14
|
tierRewardSchema
|
|
14
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-OEO5OBY5.js";
|
|
15
16
|
|
|
16
17
|
// src/badges.ts
|
|
17
18
|
import * as z from "zod";
|
|
@@ -477,6 +478,12 @@ var leaderboardDefinitionObject = z5.object({
|
|
|
477
478
|
score: scoreSchema,
|
|
478
479
|
access: z5.enum(["participants", "public"]).default("participants"),
|
|
479
480
|
group: identifier.optional(),
|
|
481
|
+
/**
|
|
482
|
+
* List the project's eligible members who have no qualifying points, with a score of 0, ranked
|
|
483
|
+
* after every member who scored and ordered by member ID. Omitted or false lists only members
|
|
484
|
+
* with a qualifying entry. Settlements never include them.
|
|
485
|
+
*/
|
|
486
|
+
includeUnscored: z5.boolean().optional(),
|
|
480
487
|
settle: leaderboardSettlementPolicySchema.optional()
|
|
481
488
|
}).strict();
|
|
482
489
|
var validateSettlementWindow = (definition, context) => {
|
|
@@ -850,7 +857,7 @@ var referralManagementSchema = z6.object({
|
|
|
850
857
|
import * as z7 from "zod";
|
|
851
858
|
var quantity = z7.number().int().safe().nonnegative();
|
|
852
859
|
var offerPriceSchema = pointsRewardSchema.extend({
|
|
853
|
-
amount: z7.number().int().positive().max(
|
|
860
|
+
amount: z7.number().int().positive().max(maxPointsAmount)
|
|
854
861
|
});
|
|
855
862
|
var offerLimitSchema = z7.object({ perMember: z7.number().int().positive().max(1e4) }).strict();
|
|
856
863
|
var offerDefinitionSchema = z7.object({
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
imageFieldsSchema,
|
|
5
5
|
imageInspectionSchema,
|
|
6
6
|
imageSightingsSchema
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-V7KYVH3Z.js";
|
|
8
8
|
import {
|
|
9
9
|
photoResultSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OEO5OBY5.js";
|
|
11
11
|
|
|
12
12
|
// src/image-results.ts
|
|
13
13
|
import * as z from "zod";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRelayAction,
|
|
3
3
|
withActionId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CRX274HO.js";
|
|
5
5
|
import {
|
|
6
6
|
collectionPassSchema,
|
|
7
7
|
participantActivityQuerySchema,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
questOutcomeSchema,
|
|
18
18
|
rewardDeliveriesSchema,
|
|
19
19
|
rewardDeliveryQuerySchema
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JYHRPMCE.js";
|
|
21
21
|
import {
|
|
22
22
|
AVATAR_UPLOAD_LIMIT,
|
|
23
23
|
avatarUploadTypes,
|
|
@@ -46,29 +46,29 @@ import {
|
|
|
46
46
|
referralDefinitionSchema,
|
|
47
47
|
referralHistorySchema,
|
|
48
48
|
referralSummarySchema
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-2CP3SULY.js";
|
|
50
50
|
import {
|
|
51
51
|
telegramAccountConnectionSchema,
|
|
52
52
|
telegramMiniAppSignInSchema,
|
|
53
53
|
telegramSignInMethodsSchema
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-B65YJ6K4.js";
|
|
55
55
|
import {
|
|
56
56
|
PARTICIPANT_TIMEOUT,
|
|
57
57
|
lifetime,
|
|
58
58
|
retryAfter,
|
|
59
59
|
retrying,
|
|
60
60
|
validTimeout
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-SBW52XXL.js";
|
|
62
62
|
import {
|
|
63
63
|
clientIdentity
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-KTHHGZSJ.js";
|
|
65
65
|
import {
|
|
66
66
|
exchangeResultSchema,
|
|
67
67
|
exchangeSchema,
|
|
68
68
|
memberSummarySchema,
|
|
69
69
|
participantSessionSchema,
|
|
70
70
|
sessionMember
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-FTGW72A6.js";
|
|
72
72
|
import {
|
|
73
73
|
RelayError,
|
|
74
74
|
RelayErrorCode,
|
|
@@ -107,7 +107,7 @@ import {
|
|
|
107
107
|
walletSignInNetworksSchema,
|
|
108
108
|
walletSignatureSchema,
|
|
109
109
|
walletUnlinkInputSchema
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-OEO5OBY5.js";
|
|
111
111
|
|
|
112
112
|
// src/legacy-submissions.ts
|
|
113
113
|
import * as z from "zod";
|
|
@@ -1126,7 +1126,8 @@ function errorBody(value) {
|
|
|
1126
1126
|
missing: Array.isArray(body.missing) ? body.missing.flatMap((entry) => {
|
|
1127
1127
|
const parsed = missingPrerequisiteSchema.safeParse(entry);
|
|
1128
1128
|
return parsed.success ? [parsed.data] : [];
|
|
1129
|
-
}) : []
|
|
1129
|
+
}) : [],
|
|
1130
|
+
retryAt: typeof body.retryAt === "number" && Number.isSafeInteger(body.retryAt) ? body.retryAt : void 0
|
|
1130
1131
|
};
|
|
1131
1132
|
}
|
|
1132
1133
|
async function fromSigner(step, signal) {
|
|
@@ -1358,13 +1359,14 @@ function relayClient(options) {
|
|
|
1358
1359
|
value = JSON.parse(text);
|
|
1359
1360
|
} catch {
|
|
1360
1361
|
}
|
|
1361
|
-
const { message, code, window, missing } = errorBody(value);
|
|
1362
|
+
const { message, code, window, missing, retryAt } = errorBody(value);
|
|
1362
1363
|
throw new RelayError(message ?? `Request failed (${response.status})`, {
|
|
1363
1364
|
kind: "http",
|
|
1364
1365
|
status: response.status,
|
|
1365
1366
|
code,
|
|
1366
1367
|
window,
|
|
1367
1368
|
missing,
|
|
1369
|
+
...retryAt === void 0 ? {} : { retryAt },
|
|
1368
1370
|
operationId: call.operationId,
|
|
1369
1371
|
replaySafe: call.replaySafe,
|
|
1370
1372
|
uncertain: methodOf(call) !== "GET" && uncertainStatuses.has(response.status),
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRelayClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CHQWG5KQ.js";
|
|
4
4
|
import {
|
|
5
5
|
RelayErrorCode,
|
|
6
6
|
asRelayError,
|
|
7
7
|
clientError,
|
|
8
8
|
cosmosChain
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OEO5OBY5.js";
|
|
10
10
|
|
|
11
11
|
// src/base58.ts
|
|
12
12
|
var alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
badgeSchema,
|
|
3
3
|
pointLedgerReferenceSchema
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2CP3SULY.js";
|
|
5
5
|
import {
|
|
6
6
|
authoringIdentityShape,
|
|
7
7
|
entitlementSchema,
|
|
@@ -15,12 +15,13 @@ import {
|
|
|
15
15
|
publishedReleaseSchema,
|
|
16
16
|
questPresentationContentSchema,
|
|
17
17
|
responseShape,
|
|
18
|
+
retryCooldownMsSchema,
|
|
18
19
|
reviewModeSchema,
|
|
19
20
|
settingsValuesSchema,
|
|
20
21
|
storedQuestDescriptionSchema,
|
|
21
22
|
storedReviewModeSchema,
|
|
22
23
|
tieredRewardReferenceSchema
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-OEO5OBY5.js";
|
|
24
25
|
|
|
25
26
|
// src/participant-activity.ts
|
|
26
27
|
import * as z from "zod";
|
|
@@ -156,6 +157,11 @@ var questInstanceSchema = z2.object({
|
|
|
156
157
|
presentation: questPresentationContentSchema.optional(),
|
|
157
158
|
settings: settingsValuesSchema,
|
|
158
159
|
requires: z2.array(prerequisiteSchema).max(30),
|
|
160
|
+
/**
|
|
161
|
+
* Milliseconds a member waits after a rejected attempt before submitting again, or `null` for
|
|
162
|
+
* no cooldown. Omitted: the quest type's own `retryCooldownMs`.
|
|
163
|
+
*/
|
|
164
|
+
retryCooldownMs: retryCooldownMsSchema.nullable().optional(),
|
|
159
165
|
status: z2.enum(["active", "paused", "archived"])
|
|
160
166
|
}).strict();
|
|
161
167
|
var questDraftChangesSchema = z2.object({
|