@m5kdev/backend 0.8.10 → 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.
Files changed (33) hide show
  1. package/dist/src/modules/auth/auth.dto.d.cts +6 -6
  2. package/dist/src/modules/auth/auth.dto.d.mts +6 -6
  3. package/dist/src/modules/auth/auth.lib.d.cts +6 -6
  4. package/dist/src/modules/auth/auth.lib.d.mts +6 -6
  5. package/dist/src/modules/auth/auth.trpc.d.cts +17 -17
  6. package/dist/src/modules/auth/auth.trpc.d.mts +17 -17
  7. package/dist/src/modules/billing/billing.repository.d.cts +11 -11
  8. package/dist/src/modules/billing/billing.repository.d.mts +11 -11
  9. package/dist/src/modules/billing/billing.service.d.cts +7 -7
  10. package/dist/src/modules/billing/billing.service.d.mts +7 -7
  11. package/dist/src/modules/connect/connect.dto.d.cts +6 -6
  12. package/dist/src/modules/connect/connect.dto.d.mts +6 -6
  13. package/dist/src/modules/connect/connect.repository.d.cts +3 -3
  14. package/dist/src/modules/connect/connect.repository.d.mts +3 -3
  15. package/dist/src/modules/connect/connect.service.d.cts +6 -6
  16. package/dist/src/modules/connect/connect.service.d.mts +6 -6
  17. package/dist/src/modules/connect/connect.trpc.d.cts +3 -3
  18. package/dist/src/modules/connect/connect.trpc.d.mts +3 -3
  19. package/dist/src/modules/docx/docx.service.cjs +21 -0
  20. package/dist/src/modules/docx/docx.service.cjs.map +1 -0
  21. package/dist/src/modules/docx/docx.service.d.cts +10 -0
  22. package/dist/src/modules/docx/docx.service.d.mts +10 -0
  23. package/dist/src/modules/docx/docx.service.mjs +17 -0
  24. package/dist/src/modules/docx/docx.service.mjs.map +1 -0
  25. package/dist/src/modules/recurrence/recurrence.service.d.cts +3 -3
  26. package/dist/src/modules/recurrence/recurrence.service.d.mts +3 -3
  27. package/dist/src/modules/recurrence/recurrence.trpc.d.cts +1 -1
  28. package/dist/src/modules/recurrence/recurrence.trpc.d.mts +1 -1
  29. package/dist/src/modules/tag/tag.trpc.d.cts +2 -2
  30. package/dist/src/modules/tag/tag.trpc.d.mts +2 -2
  31. package/dist/src/types.d.cts +17 -17
  32. package/dist/src/types.d.mts +17 -17
  33. package/package.json +7 -5
@@ -12,11 +12,11 @@ declare const waitlistSchema: z.ZodObject<{
12
12
  expiresAt: z.ZodNullable<z.ZodDate>;
13
13
  }, z.core.$strip>;
14
14
  declare const waitlistOutputSchema: z.ZodObject<{
15
- id: z.ZodString;
16
15
  name: z.ZodNullable<z.ZodString>;
16
+ id: z.ZodString;
17
+ email: z.ZodNullable<z.ZodString>;
17
18
  createdAt: z.ZodDate;
18
19
  updatedAt: z.ZodNullable<z.ZodDate>;
19
- email: z.ZodNullable<z.ZodString>;
20
20
  status: z.ZodString;
21
21
  }, z.core.$strip>;
22
22
  type WaitlistOutput = z.infer<typeof waitlistOutputSchema>;
@@ -34,10 +34,10 @@ declare const accountClaimSchema: z.ZodObject<{
34
34
  }, z.core.$strip>;
