@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.
Files changed (88) hide show
  1. package/CHANGELOG.md +276 -8
  2. package/README.md +3 -2
  3. package/dist/{schema-CZ6Rj0ZF.d.ts → accounts-nz3mzfRQ.d.ts} +3146 -1765
  4. package/dist/action-9Xl0StBg.d.ts +33 -0
  5. package/dist/{attempt-captures-DYnJVkfg.d.ts → attempt-captures-DMi8oR9T.d.ts} +1 -1
  6. package/dist/authoring.d.ts +171 -49
  7. package/dist/authoring.js +158 -49
  8. package/dist/{automatic-outcomes-If88LR9f.d.ts → automatic-outcomes-C_LLQU1p.d.ts} +15 -1
  9. package/dist/avatar.d.ts +1 -1
  10. package/dist/browser.d.ts +15 -11
  11. package/dist/browser.js +18 -12
  12. package/dist/capability-error-CuI_F7yM.d.ts +296 -0
  13. package/dist/{pages-K7-KjSXw.d.ts → catalog-BaTOKpNw.d.ts} +56 -567
  14. package/dist/{chunk-XBV2CK2H.js → chunk-3RFP6GT5.js} +15 -3
  15. package/dist/{chunk-VURRFVNP.js → chunk-4GQW43UU.js} +239 -361
  16. package/dist/chunk-4NOFSGAL.js +320 -0
  17. package/dist/{chunk-24I4R732.js → chunk-5XLZ34PV.js} +34 -19
  18. package/dist/{chunk-L77O64I4.js → chunk-7X67QLPB.js} +43 -43
  19. package/dist/{chunk-RHBS5FJL.js → chunk-7Z4SZ6YM.js} +3 -3
  20. package/dist/{chunk-QEAS4ZGS.js → chunk-AQOL3SK5.js} +1 -1
  21. package/dist/chunk-EHUSD3O2.js +377 -0
  22. package/dist/chunk-FO2LCZTL.js +19 -0
  23. package/dist/{chunk-DYXDZFKA.js → chunk-FU5CGNTR.js} +166 -178
  24. package/dist/chunk-FWLQ5XCS.js +21 -0
  25. package/dist/chunk-GLH6MEI2.js +193 -0
  26. package/dist/chunk-ICXZZNPS.js +199 -0
  27. package/dist/{chunk-ZDJLPN4L.js → chunk-ID3BZXFZ.js} +2696 -2693
  28. package/dist/chunk-KP2MCX3R.js +587 -0
  29. package/dist/{chunk-SKGTNTLF.js → chunk-LZWXCBUB.js} +213 -297
  30. package/dist/chunk-MTKRIQEU.js +31 -0
  31. package/dist/{chunk-4OC7REYX.js → chunk-MWMCQLCG.js} +3 -3
  32. package/dist/{chunk-PPB7HALD.js → chunk-N4BDKS6Y.js} +27 -26
  33. package/dist/{chunk-5I54XBK2.js → chunk-N4LNEGQX.js} +2 -2
  34. package/dist/chunk-NQDEWJWE.js +554 -0
  35. package/dist/chunk-QR6HH4DI.js +508 -0
  36. package/dist/chunk-TLSQETTY.js +41 -0
  37. package/dist/{chunk-MHPKEVEW.js → chunk-U66GUVSG.js} +7 -2
  38. package/dist/{chunk-KDR2VAJP.js → chunk-UYVJZR33.js} +2 -2
  39. package/dist/chunk-UZ765UGH.js +18 -0
  40. package/dist/{chunk-7A4J67ZL.js → chunk-VWQGWGCH.js} +7 -7
  41. package/dist/chunk-W7YSMSGC.js +725 -0
  42. package/dist/{client-C51w7fMb.d.ts → client-DHmG7rn6.d.ts} +126 -93
  43. package/dist/{announcements-CHx3-HBw.d.ts → dashboards-CLemT6kj.d.ts} +14 -137
  44. package/dist/{deployments-kWoHFaqj.d.ts → deployments-DTULi7dF.d.ts} +450 -18
  45. package/dist/identity-integration-DOeNZaxF.d.ts +1271 -0
  46. package/dist/index.d.ts +13 -11
  47. package/dist/index.js +16 -11
  48. package/dist/internal.d.ts +29 -13
  49. package/dist/internal.js +57 -17
  50. package/dist/{integrations-B3y36OaB.d.ts → limits-kNzYdZ00.d.ts} +464 -53
  51. package/dist/{offers-BoV4ryUc.d.ts → offers-CYeN_I0Y.d.ts} +22 -4
  52. package/dist/{participant-activity-DHL8QYks.d.ts → participant-activity-D-Drp24G.d.ts} +16 -3
  53. package/dist/portal-proxy.d.ts +75 -2
  54. package/dist/portal-proxy.js +153 -25
  55. package/dist/react/index.d.ts +214 -27
  56. package/dist/react/index.js +196 -42
  57. package/dist/{action-DBzILFx9.d.ts → request-error-D_dUPLwo.d.ts} +1 -31
  58. package/dist/reward-deliveries-drp-x1G-.d.ts +782 -0
  59. package/dist/runtime/authoring.js +1 -1
  60. package/dist/runtime/chunks/UGDV5W4N.js +1 -0
  61. package/dist/runtime/manifest.json +3 -3
  62. package/dist/runtime/schema.js +1 -1
  63. package/dist/schema.d.ts +330 -31
  64. package/dist/schema.js +147 -91
  65. package/dist/server/index.d.ts +14 -12
  66. package/dist/server/index.js +6425 -6260
  67. package/dist/sign-in-providers-B1Q9eDRm.d.ts +44 -0
  68. package/dist/submission-input-DZCbjQUH.d.ts +343 -0
  69. package/dist/{telegram-browser-BUceZIGZ.d.ts → telegram-browser-NL0Asmsi.d.ts} +46 -6
  70. package/dist/telegram.d.ts +64 -0
  71. package/dist/telegram.js +23 -0
  72. package/dist/testing.d.ts +326 -27
  73. package/dist/testing.js +440 -90
  74. package/dist/tracker-data-esm3WG8R.d.ts +1881 -0
  75. package/dist/{transport-BrX9pIGN.d.ts → transport-Czht_irp.d.ts} +43483 -38512
  76. package/dist/{wallet-CIqFoxdm.d.ts → wallet-B7e06v4m.d.ts} +32 -9
  77. package/package.json +5 -1
  78. package/dist/accounts-DoabriBX.d.ts +0 -306
  79. package/dist/capability-error-DufwG3G0.d.ts +0 -159
  80. package/dist/chunk-3Y3L2F54.js +0 -982
  81. package/dist/chunk-DHXDBAJF.js +0 -544
  82. package/dist/chunk-EN3M5Z4J.js +0 -13
  83. package/dist/chunk-QNUHWK7R.js +0 -602
  84. package/dist/chunk-SE4PFJPT.js +0 -247
  85. package/dist/groups-CqcA2Ycs.d.ts +0 -2827
  86. package/dist/runtime/chunks/5QVFB4TU.js +0 -1
  87. package/dist/submission-input-C54Q8yAD.d.ts +0 -146
  88. package/dist/x-D1PGi8Sq.d.ts +0 -331
