@m5kdev/backend 0.8.2 → 0.8.3

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.
@@ -3279,13 +3279,13 @@ declare function createBetterAuth<O extends Orm, S extends Schema, E extends Ema
3279
3279
  $Infer: {
3280
3280
  body: ({
3281
3281
  permission: {
3282
- readonly user?: ("update" | "set-role" | "create" | "delete" | "list" | "get" | "ban" | "impersonate" | "set-password")[] | undefined;
3282
+ readonly user?: ("set-role" | "create" | "update" | "delete" | "list" | "get" | "ban" | "impersonate" | "set-password")[] | undefined;
3283
3283
  readonly session?: ("delete" | "list" | "revoke")[] | undefined;
3284
3284
  };
3285
3285
  permissions?: never | undefined;
3286
3286
  } | {
3287
3287
  permissions: {
3288
- readonly user?: ("update" | "set-role" | "create" | "delete" | "list" | "get" | "ban" | "impersonate" | "set-password")[] | undefined;
3288
+ readonly user?: ("set-role" | "create" | "update" | "delete" | "list" | "get" | "ban" | "impersonate" | "set-password")[] | undefined;
3289
3289
  readonly session?: ("delete" | "list" | "revoke")[] | undefined;
3290
3290
  };
3291
3291
  permission?: never | undefined;
@@ -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<"createdAt" | "updatedAt" | "expiresAt" | "value" | "identifier", string>>;
4833
+ fields?: Partial<Record<"createdAt" | "updatedAt" | "expiresAt" | "identifier" | "value", string>>;
4834
4834
  additionalFields?: {
4835
4835
  [key: string]: _$better_auth0.DBFieldAttribute;
4836
4836
  };
@@ -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 as Stripe$1 } from "stripe";
7
+ import { Stripe } 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$1;
2716
+ stripe: Stripe;
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$1;
2724
+ stripe: Stripe;
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$1.Customer | null>;
2733
+ getCustomerByEmail(email: string): ServerResultAsync<Stripe.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$1.Customer>;
2744
- createTrialSubscription(customerId: string): ServerResultAsync<Stripe$1.Subscription>;
2743
+ }): ServerResultAsync<Stripe.Customer>;
2744
+ createTrialSubscription(customerId: string): ServerResultAsync<Stripe.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$1.Subscription>;
2755
+ }): ServerResultAsync<Stripe.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$1.Invoice[]>;
2765
+ listInvoices(customerId: string): ServerResultAsync<Stripe.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$1.Checkout.Session>;
2775
- createBillingPortalSession(customerId: string): ServerResultAsync<Stripe$1.BillingPortal.Session>;
2774
+ }): ServerResultAsync<Stripe.Checkout.Session>;
2775
+ createBillingPortalSession(customerId: string): ServerResultAsync<Stripe.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$1.Event>;
2783
+ constructEvent(body: Buffer | string, signature: string, secret: string): ServerResult<Stripe.Event>;
2784
2784
  }
2785
2785
  //#endregion
2786
2786
  export { BillingRepository };
@@ -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 from "stripe";
7
+ import Stripe$1 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.Customer>;
21
+ }): ServerResultAsync<Stripe$1.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.Invoice[]>;
32
+ listInvoices(ctx: Context): ServerResultAsync<Stripe$1.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.Checkout.Session>;
41
+ }): ServerResultAsync<Stripe$1.Checkout.Session>;
42
42
  createBillingPortalSession({
43
43
  user
44
44
  }: {
45
45
  user: User;
46
- }): ServerResultAsync<Stripe.BillingPortal.Session>;
47
- constructEvent(body: Buffer | string, signature: string): ServerResult<Stripe.Event>;
46
+ }): ServerResultAsync<Stripe$1.BillingPortal.Session>;
47
+ constructEvent(body: Buffer | string, signature: string): ServerResult<Stripe$1.Event>;
48
48
  syncStripeData(customerId: string, eventType?: string): ServerResultAsync<boolean>;
