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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +1 -1
  2. package/dist/activity-DeKJsRry.d.ts +9112 -0
  3. package/dist/authoring.d.ts +1135 -285
  4. package/dist/authoring.js +545 -269
  5. package/dist/automatic-outcomes-B1xrETxm.d.ts +758 -0
  6. package/dist/avatar.d.ts +2 -2
  7. package/dist/browser-DFe7sWSN.d.ts +4154 -0
  8. package/dist/browser.d.ts +11 -2528
  9. package/dist/browser.js +8 -6
  10. package/dist/capability-error-DNMwKmlL.d.ts +458 -0
  11. package/dist/{chunk-V7EZUZ3Z.js → chunk-36HTX2BM.js} +389 -169
  12. package/dist/chunk-6QJ3LADK.js +112 -0
  13. package/dist/{chunk-77H7APVD.js → chunk-BGGKNIRP.js} +1 -1
  14. package/dist/chunk-EYH5RDIE.js +496 -0
  15. package/dist/chunk-GQKYAQM6.js +84 -0
  16. package/dist/chunk-GUP7YRR4.js +42 -0
  17. package/dist/{chunk-V5R2DMGY.js → chunk-GZ6FJAXN.js} +380 -128
  18. package/dist/chunk-JON5SESL.js +2986 -0
  19. package/dist/chunk-MC6V6VMG.js +49 -0
  20. package/dist/chunk-NPGENI7K.js +37 -0
  21. package/dist/chunk-VFHHLN6A.js +284 -0
  22. package/dist/chunk-WJSSJ7AF.js +151 -0
  23. package/dist/{chunk-QBOHLT7M.js → chunk-XFMSUPNS.js} +1 -1
  24. package/dist/{chunk-6A6K5RUD.js → chunk-ZVIRG24J.js} +145 -42
  25. package/dist/{client-CK4nwt7V.d.ts → client-XiuFnug_.d.ts} +2193 -562
  26. package/dist/{submission-input-C9qm9ixd.d.ts → groups-Ck-OxzjD.d.ts} +919 -1142
  27. package/dist/identity-integration-GxAHdKR2.d.ts +58 -0
  28. package/dist/{images--vZ9U0kr.d.ts → images-Dv-P5VBw.d.ts} +2 -2
  29. package/dist/index.d.ts +13 -9
  30. package/dist/index.js +17 -6
  31. package/dist/internal.d.ts +82 -43
  32. package/dist/internal.js +58 -90
  33. package/dist/offers-Cy-e4o5x.d.ts +431 -0
  34. package/dist/{pages-BzqJuI69.d.ts → outcomes-kVB-Juzs.d.ts} +2386 -1490
  35. package/dist/pages-BBYD21IE.d.ts +359 -0
  36. package/dist/participant-rewards-3duLb8YJ.d.ts +668 -0
  37. package/dist/portal-proxy.js +22 -4
  38. package/dist/{profiles-DDMFBRKe.d.ts → profiles-D2aFcOxu.d.ts} +15 -15
  39. package/dist/react/index.d.ts +3122 -1011
  40. package/dist/react/index.js +1627 -779
  41. package/dist/request-error-DWduJCGV.d.ts +62 -0
  42. package/dist/schema-DfJzH2ci.d.ts +5644 -0
  43. package/dist/schema.d.ts +15 -4216
  44. package/dist/schema.js +322 -81
  45. package/dist/server/index.d.ts +81498 -0
  46. package/dist/server/index.js +2520 -0
  47. package/dist/{streaks-CwGReWGt.d.ts → streaks-CWyq8Px5.d.ts} +2 -4
  48. package/dist/submission-input-BZkm6ohU.d.ts +290 -0
  49. package/dist/vite.d.ts +1 -1
  50. package/dist/vite.js +1 -0
  51. package/dist/{wallet-BGOfFkG9.d.ts → wallet-YssWxGg8.d.ts} +35 -38
  52. package/package.json +8 -2
  53. package/dist/chunk-MRIURJE3.js +0 -257
  54. package/dist/chunk-VARGF4JS.js +0 -1733
  55. package/dist/chunk-ZWY3R6B3.js +0 -26
  56. package/dist/collection-BGneJ6Bk.d.ts +0 -114
  57. package/dist/integrations-C3Sp558f.d.ts +0 -1297
  58. package/dist/point-ledgers-iS00Z_v0.d.ts +0 -37
  59. package/dist/schema-pnuWqvGn.d.ts +0 -3396
