@domino-sdk/relay 1.0.0-next.9 → 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 +1027 -233
  4. package/dist/authoring.js +478 -277
  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 -2613
  9. package/dist/browser.js +8 -6
  10. package/dist/{integrations-Ba5TtqTv.d.ts → capability-error-DNMwKmlL.d.ts} +124 -76
  11. package/dist/{chunk-PHU5VDLR.js → chunk-36HTX2BM.js} +389 -169
  12. package/dist/chunk-6QJ3LADK.js +112 -0
  13. package/dist/{chunk-4LBUTHD6.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-X2F2RAR3.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-7Q4BGGT6.js → chunk-XFMSUPNS.js} +1 -1
  24. package/dist/{chunk-P6FK43GG.js → chunk-ZVIRG24J.js} +145 -42
  25. package/dist/{client-CT4-S5vc.d.ts → client-XiuFnug_.d.ts} +2161 -615
  26. package/dist/{submission-input-0OOGaq8c.d.ts → groups-Ck-OxzjD.d.ts} +916 -1139
  27. package/dist/identity-integration-GxAHdKR2.d.ts +58 -0
  28. package/dist/images-Dv-P5VBw.d.ts +234 -0
  29. package/dist/index.d.ts +13 -9
  30. package/dist/index.js +17 -6
  31. package/dist/internal.d.ts +82 -44
  32. package/dist/internal.js +43 -89
  33. package/dist/offers-Cy-e4o5x.d.ts +431 -0
  34. package/dist/{pages-D3titw5B.d.ts → outcomes-kVB-Juzs.d.ts} +2157 -1448
  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 +3038 -1029
  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 -4168
  44. package/dist/schema.js +310 -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-QR7ZA2BJ.js +0 -257
  54. package/dist/chunk-YYD4QUBO.js +0 -2348
  55. package/dist/chunk-ZWY3R6B3.js +0 -26
  56. package/dist/collection-BGneJ6Bk.d.ts +0 -114
  57. package/dist/images-BTgk6OmC.d.ts +0 -1564
  58. package/dist/point-ledgers-iS00Z_v0.d.ts +0 -37
  59. package/dist/schema-Di3aLSiK.d.ts +0 -3532