@@ -1,4 +1,332 @@
1
1
  import * as z from 'zod';
2
+ import { aa as PhotoResult, V as AttemptCodeSource } from './accounts-nz3mzfRQ.js';
3
+
4
+ /**
5
+ * Quest code names an image; the platform fetches, decodes and pins it. No bytes or URLs cross the
6
+ * sandbox boundary, so a quest cannot make the platform fetch an arbitrary address.
7
+ */
8
+ declare const imageReferenceSchema: z.ZodUnion<readonly [z.ZodObject<{
9
+ evidence: z.ZodString;
10
+ }, z.core.$strict>, z.ZodObject<{
11
+ x: z.ZodLiteral<"profile">;
12
+ }, z.core.$strict>, z.ZodObject<{
13
+ x: z.ZodLiteral<"post">;
14
+ postId: z.ZodString;
15
+ index: z.ZodDefault<z.ZodNumber>;
16
+ }, z.core.$strict>, z.ZodObject<{
17
+ asset: z.ZodString;
18
+ }, z.core.$strict>]>;
19
+ type ImageReference = z.input<typeof imageReferenceSchema>;
20
+ declare const imageFieldSchema: z.ZodObject<{
21
+ type: z.ZodEnum<{
22
+ string: "string";
23
+ number: "number";
24
+ boolean: "boolean";
25
+ }>;
26
+ description: z.ZodString;
27
+ }, z.core.$strict>;
28
+ declare const imageFieldsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
29
+ type: z.ZodEnum<{
30
+ string: "string";
31
+ number: "number";
32
+ boolean: "boolean";
33
+ }>;
34
+ description: z.ZodString;
35
+ }, z.core.$strict>>;
36
+ type ImageFields = z.input<typeof imageFieldsSchema>;
37
+ declare const imageRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
38
+ operation: z.ZodLiteral<"inspect">;
39
+ image: z.ZodUnion<readonly [z.ZodObject<{
40
+ evidence: z.ZodString;
41
+ }, z.core.$strict>, z.ZodObject<{
42
+ x: z.ZodLiteral<"profile">;
43
+ }, z.core.$strict>, z.ZodObject<{
44
+ x: z.ZodLiteral<"post">;
45
+ postId: z.ZodString;
46
+ index: z.ZodDefault<z.ZodNumber>;
47
+ }, z.core.$strict>, z.ZodObject<{
48
+ asset: z.ZodString;
49
+ }, z.core.$strict>]>;
50
+ }, z.core.$strict>, z.ZodObject<{
51
+ operation: z.ZodLiteral<"compare">;
52
+ images: z.ZodTuple<[z.ZodUnion<readonly [z.ZodObject<{
53
+ evidence: z.ZodString;
54
+ }, z.core.$strict>, z.ZodObject<{
55
+ x: z.ZodLiteral<"profile">;
56
+ }, z.core.$strict>, z.ZodObject<{
57
+ x: z.ZodLiteral<"post">;
58
+ postId: z.ZodString;
59
+ index: z.ZodDefault<z.ZodNumber>;
60
+ }, z.core.$strict>, z.ZodObject<{
61
+ asset: z.ZodString;
62
+ }, z.core.$strict>]>, z.ZodUnion<readonly [z.ZodObject<{
63
+ evidence: z.ZodString;
64
+ }, z.core.$strict>, z.ZodObject<{
65
+ x: z.ZodLiteral<"profile">;
66
+ }, z.core.$strict>, z.ZodObject<{
67
+ x: z.ZodLiteral<"post">;
68
+ postId: z.ZodString;
69
+ index: z.ZodDefault<z.ZodNumber>;
70
+ }, z.core.$strict>, z.ZodObject<{
71
+ asset: z.ZodString;
72
+ }, z.core.$strict>]>], null>;
73
+ }, z.core.$strict>, z.ZodObject<{
74
+ operation: z.ZodLiteral<"review">;
75
+ images: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
76
+ evidence: z.ZodString;
77
+ }, z.core.$strict>, z.ZodObject<{
78
+ x: z.ZodLiteral<"profile">;
79
+ }, z.core.$strict>, z.ZodObject<{
80
+ x: z.ZodLiteral<"post">;
81
+ postId: z.ZodString;
82
+ index: z.ZodDefault<z.ZodNumber>;
83
+ }, z.core.$strict>, z.ZodObject<{
84
+ asset: z.ZodString;
85
+ }, z.core.$strict>]>>;
86
+ criteria: z.ZodString;
87
+ }, z.core.$strict>, z.ZodObject<{
88
+ operation: z.ZodLiteral<"extract">;
89
+ image: z.ZodUnion<readonly [z.ZodObject<{
90
+ evidence: z.ZodString;
91
+ }, z.core.$strict>, z.ZodObject<{
92
+ x: z.ZodLiteral<"profile">;
93
+ }, z.core.$strict>, z.ZodObject<{
94
+ x: z.ZodLiteral<"post">;
95
+ postId: z.ZodString;
96
+ index: z.ZodDefault<z.ZodNumber>;
97
+ }, z.core.$strict>, z.ZodObject<{
98
+ asset: z.ZodString;
99
+ }, z.core.$strict>]>;
100
+ fields: z.ZodRecord<z.ZodString, z.ZodObject<{
101
+ type: z.ZodEnum<{
102
+ string: "string";
103
+ number: "number";
104
+ boolean: "boolean";
105
+ }>;
106
+ description: z.ZodString;
107
+ }, z.core.$strict>>;
108
+ }, z.core.$strict>, z.ZodObject<{
109
+ operation: z.ZodLiteral<"seen">;
110
+ image: z.ZodUnion<readonly [z.ZodObject<{
111
+ evidence: z.ZodString;
112
+ }, z.core.$strict>, z.ZodObject<{
113
+ x: z.ZodLiteral<"profile">;
114
+ }, z.core.$strict>, z.ZodObject<{
115
+ x: z.ZodLiteral<"post">;
116
+ postId: z.ZodString;
117
+ index: z.ZodDefault<z.ZodNumber>;
118
+ }, z.core.$strict>, z.ZodObject<{
119
+ asset: z.ZodString;
120
+ }, z.core.$strict>]>;
121
+ maxDistance: z.ZodDefault<z.ZodNumber>;
122
+ }, z.core.$strict>], "operation">;
123
+ type ImageRequest = z.input<typeof imageRequestSchema>;
124
+ declare const imageInspectionSchema: z.ZodObject<{
125
+ width: z.ZodNumber;
126
+ height: z.ZodNumber;
127
+ format: z.ZodEnum<{
128
+ jpeg: "jpeg";
129
+ png: "png";
130
+ webp: "webp";
131
+ gif: "gif";
132
+ avif: "avif";
133
+ }>;
134
+ bytes: z.ZodNumber;
135
+ sha256: z.ZodString;
136
+ phash: z.ZodString;
137
+ dhash: z.ZodString;
138
+ }, z.core.$strict>;
139
+ type ImageInspection = z.infer<typeof imageInspectionSchema>;
140
+ declare const imageComparisonSchema: z.ZodObject<{
141
+ identical: z.ZodBoolean;
142
+ phashDistance: z.ZodNumber;
143
+ dhashDistance: z.ZodNumber;
144
+ }, z.core.$strict>;
145
+ type ImageComparison = z.infer<typeof imageComparisonSchema>;
146
+ declare const imageExtractionSchema: z.ZodObject<{
147
+ values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
148
+ reason: z.ZodString;
149
+ }, z.core.$strict>;
150
+ type ImageExtraction = z.infer<typeof imageExtractionSchema>;
151
+ declare const imageSightingsSchema: z.ZodObject<{
152
+ matches: z.ZodNumber;
153
+ closestDistance: z.ZodNullable<z.ZodNumber>;
154
+ firstSeenAt: z.ZodNullable<z.ZodNumber>;
155
+ }, z.core.$strict>;
156
+ type ImageSightings = z.infer<typeof imageSightingsSchema>;
157
+ /**
158
+ * One reference image in a deployment bundle: a reference, never the bytes. The CLI uploads each
159
+ * file to storage before the preview; a hosted build stages it. `path` is where the bundle found
160
+ * the file, relative to relay.json; the platform ignores it.
161
+ */
162
+ declare const imageAssetArtifactSchema: z.ZodObject<{
163
+ key: z.ZodString;
164
+ sha256: z.ZodString;
165
+ size: z.ZodNumber;
166
+ path: z.ZodOptional<z.ZodString>;
167
+ }, z.core.$strict>;
168
+ type ImageAssetArtifact = z.infer<typeof imageAssetArtifactSchema>;
169
+ /** Ask for upload URLs for images the project's storage does not hold yet. */
170
+ declare const imageUploadRequestSchema: z.ZodObject<{
171
+ images: z.ZodArray<z.ZodObject<{
172
+ sha256: z.ZodString;
173
+ size: z.ZodNumber;
174
+ type: z.ZodEnum<{
175
+ "image/jpeg": "image/jpeg";
176
+ "image/png": "image/png";
177
+ "image/webp": "image/webp";
178
+ }>;
179
+ }, z.core.$strict>>;
180
+ }, z.core.$strict>;
181
+ /** `upload` is null when the image is already stored; otherwise PUT the exact bytes before it expires. */
182
+ declare const imageUploadsSchema: z.ZodObject<{
183
+ images: z.ZodArray<z.ZodObject<{
184
+ sha256: z.ZodString;
185
+ upload: z.ZodNullable<z.ZodObject<{
186
+ url: z.ZodString;
187
+ headers: z.ZodRecord<z.ZodString, z.ZodString>;
188
+ expiresAt: z.ZodNumber;
189
+ }, z.core.$strict>>;
190
+ }, z.core.$strict>>;
191
+ }, z.core.$strict>;
192
+ declare const publishedImageSchema: z.ZodObject<{
193
+ key: z.ZodString;
194
+ sha256: z.ZodString;
195
+ type: z.ZodEnum<{
196
+ "image/jpeg": "image/jpeg";
197
+ "image/png": "image/png";
198
+ "image/webp": "image/webp";
199
+ }>;
200
+ size: z.ZodNumber;
201
+ width: z.ZodNumber;
202
+ height: z.ZodNumber;
203
+ }, z.core.$strict>;
204
+ type PublishedImage = z.infer<typeof publishedImageSchema>;
205
+ type Extracted<F extends ImageFields> = {
206
+ [K in keyof F]: (F[K]["type"] extends "number" ? number : F[K]["type"] extends "boolean" ? boolean : string) | null;
207
+ };
208
+ /** Evaluator `ctx.images`. Each call uses one of the evaluation's eight capability calls. */
209
+ interface ImageReader {
210
+ inspect(image: ImageReference): Promise<ImageInspection>;
211
+ compare(a: ImageReference, b: ImageReference): Promise<ImageComparison>;
212
+ review(options: {
213
+ images: ImageReference[];
214
+ criteria: string;
215
+ }): Promise<PhotoResult>;
216
+ extract<const F extends ImageFields>(options: {
217
+ image: ImageReference;
218
+ fields: F;
219
+ }): Promise<{
220
+ values: Extracted<F>;
221
+ reason: string;
222
+ }>;
223
+ /**
224
+ * Records the image for this attempt, then counts other participants' recorded images within
225
+ * `maxDistance`. The record is written when `seen` runs, not when the attempt is decided, so it
226
+ * stays even if the attempt is rejected: concurrent submissions of one photo must see each
227
+ * other. Replays reuse the captured result.
228
+ */
229
+ seen(image: ImageReference, options?: {
230
+ maxDistance?: number;
231
+ }): Promise<ImageSightings>;
232
+ }
233
+
234
+ declare const xIdSchema: z.ZodString;
235
+ declare const xConnectionSchema: z.ZodObject<{
236
+ userId: z.ZodString;
237
+ }, z.core.$strip>;
238
+ declare const xProfileSchema: z.ZodObject<{
239
+ id: z.ZodString;
240
+ username: z.ZodString;
241
+ name: z.ZodString;
242
+ bio: z.ZodNullable<z.ZodString>;
243
+ profileImageUrl: z.ZodNullable<z.ZodString>;
244
+ followersCount: z.ZodNullable<z.ZodNumber>;
245
+ verified: z.ZodNullable<z.ZodBoolean>;
246
+ }, z.core.$strip>;
247
+ /** An X handle, with or without its leading `@`: 1 to 15 letters, digits or underscores. */
248
+ declare const xUsernameSchema: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
249
+ declare const xUserLookupInputSchema: z.ZodObject<{
250
+ username: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
251
+ }, z.core.$strict>;
252
+ type XUserLookupInput = z.input<typeof xUserLookupInputSchema>;
253
+ /**
254
+ * The X account that holds a handle, as Domino last read it from X (at most a day ago). A handle
255
+ * can change hands, so the stable `id` is what trackers, `--author` filters and
256
+ * `ctx.x.follows({ userId })` take. Resolving a handle says nothing about who owns the account.
257
+ */
258
+ declare const xUserSchema: z.ZodObject<{
259
+ id: z.ZodString;
260
+ username: z.ZodString;
261
+ name: z.ZodString;
262
+ }, z.core.$strip>;
263
+ type XUser = z.infer<typeof xUserSchema>;
264
+ declare const xPostSchema: z.ZodObject<{
265
+ id: z.ZodString;
266
+ userId: z.ZodString;
267
+ content: z.ZodString;
268
+ createdAt: z.ZodISODateTime;
269
+ author: z.ZodObject<{
270
+ id: z.ZodString;
271
+ username: z.ZodString;
272
+ name: z.ZodString;
273
+ verified: z.ZodDefault<z.ZodNullable<z.ZodBoolean>>;
274
+ }, z.core.$loose>;
275
+ likeCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
276
+ replyCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
277
+ retweetCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
278
+ quoteCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
279
+ viewCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
280
+ bookmarkCount: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
281
+ isReply: z.ZodBoolean;
282
+ isRetweet: z.ZodBoolean;
283
+ isQuoteTweet: z.ZodBoolean;
284
+ quotedTweetId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
285
+ inReplyToUserId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
286
+ inReplyToStatusId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
287
+ retweetedTweetId: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
288
+ media: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<{
289
+ type: string;
290
+ url: string;
291
+ }[], unknown>>;
292
+ }, z.core.$loose>;
293
+ declare const xRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
294
+ operation: z.ZodLiteral<"connection">;
295
+ }, z.core.$strict>, z.ZodObject<{
296
+ operation: z.ZodLiteral<"profile">;
297
+ }, z.core.$strict>, z.ZodObject<{
298
+ operation: z.ZodLiteral<"post">;
299
+ postId: z.ZodString;
300
+ }, z.core.$strict>, z.ZodObject<{
301
+ operation: z.ZodLiteral<"follows">;
302
+ userId: z.ZodString;
303
+ }, z.core.$strict>, z.ZodObject<{
304
+ operation: z.ZodLiteral<"reposted">;
305
+ postId: z.ZodString;
306
+ }, z.core.$strict>], "operation">;
307
+ type XConnection = z.infer<typeof xConnectionSchema>;
308
+ type XProfile = z.infer<typeof xProfileSchema>;
309
+ type XPost = z.infer<typeof xPostSchema>;
310
+ /**
311
+ * Reads the member's linked X account and public X data. The account is pinned at the attempt's
312
+ * first X read: later links and unlinks do not change the attempt. `connection()`, `profile()`,
313
+ * `follows()` and `reposted()` resolve to `null` when the member has no linked X account;
314
+ * `post()` reads any public post and resolves to `null` when it does not exist. Provider failures
315
+ * throw `CapabilityError` with code `"provider-unavailable"`.
316
+ */
317
+ interface XReader {
318
+ connection(): Promise<XConnection | null>;
319
+ profile(): Promise<XProfile | null>;
320
+ post(input: {
321
+ postId: string;
322
+ }): Promise<XPost | null>;
323
+ follows(input: {
324
+ userId: string;
325
+ }): Promise<boolean | null>;
326
+ reposted(input: {
327
+ postId: string;
328
+ }): Promise<boolean | null>;
329
+ }
2
330
 
