@moonbase.sh/storefront-api 3.12.0 → 3.13.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.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ZodTypeAny, z } from 'zod';
1
+ import { z, ZodTypeAny } from 'zod';
2
2
 
3
3
  interface ILogger {
4
4
  debug: (message?: any, ...optionalParams: any[]) => void;
@@ -149,1414 +149,260 @@ declare class TokenStore implements ITokenStore {
149
149
  private warnAboutStorage;
150
150
  }
151
151
 
152
- type HttpMethods = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
153
- interface Response<T> {
154
- data: T;
155
- headers: Record<string, string>;
156
- status: number;
157
- }
158
- interface FetchOptions {
159
- method?: HttpMethods;
160
- body?: any;
161
- contentType?: string;
162
- abort?: AbortSignal;
163
- /** Sent alongside the client's own, such as a solved captcha. */
164
- headers?: Record<string, string>;
165
- }
166
- declare function objectToQuery(obj?: Record<string, string | number | boolean | Date>): string;
167
- declare class MoonbaseApi {
168
- baseUrl: string;
169
- private tokenStore;
170
- private logger;
171
- /**
172
- * The `x-mb-client` header this client sends with every request.
173
- *
174
- * @internal
175
- */
176
- readonly clientHeader: string;
177
- constructor(baseUrl: string, tokenStore: ITokenStore, logger: ILogger, sdk?: string);
178
- authenticatedFetch<T extends ZodTypeAny>(path: string, schema: T | null, options?: FetchOptions): Promise<Response<z.infer<T>>>;
179
- fetch<T extends ZodTypeAny>(path: string, schema: T | null, options?: FetchOptions): Promise<Response<z.infer<T>>>;
180
- private reportParsingProblem;
181
- private reportRequestProblem;
182
- }
183
-
184
- declare const activationRequestSchema: z.ZodObject<{
152
+ declare const moneySchema: z.ZodObject<{
153
+ currency: z.ZodString;
154
+ amount: z.ZodNumber;
155
+ }, "strip", z.ZodTypeAny, {
156
+ currency: string;
157
+ amount: number;
158
+ }, {
159
+ currency: string;
160
+ amount: number;
161
+ }>;
162
+ declare const discountSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
163
+ promotionId: z.ZodOptional<z.ZodString>;
164
+ validFrom: z.ZodOptional<z.ZodString>;
165
+ validUntil: z.ZodOptional<z.ZodString>;
166
+ type: z.ZodLiteral<"PercentageOffDiscount">;
167
+ name: z.ZodString;
168
+ description: z.ZodOptional<z.ZodString>;
169
+ percentage: z.ZodNumber;
170
+ total: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
171
+ isExclusive: z.ZodBoolean;
172
+ recurringPaymentUseCount: z.ZodOptional<z.ZodNumber>;
173
+ }, "strip", z.ZodTypeAny, {
174
+ name: string;
175
+ type: "PercentageOffDiscount";
176
+ percentage: number;
177
+ isExclusive: boolean;
178
+ description?: string | undefined;
179
+ total?: Record<string, number> | undefined;
180
+ recurringPaymentUseCount?: number | undefined;
181
+ promotionId?: string | undefined;
182
+ validFrom?: string | undefined;
183
+ validUntil?: string | undefined;
184
+ }, {
185
+ name: string;
186
+ type: "PercentageOffDiscount";
187
+ percentage: number;
188
+ isExclusive: boolean;
189
+ description?: string | undefined;
190
+ total?: Record<string, number> | undefined;
191
+ recurringPaymentUseCount?: number | undefined;
192
+ promotionId?: string | undefined;
193
+ validFrom?: string | undefined;
194
+ validUntil?: string | undefined;
195
+ }>, z.ZodObject<{
196
+ promotionId: z.ZodOptional<z.ZodString>;
197
+ validFrom: z.ZodOptional<z.ZodString>;
198
+ validUntil: z.ZodOptional<z.ZodString>;
199
+ type: z.ZodLiteral<"FlatAmountOffDiscount">;
200
+ name: z.ZodString;
201
+ description: z.ZodOptional<z.ZodString>;
202
+ total: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
203
+ isExclusive: z.ZodBoolean;
204
+ recurringPaymentUseCount: z.ZodOptional<z.ZodNumber>;
205
+ }, "strip", z.ZodTypeAny, {
206
+ name: string;
207
+ type: "FlatAmountOffDiscount";
208
+ isExclusive: boolean;
209
+ description?: string | undefined;
210
+ total?: Record<string, number> | undefined;
211
+ recurringPaymentUseCount?: number | undefined;
212
+ promotionId?: string | undefined;
213
+ validFrom?: string | undefined;
214
+ validUntil?: string | undefined;
215
+ }, {
216
+ name: string;
217
+ type: "FlatAmountOffDiscount";
218
+ isExclusive: boolean;
219
+ description?: string | undefined;
220
+ total?: Record<string, number> | undefined;
221
+ recurringPaymentUseCount?: number | undefined;
222
+ promotionId?: string | undefined;
223
+ validFrom?: string | undefined;
224
+ validUntil?: string | undefined;
225
+ }>]>;
226
+ declare const recurrenceSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
227
+ type: z.ZodLiteral<"OneOff">;
228
+ }, "strip", z.ZodTypeAny, {
229
+ type: "OneOff";
230
+ }, {
231
+ type: "OneOff";
232
+ }>, z.ZodObject<{
233
+ type: z.ZodLiteral<"Recurring">;
234
+ cycleLength: z.ZodNativeEnum<typeof CycleLength>;
235
+ }, "strip", z.ZodTypeAny, {
236
+ type: "Recurring";
237
+ cycleLength: CycleLength;
238
+ }, {
239
+ type: "Recurring";
240
+ cycleLength: CycleLength;
241
+ }>]>;
242
+ declare const pricingTierSchema: z.ZodObject<{
243
+ minQuantity: z.ZodNumber;
244
+ originalPrice: z.ZodRecord<z.ZodString, z.ZodNumber>;
245
+ price: z.ZodRecord<z.ZodString, z.ZodNumber>;
246
+ }, "strip", z.ZodTypeAny, {
247
+ minQuantity: number;
248
+ originalPrice: Record<string, number>;
249
+ price: Record<string, number>;
250
+ }, {
251
+ minQuantity: number;
252
+ originalPrice: Record<string, number>;
253
+ price: Record<string, number>;
254
+ }>;
255
+ declare const pricingVariationSchema: z.ZodObject<{
185
256
  id: z.ZodString;
186
- status: z.ZodNativeEnum<typeof ActivationRequestStatus>;
187
- product: z.ZodObject<{
188
- id: z.ZodString;
257
+ name: z.ZodString;
258
+ originalPrice: z.ZodRecord<z.ZodString, z.ZodNumber>;
259
+ price: z.ZodRecord<z.ZodString, z.ZodNumber>;
260
+ hasDiscount: z.ZodBoolean;
261
+ discount: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
262
+ promotionId: z.ZodOptional<z.ZodString>;
263
+ validFrom: z.ZodOptional<z.ZodString>;
264
+ validUntil: z.ZodOptional<z.ZodString>;
265
+ type: z.ZodLiteral<"PercentageOffDiscount">;
189
266
  name: z.ZodString;
190
- tagline: z.ZodOptional<z.ZodNullable<z.ZodString>>;
191
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
192
- iconUrl: z.ZodNullable<z.ZodString>;
193
- website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
194
- owned: z.ZodBoolean;
195
- currentVersion: z.ZodOptional<z.ZodString>;
196
- downloads: z.ZodOptional<z.ZodArray<z.ZodObject<{
197
- name: z.ZodString;
198
- key: z.ZodString;
199
- platform: z.ZodNativeEnum<typeof Platform>;
200
- arch: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof Architecture>>>;
201
- size: z.ZodNumber;
202
- path: z.ZodNullable<z.ZodString>;
203
- manifest: z.ZodOptional<z.ZodObject<{
204
- files: z.ZodArray<z.ZodObject<{
205
- name: z.ZodString;
206
- path: z.ZodString;
207
- }, "strip", z.ZodTypeAny, {
208
- name: string;
209
- path: string;
210
- }, {
211
- name: string;
212
- path: string;
213
- }>, "many">;
214
- licensePath: z.ZodNullable<z.ZodString>;
215
- }, "strip", z.ZodTypeAny, {
216
- files: {
217
- name: string;
218
- path: string;
219
- }[];
220
- licensePath: string | null;
221
- }, {
222
- files: {
223
- name: string;
224
- path: string;
225
- }[];
226
- licensePath: string | null;
227
- }>>;
228
- }, "strip", z.ZodTypeAny, {
229
- name: string;
230
- path: string | null;
231
- key: string;
232
- platform: Platform;
233
- size: number;
234
- arch?: Architecture | null | undefined;
235
- manifest?: {
236
- files: {
237
- name: string;
238
- path: string;
239
- }[];
240
- licensePath: string | null;
241
- } | undefined;
242
- }, {
243
- name: string;
244
- path: string | null;
245
- key: string;
246
- platform: Platform;
247
- size: number;
248
- arch?: Architecture | null | undefined;
249
- manifest?: {
250
- files: {
251
- name: string;
252
- path: string;
253
- }[];
254
- licensePath: string | null;
255
- } | undefined;
256
- }>, "many">>;
257
- defaultVariation: z.ZodOptional<z.ZodObject<{
258
- id: z.ZodString;
259
- name: z.ZodString;
260
- originalPrice: z.ZodRecord<z.ZodString, z.ZodNumber>;
261
- price: z.ZodRecord<z.ZodString, z.ZodNumber>;
262
- hasDiscount: z.ZodBoolean;
263
- discount: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
264
- promotionId: z.ZodOptional<z.ZodString>;
265
- validFrom: z.ZodOptional<z.ZodString>;
266
- validUntil: z.ZodOptional<z.ZodString>;
267
- type: z.ZodLiteral<"PercentageOffDiscount">;
268
- name: z.ZodString;
269
- description: z.ZodOptional<z.ZodString>;
270
- percentage: z.ZodNumber;
271
- total: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
272
- isExclusive: z.ZodBoolean;
273
- recurringPaymentUseCount: z.ZodOptional<z.ZodNumber>;
274
- }, "strip", z.ZodTypeAny, {
275
- name: string;
276
- type: "PercentageOffDiscount";
277
- percentage: number;
278
- isExclusive: boolean;
279
- description?: string | undefined;
280
- total?: Record<string, number> | undefined;
281
- recurringPaymentUseCount?: number | undefined;
282
- promotionId?: string | undefined;
283
- validFrom?: string | undefined;
284
- validUntil?: string | undefined;
285
- }, {
286
- name: string;
287
- type: "PercentageOffDiscount";
288
- percentage: number;
289
- isExclusive: boolean;
290
- description?: string | undefined;
291
- total?: Record<string, number> | undefined;
292
- recurringPaymentUseCount?: number | undefined;
293
- promotionId?: string | undefined;
294
- validFrom?: string | undefined;
295
- validUntil?: string | undefined;
296
- }>, z.ZodObject<{
297
- promotionId: z.ZodOptional<z.ZodString>;
298
- validFrom: z.ZodOptional<z.ZodString>;
299
- validUntil: z.ZodOptional<z.ZodString>;
300
- type: z.ZodLiteral<"FlatAmountOffDiscount">;
301
- name: z.ZodString;
302
- description: z.ZodOptional<z.ZodString>;
303
- total: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
304
- isExclusive: z.ZodBoolean;
305
- recurringPaymentUseCount: z.ZodOptional<z.ZodNumber>;
306
- }, "strip", z.ZodTypeAny, {
307
- name: string;
308
- type: "FlatAmountOffDiscount";
309
- isExclusive: boolean;
310
- description?: string | undefined;
311
- total?: Record<string, number> | undefined;
312
- recurringPaymentUseCount?: number | undefined;
313
- promotionId?: string | undefined;
314
- validFrom?: string | undefined;
315
- validUntil?: string | undefined;
316
- }, {
317
- name: string;
318
- type: "FlatAmountOffDiscount";
319
- isExclusive: boolean;
320
- description?: string | undefined;
321
- total?: Record<string, number> | undefined;
322
- recurringPaymentUseCount?: number | undefined;
323
- promotionId?: string | undefined;
324
- validFrom?: string | undefined;
325
- validUntil?: string | undefined;
326
- }>]>>;
327
- recurrence: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
328
- type: z.ZodLiteral<"OneOff">;
329
- }, "strip", z.ZodTypeAny, {
330
- type: "OneOff";
331
- }, {
332
- type: "OneOff";
333
- }>, z.ZodObject<{
334
- type: z.ZodLiteral<"Recurring">;
335
- cycleLength: z.ZodNativeEnum<typeof CycleLength>;
336
- }, "strip", z.ZodTypeAny, {
337
- type: "Recurring";
338
- cycleLength: CycleLength;
339
- }, {
340
- type: "Recurring";
341
- cycleLength: CycleLength;
342
- }>]>;
343
- pricingTiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
344
- minQuantity: z.ZodNumber;
345
- originalPrice: z.ZodRecord<z.ZodString, z.ZodNumber>;
346
- price: z.ZodRecord<z.ZodString, z.ZodNumber>;
347
- }, "strip", z.ZodTypeAny, {
348
- minQuantity: number;
349
- originalPrice: Record<string, number>;
350
- price: Record<string, number>;
351
- }, {
352
- minQuantity: number;
353
- originalPrice: Record<string, number>;
354
- price: Record<string, number>;
355
- }>, "many">>>;
356
- }, "strip", z.ZodTypeAny, {
357
- id: string;
358
- name: string;
359
- originalPrice: Record<string, number>;
360
- price: Record<string, number>;
361
- hasDiscount: boolean;
362
- recurrence: {
363
- type: "OneOff";
364
- } | {
365
- type: "Recurring";
366
- cycleLength: CycleLength;
367
- };
368
- discount?: {
369
- name: string;
370
- type: "PercentageOffDiscount";
371
- percentage: number;
372
- isExclusive: boolean;
373
- description?: string | undefined;
374
- total?: Record<string, number> | undefined;
375
- recurringPaymentUseCount?: number | undefined;
376
- promotionId?: string | undefined;
377
- validFrom?: string | undefined;
378
- validUntil?: string | undefined;
379
- } | {
380
- name: string;
381
- type: "FlatAmountOffDiscount";
382
- isExclusive: boolean;
383
- description?: string | undefined;
384
- total?: Record<string, number> | undefined;
385
- recurringPaymentUseCount?: number | undefined;
386
- promotionId?: string | undefined;
387
- validFrom?: string | undefined;
388
- validUntil?: string | undefined;
389
- } | undefined;
390
- pricingTiers?: {
391
- minQuantity: number;
392
- originalPrice: Record<string, number>;
393
- price: Record<string, number>;
394
- }[] | null | undefined;
395
- }, {
396
- id: string;
397
- name: string;
398
- originalPrice: Record<string, number>;
399
- price: Record<string, number>;
400
- hasDiscount: boolean;
401
- recurrence: {
402
- type: "OneOff";
403
- } | {
404
- type: "Recurring";
405
- cycleLength: CycleLength;
406
- };
407
- discount?: {
408
- name: string;
409
- type: "PercentageOffDiscount";
410
- percentage: number;
411
- isExclusive: boolean;
412
- description?: string | undefined;
413
- total?: Record<string, number> | undefined;
414
- recurringPaymentUseCount?: number | undefined;
415
- promotionId?: string | undefined;
416
- validFrom?: string | undefined;
417
- validUntil?: string | undefined;
418
- } | {
419
- name: string;
420
- type: "FlatAmountOffDiscount";
421
- isExclusive: boolean;
422
- description?: string | undefined;
423
- total?: Record<string, number> | undefined;
424
- recurringPaymentUseCount?: number | undefined;
425
- promotionId?: string | undefined;
426
- validFrom?: string | undefined;
427
- validUntil?: string | undefined;
428
- } | undefined;
429
- pricingTiers?: {
430
- minQuantity: number;
431
- originalPrice: Record<string, number>;
432
- price: Record<string, number>;
433
- }[] | null | undefined;
434
- }>>;
435
- variations: z.ZodOptional<z.ZodArray<z.ZodObject<{
436
- id: z.ZodString;
437
- name: z.ZodString;
438
- originalPrice: z.ZodRecord<z.ZodString, z.ZodNumber>;
439
- price: z.ZodRecord<z.ZodString, z.ZodNumber>;
440
- hasDiscount: z.ZodBoolean;
441
- discount: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
442
- promotionId: z.ZodOptional<z.ZodString>;
443
- validFrom: z.ZodOptional<z.ZodString>;
444
- validUntil: z.ZodOptional<z.ZodString>;
445
- type: z.ZodLiteral<"PercentageOffDiscount">;
446
- name: z.ZodString;
447
- description: z.ZodOptional<z.ZodString>;
448
- percentage: z.ZodNumber;
449
- total: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
450
- isExclusive: z.ZodBoolean;
451
- recurringPaymentUseCount: z.ZodOptional<z.ZodNumber>;
452
- }, "strip", z.ZodTypeAny, {
453
- name: string;
454
- type: "PercentageOffDiscount";
455
- percentage: number;
456
- isExclusive: boolean;
457
- description?: string | undefined;
458
- total?: Record<string, number> | undefined;
459
- recurringPaymentUseCount?: number | undefined;
460
- promotionId?: string | undefined;
461
- validFrom?: string | undefined;
462
- validUntil?: string | undefined;
463
- }, {
464
- name: string;
465
- type: "PercentageOffDiscount";
466
- percentage: number;
467
- isExclusive: boolean;
468
- description?: string | undefined;
469
- total?: Record<string, number> | undefined;
470
- recurringPaymentUseCount?: number | undefined;
471
- promotionId?: string | undefined;
472
- validFrom?: string | undefined;
473
- validUntil?: string | undefined;
474
- }>, z.ZodObject<{
475
- promotionId: z.ZodOptional<z.ZodString>;
476
- validFrom: z.ZodOptional<z.ZodString>;
477
- validUntil: z.ZodOptional<z.ZodString>;
478
- type: z.ZodLiteral<"FlatAmountOffDiscount">;
479
- name: z.ZodString;
480
- description: z.ZodOptional<z.ZodString>;
481
- total: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
482
- isExclusive: z.ZodBoolean;
483
- recurringPaymentUseCount: z.ZodOptional<z.ZodNumber>;
484
- }, "strip", z.ZodTypeAny, {
485
- name: string;
486
- type: "FlatAmountOffDiscount";
487
- isExclusive: boolean;
488
- description?: string | undefined;
489
- total?: Record<string, number> | undefined;
490
- recurringPaymentUseCount?: number | undefined;
491
- promotionId?: string | undefined;
492
- validFrom?: string | undefined;
493
- validUntil?: string | undefined;
494
- }, {
495
- name: string;
496
- type: "FlatAmountOffDiscount";
497
- isExclusive: boolean;
498
- description?: string | undefined;
499
- total?: Record<string, number> | undefined;
500
- recurringPaymentUseCount?: number | undefined;
501
- promotionId?: string | undefined;
502
- validFrom?: string | undefined;
503
- validUntil?: string | undefined;
504
- }>]>>;
505
- recurrence: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
506
- type: z.ZodLiteral<"OneOff">;
507
- }, "strip", z.ZodTypeAny, {
508
- type: "OneOff";
509
- }, {
510
- type: "OneOff";
511
- }>, z.ZodObject<{
512
- type: z.ZodLiteral<"Recurring">;
513
- cycleLength: z.ZodNativeEnum<typeof CycleLength>;
514
- }, "strip", z.ZodTypeAny, {
515
- type: "Recurring";
516
- cycleLength: CycleLength;
517
- }, {
518
- type: "Recurring";
519
- cycleLength: CycleLength;
520
- }>]>;
521
- pricingTiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
522
- minQuantity: z.ZodNumber;
523
- originalPrice: z.ZodRecord<z.ZodString, z.ZodNumber>;
524
- price: z.ZodRecord<z.ZodString, z.ZodNumber>;
525
- }, "strip", z.ZodTypeAny, {
526
- minQuantity: number;
527
- originalPrice: Record<string, number>;
528
- price: Record<string, number>;
529
- }, {
530
- minQuantity: number;
531
- originalPrice: Record<string, number>;
532
- price: Record<string, number>;
533
- }>, "many">>>;
534
- }, "strip", z.ZodTypeAny, {
535
- id: string;
536
- name: string;
537
- originalPrice: Record<string, number>;
538
- price: Record<string, number>;
539
- hasDiscount: boolean;
540
- recurrence: {
541
- type: "OneOff";
542
- } | {
543
- type: "Recurring";
544
- cycleLength: CycleLength;
545
- };
546
- discount?: {
547
- name: string;
548
- type: "PercentageOffDiscount";
549
- percentage: number;
550
- isExclusive: boolean;
551
- description?: string | undefined;
552
- total?: Record<string, number> | undefined;
553
- recurringPaymentUseCount?: number | undefined;
554
- promotionId?: string | undefined;
555
- validFrom?: string | undefined;
556
- validUntil?: string | undefined;
557
- } | {
558
- name: string;
559
- type: "FlatAmountOffDiscount";
560
- isExclusive: boolean;
561
- description?: string | undefined;
562
- total?: Record<string, number> | undefined;
563
- recurringPaymentUseCount?: number | undefined;
564
- promotionId?: string | undefined;
565
- validFrom?: string | undefined;
566
- validUntil?: string | undefined;
567
- } | undefined;
568
- pricingTiers?: {
569
- minQuantity: number;
570
- originalPrice: Record<string, number>;
571
- price: Record<string, number>;
572
- }[] | null | undefined;
573
- }, {
574
- id: string;
575
- name: string;
576
- originalPrice: Record<string, number>;
577
- price: Record<string, number>;
578
- hasDiscount: boolean;
579
- recurrence: {
580
- type: "OneOff";
581
- } | {
582
- type: "Recurring";
583
- cycleLength: CycleLength;
584
- };
585
- discount?: {
586
- name: string;
587
- type: "PercentageOffDiscount";
588
- percentage: number;
589
- isExclusive: boolean;
590
- description?: string | undefined;
591
- total?: Record<string, number> | undefined;
592
- recurringPaymentUseCount?: number | undefined;
593
- promotionId?: string | undefined;
594
- validFrom?: string | undefined;
595
- validUntil?: string | undefined;
596
- } | {
597
- name: string;
598
- type: "FlatAmountOffDiscount";
599
- isExclusive: boolean;
600
- description?: string | undefined;
601
- total?: Record<string, number> | undefined;
602
- recurringPaymentUseCount?: number | undefined;
603
- promotionId?: string | undefined;
604
- validFrom?: string | undefined;
605
- validUntil?: string | undefined;
606
- } | undefined;
607
- pricingTiers?: {
608
- minQuantity: number;
609
- originalPrice: Record<string, number>;
610
- price: Record<string, number>;
611
- }[] | null | undefined;
612
- }>, "many">>;
613
- properties: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodType<RawPropertyValue, z.ZodTypeDef, RawPropertyValue>>>>;
614
- type: z.ZodPipeline<z.ZodDefault<z.ZodOptional<z.ZodString>>, z.ZodLiteral<"Product">>;
615
- licenseUpgrades: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, {
616
- licenseIds: string[];
617
- variations: {
618
- id: string;
619
- name: string;
620
- originalPrice: Record<string, number>;
621
- price: Record<string, number>;
622
- hasDiscount: boolean;
623
- recurrence: {
624
- type: "OneOff";
625
- } | {
626
- type: "Recurring";
627
- cycleLength: CycleLength;
628
- };
629
- discount?: {
630
- name: string;
631
- type: "PercentageOffDiscount";
632
- percentage: number;
633
- isExclusive: boolean;
634
- description?: string | undefined;
635
- total?: Record<string, number> | undefined;
636
- recurringPaymentUseCount?: number | undefined;
637
- promotionId?: string | undefined;
638
- validFrom?: string | undefined;
639
- validUntil?: string | undefined;
640
- } | {
641
- name: string;
642
- type: "FlatAmountOffDiscount";
643
- isExclusive: boolean;
644
- description?: string | undefined;
645
- total?: Record<string, number> | undefined;
646
- recurringPaymentUseCount?: number | undefined;
647
- promotionId?: string | undefined;
648
- validFrom?: string | undefined;
649
- validUntil?: string | undefined;
650
- } | undefined;
651
- pricingTiers?: {
652
- minQuantity: number;
653
- originalPrice: Record<string, number>;
654
- price: Record<string, number>;
655
- }[] | null | undefined;
656
- }[];
657
- releaseAccess?: {
658
- updatesUntil?: Date | null | undefined;
659
- upToMajor?: number | null | undefined;
660
- upToVersion?: string | null | undefined;
661
- } | null | undefined;
662
- }[], unknown[]>>>>;
663
- }, "strip", z.ZodTypeAny, {
664
- id: string;
665
- name: string;
666
- type: "Product";
667
- iconUrl: string | null;
668
- owned: boolean;
669
- description?: string | null | undefined;
670
- tagline?: string | null | undefined;
671
- website?: string | null | undefined;
672
- currentVersion?: string | undefined;
673
- downloads?: {
674
- name: string;
675
- path: string | null;
676
- key: string;
677
- platform: Platform;
678
- size: number;
679
- arch?: Architecture | null | undefined;
680
- manifest?: {
681
- files: {
682
- name: string;
683
- path: string;
684
- }[];
685
- licensePath: string | null;
686
- } | undefined;
687
- }[] | undefined;
688
- properties?: Record<string, RawPropertyValue> | null | undefined;
689
- variations?: {
690
- id: string;
691
- name: string;
692
- originalPrice: Record<string, number>;
693
- price: Record<string, number>;
694
- hasDiscount: boolean;
695
- recurrence: {
696
- type: "OneOff";
697
- } | {
698
- type: "Recurring";
699
- cycleLength: CycleLength;
700
- };
701
- discount?: {
702
- name: string;
703
- type: "PercentageOffDiscount";
704
- percentage: number;
705
- isExclusive: boolean;
706
- description?: string | undefined;
707
- total?: Record<string, number> | undefined;
708
- recurringPaymentUseCount?: number | undefined;
709
- promotionId?: string | undefined;
710
- validFrom?: string | undefined;
711
- validUntil?: string | undefined;
712
- } | {
713
- name: string;
714
- type: "FlatAmountOffDiscount";
715
- isExclusive: boolean;
716
- description?: string | undefined;
717
- total?: Record<string, number> | undefined;
718
- recurringPaymentUseCount?: number | undefined;
719
- promotionId?: string | undefined;
720
- validFrom?: string | undefined;
721
- validUntil?: string | undefined;
722
- } | undefined;
723
- pricingTiers?: {
724
- minQuantity: number;
725
- originalPrice: Record<string, number>;
726
- price: Record<string, number>;
727
- }[] | null | undefined;
728
- }[] | undefined;
729
- defaultVariation?: {
730
- id: string;
731
- name: string;
732
- originalPrice: Record<string, number>;
733
- price: Record<string, number>;
734
- hasDiscount: boolean;
735
- recurrence: {
736
- type: "OneOff";
737
- } | {
738
- type: "Recurring";
739
- cycleLength: CycleLength;
740
- };
741
- discount?: {
742
- name: string;
743
- type: "PercentageOffDiscount";
744
- percentage: number;
745
- isExclusive: boolean;
746
- description?: string | undefined;
747
- total?: Record<string, number> | undefined;
748
- recurringPaymentUseCount?: number | undefined;
749
- promotionId?: string | undefined;
750
- validFrom?: string | undefined;
751
- validUntil?: string | undefined;
752
- } | {
753
- name: string;
754
- type: "FlatAmountOffDiscount";
755
- isExclusive: boolean;
756
- description?: string | undefined;
757
- total?: Record<string, number> | undefined;
758
- recurringPaymentUseCount?: number | undefined;
759
- promotionId?: string | undefined;
760
- validFrom?: string | undefined;
761
- validUntil?: string | undefined;
762
- } | undefined;
763
- pricingTiers?: {
764
- minQuantity: number;
765
- originalPrice: Record<string, number>;
766
- price: Record<string, number>;
767
- }[] | null | undefined;
768
- } | undefined;
769
- licenseUpgrades?: {
770
- licenseIds: string[];
771
- variations: {
772
- id: string;
773
- name: string;
774
- originalPrice: Record<string, number>;
775
- price: Record<string, number>;
776
- hasDiscount: boolean;
777
- recurrence: {
778
- type: "OneOff";
779
- } | {
780
- type: "Recurring";
781
- cycleLength: CycleLength;
782
- };
783
- discount?: {
784
- name: string;
785
- type: "PercentageOffDiscount";
786
- percentage: number;
787
- isExclusive: boolean;
788
- description?: string | undefined;
789
- total?: Record<string, number> | undefined;
790
- recurringPaymentUseCount?: number | undefined;
791
- promotionId?: string | undefined;
792
- validFrom?: string | undefined;
793
- validUntil?: string | undefined;
794
- } | {
795
- name: string;
796
- type: "FlatAmountOffDiscount";
797
- isExclusive: boolean;
798
- description?: string | undefined;
799
- total?: Record<string, number> | undefined;
800
- recurringPaymentUseCount?: number | undefined;
801
- promotionId?: string | undefined;
802
- validFrom?: string | undefined;
803
- validUntil?: string | undefined;
804
- } | undefined;
805
- pricingTiers?: {
806
- minQuantity: number;
807
- originalPrice: Record<string, number>;
808
- price: Record<string, number>;
809
- }[] | null | undefined;
810
- }[];
811
- releaseAccess?: {
812
- updatesUntil?: Date | null | undefined;
813
- upToMajor?: number | null | undefined;
814
- upToVersion?: string | null | undefined;
815
- } | null | undefined;
816
- }[] | null | undefined;
817
- }, {
818
- id: string;
819
- name: string;
820
- iconUrl: string | null;
821
- owned: boolean;
822
- type?: string | undefined;
823
- description?: string | null | undefined;
824
- tagline?: string | null | undefined;
825
- website?: string | null | undefined;
826
- currentVersion?: string | undefined;
827
- downloads?: {
828
- name: string;
829
- path: string | null;
830
- key: string;
831
- platform: Platform;
832
- size: number;
833
- arch?: Architecture | null | undefined;
834
- manifest?: {
835
- files: {
836
- name: string;
837
- path: string;
838
- }[];
839
- licensePath: string | null;
840
- } | undefined;
841
- }[] | undefined;
842
- properties?: Record<string, RawPropertyValue> | null | undefined;
843
- variations?: {
844
- id: string;
845
- name: string;
846
- originalPrice: Record<string, number>;
847
- price: Record<string, number>;
848
- hasDiscount: boolean;
849
- recurrence: {
850
- type: "OneOff";
851
- } | {
852
- type: "Recurring";
853
- cycleLength: CycleLength;
854
- };
855
- discount?: {
856
- name: string;
857
- type: "PercentageOffDiscount";
858
- percentage: number;
859
- isExclusive: boolean;
860
- description?: string | undefined;
861
- total?: Record<string, number> | undefined;
862
- recurringPaymentUseCount?: number | undefined;
863
- promotionId?: string | undefined;
864
- validFrom?: string | undefined;
865
- validUntil?: string | undefined;
866
- } | {
867
- name: string;
868
- type: "FlatAmountOffDiscount";
869
- isExclusive: boolean;
870
- description?: string | undefined;
871
- total?: Record<string, number> | undefined;
872
- recurringPaymentUseCount?: number | undefined;
873
- promotionId?: string | undefined;
874
- validFrom?: string | undefined;
875
- validUntil?: string | undefined;
876
- } | undefined;
877
- pricingTiers?: {
878
- minQuantity: number;
879
- originalPrice: Record<string, number>;
880
- price: Record<string, number>;
881
- }[] | null | undefined;
882
- }[] | undefined;
883
- defaultVariation?: {
884
- id: string;
885
- name: string;
886
- originalPrice: Record<string, number>;
887
- price: Record<string, number>;
888
- hasDiscount: boolean;
889
- recurrence: {
890
- type: "OneOff";
891
- } | {
892
- type: "Recurring";
893
- cycleLength: CycleLength;
894
- };
895
- discount?: {
896
- name: string;
897
- type: "PercentageOffDiscount";
898
- percentage: number;
899
- isExclusive: boolean;
900
- description?: string | undefined;
901
- total?: Record<string, number> | undefined;
902
- recurringPaymentUseCount?: number | undefined;
903
- promotionId?: string | undefined;
904
- validFrom?: string | undefined;
905
- validUntil?: string | undefined;
906
- } | {
907
- name: string;
908
- type: "FlatAmountOffDiscount";
909
- isExclusive: boolean;
910
- description?: string | undefined;
911
- total?: Record<string, number> | undefined;
912
- recurringPaymentUseCount?: number | undefined;
913
- promotionId?: string | undefined;
914
- validFrom?: string | undefined;
915
- validUntil?: string | undefined;
916
- } | undefined;
917
- pricingTiers?: {
918
- minQuantity: number;
919
- originalPrice: Record<string, number>;
920
- price: Record<string, number>;
921
- }[] | null | undefined;
922
- } | undefined;
923
- licenseUpgrades?: unknown;
924
- }>;
925
- fulfillmentType: z.ZodOptional<z.ZodNativeEnum<typeof ActivationRequestFulfillmentType>>;
926
- trialEligibility: z.ZodOptional<z.ZodObject<{
927
- eligible: z.ZodBoolean;
928
- existing: z.ZodBoolean;
929
- requiresAccount: z.ZodBoolean;
930
- requiresNewsletterOptIn: z.ZodBoolean;
931
- numberOfDaysPerProduct: z.ZodNumber;
932
- numberOfDaysRemaining: z.ZodNumber;
933
- endless: z.ZodDefault<z.ZodBoolean>;
934
- }, "strip", z.ZodTypeAny, {
935
- eligible: boolean;
936
- existing: boolean;
937
- requiresAccount: boolean;
938
- requiresNewsletterOptIn: boolean;
939
- numberOfDaysPerProduct: number;
940
- numberOfDaysRemaining: number;
941
- endless: boolean;
942
- }, {
943
- eligible: boolean;
944
- existing: boolean;
945
- requiresAccount: boolean;
946
- requiresNewsletterOptIn: boolean;
947
- numberOfDaysPerProduct: number;
948
- numberOfDaysRemaining: number;
949
- endless?: boolean | undefined;
950
- }>>;
951
- licenseEligibility: z.ZodOptional<z.ZodObject<{
952
- eligible: z.ZodBoolean;
953
- releaseNotCovered: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodObject<{
954
- appVersion: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
955
- updatesUntil: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodDate>>>;
956
- upToMajor: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
957
- upToVersion: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
958
- upgradeUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
959
- }, "strip", z.ZodTypeAny, {
960
- updatesUntil?: Date | null | undefined;
961
- upToMajor?: number | null | undefined;
962
- upToVersion?: string | null | undefined;
963
- upgradeUrl?: string | null | undefined;
964
- appVersion?: string | null | undefined;
965
- }, {
966
- updatesUntil?: unknown;
967
- upToMajor?: unknown;
968
- upToVersion?: unknown;
969
- upgradeUrl?: unknown;
970
- appVersion?: unknown;
971
- }>>>>;
972
- }, "strip", z.ZodTypeAny, {
973
- eligible: boolean;
974
- releaseNotCovered?: {
975
- updatesUntil?: Date | null | undefined;
976
- upToMajor?: number | null | undefined;
977
- upToVersion?: string | null | undefined;
978
- upgradeUrl?: string | null | undefined;
979
- appVersion?: string | null | undefined;
980
- } | null | undefined;
981
- }, {
982
- eligible: boolean;
983
- releaseNotCovered?: unknown;
984
- }>>;
985
- }, "strip", z.ZodTypeAny, {
986
- id: string;
987
- status: ActivationRequestStatus;
988
- product: {
989
- id: string;
990
- name: string;
991
- type: "Product";
992
- iconUrl: string | null;
993
- owned: boolean;
994
- description?: string | null | undefined;
995
- tagline?: string | null | undefined;
996
- website?: string | null | undefined;
997
- currentVersion?: string | undefined;
998
- downloads?: {
999
- name: string;
1000
- path: string | null;
1001
- key: string;
1002
- platform: Platform;
1003
- size: number;
1004
- arch?: Architecture | null | undefined;
1005
- manifest?: {
1006
- files: {
1007
- name: string;
1008
- path: string;
1009
- }[];
1010
- licensePath: string | null;
1011
- } | undefined;
1012
- }[] | undefined;
1013
- properties?: Record<string, RawPropertyValue> | null | undefined;
1014
- variations?: {
1015
- id: string;
1016
- name: string;
1017
- originalPrice: Record<string, number>;
1018
- price: Record<string, number>;
1019
- hasDiscount: boolean;
1020
- recurrence: {
1021
- type: "OneOff";
1022
- } | {
1023
- type: "Recurring";
1024
- cycleLength: CycleLength;
1025
- };
1026
- discount?: {
1027
- name: string;
1028
- type: "PercentageOffDiscount";
1029
- percentage: number;
1030
- isExclusive: boolean;
1031
- description?: string | undefined;
1032
- total?: Record<string, number> | undefined;
1033
- recurringPaymentUseCount?: number | undefined;
1034
- promotionId?: string | undefined;
1035
- validFrom?: string | undefined;
1036
- validUntil?: string | undefined;
1037
- } | {
1038
- name: string;
1039
- type: "FlatAmountOffDiscount";
1040
- isExclusive: boolean;
1041
- description?: string | undefined;
1042
- total?: Record<string, number> | undefined;
1043
- recurringPaymentUseCount?: number | undefined;
1044
- promotionId?: string | undefined;
1045
- validFrom?: string | undefined;
1046
- validUntil?: string | undefined;
1047
- } | undefined;
1048
- pricingTiers?: {
1049
- minQuantity: number;
1050
- originalPrice: Record<string, number>;
1051
- price: Record<string, number>;
1052
- }[] | null | undefined;
1053
- }[] | undefined;
1054
- defaultVariation?: {
1055
- id: string;
1056
- name: string;
1057
- originalPrice: Record<string, number>;
1058
- price: Record<string, number>;
1059
- hasDiscount: boolean;
1060
- recurrence: {
1061
- type: "OneOff";
1062
- } | {
1063
- type: "Recurring";
1064
- cycleLength: CycleLength;
1065
- };
1066
- discount?: {
1067
- name: string;
1068
- type: "PercentageOffDiscount";
1069
- percentage: number;
1070
- isExclusive: boolean;
1071
- description?: string | undefined;
1072
- total?: Record<string, number> | undefined;
1073
- recurringPaymentUseCount?: number | undefined;
1074
- promotionId?: string | undefined;
1075
- validFrom?: string | undefined;
1076
- validUntil?: string | undefined;
1077
- } | {
1078
- name: string;
1079
- type: "FlatAmountOffDiscount";
1080
- isExclusive: boolean;
1081
- description?: string | undefined;
1082
- total?: Record<string, number> | undefined;
1083
- recurringPaymentUseCount?: number | undefined;
1084
- promotionId?: string | undefined;
1085
- validFrom?: string | undefined;
1086
- validUntil?: string | undefined;
1087
- } | undefined;
1088
- pricingTiers?: {
1089
- minQuantity: number;
1090
- originalPrice: Record<string, number>;
1091
- price: Record<string, number>;
1092
- }[] | null | undefined;
1093
- } | undefined;
1094
- licenseUpgrades?: {
1095
- licenseIds: string[];
1096
- variations: {
1097
- id: string;
1098
- name: string;
1099
- originalPrice: Record<string, number>;
1100
- price: Record<string, number>;
1101
- hasDiscount: boolean;
1102
- recurrence: {
1103
- type: "OneOff";
1104
- } | {
1105
- type: "Recurring";
1106
- cycleLength: CycleLength;
1107
- };
1108
- discount?: {
1109
- name: string;
1110
- type: "PercentageOffDiscount";
1111
- percentage: number;
1112
- isExclusive: boolean;
1113
- description?: string | undefined;
1114
- total?: Record<string, number> | undefined;
1115
- recurringPaymentUseCount?: number | undefined;
1116
- promotionId?: string | undefined;
1117
- validFrom?: string | undefined;
1118
- validUntil?: string | undefined;
1119
- } | {
1120
- name: string;
1121
- type: "FlatAmountOffDiscount";
1122
- isExclusive: boolean;
1123
- description?: string | undefined;
1124
- total?: Record<string, number> | undefined;
1125
- recurringPaymentUseCount?: number | undefined;
1126
- promotionId?: string | undefined;
1127
- validFrom?: string | undefined;
1128
- validUntil?: string | undefined;
1129
- } | undefined;
1130
- pricingTiers?: {
1131
- minQuantity: number;
1132
- originalPrice: Record<string, number>;
1133
- price: Record<string, number>;
1134
- }[] | null | undefined;
1135
- }[];
1136
- releaseAccess?: {
1137
- updatesUntil?: Date | null | undefined;
1138
- upToMajor?: number | null | undefined;
1139
- upToVersion?: string | null | undefined;
1140
- } | null | undefined;
1141
- }[] | null | undefined;
1142
- };
1143
- fulfillmentType?: ActivationRequestFulfillmentType | undefined;
1144
- trialEligibility?: {
1145
- eligible: boolean;
1146
- existing: boolean;
1147
- requiresAccount: boolean;
1148
- requiresNewsletterOptIn: boolean;
1149
- numberOfDaysPerProduct: number;
1150
- numberOfDaysRemaining: number;
1151
- endless: boolean;
1152
- } | undefined;
1153
- licenseEligibility?: {
1154
- eligible: boolean;
1155
- releaseNotCovered?: {
1156
- updatesUntil?: Date | null | undefined;
1157
- upToMajor?: number | null | undefined;
1158
- upToVersion?: string | null | undefined;
1159
- upgradeUrl?: string | null | undefined;
1160
- appVersion?: string | null | undefined;
1161
- } | null | undefined;
1162
- } | undefined;
1163
- }, {
1164
- id: string;
1165
- status: ActivationRequestStatus;
1166
- product: {
1167
- id: string;
1168
- name: string;
1169
- iconUrl: string | null;
1170
- owned: boolean;
1171
- type?: string | undefined;
1172
- description?: string | null | undefined;
1173
- tagline?: string | null | undefined;
1174
- website?: string | null | undefined;
1175
- currentVersion?: string | undefined;
1176
- downloads?: {
1177
- name: string;
1178
- path: string | null;
1179
- key: string;
1180
- platform: Platform;
1181
- size: number;
1182
- arch?: Architecture | null | undefined;
1183
- manifest?: {
1184
- files: {
1185
- name: string;
1186
- path: string;
1187
- }[];
1188
- licensePath: string | null;
1189
- } | undefined;
1190
- }[] | undefined;
1191
- properties?: Record<string, RawPropertyValue> | null | undefined;
1192
- variations?: {
1193
- id: string;
1194
- name: string;
1195
- originalPrice: Record<string, number>;
1196
- price: Record<string, number>;
1197
- hasDiscount: boolean;
1198
- recurrence: {
1199
- type: "OneOff";
1200
- } | {
1201
- type: "Recurring";
1202
- cycleLength: CycleLength;
1203
- };
1204
- discount?: {
1205
- name: string;
1206
- type: "PercentageOffDiscount";
1207
- percentage: number;
1208
- isExclusive: boolean;
1209
- description?: string | undefined;
1210
- total?: Record<string, number> | undefined;
1211
- recurringPaymentUseCount?: number | undefined;
1212
- promotionId?: string | undefined;
1213
- validFrom?: string | undefined;
1214
- validUntil?: string | undefined;
1215
- } | {
1216
- name: string;
1217
- type: "FlatAmountOffDiscount";
1218
- isExclusive: boolean;
1219
- description?: string | undefined;
1220
- total?: Record<string, number> | undefined;
1221
- recurringPaymentUseCount?: number | undefined;
1222
- promotionId?: string | undefined;
1223
- validFrom?: string | undefined;
1224
- validUntil?: string | undefined;
1225
- } | undefined;
1226
- pricingTiers?: {
1227
- minQuantity: number;
1228
- originalPrice: Record<string, number>;
1229
- price: Record<string, number>;
1230
- }[] | null | undefined;
1231
- }[] | undefined;
1232
- defaultVariation?: {
1233
- id: string;
1234
- name: string;
1235
- originalPrice: Record<string, number>;
1236
- price: Record<string, number>;
1237
- hasDiscount: boolean;
1238
- recurrence: {
1239
- type: "OneOff";
1240
- } | {
1241
- type: "Recurring";
1242
- cycleLength: CycleLength;
1243
- };
1244
- discount?: {
1245
- name: string;
1246
- type: "PercentageOffDiscount";
1247
- percentage: number;
1248
- isExclusive: boolean;
1249
- description?: string | undefined;
1250
- total?: Record<string, number> | undefined;
1251
- recurringPaymentUseCount?: number | undefined;
1252
- promotionId?: string | undefined;
1253
- validFrom?: string | undefined;
1254
- validUntil?: string | undefined;
1255
- } | {
1256
- name: string;
1257
- type: "FlatAmountOffDiscount";
1258
- isExclusive: boolean;
1259
- description?: string | undefined;
1260
- total?: Record<string, number> | undefined;
1261
- recurringPaymentUseCount?: number | undefined;
1262
- promotionId?: string | undefined;
1263
- validFrom?: string | undefined;
1264
- validUntil?: string | undefined;
1265
- } | undefined;
1266
- pricingTiers?: {
1267
- minQuantity: number;
1268
- originalPrice: Record<string, number>;
1269
- price: Record<string, number>;
1270
- }[] | null | undefined;
1271
- } | undefined;
1272
- licenseUpgrades?: unknown;
1273
- };
1274
- fulfillmentType?: ActivationRequestFulfillmentType | undefined;
1275
- trialEligibility?: {
1276
- eligible: boolean;
1277
- existing: boolean;
1278
- requiresAccount: boolean;
1279
- requiresNewsletterOptIn: boolean;
1280
- numberOfDaysPerProduct: number;
1281
- numberOfDaysRemaining: number;
1282
- endless?: boolean | undefined;
1283
- } | undefined;
1284
- licenseEligibility?: {
1285
- eligible: boolean;
1286
- releaseNotCovered?: unknown;
1287
- } | undefined;
1288
- }>;
1289
-
1290
- declare const schemas$b_activationRequestSchema: typeof activationRequestSchema;
1291
- declare namespace schemas$b {
1292
- export { schemas$b_activationRequestSchema as activationRequestSchema };
1293
- }
1294
-
1295
- declare enum ActivationRequestFulfillmentType {
1296
- License = "License",
1297
- Trial = "Trial"
1298
- }
1299
- declare enum ActivationRequestStatus {
1300
- Requested = "Requested",
1301
- Fulfilled = "Fulfilled",
1302
- Completed = "Completed",
1303
- Cancelled = "Cancelled"
1304
- }
1305
- type ActivationRequest = z.infer<typeof activationRequestSchema>;
1306
- /** Why the customer's licenses cannot take this device: none covers the version the app runs. */
1307
- type ActivationReleaseNotCovered = NonNullable<NonNullable<ActivationRequest['licenseEligibility']>['releaseNotCovered']>;
1308
-
1309
- declare class ActivationRequestEndpoints {
1310
- private api;
1311
- constructor(api: MoonbaseApi);
1312
- get(requestId: string): Promise<ActivationRequest>;
1313
- isCompleted(requestId: string): Promise<boolean>;
1314
- fulfillLicense(requestId: string): Promise<ActivationRequest>;
1315
- fulfillTrial(requestId: string): Promise<ActivationRequest>;
1316
- cancel(requestId: string): Promise<ActivationRequest>;
1317
- }
1318
-
1319
- declare const subscribeResponseSchema: z.ZodObject<{
1320
- status: z.ZodEnum<["subscribed", "confirmation_sent"]>;
1321
- }, "strip", z.ZodTypeAny, {
1322
- status: "subscribed" | "confirmation_sent";
1323
- }, {
1324
- status: "subscribed" | "confirmation_sent";
1325
- }>;
1326
- declare const communicationPreferencesViewSchema: z.ZodObject<{
1327
- email: z.ZodString;
1328
- name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1329
- newsletter: z.ZodBoolean;
1330
- productUpdates: z.ZodBoolean;
1331
- }, "strip", z.ZodTypeAny, {
1332
- email: string;
1333
- newsletter: boolean;
1334
- productUpdates: boolean;
1335
- name?: string | null | undefined;
1336
- }, {
1337
- email: string;
1338
- newsletter: boolean;
1339
- productUpdates: boolean;
1340
- name?: string | null | undefined;
1341
- }>;
1342
-
1343
- declare const schemas$a_communicationPreferencesViewSchema: typeof communicationPreferencesViewSchema;
1344
- declare const schemas$a_subscribeResponseSchema: typeof subscribeResponseSchema;
1345
- declare namespace schemas$a {
1346
- export { schemas$a_communicationPreferencesViewSchema as communicationPreferencesViewSchema, schemas$a_subscribeResponseSchema as subscribeResponseSchema };
1347
- }
1348
-
1349
- type SubscribeResponse = z.infer<typeof subscribeResponseSchema>;
1350
- type CommunicationPreferencesView = z.infer<typeof communicationPreferencesViewSchema>;
1351
- interface SubscribeInput {
1352
- email: string;
1353
- name?: string | null;
1354
- newsletter?: boolean;
1355
- productUpdates?: boolean;
1356
- /**
1357
- * Merchant-owned customer groups to enroll the subscriber into. Applied on
1358
- * the same terms as the opt-in beside them: on a tenant that requires double
1359
- * opt-in they land when the confirmation link is clicked, not here. Groups the
1360
- * merchant has not opened to public sign-ups are skipped in silence.
1361
- */
1362
- groupIds?: string[];
1363
- /**
1364
- * The visitor's solution to the store's captcha, for stores that ask for one
1365
- * (`vendor.features.captcha`), solved for the `subscribe` action. Sent in the
1366
- * `X-MB-CAPTCHA` header.
1367
- *
1368
- * Without it (or with one that does not check out) such a store refuses the
1369
- * subscription with a `CaptchaRequiredError`. Solutions are single-use, so
1370
- * reset the captcha after every attempt.
1371
- */
1372
- captchaToken?: string;
1373
- }
1374
- interface CommunicationPreferencesInput {
1375
- newsletter: boolean;
1376
- productUpdates: boolean;
1377
- }
1378
-
1379
- declare class CommunicationsEndpoints {
1380
- private api;
1381
- constructor(api: MoonbaseApi);
1382
- subscribe(input: SubscribeInput): Promise<SubscribeResponse>;
1383
- confirm(email: string, token: string): Promise<void>;
1384
- getPreferences(email: string, token: string): Promise<CommunicationPreferencesView>;
1385
- updatePreferences(email: string, token: string, preferences: CommunicationPreferencesInput): Promise<CommunicationPreferencesView>;
1386
- unsubscribe(email: string, token: string): Promise<void>;
1387
- }
1388
-
1389
- declare class GroupEndpoints {
1390
- private api;
1391
- constructor(api: MoonbaseApi);
1392
- /**
1393
- * Joins the signed-in customer to a merchant-owned group that has been opened
1394
- * to public sign-ups.
1395
- *
1396
- * The one group call that reports failure. Group IDs sent along with sign-up,
1397
- * a newsletter subscription or a checkout are passengers on a request that
1398
- * wanted something else, so an unusable one is skipped rather than allowed to
1399
- * fail the account, the subscription or the sale. Here joining *is* the
1400
- * request, so it throws.
1401
- *
1402
- * Every reason it can fail (no such group, deleted, closed, a segment, a
1403
- * system group, another tenant's) arrives as the same `NotFoundError`, so
1404
- * that a customer of one tenant can't enumerate that merchant's group IDs.
1405
- *
1406
- * Idempotent: joining a group the customer is already in succeeds and changes
1407
- * nothing.
1408
- */
1409
- join(groupId: string): Promise<void>;
1410
- }
1411
-
1412
- /**
1413
- * The password a customer chose at sign-up for an address that already had an account without
1414
- * one, kept until the link Moonbase emails comes back. The server hands it back sealed, as
1415
- * `pendingPasswordToken`, and confirming the account with it sets that password rather than
1416
- * asking for another.
1417
- *
1418
- * Kept in `localStorage`, so the link finds it in whichever tab of this site it opens in, and
1419
- * only in the browser that typed the password: whoever signs up with somebody else's address
1420
- * gets the token, but never the emailed code it needs. Like the token store, every operation
1421
- * degrades to memory when storage fails, in which case the link asks for the password again.
1422
- *
1423
- * Only ever filled from a sign-up response, never from a URL parameter or anything else a link
1424
- * can carry: a token planted from a link would let an attacker's password ride on the victim's
1425
- * own click.
1426
- */
1427
- declare class PendingPasswordStore {
1428
- private readonly store;
1429
- static readonly storageKey = "moonbase_pending_passwords";
1430
- constructor(store?: IStore);
1431
- get(email: string): string | null;
1432
- set(email: string, token: string): void;
1433
- remove(email: string): void;
1434
- /** The entries still worth keeping. Drops the rest from storage as it goes. */
1435
- private read;
1436
- private write;
1437
- }
1438
-
1439
- declare const moneySchema: z.ZodObject<{
1440
- currency: z.ZodString;
1441
- amount: z.ZodNumber;
1442
- }, "strip", z.ZodTypeAny, {
1443
- currency: string;
1444
- amount: number;
1445
- }, {
1446
- currency: string;
1447
- amount: number;
1448
- }>;
1449
- declare const discountSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1450
- promotionId: z.ZodOptional<z.ZodString>;
1451
- validFrom: z.ZodOptional<z.ZodString>;
1452
- validUntil: z.ZodOptional<z.ZodString>;
1453
- type: z.ZodLiteral<"PercentageOffDiscount">;
1454
- name: z.ZodString;
1455
- description: z.ZodOptional<z.ZodString>;
1456
- percentage: z.ZodNumber;
1457
- total: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1458
- isExclusive: z.ZodBoolean;
1459
- recurringPaymentUseCount: z.ZodOptional<z.ZodNumber>;
1460
- }, "strip", z.ZodTypeAny, {
1461
- name: string;
1462
- type: "PercentageOffDiscount";
1463
- percentage: number;
1464
- isExclusive: boolean;
1465
- description?: string | undefined;
1466
- total?: Record<string, number> | undefined;
1467
- recurringPaymentUseCount?: number | undefined;
1468
- promotionId?: string | undefined;
1469
- validFrom?: string | undefined;
1470
- validUntil?: string | undefined;
1471
- }, {
1472
- name: string;
1473
- type: "PercentageOffDiscount";
1474
- percentage: number;
1475
- isExclusive: boolean;
1476
- description?: string | undefined;
1477
- total?: Record<string, number> | undefined;
1478
- recurringPaymentUseCount?: number | undefined;
1479
- promotionId?: string | undefined;
1480
- validFrom?: string | undefined;
1481
- validUntil?: string | undefined;
1482
- }>, z.ZodObject<{
1483
- promotionId: z.ZodOptional<z.ZodString>;
1484
- validFrom: z.ZodOptional<z.ZodString>;
1485
- validUntil: z.ZodOptional<z.ZodString>;
1486
- type: z.ZodLiteral<"FlatAmountOffDiscount">;
1487
- name: z.ZodString;
1488
- description: z.ZodOptional<z.ZodString>;
1489
- total: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1490
- isExclusive: z.ZodBoolean;
1491
- recurringPaymentUseCount: z.ZodOptional<z.ZodNumber>;
1492
- }, "strip", z.ZodTypeAny, {
1493
- name: string;
1494
- type: "FlatAmountOffDiscount";
1495
- isExclusive: boolean;
1496
- description?: string | undefined;
1497
- total?: Record<string, number> | undefined;
1498
- recurringPaymentUseCount?: number | undefined;
1499
- promotionId?: string | undefined;
1500
- validFrom?: string | undefined;
1501
- validUntil?: string | undefined;
1502
- }, {
1503
- name: string;
1504
- type: "FlatAmountOffDiscount";
1505
- isExclusive: boolean;
1506
- description?: string | undefined;
1507
- total?: Record<string, number> | undefined;
1508
- recurringPaymentUseCount?: number | undefined;
1509
- promotionId?: string | undefined;
1510
- validFrom?: string | undefined;
1511
- validUntil?: string | undefined;
1512
- }>]>;
1513
- declare const recurrenceSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1514
- type: z.ZodLiteral<"OneOff">;
1515
- }, "strip", z.ZodTypeAny, {
1516
- type: "OneOff";
1517
- }, {
1518
- type: "OneOff";
1519
- }>, z.ZodObject<{
1520
- type: z.ZodLiteral<"Recurring">;
1521
- cycleLength: z.ZodNativeEnum<typeof CycleLength>;
1522
- }, "strip", z.ZodTypeAny, {
1523
- type: "Recurring";
1524
- cycleLength: CycleLength;
1525
- }, {
1526
- type: "Recurring";
1527
- cycleLength: CycleLength;
1528
- }>]>;
1529
- declare const pricingTierSchema: z.ZodObject<{
1530
- minQuantity: z.ZodNumber;
1531
- originalPrice: z.ZodRecord<z.ZodString, z.ZodNumber>;
1532
- price: z.ZodRecord<z.ZodString, z.ZodNumber>;
1533
- }, "strip", z.ZodTypeAny, {
1534
- minQuantity: number;
1535
- originalPrice: Record<string, number>;
1536
- price: Record<string, number>;
1537
- }, {
1538
- minQuantity: number;
1539
- originalPrice: Record<string, number>;
1540
- price: Record<string, number>;
1541
- }>;
1542
- declare const pricingVariationSchema: z.ZodObject<{
1543
- id: z.ZodString;
1544
- name: z.ZodString;
1545
- originalPrice: z.ZodRecord<z.ZodString, z.ZodNumber>;
1546
- price: z.ZodRecord<z.ZodString, z.ZodNumber>;
1547
- hasDiscount: z.ZodBoolean;
1548
- discount: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
267
+ description: z.ZodOptional<z.ZodString>;
268
+ percentage: z.ZodNumber;
269
+ total: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
270
+ isExclusive: z.ZodBoolean;
271
+ recurringPaymentUseCount: z.ZodOptional<z.ZodNumber>;
272
+ }, "strip", z.ZodTypeAny, {
273
+ name: string;
274
+ type: "PercentageOffDiscount";
275
+ percentage: number;
276
+ isExclusive: boolean;
277
+ description?: string | undefined;
278
+ total?: Record<string, number> | undefined;
279
+ recurringPaymentUseCount?: number | undefined;
280
+ promotionId?: string | undefined;
281
+ validFrom?: string | undefined;
282
+ validUntil?: string | undefined;
283
+ }, {
284
+ name: string;
285
+ type: "PercentageOffDiscount";
286
+ percentage: number;
287
+ isExclusive: boolean;
288
+ description?: string | undefined;
289
+ total?: Record<string, number> | undefined;
290
+ recurringPaymentUseCount?: number | undefined;
291
+ promotionId?: string | undefined;
292
+ validFrom?: string | undefined;
293
+ validUntil?: string | undefined;
294
+ }>, z.ZodObject<{
1549
295
  promotionId: z.ZodOptional<z.ZodString>;
1550
296
  validFrom: z.ZodOptional<z.ZodString>;
1551
297
  validUntil: z.ZodOptional<z.ZodString>;
1552
- type: z.ZodLiteral<"PercentageOffDiscount">;
298
+ type: z.ZodLiteral<"FlatAmountOffDiscount">;
1553
299
  name: z.ZodString;
1554
300
  description: z.ZodOptional<z.ZodString>;
1555
- percentage: z.ZodNumber;
1556
301
  total: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1557
302
  isExclusive: z.ZodBoolean;
1558
303
  recurringPaymentUseCount: z.ZodOptional<z.ZodNumber>;
1559
304
  }, "strip", z.ZodTypeAny, {
305
+ name: string;
306
+ type: "FlatAmountOffDiscount";
307
+ isExclusive: boolean;
308
+ description?: string | undefined;
309
+ total?: Record<string, number> | undefined;
310
+ recurringPaymentUseCount?: number | undefined;
311
+ promotionId?: string | undefined;
312
+ validFrom?: string | undefined;
313
+ validUntil?: string | undefined;
314
+ }, {
315
+ name: string;
316
+ type: "FlatAmountOffDiscount";
317
+ isExclusive: boolean;
318
+ description?: string | undefined;
319
+ total?: Record<string, number> | undefined;
320
+ recurringPaymentUseCount?: number | undefined;
321
+ promotionId?: string | undefined;
322
+ validFrom?: string | undefined;
323
+ validUntil?: string | undefined;
324
+ }>]>>;
325
+ recurrence: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
326
+ type: z.ZodLiteral<"OneOff">;
327
+ }, "strip", z.ZodTypeAny, {
328
+ type: "OneOff";
329
+ }, {
330
+ type: "OneOff";
331
+ }>, z.ZodObject<{
332
+ type: z.ZodLiteral<"Recurring">;
333
+ cycleLength: z.ZodNativeEnum<typeof CycleLength>;
334
+ }, "strip", z.ZodTypeAny, {
335
+ type: "Recurring";
336
+ cycleLength: CycleLength;
337
+ }, {
338
+ type: "Recurring";
339
+ cycleLength: CycleLength;
340
+ }>]>;
341
+ pricingTiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
342
+ minQuantity: z.ZodNumber;
343
+ originalPrice: z.ZodRecord<z.ZodString, z.ZodNumber>;
344
+ price: z.ZodRecord<z.ZodString, z.ZodNumber>;
345
+ }, "strip", z.ZodTypeAny, {
346
+ minQuantity: number;
347
+ originalPrice: Record<string, number>;
348
+ price: Record<string, number>;
349
+ }, {
350
+ minQuantity: number;
351
+ originalPrice: Record<string, number>;
352
+ price: Record<string, number>;
353
+ }>, "many">>>;
354
+ }, "strip", z.ZodTypeAny, {
355
+ id: string;
356
+ name: string;
357
+ originalPrice: Record<string, number>;
358
+ price: Record<string, number>;
359
+ hasDiscount: boolean;
360
+ recurrence: {
361
+ type: "OneOff";
362
+ } | {
363
+ type: "Recurring";
364
+ cycleLength: CycleLength;
365
+ };
366
+ discount?: {
367
+ name: string;
368
+ type: "PercentageOffDiscount";
369
+ percentage: number;
370
+ isExclusive: boolean;
371
+ description?: string | undefined;
372
+ total?: Record<string, number> | undefined;
373
+ recurringPaymentUseCount?: number | undefined;
374
+ promotionId?: string | undefined;
375
+ validFrom?: string | undefined;
376
+ validUntil?: string | undefined;
377
+ } | {
378
+ name: string;
379
+ type: "FlatAmountOffDiscount";
380
+ isExclusive: boolean;
381
+ description?: string | undefined;
382
+ total?: Record<string, number> | undefined;
383
+ recurringPaymentUseCount?: number | undefined;
384
+ promotionId?: string | undefined;
385
+ validFrom?: string | undefined;
386
+ validUntil?: string | undefined;
387
+ } | undefined;
388
+ pricingTiers?: {
389
+ minQuantity: number;
390
+ originalPrice: Record<string, number>;
391
+ price: Record<string, number>;
392
+ }[] | null | undefined;
393
+ }, {
394
+ id: string;
395
+ name: string;
396
+ originalPrice: Record<string, number>;
397
+ price: Record<string, number>;
398
+ hasDiscount: boolean;
399
+ recurrence: {
400
+ type: "OneOff";
401
+ } | {
402
+ type: "Recurring";
403
+ cycleLength: CycleLength;
404
+ };
405
+ discount?: {
1560
406
  name: string;
1561
407
  type: "PercentageOffDiscount";
1562
408
  percentage: number;
@@ -1567,10 +413,9 @@ declare const pricingVariationSchema: z.ZodObject<{
1567
413
  promotionId?: string | undefined;
1568
414
  validFrom?: string | undefined;
1569
415
  validUntil?: string | undefined;
1570
- }, {
416
+ } | {
1571
417
  name: string;
1572
- type: "PercentageOffDiscount";
1573
- percentage: number;
418
+ type: "FlatAmountOffDiscount";
1574
419
  isExclusive: boolean;
1575
420
  description?: string | undefined;
1576
421
  total?: Record<string, number> | undefined;
@@ -1578,218 +423,1378 @@ declare const pricingVariationSchema: z.ZodObject<{
1578
423
  promotionId?: string | undefined;
1579
424
  validFrom?: string | undefined;
1580
425
  validUntil?: string | undefined;
1581
- }>, z.ZodObject<{
1582
- promotionId: z.ZodOptional<z.ZodString>;
1583
- validFrom: z.ZodOptional<z.ZodString>;
1584
- validUntil: z.ZodOptional<z.ZodString>;
1585
- type: z.ZodLiteral<"FlatAmountOffDiscount">;
426
+ } | undefined;
427
+ pricingTiers?: {
428
+ minQuantity: number;
429
+ originalPrice: Record<string, number>;
430
+ price: Record<string, number>;
431
+ }[] | null | undefined;
432
+ }>;
433
+
434
+ type Discount = z.infer<typeof discountSchema>;
435
+ type PricingVariation = z.infer<typeof pricingVariationSchema>;
436
+ type PricingTier = z.infer<typeof pricingTierSchema>;
437
+ interface Page<T> {
438
+ items: Array<T>;
439
+ hasMore: boolean;
440
+ next: string | null;
441
+ }
442
+ interface Quantifiable<T> {
443
+ value: T;
444
+ quantity: number;
445
+ }
446
+ type SingleOrMultiple<T> = T | T[];
447
+ interface RawPropertyObject {
448
+ [key: string]: RawPropertyValue;
449
+ }
450
+ type RawPropertyArray = RawPropertyValue[];
451
+ type RawPropertyValue = string | number | boolean | null | RawPropertyObject | RawPropertyArray;
452
+ declare enum CycleLength {
453
+ Daily = "Daily",
454
+ Weekly = "Weekly",
455
+ Monthly = "Monthly",
456
+ Quarterly = "Quarterly",
457
+ Yearly = "Yearly"
458
+ }
459
+ type IRecurrence = z.infer<typeof recurrenceSchema>;
460
+ type Money = z.infer<typeof moneySchema>;
461
+ declare enum MarketingConsentType {
462
+ OptIn = "OptIn",
463
+ OptedInByDefault = "OptedInByDefault",
464
+ OptOut = "OptOut"
465
+ }
466
+ /**
467
+ * A money collection is a dict of currency to amount
468
+ */
469
+ type MoneyCollection = Record<string, number>;
470
+ interface UrchinTrackingModule {
471
+ source?: string;
472
+ medium?: string;
473
+ campaign?: string;
474
+ term?: string;
475
+ content?: string;
476
+ referrer?: string;
477
+ /** Google Ads click ID, added to the landing page URL by auto-tagging. */
478
+ gclid?: string;
479
+ /** What Google Ads sends instead of `gclid` for some clicks on iOS. */
480
+ gbraid?: string;
481
+ /** What Google Ads sends instead of `gclid` for some clicks on iOS. */
482
+ wbraid?: string;
483
+ /** Meta click ID, added to links clicked on Facebook, Instagram and Messenger. */
484
+ fbclid?: string;
485
+ /** Microsoft Advertising click ID, added to the landing page URL by auto-tagging. */
486
+ msclkid?: string;
487
+ /** TikTok Ads click ID, added to the landing page URL of a TikTok ad. */
488
+ ttclid?: string;
489
+ /**
490
+ * The platforms whose click IDs were on the link. A click ID identifies the
491
+ * visitor's click, so the storefront only passes one on once the visitor has
492
+ * agreed to marketing cookies (`attributionConsent`). Until then it sends
493
+ * these instead, which still tell Moonbase the visit came from an ad.
494
+ */
495
+ adClicks?: AdPlatform[];
496
+ }
497
+ /** An ad platform whose click IDs Moonbase recognises on a link. */
498
+ type AdPlatform = 'google' | 'microsoft' | 'meta' | 'tiktok';
499
+ /**
500
+ * The query parameters for `utm`: the tags and referrer as `utm_*`, the ad
501
+ * click IDs under their own names (`gclid`, `gbraid`, `wbraid`, `fbclid`,
502
+ * `msclkid`, `ttclid`), as they appear on the landing page URL, and the
503
+ * platforms they came from as `utm_ad_click`. Fields left out are not sent.
504
+ */
505
+ declare function utmToObject(utm?: UrchinTrackingModule): Record<string, string>;
506
+
507
+ type HttpMethods = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
508
+ interface Response<T> {
509
+ data: T;
510
+ headers: Record<string, string>;
511
+ status: number;
512
+ }
513
+ interface FetchOptions {
514
+ method?: HttpMethods;
515
+ body?: any;
516
+ contentType?: string;
517
+ abort?: AbortSignal;
518
+ /** Sent alongside the client's own, such as a solved captcha. */
519
+ headers?: Record<string, string>;
520
+ }
521
+ declare function objectToQuery(obj?: Record<string, string | number | boolean | Date>): string;
522
+ declare class MoonbaseApi {
523
+ baseUrl: string;
524
+ private tokenStore;
525
+ private logger;
526
+ /**
527
+ * The `x-mb-client` header this client sends with every request.
528
+ *
529
+ * @internal
530
+ */
531
+ readonly clientHeader: string;
532
+ constructor(baseUrl: string, tokenStore: ITokenStore, logger: ILogger, sdk?: string);
533
+ authenticatedFetch<T extends ZodTypeAny>(path: string, schema: T | null, options?: FetchOptions): Promise<Response<z.infer<T>>>;
534
+ fetch<T extends ZodTypeAny>(path: string, schema: T | null, options?: FetchOptions): Promise<Response<z.infer<T>>>;
535
+ private reportParsingProblem;
536
+ private reportRequestProblem;
537
+ }
538
+
539
+ declare const activationRequestSchema: z.ZodObject<{
540
+ id: z.ZodString;
541
+ status: z.ZodNativeEnum<typeof ActivationRequestStatus>;
542
+ product: z.ZodObject<{
543
+ id: z.ZodString;
1586
544
  name: z.ZodString;
1587
- description: z.ZodOptional<z.ZodString>;
1588
- total: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1589
- isExclusive: z.ZodBoolean;
1590
- recurringPaymentUseCount: z.ZodOptional<z.ZodNumber>;
545
+ tagline: z.ZodOptional<z.ZodNullable<z.ZodString>>;
546
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
547
+ iconUrl: z.ZodNullable<z.ZodString>;
548
+ website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
549
+ owned: z.ZodBoolean;
550
+ currentVersion: z.ZodOptional<z.ZodString>;
551
+ downloads: z.ZodOptional<z.ZodArray<z.ZodObject<{
552
+ name: z.ZodString;
553
+ key: z.ZodString;
554
+ platform: z.ZodNativeEnum<typeof Platform>;
555
+ arch: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof Architecture>>>;
556
+ size: z.ZodNumber;
557
+ path: z.ZodNullable<z.ZodString>;
558
+ manifest: z.ZodOptional<z.ZodObject<{
559
+ files: z.ZodArray<z.ZodObject<{
560
+ name: z.ZodString;
561
+ path: z.ZodString;
562
+ }, "strip", z.ZodTypeAny, {
563
+ name: string;
564
+ path: string;
565
+ }, {
566
+ name: string;
567
+ path: string;
568
+ }>, "many">;
569
+ licensePath: z.ZodNullable<z.ZodString>;
570
+ }, "strip", z.ZodTypeAny, {
571
+ files: {
572
+ name: string;
573
+ path: string;
574
+ }[];
575
+ licensePath: string | null;
576
+ }, {
577
+ files: {
578
+ name: string;
579
+ path: string;
580
+ }[];
581
+ licensePath: string | null;
582
+ }>>;
583
+ }, "strip", z.ZodTypeAny, {
584
+ name: string;
585
+ path: string | null;
586
+ key: string;
587
+ platform: Platform;
588
+ size: number;
589
+ arch?: Architecture | null | undefined;
590
+ manifest?: {
591
+ files: {
592
+ name: string;
593
+ path: string;
594
+ }[];
595
+ licensePath: string | null;
596
+ } | undefined;
597
+ }, {
598
+ name: string;
599
+ path: string | null;
600
+ key: string;
601
+ platform: Platform;
602
+ size: number;
603
+ arch?: Architecture | null | undefined;
604
+ manifest?: {
605
+ files: {
606
+ name: string;
607
+ path: string;
608
+ }[];
609
+ licensePath: string | null;
610
+ } | undefined;
611
+ }>, "many">>;
612
+ defaultVariation: z.ZodOptional<z.ZodObject<{
613
+ id: z.ZodString;
614
+ name: z.ZodString;
615
+ originalPrice: z.ZodRecord<z.ZodString, z.ZodNumber>;
616
+ price: z.ZodRecord<z.ZodString, z.ZodNumber>;
617
+ hasDiscount: z.ZodBoolean;
618
+ discount: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
619
+ promotionId: z.ZodOptional<z.ZodString>;
620
+ validFrom: z.ZodOptional<z.ZodString>;
621
+ validUntil: z.ZodOptional<z.ZodString>;
622
+ type: z.ZodLiteral<"PercentageOffDiscount">;
623
+ name: z.ZodString;
624
+ description: z.ZodOptional<z.ZodString>;
625
+ percentage: z.ZodNumber;
626
+ total: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
627
+ isExclusive: z.ZodBoolean;
628
+ recurringPaymentUseCount: z.ZodOptional<z.ZodNumber>;
629
+ }, "strip", z.ZodTypeAny, {
630
+ name: string;
631
+ type: "PercentageOffDiscount";
632
+ percentage: number;
633
+ isExclusive: boolean;
634
+ description?: string | undefined;
635
+ total?: Record<string, number> | undefined;
636
+ recurringPaymentUseCount?: number | undefined;
637
+ promotionId?: string | undefined;
638
+ validFrom?: string | undefined;
639
+ validUntil?: string | undefined;
640
+ }, {
641
+ name: string;
642
+ type: "PercentageOffDiscount";
643
+ percentage: number;
644
+ isExclusive: boolean;
645
+ description?: string | undefined;
646
+ total?: Record<string, number> | undefined;
647
+ recurringPaymentUseCount?: number | undefined;
648
+ promotionId?: string | undefined;
649
+ validFrom?: string | undefined;
650
+ validUntil?: string | undefined;
651
+ }>, z.ZodObject<{
652
+ promotionId: z.ZodOptional<z.ZodString>;
653
+ validFrom: z.ZodOptional<z.ZodString>;
654
+ validUntil: z.ZodOptional<z.ZodString>;
655
+ type: z.ZodLiteral<"FlatAmountOffDiscount">;
656
+ name: z.ZodString;
657
+ description: z.ZodOptional<z.ZodString>;
658
+ total: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
659
+ isExclusive: z.ZodBoolean;
660
+ recurringPaymentUseCount: z.ZodOptional<z.ZodNumber>;
661
+ }, "strip", z.ZodTypeAny, {
662
+ name: string;
663
+ type: "FlatAmountOffDiscount";
664
+ isExclusive: boolean;
665
+ description?: string | undefined;
666
+ total?: Record<string, number> | undefined;
667
+ recurringPaymentUseCount?: number | undefined;
668
+ promotionId?: string | undefined;
669
+ validFrom?: string | undefined;
670
+ validUntil?: string | undefined;
671
+ }, {
672
+ name: string;
673
+ type: "FlatAmountOffDiscount";
674
+ isExclusive: boolean;
675
+ description?: string | undefined;
676
+ total?: Record<string, number> | undefined;
677
+ recurringPaymentUseCount?: number | undefined;
678
+ promotionId?: string | undefined;
679
+ validFrom?: string | undefined;
680
+ validUntil?: string | undefined;
681
+ }>]>>;
682
+ recurrence: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
683
+ type: z.ZodLiteral<"OneOff">;
684
+ }, "strip", z.ZodTypeAny, {
685
+ type: "OneOff";
686
+ }, {
687
+ type: "OneOff";
688
+ }>, z.ZodObject<{
689
+ type: z.ZodLiteral<"Recurring">;
690
+ cycleLength: z.ZodNativeEnum<typeof CycleLength>;
691
+ }, "strip", z.ZodTypeAny, {
692
+ type: "Recurring";
693
+ cycleLength: CycleLength;
694
+ }, {
695
+ type: "Recurring";
696
+ cycleLength: CycleLength;
697
+ }>]>;
698
+ pricingTiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
699
+ minQuantity: z.ZodNumber;
700
+ originalPrice: z.ZodRecord<z.ZodString, z.ZodNumber>;
701
+ price: z.ZodRecord<z.ZodString, z.ZodNumber>;
702
+ }, "strip", z.ZodTypeAny, {
703
+ minQuantity: number;
704
+ originalPrice: Record<string, number>;
705
+ price: Record<string, number>;
706
+ }, {
707
+ minQuantity: number;
708
+ originalPrice: Record<string, number>;
709
+ price: Record<string, number>;
710
+ }>, "many">>>;
711
+ }, "strip", z.ZodTypeAny, {
712
+ id: string;
713
+ name: string;
714
+ originalPrice: Record<string, number>;
715
+ price: Record<string, number>;
716
+ hasDiscount: boolean;
717
+ recurrence: {
718
+ type: "OneOff";
719
+ } | {
720
+ type: "Recurring";
721
+ cycleLength: CycleLength;
722
+ };
723
+ discount?: {
724
+ name: string;
725
+ type: "PercentageOffDiscount";
726
+ percentage: number;
727
+ isExclusive: boolean;
728
+ description?: string | undefined;
729
+ total?: Record<string, number> | undefined;
730
+ recurringPaymentUseCount?: number | undefined;
731
+ promotionId?: string | undefined;
732
+ validFrom?: string | undefined;
733
+ validUntil?: string | undefined;
734
+ } | {
735
+ name: string;
736
+ type: "FlatAmountOffDiscount";
737
+ isExclusive: boolean;
738
+ description?: string | undefined;
739
+ total?: Record<string, number> | undefined;
740
+ recurringPaymentUseCount?: number | undefined;
741
+ promotionId?: string | undefined;
742
+ validFrom?: string | undefined;
743
+ validUntil?: string | undefined;
744
+ } | undefined;
745
+ pricingTiers?: {
746
+ minQuantity: number;
747
+ originalPrice: Record<string, number>;
748
+ price: Record<string, number>;
749
+ }[] | null | undefined;
750
+ }, {
751
+ id: string;
752
+ name: string;
753
+ originalPrice: Record<string, number>;
754
+ price: Record<string, number>;
755
+ hasDiscount: boolean;
756
+ recurrence: {
757
+ type: "OneOff";
758
+ } | {
759
+ type: "Recurring";
760
+ cycleLength: CycleLength;
761
+ };
762
+ discount?: {
763
+ name: string;
764
+ type: "PercentageOffDiscount";
765
+ percentage: number;
766
+ isExclusive: boolean;
767
+ description?: string | undefined;
768
+ total?: Record<string, number> | undefined;
769
+ recurringPaymentUseCount?: number | undefined;
770
+ promotionId?: string | undefined;
771
+ validFrom?: string | undefined;
772
+ validUntil?: string | undefined;
773
+ } | {
774
+ name: string;
775
+ type: "FlatAmountOffDiscount";
776
+ isExclusive: boolean;
777
+ description?: string | undefined;
778
+ total?: Record<string, number> | undefined;
779
+ recurringPaymentUseCount?: number | undefined;
780
+ promotionId?: string | undefined;
781
+ validFrom?: string | undefined;
782
+ validUntil?: string | undefined;
783
+ } | undefined;
784
+ pricingTiers?: {
785
+ minQuantity: number;
786
+ originalPrice: Record<string, number>;
787
+ price: Record<string, number>;
788
+ }[] | null | undefined;
789
+ }>>;
790
+ variations: z.ZodOptional<z.ZodArray<z.ZodObject<{
791
+ id: z.ZodString;
792
+ name: z.ZodString;
793
+ originalPrice: z.ZodRecord<z.ZodString, z.ZodNumber>;
794
+ price: z.ZodRecord<z.ZodString, z.ZodNumber>;
795
+ hasDiscount: z.ZodBoolean;
796
+ discount: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
797
+ promotionId: z.ZodOptional<z.ZodString>;
798
+ validFrom: z.ZodOptional<z.ZodString>;
799
+ validUntil: z.ZodOptional<z.ZodString>;
800
+ type: z.ZodLiteral<"PercentageOffDiscount">;
801
+ name: z.ZodString;
802
+ description: z.ZodOptional<z.ZodString>;
803
+ percentage: z.ZodNumber;
804
+ total: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
805
+ isExclusive: z.ZodBoolean;
806
+ recurringPaymentUseCount: z.ZodOptional<z.ZodNumber>;
807
+ }, "strip", z.ZodTypeAny, {
808
+ name: string;
809
+ type: "PercentageOffDiscount";
810
+ percentage: number;
811
+ isExclusive: boolean;
812
+ description?: string | undefined;
813
+ total?: Record<string, number> | undefined;
814
+ recurringPaymentUseCount?: number | undefined;
815
+ promotionId?: string | undefined;
816
+ validFrom?: string | undefined;
817
+ validUntil?: string | undefined;
818
+ }, {
819
+ name: string;
820
+ type: "PercentageOffDiscount";
821
+ percentage: number;
822
+ isExclusive: boolean;
823
+ description?: string | undefined;
824
+ total?: Record<string, number> | undefined;
825
+ recurringPaymentUseCount?: number | undefined;
826
+ promotionId?: string | undefined;
827
+ validFrom?: string | undefined;
828
+ validUntil?: string | undefined;
829
+ }>, z.ZodObject<{
830
+ promotionId: z.ZodOptional<z.ZodString>;
831
+ validFrom: z.ZodOptional<z.ZodString>;
832
+ validUntil: z.ZodOptional<z.ZodString>;
833
+ type: z.ZodLiteral<"FlatAmountOffDiscount">;
834
+ name: z.ZodString;
835
+ description: z.ZodOptional<z.ZodString>;
836
+ total: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
837
+ isExclusive: z.ZodBoolean;
838
+ recurringPaymentUseCount: z.ZodOptional<z.ZodNumber>;
839
+ }, "strip", z.ZodTypeAny, {
840
+ name: string;
841
+ type: "FlatAmountOffDiscount";
842
+ isExclusive: boolean;
843
+ description?: string | undefined;
844
+ total?: Record<string, number> | undefined;
845
+ recurringPaymentUseCount?: number | undefined;
846
+ promotionId?: string | undefined;
847
+ validFrom?: string | undefined;
848
+ validUntil?: string | undefined;
849
+ }, {
850
+ name: string;
851
+ type: "FlatAmountOffDiscount";
852
+ isExclusive: boolean;
853
+ description?: string | undefined;
854
+ total?: Record<string, number> | undefined;
855
+ recurringPaymentUseCount?: number | undefined;
856
+ promotionId?: string | undefined;
857
+ validFrom?: string | undefined;
858
+ validUntil?: string | undefined;
859
+ }>]>>;
860
+ recurrence: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
861
+ type: z.ZodLiteral<"OneOff">;
862
+ }, "strip", z.ZodTypeAny, {
863
+ type: "OneOff";
864
+ }, {
865
+ type: "OneOff";
866
+ }>, z.ZodObject<{
867
+ type: z.ZodLiteral<"Recurring">;
868
+ cycleLength: z.ZodNativeEnum<typeof CycleLength>;
869
+ }, "strip", z.ZodTypeAny, {
870
+ type: "Recurring";
871
+ cycleLength: CycleLength;
872
+ }, {
873
+ type: "Recurring";
874
+ cycleLength: CycleLength;
875
+ }>]>;
876
+ pricingTiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
877
+ minQuantity: z.ZodNumber;
878
+ originalPrice: z.ZodRecord<z.ZodString, z.ZodNumber>;
879
+ price: z.ZodRecord<z.ZodString, z.ZodNumber>;
880
+ }, "strip", z.ZodTypeAny, {
881
+ minQuantity: number;
882
+ originalPrice: Record<string, number>;
883
+ price: Record<string, number>;
884
+ }, {
885
+ minQuantity: number;
886
+ originalPrice: Record<string, number>;
887
+ price: Record<string, number>;
888
+ }>, "many">>>;
889
+ }, "strip", z.ZodTypeAny, {
890
+ id: string;
891
+ name: string;
892
+ originalPrice: Record<string, number>;
893
+ price: Record<string, number>;
894
+ hasDiscount: boolean;
895
+ recurrence: {
896
+ type: "OneOff";
897
+ } | {
898
+ type: "Recurring";
899
+ cycleLength: CycleLength;
900
+ };
901
+ discount?: {
902
+ name: string;
903
+ type: "PercentageOffDiscount";
904
+ percentage: number;
905
+ isExclusive: boolean;
906
+ description?: string | undefined;
907
+ total?: Record<string, number> | undefined;
908
+ recurringPaymentUseCount?: number | undefined;
909
+ promotionId?: string | undefined;
910
+ validFrom?: string | undefined;
911
+ validUntil?: string | undefined;
912
+ } | {
913
+ name: string;
914
+ type: "FlatAmountOffDiscount";
915
+ isExclusive: boolean;
916
+ description?: string | undefined;
917
+ total?: Record<string, number> | undefined;
918
+ recurringPaymentUseCount?: number | undefined;
919
+ promotionId?: string | undefined;
920
+ validFrom?: string | undefined;
921
+ validUntil?: string | undefined;
922
+ } | undefined;
923
+ pricingTiers?: {
924
+ minQuantity: number;
925
+ originalPrice: Record<string, number>;
926
+ price: Record<string, number>;
927
+ }[] | null | undefined;
928
+ }, {
929
+ id: string;
930
+ name: string;
931
+ originalPrice: Record<string, number>;
932
+ price: Record<string, number>;
933
+ hasDiscount: boolean;
934
+ recurrence: {
935
+ type: "OneOff";
936
+ } | {
937
+ type: "Recurring";
938
+ cycleLength: CycleLength;
939
+ };
940
+ discount?: {
941
+ name: string;
942
+ type: "PercentageOffDiscount";
943
+ percentage: number;
944
+ isExclusive: boolean;
945
+ description?: string | undefined;
946
+ total?: Record<string, number> | undefined;
947
+ recurringPaymentUseCount?: number | undefined;
948
+ promotionId?: string | undefined;
949
+ validFrom?: string | undefined;
950
+ validUntil?: string | undefined;
951
+ } | {
952
+ name: string;
953
+ type: "FlatAmountOffDiscount";
954
+ isExclusive: boolean;
955
+ description?: string | undefined;
956
+ total?: Record<string, number> | undefined;
957
+ recurringPaymentUseCount?: number | undefined;
958
+ promotionId?: string | undefined;
959
+ validFrom?: string | undefined;
960
+ validUntil?: string | undefined;
961
+ } | undefined;
962
+ pricingTiers?: {
963
+ minQuantity: number;
964
+ originalPrice: Record<string, number>;
965
+ price: Record<string, number>;
966
+ }[] | null | undefined;
967
+ }>, "many">>;
968
+ properties: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodType<RawPropertyValue, z.ZodTypeDef, RawPropertyValue>>>>;
969
+ type: z.ZodPipeline<z.ZodDefault<z.ZodOptional<z.ZodString>>, z.ZodLiteral<"Product">>;
970
+ licenseUpgrades: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodArray<z.ZodUnknown, "many">, {
971
+ licenseIds: string[];
972
+ variations: {
973
+ id: string;
974
+ name: string;
975
+ originalPrice: Record<string, number>;
976
+ price: Record<string, number>;
977
+ hasDiscount: boolean;
978
+ recurrence: {
979
+ type: "OneOff";
980
+ } | {
981
+ type: "Recurring";
982
+ cycleLength: CycleLength;
983
+ };
984
+ discount?: {
985
+ name: string;
986
+ type: "PercentageOffDiscount";
987
+ percentage: number;
988
+ isExclusive: boolean;
989
+ description?: string | undefined;
990
+ total?: Record<string, number> | undefined;
991
+ recurringPaymentUseCount?: number | undefined;
992
+ promotionId?: string | undefined;
993
+ validFrom?: string | undefined;
994
+ validUntil?: string | undefined;
995
+ } | {
996
+ name: string;
997
+ type: "FlatAmountOffDiscount";
998
+ isExclusive: boolean;
999
+ description?: string | undefined;
1000
+ total?: Record<string, number> | undefined;
1001
+ recurringPaymentUseCount?: number | undefined;
1002
+ promotionId?: string | undefined;
1003
+ validFrom?: string | undefined;
1004
+ validUntil?: string | undefined;
1005
+ } | undefined;
1006
+ pricingTiers?: {
1007
+ minQuantity: number;
1008
+ originalPrice: Record<string, number>;
1009
+ price: Record<string, number>;
1010
+ }[] | null | undefined;
1011
+ }[];
1012
+ releaseAccess?: {
1013
+ updatesUntil?: Date | null | undefined;
1014
+ upToMajor?: number | null | undefined;
1015
+ upToVersion?: string | null | undefined;
1016
+ } | null | undefined;
1017
+ }[], unknown[]>>>>;
1591
1018
  }, "strip", z.ZodTypeAny, {
1019
+ id: string;
1592
1020
  name: string;
1593
- type: "FlatAmountOffDiscount";
1594
- isExclusive: boolean;
1595
- description?: string | undefined;
1596
- total?: Record<string, number> | undefined;
1597
- recurringPaymentUseCount?: number | undefined;
1598
- promotionId?: string | undefined;
1599
- validFrom?: string | undefined;
1600
- validUntil?: string | undefined;
1021
+ type: "Product";
1022
+ iconUrl: string | null;
1023
+ owned: boolean;
1024
+ description?: string | null | undefined;
1025
+ tagline?: string | null | undefined;
1026
+ website?: string | null | undefined;
1027
+ currentVersion?: string | undefined;
1028
+ downloads?: {
1029
+ name: string;
1030
+ path: string | null;
1031
+ key: string;
1032
+ platform: Platform;
1033
+ size: number;
1034
+ arch?: Architecture | null | undefined;
1035
+ manifest?: {
1036
+ files: {
1037
+ name: string;
1038
+ path: string;
1039
+ }[];
1040
+ licensePath: string | null;
1041
+ } | undefined;
1042
+ }[] | undefined;
1043
+ properties?: Record<string, RawPropertyValue> | null | undefined;
1044
+ variations?: {
1045
+ id: string;
1046
+ name: string;
1047
+ originalPrice: Record<string, number>;
1048
+ price: Record<string, number>;
1049
+ hasDiscount: boolean;
1050
+ recurrence: {
1051
+ type: "OneOff";
1052
+ } | {
1053
+ type: "Recurring";
1054
+ cycleLength: CycleLength;
1055
+ };
1056
+ discount?: {
1057
+ name: string;
1058
+ type: "PercentageOffDiscount";
1059
+ percentage: number;
1060
+ isExclusive: boolean;
1061
+ description?: string | undefined;
1062
+ total?: Record<string, number> | undefined;
1063
+ recurringPaymentUseCount?: number | undefined;
1064
+ promotionId?: string | undefined;
1065
+ validFrom?: string | undefined;
1066
+ validUntil?: string | undefined;
1067
+ } | {
1068
+ name: string;
1069
+ type: "FlatAmountOffDiscount";
1070
+ isExclusive: boolean;
1071
+ description?: string | undefined;
1072
+ total?: Record<string, number> | undefined;
1073
+ recurringPaymentUseCount?: number | undefined;
1074
+ promotionId?: string | undefined;
1075
+ validFrom?: string | undefined;
1076
+ validUntil?: string | undefined;
1077
+ } | undefined;
1078
+ pricingTiers?: {
1079
+ minQuantity: number;
1080
+ originalPrice: Record<string, number>;
1081
+ price: Record<string, number>;
1082
+ }[] | null | undefined;
1083
+ }[] | undefined;
1084
+ defaultVariation?: {
1085
+ id: string;
1086
+ name: string;
1087
+ originalPrice: Record<string, number>;
1088
+ price: Record<string, number>;
1089
+ hasDiscount: boolean;
1090
+ recurrence: {
1091
+ type: "OneOff";
1092
+ } | {
1093
+ type: "Recurring";
1094
+ cycleLength: CycleLength;
1095
+ };
1096
+ discount?: {
1097
+ name: string;
1098
+ type: "PercentageOffDiscount";
1099
+ percentage: number;
1100
+ isExclusive: boolean;
1101
+ description?: string | undefined;
1102
+ total?: Record<string, number> | undefined;
1103
+ recurringPaymentUseCount?: number | undefined;
1104
+ promotionId?: string | undefined;
1105
+ validFrom?: string | undefined;
1106
+ validUntil?: string | undefined;
1107
+ } | {
1108
+ name: string;
1109
+ type: "FlatAmountOffDiscount";
1110
+ isExclusive: boolean;
1111
+ description?: string | undefined;
1112
+ total?: Record<string, number> | undefined;
1113
+ recurringPaymentUseCount?: number | undefined;
1114
+ promotionId?: string | undefined;
1115
+ validFrom?: string | undefined;
1116
+ validUntil?: string | undefined;
1117
+ } | undefined;
1118
+ pricingTiers?: {
1119
+ minQuantity: number;
1120
+ originalPrice: Record<string, number>;
1121
+ price: Record<string, number>;
1122
+ }[] | null | undefined;
1123
+ } | undefined;
1124
+ licenseUpgrades?: {
1125
+ licenseIds: string[];
1126
+ variations: {
1127
+ id: string;
1128
+ name: string;
1129
+ originalPrice: Record<string, number>;
1130
+ price: Record<string, number>;
1131
+ hasDiscount: boolean;
1132
+ recurrence: {
1133
+ type: "OneOff";
1134
+ } | {
1135
+ type: "Recurring";
1136
+ cycleLength: CycleLength;
1137
+ };
1138
+ discount?: {
1139
+ name: string;
1140
+ type: "PercentageOffDiscount";
1141
+ percentage: number;
1142
+ isExclusive: boolean;
1143
+ description?: string | undefined;
1144
+ total?: Record<string, number> | undefined;
1145
+ recurringPaymentUseCount?: number | undefined;
1146
+ promotionId?: string | undefined;
1147
+ validFrom?: string | undefined;
1148
+ validUntil?: string | undefined;
1149
+ } | {
1150
+ name: string;
1151
+ type: "FlatAmountOffDiscount";
1152
+ isExclusive: boolean;
1153
+ description?: string | undefined;
1154
+ total?: Record<string, number> | undefined;
1155
+ recurringPaymentUseCount?: number | undefined;
1156
+ promotionId?: string | undefined;
1157
+ validFrom?: string | undefined;
1158
+ validUntil?: string | undefined;
1159
+ } | undefined;
1160
+ pricingTiers?: {
1161
+ minQuantity: number;
1162
+ originalPrice: Record<string, number>;
1163
+ price: Record<string, number>;
1164
+ }[] | null | undefined;
1165
+ }[];
1166
+ releaseAccess?: {
1167
+ updatesUntil?: Date | null | undefined;
1168
+ upToMajor?: number | null | undefined;
1169
+ upToVersion?: string | null | undefined;
1170
+ } | null | undefined;
1171
+ }[] | null | undefined;
1601
1172
  }, {
1173
+ id: string;
1602
1174
  name: string;
1603
- type: "FlatAmountOffDiscount";
1604
- isExclusive: boolean;
1605
- description?: string | undefined;
1606
- total?: Record<string, number> | undefined;
1607
- recurringPaymentUseCount?: number | undefined;
1608
- promotionId?: string | undefined;
1609
- validFrom?: string | undefined;
1610
- validUntil?: string | undefined;
1611
- }>]>>;
1612
- recurrence: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1613
- type: z.ZodLiteral<"OneOff">;
1614
- }, "strip", z.ZodTypeAny, {
1615
- type: "OneOff";
1616
- }, {
1617
- type: "OneOff";
1618
- }>, z.ZodObject<{
1619
- type: z.ZodLiteral<"Recurring">;
1620
- cycleLength: z.ZodNativeEnum<typeof CycleLength>;
1175
+ iconUrl: string | null;
1176
+ owned: boolean;
1177
+ type?: string | undefined;
1178
+ description?: string | null | undefined;
1179
+ tagline?: string | null | undefined;
1180
+ website?: string | null | undefined;
1181
+ currentVersion?: string | undefined;
1182
+ downloads?: {
1183
+ name: string;
1184
+ path: string | null;
1185
+ key: string;
1186
+ platform: Platform;
1187
+ size: number;
1188
+ arch?: Architecture | null | undefined;
1189
+ manifest?: {
1190
+ files: {
1191
+ name: string;
1192
+ path: string;
1193
+ }[];
1194
+ licensePath: string | null;
1195
+ } | undefined;
1196
+ }[] | undefined;
1197
+ properties?: Record<string, RawPropertyValue> | null | undefined;
1198
+ variations?: {
1199
+ id: string;
1200
+ name: string;
1201
+ originalPrice: Record<string, number>;
1202
+ price: Record<string, number>;
1203
+ hasDiscount: boolean;
1204
+ recurrence: {
1205
+ type: "OneOff";
1206
+ } | {
1207
+ type: "Recurring";
1208
+ cycleLength: CycleLength;
1209
+ };
1210
+ discount?: {
1211
+ name: string;
1212
+ type: "PercentageOffDiscount";
1213
+ percentage: number;
1214
+ isExclusive: boolean;
1215
+ description?: string | undefined;
1216
+ total?: Record<string, number> | undefined;
1217
+ recurringPaymentUseCount?: number | undefined;
1218
+ promotionId?: string | undefined;
1219
+ validFrom?: string | undefined;
1220
+ validUntil?: string | undefined;
1221
+ } | {
1222
+ name: string;
1223
+ type: "FlatAmountOffDiscount";
1224
+ isExclusive: boolean;
1225
+ description?: string | undefined;
1226
+ total?: Record<string, number> | undefined;
1227
+ recurringPaymentUseCount?: number | undefined;
1228
+ promotionId?: string | undefined;
1229
+ validFrom?: string | undefined;
1230
+ validUntil?: string | undefined;
1231
+ } | undefined;
1232
+ pricingTiers?: {
1233
+ minQuantity: number;
1234
+ originalPrice: Record<string, number>;
1235
+ price: Record<string, number>;
1236
+ }[] | null | undefined;
1237
+ }[] | undefined;
1238
+ defaultVariation?: {
1239
+ id: string;
1240
+ name: string;
1241
+ originalPrice: Record<string, number>;
1242
+ price: Record<string, number>;
1243
+ hasDiscount: boolean;
1244
+ recurrence: {
1245
+ type: "OneOff";
1246
+ } | {
1247
+ type: "Recurring";
1248
+ cycleLength: CycleLength;
1249
+ };
1250
+ discount?: {
1251
+ name: string;
1252
+ type: "PercentageOffDiscount";
1253
+ percentage: number;
1254
+ isExclusive: boolean;
1255
+ description?: string | undefined;
1256
+ total?: Record<string, number> | undefined;
1257
+ recurringPaymentUseCount?: number | undefined;
1258
+ promotionId?: string | undefined;
1259
+ validFrom?: string | undefined;
1260
+ validUntil?: string | undefined;
1261
+ } | {
1262
+ name: string;
1263
+ type: "FlatAmountOffDiscount";
1264
+ isExclusive: boolean;
1265
+ description?: string | undefined;
1266
+ total?: Record<string, number> | undefined;
1267
+ recurringPaymentUseCount?: number | undefined;
1268
+ promotionId?: string | undefined;
1269
+ validFrom?: string | undefined;
1270
+ validUntil?: string | undefined;
1271
+ } | undefined;
1272
+ pricingTiers?: {
1273
+ minQuantity: number;
1274
+ originalPrice: Record<string, number>;
1275
+ price: Record<string, number>;
1276
+ }[] | null | undefined;
1277
+ } | undefined;
1278
+ licenseUpgrades?: unknown;
1279
+ }>;
1280
+ fulfillmentType: z.ZodOptional<z.ZodNativeEnum<typeof ActivationRequestFulfillmentType>>;
1281
+ trialEligibility: z.ZodOptional<z.ZodObject<{
1282
+ eligible: z.ZodBoolean;
1283
+ existing: z.ZodBoolean;
1284
+ requiresAccount: z.ZodBoolean;
1285
+ requiresNewsletterOptIn: z.ZodBoolean;
1286
+ numberOfDaysPerProduct: z.ZodNumber;
1287
+ numberOfDaysRemaining: z.ZodNumber;
1288
+ endless: z.ZodDefault<z.ZodBoolean>;
1621
1289
  }, "strip", z.ZodTypeAny, {
1622
- type: "Recurring";
1623
- cycleLength: CycleLength;
1290
+ eligible: boolean;
1291
+ existing: boolean;
1292
+ requiresAccount: boolean;
1293
+ requiresNewsletterOptIn: boolean;
1294
+ numberOfDaysPerProduct: number;
1295
+ numberOfDaysRemaining: number;
1296
+ endless: boolean;
1624
1297
  }, {
1625
- type: "Recurring";
1626
- cycleLength: CycleLength;
1627
- }>]>;
1628
- pricingTiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1629
- minQuantity: z.ZodNumber;
1630
- originalPrice: z.ZodRecord<z.ZodString, z.ZodNumber>;
1631
- price: z.ZodRecord<z.ZodString, z.ZodNumber>;
1298
+ eligible: boolean;
1299
+ existing: boolean;
1300
+ requiresAccount: boolean;
1301
+ requiresNewsletterOptIn: boolean;
1302
+ numberOfDaysPerProduct: number;
1303
+ numberOfDaysRemaining: number;
1304
+ endless?: boolean | undefined;
1305
+ }>>;
1306
+ licenseEligibility: z.ZodOptional<z.ZodObject<{
1307
+ eligible: z.ZodBoolean;
1308
+ releaseNotCovered: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodObject<{
1309
+ appVersion: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1310
+ updatesUntil: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodDate>>>;
1311
+ upToMajor: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
1312
+ upToVersion: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1313
+ upgradeUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1314
+ }, "strip", z.ZodTypeAny, {
1315
+ updatesUntil?: Date | null | undefined;
1316
+ upToMajor?: number | null | undefined;
1317
+ upToVersion?: string | null | undefined;
1318
+ upgradeUrl?: string | null | undefined;
1319
+ appVersion?: string | null | undefined;
1320
+ }, {
1321
+ updatesUntil?: unknown;
1322
+ upToMajor?: unknown;
1323
+ upToVersion?: unknown;
1324
+ upgradeUrl?: unknown;
1325
+ appVersion?: unknown;
1326
+ }>>>>;
1632
1327
  }, "strip", z.ZodTypeAny, {
1633
- minQuantity: number;
1634
- originalPrice: Record<string, number>;
1635
- price: Record<string, number>;
1328
+ eligible: boolean;
1329
+ releaseNotCovered?: {
1330
+ updatesUntil?: Date | null | undefined;
1331
+ upToMajor?: number | null | undefined;
1332
+ upToVersion?: string | null | undefined;
1333
+ upgradeUrl?: string | null | undefined;
1334
+ appVersion?: string | null | undefined;
1335
+ } | null | undefined;
1636
1336
  }, {
1637
- minQuantity: number;
1638
- originalPrice: Record<string, number>;
1639
- price: Record<string, number>;
1640
- }>, "many">>>;
1337
+ eligible: boolean;
1338
+ releaseNotCovered?: unknown;
1339
+ }>>;
1641
1340
  }, "strip", z.ZodTypeAny, {
1642
1341
  id: string;
1643
- name: string;
1644
- originalPrice: Record<string, number>;
1645
- price: Record<string, number>;
1646
- hasDiscount: boolean;
1647
- recurrence: {
1648
- type: "OneOff";
1649
- } | {
1650
- type: "Recurring";
1651
- cycleLength: CycleLength;
1342
+ status: ActivationRequestStatus;
1343
+ product: {
1344
+ id: string;
1345
+ name: string;
1346
+ type: "Product";
1347
+ iconUrl: string | null;
1348
+ owned: boolean;
1349
+ description?: string | null | undefined;
1350
+ tagline?: string | null | undefined;
1351
+ website?: string | null | undefined;
1352
+ currentVersion?: string | undefined;
1353
+ downloads?: {
1354
+ name: string;
1355
+ path: string | null;
1356
+ key: string;
1357
+ platform: Platform;
1358
+ size: number;
1359
+ arch?: Architecture | null | undefined;
1360
+ manifest?: {
1361
+ files: {
1362
+ name: string;
1363
+ path: string;
1364
+ }[];
1365
+ licensePath: string | null;
1366
+ } | undefined;
1367
+ }[] | undefined;
1368
+ properties?: Record<string, RawPropertyValue> | null | undefined;
1369
+ variations?: {
1370
+ id: string;
1371
+ name: string;
1372
+ originalPrice: Record<string, number>;
1373
+ price: Record<string, number>;
1374
+ hasDiscount: boolean;
1375
+ recurrence: {
1376
+ type: "OneOff";
1377
+ } | {
1378
+ type: "Recurring";
1379
+ cycleLength: CycleLength;
1380
+ };
1381
+ discount?: {
1382
+ name: string;
1383
+ type: "PercentageOffDiscount";
1384
+ percentage: number;
1385
+ isExclusive: boolean;
1386
+ description?: string | undefined;
1387
+ total?: Record<string, number> | undefined;
1388
+ recurringPaymentUseCount?: number | undefined;
1389
+ promotionId?: string | undefined;
1390
+ validFrom?: string | undefined;
1391
+ validUntil?: string | undefined;
1392
+ } | {
1393
+ name: string;
1394
+ type: "FlatAmountOffDiscount";
1395
+ isExclusive: boolean;
1396
+ description?: string | undefined;
1397
+ total?: Record<string, number> | undefined;
1398
+ recurringPaymentUseCount?: number | undefined;
1399
+ promotionId?: string | undefined;
1400
+ validFrom?: string | undefined;
1401
+ validUntil?: string | undefined;
1402
+ } | undefined;
1403
+ pricingTiers?: {
1404
+ minQuantity: number;
1405
+ originalPrice: Record<string, number>;
1406
+ price: Record<string, number>;
1407
+ }[] | null | undefined;
1408
+ }[] | undefined;
1409
+ defaultVariation?: {
1410
+ id: string;
1411
+ name: string;
1412
+ originalPrice: Record<string, number>;
1413
+ price: Record<string, number>;
1414
+ hasDiscount: boolean;
1415
+ recurrence: {
1416
+ type: "OneOff";
1417
+ } | {
1418
+ type: "Recurring";
1419
+ cycleLength: CycleLength;
1420
+ };
1421
+ discount?: {
1422
+ name: string;
1423
+ type: "PercentageOffDiscount";
1424
+ percentage: number;
1425
+ isExclusive: boolean;
1426
+ description?: string | undefined;
1427
+ total?: Record<string, number> | undefined;
1428
+ recurringPaymentUseCount?: number | undefined;
1429
+ promotionId?: string | undefined;
1430
+ validFrom?: string | undefined;
1431
+ validUntil?: string | undefined;
1432
+ } | {
1433
+ name: string;
1434
+ type: "FlatAmountOffDiscount";
1435
+ isExclusive: boolean;
1436
+ description?: string | undefined;
1437
+ total?: Record<string, number> | undefined;
1438
+ recurringPaymentUseCount?: number | undefined;
1439
+ promotionId?: string | undefined;
1440
+ validFrom?: string | undefined;
1441
+ validUntil?: string | undefined;
1442
+ } | undefined;
1443
+ pricingTiers?: {
1444
+ minQuantity: number;
1445
+ originalPrice: Record<string, number>;
1446
+ price: Record<string, number>;
1447
+ }[] | null | undefined;
1448
+ } | undefined;
1449
+ licenseUpgrades?: {
1450
+ licenseIds: string[];
1451
+ variations: {
1452
+ id: string;
1453
+ name: string;
1454
+ originalPrice: Record<string, number>;
1455
+ price: Record<string, number>;
1456
+ hasDiscount: boolean;
1457
+ recurrence: {
1458
+ type: "OneOff";
1459
+ } | {
1460
+ type: "Recurring";
1461
+ cycleLength: CycleLength;
1462
+ };
1463
+ discount?: {
1464
+ name: string;
1465
+ type: "PercentageOffDiscount";
1466
+ percentage: number;
1467
+ isExclusive: boolean;
1468
+ description?: string | undefined;
1469
+ total?: Record<string, number> | undefined;
1470
+ recurringPaymentUseCount?: number | undefined;
1471
+ promotionId?: string | undefined;
1472
+ validFrom?: string | undefined;
1473
+ validUntil?: string | undefined;
1474
+ } | {
1475
+ name: string;
1476
+ type: "FlatAmountOffDiscount";
1477
+ isExclusive: boolean;
1478
+ description?: string | undefined;
1479
+ total?: Record<string, number> | undefined;
1480
+ recurringPaymentUseCount?: number | undefined;
1481
+ promotionId?: string | undefined;
1482
+ validFrom?: string | undefined;
1483
+ validUntil?: string | undefined;
1484
+ } | undefined;
1485
+ pricingTiers?: {
1486
+ minQuantity: number;
1487
+ originalPrice: Record<string, number>;
1488
+ price: Record<string, number>;
1489
+ }[] | null | undefined;
1490
+ }[];
1491
+ releaseAccess?: {
1492
+ updatesUntil?: Date | null | undefined;
1493
+ upToMajor?: number | null | undefined;
1494
+ upToVersion?: string | null | undefined;
1495
+ } | null | undefined;
1496
+ }[] | null | undefined;
1652
1497
  };
1653
- discount?: {
1654
- name: string;
1655
- type: "PercentageOffDiscount";
1656
- percentage: number;
1657
- isExclusive: boolean;
1658
- description?: string | undefined;
1659
- total?: Record<string, number> | undefined;
1660
- recurringPaymentUseCount?: number | undefined;
1661
- promotionId?: string | undefined;
1662
- validFrom?: string | undefined;
1663
- validUntil?: string | undefined;
1664
- } | {
1665
- name: string;
1666
- type: "FlatAmountOffDiscount";
1667
- isExclusive: boolean;
1668
- description?: string | undefined;
1669
- total?: Record<string, number> | undefined;
1670
- recurringPaymentUseCount?: number | undefined;
1671
- promotionId?: string | undefined;
1672
- validFrom?: string | undefined;
1673
- validUntil?: string | undefined;
1498
+ fulfillmentType?: ActivationRequestFulfillmentType | undefined;
1499
+ trialEligibility?: {
1500
+ eligible: boolean;
1501
+ existing: boolean;
1502
+ requiresAccount: boolean;
1503
+ requiresNewsletterOptIn: boolean;
1504
+ numberOfDaysPerProduct: number;
1505
+ numberOfDaysRemaining: number;
1506
+ endless: boolean;
1507
+ } | undefined;
1508
+ licenseEligibility?: {
1509
+ eligible: boolean;
1510
+ releaseNotCovered?: {
1511
+ updatesUntil?: Date | null | undefined;
1512
+ upToMajor?: number | null | undefined;
1513
+ upToVersion?: string | null | undefined;
1514
+ upgradeUrl?: string | null | undefined;
1515
+ appVersion?: string | null | undefined;
1516
+ } | null | undefined;
1674
1517
  } | undefined;
1675
- pricingTiers?: {
1676
- minQuantity: number;
1677
- originalPrice: Record<string, number>;
1678
- price: Record<string, number>;
1679
- }[] | null | undefined;
1680
1518
  }, {
1681
1519
  id: string;
1682
- name: string;
1683
- originalPrice: Record<string, number>;
1684
- price: Record<string, number>;
1685
- hasDiscount: boolean;
1686
- recurrence: {
1687
- type: "OneOff";
1688
- } | {
1689
- type: "Recurring";
1690
- cycleLength: CycleLength;
1520
+ status: ActivationRequestStatus;
1521
+ product: {
1522
+ id: string;
1523
+ name: string;
1524
+ iconUrl: string | null;
1525
+ owned: boolean;
1526
+ type?: string | undefined;
1527
+ description?: string | null | undefined;
1528
+ tagline?: string | null | undefined;
1529
+ website?: string | null | undefined;
1530
+ currentVersion?: string | undefined;
1531
+ downloads?: {
1532
+ name: string;
1533
+ path: string | null;
1534
+ key: string;
1535
+ platform: Platform;
1536
+ size: number;
1537
+ arch?: Architecture | null | undefined;
1538
+ manifest?: {
1539
+ files: {
1540
+ name: string;
1541
+ path: string;
1542
+ }[];
1543
+ licensePath: string | null;
1544
+ } | undefined;
1545
+ }[] | undefined;
1546
+ properties?: Record<string, RawPropertyValue> | null | undefined;
1547
+ variations?: {
1548
+ id: string;
1549
+ name: string;
1550
+ originalPrice: Record<string, number>;
1551
+ price: Record<string, number>;
1552
+ hasDiscount: boolean;
1553
+ recurrence: {
1554
+ type: "OneOff";
1555
+ } | {
1556
+ type: "Recurring";
1557
+ cycleLength: CycleLength;
1558
+ };
1559
+ discount?: {
1560
+ name: string;
1561
+ type: "PercentageOffDiscount";
1562
+ percentage: number;
1563
+ isExclusive: boolean;
1564
+ description?: string | undefined;
1565
+ total?: Record<string, number> | undefined;
1566
+ recurringPaymentUseCount?: number | undefined;
1567
+ promotionId?: string | undefined;
1568
+ validFrom?: string | undefined;
1569
+ validUntil?: string | undefined;
1570
+ } | {
1571
+ name: string;
1572
+ type: "FlatAmountOffDiscount";
1573
+ isExclusive: boolean;
1574
+ description?: string | undefined;
1575
+ total?: Record<string, number> | undefined;
1576
+ recurringPaymentUseCount?: number | undefined;
1577
+ promotionId?: string | undefined;
1578
+ validFrom?: string | undefined;
1579
+ validUntil?: string | undefined;
1580
+ } | undefined;
1581
+ pricingTiers?: {
1582
+ minQuantity: number;
1583
+ originalPrice: Record<string, number>;
1584
+ price: Record<string, number>;
1585
+ }[] | null | undefined;
1586
+ }[] | undefined;
1587
+ defaultVariation?: {
1588
+ id: string;
1589
+ name: string;
1590
+ originalPrice: Record<string, number>;
1591
+ price: Record<string, number>;
1592
+ hasDiscount: boolean;
1593
+ recurrence: {
1594
+ type: "OneOff";
1595
+ } | {
1596
+ type: "Recurring";
1597
+ cycleLength: CycleLength;
1598
+ };
1599
+ discount?: {
1600
+ name: string;
1601
+ type: "PercentageOffDiscount";
1602
+ percentage: number;
1603
+ isExclusive: boolean;
1604
+ description?: string | undefined;
1605
+ total?: Record<string, number> | undefined;
1606
+ recurringPaymentUseCount?: number | undefined;
1607
+ promotionId?: string | undefined;
1608
+ validFrom?: string | undefined;
1609
+ validUntil?: string | undefined;
1610
+ } | {
1611
+ name: string;
1612
+ type: "FlatAmountOffDiscount";
1613
+ isExclusive: boolean;
1614
+ description?: string | undefined;
1615
+ total?: Record<string, number> | undefined;
1616
+ recurringPaymentUseCount?: number | undefined;
1617
+ promotionId?: string | undefined;
1618
+ validFrom?: string | undefined;
1619
+ validUntil?: string | undefined;
1620
+ } | undefined;
1621
+ pricingTiers?: {
1622
+ minQuantity: number;
1623
+ originalPrice: Record<string, number>;
1624
+ price: Record<string, number>;
1625
+ }[] | null | undefined;
1626
+ } | undefined;
1627
+ licenseUpgrades?: unknown;
1691
1628
  };
1692
- discount?: {
1693
- name: string;
1694
- type: "PercentageOffDiscount";
1695
- percentage: number;
1696
- isExclusive: boolean;
1697
- description?: string | undefined;
1698
- total?: Record<string, number> | undefined;
1699
- recurringPaymentUseCount?: number | undefined;
1700
- promotionId?: string | undefined;
1701
- validFrom?: string | undefined;
1702
- validUntil?: string | undefined;
1703
- } | {
1704
- name: string;
1705
- type: "FlatAmountOffDiscount";
1706
- isExclusive: boolean;
1707
- description?: string | undefined;
1708
- total?: Record<string, number> | undefined;
1709
- recurringPaymentUseCount?: number | undefined;
1710
- promotionId?: string | undefined;
1711
- validFrom?: string | undefined;
1712
- validUntil?: string | undefined;
1629
+ fulfillmentType?: ActivationRequestFulfillmentType | undefined;
1630
+ trialEligibility?: {
1631
+ eligible: boolean;
1632
+ existing: boolean;
1633
+ requiresAccount: boolean;
1634
+ requiresNewsletterOptIn: boolean;
1635
+ numberOfDaysPerProduct: number;
1636
+ numberOfDaysRemaining: number;
1637
+ endless?: boolean | undefined;
1638
+ } | undefined;
1639
+ licenseEligibility?: {
1640
+ eligible: boolean;
1641
+ releaseNotCovered?: unknown;
1713
1642
  } | undefined;
1714
- pricingTiers?: {
1715
- minQuantity: number;
1716
- originalPrice: Record<string, number>;
1717
- price: Record<string, number>;
1718
- }[] | null | undefined;
1719
1643
  }>;
1720
1644
 
1721
- type Discount = z.infer<typeof discountSchema>;
1722
- type PricingVariation = z.infer<typeof pricingVariationSchema>;
1723
- type PricingTier = z.infer<typeof pricingTierSchema>;
1724
- interface Page<T> {
1725
- items: Array<T>;
1726
- hasMore: boolean;
1727
- next: string | null;
1645
+ declare const schemas$b_activationRequestSchema: typeof activationRequestSchema;
1646
+ declare namespace schemas$b {
1647
+ export { schemas$b_activationRequestSchema as activationRequestSchema };
1728
1648
  }
1729
- interface Quantifiable<T> {
1730
- value: T;
1731
- quantity: number;
1649
+
1650
+ declare enum ActivationRequestFulfillmentType {
1651
+ License = "License",
1652
+ Trial = "Trial"
1732
1653
  }
1733
- type SingleOrMultiple<T> = T | T[];
1734
- interface RawPropertyObject {
1735
- [key: string]: RawPropertyValue;
1654
+ declare enum ActivationRequestStatus {
1655
+ Requested = "Requested",
1656
+ Fulfilled = "Fulfilled",
1657
+ Completed = "Completed",
1658
+ Cancelled = "Cancelled"
1736
1659
  }
1737
- type RawPropertyArray = RawPropertyValue[];
1738
- type RawPropertyValue = string | number | boolean | null | RawPropertyObject | RawPropertyArray;
1739
- declare enum CycleLength {
1740
- Daily = "Daily",
1741
- Weekly = "Weekly",
1742
- Monthly = "Monthly",
1743
- Quarterly = "Quarterly",
1744
- Yearly = "Yearly"
1660
+ type ActivationRequest = z.infer<typeof activationRequestSchema>;
1661
+ /** Why the customer's licenses cannot take this device: none covers the version the app runs. */
1662
+ type ActivationReleaseNotCovered = NonNullable<NonNullable<ActivationRequest['licenseEligibility']>['releaseNotCovered']>;
1663
+
1664
+ declare class ActivationRequestEndpoints {
1665
+ private api;
1666
+ constructor(api: MoonbaseApi);
1667
+ get(requestId: string): Promise<ActivationRequest>;
1668
+ isCompleted(requestId: string): Promise<boolean>;
1669
+ fulfillLicense(requestId: string): Promise<ActivationRequest>;
1670
+ /**
1671
+ * Starts the trial the request's app asked for. `utm` is the tracking the visitor arrived with, which the
1672
+ * trial is put down to, as a sign-up or an order is, so trials can be told apart by the marketing that
1673
+ * brought them.
1674
+ */
1675
+ fulfillTrial(requestId: string, utm?: UrchinTrackingModule): Promise<ActivationRequest>;
1676
+ cancel(requestId: string): Promise<ActivationRequest>;
1745
1677
  }
1746
- type IRecurrence = z.infer<typeof recurrenceSchema>;
1747
- type Money = z.infer<typeof moneySchema>;
1748
- declare enum MarketingConsentType {
1749
- OptIn = "OptIn",
1750
- OptedInByDefault = "OptedInByDefault",
1751
- OptOut = "OptOut"
1678
+
1679
+ declare const subscribeResponseSchema: z.ZodObject<{
1680
+ status: z.ZodEnum<["subscribed", "confirmation_sent"]>;
1681
+ }, "strip", z.ZodTypeAny, {
1682
+ status: "subscribed" | "confirmation_sent";
1683
+ }, {
1684
+ status: "subscribed" | "confirmation_sent";
1685
+ }>;
1686
+ declare const communicationPreferencesViewSchema: z.ZodObject<{
1687
+ email: z.ZodString;
1688
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1689
+ newsletter: z.ZodBoolean;
1690
+ productUpdates: z.ZodBoolean;
1691
+ }, "strip", z.ZodTypeAny, {
1692
+ email: string;
1693
+ newsletter: boolean;
1694
+ productUpdates: boolean;
1695
+ name?: string | null | undefined;
1696
+ }, {
1697
+ email: string;
1698
+ newsletter: boolean;
1699
+ productUpdates: boolean;
1700
+ name?: string | null | undefined;
1701
+ }>;
1702
+
1703
+ declare const schemas$a_communicationPreferencesViewSchema: typeof communicationPreferencesViewSchema;
1704
+ declare const schemas$a_subscribeResponseSchema: typeof subscribeResponseSchema;
1705
+ declare namespace schemas$a {
1706
+ export { schemas$a_communicationPreferencesViewSchema as communicationPreferencesViewSchema, schemas$a_subscribeResponseSchema as subscribeResponseSchema };
1752
1707
  }
1753
- /**
1754
- * A money collection is a dict of currency to amount
1755
- */
1756
- type MoneyCollection = Record<string, number>;
1757
- interface UrchinTrackingModule {
1758
- source?: string;
1759
- medium?: string;
1760
- campaign?: string;
1761
- term?: string;
1762
- content?: string;
1763
- referrer?: string;
1764
- /** Google Ads click ID, added to the landing page URL by auto-tagging. */
1765
- gclid?: string;
1766
- /** What Google Ads sends instead of `gclid` for some clicks on iOS. */
1767
- gbraid?: string;
1768
- /** What Google Ads sends instead of `gclid` for some clicks on iOS. */
1769
- wbraid?: string;
1770
- /** Meta click ID, added to links clicked on Facebook, Instagram and Messenger. */
1771
- fbclid?: string;
1772
- /** Microsoft Advertising click ID, added to the landing page URL by auto-tagging. */
1773
- msclkid?: string;
1774
- /** TikTok Ads click ID, added to the landing page URL of a TikTok ad. */
1775
- ttclid?: string;
1708
+
1709
+ type SubscribeResponse = z.infer<typeof subscribeResponseSchema>;
1710
+ type CommunicationPreferencesView = z.infer<typeof communicationPreferencesViewSchema>;
1711
+ interface SubscribeInput {
1712
+ email: string;
1713
+ name?: string | null;
1714
+ newsletter?: boolean;
1715
+ productUpdates?: boolean;
1776
1716
  /**
1777
- * The platforms whose click IDs were on the link. A click ID identifies the
1778
- * visitor's click, so the storefront only passes one on once the visitor has
1779
- * agreed to marketing cookies (`attributionConsent`). Until then it sends
1780
- * these instead, which still tell Moonbase the visit came from an ad.
1717
+ * Merchant-owned customer groups to enroll the subscriber into. Applied on
1718
+ * the same terms as the opt-in beside them: on a tenant that requires double
1719
+ * opt-in they land when the confirmation link is clicked, not here. Groups the
1720
+ * merchant has not opened to public sign-ups are skipped in silence.
1781
1721
  */
1782
- adClicks?: AdPlatform[];
1722
+ groupIds?: string[];
1723
+ /**
1724
+ * The visitor's solution to the store's captcha, for stores that ask for one
1725
+ * (`vendor.features.captcha`), solved for the `subscribe` action. Sent in the
1726
+ * `X-MB-CAPTCHA` header.
1727
+ *
1728
+ * Without it (or with one that does not check out) such a store refuses the
1729
+ * subscription with a `CaptchaRequiredError`. Solutions are single-use, so
1730
+ * reset the captcha after every attempt.
1731
+ */
1732
+ captchaToken?: string;
1783
1733
  }
1784
- /** An ad platform whose click IDs Moonbase recognises on a link. */
1785
- type AdPlatform = 'google' | 'microsoft' | 'meta' | 'tiktok';
1734
+ interface CommunicationPreferencesInput {
1735
+ newsletter: boolean;
1736
+ productUpdates: boolean;
1737
+ }
1738
+
1739
+ declare class CommunicationsEndpoints {
1740
+ private api;
1741
+ constructor(api: MoonbaseApi);
1742
+ subscribe(input: SubscribeInput): Promise<SubscribeResponse>;
1743
+ confirm(email: string, token: string): Promise<void>;
1744
+ getPreferences(email: string, token: string): Promise<CommunicationPreferencesView>;
1745
+ updatePreferences(email: string, token: string, preferences: CommunicationPreferencesInput): Promise<CommunicationPreferencesView>;
1746
+ unsubscribe(email: string, token: string): Promise<void>;
1747
+ }
1748
+
1749
+ declare class GroupEndpoints {
1750
+ private api;
1751
+ constructor(api: MoonbaseApi);
1752
+ /**
1753
+ * Joins the signed-in customer to a merchant-owned group that has been opened
1754
+ * to public sign-ups.
1755
+ *
1756
+ * The one group call that reports failure. Group IDs sent along with sign-up,
1757
+ * a newsletter subscription or a checkout are passengers on a request that
1758
+ * wanted something else, so an unusable one is skipped rather than allowed to
1759
+ * fail the account, the subscription or the sale. Here joining *is* the
1760
+ * request, so it throws.
1761
+ *
1762
+ * Every reason it can fail (no such group, deleted, closed, a segment, a
1763
+ * system group, another tenant's) arrives as the same `NotFoundError`, so
1764
+ * that a customer of one tenant can't enumerate that merchant's group IDs.
1765
+ *
1766
+ * Idempotent: joining a group the customer is already in succeeds and changes
1767
+ * nothing.
1768
+ */
1769
+ join(groupId: string): Promise<void>;
1770
+ }
1771
+
1786
1772
  /**
1787
- * The query parameters for `utm`: the tags and referrer as `utm_*`, the ad
1788
- * click IDs under their own names (`gclid`, `gbraid`, `wbraid`, `fbclid`,
1789
- * `msclkid`, `ttclid`), as they appear on the landing page URL, and the
1790
- * platforms they came from as `utm_ad_click`. Fields left out are not sent.
1773
+ * The password a customer chose at sign-up for an address that already had an account without
1774
+ * one, kept until the link Moonbase emails comes back. The server hands it back sealed, as
1775
+ * `pendingPasswordToken`, and confirming the account with it sets that password rather than
1776
+ * asking for another.
1777
+ *
1778
+ * Kept in `localStorage`, so the link finds it in whichever tab of this site it opens in, and
1779
+ * only in the browser that typed the password: whoever signs up with somebody else's address
1780
+ * gets the token, but never the emailed code it needs. Like the token store, every operation
1781
+ * degrades to memory when storage fails, in which case the link asks for the password again.
1782
+ *
1783
+ * Only ever filled from a sign-up response, never from a URL parameter or anything else a link
1784
+ * can carry: a token planted from a link would let an attacker's password ride on the victim's
1785
+ * own click.
1791
1786
  */
1792
- declare function utmToObject(utm?: UrchinTrackingModule): Record<string, string>;
1787
+ declare class PendingPasswordStore {
1788
+ private readonly store;
1789
+ static readonly storageKey = "moonbase_pending_passwords";
1790
+ constructor(store?: IStore);
1791
+ get(email: string): string | null;
1792
+ set(email: string, token: string): void;
1793
+ remove(email: string): void;
1794
+ /** The entries still worth keeping. Drops the rest from storage as it goes. */
1795
+ private read;
1796
+ private write;
1797
+ }
1793
1798
 
1794
1799
  declare const addressSchema: z.ZodObject<{
1795
1800
  countryCode: z.ZodString;
@@ -2377,6 +2382,13 @@ declare class IdentityEndpoints {
2377
2382
  hasSubscriptions?: boolean | null | undefined;
2378
2383
  };
2379
2384
  }>;
2385
+ /**
2386
+ * Saves the signed-in customer's address, which their next checkout starts from. A checkout
2387
+ * they have already entered billing details in keeps those. Rejects with a `MoonbaseError` for
2388
+ * an address the store can't use: it needs a known country, a street address, a city or a
2389
+ * region, and in the US a postal code.
2390
+ */
2391
+ updateAddress(address: Address): Promise<User>;
2380
2392
  setPassword(currentPassword: string, newPassword: string): Promise<void>;
2381
2393
  forgotPassword(email: string): Promise<void>;
2382
2394
  resetPassword(email: string, newPassword: string, code: string): Promise<void>;