@domino-sdk/relay 1.53.1 → 1.55.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 (66) hide show
  1. package/CHANGELOG.md +1848 -0
  2. package/dist/analytics-URV-mxjH.d.ts +482 -0
  3. package/dist/{attempt-captures-QC4kTA44.d.ts → attempt-captures-CxxO7DeD.d.ts} +1 -1
  4. package/dist/authoring.d.ts +233 -78
  5. package/dist/authoring.js +112 -14
  6. package/dist/{automatic-outcomes-CVyZHxir.d.ts → automatic-outcomes-DxW_v5Wc.d.ts} +5 -2
  7. package/dist/avatar.d.ts +1 -1
  8. package/dist/browser.d.ts +8 -7
  9. package/dist/browser.js +14 -10
  10. package/dist/{capability-error-FQGGb5xS.d.ts → capability-error-DSd8EMQC.d.ts} +76 -2
  11. package/dist/{chunk-53JMTUWG.js → chunk-56DBFNR2.js} +1 -1
  12. package/dist/chunk-C7QZ4UBB.js +937 -0
  13. package/dist/chunk-F6HECAXA.js +661 -0
  14. package/dist/{chunk-VKHSC5MD.js → chunk-GL43VQ5D.js} +16 -16
  15. package/dist/{chunk-GTQJSDBS.js → chunk-IUF7DW76.js} +27 -16
  16. package/dist/{chunk-YBR4BUFK.js → chunk-IZRITLVV.js} +2 -2
  17. package/dist/chunk-KDR2VAJP.js +34 -0
  18. package/dist/{chunk-S2PMKZSX.js → chunk-SABMNPF2.js} +21 -2
  19. package/dist/{chunk-XFAYQFRO.js → chunk-TLK2MD4S.js} +1 -1
  20. package/dist/{chunk-ZJ3FVZRP.js → chunk-UY6KMLQG.js} +10 -3
  21. package/dist/{chunk-JYJAS4E3.js → chunk-VFBQVY4X.js} +1 -1
  22. package/dist/{chunk-YVC3B72P.js → chunk-WHG5WE43.js} +1 -1
  23. package/dist/chunk-WHMXXHPX.js +344 -0
  24. package/dist/{chunk-MP2ZF5U6.js → chunk-WUEQOKJH.js} +4 -4
  25. package/dist/{chunk-7BNCLWAO.js → chunk-XALIFNMD.js} +1 -1
  26. package/dist/{chunk-IELNFM3V.js → chunk-YCOKTQ4E.js} +96 -7
  27. package/dist/{chunk-LPHXTZDA.js → chunk-YE3XYB2F.js} +2 -2
  28. package/dist/{chunk-K6TVMNU4.js → chunk-YEVD4A5X.js} +1 -1
  29. package/dist/{client-CzNtl8UO.d.ts → client-C4zUZKpj.d.ts} +35 -7
  30. package/dist/{deployments-ovtqtAcx.d.ts → deployments-B32QS1CI.d.ts} +1060 -233
  31. package/dist/{groups-B5R1RCsl.d.ts → groups-O6onGPmC.d.ts} +131 -137
  32. package/dist/host-environment-FN4zg3hw.d.ts +30 -0
  33. package/dist/index.d.ts +8 -8
  34. package/dist/index.js +9 -9
  35. package/dist/integrations-C6_uUh-s.d.ts +584 -0
  36. package/dist/internal.d.ts +12 -10
  37. package/dist/internal.js +14 -8
  38. package/dist/{offers-CH1RZekg.d.ts → offers-BMDNcvwB.d.ts} +2 -2
  39. package/dist/{pages-BTlOg8sl.d.ts → pages-BFloMpyQ.d.ts} +25 -1
  40. package/dist/portal-proxy.d.ts +11 -1
  41. package/dist/portal-proxy.js +26 -5
  42. package/dist/{profiles-Cdv4BSd_.d.ts → profiles-BoOK03cR.d.ts} +2 -0
  43. package/dist/react/index.d.ts +488 -13
  44. package/dist/react/index.js +51 -15
  45. package/dist/runtime/authoring.js +1 -1
  46. package/dist/runtime/chunks/WKATKZXE.js +1 -0
  47. package/dist/runtime/manifest.json +3 -3
  48. package/dist/runtime/schema.js +1 -1
  49. package/dist/{schema-BJ9bOgpN.d.ts → schema-C4m9RhCR.d.ts} +166 -6
  50. package/dist/schema.d.ts +392 -334
  51. package/dist/schema.js +84 -40
  52. package/dist/server/index.d.ts +11 -10
  53. package/dist/server/index.js +1604 -838
  54. package/dist/{submission-input-BNah53go.d.ts → submission-input-BbdawqVy.d.ts} +2 -2
  55. package/dist/{telegram-browser-C36j_6v-.d.ts → telegram-browser-CwaxROAZ.d.ts} +1 -1
  56. package/dist/testing.d.ts +85 -12
  57. package/dist/testing.js +322 -37
  58. package/dist/{transport-DuB_fiA2.d.ts → transport-CZJOW5Sr.d.ts} +8018 -3150
  59. package/dist/vite.d.ts +54 -1
  60. package/dist/vite.js +35 -0
  61. package/dist/{x-BfQcsDp0.d.ts → x-1czZFVUW.d.ts} +1 -1
  62. package/package.json +3 -2
  63. package/dist/chunk-2NUD237O.js +0 -102
  64. package/dist/chunk-CCE2JWES.js +0 -1083
  65. package/dist/integrations-CllF-kWg.d.ts +0 -314
  66. package/dist/runtime/chunks/AVRVSLHX.js +0 -1