3
331
  /**
4
332
  * The ranges `analytics.read` covers. Each ends now: `7d`, `30d` and `90d` are that many project
@@ -34,7 +362,9 @@ declare const analyticsReadSchema: z.ZodObject<{
34
362
  all: "all";
35
363
  }>;
36
364
  from: z.ZodISODateTime;
365
+ fromMs: z.ZodOptional<z.ZodNumber>;
37
366
  to: z.ZodISODateTime;
367
+ toMs: z.ZodOptional<z.ZodNumber>;
38
368
  bucket: z.ZodEnum<{
39
369
  day: "day";
40
370
  week: "week";
@@ -43,12 +373,16 @@ declare const analyticsReadSchema: z.ZodObject<{
43
373
  buckets: z.ZodArray<z.ZodObject<{
44
374
  key: z.ZodString;
45
375
  start: z.ZodISODateTime;
376
+ startMs: z.ZodOptional<z.ZodNumber>;
46
377
  end: z.ZodISODateTime;
378
+ endMs: z.ZodOptional<z.ZodNumber>;
47
379
  }, z.core.$strip>>;
48
380
  }, z.core.$strip>;
49
381
  previous: z.ZodOptional<z.ZodObject<{
50
382
  from: z.ZodISODateTime;
383
+ fromMs: z.ZodOptional<z.ZodNumber>;
51
384
  to: z.ZodISODateTime;
385
+ toMs: z.ZodOptional<z.ZodNumber>;
52
386
  }, z.core.$strip>>;
53
387
  members: z.ZodObject<{
54
388
  signUps: z.ZodObject<{
@@ -95,6 +429,7 @@ declare const analyticsReadSchema: z.ZodObject<{
95
429
  topReasons: z.ZodArray<z.ZodObject<{
96
430
  reason: z.ZodString;
97
431
  code: z.ZodNullable<z.ZodString>;
432
+ codeSource: z.ZodOptional<z.ZodNullable<z.ZodType<AttemptCodeSource, unknown, z.core.$ZodTypeInternals<AttemptCodeSource, unknown>>>>;
98
433
  count: z.ZodNumber;
99
434
  }, z.core.$strip>>;
100
435
  rejectionsBySource: z.ZodObject<{
@@ -102,6 +437,7 @@ declare const analyticsReadSchema: z.ZodObject<{
102
437
  staff: z.ZodNumber;
103
438
  budget: z.ZodNumber;
104
439
  expired: z.ZodNumber;
440
+ keyUsed: z.ZodOptional<z.ZodNumber>;
105
441
  }, z.core.$strip>;
106
442
  series: z.ZodObject<{
107
443
  attempts: z.ZodArray<z.ZodNumber>;
@@ -169,6 +505,7 @@ declare const analyticsReadSchema: z.ZodObject<{
169
505
  }, z.core.$strip>>;
170
506
  testEnvironment: z.ZodOptional<z.ZodObject<{
171
507
  lastResetAt: z.ZodNullable<z.ZodISODateTime>;
508
+ lastResetAtMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
172
509
  shiftedClockMembers: z.ZodNumber;
173
510
  }, z.core.$strip>>;
174
511
  }, z.core.$strip>;
@@ -179,8 +516,9 @@ type AnalyticsMetric = AnalyticsRead["members"]["signUps"];
179
516
  type AnalyticsQuest = AnalyticsRead["quests"]["byQuest"][number];
180
517
  /**
181
518
  * How a breakdown splits a metric: by quest, offer, referral program, group, tracker or
182
- * leaderboard; for rejections by `source` (evaluator, staff, budget, expired) or `reason` (the
183
- * rejection code, else the exact text); for tracker outcomes by `outcome` (admitted or skipped).
519
+ * leaderboard; for rejections by `source` (evaluator, staff, budget, expired, keyUsed) or `reason`
520
+ * (the rejection code, with Relay's `key-used` apart from an evaluator's, else the exact text); for
521
+ * tracker outcomes by `outcome` (admitted or skipped).
184
522
  */
