@domino-sdk/relay 1.72.0 → 1.74.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.
Files changed (72) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/{accounts-COLmXRbW.d.ts → accounts-C9as33l1.d.ts} +2 -2
  3. package/dist/{attempt-captures-CVl161qB.d.ts → attempt-captures-DU4vi20Y.d.ts} +2 -2
  4. package/dist/authoring.d.ts +103 -106
  5. package/dist/authoring.js +187 -286
  6. package/dist/{automatic-outcomes-5l68PGr1.d.ts → automatic-outcomes-D0yMHSHL.d.ts} +2 -2
  7. package/dist/browser.d.ts +9 -9
  8. package/dist/browser.js +11 -11
  9. package/dist/{dashboards-DXpjHnq-.d.ts → capability-error-Bn6cCqof.d.ts} +298 -5
  10. package/dist/{catalog-BR3g-1H9.d.ts → catalog-9I6t18qP.d.ts} +2 -2
  11. package/dist/{chunk-W6DBNBMT.js → chunk-2LURSPDM.js} +232 -232
  12. package/dist/{chunk-VNEJH4NT.js → chunk-2M5FM7FW.js} +21 -0
  13. package/dist/{chunk-74SMLZZ5.js → chunk-6TDHRGBM.js} +1522 -1278
  14. package/dist/{chunk-QG6XVOOO.js → chunk-724CKAC7.js} +4 -4
  15. package/dist/{chunk-I7XIBXT2.js → chunk-7I7P5UVC.js} +3 -3
  16. package/dist/{chunk-LDO5GP7G.js → chunk-AL5XMXPO.js} +1 -1
  17. package/dist/{chunk-TW4RABVS.js → chunk-CW7FJ5PX.js} +1 -1
  18. package/dist/{chunk-BXUF3CRL.js → chunk-DNOLNMCW.js} +9 -9
  19. package/dist/{chunk-5RLIPTL7.js → chunk-E73HZCG2.js} +1 -1
  20. package/dist/{chunk-UEVZ3TST.js → chunk-ELHMJODS.js} +1 -1
  21. package/dist/{chunk-ASBDB436.js → chunk-F66GGNKD.js} +1 -1
  22. package/dist/{chunk-ETGKC2SB.js → chunk-HCOLMJFX.js} +2 -2
  23. package/dist/chunk-JZT2NLSG.js +7201 -0
  24. package/dist/{chunk-FGZGL5PG.js → chunk-KGZ7SRKJ.js} +2 -2
  25. package/dist/{chunk-3KKRXN5E.js → chunk-KP55TMCC.js} +1 -1
  26. package/dist/chunk-NI6XRGEL.js +374 -0
  27. package/dist/{chunk-VFHLMNYV.js → chunk-RALBAKKX.js} +1 -1
  28. package/dist/chunk-SVZ3QWHT.js +142 -0
  29. package/dist/{chunk-CVJTIVAP.js → chunk-T4PTFCSB.js} +2 -2
  30. package/dist/{chunk-KIRXE37T.js → chunk-TGQNNMCY.js} +6 -6
  31. package/dist/{client-B__hMWtK.d.ts → client-B2aVGf38.d.ts} +7 -7
  32. package/dist/{deployments-CT2kQloT.d.ts → deployments-CGV1rIZm.d.ts} +107 -107
  33. package/dist/{identity-integration-ClX4oUAu.d.ts → identity-integration-C03rUYc0.d.ts} +3 -3
  34. package/dist/index.d.ts +10 -10
  35. package/dist/index.js +10 -10
  36. package/dist/internal.d.ts +36197 -18
  37. package/dist/internal.js +518 -15
  38. package/dist/{limits-B7wbnWhd.d.ts → limits-p-Mg0oSi.d.ts} +1 -1
  39. package/dist/{offers-D4pyeY9b.d.ts → offers-CnMyMeQo.d.ts} +2 -2
  40. package/dist/portal-proxy.d.ts +2 -2
  41. package/dist/portal-proxy.js +10 -10
  42. package/dist/react/index.d.ts +11 -11
  43. package/dist/react/index.js +11 -11
  44. package/dist/{reward-deliveries-HGpj1VFz.d.ts → reward-deliveries-zWfsgc6m.d.ts} +1 -1
  45. package/dist/runtime/authoring.js +1 -1
  46. package/dist/runtime/chunks/NYEWMPJH.js +1 -0
  47. package/dist/runtime/manifest.json +3 -3
  48. package/dist/runtime/schema.js +1 -1
  49. package/dist/schema.d.ts +35 -60
  50. package/dist/schema.js +10 -8
  51. package/dist/server/index.d.ts +13 -13
  52. package/dist/server/index.js +2972 -4528
  53. package/dist/{sign-in-providers-lbOXCF8N.d.ts → sign-in-providers-BG22ZZkl.d.ts} +2 -2
  54. package/dist/solana.d.ts +13 -13
  55. package/dist/solana.js +9 -9
  56. package/dist/stake-BSVjB3BJ.d.ts +254 -0
  57. package/dist/{station-check-in-qBiaftfE.d.ts → station-check-in-a1deSjbm.d.ts} +5 -5
  58. package/dist/{submission-input-U4aIkJuT.d.ts → submission-input-DBDLkTF8.d.ts} +2 -2
  59. package/dist/telegram.d.ts +7 -7
  60. package/dist/telegram.js +2 -2
  61. package/dist/testing.d.ts +159 -160
  62. package/dist/testing.js +47 -344
  63. package/dist/{tracker-data-2BYXZjsN.d.ts → tracker-data-Dwq9dWEm.d.ts} +474 -221
  64. package/dist/{transport-DcRXDZ1j.d.ts → transport-D77Rbf4D.d.ts} +77050 -74062
  65. package/dist/{wallet-BqswMAqZ.d.ts → wallet-CeqgtXNm.d.ts} +2 -7
  66. package/dist/{wallet-browser-B5r7u3xB.d.ts → wallet-browser-Cucpqn3F.d.ts} +1 -1
  67. package/package.json +1 -1
  68. package/dist/capability-error-db7kO8-P.d.ts +0 -297
  69. package/dist/chunk-2UELTHW6.js +0 -467
  70. package/dist/chunk-GHBYWDEZ.js +0 -94
  71. package/dist/chunk-HN7DE2UN.js +0 -53
  72. package/dist/runtime/chunks/A7G5P76B.js +0 -1
