@moonbase.sh/storefront-api 0.1.83 → 0.1.85

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
@@ -202,6 +202,475 @@ declare class MoonbaseApi {
202
202
  fetch(path: string, method?: HttpMethods, body?: any): Promise<any>;
203
203
  }
204
204
 
205
+ declare const activationRequestSchema: z.ZodObject<{
206
+ id: z.ZodString;
207
+ status: z.ZodNativeEnum<typeof ActivationRequestStatus>;
208
+ product: z.ZodObject<{
209
+ id: z.ZodString;
210
+ name: z.ZodString;
211
+ tagline: z.ZodString;
212
+ iconUrl: z.ZodNullable<z.ZodString>;
213
+ owned: z.ZodBoolean;
214
+ currentVersion: z.ZodOptional<z.ZodString>;
215
+ downloads: z.ZodOptional<z.ZodArray<z.ZodObject<{
216
+ name: z.ZodString;
217
+ key: z.ZodString;
218
+ platform: z.ZodNativeEnum<typeof Platform>;
219
+ size: z.ZodNumber;
220
+ path: z.ZodNullable<z.ZodString>;
221
+ }, "strip", z.ZodTypeAny, {
222
+ path: string | null;
223
+ name: string;
224
+ key: string;
225
+ platform: Platform;
226
+ size: number;
227
+ }, {
228
+ path: string | null;
229
+ name: string;
230
+ key: string;
231
+ platform: Platform;
232
+ size: number;
233
+ }>, "many">>;
234
+ defaultVariation: z.ZodOptional<z.ZodObject<{
235
+ id: z.ZodString;
236
+ name: z.ZodString;
237
+ originalPrice: z.ZodRecord<z.ZodString, z.ZodNumber>;
238
+ price: z.ZodRecord<z.ZodString, z.ZodNumber>;
239
+ hasDiscount: z.ZodBoolean;
240
+ discount: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
241
+ type: z.ZodLiteral<"PercentageOffDiscount">;
242
+ name: z.ZodString;
243
+ description: z.ZodOptional<z.ZodString>;
244
+ percentage: z.ZodNumber;
245
+ total: z.ZodRecord<z.ZodString, z.ZodNumber>;
246
+ }, "strip", z.ZodTypeAny, {
247
+ type: "PercentageOffDiscount";
248
+ name: string;
249
+ percentage: number;
250
+ total: Record<string, number>;
251
+ description?: string | undefined;
252
+ }, {
253
+ type: "PercentageOffDiscount";
254
+ name: string;
255
+ percentage: number;
256
+ total: Record<string, number>;
257
+ description?: string | undefined;
258
+ }>, z.ZodObject<{
259
+ type: z.ZodLiteral<"FlatAmountOffDiscount">;
260
+ name: z.ZodString;
261
+ description: z.ZodOptional<z.ZodString>;
262
+ total: z.ZodRecord<z.ZodString, z.ZodNumber>;
263
+ }, "strip", z.ZodTypeAny, {
264
+ type: "FlatAmountOffDiscount";
265
+ name: string;
266
+ total: Record<string, number>;
267
+ description?: string | undefined;
268
+ }, {
269
+ type: "FlatAmountOffDiscount";
270
+ name: string;
271
+ total: Record<string, number>;
272
+ description?: string | undefined;
273
+ }>]>>;
274
+ }, "strip", z.ZodTypeAny, {
275
+ id: string;
276
+ name: string;
277
+ originalPrice: Record<string, number>;
278
+ price: Record<string, number>;
279
+ hasDiscount: boolean;
280
+ discount?: {
281
+ type: "PercentageOffDiscount";
282
+ name: string;
283
+ percentage: number;
284
+ total: Record<string, number>;
285
+ description?: string | undefined;
286
+ } | {
287
+ type: "FlatAmountOffDiscount";
288
+ name: string;
289
+ total: Record<string, number>;
290
+ description?: string | undefined;
291
+ } | undefined;
292
+ }, {
293
+ id: string;
294
+ name: string;
295
+ originalPrice: Record<string, number>;
296
+ price: Record<string, number>;
297
+ hasDiscount: boolean;
298
+ discount?: {
299
+ type: "PercentageOffDiscount";
300
+ name: string;
301
+ percentage: number;
302
+ total: Record<string, number>;
303
+ description?: string | undefined;
304
+ } | {
305
+ type: "FlatAmountOffDiscount";
306
+ name: string;
307
+ total: Record<string, number>;
308
+ description?: string | undefined;
309
+ } | undefined;
310
+ }>>;
311
+ variations: z.ZodOptional<z.ZodArray<z.ZodObject<{
312
+ id: z.ZodString;
313
+ name: z.ZodString;
314
+ originalPrice: z.ZodRecord<z.ZodString, z.ZodNumber>;
315
+ price: z.ZodRecord<z.ZodString, z.ZodNumber>;
316
+ hasDiscount: z.ZodBoolean;
317
+ discount: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
318
+ type: z.ZodLiteral<"PercentageOffDiscount">;
319
+ name: z.ZodString;
320
+ description: z.ZodOptional<z.ZodString>;
321
+ percentage: z.ZodNumber;
322
+ total: z.ZodRecord<z.ZodString, z.ZodNumber>;
323
+ }, "strip", z.ZodTypeAny, {
324
+ type: "PercentageOffDiscount";
325
+ name: string;
326
+ percentage: number;
327
+ total: Record<string, number>;
328
+ description?: string | undefined;
329
+ }, {
330
+ type: "PercentageOffDiscount";
331
+ name: string;
332
+ percentage: number;
333
+ total: Record<string, number>;
334
+ description?: string | undefined;
335
+ }>, z.ZodObject<{
336
+ type: z.ZodLiteral<"FlatAmountOffDiscount">;
337
+ name: z.ZodString;
338
+ description: z.ZodOptional<z.ZodString>;
339
+ total: z.ZodRecord<z.ZodString, z.ZodNumber>;
340
+ }, "strip", z.ZodTypeAny, {
341
+ type: "FlatAmountOffDiscount";
342
+ name: string;
343
+ total: Record<string, number>;
344
+ description?: string | undefined;
345
+ }, {
346
+ type: "FlatAmountOffDiscount";
347
+ name: string;
348
+ total: Record<string, number>;
349
+ description?: string | undefined;
350
+ }>]>>;
351
+ }, "strip", z.ZodTypeAny, {
352
+ id: string;
353
+ name: string;
354
+ originalPrice: Record<string, number>;
355
+ price: Record<string, number>;
356
+ hasDiscount: boolean;
357
+ discount?: {
358
+ type: "PercentageOffDiscount";
359
+ name: string;
360
+ percentage: number;
361
+ total: Record<string, number>;
362
+ description?: string | undefined;
363
+ } | {
364
+ type: "FlatAmountOffDiscount";
365
+ name: string;
366
+ total: Record<string, number>;
367
+ description?: string | undefined;
368
+ } | undefined;
369
+ }, {
370
+ id: string;
371
+ name: string;
372
+ originalPrice: Record<string, number>;
373
+ price: Record<string, number>;
374
+ hasDiscount: boolean;
375
+ discount?: {
376
+ type: "PercentageOffDiscount";
377
+ name: string;
378
+ percentage: number;
379
+ total: Record<string, number>;
380
+ description?: string | undefined;
381
+ } | {
382
+ type: "FlatAmountOffDiscount";
383
+ name: string;
384
+ total: Record<string, number>;
385
+ description?: string | undefined;
386
+ } | undefined;
387
+ }>, "many">>;
388
+ type: z.ZodPipeline<z.ZodEffects<z.ZodVoid, string, void>, z.ZodLiteral<"product">>;
389
+ }, "strip", z.ZodTypeAny, {
390
+ type: "product";
391
+ id: string;
392
+ name: string;
393
+ tagline: string;
394
+ iconUrl: string | null;
395
+ owned: boolean;
396
+ currentVersion?: string | undefined;
397
+ downloads?: {
398
+ path: string | null;
399
+ name: string;
400
+ key: string;
401
+ platform: Platform;
402
+ size: number;
403
+ }[] | undefined;
404
+ defaultVariation?: {
405
+ id: string;
406
+ name: string;
407
+ originalPrice: Record<string, number>;
408
+ price: Record<string, number>;
409
+ hasDiscount: boolean;
410
+ discount?: {
411
+ type: "PercentageOffDiscount";
412
+ name: string;
413
+ percentage: number;
414
+ total: Record<string, number>;
415
+ description?: string | undefined;
416
+ } | {
417
+ type: "FlatAmountOffDiscount";
418
+ name: string;
419
+ total: Record<string, number>;
420
+ description?: string | undefined;
421
+ } | undefined;
422
+ } | undefined;
423
+ variations?: {
424
+ id: string;
425
+ name: string;
426
+ originalPrice: Record<string, number>;
427
+ price: Record<string, number>;
428
+ hasDiscount: boolean;
429
+ discount?: {
430
+ type: "PercentageOffDiscount";
431
+ name: string;
432
+ percentage: number;
433
+ total: Record<string, number>;
434
+ description?: string | undefined;
435
+ } | {
436
+ type: "FlatAmountOffDiscount";
437
+ name: string;
438
+ total: Record<string, number>;
439
+ description?: string | undefined;
440
+ } | undefined;
441
+ }[] | undefined;
442
+ }, {
443
+ id: string;
444
+ name: string;
445
+ tagline: string;
446
+ iconUrl: string | null;
447
+ owned: boolean;
448
+ currentVersion?: string | undefined;
449
+ downloads?: {
450
+ path: string | null;
451
+ name: string;
452
+ key: string;
453
+ platform: Platform;
454
+ size: number;
455
+ }[] | undefined;
456
+ defaultVariation?: {
457
+ id: string;
458
+ name: string;
459
+ originalPrice: Record<string, number>;
460
+ price: Record<string, number>;
461
+ hasDiscount: boolean;
462
+ discount?: {
463
+ type: "PercentageOffDiscount";
464
+ name: string;
465
+ percentage: number;
466
+ total: Record<string, number>;
467
+ description?: string | undefined;
468
+ } | {
469
+ type: "FlatAmountOffDiscount";
470
+ name: string;
471
+ total: Record<string, number>;
472
+ description?: string | undefined;
473
+ } | undefined;
474
+ } | undefined;
475
+ variations?: {
476
+ id: string;
477
+ name: string;
478
+ originalPrice: Record<string, number>;
479
+ price: Record<string, number>;
480
+ hasDiscount: boolean;
481
+ discount?: {
482
+ type: "PercentageOffDiscount";
483
+ name: string;
484
+ percentage: number;
485
+ total: Record<string, number>;
486
+ description?: string | undefined;
487
+ } | {
488
+ type: "FlatAmountOffDiscount";
489
+ name: string;
490
+ total: Record<string, number>;
491
+ description?: string | undefined;
492
+ } | undefined;
493
+ }[] | undefined;
494
+ type?: void | undefined;
495
+ }>;
496
+ trialEligibility: z.ZodOptional<z.ZodObject<{
497
+ eligible: z.ZodBoolean;
498
+ existing: z.ZodBoolean;
499
+ requiresAccount: z.ZodBoolean;
500
+ numberOfDaysPerProduct: z.ZodNumber;
501
+ numberOfDaysRemaining: z.ZodNumber;
502
+ }, "strip", z.ZodTypeAny, {
503
+ eligible: boolean;
504
+ existing: boolean;
505
+ requiresAccount: boolean;
506
+ numberOfDaysPerProduct: number;
507
+ numberOfDaysRemaining: number;
508
+ }, {
509
+ eligible: boolean;
510
+ existing: boolean;
511
+ requiresAccount: boolean;
512
+ numberOfDaysPerProduct: number;
513
+ numberOfDaysRemaining: number;
514
+ }>>;
515
+ licenseEligibility: z.ZodOptional<z.ZodObject<{
516
+ eligible: z.ZodBoolean;
517
+ }, "strip", z.ZodTypeAny, {
518
+ eligible: boolean;
519
+ }, {
520
+ eligible: boolean;
521
+ }>>;
522
+ }, "strip", z.ZodTypeAny, {
523
+ status: ActivationRequestStatus;
524
+ id: string;
525
+ product: {
526
+ type: "product";
527
+ id: string;
528
+ name: string;
529
+ tagline: string;
530
+ iconUrl: string | null;
531
+ owned: boolean;
532
+ currentVersion?: string | undefined;
533
+ downloads?: {
534
+ path: string | null;
535
+ name: string;
536
+ key: string;
537
+ platform: Platform;
538
+ size: number;
539
+ }[] | undefined;
540
+ defaultVariation?: {
541
+ id: string;
542
+ name: string;
543
+ originalPrice: Record<string, number>;
544
+ price: Record<string, number>;
545
+ hasDiscount: boolean;
546
+ discount?: {
547
+ type: "PercentageOffDiscount";
548
+ name: string;
549
+ percentage: number;
550
+ total: Record<string, number>;
551
+ description?: string | undefined;
552
+ } | {
553
+ type: "FlatAmountOffDiscount";
554
+ name: string;
555
+ total: Record<string, number>;
556
+ description?: string | undefined;
557
+ } | undefined;
558
+ } | undefined;
559
+ variations?: {
560
+ id: string;
561
+ name: string;
562
+ originalPrice: Record<string, number>;
563
+ price: Record<string, number>;
564
+ hasDiscount: boolean;
565
+ discount?: {
566
+ type: "PercentageOffDiscount";
567
+ name: string;
568
+ percentage: number;
569
+ total: Record<string, number>;
570
+ description?: string | undefined;
571
+ } | {
572
+ type: "FlatAmountOffDiscount";
573
+ name: string;
574
+ total: Record<string, number>;
575
+ description?: string | undefined;
576
+ } | undefined;
577
+ }[] | undefined;
578
+ };
579
+ trialEligibility?: {
580
+ eligible: boolean;
581
+ existing: boolean;
582
+ requiresAccount: boolean;
583
+ numberOfDaysPerProduct: number;
584
+ numberOfDaysRemaining: number;
585
+ } | undefined;
586
+ licenseEligibility?: {
587
+ eligible: boolean;
588
+ } | undefined;
589
+ }, {
590
+ status: ActivationRequestStatus;
591
+ id: string;
592
+ product: {
593
+ id: string;
594
+ name: string;
595
+ tagline: string;
596
+ iconUrl: string | null;
597
+ owned: boolean;
598
+ currentVersion?: string | undefined;
599
+ downloads?: {
600
+ path: string | null;
601
+ name: string;
602
+ key: string;
603
+ platform: Platform;
604
+ size: number;
605
+ }[] | undefined;
606
+ defaultVariation?: {
607
+ id: string;
608
+ name: string;
609
+ originalPrice: Record<string, number>;
610
+ price: Record<string, number>;
611
+ hasDiscount: boolean;
612
+ discount?: {
613
+ type: "PercentageOffDiscount";
614
+ name: string;
615
+ percentage: number;
616
+ total: Record<string, number>;
617
+ description?: string | undefined;
618
+ } | {
619
+ type: "FlatAmountOffDiscount";
620
+ name: string;
621
+ total: Record<string, number>;
622
+ description?: string | undefined;
623
+ } | undefined;
624
+ } | undefined;
625
+ variations?: {
626
+ id: string;
627
+ name: string;
628
+ originalPrice: Record<string, number>;
629
+ price: Record<string, number>;
630
+ hasDiscount: boolean;
631
+ discount?: {
632
+ type: "PercentageOffDiscount";
633
+ name: string;
634
+ percentage: number;
635
+ total: Record<string, number>;
636
+ description?: string | undefined;
637
+ } | {
638
+ type: "FlatAmountOffDiscount";
639
+ name: string;
640
+ total: Record<string, number>;
641
+ description?: string | undefined;
642
+ } | undefined;
643
+ }[] | undefined;
644
+ type?: void | undefined;
645
+ };
646
+ trialEligibility?: {
647
+ eligible: boolean;
648
+ existing: boolean;
649
+ requiresAccount: boolean;
650
+ numberOfDaysPerProduct: number;
651
+ numberOfDaysRemaining: number;
652
+ } | undefined;
653
+ licenseEligibility?: {
654
+ eligible: boolean;
655
+ } | undefined;
656
+ }>;
657
+
658
+ declare enum ActivationRequestStatus {
659
+ Requested = "Requested",
660
+ Fulfilled = "Fulfilled",
661
+ Completed = "Completed"
662
+ }
663
+ type ActivationRequest = z.infer<typeof activationRequestSchema>;
664
+
665
+ declare class ActivationRequestEndpoints {
666
+ private api;
667
+ constructor(api: MoonbaseApi);
668
+ get(requestId: string): Promise<ActivationRequest>;
669
+ isCompleted(requestId: string): Promise<boolean>;
670
+ fulfillLicense(requestId: string): Promise<ActivationRequest>;
671
+ fulfillTrial(requestId: string): Promise<ActivationRequest>;
672
+ }
673
+
205
674
  type CommunicationPreferences = z.infer<typeof communicationPreferencesSchema>;