185
523
  declare const analyticsBreakdowns: readonly ["quest", "source", "reason", "offer", "program", "group", "tracker", "outcome", "leaderboard"];
186
524
  type AnalyticsBreakdown = (typeof analyticsBreakdowns)[number];
@@ -391,7 +729,11 @@ declare const analyticsCatalogSchema: z.ZodObject<{
391
729
  }, z.core.$strip>>;
392
730
  }, z.core.$strip>;
393
731
  type AnalyticsCatalog = z.infer<typeof analyticsCatalogSchema>;
394
- /** A breakdown or query returns up to this many rows; the rest are summed into `other`. */
732
+ /**
733
+ * A breakdown or query returns up to this many rows; the rest are summed into `other`.
734
+ *
735
+ * @deprecated Use `limits.analyticsQueryRows`, which a 1.x release can raise.
736
+ */
395
737
  declare const analyticsQueryLimit = 100;
396
738
  /**
397
739
  * What `analytics.query` reads on the wire. The metric, breakdown and filter names are checked by
@@ -436,7 +778,9 @@ declare const analyticsMetricResultSchema: z.ZodObject<{
436
778
  all: "all";
437
779
  }>;
438
780
  from: z.ZodISODateTime;
781
+ fromMs: z.ZodOptional<z.ZodNumber>;
439
782
  to: z.ZodISODateTime;
783
+ toMs: z.ZodOptional<z.ZodNumber>;
440
784
  bucket: z.ZodEnum<{
441
785
  day: "day";
442
786
  week: "week";
@@ -445,12 +789,16 @@ declare const analyticsMetricResultSchema: z.ZodObject<{
445
789
  buckets: z.ZodArray<z.ZodObject<{
446
790
  key: z.ZodString;
447
791
  start: z.ZodISODateTime;
792
+ startMs: z.ZodOptional<z.ZodNumber>;
448
793
  end: z.ZodISODateTime;
794
+ endMs: z.ZodOptional<z.ZodNumber>;
449
795
  }, z.core.$strip>>;
450
796
  }, z.core.$strip>;
451
797
  previous: z.ZodOptional<z.ZodObject<{
452
798
  from: z.ZodISODateTime;
799
+ fromMs: z.ZodOptional<z.ZodNumber>;
453
800
  to: z.ZodISODateTime;
801
+ toMs: z.ZodOptional<z.ZodNumber>;
454
802
  }, z.core.$strip>>;
455
803
  ledger: z.ZodOptional<z.ZodString>;
456
804
  value: z.ZodObject<{
@@ -479,58 +827,121 @@ declare const analyticsMetricResultSchema: z.ZodObject<{
479
827
  type AnalyticsMetricResult = z.infer<typeof analyticsMetricResultSchema>;
480
828
  type AnalyticsBreakdownRow = NonNullable<AnalyticsMetricResult["breakdown"]>["rows"][number];
481
829
 
482
- /** Modules a quest can declare to enable provider readers. Project connections are separate. */
483
- declare const evaluatorIntegrationProviderSchema: z.ZodEnum<{
484
- discord: "discord";
485
- x: "x";
486
- }>;
487
- type EvaluatorIntegrationProvider = z.infer<typeof evaluatorIntegrationProviderSchema>;
488
- type IntegrationModule = {
489
- readonly provider: EvaluatorIntegrationProvider;
490
- };
491
- declare const integrationProviderSchema: z.ZodEnum<{
492
- discord: "discord";
493
- }>;
494
- type IntegrationProvider = z.infer<typeof integrationProviderSchema>;
495
- declare const discordServerSchema: z.ZodObject<{
496
- id: z.ZodString;
497
- name: z.ZodString;
498
- icon: z.ZodNullable<z.ZodString>;
499
- }, z.core.$strip>;
500
- declare const projectIntegrationSchema: z.ZodObject<{
501
- provider: z.ZodEnum<{
502
- discord: "discord";
503
- }>;
504
- configured: z.ZodBoolean;
505
- status: z.ZodEnum<{
506
- disconnected: "disconnected";
507
- ready: "ready";
508
- attention: "attention";
509
- }>;
510
- revision: z.ZodNumber;
511
- server: z.ZodNullable<z.ZodObject<{
512
- id: z.ZodString;
513
- name: z.ZodString;
514
- icon: z.ZodNullable<z.ZodString>;
515
- }, z.core.$strip>>;
516
- issue: z.ZodNullable<z.ZodString>;
517
- connectedAt: z.ZodDefault<z.ZodNumber>;
518
- }, z.core.$strip>;
519
- type ProjectIntegration = z.infer<typeof projectIntegrationSchema>;
520
830
  /**
521
- * The Discord servers other projects of the organization connected and keep ready in the same
522
- * environment: the ones `management.discord.connect(server)` can connect without a new
523
- * installation.
831
+ * Relay's platform limits. A 1.x release can raise them, and add new ones. Released SDKs keep
832
+ * checking the values they shipped with, so Relay answers them within those.
524
833
  *
525
834
  * @compat output
526
835
  */
