@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
package/dist/internal.js CHANGED
@@ -1,22 +1,40 @@
1
1
  import {
2
- imageComparisonSchema,
3
- imageExtractionSchema,
4
- imageFieldsSchema,
5
- imageInspectionSchema,
6
- imageSightingsSchema
7
- } from "./chunk-4LBUTHD6.js";
2
+ identityIntegrationInputSchema,
3
+ identityIntegrationSchema,
4
+ identityIntegrationSecretSchema,
5
+ identityKindClaimSchema,
6
+ parseImageExtraction,
7
+ parseImageResult,
8
+ participantExchangeSchema,
9
+ questConfiguration,
10
+ sequenceCursorSchema
11
+ } from "./chunk-WJSSJ7AF.js";
12
+ import "./chunk-BGGKNIRP.js";
13
+ import {
14
+ sourceDataSchema,
15
+ sourceRoles,
16
+ validateQuestShape
17
+ } from "./chunk-GQKYAQM6.js";
8
18
  import {
19
+ isActivityParticipantRoute,
9
20
  isContentParticipantRoute,
10
- isLegacyWalletRoute,
21
+ isOfferParticipantRoute,
22
+ isPointsParticipantRoute,
11
23
  isProfileParticipantRoute,
24
+ isQuestOutcomeParticipantRoute,
25
+ isRewardsParticipantRoute,
12
26
  isWalletParticipantRoute,
13
27
  isWalletSignInRoute
14
- } from "./chunk-ZWY3R6B3.js";
28
+ } from "./chunk-GUP7YRR4.js";
15
29
  import {
16
- authScopeSchema
17
- } from "./chunk-7Q4BGGT6.js";
30
+ MANAGEMENT_TIMEOUT,
31
+ lifetime,
32
+ retryAfter,
33
+ retrying
34
+ } from "./chunk-6QJ3LADK.js";
35
+ import "./chunk-NPGENI7K.js";
36
+ import "./chunk-XFMSUPNS.js";
18
37
  import {
19
- photoResultSchema,
20
38
  schemaCheckedReader,
21
39
  trackerDataBatchSteps,
22
40
  trackerDataIssue,
@@ -24,102 +42,38 @@ import {
24
42
  trackerDataPathTypes,
25
43
  trackerDataRecordSteps,
26
44
  whereSchemaIssue
27
- } from "./chunk-YYD4QUBO.js";
28
-
29
- // src/configuration.ts
30
- function questConfiguration(release) {
31
- return release.configuration ?? {
32
- defaults: Object.fromEntries(
33
- Object.entries(release.fields).map(([key, field]) => [
34
- key,
35
- field.default
36
- ])
37
- ),
38
- overrides: { ...release.values },
39
- preserved: Object.keys(release.values)
40
- };
41
- }
42
-
43
- // src/identity-integration.ts
44
- import { z } from "zod";
45
- var identityIntegrationInputSchema = z.object({
46
- name: z.string().trim().min(1).max(80),
47
- origin: z.string().url().refine((value) => {
48
- const url = new URL(value);
49
- return url.protocol === "https:" && url.origin === value;
50
- }, "Use an exact HTTPS application origin")
51
- }).strict();
52
- var identityIntegrationSchema = authScopeSchema.extend({
53
- id: z.string().uuid(),
54
- name: z.string(),
55
- origin: z.string(),
56
- expiresAt: z.number()
57
- });
58
- var identityIntegrationSecretSchema = identityIntegrationSchema.extend(
59
- {
60
- token: z.string()
61
- }
62
- );
63
- var participantExchangeSchema = z.object({
64
- subject: z.string().min(1).max(200),
65
- previousToken: z.string().max(200).optional()
66
- }).strict();
67
-
68
- // src/image-results.ts
69
- function parseImageExtraction(raw, value) {
70
- const result = imageExtractionSchema.parse(value);
71
- const fields = imageFieldsSchema.parse(raw);
72
- for (const [key, field] of Object.entries(fields)) {
73
- const extracted = result.values[key];
74
- if (extracted === void 0) {
75
- throw new Error("Image extraction omitted " + key);
76
- }
77
- if (extracted !== null && typeof extracted !== field.type) {
78
- throw new Error("Image extraction returned the wrong type for " + key);
79
- }
80
- }
81
- if (Object.keys(result.values).some((key) => !Object.hasOwn(fields, key))) {
82
- throw new Error("Image extraction returned an undeclared field");
83
- }
84
- return result;
85
- }
86
- function parseImageResult(request, value) {
87
- switch (request.operation) {
88
- case "inspect":
89
- return imageInspectionSchema.parse(value);
90
- case "compare":
91
- return imageComparisonSchema.parse(value);
92
- case "review":
93
- return photoResultSchema.parse(value);
94
- case "extract":
95
- return parseImageExtraction(request.fields, value);
96
- case "seen":
97
- return imageSightingsSchema.parse(value);
98
- }
99
- }
100
-
101
- // src/sequence-cursor.ts
102
- import { z as z2 } from "zod";
103
- var sequenceCursorSchema = z2.string().regex(/^[1-9][0-9]{0,15}$/, "Invalid cursor").transform(Number).pipe(z2.number().int().positive().safe());
45
+ } from "./chunk-JON5SESL.js";
104
46
  export {
47
+ MANAGEMENT_TIMEOUT,
105
48
  identityIntegrationInputSchema,
106
49
  identityIntegrationSchema,
107
50
  identityIntegrationSecretSchema,
51
+ identityKindClaimSchema,
52
+ isActivityParticipantRoute,
108
53
  isContentParticipantRoute,
109
- isLegacyWalletRoute,
54
+ isOfferParticipantRoute,
55
+ isPointsParticipantRoute,
110
56
  isProfileParticipantRoute,
57
+ isQuestOutcomeParticipantRoute,
58
+ isRewardsParticipantRoute,
111
59
  isWalletParticipantRoute,
112
60
  isWalletSignInRoute,
61
+ lifetime,
113
62
  parseImageExtraction,
114
63
  parseImageResult,
115
64
  participantExchangeSchema,
116
65
  questConfiguration,
66
+ retryAfter,
67
+ retrying,
117
68
  schemaCheckedReader,
118
69
  sequenceCursorSchema,
70
+ sourceDataSchema,
71
+ sourceRoles,
119
72
  trackerDataBatchSteps,
120
73
  trackerDataIssue,
121
74
  trackerDataIssues,
122
75
  trackerDataPathTypes,
123
76
  trackerDataRecordSteps,
77
+ validateQuestShape,
124
78
  whereSchemaIssue
125
79
  };
