@m5kdev/web-ui 0.8.11 → 0.9.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/packages/backend/dist/src/modules/billing/billing.repository.d.mts +10 -10
- package/dist/packages/backend/dist/src/modules/billing/billing.repository.d.ts +10 -10
- package/dist/packages/backend/dist/src/modules/billing/billing.service.d.mts +6 -6
- package/dist/packages/backend/dist/src/modules/billing/billing.service.d.ts +6 -6
- package/package.json +5 -5
|
@@ -2714,7 +2714,7 @@ declare const schema: {
|
|
|
2714
2714
|
type Schema = typeof schema;
|
|
2715
2715
|
type Orm = LibSQLDatabase<Schema>;
|
|
2716
2716
|
declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<string, never>, Schema["subscriptions"]> {
|
|
2717
|
-
stripe: Stripe;
|
|
2717
|
+
stripe: Stripe$1;
|
|
2718
2718
|
plans: StripePlan[];
|
|
2719
2719
|
trial?: StripePlan;
|
|
2720
2720
|
constructor(options: {
|
|
@@ -2722,7 +2722,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2722
2722
|
schema: Schema;
|
|
2723
2723
|
table: Schema["subscriptions"];
|
|
2724
2724
|
libs: {
|
|
2725
|
-
stripe: Stripe;
|
|
2725
|
+
stripe: Stripe$1;
|
|
2726
2726
|
};
|
|
2727
2727
|
config: {
|
|
2728
2728
|
trial?: StripePlan;
|
|
@@ -2731,7 +2731,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2731
2731
|
});
|
|
2732
2732
|
hasTrial(): boolean;
|
|
2733
2733
|
getPlanByPriceId(priceId: string): StripePlan | undefined;
|
|
2734
|
-
getCustomerByEmail(email: string): ServerResultAsync<Stripe.Customer | null>;
|
|
2734
|
+
getCustomerByEmail(email: string): ServerResultAsync<Stripe$1.Customer | null>;
|
|
2735
2735
|
getUserByCustomerId(customerId: string): ServerResultAsync<InferSelectModel<Schema["users"]> | null>;
|
|
2736
2736
|
createCustomer({
|
|
2737
2737
|
email,
|
|
@@ -2741,8 +2741,8 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2741
2741
|
email: string;
|
|
2742
2742
|
name?: string;
|
|
2743
2743
|
userId: string;
|
|
2744
|
-
}): ServerResultAsync<Stripe.Customer>;
|
|
2745
|
-
createTrialSubscription(customerId: string): ServerResultAsync<Stripe.Subscription>;
|
|
2744
|
+
}): ServerResultAsync<Stripe$1.Customer>;
|
|
2745
|
+
createTrialSubscription(customerId: string): ServerResultAsync<Stripe$1.Subscription>;
|
|
2746
2746
|
createSubscription({
|
|
2747
2747
|
customerId,
|
|
2748
2748
|
priceId,
|
|
@@ -2753,7 +2753,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2753
2753
|
priceId: string;
|
|
2754
2754
|
quantity?: number;
|
|
2755
2755
|
trialDays?: number;
|
|
2756
|
-
}): ServerResultAsync<Stripe.Subscription>;
|
|
2756
|
+
}): ServerResultAsync<Stripe$1.Subscription>;
|
|
2757
2757
|
updateUserCustomerId({
|
|
2758
2758
|
userId,
|
|
2759
2759
|
customerId
|
|
@@ -2763,7 +2763,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2763
2763
|
}): ServerResultAsync<InferSelectModel<Schema["users"]>>;
|
|
2764
2764
|
getLatestSubscription(referenceId: string): ServerResultAsync<BillingSchema | null>;
|
|
2765
2765
|
getActiveSubscription(referenceId: string): ServerResultAsync<BillingSchema | null>;
|
|
2766
|
-
listInvoices(customerId: string): ServerResultAsync<Stripe.Invoice[]>;
|
|
2766
|
+
listInvoices(customerId: string): ServerResultAsync<Stripe$1.Invoice[]>;
|
|
2767
2767
|
createCheckoutSession({
|
|
2768
2768
|
customerId,
|
|
2769
2769
|
priceId,
|
|
@@ -2772,8 +2772,8 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2772
2772
|
customerId: string;
|
|
2773
2773
|
priceId: string;
|
|
2774
2774
|
userId: string;
|
|
2775
|
-
}): ServerResultAsync<Stripe.Checkout.Session>;
|
|
2776
|
-
createBillingPortalSession(customerId: string): ServerResultAsync<Stripe.BillingPortal.Session>;
|
|
2775
|
+
}): ServerResultAsync<Stripe$1.Checkout.Session>;
|
|
2776
|
+
createBillingPortalSession(customerId: string): ServerResultAsync<Stripe$1.BillingPortal.Session>;
|
|
2777
2777
|
syncStripeData({
|
|
2778
2778
|
customerId,
|
|
2779
2779
|
userId
|
|
@@ -2781,7 +2781,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2781
2781
|
customerId: string;
|
|
2782
2782
|
userId: string;
|
|
2783
2783
|
}): ServerResultAsync<boolean>;
|
|
2784
|
-
constructEvent(body: Buffer | string, signature: string, secret: string): ServerResult<Stripe.Event>;
|
|
2784
|
+
constructEvent(body: Buffer | string, signature: string, secret: string): ServerResult<Stripe$1.Event>;
|
|
2785
2785
|
} //#endregion
|
|
2786
2786
|
//#endregion
|
|
2787
2787
|
export { BillingRepository };
|
|
@@ -2714,7 +2714,7 @@ declare const schema: {
|
|
|
2714
2714
|
type Schema = typeof schema;
|
|
2715
2715
|
type Orm = LibSQLDatabase<Schema>;
|
|
2716
2716
|
declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<string, never>, Schema["subscriptions"]> {
|
|
2717
|
-
stripe: Stripe;
|
|
2717
|
+
stripe: Stripe$1;
|
|
2718
2718
|
plans: StripePlan[];
|
|
2719
2719
|
trial?: StripePlan;
|
|
2720
2720
|
constructor(options: {
|
|
@@ -2722,7 +2722,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2722
2722
|
schema: Schema;
|
|
2723
2723
|
table: Schema["subscriptions"];
|
|
2724
2724
|
libs: {
|
|
2725
|
-
stripe: Stripe;
|
|
2725
|
+
stripe: Stripe$1;
|
|
2726
2726
|
};
|
|
2727
2727
|
config: {
|
|
2728
2728
|
trial?: StripePlan;
|
|
@@ -2731,7 +2731,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2731
2731
|
});
|
|
2732
2732
|
hasTrial(): boolean;
|
|
2733
2733
|
getPlanByPriceId(priceId: string): StripePlan | undefined;
|
|
2734
|
-
getCustomerByEmail(email: string): ServerResultAsync<Stripe.Customer | null>;
|
|
2734
|
+
getCustomerByEmail(email: string): ServerResultAsync<Stripe$1.Customer | null>;
|
|
2735
2735
|
getUserByCustomerId(customerId: string): ServerResultAsync<InferSelectModel<Schema["users"]> | null>;
|
|
2736
2736
|
createCustomer({
|
|
2737
2737
|
email,
|
|
@@ -2741,8 +2741,8 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2741
2741
|
email: string;
|
|
2742
2742
|
name?: string;
|
|
2743
2743
|
userId: string;
|
|
2744
|
-
}): ServerResultAsync<Stripe.Customer>;
|
|
2745
|
-
createTrialSubscription(customerId: string): ServerResultAsync<Stripe.Subscription>;
|
|
2744
|
+
}): ServerResultAsync<Stripe$1.Customer>;
|
|
2745
|
+
createTrialSubscription(customerId: string): ServerResultAsync<Stripe$1.Subscription>;
|
|
2746
2746
|
createSubscription({
|
|
2747
2747
|
customerId,
|
|
2748
2748
|
priceId,
|
|
@@ -2753,7 +2753,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2753
2753
|
priceId: string;
|
|
2754
2754
|
quantity?: number;
|
|
2755
2755
|
trialDays?: number;
|
|
2756
|
-
}): ServerResultAsync<Stripe.Subscription>;
|
|
2756
|
+
}): ServerResultAsync<Stripe$1.Subscription>;
|
|
2757
2757
|
updateUserCustomerId({
|
|
2758
2758
|
userId,
|
|
2759
2759
|
customerId
|
|
@@ -2763,7 +2763,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2763
2763
|
}): ServerResultAsync<InferSelectModel<Schema["users"]>>;
|
|
2764
2764
|
getLatestSubscription(referenceId: string): ServerResultAsync<BillingSchema | null>;
|
|
2765
2765
|
getActiveSubscription(referenceId: string): ServerResultAsync<BillingSchema | null>;
|
|
2766
|
-
listInvoices(customerId: string): ServerResultAsync<Stripe.Invoice[]>;
|
|
2766
|
+
listInvoices(customerId: string): ServerResultAsync<Stripe$1.Invoice[]>;
|
|
2767
2767
|
createCheckoutSession({
|
|
2768
2768
|
customerId,
|
|
2769
2769
|
priceId,
|
|
@@ -2772,8 +2772,8 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2772
2772
|
customerId: string;
|
|
2773
2773
|
priceId: string;
|
|
2774
2774
|
userId: string;
|
|
2775
|
-
}): ServerResultAsync<Stripe.Checkout.Session>;
|
|
2776
|
-
createBillingPortalSession(customerId: string): ServerResultAsync<Stripe.BillingPortal.Session>;
|
|
2775
|
+
}): ServerResultAsync<Stripe$1.Checkout.Session>;
|
|
2776
|
+
createBillingPortalSession(customerId: string): ServerResultAsync<Stripe$1.BillingPortal.Session>;
|
|
2777
2777
|
syncStripeData({
|
|
2778
2778
|
customerId,
|
|
2779
2779
|
userId
|
|
@@ -2781,7 +2781,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
|
|
|
2781
2781
|
customerId: string;
|
|
2782
2782
|
userId: string;
|
|
2783
2783
|
}): ServerResultAsync<boolean>;
|
|
2784
|
-
constructEvent(body: Buffer | string, signature: string, secret: string): ServerResult<Stripe.Event>;
|
|
2784
|
+
constructEvent(body: Buffer | string, signature: string, secret: string): ServerResult<Stripe$1.Event>;
|
|
2785
2785
|
} //#endregion
|
|
2786
2786
|
//#endregion
|
|
2787
2787
|
export { BillingRepository };
|
|
@@ -18,7 +18,7 @@ declare class BillingService extends BaseService<{
|
|
|
18
18
|
email: string;
|
|
19
19
|
name?: string;
|
|
20
20
|
};
|
|
21
|
-
}): ServerResultAsync<Stripe
|
|
21
|
+
}): ServerResultAsync<Stripe.Customer>;
|
|
22
22
|
createUserHook({
|
|
23
23
|
user
|
|
24
24
|
}: {
|
|
@@ -29,7 +29,7 @@ declare class BillingService extends BaseService<{
|
|
|
29
29
|
};
|
|
30
30
|
}): ServerResultAsync<boolean>;
|
|
31
31
|
getActiveSubscription(ctx: Context): ServerResultAsync<BillingSchema | null>;
|
|
32
|
-
listInvoices(ctx: Context): ServerResultAsync<Stripe
|
|
32
|
+
listInvoices(ctx: Context): ServerResultAsync<Stripe.Invoice[]>;
|
|
33
33
|
createCheckoutSession({
|
|
34
34
|
priceId
|
|
35
35
|
}: {
|
|
@@ -38,15 +38,15 @@ declare class BillingService extends BaseService<{
|
|
|
38
38
|
user
|
|
39
39
|
}: {
|
|
40
40
|
user: User;
|
|
41
|
-
}): ServerResultAsync<Stripe
|
|
41
|
+
}): ServerResultAsync<Stripe.Checkout.Session>;
|
|
42
42
|
createBillingPortalSession({
|
|
43
43
|
user
|
|
44
44
|
}: {
|
|
45
45
|
user: User;
|
|
46
|
-
}): ServerResultAsync<Stripe
|
|
47
|
-
constructEvent(body: Buffer | string, signature: string): ServerResult<Stripe
|
|
46
|
+
}): ServerResultAsync<Stripe.BillingPortal.Session>;
|
|
47
|
+
constructEvent(body: Buffer | string, signature: string): ServerResult<Stripe.Event>;
|
|
48
48
|
syncStripeData(customerId: string, eventType?: string): ServerResultAsync<boolean>;
|
|
49
|
-
processEvent(event: Stripe
|
|
49
|
+
processEvent(event: Stripe.Event): ServerResultAsync<boolean>;
|
|
50
50
|
} //#endregion
|
|
51
51
|
//#endregion
|
|
52
52
|
export { BillingService };
|
|
@@ -18,7 +18,7 @@ declare class BillingService extends BaseService<{
|
|
|
18
18
|
email: string;
|
|
19
19
|
name?: string;
|
|
20
20
|
};
|
|
21
|
-
}): ServerResultAsync<Stripe
|
|
21
|
+
}): ServerResultAsync<Stripe.Customer>;
|
|
22
22
|
createUserHook({
|
|
23
23
|
user
|
|
24
24
|
}: {
|
|
@@ -29,7 +29,7 @@ declare class BillingService extends BaseService<{
|
|
|
29
29
|
};
|
|
30
30
|
}): ServerResultAsync<boolean>;
|
|
31
31
|
getActiveSubscription(ctx: Context): ServerResultAsync<BillingSchema | null>;
|
|
32
|
-
listInvoices(ctx: Context): ServerResultAsync<Stripe
|
|
32
|
+
listInvoices(ctx: Context): ServerResultAsync<Stripe.Invoice[]>;
|
|
33
33
|
createCheckoutSession({
|
|
34
34
|
priceId
|
|
35
35
|
}: {
|
|
@@ -38,15 +38,15 @@ declare class BillingService extends BaseService<{
|
|
|
38
38
|
user
|
|
39
39
|
}: {
|
|
40
40
|
user: User;
|
|
41
|
-
}): ServerResultAsync<Stripe
|
|
41
|
+
}): ServerResultAsync<Stripe.Checkout.Session>;
|
|
42
42
|
createBillingPortalSession({
|
|
43
43
|
user
|
|
44
44
|
}: {
|
|
45
45
|
user: User;
|
|
46
|
-
}): ServerResultAsync<Stripe
|
|
47
|
-
constructEvent(body: Buffer | string, signature: string): ServerResult<Stripe
|
|
46
|
+
}): ServerResultAsync<Stripe.BillingPortal.Session>;
|
|
47
|
+
constructEvent(body: Buffer | string, signature: string): ServerResult<Stripe.Event>;
|
|
48
48
|
syncStripeData(customerId: string, eventType?: string): ServerResultAsync<boolean>;
|
|
49
|
-
processEvent(event: Stripe
|
|
49
|
+
processEvent(event: Stripe.Event): ServerResultAsync<boolean>;
|
|
50
50
|
} //#endregion
|
|
51
51
|
//#endregion
|
|
52
52
|
export { BillingService };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m5kdev/web-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"license": "GPL-3.0-only",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"zod": "4.2.1",
|
|
68
68
|
"@tanstack/react-query": "5.83.0",
|
|
69
69
|
"@trpc/tanstack-react-query": "11.4.3",
|
|
70
|
-
"@m5kdev/frontend": "0.
|
|
71
|
-
"@m5kdev/commons": "0.
|
|
70
|
+
"@m5kdev/frontend": "0.9.0",
|
|
71
|
+
"@m5kdev/commons": "0.9.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@tsdown/css": "0.21.7",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"globals": "16.3.0",
|
|
81
81
|
"tsdown": "0.21.7",
|
|
82
82
|
"vite": "7.0.4",
|
|
83
|
-
"@m5kdev/backend": "0.
|
|
84
|
-
"@m5kdev/config": "0.
|
|
83
|
+
"@m5kdev/backend": "0.9.0",
|
|
84
|
+
"@m5kdev/config": "0.9.0"
|
|
85
85
|
},
|
|
86
86
|
"exports": {
|
|
87
87
|
"./components/*": {
|