527
- declare const organizationDiscordServersSchema: z.ZodObject<{
528
- servers: z.ZodArray<z.ZodObject<{
529
- id: z.ZodString;
530
- name: z.ZodString;
531
- icon: z.ZodNullable<z.ZodString>;
532
- }, z.core.$strip>>;
533
- }, z.core.$strip>;
534
- type OrganizationDiscordServers = z.infer<typeof organizationDiscordServersSchema>;
836
+ type Limits = {
837
+ /** Quests one deployment, draft or release batch can hold. */
838
+ readonly quests: number;
839
+ /** Quest types one deployment, draft or release batch can hold. */
840
+ readonly questTypes: number;
841
+ /** Collections one deployment, draft or release batch can hold. */
842
+ readonly collections: number;
843
+ /** The SDK runtime a quest bundle imports instead of bundling. */
844
+ readonly sdkRuntime: {
845
+ /** Modules in one runtime. */
846
+ readonly modules: number;
847
+ /** Characters of module source, summed over all modules. */
848
+ readonly size: number;
849
+ };
850
+ /** The most completions one `ctx.member.completions()` call returns, and its default `limit`. */
851
+ readonly memberCompletions: number;
852
+ /** Panels one dashboard holds. */
853
+ readonly dashboardPanels: number;
854
+ /** Dashboards that are not archived one project holds. */
855
+ readonly dashboards: number;
856
+ /** Bounds for successful non-terminal evaluator decisions, independent of failure retries. */
857
+ readonly defer: {
858
+ readonly minRetryAfterMs: number;
859
+ readonly maxRetryAfterMs: number;
860
+ /** The delay a defer without `retryAfterMs` waits. */
861
+ readonly retryAfterMs: number;
862
+ /** How long after the first defer an attempt can still be deferred. */
863
+ readonly horizonMs: number;
864
+ readonly maxDefers: number;
865
+ };
866
+ /**
867
+ * Bounds of a quest's retry cooldown (`retryCooldownMs`) and completion cooldown
868
+ * (`completionCooldownMs`).
869
+ */
870
+ readonly retryCooldown: {
871
+ readonly minMs: number;
872
+ readonly maxMs: number;
873
+ };
874
+ /** Rows an analytics breakdown or query returns; the rest are summed into `other`. */
875
+ readonly analyticsQueryRows: number;
876
+ /** Limits of hosted apps, per project environment. */
877
+ readonly apps: {
878
+ /** App secrets one project environment holds. */
879
+ readonly secrets: number;
880
+ /** KV stores one app declares. */
881
+ readonly kvStores: number;
882
+ /** SQL stores one app declares. */
883
+ readonly sqlStores: number;
884
+ /** Migrations one SQL store holds. */
885
+ readonly migrations: number;
886
+ /** Bytes of one migration file. */
887
+ readonly migrationFileBytes: number;
888
+ /** Bytes of one SQL store's migrations, summed. */
889
+ readonly migrationTotalBytes: number;
890
+ /** Rows per page when browsing a SQL store's table. */
891
+ readonly storageRows: number;
892
+ /** Longest text a browsed cell or KV value shows; longer values end in `truncated`. */
893
+ readonly storagePreviewCharacters: number;
894
+ /** Characters a full SQL value read returns per page. */
895
+ readonly storageCellCharacters: number;
896
+ /** Schedules one app declares. */
897
+ readonly schedules: number;
898
+ /** The shortest interval between two runs of one schedule, in milliseconds. */
899
+ readonly scheduleMinIntervalMs: number;
900
+ /** How long Relay waits for a scheduled route to answer, in milliseconds. */
901
+ readonly scheduleTimeoutMs: number;
902
+ /**
903
+ * The most a scheduled route's JSON answer can hold for Relay to record it as the run's result.
904
+ */
905
+ readonly scheduleResultBytes: number;
906
+ };
907
+ /** Caps on a build's staged quest and catalog code. */
908
+ readonly stagedDeployment: {
909
+ /** Bytes of JSON, uncompressed. */
910
+ readonly size: number;
911
+ /** Bytes of the Brotli-compressed object. */
912
+ readonly compressedSize: number;
913
+ };
914
+ /**
915
+ * The most capability calls one hosted evaluation run can make, shared by all capabilities. The
916
+ * next call throws a `CapabilityError` with code `capability-limit`.
917
+ */
918
+ readonly capabilityCalls: number;
919
+ /** Bounds of a tracker data schema. */
920
+ readonly trackerData: {
921
+ /** The most branches one union may list. */
922
+ readonly branches: number;
923
+ /**
924
+ * The most properties, `required` keys, enum values or allowed key names one schema node lists.
925
+ */
926
+ readonly entries: number;
927
+ };
928
+ /** Bounds of an X search preview: one sample, never stored, never a tracker. */
929
+ readonly trackerPreview: {
930
+ readonly pages: number;
931
+ readonly posts: number;
932
+ readonly days: number;
933
+ };
934
+ /**
935
+ * The most wallets of one chain family a member can have linked to one project at a time. Sign-in
936
+ * wallets do not count: signing in always links the wallet.
937
+ */
938
+ readonly walletsPerChain: number;
939
+ /** The most logs one `ctx.wallet.events()` read may match before `where` filters them. */
940
+ readonly walletEventLogs: number;
941
+ /** The most transactions one `ctx.wallet.transactions()` read fetches per wallet. */
942
+ readonly walletTransactions: number;
943
+ };
944
+ /** Relay's platform limits. A 1.x release can raise them, so read them here at run time. */
945
+ declare const limits: Limits;
535
946
 
