@domino-sdk/relay 1.67.0 → 1.69.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 +65 -0
- package/dist/{accounts-C2O8mpB8.d.ts → accounts-DD4gAOCe.d.ts} +232 -3
- package/dist/{action-9Xl0StBg.d.ts → action-BDFKqGlH.d.ts} +3 -2
- package/dist/{attempt-captures-ClHAoo_n.d.ts → attempt-captures-CbuCmthd.d.ts} +11 -2
- package/dist/authoring.d.ts +534 -48
- package/dist/authoring.js +192 -29
- package/dist/{automatic-outcomes-BEnPn4Uh.d.ts → automatic-outcomes-DE3vfi8g.d.ts} +11 -3
- package/dist/avatar.d.ts +2 -1
- package/dist/browser.d.ts +15 -13
- package/dist/browser.js +12 -13
- package/dist/{capability-error-CuI_F7yM.d.ts → capability-error-db7kO8-P.d.ts} +2 -1
- package/dist/{catalog-CbiftcxQ.d.ts → catalog-Cf3fHDNn.d.ts} +69 -3
- package/dist/{chunk-5DZNMLDM.js → chunk-2A3BJ262.js} +2 -2
- package/dist/{chunk-BQXRCJ3N.js → chunk-5RLIPTL7.js} +1 -1
- package/dist/{chunk-MVQQDPQX.js → chunk-AZDZEQFK.js} +14 -2
- package/dist/{chunk-JK3XV2CR.js → chunk-BRROI4CH.js} +50 -8
- package/dist/{chunk-P33ZAJMS.js → chunk-CQVKOD3B.js} +1266 -677
- package/dist/{chunk-QYC3CZVD.js → chunk-CZ23KRVK.js} +2 -2
- package/dist/{chunk-X3FMVRMM.js → chunk-DIXYVGXO.js} +1 -1
- package/dist/{chunk-RDUSFUXX.js → chunk-GEVARKEV.js} +9 -1
- package/dist/{chunk-2HHZV7U3.js → chunk-LDO5GP7G.js} +1 -1
- package/dist/{chunk-Z2Z5DBNW.js → chunk-LGGD7S5T.js} +45 -9
- package/dist/{chunk-U66GUVSG.js → chunk-LZXDYSUH.js} +2 -0
- package/dist/{chunk-NRMQVK2W.js → chunk-ME2KUAVJ.js} +1 -1
- package/dist/{chunk-KUNPCDN6.js → chunk-ODJGTFPY.js} +16 -9
- package/dist/{chunk-DSJ46QLB.js → chunk-PO2ZDY27.js} +1 -1
- package/dist/{chunk-RWR2LOPA.js → chunk-RKTMSTT7.js} +2 -2
- package/dist/{chunk-5SBA6X5X.js → chunk-SWLW4VN3.js} +2 -2
- package/dist/{chunk-BMJHFWVT.js → chunk-TCREFRPK.js} +10 -43
- package/dist/{chunk-Q5QVAF7R.js → chunk-UGM6DUB2.js} +42 -25
- package/dist/chunk-VAGGGB6B.js +87 -0
- package/dist/{chunk-FGXLXENM.js → chunk-VNEJH4NT.js} +47 -3
- package/dist/chunk-WNEQEDMU.js +427 -0
- package/dist/{chunk-Q6KTTVOI.js → chunk-WVK3G2J2.js} +1 -1
- package/dist/{client-CZPewB9h.d.ts → client-6eSYOl8h.d.ts} +159 -11
- package/dist/{dashboards-jGPM3AxF.d.ts → dashboards-DCOAXL54.d.ts} +6 -5
- package/dist/{deployments-BVFd7ddA.d.ts → deployments-BIfdCMd5.d.ts} +911 -309
- package/dist/{host-environment-FN4zg3hw.d.ts → host-environment-DUw5-Cvj.d.ts} +2 -1
- package/dist/{identity-integration-W1Vo3Ql9.d.ts → identity-integration-BlfOn8rc.d.ts} +3 -2
- package/dist/index.d.ts +16 -15
- package/dist/index.js +10 -10
- package/dist/internal.d.ts +155 -17
- package/dist/internal.js +266 -19
- package/dist/{limits-C4RzrOV4.d.ts → limits-Ctaeq23J.d.ts} +8 -2
- package/dist/{offers-BpYenB9i.d.ts → offers-COqHGbHm.d.ts} +4 -3
- package/dist/{participant-activity-DXRq4s6K.d.ts → participant-activity-BznrcePT.d.ts} +2 -1
- package/dist/{participant-rewards-BcWkBRn_.d.ts → participant-rewards-s5Gn23qb.d.ts} +23 -1
- package/dist/portal-proxy.d.ts +7 -4
- package/dist/portal-proxy.js +14 -18
- package/dist/profiles-CLDKZVFx.d.ts +370 -0
- package/dist/react/index.d.ts +71 -30
- package/dist/react/index.js +12 -13
- package/dist/{request-error-D_dUPLwo.d.ts → request-error-C24SY7n9.d.ts} +2 -1
- package/dist/{reward-deliveries-BOWpMytr.d.ts → reward-deliveries-DFhYGJdx.d.ts} +3 -2
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/HKAI5OQA.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/schema.d.ts +556 -180
- package/dist/schema.js +70 -8
- package/dist/server/index.d.ts +15 -14
- package/dist/server/index.js +2053 -893
- package/dist/{sign-in-providers-BRYVOSlG.d.ts → sign-in-providers-C97mRNbG.d.ts} +4 -3
- package/dist/solana.d.ts +287 -0
- package/dist/solana.js +699 -0
- package/dist/{streaks-0YuipsUQ.d.ts → streaks-MAqKHbHC.d.ts} +2 -1
- package/dist/{submission-input-C152xIdn.d.ts → submission-input-BD7nORuh.d.ts} +4 -3
- package/dist/{telegram-browser-657QqiQl.d.ts → telegram-browser-gRMgGs7B.d.ts} +8 -109
- package/dist/telegram.d.ts +14 -12
- package/dist/telegram.js +2 -2
- package/dist/testing.d.ts +99 -18
- package/dist/testing.js +101 -11
- package/dist/{tracker-data-BqY-9Vu-.d.ts → tracker-data-DQgX3FIc.d.ts} +493 -1
- package/dist/{transport-CthYgZXK.d.ts → transport-BLU8jrhg.d.ts} +7340 -2134
- package/dist/vite.d.ts +2 -1
- package/dist/{wallet-Btng186v.d.ts → wallet-CPAjrW4k.d.ts} +339 -308
- package/dist/wallet-browser-BzPt_Qb5.d.ts +107 -0
- package/package.json +21 -3
- package/dist/chunk-UWUS4OOV.js +0 -59
- package/dist/chunk-UYVJZR33.js +0 -34
- package/dist/runtime/chunks/C2MGLQXC.js +0 -1
package/dist/authoring.js
CHANGED
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
sourceDataSchema,
|
|
7
7
|
sourceRoles,
|
|
8
8
|
validateQuestShape
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AZDZEQFK.js";
|
|
10
10
|
import {
|
|
11
11
|
defineDashboard,
|
|
12
12
|
tiktokVideoBodySchema,
|
|
13
13
|
tiktokVideoMetrics,
|
|
14
14
|
youtubeShortBodySchema,
|
|
15
15
|
youtubeShortMetrics
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CZ23KRVK.js";
|
|
17
17
|
import {
|
|
18
18
|
CapabilityError,
|
|
19
19
|
capabilityErrorCodes
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
engagementScoreSchema,
|
|
25
25
|
offerAuthoringSchema,
|
|
26
26
|
referralAuthoringSchema
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-2A3BJ262.js";
|
|
28
28
|
import {
|
|
29
29
|
announcementSchema,
|
|
30
30
|
authorBudgetSchema,
|
|
@@ -83,6 +83,7 @@ import {
|
|
|
83
83
|
pointLedgerDeclarationSchema,
|
|
84
84
|
pointsRewardSchema,
|
|
85
85
|
questDescriptionSchema,
|
|
86
|
+
questStationsSchema,
|
|
86
87
|
quizAnswersSchema,
|
|
87
88
|
quizContentSchema,
|
|
88
89
|
rejectCodeIssue,
|
|
@@ -117,14 +118,27 @@ import {
|
|
|
117
118
|
urlOptionsSchema,
|
|
118
119
|
walletBalanceSampleSchema,
|
|
119
120
|
walletBalancesNamespace,
|
|
121
|
+
walletNftSampleSchema,
|
|
122
|
+
walletNftsNamespace,
|
|
123
|
+
walletProgramAccountSampleSchema,
|
|
124
|
+
walletProgramAccountSourceSchema,
|
|
125
|
+
walletProgramAccountsNamespace,
|
|
126
|
+
walletProgramActivityNamespace,
|
|
127
|
+
walletProgramActivitySchema,
|
|
128
|
+
walletProgramActivitySourceSchema,
|
|
129
|
+
walletStakeNamespace,
|
|
130
|
+
walletStakeSampleSchema,
|
|
131
|
+
walletStakeSourceSchema,
|
|
120
132
|
whereSchemaIssue,
|
|
121
133
|
whereSettings,
|
|
122
134
|
xSearchSourceSchema,
|
|
123
135
|
youtubeShortsNamespace
|
|
124
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-CQVKOD3B.js";
|
|
125
137
|
import {
|
|
126
|
-
|
|
127
|
-
|
|
138
|
+
namedSchemaFailure,
|
|
139
|
+
parseDefinition,
|
|
140
|
+
parseField
|
|
141
|
+
} from "./chunk-VNEJH4NT.js";
|
|
128
142
|
|
|
129
143
|
// src/builders.ts
|
|
130
144
|
import * as z from "zod";
|
|
@@ -506,6 +520,39 @@ function walletBalanceSource(query) {
|
|
|
506
520
|
'wallet.balances() reads "solana", an EVM chain such as "eip155:8453" or a Cosmos network such as "cosmos:cosmoshub-4"'
|
|
507
521
|
);
|
|
508
522
|
}
|
|
523
|
+
function walletProgramActivitySource(query) {
|
|
524
|
+
const {
|
|
525
|
+
chain = "solana",
|
|
526
|
+
program,
|
|
527
|
+
instruction: instruction2,
|
|
528
|
+
mint,
|
|
529
|
+
minAmount,
|
|
530
|
+
signer = "wallet"
|
|
531
|
+
} = query;
|
|
532
|
+
if (chain !== "solana" && !(typeof chain === "string" && isSolanaNetwork(chain))) {
|
|
533
|
+
throw new Error(
|
|
534
|
+
'wallet.programActivity() reads "solana" (mainnet) or Solana devnet, solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1'
|
|
535
|
+
);
|
|
536
|
+
}
|
|
537
|
+
if (signer !== "wallet" && signer !== "any") {
|
|
538
|
+
throw new Error('wallet.programActivity() takes signer "wallet" or "any"');
|
|
539
|
+
}
|
|
540
|
+
const parsed = walletProgramActivitySourceSchema.safeParse({
|
|
541
|
+
chain: chain === "solana" ? solanaMainnet : chain,
|
|
542
|
+
program,
|
|
543
|
+
instruction: instruction2 ?? null,
|
|
544
|
+
mint: mint ?? null,
|
|
545
|
+
minAmount: minAmount ?? null,
|
|
546
|
+
anySigner: signer === "any"
|
|
547
|
+
});
|
|
548
|
+
if (!parsed.success) {
|
|
549
|
+
const issue = parsed.error.issues[0];
|
|
550
|
+
throw new Error(
|
|
551
|
+
`wallet.programActivity()${issue.path.length ? ` ${issue.path.join(".")}` : ""}: ${issue.message}`
|
|
552
|
+
);
|
|
553
|
+
}
|
|
554
|
+
return parsed.data;
|
|
555
|
+
}
|
|
509
556
|
var wallet = {
|
|
510
557
|
balances(query) {
|
|
511
558
|
const balance = walletBalanceSource(query);
|
|
@@ -514,6 +561,76 @@ var wallet = {
|
|
|
514
561
|
data: walletBalanceSampleSchema
|
|
515
562
|
});
|
|
516
563
|
return customSourceSchema.parse({ ...source, balance });
|
|
564
|
+
},
|
|
565
|
+
programActivity(query) {
|
|
566
|
+
const activity = walletProgramActivitySource(query);
|
|
567
|
+
const source = customSource(walletProgramActivityNamespace, {
|
|
568
|
+
identities: ["wallet"],
|
|
569
|
+
data: walletProgramActivitySchema
|
|
570
|
+
});
|
|
571
|
+
return customSourceSchema.parse({
|
|
572
|
+
...source,
|
|
573
|
+
activity
|
|
574
|
+
});
|
|
575
|
+
},
|
|
576
|
+
nfts(query) {
|
|
577
|
+
const { collection } = query;
|
|
578
|
+
if (typeof collection !== "string" || !isNftCollection(collection)) {
|
|
579
|
+
throw new Error(
|
|
580
|
+
'wallet.nfts() takes an NFT collection such as "eip155:1/erc721:0x\u2026", "eip155:8453/erc1155:0x\u2026/1" or "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/nft:<collection mint>"'
|
|
581
|
+
);
|
|
582
|
+
}
|
|
583
|
+
const source = customSource(walletNftsNamespace, {
|
|
584
|
+
identities: ["wallet"],
|
|
585
|
+
data: walletNftSampleSchema
|
|
586
|
+
});
|
|
587
|
+
const nfts = { collection };
|
|
588
|
+
return customSourceSchema.parse({ ...source, nfts });
|
|
589
|
+
},
|
|
590
|
+
stake(query = {}) {
|
|
591
|
+
const { chain = "solana", voteAccount } = query;
|
|
592
|
+
const stake = walletStakeSourceSchema.safeParse({
|
|
593
|
+
chain: chain === "solana" ? solanaMainnet : chain,
|
|
594
|
+
voteAccount: voteAccount ?? null
|
|
595
|
+
});
|
|
596
|
+
if (!stake.success) {
|
|
597
|
+
throw new Error(
|
|
598
|
+
`wallet.stake() ${stake.error.issues[0].path.join(".")}: ${stake.error.issues[0].message}`
|
|
599
|
+
);
|
|
600
|
+
}
|
|
601
|
+
const source = customSource(walletStakeNamespace, {
|
|
602
|
+
identities: ["wallet"],
|
|
603
|
+
data: walletStakeSampleSchema
|
|
604
|
+
});
|
|
605
|
+
return customSourceSchema.parse({
|
|
606
|
+
...source,
|
|
607
|
+
stake: stake.data
|
|
608
|
+
});
|
|
609
|
+
},
|
|
610
|
+
programAccounts(query) {
|
|
611
|
+
const {
|
|
612
|
+
chain = "solana",
|
|
613
|
+
idl,
|
|
614
|
+
...rest
|
|
615
|
+
} = query;
|
|
616
|
+
const programAccount = walletProgramAccountSourceSchema.safeParse({
|
|
617
|
+
...rest,
|
|
618
|
+
chain: chain === "solana" ? solanaMainnet : chain,
|
|
619
|
+
...idl === void 0 ? {} : { idl: { program: rest.program, source: "pasted", idl } }
|
|
620
|
+
});
|
|
621
|
+
if (!programAccount.success) {
|
|
622
|
+
throw new Error(
|
|
623
|
+
`wallet.programAccounts() ${programAccount.error.issues[0].path.join(".")}: ${programAccount.error.issues[0].message}`
|
|
624
|
+
);
|
|
625
|
+
}
|
|
626
|
+
const source = customSource(walletProgramAccountsNamespace, {
|
|
627
|
+
identities: ["wallet"],
|
|
628
|
+
data: walletProgramAccountSampleSchema
|
|
629
|
+
});
|
|
630
|
+
return customSourceSchema.parse({
|
|
631
|
+
...source,
|
|
632
|
+
programAccount: programAccount.data
|
|
633
|
+
});
|
|
517
634
|
}
|
|
518
635
|
};
|
|
519
636
|
var pointLedgers = () => ({
|
|
@@ -656,12 +773,12 @@ var settings = {
|
|
|
656
773
|
/**
|
|
657
774
|
* An NFT collection `ctx.wallet.nfts()` reads, as a CAIP-19 asset type: an EVM chain, the
|
|
658
775
|
* standard and the contract, such as `"eip155:1/erc721:0x…"`, or `"eip155:8453/erc1155:0x…/1"` for
|
|
659
|
-
* one ERC-1155 token ID; or a Solana cluster and a Metaplex collection
|
|
660
|
-
* `"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/nft:<
|
|
661
|
-
* `"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1/nft:<
|
|
662
|
-
* published or edited: an EVM chain must be one `ctx.wallet.balance()`
|
|
663
|
-
* must report the standard through ERC-165 `supportsInterface`; a Solana
|
|
664
|
-
* collection NFT on its cluster. Typed as the query's collection, so it passes to
|
|
776
|
+
* one ERC-1155 token ID; or a Solana cluster and a Metaplex Core collection's address or a Token
|
|
777
|
+
* Metadata collection NFT's mint there, `"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/nft:<address>"`
|
|
778
|
+
* on mainnet or `"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1/nft:<address>"` on devnet. Relay checks
|
|
779
|
+
* it when the collection is published or edited: an EVM chain must be one `ctx.wallet.balance()`
|
|
780
|
+
* reads and the contract must report the standard through ERC-165 `supportsInterface`; a Solana
|
|
781
|
+
* address must be a Core collection, a Metaplex collection NFT or a Token-2022 token group's mint on its cluster. Typed as the query's collection, so it passes to
|
|
665
782
|
* `ctx.wallet.nfts({ collection })` as it is.
|
|
666
783
|
*/
|
|
667
784
|
nft(options) {
|
|
@@ -739,9 +856,10 @@ var settings = {
|
|
|
739
856
|
);
|
|
740
857
|
},
|
|
741
858
|
/**
|
|
742
|
-
* A Solana program `ctx.wallet.transactions()` reads: its base58
|
|
743
|
-
* `"JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"`. Relay checks it when
|
|
744
|
-
* edited: the account must be an executable program on Solana mainnet or
|
|
859
|
+
* A Solana program `ctx.wallet.transactions()` or `ctx.wallet.programAccount()` reads: its base58
|
|
860
|
+
* address, such as Jupiter's `"JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"`. Relay checks it when
|
|
861
|
+
* it is published or edited: the account must be an executable program on Solana mainnet or
|
|
862
|
+
* devnet. Its IDL (Anchor, Codama or Shank), stored then, decodes the program's instructions and accounts.
|
|
745
863
|
*/
|
|
746
864
|
solanaProgram(options) {
|
|
747
865
|
if (!isSolanaProgram(options.default)) {
|
|
@@ -955,6 +1073,15 @@ var keyed = (key, options = {}) => ({
|
|
|
955
1073
|
key,
|
|
956
1074
|
...options.across ? { across: options.across } : {}
|
|
957
1075
|
});
|
|
1076
|
+
var perStation = () => keyed((ctx) => {
|
|
1077
|
+
const station = ctx.action?.reference;
|
|
1078
|
+
if (!station) {
|
|
1079
|
+
throw new Error(
|
|
1080
|
+
"perStation() completes from a signed transaction whose memo names a station"
|
|
1081
|
+
);
|
|
1082
|
+
}
|
|
1083
|
+
return station;
|
|
1084
|
+
});
|
|
958
1085
|
var progress = (definition) => {
|
|
959
1086
|
const { distinct, ...policy } = definition;
|
|
960
1087
|
return {
|
|
@@ -1045,10 +1172,16 @@ var evaluators = {
|
|
|
1045
1172
|
};
|
|
1046
1173
|
}
|
|
1047
1174
|
};
|
|
1048
|
-
var completionPolicies = { once, keyed, streak, progress };
|
|
1175
|
+
var completionPolicies = { once, keyed, streak, progress, perStation };
|
|
1049
1176
|
function questBuilder(template) {
|
|
1050
1177
|
return function defineQuest2(definition) {
|
|
1051
1178
|
const key = authoringKey(definition);
|
|
1179
|
+
const name = `${template ? "Quest type" : "Quest"} "${key}"`;
|
|
1180
|
+
if (definition.rewards === void 0) {
|
|
1181
|
+
throw new Error(
|
|
1182
|
+
`${name}: rewards is missing. Return [] for a quest that gives none.`
|
|
1183
|
+
);
|
|
1184
|
+
}
|
|
1052
1185
|
const integrationModules = [
|
|
1053
1186
|
...new Set(
|
|
1054
1187
|
(definition.integrations ?? []).map(
|
|
@@ -1075,6 +1208,7 @@ function questBuilder(template) {
|
|
|
1075
1208
|
);
|
|
1076
1209
|
}
|
|
1077
1210
|
const author = authorBudgets(definition.budgets);
|
|
1211
|
+
const stations = definition.stations ? questStationsSchema.parse(definition.stations) : void 0;
|
|
1078
1212
|
validateQuestShape(
|
|
1079
1213
|
{
|
|
1080
1214
|
trigger: definition.trigger,
|
|
@@ -1086,7 +1220,8 @@ function questBuilder(template) {
|
|
|
1086
1220
|
maxAgeMs: definition.performance.maxAgeMs
|
|
1087
1221
|
}) : void 0,
|
|
1088
1222
|
...definition.retryCooldownMs === void 0 ? {} : { retryCooldownMs: definition.retryCooldownMs },
|
|
1089
|
-
...definition.completionCooldownMs === void 0 ? {} : { completionCooldownMs: definition.completionCooldownMs }
|
|
1223
|
+
...definition.completionCooldownMs === void 0 ? {} : { completionCooldownMs: definition.completionCooldownMs },
|
|
1224
|
+
...stations ? { stations } : {}
|
|
1090
1225
|
},
|
|
1091
1226
|
{ template }
|
|
1092
1227
|
);
|
|
@@ -1140,13 +1275,30 @@ function questBuilder(template) {
|
|
|
1140
1275
|
}
|
|
1141
1276
|
}
|
|
1142
1277
|
function describe(input) {
|
|
1143
|
-
|
|
1278
|
+
try {
|
|
1279
|
+
return describeWith(input);
|
|
1280
|
+
} catch (error) {
|
|
1281
|
+
throw namedSchemaFailure(name, error);
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
function describeWith(input) {
|
|
1285
|
+
const { performance } = definition;
|
|
1286
|
+
const settings2 = parseField(
|
|
1287
|
+
"settings",
|
|
1288
|
+
() => definition.settings.parse(input)
|
|
1289
|
+
);
|
|
1144
1290
|
const values = parseSettings(fields, settings2);
|
|
1145
|
-
const rewards =
|
|
1146
|
-
|
|
1291
|
+
const rewards = parseField(
|
|
1292
|
+
"rewards",
|
|
1293
|
+
() => rewardBundleSchema.parse(
|
|
1294
|
+
typeof definition.rewards === "function" ? definition.rewards({ settings: settings2 }) : definition.rewards
|
|
1295
|
+
)
|
|
1147
1296
|
);
|
|
1148
|
-
const announcements =
|
|
1149
|
-
|
|
1297
|
+
const announcements = parseField(
|
|
1298
|
+
"announcements",
|
|
1299
|
+
() => z3.array(announcementSchema).max(3, "A quest posts at most three announcements").parse(
|
|
1300
|
+
(typeof definition.announcements === "function" ? definition.announcements({ settings: settings2 }) : definition.announcements) ?? []
|
|
1301
|
+
)
|
|
1150
1302
|
);
|
|
1151
1303
|
const trackerTrigger3 = definition.trigger.kind === "automatic" && definition.trigger.tracker !== void 0;
|
|
1152
1304
|
for (const announcement of announcements) {
|
|
@@ -1192,11 +1344,14 @@ function questBuilder(template) {
|
|
|
1192
1344
|
...announcements.length ? { announcements } : {},
|
|
1193
1345
|
humanReview: definition.review?.({ settings: settings2 })?.enabled ?? true,
|
|
1194
1346
|
trigger: definition.trigger,
|
|
1195
|
-
...
|
|
1196
|
-
performance:
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1347
|
+
...performance ? {
|
|
1348
|
+
performance: parseField(
|
|
1349
|
+
"performance",
|
|
1350
|
+
() => contentPerformancePolicySchema.parse({
|
|
1351
|
+
metrics: performance.metrics,
|
|
1352
|
+
maxAgeMs: performance.maxAgeMs
|
|
1353
|
+
})
|
|
1354
|
+
)
|
|
1200
1355
|
} : {},
|
|
1201
1356
|
integrations,
|
|
1202
1357
|
// Written only when it holds a module `integrations` lacks, so a quest declaring known
|
|
@@ -1220,7 +1375,8 @@ function questBuilder(template) {
|
|
|
1220
1375
|
...definition.campaign ? { campaign: definition.campaign } : {},
|
|
1221
1376
|
...definition.availability ? { availability: definition.availability } : {},
|
|
1222
1377
|
...definition.retryCooldownMs === void 0 ? {} : { retryCooldownMs: definition.retryCooldownMs },
|
|
1223
|
-
...definition.completionCooldownMs === void 0 ? {} : { completionCooldownMs: definition.completionCooldownMs }
|
|
1378
|
+
...definition.completionCooldownMs === void 0 ? {} : { completionCooldownMs: definition.completionCooldownMs },
|
|
1379
|
+
...stations ? { stations } : {}
|
|
1224
1380
|
});
|
|
1225
1381
|
}
|
|
1226
1382
|
return resourceHandle("quest", {
|
|
@@ -1281,6 +1437,7 @@ function questBuilder(template) {
|
|
|
1281
1437
|
member: ctx.member,
|
|
1282
1438
|
input: ctx.input,
|
|
1283
1439
|
tracker,
|
|
1440
|
+
action: ctx.action ?? null,
|
|
1284
1441
|
eligibleAt: ctx.eligibleAt,
|
|
1285
1442
|
calendar: ctx.calendar,
|
|
1286
1443
|
now: ctx.now,
|
|
@@ -1311,7 +1468,12 @@ function questBuilder(template) {
|
|
|
1311
1468
|
message: ignoredCompletionKey(completion, result.completionKey)
|
|
1312
1469
|
});
|
|
1313
1470
|
}
|
|
1314
|
-
const keyContext = {
|
|
1471
|
+
const keyContext = {
|
|
1472
|
+
...ctx,
|
|
1473
|
+
settings: settings2,
|
|
1474
|
+
tracker: pinned,
|
|
1475
|
+
action: ctx.action ?? null
|
|
1476
|
+
};
|
|
1315
1477
|
return decisionSchema.parse(
|
|
1316
1478
|
result.kind === "accept" || result.kind === "review" ? {
|
|
1317
1479
|
...result,
|
|
@@ -1397,6 +1559,7 @@ export {
|
|
|
1397
1559
|
parseContractFunction,
|
|
1398
1560
|
parseNftCollection,
|
|
1399
1561
|
parseUnits,
|
|
1562
|
+
perStation,
|
|
1400
1563
|
pointLedgers,
|
|
1401
1564
|
points,
|
|
1402
1565
|
progress,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import { b as AttemptStatus,
|
|
3
|
-
import { S as SkipEnrollment } from './tracker-data-
|
|
2
|
+
import { b as AttemptStatus, Y as RewardType } from './accounts-DD4gAOCe.js';
|
|
3
|
+
import { S as SkipEnrollment } from './tracker-data-DQgX3FIc.js';
|
|
4
4
|
|
|
5
5
|
declare const collectionCodeSchema: z.ZodString;
|
|
6
6
|
declare const collectionPassSchema: z.ZodObject<{
|
|
@@ -39,6 +39,7 @@ declare const collectionPreviewSchema: z.ZodObject<{
|
|
|
39
39
|
fulfillment: z.ZodObject<{
|
|
40
40
|
kind: z.ZodString;
|
|
41
41
|
}, z.core.$loose>;
|
|
42
|
+
key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
42
43
|
}, z.core.$loose>;
|
|
43
44
|
earnedTier: z.ZodString;
|
|
44
45
|
tier: z.ZodString;
|
|
@@ -66,6 +67,7 @@ declare const collectionPreviewSchema: z.ZodObject<{
|
|
|
66
67
|
fulfillment: z.ZodObject<{
|
|
67
68
|
kind: z.ZodString;
|
|
68
69
|
}, z.core.$loose>;
|
|
70
|
+
key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
71
|
}, z.core.$loose>;
|
|
70
72
|
earnedTier: z.ZodString;
|
|
71
73
|
tier: z.ZodString;
|
|
@@ -100,6 +102,7 @@ declare const collectionPreviewSchema: z.ZodObject<{
|
|
|
100
102
|
fulfillment: z.ZodObject<{
|
|
101
103
|
kind: z.ZodString;
|
|
102
104
|
}, z.core.$loose>;
|
|
105
|
+
key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
103
106
|
}, z.core.$loose>;
|
|
104
107
|
earnedTier: z.ZodString;
|
|
105
108
|
tier: z.ZodString;
|
|
@@ -122,6 +125,7 @@ declare const collectionPreviewSchema: z.ZodObject<{
|
|
|
122
125
|
fulfillment: z.ZodObject<{
|
|
123
126
|
kind: z.ZodString;
|
|
124
127
|
}, z.core.$loose>;
|
|
128
|
+
key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
125
129
|
}, z.core.$loose>;
|
|
126
130
|
earnedTier: z.ZodString;
|
|
127
131
|
tier: z.ZodString;
|
|
@@ -143,6 +147,7 @@ declare const collectionPreviewSchema: z.ZodObject<{
|
|
|
143
147
|
fulfillment: z.ZodObject<{
|
|
144
148
|
kind: z.ZodString;
|
|
145
149
|
}, z.core.$loose>;
|
|
150
|
+
key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
146
151
|
}, z.core.$loose>;
|
|
147
152
|
earnedTier: z.ZodString;
|
|
148
153
|
tier: z.ZodString;
|
|
@@ -169,6 +174,7 @@ declare const collectionPreviewSchema: z.ZodObject<{
|
|
|
169
174
|
[x: string]: unknown;
|
|
170
175
|
kind: string;
|
|
171
176
|
};
|
|
177
|
+
key?: string | null | undefined;
|
|
172
178
|
};
|
|
173
179
|
earnedTier: string;
|
|
174
180
|
tier: string;
|
|
@@ -195,6 +201,7 @@ declare const collectionPreviewSchema: z.ZodObject<{
|
|
|
195
201
|
[x: string]: unknown;
|
|
196
202
|
kind: string;
|
|
197
203
|
};
|
|
204
|
+
key?: string | null | undefined;
|
|
198
205
|
};
|
|
199
206
|
earnedTier: string;
|
|
200
207
|
tier: string;
|
|
@@ -985,4 +992,5 @@ declare const automaticSchedulingRetrySchema: z.ZodObject<{
|
|
|
985
992
|
reason: z.ZodString;
|
|
986
993
|
}, z.core.$strict>;
|
|
987
994
|
|
|
988
|
-
export {
|
|
995
|
+
export { counterHistorySchema as B, counterModerationResultSchema as D, counterModerationSchema as E, counterPolicySchema as F, counterProgressSchema as G, counterWindowSchema as H, isRetryableAutomaticOutcome as I, automaticCatchUpConfirmSchema as f, automaticCatchUpInputSchema as g, automaticCatchUpPreviewSchema as h, automaticCatchUpResultSchema as i, automaticEventSchema as j, automaticOutcomePageSchema as k, automaticOutcomeQuerySchema as l, automaticOutcomeSchema as m, automaticSchedulingPageSchema as n, automaticSchedulingQuerySchema as o, automaticSchedulingRetrySchema as p, automaticSchedulingSchema as q, collectionBeginSchema as r, collectionCodeSchema as s, collectionPassSchema as t, collectionPreviewSchema as u, collectionResolveSchema as v, counterAchievementSchema as w, counterContributionSchema as x, counterGoalSchema as y, counterHistoryQuerySchema as z };
|
|
996
|
+
export type { AutomaticCatchUpPreview as A, CollectionPass as C, AutomaticEvent as a, AutomaticOutcome as b, CounterAchievement as c, CounterPolicy as d, CounterProgress as e };
|
package/dist/avatar.d.ts
CHANGED
package/dist/browser.d.ts
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { C as CosmosChains, D as DiscoveredWallet, E as Eip1193Provider,
|
|
3
|
-
export {
|
|
4
|
-
|
|
5
|
-
import './
|
|
1
|
+
import { SubmissionStore, RelayClientOptions, RelayClient } from './index.js';
|
|
2
|
+
export { C as CosmosChains, D as DiscoveredWallet, E as Eip1193Provider, K as KeplrLike, S as SignInWallet, a as SolanaInjectedProvider, b as StandardWallet, c as StandardWalletAccount, d as cosmosChainList, e as cosmosSigner, f as discoverCosmosWallets, g as discoverEvmWallets, h as discoverSignInWallets, i as discoverSolanaWallets, j as evmSigner, s as solanaSigner, w as walletStandardSolanaSigner } from './wallet-browser-BzPt_Qb5.js';
|
|
3
|
+
export { E as EmailSignInOption, O as OAuthSignInOption, P as ProviderSignInOption, S as SignInClient, a as SignInIcon, b as SignInMethods, c as SignInOption, d as SignInOptions, e as SignInUnavailable, T as TelegramSignInOption, W as WalletSignInOption, s as signInOptions, t as telegramMiniAppInitData } from './telegram-browser-gRMgGs7B.js';
|
|
4
|
+
export { H as HostEnvironment, g as getHostEnvironment } from './host-environment-DUw5-Cvj.js';
|
|
5
|
+
import { MemberSummary } from './index.js';
|
|
6
|
+
import './accounts-DD4gAOCe.js';
|
|
6
7
|
import 'zod';
|
|
7
|
-
import './tracker-data-
|
|
8
|
-
import './wallet-
|
|
9
|
-
import './submission-input-
|
|
10
|
-
import './request-error-
|
|
11
|
-
import './reward-deliveries-
|
|
12
|
-
import './catalog-
|
|
13
|
-
import './action-
|
|
14
|
-
import './sign-in-providers-
|
|
8
|
+
import './tracker-data-DQgX3FIc.js';
|
|
9
|
+
import './wallet-CPAjrW4k.js';
|
|
10
|
+
import './submission-input-BD7nORuh.js';
|
|
11
|
+
import './request-error-C24SY7n9.js';
|
|
12
|
+
import './reward-deliveries-DFhYGJdx.js';
|
|
13
|
+
import './catalog-Cf3fHDNn.js';
|
|
14
|
+
import './action-BDFKqGlH.js';
|
|
15
|
+
import './sign-in-providers-C97mRNbG.js';
|
|
16
|
+
import './profiles-CLDKZVFx.js';
|
|
15
17
|
|
|
16
18
|
/**
|
|
17
19
|
* The member's time at the real instant `at` (default now), in epoch milliseconds: what an app
|
package/dist/browser.js
CHANGED
|
@@ -12,24 +12,23 @@ import {
|
|
|
12
12
|
signInOptions,
|
|
13
13
|
solanaSigner,
|
|
14
14
|
walletStandardSolanaSigner
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-TCREFRPK.js";
|
|
16
16
|
import {
|
|
17
17
|
telegramMiniAppInitData
|
|
18
18
|
} from "./chunk-FWLQ5XCS.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-LGGD7S5T.js";
|
|
20
|
+
import "./chunk-5RLIPTL7.js";
|
|
21
|
+
import "./chunk-LDO5GP7G.js";
|
|
22
22
|
import {
|
|
23
23
|
getHostEnvironment
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-FGXLXENM.js";
|
|
24
|
+
} from "./chunk-VAGGGB6B.js";
|
|
25
|
+
import "./chunk-WVK3G2J2.js";
|
|
26
|
+
import "./chunk-SWLW4VN3.js";
|
|
27
|
+
import "./chunk-ME2KUAVJ.js";
|
|
28
|
+
import "./chunk-PO2ZDY27.js";
|
|
29
|
+
import "./chunk-2A3BJ262.js";
|
|
30
|
+
import "./chunk-CQVKOD3B.js";
|
|
31
|
+
import "./chunk-VNEJH4NT.js";
|
|
33
32
|
export {
|
|
34
33
|
browserSubmissionStore,
|
|
35
34
|
cosmosChainList,
|
|
@@ -293,4 +293,5 @@ declare class CapabilityError extends Error {
|
|
|
293
293
|
static from(failure: CapabilityFailure): CapabilityError;
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
export {
|
|
296
|
+
export { CapabilityError as C, capabilityErrorCodes as e, announcementSchema as h, announcementTextSchema as i, authorBudgetSchema as j, budgetSchema as k, capabilityFailureSchema as l, completionKeySchema as m, completionPolicySchema as n, discordAnnouncementSchema as o, maxMemberCompletions as p, memberCompletionSchema as q, resourceOptionsSchema as r, resourceRequestSchema as s, resourceSourceSchema as t, telegramAnnouncementSchema as u, tiktokVideoBodySchema as v, tiktokVideoMetrics as w, youtubeShortMetrics as x, youtubeShortBodySchema as y };
|
|
297
|
+
export type { AuthorBudget as A, Budget as B, KnownCapabilityErrorCode as K, MemberCompletion as M, ResourceSource as R, TikTokVideoBody as T, YouTubeShortBody as Y, Announcement as a, CapabilityErrorCode as b, TikTokVideoMetric as c, YouTubeShortMetric as d, CapabilityFailure as f, ResourceOption as g };
|