@domino-sdk/relay 1.61.0 → 1.63.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 +276 -8
- package/README.md +3 -2
- package/dist/{schema-CZ6Rj0ZF.d.ts → accounts-nz3mzfRQ.d.ts} +3146 -1765
- package/dist/action-9Xl0StBg.d.ts +33 -0
- package/dist/{attempt-captures-DYnJVkfg.d.ts → attempt-captures-DMi8oR9T.d.ts} +1 -1
- package/dist/authoring.d.ts +171 -49
- package/dist/authoring.js +158 -49
- package/dist/{automatic-outcomes-If88LR9f.d.ts → automatic-outcomes-C_LLQU1p.d.ts} +15 -1
- package/dist/avatar.d.ts +1 -1
- package/dist/browser.d.ts +15 -11
- package/dist/browser.js +18 -12
- package/dist/capability-error-CuI_F7yM.d.ts +296 -0
- package/dist/{pages-K7-KjSXw.d.ts → catalog-BaTOKpNw.d.ts} +56 -567
- package/dist/{chunk-XBV2CK2H.js → chunk-3RFP6GT5.js} +15 -3
- package/dist/{chunk-VURRFVNP.js → chunk-4GQW43UU.js} +239 -361
- package/dist/chunk-4NOFSGAL.js +320 -0
- package/dist/{chunk-24I4R732.js → chunk-5XLZ34PV.js} +34 -19
- package/dist/{chunk-L77O64I4.js → chunk-7X67QLPB.js} +43 -43
- package/dist/{chunk-RHBS5FJL.js → chunk-7Z4SZ6YM.js} +3 -3
- package/dist/{chunk-QEAS4ZGS.js → chunk-AQOL3SK5.js} +1 -1
- package/dist/chunk-EHUSD3O2.js +377 -0
- package/dist/chunk-FO2LCZTL.js +19 -0
- package/dist/{chunk-DYXDZFKA.js → chunk-FU5CGNTR.js} +166 -178
- package/dist/chunk-FWLQ5XCS.js +21 -0
- package/dist/chunk-GLH6MEI2.js +193 -0
- package/dist/chunk-ICXZZNPS.js +199 -0
- package/dist/{chunk-ZDJLPN4L.js → chunk-ID3BZXFZ.js} +2696 -2693
- package/dist/chunk-KP2MCX3R.js +587 -0
- package/dist/{chunk-SKGTNTLF.js → chunk-LZWXCBUB.js} +213 -297
- package/dist/chunk-MTKRIQEU.js +31 -0
- package/dist/{chunk-4OC7REYX.js → chunk-MWMCQLCG.js} +3 -3
- package/dist/{chunk-PPB7HALD.js → chunk-N4BDKS6Y.js} +27 -26
- package/dist/{chunk-5I54XBK2.js → chunk-N4LNEGQX.js} +2 -2
- package/dist/chunk-NQDEWJWE.js +554 -0
- package/dist/chunk-QR6HH4DI.js +508 -0
- package/dist/chunk-TLSQETTY.js +41 -0
- package/dist/{chunk-MHPKEVEW.js → chunk-U66GUVSG.js} +7 -2
- package/dist/{chunk-KDR2VAJP.js → chunk-UYVJZR33.js} +2 -2
- package/dist/chunk-UZ765UGH.js +18 -0
- package/dist/{chunk-7A4J67ZL.js → chunk-VWQGWGCH.js} +7 -7
- package/dist/chunk-W7YSMSGC.js +725 -0
- package/dist/{client-C51w7fMb.d.ts → client-DHmG7rn6.d.ts} +126 -93
- package/dist/{announcements-CHx3-HBw.d.ts → dashboards-CLemT6kj.d.ts} +14 -137
- package/dist/{deployments-kWoHFaqj.d.ts → deployments-DTULi7dF.d.ts} +450 -18
- package/dist/identity-integration-DOeNZaxF.d.ts +1271 -0
- package/dist/index.d.ts +13 -11
- package/dist/index.js +16 -11
- package/dist/internal.d.ts +29 -13
- package/dist/internal.js +57 -17
- package/dist/{integrations-B3y36OaB.d.ts → limits-kNzYdZ00.d.ts} +464 -53
- package/dist/{offers-BoV4ryUc.d.ts → offers-CYeN_I0Y.d.ts} +22 -4
- package/dist/{participant-activity-DHL8QYks.d.ts → participant-activity-D-Drp24G.d.ts} +16 -3
- package/dist/portal-proxy.d.ts +75 -2
- package/dist/portal-proxy.js +153 -25
- package/dist/react/index.d.ts +214 -27
- package/dist/react/index.js +196 -42
- package/dist/{action-DBzILFx9.d.ts → request-error-D_dUPLwo.d.ts} +1 -31
- package/dist/reward-deliveries-drp-x1G-.d.ts +782 -0
- package/dist/runtime/authoring.js +1 -1
- package/dist/runtime/chunks/UGDV5W4N.js +1 -0
- package/dist/runtime/manifest.json +3 -3
- package/dist/runtime/schema.js +1 -1
- package/dist/schema.d.ts +330 -31
- package/dist/schema.js +147 -91
- package/dist/server/index.d.ts +14 -12
- package/dist/server/index.js +6425 -6260
- package/dist/sign-in-providers-B1Q9eDRm.d.ts +44 -0
- package/dist/submission-input-DZCbjQUH.d.ts +343 -0
- package/dist/{telegram-browser-BUceZIGZ.d.ts → telegram-browser-NL0Asmsi.d.ts} +46 -6
- package/dist/telegram.d.ts +64 -0
- package/dist/telegram.js +23 -0
- package/dist/testing.d.ts +326 -27
- package/dist/testing.js +440 -90
- package/dist/tracker-data-esm3WG8R.d.ts +1881 -0
- package/dist/{transport-BrX9pIGN.d.ts → transport-Czht_irp.d.ts} +43483 -38512
- package/dist/{wallet-CIqFoxdm.d.ts → wallet-B7e06v4m.d.ts} +32 -9
- package/package.json +5 -1
- package/dist/accounts-DoabriBX.d.ts +0 -306
- package/dist/capability-error-DufwG3G0.d.ts +0 -159
- package/dist/chunk-3Y3L2F54.js +0 -982
- package/dist/chunk-DHXDBAJF.js +0 -544
- package/dist/chunk-EN3M5Z4J.js +0 -13
- package/dist/chunk-QNUHWK7R.js +0 -602
- package/dist/chunk-SE4PFJPT.js +0 -247
- package/dist/groups-CqcA2Ycs.d.ts +0 -2827
- package/dist/runtime/chunks/5QVFB4TU.js +0 -1
- package/dist/submission-input-C54Q8yAD.d.ts +0 -146
- package/dist/x-D1PGi8Sq.d.ts +0 -331
|
@@ -0,0 +1,1881 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const resourceKind: unique symbol;
|
|
4
|
+
/** A resource defined in code. The type-only marker never changes its serialized shape. */
|
|
5
|
+
type ResourceHandle<K extends string> = {
|
|
6
|
+
readonly key: string;
|
|
7
|
+
readonly [resourceKind]: K;
|
|
8
|
+
};
|
|
9
|
+
type QuestHandle = ResourceHandle<"quest">;
|
|
10
|
+
type BadgeHandle = ResourceHandle<"badge">;
|
|
11
|
+
type LedgerHandle = ResourceHandle<"ledger">;
|
|
12
|
+
type GroupHandle = ResourceHandle<"group"> & {
|
|
13
|
+
readonly title: string;
|
|
14
|
+
};
|
|
15
|
+
type ReferralHandle = ResourceHandle<"referral">;
|
|
16
|
+
/** A ledger chosen through a Console setting. It is a serialized reference, not another definition. */
|
|
17
|
+
declare const ledgerSettingSchema: z.core.$ZodBranded<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>, "ledger-reference", "out">;
|
|
18
|
+
type LedgerSetting = z.output<typeof ledgerSettingSchema>;
|
|
19
|
+
type LedgerReference = LedgerHandle | LedgerSetting;
|
|
20
|
+
|
|
21
|
+
/** Keep provider fields, including verification details, rather than projecting them away. */
|
|
22
|
+
declare const xTweetSchema: z.ZodObject<{
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
userId: z.ZodString;
|
|
25
|
+
content: z.ZodString;
|
|
26
|
+
createdAt: z.ZodISODateTime;
|
|
27
|
+
author: z.ZodObject<{
|
|
28
|
+
id: z.ZodString;
|
|
29
|
+
username: z.ZodString;
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
verified: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
32
|
+
}, z.core.$loose>;
|
|
33
|
+
likeCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
34
|
+
replyCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
35
|
+
retweetCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
36
|
+
quoteCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
37
|
+
viewCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
38
|
+
bookmarkCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
39
|
+
isReply: z.ZodBoolean;
|
|
40
|
+
isRetweet: z.ZodBoolean;
|
|
41
|
+
isQuoteTweet: z.ZodBoolean;
|
|
42
|
+
}, z.core.$loose>;
|
|
43
|
+
type XTweet = z.infer<typeof xTweetSchema>;
|
|
44
|
+
/** Matches tracker_x_content_body_v1 in migration 0054. Version projection changes;
|
|
45
|
+
* retained bodies must remain readable without rewriting their evidence identities. */
|
|
46
|
+
declare const xContentBodySchema: z.ZodObject<{
|
|
47
|
+
version: z.ZodLiteral<1>;
|
|
48
|
+
id: z.ZodString;
|
|
49
|
+
authorId: z.ZodString;
|
|
50
|
+
publishedAt: z.ZodNumber;
|
|
51
|
+
text: z.ZodString;
|
|
52
|
+
isReply: z.ZodBoolean;
|
|
53
|
+
isRetweet: z.ZodBoolean;
|
|
54
|
+
isQuoteTweet: z.ZodBoolean;
|
|
55
|
+
media: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
56
|
+
type: z.ZodString;
|
|
57
|
+
url: z.ZodString;
|
|
58
|
+
}, z.core.$strict>>>;
|
|
59
|
+
mentionedAuthorIds: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
60
|
+
videoLengthSeconds: z.ZodNullable<z.ZodNumber>;
|
|
61
|
+
references: z.ZodObject<{
|
|
62
|
+
replyId: z.ZodNullable<z.ZodString>;
|
|
63
|
+
replyAuthorId: z.ZodNullable<z.ZodString>;
|
|
64
|
+
quoteId: z.ZodNullable<z.ZodString>;
|
|
65
|
+
quoteAuthorId: z.ZodNullable<z.ZodString>;
|
|
66
|
+
repostId: z.ZodNullable<z.ZodString>;
|
|
67
|
+
repostAuthorId: z.ZodNullable<z.ZodString>;
|
|
68
|
+
}, z.core.$strict>;
|
|
69
|
+
}, z.core.$strict>;
|
|
70
|
+
declare const trackerContentQuerySchema: z.ZodObject<{
|
|
71
|
+
id: z.ZodString;
|
|
72
|
+
observation: z.ZodString;
|
|
73
|
+
}, z.core.$strict>;
|
|
74
|
+
type TrackerContentQuery = z.infer<typeof trackerContentQuerySchema>;
|
|
75
|
+
declare const trackerContentReadSchema: z.ZodObject<{
|
|
76
|
+
id: z.ZodString;
|
|
77
|
+
observation: z.ZodString;
|
|
78
|
+
member: z.ZodString;
|
|
79
|
+
}, z.core.$strict>;
|
|
80
|
+
declare const trackerEvidenceSchema: z.ZodObject<{
|
|
81
|
+
contentRevision: z.ZodString;
|
|
82
|
+
observation: z.ZodString;
|
|
83
|
+
}, z.core.$strict>;
|
|
84
|
+
declare const trackerContentSchema: z.ZodObject<{
|
|
85
|
+
tracker: z.ZodString;
|
|
86
|
+
source: z.ZodLiteral<"x">;
|
|
87
|
+
evidence: z.ZodObject<{
|
|
88
|
+
contentRevision: z.ZodString;
|
|
89
|
+
observation: z.ZodString;
|
|
90
|
+
}, z.core.$strict>;
|
|
91
|
+
content: z.ZodObject<{
|
|
92
|
+
version: z.ZodLiteral<1>;
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
authorId: z.ZodString;
|
|
95
|
+
publishedAt: z.ZodNumber;
|
|
96
|
+
text: z.ZodString;
|
|
97
|
+
isReply: z.ZodBoolean;
|
|
98
|
+
isRetweet: z.ZodBoolean;
|
|
99
|
+
isQuoteTweet: z.ZodBoolean;
|
|
100
|
+
media: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
101
|
+
type: z.ZodString;
|
|
102
|
+
url: z.ZodString;
|
|
103
|
+
}, z.core.$strict>>>;
|
|
104
|
+
mentionedAuthorIds: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
105
|
+
videoLengthSeconds: z.ZodNullable<z.ZodNumber>;
|
|
106
|
+
references: z.ZodObject<{
|
|
107
|
+
replyId: z.ZodNullable<z.ZodString>;
|
|
108
|
+
replyAuthorId: z.ZodNullable<z.ZodString>;
|
|
109
|
+
quoteId: z.ZodNullable<z.ZodString>;
|
|
110
|
+
quoteAuthorId: z.ZodNullable<z.ZodString>;
|
|
111
|
+
repostId: z.ZodNullable<z.ZodString>;
|
|
112
|
+
repostAuthorId: z.ZodNullable<z.ZodString>;
|
|
113
|
+
}, z.core.$strict>;
|
|
114
|
+
}, z.core.$strict>;
|
|
115
|
+
observedAt: z.ZodNumber;
|
|
116
|
+
removed: z.ZodBoolean;
|
|
117
|
+
attribution: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
118
|
+
kind: z.ZodLiteral<"linked">;
|
|
119
|
+
account: z.ZodObject<{
|
|
120
|
+
provider: z.ZodLiteral<"x">;
|
|
121
|
+
issuer: z.ZodString;
|
|
122
|
+
subject: z.ZodString;
|
|
123
|
+
revision: z.ZodNumber;
|
|
124
|
+
linkedAt: z.ZodNullable<z.ZodNumber>;
|
|
125
|
+
}, z.core.$strict>;
|
|
126
|
+
member: z.ZodString;
|
|
127
|
+
capturedAt: z.ZodNumber;
|
|
128
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
129
|
+
kind: z.ZodLiteral<"unlinked">;
|
|
130
|
+
member: z.ZodString;
|
|
131
|
+
capturedAt: z.ZodNumber;
|
|
132
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
133
|
+
kind: z.ZodLiteral<"different-author">;
|
|
134
|
+
member: z.ZodString;
|
|
135
|
+
capturedAt: z.ZodNumber;
|
|
136
|
+
}, z.core.$strict>], "kind">;
|
|
137
|
+
}, z.core.$strict>;
|
|
138
|
+
type TrackerContent = z.infer<typeof trackerContentSchema>;
|
|
139
|
+
/** The identity kinds Relay defines. Your own app's kinds are `app:<name>`. */
|
|
140
|
+
declare const knownIdentityKinds: readonly ["wallet", "x", "discord", "member"];
|
|
141
|
+
type KnownIdentityKind = (typeof knownIdentityKinds)[number];
|
|
142
|
+
/**
|
|
143
|
+
* An identity kind your app owns: `app:` and a name of lowercase letters, digits, `_` or `-`
|
|
144
|
+
* (at most 40), such as `app:game` or `app:acme`. The identity integration created with this
|
|
145
|
+
* kind is the only one that can link it: each member it signs in gets the app's subject as an
|
|
146
|
+
* identity of this kind in the project.
|
|
147
|
+
*/
|
|
148
|
+
declare const appIdentityKindSchema: z.ZodTemplateLiteral<`app:${string}`>;
|
|
149
|
+
type AppIdentityKind = `app:${string}`;
|
|
150
|
+
/**
|
|
151
|
+
* The verified identities a custom tracker's record accounts can be. Relay attributes each to a
|
|
152
|
+
* member through a verified link: `wallet` a canonical CAIP-10 account ID the member linked, `x`
|
|
153
|
+
* and `discord` the stable user ID of the member's selected account, `member` a Domino member ID,
|
|
154
|
+
* and `app:<name>` the subject your app's identity integration signed the member in with.
|
|
155
|
+
*/
|
|
156
|
+
declare const identityKindSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
157
|
+
member: "member";
|
|
158
|
+
discord: "discord";
|
|
159
|
+
x: "x";
|
|
160
|
+
wallet: "wallet";
|
|
161
|
+
}>, z.ZodTemplateLiteral<`app:${string}`>]>;
|
|
162
|
+
type IdentityKind = KnownIdentityKind | AppIdentityKind;
|
|
163
|
+
/** Whether a kind is one your app owns, `app:<name>`. */
|
|
164
|
+
declare const isAppIdentityKind: (kind: string) => kind is AppIdentityKind;
|
|
165
|
+
/**
|
|
166
|
+
* An identity kind as responses and evaluator contexts carry it: one of `IdentityKind`, or a kind
|
|
167
|
+
* a later Relay adds. Compare it with the kinds you handle and keep a default branch.
|
|
168
|
+
*/
|
|
169
|
+
type OpenIdentityKind = IdentityKind | (string & {});
|
|
170
|
+
/** Reads any identity kind a response carries; `identityKindSchema` checks the ones you send. */
|
|
171
|
+
declare const openIdentityKindSchema: z.ZodType<OpenIdentityKind>;
|
|
172
|
+
/**
|
|
173
|
+
* One of a member's identities that trackers attribute records through, other than wallets and
|
|
174
|
+
* the member ID itself: the member's selected X and Discord accounts, and each `app:<name>`
|
|
175
|
+
* identity an identity integration linked in the project. `ctx.wallet.list()` lists wallets.
|
|
176
|
+
*/
|
|
177
|
+
declare const memberIdentitySchema: z.ZodObject<{
|
|
178
|
+
kind: z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>;
|
|
179
|
+
subject: z.ZodString;
|
|
180
|
+
revision: z.ZodNumber;
|
|
181
|
+
linkedAt: z.ZodNullable<z.ZodNumber>;
|
|
182
|
+
}, z.core.$strip>;
|
|
183
|
+
type MemberIdentity = z.infer<typeof memberIdentitySchema>;
|
|
184
|
+
/**
|
|
185
|
+
* A named account on a record, such as `author` or `inReplyTo`. A tracker-triggered quest pays the
|
|
186
|
+
* member behind one role, its `beneficiary`.
|
|
187
|
+
*/
|
|
188
|
+
declare const accountRoleSchema: z.ZodString;
|
|
189
|
+
type AccountRole = z.infer<typeof accountRoleSchema>;
|
|
190
|
+
/**
|
|
191
|
+
* The roles an X post exposes: who wrote it, and whose post it replies to, quotes or reposts. A later
|
|
192
|
+
* Relay may add roles, and a stored release's `beneficiary` is any role.
|
|
193
|
+
*
|
|
194
|
+
* @compat open
|
|
195
|
+
*/
|
|
196
|
+
declare const xAccountRoles: readonly ["author", "inReplyTo", "quoted", "reposted"];
|
|
197
|
+
/** A content metric's name, such as `likes` or `views`: a letter, then letters and digits. */
|
|
198
|
+
declare const contentMetricNameSchema: z.ZodString;
|
|
199
|
+
/** The counters an X search source measures on each post. */
|
|
200
|
+
declare const xContentMetrics: readonly ["likes", "replies", "reposts", "quotes", "views", "bookmarks"];
|
|
201
|
+
/** The metric names an X post's observation measures. */
|
|
202
|
+
type XContentMetric = (typeof xContentMetrics)[number];
|
|
203
|
+
/**
|
|
204
|
+
* A custom source's content shape, as stored. The body schema is the `body` property of the
|
|
205
|
+
* source's `data` schema, which `customSource(namespace, { content })` derives as
|
|
206
|
+
* `{ body, metrics? }`; `metrics` lists the counters each observation may measure.
|
|
207
|
+
*/
|
|
208
|
+
declare const customContentSchema: z.ZodObject<{
|
|
209
|
+
metrics: z.ZodArray<z.ZodString>;
|
|
210
|
+
}, z.core.$strict>;
|
|
211
|
+
/**
|
|
212
|
+
* What a `wallet.balances()` source samples: a chain's CAIP-2 ID (Solana mainnet, an EVM chain or
|
|
213
|
+
* a Cosmos SDK chain) and the token as written in code (an SPL or Token-2022 mint, an ERC-20
|
|
214
|
+
* contract or a Cosmos bank denomination), null for a native coin.
|
|
215
|
+
*/
|
|
216
|
+
declare const walletBalanceSourceSchema: z.ZodObject<{
|
|
217
|
+
chain: z.ZodString;
|
|
218
|
+
token: z.ZodNullable<z.ZodString>;
|
|
219
|
+
}, z.core.$strict>;
|
|
220
|
+
declare const xSearchSourceSchema: z.ZodObject<{
|
|
221
|
+
kind: z.ZodLiteral<"x-search">;
|
|
222
|
+
query: z.ZodString;
|
|
223
|
+
}, z.core.$strict>;
|
|
224
|
+
declare const customSourceSchema: z.ZodObject<{
|
|
225
|
+
kind: z.ZodLiteral<"custom">;
|
|
226
|
+
namespace: z.ZodString;
|
|
227
|
+
identities: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
228
|
+
member: "member";
|
|
229
|
+
discord: "discord";
|
|
230
|
+
x: "x";
|
|
231
|
+
wallet: "wallet";
|
|
232
|
+
}>, z.ZodTemplateLiteral<`app:${string}`>]>>>;
|
|
233
|
+
accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
234
|
+
data: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodType<TrackerDataSchema, unknown, z.core.$ZodTypeInternals<TrackerDataSchema, unknown>>>>;
|
|
235
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
236
|
+
metrics: z.ZodArray<z.ZodString>;
|
|
237
|
+
}, z.core.$strict>>;
|
|
238
|
+
balance: z.ZodOptional<z.ZodObject<{
|
|
239
|
+
chain: z.ZodString;
|
|
240
|
+
token: z.ZodNullable<z.ZodString>;
|
|
241
|
+
}, z.core.$strict>>;
|
|
242
|
+
}, z.core.$strict>;
|
|
243
|
+
declare const trackerSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
244
|
+
kind: z.ZodLiteral<"x-search">;
|
|
245
|
+
query: z.ZodString;
|
|
246
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
247
|
+
kind: z.ZodLiteral<"custom">;
|
|
248
|
+
namespace: z.ZodString;
|
|
249
|
+
identities: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
250
|
+
member: "member";
|
|
251
|
+
discord: "discord";
|
|
252
|
+
x: "x";
|
|
253
|
+
wallet: "wallet";
|
|
254
|
+
}>, z.ZodTemplateLiteral<`app:${string}`>]>>>;
|
|
255
|
+
accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
256
|
+
data: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodType<TrackerDataSchema, unknown, z.core.$ZodTypeInternals<TrackerDataSchema, unknown>>>>;
|
|
257
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
258
|
+
metrics: z.ZodArray<z.ZodString>;
|
|
259
|
+
}, z.core.$strict>>;
|
|
260
|
+
balance: z.ZodOptional<z.ZodObject<{
|
|
261
|
+
chain: z.ZodString;
|
|
262
|
+
token: z.ZodNullable<z.ZodString>;
|
|
263
|
+
}, z.core.$strict>>;
|
|
264
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
265
|
+
kind: z.ZodLiteral<"discord-messages">;
|
|
266
|
+
text: z.ZodOptional<z.ZodBoolean>;
|
|
267
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
268
|
+
kind: z.ZodLiteral<"discord-reactions">;
|
|
269
|
+
}, z.core.$strict>], "kind">;
|
|
270
|
+
type TrackerSource = z.infer<typeof trackerSourceSchema>;
|
|
271
|
+
/** Every kind of tracker source: X search, your own records, and the two Discord streams. */
|
|
272
|
+
declare const trackerSourceKinds: readonly ["x-search", "custom", "discord-messages", "discord-reactions"];
|
|
273
|
+
type TrackerSourceKind = (typeof trackerSourceKinds)[number];
|
|
274
|
+
/**
|
|
275
|
+
* The identity kinds a source's record accounts are: `x` for an X tracker, `discord` for a Discord
|
|
276
|
+
* one, a custom source's `identities`, or undefined when a custom source's authors are opaque IDs.
|
|
277
|
+
*/
|
|
278
|
+
declare function sourceIdentities(source: TrackerSource): IdentityKind[] | undefined;
|
|
279
|
+
declare function sourceIdentities(source: TrackerSourceResponse): OpenIdentityKind[] | undefined;
|
|
280
|
+
/**
|
|
281
|
+
* The content a source's records carry, or undefined for one without content: an X search source
|
|
282
|
+
* measures the six X counters on each post body, and a custom source declares its metrics with
|
|
283
|
+
* `content`. Only a tracker whose source has content can trigger `content()` quests.
|
|
284
|
+
*/
|
|
285
|
+
declare function sourceContent(source: TrackerSource): {
|
|
286
|
+
metrics: readonly string[];
|
|
287
|
+
} | undefined;
|
|
288
|
+
/**
|
|
289
|
+
* Type-only marker for the content a source's records carry: the body type `B` and the metric
|
|
290
|
+
* names `M`. Like `WithRecordData`, it never exists at runtime.
|
|
291
|
+
*/
|
|
292
|
+
declare const contentShape: unique symbol;
|
|
293
|
+
/** A source or tracker whose records carry content with body `B` and metrics `M`. */
|
|
294
|
+
type WithContent<B, M extends string> = {
|
|
295
|
+
readonly [contentShape]: {
|
|
296
|
+
body: B;
|
|
297
|
+
metrics: M;
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
/** The content body type of a content source or tracker. */
|
|
301
|
+
type ContentBody<T> = T extends WithContent<infer B, string> ? B : never;
|
|
302
|
+
/** The metric names a content source or tracker measures. */
|
|
303
|
+
type ContentMetricName<T> = T extends WithContent<unknown, infer M> ? M : never;
|
|
304
|
+
/**
|
|
305
|
+
* Type-only marker for the `data` a source's records carry. It never exists at runtime: sources
|
|
306
|
+
* and trackers stay plain, serializable definitions.
|
|
307
|
+
*/
|
|
308
|
+
declare const recordData: unique symbol;
|
|
309
|
+
/** A source or tracker whose records carry `data` of type `D`. */
|
|
310
|
+
type WithRecordData<D> = {
|
|
311
|
+
readonly [recordData]?: D;
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* The record `data` type of a source or tracker: the provider payload for X, the declared schema's
|
|
315
|
+
* input type for a custom source, or `unknown` for one that declares none.
|
|
316
|
+
*/
|
|
317
|
+
type TrackerData<T> = T extends WithRecordData<infer D> ? unknown extends D ? unknown : D : unknown;
|
|
318
|
+
declare const trackerDefinitionSchema: z.ZodObject<{
|
|
319
|
+
key: z.ZodString;
|
|
320
|
+
title: z.ZodString;
|
|
321
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
322
|
+
kind: z.ZodLiteral<"x-search">;
|
|
323
|
+
query: z.ZodString;
|
|
324
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
325
|
+
kind: z.ZodLiteral<"custom">;
|
|
326
|
+
namespace: z.ZodString;
|
|
327
|
+
identities: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
328
|
+
member: "member";
|
|
329
|
+
discord: "discord";
|
|
330
|
+
x: "x";
|
|
331
|
+
wallet: "wallet";
|
|
332
|
+
}>, z.ZodTemplateLiteral<`app:${string}`>]>>>;
|
|
333
|
+
accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
334
|
+
data: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodType<TrackerDataSchema, unknown, z.core.$ZodTypeInternals<TrackerDataSchema, unknown>>>>;
|
|
335
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
336
|
+
metrics: z.ZodArray<z.ZodString>;
|
|
337
|
+
}, z.core.$strict>>;
|
|
338
|
+
balance: z.ZodOptional<z.ZodObject<{
|
|
339
|
+
chain: z.ZodString;
|
|
340
|
+
token: z.ZodNullable<z.ZodString>;
|
|
341
|
+
}, z.core.$strict>>;
|
|
342
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
343
|
+
kind: z.ZodLiteral<"discord-messages">;
|
|
344
|
+
text: z.ZodOptional<z.ZodBoolean>;
|
|
345
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
346
|
+
kind: z.ZodLiteral<"discord-reactions">;
|
|
347
|
+
}, z.core.$strict>], "kind">;
|
|
348
|
+
window: z.ZodObject<{
|
|
349
|
+
start: z.ZodNumber;
|
|
350
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
351
|
+
}, z.core.$strict>;
|
|
352
|
+
refreshSeconds: z.ZodDefault<z.ZodNumber>;
|
|
353
|
+
maxPages: z.ZodDefault<z.ZodNumber>;
|
|
354
|
+
}, z.core.$strict>;
|
|
355
|
+
declare const trackerArtifactSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
356
|
+
key: z.ZodString;
|
|
357
|
+
title: z.ZodString;
|
|
358
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
359
|
+
kind: z.ZodLiteral<"x-search">;
|
|
360
|
+
query: z.ZodString;
|
|
361
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
362
|
+
kind: z.ZodLiteral<"custom">;
|
|
363
|
+
namespace: z.ZodString;
|
|
364
|
+
identities: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
365
|
+
member: "member";
|
|
366
|
+
discord: "discord";
|
|
367
|
+
x: "x";
|
|
368
|
+
wallet: "wallet";
|
|
369
|
+
}>, z.ZodTemplateLiteral<`app:${string}`>]>>>;
|
|
370
|
+
accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
371
|
+
data: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodType<TrackerDataSchema, unknown, z.core.$ZodTypeInternals<TrackerDataSchema, unknown>>>>;
|
|
372
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
373
|
+
metrics: z.ZodArray<z.ZodString>;
|
|
374
|
+
}, z.core.$strict>>;
|
|
375
|
+
balance: z.ZodOptional<z.ZodObject<{
|
|
376
|
+
chain: z.ZodString;
|
|
377
|
+
token: z.ZodNullable<z.ZodString>;
|
|
378
|
+
}, z.core.$strict>>;
|
|
379
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
380
|
+
kind: z.ZodLiteral<"discord-messages">;
|
|
381
|
+
text: z.ZodOptional<z.ZodBoolean>;
|
|
382
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
383
|
+
kind: z.ZodLiteral<"discord-reactions">;
|
|
384
|
+
}, z.core.$strict>], "kind">;
|
|
385
|
+
window: z.ZodObject<{
|
|
386
|
+
start: z.ZodNumber;
|
|
387
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
388
|
+
}, z.core.$strict>;
|
|
389
|
+
refreshSeconds: z.ZodDefault<z.ZodNumber>;
|
|
390
|
+
maxPages: z.ZodDefault<z.ZodNumber>;
|
|
391
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
392
|
+
code: z.ZodString;
|
|
393
|
+
}, z.core.$strict>]>;
|
|
394
|
+
type TrackerDefinition = z.infer<typeof trackerDefinitionSchema>;
|
|
395
|
+
/**
|
|
396
|
+
* A tracker definition whose records carry `data` of type `D`. Quests reference it as a handle:
|
|
397
|
+
* `where` paths and `ctx.tracker.record.data` follow from `D`.
|
|
398
|
+
*/
|
|
399
|
+
/** Type-only source roles, preserved by authoring handles after runtime schema validation. */
|
|
400
|
+
declare const accountRoles: unique symbol;
|
|
401
|
+
type WithAccountRoles<R extends string> = {
|
|
402
|
+
readonly [accountRoles]?: R;
|
|
403
|
+
};
|
|
404
|
+
type RoleOf<T> = typeof accountRoles extends keyof T ? Extract<T[typeof accountRoles], string> : string;
|
|
405
|
+
/**
|
|
406
|
+
* The roles a source's records name, which a tracker-triggered quest on it may pay. A later Relay
|
|
407
|
+
* may add roles to a source.
|
|
408
|
+
*
|
|
409
|
+
* @compat open
|
|
410
|
+
*/
|
|
411
|
+
type SourceRoles<S extends TrackerSource> = typeof accountRoles extends keyof S ? RoleOf<S> : S extends {
|
|
412
|
+
kind: "x-search";
|
|
413
|
+
} ? (typeof xAccountRoles)[number] : S extends {
|
|
414
|
+
kind: "discord-messages";
|
|
415
|
+
} ? "author" : S extends {
|
|
416
|
+
kind: "discord-reactions";
|
|
417
|
+
} ? "author" | "messageAuthor" : "author" | (S extends {
|
|
418
|
+
accounts?: readonly (infer R)[];
|
|
419
|
+
} ? Extract<R, string> : never);
|
|
420
|
+
type Tracker<D = unknown> = TrackerDefinition & WithRecordData<D> & ResourceHandle<"tracker">;
|
|
421
|
+
/** Known source shapes accept identity kinds a later Relay may add. */
|
|
422
|
+
declare const knownTrackerSourceResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
423
|
+
kind: z.ZodLiteral<"x-search">;
|
|
424
|
+
query: z.ZodString;
|
|
425
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
426
|
+
identities: z.ZodOptional<z.ZodArray<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>>;
|
|
427
|
+
kind: z.ZodLiteral<"custom">;
|
|
428
|
+
namespace: z.ZodString;
|
|
429
|
+
accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
430
|
+
data: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodType<TrackerDataSchema, unknown, z.core.$ZodTypeInternals<TrackerDataSchema, unknown>>>>;
|
|
431
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
432
|
+
metrics: z.ZodArray<z.ZodString>;
|
|
433
|
+
}, z.core.$strict>>;
|
|
434
|
+
balance: z.ZodOptional<z.ZodObject<{
|
|
435
|
+
chain: z.ZodString;
|
|
436
|
+
token: z.ZodNullable<z.ZodString>;
|
|
437
|
+
}, z.core.$strict>>;
|
|
438
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
439
|
+
kind: z.ZodLiteral<"discord-messages">;
|
|
440
|
+
text: z.ZodOptional<z.ZodBoolean>;
|
|
441
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
442
|
+
kind: z.ZodLiteral<"discord-reactions">;
|
|
443
|
+
}, z.core.$strip>], "kind">;
|
|
444
|
+
/** Responses preserve unknown source kinds and their payloads. Authoring remains closed. */
|
|
445
|
+
declare const trackerSourceResponseSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
446
|
+
kind: z.ZodLiteral<"x-search">;
|
|
447
|
+
query: z.ZodString;
|
|
448
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
449
|
+
identities: z.ZodOptional<z.ZodArray<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>>;
|
|
450
|
+
kind: z.ZodLiteral<"custom">;
|
|
451
|
+
namespace: z.ZodString;
|
|
452
|
+
accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
453
|
+
data: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodType<TrackerDataSchema, unknown, z.core.$ZodTypeInternals<TrackerDataSchema, unknown>>>>;
|
|
454
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
455
|
+
metrics: z.ZodArray<z.ZodString>;
|
|
456
|
+
}, z.core.$strict>>;
|
|
457
|
+
balance: z.ZodOptional<z.ZodObject<{
|
|
458
|
+
chain: z.ZodString;
|
|
459
|
+
token: z.ZodNullable<z.ZodString>;
|
|
460
|
+
}, z.core.$strict>>;
|
|
461
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
462
|
+
kind: z.ZodLiteral<"discord-messages">;
|
|
463
|
+
text: z.ZodOptional<z.ZodBoolean>;
|
|
464
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
465
|
+
kind: z.ZodLiteral<"discord-reactions">;
|
|
466
|
+
}, z.core.$strip>], "kind">, z.ZodObject<{
|
|
467
|
+
kind: z.ZodString;
|
|
468
|
+
}, z.core.$catchall<z.ZodJSONSchema>>]>;
|
|
469
|
+
type TrackerSourceResponse = z.infer<typeof trackerSourceResponseSchema>;
|
|
470
|
+
/** Narrow a response before reading fields specific to a supported source. */
|
|
471
|
+
declare function isKnownTrackerSource(source: TrackerSourceResponse): source is z.infer<typeof knownTrackerSourceResponseSchema>;
|
|
472
|
+
/** Reads published definitions; authoring still uses the strict `trackerDefinitionSchema`. */
|
|
473
|
+
declare const trackerDefinitionResponseSchema: z.ZodObject<{
|
|
474
|
+
source: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
475
|
+
kind: z.ZodLiteral<"x-search">;
|
|
476
|
+
query: z.ZodString;
|
|
477
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
478
|
+
identities: z.ZodOptional<z.ZodArray<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>>;
|
|
479
|
+
kind: z.ZodLiteral<"custom">;
|
|
480
|
+
namespace: z.ZodString;
|
|
481
|
+
accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
482
|
+
data: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodType<TrackerDataSchema, unknown, z.core.$ZodTypeInternals<TrackerDataSchema, unknown>>>>;
|
|
483
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
484
|
+
metrics: z.ZodArray<z.ZodString>;
|
|
485
|
+
}, z.core.$strict>>;
|
|
486
|
+
balance: z.ZodOptional<z.ZodObject<{
|
|
487
|
+
chain: z.ZodString;
|
|
488
|
+
token: z.ZodNullable<z.ZodString>;
|
|
489
|
+
}, z.core.$strict>>;
|
|
490
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
491
|
+
kind: z.ZodLiteral<"discord-messages">;
|
|
492
|
+
text: z.ZodOptional<z.ZodBoolean>;
|
|
493
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
494
|
+
kind: z.ZodLiteral<"discord-reactions">;
|
|
495
|
+
}, z.core.$strip>], "kind">, z.ZodObject<{
|
|
496
|
+
kind: z.ZodString;
|
|
497
|
+
}, z.core.$catchall<z.ZodJSONSchema>>]>;
|
|
498
|
+
window: z.ZodObject<{
|
|
499
|
+
start: z.ZodNumber;
|
|
500
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
501
|
+
}, z.core.$strip>;
|
|
502
|
+
key: z.ZodString;
|
|
503
|
+
title: z.ZodString;
|
|
504
|
+
refreshSeconds: z.ZodDefault<z.ZodNumber>;
|
|
505
|
+
maxPages: z.ZodDefault<z.ZodNumber>;
|
|
506
|
+
}, z.core.$strip>;
|
|
507
|
+
type TrackerDefinitionResponse = z.infer<typeof trackerDefinitionResponseSchema>;
|
|
508
|
+
declare const publishedTrackerSchema: z.ZodObject<{
|
|
509
|
+
id: z.ZodString;
|
|
510
|
+
version: z.ZodString;
|
|
511
|
+
definition: z.ZodObject<{
|
|
512
|
+
source: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
513
|
+
kind: z.ZodLiteral<"x-search">;
|
|
514
|
+
query: z.ZodString;
|
|
515
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
516
|
+
identities: z.ZodOptional<z.ZodArray<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>>;
|
|
517
|
+
kind: z.ZodLiteral<"custom">;
|
|
518
|
+
namespace: z.ZodString;
|
|
519
|
+
accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
520
|
+
data: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodType<TrackerDataSchema, unknown, z.core.$ZodTypeInternals<TrackerDataSchema, unknown>>>>;
|
|
521
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
522
|
+
metrics: z.ZodArray<z.ZodString>;
|
|
523
|
+
}, z.core.$strict>>;
|
|
524
|
+
balance: z.ZodOptional<z.ZodObject<{
|
|
525
|
+
chain: z.ZodString;
|
|
526
|
+
token: z.ZodNullable<z.ZodString>;
|
|
527
|
+
}, z.core.$strict>>;
|
|
528
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
529
|
+
kind: z.ZodLiteral<"discord-messages">;
|
|
530
|
+
text: z.ZodOptional<z.ZodBoolean>;
|
|
531
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
532
|
+
kind: z.ZodLiteral<"discord-reactions">;
|
|
533
|
+
}, z.core.$strip>], "kind">, z.ZodObject<{
|
|
534
|
+
kind: z.ZodString;
|
|
535
|
+
}, z.core.$catchall<z.ZodJSONSchema>>]>;
|
|
536
|
+
window: z.ZodObject<{
|
|
537
|
+
start: z.ZodNumber;
|
|
538
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
539
|
+
}, z.core.$strip>;
|
|
540
|
+
key: z.ZodString;
|
|
541
|
+
title: z.ZodString;
|
|
542
|
+
refreshSeconds: z.ZodDefault<z.ZodNumber>;
|
|
543
|
+
maxPages: z.ZodDefault<z.ZodNumber>;
|
|
544
|
+
}, z.core.$strip>;
|
|
545
|
+
publishedAt: z.ZodNumber;
|
|
546
|
+
actor: z.ZodNullable<z.ZodString>;
|
|
547
|
+
}, z.core.$strip>;
|
|
548
|
+
declare const trackerStatusSchema: z.ZodObject<{
|
|
549
|
+
archivedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
550
|
+
published: z.ZodObject<{
|
|
551
|
+
id: z.ZodString;
|
|
552
|
+
version: z.ZodString;
|
|
553
|
+
definition: z.ZodObject<{
|
|
554
|
+
source: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
555
|
+
kind: z.ZodLiteral<"x-search">;
|
|
556
|
+
query: z.ZodString;
|
|
557
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
558
|
+
identities: z.ZodOptional<z.ZodArray<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>>;
|
|
559
|
+
kind: z.ZodLiteral<"custom">;
|
|
560
|
+
namespace: z.ZodString;
|
|
561
|
+
accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
562
|
+
data: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodType<TrackerDataSchema, unknown, z.core.$ZodTypeInternals<TrackerDataSchema, unknown>>>>;
|
|
563
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
564
|
+
metrics: z.ZodArray<z.ZodString>;
|
|
565
|
+
}, z.core.$strict>>;
|
|
566
|
+
balance: z.ZodOptional<z.ZodObject<{
|
|
567
|
+
chain: z.ZodString;
|
|
568
|
+
token: z.ZodNullable<z.ZodString>;
|
|
569
|
+
}, z.core.$strict>>;
|
|
570
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
571
|
+
kind: z.ZodLiteral<"discord-messages">;
|
|
572
|
+
text: z.ZodOptional<z.ZodBoolean>;
|
|
573
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
574
|
+
kind: z.ZodLiteral<"discord-reactions">;
|
|
575
|
+
}, z.core.$strip>], "kind">, z.ZodObject<{
|
|
576
|
+
kind: z.ZodString;
|
|
577
|
+
}, z.core.$catchall<z.ZodJSONSchema>>]>;
|
|
578
|
+
window: z.ZodObject<{
|
|
579
|
+
start: z.ZodNumber;
|
|
580
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
581
|
+
}, z.core.$strip>;
|
|
582
|
+
key: z.ZodString;
|
|
583
|
+
title: z.ZodString;
|
|
584
|
+
refreshSeconds: z.ZodDefault<z.ZodNumber>;
|
|
585
|
+
maxPages: z.ZodDefault<z.ZodNumber>;
|
|
586
|
+
}, z.core.$strip>;
|
|
587
|
+
publishedAt: z.ZodNumber;
|
|
588
|
+
actor: z.ZodNullable<z.ZodString>;
|
|
589
|
+
}, z.core.$strip>;
|
|
590
|
+
paused: z.ZodBoolean;
|
|
591
|
+
pauseReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
592
|
+
resumesAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
593
|
+
effectiveRefreshSeconds: z.ZodOptional<z.ZodNumber>;
|
|
594
|
+
state: z.ZodEnum<{
|
|
595
|
+
error: "error";
|
|
596
|
+
complete: "complete";
|
|
597
|
+
idle: "idle";
|
|
598
|
+
syncing: "syncing";
|
|
599
|
+
}>;
|
|
600
|
+
lastStartedAt: z.ZodNullable<z.ZodNumber>;
|
|
601
|
+
lastCompletedAt: z.ZodNullable<z.ZodNumber>;
|
|
602
|
+
nextSyncAt: z.ZodNullable<z.ZodNumber>;
|
|
603
|
+
coverage: z.ZodEnum<{
|
|
604
|
+
unknown: "unknown";
|
|
605
|
+
complete: "complete";
|
|
606
|
+
partial: "partial";
|
|
607
|
+
}>;
|
|
608
|
+
error: z.ZodNullable<z.ZodString>;
|
|
609
|
+
records: z.ZodNumber;
|
|
610
|
+
origin: z.ZodOptional<z.ZodEnum<{
|
|
611
|
+
code: "code";
|
|
612
|
+
data: "data";
|
|
613
|
+
}>>;
|
|
614
|
+
}, z.core.$strip>;
|
|
615
|
+
type TrackerStatus = z.infer<typeof trackerStatusSchema>;
|
|
616
|
+
/**
|
|
617
|
+
* The sources a tracker created as data can have (`management.trackers.create`), by the management
|
|
618
|
+
* API's own names: an X search, the project's Discord messages (`text` stores each message's text)
|
|
619
|
+
* or reactions, messages or reactions in its connected Telegram chats, members' YouTube Shorts
|
|
620
|
+
* or TikTok videos, and daily samples of members' wallet balances of one token. Each is stored as
|
|
621
|
+
* the source its builder makes, such as `telegram.reactions()`, so quests read a data tracker
|
|
622
|
+
* exactly as the same tracker in code. Custom sources are code only.
|
|
623
|
+
*/
|
|
624
|
+
declare const managedTrackerSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
625
|
+
kind: z.ZodLiteral<"x-search">;
|
|
626
|
+
query: z.ZodString;
|
|
627
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
628
|
+
kind: z.ZodLiteral<"discord-messages">;
|
|
629
|
+
text: z.ZodOptional<z.ZodBoolean>;
|
|
630
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
631
|
+
kind: z.ZodLiteral<"discord-reactions">;
|
|
632
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
633
|
+
kind: z.ZodLiteral<"telegram-messages">;
|
|
634
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
635
|
+
kind: z.ZodLiteral<"telegram-reactions">;
|
|
636
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
637
|
+
kind: z.ZodLiteral<"youtube-shorts">;
|
|
638
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
639
|
+
kind: z.ZodLiteral<"tiktok-videos">;
|
|
640
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
641
|
+
chain: z.ZodString;
|
|
642
|
+
token: z.ZodNullable<z.ZodString>;
|
|
643
|
+
kind: z.ZodLiteral<"wallet-balances">;
|
|
644
|
+
}, z.core.$strict>], "kind">;
|
|
645
|
+
type ManagedTrackerSource = z.infer<typeof managedTrackerSourceSchema>;
|
|
646
|
+
type ManagedTrackerSourceKind = ManagedTrackerSource["kind"];
|
|
647
|
+
/** Every source kind a tracker created as data can have, in the order Console offers them. */
|
|
648
|
+
declare const managedTrackerSourceKinds: readonly ["x-search", "discord-messages", "discord-reactions", "telegram-messages", "telegram-reactions", "youtube-shorts", "tiktok-videos", "wallet-balances"];
|
|
649
|
+
/**
|
|
650
|
+
* A published source as `management.trackers.create` names it, or undefined for one it cannot
|
|
651
|
+
* create, such as your own custom source. Discord messages always say whether text is stored.
|
|
652
|
+
*/
|
|
653
|
+
declare function managedTrackerSource(source: TrackerSourceResponse): ManagedTrackerSource | undefined;
|
|
654
|
+
/** The parts of a tracker created as data that `management.trackers.update` can change. */
|
|
655
|
+
declare const trackerPropertiesSchema: z.ZodObject<{
|
|
656
|
+
title: z.ZodString;
|
|
657
|
+
query: z.ZodString;
|
|
658
|
+
window: z.ZodObject<{
|
|
659
|
+
start: z.ZodNumber;
|
|
660
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
661
|
+
}, z.core.$strict>;
|
|
662
|
+
refreshSeconds: z.ZodNumber;
|
|
663
|
+
maxPages: z.ZodNumber;
|
|
664
|
+
}, z.core.$strict>;
|
|
665
|
+
/**
|
|
666
|
+
* An X search tracker created as data in test (`management.trackers.create`). Its key is its
|
|
667
|
+
* authoring key, which a promotion carries to live; validation matches `defineTracker`.
|
|
668
|
+
* `managedTrackerCreateSchema` also takes the other managed sources.
|
|
669
|
+
*/
|
|
670
|
+
declare const trackerCreateSchema: z.ZodObject<{
|
|
671
|
+
title: z.ZodString;
|
|
672
|
+
query: z.ZodString;
|
|
673
|
+
window: z.ZodObject<{
|
|
674
|
+
start: z.ZodNumber;
|
|
675
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
676
|
+
}, z.core.$strict>;
|
|
677
|
+
key: z.ZodString;
|
|
678
|
+
refreshSeconds: z.ZodDefault<z.ZodNumber>;
|
|
679
|
+
maxPages: z.ZodDefault<z.ZodNumber>;
|
|
680
|
+
actionId: z.ZodString;
|
|
681
|
+
}, z.core.$strict>;
|
|
682
|
+
type TrackerCreateInput = z.input<typeof trackerCreateSchema>;
|
|
683
|
+
/**
|
|
684
|
+
* A tracker of any managed source created as data in test (`management.trackers.create`). Name the
|
|
685
|
+
* source with `source`, or an X search with `query` alone, which is short for
|
|
686
|
+
* `source: { kind: "x-search", query }` and is all `trackerCreateSchema` takes.
|
|
687
|
+
*/
|
|
688
|
+
declare const managedTrackerCreateSchema: z.ZodObject<{
|
|
689
|
+
title: z.ZodString;
|
|
690
|
+
window: z.ZodObject<{
|
|
691
|
+
start: z.ZodNumber;
|
|
692
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
693
|
+
}, z.core.$strict>;
|
|
694
|
+
key: z.ZodString;
|
|
695
|
+
refreshSeconds: z.ZodDefault<z.ZodNumber>;
|
|
696
|
+
maxPages: z.ZodDefault<z.ZodNumber>;
|
|
697
|
+
actionId: z.ZodString;
|
|
698
|
+
query: z.ZodOptional<z.ZodString>;
|
|
699
|
+
source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
700
|
+
kind: z.ZodLiteral<"x-search">;
|
|
701
|
+
query: z.ZodString;
|
|
702
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
703
|
+
kind: z.ZodLiteral<"discord-messages">;
|
|
704
|
+
text: z.ZodOptional<z.ZodBoolean>;
|
|
705
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
706
|
+
kind: z.ZodLiteral<"discord-reactions">;
|
|
707
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
708
|
+
kind: z.ZodLiteral<"telegram-messages">;
|
|
709
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
710
|
+
kind: z.ZodLiteral<"telegram-reactions">;
|
|
711
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
712
|
+
kind: z.ZodLiteral<"youtube-shorts">;
|
|
713
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
714
|
+
kind: z.ZodLiteral<"tiktok-videos">;
|
|
715
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
716
|
+
chain: z.ZodString;
|
|
717
|
+
token: z.ZodNullable<z.ZodString>;
|
|
718
|
+
kind: z.ZodLiteral<"wallet-balances">;
|
|
719
|
+
}, z.core.$strict>], "kind">>;
|
|
720
|
+
}, z.core.$strict>;
|
|
721
|
+
type ManagedTrackerCreateInput = z.input<typeof managedTrackerCreateSchema>;
|
|
722
|
+
/**
|
|
723
|
+
* Changes to a tracker created as data. Fields left out keep their value; the key and the source's
|
|
724
|
+
* kind never change. `source` changes the source's own settings, such as an X query or whether
|
|
725
|
+
* Discord message text is stored, and `query` is short for an X search's `source`.
|
|
726
|
+
*/
|
|
727
|
+
declare const trackerUpdateSchema: z.ZodObject<{
|
|
728
|
+
title: z.ZodOptional<z.ZodString>;
|
|
729
|
+
query: z.ZodOptional<z.ZodString>;
|
|
730
|
+
window: z.ZodOptional<z.ZodObject<{
|
|
731
|
+
start: z.ZodNumber;
|
|
732
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
733
|
+
}, z.core.$strict>>;
|
|
734
|
+
refreshSeconds: z.ZodOptional<z.ZodNumber>;
|
|
735
|
+
maxPages: z.ZodOptional<z.ZodNumber>;
|
|
736
|
+
source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
737
|
+
kind: z.ZodLiteral<"x-search">;
|
|
738
|
+
query: z.ZodString;
|
|
739
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
740
|
+
kind: z.ZodLiteral<"discord-messages">;
|
|
741
|
+
text: z.ZodOptional<z.ZodBoolean>;
|
|
742
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
743
|
+
kind: z.ZodLiteral<"discord-reactions">;
|
|
744
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
745
|
+
kind: z.ZodLiteral<"telegram-messages">;
|
|
746
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
747
|
+
kind: z.ZodLiteral<"telegram-reactions">;
|
|
748
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
749
|
+
kind: z.ZodLiteral<"youtube-shorts">;
|
|
750
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
751
|
+
kind: z.ZodLiteral<"tiktok-videos">;
|
|
752
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
753
|
+
chain: z.ZodString;
|
|
754
|
+
token: z.ZodNullable<z.ZodString>;
|
|
755
|
+
kind: z.ZodLiteral<"wallet-balances">;
|
|
756
|
+
}, z.core.$strict>], "kind">>;
|
|
757
|
+
actionId: z.ZodString;
|
|
758
|
+
}, z.core.$strict>;
|
|
759
|
+
type TrackerUpdateInput = z.input<typeof trackerUpdateSchema>;
|
|
760
|
+
/** Pauses, resumes or refreshes a tracker, with an optional reason for the audit log. */
|
|
761
|
+
declare const trackerControlSchema: z.ZodObject<{
|
|
762
|
+
actionId: z.ZodString;
|
|
763
|
+
action: z.ZodEnum<{
|
|
764
|
+
pause: "pause";
|
|
765
|
+
resume: "resume";
|
|
766
|
+
refresh: "refresh";
|
|
767
|
+
}>;
|
|
768
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
769
|
+
}, z.core.$strict>;
|
|
770
|
+
/**
|
|
771
|
+
* An account a record names, of one of its custom source's identity kinds. `kind` may be left out
|
|
772
|
+
* when the source names exactly one.
|
|
773
|
+
*/
|
|
774
|
+
declare const trackerAccountSchema: z.ZodObject<{
|
|
775
|
+
kind: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
776
|
+
member: "member";
|
|
777
|
+
discord: "discord";
|
|
778
|
+
x: "x";
|
|
779
|
+
wallet: "wallet";
|
|
780
|
+
}>, z.ZodTemplateLiteral<`app:${string}`>]>>;
|
|
781
|
+
id: z.ZodString;
|
|
782
|
+
}, z.core.$strict>;
|
|
783
|
+
type TrackerAccount = z.infer<typeof trackerAccountSchema>;
|
|
784
|
+
declare const trackerRecordInputSchema: z.ZodObject<{
|
|
785
|
+
id: z.ZodString;
|
|
786
|
+
occurredAt: z.ZodNumber;
|
|
787
|
+
observedAt: z.ZodNumber;
|
|
788
|
+
author: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
789
|
+
id: z.ZodString;
|
|
790
|
+
verified: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
791
|
+
kind: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
792
|
+
member: "member";
|
|
793
|
+
discord: "discord";
|
|
794
|
+
x: "x";
|
|
795
|
+
wallet: "wallet";
|
|
796
|
+
}>, z.ZodTemplateLiteral<`app:${string}`>]>>;
|
|
797
|
+
}, z.core.$strict>>>;
|
|
798
|
+
accounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
799
|
+
kind: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
800
|
+
member: "member";
|
|
801
|
+
discord: "discord";
|
|
802
|
+
x: "x";
|
|
803
|
+
wallet: "wallet";
|
|
804
|
+
}>, z.ZodTemplateLiteral<`app:${string}`>]>>;
|
|
805
|
+
id: z.ZodString;
|
|
806
|
+
}, z.core.$strict>>>;
|
|
807
|
+
data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
808
|
+
removed: z.ZodDefault<z.ZodBoolean>;
|
|
809
|
+
}, z.core.$strict>;
|
|
810
|
+
/** A record account as reads return it: any kind, including one a later Relay adds. */
|
|
811
|
+
declare const trackerRecordAccountSchema: z.ZodObject<{
|
|
812
|
+
kind: z.ZodOptional<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>;
|
|
813
|
+
id: z.ZodString;
|
|
814
|
+
}, z.core.$strip>;
|
|
815
|
+
/**
|
|
816
|
+
* A stored record as reads return it. Unlike `trackerRecordInputSchema`, it reads identity kinds a
|
|
817
|
+
* later Relay adds and ignores fields it does not know.
|
|
818
|
+
*/
|
|
819
|
+
declare const trackerRecordSchema: z.ZodObject<{
|
|
820
|
+
id: z.ZodString;
|
|
821
|
+
occurredAt: z.ZodNumber;
|
|
822
|
+
observedAt: z.ZodNumber;
|
|
823
|
+
author: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
824
|
+
id: z.ZodString;
|
|
825
|
+
verified: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
826
|
+
kind: z.ZodOptional<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>;
|
|
827
|
+
}, z.core.$strip>>>;
|
|
828
|
+
accounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
829
|
+
kind: z.ZodOptional<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>;
|
|
830
|
+
id: z.ZodString;
|
|
831
|
+
}, z.core.$strip>>>;
|
|
832
|
+
data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
833
|
+
removed: z.ZodDefault<z.ZodBoolean>;
|
|
834
|
+
source: z.ZodString;
|
|
835
|
+
firstSeenAt: z.ZodNumber;
|
|
836
|
+
synthetic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
837
|
+
evidence: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
838
|
+
contentRevision: z.ZodString;
|
|
839
|
+
observation: z.ZodString;
|
|
840
|
+
}, z.core.$strict>>>;
|
|
841
|
+
}, z.core.$strip>;
|
|
842
|
+
type TrackerRecord = z.infer<typeof trackerRecordSchema>;
|
|
843
|
+
declare const trackerIngestSchema: z.ZodObject<{
|
|
844
|
+
actionId: z.ZodString;
|
|
845
|
+
records: z.ZodArray<z.ZodObject<{
|
|
846
|
+
id: z.ZodString;
|
|
847
|
+
occurredAt: z.ZodNumber;
|
|
848
|
+
observedAt: z.ZodNumber;
|
|
849
|
+
author: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
850
|
+
id: z.ZodString;
|
|
851
|
+
verified: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
852
|
+
kind: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
853
|
+
member: "member";
|
|
854
|
+
discord: "discord";
|
|
855
|
+
x: "x";
|
|
856
|
+
wallet: "wallet";
|
|
857
|
+
}>, z.ZodTemplateLiteral<`app:${string}`>]>>;
|
|
858
|
+
}, z.core.$strict>>>;
|
|
859
|
+
accounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
860
|
+
kind: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
861
|
+
member: "member";
|
|
862
|
+
discord: "discord";
|
|
863
|
+
x: "x";
|
|
864
|
+
wallet: "wallet";
|
|
865
|
+
}>, z.ZodTemplateLiteral<`app:${string}`>]>>;
|
|
866
|
+
id: z.ZodString;
|
|
867
|
+
}, z.core.$strict>>>;
|
|
868
|
+
data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
869
|
+
removed: z.ZodDefault<z.ZodBoolean>;
|
|
870
|
+
}, z.core.$strict>>;
|
|
871
|
+
}, z.core.$strict>;
|
|
872
|
+
declare const trackerIngestResultSchema: z.ZodObject<{
|
|
873
|
+
stored: z.ZodNumber;
|
|
874
|
+
admissions: z.ZodOptional<z.ZodObject<{
|
|
875
|
+
admitted: z.ZodNumber;
|
|
876
|
+
skipped: z.ZodNumber;
|
|
877
|
+
filtered: z.ZodOptional<z.ZodNumber>;
|
|
878
|
+
}, z.core.$strip>>;
|
|
879
|
+
}, z.core.$strip>;
|
|
880
|
+
/**
|
|
881
|
+
* Why a tracker trigger skipped an observation, as a stable machine code. Relay applies the rules
|
|
882
|
+
* in this order and records the first that fails. Later versions may add codes; treat an unknown
|
|
883
|
+
* code as a skip whose `reason` explains it.
|
|
884
|
+
*
|
|
885
|
+
* Relay decides a skip again on its own only when the member event that clears it happens:
|
|
886
|
+
* `unlinked-account` when a member links the account, `ambiguous-account` when a conflicting link
|
|
887
|
+
* is removed, `not-joined` when the member joins, `not-enrolled` when the member enrolls. Every
|
|
888
|
+
* other skip is final unless a reviewer retries it, or, for `historical` under
|
|
889
|
+
* `historical: "claim"`, the member claims it.
|
|
890
|
+
*/
|
|
891
|
+
declare const trackerSkipCodes: readonly ["quest-paused", "before-activation", "outside-window", "future-record", "record-removed", "invalid-record-data", "content-unavailable", "no-account", "beneficiary-is-author", "unlinked-account", "ambiguous-account", "not-joined", "already-completed", "not-enrolled", "before-enrollment", "historical", "prerequisites-incomplete"];
|
|
892
|
+
/**
|
|
893
|
+
* A skip code this SDK knows.
|
|
894
|
+
*
|
|
895
|
+
* @compat open
|
|
896
|
+
*/
|
|
897
|
+
type KnownTrackerSkipCode = (typeof trackerSkipCodes)[number];
|
|
898
|
+
/** A known skip code, or one a newer Relay sends. */
|
|
899
|
+
type TrackerSkipCode = KnownTrackerSkipCode | (string & {});
|
|
900
|
+
/**
|
|
901
|
+
* Which enrollment a `not-enrolled` skip lacks: `"quest"`, the quest's own (`enrollment:
|
|
902
|
+
* "required"` on its trigger), or `"campaign"`, the campaign the quest belongs to.
|
|
903
|
+
*
|
|
904
|
+
* @compat open
|
|
905
|
+
*/
|
|
906
|
+
type KnownSkipEnrollment = "quest" | "campaign";
|
|
907
|
+
/** A known enrollment, or one a newer Relay sends. */
|
|
908
|
+
type SkipEnrollment = KnownSkipEnrollment | (string & {});
|
|
909
|
+
/**
|
|
910
|
+
* One tracker-trigger decision: a quest admitted an attempt for a record observation, or skipped
|
|
911
|
+
* it with a code and reason. Operators read these to see why a quest did or did not run.
|
|
912
|
+
*/
|
|
913
|
+
declare const trackerOutcomeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
914
|
+
state: z.ZodLiteral<"admitted">;
|
|
915
|
+
code: z.ZodNull;
|
|
916
|
+
reason: z.ZodNull;
|
|
917
|
+
member: z.ZodString;
|
|
918
|
+
attempt: z.ZodString;
|
|
919
|
+
quest: z.ZodString;
|
|
920
|
+
tracker: z.ZodString;
|
|
921
|
+
record: z.ZodString;
|
|
922
|
+
observedAt: z.ZodNumber;
|
|
923
|
+
release: z.ZodString;
|
|
924
|
+
account: z.ZodNullable<z.ZodString>;
|
|
925
|
+
createdAt: z.ZodNumber;
|
|
926
|
+
updatedAt: z.ZodNumber;
|
|
927
|
+
actor: z.ZodNullable<z.ZodString>;
|
|
928
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
929
|
+
state: z.ZodLiteral<"skipped">;
|
|
930
|
+
code: z.ZodString;
|
|
931
|
+
reason: z.ZodString;
|
|
932
|
+
window: z.ZodOptional<z.ZodEnum<{
|
|
933
|
+
quest: "quest";
|
|
934
|
+
tracker: "tracker";
|
|
935
|
+
}>>;
|
|
936
|
+
enrollment: z.ZodOptional<z.ZodType<SkipEnrollment, unknown, z.core.$ZodTypeInternals<SkipEnrollment, unknown>>>;
|
|
937
|
+
member: z.ZodNullable<z.ZodString>;
|
|
938
|
+
attempt: z.ZodNullable<z.ZodString>;
|
|
939
|
+
quest: z.ZodString;
|
|
940
|
+
tracker: z.ZodString;
|
|
941
|
+
record: z.ZodString;
|
|
942
|
+
observedAt: z.ZodNumber;
|
|
943
|
+
release: z.ZodString;
|
|
944
|
+
account: z.ZodNullable<z.ZodString>;
|
|
945
|
+
createdAt: z.ZodNumber;
|
|
946
|
+
updatedAt: z.ZodNumber;
|
|
947
|
+
actor: z.ZodNullable<z.ZodString>;
|
|
948
|
+
}, z.core.$strip>], "state">;
|
|
949
|
+
type TrackerOutcome = z.infer<typeof trackerOutcomeSchema>;
|
|
950
|
+
/** Which of a tracker's trigger outcomes to read: filters, and a page's `nextCursor` as `cursor`. */
|
|
951
|
+
declare const trackerTriggerOutcomeQuerySchema: z.ZodObject<{
|
|
952
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
953
|
+
quest: z.ZodOptional<z.ZodString>;
|
|
954
|
+
record: z.ZodOptional<z.ZodString>;
|
|
955
|
+
member: z.ZodOptional<z.ZodString>;
|
|
956
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
957
|
+
admitted: "admitted";
|
|
958
|
+
skipped: "skipped";
|
|
959
|
+
}>>;
|
|
960
|
+
code: z.ZodOptional<z.ZodString>;
|
|
961
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
962
|
+
}, z.core.$strict>;
|
|
963
|
+
type TrackerTriggerOutcomeQuery = z.input<typeof trackerTriggerOutcomeQuerySchema>;
|
|
964
|
+
/** One page of a tracker's trigger outcomes, newest first. */
|
|
965
|
+
declare const trackerTriggerOutcomePageSchema: z.ZodObject<{
|
|
966
|
+
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
967
|
+
state: z.ZodLiteral<"admitted">;
|
|
968
|
+
code: z.ZodNull;
|
|
969
|
+
reason: z.ZodNull;
|
|
970
|
+
member: z.ZodString;
|
|
971
|
+
attempt: z.ZodString;
|
|
972
|
+
quest: z.ZodString;
|
|
973
|
+
tracker: z.ZodString;
|
|
974
|
+
record: z.ZodString;
|
|
975
|
+
observedAt: z.ZodNumber;
|
|
976
|
+
release: z.ZodString;
|
|
977
|
+
account: z.ZodNullable<z.ZodString>;
|
|
978
|
+
createdAt: z.ZodNumber;
|
|
979
|
+
updatedAt: z.ZodNumber;
|
|
980
|
+
actor: z.ZodNullable<z.ZodString>;
|
|
981
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
982
|
+
state: z.ZodLiteral<"skipped">;
|
|
983
|
+
code: z.ZodString;
|
|
984
|
+
reason: z.ZodString;
|
|
985
|
+
window: z.ZodOptional<z.ZodEnum<{
|
|
986
|
+
quest: "quest";
|
|
987
|
+
tracker: "tracker";
|
|
988
|
+
}>>;
|
|
989
|
+
enrollment: z.ZodOptional<z.ZodType<SkipEnrollment, unknown, z.core.$ZodTypeInternals<SkipEnrollment, unknown>>>;
|
|
990
|
+
member: z.ZodNullable<z.ZodString>;
|
|
991
|
+
attempt: z.ZodNullable<z.ZodString>;
|
|
992
|
+
quest: z.ZodString;
|
|
993
|
+
tracker: z.ZodString;
|
|
994
|
+
record: z.ZodString;
|
|
995
|
+
observedAt: z.ZodNumber;
|
|
996
|
+
release: z.ZodString;
|
|
997
|
+
account: z.ZodNullable<z.ZodString>;
|
|
998
|
+
createdAt: z.ZodNumber;
|
|
999
|
+
updatedAt: z.ZodNumber;
|
|
1000
|
+
actor: z.ZodNullable<z.ZodString>;
|
|
1001
|
+
}, z.core.$strip>], "state">>;
|
|
1002
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
1003
|
+
}, z.core.$strip>;
|
|
1004
|
+
/** @compat output */
|
|
1005
|
+
type TrackerTriggerOutcomePage = z.infer<typeof trackerTriggerOutcomePageSchema>;
|
|
1006
|
+
/** @deprecated Use `trackerTriggerOutcomeQuerySchema`. Removed in 2.0.0. */
|
|
1007
|
+
declare const trackerOutcomeQuerySchema: z.ZodObject<{
|
|
1008
|
+
before: z.ZodOptional<z.ZodString>;
|
|
1009
|
+
quest: z.ZodOptional<z.ZodString>;
|
|
1010
|
+
record: z.ZodOptional<z.ZodString>;
|
|
1011
|
+
member: z.ZodOptional<z.ZodString>;
|
|
1012
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
1013
|
+
admitted: "admitted";
|
|
1014
|
+
skipped: "skipped";
|
|
1015
|
+
}>>;
|
|
1016
|
+
code: z.ZodOptional<z.ZodString>;
|
|
1017
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
1018
|
+
}, z.core.$strict>;
|
|
1019
|
+
/** @deprecated Use `TrackerTriggerOutcomeQuery`. Removed in 2.0.0. */
|
|
1020
|
+
type TrackerOutcomeQuery = z.input<typeof trackerOutcomeQuerySchema>;
|
|
1021
|
+
/** @deprecated Use `trackerTriggerOutcomePageSchema`. Removed in 2.0.0. */
|
|
1022
|
+
declare const trackerOutcomePageSchema: z.ZodObject<{
|
|
1023
|
+
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1024
|
+
state: z.ZodLiteral<"admitted">;
|
|
1025
|
+
code: z.ZodNull;
|
|
1026
|
+
reason: z.ZodNull;
|
|
1027
|
+
member: z.ZodString;
|
|
1028
|
+
attempt: z.ZodString;
|
|
1029
|
+
quest: z.ZodString;
|
|
1030
|
+
tracker: z.ZodString;
|
|
1031
|
+
record: z.ZodString;
|
|
1032
|
+
observedAt: z.ZodNumber;
|
|
1033
|
+
release: z.ZodString;
|
|
1034
|
+
account: z.ZodNullable<z.ZodString>;
|
|
1035
|
+
createdAt: z.ZodNumber;
|
|
1036
|
+
updatedAt: z.ZodNumber;
|
|
1037
|
+
actor: z.ZodNullable<z.ZodString>;
|
|
1038
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1039
|
+
state: z.ZodLiteral<"skipped">;
|
|
1040
|
+
code: z.ZodString;
|
|
1041
|
+
reason: z.ZodString;
|
|
1042
|
+
window: z.ZodOptional<z.ZodEnum<{
|
|
1043
|
+
quest: "quest";
|
|
1044
|
+
tracker: "tracker";
|
|
1045
|
+
}>>;
|
|
1046
|
+
enrollment: z.ZodOptional<z.ZodType<SkipEnrollment, unknown, z.core.$ZodTypeInternals<SkipEnrollment, unknown>>>;
|
|
1047
|
+
member: z.ZodNullable<z.ZodString>;
|
|
1048
|
+
attempt: z.ZodNullable<z.ZodString>;
|
|
1049
|
+
quest: z.ZodString;
|
|
1050
|
+
tracker: z.ZodString;
|
|
1051
|
+
record: z.ZodString;
|
|
1052
|
+
observedAt: z.ZodNumber;
|
|
1053
|
+
release: z.ZodString;
|
|
1054
|
+
account: z.ZodNullable<z.ZodString>;
|
|
1055
|
+
createdAt: z.ZodNumber;
|
|
1056
|
+
updatedAt: z.ZodNumber;
|
|
1057
|
+
actor: z.ZodNullable<z.ZodString>;
|
|
1058
|
+
}, z.core.$strip>], "state">>;
|
|
1059
|
+
next: z.ZodNullable<z.ZodString>;
|
|
1060
|
+
}, z.core.$strict>;
|
|
1061
|
+
/** Re-runs admission for one skipped observation under the quest's current release and links. */
|
|
1062
|
+
declare const trackerOutcomeRetrySchema: z.ZodObject<{
|
|
1063
|
+
actionId: z.ZodString;
|
|
1064
|
+
quest: z.ZodString;
|
|
1065
|
+
record: z.ZodString;
|
|
1066
|
+
observedAt: z.ZodNumber;
|
|
1067
|
+
}, z.core.$strict>;
|
|
1068
|
+
declare const trackerQuerySchema: z.ZodObject<{
|
|
1069
|
+
author: z.ZodOptional<z.ZodString>;
|
|
1070
|
+
member: z.ZodOptional<z.ZodString>;
|
|
1071
|
+
verified: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodPipe<z.ZodEnum<{
|
|
1072
|
+
true: "true";
|
|
1073
|
+
false: "false";
|
|
1074
|
+
}>, z.ZodTransform<boolean, "true" | "false">>]>>;
|
|
1075
|
+
since: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
1076
|
+
until: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
1077
|
+
removed: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodPipe<z.ZodEnum<{
|
|
1078
|
+
true: "true";
|
|
1079
|
+
false: "false";
|
|
1080
|
+
}>, z.ZodTransform<boolean, "true" | "false">>]>>;
|
|
1081
|
+
minLikes: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
1082
|
+
minViews: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
1083
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
1084
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
1085
|
+
includeEvidence: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodPipe<z.ZodEnum<{
|
|
1086
|
+
true: "true";
|
|
1087
|
+
false: "false";
|
|
1088
|
+
}>, z.ZodTransform<boolean, "true" | "false">>]>>;
|
|
1089
|
+
}, z.core.$strict>;
|
|
1090
|
+
type TrackerQuery = z.input<typeof trackerQuerySchema>;
|
|
1091
|
+
declare const trackerPageSchema: z.ZodObject<{
|
|
1092
|
+
tracker: z.ZodString;
|
|
1093
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1094
|
+
id: z.ZodString;
|
|
1095
|
+
occurredAt: z.ZodNumber;
|
|
1096
|
+
observedAt: z.ZodNumber;
|
|
1097
|
+
author: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
1098
|
+
id: z.ZodString;
|
|
1099
|
+
verified: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
1100
|
+
kind: z.ZodOptional<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>;
|
|
1101
|
+
}, z.core.$strip>>>;
|
|
1102
|
+
accounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1103
|
+
kind: z.ZodOptional<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>;
|
|
1104
|
+
id: z.ZodString;
|
|
1105
|
+
}, z.core.$strip>>>;
|
|
1106
|
+
data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
1107
|
+
removed: z.ZodDefault<z.ZodBoolean>;
|
|
1108
|
+
source: z.ZodString;
|
|
1109
|
+
firstSeenAt: z.ZodNumber;
|
|
1110
|
+
synthetic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1111
|
+
evidence: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1112
|
+
contentRevision: z.ZodString;
|
|
1113
|
+
observation: z.ZodString;
|
|
1114
|
+
}, z.core.$strict>>>;
|
|
1115
|
+
}, z.core.$strip>>;
|
|
1116
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
1117
|
+
total: z.ZodNumber;
|
|
1118
|
+
status: z.ZodObject<{
|
|
1119
|
+
archivedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1120
|
+
published: z.ZodObject<{
|
|
1121
|
+
id: z.ZodString;
|
|
1122
|
+
version: z.ZodString;
|
|
1123
|
+
definition: z.ZodObject<{
|
|
1124
|
+
source: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1125
|
+
kind: z.ZodLiteral<"x-search">;
|
|
1126
|
+
query: z.ZodString;
|
|
1127
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1128
|
+
identities: z.ZodOptional<z.ZodArray<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>>;
|
|
1129
|
+
kind: z.ZodLiteral<"custom">;
|
|
1130
|
+
namespace: z.ZodString;
|
|
1131
|
+
accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1132
|
+
data: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodType<TrackerDataSchema, unknown, z.core.$ZodTypeInternals<TrackerDataSchema, unknown>>>>;
|
|
1133
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
1134
|
+
metrics: z.ZodArray<z.ZodString>;
|
|
1135
|
+
}, z.core.$strict>>;
|
|
1136
|
+
balance: z.ZodOptional<z.ZodObject<{
|
|
1137
|
+
chain: z.ZodString;
|
|
1138
|
+
token: z.ZodNullable<z.ZodString>;
|
|
1139
|
+
}, z.core.$strict>>;
|
|
1140
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1141
|
+
kind: z.ZodLiteral<"discord-messages">;
|
|
1142
|
+
text: z.ZodOptional<z.ZodBoolean>;
|
|
1143
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1144
|
+
kind: z.ZodLiteral<"discord-reactions">;
|
|
1145
|
+
}, z.core.$strip>], "kind">, z.ZodObject<{
|
|
1146
|
+
kind: z.ZodString;
|
|
1147
|
+
}, z.core.$catchall<z.ZodJSONSchema>>]>;
|
|
1148
|
+
window: z.ZodObject<{
|
|
1149
|
+
start: z.ZodNumber;
|
|
1150
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
1151
|
+
}, z.core.$strip>;
|
|
1152
|
+
key: z.ZodString;
|
|
1153
|
+
title: z.ZodString;
|
|
1154
|
+
refreshSeconds: z.ZodDefault<z.ZodNumber>;
|
|
1155
|
+
maxPages: z.ZodDefault<z.ZodNumber>;
|
|
1156
|
+
}, z.core.$strip>;
|
|
1157
|
+
publishedAt: z.ZodNumber;
|
|
1158
|
+
actor: z.ZodNullable<z.ZodString>;
|
|
1159
|
+
}, z.core.$strip>;
|
|
1160
|
+
paused: z.ZodBoolean;
|
|
1161
|
+
pauseReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1162
|
+
resumesAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1163
|
+
effectiveRefreshSeconds: z.ZodOptional<z.ZodNumber>;
|
|
1164
|
+
state: z.ZodEnum<{
|
|
1165
|
+
error: "error";
|
|
1166
|
+
complete: "complete";
|
|
1167
|
+
idle: "idle";
|
|
1168
|
+
syncing: "syncing";
|
|
1169
|
+
}>;
|
|
1170
|
+
lastStartedAt: z.ZodNullable<z.ZodNumber>;
|
|
1171
|
+
lastCompletedAt: z.ZodNullable<z.ZodNumber>;
|
|
1172
|
+
nextSyncAt: z.ZodNullable<z.ZodNumber>;
|
|
1173
|
+
coverage: z.ZodEnum<{
|
|
1174
|
+
unknown: "unknown";
|
|
1175
|
+
complete: "complete";
|
|
1176
|
+
partial: "partial";
|
|
1177
|
+
}>;
|
|
1178
|
+
error: z.ZodNullable<z.ZodString>;
|
|
1179
|
+
records: z.ZodNumber;
|
|
1180
|
+
origin: z.ZodOptional<z.ZodEnum<{
|
|
1181
|
+
code: "code";
|
|
1182
|
+
data: "data";
|
|
1183
|
+
}>>;
|
|
1184
|
+
}, z.core.$strip>;
|
|
1185
|
+
}, z.core.$strip>;
|
|
1186
|
+
declare const trackerSummarySchema: z.ZodObject<{
|
|
1187
|
+
records: z.ZodNumber;
|
|
1188
|
+
authors: z.ZodNumber;
|
|
1189
|
+
metrics: z.ZodObject<{
|
|
1190
|
+
likes: z.ZodNumber;
|
|
1191
|
+
replies: z.ZodNumber;
|
|
1192
|
+
reposts: z.ZodNumber;
|
|
1193
|
+
quotes: z.ZodNumber;
|
|
1194
|
+
views: z.ZodNumber;
|
|
1195
|
+
bookmarks: z.ZodNumber;
|
|
1196
|
+
}, z.core.$strip>;
|
|
1197
|
+
missingMetrics: z.ZodNumber;
|
|
1198
|
+
status: z.ZodObject<{
|
|
1199
|
+
archivedAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1200
|
+
published: z.ZodObject<{
|
|
1201
|
+
id: z.ZodString;
|
|
1202
|
+
version: z.ZodString;
|
|
1203
|
+
definition: z.ZodObject<{
|
|
1204
|
+
source: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1205
|
+
kind: z.ZodLiteral<"x-search">;
|
|
1206
|
+
query: z.ZodString;
|
|
1207
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1208
|
+
identities: z.ZodOptional<z.ZodArray<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>>;
|
|
1209
|
+
kind: z.ZodLiteral<"custom">;
|
|
1210
|
+
namespace: z.ZodString;
|
|
1211
|
+
accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1212
|
+
data: z.ZodOptional<z.ZodPipe<z.ZodUnknown, z.ZodType<TrackerDataSchema, unknown, z.core.$ZodTypeInternals<TrackerDataSchema, unknown>>>>;
|
|
1213
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
1214
|
+
metrics: z.ZodArray<z.ZodString>;
|
|
1215
|
+
}, z.core.$strict>>;
|
|
1216
|
+
balance: z.ZodOptional<z.ZodObject<{
|
|
1217
|
+
chain: z.ZodString;
|
|
1218
|
+
token: z.ZodNullable<z.ZodString>;
|
|
1219
|
+
}, z.core.$strict>>;
|
|
1220
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1221
|
+
kind: z.ZodLiteral<"discord-messages">;
|
|
1222
|
+
text: z.ZodOptional<z.ZodBoolean>;
|
|
1223
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1224
|
+
kind: z.ZodLiteral<"discord-reactions">;
|
|
1225
|
+
}, z.core.$strip>], "kind">, z.ZodObject<{
|
|
1226
|
+
kind: z.ZodString;
|
|
1227
|
+
}, z.core.$catchall<z.ZodJSONSchema>>]>;
|
|
1228
|
+
window: z.ZodObject<{
|
|
1229
|
+
start: z.ZodNumber;
|
|
1230
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
1231
|
+
}, z.core.$strip>;
|
|
1232
|
+
key: z.ZodString;
|
|
1233
|
+
title: z.ZodString;
|
|
1234
|
+
refreshSeconds: z.ZodDefault<z.ZodNumber>;
|
|
1235
|
+
maxPages: z.ZodDefault<z.ZodNumber>;
|
|
1236
|
+
}, z.core.$strip>;
|
|
1237
|
+
publishedAt: z.ZodNumber;
|
|
1238
|
+
actor: z.ZodNullable<z.ZodString>;
|
|
1239
|
+
}, z.core.$strip>;
|
|
1240
|
+
paused: z.ZodBoolean;
|
|
1241
|
+
pauseReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1242
|
+
resumesAt: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1243
|
+
effectiveRefreshSeconds: z.ZodOptional<z.ZodNumber>;
|
|
1244
|
+
state: z.ZodEnum<{
|
|
1245
|
+
error: "error";
|
|
1246
|
+
complete: "complete";
|
|
1247
|
+
idle: "idle";
|
|
1248
|
+
syncing: "syncing";
|
|
1249
|
+
}>;
|
|
1250
|
+
lastStartedAt: z.ZodNullable<z.ZodNumber>;
|
|
1251
|
+
lastCompletedAt: z.ZodNullable<z.ZodNumber>;
|
|
1252
|
+
nextSyncAt: z.ZodNullable<z.ZodNumber>;
|
|
1253
|
+
coverage: z.ZodEnum<{
|
|
1254
|
+
unknown: "unknown";
|
|
1255
|
+
complete: "complete";
|
|
1256
|
+
partial: "partial";
|
|
1257
|
+
}>;
|
|
1258
|
+
error: z.ZodNullable<z.ZodString>;
|
|
1259
|
+
records: z.ZodNumber;
|
|
1260
|
+
origin: z.ZodOptional<z.ZodEnum<{
|
|
1261
|
+
code: "code";
|
|
1262
|
+
data: "data";
|
|
1263
|
+
}>>;
|
|
1264
|
+
}, z.core.$strip>;
|
|
1265
|
+
}, z.core.$strip>;
|
|
1266
|
+
/** A record whose `data` has type `D`; untyped records keep JSON object data. */
|
|
1267
|
+
type TypedTrackerRecord<D> = unknown extends D ? TrackerRecord : Omit<TrackerRecord, "data"> & {
|
|
1268
|
+
data: D;
|
|
1269
|
+
};
|
|
1270
|
+
/**
|
|
1271
|
+
* A page of tracker records whose `data` has type `D`. A page read with a typed tracker handle
|
|
1272
|
+
* leaves out records whose data does not match the handle's schema, such as records stored before
|
|
1273
|
+
* the schema changed, and counts them in `excluded`; `total` and the cursor still count every
|
|
1274
|
+
* record.
|
|
1275
|
+
*/
|
|
1276
|
+
type TrackerPage<D = unknown> = Omit<z.infer<typeof trackerPageSchema>, "items"> & (unknown extends D ? {
|
|
1277
|
+
items: TrackerRecord[];
|
|
1278
|
+
} : {
|
|
1279
|
+
items: TypedTrackerRecord<D>[];
|
|
1280
|
+
excluded: number;
|
|
1281
|
+
});
|
|
1282
|
+
/**
|
|
1283
|
+
* Preview bounds: one sample, never stored, never a tracker.
|
|
1284
|
+
*
|
|
1285
|
+
* @deprecated Use `limits.trackerPreview`, which a 1.x release can raise.
|
|
1286
|
+
*/
|
|
1287
|
+
declare const trackerPreviewLimits: {
|
|
1288
|
+
readonly pages: 3;
|
|
1289
|
+
readonly posts: 100;
|
|
1290
|
+
readonly days: 30;
|
|
1291
|
+
};
|
|
1292
|
+
/** A bounded X search sample for exploring a query before defining a tracker in code. */
|
|
1293
|
+
declare const trackerPreviewInputSchema: z.ZodObject<{
|
|
1294
|
+
query: z.ZodString;
|
|
1295
|
+
since: z.ZodNumber;
|
|
1296
|
+
}, z.core.$strict>;
|
|
1297
|
+
type TrackerPreviewInput = z.input<typeof trackerPreviewInputSchema>;
|
|
1298
|
+
declare const trackerPreviewSchema: z.ZodObject<{
|
|
1299
|
+
query: z.ZodString;
|
|
1300
|
+
since: z.ZodNumber;
|
|
1301
|
+
fetchedAt: z.ZodNumber;
|
|
1302
|
+
pages: z.ZodNumber;
|
|
1303
|
+
posts: z.ZodArray<z.ZodObject<{
|
|
1304
|
+
id: z.ZodString;
|
|
1305
|
+
userId: z.ZodString;
|
|
1306
|
+
content: z.ZodString;
|
|
1307
|
+
createdAt: z.ZodISODateTime;
|
|
1308
|
+
author: z.ZodObject<{
|
|
1309
|
+
id: z.ZodString;
|
|
1310
|
+
username: z.ZodString;
|
|
1311
|
+
name: z.ZodString;
|
|
1312
|
+
verified: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
|
|
1313
|
+
}, z.core.$loose>;
|
|
1314
|
+
likeCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
1315
|
+
replyCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
1316
|
+
retweetCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
1317
|
+
quoteCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
1318
|
+
viewCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
1319
|
+
bookmarkCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
1320
|
+
isReply: z.ZodBoolean;
|
|
1321
|
+
isRetweet: z.ZodBoolean;
|
|
1322
|
+
isQuoteTweet: z.ZodBoolean;
|
|
1323
|
+
}, z.core.$loose>>;
|
|
1324
|
+
more: z.ZodBoolean;
|
|
1325
|
+
}, z.core.$strip>;
|
|
1326
|
+
type TrackerPreview = z.infer<typeof trackerPreviewSchema>;
|
|
1327
|
+
/**
|
|
1328
|
+
* A tracker read inside an evaluation: the management query plus `asOf`, in epoch milliseconds.
|
|
1329
|
+
* Only records that occurred at or before `asOf` count, each as its latest observation Relay had
|
|
1330
|
+
* stored when the attempt first read a tracker. `asOf` defaults to `ctx.eligibleAt`; pass
|
|
1331
|
+
* `ctx.now` to read everything stored by then.
|
|
1332
|
+
*/
|
|
1333
|
+
type TrackerReadQuery = TrackerQuery & {
|
|
1334
|
+
asOf?: number;
|
|
1335
|
+
};
|
|
1336
|
+
/**
|
|
1337
|
+
* Read-only capabilities in hosted quest evaluation; results are captured for replay. Every read
|
|
1338
|
+
* in one attempt sees the same stored observations: the attempt pins a snapshot watermark at its
|
|
1339
|
+
* first tracker read, so two reads cannot disagree and a retry reads what the first run read.
|
|
1340
|
+
* An unknown tracker, or a query the tracker cannot answer, throws `CapabilityError` with code
|
|
1341
|
+
* `"author-error"`.
|
|
1342
|
+
*/
|
|
1343
|
+
type TrackerReader = {
|
|
1344
|
+
/**
|
|
1345
|
+
* Captures an X body and attribution to the evaluating member, with no live metrics. Null when
|
|
1346
|
+
* the tracker has no such record or observation.
|
|
1347
|
+
*/
|
|
1348
|
+
content(reference: Tracker, query: TrackerContentQuery): Promise<TrackerContent | null>;
|
|
1349
|
+
/** A page of records; with a tracker handle, each record's `data` has the tracker's type. */
|
|
1350
|
+
records<T extends Tracker>(reference: T, query?: TrackerReadQuery): Promise<TrackerPage<TrackerData<T>>>;
|
|
1351
|
+
summary(reference: Tracker, query?: TrackerReadQuery): Promise<z.infer<typeof trackerSummarySchema>>;
|
|
1352
|
+
};
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* Which record observations fire a tracker trigger. `"new-record"`: the first observation of each
|
|
1356
|
+
* record this tracker collects. `"new-observation"`: every observation that becomes its record's
|
|
1357
|
+
* current one (a new record, or a later `observedAt`). `"data-changed"`: a new record, or a current
|
|
1358
|
+
* observation whose `data` differs from the record's previous one.
|
|
1359
|
+
*/
|
|
1360
|
+
declare const trackerTriggerModeSchema: z.ZodEnum<{
|
|
1361
|
+
"new-record": "new-record";
|
|
1362
|
+
"new-observation": "new-observation";
|
|
1363
|
+
"data-changed": "data-changed";
|
|
1364
|
+
}>;
|
|
1365
|
+
type TrackerTriggerMode = z.infer<typeof trackerTriggerModeSchema>;
|
|
1366
|
+
/**
|
|
1367
|
+
* Custom trackers fire on every new sample; X, Discord and Telegram trackers on each record they
|
|
1368
|
+
* collect, since a post, message or reaction is one event. Telegram's sources are custom sources
|
|
1369
|
+
* on reserved namespaces in SDK 1.x, so `namespace` names them. A published policy keeps the mode
|
|
1370
|
+
* it was published with.
|
|
1371
|
+
*/
|
|
1372
|
+
declare function defaultTriggerMode(source: string, namespace?: string): TrackerTriggerMode;
|
|
1373
|
+
/**
|
|
1374
|
+
* A bound in a tracker trigger filter: a number, or the quest's integer or amount setting of that
|
|
1375
|
+
* name. An amount setting (`settings.amount()`) holds a base-unit integer string, compared exactly.
|
|
1376
|
+
*/
|
|
1377
|
+
declare const trackerBoundSchema: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1378
|
+
setting: z.ZodString;
|
|
1379
|
+
}, z.core.$strict>]>;
|
|
1380
|
+
type TrackerBound = z.infer<typeof trackerBoundSchema>;
|
|
1381
|
+
/**
|
|
1382
|
+
* Which firing observations a tracker trigger admits, judged on the record's `data` before any
|
|
1383
|
+
* attribution. `equals` matches a string, number or boolean exactly. `gt`, `gte`, `lt` and `lte`
|
|
1384
|
+
* compare a number, or an integer string such as a base-unit balance, and all must hold. When
|
|
1385
|
+
* either side is an integer string the comparison is exact; a fractional number never equals one.
|
|
1386
|
+
* Observations that do not match are not trigger events: they record no outcome.
|
|
1387
|
+
*/
|
|
1388
|
+
declare const trackerConditionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1389
|
+
path: z.ZodString;
|
|
1390
|
+
equals: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
1391
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1392
|
+
path: z.ZodString;
|
|
1393
|
+
gt: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1394
|
+
setting: z.ZodString;
|
|
1395
|
+
}, z.core.$strict>]>>;
|
|
1396
|
+
gte: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1397
|
+
setting: z.ZodString;
|
|
1398
|
+
}, z.core.$strict>]>>;
|
|
1399
|
+
lt: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1400
|
+
setting: z.ZodString;
|
|
1401
|
+
}, z.core.$strict>]>>;
|
|
1402
|
+
lte: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1403
|
+
setting: z.ZodString;
|
|
1404
|
+
}, z.core.$strict>]>>;
|
|
1405
|
+
}, z.core.$strict>]>;
|
|
1406
|
+
type TrackerCondition = z.infer<typeof trackerConditionSchema>;
|
|
1407
|
+
/** One condition, or a list of conditions that must all hold. */
|
|
1408
|
+
declare const trackerWhereSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
1409
|
+
path: z.ZodString;
|
|
1410
|
+
equals: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
1411
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1412
|
+
path: z.ZodString;
|
|
1413
|
+
gt: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1414
|
+
setting: z.ZodString;
|
|
1415
|
+
}, z.core.$strict>]>>;
|
|
1416
|
+
gte: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1417
|
+
setting: z.ZodString;
|
|
1418
|
+
}, z.core.$strict>]>>;
|
|
1419
|
+
lt: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1420
|
+
setting: z.ZodString;
|
|
1421
|
+
}, z.core.$strict>]>>;
|
|
1422
|
+
lte: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1423
|
+
setting: z.ZodString;
|
|
1424
|
+
}, z.core.$strict>]>>;
|
|
1425
|
+
}, z.core.$strict>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1426
|
+
path: z.ZodString;
|
|
1427
|
+
equals: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
1428
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1429
|
+
path: z.ZodString;
|
|
1430
|
+
gt: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1431
|
+
setting: z.ZodString;
|
|
1432
|
+
}, z.core.$strict>]>>;
|
|
1433
|
+
gte: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1434
|
+
setting: z.ZodString;
|
|
1435
|
+
}, z.core.$strict>]>>;
|
|
1436
|
+
lt: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1437
|
+
setting: z.ZodString;
|
|
1438
|
+
}, z.core.$strict>]>>;
|
|
1439
|
+
lte: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1440
|
+
setting: z.ZodString;
|
|
1441
|
+
}, z.core.$strict>]>>;
|
|
1442
|
+
}, z.core.$strict>]>>]>;
|
|
1443
|
+
type TrackerWhere = z.infer<typeof trackerWhereSchema>;
|
|
1444
|
+
/** The conditions of a filter, as a list. */
|
|
1445
|
+
declare function whereConditions(where: TrackerWhere | undefined): TrackerCondition[];
|
|
1446
|
+
/** The settings a filter compares with. */
|
|
1447
|
+
declare function whereSettings(where: TrackerWhere | undefined): string[];
|
|
1448
|
+
type Scalar = string | number | boolean;
|
|
1449
|
+
type Lower = [never, 0, 1, 2, 3, 4];
|
|
1450
|
+
/** The declared string keys of an object type, leaving out index signatures. */
|
|
1451
|
+
type KnownKeys<D> = keyof {
|
|
1452
|
+
[K in keyof D as string extends K ? never : number extends K ? never : K extends string ? K : never]: 0;
|
|
1453
|
+
};
|
|
1454
|
+
type LeafEntries<K extends string, V, N extends number> = unknown extends V ? {
|
|
1455
|
+
path: K | `${K}.${string}`;
|
|
1456
|
+
value: Scalar;
|
|
1457
|
+
} : ([Extract<V, Scalar>] extends [never] ? never : {
|
|
1458
|
+
path: K;
|
|
1459
|
+
value: Extract<V, Scalar>;
|
|
1460
|
+
}) | (DataLeaves<Exclude<V, Scalar | null | undefined>, Lower[N]> extends infer E ? E extends {
|
|
1461
|
+
path: infer P extends string;
|
|
1462
|
+
value: infer T;
|
|
1463
|
+
} ? {
|
|
1464
|
+
path: `${K}.${P}`;
|
|
1465
|
+
value: T;
|
|
1466
|
+
} : never : never);
|
|
1467
|
+
/**
|
|
1468
|
+
* Every dot-separated path into `D` that ends at a string, number or boolean, with the value
|
|
1469
|
+
* there, to five levels deep. A record (`z.record`) takes any key; an object with declared keys
|
|
1470
|
+
* takes only those. Arrays end a path: filters do not index into them.
|
|
1471
|
+
*/
|
|
1472
|
+
type DataLeaves<D, N extends number = 5> = [N] extends [never] ? never : D extends readonly unknown[] ? never : D extends object ? [KnownKeys<D>] extends [never] ? string extends keyof D ? LeafEntries<string, D[string & keyof D], N> : never : {
|
|
1473
|
+
[K in KnownKeys<D> & keyof D]-?: LeafEntries<K & string, D[K], N>;
|
|
1474
|
+
}[KnownKeys<D> & keyof D] : never;
|
|
1475
|
+
/** A filter bound: a number, or the quest's integer or amount setting `S`. */
|
|
1476
|
+
type Bound<S extends string = string> = number | {
|
|
1477
|
+
setting: S;
|
|
1478
|
+
};
|
|
1479
|
+
type Comparison<S extends string> = {
|
|
1480
|
+
equals?: never;
|
|
1481
|
+
gt?: Bound<S>;
|
|
1482
|
+
gte?: Bound<S>;
|
|
1483
|
+
lt?: Bound<S>;
|
|
1484
|
+
lte?: Bound<S>;
|
|
1485
|
+
};
|
|
1486
|
+
/**
|
|
1487
|
+
* One filter condition on records whose `data` is `D`: `path` names a field, `equals` takes a
|
|
1488
|
+
* value that field can hold, and comparisons need a number or string (integer string) field.
|
|
1489
|
+
* Untyped data takes any path.
|
|
1490
|
+
*/
|
|
1491
|
+
type Condition<D, S extends string = string> = unknown extends D ? TrackerCondition : DataLeaves<D> extends infer E ? E extends {
|
|
1492
|
+
path: infer P;
|
|
1493
|
+
value: infer V;
|
|
1494
|
+
} ? {
|
|
1495
|
+
path: P;
|
|
1496
|
+
equals: V;
|
|
1497
|
+
gt?: never;
|
|
1498
|
+
gte?: never;
|
|
1499
|
+
lt?: never;
|
|
1500
|
+
lte?: never;
|
|
1501
|
+
} | ([Extract<V, number | string>] extends [never] ? never : {
|
|
1502
|
+
path: P;
|
|
1503
|
+
} & Comparison<S>) : never : never;
|
|
1504
|
+
/** A typed filter: one condition, or a list of at most 10 conditions that must all hold. */
|
|
1505
|
+
type Where<D, S extends string = string> = Condition<D, S> | readonly [Condition<D, S>, ...Condition<D, S>[]];
|
|
1506
|
+
type BoundSetting<B> = B extends {
|
|
1507
|
+
setting: infer S extends string;
|
|
1508
|
+
} ? S : never;
|
|
1509
|
+
/** The setting names a filter compares with. */
|
|
1510
|
+
type WhereSetting<W> = W extends readonly (infer C)[] ? WhereSetting<C> : W extends object ? {
|
|
1511
|
+
[K in "gt" | "gte" | "lt" | "lte"]: K extends keyof W ? BoundSetting<W[K]> : never;
|
|
1512
|
+
}["gt" | "gte" | "lt" | "lte"] : never;
|
|
1513
|
+
/**
|
|
1514
|
+
* Whether members must enroll in the quest (`relay.quests.enroll`) before their activity counts.
|
|
1515
|
+
* `"none"`, the default, counts every member who has joined the project.
|
|
1516
|
+
*/
|
|
1517
|
+
declare const triggerEnrollmentSchema: z.ZodEnum<{
|
|
1518
|
+
none: "none";
|
|
1519
|
+
required: "required";
|
|
1520
|
+
}>;
|
|
1521
|
+
type TriggerEnrollment = z.infer<typeof triggerEnrollmentSchema>;
|
|
1522
|
+
/**
|
|
1523
|
+
* The earliest activity a tracker trigger considers. `"activation"`, the default: records that
|
|
1524
|
+
* occurred since the quest was published (or last unarchived), others skipped with
|
|
1525
|
+
* `before-activation`. `"window"`: every record in the tracker's window. `"enrollment"`, with
|
|
1526
|
+
* required enrollment: records that occurred since the member enrolled, others skipped with
|
|
1527
|
+
* `before-enrollment`.
|
|
1528
|
+
*/
|
|
1529
|
+
declare const triggerSinceSchema: z.ZodEnum<{
|
|
1530
|
+
window: "window";
|
|
1531
|
+
activation: "activation";
|
|
1532
|
+
enrollment: "enrollment";
|
|
1533
|
+
}>;
|
|
1534
|
+
type TriggerSince = z.infer<typeof triggerSinceSchema>;
|
|
1535
|
+
/**
|
|
1536
|
+
* Who releases historical activity: a record that occurred before the member linked the account
|
|
1537
|
+
* it pays (an unknown link time counts as before), or before the member enrolled. `"staff"`: only
|
|
1538
|
+
* a reviewer's retry. `"claim"`: also the member, with `relay.quests.claim`. `"automatic"`: Relay
|
|
1539
|
+
* admits it like any other activity.
|
|
1540
|
+
*/
|
|
1541
|
+
declare const triggerHistoricalSchema: z.ZodEnum<{
|
|
1542
|
+
staff: "staff";
|
|
1543
|
+
claim: "claim";
|
|
1544
|
+
automatic: "automatic";
|
|
1545
|
+
}>;
|
|
1546
|
+
type TriggerHistorical = z.infer<typeof triggerHistoricalSchema>;
|
|
1547
|
+
/**
|
|
1548
|
+
* A quest's tracker trigger as published: bound to the tracker's stable ID at publication.
|
|
1549
|
+
* Authoring materializes the firing mode so the stored policy is unambiguous.
|
|
1550
|
+
*/
|
|
1551
|
+
declare const trackerTriggerPolicySchema: z.ZodObject<{
|
|
1552
|
+
tracker: z.ZodString;
|
|
1553
|
+
source: z.ZodString;
|
|
1554
|
+
on: z.ZodEnum<{
|
|
1555
|
+
"new-record": "new-record";
|
|
1556
|
+
"new-observation": "new-observation";
|
|
1557
|
+
"data-changed": "data-changed";
|
|
1558
|
+
}>;
|
|
1559
|
+
where: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
1560
|
+
path: z.ZodString;
|
|
1561
|
+
equals: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
1562
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1563
|
+
path: z.ZodString;
|
|
1564
|
+
gt: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1565
|
+
setting: z.ZodString;
|
|
1566
|
+
}, z.core.$strict>]>>;
|
|
1567
|
+
gte: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1568
|
+
setting: z.ZodString;
|
|
1569
|
+
}, z.core.$strict>]>>;
|
|
1570
|
+
lt: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1571
|
+
setting: z.ZodString;
|
|
1572
|
+
}, z.core.$strict>]>>;
|
|
1573
|
+
lte: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1574
|
+
setting: z.ZodString;
|
|
1575
|
+
}, z.core.$strict>]>>;
|
|
1576
|
+
}, z.core.$strict>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1577
|
+
path: z.ZodString;
|
|
1578
|
+
equals: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
1579
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1580
|
+
path: z.ZodString;
|
|
1581
|
+
gt: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1582
|
+
setting: z.ZodString;
|
|
1583
|
+
}, z.core.$strict>]>>;
|
|
1584
|
+
gte: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1585
|
+
setting: z.ZodString;
|
|
1586
|
+
}, z.core.$strict>]>>;
|
|
1587
|
+
lt: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1588
|
+
setting: z.ZodString;
|
|
1589
|
+
}, z.core.$strict>]>>;
|
|
1590
|
+
lte: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
1591
|
+
setting: z.ZodString;
|
|
1592
|
+
}, z.core.$strict>]>>;
|
|
1593
|
+
}, z.core.$strict>]>>]>>;
|
|
1594
|
+
beneficiary: z.ZodString;
|
|
1595
|
+
enrollment: z.ZodOptional<z.ZodEnum<{
|
|
1596
|
+
none: "none";
|
|
1597
|
+
required: "required";
|
|
1598
|
+
}>>;
|
|
1599
|
+
since: z.ZodOptional<z.ZodEnum<{
|
|
1600
|
+
window: "window";
|
|
1601
|
+
activation: "activation";
|
|
1602
|
+
enrollment: "enrollment";
|
|
1603
|
+
}>>;
|
|
1604
|
+
historical: z.ZodOptional<z.ZodEnum<{
|
|
1605
|
+
staff: "staff";
|
|
1606
|
+
claim: "claim";
|
|
1607
|
+
automatic: "automatic";
|
|
1608
|
+
}>>;
|
|
1609
|
+
content: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1610
|
+
}, z.core.$strict>;
|
|
1611
|
+
type TrackerTriggerPolicy = z.infer<typeof trackerTriggerPolicySchema>;
|
|
1612
|
+
/** The firing mode a published policy uses. */
|
|
1613
|
+
declare function triggerMode(policy: Pick<TrackerTriggerPolicy, "on">): TrackerTriggerMode;
|
|
1614
|
+
/** A published policy's admission options, with their defaults filled in. */
|
|
1615
|
+
declare function triggerAdmission(policy: Pick<TrackerTriggerPolicy, "enrollment" | "since" | "historical" | "content">): {
|
|
1616
|
+
enrollment: TriggerEnrollment;
|
|
1617
|
+
since: TriggerSince;
|
|
1618
|
+
historical: TriggerHistorical;
|
|
1619
|
+
};
|
|
1620
|
+
/** The record role a published policy pays. */
|
|
1621
|
+
declare function beneficiaryRole(policy: Pick<TrackerTriggerPolicy, "beneficiary">): AccountRole;
|
|
1622
|
+
/**
|
|
1623
|
+
* Who the record pays and through which verified link, captured at admission. `account.provider`
|
|
1624
|
+
* is the beneficiary account's identity kind. A kind a later Relay adds reads as the last variant,
|
|
1625
|
+
* `{ provider: string }`, so branch on `provider` with a default branch.
|
|
1626
|
+
*/
|
|
1627
|
+
declare const trackerAttributionSchema: z.ZodObject<{
|
|
1628
|
+
member: z.ZodString;
|
|
1629
|
+
capturedAt: z.ZodNumber;
|
|
1630
|
+
account: z.ZodUnion<readonly [z.ZodObject<{
|
|
1631
|
+
provider: z.ZodLiteral<"wallet">;
|
|
1632
|
+
id: z.ZodString;
|
|
1633
|
+
revision: z.ZodNumber;
|
|
1634
|
+
linkedAt: z.ZodNullable<z.ZodNumber>;
|
|
1635
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1636
|
+
issuer: z.ZodString;
|
|
1637
|
+
subject: z.ZodString;
|
|
1638
|
+
revision: z.ZodNumber;
|
|
1639
|
+
linkedAt: z.ZodNullable<z.ZodNumber>;
|
|
1640
|
+
provider: z.ZodLiteral<"x">;
|
|
1641
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1642
|
+
issuer: z.ZodString;
|
|
1643
|
+
subject: z.ZodString;
|
|
1644
|
+
revision: z.ZodNumber;
|
|
1645
|
+
linkedAt: z.ZodNullable<z.ZodNumber>;
|
|
1646
|
+
provider: z.ZodLiteral<"discord">;
|
|
1647
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1648
|
+
provider: z.ZodLiteral<"member">;
|
|
1649
|
+
id: z.ZodString;
|
|
1650
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1651
|
+
provider: z.ZodTemplateLiteral<`app:${string}`>;
|
|
1652
|
+
subject: z.ZodString;
|
|
1653
|
+
revision: z.ZodNumber;
|
|
1654
|
+
linkedAt: z.ZodNullable<z.ZodNumber>;
|
|
1655
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1656
|
+
provider: z.ZodString;
|
|
1657
|
+
}, z.core.$strip>]>;
|
|
1658
|
+
}, z.core.$strip>;
|
|
1659
|
+
type TrackerAttribution = z.infer<typeof trackerAttributionSchema>;
|
|
1660
|
+
/** The record observation that triggered the attempt, as stored. */
|
|
1661
|
+
declare const trackerTriggerRecordSchema: z.ZodObject<{
|
|
1662
|
+
id: z.ZodString;
|
|
1663
|
+
source: z.ZodString;
|
|
1664
|
+
occurredAt: z.ZodNumber;
|
|
1665
|
+
observedAt: z.ZodNumber;
|
|
1666
|
+
firstSeenAt: z.ZodNumber;
|
|
1667
|
+
author: z.ZodNullable<z.ZodObject<{
|
|
1668
|
+
id: z.ZodString;
|
|
1669
|
+
verified: z.ZodNullable<z.ZodBoolean>;
|
|
1670
|
+
kind: z.ZodOptional<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>;
|
|
1671
|
+
}, z.core.$strip>>;
|
|
1672
|
+
accounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1673
|
+
kind: z.ZodOptional<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>;
|
|
1674
|
+
id: z.ZodString;
|
|
1675
|
+
}, z.core.$strip>>>;
|
|
1676
|
+
data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
1677
|
+
removed: z.ZodBoolean;
|
|
1678
|
+
}, z.core.$strip>;
|
|
1679
|
+
/** The captured content of one observation: the body, its revision, and the observation. */
|
|
1680
|
+
declare const trackerContentStageSchema: z.ZodObject<{
|
|
1681
|
+
revision: z.ZodString;
|
|
1682
|
+
observation: z.ZodString;
|
|
1683
|
+
body: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
1684
|
+
}, z.core.$strip>;
|
|
1685
|
+
/** Immutable admission input of a tracker-triggered attempt: the pinned observation and who it pays. */
|
|
1686
|
+
declare const trackerTriggerContextSchema: z.ZodObject<{
|
|
1687
|
+
tracker: z.ZodString;
|
|
1688
|
+
key: z.ZodString;
|
|
1689
|
+
beneficiary: z.ZodString;
|
|
1690
|
+
record: z.ZodObject<{
|
|
1691
|
+
id: z.ZodString;
|
|
1692
|
+
source: z.ZodString;
|
|
1693
|
+
occurredAt: z.ZodNumber;
|
|
1694
|
+
observedAt: z.ZodNumber;
|
|
1695
|
+
firstSeenAt: z.ZodNumber;
|
|
1696
|
+
author: z.ZodNullable<z.ZodObject<{
|
|
1697
|
+
id: z.ZodString;
|
|
1698
|
+
verified: z.ZodNullable<z.ZodBoolean>;
|
|
1699
|
+
kind: z.ZodOptional<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>;
|
|
1700
|
+
}, z.core.$strip>>;
|
|
1701
|
+
accounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1702
|
+
kind: z.ZodOptional<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>;
|
|
1703
|
+
id: z.ZodString;
|
|
1704
|
+
}, z.core.$strip>>>;
|
|
1705
|
+
data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
1706
|
+
removed: z.ZodBoolean;
|
|
1707
|
+
}, z.core.$strip>;
|
|
1708
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
1709
|
+
revision: z.ZodString;
|
|
1710
|
+
observation: z.ZodString;
|
|
1711
|
+
body: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
1712
|
+
}, z.core.$strip>>;
|
|
1713
|
+
attribution: z.ZodObject<{
|
|
1714
|
+
member: z.ZodString;
|
|
1715
|
+
capturedAt: z.ZodNumber;
|
|
1716
|
+
account: z.ZodUnion<readonly [z.ZodObject<{
|
|
1717
|
+
provider: z.ZodLiteral<"wallet">;
|
|
1718
|
+
id: z.ZodString;
|
|
1719
|
+
revision: z.ZodNumber;
|
|
1720
|
+
linkedAt: z.ZodNullable<z.ZodNumber>;
|
|
1721
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1722
|
+
issuer: z.ZodString;
|
|
1723
|
+
subject: z.ZodString;
|
|
1724
|
+
revision: z.ZodNumber;
|
|
1725
|
+
linkedAt: z.ZodNullable<z.ZodNumber>;
|
|
1726
|
+
provider: z.ZodLiteral<"x">;
|
|
1727
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1728
|
+
issuer: z.ZodString;
|
|
1729
|
+
subject: z.ZodString;
|
|
1730
|
+
revision: z.ZodNumber;
|
|
1731
|
+
linkedAt: z.ZodNullable<z.ZodNumber>;
|
|
1732
|
+
provider: z.ZodLiteral<"discord">;
|
|
1733
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1734
|
+
provider: z.ZodLiteral<"member">;
|
|
1735
|
+
id: z.ZodString;
|
|
1736
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1737
|
+
provider: z.ZodTemplateLiteral<`app:${string}`>;
|
|
1738
|
+
subject: z.ZodString;
|
|
1739
|
+
revision: z.ZodNumber;
|
|
1740
|
+
linkedAt: z.ZodNullable<z.ZodNumber>;
|
|
1741
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1742
|
+
provider: z.ZodString;
|
|
1743
|
+
}, z.core.$strip>]>;
|
|
1744
|
+
}, z.core.$strip>;
|
|
1745
|
+
enrolledAt: z.ZodOptional<z.ZodNumber>;
|
|
1746
|
+
}, z.core.$strip>;
|
|
1747
|
+
/**
|
|
1748
|
+
* The pinned observation of a tracker-triggered attempt. With a typed tracker, `record.data` has
|
|
1749
|
+
* the tracker's data type: ingestion validated it against the tracker's schema.
|
|
1750
|
+
*/
|
|
1751
|
+
type ContextShape = z.infer<typeof trackerTriggerContextSchema>;
|
|
1752
|
+
type ContextRecord<D> = unknown extends D ? {
|
|
1753
|
+
record: ContextShape["record"];
|
|
1754
|
+
} : {
|
|
1755
|
+
record: Omit<ContextShape["record"], "data"> & {
|
|
1756
|
+
data: D;
|
|
1757
|
+
};
|
|
1758
|
+
};
|
|
1759
|
+
type ContextContent<B> = [B] extends [never] ? {
|
|
1760
|
+
content?: ContextShape["content"];
|
|
1761
|
+
} : {
|
|
1762
|
+
content: Omit<NonNullable<ContextShape["content"]>, "body"> & {
|
|
1763
|
+
body: B;
|
|
1764
|
+
};
|
|
1765
|
+
};
|
|
1766
|
+
/**
|
|
1767
|
+
* The pinned observation of a tracker-triggered attempt. With a typed tracker, `record.data` has
|
|
1768
|
+
* the tracker's data type: ingestion validated it against the tracker's schema. On a content
|
|
1769
|
+
* source, `content.body` has the source's body type.
|
|
1770
|
+
*/
|
|
1771
|
+
type TrackerTriggerContext<D = unknown, B = never> = Omit<ContextShape, "record" | "content"> & ContextRecord<D> & ContextContent<B>;
|
|
1772
|
+
|
|
1773
|
+
/**
|
|
1774
|
+
* The serializable form of a custom tracker's record `data` schema: a subset of JSON Schema
|
|
1775
|
+
* (draft 2020-12) that `customSource(namespace, { data })` derives from a zod schema. It is stored
|
|
1776
|
+
* with the tracker definition, and ingestion validates each record's `data` against it. The subset
|
|
1777
|
+
* leaves out string patterns and formats, whose regular expressions Relay would otherwise run on
|
|
1778
|
+
* every ingested record, and every keyword whose meaning needs references or evaluation state.
|
|
1779
|
+
*/
|
|
1780
|
+
type TrackerDataSchema = {
|
|
1781
|
+
type?: "object" | "array" | "string" | "number" | "integer" | "boolean" | "null";
|
|
1782
|
+
properties?: Record<string, TrackerDataSchema>;
|
|
1783
|
+
required?: string[];
|
|
1784
|
+
additionalProperties?: boolean | TrackerDataSchema;
|
|
1785
|
+
propertyNames?: {
|
|
1786
|
+
type: "string";
|
|
1787
|
+
enum?: string[];
|
|
1788
|
+
};
|
|
1789
|
+
items?: TrackerDataSchema;
|
|
1790
|
+
minItems?: number;
|
|
1791
|
+
maxItems?: number;
|
|
1792
|
+
minLength?: number;
|
|
1793
|
+
maxLength?: number;
|
|
1794
|
+
minimum?: number;
|
|
1795
|
+
maximum?: number;
|
|
1796
|
+
exclusiveMinimum?: number;
|
|
1797
|
+
exclusiveMaximum?: number;
|
|
1798
|
+
enum?: (string | number | boolean | null)[];
|
|
1799
|
+
const?: string | number | boolean | null;
|
|
1800
|
+
anyOf?: TrackerDataSchema[];
|
|
1801
|
+
oneOf?: TrackerDataSchema[];
|
|
1802
|
+
allOf?: TrackerDataSchema[];
|
|
1803
|
+
};
|
|
1804
|
+
/**
|
|
1805
|
+
* The most branches one union may list.
|
|
1806
|
+
*
|
|
1807
|
+
* @deprecated Use `limits.trackerData.branches`, which a 1.x release can raise.
|
|
1808
|
+
*/
|
|
1809
|
+
declare const trackerDataMaxBranches = 16;
|
|
1810
|
+
/**
|
|
1811
|
+
* The most properties, `required` keys, enum values or allowed key names one schema node lists.
|
|
1812
|
+
*
|
|
1813
|
+
* @deprecated Use `limits.trackerData.entries`, which a 1.x release can raise.
|
|
1814
|
+
*/
|
|
1815
|
+
declare const trackerDataMaxEntries = 256;
|
|
1816
|
+
/**
|
|
1817
|
+
* A stored tracker data schema: an object schema in the supported subset, at most 32 KB and
|
|
1818
|
+
* nested at most 16 levels deep, whose unions list at most 16 branches and, inside another union's
|
|
1819
|
+
* branch, at most one branch with properties, items or unions of its own, and whose nodes list at
|
|
1820
|
+
* most 256 properties, `required` keys, enum values or allowed key names.
|
|
1821
|
+
*/
|
|
1822
|
+
declare const trackerDataSchemaSchema: z.ZodPipe<z.ZodUnknown, z.ZodType<TrackerDataSchema, unknown, z.core.$ZodTypeInternals<TrackerDataSchema, unknown>>>;
|
|
1823
|
+
/**
|
|
1824
|
+
* Converts a zod object schema into the tracker data subset. Throws, naming the field, for types
|
|
1825
|
+
* JSON cannot carry (dates, bigints), for refinements and transforms, which Relay cannot run at
|
|
1826
|
+
* ingestion, and for string patterns and formats.
|
|
1827
|
+
*/
|
|
1828
|
+
declare function trackerDataSchema(schema: z.ZodType): TrackerDataSchema;
|
|
1829
|
+
/**
|
|
1830
|
+
* Why a record's data does not match its tracker's schema. `too-complex` means validation spent
|
|
1831
|
+
* its step budget before deciding.
|
|
1832
|
+
*/
|
|
1833
|
+
type TrackerDataIssue = {
|
|
1834
|
+
kind: "mismatch" | "too-complex";
|
|
1835
|
+
path: string;
|
|
1836
|
+
reason: string;
|
|
1837
|
+
};
|
|
1838
|
+
/**
|
|
1839
|
+
* Validation steps one record may use. Every unit of work costs a step: each schema node visited
|
|
1840
|
+
* for a value, each object key and `required` key checked, each literal property scanned, each enum
|
|
1841
|
+
* lookup. A step costs well under a microsecond, so one record stays within tens of milliseconds.
|
|
1842
|
+
*/
|
|
1843
|
+
declare const trackerDataRecordSteps = 250000;
|
|
1844
|
+
/** Validation steps one ingest batch, or one page of records, may use across its records. */
|
|
1845
|
+
declare const trackerDataBatchSteps = 6000000;
|
|
1846
|
+
/** A step allowance that validation draws down; share one across a batch. */
|
|
1847
|
+
type TrackerDataBudget = {
|
|
1848
|
+
steps: number;
|
|
1849
|
+
};
|
|
1850
|
+
/**
|
|
1851
|
+
* The first way a record's `data` fails its tracker's schema, or null when it matches. Validation
|
|
1852
|
+
* draws on `budget`, which defaults to one record's allowance; when it runs out the result is a
|
|
1853
|
+
* `too-complex` issue rather than a decision.
|
|
1854
|
+
*/
|
|
1855
|
+
declare function trackerDataIssue(schema: TrackerDataSchema, data: unknown, budget?: TrackerDataBudget): TrackerDataIssue | null;
|
|
1856
|
+
/**
|
|
1857
|
+
* Validates several records' data on one shared allowance: each record may use at most one
|
|
1858
|
+
* record's steps, and all of them together at most one batch's. Returns each record's issue, in
|
|
1859
|
+
* order; once the allowance is spent, every remaining record is `too-complex`.
|
|
1860
|
+
*/
|
|
1861
|
+
declare function trackerDataIssues(schema: TrackerDataSchema, records: readonly unknown[]): (TrackerDataIssue | null)[];
|
|
1862
|
+
/**
|
|
1863
|
+
* The JSON types the value at a dot-separated `data` path can have under the schema, or null when
|
|
1864
|
+
* the schema declares no such path. A key must be a declared property, or fall under a record's or
|
|
1865
|
+
* loose object's value schema; an unconstrained value (`z.unknown()`) has every path and type.
|
|
1866
|
+
*/
|
|
1867
|
+
declare function trackerDataPathTypes(schema: TrackerDataSchema, path: string): Set<string> | null;
|
|
1868
|
+
/**
|
|
1869
|
+
* Wraps a reader so `records(handle)` returns only records whose data matches the handle's data
|
|
1870
|
+
* schema, the one the quest's types come from, and counts the rest in `excluded`. Reads by key
|
|
1871
|
+
* string and of managed trackers (X and Discord), whose records Relay writes, pass through.
|
|
1872
|
+
*/
|
|
1873
|
+
declare function schemaCheckedReader(reader: TrackerReader): TrackerReader;
|
|
1874
|
+
/**
|
|
1875
|
+
* Why a filter cannot match records of a tracker's declared data schema, or null when it can: each
|
|
1876
|
+
* path must be declared, `equals` must name a value its field can hold, and a comparison needs a
|
|
1877
|
+
* number or string field.
|
|
1878
|
+
*/
|
|
1879
|
+
declare function whereSchemaIssue(schema: TrackerDataSchema, where: TrackerWhere | undefined): string | null;
|
|
1880
|
+
|
|
1881
|
+
export { type AppIdentityKind as $, type ReferralHandle as A, type TrackerTriggerContext as B, type TrackerReader as C, type TrackerTriggerMode as D, type RoleOf as E, type WhereSetting as F, type GroupHandle as G, type ContentBody as H, type IdentityKind as I, type BadgeHandle as J, type KnownSkipEnrollment as K, type LedgerReference as L, type MemberIdentity as M, type ContentMetricName as N, type OpenIdentityKind as O, type LedgerSetting as P, type QuestHandle as Q, type ResourceHandle as R, type SkipEnrollment as S, type TrackerSkipCode as T, type TrackerPage as U, type TrackerReadQuery as V, type WithRecordData as W, type XTweet as X, trackerDataSchema as Y, trackerTriggerContextSchema as Z, type AccountRole as _, type KnownTrackerSkipCode as a, trackerDataMaxBranches as a$, type Bound as a0, type Condition as a1, type DataLeaves as a2, type KnownIdentityKind as a3, type ManagedTrackerCreateInput as a4, type ManagedTrackerSource as a5, type ManagedTrackerSourceKind as a6, type TrackerAccount as a7, type TrackerAttribution as a8, type TrackerBound as a9, beneficiaryRole as aA, contentMetricNameSchema as aB, customContentSchema as aC, defaultTriggerMode as aD, identityKindSchema as aE, isAppIdentityKind as aF, isKnownTrackerSource as aG, knownIdentityKinds as aH, managedTrackerCreateSchema as aI, managedTrackerSource as aJ, managedTrackerSourceKinds as aK, managedTrackerSourceSchema as aL, memberIdentitySchema as aM, openIdentityKindSchema as aN, publishedTrackerSchema as aO, sourceIdentities as aP, trackerAccountSchema as aQ, trackerArtifactSchema as aR, trackerAttributionSchema as aS, trackerBoundSchema as aT, trackerConditionSchema as aU, trackerContentQuerySchema as aV, trackerContentReadSchema as aW, trackerContentSchema as aX, trackerContentStageSchema as aY, trackerControlSchema as aZ, trackerCreateSchema as a_, type TrackerCondition as aa, type TrackerContent as ab, type TrackerContentQuery as ac, type TrackerCreateInput as ad, type TrackerDataIssue as ae, type TrackerDefinition as af, type TrackerDefinitionResponse as ag, type TrackerOutcome as ah, type TrackerOutcomeQuery as ai, type TrackerPreview as aj, type TrackerPreviewInput as ak, type TrackerQuery as al, type TrackerRecord as am, type TrackerSourceKind as an, type TrackerSourceResponse as ao, type TrackerStatus as ap, type TrackerTriggerOutcomePage as aq, type TrackerTriggerOutcomeQuery as ar, type TrackerUpdateInput as as, type TrackerWhere as at, type TriggerEnrollment as au, type TriggerHistorical as av, type TriggerSince as aw, type TypedTrackerRecord as ax, accountRoleSchema as ay, appIdentityKindSchema as az, type TrackerDataBudget as b, trackerDataMaxEntries as b0, trackerDataSchemaSchema as b1, trackerDefinitionResponseSchema as b2, trackerEvidenceSchema as b3, trackerIngestResultSchema as b4, trackerIngestSchema as b5, trackerOutcomePageSchema as b6, trackerOutcomeQuerySchema as b7, trackerOutcomeRetrySchema as b8, trackerOutcomeSchema as b9, triggerSinceSchema as bA, walletBalanceSourceSchema as bB, whereConditions as bC, xAccountRoles as bD, xContentMetrics as bE, xTweetSchema as bF, trackerPageSchema as ba, trackerPreviewInputSchema as bb, trackerPreviewLimits as bc, trackerPreviewSchema as bd, trackerPropertiesSchema as be, trackerQuerySchema as bf, trackerRecordAccountSchema as bg, trackerRecordInputSchema as bh, trackerRecordSchema as bi, trackerSkipCodes as bj, trackerSourceKinds as bk, trackerSourceResponseSchema as bl, trackerSourceSchema as bm, trackerStatusSchema as bn, trackerSummarySchema as bo, trackerTriggerModeSchema as bp, trackerTriggerOutcomePageSchema as bq, trackerTriggerOutcomeQuerySchema as br, trackerTriggerPolicySchema as bs, trackerTriggerRecordSchema as bt, trackerUpdateSchema as bu, trackerWhereSchema as bv, triggerAdmission as bw, triggerEnrollmentSchema as bx, triggerHistoricalSchema as by, triggerMode as bz, sourceContent as c, trackerDataIssue as d, trackerDataIssues as e, trackerDataPathTypes as f, trackerDataRecordSteps as g, whereSettings as h, type TrackerDataSchema as i, customSourceSchema as j, type WithContent as k, type WithAccountRoles as l, type TrackerSource as m, trackerDefinitionSchema as n, type Tracker as o, type TrackerData as p, type SourceRoles as q, type LedgerHandle as r, schemaCheckedReader as s, trackerDataBatchSteps as t, xSearchSourceSchema as u, type XContentMetric as v, whereSchemaIssue as w, xContentBodySchema as x, type TrackerTriggerPolicy as y, type Where as z };
|