@moonbase.sh/vue 0.3.4 → 0.3.6
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.cjs +66 -32
- package/dist/index.d.cts +910 -2
- package/dist/index.d.ts +910 -2
- package/dist/index.js +66 -32
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _moonbase_sh_storefront_api from '@moonbase.sh/storefront-api';
|
|
2
|
-
import { MoonbaseConfiguration, Storefront, Order, User, UrchinTrackingModule, MoonbaseClient, OpenOrder, CompletedOrder, ActivationRequest, Address, CommunicationPreferences, StorefrontBundle, StorefrontProduct, PricingVariation, ActivationMethod, Activation, Download, Vendor, LineItem } from '@moonbase.sh/storefront-api';
|
|
2
|
+
import { MoonbaseConfiguration, Storefront, Order, User, UrchinTrackingModule, MoonbaseClient, OpenOrder, Money, CompletedOrder, ActivationRequest, Address, CommunicationPreferences, StorefrontBundle, StorefrontProduct, PricingVariation, ActivationMethod, Activation, Download, Vendor, LineItem } from '@moonbase.sh/storefront-api';
|
|
3
3
|
export * from '@moonbase.sh/storefront-api';
|
|
4
4
|
import * as vue from 'vue';
|
|
5
5
|
import { Plugin, Ref, App, UnwrapRef, InjectionKey } from 'vue';
|
|
@@ -23,7 +23,7 @@ interface StorefrontContext extends Pick<Plugin, keyof Plugin> {
|
|
|
23
23
|
resetOrder: () => void;
|
|
24
24
|
surrenderOrder: () => Promise<void>;
|
|
25
25
|
closeCheckout: () => void;
|
|
26
|
-
onCheckoutInitiated: (callback: (order: OpenOrder) => void) => void;
|
|
26
|
+
onCheckoutInitiated: (callback: (order: OpenOrder, total: Money) => void) => void;
|
|
27
27
|
onCheckoutCompleted: (callback: (order: CompletedOrder) => void) => void;
|
|
28
28
|
onCheckoutClosed: (callback: (intent: string | undefined) => void) => void;
|
|
29
29
|
/**
|
|
@@ -68,6 +68,9 @@ declare function useAuth(context?: StorefrontContext): {
|
|
|
68
68
|
postCode: string;
|
|
69
69
|
} | undefined;
|
|
70
70
|
ownedProducts?: string[] | undefined;
|
|
71
|
+
subscribedProducts?: string[] | undefined;
|
|
72
|
+
hasProducts?: boolean | null | undefined;
|
|
73
|
+
hasSubscriptions?: boolean | null | undefined;
|
|
71
74
|
} | null, {
|
|
72
75
|
id: string;
|
|
73
76
|
email: string;
|
|
@@ -85,6 +88,9 @@ declare function useAuth(context?: StorefrontContext): {
|
|
|
85
88
|
postCode: string;
|
|
86
89
|
} | undefined;
|
|
87
90
|
ownedProducts?: string[] | undefined;
|
|
91
|
+
subscribedProducts?: string[] | undefined;
|
|
92
|
+
hasProducts?: boolean | null | undefined;
|
|
93
|
+
hasSubscriptions?: boolean | null | undefined;
|
|
88
94
|
} | null>;
|
|
89
95
|
loaded: vue.Ref<boolean, boolean>;
|
|
90
96
|
loadedPromise: Promise<void>;
|
|
@@ -105,6 +111,9 @@ declare function useAuth(context?: StorefrontContext): {
|
|
|
105
111
|
postCode: string;
|
|
106
112
|
} | undefined;
|
|
107
113
|
ownedProducts?: string[] | undefined;
|
|
114
|
+
subscribedProducts?: string[] | undefined;
|
|
115
|
+
hasProducts?: boolean | null | undefined;
|
|
116
|
+
hasSubscriptions?: boolean | null | undefined;
|
|
108
117
|
}>;
|
|
109
118
|
signUp: (name: string, email: string, password: string, address: Address | null | undefined, acceptedPrivacyPolicy: boolean, acceptedTermsAndConditions: boolean, communicationOptIn?: boolean) => Promise<{
|
|
110
119
|
id: string;
|
|
@@ -123,6 +132,9 @@ declare function useAuth(context?: StorefrontContext): {
|
|
|
123
132
|
postCode: string;
|
|
124
133
|
} | undefined;
|
|
125
134
|
ownedProducts?: string[] | undefined;
|
|
135
|
+
subscribedProducts?: string[] | undefined;
|
|
136
|
+
hasProducts?: boolean | null | undefined;
|
|
137
|
+
hasSubscriptions?: boolean | null | undefined;
|
|
126
138
|
}>;
|
|
127
139
|
signOut: () => Promise<void>;
|
|
128
140
|
update: (name: string, email: string, emailConfirmationToken?: string, communicationPreferences?: CommunicationPreferences) => Promise<{
|
|
@@ -155,6 +167,9 @@ declare function useAuth(context?: StorefrontContext): {
|
|
|
155
167
|
postCode: string;
|
|
156
168
|
} | undefined;
|
|
157
169
|
ownedProducts?: string[] | undefined;
|
|
170
|
+
subscribedProducts?: string[] | undefined;
|
|
171
|
+
hasProducts?: boolean | null | undefined;
|
|
172
|
+
hasSubscriptions?: boolean | null | undefined;
|
|
158
173
|
} | null>;
|
|
159
174
|
};
|
|
160
175
|
|
|
@@ -308,6 +323,7 @@ declare function useCart(context?: StorefrontContext): {
|
|
|
308
323
|
returnUrl?: string;
|
|
309
324
|
}) => Promise<{
|
|
310
325
|
next: string | undefined;
|
|
326
|
+
completed: boolean;
|
|
311
327
|
} | undefined>;
|
|
312
328
|
};
|
|
313
329
|
|
|
@@ -321,6 +337,7 @@ declare function useCheckout(items: CheckoutItem[], options: {
|
|
|
321
337
|
returnUrl?: string;
|
|
322
338
|
}, context?: StorefrontContext): Promise<{
|
|
323
339
|
next: string | undefined;
|
|
340
|
+
completed: boolean;
|
|
324
341
|
}>;
|
|
325
342
|
|
|
326
343
|
declare function useInventory(context?: StorefrontContext): {
|
|
@@ -342,6 +359,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
342
359
|
currentActivations?: number | undefined;
|
|
343
360
|
maxActivations?: number | undefined;
|
|
344
361
|
externalLicenses?: number | undefined;
|
|
362
|
+
subscriptionLicenses?: number | undefined;
|
|
345
363
|
version?: string | undefined;
|
|
346
364
|
prerelease?: boolean | undefined;
|
|
347
365
|
releaseDescription?: string | undefined;
|
|
@@ -363,6 +381,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
363
381
|
activeNumberOfActivations: number;
|
|
364
382
|
maxNumberOfActivations: number;
|
|
365
383
|
createdAt: Date;
|
|
384
|
+
expiresAt?: Date | undefined;
|
|
366
385
|
externalFulfillment?: string | undefined;
|
|
367
386
|
}>>;
|
|
368
387
|
getLicenseActivations: (licenseId: string, nextUrl?: string) => Promise<_moonbase_sh_storefront_api.Page<{
|
|
@@ -389,6 +408,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
389
408
|
currentActivations?: number | undefined;
|
|
390
409
|
maxActivations?: number | undefined;
|
|
391
410
|
externalLicenses?: number | undefined;
|
|
411
|
+
subscriptionLicenses?: number | undefined;
|
|
392
412
|
version?: string | undefined;
|
|
393
413
|
prerelease?: boolean | undefined;
|
|
394
414
|
releaseDescription?: string | undefined;
|
|
@@ -422,6 +442,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
422
442
|
currentActivations?: number | undefined;
|
|
423
443
|
maxActivations?: number | undefined;
|
|
424
444
|
externalLicenses?: number | undefined;
|
|
445
|
+
subscriptionLicenses?: number | undefined;
|
|
425
446
|
version?: string | undefined;
|
|
426
447
|
prerelease?: boolean | undefined;
|
|
427
448
|
releaseDescription?: string | undefined;
|
|
@@ -458,6 +479,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
458
479
|
currentActivations?: number | undefined;
|
|
459
480
|
maxActivations?: number | undefined;
|
|
460
481
|
externalLicenses?: number | undefined;
|
|
482
|
+
subscriptionLicenses?: number | undefined;
|
|
461
483
|
version?: string | undefined;
|
|
462
484
|
prerelease?: boolean | undefined;
|
|
463
485
|
releaseDescription?: string | undefined;
|
|
@@ -479,6 +501,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
479
501
|
activeNumberOfActivations: number;
|
|
480
502
|
maxNumberOfActivations: number;
|
|
481
503
|
createdAt: Date;
|
|
504
|
+
expiresAt?: Date | undefined;
|
|
482
505
|
externalFulfillment?: string | undefined;
|
|
483
506
|
}>>;
|
|
484
507
|
getProductActivations: (productId: string, nextUrl?: string) => Promise<_moonbase_sh_storefront_api.Page<{
|
|
@@ -510,6 +533,7 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
510
533
|
currentActivations?: number | undefined;
|
|
511
534
|
maxActivations?: number | undefined;
|
|
512
535
|
externalLicenses?: number | undefined;
|
|
536
|
+
subscriptionLicenses?: number | undefined;
|
|
513
537
|
version?: string | undefined;
|
|
514
538
|
prerelease?: boolean | undefined;
|
|
515
539
|
releaseDescription?: string | undefined;
|
|
@@ -531,11 +555,895 @@ declare function useInventory(context?: StorefrontContext): {
|
|
|
531
555
|
activeNumberOfActivations: number;
|
|
532
556
|
maxNumberOfActivations: number;
|
|
533
557
|
createdAt: Date;
|
|
558
|
+
expiresAt?: Date | undefined;
|
|
534
559
|
externalFulfillment?: string | undefined;
|
|
535
560
|
};
|
|
536
561
|
url: string;
|
|
537
562
|
}>;
|
|
538
563
|
downloadProduct: (download: Download) => Promise<void>;
|
|
564
|
+
getSubscriptions: (nextUrl?: string) => Promise<_moonbase_sh_storefront_api.Page<{
|
|
565
|
+
status: _moonbase_sh_storefront_api.SubscriptionStatus;
|
|
566
|
+
id: string;
|
|
567
|
+
expiresAt: Date;
|
|
568
|
+
total: {
|
|
569
|
+
discount: {
|
|
570
|
+
currency: string;
|
|
571
|
+
amount: number;
|
|
572
|
+
};
|
|
573
|
+
original: {
|
|
574
|
+
currency: string;
|
|
575
|
+
amount: number;
|
|
576
|
+
};
|
|
577
|
+
subtotal: {
|
|
578
|
+
currency: string;
|
|
579
|
+
amount: number;
|
|
580
|
+
};
|
|
581
|
+
taxes: {
|
|
582
|
+
currency: string;
|
|
583
|
+
amount: number;
|
|
584
|
+
};
|
|
585
|
+
due: {
|
|
586
|
+
currency: string;
|
|
587
|
+
amount: number;
|
|
588
|
+
};
|
|
589
|
+
};
|
|
590
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
591
|
+
hasPaymentMethod: boolean;
|
|
592
|
+
renewedAt: Date | null;
|
|
593
|
+
startedAt: Date;
|
|
594
|
+
content: {
|
|
595
|
+
type: "Product";
|
|
596
|
+
quantity: number;
|
|
597
|
+
product: {
|
|
598
|
+
type: "product";
|
|
599
|
+
id: string;
|
|
600
|
+
name: string;
|
|
601
|
+
description: string;
|
|
602
|
+
tagline: string;
|
|
603
|
+
iconUrl: string | null;
|
|
604
|
+
owned: boolean;
|
|
605
|
+
website?: string | null | undefined;
|
|
606
|
+
currentVersion?: string | undefined;
|
|
607
|
+
downloads?: {
|
|
608
|
+
path: string | null;
|
|
609
|
+
name: string;
|
|
610
|
+
key: string;
|
|
611
|
+
platform: _moonbase_sh_storefront_api.Platform;
|
|
612
|
+
size: number;
|
|
613
|
+
manifest?: {
|
|
614
|
+
files: {
|
|
615
|
+
path: string;
|
|
616
|
+
name: string;
|
|
617
|
+
}[];
|
|
618
|
+
licensePath: string | null;
|
|
619
|
+
} | undefined;
|
|
620
|
+
}[] | undefined;
|
|
621
|
+
defaultVariation?: {
|
|
622
|
+
id: string;
|
|
623
|
+
name: string;
|
|
624
|
+
originalPrice: Record<string, number>;
|
|
625
|
+
price: Record<string, number>;
|
|
626
|
+
hasDiscount: boolean;
|
|
627
|
+
recurrence: {
|
|
628
|
+
type: "OneOff";
|
|
629
|
+
} | {
|
|
630
|
+
type: "Recurring";
|
|
631
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
632
|
+
};
|
|
633
|
+
discount?: {
|
|
634
|
+
type: "PercentageOffDiscount";
|
|
635
|
+
name: string;
|
|
636
|
+
percentage: number;
|
|
637
|
+
isExclusive: boolean;
|
|
638
|
+
description?: string | undefined;
|
|
639
|
+
total?: Record<string, number> | undefined;
|
|
640
|
+
} | {
|
|
641
|
+
type: "FlatAmountOffDiscount";
|
|
642
|
+
name: string;
|
|
643
|
+
isExclusive: boolean;
|
|
644
|
+
description?: string | undefined;
|
|
645
|
+
total?: Record<string, number> | undefined;
|
|
646
|
+
} | undefined;
|
|
647
|
+
pricingTiers?: {
|
|
648
|
+
originalPrice: Record<string, number>;
|
|
649
|
+
price: Record<string, number>;
|
|
650
|
+
minQuantity: number;
|
|
651
|
+
}[] | null | undefined;
|
|
652
|
+
} | undefined;
|
|
653
|
+
variations?: {
|
|
654
|
+
id: string;
|
|
655
|
+
name: string;
|
|
656
|
+
originalPrice: Record<string, number>;
|
|
657
|
+
price: Record<string, number>;
|
|
658
|
+
hasDiscount: boolean;
|
|
659
|
+
recurrence: {
|
|
660
|
+
type: "OneOff";
|
|
661
|
+
} | {
|
|
662
|
+
type: "Recurring";
|
|
663
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
664
|
+
};
|
|
665
|
+
discount?: {
|
|
666
|
+
type: "PercentageOffDiscount";
|
|
667
|
+
name: string;
|
|
668
|
+
percentage: number;
|
|
669
|
+
isExclusive: boolean;
|
|
670
|
+
description?: string | undefined;
|
|
671
|
+
total?: Record<string, number> | undefined;
|
|
672
|
+
} | {
|
|
673
|
+
type: "FlatAmountOffDiscount";
|
|
674
|
+
name: string;
|
|
675
|
+
isExclusive: boolean;
|
|
676
|
+
description?: string | undefined;
|
|
677
|
+
total?: Record<string, number> | undefined;
|
|
678
|
+
} | undefined;
|
|
679
|
+
pricingTiers?: {
|
|
680
|
+
originalPrice: Record<string, number>;
|
|
681
|
+
price: Record<string, number>;
|
|
682
|
+
minQuantity: number;
|
|
683
|
+
}[] | null | undefined;
|
|
684
|
+
}[] | undefined;
|
|
685
|
+
};
|
|
686
|
+
} | {
|
|
687
|
+
type: "Bundle";
|
|
688
|
+
quantity: number;
|
|
689
|
+
bundle: {
|
|
690
|
+
type: "bundle";
|
|
691
|
+
id: string;
|
|
692
|
+
name: string;
|
|
693
|
+
description: string;
|
|
694
|
+
tagline: string;
|
|
695
|
+
iconUrl: string | null;
|
|
696
|
+
owned: boolean;
|
|
697
|
+
partial: boolean;
|
|
698
|
+
products: ({
|
|
699
|
+
type: "product";
|
|
700
|
+
id: string;
|
|
701
|
+
name: string;
|
|
702
|
+
description: string;
|
|
703
|
+
tagline: string;
|
|
704
|
+
iconUrl: string | null;
|
|
705
|
+
owned: boolean;
|
|
706
|
+
website?: string | null | undefined;
|
|
707
|
+
currentVersion?: string | undefined;
|
|
708
|
+
downloads?: {
|
|
709
|
+
path: string | null;
|
|
710
|
+
name: string;
|
|
711
|
+
key: string;
|
|
712
|
+
platform: _moonbase_sh_storefront_api.Platform;
|
|
713
|
+
size: number;
|
|
714
|
+
manifest?: {
|
|
715
|
+
files: {
|
|
716
|
+
path: string;
|
|
717
|
+
name: string;
|
|
718
|
+
}[];
|
|
719
|
+
licensePath: string | null;
|
|
720
|
+
} | undefined;
|
|
721
|
+
}[] | undefined;
|
|
722
|
+
defaultVariation?: {
|
|
723
|
+
id: string;
|
|
724
|
+
name: string;
|
|
725
|
+
originalPrice: Record<string, number>;
|
|
726
|
+
price: Record<string, number>;
|
|
727
|
+
hasDiscount: boolean;
|
|
728
|
+
recurrence: {
|
|
729
|
+
type: "OneOff";
|
|
730
|
+
} | {
|
|
731
|
+
type: "Recurring";
|
|
732
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
733
|
+
};
|
|
734
|
+
discount?: {
|
|
735
|
+
type: "PercentageOffDiscount";
|
|
736
|
+
name: string;
|
|
737
|
+
percentage: number;
|
|
738
|
+
isExclusive: boolean;
|
|
739
|
+
description?: string | undefined;
|
|
740
|
+
total?: Record<string, number> | undefined;
|
|
741
|
+
} | {
|
|
742
|
+
type: "FlatAmountOffDiscount";
|
|
743
|
+
name: string;
|
|
744
|
+
isExclusive: boolean;
|
|
745
|
+
description?: string | undefined;
|
|
746
|
+
total?: Record<string, number> | undefined;
|
|
747
|
+
} | undefined;
|
|
748
|
+
pricingTiers?: {
|
|
749
|
+
originalPrice: Record<string, number>;
|
|
750
|
+
price: Record<string, number>;
|
|
751
|
+
minQuantity: number;
|
|
752
|
+
}[] | null | undefined;
|
|
753
|
+
} | undefined;
|
|
754
|
+
variations?: {
|
|
755
|
+
id: string;
|
|
756
|
+
name: string;
|
|
757
|
+
originalPrice: Record<string, number>;
|
|
758
|
+
price: Record<string, number>;
|
|
759
|
+
hasDiscount: boolean;
|
|
760
|
+
recurrence: {
|
|
761
|
+
type: "OneOff";
|
|
762
|
+
} | {
|
|
763
|
+
type: "Recurring";
|
|
764
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
765
|
+
};
|
|
766
|
+
discount?: {
|
|
767
|
+
type: "PercentageOffDiscount";
|
|
768
|
+
name: string;
|
|
769
|
+
percentage: number;
|
|
770
|
+
isExclusive: boolean;
|
|
771
|
+
description?: string | undefined;
|
|
772
|
+
total?: Record<string, number> | undefined;
|
|
773
|
+
} | {
|
|
774
|
+
type: "FlatAmountOffDiscount";
|
|
775
|
+
name: string;
|
|
776
|
+
isExclusive: boolean;
|
|
777
|
+
description?: string | undefined;
|
|
778
|
+
total?: Record<string, number> | undefined;
|
|
779
|
+
} | undefined;
|
|
780
|
+
pricingTiers?: {
|
|
781
|
+
originalPrice: Record<string, number>;
|
|
782
|
+
price: Record<string, number>;
|
|
783
|
+
minQuantity: number;
|
|
784
|
+
}[] | null | undefined;
|
|
785
|
+
}[] | undefined;
|
|
786
|
+
} & {
|
|
787
|
+
included?: boolean | undefined;
|
|
788
|
+
})[];
|
|
789
|
+
defaultVariation?: {
|
|
790
|
+
id: string;
|
|
791
|
+
name: string;
|
|
792
|
+
originalPrice: Record<string, number>;
|
|
793
|
+
price: Record<string, number>;
|
|
794
|
+
hasDiscount: boolean;
|
|
795
|
+
recurrence: {
|
|
796
|
+
type: "OneOff";
|
|
797
|
+
} | {
|
|
798
|
+
type: "Recurring";
|
|
799
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
800
|
+
};
|
|
801
|
+
discount?: {
|
|
802
|
+
type: "PercentageOffDiscount";
|
|
803
|
+
name: string;
|
|
804
|
+
percentage: number;
|
|
805
|
+
isExclusive: boolean;
|
|
806
|
+
description?: string | undefined;
|
|
807
|
+
total?: Record<string, number> | undefined;
|
|
808
|
+
} | {
|
|
809
|
+
type: "FlatAmountOffDiscount";
|
|
810
|
+
name: string;
|
|
811
|
+
isExclusive: boolean;
|
|
812
|
+
description?: string | undefined;
|
|
813
|
+
total?: Record<string, number> | undefined;
|
|
814
|
+
} | undefined;
|
|
815
|
+
pricingTiers?: {
|
|
816
|
+
originalPrice: Record<string, number>;
|
|
817
|
+
price: Record<string, number>;
|
|
818
|
+
minQuantity: number;
|
|
819
|
+
}[] | null | undefined;
|
|
820
|
+
} | undefined;
|
|
821
|
+
variations?: {
|
|
822
|
+
id: string;
|
|
823
|
+
name: string;
|
|
824
|
+
originalPrice: Record<string, number>;
|
|
825
|
+
price: Record<string, number>;
|
|
826
|
+
hasDiscount: boolean;
|
|
827
|
+
recurrence: {
|
|
828
|
+
type: "OneOff";
|
|
829
|
+
} | {
|
|
830
|
+
type: "Recurring";
|
|
831
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
832
|
+
};
|
|
833
|
+
discount?: {
|
|
834
|
+
type: "PercentageOffDiscount";
|
|
835
|
+
name: string;
|
|
836
|
+
percentage: number;
|
|
837
|
+
isExclusive: boolean;
|
|
838
|
+
description?: string | undefined;
|
|
839
|
+
total?: Record<string, number> | undefined;
|
|
840
|
+
} | {
|
|
841
|
+
type: "FlatAmountOffDiscount";
|
|
842
|
+
name: string;
|
|
843
|
+
isExclusive: boolean;
|
|
844
|
+
description?: string | undefined;
|
|
845
|
+
total?: Record<string, number> | undefined;
|
|
846
|
+
} | undefined;
|
|
847
|
+
pricingTiers?: {
|
|
848
|
+
originalPrice: Record<string, number>;
|
|
849
|
+
price: Record<string, number>;
|
|
850
|
+
minQuantity: number;
|
|
851
|
+
}[] | null | undefined;
|
|
852
|
+
}[] | undefined;
|
|
853
|
+
};
|
|
854
|
+
};
|
|
855
|
+
}>>;
|
|
856
|
+
getSubscription: (subscriptionId: string) => Promise<{
|
|
857
|
+
status: _moonbase_sh_storefront_api.SubscriptionStatus;
|
|
858
|
+
id: string;
|
|
859
|
+
expiresAt: Date;
|
|
860
|
+
total: {
|
|
861
|
+
discount: {
|
|
862
|
+
currency: string;
|
|
863
|
+
amount: number;
|
|
864
|
+
};
|
|
865
|
+
original: {
|
|
866
|
+
currency: string;
|
|
867
|
+
amount: number;
|
|
868
|
+
};
|
|
869
|
+
subtotal: {
|
|
870
|
+
currency: string;
|
|
871
|
+
amount: number;
|
|
872
|
+
};
|
|
873
|
+
taxes: {
|
|
874
|
+
currency: string;
|
|
875
|
+
amount: number;
|
|
876
|
+
};
|
|
877
|
+
due: {
|
|
878
|
+
currency: string;
|
|
879
|
+
amount: number;
|
|
880
|
+
};
|
|
881
|
+
};
|
|
882
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
883
|
+
hasPaymentMethod: boolean;
|
|
884
|
+
renewedAt: Date | null;
|
|
885
|
+
startedAt: Date;
|
|
886
|
+
content: {
|
|
887
|
+
type: "Product";
|
|
888
|
+
quantity: number;
|
|
889
|
+
product: {
|
|
890
|
+
type: "product";
|
|
891
|
+
id: string;
|
|
892
|
+
name: string;
|
|
893
|
+
description: string;
|
|
894
|
+
tagline: string;
|
|
895
|
+
iconUrl: string | null;
|
|
896
|
+
owned: boolean;
|
|
897
|
+
website?: string | null | undefined;
|
|
898
|
+
currentVersion?: string | undefined;
|
|
899
|
+
downloads?: {
|
|
900
|
+
path: string | null;
|
|
901
|
+
name: string;
|
|
902
|
+
key: string;
|
|
903
|
+
platform: _moonbase_sh_storefront_api.Platform;
|
|
904
|
+
size: number;
|
|
905
|
+
manifest?: {
|
|
906
|
+
files: {
|
|
907
|
+
path: string;
|
|
908
|
+
name: string;
|
|
909
|
+
}[];
|
|
910
|
+
licensePath: string | null;
|
|
911
|
+
} | undefined;
|
|
912
|
+
}[] | undefined;
|
|
913
|
+
defaultVariation?: {
|
|
914
|
+
id: string;
|
|
915
|
+
name: string;
|
|
916
|
+
originalPrice: Record<string, number>;
|
|
917
|
+
price: Record<string, number>;
|
|
918
|
+
hasDiscount: boolean;
|
|
919
|
+
recurrence: {
|
|
920
|
+
type: "OneOff";
|
|
921
|
+
} | {
|
|
922
|
+
type: "Recurring";
|
|
923
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
924
|
+
};
|
|
925
|
+
discount?: {
|
|
926
|
+
type: "PercentageOffDiscount";
|
|
927
|
+
name: string;
|
|
928
|
+
percentage: number;
|
|
929
|
+
isExclusive: boolean;
|
|
930
|
+
description?: string | undefined;
|
|
931
|
+
total?: Record<string, number> | undefined;
|
|
932
|
+
} | {
|
|
933
|
+
type: "FlatAmountOffDiscount";
|
|
934
|
+
name: string;
|
|
935
|
+
isExclusive: boolean;
|
|
936
|
+
description?: string | undefined;
|
|
937
|
+
total?: Record<string, number> | undefined;
|
|
938
|
+
} | undefined;
|
|
939
|
+
pricingTiers?: {
|
|
940
|
+
originalPrice: Record<string, number>;
|
|
941
|
+
price: Record<string, number>;
|
|
942
|
+
minQuantity: number;
|
|
943
|
+
}[] | null | undefined;
|
|
944
|
+
} | undefined;
|
|
945
|
+
variations?: {
|
|
946
|
+
id: string;
|
|
947
|
+
name: string;
|
|
948
|
+
originalPrice: Record<string, number>;
|
|
949
|
+
price: Record<string, number>;
|
|
950
|
+
hasDiscount: boolean;
|
|
951
|
+
recurrence: {
|
|
952
|
+
type: "OneOff";
|
|
953
|
+
} | {
|
|
954
|
+
type: "Recurring";
|
|
955
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
956
|
+
};
|
|
957
|
+
discount?: {
|
|
958
|
+
type: "PercentageOffDiscount";
|
|
959
|
+
name: string;
|
|
960
|
+
percentage: number;
|
|
961
|
+
isExclusive: boolean;
|
|
962
|
+
description?: string | undefined;
|
|
963
|
+
total?: Record<string, number> | undefined;
|
|
964
|
+
} | {
|
|
965
|
+
type: "FlatAmountOffDiscount";
|
|
966
|
+
name: string;
|
|
967
|
+
isExclusive: boolean;
|
|
968
|
+
description?: string | undefined;
|
|
969
|
+
total?: Record<string, number> | undefined;
|
|
970
|
+
} | undefined;
|
|
971
|
+
pricingTiers?: {
|
|
972
|
+
originalPrice: Record<string, number>;
|
|
973
|
+
price: Record<string, number>;
|
|
974
|
+
minQuantity: number;
|
|
975
|
+
}[] | null | undefined;
|
|
976
|
+
}[] | undefined;
|
|
977
|
+
};
|
|
978
|
+
} | {
|
|
979
|
+
type: "Bundle";
|
|
980
|
+
quantity: number;
|
|
981
|
+
bundle: {
|
|
982
|
+
type: "bundle";
|
|
983
|
+
id: string;
|
|
984
|
+
name: string;
|
|
985
|
+
description: string;
|
|
986
|
+
tagline: string;
|
|
987
|
+
iconUrl: string | null;
|
|
988
|
+
owned: boolean;
|
|
989
|
+
partial: boolean;
|
|
990
|
+
products: ({
|
|
991
|
+
type: "product";
|
|
992
|
+
id: string;
|
|
993
|
+
name: string;
|
|
994
|
+
description: string;
|
|
995
|
+
tagline: string;
|
|
996
|
+
iconUrl: string | null;
|
|
997
|
+
owned: boolean;
|
|
998
|
+
website?: string | null | undefined;
|
|
999
|
+
currentVersion?: string | undefined;
|
|
1000
|
+
downloads?: {
|
|
1001
|
+
path: string | null;
|
|
1002
|
+
name: string;
|
|
1003
|
+
key: string;
|
|
1004
|
+
platform: _moonbase_sh_storefront_api.Platform;
|
|
1005
|
+
size: number;
|
|
1006
|
+
manifest?: {
|
|
1007
|
+
files: {
|
|
1008
|
+
path: string;
|
|
1009
|
+
name: string;
|
|
1010
|
+
}[];
|
|
1011
|
+
licensePath: string | null;
|
|
1012
|
+
} | undefined;
|
|
1013
|
+
}[] | undefined;
|
|
1014
|
+
defaultVariation?: {
|
|
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: _moonbase_sh_storefront_api.CycleLength;
|
|
1025
|
+
};
|
|
1026
|
+
discount?: {
|
|
1027
|
+
type: "PercentageOffDiscount";
|
|
1028
|
+
name: string;
|
|
1029
|
+
percentage: number;
|
|
1030
|
+
isExclusive: boolean;
|
|
1031
|
+
description?: string | undefined;
|
|
1032
|
+
total?: Record<string, number> | undefined;
|
|
1033
|
+
} | {
|
|
1034
|
+
type: "FlatAmountOffDiscount";
|
|
1035
|
+
name: string;
|
|
1036
|
+
isExclusive: boolean;
|
|
1037
|
+
description?: string | undefined;
|
|
1038
|
+
total?: Record<string, number> | undefined;
|
|
1039
|
+
} | undefined;
|
|
1040
|
+
pricingTiers?: {
|
|
1041
|
+
originalPrice: Record<string, number>;
|
|
1042
|
+
price: Record<string, number>;
|
|
1043
|
+
minQuantity: number;
|
|
1044
|
+
}[] | null | undefined;
|
|
1045
|
+
} | undefined;
|
|
1046
|
+
variations?: {
|
|
1047
|
+
id: string;
|
|
1048
|
+
name: string;
|
|
1049
|
+
originalPrice: Record<string, number>;
|
|
1050
|
+
price: Record<string, number>;
|
|
1051
|
+
hasDiscount: boolean;
|
|
1052
|
+
recurrence: {
|
|
1053
|
+
type: "OneOff";
|
|
1054
|
+
} | {
|
|
1055
|
+
type: "Recurring";
|
|
1056
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
1057
|
+
};
|
|
1058
|
+
discount?: {
|
|
1059
|
+
type: "PercentageOffDiscount";
|
|
1060
|
+
name: string;
|
|
1061
|
+
percentage: number;
|
|
1062
|
+
isExclusive: boolean;
|
|
1063
|
+
description?: string | undefined;
|
|
1064
|
+
total?: Record<string, number> | undefined;
|
|
1065
|
+
} | {
|
|
1066
|
+
type: "FlatAmountOffDiscount";
|
|
1067
|
+
name: string;
|
|
1068
|
+
isExclusive: boolean;
|
|
1069
|
+
description?: string | undefined;
|
|
1070
|
+
total?: Record<string, number> | undefined;
|
|
1071
|
+
} | undefined;
|
|
1072
|
+
pricingTiers?: {
|
|
1073
|
+
originalPrice: Record<string, number>;
|
|
1074
|
+
price: Record<string, number>;
|
|
1075
|
+
minQuantity: number;
|
|
1076
|
+
}[] | null | undefined;
|
|
1077
|
+
}[] | undefined;
|
|
1078
|
+
} & {
|
|
1079
|
+
included?: boolean | undefined;
|
|
1080
|
+
})[];
|
|
1081
|
+
defaultVariation?: {
|
|
1082
|
+
id: string;
|
|
1083
|
+
name: string;
|
|
1084
|
+
originalPrice: Record<string, number>;
|
|
1085
|
+
price: Record<string, number>;
|
|
1086
|
+
hasDiscount: boolean;
|
|
1087
|
+
recurrence: {
|
|
1088
|
+
type: "OneOff";
|
|
1089
|
+
} | {
|
|
1090
|
+
type: "Recurring";
|
|
1091
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
1092
|
+
};
|
|
1093
|
+
discount?: {
|
|
1094
|
+
type: "PercentageOffDiscount";
|
|
1095
|
+
name: string;
|
|
1096
|
+
percentage: number;
|
|
1097
|
+
isExclusive: boolean;
|
|
1098
|
+
description?: string | undefined;
|
|
1099
|
+
total?: Record<string, number> | undefined;
|
|
1100
|
+
} | {
|
|
1101
|
+
type: "FlatAmountOffDiscount";
|
|
1102
|
+
name: string;
|
|
1103
|
+
isExclusive: boolean;
|
|
1104
|
+
description?: string | undefined;
|
|
1105
|
+
total?: Record<string, number> | undefined;
|
|
1106
|
+
} | undefined;
|
|
1107
|
+
pricingTiers?: {
|
|
1108
|
+
originalPrice: Record<string, number>;
|
|
1109
|
+
price: Record<string, number>;
|
|
1110
|
+
minQuantity: number;
|
|
1111
|
+
}[] | null | undefined;
|
|
1112
|
+
} | undefined;
|
|
1113
|
+
variations?: {
|
|
1114
|
+
id: string;
|
|
1115
|
+
name: string;
|
|
1116
|
+
originalPrice: Record<string, number>;
|
|
1117
|
+
price: Record<string, number>;
|
|
1118
|
+
hasDiscount: boolean;
|
|
1119
|
+
recurrence: {
|
|
1120
|
+
type: "OneOff";
|
|
1121
|
+
} | {
|
|
1122
|
+
type: "Recurring";
|
|
1123
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
1124
|
+
};
|
|
1125
|
+
discount?: {
|
|
1126
|
+
type: "PercentageOffDiscount";
|
|
1127
|
+
name: string;
|
|
1128
|
+
percentage: number;
|
|
1129
|
+
isExclusive: boolean;
|
|
1130
|
+
description?: string | undefined;
|
|
1131
|
+
total?: Record<string, number> | undefined;
|
|
1132
|
+
} | {
|
|
1133
|
+
type: "FlatAmountOffDiscount";
|
|
1134
|
+
name: string;
|
|
1135
|
+
isExclusive: boolean;
|
|
1136
|
+
description?: string | undefined;
|
|
1137
|
+
total?: Record<string, number> | undefined;
|
|
1138
|
+
} | undefined;
|
|
1139
|
+
pricingTiers?: {
|
|
1140
|
+
originalPrice: Record<string, number>;
|
|
1141
|
+
price: Record<string, number>;
|
|
1142
|
+
minQuantity: number;
|
|
1143
|
+
}[] | null | undefined;
|
|
1144
|
+
}[] | undefined;
|
|
1145
|
+
};
|
|
1146
|
+
};
|
|
1147
|
+
}>;
|
|
1148
|
+
cancelSubscription: (subscriptionId: string) => Promise<{
|
|
1149
|
+
status: _moonbase_sh_storefront_api.SubscriptionStatus;
|
|
1150
|
+
id: string;
|
|
1151
|
+
expiresAt: Date;
|
|
1152
|
+
total: {
|
|
1153
|
+
discount: {
|
|
1154
|
+
currency: string;
|
|
1155
|
+
amount: number;
|
|
1156
|
+
};
|
|
1157
|
+
original: {
|
|
1158
|
+
currency: string;
|
|
1159
|
+
amount: number;
|
|
1160
|
+
};
|
|
1161
|
+
subtotal: {
|
|
1162
|
+
currency: string;
|
|
1163
|
+
amount: number;
|
|
1164
|
+
};
|
|
1165
|
+
taxes: {
|
|
1166
|
+
currency: string;
|
|
1167
|
+
amount: number;
|
|
1168
|
+
};
|
|
1169
|
+
due: {
|
|
1170
|
+
currency: string;
|
|
1171
|
+
amount: number;
|
|
1172
|
+
};
|
|
1173
|
+
};
|
|
1174
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
1175
|
+
hasPaymentMethod: boolean;
|
|
1176
|
+
renewedAt: Date | null;
|
|
1177
|
+
startedAt: Date;
|
|
1178
|
+
content: {
|
|
1179
|
+
type: "Product";
|
|
1180
|
+
quantity: number;
|
|
1181
|
+
product: {
|
|
1182
|
+
type: "product";
|
|
1183
|
+
id: string;
|
|
1184
|
+
name: string;
|
|
1185
|
+
description: string;
|
|
1186
|
+
tagline: string;
|
|
1187
|
+
iconUrl: string | null;
|
|
1188
|
+
owned: boolean;
|
|
1189
|
+
website?: string | null | undefined;
|
|
1190
|
+
currentVersion?: string | undefined;
|
|
1191
|
+
downloads?: {
|
|
1192
|
+
path: string | null;
|
|
1193
|
+
name: string;
|
|
1194
|
+
key: string;
|
|
1195
|
+
platform: _moonbase_sh_storefront_api.Platform;
|
|
1196
|
+
size: number;
|
|
1197
|
+
manifest?: {
|
|
1198
|
+
files: {
|
|
1199
|
+
path: string;
|
|
1200
|
+
name: string;
|
|
1201
|
+
}[];
|
|
1202
|
+
licensePath: string | null;
|
|
1203
|
+
} | undefined;
|
|
1204
|
+
}[] | undefined;
|
|
1205
|
+
defaultVariation?: {
|
|
1206
|
+
id: string;
|
|
1207
|
+
name: string;
|
|
1208
|
+
originalPrice: Record<string, number>;
|
|
1209
|
+
price: Record<string, number>;
|
|
1210
|
+
hasDiscount: boolean;
|
|
1211
|
+
recurrence: {
|
|
1212
|
+
type: "OneOff";
|
|
1213
|
+
} | {
|
|
1214
|
+
type: "Recurring";
|
|
1215
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
1216
|
+
};
|
|
1217
|
+
discount?: {
|
|
1218
|
+
type: "PercentageOffDiscount";
|
|
1219
|
+
name: string;
|
|
1220
|
+
percentage: number;
|
|
1221
|
+
isExclusive: boolean;
|
|
1222
|
+
description?: string | undefined;
|
|
1223
|
+
total?: Record<string, number> | undefined;
|
|
1224
|
+
} | {
|
|
1225
|
+
type: "FlatAmountOffDiscount";
|
|
1226
|
+
name: string;
|
|
1227
|
+
isExclusive: boolean;
|
|
1228
|
+
description?: string | undefined;
|
|
1229
|
+
total?: Record<string, number> | undefined;
|
|
1230
|
+
} | undefined;
|
|
1231
|
+
pricingTiers?: {
|
|
1232
|
+
originalPrice: Record<string, number>;
|
|
1233
|
+
price: Record<string, number>;
|
|
1234
|
+
minQuantity: number;
|
|
1235
|
+
}[] | null | undefined;
|
|
1236
|
+
} | undefined;
|
|
1237
|
+
variations?: {
|
|
1238
|
+
id: string;
|
|
1239
|
+
name: string;
|
|
1240
|
+
originalPrice: Record<string, number>;
|
|
1241
|
+
price: Record<string, number>;
|
|
1242
|
+
hasDiscount: boolean;
|
|
1243
|
+
recurrence: {
|
|
1244
|
+
type: "OneOff";
|
|
1245
|
+
} | {
|
|
1246
|
+
type: "Recurring";
|
|
1247
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
1248
|
+
};
|
|
1249
|
+
discount?: {
|
|
1250
|
+
type: "PercentageOffDiscount";
|
|
1251
|
+
name: string;
|
|
1252
|
+
percentage: number;
|
|
1253
|
+
isExclusive: boolean;
|
|
1254
|
+
description?: string | undefined;
|
|
1255
|
+
total?: Record<string, number> | undefined;
|
|
1256
|
+
} | {
|
|
1257
|
+
type: "FlatAmountOffDiscount";
|
|
1258
|
+
name: string;
|
|
1259
|
+
isExclusive: boolean;
|
|
1260
|
+
description?: string | undefined;
|
|
1261
|
+
total?: Record<string, number> | undefined;
|
|
1262
|
+
} | undefined;
|
|
1263
|
+
pricingTiers?: {
|
|
1264
|
+
originalPrice: Record<string, number>;
|
|
1265
|
+
price: Record<string, number>;
|
|
1266
|
+
minQuantity: number;
|
|
1267
|
+
}[] | null | undefined;
|
|
1268
|
+
}[] | undefined;
|
|
1269
|
+
};
|
|
1270
|
+
} | {
|
|
1271
|
+
type: "Bundle";
|
|
1272
|
+
quantity: number;
|
|
1273
|
+
bundle: {
|
|
1274
|
+
type: "bundle";
|
|
1275
|
+
id: string;
|
|
1276
|
+
name: string;
|
|
1277
|
+
description: string;
|
|
1278
|
+
tagline: string;
|
|
1279
|
+
iconUrl: string | null;
|
|
1280
|
+
owned: boolean;
|
|
1281
|
+
partial: boolean;
|
|
1282
|
+
products: ({
|
|
1283
|
+
type: "product";
|
|
1284
|
+
id: string;
|
|
1285
|
+
name: string;
|
|
1286
|
+
description: string;
|
|
1287
|
+
tagline: string;
|
|
1288
|
+
iconUrl: string | null;
|
|
1289
|
+
owned: boolean;
|
|
1290
|
+
website?: string | null | undefined;
|
|
1291
|
+
currentVersion?: string | undefined;
|
|
1292
|
+
downloads?: {
|
|
1293
|
+
path: string | null;
|
|
1294
|
+
name: string;
|
|
1295
|
+
key: string;
|
|
1296
|
+
platform: _moonbase_sh_storefront_api.Platform;
|
|
1297
|
+
size: number;
|
|
1298
|
+
manifest?: {
|
|
1299
|
+
files: {
|
|
1300
|
+
path: string;
|
|
1301
|
+
name: string;
|
|
1302
|
+
}[];
|
|
1303
|
+
licensePath: string | null;
|
|
1304
|
+
} | undefined;
|
|
1305
|
+
}[] | undefined;
|
|
1306
|
+
defaultVariation?: {
|
|
1307
|
+
id: string;
|
|
1308
|
+
name: string;
|
|
1309
|
+
originalPrice: Record<string, number>;
|
|
1310
|
+
price: Record<string, number>;
|
|
1311
|
+
hasDiscount: boolean;
|
|
1312
|
+
recurrence: {
|
|
1313
|
+
type: "OneOff";
|
|
1314
|
+
} | {
|
|
1315
|
+
type: "Recurring";
|
|
1316
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
1317
|
+
};
|
|
1318
|
+
discount?: {
|
|
1319
|
+
type: "PercentageOffDiscount";
|
|
1320
|
+
name: string;
|
|
1321
|
+
percentage: number;
|
|
1322
|
+
isExclusive: boolean;
|
|
1323
|
+
description?: string | undefined;
|
|
1324
|
+
total?: Record<string, number> | undefined;
|
|
1325
|
+
} | {
|
|
1326
|
+
type: "FlatAmountOffDiscount";
|
|
1327
|
+
name: string;
|
|
1328
|
+
isExclusive: boolean;
|
|
1329
|
+
description?: string | undefined;
|
|
1330
|
+
total?: Record<string, number> | undefined;
|
|
1331
|
+
} | undefined;
|
|
1332
|
+
pricingTiers?: {
|
|
1333
|
+
originalPrice: Record<string, number>;
|
|
1334
|
+
price: Record<string, number>;
|
|
1335
|
+
minQuantity: number;
|
|
1336
|
+
}[] | null | undefined;
|
|
1337
|
+
} | undefined;
|
|
1338
|
+
variations?: {
|
|
1339
|
+
id: string;
|
|
1340
|
+
name: string;
|
|
1341
|
+
originalPrice: Record<string, number>;
|
|
1342
|
+
price: Record<string, number>;
|
|
1343
|
+
hasDiscount: boolean;
|
|
1344
|
+
recurrence: {
|
|
1345
|
+
type: "OneOff";
|
|
1346
|
+
} | {
|
|
1347
|
+
type: "Recurring";
|
|
1348
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
1349
|
+
};
|
|
1350
|
+
discount?: {
|
|
1351
|
+
type: "PercentageOffDiscount";
|
|
1352
|
+
name: string;
|
|
1353
|
+
percentage: number;
|
|
1354
|
+
isExclusive: boolean;
|
|
1355
|
+
description?: string | undefined;
|
|
1356
|
+
total?: Record<string, number> | undefined;
|
|
1357
|
+
} | {
|
|
1358
|
+
type: "FlatAmountOffDiscount";
|
|
1359
|
+
name: string;
|
|
1360
|
+
isExclusive: boolean;
|
|
1361
|
+
description?: string | undefined;
|
|
1362
|
+
total?: Record<string, number> | undefined;
|
|
1363
|
+
} | undefined;
|
|
1364
|
+
pricingTiers?: {
|
|
1365
|
+
originalPrice: Record<string, number>;
|
|
1366
|
+
price: Record<string, number>;
|
|
1367
|
+
minQuantity: number;
|
|
1368
|
+
}[] | null | undefined;
|
|
1369
|
+
}[] | undefined;
|
|
1370
|
+
} & {
|
|
1371
|
+
included?: boolean | undefined;
|
|
1372
|
+
})[];
|
|
1373
|
+
defaultVariation?: {
|
|
1374
|
+
id: string;
|
|
1375
|
+
name: string;
|
|
1376
|
+
originalPrice: Record<string, number>;
|
|
1377
|
+
price: Record<string, number>;
|
|
1378
|
+
hasDiscount: boolean;
|
|
1379
|
+
recurrence: {
|
|
1380
|
+
type: "OneOff";
|
|
1381
|
+
} | {
|
|
1382
|
+
type: "Recurring";
|
|
1383
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
1384
|
+
};
|
|
1385
|
+
discount?: {
|
|
1386
|
+
type: "PercentageOffDiscount";
|
|
1387
|
+
name: string;
|
|
1388
|
+
percentage: number;
|
|
1389
|
+
isExclusive: boolean;
|
|
1390
|
+
description?: string | undefined;
|
|
1391
|
+
total?: Record<string, number> | undefined;
|
|
1392
|
+
} | {
|
|
1393
|
+
type: "FlatAmountOffDiscount";
|
|
1394
|
+
name: string;
|
|
1395
|
+
isExclusive: boolean;
|
|
1396
|
+
description?: string | undefined;
|
|
1397
|
+
total?: Record<string, number> | undefined;
|
|
1398
|
+
} | undefined;
|
|
1399
|
+
pricingTiers?: {
|
|
1400
|
+
originalPrice: Record<string, number>;
|
|
1401
|
+
price: Record<string, number>;
|
|
1402
|
+
minQuantity: number;
|
|
1403
|
+
}[] | null | undefined;
|
|
1404
|
+
} | undefined;
|
|
1405
|
+
variations?: {
|
|
1406
|
+
id: string;
|
|
1407
|
+
name: string;
|
|
1408
|
+
originalPrice: Record<string, number>;
|
|
1409
|
+
price: Record<string, number>;
|
|
1410
|
+
hasDiscount: boolean;
|
|
1411
|
+
recurrence: {
|
|
1412
|
+
type: "OneOff";
|
|
1413
|
+
} | {
|
|
1414
|
+
type: "Recurring";
|
|
1415
|
+
cycleLength: _moonbase_sh_storefront_api.CycleLength;
|
|
1416
|
+
};
|
|
1417
|
+
discount?: {
|
|
1418
|
+
type: "PercentageOffDiscount";
|
|
1419
|
+
name: string;
|
|
1420
|
+
percentage: number;
|
|
1421
|
+
isExclusive: boolean;
|
|
1422
|
+
description?: string | undefined;
|
|
1423
|
+
total?: Record<string, number> | undefined;
|
|
1424
|
+
} | {
|
|
1425
|
+
type: "FlatAmountOffDiscount";
|
|
1426
|
+
name: string;
|
|
1427
|
+
isExclusive: boolean;
|
|
1428
|
+
description?: string | undefined;
|
|
1429
|
+
total?: Record<string, number> | undefined;
|
|
1430
|
+
} | undefined;
|
|
1431
|
+
pricingTiers?: {
|
|
1432
|
+
originalPrice: Record<string, number>;
|
|
1433
|
+
price: Record<string, number>;
|
|
1434
|
+
minQuantity: number;
|
|
1435
|
+
}[] | null | undefined;
|
|
1436
|
+
}[] | undefined;
|
|
1437
|
+
};
|
|
1438
|
+
};
|
|
1439
|
+
}>;
|
|
1440
|
+
renewSubscription: (subscriptionId: string, options: {
|
|
1441
|
+
redirect: boolean;
|
|
1442
|
+
returnUrl?: string;
|
|
1443
|
+
}) => Promise<{
|
|
1444
|
+
next: string | undefined;
|
|
1445
|
+
completed: boolean;
|
|
1446
|
+
}>;
|
|
539
1447
|
};
|
|
540
1448
|
|
|
541
1449
|
declare function useProduct(productId: string, context?: StorefrontContext): Ref<StorefrontProduct | null>;
|