@@ -0,0 +1,359 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const authScopeSchema: z.ZodObject<{
4
+ organization: z.ZodString;
5
+ project: z.ZodString;
6
+ environment: z.ZodEnum<{
7
+ test: "test";
8
+ live: "live";
9
+ }>;
10
+ }, z.core.$strict>;
11
+ declare const principalSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
12
+ kind: z.ZodLiteral<"member">;
13
+ member: z.ZodString;
14
+ }, z.core.$strip>, z.ZodObject<{
15
+ kind: z.ZodLiteral<"staff">;
16
+ subject: z.ZodString;
17
+ }, z.core.$strip>, z.ZodObject<{
18
+ kind: z.ZodLiteral<"operator">;
19
+ subject: z.ZodString;
20
+ }, z.core.$strip>], "kind">;
21
+ declare const sessionSchema: z.ZodObject<{
22
+ id: z.ZodString;
23
+ principal: z.ZodDiscriminatedUnion<[z.ZodObject<{
24
+ kind: z.ZodLiteral<"member">;
25
+ member: z.ZodString;
26
+ }, z.core.$strip>, z.ZodObject<{
27
+ kind: z.ZodLiteral<"staff">;
28
+ subject: z.ZodString;
29
+ }, z.core.$strip>, z.ZodObject<{
30
+ kind: z.ZodLiteral<"operator">;
31
+ subject: z.ZodString;
32
+ }, z.core.$strip>], "kind">;
33
+ expiresAt: z.ZodNumber;
34
+ organization: z.ZodString;
35
+ project: z.ZodString;
36
+ environment: z.ZodEnum<{
37
+ test: "test";
38
+ live: "live";
39
+ }>;
40
+ }, z.core.$strip>;
41
+ type Session = z.infer<typeof sessionSchema>;
42
+ /**
43
+ * A session's principal as the participant client reads it: a known kind, or `{ kind }` alone for
44
+ * a kind a newer Relay added, so reading the session never fails on it.
45
+ */
46
+ declare const participantPrincipalSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
47
+ kind: z.ZodLiteral<"member">;
48
+ member: z.ZodString;
49
+ }, z.core.$strip>, z.ZodObject<{
50
+ kind: z.ZodLiteral<"staff">;
51
+ subject: z.ZodString;
52
+ }, z.core.$strip>, z.ZodObject<{
53
+ kind: z.ZodLiteral<"operator">;
54
+ subject: z.ZodString;
55
+ }, z.core.$strip>], "kind">, z.ZodObject<{
56
+ kind: z.ZodString;
57
+ }, z.core.$strip>]>;
58
+ type ParticipantPrincipal = z.infer<typeof participantPrincipalSchema>;
59
+ /** The session the participant client returns (`auth.session()`). */
60
+ declare const participantSessionSchema: z.ZodObject<{
61
+ id: z.ZodString;
62
+ principal: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
63
+ kind: z.ZodLiteral<"member">;
64
+ member: z.ZodString;
65
+ }, z.core.$strip>, z.ZodObject<{
66
+ kind: z.ZodLiteral<"staff">;
67
+ subject: z.ZodString;
68
+ }, z.core.$strip>, z.ZodObject<{
69
+ kind: z.ZodLiteral<"operator">;
70
+ subject: z.ZodString;
71
+ }, z.core.$strip>], "kind">, z.ZodObject<{
72
+ kind: z.ZodString;
73
+ }, z.core.$strip>]>;
74
+ expiresAt: z.ZodNumber;
75
+ organization: z.ZodString;
76
+ project: z.ZodString;
77
+ environment: z.ZodEnum<{
78
+ test: "test";
79
+ live: "live";
80
+ }>;
81
+ }, z.core.$strip>;
82
+ type ParticipantSession = z.infer<typeof participantSessionSchema>;
83
+ /** The member a session signs in, or null for a signed-out visitor or another principal kind. */
84
+ declare function sessionMember(session: {
85
+ principal: ParticipantPrincipal;
86
+ } | null | undefined): string | null;
87
+ /**
88
+ * The signed-in member (`GET /v1/me`). `avatarSeed` seeds the member's generated avatar
89
+ * (`defaultAvatar`): an HMAC of the member ID under a per-project secret, so it is stable in the
90
+ * project, whatever the member links, and reveals nothing. Not strict: newer servers may add fields.
91
+ */
92
+ declare const memberSummarySchema: z.ZodObject<{
93
+ member: z.ZodString;
94
+ avatarSeed: z.ZodString;
95
+ }, z.core.$strip>;
96
+ type MemberSummary = z.infer<typeof memberSummarySchema>;
97
+ declare const exchangeSchema: z.ZodObject<{
98
+ organization: z.ZodString;
99
+ project: z.ZodString;
100
+ environment: z.ZodEnum<{
101
+ test: "test";
102
+ live: "live";
103
+ }>;
104
+ identity: z.ZodObject<{
105
+ issuer: z.ZodString;
106
+ subject: z.ZodString;
107
+ }, z.core.$strict>;
108
+ role: z.ZodEnum<{
109
+ member: "member";
110
+ staff: "staff";
111
+ operator: "operator";
112
+ }>;
113
+ }, z.core.$strict>;
114
+ type ExchangeInput = z.infer<typeof exchangeSchema>;
115
+ declare const exchangeResultSchema: z.ZodObject<{
116
+ token: z.ZodString;
117
+ session: z.ZodObject<{
118
+ id: z.ZodString;
119
+ principal: z.ZodDiscriminatedUnion<[z.ZodObject<{
120
+ kind: z.ZodLiteral<"member">;
121
+ member: z.ZodString;
122
+ }, z.core.$strip>, z.ZodObject<{
123
+ kind: z.ZodLiteral<"staff">;
124
+ subject: z.ZodString;
125
+ }, z.core.$strip>, z.ZodObject<{
126
+ kind: z.ZodLiteral<"operator">;
127
+ subject: z.ZodString;
128
+ }, z.core.$strip>], "kind">;
129
+ expiresAt: z.ZodNumber;
130
+ organization: z.ZodString;
131
+ project: z.ZodString;
132
+ environment: z.ZodEnum<{
133
+ test: "test";
134
+ live: "live";
135
+ }>;
136
+ }, z.core.$strip>;
137
+ }, z.core.$strip>;
138
+
139
+ declare const knownRelayEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
140
+ kind: z.ZodLiteral<"attempt.accepted">;
141
+ quest: z.ZodString;
142
+ attempt: z.ZodString;
143
+ completion: z.ZodNullable<z.ZodString>;
144
+ id: z.ZodString;
145
+ at: z.ZodNumber;
146
+ }, z.core.$strip>, z.ZodObject<{
147
+ kind: z.ZodLiteral<"attempt.rejected">;
148
+ quest: z.ZodString;
149
+ attempt: z.ZodString;
150
+ completion: z.ZodNullable<z.ZodString>;
151
+ id: z.ZodString;
152
+ at: z.ZodNumber;
153
+ }, z.core.$strip>, z.ZodObject<{
154
+ kind: z.ZodLiteral<"attempt.review">;
155
+ quest: z.ZodString;
156
+ attempt: z.ZodString;
157
+ completion: z.ZodNullable<z.ZodString>;
158
+ id: z.ZodString;
159
+ at: z.ZodNumber;
160
+ }, z.core.$strip>, z.ZodObject<{
161
+ kind: z.ZodLiteral<"points.awarded">;
162
+ entry: z.ZodString;
163
+ ledger: z.ZodString;
164
+ amount: z.ZodNumber;
165
+ quest: z.ZodNullable<z.ZodString>;
166
+ completion: z.ZodNullable<z.ZodString>;
167
+ id: z.ZodString;
168
+ at: z.ZodNumber;
169
+ }, z.core.$strip>, z.ZodObject<{
170
+ kind: z.ZodLiteral<"entitlement.granted">;
171
+ entitlement: z.ZodString;
172
+ tier: z.ZodString;
173
+ status: z.ZodString;
174
+ id: z.ZodString;
175
+ at: z.ZodNumber;
176
+ }, z.core.$strip>, z.ZodObject<{
177
+ kind: z.ZodLiteral<"entitlement.collected">;
178
+ entitlement: z.ZodString;
179
+ id: z.ZodString;
180
+ at: z.ZodNumber;
181
+ }, z.core.$strip>, z.ZodObject<{
182
+ kind: z.ZodLiteral<"delivery.updated">;
183
+ delivery: z.ZodString;
184
+ quest: z.ZodString;
185
+ completion: z.ZodString;
186
+ status: z.ZodString;
187
+ id: z.ZodString;
188
+ at: z.ZodNumber;
189
+ }, z.core.$strip>, z.ZodObject<{
190
+ kind: z.ZodLiteral<"referral.qualified">;
191
+ program: z.ZodString;
192
+ id: z.ZodString;
193
+ at: z.ZodNumber;
194
+ }, z.core.$strip>], "kind">;
195
+ declare const relayEventSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
196
+ kind: z.ZodLiteral<"attempt.accepted">;
197
+ quest: z.ZodString;
198
+ attempt: z.ZodString;
199
+ completion: z.ZodNullable<z.ZodString>;
200
+ id: z.ZodString;
201
+ at: z.ZodNumber;
202
+ }, z.core.$strip>, z.ZodObject<{
203
+ kind: z.ZodLiteral<"attempt.rejected">;
204
+ quest: z.ZodString;
205
+ attempt: z.ZodString;
206
+ completion: z.ZodNullable<z.ZodString>;
207
+ id: z.ZodString;
208
+ at: z.ZodNumber;
209
+ }, z.core.$strip>, z.ZodObject<{
210
+ kind: z.ZodLiteral<"attempt.review">;
211
+ quest: z.ZodString;
212
+ attempt: z.ZodString;
213
+ completion: z.ZodNullable<z.ZodString>;
214
+ id: z.ZodString;
215
+ at: z.ZodNumber;
216
+ }, z.core.$strip>, z.ZodObject<{
217
+ kind: z.ZodLiteral<"points.awarded">;
218
+ entry: z.ZodString;
219
+ ledger: z.ZodString;
220
+ amount: z.ZodNumber;
221
+ quest: z.ZodNullable<z.ZodString>;
222
+ completion: z.ZodNullable<z.ZodString>;
223
+ id: z.ZodString;
224
+ at: z.ZodNumber;
225
+ }, z.core.$strip>, z.ZodObject<{
226
+ kind: z.ZodLiteral<"entitlement.granted">;
227
+ entitlement: z.ZodString;
228
+ tier: z.ZodString;
229
+ status: z.ZodString;
230
+ id: z.ZodString;
231
+ at: z.ZodNumber;
232
+ }, z.core.$strip>, z.ZodObject<{
233
+ kind: z.ZodLiteral<"entitlement.collected">;
234
+ entitlement: z.ZodString;
235
+ id: z.ZodString;
236
+ at: z.ZodNumber;
237
+ }, z.core.$strip>, z.ZodObject<{
238
+ kind: z.ZodLiteral<"delivery.updated">;
239
+ delivery: z.ZodString;
240
+ quest: z.ZodString;
241
+ completion: z.ZodString;
242
+ status: z.ZodString;
243
+ id: z.ZodString;
244
+ at: z.ZodNumber;
245
+ }, z.core.$strip>, z.ZodObject<{
246
+ kind: z.ZodLiteral<"referral.qualified">;
247
+ program: z.ZodString;
248
+ id: z.ZodString;
249
+ at: z.ZodNumber;
250
+ }, z.core.$strip>], "kind">, z.ZodPipe<z.ZodObject<{
251
+ kind: z.ZodString;
252
+ id: z.ZodString;
253
+ at: z.ZodNumber;
254
+ }, z.core.$catchall<z.ZodJSONSchema>>, z.ZodTransform<{
255
+ kind: "unknown";
256
+ reportedKind: string;
257
+ id: string;
258
+ at: number;
259
+ }, {
260
+ [x: string]: z.core.util.JSONType;
261
+ kind: string;
262
+ id: string;
263
+ at: number;
264
+ }>>]>;
265
+ declare const participantActivityQuerySchema: z.ZodObject<{
266
+ cursor: z.ZodOptional<z.ZodString>;
267
+ limit: z.ZodDefault<z.ZodNumber>;
268
+ }, z.core.$strict>;
269
+ declare const participantActivitySchema: z.ZodObject<{
270
+ member: z.ZodString;
271
+ items: z.ZodArray<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
272
+ kind: z.ZodLiteral<"attempt.accepted">;
273
+ quest: z.ZodString;
274
+ attempt: z.ZodString;
275
+ completion: z.ZodNullable<z.ZodString>;
276
+ id: z.ZodString;
277
+ at: z.ZodNumber;
278
+ }, z.core.$strip>, z.ZodObject<{
279
+ kind: z.ZodLiteral<"attempt.rejected">;
280
+ quest: z.ZodString;
281
+ attempt: z.ZodString;
282
+ completion: z.ZodNullable<z.ZodString>;
283
+ id: z.ZodString;
284
+ at: z.ZodNumber;
285
+ }, z.core.$strip>, z.ZodObject<{
286
+ kind: z.ZodLiteral<"attempt.review">;
287
+ quest: z.ZodString;
288
+ attempt: z.ZodString;
289
+ completion: z.ZodNullable<z.ZodString>;
290
+ id: z.ZodString;
291
+ at: z.ZodNumber;
292
+ }, z.core.$strip>, z.ZodObject<{
293
+ kind: z.ZodLiteral<"points.awarded">;
294
+ entry: z.ZodString;
295
+ ledger: z.ZodString;
296
+ amount: z.ZodNumber;
297
+ quest: z.ZodNullable<z.ZodString>;
298
+ completion: z.ZodNullable<z.ZodString>;
299
+ id: z.ZodString;
300
+ at: z.ZodNumber;
301
+ }, z.core.$strip>, z.ZodObject<{
302
+ kind: z.ZodLiteral<"entitlement.granted">;
303
+ entitlement: z.ZodString;
304
+ tier: z.ZodString;
305
+ status: z.ZodString;
306
+ id: z.ZodString;
307
+ at: z.ZodNumber;
308
+ }, z.core.$strip>, z.ZodObject<{
309
+ kind: z.ZodLiteral<"entitlement.collected">;
310
+ entitlement: z.ZodString;
311
+ id: z.ZodString;
312
+ at: z.ZodNumber;
313
+ }, z.core.$strip>, z.ZodObject<{
314
+ kind: z.ZodLiteral<"delivery.updated">;
315
+ delivery: z.ZodString;
316
+ quest: z.ZodString;
317
+ completion: z.ZodString;
318
+ status: z.ZodString;
319
+ id: z.ZodString;
320
+ at: z.ZodNumber;
321
+ }, z.core.$strip>, z.ZodObject<{
322
+ kind: z.ZodLiteral<"referral.qualified">;
323
+ program: z.ZodString;
324
+ id: z.ZodString;
325
+ at: z.ZodNumber;
326
+ }, z.core.$strip>], "kind">, z.ZodPipe<z.ZodObject<{
327
+ kind: z.ZodString;
328
+ id: z.ZodString;
329
+ at: z.ZodNumber;
330
+ }, z.core.$catchall<z.ZodJSONSchema>>, z.ZodTransform<{
331
+ kind: "unknown";
332
+ reportedKind: string;
333
+ id: string;
334
+ at: number;
335
+ }, {
336
+ [x: string]: z.core.util.JSONType;
337
+ kind: string;
338
+ id: string;
339
+ at: number;
340
+ }>>]>>;
341
+ nextCursor: z.ZodString;
342
+ }, z.core.$strip>;
343
+ type RelayEvent = z.infer<typeof relayEventSchema>;
344
+ type ParticipantActivity = z.infer<typeof participantActivitySchema>;
345
+
346
+ /** A cursor as a client passes it back. */
347
+ declare const pageCursorSchema: z.ZodString;
348
+ /** A query that pages by cursor only. */
349
+ declare const pageQuerySchema: z.ZodObject<{
350
+ cursor: z.ZodOptional<z.ZodString>;
351
+ }, z.core.$strict>;
352
+ type PageQuery = z.input<typeof pageQuerySchema>;
353
+ /** One page of a paged read. */
354
+ type Page<T> = {
355
+ items: T[];
356
+ nextCursor: string | null;
357
+ };
358
+
359
+ export { type ExchangeInput as E, type MemberSummary as M, type Page as P, type RelayEvent as R, type Session as S, type PageQuery as a, type ParticipantActivity as b, type ParticipantPrincipal as c, type ParticipantSession as d, authScopeSchema as e, exchangeResultSchema as f, exchangeSchema as g, pageQuerySchema as h, participantActivityQuerySchema as i, participantActivitySchema as j, knownRelayEventSchema as k, participantPrincipalSchema as l, memberSummarySchema as m, participantSessionSchema as n, principalSchema as o, pageCursorSchema as p, sessionSchema as q, relayEventSchema as r, sessionMember as s };