@@ -288,7 +288,6 @@ declare const walletBalanceSchema: z.ZodObject<{
288
288
  observedAt: z.ZodNumber;
289
289
  }, z.core.$strict>;
290
290
  type WalletBalance = z.infer<typeof walletBalanceSchema>;
291
-
292
291
  /**
293
292
  * One wallet's balance as Relay sampled it for a `wallet.balances()` tracker, the record's `data`.
294
293
  * The record's ID and author are the wallet's CAIP-10 account on the sampled chain, and its
@@ -304,7 +303,6 @@ declare const walletBalanceSampleSchema: z.ZodObject<{
304
303
  type WalletBalanceSample = z.infer<typeof walletBalanceSampleSchema>;
305
304
  /** What `wallet.balances()` samples: a `ctx.wallet.balance()` query without an address. */
306
305
  type WalletBalanceSourceQuery = WalletBalanceQuery extends infer Query ? Query extends unknown ? Omit<Query, "address"> : never : never;
307
-
308
306
  /**
309
307
  * One finalized, successful Solana transaction of a member's linked wallet that called the
310
308
  * tracker's program, as Relay recorded it for a `wallet.programActivity()` tracker: the record's
@@ -426,7 +424,6 @@ declare const walletNftsSchema: z.ZodObject<{
426
424
  observedAt: z.ZodNumber;
427
425
  }, z.core.$strict>;
428
426
  type WalletNfts = z.infer<typeof walletNftsSchema>;
429
-
430
427
  /**
431
428
  * One wallet's holding as Relay sampled it for a `wallet.nfts()` tracker, the record's `data`. The
432
429
  * record's ID and author are the wallet's CAIP-10 account on the collection's chain, and its
@@ -904,7 +901,6 @@ declare const walletStakeSchema: z.ZodObject<{
904
901
  }, z.core.$strip>;
905
902
  /** What `ctx.wallet.stake()` returns: the SOL the member's linked wallets delegate. */