@@ -1,1083 +0,0 @@
1
- import {
2
- authoringIdentityShape,
3
- calendarPeriodSchema,
4
- contentMetricSchema,
5
- contentMetricsSchema,
6
- identifier,
7
- maxPointsAmount,
8
- pageCursorSchema,
9
- pointsRewardSchema,
10
- refuseWindowTimeZone,
11
- resourceHandle,
12
- responseShape,
13
- rewardKey,
14
- tierRewardSchema
15
- } from "./chunk-IELNFM3V.js";
16
-
17
- // src/badges.ts
18
- import * as z from "zod";
19
- var badgePropertiesSchema = z.object({
20
- name: z.string().trim().min(1).max(120),
21
- description: z.string().trim().max(1e3).default(""),
22
- image: z.string().url().max(2048)
23
- }).strict();
24
- var badgeDeclarationSchema = badgePropertiesSchema.extend({ key: identifier }).strict();
25
- var badgeSchema = badgePropertiesSchema.extend({ id: identifier, key: identifier.nullable() }).strip();
26
- var managedBadgeSchema = badgeSchema.extend({
27
- archivedAt: z.number().int().nonnegative().nullable()
28
- });
29
- var createBadgeSchema = badgeDeclarationSchema.extend({ actionId: identifier }).strict();
30
- var badgeArtifactSchema = z.union([
31
- badgeDeclarationSchema,
32
- z.object({ code: z.string().min(1).max(2e6) }).strict()
33
- ]);
34
- var memberBadgeSchema = z.object({
35
- badge: badgeSchema,
36
- awardedAt: z.number().int().nonnegative()
37
- });
38
- var memberBadgesSchema = z.object({
39
- items: z.array(memberBadgeSchema)
40
- });
41
- var badgeMutationSchema = z.object({ actionId: identifier, reason: z.string().trim().min(1).max(1e3) }).strict();
42
- var badgeMutationResultSchema = z.object({
43
- badge: identifier,
44
- member: identifier,
45
- awarded: z.boolean(),
46
- changed: z.boolean()
47
- });
48
-
49
- // src/point-ledgers.ts
50
- import * as z2 from "zod";
51
- var pointLedgerPropertiesSchema = z2.object({
52
- name: z2.string().trim().min(1).max(120),
53
- description: z2.string().trim().max(1e3).default("")
54
- }).strict();
55
- var createPointLedgerSchema = pointLedgerPropertiesSchema.extend({ actionId: identifier, key: identifier.optional() }).strict();
56
- var pointLedgerSchema = pointLedgerPropertiesSchema.extend({
57
- id: identifier
58
- });
59
- var managedPointLedgerSchema = pointLedgerSchema.extend({
60
- archivedAt: z2.number().int().nonnegative().nullable()
61
- });
62
- var pointLedgerDeclarationSchema = pointLedgerPropertiesSchema.extend({ key: identifier }).strict();
63
- var pointLedgerArtifactSchema = z2.union([
64
- pointLedgerDeclarationSchema,
65
- z2.object({ code: z2.string().min(1).max(2e6) }).strict()
66
- ]);
67
- var pointLedgerReferenceSchema = z2.object({
68
- id: identifier,
69
- key: identifier.nullable(),
70
- name: z2.string()
71
- });
72
- var points = z2.number().int().safe();
73
- var pointBalanceSchema = z2.object({
74
- ledger: pointLedgerReferenceSchema,
75
- balance: points,
76
- available: points
77
- });
78
- var pointBalancesSchema = z2.object({
79
- items: z2.array(pointBalanceSchema)
80
- });
81
- var PointEntryKind = {
82
- /** Points a quest completion, an engagement settlement or an operator awarded. */
83
- Award: "award",
84
- /** Points the member spent. */
85
- Spend: "spend",
86
- /** A correction in either direction, by an operator or a referral payout. */
87
- Adjust: "adjust",
88
- /** Undoes part or all of an award or a positive adjustment (`reverses`). */
89
- Reverse: "reverse"
90
- };
91
- var pointEntryKindSchema = z2.string().min(1).max(64);
92
- var pointEntrySchema = z2.object({
93
- id: identifier,
94
- amount: points,
95
- kind: pointEntryKindSchema,
96
- /** When the entry took effect, in epoch milliseconds. A reversal keeps its source's. */
97
- at: points.nonnegative(),
98
- quest: identifier.nullable(),
99
- reverses: identifier.nullable(),
100
- /**
101
- * True for an opening balance a member import recorded (an `adjust`). Absent from Relay
102
- * versions without imports.
103
- */
104
- imported: z2.boolean().optional()
105
- });
106
- var pointHistoryQuerySchema = z2.strictObject({
107
- ledger: identifier,
108
- cursor: pageCursorSchema.optional()
109
- });
110
- var pointHistoryPageSchema = z2.object({
111
- items: z2.array(pointEntrySchema),
112
- nextCursor: pageCursorSchema.nullable()
113
- });
114
-
115
- // src/engagement.ts
116
- import * as z3 from "zod";
117
- var amount = z3.number().int().safe().nonnegative();
118
- var engagementBudgetSchema = z3.strictObject({
119
- scope: z3.enum(["member", "project"]),
120
- period: calendarPeriodSchema,
121
- limit: amount
122
- });
123
- var engagementDefinitionSchema = z3.strictObject({
124
- key: identifier,
125
- qualifiedBy: identifier,
126
- balance: identifier,
127
- metrics: z3.array(contentMetricSchema).min(1).max(10).refine(
128
- (metrics) => new Set(metrics).size === metrics.length,
129
- "Metrics must be unique"
130
- ),
131
- baseline: z3.literal("historical"),
132
- maxAgeMs: z3.number().int().positive().max(864e5).default(36e5),
133
- budgets: z3.array(engagementBudgetSchema).max(8).default([]).refine(
134
- (budgets) => new Set(budgets.map((b) => b.scope + ":" + b.period)).size === budgets.length,
135
- "Give each scope and period one budget"
136
- )
137
- });
138
- var engagementScoreInputSchema = z3.strictObject({
139
- metrics: contentMetricsSchema,
140
- baseline: contentMetricsSchema
141
- });
142
- var engagementScoreSchema = z3.strictObject({
143
- target: amount,
144
- baseline: amount
145
- });
146
- var engagementPublishSchema = z3.strictObject({
147
- actionId: identifier,
148
- code: z3.string().min(1).max(1e6)
149
- });
150
- var engagementRuleSchema = z3.strictObject({
151
- version: identifier,
152
- definition: engagementDefinitionSchema,
153
- publishedAt: amount
154
- });
155
- var engagementPageQuerySchema = z3.strictObject({
156
- rule: identifier,
157
- content: z3.string().min(1).max(256),
158
- member: identifier.optional(),
159
- cursor: pageCursorSchema.optional()
160
- });
161
- var engagementSettlementSchema = z3.strictObject({
162
- id: identifier,
163
- day: z3.string(),
164
- observation: identifier,
165
- qualification: identifier,
166
- earned: amount,
167
- growth: amount,
168
- paid: amount,
169
- excluded: amount,
170
- entry: identifier.nullable(),
171
- createdAt: amount
172
- });
173
- var engagementPageSchema = z3.strictObject({
174
- rule: engagementRuleSchema,
175
- account: z3.strictObject({
176
- member: identifier,
177
- earned: amount,
178
- accounted: amount,
179
- paid: amount,
180
- excluded: amount,
181
- pending: amount,
182
- counters: contentMetricsSchema,
183
- baseline: contentMetricsSchema,
184
- observation: identifier.nullable(),
185
- nextSettlementAt: amount.nullable(),
186
- reason: z3.string().nullable()
187
- }).nullable(),
188
- items: z3.array(engagementSettlementSchema),
189
- nextCursor: pageCursorSchema.nullable()
190
- });
191
- var engagementChangePreviewInputSchema = z3.strictObject({
192
- code: z3.string().min(1).max(1e6)
193
- });
194
- var engagementChangeSchema = engagementPublishSchema.extend({
195
- expectedVersion: identifier,
196
- previewHash: identifier
197
- });
198
- var total = z3.string().regex(/^(0|[1-9][0-9]*)$/);
199
- var engagementChangePreviewSchema = z3.strictObject({
200
- rule: identifier,
201
- fromVersion: identifier,
202
- toVersion: identifier,
203
- previewHash: identifier,
204
- definition: engagementDefinitionSchema,
205
- boundary: z3.literal("available-eligible-observation"),
206
- settlement: z3.literal("deferred"),
207
- summary: z3.strictObject({
208
- knownAdmissions: amount,
209
- accounts: amount,
210
- uninitialized: amount,
211
- pendingTransitions: amount,
212
- earned: total,
213
- paid: total,
214
- excluded: total,
215
- pending: total
216
- })
217
- });
218
- var engagementVersionSchema = engagementRuleSchema.extend({
219
- previousVersion: identifier.nullable()
220
- });
221
- var engagementRuleVersionPageSchema = z3.object({
222
- items: z3.array(
223
- z3.object({
224
- version: identifier,
225
- definition: z3.object({
226
- ...engagementDefinitionSchema.shape,
227
- budgets: z3.array(z3.object(engagementBudgetSchema.shape)).max(8).default([])
228
- }),
229
- publishedAt: amount,
230
- previousVersion: identifier.nullable()
231
- })
232
- ),
233
- nextCursor: pageCursorSchema.nullable()
234
- });
235
- var engagementVersionPageSchema = z3.strictObject({
236
- items: z3.array(engagementVersionSchema),
237
- next: amount.nullable()
238
- });
239
- var engagementVersionQuerySchema = z3.strictObject({
240
- rule: identifier,
241
- before: z3.coerce.number().int().positive().safe().optional()
242
- });
243
- var engagementBoundaryPageSchema = z3.strictObject({
244
- current: engagementRuleSchema.nullable(),
245
- requested: engagementRuleSchema,
246
- items: z3.array(
247
- z3.strictObject({
248
- from: identifier,
249
- to: identifier,
250
- baseline: contentMetricsSchema,
251
- observedAt: amount,
252
- settlement: engagementSettlementSchema
253
- })
254
- ),
255
- nextCursor: pageCursorSchema.nullable()
256
- });
257
- var engagementArtifactSchema = engagementPublishSchema.omit({
258
- actionId: true
259
- });
260
- var deploymentEntry = engagementArtifactSchema.extend({
261
- rule: engagementRuleSchema
262
- });
263
- var engagementDeploymentEntrySchema = z3.discriminatedUnion("kind", [
264
- deploymentEntry.extend({ kind: z3.literal("create") }),
265
- deploymentEntry.extend({ kind: z3.literal("unchanged") }),
266
- deploymentEntry.extend({
267
- kind: z3.literal("change"),
268
- change: engagementChangePreviewSchema
269
- })
270
- ]);
271
-
272
- // src/profiles.ts
273
- import * as z4 from "zod";
274
- var count = z4.number().int().nonnegative().safe();
275
- var profileVisibilitySchema = z4.enum([
276
- "private",
277
- "participants",
278
- "public"
279
- ]);
280
- var avatarProviderSchema = z4.enum(["x", "discord", "google"]);
281
- var profileDefaultProviderSchema = z4.enum(["x", "discord"]);
282
- var profileDefaultsSchema = z4.array(profileDefaultProviderSchema).max(profileDefaultProviderSchema.options.length).refine(
283
- (providers) => new Set(providers).size === providers.length,
284
- "List each provider once"
285
- );
286
- var avatarSeedSchema = z4.string().min(1).max(100);
287
- var profileAvatarSchema = z4.discriminatedUnion("source", [
288
- z4.object({
289
- source: z4.literal("upload"),
290
- url: z4.string().url(),
291
- seed: avatarSeedSchema
292
- }),
293
- z4.object({
294
- source: z4.literal("account"),
295
- provider: avatarProviderSchema,
296
- url: z4.string().url(),
297
- seed: avatarSeedSchema
298
- }),
299
- z4.object({ source: z4.literal("generated"), seed: avatarSeedSchema })
300
- ]);
301
- var profileSummarySchema = z4.object({
302
- id: identifier,
303
- name: z4.string(),
304
- avatar: profileAvatarSchema
305
- });
306
- var invisible = /[\p{Cc}؜᠎​-‏‪-‮⁠-⁤⁦-⁩]/u;
307
- var displayNameSchema = z4.string().max(200).transform((value) => value.normalize("NFC").replace(/\s+/g, " ").trim()).pipe(
308
- z4.string().min(1, "Enter a name").max(40, "Use at most 40 characters").refine((value) => !invisible.test(value), "Use visible characters only")
309
- );
310
- var profileUpdateSchema = z4.object({
311
- displayName: displayNameSchema.nullable().optional(),
312
- avatar: z4.discriminatedUnion("source", [
313
- z4.object({
314
- source: z4.literal("account"),
315
- provider: avatarProviderSchema
316
- }).strict(),
317
- z4.object({ source: z4.literal("generated") }).strict()
318
- ]).nullable().optional(),
319
- hidden: z4.boolean().optional()
320
- }).strict().refine(
321
- (value) => Object.values(value).some((field) => field !== void 0),
322
- "Change at least one field"
323
- );
324
- var ownProfileSchema = profileSummarySchema.extend({
325
- /** The name the member chose, or null for the default. */
326
- displayName: z4.string().nullable(),
327
- /** The avatar the member chose: `default` follows the project's defaults. */
328
- avatarChoice: z4.enum(["default", "upload", "account", "generated"]),
329
- /** The account of an `account` choice. */
330
- avatarProvider: avatarProviderSchema.nullable(),
331
- hidden: z4.boolean(),
332
- /** An operator locked the name and avatar; the member can still hide the profile. */
333
- locked: z4.boolean(),
334
- /** Who can see profiles in this project, so the app can explain it. */
335
- visibility: profileVisibilitySchema,
336
- /** The member's connected accounts a picture or name can come from. */
337
- options: z4.array(
338
- z4.object({
339
- provider: avatarProviderSchema,
340
- name: z4.string().nullable(),
341
- imageUrl: z4.string().url().nullable()
342
- })
343
- )
344
- });
345
- var cursor = z4.string().min(1).max(512);
346
- var profileCompletionQuerySchema = z4.object({
347
- limit: z4.coerce.number().int().min(1).max(100).default(20),
348
- cursor: cursor.optional()
349
- }).strict();
350
- var profileCompletionSchema = z4.object({
351
- quest: identifier,
352
- key: identifier.optional(),
353
- title: z4.string(),
354
- completions: count.positive(),
355
- /** Null for completions recorded before completion times were. */
356
- lastCompletedAt: count.nullable()
357
- });
358
- var profileCompletionPageSchema = z4.object({
359
- items: z4.array(profileCompletionSchema),
360
- nextCursor: cursor.nullable()
361
- });
362
- var profileReferralSchema = z4.object({
363
- program: identifier,
364
- key: identifier.optional(),
365
- title: z4.string(),
366
- /** Members this member invited. Invitations are shared by every program. */
367
- invited: count,
368
- /** Invited members who qualified in this program. */
369
- qualified: count,
370
- milestones: z4.array(
371
- z4.object({ id: identifier, count, reached: z4.boolean() })
372
- )
373
- });
374
- var profileSettingsSchema = z4.object({
375
- visibility: profileVisibilitySchema,
376
- defaults: profileDefaultsSchema,
377
- revision: count,
378
- actor: z4.string().nullable(),
379
- updatedAt: count.nullable()
380
- });
381
- var profileSettingsInputSchema = profileSettingsSchema.omit({ revision: true, actor: true, updatedAt: true }).extend({
382
- actionId: identifier,
383
- /** The revision the change was made against; a newer one is a 409. */
384
- expectedRevision: count,
385
- reason: z4.string().trim().min(1).max(500)
386
- }).strict();
387
- var profileModerationSchema = z4.object({
388
- actionId: identifier,
389
- resetName: z4.boolean().default(false),
390
- removeAvatar: z4.boolean().default(false),
391
- /** True locks the name and avatar, false unlocks them. */
392
- lock: z4.boolean().optional(),
393
- reason: z4.string().trim().min(1).max(1e3)
394
- }).strict().refine(
395
- (value) => value.resetName || value.removeAvatar || value.lock !== void 0,
396
- "Choose an action"
397
- );
398
- var managedProfileSchema = ownProfileSchema.omit({ options: true }).extend({
399
- member: identifier,
400
- lockedAt: count.nullable(),
401
- lockedBy: z4.string().nullable(),
402
- lockedReason: z4.string().nullable(),
403
- updatedAt: count
404
- });
405
- var AVATAR_UPLOAD_LIMIT = 5 * 1024 * 1024;
406
- var avatarUploadTypes = ["image/jpeg", "image/png", "image/webp"];
407
-
408
- // src/leaderboards.ts
409
- import * as z5 from "zod";
410
- var integer = z5.number().int().safe();
411
- var timestamp = integer.nonnegative().max(864e13);
412
- var leaderboardWindowSchema = z5.discriminatedUnion("kind", [
413
- z5.object({ kind: z5.literal("all-time") }).strict(),
414
- z5.object({ kind: z5.literal("fixed"), start: timestamp, end: timestamp }).strict().refine((w) => w.end > w.start, "Window end must follow its start"),
415
- z5.object({ kind: z5.literal("rolling"), days: integer.min(1).max(3660) }).strict(),
416
- // Not strict: boards published while a calendar window named its own `timeZone` keep reading,
417
- // and the field drops on parse. The authoring schema refuses it.
418
- z5.object({
419
- kind: z5.literal("calendar"),
420
- /** The current day, week (ISO, starting on Monday) or month of the project calendar. */
421
- period: calendarPeriodSchema.exclude(["lifetime"])
422
- })
423
- ]);
424
- var periodScore = {
425
- window: leaderboardWindowSchema.default({ kind: "all-time" }),
426
- quests: z5.array(identifier).min(1).max(100).optional()
427
- };
428
- var scoreSchema = z5.discriminatedUnion("kind", [
429
- z5.object({ kind: z5.literal("balance") }).strict(),
430
- z5.object({ kind: z5.literal("earned"), ...periodScore }).strict(),
431
- z5.object({
432
- kind: z5.literal("net"),
433
- window: leaderboardWindowSchema.default({ kind: "all-time" })
434
- }).strict()
435
- ]).default({ kind: "balance" });
436
- var leaderboardPrizeRewardSchema = z5.union([
437
- pointsRewardSchema,
438
- tierRewardSchema
439
- ]);
440
- var leaderboardPrizeSchema = z5.object({
441
- ranks: z5.tuple([integer.positive(), integer.positive()]).refine(([first, last]) => last >= first, {
442
- message: "Prize rank range must end at or after it starts"
443
- }),
444
- rewards: z5.array(leaderboardPrizeRewardSchema).min(1).max(20)
445
- }).strict();
446
- var leaderboardSettlementPolicySchema = z5.object({
447
- at: z5.literal("window-end"),
448
- ties: z5.enum(["shared", "earliest"]),
449
- prizes: z5.array(leaderboardPrizeSchema).min(1).max(50)
450
- }).strict().superRefine((policy, context) => {
451
- for (const [index, prize] of policy.prizes.entries()) {
452
- const keys = prize.rewards.map(rewardKey);
453
- if (new Set(keys).size !== keys.length) {
454
- context.addIssue({
455
- code: "custom",
456
- message: "A prize may grant each point ledger or tiered reward only once",
457
- path: ["prizes", index, "rewards"]
458
- });
459
- }
460
- }
461
- for (let index = 1; index < policy.prizes.length; index++) {
462
- const previous = policy.prizes[index - 1];
463
- const current = policy.prizes[index];
464
- if (current.ranks[0] <= previous.ranks[1]) {
465
- context.addIssue({
466
- code: "custom",
467
- message: "Prize rank ranges must be ordered and must not overlap",
468
- path: ["prizes", index, "ranks"]
469
- });
470
- }
471
- }
472
- });
473
- var leaderboardDefinitionObject = z5.object({
474
- id: identifier,
475
- key: identifier.optional(),
476
- title: z5.string().trim().min(1).max(120),
477
- balance: identifier,
478
- score: scoreSchema,
479
- access: z5.enum(["participants", "public"]).default("participants"),
480
- group: identifier.optional(),
481
- /**
482
- * List the project's eligible members who have no qualifying points, with a score of 0, ranked
483
- * after every member who scored and ordered by member ID. Omitted or false lists only members
484
- * with a qualifying entry. Settlements never include them.
485
- */
486
- includeUnscored: z5.boolean().optional(),
487
- settle: leaderboardSettlementPolicySchema.optional()
488
- }).strict();
489
- var validateSettlementWindow = (definition, context) => {
490
- if (definition.settle && (definition.score.kind === "balance" || !["fixed", "calendar"].includes(definition.score.window.kind))) {
491
- context.addIssue({
492
- code: "custom",
493
- message: "Leaderboard prizes require an earned or net score with a fixed or calendar window",
494
- path: ["settle"]
495
- });
496
- }
497
- };
498
- var leaderboardDefinitionSchema = leaderboardDefinitionObject.superRefine(validateSettlementWindow);
499
- var leaderboardDefinitionResponseSchema = responseShape(
500
- leaderboardDefinitionSchema
501
- );
502
- var leaderboardAuthoringSchema = leaderboardDefinitionObject.omit({ id: true }).extend({
503
- ...authoringIdentityShape,
504
- score: z5.preprocess(refuseWindowTimeZone, scoreSchema),
505
- group: identifier.optional()
506
- }).strict().superRefine(validateSettlementWindow);
507
- var leaderboardArtifactSchema = z5.union([
508
- leaderboardAuthoringSchema,
509
- z5.object({ code: z5.string().min(1).max(2e6) }).strict()
510
- ]);
511
- var publishedLeaderboardSchema = z5.object({
512
- archivedAt: z5.number().int().nonnegative().nullable().optional(),
513
- version: identifier,
514
- definition: leaderboardDefinitionResponseSchema,
515
- publishedAt: timestamp,
516
- actor: z5.string().nullable()
517
- });
518
- var leaderboardQuerySchema = z5.object({
519
- limit: z5.coerce.number().int().min(1).max(100).default(25),
520
- cursor: z5.string().max(4096).optional()
521
- }).strict();
522
- var leaderboardRowSchema = z5.object({
523
- /** The row's stable key: a pseudonym per board and member. */
524
- participant: identifier,
525
- member: identifier.optional(),
526
- /** The profile's name where the viewer can see it, otherwise the pseudonym's. */
527
- name: z5.string(),
528
- score: integer,
529
- rank: integer.positive(),
530
- /** The member's profile, where visible to this viewer and not hidden by the member. */
531
- profile: profileSummarySchema.nullable()
532
- });
533
- var leaderboardPageSchema = z5.object({
534
- leaderboard: identifier,
535
- title: z5.string(),
536
- version: identifier,
537
- calculation: z5.enum(["balance", "earned", "net"]),
538
- period: z5.object({ start: timestamp.nullable(), end: timestamp.nullable() }),
539
- calculatedAt: timestamp,
540
- lastEntryAt: timestamp.nullable(),
541
- total: integer.nonnegative(),
542
- items: z5.array(leaderboardRowSchema),
543
- me: leaderboardRowSchema.nullable(),
544
- nearby: z5.array(leaderboardRowSchema),
545
- nextCursor: z5.string().nullable()
546
- });
547
- var leaderboardPlacementSchema = z5.object({
548
- leaderboard: identifier,
549
- key: identifier.optional(),
550
- title: z5.string(),
551
- profile: identifier,
552
- rank: integer.positive().nullable(),
553
- score: integer.nullable(),
554
- /** Ranked participants on the board. */
555
- total: integer.nonnegative()
556
- });
557
- var leaderboardHistoryQuerySchema = z5.strictObject({
558
- board: identifier,
559
- cursor: pageCursorSchema.optional()
560
- });
561
- var leaderboardHistoryPageSchema = z5.object({
562
- leaderboard: identifier,
563
- period: z5.object({ start: timestamp.nullable(), end: timestamp.nullable() }),
564
- items: z5.array(pointEntrySchema),
565
- nextCursor: pageCursorSchema.nullable()
566
- });
567
- var leaderboardPreviewSchema = z5.object({
568
- published: publishedLeaderboardSchema,
569
- before: leaderboardPageSchema.nullable(),
570
- after: leaderboardPageSchema
571
- });
572
- var mutationBase = {
573
- actionId: identifier,
574
- member: identifier,
575
- balance: identifier,
576
- reason: z5.string().trim().min(1).max(1e3)
577
- };
578
- var datedMutation = { ...mutationBase, effectiveAt: timestamp.optional() };
579
- var pointsMutationSchema = z5.discriminatedUnion("kind", [
580
- z5.object({
581
- ...datedMutation,
582
- kind: z5.literal("award"),
583
- referralEligible: z5.boolean().optional(),
584
- amount: integer.positive()
585
- }).strict(),
586
- z5.object({
587
- ...datedMutation,
588
- kind: z5.literal("spend"),
589
- amount: integer.positive()
590
- }).strict(),
591
- z5.object({
592
- ...datedMutation,
593
- kind: z5.literal("adjust"),
594
- amount: integer.refine((n) => n !== 0)
595
- }).strict(),
596
- z5.object({
597
- ...datedMutation,
598
- kind: z5.literal("set"),
599
- total: integer.nonnegative(),
600
- expectedTotal: integer.nonnegative(),
601
- classification: z5.enum(["earned", "spend"])
602
- }).strict(),
603
- z5.object({
604
- ...mutationBase,
605
- kind: z5.literal("reverse"),
606
- entry: identifier,
607
- amount: integer.positive()
608
- }).strict()
609
- ]);
610
- var pointsEntrySchema = z5.object({
611
- id: identifier,
612
- completion: z5.string().nullable(),
613
- member: identifier,
614
- balance: identifier,
615
- amount: integer,
616
- kind: z5.enum(["award", "spend", "adjust", "reverse"]),
617
- effectiveAt: timestamp,
618
- receivedAt: timestamp,
619
- quest: identifier.nullable(),
620
- original: identifier.nullable(),
621
- reason: z5.string(),
622
- actor: z5.string().nullable(),
623
- /**
624
- * The member import whose opening balance this `adjust` is, or null. Imported entries emit no
625
- * `points.awarded` and count on balance leaderboards only. Absent from Relay versions without
626
- * imports.
627
- */
628
- import: identifier.nullable().optional()
629
- });
630
- var managedPointHistoryPageSchema = z5.object({
631
- items: z5.array(pointsEntrySchema),
632
- nextCursor: pageCursorSchema.nullable(),
633
- /** @deprecated Use `nextCursor`, passed back as `cursor`. Removed in 2.0.0. */
634
- next: z5.number().nullable()
635
- });
636
- var pointsResultSchema = z5.object({
637
- entry: pointsEntrySchema,
638
- total: integer.nonnegative()
639
- });
640
- var pointsAccountSchema = z5.object({
641
- member: identifier,
642
- balance: identifier,
643
- total: integer.nonnegative(),
644
- held: integer.nonnegative()
645
- });
646
- var leaderboardExclusionSchema = z5.object({
647
- actionId: identifier,
648
- member: identifier,
649
- excluded: z5.boolean(),
650
- reason: z5.string().trim().min(1).max(1e3)
651
- }).strict();
652
- var leaderboardExclusionGroupSchema = z5.object({
653
- leaderboard: identifier,
654
- group: identifier,
655
- generated: z5.boolean(),
656
- boundAt: timestamp.nullable()
657
- });
658
- var leaderboardExclusionGroupBindingSchema = z5.object({
659
- actionId: identifier,
660
- group: identifier,
661
- reason: z5.string().trim().min(1).max(1e3)
662
- }).strict();
663
- var leaderboardGroupSchema = z5.object({
664
- actionId: identifier,
665
- member: identifier,
666
- included: z5.boolean(),
667
- reason: z5.string().trim().min(1).max(1e3)
668
- }).strict();
669
- var leaderboardSettlementStatusSchema = z5.enum(["pending", "approved"]);
670
- var leaderboardSettlementSummarySchema = z5.object({
671
- id: identifier,
672
- leaderboard: identifier,
673
- version: identifier,
674
- title: z5.string(),
675
- period: z5.object({ start: timestamp, end: timestamp }),
676
- ties: z5.enum(["shared", "earliest"]),
677
- status: leaderboardSettlementStatusSchema,
678
- total: integer.nonnegative(),
679
- winners: integer.nonnegative(),
680
- createdAt: timestamp,
681
- approvedAt: timestamp.nullable(),
682
- approvedBy: z5.string().nullable(),
683
- approvalReason: z5.string().nullable()
684
- });
685
- var leaderboardSettlementRowSchema = z5.object({
686
- member: identifier,
687
- score: integer,
688
- rank: integer.positive(),
689
- position: integer.positive(),
690
- scoredAt: timestamp,
691
- prizes: z5.array(integer.nonnegative()),
692
- completion: identifier.nullable(),
693
- revokedAt: timestamp.nullable()
694
- });
695
- var leaderboardSettlementSchema = leaderboardSettlementSummarySchema.extend({
696
- prizes: z5.array(leaderboardPrizeSchema),
697
- excluded: z5.array(identifier),
698
- rows: z5.array(leaderboardSettlementRowSchema)
699
- });
700
- var leaderboardSettlementApprovalSchema = z5.object({
701
- actionId: identifier,
702
- reason: z5.string().trim().min(1).max(500)
703
- }).strict();
704
-
705
- // src/referrals.ts
706
- import * as z6 from "zod";
707
- var rewardSchema = z6.union([pointsRewardSchema, tierRewardSchema]);
708
- var amount2 = z6.number().int().safe().nonnegative();
709
- var reason = z6.string().trim().min(1).max(1e3);
710
- var referralDefinitionSchema = z6.object({
711
- id: identifier,
712
- key: identifier.optional(),
713
- title: z6.string().trim().min(1).max(120),
714
- enabled: z6.boolean().default(true),
715
- qualification: z6.discriminatedUnion("kind", [
716
- z6.object({ kind: z6.literal("signup") }).strict(),
717
- z6.object({ kind: z6.literal("quest"), quest: identifier }).strict(),
718
- z6.object({ kind: z6.literal("external") }).strict()
719
- ]),
720
- inviterGroup: identifier.optional(),
721
- rewards: z6.object({
722
- inviter: z6.array(rewardSchema).max(10).default([]),
723
- invitee: z6.array(rewardSchema).max(10).default([])
724
- }).strict().default({ inviter: [], invitee: [] }),
725
- milestones: z6.array(
726
- z6.object({
727
- id: identifier,
728
- count: amount2.min(1),
729
- rewards: z6.array(rewardSchema).min(1).max(10)
730
- }).strict()
731
- ).max(30).default([]),
732
- bonuses: z6.array(
733
- z6.object({
734
- id: identifier,
735
- balance: identifier,
736
- basisPoints: amount2.min(1).max(1e4),
737
- quests: z6.array(identifier).min(1).max(100).optional(),
738
- external: z6.boolean().default(false),
739
- durationDays: amount2.min(1).max(36500).optional(),
740
- maxPoints: amount2.min(1).optional()
741
- }).strict()
742
- ).max(20).default([])
743
- }).strict().superRefine((value, ctx) => {
744
- for (const entries of [value.milestones, value.bonuses]) {
745
- if (new Set(entries.map((e) => e.id)).size !== entries.length) {
746
- ctx.addIssue({ code: "custom", message: "Rule IDs must be unique" });
747
- }
748
- }
749
- });
750
- var referralAuthoringSchema = z6.object(referralDefinitionSchema.shape).omit({ id: true }).extend({
751
- ...authoringIdentityShape,
752
- inviterGroup: identifier.optional()
753
- }).strict().superRefine((value, ctx) => {
754
- for (const entries of [value.milestones, value.bonuses]) {
755
- if (new Set(entries.map((entry) => entry.id)).size !== entries.length) {
756
- ctx.addIssue({ code: "custom", message: "Rule keys must be unique" });
757
- }
758
- }
759
- });
760
- var referralArtifactSchema = z6.union([
761
- referralAuthoringSchema,
762
- z6.object({ code: z6.string().min(1).max(2e6) }).strict()
763
- ]);
764
- var publishedReferralSchema = z6.object({
765
- archivedAt: z6.number().int().nonnegative().nullable().optional(),
766
- version: identifier,
767
- definition: referralDefinitionSchema,
768
- publishedAt: amount2,
769
- actor: z6.string().nullable()
770
- });
771
- var referralAcceptSchema = z6.object({ actionId: identifier, code: identifier }).strict();
772
- var referralSuspensionSchema = z6.object({ actionId: identifier, suspended: z6.boolean(), reason }).strict();
773
- var referralQualificationSchema = z6.object({ actionId: identifier, qualified: z6.boolean(), reason }).strict();
774
- var referralRewardResolutionSchema = z6.object({ actionId: identifier, reason }).strict();
775
- var referralControlSchema = z6.discriminatedUnion("kind", [
776
- z6.object({
777
- kind: z6.literal("suspend"),
778
- actionId: identifier,
779
- member: identifier,
780
- suspended: z6.boolean(),
781
- reason
782
- }).strict(),
783
- z6.object({
784
- kind: z6.literal("qualify"),
785
- actionId: identifier,
786
- member: identifier,
787
- program: identifier,
788
- qualified: z6.boolean(),
789
- reason
790
- }).strict(),
791
- z6.object({
792
- kind: z6.literal("resolve-reward"),
793
- actionId: identifier,
794
- entitlement: identifier,
795
- reason
796
- }).strict()
797
- ]);
798
- var referralRelationshipSchema = z6.object({
799
- member: identifier,
800
- inviter: identifier,
801
- acceptedAt: amount2,
802
- suspended: z6.boolean()
803
- });
804
- var referralAccountSchema = z6.object({
805
- id: identifier,
806
- program: identifier,
807
- kind: z6.enum(["bonus", "fixed", "milestone"]),
808
- balance: identifier,
809
- earned: amount2,
810
- settled: amount2,
811
- outstanding: amount2
812
- });
813
- var referralSummarySchema = z6.object({
814
- code: identifier,
815
- attributed: amount2,
816
- programs: z6.array(
817
- z6.object({
818
- definition: referralDefinitionSchema,
819
- qualified: amount2,
820
- milestones: z6.array(
821
- z6.object({ id: identifier, count: amount2, reached: z6.boolean() })
822
- )
823
- })
824
- ),
825
- accounts: z6.array(referralAccountSchema)
826
- });
827
- var referralHistorySchema = z6.object({
828
- items: z6.array(
829
- z6.object({
830
- id: amount2,
831
- program: identifier,
832
- balance: identifier,
833
- amount: z6.number().int().safe(),
834
- at: amount2,
835
- reason: z6.string()
836
- })
837
- ),
838
- nextCursor: pageCursorSchema.nullable()
839
- });
840
- var referralManagementSchema = z6.object({
841
- relationships: z6.array(referralRelationshipSchema),
842
- qualifications: z6.array(
843
- z6.object({
844
- member: identifier,
845
- program: identifier,
846
- qualified: z6.boolean(),
847
- qualifiedAt: amount2
848
- })
849
- ),
850
- accounts: z6.array(
851
- referralAccountSchema.extend({ member: identifier, invitee: z6.string() })
852
- ),
853
- reviews: z6.array(
854
- z6.object({
855
- entitlement: identifier,
856
- member: identifier,
857
- program: identifier,
858
- reason: z6.string()
859
- })
860
- ),
861
- nextCursor: pageCursorSchema.nullable().default(null),
862
- /** @deprecated Use `nextCursor`, passed back as `cursor`. Removed in 2.0.0. */
863
- next: amount2.nullable()
864
- });
865
-
866
- // src/offers.ts
867
- import * as z7 from "zod";
868
- var quantity = z7.number().int().safe().nonnegative();
869
- var offerPriceSchema = pointsRewardSchema.extend({
870
- amount: z7.number().int().positive().max(maxPointsAmount)
871
- });
872
- var offerLimitSchema = z7.object({ perMember: z7.number().int().positive().max(1e4) }).strict();
873
- var offerDefinitionSchema = z7.object({
874
- id: identifier,
875
- key: identifier.optional(),
876
- title: z7.string().trim().min(1).max(120),
877
- price: offerPriceSchema,
878
- reward: tierRewardSchema,
879
- stock: quantity.max(1e6),
880
- limit: offerLimitSchema.default({ perMember: 1 }),
881
- enabled: z7.boolean().default(true)
882
- }).strict();
883
- var offerAuthoringSchema = offerDefinitionSchema.omit({ id: true, title: true, enabled: true }).extend({
884
- ...authoringIdentityShape,
885
- title: z7.string().trim().min(1).max(120).optional()
886
- }).strict().transform((offer) => ({
887
- ...offer,
888
- title: offer.title ?? offer.reward.reward.title,
889
- enabled: true
890
- }));
891
- var offerArtifactSchema = z7.union([
892
- offerAuthoringSchema,
893
- z7.object({ code: z7.string().min(1).max(2e6) }).strict()
894
- ]);
895
- var offerAvailabilitySchema = responseShape(
896
- z7.discriminatedUnion("kind", [
897
- z7.object({ kind: z7.literal("available"), remaining: quantity }).strict(),
898
- z7.object({ kind: z7.literal("out-of-stock") }).strict(),
899
- z7.object({ kind: z7.literal("limit-reached") }).strict(),
900
- z7.object({ kind: z7.literal("paused") }).strict()
901
- ])
902
- );
903
- var offerSchema = responseShape(
904
- offerDefinitionSchema.extend({
905
- revision: z7.number().int().positive(),
906
- available: quantity,
907
- redeemed: quantity,
908
- availability: offerAvailabilitySchema
909
- })
910
- );
911
- var redeemOfferSchema = z7.object({ actionId: identifier }).strict();
912
- var redemptionBase = {
913
- id: identifier,
914
- offer: identifier,
915
- member: identifier,
916
- /**
917
- * @deprecated Use `id` to refer to a redemption. A redemption is fulfilled in the request that
918
- * makes it, so nothing is reserved beforehand; the ID refers to no other record. Removed in
919
- * 2.0.0.
920
- */
921
- reservation: identifier,
922
- price: offerPriceSchema,
923
- reward: tierRewardSchema,
924
- entitlement: identifier,
925
- revision: z7.number().int().positive(),
926
- redeemedAt: z7.number().int().safe().nonnegative()
927
- };
928
- var redemptionSchema = responseShape(
929
- z7.discriminatedUnion("status", [
930
- z7.object({ ...redemptionBase, status: z7.literal("fulfilled") }).strict(),
931
- z7.object({
932
- ...redemptionBase,
933
- status: z7.literal("canceled"),
934
- canceledAt: z7.number().int().safe().nonnegative(),
935
- reason: z7.string().min(1).max(500)
936
- }).strict()
937
- ])
938
- );
939
- var redemptionQuerySchema = z7.strictObject({
940
- member: identifier.optional(),
941
- cursor: pageCursorSchema.optional(),
942
- limit: z7.coerce.number().int().min(1).max(100).optional()
943
- });
944
- var redemptionPageSchema = z7.object({
945
- items: z7.array(redemptionSchema),
946
- nextCursor: pageCursorSchema.nullable()
947
- });
948
- var offerControlSchema = z7.object({
949
- actionId: identifier,
950
- revision: z7.number().int().positive(),
951
- enabled: z7.boolean(),
952
- reason: z7.string().trim().min(1).max(500)
953
- }).strict();
954
- var redemptionCancellationSchema = z7.object({
955
- actionId: identifier,
956
- revision: z7.number().int().positive(),
957
- reason: z7.string().trim().min(1).max(500)
958
- }).strict();
959
- function defineOffer(input) {
960
- return resourceHandle("offer", offerAuthoringSchema.parse(input));
961
- }
962
-
963
- export {
964
- badgePropertiesSchema,
965
- badgeDeclarationSchema,
966
- badgeSchema,
967
- managedBadgeSchema,
968
- createBadgeSchema,
969
- badgeArtifactSchema,
970
- memberBadgeSchema,
971
- memberBadgesSchema,
972
- badgeMutationSchema,
973
- badgeMutationResultSchema,
974
- pointLedgerPropertiesSchema,
975
- createPointLedgerSchema,
976
- pointLedgerSchema,
977
- managedPointLedgerSchema,
978
- pointLedgerDeclarationSchema,
979
- pointLedgerArtifactSchema,
980
- pointLedgerReferenceSchema,
981
- pointBalanceSchema,
982
- pointBalancesSchema,
983
- PointEntryKind,
984
- pointEntrySchema,
985
- pointHistoryQuerySchema,
986
- pointHistoryPageSchema,
987
- engagementBudgetSchema,
988
- engagementDefinitionSchema,
989
- engagementScoreInputSchema,
990
- engagementScoreSchema,
991
- engagementPublishSchema,
992
- engagementRuleSchema,
993
- engagementPageQuerySchema,
994
- engagementSettlementSchema,
995
- engagementPageSchema,
996
- engagementChangePreviewInputSchema,
997
- engagementChangeSchema,
998
- engagementChangePreviewSchema,
999
- engagementRuleVersionPageSchema,
1000
- engagementVersionPageSchema,
1001
- engagementVersionQuerySchema,
1002
- engagementBoundaryPageSchema,
1003
- engagementArtifactSchema,
1004
- engagementDeploymentEntrySchema,
1005
- profileVisibilitySchema,
1006
- avatarProviderSchema,
1007
- profileDefaultProviderSchema,
1008
- profileDefaultsSchema,
1009
- avatarSeedSchema,
1010
- profileAvatarSchema,
1011
- profileSummarySchema,
1012
- displayNameSchema,
1013
- profileUpdateSchema,
1014
- ownProfileSchema,
1015
- profileCompletionQuerySchema,
1016
- profileCompletionSchema,
1017
- profileCompletionPageSchema,
1018
- profileReferralSchema,
1019
- profileSettingsSchema,
1020
- profileSettingsInputSchema,
1021
- profileModerationSchema,
1022
- managedProfileSchema,
1023
- AVATAR_UPLOAD_LIMIT,
1024
- avatarUploadTypes,
1025
- leaderboardWindowSchema,
1026
- leaderboardPrizeRewardSchema,
1027
- leaderboardPrizeSchema,
1028
- leaderboardSettlementPolicySchema,
1029
- leaderboardDefinitionSchema,
1030
- leaderboardDefinitionResponseSchema,
1031
- leaderboardAuthoringSchema,
1032
- leaderboardArtifactSchema,
1033
- publishedLeaderboardSchema,
1034
- leaderboardQuerySchema,
1035
- leaderboardRowSchema,
1036
- leaderboardPageSchema,
1037
- leaderboardPlacementSchema,
1038
- leaderboardHistoryQuerySchema,
1039
- leaderboardHistoryPageSchema,
1040
- leaderboardPreviewSchema,
1041
- pointsMutationSchema,
1042
- pointsEntrySchema,
1043
- managedPointHistoryPageSchema,
1044
- pointsResultSchema,
1045
- pointsAccountSchema,
1046
- leaderboardExclusionSchema,
1047
- leaderboardExclusionGroupSchema,
1048
- leaderboardExclusionGroupBindingSchema,
1049
- leaderboardGroupSchema,
1050
- leaderboardSettlementStatusSchema,
1051
- leaderboardSettlementSummarySchema,
1052
- leaderboardSettlementRowSchema,
1053
- leaderboardSettlementSchema,
1054
- leaderboardSettlementApprovalSchema,
1055
- referralDefinitionSchema,
1056
- referralAuthoringSchema,
1057
- referralArtifactSchema,
1058
- publishedReferralSchema,
1059
- referralAcceptSchema,
1060
- referralSuspensionSchema,
1061
- referralQualificationSchema,
1062
- referralRewardResolutionSchema,
1063
- referralControlSchema,
1064
- referralRelationshipSchema,
1065
- referralAccountSchema,
1066
- referralSummarySchema,
1067
- referralHistorySchema,
1068
- referralManagementSchema,
1069
- offerPriceSchema,
1070
- offerLimitSchema,
1071
- offerDefinitionSchema,
1072
- offerAuthoringSchema,
1073
- offerArtifactSchema,
1074
- offerAvailabilitySchema,
1075
- offerSchema,
1076
- redeemOfferSchema,
1077
- redemptionSchema,
1078
- redemptionQuerySchema,
1079
- redemptionPageSchema,
1080
- offerControlSchema,
1081
- redemptionCancellationSchema,
1082
- defineOffer
1083
- };