@@ -1,257 +0,0 @@
1
- import {
2
- authoringIdentityShape,
3
- normalizeAuthoringIdentity,
4
- validateAuthoringIdentity
5
- } from "./chunk-V7EZUZ3Z.js";
6
- import {
7
- entitlementSchema,
8
- identifier,
9
- memberProgressSchema,
10
- pickupAvailabilitySchema,
11
- pickupSelectionSchema,
12
- publishedReleaseSchema,
13
- questDescriptionSchema,
14
- reviewModeSchema,
15
- settingsValuesSchema,
16
- storedReviewModeSchema,
17
- tieredRewardReferenceSchema
18
- } from "./chunk-VARGF4JS.js";
19
-
20
- // src/point-ledgers.ts
21
- import { z } from "zod";
22
- var pointLedgerPropertiesSchema = z.object({
23
- name: z.string().trim().min(1).max(120),
24
- description: z.string().trim().max(1e3).default("")
25
- }).strict();
26
- var createPointLedgerSchema = pointLedgerPropertiesSchema.extend({ actionId: identifier, key: identifier.optional() }).strict();
27
- var pointLedgerSchema = pointLedgerPropertiesSchema.extend({
28
- id: identifier
29
- });
30
- var pointLedgerDeclarationSchema = pointLedgerPropertiesSchema.extend({ key: identifier }).strict();
31
- var pointLedgerReferenceSchema = z.object({
32
- id: identifier,
33
- key: identifier.nullable(),
34
- name: z.string()
35
- });
36
-
37
- // src/catalog.ts
38
- import { z as z2 } from "zod";
39
- var interactionSchema = z2.enum([
40
- "photo",
41
- "text",
42
- "url",
43
- "quiz",
44
- "claim",
45
- "staff",
46
- "automatic"
47
- ]);
48
- function questInteraction(trigger) {
49
- return trigger.kind === "automatic" ? "automatic" : trigger.actor === "staff" ? "staff" : trigger.input === "none" ? "claim" : trigger.input;
50
- }
51
- var questTypeVersionSchema = z2.object({
52
- key: identifier.optional(),
53
- id: identifier,
54
- version: identifier,
55
- code: z2.string(),
56
- definition: questDescriptionSchema,
57
- provider: storedReviewModeSchema,
58
- createdAt: z2.number()
59
- });
60
- var collectionSlotSchema = z2.object({
61
- id: identifier,
62
- key: identifier.optional(),
63
- title: z2.string().trim().min(1).max(120)
64
- }).strict();
65
- var collectionSlotDeclarationSchema = collectionSlotSchema.omit({ id: true }).extend(authoringIdentityShape).strict().superRefine(validateAuthoringIdentity).transform(normalizeAuthoringIdentity);
66
- var questCollectionSchema = collectionSlotSchema.extend({
67
- quests: z2.array(identifier).max(100).refine(
68
- (v) => new Set(v).size === v.length,
69
- "A collection can contain a quest only once"
70
- )
71
- });
72
- var questInstanceSchema = z2.object({
73
- id: identifier,
74
- title: z2.string().trim().min(1).max(120),
75
- typeVersion: identifier,
76
- settings: settingsValuesSchema,
77
- requires: z2.array(identifier).max(30),
78
- status: z2.enum(["active", "paused", "archived"])
79
- }).strict();
80
- var questDraftChangesSchema = z2.object({
81
- quests: z2.array(
82
- questInstanceSchema.extend({ expectedRelease: identifier.nullable() })
83
- ).max(50),
84
- collections: z2.array(questCollectionSchema).max(50)
85
- }).strict();
86
- var draftBase = z2.object({
87
- id: identifier,
88
- revision: z2.number().int().positive(),
89
- baseRevision: z2.number().int().nonnegative(),
90
- changes: questDraftChangesSchema
91
- });
92
- var questDraftSchema = z2.discriminatedUnion("status", [
93
- draftBase.extend({ status: z2.literal("draft") }),
94
- draftBase.extend({
95
- status: z2.literal("published"),
96
- releaseIds: z2.array(identifier)
97
- })
98
- ]);
99
- var questCatalogSchema = z2.object({
100
- revision: z2.number().int().nonnegative(),
101
- types: z2.array(questTypeVersionSchema),
102
- collections: z2.array(questCollectionSchema),
103
- quests: z2.array(questInstanceSchema),
104
- drafts: z2.array(questDraftSchema),
105
- releases: z2.array(publishedReleaseSchema).default([]),
106
- supportedInteractions: z2.array(interactionSchema)
107
- });
108
- var catalogDeploymentSchema = z2.object({
109
- expectedRevision: z2.number().int().nonnegative(),
110
- types: z2.array(
111
- z2.object({
112
- code: z2.string().min(1).max(1e6),
113
- provider: reviewModeSchema
114
- })
115
- ).max(50).default([]),
116
- collections: z2.array(collectionSlotDeclarationSchema).max(50).default([]),
117
- supportedInteractions: z2.array(interactionSchema).min(1).optional()
118
- }).strict();
119
- var catalogDeploymentPreviewSchema = z2.object({
120
- revision: z2.number().int().nonnegative(),
121
- types: z2.array(questTypeVersionSchema),
122
- collections: z2.array(collectionSlotSchema),
123
- supportedInteractions: z2.array(interactionSchema)
124
- });
125
- var saveQuestDraftSchema = z2.object({
126
- id: identifier.optional(),
127
- actionId: identifier,
128
- expectedRevision: z2.number().int().nonnegative(),
129
- baseRevision: z2.number().int().nonnegative(),
130
- changes: questDraftChangesSchema
131
- }).strict();
132
- var publishQuestDraftSchema = z2.object({ id: identifier, expectedRevision: z2.number().int().positive() }).strict();
133
- var questRewardViewSchema = z2.discriminatedUnion("kind", [
134
- z2.object({
135
- kind: z2.literal("points"),
136
- label: z2.string(),
137
- amount: z2.number().int().nonnegative(),
138
- ledger: pointLedgerReferenceSchema
139
- }),
140
- z2.object({
141
- kind: z2.literal("tier"),
142
- label: z2.string(),
143
- reward: tieredRewardReferenceSchema.extend({ title: z2.string() }),
144
- tier: identifier
145
- }),
146
- z2.object({ kind: z2.literal("integration"), label: z2.string() })
147
- ]);
148
- var questViewSchema = memberProgressSchema.shape.quests.element.extend(
149
- {
150
- release: identifier,
151
- interaction: interactionSchema,
152
- lifecycle: z2.enum(["active", "paused", "archived"]),
153
- rewards: z2.array(questRewardViewSchema)
154
- }
155
- );
156
- var collectionViewSchema = z2.object({
157
- key: identifier.optional(),
158
- id: identifier,
159
- title: z2.string(),
160
- quests: z2.array(questViewSchema)
161
- });
162
- var questExperienceSchema = z2.object({
163
- member: identifier,
164
- quests: z2.array(questViewSchema),
165
- collections: z2.array(collectionViewSchema)
166
- });
167
- var questPublicationPreviewSchema = z2.object({
168
- draft: questDraftSchema,
169
- releases: z2.array(publishedReleaseSchema),
170
- affectedCollections: z2.array(questCollectionSchema)
171
- });
172
- var allocateQuestSchema = z2.object({ actionId: identifier }).strict();
173
- var allocatedQuestSchema = z2.object({ id: identifier });
174
-
175
- // src/collection.ts
176
- import { z as z3 } from "zod";
177
- var collectionCodeSchema = z3.string().regex(/^relay:collect:[a-f0-9]{64}$/);
178
- var collectionPassSchema = z3.object({
179
- code: collectionCodeSchema,
180
- expiresAt: z3.number(),
181
- entitlement: identifier
182
- });
183
- var collectionResolveSchema = z3.object({ code: collectionCodeSchema }).strict();
184
- var collectionBeginSchema = collectionResolveSchema.extend({
185
- actionId: identifier,
186
- revision: z3.number().int().positive(),
187
- selection: pickupSelectionSchema.optional()
188
- });
189
- var collectionPreviewSchema = z3.object({
190
- entitlement: entitlementSchema,
191
- inventory: pickupAvailabilitySchema,
192
- expiresAt: z3.number()
193
- });
194
-
195
- // src/reward-deliveries.ts
196
- import { z as z4 } from "zod";
197
- var rewardDeliverySchema = z4.object({
198
- id: z4.string(),
199
- quest: z4.string(),
200
- completion: z4.string(),
201
- member: z4.string(),
202
- provider: z4.literal("discord"),
203
- action: z4.literal("grant-role"),
204
- roleId: z4.string(),
205
- /**
206
- * `failed` is terminal: Discord rejected the grant permanently (unknown role,
207
- * member left the server, missing permissions) or retries ran out after
208
- * about a day. An operator can retry it once the cause is fixed.
209
- */
210
- status: z4.enum(["pending", "delivered", "failed"]),
211
- /** Provider attempts in the current round; an operator retry starts a new round at zero. */
212
- attempts: z4.number().int(),
213
- /** While pending with a `lastError`, when the next attempt is scheduled. */
214
- nextAt: z4.number(),
215
- lastError: z4.string().nullable(),
216
- createdAt: z4.number(),
217
- deliveredAt: z4.number().nullable()
218
- });
219
- var rewardDeliveriesSchema = z4.object({
220
- deliveries: z4.array(rewardDeliverySchema)
221
- });
222
-
223
- export {
224
- pointLedgerPropertiesSchema,
225
- createPointLedgerSchema,
226
- pointLedgerSchema,
227
- pointLedgerDeclarationSchema,
228
- pointLedgerReferenceSchema,
229
- interactionSchema,
230
- questInteraction,
231
- questTypeVersionSchema,
232
- collectionSlotSchema,
233
- collectionSlotDeclarationSchema,
234
- questCollectionSchema,
235
- questInstanceSchema,
236
- questDraftChangesSchema,
237
- questDraftSchema,
238
- questCatalogSchema,
239
- catalogDeploymentSchema,
240
- catalogDeploymentPreviewSchema,
241
- saveQuestDraftSchema,
242
- publishQuestDraftSchema,
243
- questRewardViewSchema,
244
- questViewSchema,
245
- collectionViewSchema,
246
- questExperienceSchema,
247
- questPublicationPreviewSchema,
248
- allocateQuestSchema,
249
- allocatedQuestSchema,
250
- collectionCodeSchema,
251
- collectionPassSchema,
252
- collectionResolveSchema,
253
- collectionBeginSchema,
254
- collectionPreviewSchema,
255
- rewardDeliverySchema,
256
- rewardDeliveriesSchema
257
- };