@@ -0,0 +1,431 @@
1
+ import { cF as ResourceHandle } from './schema-DfJzH2ci.js';
2
+ import { aQ as AuthoringIdentity } from './groups-Ck-OxzjD.js';
3
+ import { z } from 'zod';
4
+
5
+ declare const offerPriceSchema: z.ZodObject<{
6
+ kind: z.ZodDefault<z.ZodLiteral<"points">>;
7
+ balance: z.ZodString;
8
+ amount: z.ZodNumber;
9
+ }, z.core.$strict>;
10
+ type OfferPrice = z.infer<typeof offerPriceSchema>;
11
+ declare const offerLimitSchema: z.ZodObject<{
12
+ perMember: z.ZodNumber;
13
+ }, z.core.$strict>;
14
+ declare const offerDefinitionSchema: z.ZodObject<{
15
+ id: z.ZodString;
16
+ key: z.ZodOptional<z.ZodString>;
17
+ title: z.ZodString;
18
+ price: z.ZodObject<{
19
+ kind: z.ZodDefault<z.ZodLiteral<"points">>;
20
+ balance: z.ZodString;
21
+ amount: z.ZodNumber;
22
+ }, z.core.$strict>;
23
+ reward: z.ZodObject<{
24
+ kind: z.ZodLiteral<"tier">;
25
+ reward: z.ZodObject<{
26
+ id: z.ZodString;
27
+ title: z.ZodString;
28
+ tiers: z.ZodArray<z.ZodObject<{
29
+ id: z.ZodString;
30
+ title: z.ZodString;
31
+ }, z.core.$strict>>;
32
+ inventory: z.ZodObject<{
33
+ kind: z.ZodLiteral<"untracked">;
34
+ }, z.core.$strict>;
35
+ fulfillment: z.ZodDiscriminatedUnion<[z.ZodObject<{
36
+ kind: z.ZodLiteral<"staff-handover">;
37
+ }, z.core.$strict>, z.ZodObject<{
38
+ kind: z.ZodLiteral<"automatic">;
39
+ }, z.core.$strict>], "kind">;
40
+ }, z.core.$strict>;
41
+ tier: z.ZodString;
42
+ }, z.core.$strict>;
43
+ stock: z.ZodNumber;
44
+ limit: z.ZodDefault<z.ZodObject<{
45
+ perMember: z.ZodNumber;
46
+ }, z.core.$strict>>;
47
+ enabled: z.ZodDefault<z.ZodBoolean>;
48
+ }, z.core.$strict>;
49
+ type OfferDefinition = z.infer<typeof offerDefinitionSchema>;
50
+ declare const offerAuthoringSchema: z.ZodPipe<z.ZodObject<{
51
+ limit: z.ZodDefault<z.ZodObject<{
52
+ perMember: z.ZodNumber;
53
+ }, z.core.$strict>>;
54
+ reward: z.ZodObject<{
55
+ kind: z.ZodLiteral<"tier">;
56
+ reward: z.ZodObject<{
57
+ id: z.ZodString;
58
+ title: z.ZodString;
59
+ tiers: z.ZodArray<z.ZodObject<{
60
+ id: z.ZodString;
61
+ title: z.ZodString;
62
+ }, z.core.$strict>>;
63
+ inventory: z.ZodObject<{
64
+ kind: z.ZodLiteral<"untracked">;
65
+ }, z.core.$strict>;
66
+ fulfillment: z.ZodDiscriminatedUnion<[z.ZodObject<{
67
+ kind: z.ZodLiteral<"staff-handover">;
68
+ }, z.core.$strict>, z.ZodObject<{
69
+ kind: z.ZodLiteral<"automatic">;
70
+ }, z.core.$strict>], "kind">;
71
+ }, z.core.$strict>;
72
+ tier: z.ZodString;
73
+ }, z.core.$strict>;
74
+ price: z.ZodObject<{
75
+ kind: z.ZodDefault<z.ZodLiteral<"points">>;
76
+ balance: z.ZodString;
77
+ amount: z.ZodNumber;
78
+ }, z.core.$strict>;
79
+ stock: z.ZodNumber;
80
+ title: z.ZodOptional<z.ZodString>;
81
+ key: z.ZodString;
82
+ }, z.core.$strict>, z.ZodTransform<{
83
+ title: string;
84
+ enabled: boolean;
85
+ limit: {
86
+ perMember: number;
87
+ };
88
+ reward: {
89
+ kind: "tier";
90
+ reward: {
91
+ id: string;
92
+ title: string;
93
+ tiers: {
94
+ id: string;
95
+ title: string;
96
+ }[];
97
+ inventory: {
98
+ kind: "untracked";
99
+ };
100
+ fulfillment: {
101
+ kind: "staff-handover";
102
+ } | {
103
+ kind: "automatic";
104
+ };
105
+ };
106
+ tier: string;
107
+ };
108
+ price: {
109
+ kind: "points";
110
+ balance: string;
111
+ amount: number;
112
+ };
113
+ stock: number;
114
+ key: string;
115
+ }, {
116
+ limit: {
117
+ perMember: number;
118
+ };
119
+ reward: {
120
+ kind: "tier";
121
+ reward: {
122
+ id: string;
123
+ title: string;
124
+ tiers: {
125
+ id: string;
126
+ title: string;
127
+ }[];
128
+ inventory: {
129
+ kind: "untracked";
130
+ };
131
+ fulfillment: {
132
+ kind: "staff-handover";
133
+ } | {
134
+ kind: "automatic";
135
+ };
136
+ };
137
+ tier: string;
138
+ };
139
+ price: {
140
+ kind: "points";
141
+ balance: string;
142
+ amount: number;
143
+ };
144
+ stock: number;
145
+ key: string;
146
+ title?: string | undefined;
147
+ }>>;
148
+ type OfferAuthoring = z.input<typeof offerAuthoringSchema>;
149
+ declare const offerArtifactSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
150
+ limit: z.ZodDefault<z.ZodObject<{
151
+ perMember: z.ZodNumber;
152
+ }, z.core.$strict>>;
153
+ reward: z.ZodObject<{
154
+ kind: z.ZodLiteral<"tier">;
155
+ reward: z.ZodObject<{
156
+ id: z.ZodString;
157
+ title: z.ZodString;
158
+ tiers: z.ZodArray<z.ZodObject<{
159
+ id: z.ZodString;
160
+ title: z.ZodString;
161
+ }, z.core.$strict>>;
162
+ inventory: z.ZodObject<{
163
+ kind: z.ZodLiteral<"untracked">;
164
+ }, z.core.$strict>;
165
+ fulfillment: z.ZodDiscriminatedUnion<[z.ZodObject<{
166
+ kind: z.ZodLiteral<"staff-handover">;
167
+ }, z.core.$strict>, z.ZodObject<{
168
+ kind: z.ZodLiteral<"automatic">;
169
+ }, z.core.$strict>], "kind">;
170
+ }, z.core.$strict>;
171
+ tier: z.ZodString;
172
+ }, z.core.$strict>;
173
+ price: z.ZodObject<{
174
+ kind: z.ZodDefault<z.ZodLiteral<"points">>;
175
+ balance: z.ZodString;
176
+ amount: z.ZodNumber;
177
+ }, z.core.$strict>;
178
+ stock: z.ZodNumber;
179
+ title: z.ZodOptional<z.ZodString>;
180
+ key: z.ZodString;
181
+ }, z.core.$strict>, z.ZodTransform<{
182
+ title: string;
183
+ enabled: boolean;
184
+ limit: {
185
+ perMember: number;
186
+ };
187
+ reward: {
188
+ kind: "tier";
189
+ reward: {
190
+ id: string;
191
+ title: string;
192
+ tiers: {
193
+ id: string;
194
+ title: string;
195
+ }[];
196
+ inventory: {
197
+ kind: "untracked";
198
+ };
199
+ fulfillment: {
200
+ kind: "staff-handover";
201
+ } | {
202
+ kind: "automatic";
203
+ };
204
+ };
205
+ tier: string;
206
+ };
207
+ price: {
208
+ kind: "points";
209
+ balance: string;
210
+ amount: number;
211
+ };
212
+ stock: number;
213
+ key: string;
214
+ }, {
215
+ limit: {
216
+ perMember: number;
217
+ };
218
+ reward: {
219
+ kind: "tier";
220
+ reward: {
221
+ id: string;
222
+ title: string;
223
+ tiers: {
224
+ id: string;
225
+ title: string;
226
+ }[];
227
+ inventory: {
228
+ kind: "untracked";
229
+ };
230
+ fulfillment: {
231
+ kind: "staff-handover";
232
+ } | {
233
+ kind: "automatic";
234
+ };
235
+ };
236
+ tier: string;
237
+ };
238
+ price: {
239
+ kind: "points";
240
+ balance: string;
241
+ amount: number;
242
+ };
243
+ stock: number;
244
+ key: string;
245
+ title?: string | undefined;
246
+ }>>, z.ZodObject<{
247
+ code: z.ZodString;
248
+ }, z.core.$strict>]>;
249
+ declare const offerAvailabilitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
250
+ kind: z.ZodLiteral<"available">;
251
+ remaining: z.ZodNumber;
252
+ }, z.core.$strict>, z.ZodObject<{
253
+ kind: z.ZodLiteral<"out-of-stock">;
254
+ }, z.core.$strict>, z.ZodObject<{
255
+ kind: z.ZodLiteral<"limit-reached">;
256
+ }, z.core.$strict>, z.ZodObject<{
257
+ kind: z.ZodLiteral<"paused">;
258
+ }, z.core.$strict>], "kind">;
259
+ declare const offerSchema: z.ZodObject<{
260
+ id: z.ZodString;
261
+ key: z.ZodOptional<z.ZodString>;
262
+ title: z.ZodString;
263
+ price: z.ZodObject<{
264
+ kind: z.ZodDefault<z.ZodLiteral<"points">>;
265
+ balance: z.ZodString;
266
+ amount: z.ZodNumber;
267
+ }, z.core.$strict>;
268
+ reward: z.ZodObject<{
269
+ kind: z.ZodLiteral<"tier">;
270
+ reward: z.ZodObject<{
271
+ id: z.ZodString;
272
+ title: z.ZodString;
273
+ tiers: z.ZodArray<z.ZodObject<{
274
+ id: z.ZodString;
275
+ title: z.ZodString;
276
+ }, z.core.$strict>>;
277
+ inventory: z.ZodObject<{
278
+ kind: z.ZodLiteral<"untracked">;
279
+ }, z.core.$strict>;
280
+ fulfillment: z.ZodDiscriminatedUnion<[z.ZodObject<{
281
+ kind: z.ZodLiteral<"staff-handover">;
282
+ }, z.core.$strict>, z.ZodObject<{
283
+ kind: z.ZodLiteral<"automatic">;
284
+ }, z.core.$strict>], "kind">;
285
+ }, z.core.$strict>;
286
+ tier: z.ZodString;
287
+ }, z.core.$strict>;
288
+ stock: z.ZodNumber;
289
+ limit: z.ZodDefault<z.ZodObject<{
290
+ perMember: z.ZodNumber;
291
+ }, z.core.$strict>>;
292
+ enabled: z.ZodDefault<z.ZodBoolean>;
293
+ revision: z.ZodNumber;
294
+ available: z.ZodNumber;
295
+ redeemed: z.ZodNumber;
296
+ availability: z.ZodDiscriminatedUnion<[z.ZodObject<{
297
+ kind: z.ZodLiteral<"available">;
298
+ remaining: z.ZodNumber;
299
+ }, z.core.$strict>, z.ZodObject<{
300
+ kind: z.ZodLiteral<"out-of-stock">;
301
+ }, z.core.$strict>, z.ZodObject<{
302
+ kind: z.ZodLiteral<"limit-reached">;
303
+ }, z.core.$strict>, z.ZodObject<{
304
+ kind: z.ZodLiteral<"paused">;
305
+ }, z.core.$strict>], "kind">;
306
+ }, z.core.$strict>;
307
+ type Offer = z.infer<typeof offerSchema>;
308
+ declare const redeemOfferSchema: z.ZodObject<{
309
+ actionId: z.ZodString;
310
+ }, z.core.$strict>;
311
+ type RedeemOfferInput = z.input<typeof redeemOfferSchema>;
312
+ declare const redemptionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
313
+ status: z.ZodLiteral<"fulfilled">;
314
+ id: z.ZodString;
315
+ offer: z.ZodString;
316
+ member: z.ZodString;
317
+ reservation: z.ZodString;
318
+ price: z.ZodObject<{
319
+ kind: z.ZodDefault<z.ZodLiteral<"points">>;
320
+ balance: z.ZodString;
321
+ amount: z.ZodNumber;
322
+ }, z.core.$strict>;
323
+ reward: z.ZodObject<{
324
+ kind: z.ZodLiteral<"tier">;
325
+ reward: z.ZodObject<{
326
+ id: z.ZodString;
327
+ title: z.ZodString;
328
+ tiers: z.ZodArray<z.ZodObject<{
329
+ id: z.ZodString;
330
+ title: z.ZodString;
331
+ }, z.core.$strict>>;
332
+ inventory: z.ZodObject<{
333
+ kind: z.ZodLiteral<"untracked">;
334
+ }, z.core.$strict>;
335
+ fulfillment: z.ZodDiscriminatedUnion<[z.ZodObject<{
336
+ kind: z.ZodLiteral<"staff-handover">;
337
+ }, z.core.$strict>, z.ZodObject<{
338
+ kind: z.ZodLiteral<"automatic">;
339
+ }, z.core.$strict>], "kind">;
340
+ }, z.core.$strict>;
341
+ tier: z.ZodString;
342
+ }, z.core.$strict>;
343
+ entitlement: z.ZodString;
344
+ revision: z.ZodNumber;
345
+ redeemedAt: z.ZodNumber;
346
+ }, z.core.$strict>, z.ZodObject<{
347
+ status: z.ZodLiteral<"canceled">;
348
+ canceledAt: z.ZodNumber;
349
+ reason: z.ZodString;
350
+ id: z.ZodString;
351
+ offer: z.ZodString;
352
+ member: z.ZodString;
353
+ reservation: z.ZodString;
354
+ price: z.ZodObject<{
355
+ kind: z.ZodDefault<z.ZodLiteral<"points">>;
356
+ balance: z.ZodString;
357
+ amount: z.ZodNumber;
358
+ }, z.core.$strict>;
359
+ reward: z.ZodObject<{
360
+ kind: z.ZodLiteral<"tier">;
361
+ reward: z.ZodObject<{
362
+ id: z.ZodString;
363
+ title: z.ZodString;
364
+ tiers: z.ZodArray<z.ZodObject<{
365
+ id: z.ZodString;
366
+ title: z.ZodString;
367
+ }, z.core.$strict>>;
368
+ inventory: z.ZodObject<{
369
+ kind: z.ZodLiteral<"untracked">;
370
+ }, z.core.$strict>;
371
+ fulfillment: z.ZodDiscriminatedUnion<[z.ZodObject<{
372
+ kind: z.ZodLiteral<"staff-handover">;
373
+ }, z.core.$strict>, z.ZodObject<{
374
+ kind: z.ZodLiteral<"automatic">;
375
+ }, z.core.$strict>], "kind">;
376
+ }, z.core.$strict>;
377
+ tier: z.ZodString;
378
+ }, z.core.$strict>;
379
+ entitlement: z.ZodString;
380
+ revision: z.ZodNumber;
381
+ redeemedAt: z.ZodNumber;
382
+ }, z.core.$strict>], "status">;
383
+ type Redemption = z.infer<typeof redemptionSchema>;
384
+ declare const offerControlSchema: z.ZodObject<{
385
+ actionId: z.ZodString;
386
+ revision: z.ZodNumber;
387
+ enabled: z.ZodBoolean;
388
+ reason: z.ZodString;
389
+ }, z.core.$strict>;
390
+ declare const redemptionCancellationSchema: z.ZodObject<{
391
+ actionId: z.ZodString;
392
+ revision: z.ZodNumber;
393
+ reason: z.ZodString;
394
+ }, z.core.$strict>;
395
+ /** Define one points-priced offer for a tier reward. The reward title is used when no title is set. */
396
+ declare function defineOffer(input: OfferAuthoring & AuthoringIdentity): {
397
+ title: string;
398
+ enabled: boolean;
399
+ limit: {
400
+ perMember: number;
401
+ };
402
+ reward: {
403
+ kind: "tier";
404
+ reward: {
405
+ id: string;
406
+ title: string;
407
+ tiers: {
408
+ id: string;
409
+ title: string;
410
+ }[];
411
+ inventory: {
412
+ kind: "untracked";
413
+ };
414
+ fulfillment: {
415
+ kind: "staff-handover";
416
+ } | {
417
+ kind: "automatic";
418
+ };
419
+ };
420
+ tier: string;
421
+ };
422
+ price: {
423
+ kind: "points";
424
+ balance: string;
425
+ amount: number;
426
+ };
427
+ stock: number;
428
+ key: string;
429
+ } & ResourceHandle<"offer">;
430
+
431
+ export { type Offer as O, type RedeemOfferInput as R, type OfferDefinition as a, type OfferPrice as b, type Redemption as c, type OfferAuthoring as d, defineOffer as e, offerAuthoringSchema as f, offerAvailabilitySchema as g, offerControlSchema as h, offerDefinitionSchema as i, offerLimitSchema as j, offerPriceSchema as k, offerSchema as l, redemptionCancellationSchema as m, redemptionSchema as n, offerArtifactSchema as o, redeemOfferSchema as r };