@m5kdev/web-ui 0.9.0 → 0.9.2

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 (23) hide show
  1. package/dist/packages/backend/dist/src/modules/auth/auth.dto.d.mts +2 -2
  2. package/dist/packages/backend/dist/src/modules/auth/auth.dto.d.ts +2 -2
  3. package/dist/packages/backend/dist/src/modules/base/base.procedure.d.mts +11 -1
  4. package/dist/packages/backend/dist/src/modules/base/base.procedure.d.ts +11 -1
  5. package/dist/packages/backend/dist/src/modules/base/base.service.d.mts +1 -1
  6. package/dist/packages/backend/dist/src/modules/base/base.service.d.ts +1 -1
  7. package/dist/packages/backend/dist/src/modules/billing/billing.repository.d.mts +10 -10
  8. package/dist/packages/backend/dist/src/modules/billing/billing.repository.d.ts +10 -10
  9. package/dist/packages/backend/dist/src/modules/billing/billing.service.d.mts +6 -6
  10. package/dist/packages/backend/dist/src/modules/billing/billing.service.d.ts +6 -6
  11. package/dist/packages/backend/dist/src/types.d.mts +7 -7
  12. package/dist/packages/backend/dist/src/types.d.ts +7 -7
  13. package/dist/src/modules/auth/components/AdminUserManagement.js +1 -1
  14. package/dist/src/modules/auth/components/AdminUserManagement.mjs +1 -1
  15. package/dist/src/modules/auth/components/OrganizationMembersRoute.js +1 -1
  16. package/dist/src/modules/auth/components/OrganizationMembersRoute.mjs +1 -1
  17. package/dist/src/modules/auth/components/OrganizationSettingsRoute.js +1 -1
  18. package/dist/src/modules/auth/components/OrganizationSettingsRoute.mjs +1 -1
  19. package/dist/src/modules/auth/components/OrganizationSwitcher.js +1 -1
  20. package/dist/src/modules/auth/components/OrganizationSwitcher.mjs +1 -1
  21. package/dist/src/modules/billing/components/BillingInvoicePage.js +1 -1
  22. package/dist/src/modules/billing/components/BillingInvoicePage.mjs +1 -1
  23. package/package.json +5 -5
@@ -13,8 +13,8 @@ declare const waitlistSchema: z.ZodObject<{
13
13
  expiresAt: z.ZodNullable<z.ZodDate>;
14
14
  }, z.core.$strip>;
