@domino-sdk/relay 1.0.0-next.8 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +1 -1
  2. package/dist/activity-DeKJsRry.d.ts +9112 -0
  3. package/dist/authoring.d.ts +1135 -285
  4. package/dist/authoring.js +545 -269
  5. package/dist/automatic-outcomes-B1xrETxm.d.ts +758 -0
  6. package/dist/avatar.d.ts +2 -2
  7. package/dist/browser-DFe7sWSN.d.ts +4154 -0
  8. package/dist/browser.d.ts +11 -2528
  9. package/dist/browser.js +8 -6
  10. package/dist/capability-error-DNMwKmlL.d.ts +458 -0
  11. package/dist/{chunk-V7EZUZ3Z.js → chunk-36HTX2BM.js} +389 -169
  12. package/dist/chunk-6QJ3LADK.js +112 -0
  13. package/dist/{chunk-77H7APVD.js → chunk-BGGKNIRP.js} +1 -1
  14. package/dist/chunk-EYH5RDIE.js +496 -0
  15. package/dist/chunk-GQKYAQM6.js +84 -0
  16. package/dist/chunk-GUP7YRR4.js +42 -0
  17. package/dist/{chunk-V5R2DMGY.js → chunk-GZ6FJAXN.js} +380 -128
  18. package/dist/chunk-JON5SESL.js +2986 -0
  19. package/dist/chunk-MC6V6VMG.js +49 -0
  20. package/dist/chunk-NPGENI7K.js +37 -0
  21. package/dist/chunk-VFHHLN6A.js +284 -0
  22. package/dist/chunk-WJSSJ7AF.js +151 -0
  23. package/dist/{chunk-QBOHLT7M.js → chunk-XFMSUPNS.js} +1 -1
  24. package/dist/{chunk-6A6K5RUD.js → chunk-ZVIRG24J.js} +145 -42
  25. package/dist/{client-CK4nwt7V.d.ts → client-XiuFnug_.d.ts} +2193 -562
  26. package/dist/{submission-input-C9qm9ixd.d.ts → groups-Ck-OxzjD.d.ts} +919 -1142
  27. package/dist/identity-integration-GxAHdKR2.d.ts +58 -0
  28. package/dist/{images--vZ9U0kr.d.ts → images-Dv-P5VBw.d.ts} +2 -2
  29. package/dist/index.d.ts +13 -9
  30. package/dist/index.js +17 -6
  31. package/dist/internal.d.ts +82 -43
  32. package/dist/internal.js +58 -90
  33. package/dist/offers-Cy-e4o5x.d.ts +431 -0
  34. package/dist/{pages-BzqJuI69.d.ts → outcomes-kVB-Juzs.d.ts} +2386 -1490
  35. package/dist/pages-BBYD21IE.d.ts +359 -0
  36. package/dist/participant-rewards-3duLb8YJ.d.ts +668 -0
  37. package/dist/portal-proxy.js +22 -4
  38. package/dist/{profiles-DDMFBRKe.d.ts → profiles-D2aFcOxu.d.ts} +15 -15
  39. package/dist/react/index.d.ts +3122 -1011
  40. package/dist/react/index.js +1627 -779
  41. package/dist/request-error-DWduJCGV.d.ts +62 -0
  42. package/dist/schema-DfJzH2ci.d.ts +5644 -0
  43. package/dist/schema.d.ts +15 -4216
  44. package/dist/schema.js +322 -81
  45. package/dist/server/index.d.ts +81498 -0
  46. package/dist/server/index.js +2520 -0
  47. package/dist/{streaks-CwGReWGt.d.ts → streaks-CWyq8Px5.d.ts} +2 -4
  48. package/dist/submission-input-BZkm6ohU.d.ts +290 -0
  49. package/dist/vite.d.ts +1 -1
  50. package/dist/vite.js +1 -0
  51. package/dist/{wallet-BGOfFkG9.d.ts → wallet-YssWxGg8.d.ts} +35 -38
  52. package/package.json +8 -2
  53. package/dist/chunk-MRIURJE3.js +0 -257
  54. package/dist/chunk-VARGF4JS.js +0 -1733
  55. package/dist/chunk-ZWY3R6B3.js +0 -26
  56. package/dist/collection-BGneJ6Bk.d.ts +0 -114
  57. package/dist/integrations-C3Sp558f.d.ts +0 -1297
  58. package/dist/point-ledgers-iS00Z_v0.d.ts +0 -37
  59. package/dist/schema-pnuWqvGn.d.ts +0 -3396
