@domino-sdk/relay 1.0.0-next.2 → 1.0.0-next.34

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 (61) hide show
  1. package/README.md +13 -1
  2. package/build.mjs +18 -1
  3. package/dist/activity-B8k9Sa_a.d.ts +9112 -0
  4. package/dist/authoring.d.ts +1355 -182
  5. package/dist/authoring.js +658 -225
  6. package/dist/automatic-outcomes-B1xrETxm.d.ts +758 -0
  7. package/dist/avatar.d.ts +29 -0
  8. package/dist/avatar.js +21 -0
  9. package/dist/browser-J7tUpXxy.d.ts +4154 -0
  10. package/dist/browser.d.ts +11 -4580
  11. package/dist/browser.js +8 -6
  12. package/dist/capability-error-DNMwKmlL.d.ts +458 -0
  13. package/dist/chunk-36HTX2BM.js +1223 -0
  14. package/dist/chunk-6QJ3LADK.js +112 -0
  15. package/dist/chunk-BGGKNIRP.js +171 -0
  16. package/dist/chunk-EYH5RDIE.js +496 -0
  17. package/dist/chunk-GQKYAQM6.js +84 -0
  18. package/dist/chunk-GUP7YRR4.js +42 -0
  19. package/dist/chunk-GZ6FJAXN.js +1659 -0
  20. package/dist/chunk-JON5SESL.js +2986 -0
  21. package/dist/chunk-MC6V6VMG.js +49 -0
  22. package/dist/chunk-NPGENI7K.js +37 -0
  23. package/dist/chunk-V7UKZLHA.js +35 -0
  24. package/dist/chunk-VFHHLN6A.js +284 -0
  25. package/dist/chunk-WJSSJ7AF.js +151 -0
  26. package/dist/{chunk-VH4OQ5VX.js → chunk-XFMSUPNS.js} +26 -5
  27. package/dist/{chunk-FDWRBMB3.js → chunk-ZVIRG24J.js} +150 -33
  28. package/dist/client-XiuFnug_.d.ts +4262 -0
  29. package/dist/groups-Ck-OxzjD.d.ts +2449 -0
  30. package/dist/identity-integration-GxAHdKR2.d.ts +58 -0
  31. package/dist/images-Dv-P5VBw.d.ts +234 -0
  32. package/dist/index.d.ts +15 -13115
  33. package/dist/index.js +30 -689
  34. package/dist/internal.d.ts +159 -0
  35. package/dist/internal.js +79 -0
  36. package/dist/offers-Cy-e4o5x.d.ts +431 -0
  37. package/dist/outcomes-kVB-Juzs.d.ts +4902 -0
  38. package/dist/pages-BBYD21IE.d.ts +359 -0
  39. package/dist/participant-rewards-3duLb8YJ.d.ts +668 -0
  40. package/dist/portal-proxy.js +26 -9
  41. package/dist/profiles-D2aFcOxu.d.ts +297 -0
  42. package/dist/react/index.d.ts +3378 -3318
  43. package/dist/react/index.js +1635 -783
  44. package/dist/request-error-DWduJCGV.d.ts +62 -0
  45. package/dist/schema-DfJzH2ci.d.ts +5644 -0
  46. package/dist/schema.d.ts +15 -3388
  47. package/dist/schema.js +790 -3
  48. package/dist/server/index.d.ts +81498 -0
  49. package/dist/server/index.js +2520 -0
  50. package/dist/streaks-CWyq8Px5.d.ts +71 -0
  51. package/dist/submission-input-BZkm6ohU.d.ts +290 -0
  52. package/dist/units-CwgsPB_r.d.ts +9 -0
  53. package/dist/vite.d.ts +1 -1
  54. package/dist/vite.js +1 -0
  55. package/dist/wallet-YssWxGg8.d.ts +228 -0
  56. package/package.json +24 -5
  57. package/dist/chunk-4KNTMNXA.js +0 -1847
  58. package/dist/chunk-B76BAJ25.js +0 -624
  59. package/dist/chunk-NKGJEYZM.js +0 -1833
  60. package/dist/chunk-ONDBQSMU.js +0 -373
  61. package/dist/submission-input-JDwq3EVK.d.ts +0 -4986