15
15
  declare const waitlistOutputSchema: z.ZodObject<{
16
- name: z.ZodNullable<z.ZodString>;
17
16
  id: z.ZodString;
17
+ name: z.ZodNullable<z.ZodString>;
18
18
  email: z.ZodNullable<z.ZodString>;
19
19
  createdAt: z.ZodDate;
20
20
  updatedAt: z.ZodNullable<z.ZodDate>;
@@ -59,8 +59,8 @@ declare const accountClaimMagicLinkOutputSchema: z.ZodObject<{
59
59
  id: z.ZodString;
60
60
  email: z.ZodString;
61
61
  createdAt: z.ZodDate;
62
- expiresAt: z.ZodNullable<z.ZodDate>;
63
62
  userId: z.ZodString;
63
+ expiresAt: z.ZodNullable<z.ZodDate>;
64
64
  claimId: z.ZodString;
65
65
  url: z.ZodString;
66
66
  }, z.core.$strip>;
@@ -13,8 +13,8 @@ declare const waitlistSchema: z.ZodObject<{
13
13
  expiresAt: z.ZodNullable<z.ZodDate>;
14
14
  }, z.core.$strip>;
15
15
  declare const waitlistOutputSchema: z.ZodObject<{
16
- name: z.ZodNullable<z.ZodString>;
17
16
  id: z.ZodString;
17
+ name: z.ZodNullable<z.ZodString>;
18
18
  email: z.ZodNullable<z.ZodString>;
19
19
  createdAt: z.ZodDate;
20
20
  updatedAt: z.ZodNullable<z.ZodDate>;
@@ -59,8 +59,8 @@ declare const accountClaimMagicLinkOutputSchema: z.ZodObject<{
59
59
  id: z.ZodString;
60
60
  email: z.ZodString;
61
61
  createdAt: z.ZodDate;
62
- expiresAt: z.ZodNullable<z.ZodDate>;
63
62
  userId: z.ZodString;
63
+ expiresAt: z.ZodNullable<z.ZodDate>;
64
64
  claimId: z.ZodString;
65
65
  url: z.ZodString;
66
66
  }, z.core.$strip>;
@@ -14,6 +14,8 @@ type ServiceProcedureContext = {
14
14
  } & Record<string, unknown>;
15
15
  type ServiceProcedureState = Record<string, unknown>;
16
16
  type ServiceProcedureStoredValue<T> = [T] extends [undefined] ? undefined : Awaited<T>;
17
+ /** Value stored in procedure state after `loadResource` (loader may return null/undefined; state is narrowed). */
18
+ type ServiceProcedureLoadedResource<TOutput> = NonNullable<ServiceProcedureStoredValue<TOutput>>;
17
19
  type ServiceProcedureResultLike<T> = T | ServerResult<T> | Promise<T | ServerResult<T>>;
18
20
  type ServiceProcedureContextFilterScope = ActorScope;
19
21
  type ServiceProcedureContextFilteredInput<TInput> = Extract<NonNullable<TInput>, QueryInput>;
@@ -35,6 +37,14 @@ type ServiceProcedureInputMapper<TInput, TCtx extends ServiceProcedureContext, R
35
37
  type ServiceProcedureHandler<TInput, TCtx extends ServiceProcedureContext, Repositories extends RepositoryMap, Services extends ServiceMap, State extends ServiceProcedureState, TOutput> = (args: ServiceProcedureArgs<TInput, TCtx, Repositories, Services, State>) => ServiceProcedureResultLike<TOutput>;
36
38
  interface ServiceProcedureBuilder<TInput, TCtx extends ServiceProcedureContext, Repositories extends RepositoryMap, Services extends ServiceMap, State extends ServiceProcedureState = Record<string, never>> {
37
39
  use<StepName extends string, TOutput = void>(stepName: StepName, step: ServiceProcedureStep<TInput, TCtx, Repositories, Services, State, TOutput>): ServiceProcedureBuilder<TInput, TCtx, Repositories, Services, State & Record<StepName, ServiceProcedureStoredValue<TOutput>>>;
40
+ /**
41
+ * Loads a value from a `ServerResult` (or plain value) and stores it under `stepName`.
42
+ * Propagates `Err`; if the resolved value is falsy, returns `NOT_FOUND`.
43
+ * For valid numeric `0` or empty string, use `.use()` instead of this helper.
44
+ */
45
+ loadResource<StepName extends string, TOutput>(stepName: StepName, step: ServiceProcedureStep<TInput, TCtx, Repositories, Services, State, TOutput>, options?: {
46
+ notFoundMessage?: string;
47
+ }): ServiceProcedureBuilder<TInput, TCtx, Repositories, Services, State & Record<StepName, ServiceProcedureLoadedResource<TOutput>>>;
38
48
  mapInput<StepName extends string, TNextInput>(stepName: StepName, step: ServiceProcedureInputMapper<TInput, TCtx, Repositories, Services, State, TNextInput>): ServiceProcedureBuilder<ServiceProcedureStoredValue<TNextInput>, TCtx, Repositories, Services, State & Record<StepName, ServiceProcedureStoredValue<TNextInput>>>;
39
49
  addContextFilter<TInclude extends readonly ServiceProcedureContextFilterScope[] | undefined = undefined>(include?: TInclude): ServiceProcedureBuilder<ServiceProcedureContextFilteredInput<TInput>, TCtx & ServiceProcedureAuthContext<ServiceProcedureRequiredScopeFromFilter<TInclude>>, Repositories, Services, State & {
40
50
  contextFilter: ServiceProcedureContextFilteredInput<TInput>;
@@ -43,5 +53,5 @@ interface ServiceProcedureBuilder<TInput, TCtx extends ServiceProcedureContext,
43
53
  handle<TOutput>(handler: ServiceProcedureHandler<TInput, TCtx, Repositories, Services, State, TOutput>): ServiceProcedure<TInput, TCtx, TOutput>;
44
54
  }
45
55
  //#endregion
46
- export { ServiceProcedure, ServiceProcedureArgs, ServiceProcedureBuilder, ServiceProcedureContext, ServiceProcedureContextFilterScope, ServiceProcedureContextFilteredInput, ServiceProcedureInputMapper };
56
+ export { ServiceProcedure, ServiceProcedureArgs, ServiceProcedureBuilder, ServiceProcedureContext, ServiceProcedureContextFilterScope, ServiceProcedureContextFilteredInput, ServiceProcedureInputMapper, ServiceProcedureLoadedResource };
47
57
  //# sourceMappingURL=base.procedure.d.mts.map
@@ -14,6 +14,8 @@ type ServiceProcedureContext = {
14
14
  } & Record<string, unknown>;
15
15
  type ServiceProcedureState = Record<string, unknown>;
16
16
  type ServiceProcedureStoredValue<T> = [T] extends [undefined] ? undefined : Awaited<T>;
17
+ /** Value stored in procedure state after `loadResource` (loader may return null/undefined; state is narrowed). */
18
+ type ServiceProcedureLoadedResource<TOutput> = NonNullable<ServiceProcedureStoredValue<TOutput>>;
17
19
  type ServiceProcedureResultLike<T> = T | ServerResult<T> | Promise<T | ServerResult<T>>;
18
20
  type ServiceProcedureContextFilterScope = ActorScope;
19
21
  type ServiceProcedureContextFilteredInput<TInput> = Extract<NonNullable<TInput>, QueryInput>;
@@ -35,6 +37,14 @@ type ServiceProcedureInputMapper<TInput, TCtx extends ServiceProcedureContext, R
35
37
  type ServiceProcedureHandler<TInput, TCtx extends ServiceProcedureContext, Repositories extends RepositoryMap, Services extends ServiceMap, State extends ServiceProcedureState, TOutput> = (args: ServiceProcedureArgs<TInput, TCtx, Repositories, Services, State>) => ServiceProcedureResultLike<TOutput>;
36
38
  interface ServiceProcedureBuilder<TInput, TCtx extends ServiceProcedureContext, Repositories extends RepositoryMap, Services extends ServiceMap, State extends ServiceProcedureState = Record<string, never>> {
37
39
  use<StepName extends string, TOutput = void>(stepName: StepName, step: ServiceProcedureStep<TInput, TCtx, Repositories, Services, State, TOutput>): ServiceProcedureBuilder<TInput, TCtx, Repositories, Services, State & Record<StepName, ServiceProcedureStoredValue<TOutput>>>;
40
+ /**
41
+ * Loads a value from a `ServerResult` (or plain value) and stores it under `stepName`.
42
+ * Propagates `Err`; if the resolved value is falsy, returns `NOT_FOUND`.
43
+ * For valid numeric `0` or empty string, use `.use()` instead of this helper.
44
+ */
45
+ loadResource<StepName extends string, TOutput>(stepName: StepName, step: ServiceProcedureStep<TInput, TCtx, Repositories, Services, State, TOutput>, options?: {
46
+ notFoundMessage?: string;
47
+ }): ServiceProcedureBuilder<TInput, TCtx, Repositories, Services, State & Record<StepName, ServiceProcedureLoadedResource<TOutput>>>;
38
48
  mapInput<StepName extends string, TNextInput>(stepName: StepName, step: ServiceProcedureInputMapper<TInput, TCtx, Repositories, Services, State, TNextInput>): ServiceProcedureBuilder<ServiceProcedureStoredValue<TNextInput>, TCtx, Repositories, Services, State & Record<StepName, ServiceProcedureStoredValue<TNextInput>>>;
39
49
  addContextFilter<TInclude extends readonly ServiceProcedureContextFilterScope[] | undefined = undefined>(include?: TInclude): ServiceProcedureBuilder<ServiceProcedureContextFilteredInput<TInput>, TCtx & ServiceProcedureAuthContext<ServiceProcedureRequiredScopeFromFilter<TInclude>>, Repositories, Services, State & {
40
50
  contextFilter: ServiceProcedureContextFilteredInput<TInput>;
@@ -43,5 +53,5 @@ interface ServiceProcedureBuilder<TInput, TCtx extends ServiceProcedureContext,
43
53
  handle<TOutput>(handler: ServiceProcedureHandler<TInput, TCtx, Repositories, Services, State, TOutput>): ServiceProcedure<TInput, TCtx, TOutput>;
44
54
  }
45
55
  //#endregion
46
- export { ServiceProcedure, ServiceProcedureArgs, ServiceProcedureBuilder, ServiceProcedureContext, ServiceProcedureContextFilterScope, ServiceProcedureContextFilteredInput, ServiceProcedureInputMapper };
56
+ export { ServiceProcedure, ServiceProcedureArgs, ServiceProcedureBuilder, ServiceProcedureContext, ServiceProcedureContextFilterScope, ServiceProcedureContextFilteredInput, ServiceProcedureInputMapper, ServiceProcedureLoadedResource };
47
57
  //# sourceMappingURL=base.procedure.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { Base } from "./base.abstract.mjs";
2
2
  import { AuthenticatedActor } from "./base.actor.mjs";
3
- import { ServiceProcedure, ServiceProcedureArgs, ServiceProcedureBuilder, ServiceProcedureContext, ServiceProcedureContextFilterScope, ServiceProcedureContextFilteredInput, ServiceProcedureInputMapper } from "./base.procedure.mjs";
3
+ import { ServiceProcedure, ServiceProcedureArgs, ServiceProcedureBuilder, ServiceProcedureContext, ServiceProcedureContextFilterScope, ServiceProcedureContextFilteredInput, ServiceProcedureInputMapper, ServiceProcedureLoadedResource } from "./base.procedure.mjs";
4
4
  import { QueryFilter, QueryInput } from "@m5kdev/commons/modules/schemas/query.schema";
5
5
 
6
6
  //#region ../backend/dist/src/modules/base/base.service.d.mts
@@ -1,6 +1,6 @@
1
1
  import { Base } from "./base.abstract.js";
2
2
  import { AuthenticatedActor } from "./base.actor.js";
3
- import { ServiceProcedure, ServiceProcedureArgs, ServiceProcedureBuilder, ServiceProcedureContext, ServiceProcedureContextFilterScope, ServiceProcedureContextFilteredInput, ServiceProcedureInputMapper } from "./base.procedure.js";
3
+ import { ServiceProcedure, ServiceProcedureArgs, ServiceProcedureBuilder, ServiceProcedureContext, ServiceProcedureContextFilterScope, ServiceProcedureContextFilteredInput, ServiceProcedureInputMapper, ServiceProcedureLoadedResource } from "./base.procedure.js";
4
4
  import { QueryFilter, QueryInput } from "@m5kdev/commons/modules/schemas/query.schema";
5
5
 
6
6
  //#region ../backend/dist/src/modules/base/base.service.d.mts
@@ -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$1;
2717
+ stripe: Stripe;
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$1;
2725
+ stripe: Stripe;
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$1.Customer | null>;
2734
+ getCustomerByEmail(email: string): ServerResultAsync<Stripe.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$1.Customer>;
2745
- createTrialSubscription(customerId: string): ServerResultAsync<Stripe$1.Subscription>;
2744
+ }): ServerResultAsync<Stripe.Customer>;
2745
+ createTrialSubscription(customerId: string): ServerResultAsync<Stripe.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$1.Subscription>;
2756
+ }): ServerResultAsync<Stripe.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$1.Invoice[]>;
2766
+ listInvoices(customerId: string): ServerResultAsync<Stripe.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$1.Checkout.Session>;
2776
- createBillingPortalSession(customerId: string): ServerResultAsync<Stripe$1.BillingPortal.Session>;
2775
+ }): ServerResultAsync<Stripe.Checkout.Session>;
2776
+ createBillingPortalSession(customerId: string): ServerResultAsync<Stripe.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$1.Event>;
2784
+ constructEvent(body: Buffer | string, signature: string, secret: string): ServerResult<Stripe.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$1;
2717
+ stripe: Stripe;
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$1;
2725
+ stripe: Stripe;
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$1.Customer | null>;
2734
+ getCustomerByEmail(email: string): ServerResultAsync<Stripe.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$1.Customer>;
2745
- createTrialSubscription(customerId: string): ServerResultAsync<Stripe$1.Subscription>;
2744
+ }): ServerResultAsync<Stripe.Customer>;
2745
+ createTrialSubscription(customerId: string): ServerResultAsync<Stripe.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$1.Subscription>;
2756
+ }): ServerResultAsync<Stripe.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$1.Invoice[]>;
2766
+ listInvoices(customerId: string): ServerResultAsync<Stripe.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$1.Checkout.Session>;
2776
- createBillingPortalSession(customerId: string): ServerResultAsync<Stripe$1.BillingPortal.Session>;
2775
+ }): ServerResultAsync<Stripe.Checkout.Session>;
2776
+ createBillingPortalSession(customerId: string): ServerResultAsync<Stripe.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$1.Event>;
2784
+ constructEvent(body: Buffer | string, signature: string, secret: string): ServerResult<Stripe.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.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
  } //#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.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
  } //#endregion