906
903
  type WalletStake = z.infer<typeof walletStakeSchema>;
907
-
908
904
  /**
909
905
  * One wallet's stake as Relay sampled it for a `wallet.stake()` tracker, the record's `data`, in
910
906
  * lamports, counted as `ctx.wallet.stake({ address })` counts that wallet's. The record's ID and
@@ -923,7 +919,6 @@ declare const walletStakeSampleSchema: z.ZodObject<{
923
919
  type WalletStakeSample = z.infer<typeof walletStakeSampleSchema>;
924
920
  /** What `wallet.stake()` samples: a `ctx.wallet.stake()` query without an address. */
925
921
  type WalletStakeSourceQuery = Omit<WalletStakeQuery, "address">;
926
-
927
922
  /**
928
923
  * One wallet's program account as Relay sampled it for a `wallet.programAccounts()` tracker, the
929
924
  * record's `data`: the tracker's integer field, read as `ctx.wallet.programAccount({ address })`
@@ -1062,5 +1057,5 @@ interface WalletReader {
1062
1057
  stake?(query: WalletStakeQuery): Promise<WalletStake | null>;
1063
1058
  }
1064
1059
 
1065
- export { walletEventsSchema as a$, WALLETS_PER_CHAIN as aF, anchorIdlSchema as aG, caip10 as aH, cosmosAddressSchema as aI, cosmosChain as aJ, evmAddressSchema as aK, evmChainIdSchema as aL, isSolanaNetwork as aM, linkedWalletSchema as aN, maxSolanaSeeds as aO, solanaAddressSchema as aP, solanaMemoProgram as aQ, solanaProgramIdlSchema as aR, solanaSeedSchema as aS, solanaSignatureSchema as aT, solanaTransactionFixtureInputSchema as aU, walletAddressInput as aV, walletBalanceSampleSchema as aW, walletBalanceSchema as aX, walletCallSchema as aY, walletChainSchema as aZ, walletDelegationsSchema as a_, cosmosDenomSchema as ab, cosmosNetworkSchema as ac, isContractCall as ad, isContractEvent as ae, isEvmAddress as af, isEvmChainId as ag, isNftCollection as ah, isSolanaProgram as ai, maxWalletEventLogs as aj, maxWalletEventLookback as ak, maxWalletTransactionLookback as al, maxWalletTransactions as am, parseContractCall as an, parseContractEvent as ao, parseContractFunction as ap, parseNftCollection as aq, walletAddressInputSchema as ar, walletSignatureSchema as as, walletTransactionProofSchema as at, walletMessageChallengeSchema as b0, walletNftsSchema as b1, walletProgramAccountSchema as b2, walletProgramActivitySchema as b3, walletSignInFamilies as b4, walletSignInNetwork as b5, walletSignInNetworkSchema as b6, walletSignInNetworksSchema as b7, walletStakeSchema as b8, walletTransactionChallengeSchema as b9, walletTransactionsSchema as ba, walletUnlinkInputSchema as bb, evmWalletOn as bc, solanaMainnet as m, solanaDevnet as s };
1066
- export type { WalletNftSample as $, ContractCallParts as A, ContractCallReturnType as B, CosmosChain as C, ContractEventInput as D, ContractEventParts as E, ContractFunction as F, CosmosDenom as G, EvmChainId as H, NftCollectionParts as I, NftStandard as J, SolanaSeedInteger as K, LinkedWallet as L, WalletBalance as M, NftCollection as N, WalletBalanceChange as O, WalletBalanceSample as P, WalletCall as Q, WalletCallArgument as R, SolanaIdlSource as S, WalletCallQuery as T, WalletDelegations as U, WalletDelegationsQuery as V, WalletAddressInput as W, WalletEventCondition as X, WalletEventValue as Y, WalletEvents as Z, WalletEventsQuery as _, CosmosNetwork as a, WalletNfts as a0, WalletNftsQuery as a1, WalletProgramAccount as a2, WalletProgramAccountQuery as a3, WalletProgramAccountSample as a4, WalletProgramActivity as a5, WalletStake as a6, WalletStakeQuery as a7, WalletStakeSample as a8, WalletTransactions as a9, KnownSolanaIdlSource as aA, KnownStakePointKind as aB, KnownWalletProofKind as aC, SolanaProgramIdl as aD, SolanaTransactionFixtureInput as aE, WalletTransactionsQuery as aa, SolanaCollectionKind as au, ProgramAccountPointKind as av, StakePointKind as aw, AnchorIdl as ax, KnownProgramAccountPointKind as ay, KnownSolanaCollectionKind as az, WalletChain as b, WalletMessageChallenge as c, WalletProofKind as d, WalletSignInNetwork as e, WalletSignature as f, WalletSigner as g, WalletTransactionChallenge as h, WalletTransactionProof as i, WalletUnlinkInput as j, WalletBalanceQuery as k, SolanaNetwork as l, SolanaSeed as n, ContractCall as o, ContractEvent as p, SolanaProgram as q, WalletBalanceSourceQuery as r, WalletProgramActivitySourceQuery as t, WalletNftSourceQuery as u, WalletStakeSourceQuery as v, WalletProgramAccountSourceQuery as w, WalletTransaction as x, WalletInstruction as y, WalletReader as z };
1060
+ export { walletEventsSchema as a$, WALLETS_PER_CHAIN as aF, anchorIdlSchema as aG, caip10 as aH, cosmosAddressSchema as aI, cosmosChain as aJ, evmAddressSchema as aK, evmChainIdSchema as aL, isSolanaNetwork as aM, linkedWalletSchema as aN, maxSolanaSeeds as aO, solanaAddressSchema as aP, solanaMemoProgram as aQ, solanaProgramIdlSchema as aR, solanaSeedSchema as aS, solanaSignatureSchema as aT, solanaTransactionFixtureInputSchema as aU, walletAddressInput as aV, walletBalanceSampleSchema as aW, walletBalanceSchema as aX, walletCallSchema as aY, walletChainSchema as aZ, walletDelegationsSchema as a_, cosmosDenomSchema as ab, cosmosNetworkSchema as ac, isContractCall as ad, isContractEvent as ae, isEvmAddress as af, isEvmChainId as ag, isNftCollection as ah, isSolanaProgram as ai, maxWalletEventLogs as aj, maxWalletEventLookback as ak, maxWalletTransactionLookback as al, maxWalletTransactions as am, parseContractCall as an, parseContractEvent as ao, parseContractFunction as ap, parseNftCollection as aq, walletAddressInputSchema as ar, walletSignatureSchema as as, walletTransactionProofSchema as at, walletMessageChallengeSchema as b0, walletNftsSchema as b1, walletProgramAccountSchema as b2, walletProgramActivitySchema as b3, walletSignInFamilies as b4, walletSignInNetwork as b5, walletSignInNetworkSchema as b6, walletSignInNetworksSchema as b7, walletStakeSchema as b8, walletTransactionChallengeSchema as b9, walletTransactionsSchema as ba, walletUnlinkInputSchema as bb, evmWalletOn as bc, solanaMainnet as l, solanaDevnet as s };
1061
+ export type { WalletNftSample as $, ContractCallReturnType as A, ContractEventInput as B, CosmosChain as C, ContractEventParts as D, ContractFunction as E, CosmosDenom as F, EvmChainId as G, NftCollectionParts as H, NftStandard as I, SolanaSeedInteger as J, WalletBalance as K, LinkedWallet as L, WalletBalanceChange as M, NftCollection as N, WalletBalanceQuery as O, WalletBalanceSample as P, WalletCall as Q, WalletCallArgument as R, SolanaIdlSource as S, WalletCallQuery as T, WalletDelegations as U, WalletDelegationsQuery as V, WalletAddressInput as W, WalletEventCondition as X, WalletEventValue as Y, WalletEvents as Z, WalletEventsQuery as _, CosmosNetwork as a, WalletNfts as a0, WalletNftsQuery as a1, WalletProgramAccount as a2, WalletProgramAccountQuery as a3, WalletProgramAccountSample as a4, WalletProgramActivity as a5, WalletStake as a6, WalletStakeQuery as a7, WalletStakeSample as a8, WalletTransactions as a9, KnownSolanaIdlSource as aA, KnownStakePointKind as aB, KnownWalletProofKind as aC, SolanaProgramIdl as aD, SolanaTransactionFixtureInput as aE, WalletTransactionsQuery as aa, SolanaCollectionKind as au, ProgramAccountPointKind as av, StakePointKind as aw, AnchorIdl as ax, KnownProgramAccountPointKind as ay, KnownSolanaCollectionKind as az, WalletChain as b, WalletMessageChallenge as c, WalletProofKind as d, WalletSignInNetwork as e, WalletSignature as f, WalletSigner as g, WalletTransactionChallenge as h, WalletTransactionProof as i, WalletUnlinkInput as j, SolanaNetwork as k, SolanaSeed as m, ContractCall as n, ContractEvent as o, SolanaProgram as p, WalletBalanceSourceQuery as q, WalletProgramActivitySourceQuery as r, WalletNftSourceQuery as t, WalletStakeSourceQuery as u, WalletProgramAccountSourceQuery as v, WalletTransaction as w, WalletInstruction as x, WalletReader as y, ContractCallParts as z };
@@ -1,4 +1,4 @@
1
- import { C as CosmosChain, a as CosmosNetwork, g as WalletSigner, e as WalletSignInNetwork } from './wallet-BqswMAqZ.js';
1
+ import { C as CosmosChain, a as CosmosNetwork, g as WalletSigner, e as WalletSignInNetwork } from './wallet-CeqgtXNm.js';
2
2
 
3
3
  /** An EIP-1193 provider, such as `window.ethereum` or an EIP-6963 announcement's provider. */