206
675
  type User = z.infer<typeof userSchema>;
207
676
  type Address = z.infer<typeof addressSchema>;
@@ -12633,8 +13102,9 @@ declare class MoonbaseClient {
12633
13102
  identity: IdentityEndpoints;
12634
13103
  vouchers: VoucherEndpoints;
12635
13104
  licenses: LicenseEndpoints;
13105
+ activationRequests: ActivationRequestEndpoints;
12636
13106
  products: ProductEndpoints;
12637
13107
  orders: OrderEndpoints;
12638
13108
  }
12639
13109
 
12640
- export { type Activation, ActivationMethod, ActivationStatus, type Address, type BundleLineItem, type CommunicationPreferences, type Download, type License, LicenseStatus, type LineItem, MoonbaseClient, type MoonbaseConfiguration, NotAuthenticatedError, NotAuthorizedError, NotFoundError, type OpenOrder, type Order, OrderStatus, type OwnedProduct, type Page, Platform, type PricingVariation, type ProductLineItem, type Quantifiable, type Storefront, type StorefrontBundle, type StorefrontProduct, type User, type Voucher };
13110
+ export { type Activation, ActivationMethod, type ActivationRequest, ActivationRequestStatus, ActivationStatus, type Address, type BundleLineItem, type CommunicationPreferences, type Download, type License, LicenseStatus, type LineItem, MoonbaseClient, type MoonbaseConfiguration, NotAuthenticatedError, NotAuthorizedError, NotFoundError, type OpenOrder, type Order, OrderStatus, type OwnedProduct, type Page, Platform, type PricingVariation, type ProductLineItem, type Quantifiable, type Storefront, type StorefrontBundle, type StorefrontProduct, type User, type Voucher };