51
51
  //#endregion
52
52
  export { BillingService };
@@ -79,8 +79,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
79
79
  id: string;
80
80
  email: string;
81
81
  createdAt: Date;
82
- expiresAt: Date | null;
83
82
  userId: string;
83
+ expiresAt: Date | null;
84
84
  claimId: string;
85
85
  url: string;
86
86
  };
@@ -94,8 +94,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
94
94
  id: string;
95
95
  email: string;
96
96
  createdAt: Date;
97
- expiresAt: Date | null;
98
97
  userId: string;
98
+ expiresAt: Date | null;
99
99
  claimId: string;
100
100
  url: string;
101
101
  }[];
@@ -149,8 +149,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
149
149
  listAdminWaitlist: QueryProcedure<{
150
150
  input: void;
151
151
  output: {
152
- name: string | null;
153
152
  id: string;
153
+ name: string | null;
154
154
  email: string | null;
155
155
  createdAt: Date;
156
156
  updatedAt: Date | null;
@@ -163,8 +163,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
163
163
  email: string;
164
164
  };
165
165
  output: {
166
- name: string | null;
167
166
  id: string;
167
+ name: string | null;
168
168
  email: string | null;
169
169
  createdAt: Date;
170
170
  updatedAt: Date | null;
@@ -194,8 +194,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
194
194
  id: string;
195
195
  };
196
196
  output: {
197
- name: string | null;
198
197
  id: string;
198
+ name: string | null;
199
199
  email: string | null;
200
200
  createdAt: Date;
201
201
  updatedAt: Date | null;
@@ -208,8 +208,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
208
208
  id: string;
209
209
  };
210
210
  output: {
211
- name: string | null;
212
211
  id: string;
212
+ name: string | null;
213
213
  email: string | null;
214
214
  createdAt: Date;
215
215
  updatedAt: Date | null;
@@ -222,8 +222,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
222
222
  email: string;
223
223
  };
224
224
  output: {
225
- name: string | null;
226
225
  id: string;
226
+ name: string | null;
227
227
  email: string | null;
228
228
  createdAt: Date;
229
229
  updatedAt: Date | null;
@@ -79,8 +79,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
79
79
  id: string;
80
80
  email: string;
81
81
  createdAt: Date;
82
- expiresAt: Date | null;
83
82
  userId: string;
83
+ expiresAt: Date | null;
84
84
  claimId: string;
85
85
  url: string;
86
86
  };
@@ -94,8 +94,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
94
94
  id: string;
95
95
  email: string;
96
96
  createdAt: Date;
97
- expiresAt: Date | null;
98
97
  userId: string;
98
+ expiresAt: Date | null;
99
99
  claimId: string;
100
100
  url: string;
101
101
  }[];