@@ -0,0 +1,58 @@
1
+ import { O as OpenIdentityKind } from './schema-DfJzH2ci.js';
2
+ import { z } from 'zod';
3
+
4
+ declare const identityIntegrationInputSchema: z.ZodObject<{
5
+ name: z.ZodString;
6
+ origin: z.ZodString;
7
+ identityKind: z.ZodOptional<z.ZodTemplateLiteral<`app:${string}`>>;
8
+ adoptIdentitiesFrom: z.ZodOptional<z.ZodString>;
9
+ reason: z.ZodOptional<z.ZodString>;
10
+ }, z.core.$strict>;
11
+ /** An integration as responses return it: fields a newer Relay adds are ignored. */
12
+ declare const identityIntegrationSchema: z.ZodObject<{
13
+ id: z.ZodString;
14
+ name: z.ZodString;
15
+ origin: z.ZodString;
16
+ expiresAt: z.ZodNumber;
17
+ identityKind: z.ZodDefault<z.ZodNullable<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>>;
18
+ organization: z.ZodString;
19
+ project: z.ZodString;
20
+ environment: z.ZodEnum<{
21
+ test: "test";
22
+ live: "live";
23
+ }>;
24
+ }, z.core.$strip>;
25
+ declare const identityIntegrationSecretSchema: z.ZodObject<{
26
+ id: z.ZodString;
27
+ name: z.ZodString;
28
+ origin: z.ZodString;
29
+ expiresAt: z.ZodNumber;
30
+ identityKind: z.ZodDefault<z.ZodNullable<z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>>>;
31
+ organization: z.ZodString;
32
+ project: z.ZodString;
33
+ environment: z.ZodEnum<{
34
+ test: "test";
35
+ live: "live";
36
+ }>;
37
+ token: z.ZodString;
38
+ }, z.core.$strip>;
39
+ /**
40
+ * An `app:<name>` kind claimed in the project and environment, and the integration that owns its
41
+ * identities: the live one, or the disconnected one a new integration would adopt them from.
42
+ */
43
+ declare const identityKindClaimSchema: z.ZodObject<{
44
+ kind: z.ZodType<OpenIdentityKind, unknown, z.core.$ZodTypeInternals<OpenIdentityKind, unknown>>;
45
+ integration: z.ZodString;
46
+ integrationName: z.ZodString;
47
+ connected: z.ZodBoolean;
48
+ linked: z.ZodNumber;
49
+ unlinked: z.ZodNumber;
50
+ claimedAt: z.ZodNumber;
51
+ }, z.core.$strip>;
52
+ type IdentityKindClaim = z.infer<typeof identityKindClaimSchema>;
53
+ declare const participantExchangeSchema: z.ZodObject<{
54
+ subject: z.ZodString;
55
+ previousToken: z.ZodOptional<z.ZodString>;
56
+ }, z.core.$strict>;
57
+
58
+ export { type IdentityKindClaim as I, identityIntegrationSchema as a, identityIntegrationSecretSchema as b, identityKindClaimSchema as c, identityIntegrationInputSchema as i, participantExchangeSchema as p };
@@ -0,0 +1,234 @@
1
+ import { z } from 'zod';
2
+ import { P as PhotoResult } from './schema-DfJzH2ci.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
+ export { type Extracted as E, type ImageAssetArtifact as I, type PublishedImage as P, type ImageComparison as a, type ImageExtraction as b, type ImageFields as c, type ImageInspection as d, type ImageReader as e, type ImageReference as f, type ImageRequest as g, type ImageSightings as h, imageAssetArtifactSchema as i, imageComparisonSchema as j, imageExtractionSchema as k, imageFieldSchema as l, imageFieldsSchema as m, imageInspectionSchema as n, imageReferenceSchema as o, imageRequestSchema as p, imageSightingsSchema as q, imageUploadRequestSchema as r, imageUploadsSchema as s, publishedImageSchema as t };