@@ -1,1297 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- declare const resourceSourceSchema: z.ZodUnion<readonly [z.ZodObject<{
4
- provider: z.ZodLiteral<"domino">;
5
- resource: z.ZodLiteral<"point-ledger">;
6
- }, z.core.$strict>, z.ZodObject<{
7
- provider: z.ZodLiteral<"discord">;
8
- resource: z.ZodLiteral<"channel">;
9
- types: z.ZodArray<z.ZodEnum<{
10
- text: "text";
11
- announcement: "announcement";
12
- }>>;
13
- }, z.core.$strict>, z.ZodObject<{
14
- provider: z.ZodLiteral<"discord">;
15
- resource: z.ZodLiteral<"role">;
16
- assignable: z.ZodDefault<z.ZodBoolean>;
17
- }, z.core.$strict>]>;
18
- type ResourceSource = z.infer<typeof resourceSourceSchema>;
19
- declare const resourceRequestSchema: z.ZodObject<{
20
- source: z.ZodUnion<readonly [z.ZodObject<{
21
- provider: z.ZodLiteral<"domino">;
22
- resource: z.ZodLiteral<"point-ledger">;
23
- }, z.core.$strict>, z.ZodObject<{
24
- provider: z.ZodLiteral<"discord">;
25
- resource: z.ZodLiteral<"channel">;
26
- types: z.ZodArray<z.ZodEnum<{
27
- text: "text";
28
- announcement: "announcement";
29
- }>>;
30
- }, z.core.$strict>, z.ZodObject<{
31
- provider: z.ZodLiteral<"discord">;
32
- resource: z.ZodLiteral<"role">;
33
- assignable: z.ZodDefault<z.ZodBoolean>;
34
- }, z.core.$strict>]>;
35
- query: z.ZodOptional<z.ZodString>;
36
- cursor: z.ZodOptional<z.ZodString>;
37
- ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
38
- }, z.core.$strict>;
39
- declare const resourceOptionsSchema: z.ZodObject<{
40
- revision: z.ZodNumber;
41
- options: z.ZodArray<z.ZodObject<{
42
- id: z.ZodString;
43
- label: z.ZodString;
44
- description: z.ZodOptional<z.ZodString>;
45
- group: z.ZodOptional<z.ZodString>;
46
- disabledReason: z.ZodOptional<z.ZodString>;
47
- }, z.core.$strip>>;
48
- cursor: z.ZodNullable<z.ZodString>;
49
- }, z.core.$strip>;
50
- type ResourceOption = z.infer<typeof resourceOptionsSchema>["options"][number];
51
-
52
- /** Keep provider fields, including verification details, rather than projecting them away. */
53
- declare const xTweetSchema: z.ZodObject<{
54
- id: z.ZodString;
55
- userId: z.ZodString;
56
- content: z.ZodString;
57
- createdAt: z.ZodISODateTime;
58
- author: z.ZodObject<{
59
- id: z.ZodString;
60
- username: z.ZodString;
61
- name: z.ZodString;
62
- verified: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
63
- }, z.core.$loose>;
64
- likeCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
65
- replyCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
66
- retweetCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
67
- quoteCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
68
- viewCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
69
- bookmarkCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
70
- isReply: z.ZodBoolean;
71
- isRetweet: z.ZodBoolean;
72
- isQuoteTweet: z.ZodBoolean;
73
- }, z.core.$loose>;
74
- type XTweet = z.infer<typeof xTweetSchema>;
75
- /** Matches tracker_x_content_body_v1 in migration 0054. Version projection changes;
76
- * retained bodies must remain readable without rewriting their evidence identities. */
77
- declare const xContentBodySchema: z.ZodObject<{
78
- version: z.ZodLiteral<1>;
79
- id: z.ZodString;
80
- authorId: z.ZodString;
81
- publishedAt: z.ZodNumber;
82
- text: z.ZodString;
83
- isReply: z.ZodBoolean;
84
- isRetweet: z.ZodBoolean;
85
- isQuoteTweet: z.ZodBoolean;
86
- media: z.ZodNullable<z.ZodArray<z.ZodObject<{
87
- type: z.ZodString;
88
- url: z.ZodString;
89
- }, z.core.$strict>>>;
90
- mentionedAuthorIds: z.ZodNullable<z.ZodArray<z.ZodString>>;
91
- videoLengthSeconds: z.ZodNullable<z.ZodNumber>;
92
- references: z.ZodObject<{
93
- replyId: z.ZodNullable<z.ZodString>;
94
- replyAuthorId: z.ZodNullable<z.ZodString>;
95
- quoteId: z.ZodNullable<z.ZodString>;
96
- quoteAuthorId: z.ZodNullable<z.ZodString>;
97
- repostId: z.ZodNullable<z.ZodString>;
98
- repostAuthorId: z.ZodNullable<z.ZodString>;
99
- }, z.core.$strict>;
100
- }, z.core.$strict>;
101
- declare const trackerContentQuerySchema: z.ZodObject<{
102
- id: z.ZodString;
103
- observation: z.ZodString;
104
- }, z.core.$strict>;
105
- type TrackerContentQuery = z.infer<typeof trackerContentQuerySchema>;
106
- declare const trackerContentReadSchema: z.ZodObject<{
107
- id: z.ZodString;
108
- observation: z.ZodString;
109
- member: z.ZodString;
110
- }, z.core.$strict>;
111
- declare const trackerEvidenceSchema: z.ZodObject<{
112
- contentRevision: z.ZodString;
113
- observation: z.ZodString;
114
- }, z.core.$strict>;
115
- declare const trackerContentSchema: z.ZodObject<{
116
- tracker: z.ZodString;
117
- source: z.ZodLiteral<"x">;
118
- evidence: z.ZodObject<{
119
- contentRevision: z.ZodString;
120
- observation: z.ZodString;
121
- }, z.core.$strict>;
122
- content: z.ZodObject<{
123
- version: z.ZodLiteral<1>;
124
- id: z.ZodString;
125
- authorId: z.ZodString;
126
- publishedAt: z.ZodNumber;
127
- text: z.ZodString;
128
- isReply: z.ZodBoolean;
129
- isRetweet: z.ZodBoolean;
130
- isQuoteTweet: z.ZodBoolean;
131
- media: z.ZodNullable<z.ZodArray<z.ZodObject<{
132
- type: z.ZodString;
133
- url: z.ZodString;
134
- }, z.core.$strict>>>;
135
- mentionedAuthorIds: z.ZodNullable<z.ZodArray<z.ZodString>>;
136
- videoLengthSeconds: z.ZodNullable<z.ZodNumber>;
137
- references: z.ZodObject<{
138
- replyId: z.ZodNullable<z.ZodString>;
139
- replyAuthorId: z.ZodNullable<z.ZodString>;
140
- quoteId: z.ZodNullable<z.ZodString>;
141
- quoteAuthorId: z.ZodNullable<z.ZodString>;
142
- repostId: z.ZodNullable<z.ZodString>;
143
- repostAuthorId: z.ZodNullable<z.ZodString>;
144
- }, z.core.$strict>;
145
- }, z.core.$strict>;
146
- observedAt: z.ZodNumber;
147
- removed: z.ZodBoolean;
148
- attribution: z.ZodDiscriminatedUnion<[z.ZodObject<{
149
- kind: z.ZodLiteral<"linked">;
150
- account: z.ZodObject<{
151
- provider: z.ZodLiteral<"x">;
152
- issuer: z.ZodString;
153
- subject: z.ZodString;
154
- revision: z.ZodNumber;
155
- linkedAt: z.ZodNullable<z.ZodNumber>;
156
- }, z.core.$strict>;
157
- member: z.ZodString;
158
- capturedAt: z.ZodNumber;
159
- }, z.core.$strict>, z.ZodObject<{
160
- kind: z.ZodLiteral<"unlinked">;
161
- member: z.ZodString;
162
- capturedAt: z.ZodNumber;
163
- }, z.core.$strict>, z.ZodObject<{
164
- kind: z.ZodLiteral<"different-author">;
165
- member: z.ZodString;
166
- capturedAt: z.ZodNumber;
167
- }, z.core.$strict>], "kind">;
168
- }, z.core.$strict>;
169
- type TrackerContent = z.infer<typeof trackerContentSchema>;
170
- /**
171
- * The verified identities a custom tracker's record accounts can be. Relay attributes each to a
172
- * member through a verified link: `wallet` a canonical CAIP-10 account ID the member linked, `x`
173
- * and `discord` the stable user ID of the member's selected account, `member` a Domino member ID.
174
- */
175
- declare const identityKindSchema: z.ZodEnum<{
176
- x: "x";
177
- discord: "discord";
178
- member: "member";
179
- wallet: "wallet";
180
- }>;
181
- type IdentityKind = z.infer<typeof identityKindSchema>;
182
- /**
183
- * A named account on a record, such as `author` or `inReplyTo`. A tracker-triggered quest pays the
184
- * member behind one role, its `beneficiary`.
185
- */
186
- declare const accountRoleSchema: z.ZodString;
187
- type AccountRole = z.infer<typeof accountRoleSchema>;
188
- /** The roles an X post exposes: who wrote it, and whose post it replies to. */
189
- declare const xAccountRoles: readonly ["author", "inReplyTo"];
190
- declare const xSearchSourceSchema: z.ZodObject<{
191
- kind: z.ZodLiteral<"x-search">;
192
- query: z.ZodString;
193
- }, z.core.$strict>;
194
- declare const customSourceSchema: z.ZodObject<{
195
- kind: z.ZodLiteral<"custom">;
196
- namespace: z.ZodString;
197
- identities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
198
- x: "x";
199
- discord: "discord";
200
- member: "member";
201
- wallet: "wallet";
202
- }>>>;
203
- accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
204
- authors: z.ZodOptional<z.ZodLiteral<"wallet">>;
205
- }, z.core.$strict>;
206
- declare const trackerSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
207
- kind: z.ZodLiteral<"x-search">;
208
- query: z.ZodString;
209
- }, z.core.$strict>, z.ZodObject<{
210
- kind: z.ZodLiteral<"custom">;
211
- namespace: z.ZodString;
212
- identities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
213
- x: "x";
214
- discord: "discord";
215
- member: "member";
216
- wallet: "wallet";
217
- }>>>;
218
- accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
219
- authors: z.ZodOptional<z.ZodLiteral<"wallet">>;
220
- }, z.core.$strict>], "kind">;
221
- type TrackerSource = z.infer<typeof trackerSourceSchema>;
222
- /**
223
- * The identity kinds a source's record accounts are: `x` for an X tracker, a custom source's
224
- * `identities` (`["wallet"]` for one stored with `authors: "wallet"`), or undefined when a custom
225
- * source's authors are opaque IDs.
226
- */
227
- declare function sourceIdentities(source: TrackerSource): IdentityKind[] | undefined;
228
- declare const trackerDefinitionSchema: z.ZodObject<{
229
- key: z.ZodString;
230
- title: z.ZodString;
231
- source: z.ZodDiscriminatedUnion<[z.ZodObject<{
232
- kind: z.ZodLiteral<"x-search">;
233
- query: z.ZodString;
234
- }, z.core.$strict>, z.ZodObject<{
235
- kind: z.ZodLiteral<"custom">;
236
- namespace: z.ZodString;
237
- identities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
238
- x: "x";
239
- discord: "discord";
240
- member: "member";
241
- wallet: "wallet";
242
- }>>>;
243
- accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
244
- authors: z.ZodOptional<z.ZodLiteral<"wallet">>;
245
- }, z.core.$strict>], "kind">;
246
- window: z.ZodObject<{
247
- start: z.ZodNumber;
248
- end: z.ZodOptional<z.ZodNumber>;
249
- }, z.core.$strict>;
250
- refreshSeconds: z.ZodDefault<z.ZodNumber>;
251
- maxPages: z.ZodDefault<z.ZodNumber>;
252
- }, z.core.$strict>;
253
- declare const trackerArtifactSchema: z.ZodUnion<readonly [z.ZodObject<{
254
- key: z.ZodString;
255
- title: z.ZodString;
256
- source: z.ZodDiscriminatedUnion<[z.ZodObject<{
257
- kind: z.ZodLiteral<"x-search">;
258
- query: z.ZodString;
259
- }, z.core.$strict>, z.ZodObject<{
260
- kind: z.ZodLiteral<"custom">;
261
- namespace: z.ZodString;
262
- identities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
263
- x: "x";
264
- discord: "discord";
265
- member: "member";
266
- wallet: "wallet";
267
- }>>>;
268
- accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
269
- authors: z.ZodOptional<z.ZodLiteral<"wallet">>;
270
- }, z.core.$strict>], "kind">;
271
- window: z.ZodObject<{
272
- start: z.ZodNumber;
273
- end: z.ZodOptional<z.ZodNumber>;
274
- }, z.core.$strict>;
275
- refreshSeconds: z.ZodDefault<z.ZodNumber>;
276
- maxPages: z.ZodDefault<z.ZodNumber>;
277
- }, z.core.$strict>, z.ZodObject<{
278
- code: z.ZodString;
279
- }, z.core.$strict>]>;
280
- type TrackerDefinition = z.infer<typeof trackerDefinitionSchema>;
281
- declare const publishedTrackerSchema: z.ZodObject<{
282
- id: z.ZodString;
283
- version: z.ZodString;
284
- definition: z.ZodObject<{
285
- key: z.ZodString;
286
- title: z.ZodString;
287
- source: z.ZodDiscriminatedUnion<[z.ZodObject<{
288
- kind: z.ZodLiteral<"x-search">;
289
- query: z.ZodString;
290
- }, z.core.$strict>, z.ZodObject<{
291
- kind: z.ZodLiteral<"custom">;
292
- namespace: z.ZodString;
293
- identities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
294
- x: "x";
295
- discord: "discord";
296
- member: "member";
297
- wallet: "wallet";
298
- }>>>;
299
- accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
300
- authors: z.ZodOptional<z.ZodLiteral<"wallet">>;
301
- }, z.core.$strict>], "kind">;
302
- window: z.ZodObject<{
303
- start: z.ZodNumber;
304
- end: z.ZodOptional<z.ZodNumber>;
305
- }, z.core.$strict>;
306
- refreshSeconds: z.ZodDefault<z.ZodNumber>;
307
- maxPages: z.ZodDefault<z.ZodNumber>;
308
- }, z.core.$strict>;
309
- publishedAt: z.ZodNumber;
310
- actor: z.ZodNullable<z.ZodString>;
311
- }, z.core.$strip>;
312
- declare const trackerStatusSchema: z.ZodObject<{
313
- published: z.ZodObject<{
314
- id: z.ZodString;
315
- version: z.ZodString;
316
- definition: z.ZodObject<{
317
- key: z.ZodString;
318
- title: z.ZodString;
319
- source: z.ZodDiscriminatedUnion<[z.ZodObject<{
320
- kind: z.ZodLiteral<"x-search">;
321
- query: z.ZodString;
322
- }, z.core.$strict>, z.ZodObject<{
323
- kind: z.ZodLiteral<"custom">;
324
- namespace: z.ZodString;
325
- identities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
326
- x: "x";
327
- discord: "discord";
328
- member: "member";
329
- wallet: "wallet";
330
- }>>>;
331
- accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
332
- authors: z.ZodOptional<z.ZodLiteral<"wallet">>;
333
- }, z.core.$strict>], "kind">;
334
- window: z.ZodObject<{
335
- start: z.ZodNumber;
336
- end: z.ZodOptional<z.ZodNumber>;
337
- }, z.core.$strict>;
338
- refreshSeconds: z.ZodDefault<z.ZodNumber>;
339
- maxPages: z.ZodDefault<z.ZodNumber>;
340
- }, z.core.$strict>;
341
- publishedAt: z.ZodNumber;
342
- actor: z.ZodNullable<z.ZodString>;
343
- }, z.core.$strip>;
344
- paused: z.ZodBoolean;
345
- state: z.ZodEnum<{
346
- error: "error";
347
- idle: "idle";
348
- syncing: "syncing";
349
- complete: "complete";
350
- }>;
351
- lastStartedAt: z.ZodNullable<z.ZodNumber>;
352
- lastCompletedAt: z.ZodNullable<z.ZodNumber>;
353
- nextSyncAt: z.ZodNullable<z.ZodNumber>;
354
- coverage: z.ZodEnum<{
355
- unknown: "unknown";
356
- complete: "complete";
357
- partial: "partial";
358
- }>;
359
- error: z.ZodNullable<z.ZodString>;
360
- records: z.ZodNumber;
361
- }, z.core.$strip>;
362
- type TrackerStatus = z.infer<typeof trackerStatusSchema>;
363
- declare const trackerControlSchema: z.ZodObject<{
364
- actionId: z.ZodString;
365
- action: z.ZodEnum<{
366
- pause: "pause";
367
- resume: "resume";
368
- refresh: "refresh";
369
- }>;
370
- }, z.core.$strict>;
371
- /**
372
- * An account a record names, of one of its custom source's identity kinds. `kind` may be left out
373
- * when the source names exactly one.
374
- */
375
- declare const trackerAccountSchema: z.ZodObject<{
376
- kind: z.ZodOptional<z.ZodEnum<{
377
- x: "x";
378
- discord: "discord";
379
- member: "member";
380
- wallet: "wallet";
381
- }>>;
382
- id: z.ZodString;
383
- }, z.core.$strict>;
384
- type TrackerAccount = z.infer<typeof trackerAccountSchema>;
385
- declare const trackerRecordInputSchema: z.ZodObject<{
386
- id: z.ZodString;
387
- occurredAt: z.ZodNumber;
388
- observedAt: z.ZodNumber;
389
- author: z.ZodDefault<z.ZodNullable<z.ZodObject<{
390
- id: z.ZodString;
391
- verified: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
392
- kind: z.ZodOptional<z.ZodEnum<{
393
- x: "x";
394
- discord: "discord";
395
- member: "member";
396
- wallet: "wallet";
397
- }>>;
398
- }, z.core.$strict>>>;
399
- accounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
400
- kind: z.ZodOptional<z.ZodEnum<{
401
- x: "x";
402
- discord: "discord";
403
- member: "member";
404
- wallet: "wallet";
405
- }>>;
406
- id: z.ZodString;
407
- }, z.core.$strict>>>;
408
- data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
409
- removed: z.ZodDefault<z.ZodBoolean>;
410
- }, z.core.$strict>;
411
- declare const trackerRecordSchema: z.ZodObject<{
412
- id: z.ZodString;
413
- occurredAt: z.ZodNumber;
414
- observedAt: z.ZodNumber;
415
- author: z.ZodDefault<z.ZodNullable<z.ZodObject<{
416
- id: z.ZodString;
417
- verified: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
418
- kind: z.ZodOptional<z.ZodEnum<{
419
- x: "x";
420
- discord: "discord";
421
- member: "member";
422
- wallet: "wallet";
423
- }>>;
424
- }, z.core.$strict>>>;
425
- accounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
426
- kind: z.ZodOptional<z.ZodEnum<{
427
- x: "x";
428
- discord: "discord";
429
- member: "member";
430
- wallet: "wallet";
431
- }>>;
432
- id: z.ZodString;
433
- }, z.core.$strict>>>;
434
- data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
435
- removed: z.ZodDefault<z.ZodBoolean>;
436
- source: z.ZodString;
437
- firstSeenAt: z.ZodNumber;
438
- evidence: z.ZodOptional<z.ZodNullable<z.ZodObject<{
439
- contentRevision: z.ZodString;
440
- observation: z.ZodString;
441
- }, z.core.$strict>>>;
442
- }, z.core.$strict>;
443
- type TrackerRecord = z.infer<typeof trackerRecordSchema>;
444
- declare const trackerIngestSchema: z.ZodObject<{
445
- actionId: z.ZodString;
446
- records: z.ZodArray<z.ZodObject<{
447
- id: z.ZodString;
448
- occurredAt: z.ZodNumber;
449
- observedAt: z.ZodNumber;
450
- author: z.ZodDefault<z.ZodNullable<z.ZodObject<{
451
- id: z.ZodString;
452
- verified: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
453
- kind: z.ZodOptional<z.ZodEnum<{
454
- x: "x";
455
- discord: "discord";
456
- member: "member";
457
- wallet: "wallet";
458
- }>>;
459
- }, z.core.$strict>>>;
460
- accounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
461
- kind: z.ZodOptional<z.ZodEnum<{
462
- x: "x";
463
- discord: "discord";
464
- member: "member";
465
- wallet: "wallet";
466
- }>>;
467
- id: z.ZodString;
468
- }, z.core.$strict>>>;
469
- data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
470
- removed: z.ZodDefault<z.ZodBoolean>;
471
- }, z.core.$strict>>;
472
- }, z.core.$strict>;
473
- declare const trackerIngestResultSchema: z.ZodObject<{
474
- stored: z.ZodNumber;
475
- admissions: z.ZodOptional<z.ZodObject<{
476
- admitted: z.ZodNumber;
477
- skipped: z.ZodNumber;
478
- filtered: z.ZodOptional<z.ZodNumber>;
479
- }, z.core.$strip>>;
480
- }, z.core.$strip>;
481
- /**
482
- * Why a tracker trigger skipped an observation, as a stable machine code. Relay applies the rules
483
- * in this order and records the first that fails. Later versions may add codes; treat an unknown
484
- * code as a skip whose `reason` explains it.
485
- */
486
- declare const trackerSkipCodes: readonly ["quest-paused", "before-activation", "record-removed", "content-unavailable", "no-account", "beneficiary-is-author", "unlinked-account", "ambiguous-account", "not-joined", "prerequisites-incomplete"];
487
- type TrackerSkipCode = (typeof trackerSkipCodes)[number];
488
- /**
489
- * One tracker-trigger decision: a quest admitted an attempt for a record observation, or skipped
490
- * it with a code and reason. Operators read these to see why a quest did or did not run.
491
- */
492
- declare const trackerOutcomeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
493
- state: z.ZodLiteral<"admitted">;
494
- code: z.ZodNull;
495
- reason: z.ZodNull;
496
- /** The attributed member. */
497
- member: z.ZodString;
498
- /** The admitted attempt. Its evaluation, decision and rewards live on the attempt. */
499
- attempt: z.ZodString;
500
- /** Stable quest ID. */
501
- quest: z.ZodString;
502
- /** Stable tracker ID. */
503
- tracker: z.ZodString;
504
- record: z.ZodString;
505
- observedAt: z.ZodNumber;
506
- /** The release admitted, or the one active when the observation was skipped. */
507
- release: z.ZodString;
508
- /** The account attribution resolved or failed to resolve, such as a CAIP-10 wallet ID. */
509
- account: z.ZodNullable<z.ZodString>;
510
- createdAt: z.ZodNumber;
511
- updatedAt: z.ZodNumber;
512
- /** Null for automatic decisions; the staff actor after a retry. */
513
- actor: z.ZodNullable<z.ZodString>;
514
- }, z.core.$strict>, z.ZodObject<{
515
- state: z.ZodLiteral<"skipped">;
516
- /** Why the observation was skipped, as one of `trackerSkipCodes`. */
517
- code: z.ZodString;
518
- /** Why the observation was skipped, for people. */
519
- reason: z.ZodString;
520
- /** The attributed member, when attribution got that far. */
521
- member: z.ZodNullable<z.ZodString>;
522
- attempt: z.ZodNullable<z.ZodString>;
523
- /** Stable quest ID. */
524
- quest: z.ZodString;
525
- /** Stable tracker ID. */
526
- tracker: z.ZodString;
527
- record: z.ZodString;
528
- observedAt: z.ZodNumber;
529
- /** The release admitted, or the one active when the observation was skipped. */
530
- release: z.ZodString;
531
- /** The account attribution resolved or failed to resolve, such as a CAIP-10 wallet ID. */
532
- account: z.ZodNullable<z.ZodString>;
533
- createdAt: z.ZodNumber;
534
- updatedAt: z.ZodNumber;
535
- /** Null for automatic decisions; the staff actor after a retry. */
536
- actor: z.ZodNullable<z.ZodString>;
537
- }, z.core.$strict>], "state">;
538
- type TrackerOutcome = z.infer<typeof trackerOutcomeSchema>;
539
- declare const trackerOutcomeQuerySchema: z.ZodObject<{
540
- /** Quest key or ID. */
541
- quest: z.ZodOptional<z.ZodString>;
542
- record: z.ZodOptional<z.ZodString>;
543
- member: z.ZodOptional<z.ZodString>;
544
- state: z.ZodOptional<z.ZodEnum<{
545
- admitted: "admitted";
546
- skipped: "skipped";
547
- }>>;
548
- /** Only skips with this code, such as `unlinked-account`. */
549
- code: z.ZodOptional<z.ZodString>;
550
- limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
551
- /** Opaque cursor from `next`: older outcomes. */
552
- before: z.ZodOptional<z.ZodString>;
553
- }, z.core.$strict>;
554
- type TrackerOutcomeQuery = z.input<typeof trackerOutcomeQuerySchema>;
555
- declare const trackerOutcomePageSchema: z.ZodObject<{
556
- /** Newest first. */
557
- items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
558
- state: z.ZodLiteral<"admitted">;
559
- code: z.ZodNull;
560
- reason: z.ZodNull;
561
- /** The attributed member. */
562
- member: z.ZodString;
563
- /** The admitted attempt. Its evaluation, decision and rewards live on the attempt. */
564
- attempt: z.ZodString;
565
- /** Stable quest ID. */
566
- quest: z.ZodString;
567
- /** Stable tracker ID. */
568
- tracker: z.ZodString;
569
- record: z.ZodString;
570
- observedAt: z.ZodNumber;
571
- /** The release admitted, or the one active when the observation was skipped. */
572
- release: z.ZodString;
573
- /** The account attribution resolved or failed to resolve, such as a CAIP-10 wallet ID. */
574
- account: z.ZodNullable<z.ZodString>;
575
- createdAt: z.ZodNumber;
576
- updatedAt: z.ZodNumber;
577
- /** Null for automatic decisions; the staff actor after a retry. */
578
- actor: z.ZodNullable<z.ZodString>;
579
- }, z.core.$strict>, z.ZodObject<{
580
- state: z.ZodLiteral<"skipped">;
581
- /** Why the observation was skipped, as one of `trackerSkipCodes`. */
582
- code: z.ZodString;
583
- /** Why the observation was skipped, for people. */
584
- reason: z.ZodString;
585
- /** The attributed member, when attribution got that far. */
586
- member: z.ZodNullable<z.ZodString>;
587
- attempt: z.ZodNullable<z.ZodString>;
588
- /** Stable quest ID. */
589
- quest: z.ZodString;
590
- /** Stable tracker ID. */
591
- tracker: z.ZodString;
592
- record: z.ZodString;
593
- observedAt: z.ZodNumber;
594
- /** The release admitted, or the one active when the observation was skipped. */
595
- release: z.ZodString;
596
- /** The account attribution resolved or failed to resolve, such as a CAIP-10 wallet ID. */
597
- account: z.ZodNullable<z.ZodString>;
598
- createdAt: z.ZodNumber;
599
- updatedAt: z.ZodNumber;
600
- /** Null for automatic decisions; the staff actor after a retry. */
601
- actor: z.ZodNullable<z.ZodString>;
602
- }, z.core.$strict>], "state">>;
603
- next: z.ZodNullable<z.ZodString>;
604
- }, z.core.$strict>;
605
- /** Re-runs admission for one skipped observation under the quest's current release and links. */
606
- declare const trackerOutcomeRetrySchema: z.ZodObject<{
607
- actionId: z.ZodString;
608
- /** Quest key or ID. */
609
- quest: z.ZodString;
610
- record: z.ZodString;
611
- observedAt: z.ZodNumber;
612
- }, z.core.$strict>;
613
- declare const trackerQuerySchema: z.ZodObject<{
614
- author: z.ZodOptional<z.ZodString>;
615
- member: z.ZodOptional<z.ZodString>;
616
- verified: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodPipe<z.ZodEnum<{
617
- true: "true";
618
- false: "false";
619
- }>, z.ZodTransform<boolean, "true" | "false">>]>>;
620
- since: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
621
- until: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
622
- removed: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodPipe<z.ZodEnum<{
623
- true: "true";
624
- false: "false";
625
- }>, z.ZodTransform<boolean, "true" | "false">>]>>;
626
- minLikes: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
627
- minViews: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
628
- limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
629
- cursor: z.ZodOptional<z.ZodString>;
630
- includeEvidence: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodPipe<z.ZodEnum<{
631
- true: "true";
632
- false: "false";
633
- }>, z.ZodTransform<boolean, "true" | "false">>]>>;
634
- }, z.core.$strict>;
635
- type TrackerQuery = z.input<typeof trackerQuerySchema>;
636
- declare const trackerPageSchema: z.ZodObject<{
637
- tracker: z.ZodString;
638
- items: z.ZodArray<z.ZodObject<{
639
- id: z.ZodString;
640
- occurredAt: z.ZodNumber;
641
- observedAt: z.ZodNumber;
642
- author: z.ZodDefault<z.ZodNullable<z.ZodObject<{
643
- id: z.ZodString;
644
- verified: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
645
- kind: z.ZodOptional<z.ZodEnum<{
646
- x: "x";
647
- discord: "discord";
648
- member: "member";
649
- wallet: "wallet";
650
- }>>;
651
- }, z.core.$strict>>>;
652
- accounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
653
- kind: z.ZodOptional<z.ZodEnum<{
654
- x: "x";
655
- discord: "discord";
656
- member: "member";
657
- wallet: "wallet";
658
- }>>;
659
- id: z.ZodString;
660
- }, z.core.$strict>>>;
661
- data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
662
- removed: z.ZodDefault<z.ZodBoolean>;
663
- source: z.ZodString;
664
- firstSeenAt: z.ZodNumber;
665
- evidence: z.ZodOptional<z.ZodNullable<z.ZodObject<{
666
- contentRevision: z.ZodString;
667
- observation: z.ZodString;
668
- }, z.core.$strict>>>;
669
- }, z.core.$strict>>;
670
- nextCursor: z.ZodNullable<z.ZodString>;
671
- total: z.ZodNumber;
672
- status: z.ZodObject<{
673
- published: z.ZodObject<{
674
- id: z.ZodString;
675
- version: z.ZodString;
676
- definition: z.ZodObject<{
677
- key: z.ZodString;
678
- title: z.ZodString;
679
- source: z.ZodDiscriminatedUnion<[z.ZodObject<{
680
- kind: z.ZodLiteral<"x-search">;
681
- query: z.ZodString;
682
- }, z.core.$strict>, z.ZodObject<{
683
- kind: z.ZodLiteral<"custom">;
684
- namespace: z.ZodString;
685
- identities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
686
- x: "x";
687
- discord: "discord";
688
- member: "member";
689
- wallet: "wallet";
690
- }>>>;
691
- accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
692
- authors: z.ZodOptional<z.ZodLiteral<"wallet">>;
693
- }, z.core.$strict>], "kind">;
694
- window: z.ZodObject<{
695
- start: z.ZodNumber;
696
- end: z.ZodOptional<z.ZodNumber>;
697
- }, z.core.$strict>;
698
- refreshSeconds: z.ZodDefault<z.ZodNumber>;
699
- maxPages: z.ZodDefault<z.ZodNumber>;
700
- }, z.core.$strict>;
701
- publishedAt: z.ZodNumber;
702
- actor: z.ZodNullable<z.ZodString>;
703
- }, z.core.$strip>;
704
- paused: z.ZodBoolean;
705
- state: z.ZodEnum<{
706
- error: "error";
707
- idle: "idle";
708
- syncing: "syncing";
709
- complete: "complete";
710
- }>;
711
- lastStartedAt: z.ZodNullable<z.ZodNumber>;
712
- lastCompletedAt: z.ZodNullable<z.ZodNumber>;
713
- nextSyncAt: z.ZodNullable<z.ZodNumber>;
714
- coverage: z.ZodEnum<{
715
- unknown: "unknown";
716
- complete: "complete";
717
- partial: "partial";
718
- }>;
719
- error: z.ZodNullable<z.ZodString>;
720
- records: z.ZodNumber;
721
- }, z.core.$strip>;
722
- }, z.core.$strip>;
723
- declare const trackerSummarySchema: z.ZodObject<{
724
- records: z.ZodNumber;
725
- authors: z.ZodNumber;
726
- metrics: z.ZodObject<{
727
- likes: z.ZodNumber;
728
- replies: z.ZodNumber;
729
- reposts: z.ZodNumber;
730
- quotes: z.ZodNumber;
731
- views: z.ZodNumber;
732
- bookmarks: z.ZodNumber;
733
- }, z.core.$strip>;
734
- missingMetrics: z.ZodNumber;
735
- status: z.ZodObject<{
736
- published: z.ZodObject<{
737
- id: z.ZodString;
738
- version: z.ZodString;
739
- definition: z.ZodObject<{
740
- key: z.ZodString;
741
- title: z.ZodString;
742
- source: z.ZodDiscriminatedUnion<[z.ZodObject<{
743
- kind: z.ZodLiteral<"x-search">;
744
- query: z.ZodString;
745
- }, z.core.$strict>, z.ZodObject<{
746
- kind: z.ZodLiteral<"custom">;
747
- namespace: z.ZodString;
748
- identities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
749
- x: "x";
750
- discord: "discord";
751
- member: "member";
752
- wallet: "wallet";
753
- }>>>;
754
- accounts: z.ZodOptional<z.ZodArray<z.ZodString>>;
755
- authors: z.ZodOptional<z.ZodLiteral<"wallet">>;
756
- }, z.core.$strict>], "kind">;
757
- window: z.ZodObject<{
758
- start: z.ZodNumber;
759
- end: z.ZodOptional<z.ZodNumber>;
760
- }, z.core.$strict>;
761
- refreshSeconds: z.ZodDefault<z.ZodNumber>;
762
- maxPages: z.ZodDefault<z.ZodNumber>;
763
- }, z.core.$strict>;
764
- publishedAt: z.ZodNumber;
765
- actor: z.ZodNullable<z.ZodString>;
766
- }, z.core.$strip>;
767
- paused: z.ZodBoolean;
768
- state: z.ZodEnum<{
769
- error: "error";
770
- idle: "idle";
771
- syncing: "syncing";
772
- complete: "complete";
773
- }>;
774
- lastStartedAt: z.ZodNullable<z.ZodNumber>;
775
- lastCompletedAt: z.ZodNullable<z.ZodNumber>;
776
- nextSyncAt: z.ZodNullable<z.ZodNumber>;
777
- coverage: z.ZodEnum<{
778
- unknown: "unknown";
779
- complete: "complete";
780
- partial: "partial";
781
- }>;
782
- error: z.ZodNullable<z.ZodString>;
783
- records: z.ZodNumber;
784
- }, z.core.$strip>;
785
- }, z.core.$strip>;
786
- /** Preview bounds: one sample, never stored, never a tracker. */
787
- declare const trackerPreviewLimits: {
788
- readonly pages: 3;
789
- readonly posts: 100;
790
- readonly days: 30;
791
- };
792
- /** A bounded X search sample for exploring a query before defining a tracker in code. */
793
- declare const trackerPreviewInputSchema: z.ZodObject<{
794
- query: z.ZodString;
795
- since: z.ZodNumber;
796
- }, z.core.$strict>;
797
- type TrackerPreviewInput = z.input<typeof trackerPreviewInputSchema>;
798
- declare const trackerPreviewSchema: z.ZodObject<{
799
- query: z.ZodString;
800
- since: z.ZodNumber;
801
- fetchedAt: z.ZodNumber;
802
- pages: z.ZodNumber;
803
- posts: z.ZodArray<z.ZodObject<{
804
- id: z.ZodString;
805
- userId: z.ZodString;
806
- content: z.ZodString;
807
- createdAt: z.ZodISODateTime;
808
- author: z.ZodObject<{
809
- id: z.ZodString;
810
- username: z.ZodString;
811
- name: z.ZodString;
812
- verified: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
813
- }, z.core.$loose>;
814
- likeCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
815
- replyCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
816
- retweetCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
817
- quoteCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
818
- viewCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
819
- bookmarkCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
820
- isReply: z.ZodBoolean;
821
- isRetweet: z.ZodBoolean;
822
- isQuoteTweet: z.ZodBoolean;
823
- }, z.core.$loose>>;
824
- more: z.ZodBoolean;
825
- }, z.core.$strip>;
826
- type TrackerPreview = z.infer<typeof trackerPreviewSchema>;
827
- /** Read-only capabilities in hosted quest evaluation; results are captured for replay. */
828
- type TrackerReader = {
829
- /** Captures an X body and attribution to the evaluating member, with no live metrics. */
830
- content(reference: string | {
831
- key: string;
832
- }, query: TrackerContentQuery): Promise<TrackerContent>;
833
- records(reference: string | {
834
- key: string;
835
- }, query?: TrackerQuery): Promise<z.infer<typeof trackerPageSchema>>;
836
- summary(reference: string | {
837
- key: string;
838
- }, query?: TrackerQuery): Promise<z.infer<typeof trackerSummarySchema>>;
839
- };
840
-
841
- declare const xIdSchema: z.ZodString;
842
- declare const xConnectionSchema: z.ZodObject<{
843
- userId: z.ZodString;
844
- }, z.core.$strip>;
845
- declare const xProfileSchema: z.ZodObject<{
846
- id: z.ZodString;
847
- username: z.ZodString;
848
- name: z.ZodString;
849
- bio: z.ZodNullable<z.ZodString>;
850
- profileImageUrl: z.ZodNullable<z.ZodString>;
851
- followersCount: z.ZodNullable<z.ZodNumber>;
852
- verified: z.ZodNullable<z.ZodBoolean>;
853
- }, z.core.$strip>;
854
- declare const xPostSchema: z.ZodObject<{
855
- id: z.ZodString;
856
- userId: z.ZodString;
857
- content: z.ZodString;
858
- createdAt: z.ZodISODateTime;
859
- author: z.ZodObject<{
860
- id: z.ZodString;
861
- username: z.ZodString;
862
- name: z.ZodString;
863
- verified: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
864
- }, z.core.$loose>;
865
- likeCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
866
- replyCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
867
- retweetCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
868
- quoteCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
869
- viewCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
870
- bookmarkCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
871
- isReply: z.ZodBoolean;
872
- isRetweet: z.ZodBoolean;
873
- isQuoteTweet: z.ZodBoolean;
874
- quotedTweetId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
875
- inReplyToUserId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
876
- inReplyToStatusId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
877
- retweetedTweetId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
878
- media: z.ZodPipe<z.ZodUnknown, z.ZodTransform<{
879
- type: string;
880
- url: string;
881
- }[], unknown>>;
882
- }, z.core.$loose>;
883
- declare const xRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
884
- operation: z.ZodLiteral<"connection">;
885
- }, z.core.$strict>, z.ZodObject<{
886
- operation: z.ZodLiteral<"profile">;
887
- }, z.core.$strict>, z.ZodObject<{
888
- operation: z.ZodLiteral<"post">;
889
- postId: z.ZodString;
890
- }, z.core.$strict>, z.ZodObject<{
891
- operation: z.ZodLiteral<"follows">;
892
- userId: z.ZodString;
893
- }, z.core.$strict>, z.ZodObject<{
894
- operation: z.ZodLiteral<"reposted">;
895
- postId: z.ZodString;
896
- }, z.core.$strict>], "operation">;
897
- type XConnection = z.infer<typeof xConnectionSchema>;
898
- type XProfile = z.infer<typeof xProfileSchema>;
899
- type XPost = z.infer<typeof xPostSchema>;
900
- interface XReader {
901
- connection(): Promise<XConnection | null>;
902
- profile(): Promise<XProfile>;
903
- post(input: {
904
- postId: string;
905
- }): Promise<XPost>;
906
- follows(input: {
907
- userId: string;
908
- }): Promise<boolean>;
909
- reposted(input: {
910
- postId: string;
911
- }): Promise<boolean>;
912
- }
913
-
914
- /**
915
- * Which record observations fire a tracker trigger. `"new-record"`: the first observation of each
916
- * record this tracker collects. `"new-observation"`: every observation that becomes its record's
917
- * current one (a new record, or a later `observedAt`). `"data-changed"`: a new record, or a current
918
- * observation whose `data` differs from the record's previous one.
919
- */
920
- declare const trackerTriggerModeSchema: z.ZodEnum<{
921
- "new-record": "new-record";
922
- "new-observation": "new-observation";
923
- "data-changed": "data-changed";
924
- }>;
925
- type TrackerTriggerMode = z.infer<typeof trackerTriggerModeSchema>;
926
- /** X trackers fire on discoveries; custom trackers on every new sample. */
927
- declare function defaultTriggerMode(source: "x-search" | "custom"): TrackerTriggerMode;
928
- /** A bound in a tracker trigger filter: a number, or the quest's integer setting of that name. */
929
- declare const trackerBoundSchema: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
930
- setting: z.ZodString;
931
- }, z.core.$strict>]>;
932
- type TrackerBound = z.infer<typeof trackerBoundSchema>;
933
- /**
934
- * Which firing observations a tracker trigger admits, judged on the record's `data` before any
935
- * attribution. `equals` matches a string, number or boolean exactly. `gt`, `gte`, `lt` and `lte`
936
- * compare a number, or an integer string such as a base-unit balance, and all must hold.
937
- * Observations that do not match are not trigger events: they record no outcome.
938
- */
939
- declare const trackerWhereSchema: z.ZodUnion<readonly [z.ZodObject<{
940
- path: z.ZodString;
941
- equals: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
942
- }, z.core.$strict>, z.ZodObject<{
943
- path: z.ZodString;
944
- gt: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
945
- setting: z.ZodString;
946
- }, z.core.$strict>]>>;
947
- gte: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
948
- setting: z.ZodString;
949
- }, z.core.$strict>]>>;
950
- lt: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
951
- setting: z.ZodString;
952
- }, z.core.$strict>]>>;
953
- lte: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
954
- setting: z.ZodString;
955
- }, z.core.$strict>]>>;
956
- }, z.core.$strict>]>;
957
- type TrackerWhere = z.infer<typeof trackerWhereSchema>;
958
- /**
959
- * A quest's tracker trigger as published: bound to the tracker's stable ID at publication. Keys
960
- * that equal their default are left out, so a policy without `where` or a non-default `on` keeps
961
- * the shape SDKs before 0.28 read.
962
- */
963
- declare const trackerTriggerPolicySchema: z.ZodObject<{
964
- /** The tracker's authoring key; publication binds it to the tracker's stable ID. */
965
- tracker: z.ZodString;
966
- source: z.ZodEnum<{
967
- custom: "custom";
968
- "x-search": "x-search";
969
- }>;
970
- /** Which observations fire; absent means the source's default (`defaultTriggerMode`). */
971
- on: z.ZodOptional<z.ZodEnum<{
972
- "new-record": "new-record";
973
- "new-observation": "new-observation";
974
- "data-changed": "data-changed";
975
- }>>;
976
- where: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
977
- path: z.ZodString;
978
- equals: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
979
- }, z.core.$strict>, z.ZodObject<{
980
- path: z.ZodString;
981
- gt: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
982
- setting: z.ZodString;
983
- }, z.core.$strict>]>>;
984
- gte: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
985
- setting: z.ZodString;
986
- }, z.core.$strict>]>>;
987
- lt: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
988
- setting: z.ZodString;
989
- }, z.core.$strict>]>>;
990
- lte: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
991
- setting: z.ZodString;
992
- }, z.core.$strict>]>>;
993
- }, z.core.$strict>]>>;
994
- /**
995
- * The record account the quest pays: `author`, `inReplyTo` for an X post, or a named account of
996
- * a custom record. Relay attributes it through verified links; evaluators cannot redirect it.
997
- * Releases published before account roles store `"replied-to"` for `inReplyTo`.
998
- */
999
- beneficiary: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"replied-to">]>;
1000
- }, z.core.$strict>;
1001
- type TrackerTriggerPolicy = z.infer<typeof trackerTriggerPolicySchema>;
1002
- /** The firing mode a published policy uses: its `on`, or its source's default. */
1003
- declare function triggerMode(policy: Pick<TrackerTriggerPolicy, "on" | "source">): TrackerTriggerMode;
1004
- /** The record role a published policy pays. A stored `"replied-to"` is the `inReplyTo` role. */
1005
- declare function beneficiaryRole(policy: Pick<TrackerTriggerPolicy, "beneficiary">): AccountRole;
1006
- /** Who the record pays and through which verified link, captured at admission. */
1007
- declare const trackerAttributionSchema: z.ZodObject<{
1008
- member: z.ZodString;
1009
- capturedAt: z.ZodNumber;
1010
- account: z.ZodDiscriminatedUnion<[z.ZodObject<{
1011
- provider: z.ZodLiteral<"wallet">;
1012
- /** Canonical CAIP-10 account ID, as the record names it. */
1013
- id: z.ZodString;
1014
- /** The wallet link's revision. */
1015
- revision: z.ZodNumber;
1016
- /** When the member verified the wallet. */
1017
- linkedAt: z.ZodNullable<z.ZodNumber>;
1018
- }, z.core.$strict>, z.ZodObject<{
1019
- issuer: z.ZodString;
1020
- /** The account's stable user ID. */
1021
- subject: z.ZodString;
1022
- /** The member's account selection revision. */
1023
- revision: z.ZodNumber;
1024
- /** When the member linked the account; null when unknown. */
1025
- linkedAt: z.ZodNullable<z.ZodNumber>;
1026
- provider: z.ZodLiteral<"x">;
1027
- }, z.core.$strict>, z.ZodObject<{
1028
- issuer: z.ZodString;
1029
- /** The account's stable user ID. */
1030
- subject: z.ZodString;
1031
- /** The member's account selection revision. */
1032
- revision: z.ZodNumber;
1033
- /** When the member linked the account; null when unknown. */
1034
- linkedAt: z.ZodNullable<z.ZodNumber>;
1035
- provider: z.ZodLiteral<"discord">;
1036
- }, z.core.$strict>, z.ZodObject<{
1037
- provider: z.ZodLiteral<"member">;
1038
- /** The member ID the record names. */
1039
- id: z.ZodString;
1040
- }, z.core.$strict>], "provider">;
1041
- }, z.core.$strict>;
1042
- type TrackerAttribution = z.infer<typeof trackerAttributionSchema>;
1043
- /** The record observation that triggered the attempt, as stored. */
1044
- declare const trackerTriggerRecordSchema: z.ZodObject<{
1045
- id: z.ZodString;
1046
- source: z.ZodString;
1047
- occurredAt: z.ZodNumber;
1048
- observedAt: z.ZodNumber;
1049
- firstSeenAt: z.ZodNumber;
1050
- author: z.ZodNullable<z.ZodObject<{
1051
- id: z.ZodString;
1052
- verified: z.ZodNullable<z.ZodBoolean>;
1053
- kind: z.ZodOptional<z.ZodEnum<{
1054
- x: "x";
1055
- discord: "discord";
1056
- member: "member";
1057
- wallet: "wallet";
1058
- }>>;
1059
- }, z.core.$strict>>;
1060
- accounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1061
- kind: z.ZodOptional<z.ZodEnum<{
1062
- x: "x";
1063
- discord: "discord";
1064
- member: "member";
1065
- wallet: "wallet";
1066
- }>>;
1067
- id: z.ZodString;
1068
- }, z.core.$strict>>>;
1069
- data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
1070
- removed: z.ZodBoolean;
1071
- }, z.core.$strict>;
1072
- /** Immutable admission input of a tracker-triggered attempt: the pinned observation and who it pays. */
1073
- declare const trackerTriggerContextSchema: z.ZodObject<{
1074
- /** The tracker's stable ID. */
1075
- tracker: z.ZodString;
1076
- /** The tracker's authoring key. */
1077
- key: z.ZodString;
1078
- /**
1079
- * The record account the attempt pays, as the quest's release names it. Releases published
1080
- * before account roles name `inReplyTo` `"replied-to"`, which their bundled evaluators expect.
1081
- */
1082
- beneficiary: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"replied-to">]>;
1083
- record: z.ZodObject<{
1084
- id: z.ZodString;
1085
- source: z.ZodString;
1086
- occurredAt: z.ZodNumber;
1087
- observedAt: z.ZodNumber;
1088
- firstSeenAt: z.ZodNumber;
1089
- author: z.ZodNullable<z.ZodObject<{
1090
- id: z.ZodString;
1091
- verified: z.ZodNullable<z.ZodBoolean>;
1092
- kind: z.ZodOptional<z.ZodEnum<{
1093
- x: "x";
1094
- discord: "discord";
1095
- member: "member";
1096
- wallet: "wallet";
1097
- }>>;
1098
- }, z.core.$strict>>;
1099
- accounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1100
- kind: z.ZodOptional<z.ZodEnum<{
1101
- x: "x";
1102
- discord: "discord";
1103
- member: "member";
1104
- wallet: "wallet";
1105
- }>>;
1106
- id: z.ZodString;
1107
- }, z.core.$strict>>>;
1108
- data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
1109
- removed: z.ZodBoolean;
1110
- }, z.core.$strict>;
1111
- /** The captured X post of this observation; null for custom trackers. */
1112
- x: z.ZodNullable<z.ZodObject<{
1113
- evidence: z.ZodObject<{
1114
- contentRevision: z.ZodString;
1115
- observation: z.ZodString;
1116
- }, z.core.$strict>;
1117
- content: z.ZodObject<{
1118
- version: z.ZodLiteral<1>;
1119
- id: z.ZodString;
1120
- authorId: z.ZodString;
1121
- publishedAt: z.ZodNumber;
1122
- text: z.ZodString;
1123
- isReply: z.ZodBoolean;
1124
- isRetweet: z.ZodBoolean;
1125
- isQuoteTweet: z.ZodBoolean;
1126
- media: z.ZodNullable<z.ZodArray<z.ZodObject<{
1127
- type: z.ZodString;
1128
- url: z.ZodString;
1129
- }, z.core.$strict>>>;
1130
- mentionedAuthorIds: z.ZodNullable<z.ZodArray<z.ZodString>>;
1131
- videoLengthSeconds: z.ZodNullable<z.ZodNumber>;
1132
- references: z.ZodObject<{
1133
- replyId: z.ZodNullable<z.ZodString>;
1134
- replyAuthorId: z.ZodNullable<z.ZodString>;
1135
- quoteId: z.ZodNullable<z.ZodString>;
1136
- quoteAuthorId: z.ZodNullable<z.ZodString>;
1137
- repostId: z.ZodNullable<z.ZodString>;
1138
- repostAuthorId: z.ZodNullable<z.ZodString>;
1139
- }, z.core.$strict>;
1140
- }, z.core.$strict>;
1141
- }, z.core.$strict>>;
1142
- attribution: z.ZodObject<{
1143
- member: z.ZodString;
1144
- capturedAt: z.ZodNumber;
1145
- account: z.ZodDiscriminatedUnion<[z.ZodObject<{
1146
- provider: z.ZodLiteral<"wallet">;
1147
- /** Canonical CAIP-10 account ID, as the record names it. */
1148
- id: z.ZodString;
1149
- /** The wallet link's revision. */
1150
- revision: z.ZodNumber;
1151
- /** When the member verified the wallet. */
1152
- linkedAt: z.ZodNullable<z.ZodNumber>;
1153
- }, z.core.$strict>, z.ZodObject<{
1154
- issuer: z.ZodString;
1155
- /** The account's stable user ID. */
1156
- subject: z.ZodString;
1157
- /** The member's account selection revision. */
1158
- revision: z.ZodNumber;
1159
- /** When the member linked the account; null when unknown. */
1160
- linkedAt: z.ZodNullable<z.ZodNumber>;
1161
- provider: z.ZodLiteral<"x">;
1162
- }, z.core.$strict>, z.ZodObject<{
1163
- issuer: z.ZodString;
1164
- /** The account's stable user ID. */
1165
- subject: z.ZodString;
1166
- /** The member's account selection revision. */
1167
- revision: z.ZodNumber;
1168
- /** When the member linked the account; null when unknown. */
1169
- linkedAt: z.ZodNullable<z.ZodNumber>;
1170
- provider: z.ZodLiteral<"discord">;
1171
- }, z.core.$strict>, z.ZodObject<{
1172
- provider: z.ZodLiteral<"member">;
1173
- /** The member ID the record names. */
1174
- id: z.ZodString;
1175
- }, z.core.$strict>], "provider">;
1176
- }, z.core.$strict>;
1177
- }, z.core.$strict>;
1178
- type TrackerTriggerContext = z.infer<typeof trackerTriggerContextSchema>;
1179
-
1180
- declare const observationInputSchema: z.ZodObject<{
1181
- id: z.ZodString;
1182
- source: z.ZodString;
1183
- type: z.ZodString;
1184
- member: z.ZodString;
1185
- actor: z.ZodOptional<z.ZodObject<{
1186
- provider: z.ZodString;
1187
- subject: z.ZodString;
1188
- }, z.core.$strict>>;
1189
- occurredAt: z.ZodNumber;
1190
- data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
1191
- }, z.core.$strict>;
1192
- declare const observationSchema: z.ZodObject<{
1193
- id: z.ZodString;
1194
- source: z.ZodString;
1195
- type: z.ZodString;
1196
- member: z.ZodString;
1197
- actor: z.ZodOptional<z.ZodObject<{
1198
- provider: z.ZodString;
1199
- subject: z.ZodString;
1200
- }, z.core.$strict>>;
1201
- occurredAt: z.ZodNumber;
1202
- data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
1203
- receivedAt: z.ZodNumber;
1204
- }, z.core.$strict>;
1205
- type Observation = z.infer<typeof observationSchema>;
1206
- declare const observationTriggerSchema: z.ZodObject<{
1207
- source: z.ZodString;
1208
- type: z.ZodString;
1209
- }, z.core.$strict>;
1210
- declare const completionPolicySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1211
- kind: z.ZodLiteral<"streak">;
1212
- days: z.ZodNumber;
1213
- timeZone: z.ZodString;
1214
- }, z.core.$strict>, z.ZodObject<{
1215
- kind: z.ZodLiteral<"once">;
1216
- }, z.core.$strict>, z.ZodObject<{
1217
- kind: z.ZodLiteral<"keyed">;
1218
- }, z.core.$strict>], "kind">;
1219
- declare const completionKeySchema: z.ZodString;
1220
- declare const budgetSchema: z.ZodObject<{
1221
- id: z.ZodString;
1222
- scope: z.ZodEnum<{
1223
- member: "member";
1224
- project: "project";
1225
- }>;
1226
- period: z.ZodEnum<{
1227
- day: "day";
1228
- lifetime: "lifetime";
1229
- week: "week";
1230
- }>;
1231
- limit: z.ZodNumber;
1232
- cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1233
- balance: z.ZodString;
1234
- }, z.core.$strict>]>;
1235
- }, z.core.$strict>;
1236
- type Budget = z.infer<typeof budgetSchema>;
1237
- declare const observationReceiptSchema: z.ZodObject<{
1238
- id: z.ZodString;
1239
- source: z.ZodString;
1240
- attempts: z.ZodArray<z.ZodString>;
1241
- receivedAt: z.ZodNumber;
1242
- }, z.core.$strip>;
1243
- declare const discordReactionSchema: z.ZodObject<{
1244
- guildId: z.ZodString;
1245
- channelId: z.ZodString;
1246
- messageId: z.ZodString;
1247
- userId: z.ZodString;
1248
- messageAuthorId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1249
- actorRoles: z.ZodDefault<z.ZodArray<z.ZodString>>;
1250
- emoji: z.ZodObject<{
1251
- id: z.ZodNullable<z.ZodString>;
1252
- name: z.ZodString;
1253
- }, z.core.$strip>;
1254
- messagePublishedAt: z.ZodNumber;
1255
- }, z.core.$strict>;
1256
- declare const discordMessageSchema: z.ZodObject<{
1257
- guildId: z.ZodString;
1258
- channelId: z.ZodString;
1259
- messageId: z.ZodString;
1260
- userId: z.ZodString;
1261
- content: z.ZodNullable<z.ZodString>;
1262
- replyTo: z.ZodNullable<z.ZodString>;
1263
- publishedAt: z.ZodNumber;
1264
- }, z.core.$strict>;
1265
- type DiscordMessage = z.infer<typeof discordMessageSchema>;
1266
-
1267
- declare const integrationProviderSchema: z.ZodEnum<{
1268
- discord: "discord";
1269
- }>;
1270
- type IntegrationProvider = z.infer<typeof integrationProviderSchema>;
1271
- declare const discordServerSchema: z.ZodObject<{
1272
- id: z.ZodString;
1273
- name: z.ZodString;
1274
- icon: z.ZodNullable<z.ZodString>;
1275
- }, z.core.$strip>;
1276
- declare const projectIntegrationSchema: z.ZodObject<{
1277
- provider: z.ZodEnum<{
1278
- discord: "discord";
1279
- }>;
1280
- configured: z.ZodBoolean;
1281
- status: z.ZodEnum<{
1282
- disconnected: "disconnected";
1283
- ready: "ready";
1284
- attention: "attention";
1285
- }>;
1286
- revision: z.ZodNumber;
1287
- server: z.ZodNullable<z.ZodObject<{
1288
- id: z.ZodString;
1289
- name: z.ZodString;
1290
- icon: z.ZodNullable<z.ZodString>;
1291
- }, z.core.$strip>>;
1292
- issue: z.ZodNullable<z.ZodString>;
1293
- connectedAt: z.ZodDefault<z.ZodNumber>;
1294
- }, z.core.$strip>;
1295
- type ProjectIntegration = z.infer<typeof projectIntegrationSchema>;
1296
-
1297
- export { publishedTrackerSchema as $, type AccountRole as A, type Budget as B, type XProfile as C, type DiscordMessage as D, type XTweet as E, accountRoleSchema as F, beneficiaryRole as G, budgetSchema as H, type IdentityKind as I, completionKeySchema as J, completionPolicySchema as K, customSourceSchema as L, defaultTriggerMode as M, discordMessageSchema as N, type Observation as O, type ProjectIntegration as P, discordReactionSchema as Q, type ResourceSource as R, discordServerSchema as S, type TrackerDefinition as T, identityKindSchema as U, integrationProviderSchema as V, observationInputSchema as W, type XReader as X, observationReceiptSchema as Y, observationSchema as Z, projectIntegrationSchema as _, type TrackerTriggerContext as a, resourceOptionsSchema as a0, resourceRequestSchema as a1, resourceSourceSchema as a2, sourceIdentities as a3, trackerAccountSchema as a4, trackerArtifactSchema as a5, trackerAttributionSchema as a6, trackerBoundSchema as a7, trackerContentQuerySchema as a8, trackerContentReadSchema as a9, xConnectionSchema as aA, xContentBodySchema as aB, xIdSchema as aC, xPostSchema as aD, xProfileSchema as aE, xRequestSchema as aF, xSearchSourceSchema as aG, xTweetSchema as aH, trackerContentSchema as aa, trackerControlSchema as ab, trackerEvidenceSchema as ac, trackerIngestResultSchema as ad, trackerIngestSchema as ae, trackerOutcomePageSchema as af, trackerOutcomeQuerySchema as ag, trackerOutcomeRetrySchema as ah, trackerOutcomeSchema as ai, trackerPageSchema as aj, trackerPreviewInputSchema as ak, trackerPreviewLimits as al, trackerPreviewSchema as am, trackerQuerySchema as an, trackerRecordInputSchema as ao, trackerRecordSchema as ap, trackerSkipCodes as aq, trackerSourceSchema as ar, trackerStatusSchema as as, trackerSummarySchema as at, trackerTriggerModeSchema as au, trackerTriggerPolicySchema as av, trackerTriggerRecordSchema as aw, trackerWhereSchema as ax, triggerMode as ay, xAccountRoles as az, type TrackerReader as b, type TrackerTriggerMode as c, type TrackerWhere as d, type TrackerTriggerPolicy as e, type IntegrationProvider as f, trackerTriggerContextSchema as g, type ResourceOption as h, type TrackerAccount as i, type TrackerAttribution as j, type TrackerBound as k, type TrackerContent as l, type TrackerContentQuery as m, type TrackerOutcome as n, observationTriggerSchema as o, type TrackerOutcomeQuery as p, type TrackerPreview as q, type TrackerPreviewInput as r, type TrackerQuery as s, trackerDefinitionSchema as t, type TrackerRecord as u, type TrackerSkipCode as v, type TrackerSource as w, type TrackerStatus as x, type XConnection as y, type XPost as z };