49
- processEvent(event: Stripe.Event): ServerResultAsync<boolean>;
49
+ processEvent(event: Stripe$1.Event): ServerResultAsync<boolean>;
50
50
  }
51
51
  //#endregion
52
52
  export { BillingService };
@@ -31,13 +31,13 @@ declare const connectSelectOutputSchema: z.ZodObject<{
31
31
  userId: z.ZodString;
32
32
  scope: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
33
  provider: z.ZodString;
34
+ parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
35
  accountType: z.ZodString;
35
36
  providerAccountId: z.ZodString;
36
37
  handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37
38
  displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
38
39
  avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
39
40
  tokenType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
40
- parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
41
41
  metadataJson: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
42
42
  revokedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
43
43
  lastRefreshedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
@@ -55,13 +55,13 @@ declare const connectListOutputSchema: z.ZodArray<z.ZodObject<{
55
55
  userId: z.ZodString;
56
56
  scope: z.ZodOptional<z.ZodNullable<z.ZodString>>;
57
57
  provider: z.ZodString;
58
+ parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
58
59
  accountType: z.ZodString;
59
60
  providerAccountId: z.ZodString;
60
61
  handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
61
62
  displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
63
  avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
63
64
  tokenType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
64
- parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
65
65
  metadataJson: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
66
66
  revokedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
67
67
  lastRefreshedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
@@ -402,13 +402,13 @@ declare class ConnectRepository extends BaseTableRepository<Orm, Schema, Record<
402
402
  refreshToken: string | null;
403
403
  scope: string | null;
404
404
  provider: string;
405
+ parentId: string | null;
405
406
  accountType: string;
406
407
  providerAccountId: string;
407
408
  handle: string | null;
408
409
  displayName: string | null;
409
410
  avatarUrl: string | null;
410
411
  tokenType: string | null;
411
- parentId: string | null;
412
412
  metadataJson: unknown;
413
413
  revokedAt: Date | null;
414
414
  lastRefreshedAt: Date | null;
@@ -28,13 +28,13 @@ declare class ConnectService extends BaseService<{
28
28
  refreshToken: string | null;
29
29
  scope: string | null;
30
30
  provider: string;
31
+ parentId: string | null;
31
32
  accountType: string;
32
33
  providerAccountId: string;
33
34
  handle: string | null;
34
35
  displayName: string | null;
35
36
  avatarUrl: string | null;
36
37
  tokenType: string | null;
37
- parentId: string | null;
38
38
  metadataJson: unknown;
39
39
  revokedAt: Date | null;
40
40
  lastRefreshedAt: Date | null;
@@ -49,13 +49,13 @@ declare class ConnectService extends BaseService<{
49
49
  refreshToken: string | null;
50
50
  scope: string | null;
51
51
  provider: string;
52
+ parentId: string | null;
52
53
  accountType: string;
53
54
  providerAccountId: string;
54
55
  handle: string | null;
55
56
  displayName: string | null;
56
57
  avatarUrl: string | null;
57
58
  tokenType: string | null;
58
- parentId: string | null;
59
59
  metadataJson: unknown;
60
60
  revokedAt: Date | null;
61
61
  lastRefreshedAt: Date | null;
@@ -27,11 +27,11 @@ declare function createConnectTRPC({
27
27
  updatedAt?: Date | null | undefined;
28
28
  expiresAt?: Date | null | undefined;
29
29
  scope?: string | null | undefined;
30
+ parentId?: string | null | undefined;
30
31
  handle?: string | null | undefined;
31
32
  displayName?: string | null | undefined;
32
33
  avatarUrl?: string | null | undefined;
33
34
  tokenType?: string | null | undefined;
34
- parentId?: string | null | undefined;
35
35
  metadataJson?: unknown;
36
36
  revokedAt?: Date | null | undefined;
37
37
  lastRefreshedAt?: Date | null | undefined;
@@ -18,7 +18,7 @@ declare class RecurrenceService extends BaseService<{
18
18
  filters?: {
19
19
  columnId: string;
20
20
  type: "string" | "number" | "boolean" | "date" | "enum";
21
- method: "contains" | "starts_with" | "ends_with" | "intersect" | "on" | "equals" | "greater_than" | "less_than" | "between" | "before" | "after" | "oneOf" | "isEmpty" | "isNotEmpty" | "is_null" | "is_not_null";
21
+ method: "contains" | "starts_with" | "ends_with" | "equals" | "greater_than" | "less_than" | "on" | "between" | "before" | "after" | "oneOf" | "intersect" | "isEmpty" | "isNotEmpty" | "is_null" | "is_not_null";
22
22
  value: string | number | boolean | string[];
23
23
  valueTo?: string | undefined;
24
24
  endColumnId?: string | undefined;
@@ -21,7 +21,7 @@ declare function createRecurrenceTRPC({
21
21
  filters?: {
22
22
  columnId: string;
23
23
  type: "string" | "number" | "boolean" | "date" | "enum";
24
- method: "contains" | "starts_with" | "ends_with" | "intersect" | "on" | "equals" | "greater_than" | "less_than" | "between" | "before" | "after" | "oneOf" | "isEmpty" | "isNotEmpty" | "is_null" | "is_not_null";
24
+ method: "contains" | "starts_with" | "ends_with" | "equals" | "greater_than" | "less_than" | "on" | "between" | "before" | "after" | "oneOf" | "intersect" | "isEmpty" | "isNotEmpty" | "is_null" | "is_not_null";
25
25
  value: string | number | boolean | string[];
26
26
  valueTo?: string | undefined;
27
27
  endColumnId?: string | undefined;
@@ -21,7 +21,7 @@ declare function createTagTRPC({
21
21
  filters?: {
22
22
  columnId: string;
23
23
  type: "string" | "number" | "boolean" | "date" | "enum";
24
- method: "contains" | "starts_with" | "ends_with" | "intersect" | "on" | "equals" | "greater_than" | "less_than" | "between" | "before" | "after" | "oneOf" | "isEmpty" | "isNotEmpty" | "is_null" | "is_not_null";
24
+ method: "contains" | "starts_with" | "ends_with" | "equals" | "greater_than" | "less_than" | "on" | "between" | "before" | "after" | "oneOf" | "intersect" | "isEmpty" | "isNotEmpty" | "is_null" | "is_not_null";
25
25
  value: string | number | boolean | string[];
26
26
  valueTo?: string | undefined;
27
27
  endColumnId?: string | undefined;
@@ -54,7 +54,7 @@ declare function createTagTRPC({
54
54
  resourceIds?: {
55
55
  columnId: string;
56
56
  type: "string" | "number" | "boolean" | "date" | "enum";
57
- method: "contains" | "starts_with" | "ends_with" | "intersect" | "on" | "equals" | "greater_than" | "less_than" | "between" | "before" | "after" | "oneOf" | "isEmpty" | "isNotEmpty" | "is_null" | "is_not_null";
57
+ method: "contains" | "starts_with" | "ends_with" | "equals" | "greater_than" | "less_than" | "on" | "between" | "before" | "after" | "oneOf" | "intersect" | "isEmpty" | "isNotEmpty" | "is_null" | "is_not_null";
58
58
  value: string | number | boolean | string[];
59
59
  valueTo?: string | undefined;
60
60
  endColumnId?: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m5kdev/backend",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "description": "Composable Express server stack with Drizzle ORM and tRPC.",
5
5
  "license": "GPL-3.0-only",
6
6
  "repository": {
@@ -59,8 +59,8 @@
59
59
  "trpc-to-openapi": "2.3.0",
60
60
  "uuid": "11.0.5",
61
61
  "zod": "4.2.1",
62
- "@m5kdev/config": "0.8.2",
63
- "@m5kdev/commons": "0.8.2"
62
+ "@m5kdev/commons": "0.8.3",
63
+ "@m5kdev/config": "0.8.3"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@jest/globals": "30.2.0",