@@ -149,8 +149,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
149
149
  listAdminWaitlist: QueryProcedure<{
150
150
  input: void;
151
151
  output: {
152
- name: string | null;
153
152
  id: string;
153
+ name: string | null;
154
154
  email: string | null;
155
155
  createdAt: Date;
156
156
  updatedAt: Date | null;
@@ -163,8 +163,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
163
163
  email: string;
164
164
  };
165
165
  output: {
166
- name: string | null;
167
166
  id: string;
167
+ name: string | null;
168
168
  email: string | null;
169
169
  createdAt: Date;
170
170
  updatedAt: Date | null;
@@ -194,8 +194,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
194
194
  id: string;
195
195
  };
196
196
  output: {
197
- name: string | null;
198
197
  id: string;
198
+ name: string | null;
199
199
  email: string | null;
200
200
  createdAt: Date;
201
201
  updatedAt: Date | null;
@@ -208,8 +208,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
208
208
  id: string;
209
209
  };
210
210
  output: {
211
- name: string | null;
212
211
  id: string;
212
+ name: string | null;
213
213
  email: string | null;
214
214
  createdAt: Date;
215
215
  updatedAt: Date | null;
@@ -222,8 +222,8 @@ declare const createAuthTRPCRouter: (trpcMethods: TRPCMethods, authService: Auth
222
222
  email: string;
223
223
  };
224
224
  output: {
225
- name: string | null;
226
225
  id: string;
226
+ name: string | null;
227
227
  email: string | null;
228
228
  createdAt: Date;
229
229
  updatedAt: Date | null;
@@ -6,10 +6,10 @@ let react_jsx_runtime = require("react/jsx-runtime");
6
6
  let lucide_react = require("lucide-react");
7
7
  let react_router = require("react-router");
8
8
  let sonner = require("sonner");
9
- let _tanstack_react_query = require("@tanstack/react-query");
10
9
  let _m5kdev_frontend_modules_auth_auth_lib = require("@m5kdev/frontend/modules/auth/auth.lib");
11
10
  let _m5kdev_frontend_modules_auth_hooks_useAuthAdmin = require("@m5kdev/frontend/modules/auth/hooks/useAuthAdmin");
12
11
  _m5kdev_frontend_modules_auth_hooks_useAuthAdmin = require_runtime.__toESM(_m5kdev_frontend_modules_auth_hooks_useAuthAdmin);
12
+ let _tanstack_react_query = require("@tanstack/react-query");
13
13
  //#region src/modules/auth/components/AdminUserManagement.tsx
14
14
  function AdminUserManagement({ useTRPC }) {
15
15
  const banReasonInputId = (0, react.useId)();
@@ -4,9 +4,9 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
4
4
  import { BarChart3, CalendarClock, ChevronDown, ChevronUp, Copy, Filter, Info, Link2, List, MoreHorizontal, Search, UserPlus, X } from "lucide-react";
5
5
  import { useNavigate } from "react-router";
6
6
  import { toast } from "sonner";
7
- import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
8
7
  import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
9
8
  import * as authAdmin from "@m5kdev/frontend/modules/auth/hooks/useAuthAdmin";
9
+ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
10
10
  //#region src/modules/auth/components/AdminUserManagement.tsx
11
11
  function AdminUserManagement({ useTRPC }) {
12
12
  const banReasonInputId = useId();
@@ -6,8 +6,8 @@ let react_jsx_runtime = require("react/jsx-runtime");
6
6
  let lucide_react = require("lucide-react");
7
7
  let react_i18next = require("react-i18next");
8
8
  let sonner = require("sonner");
9
- let _tanstack_react_query = require("@tanstack/react-query");
10
9
  let _m5kdev_frontend_modules_auth_auth_lib = require("@m5kdev/frontend/modules/auth/auth.lib");
10
+ let _tanstack_react_query = require("@tanstack/react-query");
11
11
  let _m5kdev_frontend_modules_auth_hooks_useSession = require("@m5kdev/frontend/modules/auth/hooks/useSession");
12
12
  //#region src/modules/auth/components/OrganizationMembersRoute.tsx
13
13
  const ORGANIZATION_ROLES = [
@@ -4,8 +4,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { Copy, Trash2, UserPlus, Users } from "lucide-react";
5
5
  import { useTranslation } from "react-i18next";
6
6
  import { toast } from "sonner";
7
- import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
8
7
  import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
8
+ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
9
9
  import { useSession } from "@m5kdev/frontend/modules/auth/hooks/useSession";
10
10
  //#region src/modules/auth/components/OrganizationMembersRoute.tsx
11
11
  const ORGANIZATION_ROLES = [
@@ -5,8 +5,8 @@ let _heroui_react = require("@heroui/react");
5
5
  let react_jsx_runtime = require("react/jsx-runtime");
6
6
  let react_i18next = require("react-i18next");
7
7
  let sonner = require("sonner");
8
- let _tanstack_react_query = require("@tanstack/react-query");
9
8
  let _m5kdev_frontend_modules_auth_auth_lib = require("@m5kdev/frontend/modules/auth/auth.lib");
9
+ let _tanstack_react_query = require("@tanstack/react-query");
10
10
  let _m5kdev_frontend_modules_auth_hooks_useSession = require("@m5kdev/frontend/modules/auth/hooks/useSession");
11
11
  //#region src/modules/auth/components/OrganizationSettingsRoute.tsx
12
12
  function OrganizationStateCard({ title, message }) {
@@ -3,8 +3,8 @@ import { Button, Card, CardBody, CardHeader, Chip, Input, Spinner, Textarea } fr
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { useTranslation } from "react-i18next";
5
5
  import { toast } from "sonner";
6
- import { useQuery, useQueryClient } from "@tanstack/react-query";
7
6
  import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
7
+ import { useQuery, useQueryClient } from "@tanstack/react-query";
8
8
  import { useSession } from "@m5kdev/frontend/modules/auth/hooks/useSession";
9
9
  //#region src/modules/auth/components/OrganizationSettingsRoute.tsx
10
10
  function OrganizationStateCard({ title, message }) {
@@ -9,8 +9,8 @@ let lucide_react = require("lucide-react");
9
9
  let react_i18next = require("react-i18next");
10
10
  let react_router = require("react-router");
11
11
  let sonner = require("sonner");
12
- let _tanstack_react_query = require("@tanstack/react-query");
13
12
  let _m5kdev_frontend_modules_auth_auth_lib = require("@m5kdev/frontend/modules/auth/auth.lib");
13
+ let _tanstack_react_query = require("@tanstack/react-query");
14
14
  let _m5kdev_frontend_modules_auth_hooks_useSession = require("@m5kdev/frontend/modules/auth/hooks/useSession");
15
15
  //#region src/modules/auth/components/OrganizationSwitcher.tsx
16
16
  function OrganizationSwitcher({ onInvalidateScopedQueries, managerRoles = ["admin", "owner"], managerPath = "/organization/members", fallbackPath = "/" }) {
@@ -7,8 +7,8 @@ import { Building2 } from "lucide-react";
7
7
  import { useTranslation } from "react-i18next";
8
8
  import { Link as Link$1 } from "react-router";
9
9
  import { toast } from "sonner";
10
- import { useQuery } from "@tanstack/react-query";
11
10
  import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
11
+ import { useQuery } from "@tanstack/react-query";
12
12
  import { useSession } from "@m5kdev/frontend/modules/auth/hooks/useSession";
13
13
  //#region src/modules/auth/components/OrganizationSwitcher.tsx
14
14
  function OrganizationSwitcher({ onInvalidateScopedQueries, managerRoles = ["admin", "owner"], managerPath = "/organization/members", fallbackPath = "/" }) {
@@ -3,8 +3,8 @@ require("../../../../_virtual/_rolldown/runtime.js");
3
3
  let _heroui_react = require("@heroui/react");
4
4
  let react_jsx_runtime = require("react/jsx-runtime");
5
5
  let lucide_react = require("lucide-react");
6
- let _m5kdev_frontend_modules_billing_hooks_useSubscription = require("@m5kdev/frontend/modules/billing/hooks/useSubscription");
7
6
  let _tanstack_react_query = require("@tanstack/react-query");
7
+ let _m5kdev_frontend_modules_billing_hooks_useSubscription = require("@m5kdev/frontend/modules/billing/hooks/useSubscription");
8
8
  //#region src/modules/billing/components/BillingInvoicePage.tsx
9
9
  function BillingInvoicePage({ useTRPC, serverUrl }) {
10
10
  const { data: invoices, isLoading } = (0, _tanstack_react_query.useQuery)(useTRPC().billing.listInvoices.queryOptions());
@@ -1,8 +1,8 @@
1
1
  import { Button, Card, CardBody, CardHeader, Chip, Link, Spinner, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow } from "@heroui/react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { AlertCircle, CheckCircle2, ExternalLink } from "lucide-react";
4
- import { useSubscription } from "@m5kdev/frontend/modules/billing/hooks/useSubscription";
5
4
  import { useQuery } from "@tanstack/react-query";
5
+ import { useSubscription } from "@m5kdev/frontend/modules/billing/hooks/useSubscription";
6
6
  //#region src/modules/billing/components/BillingInvoicePage.tsx
7
7
  function BillingInvoicePage({ useTRPC, serverUrl }) {
8
8
  const { data: invoices, isLoading } = useQuery(useTRPC().billing.listInvoices.queryOptions());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m5kdev/web-ui",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
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.9.0",
71
- "@m5kdev/commons": "0.9.0"
70
+ "@m5kdev/frontend": "0.9.2",
71
+ "@m5kdev/commons": "0.9.2"
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.9.0",
84
- "@m5kdev/config": "0.9.0"
83
+ "@m5kdev/config": "0.9.2",
84
+ "@m5kdev/backend": "0.9.2"
85
85
  },
86
86
  "exports": {
87
87
  "./components/*": {