35
35
  declare const accountClaimOutputSchema: z.ZodObject<{
36
36
  id: z.ZodString;
37
- expiresAt: z.ZodNullable<z.ZodDate>;
38
37
  createdAt: z.ZodDate;
39
38
  updatedAt: z.ZodNullable<z.ZodDate>;
40
39
  status: z.ZodString;
40
+ expiresAt: z.ZodNullable<z.ZodDate>;
41
41
  claimUserId: z.ZodNullable<z.ZodString>;
42
42
  claimedAt: z.ZodNullable<z.ZodDate>;
43
43
  claimedEmail: z.ZodNullable<z.ZodString>;
@@ -56,10 +56,10 @@ declare const accountClaimMagicLinkSchema: z.ZodObject<{
56
56
  }, z.core.$strip>;
57
57
  declare const accountClaimMagicLinkOutputSchema: z.ZodObject<{
58
58
  id: z.ZodString;
59
- userId: z.ZodString;
60
- expiresAt: z.ZodNullable<z.ZodDate>;
61
- createdAt: z.ZodDate;
62
59
  email: z.ZodString;
60
+ createdAt: z.ZodDate;
61
+ expiresAt: z.ZodNullable<z.ZodDate>;
62
+ userId: z.ZodString;
63
63
  claimId: z.ZodString;
64
64
  url: z.ZodString;
65
65
  }, z.core.$strip>;
@@ -12,11 +12,11 @@ declare const waitlistSchema: z.ZodObject<{
12
12
  expiresAt: z.ZodNullable<z.ZodDate>;
13
13
  }, z.core.$strip>;
14
14
  declare const waitlistOutputSchema: z.ZodObject<{
15
- id: z.ZodString;
16
15
  name: z.ZodNullable<z.ZodString>;
16
+ id: z.ZodString;
17
+ email: z.ZodNullable<z.ZodString>;
17
18
  createdAt: z.ZodDate;
18
19
  updatedAt: z.ZodNullable<z.ZodDate>;
19
- email: z.ZodNullable<z.ZodString>;
20
20
  status: z.ZodString;
21
21
  }, z.core.$strip>;
22
22
  type WaitlistOutput = z.infer<typeof waitlistOutputSchema>;
@@ -34,10 +34,10 @@ declare const accountClaimSchema: z.ZodObject<{
34
34
  }, z.core.$strip>;
35
35
  declare const accountClaimOutputSchema: z.ZodObject<{
36
36
  id: z.ZodString;
37
- expiresAt: z.ZodNullable<z.ZodDate>;
38
37
  createdAt: z.ZodDate;
39
38
  updatedAt: z.ZodNullable<z.ZodDate>;
40
39
  status: z.ZodString;
40
+ expiresAt: z.ZodNullable<z.ZodDate>;
41
41
  claimUserId: z.ZodNullable<z.ZodString>;
42
42
  claimedAt: z.ZodNullable<z.ZodDate>;
43
43
  claimedEmail: z.ZodNullable<z.ZodString>;
@@ -56,10 +56,10 @@ declare const accountClaimMagicLinkSchema: z.ZodObject<{
56
56
  }, z.core.$strip>;
57
57
  declare const accountClaimMagicLinkOutputSchema: z.ZodObject<{
58
58
  id: z.ZodString;
59
- userId: z.ZodString;
60
- expiresAt: z.ZodNullable<z.ZodDate>;
61
- createdAt: z.ZodDate;
62
59
  email: z.ZodString;
60
+ createdAt: z.ZodDate;
61
+ expiresAt: z.ZodNullable<z.ZodDate>;
62
+ userId: z.ZodString;
63
63
  claimId: z.ZodString;
64
64
  url: z.ZodString;
65
65
  }, z.core.$strip>;
@@ -3279,14 +3279,14 @@ declare function createBetterAuth<O extends Orm, S extends Schema, E extends Ema
3279
3279
  $Infer: {
3280
3280
  body: ({
3281
3281
  permission: {
3282
- readonly user?: ("get" | "set-role" | "create" | "update" | "delete" | "list" | "ban" | "impersonate" | "set-password")[] | undefined;
3283
- readonly session?: ("delete" | "list" | "revoke")[] | undefined;
3282
+ readonly user?: ("get" | "list" | "delete" | "set-role" | "create" | "update" | "ban" | "impersonate" | "set-password")[] | undefined;
3283
+ readonly session?: ("list" | "delete" | "revoke")[] | undefined;
3284
3284
  };
3285
3285
  permissions?: never | undefined;
3286
3286
  } | {
3287
3287
  permissions: {
3288
- readonly user?: ("get" | "set-role" | "create" | "update" | "delete" | "list" | "ban" | "impersonate" | "set-password")[] | undefined;
3289
- readonly session?: ("delete" | "list" | "revoke")[] | undefined;
3288
+ readonly user?: ("get" | "list" | "delete" | "set-role" | "create" | "update" | "ban" | "impersonate" | "set-password")[] | undefined;
3289
+ readonly session?: ("list" | "delete" | "revoke")[] | undefined;
3290
3290
  };
3291
3291
  permission?: never | undefined;
3292
3292
  }) & {
@@ -4810,7 +4810,7 @@ declare function createBetterAuth<O extends Orm, S extends Schema, E extends Ema
4810
4810
  socialProviders?: _$better_auth0.SocialProviders | undefined;
4811
4811
  account?: {
4812
4812
  modelName?: string;
4813
- fields?: Partial<Record<"userId" | "accessToken" | "refreshToken" | "scope" | "createdAt" | "updatedAt" | "accountId" | "providerId" | "idToken" | "accessTokenExpiresAt" | "refreshTokenExpiresAt" | "password", string>>;
4813
+ fields?: Partial<Record<"createdAt" | "updatedAt" | "userId" | "accessToken" | "refreshToken" | "scope" | "accountId" | "providerId" | "idToken" | "accessTokenExpiresAt" | "refreshTokenExpiresAt" | "password", string>>;
4814
4814
  additionalFields?: {
4815
4815
  [key: string]: _$better_auth0.DBFieldAttribute;
4816
4816
  };
@@ -4830,7 +4830,7 @@ declare function createBetterAuth<O extends Orm, S extends Schema, E extends Ema
4830
4830
  } | undefined;
4831
4831
  verification?: {
4832
4832
  modelName?: string;
4833
- fields?: Partial<Record<"expiresAt" | "createdAt" | "updatedAt" | "identifier" | "value", string>>;
4833
+ fields?: Partial<Record<"createdAt" | "updatedAt" | "expiresAt" | "value" | "identifier", string>>;
4834
4834
  additionalFields?: {
4835
4835
  [key: string]: _$better_auth0.DBFieldAttribute;
4836
4836
  };
@@ -3279,14 +3279,14 @@ declare function createBetterAuth<O extends Orm, S extends Schema, E extends Ema
3279
3279
  $Infer: {
3280
3280
  body: ({
3281
3281
  permission: {
3282
- readonly user?: ("get" | "set-role" | "create" | "update" | "delete" | "list" | "ban" | "impersonate" | "set-password")[] | undefined;
3283
- readonly session?: ("delete" | "list" | "revoke")[] | undefined;
3282
+ readonly user?: ("get" | "list" | "delete" | "set-role" | "create" | "update" | "ban" | "impersonate" | "set-password")[] | undefined;
3283
+ readonly session?: ("list" | "delete" | "revoke")[] | undefined;
3284
3284
  };
3285
3285
  permissions?: never | undefined;
3286
3286
  } | {
3287
3287
  permissions: {
3288
- readonly user?: ("get" | "set-role" | "create" | "update" | "delete" | "list" | "ban" | "impersonate" | "set-password")[] | undefined;
3289
- readonly session?: ("delete" | "list" | "revoke")[] | undefined;
3288
+ readonly user?: ("get" | "list" | "delete" | "set-role" | "create" | "update" | "ban" | "impersonate" | "set-password")[] | undefined;
3289
+ readonly session?: ("list" | "delete" | "revoke")[] | undefined;
3290
3290
  };
3291
3291
  permission?: never | undefined;
3292
3292
  }) & {
@@ -4810,7 +4810,7 @@ declare function createBetterAuth<O extends Orm, S extends Schema, E extends Ema
4810
4810
  socialProviders?: _$better_auth0.SocialProviders | undefined;
4811
4811
  account?: {
4812
4812
  modelName?: string;
4813
- fields?: Partial<Record<"userId" | "accessToken" | "refreshToken" | "scope" | "createdAt" | "updatedAt" | "accountId" | "providerId" | "idToken" | "accessTokenExpiresAt" | "refreshTokenExpiresAt" | "password", string>>;
4813
+ fields?: Partial<Record<"createdAt" | "updatedAt" | "userId" | "accessToken" | "refreshToken" | "scope" | "accountId" | "providerId" | "idToken" | "accessTokenExpiresAt" | "refreshTokenExpiresAt" | "password", string>>;
4814
4814
  additionalFields?: {
4815
4815
  [key: string]: _$better_auth0.DBFieldAttribute;
4816
4816
  };
@@ -4830,7 +4830,7 @@ declare function createBetterAuth<O extends Orm, S extends Schema, E extends Ema
4830
4830
  } | undefined;
4831
4831
  verification?: {
4832
4832
  modelName?: string;
4833
- fields?: Partial<Record<"expiresAt" | "createdAt" | "updatedAt" | "identifier" | "value", string>>;
4833
+ fields?: Partial<Record<"createdAt" | "updatedAt" | "expiresAt" | "value" | "identifier", string>>;
4834
4834
  additionalFields?: {
4835
4835
  [key: string]: _$better_auth0.DBFieldAttribute;
4836
4836
  };
@@ -57,10 +57,10 @@ declare function createAuthTRPC({
57
57
  input: void;
58
58
  output: {
59
59
  id: string;
60
- expiresAt: Date | null;
61
60
  createdAt: Date;
62
61
  updatedAt: Date | null;
63
62
  status: string;
63
+ expiresAt: Date | null;
64
64
  claimUserId: string | null;
65
65
  claimedAt: Date | null;
66
66
  claimedEmail: string | null;
@@ -74,10 +74,10 @@ declare function createAuthTRPC({
74
74
  };
75
75
  output: {
76
76
  id: string;
77
- userId: string;
78
- expiresAt: Date | null;
79
- createdAt: Date;
80
77
  email: string;
78
+ createdAt: Date;
79
+ expiresAt: Date | null;
80
+ userId: string;
81
81
  claimId: string;
82
82
  url: string;
83
83
  };
@@ -89,10 +89,10 @@ declare function createAuthTRPC({
89
89
  };
90
90
  output: {
91
91
  id: string;
92
- userId: string;
93
- expiresAt: Date | null;
94
- createdAt: Date;
95
92
  email: string;
93
+ createdAt: Date;
94
+ expiresAt: Date | null;
95
+ userId: string;
96
96
  claimId: string;
97
97
  url: string;
98
98
  }[];
@@ -146,11 +146,11 @@ declare function createAuthTRPC({
146
146
  listAdminWaitlist: _$_trpc_server0.TRPCQueryProcedure<{
147
147
  input: void;
148
148
  output: {
149
- id: string;
150
149
  name: string | null;
150
+ id: string;
151
+ email: string | null;
151
152
  createdAt: Date;
152
153
  updatedAt: Date | null;
153
- email: string | null;
154
154
  status: string;
155
155
  }[];
156
156
  meta: any;
@@ -160,11 +160,11 @@ declare function createAuthTRPC({
160
160
  email: string;
161
161
  };
162
162
  output: {
163
- id: string;
164
163
  name: string | null;
164
+ id: string;
165
+ email: string | null;
165
166
  createdAt: Date;
166
167
  updatedAt: Date | null;
167
- email: string | null;
168
168
  status: string;
169
169
  };
170
170
  meta: any;
@@ -191,11 +191,11 @@ declare function createAuthTRPC({
191
191
  id: string;
192
192
  };
193
193
  output: {
194
- id: string;
195
194
  name: string | null;
195
+ id: string;
196
+ email: string | null;
196
197
  createdAt: Date;
197
198
  updatedAt: Date | null;
198
- email: string | null;
199
199
  status: string;
200
200
  };
201
201
  meta: any;
@@ -205,11 +205,11 @@ declare function createAuthTRPC({
205
205
  id: string;
206
206
  };
207
207
  output: {
208
- id: string;
209
208
  name: string | null;
209
+ id: string;
210
+ email: string | null;
210
211
  createdAt: Date;
211
212
  updatedAt: Date | null;
212
- email: string | null;
213
213
  status: string;
214
214
  };
215
215
  meta: any;
@@ -219,11 +219,11 @@ declare function createAuthTRPC({
219
219
  email: string;
220
220
  };
221
221
  output: {
222
- id: string;
223
222
  name: string | null;
223
+ id: string;
224
+ email: string | null;
224
225
  createdAt: Date;
225
226
  updatedAt: Date | null;
226
- email: string | null;
227
227
  status: string;
228
228
  };
229
229
  meta: any;
@@ -57,10 +57,10 @@ declare function createAuthTRPC({
57
57
  input: void;
58
58
  output: {
59
59
  id: string;
60
- expiresAt: Date | null;
61
60
  createdAt: Date;
62
61
  updatedAt: Date | null;
63
62
  status: string;
63
+ expiresAt: Date | null;
64
64
  claimUserId: string | null;
65
65
  claimedAt: Date | null;
66
66
  claimedEmail: string | null;
@@ -74,10 +74,10 @@ declare function createAuthTRPC({
74
74
  };
75
75
  output: {
76
76
  id: string;
77
- userId: string;
78
- expiresAt: Date | null;
79
- createdAt: Date;
80
77
  email: string;
78
+ createdAt: Date;
79
+ expiresAt: Date | null;
80
+ userId: string;
81
81
  claimId: string;
82
82
  url: string;
83
83
  };
@@ -89,10 +89,10 @@ declare function createAuthTRPC({
89
89
  };
90
90
  output: {
91
91
  id: string;
92
- userId: string;
93
- expiresAt: Date | null;
94
- createdAt: Date;
95
92
  email: string;
93
+ createdAt: Date;
94
+ expiresAt: Date | null;
95
+ userId: string;
96
96
  claimId: string;
97
97
  url: string;
98
98
  }[];
@@ -146,11 +146,11 @@ declare function createAuthTRPC({
146
146
  listAdminWaitlist: _$_trpc_server0.TRPCQueryProcedure<{
147
147
  input: void;
148
148
  output: {
149
- id: string;
150
149
  name: string | null;
150
+ id: string;
151
+ email: string | null;
151
152
  createdAt: Date;
152
153
  updatedAt: Date | null;
153
- email: string | null;
154
154
  status: string;
155
155
  }[];
156
156
  meta: any;
@@ -160,11 +160,11 @@ declare function createAuthTRPC({
160
160
  email: string;
161
161
  };
162
162
  output: {
163
- id: string;
164
163
  name: string | null;
164
+ id: string;
165
+ email: string | null;
165
166
  createdAt: Date;
166
167
  updatedAt: Date | null;
167
- email: string | null;
168
168
  status: string;
169
169
  };
170
170
  meta: any;
@@ -191,11 +191,11 @@ declare function createAuthTRPC({
191
191
  id: string;
192
192
  };
193
193
  output: {
194
- id: string;
195
194
  name: string | null;
195
+ id: string;
196
+ email: string | null;
196
197
  createdAt: Date;
197
198
  updatedAt: Date | null;
198
- email: string | null;
199
199
  status: string;
200
200
  };
201
201
  meta: any;
@@ -205,11 +205,11 @@ declare function createAuthTRPC({
205
205
  id: string;
206
206
  };
207
207
  output: {
208
- id: string;
209
208
  name: string | null;
209
+ id: string;
210
+ email: string | null;
210
211
  createdAt: Date;
211
212
  updatedAt: Date | null;
212
- email: string | null;
213
213
  status: string;
214
214
  };
215
215
  meta: any;
@@ -219,11 +219,11 @@ declare function createAuthTRPC({
219
219
  email: string;
220
220
  };
221
221
  output: {
222
- id: string;
223
222
  name: string | null;
223
+ id: string;
224
+ email: string | null;
224
225
  createdAt: Date;
225
226
  updatedAt: Date | null;
226
- email: string | null;
227
227
  status: string;
228
228
  };
229
229
  meta: any;
@@ -4,7 +4,7 @@ import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
4
4
  import { LibSQLDatabase } from "drizzle-orm/libsql";
5
5
  import { InferSelectModel } from "drizzle-orm";
6
6
  import { BillingSchema } from "@m5kdev/commons/modules/billing/billing.schema";
7
- import { Stripe } from "stripe";
7
+ import { Stripe as Stripe$1 } from "stripe";
8
8
  import { StripePlan } from "@m5kdev/commons/modules/billing/billing.types";
9
9
 
10
10
  //#region src/modules/billing/billing.repository.d.ts
@@ -2713,7 +2713,7 @@ declare const schema: {
2713
2713
  type Schema = typeof schema;
2714
2714
  type Orm = LibSQLDatabase<Schema>;
2715
2715
  declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<string, never>, Schema["subscriptions"]> {
2716
- stripe: Stripe;
2716
+ stripe: Stripe$1;
2717
2717
  plans: StripePlan[];
2718
2718
  trial?: StripePlan;
2719
2719
  constructor(options: {
@@ -2721,7 +2721,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
2721
2721
  schema: Schema;
2722
2722
  table: Schema["subscriptions"];
2723
2723
  libs: {
2724
- stripe: Stripe;
2724
+ stripe: Stripe$1;
2725
2725
  };
2726
2726
  config: {
2727
2727
  trial?: StripePlan;
@@ -2730,7 +2730,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
2730
2730
  });
2731
2731
  hasTrial(): boolean;
2732
2732
  getPlanByPriceId(priceId: string): StripePlan | undefined;
2733
- getCustomerByEmail(email: string): ServerResultAsync<Stripe.Customer | null>;
2733
+ getCustomerByEmail(email: string): ServerResultAsync<Stripe$1.Customer | null>;
2734
2734
  getUserByCustomerId(customerId: string): ServerResultAsync<InferSelectModel<Schema["users"]> | null>;
2735
2735
  createCustomer({
2736
2736
  email,
@@ -2740,8 +2740,8 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
2740
2740
  email: string;
2741
2741
  name?: string;
2742
2742
  userId: string;
2743
- }): ServerResultAsync<Stripe.Customer>;
2744
- createTrialSubscription(customerId: string): ServerResultAsync<Stripe.Subscription>;
2743
+ }): ServerResultAsync<Stripe$1.Customer>;
2744
+ createTrialSubscription(customerId: string): ServerResultAsync<Stripe$1.Subscription>;
2745
2745
  createSubscription({
2746
2746
  customerId,
2747
2747
  priceId,
@@ -2752,7 +2752,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
2752
2752
  priceId: string;
2753
2753
  quantity?: number;
2754
2754
  trialDays?: number;
2755
- }): ServerResultAsync<Stripe.Subscription>;
2755
+ }): ServerResultAsync<Stripe$1.Subscription>;
2756
2756
  updateUserCustomerId({
2757
2757
  userId,
2758
2758
  customerId
@@ -2762,7 +2762,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
2762
2762
  }): ServerResultAsync<InferSelectModel<Schema["users"]>>;
2763
2763
  getLatestSubscription(referenceId: string): ServerResultAsync<BillingSchema | null>;
2764
2764
  getActiveSubscription(referenceId: string): ServerResultAsync<BillingSchema | null>;
2765
- listInvoices(customerId: string): ServerResultAsync<Stripe.Invoice[]>;
2765
+ listInvoices(customerId: string): ServerResultAsync<Stripe$1.Invoice[]>;
2766
2766
  createCheckoutSession({
2767
2767
  customerId,
2768
2768
  priceId,
@@ -2771,8 +2771,8 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
2771
2771
  customerId: string;
2772
2772
  priceId: string;
2773
2773
  userId: string;
2774
- }): ServerResultAsync<Stripe.Checkout.Session>;
2775
- createBillingPortalSession(customerId: string): ServerResultAsync<Stripe.BillingPortal.Session>;
2774
+ }): ServerResultAsync<Stripe$1.Checkout.Session>;
2775
+ createBillingPortalSession(customerId: string): ServerResultAsync<Stripe$1.BillingPortal.Session>;
2776
2776
  syncStripeData({
2777
2777
  customerId,
2778
2778
  userId
@@ -2780,7 +2780,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
2780
2780
  customerId: string;
2781
2781
  userId: string;
2782
2782
  }): ServerResultAsync<boolean>;
2783
- constructEvent(body: Buffer | string, signature: string, secret: string): ServerResult<Stripe.Event>;
2783
+ constructEvent(body: Buffer | string, signature: string, secret: string): ServerResult<Stripe$1.Event>;
2784
2784
  }
2785
2785
  //#endregion
2786
2786
  export { BillingRepository };
@@ -4,7 +4,7 @@ import { BillingSchema } from "@m5kdev/commons/modules/billing/billing.schema";
4
4
  import { InferSelectModel } from "drizzle-orm";
5
5
  import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
6
6
  import { LibSQLDatabase } from "drizzle-orm/libsql";
7
- import { Stripe } from "stripe";
7
+ import { Stripe as Stripe$1 } from "stripe";
8
8
  import { StripePlan } from "@m5kdev/commons/modules/billing/billing.types";
9
9
 
10
10
  //#region src/modules/billing/billing.repository.d.ts
@@ -2713,7 +2713,7 @@ declare const schema: {
2713
2713
  type Schema = typeof schema;
2714
2714
  type Orm = LibSQLDatabase<Schema>;
2715
2715
  declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<string, never>, Schema["subscriptions"]> {
2716
- stripe: Stripe;
2716
+ stripe: Stripe$1;
2717
2717
  plans: StripePlan[];
2718
2718
  trial?: StripePlan;
2719
2719
  constructor(options: {
@@ -2721,7 +2721,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
2721
2721
  schema: Schema;
2722
2722
  table: Schema["subscriptions"];
2723
2723
  libs: {
2724
- stripe: Stripe;
2724
+ stripe: Stripe$1;
2725
2725
  };
2726
2726
  config: {
2727
2727
  trial?: StripePlan;
@@ -2730,7 +2730,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
2730
2730
  });
2731
2731
  hasTrial(): boolean;
2732
2732
  getPlanByPriceId(priceId: string): StripePlan | undefined;
2733
- getCustomerByEmail(email: string): ServerResultAsync<Stripe.Customer | null>;
2733
+ getCustomerByEmail(email: string): ServerResultAsync<Stripe$1.Customer | null>;
2734
2734
  getUserByCustomerId(customerId: string): ServerResultAsync<InferSelectModel<Schema["users"]> | null>;
2735
2735
  createCustomer({
2736
2736
  email,
@@ -2740,8 +2740,8 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
2740
2740
  email: string;
2741
2741
  name?: string;
2742
2742
  userId: string;
2743
- }): ServerResultAsync<Stripe.Customer>;
2744
- createTrialSubscription(customerId: string): ServerResultAsync<Stripe.Subscription>;
2743
+ }): ServerResultAsync<Stripe$1.Customer>;
2744
+ createTrialSubscription(customerId: string): ServerResultAsync<Stripe$1.Subscription>;
2745
2745
  createSubscription({
2746
2746
  customerId,
2747
2747
  priceId,
@@ -2752,7 +2752,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
2752
2752
  priceId: string;
2753
2753
  quantity?: number;
2754
2754
  trialDays?: number;
2755
- }): ServerResultAsync<Stripe.Subscription>;
2755
+ }): ServerResultAsync<Stripe$1.Subscription>;
2756
2756
  updateUserCustomerId({
2757
2757
  userId,
2758
2758
  customerId
@@ -2762,7 +2762,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
2762
2762
  }): ServerResultAsync<InferSelectModel<Schema["users"]>>;
2763
2763
  getLatestSubscription(referenceId: string): ServerResultAsync<BillingSchema | null>;
2764
2764
  getActiveSubscription(referenceId: string): ServerResultAsync<BillingSchema | null>;
2765
- listInvoices(customerId: string): ServerResultAsync<Stripe.Invoice[]>;
2765
+ listInvoices(customerId: string): ServerResultAsync<Stripe$1.Invoice[]>;
2766
2766
  createCheckoutSession({
2767
2767
  customerId,
2768
2768
  priceId,
@@ -2771,8 +2771,8 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
2771
2771
  customerId: string;
2772
2772
  priceId: string;
2773
2773
  userId: string;
2774
- }): ServerResultAsync<Stripe.Checkout.Session>;
2775
- createBillingPortalSession(customerId: string): ServerResultAsync<Stripe.BillingPortal.Session>;
2774
+ }): ServerResultAsync<Stripe$1.Checkout.Session>;
2775
+ createBillingPortalSession(customerId: string): ServerResultAsync<Stripe$1.BillingPortal.Session>;
2776
2776
  syncStripeData({
2777
2777
  customerId,
2778
2778
  userId
@@ -2780,7 +2780,7 @@ declare class BillingRepository extends BaseTableRepository<Orm, Schema, Record<
2780
2780
  customerId: string;
2781
2781
  userId: string;
2782
2782
  }): ServerResultAsync<boolean>;
2783
- constructEvent(body: Buffer | string, signature: string, secret: string): ServerResult<Stripe.Event>;
2783
+ constructEvent(body: Buffer | string, signature: string, secret: string): ServerResult<Stripe$1.Event>;
2784
2784
  }
2785
2785
  //#endregion
2786
2786
  export { BillingRepository };
@@ -4,7 +4,7 @@ import { BillingRepository } from "./billing.repository.cjs";
4
4
  import { User } from "../auth/auth.lib.cjs";
5
5
  import { BaseService } from "../base/base.service.cjs";
6
6
  import { BillingSchema } from "@m5kdev/commons/modules/billing/billing.schema";
7
- import Stripe$1 from "stripe";
7
+ import Stripe from "stripe";
8
8
 
9
9
  //#region src/modules/billing/billing.service.d.ts
10
10
  declare class BillingService extends BaseService<{
@@ -18,7 +18,7 @@ declare class BillingService extends BaseService<{
18
18
  email: string;
19
19
  name?: string;
20
20
  };
21
- }): ServerResultAsync<Stripe$1.Customer>;
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$1.Invoice[]>;
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$1.Checkout.Session>;
41
+ }): ServerResultAsync<Stripe.Checkout.Session>;
42
42
  createBillingPortalSession({
43
43
  user
44
44
  }: {
45
45
  user: User;
46
- }): ServerResultAsync<Stripe$1.BillingPortal.Session>;
47
- constructEvent(body: Buffer | string, signature: string): ServerResult<Stripe$1.Event>;
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$1.Event): ServerResultAsync<boolean>;
49
+ processEvent(event: Stripe.Event): ServerResultAsync<boolean>;
50
50
  }
51
51
  //#endregion
52
52
  export { BillingService };
@@ -4,7 +4,7 @@ import { BillingRepository } from "./billing.repository.mjs";
4
4
  import { User } from "../auth/auth.lib.mjs";
5
5
  import { BaseService } from "../base/base.service.mjs";
6
6
  import { BillingSchema } from "@m5kdev/commons/modules/billing/billing.schema";
7
- import Stripe$1 from "stripe";
7
+ import Stripe from "stripe";
8
8
 
9
9
  //#region src/modules/billing/billing.service.d.ts
10
10
  declare class BillingService extends BaseService<{
@@ -18,7 +18,7 @@ declare class BillingService extends BaseService<{
18
18
  email: string;
19
19
  name?: string;
20
20
  };
21
- }): ServerResultAsync<Stripe$1.Customer>;
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$1.Invoice[]>;
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$1.Checkout.Session>;
41
+ }): ServerResultAsync<Stripe.Checkout.Session>;
42
42
  createBillingPortalSession({
43
43
  user
44
44
  }: {
45
45
  user: User;
46
- }): ServerResultAsync<Stripe$1.BillingPortal.Session>;
47
- constructEvent(body: Buffer | string, signature: string): ServerResult<Stripe$1.Event>;
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$1.Event): ServerResultAsync<boolean>;
49
+ processEvent(event: Stripe.Event): ServerResultAsync<boolean>;
50
50
  }
51
51
  //#endregion
52
52
  export { BillingService };