536
- export { type AnalyticsMetricId as A, analyticsMetricQuerySchema as B, analyticsMetricResultSchema as C, analyticsQueryLimit as D, type EvaluatorIntegrationProvider as E, analyticsQuerySchema as F, analyticsRanges as G, analyticsReadSchema as H, type IntegrationModule as I, type OrganizationDiscordServers as O, type ProjectIntegration as P, analyticsCatalog as a, type IntegrationProvider as b, type AnalyticsQuery as c, discordServerSchema as d, evaluatorIntegrationProviderSchema as e, type AnalyticsRead as f, type AnalyticsCatalog as g, type AnalyticsMetricQuery as h, integrationProviderSchema as i, type AnalyticsMetricResult as j, type AnalyticsBreakdown as k, type AnalyticsBreakdownRow as l, type AnalyticsCatalogEntry as m, type AnalyticsChart as n, organizationDiscordServersSchema as o, projectIntegrationSchema as p, type AnalyticsFilter as q, type AnalyticsMetric as r, type AnalyticsMetricKind as s, type AnalyticsQuest as t, type AnalyticsRange as u, analyticsBreakdowns as v, analyticsCatalogSchema as w, analyticsCharts as x, analyticsFilters as y, analyticsMetricIds as z };
947
+ export { type AnalyticsQuest as $, type AnalyticsMetricId as A, publishedImageSchema as B, xConnectionSchema as C, xIdSchema as D, type Extracted as E, xPostSchema as F, xProfileSchema as G, xRequestSchema as H, type ImageReader as I, xUserLookupInputSchema as J, xUserSchema as K, type Limits as L, xUsernameSchema as M, type AnalyticsQuery as N, type AnalyticsRead as O, type PublishedImage as P, type AnalyticsCatalog as Q, type AnalyticsMetricQuery as R, type AnalyticsMetricResult as S, type AnalyticsBreakdown as T, type AnalyticsBreakdownRow as U, type AnalyticsCatalogEntry as V, type AnalyticsChart as W, type XReader as X, type AnalyticsFilter as Y, type AnalyticsMetric as Z, type AnalyticsMetricKind as _, analyticsCatalog as a, type AnalyticsRange as a0, analyticsBreakdowns as a1, analyticsCatalogSchema as a2, analyticsCharts as a3, analyticsFilters as a4, analyticsMetricIds as a5, analyticsMetricQuerySchema as a6, analyticsMetricResultSchema as a7, analyticsQueryLimit as a8, analyticsQuerySchema as a9, analyticsRanges as aa, analyticsReadSchema as ab, type ImageAssetArtifact as b, type ImageComparison as c, type ImageExtraction as d, type ImageFields as e, type ImageInspection as f, type ImageReference as g, type ImageRequest as h, type ImageSightings as i, type XConnection as j, type XPost as k, limits as l, type XProfile as m, type XUser as n, type XUserLookupInput as o, imageAssetArtifactSchema as p, imageComparisonSchema as q, imageExtractionSchema as r, imageFieldSchema as s, imageFieldsSchema as t, imageInspectionSchema as u, imageReferenceSchema as v, imageRequestSchema as w, imageSightingsSchema as x, imageUploadRequestSchema as y, imageUploadsSchema as z };
@@ -1,6 +1,6 @@
1
1
  import * as z from 'zod';
