@moonbase.sh/storefront 0.2.64 → 0.2.69

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.
@@ -0,0 +1,131 @@
1
+ declare type DeepPartial<T> = T extends object ? {
2
+ [P in keyof T]?: DeepPartial<T[P]>;
3
+ } : T;
4
+
5
+ declare const moonbase: Moonbase_2;
6
+ export default moonbase;
7
+
8
+ declare class Moonbase_2 implements MoonbaseInstance {
9
+ private initialized;
10
+ private pinia;
11
+ private storefront;
12
+ private options;
13
+ setup(url: string, options?: DeepPartial<MoonbaseOptions>): Promise<void>;
14
+ sign_in(parameters?: MoonbaseIntentArgs['sign_in']): void;
15
+ sign_up(parameters?: MoonbaseIntentArgs['sign_up']): void;
16
+ forgot_password(parameters?: MoonbaseIntentArgs['forgot_password']): void;
17
+ reset_password(parameters?: MoonbaseIntentArgs['reset_password']): void;
18
+ confirm_account(parameters?: MoonbaseIntentArgs['confirm_account']): void;
19
+ confirm_email(): void;
20
+ confirm_email_change(parameters?: MoonbaseIntentArgs['confirm_email_change']): void;
21
+ view_account(): void;
22
+ view_products(): void;
23
+ redeem_voucher(parameters?: MoonbaseIntentArgs['redeem_voucher']): void;
24
+ download_product(parameters?: MoonbaseIntentArgs['download_product']): void;
25
+ activate_product(parameters?: MoonbaseIntentArgs['activate_product']): void;
26
+ view_cart(): void;
27
+ add_to_cart(parameters?: MoonbaseIntentArgs['add_to_cart']): Promise<void>;
28
+ checkout(parameters?: MoonbaseIntentArgs['checkout']): void;
29
+ close_checkout(): void;
30
+ }
31
+
32
+ export declare type MoonbaseInstance = MoonbaseInstanceIntents & {
33
+ setup: (url: string, options: DeepPartial<MoonbaseOptions>) => Promise<void>;
34
+ };
35
+
36
+ declare type MoonbaseInstanceIntents = {
37
+ [intent in MoonbaseIntent]: (parameters?: MoonbaseIntentArgs[intent]) => void | Promise<void>;
38
+ };
39
+
40
+ export declare enum MoonbaseIntent {
41
+ SignIn = "sign_in",
42
+ SignUp = "sign_up",
43
+ ForgotPassword = "forgot_password",
44
+ ResetPassword = "reset_password",
45
+ ConfirmAccount = "confirm_account",
46
+ ConfirmEmail = "confirm_email",
47
+ ConfirmEmailChange = "confirm_email_change",
48
+ ViewAccount = "view_account",
49
+ ViewProducts = "view_products",
50
+ RedeemVoucher = "redeem_voucher",
51
+ DownloadProduct = "download_product",
52
+ ActivateProduct = "activate_product",
53
+ ViewCart = "view_cart",
54
+ AddToCart = "add_to_cart",
55
+ Checkout = "checkout",
56
+ CloseCheckout = "close_checkout"
57
+ }
58
+
59
+ export declare interface MoonbaseIntentArgs {
60
+ [MoonbaseIntent.SignIn]: {
61
+ email?: string;
62
+ };
63
+ [MoonbaseIntent.SignUp]: {
64
+ email?: string;
65
+ };
66
+ [MoonbaseIntent.ForgotPassword]: {
67
+ email?: string;
68
+ };
69
+ [MoonbaseIntent.ResetPassword]: {
70
+ email: string;
71
+ code: string;
72
+ };
73
+ [MoonbaseIntent.ConfirmAccount]: {
74
+ email: string;
75
+ code: string;
76
+ };
77
+ [MoonbaseIntent.ConfirmEmail]: {
78
+ email: string;
79
+ code: string;
80
+ };
81
+ [MoonbaseIntent.ConfirmEmailChange]: {
82
+ email: string;
83
+ code: string;
84
+ };
85
+ [MoonbaseIntent.ViewAccount]: never;
86
+ [MoonbaseIntent.ViewProducts]: never;
87
+ [MoonbaseIntent.RedeemVoucher]: {
88
+ code?: string;
89
+ };
90
+ [MoonbaseIntent.DownloadProduct]: {
91
+ product_id: string;
92
+ version?: string;
93
+ key?: string;
94
+ };
95
+ [MoonbaseIntent.ActivateProduct]: {
96
+ token: string;
97
+ };
98
+ [MoonbaseIntent.ViewCart]: never;
99
+ [MoonbaseIntent.AddToCart]: {
100
+ product_id?: string;
101
+ bundle_id?: string;
102
+ variation_id?: string;
103
+ };
104
+ [MoonbaseIntent.Checkout]: {
105
+ complete?: boolean;
106
+ };
107
+ [MoonbaseIntent.CloseCheckout]: never;
108
+ }
109
+
110
+ declare interface MoonbaseOptions {
111
+ toolbar: {
112
+ enabled: boolean;
113
+ location: 'bottom-left' | 'bottom-right';
114
+ show: {
115
+ cart: boolean;
116
+ account: boolean;
117
+ moonbase: boolean;
118
+ };
119
+ };
120
+ auth: {
121
+ signUp: {
122
+ enabled: boolean;
123
+ };
124
+ };
125
+ checkout: {
126
+ redirect: boolean;
127
+ };
128
+ target: HTMLElement | null;
129
+ }
130
+
131
+ export { }