4
4
  type Eip1193Provider = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domino-sdk/relay",
3
- "version": "1.72.0",
3
+ "version": "1.74.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,297 +0,0 @@
1
- import * as z from 'zod';
2
-
3
- declare const completionPolicySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4
- kind: z.ZodLiteral<"streak">;
5
- days: z.ZodNumber;
6
- }, z.core.$strip>, z.ZodObject<{
7
- kind: z.ZodLiteral<"progress">;
8
- goal: z.ZodObject<{
9
- kind: z.ZodLiteral<"count">;
10
- count: z.ZodNumber;
11
- }, z.core.$strict>;
12
- window: z.ZodDiscriminatedUnion<[z.ZodObject<{
13
- kind: z.ZodLiteral<"lifetime">;
14
- }, z.core.$strict>, z.ZodObject<{
15
- kind: z.ZodLiteral<"calendar">;
16
- period: z.ZodEnum<{
17
- day: "day";
18
- week: "week";
19
- month: "month";
20
- }>;
21
- latenessMs: z.ZodDefault<z.ZodNumber>;
22
- }, z.core.$strict>, z.ZodObject<{
23
- kind: z.ZodLiteral<"rolling">;
24
- durationMs: z.ZodNumber;
25
- }, z.core.$strict>], "kind">;
26
- repeat: z.ZodDefault<z.ZodEnum<{
27
- repeat: "repeat";
28
- once: "once";
29
- }>>;
30
- }, z.core.$strict>, z.ZodObject<{
31
- kind: z.ZodLiteral<"once">;
32
- }, z.core.$strict>, z.ZodObject<{
33
- kind: z.ZodLiteral<"keyed">;
34
- across: z.ZodOptional<z.ZodLiteral<"members">>;
35
- }, z.core.$strict>], "kind">;
36
- declare const completionKeySchema: z.ZodString;
37
- declare const budgetSchema: z.ZodObject<{
38
- id: z.ZodString;
39
- scope: z.ZodEnum<{
40
- member: "member";
41
- project: "project";
42
- }>;
43
- period: z.ZodEnum<{
44
- lifetime: "lifetime";
45
- day: "day";
46
- week: "week";
47
- month: "month";
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
- /**
56
- * A budget counted per tracker record author: the account that caused the record, such as a
57
- * reaction's reactor, whether or not it belongs to a member. It caps what one person gives when a
58
- * quest pays someone else. Only quests with a tracker trigger take one, in their `authorBudgets`.
59
- */
60
- declare const authorBudgetSchema: z.ZodObject<{
61
- id: z.ZodString;
62
- period: z.ZodEnum<{
63
- lifetime: "lifetime";
64
- day: "day";
65
- week: "week";
66
- month: "month";
67
- }>;
68
- limit: z.ZodNumber;
69
- cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
70
- balance: z.ZodString;
71
- }, z.core.$strict>]>;
72
- scope: z.ZodLiteral<"author">;
73
- }, z.core.$strict>;
74
- type AuthorBudget = z.infer<typeof authorBudgetSchema>;
75
- /**
76
- * One of the member's accepted, unrevoked quest completions, as `ctx.member.completions()` reads
77
- * it. `quest` is the quest's key and `key` the completion key. `completedAt` is when it was
78
- * recorded, in epoch milliseconds on the member's clock (a test member's advanced one); null for
79
- * older completions recorded without a time.
80
- */
81
- declare const memberCompletionSchema: z.ZodObject<{
82
- quest: z.ZodString;
83
- key: z.ZodString;
84
- completedAt: z.ZodNullable<z.ZodNumber>;
85
- }, z.core.$strip>;
86
- type MemberCompletion = z.infer<typeof memberCompletionSchema>;
87
- /**
88
- * The most completions one `ctx.member.completions()` call returns, and its default `limit`.
89
- *
90
- * @deprecated Use `limits.memberCompletions`, which a 1.x release can raise.
91
- */
92
- declare const maxMemberCompletions = 100;
93
-
94
- declare const resourceSourceSchema: z.ZodUnion<readonly [z.ZodObject<{
95
- provider: z.ZodLiteral<"domino">;
96
- resource: z.ZodLiteral<"point-ledger">;
97
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
98
- provider: z.ZodLiteral<"discord">;
99
- resource: z.ZodLiteral<"channel">;
100
- types: z.ZodArray<z.ZodEnum<{
101
- text: "text";
102
- announcement: "announcement";
103
- }>>;
104
- postable: z.ZodOptional<z.ZodLiteral<true>>;
105
- }, z.core.$strict>, z.ZodObject<{
106
- provider: z.ZodLiteral<"discord">;
107
- resource: z.ZodLiteral<"role">;
108
- assignable: z.ZodDefault<z.ZodBoolean>;
109
- }, z.core.$strict>]>]>;
110
- type ResourceSource = z.infer<typeof resourceSourceSchema>;
111
- declare const resourceRequestSchema: z.ZodObject<{
112
- source: z.ZodUnion<readonly [z.ZodObject<{
113
- provider: z.ZodLiteral<"domino">;
114
- resource: z.ZodLiteral<"point-ledger">;
115
- }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
116
- provider: z.ZodLiteral<"discord">;
117
- resource: z.ZodLiteral<"channel">;
118
- types: z.ZodArray<z.ZodEnum<{
119
- text: "text";
120
- announcement: "announcement";
121
- }>>;
122
- postable: z.ZodOptional<z.ZodLiteral<true>>;
123
- }, z.core.$strict>, z.ZodObject<{
124
- provider: z.ZodLiteral<"discord">;
125
- resource: z.ZodLiteral<"role">;
126
- assignable: z.ZodDefault<z.ZodBoolean>;
127
- }, z.core.$strict>]>]>;
128
- query: z.ZodOptional<z.ZodString>;
129
- cursor: z.ZodOptional<z.ZodString>;
130
- ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
131
- }, z.core.$strict>;
132
- declare const resourceOptionsSchema: z.ZodObject<{
133
- revision: z.ZodNumber;
134
- options: z.ZodArray<z.ZodObject<{
135
- id: z.ZodString;
136
- label: z.ZodString;
137
- description: z.ZodOptional<z.ZodString>;
138
- group: z.ZodOptional<z.ZodString>;
139
- disabledReason: z.ZodOptional<z.ZodString>;
140
- }, z.core.$strip>>;
141
- nextCursor: z.ZodDefault<z.ZodNullable<z.ZodString>>;
142
- cursor: z.ZodNullable<z.ZodString>;
143
- }, z.core.$strip>;
144
- type ResourceOption = z.infer<typeof resourceOptionsSchema>["options"][number];
145
-
146
- /**
147
- * A YouTube Short's body, as `content()` quests read it in `ctx.tracker.content.body`. Every field
148
- * is what YouTube reported when Relay last read the video.
149
- *
150
- * @compat output
151
- */
152
- declare const youtubeShortBodySchema: z.ZodObject<{
153
- title: z.ZodString;
154
- description: z.ZodString;
155
- tags: z.ZodArray<z.ZodString>;
156
- durationSeconds: z.ZodNumber;
157
- publishedAt: z.ZodNumber;
158
- }, z.core.$strip>;
159
- type YouTubeShortBody = z.infer<typeof youtubeShortBodySchema>;
160
- /** The counters a YouTube Short's samples measure. A counter YouTube hides is unknown, never zero. */
161
- declare const youtubeShortMetrics: readonly ["views", "likes", "comments"];
162
- type YouTubeShortMetric = (typeof youtubeShortMetrics)[number];
163
-
164
- /**
165
- * A TikTok video's body, as `content()` quests read it in `ctx.tracker.content.body`. Every field
166
- * is what TikTok reported when Relay last read the video.
167
- *
168
- * @compat output
169
- */
170
- declare const tiktokVideoBodySchema: z.ZodObject<{
171
- title: z.ZodString;
172
- description: z.ZodString;
173
- durationSeconds: z.ZodNumber;
174
- width: z.ZodNumber;
175
- height: z.ZodNumber;
176
- createdAt: z.ZodNumber;
177
- shareUrl: z.ZodString;
178
- isAigc: z.ZodBoolean;
179
- }, z.core.$strip>;
180
- type TikTokVideoBody = z.infer<typeof tiktokVideoBodySchema>;
181
- /** The counters a TikTok video's samples measure. A counter TikTok omits is unknown, never zero. */
182
- declare const tiktokVideoMetrics: readonly ["views", "likes", "comments", "shares"];
183
- type TikTokVideoMetric = (typeof tiktokVideoMetrics)[number];
184
-
185
- /**
186
- * An announcement's text, at most 1000 characters, with `{placeholder}`s (`announcementPlaceholders`)
187
- * that Relay fills when it posts. `{{` and `}}` are literal braces.
188
- */
189
- declare const announcementTextSchema: z.ZodString;
190
- /** An announcement Domino's bot posts in one of the project's connected Telegram chats. */
191
- declare const telegramAnnouncementSchema: z.ZodObject<{
192
- action: z.ZodLiteral<"post-message">;
193
- text: z.ZodString;
194
- replyToTriggeringMessage: z.ZodOptional<z.ZodBoolean>;
195
- provider: z.ZodLiteral<"telegram">;
196
- chat: z.ZodString;
197
- }, z.core.$strict>;
198
- /** An announcement Domino's bot posts in a channel of the project's connected Discord server. */
199
- declare const discordAnnouncementSchema: z.ZodObject<{
200
- action: z.ZodLiteral<"post-message">;
201
- text: z.ZodString;
202
- replyToTriggeringMessage: z.ZodOptional<z.ZodBoolean>;
203
- provider: z.ZodLiteral<"discord">;
204
- channel: z.ZodString;
205
- }, z.core.$strict>;
206
- /**
207
- * A message Relay posts when a completion of the quest pays, after its rewards commit. A failed
208
- * post never undoes the rewards. Build one with `telegram.postMessage()` or
209
- * `discord.postMessage()`.
210
- */
211
- declare const announcementSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
212
- action: z.ZodLiteral<"post-message">;
213
- text: z.ZodString;
214
- replyToTriggeringMessage: z.ZodOptional<z.ZodBoolean>;
215
- provider: z.ZodLiteral<"telegram">;
216
- chat: z.ZodString;
217
- }, z.core.$strict>, z.ZodObject<{
218
- action: z.ZodLiteral<"post-message">;
219
- text: z.ZodString;
220
- replyToTriggeringMessage: z.ZodOptional<z.ZodBoolean>;
221
- provider: z.ZodLiteral<"discord">;
222
- channel: z.ZodString;
223
- }, z.core.$strict>], "provider">;
224
- type Announcement = z.infer<typeof announcementSchema>;
225
-
226
- /**
227
- * Why an evaluator capability could not answer:
228
- *
229
- * - `not-linked`: the call needs a member account that is not linked, and its result cannot be
230
- * null, such as an image check of the member's X profile picture. Readers of the member's own
231
- * accounts return `null` instead.
232
- * - `provider-unavailable`: the provider (X, Discord, a chain RPC, AI review) did not answer, or
233
- * the project's integration cannot reach it.
234
- * - `author-error`: the call cannot be answered as written: invalid input, an undeclared
235
- * integration, an unknown tracker, a chain Relay does not read, a wallet the member never
236
- * linked, or an image that does not exist.
237
- *
238
- * Later versions can add codes. Relay also sends codes this tuple does not list, as SDK 1.x keeps
239
- * it fixed:
240
- *
241
- * - `integration-required`: the project's integration needs configuration before the call can
242
- * answer.
243
- * - `capability-limit`: the evaluation run already made its eight capability calls, which all
244
- * capabilities share. Never retryable: the run makes the same calls again.
245
- *
246
- * Treat an unknown code as a failure its `message` explains.
247
- */
248
- declare const capabilityErrorCodes: readonly ["not-linked", "provider-unavailable", "author-error"];
249
- /** @compat open */
250
- type KnownCapabilityErrorCode = (typeof capabilityErrorCodes)[number];
251
- /** A known code, or one a newer Relay added. */
252
- type CapabilityErrorCode = KnownCapabilityErrorCode | (string & {});
253
- /**
254
- * A capability failure as it crosses the sandbox boundary and as Relay captures it. Open, so a
255
- * newer Relay can add codes and fields without breaking an older evaluator or Worker.
256
- */
257
- declare const capabilityFailureSchema: z.ZodObject<{
258
- code: z.ZodString;
259
- message: z.ZodString;
260
- retryable: z.ZodBoolean;
261
- }, z.core.$loose>;
262
- type CapabilityFailure = z.infer<typeof capabilityFailureSchema>;
263
- /**
264
- * Thrown by an evaluator capability (`ctx.x`, `ctx.discord`, `ctx.wallet`, `ctx.trackers`,
265
- * `ctx.images`, `ctx.review`) that could not answer. A capability whose subject is missing (an
266
- * account the member has not linked, a deleted post or message) returns `null` instead of
267
- * throwing.
268
- *
269
- * Catch it to decide yourself; rethrow anything else. An uncaught retryable error makes Relay
270
- * retry the attempt later; an uncaught one that is not retryable fails it.
271
- *
272
- * ```ts
273
- * try {
274
- * return (await ctx.x.follows({ userId })) ? decision.accept() : decision.reject({ reason })
275
- * } catch (error) {
276
- * if (error instanceof CapabilityError && error.code === "provider-unavailable")
277
- * return decision.review({ reason: "X is unavailable" })
278
- * throw error
279
- * }
280
- * ```
281
- */
282
- declare class CapabilityError extends Error {
283
- readonly code: CapabilityErrorCode;
284
- readonly retryable: boolean;
285
- constructor(code: CapabilityErrorCode, message: string, options?: {
286
- retryable?: boolean;
287
- });
288
- static [Symbol.hasInstance](value: unknown): boolean;
289
- /**
290
- * The error for a captured or transported failure. A code this SDK does not know is never
291
- * retryable: nothing tells it a retry would help.
292
- */
293
- static from(failure: CapabilityFailure): CapabilityError;
294
- }
295
-
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 };