2
- import { y as ResourceHandle } from './schema-CZ6Rj0ZF.js';
3
- import { l as AuthoringIdentity } from './groups-CqcA2Ycs.js';
2
+ import { R as ResourceHandle } from './tracker-data-esm3WG8R.js';
3
+ import { Z as AuthoringIdentity } from './accounts-nz3mzfRQ.js';
4
4
 
5
5
  declare const badgePropertiesSchema: z.ZodObject<{
6
6
  name: z.ZodString;
@@ -65,6 +65,16 @@ declare const memberBadgesSchema: z.ZodObject<{
65
65
  awardedAt: z.ZodNumber;
66
66
  }, z.core.$strip>>;
67
67
  }, z.core.$strip>;
68
+ /** `GET /v1/badges/catalog`: the active catalog. */
69
+ declare const badgeCatalogSchema: z.ZodObject<{
70
+ items: z.ZodArray<z.ZodObject<{
71
+ name: z.ZodString;
72
+ description: z.ZodDefault<z.ZodString>;
73
+ image: z.ZodString;
74
+ id: z.ZodString;
75
+ key: z.ZodNullable<z.ZodString>;
76
+ }, z.core.$strip>>;
77
+ }, z.core.$strip>;
68
78
  declare const badgeMutationSchema: z.ZodObject<{
69
79
  actionId: z.ZodString;
70
80
  reason: z.ZodString;
@@ -75,10 +85,15 @@ declare const badgeMutationResultSchema: z.ZodObject<{
75
85
  awarded: z.ZodBoolean;
76
86
  changed: z.ZodBoolean;
77
87
  }, z.core.$strip>;
88
+ /** @compat output */
78
89
  type Badge = z.infer<typeof badgeSchema>;
79
90
  type ManagedBadge = z.infer<typeof managedBadgeSchema>;
91
+ /** @compat output */
80
92
  type MemberBadge = z.infer<typeof memberBadgeSchema>;
93
+ /** @compat output */
81
94
  type MemberBadges = z.infer<typeof memberBadgesSchema>;
95
+ /** The active badge catalog, as `GET /v1/badges/catalog` returns it. */
96
+ type BadgeCatalog = z.infer<typeof badgeCatalogSchema>;
82
97
 
83
98
  declare const offerPriceSchema: z.ZodObject<{
84
99
  kind: z.ZodDefault<z.ZodLiteral<"points">>;
@@ -774,7 +789,10 @@ declare const redemptionCancellationSchema: z.ZodObject<{
774
789
  revision: z.ZodNumber;
775
790
  reason: z.ZodString;
776
791
  }, z.core.$strict>;
777
- /** Define one points-priced offer for a tier reward. The reward title is used when no title is set. */
792
+ /**
793
+ * Define one points-priced offer for a tier reward. The reward title is used when no title is set.
794
+ * @deprecated Import `defineOffer` from `@domino-sdk/relay/authoring`, which also refuses badge and group rewards when defined. Removed from `@domino-sdk/relay/schema` in 2.0.0.
795
+ */
778
796
  declare function defineOffer(input: OfferAuthoring & AuthoringIdentity): {
779
797
  title: string;
780
798
  enabled: boolean;
@@ -830,4 +848,4 @@ declare function defineOffer(input: OfferAuthoring & AuthoringIdentity): {
830
848
  })[] | undefined;
831
849
  } & ResourceHandle<"offer">;
832
850
 
833
- export { offerSchema as A, type Badge as B, redeemOfferSchema as C, redemptionCancellationSchema as D, redemptionPageSchema as E, redemptionQuerySchema as F, redemptionSchema as G, type ManagedBadge as M, type Offer as O, type RedeemOfferInput as R, type MemberBadge as a, type MemberBadges as b, type OfferDefinition as c, type OfferPrice as d, type Redemption as e, badgeDeclarationSchema as f, defineOffer as g, type OfferAuthoring as h, type RedemptionPage as i, type RedemptionQuery as j, badgeArtifactSchema as k, badgeMutationResultSchema as l, badgeMutationSchema as m, badgePropertiesSchema as n, badgeSchema as o, createBadgeSchema as p, managedBadgeSchema as q, memberBadgeSchema as r, memberBadgesSchema as s, offerArtifactSchema as t, offerAuthoringSchema as u, offerAvailabilitySchema as v, offerControlSchema as w, offerDefinitionSchema as x, offerLimitSchema as y, offerPriceSchema as z };
851
+ export { offerLimitSchema as A, type Badge as B, offerPriceSchema as C, offerSchema as D, redeemOfferSchema as E, redemptionCancellationSchema as F, redemptionPageSchema as G, redemptionQuerySchema as H, redemptionSchema as I, type ManagedBadge as M, type Offer as O, type RedeemOfferInput as R, type BadgeCatalog as a, type MemberBadge as b, type MemberBadges as c, type OfferDefinition as d, type OfferPrice as e, type Redemption as f, badgeDeclarationSchema as g, type OfferAuthoring as h, type RedemptionPage as i, type RedemptionQuery as j, badgeArtifactSchema as k, badgeCatalogSchema as l, badgeMutationResultSchema as m, badgeMutationSchema as n, badgePropertiesSchema as o, badgeSchema as p, createBadgeSchema as q, defineOffer as r, managedBadgeSchema as s, memberBadgeSchema as t, memberBadgesSchema as u, offerArtifactSchema as v, offerAuthoringSchema as w, offerAvailabilitySchema as x, offerControlSchema as y, offerDefinitionSchema as z };