@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
package/dist/browser.js CHANGED
@@ -11,12 +11,14 @@ import {
11
11
  signInOptions,
12
12
  solanaSigner,
13
13
  walletStandardSolanaSigner
14
- } from "./chunk-6A6K5RUD.js";
15
- import "./chunk-V5R2DMGY.js";
16
- import "./chunk-MRIURJE3.js";
17
- import "./chunk-V7EZUZ3Z.js";
18
- import "./chunk-QBOHLT7M.js";
19
- import "./chunk-VARGF4JS.js";
14
+ } from "./chunk-ZVIRG24J.js";
15
+ import "./chunk-GZ6FJAXN.js";
16
+ import "./chunk-EYH5RDIE.js";
17
+ import "./chunk-36HTX2BM.js";
18
+ import "./chunk-6QJ3LADK.js";
19
+ import "./chunk-NPGENI7K.js";
20
+ import "./chunk-XFMSUPNS.js";
21
+ import "./chunk-JON5SESL.js";
20
22
  export {
21
23
  browserSubmissionStore,
22
24
  cosmosChainList,
@@ -0,0 +1,458 @@
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.ZodUnion<readonly [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.ZodUnion<readonly [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
+ declare const settingFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
53
+ kind: z.ZodLiteral<"point-ledger">;
54
+ default: z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>;
55
+ label: z.ZodString;
56
+ description: z.ZodOptional<z.ZodString>;
57
+ }, z.core.$strict>, z.ZodObject<{
58
+ kind: z.ZodLiteral<"datetime">;
59
+ default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
60
+ label: z.ZodString;
61
+ description: z.ZodOptional<z.ZodString>;
62
+ }, z.core.$strict>, z.ZodObject<{
63
+ kind: z.ZodLiteral<"resource">;
64
+ default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
65
+ source: z.ZodUnion<readonly [z.ZodObject<{
66
+ provider: z.ZodLiteral<"domino">;
67
+ resource: z.ZodLiteral<"point-ledger">;
68
+ }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
69
+ provider: z.ZodLiteral<"discord">;
70
+ resource: z.ZodLiteral<"channel">;
71
+ types: z.ZodArray<z.ZodEnum<{
72
+ text: "text";
73
+ announcement: "announcement";
74
+ }>>;
75
+ }, z.core.$strict>, z.ZodObject<{
76
+ provider: z.ZodLiteral<"discord">;
77
+ resource: z.ZodLiteral<"role">;
78
+ assignable: z.ZodDefault<z.ZodBoolean>;
79
+ }, z.core.$strict>]>]>;
80
+ label: z.ZodString;
81
+ description: z.ZodOptional<z.ZodString>;
82
+ }, z.core.$strict>, z.ZodObject<{
83
+ kind: z.ZodLiteral<"quiz">;
84
+ default: z.ZodArray<z.ZodObject<{
85
+ id: z.ZodString;
86
+ prompt: z.ZodString;
87
+ choices: z.ZodArray<z.ZodObject<{
88
+ id: z.ZodString;
89
+ label: z.ZodString;
90
+ }, z.core.$strict>>;
91
+ correct: z.ZodString;
92
+ }, z.core.$strict>>;
93
+ label: z.ZodString;
94
+ description: z.ZodOptional<z.ZodString>;
95
+ }, z.core.$strict>, z.ZodObject<{
96
+ kind: z.ZodLiteral<"text">;
97
+ default: z.ZodString;
98
+ minLength: z.ZodNumber;
99
+ maxLength: z.ZodNumber;
100
+ multiline: z.ZodBoolean;
101
+ label: z.ZodString;
102
+ description: z.ZodOptional<z.ZodString>;
103
+ }, z.core.$strict>, z.ZodObject<{
104
+ kind: z.ZodLiteral<"integer">;
105
+ default: z.ZodNumber;
106
+ min: z.ZodNumber;
107
+ max: z.ZodNumber;
108
+ label: z.ZodString;
109
+ description: z.ZodOptional<z.ZodString>;
110
+ }, z.core.$strict>, z.ZodObject<{
111
+ kind: z.ZodLiteral<"boolean">;
112
+ default: z.ZodBoolean;
113
+ label: z.ZodString;
114
+ description: z.ZodOptional<z.ZodString>;
115
+ }, z.core.$strict>, z.ZodObject<{
116
+ kind: z.ZodLiteral<"choice">;
117
+ default: z.ZodString;
118
+ options: z.ZodArray<z.ZodString>;
119
+ label: z.ZodString;
120
+ description: z.ZodOptional<z.ZodString>;
121
+ }, z.core.$strict>], "kind">;
122
+ type SettingField = z.infer<typeof settingFieldSchema>;
123
+ declare const settingsFieldsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
124
+ kind: z.ZodLiteral<"point-ledger">;
125
+ default: z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>;
126
+ label: z.ZodString;
127
+ description: z.ZodOptional<z.ZodString>;
128
+ }, z.core.$strict>, z.ZodObject<{
129
+ kind: z.ZodLiteral<"datetime">;
130
+ default: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<string, string>>;
131
+ label: z.ZodString;
132
+ description: z.ZodOptional<z.ZodString>;
133
+ }, z.core.$strict>, z.ZodObject<{
134
+ kind: z.ZodLiteral<"resource">;
135
+ default: z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>;
136
+ source: z.ZodUnion<readonly [z.ZodObject<{
137
+ provider: z.ZodLiteral<"domino">;
138
+ resource: z.ZodLiteral<"point-ledger">;
139
+ }, z.core.$strict>, z.ZodUnion<readonly [z.ZodObject<{
140
+ provider: z.ZodLiteral<"discord">;
141
+ resource: z.ZodLiteral<"channel">;
142
+ types: z.ZodArray<z.ZodEnum<{
143
+ text: "text";
144
+ announcement: "announcement";
145
+ }>>;
146
+ }, z.core.$strict>, z.ZodObject<{
147
+ provider: z.ZodLiteral<"discord">;
148
+ resource: z.ZodLiteral<"role">;
149
+ assignable: z.ZodDefault<z.ZodBoolean>;
150
+ }, z.core.$strict>]>]>;
151
+ label: z.ZodString;
152
+ description: z.ZodOptional<z.ZodString>;
153
+ }, z.core.$strict>, z.ZodObject<{
154
+ kind: z.ZodLiteral<"quiz">;
155
+ default: z.ZodArray<z.ZodObject<{
156
+ id: z.ZodString;
157
+ prompt: z.ZodString;
158
+ choices: z.ZodArray<z.ZodObject<{
159
+ id: z.ZodString;
160
+ label: z.ZodString;
161
+ }, z.core.$strict>>;
162
+ correct: z.ZodString;
163
+ }, z.core.$strict>>;
164
+ label: z.ZodString;
165
+ description: z.ZodOptional<z.ZodString>;
166
+ }, z.core.$strict>, z.ZodObject<{
167
+ kind: z.ZodLiteral<"text">;
168
+ default: z.ZodString;
169
+ minLength: z.ZodNumber;
170
+ maxLength: z.ZodNumber;
171
+ multiline: z.ZodBoolean;
172
+ label: z.ZodString;
173
+ description: z.ZodOptional<z.ZodString>;
174
+ }, z.core.$strict>, z.ZodObject<{
175
+ kind: z.ZodLiteral<"integer">;
176
+ default: z.ZodNumber;
177
+ min: z.ZodNumber;
178
+ max: z.ZodNumber;
179
+ label: z.ZodString;
180
+ description: z.ZodOptional<z.ZodString>;
181
+ }, z.core.$strict>, z.ZodObject<{
182
+ kind: z.ZodLiteral<"boolean">;
183
+ default: z.ZodBoolean;
184
+ label: z.ZodString;
185
+ description: z.ZodOptional<z.ZodString>;
186
+ }, z.core.$strict>, z.ZodObject<{
187
+ kind: z.ZodLiteral<"choice">;
188
+ default: z.ZodString;
189
+ options: z.ZodArray<z.ZodString>;
190
+ label: z.ZodString;
191
+ description: z.ZodOptional<z.ZodString>;
192
+ }, z.core.$strict>], "kind">>;
193
+ declare const settingsValuesSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodObject<{
194
+ id: z.ZodString;
195
+ prompt: z.ZodString;
196
+ choices: z.ZodArray<z.ZodObject<{
197
+ id: z.ZodString;
198
+ label: z.ZodString;
199
+ }, z.core.$strict>>;
200
+ correct: z.ZodString;
201
+ }, z.core.$strict>>]>>;
202
+ type SettingsValues = z.infer<typeof settingsValuesSchema>;
203
+ /** Type-only marker of the builder that made a setting. It never exists at runtime. */
204
+ declare const settingKind: unique symbol;
205
+ /**
206
+ * A quest setting made by a `settings.*` builder, which records the field Console edits in the
207
+ * schema's metadata. Plain zod schemas are not settings.
208
+ */
209
+ type Setting<K extends SettingField["kind"] = SettingField["kind"], S extends z.ZodType = z.ZodType> = S & {
210
+ readonly [settingKind]: K;
211
+ };
212
+ /** The names of a settings shape's integer settings. */
213
+ type IntegerSettings<T> = {
214
+ [K in keyof T]: T[K] extends Setting<"integer"> ? K : never;
215
+ }[keyof T] & string;
216
+ declare function parseSettings(fields: Record<string, SettingField>, input: unknown): SettingsValues;
217
+ declare function missingResourceSettings(fields: Record<string, SettingField>, values: SettingsValues): string[];
218
+ declare function compatibleSettingKinds(previous: SettingField, next: SettingField): boolean;
219
+
220
+ declare const xIdSchema: z.ZodString;
221
+ declare const xConnectionSchema: z.ZodObject<{
222
+ userId: z.ZodString;
223
+ }, z.core.$strip>;
224
+ declare const xProfileSchema: z.ZodObject<{
225
+ id: z.ZodString;
226
+ username: z.ZodString;
227
+ name: z.ZodString;
228
+ bio: z.ZodNullable<z.ZodString>;
229
+ profileImageUrl: z.ZodNullable<z.ZodString>;
230
+ followersCount: z.ZodNullable<z.ZodNumber>;
231
+ verified: z.ZodNullable<z.ZodBoolean>;
232
+ }, z.core.$strip>;
233
+ declare const xPostSchema: z.ZodObject<{
234
+ id: z.ZodString;
235
+ userId: z.ZodString;
236
+ content: z.ZodString;
237
+ createdAt: z.ZodISODateTime;
238
+ author: z.ZodObject<{
239
+ id: z.ZodString;
240
+ username: z.ZodString;
241
+ name: z.ZodString;
242
+ verified: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
243
+ }, z.core.$loose>;
244
+ likeCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
245
+ replyCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
246
+ retweetCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
247
+ quoteCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
248
+ viewCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
249
+ bookmarkCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
250
+ isReply: z.ZodBoolean;
251
+ isRetweet: z.ZodBoolean;
252
+ isQuoteTweet: z.ZodBoolean;
253
+ quotedTweetId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
254
+ inReplyToUserId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
255
+ inReplyToStatusId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
256
+ retweetedTweetId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
257
+ media: z.ZodPipe<z.ZodUnknown, z.ZodTransform<{
258
+ type: string;
259
+ url: string;
260
+ }[], unknown>>;
261
+ }, z.core.$loose>;
262
+ declare const xRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
263
+ operation: z.ZodLiteral<"connection">;
264
+ }, z.core.$strict>, z.ZodObject<{
265
+ operation: z.ZodLiteral<"profile">;
266
+ }, z.core.$strict>, z.ZodObject<{
267
+ operation: z.ZodLiteral<"post">;
268
+ postId: z.ZodString;
269
+ }, z.core.$strict>, z.ZodObject<{
270
+ operation: z.ZodLiteral<"follows">;
271
+ userId: z.ZodString;
272
+ }, z.core.$strict>, z.ZodObject<{
273
+ operation: z.ZodLiteral<"reposted">;
274
+ postId: z.ZodString;
275
+ }, z.core.$strict>], "operation">;
276
+ type XConnection = z.infer<typeof xConnectionSchema>;
277
+ type XProfile = z.infer<typeof xProfileSchema>;
278
+ type XPost = z.infer<typeof xPostSchema>;
279
+ /**
280
+ * Reads the member's linked X account and public X data. The account is pinned at the attempt's
281
+ * first X read: later links and unlinks do not change the attempt. `connection()`, `profile()`,
282
+ * `follows()` and `reposted()` resolve to `null` when the member has no linked X account;
283
+ * `post()` reads any public post and resolves to `null` when it does not exist. Provider failures
284
+ * throw `CapabilityError` with code `"provider-unavailable"`.
285
+ */
286
+ interface XReader {
287
+ connection(): Promise<XConnection | null>;
288
+ profile(): Promise<XProfile | null>;
289
+ post(input: {
290
+ postId: string;
291
+ }): Promise<XPost | null>;
292
+ follows(input: {
293
+ userId: string;
294
+ }): Promise<boolean | null>;
295
+ reposted(input: {
296
+ postId: string;
297
+ }): Promise<boolean | null>;
298
+ }
299
+
300
+ declare const completionPolicySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
301
+ kind: z.ZodLiteral<"streak">;
302
+ days: z.ZodNumber;
303
+ }, z.core.$strip>, z.ZodObject<{
304
+ kind: z.ZodLiteral<"progress">;
305
+ goal: z.ZodObject<{
306
+ kind: z.ZodLiteral<"count">;
307
+ count: z.ZodNumber;
308
+ }, z.core.$strict>;
309
+ window: z.ZodDiscriminatedUnion<[z.ZodObject<{
310
+ kind: z.ZodLiteral<"lifetime">;
311
+ }, z.core.$strict>, z.ZodObject<{
312
+ kind: z.ZodLiteral<"calendar">;
313
+ period: z.ZodEnum<{
314
+ day: "day";
315
+ week: "week";
316
+ month: "month";
317
+ }>;
318
+ latenessMs: z.ZodDefault<z.ZodNumber>;
319
+ }, z.core.$strict>, z.ZodObject<{
320
+ kind: z.ZodLiteral<"rolling">;
321
+ durationMs: z.ZodNumber;
322
+ }, z.core.$strict>], "kind">;
323
+ repeat: z.ZodDefault<z.ZodEnum<{
324
+ repeat: "repeat";
325
+ once: "once";
326
+ }>>;
327
+ }, z.core.$strict>, z.ZodObject<{
328
+ kind: z.ZodLiteral<"once">;
329
+ }, z.core.$strict>, z.ZodObject<{
330
+ kind: z.ZodLiteral<"keyed">;
331
+ }, z.core.$strict>], "kind">;
332
+ declare const completionKeySchema: z.ZodString;
333
+ declare const budgetSchema: z.ZodObject<{
334
+ id: z.ZodString;
335
+ scope: z.ZodEnum<{
336
+ member: "member";
337
+ project: "project";
338
+ }>;
339
+ period: z.ZodEnum<{
340
+ lifetime: "lifetime";
341
+ day: "day";
342
+ week: "week";
343
+ month: "month";
344
+ }>;
345
+ limit: z.ZodNumber;
346
+ cost: z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
347
+ balance: z.ZodString;
348
+ }, z.core.$strict>]>;
349
+ }, z.core.$strict>;
350
+ type Budget = z.infer<typeof budgetSchema>;
351
+
352
+ /** Modules a quest can declare to enable provider readers. Project connections are separate. */
353
+ declare const evaluatorIntegrationProviderSchema: z.ZodEnum<{
354
+ discord: "discord";
355
+ x: "x";
356
+ }>;
357
+ type EvaluatorIntegrationProvider = z.infer<typeof evaluatorIntegrationProviderSchema>;
358
+ type IntegrationModule = {
359
+ readonly provider: EvaluatorIntegrationProvider;
360
+ };
361
+ declare const integrationProviderSchema: z.ZodEnum<{
362
+ discord: "discord";
363
+ }>;
364
+ type IntegrationProvider = z.infer<typeof integrationProviderSchema>;
365
+ declare const discordServerSchema: z.ZodObject<{
366
+ id: z.ZodString;
367
+ name: z.ZodString;
368
+ icon: z.ZodNullable<z.ZodString>;
369
+ }, z.core.$strip>;
370
+ declare const projectIntegrationSchema: z.ZodObject<{
371
+ provider: z.ZodEnum<{
372
+ discord: "discord";
373
+ }>;
374
+ configured: z.ZodBoolean;
375
+ status: z.ZodEnum<{
376
+ disconnected: "disconnected";
377
+ ready: "ready";
378
+ attention: "attention";
379
+ }>;
380
+ revision: z.ZodNumber;
381
+ server: z.ZodNullable<z.ZodObject<{
382
+ id: z.ZodString;
383
+ name: z.ZodString;
384
+ icon: z.ZodNullable<z.ZodString>;
385
+ }, z.core.$strip>>;
386
+ issue: z.ZodNullable<z.ZodString>;
387
+ connectedAt: z.ZodDefault<z.ZodNumber>;
388
+ }, z.core.$strip>;
389
+ type ProjectIntegration = z.infer<typeof projectIntegrationSchema>;
390
+
391
+ /**
392
+ * Why an evaluator capability could not answer:
393
+ *
394
+ * - `not-linked`: the call needs a member account that is not linked, and its result cannot be
395
+ * null, such as an image check of the member's X profile picture. Readers of the member's own
396
+ * accounts return `null` instead.
397
+ * - `provider-unavailable`: the provider (X, Discord, a chain RPC, AI review) did not answer, or
398
+ * the project's integration cannot reach it.
399
+ * - `author-error`: the call cannot be answered as written: invalid input, an undeclared
400
+ * integration, an unknown tracker, a chain Relay does not read, a wallet the member never
401
+ * linked, or an image that does not exist.
402
+ *
403
+ * Later versions can add codes. Treat an unknown code as a failure its `message` explains.
404
+ */
405
+ declare const capabilityErrorCodes: readonly ["not-linked", "provider-unavailable", "author-error"];
406
+ type KnownCapabilityErrorCode = (typeof capabilityErrorCodes)[number];
407
+ /** A known code, or one a newer Relay added. */
408
+ type CapabilityErrorCode = KnownCapabilityErrorCode | (string & {});
409
+ /**
410
+ * A capability failure as it crosses the sandbox boundary and as Relay captures it. Open, so a
411
+ * newer Relay can add codes and fields without breaking an older evaluator or Worker.
412
+ */
413
+ declare const capabilityFailureSchema: z.ZodObject<{
414
+ code: z.ZodString;
415
+ message: z.ZodString;
416
+ /**
417
+ * True when Relay retries the attempt if the error reaches it uncaught, and calls the provider
418
+ * again. A failure that is not retryable is captured (or follows from the attempt's pinned
419
+ * inputs), so every run of the attempt sees it again. A retryable failure that quest code
420
+ * handles and moves past is final for the attempt; one that escapes the evaluation is retried.
421
+ */
422
+ retryable: z.ZodBoolean;
423
+ }, z.core.$loose>;
424
+ type CapabilityFailure = z.infer<typeof capabilityFailureSchema>;
425
+ /**
426
+ * Thrown by an evaluator capability (`ctx.x`, `ctx.discord`, `ctx.wallet`, `ctx.trackers`,
427
+ * `ctx.images`, `ctx.review`) that could not answer. A capability whose subject is missing (an
428
+ * account the member has not linked, a deleted post or message) returns `null` instead of
429
+ * throwing.
430
+ *
431
+ * Catch it to decide yourself; rethrow anything else. An uncaught retryable error makes Relay
432
+ * retry the attempt later; an uncaught one that is not retryable fails it.
433
+ *
434
+ * ```ts
435
+ * try {
436
+ * return (await ctx.x.follows({ userId })) ? decision.accept() : decision.reject({ reason })
437
+ * } catch (error) {
438
+ * if (error instanceof CapabilityError && error.code === "provider-unavailable")
439
+ * return decision.review({ reason: "X is unavailable" })
440
+ * throw error
441
+ * }
442
+ * ```
443
+ */
444
+ declare class CapabilityError extends Error {
445
+ readonly code: CapabilityErrorCode;
446
+ readonly retryable: boolean;
447
+ constructor(code: CapabilityErrorCode, message: string, options?: {
448
+ retryable?: boolean;
449
+ });
450
+ static [Symbol.hasInstance](value: unknown): boolean;
451
+ /**
452
+ * The error for a captured or transported failure. A code this SDK does not know is never
453
+ * retryable: nothing tells it a retry would help.
454
+ */
455
+ static from(failure: CapabilityFailure): CapabilityError;
456
+ }
457
+
458
+ export { settingsValuesSchema as A, type Budget as B, type CapabilityErrorCode as C, xConnectionSchema as D, type EvaluatorIntegrationProvider as E, xIdSchema as F, xPostSchema as G, xProfileSchema as H, type IntegerSettings as I, xRequestSchema as J, type KnownCapabilityErrorCode as K, CapabilityError as L, type ProjectIntegration as P, type ResourceOption as R, type Setting as S, type XConnection as X, type CapabilityFailure as a, type IntegrationModule as b, type IntegrationProvider as c, type ResourceSource as d, type SettingField as e, type SettingsValues as f, type XPost as g, type XProfile as h, type XReader as i, budgetSchema as j, capabilityErrorCodes as k, capabilityFailureSchema as l, compatibleSettingKinds as m, completionKeySchema as n, completionPolicySchema as o, discordServerSchema as p, evaluatorIntegrationProviderSchema as q, integrationProviderSchema as r, missingResourceSettings as s, parseSettings as t, projectIntegrationSchema as u, resourceOptionsSchema as v, resourceRequestSchema as w, resourceSourceSchema as x, settingFieldSchema as y, settingsFieldsSchema as z };