@frigear-nu/subscriptions 0.0.7 → 0.0.9
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/module.d.mts +65 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +61 -29
- package/dist/runtime/app/components/SubscriptionPlans.d.vue.ts +31 -27
- package/dist/runtime/app/components/SubscriptionPlans.vue +203 -105
- package/dist/runtime/app/components/SubscriptionPlans.vue.d.ts +31 -27
- package/dist/runtime/app/components/SubscriptionStatus.d.vue.ts +1 -1
- package/dist/runtime/app/components/SubscriptionStatus.vue +45 -24
- package/dist/runtime/app/components/SubscriptionStatus.vue.d.ts +1 -1
- package/dist/runtime/app/components/Users/Admin/Membership.d.vue.ts +14 -0
- package/dist/runtime/app/components/Users/Admin/Membership.vue +192 -0
- package/dist/runtime/app/components/Users/Admin/Membership.vue.d.ts +14 -0
- package/dist/runtime/app/composables/usePlans.d.ts +11 -0
- package/dist/runtime/app/composables/usePlans.js +9 -1
- package/dist/runtime/app/composables/useSubscription.d.ts +1 -0
- package/dist/runtime/app/composables/useSubscription.js +17 -3
- package/dist/runtime/app/pages/cancel.d.vue.ts +1 -1
- package/dist/runtime/app/pages/cancel.vue.d.ts +1 -1
- package/dist/runtime/app/pages/membership.d.vue.ts +1 -1
- package/dist/runtime/app/pages/membership.vue +18 -1
- package/dist/runtime/app/pages/membership.vue.d.ts +1 -1
- package/dist/runtime/app/pages/success.d.vue.ts +1 -1
- package/dist/runtime/app/pages/success.vue +9 -3
- package/dist/runtime/app/pages/success.vue.d.ts +1 -1
- package/dist/runtime/app/plugins/warm-plans.client.d.ts +6 -0
- package/dist/runtime/app/plugins/warm-plans.client.js +12 -0
- package/dist/runtime/app/tabs/Membership.d.vue.ts +14 -0
- package/dist/runtime/app/tabs/Membership.vue +53 -0
- package/dist/runtime/app/tabs/Membership.vue.d.ts +14 -0
- package/dist/runtime/app/widgets/AdminCurrentSubscription.d.vue.ts +11 -0
- package/dist/runtime/app/widgets/AdminCurrentSubscription.vue +23 -0
- package/dist/runtime/app/widgets/AdminCurrentSubscription.vue.d.ts +11 -0
- package/dist/runtime/i18n/lang/da.json +61 -3
- package/dist/runtime/i18n/lang/en.json +61 -3
- package/dist/runtime/server/db/schema.sqlite.d.ts +19 -0
- package/dist/runtime/server/db/schema.sqlite.js +2 -0
- package/dist/runtime/server/mcp/tools/my-subscriptions.d.ts +2 -0
- package/dist/runtime/server/mcp/tools/my-subscriptions.js +9 -0
- package/dist/runtime/server/routes/admin/payment-link.post.d.ts +2 -0
- package/dist/runtime/server/routes/admin/payment-link.post.js +46 -0
- package/dist/runtime/server/routes/admin/subscription.delete.d.ts +2 -0
- package/dist/runtime/server/routes/admin/subscription.delete.js +14 -0
- package/dist/runtime/server/routes/admin/subscription.get.d.ts +2 -0
- package/dist/runtime/server/routes/admin/subscription.get.js +17 -0
- package/dist/runtime/server/routes/admin/subscription.post.d.ts +2 -0
- package/dist/runtime/server/routes/admin/subscription.post.js +44 -0
- package/dist/runtime/server/routes/admin/subscriptions.get.d.ts +2 -0
- package/dist/runtime/server/routes/admin/subscriptions.get.js +4 -0
- package/dist/runtime/server/routes/subscriptions/checkout.post.js +16 -30
- package/dist/runtime/server/routes/subscriptions/me.get.js +2 -20
- package/dist/runtime/server/routes/subscriptions/portal.post.js +2 -2
- package/dist/runtime/server/stripe/invoice-events.d.ts +2 -0
- package/dist/runtime/server/stripe/invoice-events.js +42 -0
- package/dist/runtime/server/utils/admin-membership.d.ts +5 -0
- package/dist/runtime/server/utils/admin-membership.js +7 -0
- package/dist/runtime/server/utils/checkout.d.ts +15 -0
- package/dist/runtime/server/utils/checkout.js +22 -0
- package/dist/runtime/server/utils/plans.js +20 -1
- package/dist/runtime/server/utils/subscriptions.d.ts +3 -0
- package/dist/runtime/server/utils/subscriptions.js +22 -3
- package/dist/runtime/utils/index.d.ts +1 -1
- package/dist/runtime/utils/index.js +1 -1
- package/dist/runtime/utils/plans.d.ts +15 -6
- package/dist/runtime/utils/plans.js +16 -11
- package/dist/types.d.mts +1 -1
- package/package.json +17 -5
package/dist/module.d.mts
CHANGED
|
@@ -14,11 +14,25 @@ type PlanConfig = {
|
|
|
14
14
|
description?: string;
|
|
15
15
|
/** Drives upgrade vs. downgrade: a higher rank is a higher tier. */
|
|
16
16
|
rank: number;
|
|
17
|
+
/** Bullet points shown on the plan card. The UI prefers `subscriptions.catalog.<planKey>.features` (array) from i18n. */
|
|
18
|
+
features?: string[];
|
|
19
|
+
/** Hide the plan during date windows (existing subscribers still see it). */
|
|
20
|
+
availability?: PlanAvailability;
|
|
21
|
+
};
|
|
22
|
+
/** Dates are anything `new Date()` parses; `{fullYear}` is replaced with the current year (e.g. `{fullYear}-06-01`). */
|
|
23
|
+
type PlanDisabledRange = {
|
|
24
|
+
from: string;
|
|
25
|
+
to: string;
|
|
26
|
+
};
|
|
27
|
+
type PlanAvailability = {
|
|
28
|
+
/** The plan is hidden for new subscribers while today falls within any of these ranges (inclusive). */
|
|
29
|
+
disabledRanges?: PlanDisabledRange[];
|
|
17
30
|
};
|
|
18
31
|
type ModuleOptions = {
|
|
19
32
|
/** Plans keyed by plan key. Leave empty to use the module as "any active subscription". */
|
|
20
33
|
plans?: Record<string, PlanConfig>;
|
|
21
34
|
settings?: {
|
|
35
|
+
mcp?: boolean;
|
|
22
36
|
pages?: {
|
|
23
37
|
/** Default `/account/membership`. */
|
|
24
38
|
membership?: string | boolean;
|
|
@@ -36,6 +50,7 @@ type PublicPlan = {
|
|
|
36
50
|
label: string;
|
|
37
51
|
description?: string;
|
|
38
52
|
rank: number;
|
|
53
|
+
features?: string[];
|
|
39
54
|
};
|
|
40
55
|
/** Exposed as `useRuntimeConfig().public.subscriptions`. */
|
|
41
56
|
type PublicModuleOptions = {
|
|
@@ -54,6 +69,8 @@ type SubscriptionsRuntimeConfig = {
|
|
|
54
69
|
label?: string;
|
|
55
70
|
description?: string;
|
|
56
71
|
rank: number;
|
|
72
|
+
features?: string[];
|
|
73
|
+
availability?: PlanAvailability;
|
|
57
74
|
}>;
|
|
58
75
|
};
|
|
59
76
|
type PlanPrice = {
|
|
@@ -80,6 +97,8 @@ type SubscriptionDto = {
|
|
|
80
97
|
currentPeriodStart: string | null;
|
|
81
98
|
currentPeriodEnd: string | null;
|
|
82
99
|
endedAt: string | null;
|
|
100
|
+
/** `manual` for free grants made by staff. */
|
|
101
|
+
source?: 'stripe' | 'manual';
|
|
83
102
|
};
|
|
84
103
|
type MeResponse = {
|
|
85
104
|
subscriptions: SubscriptionDto[];
|
|
@@ -95,7 +114,7 @@ type CheckoutResponse = {
|
|
|
95
114
|
url: string;
|
|
96
115
|
} | {
|
|
97
116
|
updated: true;
|
|
98
|
-
kind: 'upgrade' | 'downgrade';
|
|
117
|
+
kind: 'upgrade' | 'downgrade' | 'resume';
|
|
99
118
|
};
|
|
100
119
|
type PortalBody = {
|
|
101
120
|
returnUrl?: string;
|
|
@@ -121,6 +140,46 @@ type PlansFilterContext = {
|
|
|
121
140
|
/** The plans about to be returned. Mutate or reassign `plans` to hide / reorder them. */
|
|
122
141
|
plans: ResolvedPlan[];
|
|
123
142
|
};
|
|
143
|
+
/** `GET /api/admin/users/:id/subscription` (staff). */
|
|
144
|
+
type AdminMembershipResponse = {
|
|
145
|
+
plans: Array<{
|
|
146
|
+
key: string;
|
|
147
|
+
label: string;
|
|
148
|
+
rank: number;
|
|
149
|
+
}>;
|
|
150
|
+
current: {
|
|
151
|
+
id: string;
|
|
152
|
+
planKey: string | null;
|
|
153
|
+
status: string;
|
|
154
|
+
source: 'stripe' | 'manual';
|
|
155
|
+
currentPeriodEnd: string | null;
|
|
156
|
+
cancelAtPeriodEnd: boolean;
|
|
157
|
+
} | null;
|
|
158
|
+
};
|
|
159
|
+
/** `POST /api/admin/users/:id/subscription/payment-link` (staff). */
|
|
160
|
+
type AdminPaymentLinkResponse = {
|
|
161
|
+
url: string;
|
|
162
|
+
emailed: boolean;
|
|
163
|
+
};
|
|
164
|
+
/**
|
|
165
|
+
* A membership invoice announced through the `subscriptions:invoice` hook (only when `@frigear-nu/payments` is
|
|
166
|
+
* installed, which stores it as a payment with `referenceType` `subscription`).
|
|
167
|
+
*/
|
|
168
|
+
type InvoicePaymentEvent = {
|
|
169
|
+
userId: number;
|
|
170
|
+
invoiceId: string;
|
|
171
|
+
status: 'paid' | 'failed' | 'expired';
|
|
172
|
+
/** Total in the currency's minor unit. */
|
|
173
|
+
amount: number;
|
|
174
|
+
currency: string;
|
|
175
|
+
description: string | null;
|
|
176
|
+
referenceType: 'subscription';
|
|
177
|
+
/** The Stripe subscription id. */
|
|
178
|
+
referenceId: string;
|
|
179
|
+
paymentIntentId: string | null;
|
|
180
|
+
paidAt: Date | null;
|
|
181
|
+
createdAt: Date;
|
|
182
|
+
};
|
|
124
183
|
|
|
125
184
|
declare module '@nuxt/schema' {
|
|
126
185
|
interface NuxtConfig {
|
|
@@ -147,9 +206,13 @@ declare module 'nitropack' {
|
|
|
147
206
|
'subscriptions:checkout:before': (ctx: CheckoutBeforeContext) => void | Promise<void>;
|
|
148
207
|
/** Policy hook: hide or reorder plans by changing `ctx.plans` in place. */
|
|
149
208
|
'subscriptions:plans:filter': (ctx: PlansFilterContext) => void | Promise<void>;
|
|
209
|
+
/** A membership invoice was paid, failed or voided. Only fired when `@frigear-nu/payments` is installed, which stores it. */
|
|
210
|
+
'subscriptions:invoice': (ctx: {
|
|
211
|
+
invoice: InvoicePaymentEvent;
|
|
212
|
+
}) => void | Promise<void>;
|
|
150
213
|
}
|
|
151
214
|
}
|
|
152
215
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
153
216
|
|
|
154
217
|
export { _default as default };
|
|
155
|
-
export type { CheckoutBeforeContext, CheckoutBody, CheckoutResponse, MeResponse, ModuleOptions, PlanConfig, PlanPrice, PlanPriceRef, PlansFilterContext, PlansResponse, PortalBody, PublicModuleOptions, PublicPlan, ResolvedPlan, SubscriptionDto, SubscriptionsRuntimeConfig };
|
|
218
|
+
export type { AdminMembershipResponse, AdminPaymentLinkResponse, CheckoutBeforeContext, CheckoutBody, CheckoutResponse, InvoicePaymentEvent, MeResponse, ModuleOptions, PlanAvailability, PlanConfig, PlanDisabledRange, PlanPrice, PlanPriceRef, PlansFilterContext, PlansResponse, PortalBody, PublicModuleOptions, PublicPlan, ResolvedPlan, SubscriptionDto, SubscriptionsRuntimeConfig };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { defineNuxtModule, createResolver, hasNuxtModule, addServerHandler, addServerImportsDir, addImports, addComponentsDir,
|
|
2
|
-
import { registerModule, registerLocales, registerDatabaseTable, moduleApiUrl,
|
|
1
|
+
import { defineNuxtModule, createResolver, hasNuxtModule, addServerHandler, addServerImportsDir, addImports, addComponentsDir, addPlugin, addRouteMiddleware } from '@nuxt/kit';
|
|
2
|
+
import { registerModule, registerTailwindSource, registerLocales, resolvePagePath, registerDatabaseTable, moduleApiUrl, inlineModuleRuntime, addModulePages, addOptionalMenuSource } from '@frigear-nu/module-kit/utils';
|
|
3
|
+
import { addAuthScope } from '@frigear-nu/auth/utils';
|
|
4
|
+
import { extendUsersAdmin } from '@frigear-nu/users/utils';
|
|
5
|
+
import { addMcpDefinitions } from '@frigear-nu/mcp/utils';
|
|
3
6
|
import { registerStripeEventHandler } from '@frigear-nu/stripe/utils';
|
|
4
7
|
|
|
5
8
|
const MODULE_NAME = "@frigear-nu/subscriptions";
|
|
6
|
-
function resolvePagePath(setting, defaultPath) {
|
|
7
|
-
if (typeof setting === "string") return setting;
|
|
8
|
-
if (setting === true) return defaultPath;
|
|
9
|
-
return void 0;
|
|
10
|
-
}
|
|
11
9
|
const module$1 = defineNuxtModule({
|
|
12
10
|
meta: { name: MODULE_NAME, configKey: "subscriptions" },
|
|
13
11
|
defaults: {
|
|
@@ -20,17 +18,29 @@ const module$1 = defineNuxtModule({
|
|
|
20
18
|
defaults: { kv: true }
|
|
21
19
|
},
|
|
22
20
|
"@frigear-nu/module-kit": { version: ">=0.0.1" },
|
|
21
|
+
"@frigear-nu/auth": { version: ">=0.0.1" },
|
|
22
|
+
"@frigear-nu/mcp": { version: ">=0.0.1" },
|
|
23
23
|
"@frigear-nu/users": { version: ">=0.0.1" },
|
|
24
24
|
"@frigear-nu/stripe": { version: ">=0.0.1" },
|
|
25
|
-
"@frigear-nu/menu": { version: ">=0.0.1", optional: true }
|
|
25
|
+
"@frigear-nu/menu": { version: ">=0.0.1", optional: true },
|
|
26
|
+
// Membership invoices are only announced (and stored as payments) when it is installed.
|
|
27
|
+
"@frigear-nu/payments": { version: ">=0.0.0", optional: true },
|
|
28
|
+
"@frigear-nu/widget": { version: ">=0.0.0", optional: true },
|
|
29
|
+
// The admin user tab and card are built from its components, so they are only added with it.
|
|
30
|
+
"@frigear-nu/admin": { version: ">=0.0.0", optional: true }
|
|
26
31
|
},
|
|
27
32
|
async setup(options, nuxt) {
|
|
28
33
|
registerModule(MODULE_NAME, nuxt);
|
|
34
|
+
addAuthScope(
|
|
35
|
+
nuxt,
|
|
36
|
+
{ name: "subscriptions:read", description: "Read your subscription and plans" },
|
|
37
|
+
{ name: "subscriptions:write", description: "Start a subscription checkout" }
|
|
38
|
+
);
|
|
29
39
|
const resolver = createResolver(import.meta.url);
|
|
40
|
+
registerTailwindSource(nuxt, resolver.resolve("./runtime/app"));
|
|
30
41
|
registerLocales(nuxt, resolver.resolve("./runtime/i18n/lang"));
|
|
31
42
|
const settings = options.settings ?? {};
|
|
32
43
|
const plans = options.plans ?? {};
|
|
33
|
-
const withMenus = hasNuxtModule("@frigear-nu/menu");
|
|
34
44
|
if (!nuxt.options.hub?.kv) {
|
|
35
45
|
throw new Error("[@frigear-nu/subscriptions] NuxtHub KV is required (plans cache). Set `hub: { kv: true }` in your Nuxt config.");
|
|
36
46
|
}
|
|
@@ -43,12 +53,14 @@ const module$1 = defineNuxtModule({
|
|
|
43
53
|
prices: plan.prices,
|
|
44
54
|
label: plan.label,
|
|
45
55
|
description: plan.description,
|
|
46
|
-
rank: plan.rank
|
|
56
|
+
rank: plan.rank,
|
|
57
|
+
features: plan.features,
|
|
58
|
+
availability: plan.availability
|
|
47
59
|
}]))
|
|
48
60
|
};
|
|
49
61
|
nuxt.options.runtimeConfig.public.subscriptions = {
|
|
50
62
|
pages: { membership: membershipPath, success: successPath, cancel: cancelPath },
|
|
51
|
-
plans: planEntries.map(([key, plan]) => ({ key, label: plan.label ?? key, description: plan.description, rank: plan.rank })).sort((a, b) => a.rank - b.rank),
|
|
63
|
+
plans: planEntries.map(([key, plan]) => ({ key, label: plan.label ?? key, description: plan.description, rank: plan.rank, features: plan.features })).sort((a, b) => a.rank - b.rank),
|
|
52
64
|
allowChangeInPortal: settings.allowChangeInPortal === true
|
|
53
65
|
};
|
|
54
66
|
await registerDatabaseTable(nuxt, {
|
|
@@ -66,6 +78,12 @@ const module$1 = defineNuxtModule({
|
|
|
66
78
|
],
|
|
67
79
|
handler: resolver.resolve("./runtime/server/stripe/subscription-events")
|
|
68
80
|
});
|
|
81
|
+
if (hasNuxtModule("@frigear-nu/payments", nuxt)) {
|
|
82
|
+
registerStripeEventHandler(nuxt, {
|
|
83
|
+
events: ["invoice.paid", "invoice.payment_failed", "invoice.voided", "invoice.marked_uncollectible"],
|
|
84
|
+
handler: resolver.resolve("./runtime/server/stripe/invoice-events")
|
|
85
|
+
});
|
|
86
|
+
}
|
|
69
87
|
addServerHandler({
|
|
70
88
|
route: moduleApiUrl("subscriptions", "plans"),
|
|
71
89
|
method: "get",
|
|
@@ -86,34 +104,48 @@ const module$1 = defineNuxtModule({
|
|
|
86
104
|
method: "post",
|
|
87
105
|
handler: resolver.resolve("./runtime/server/routes/subscriptions/portal.post")
|
|
88
106
|
});
|
|
107
|
+
await extendUsersAdmin(nuxt, {
|
|
108
|
+
routes: [
|
|
109
|
+
["get", "subscription", "subscription.get"],
|
|
110
|
+
["get", "subscriptions", "subscriptions.get"],
|
|
111
|
+
["post", "subscription", "subscription.post"],
|
|
112
|
+
["delete", "subscription", "subscription.delete"],
|
|
113
|
+
["post", "subscription/payment-link", "payment-link.post"]
|
|
114
|
+
].map(([method, path, file]) => ({ method, path, handler: resolver.resolve(`./runtime/server/routes/admin/${file}`) })),
|
|
115
|
+
tab: {
|
|
116
|
+
id: "subscription",
|
|
117
|
+
component: resolver.resolve("./runtime/app/tabs/Membership.vue"),
|
|
118
|
+
order: 10,
|
|
119
|
+
label: "Subscription",
|
|
120
|
+
labelKey: "subscriptions.admin.tab",
|
|
121
|
+
icon: "i-lucide-badge-check"
|
|
122
|
+
},
|
|
123
|
+
widget: {
|
|
124
|
+
id: "subscriptions-current",
|
|
125
|
+
component: resolver.resolve("./runtime/app/widgets/AdminCurrentSubscription.vue"),
|
|
126
|
+
order: 10,
|
|
127
|
+
span: 2
|
|
128
|
+
}
|
|
129
|
+
});
|
|
89
130
|
addServerImportsDir(resolver.resolve("./runtime/server/utils"));
|
|
131
|
+
inlineModuleRuntime(nuxt, resolver);
|
|
132
|
+
if (settings.mcp === true) addMcpDefinitions(nuxt, resolver.resolve("./runtime/server/mcp"));
|
|
90
133
|
addImports([
|
|
91
134
|
{ name: "usePlans", from: resolver.resolve("./runtime/app/composables/usePlans") },
|
|
92
135
|
{ name: "useSubscription", from: resolver.resolve("./runtime/app/composables/useSubscription") }
|
|
93
136
|
]);
|
|
94
137
|
addComponentsDir({ path: resolver.resolve("./runtime/app/components") });
|
|
138
|
+
addPlugin({ src: resolver.resolve("./runtime/app/plugins/warm-plans.client"), mode: "client" });
|
|
95
139
|
addRouteMiddleware({
|
|
96
140
|
name: "subscription",
|
|
97
141
|
path: resolver.resolve("./runtime/app/middleware/subscription")
|
|
98
142
|
});
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
if (successPath && !existingPaths.has(successPath)) {
|
|
106
|
-
pages.push(defineModulePage(MODULE_NAME, { name: "subscriptions-success", path: successPath, file: resolver.resolve("./runtime/app/pages/success.vue") }));
|
|
107
|
-
}
|
|
108
|
-
if (cancelPath && !existingPaths.has(cancelPath)) {
|
|
109
|
-
pages.push(defineModulePage(MODULE_NAME, { name: "subscriptions-cancel", path: cancelPath, file: resolver.resolve("./runtime/app/pages/cancel.vue") }));
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
if (withMenus) {
|
|
114
|
-
const { registerMenuSource } = await import('@frigear-nu/menu/utils');
|
|
115
|
-
registerMenuSource(nuxt, { file: resolver.resolve("./runtime/menus"), menu: "dashboard.account" });
|
|
116
|
-
}
|
|
143
|
+
addModulePages(MODULE_NAME, resolver, [
|
|
144
|
+
{ name: "subscriptions-membership", path: membershipPath, file: "./runtime/app/pages/membership.vue" },
|
|
145
|
+
{ name: "subscriptions-success", path: successPath, file: "./runtime/app/pages/success.vue" },
|
|
146
|
+
{ name: "subscriptions-cancel", path: cancelPath, file: "./runtime/app/pages/cancel.vue" }
|
|
147
|
+
]);
|
|
148
|
+
addOptionalMenuSource(nuxt, { file: resolver.resolve("./runtime/menus"), menu: "dashboard.account" });
|
|
117
149
|
}
|
|
118
150
|
});
|
|
119
151
|
|
|
@@ -8,59 +8,63 @@ type __VLS_Props = {
|
|
|
8
8
|
plans?: string[];
|
|
9
9
|
/** Ask for confirmation (modal) before changing an existing subscription. */
|
|
10
10
|
confirmChange?: boolean;
|
|
11
|
+
/** `list` shows all plans side by side, `tabs` one at a time. `auto` uses tabs on small screens. */
|
|
12
|
+
mode?: 'auto' | 'list' | 'tabs';
|
|
13
|
+
/** Plan key to emphasise (defaults to the current plan, when subscribed). */
|
|
14
|
+
highlight?: string;
|
|
11
15
|
};
|
|
12
16
|
declare function formatPrice(price: SubscriptionPlanPrice): string;
|
|
13
17
|
declare function intervalLabel(price: SubscriptionPlanPrice): any;
|
|
14
|
-
declare var
|
|
15
|
-
plan:
|
|
16
|
-
state: "upgrade" | "downgrade" | "subscribe" | "current";
|
|
17
|
-
},
|
|
18
|
-
plan:
|
|
19
|
-
state: "upgrade" | "downgrade" | "subscribe" | "current";
|
|
20
|
-
},
|
|
21
|
-
plan:
|
|
18
|
+
declare var __VLS_14: {
|
|
19
|
+
plan: SubscriptionPlan;
|
|
20
|
+
state: "upgrade" | "downgrade" | "resume" | "subscribe" | "current";
|
|
21
|
+
}, __VLS_17: {
|
|
22
|
+
plan: SubscriptionPlan;
|
|
23
|
+
state: "upgrade" | "downgrade" | "resume" | "subscribe" | "current";
|
|
24
|
+
}, __VLS_20: {
|
|
25
|
+
plan: SubscriptionPlan;
|
|
22
26
|
price: SubscriptionPlanPrice | undefined;
|
|
23
27
|
formatPrice: typeof formatPrice;
|
|
24
28
|
intervalLabel: typeof intervalLabel;
|
|
25
|
-
},
|
|
26
|
-
plan:
|
|
27
|
-
},
|
|
28
|
-
plan:
|
|
29
|
-
state: "upgrade" | "downgrade" | "subscribe" | "current";
|
|
29
|
+
}, __VLS_23: {
|
|
30
|
+
plan: SubscriptionPlan;
|
|
31
|
+
}, __VLS_26: {
|
|
32
|
+
plan: SubscriptionPlan;
|
|
33
|
+
state: "upgrade" | "downgrade" | "resume" | "subscribe" | "current";
|
|
30
34
|
pending: any;
|
|
31
35
|
select: () => void;
|
|
32
|
-
},
|
|
36
|
+
}, __VLS_35: {}, __VLS_37: {}, __VLS_66: {
|
|
33
37
|
plan: any;
|
|
34
38
|
price: any;
|
|
35
|
-
},
|
|
39
|
+
}, __VLS_74: {
|
|
36
40
|
plan: any;
|
|
37
41
|
price: any;
|
|
38
42
|
confirm: () => any;
|
|
39
43
|
};
|
|
40
44
|
type __VLS_Slots = {} & {
|
|
41
|
-
|
|
45
|
+
header?: (props: typeof __VLS_14) => any;
|
|
42
46
|
} & {
|
|
43
|
-
|
|
47
|
+
badge?: (props: typeof __VLS_17) => any;
|
|
44
48
|
} & {
|
|
45
|
-
|
|
49
|
+
price?: (props: typeof __VLS_20) => any;
|
|
46
50
|
} & {
|
|
47
|
-
|
|
51
|
+
features?: (props: typeof __VLS_23) => any;
|
|
48
52
|
} & {
|
|
49
|
-
|
|
53
|
+
action?: (props: typeof __VLS_26) => any;
|
|
50
54
|
} & {
|
|
51
|
-
|
|
55
|
+
loading?: (props: typeof __VLS_35) => any;
|
|
52
56
|
} & {
|
|
53
|
-
|
|
57
|
+
empty?: (props: typeof __VLS_37) => any;
|
|
54
58
|
} & {
|
|
55
|
-
confirm?: (props: typeof
|
|
59
|
+
confirm?: (props: typeof __VLS_66) => any;
|
|
56
60
|
} & {
|
|
57
|
-
'confirm-actions'?: (props: typeof
|
|
61
|
+
'confirm-actions'?: (props: typeof __VLS_74) => any;
|
|
58
62
|
};
|
|
59
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
63
|
+
declare const __VLS_base: import("@vue/runtime-core").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {
|
|
60
64
|
select: (plan: SubscriptionPlan, price: SubscriptionPlanPrice) => any;
|
|
61
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
65
|
+
}, string, import("@vue/runtime-core").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
62
66
|
onSelect?: ((plan: SubscriptionPlan, price: SubscriptionPlanPrice) => any) | undefined;
|
|
63
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
67
|
+
}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, false, {}, any>;
|
|
64
68
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
65
69
|
declare const _default: typeof __VLS_export;
|
|
66
70
|
export default _default;
|