@greatapps/common 1.1.123 → 1.1.125

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 (158) hide show
  1. package/dist/components/handlers/SearchParamsHandler.mjs.map +1 -1
  2. package/dist/components/layouts/AppMobileNavBar.mjs.map +1 -1
  3. package/dist/components/layouts/AppNavBar.mjs.map +1 -1
  4. package/dist/components/layouts/MainLayout.mjs.map +1 -1
  5. package/dist/components/layouts/MdSideBarNavigation.mjs.map +1 -1
  6. package/dist/components/layouts/NavBar.mjs.map +1 -1
  7. package/dist/components/layouts/NavBarItem.mjs.map +1 -1
  8. package/dist/components/layouts/NotificationsPopover.mjs.map +1 -1
  9. package/dist/components/layouts/ProfilePopover.mjs.map +1 -1
  10. package/dist/components/layouts/SideBarNavigation.mjs.map +1 -1
  11. package/dist/components/layouts/UsersSelectorPopover.mjs.map +1 -1
  12. package/dist/components/pages/notifications/Notifications.mjs +1 -0
  13. package/dist/components/pages/notifications/Notifications.mjs.map +1 -1
  14. package/dist/components/ui/buttons/Button.mjs +1 -0
  15. package/dist/components/ui/buttons/Button.mjs.map +1 -1
  16. package/dist/components/ui/buttons/CancelButton.mjs +1 -0
  17. package/dist/components/ui/buttons/CancelButton.mjs.map +1 -1
  18. package/dist/components/ui/buttons/CopyButton.mjs +1 -0
  19. package/dist/components/ui/buttons/CopyButton.mjs.map +1 -1
  20. package/dist/components/ui/data-display/Accordion.mjs.map +1 -1
  21. package/dist/components/ui/data-display/Badge.mjs +1 -0
  22. package/dist/components/ui/data-display/Badge.mjs.map +1 -1
  23. package/dist/components/ui/data-display/Card.mjs +1 -0
  24. package/dist/components/ui/data-display/Card.mjs.map +1 -1
  25. package/dist/components/ui/data-display/Pagination.mjs +1 -0
  26. package/dist/components/ui/data-display/Pagination.mjs.map +1 -1
  27. package/dist/components/ui/data-display/ScrollArea.mjs.map +1 -1
  28. package/dist/components/ui/data-display/Separator.mjs.map +1 -1
  29. package/dist/components/ui/data-display/Table.mjs.map +1 -1
  30. package/dist/components/ui/data-display/Tabs.mjs.map +1 -1
  31. package/dist/components/ui/data-display/UserAvatar.mjs.map +1 -1
  32. package/dist/components/ui/feedback/Progress.mjs.map +1 -1
  33. package/dist/components/ui/feedback/Toast.mjs.map +1 -1
  34. package/dist/components/ui/form/Calendar.mjs.map +1 -1
  35. package/dist/components/ui/form/Checkbox.mjs.map +1 -1
  36. package/dist/components/ui/form/DatePicker.mjs.map +1 -1
  37. package/dist/components/ui/form/DateRangePicker.mjs.map +1 -1
  38. package/dist/components/ui/form/Input.mjs +1 -0
  39. package/dist/components/ui/form/Input.mjs.map +1 -1
  40. package/dist/components/ui/form/InputOtp.mjs.map +1 -1
  41. package/dist/components/ui/form/RadioGroup.mjs.map +1 -1
  42. package/dist/components/ui/form/Select.mjs.map +1 -1
  43. package/dist/components/ui/form/Switch.mjs.map +1 -1
  44. package/dist/components/ui/form/Textarea.mjs +1 -0
  45. package/dist/components/ui/form/Textarea.mjs.map +1 -1
  46. package/dist/components/ui/overlay/Command.mjs.map +1 -1
  47. package/dist/components/ui/overlay/Dialog.mjs.map +1 -1
  48. package/dist/components/ui/overlay/Popover.mjs.map +1 -1
  49. package/dist/components/ui/overlay/Sheet.mjs.map +1 -1
  50. package/dist/components/ui/overlay/Tooltip.mjs.map +1 -1
  51. package/dist/hooks/copy-to-clipboard.hook.mjs +1 -0
  52. package/dist/hooks/copy-to-clipboard.hook.mjs.map +1 -1
  53. package/dist/modules/accounts/actions/account-management.action.mjs +15 -15
  54. package/dist/modules/accounts/actions/account-management.action.mjs.map +1 -1
  55. package/dist/modules/accounts/actions/find-current-account.action.mjs +1 -1
  56. package/dist/modules/accounts/actions/find-current-account.action.mjs.map +1 -1
  57. package/dist/modules/accounts/actions/list-currencies.action.mjs +1 -1
  58. package/dist/modules/accounts/actions/list-currencies.action.mjs.map +1 -1
  59. package/dist/modules/accounts/actions/list-timezones.action.mjs +1 -1
  60. package/dist/modules/accounts/actions/list-timezones.action.mjs.map +1 -1
  61. package/dist/modules/auth/actions/logout.action.mjs +1 -1
  62. package/dist/modules/auth/actions/logout.action.mjs.map +1 -1
  63. package/dist/modules/auth/actions/register.action.mjs +1 -1
  64. package/dist/modules/auth/actions/register.action.mjs.map +1 -1
  65. package/dist/modules/auth/actions/verify-two-factor.action.mjs +1 -1
  66. package/dist/modules/auth/actions/verify-two-factor.action.mjs.map +1 -1
  67. package/dist/modules/auth/hooks/login.hook.mjs.map +1 -1
  68. package/dist/modules/auth/hooks/logout.hook.mjs.map +1 -1
  69. package/dist/modules/auth/hooks/register.hook.mjs.map +1 -1
  70. package/dist/modules/ia-credits/actions/list-ia-credits.action.mjs +1 -1
  71. package/dist/modules/ia-credits/actions/list-ia-credits.action.mjs.map +1 -1
  72. package/dist/modules/projects/actions/add-project-user.action.mjs +1 -1
  73. package/dist/modules/projects/actions/add-project-user.action.mjs.map +1 -1
  74. package/dist/modules/projects/actions/list-available-users.action.mjs +1 -1
  75. package/dist/modules/projects/actions/list-available-users.action.mjs.map +1 -1
  76. package/dist/modules/projects/actions/list-project-users.action.mjs +1 -1
  77. package/dist/modules/projects/actions/list-project-users.action.mjs.map +1 -1
  78. package/dist/modules/projects/actions/remove-project-user.action.mjs +1 -1
  79. package/dist/modules/projects/actions/remove-project-user.action.mjs.map +1 -1
  80. package/dist/modules/subscriptions/actions/list-subscriptions.action.mjs +1 -1
  81. package/dist/modules/subscriptions/actions/list-subscriptions.action.mjs.map +1 -1
  82. package/dist/modules/users/action/find-user-by-id.action.mjs +1 -1
  83. package/dist/modules/users/action/find-user-by-id.action.mjs.map +1 -1
  84. package/dist/modules/users/action/list-messages.action.mjs +1 -1
  85. package/dist/modules/users/action/list-messages.action.mjs.map +1 -1
  86. package/dist/modules/users/action/mark-all-messages-as-read.action.mjs +1 -1
  87. package/dist/modules/users/action/mark-all-messages-as-read.action.mjs.map +1 -1
  88. package/dist/modules/users/action/mark-message-as-read.action.mjs +1 -1
  89. package/dist/modules/users/action/mark-message-as-read.action.mjs.map +1 -1
  90. package/dist/providers/auth.provider.mjs.map +1 -1
  91. package/dist/providers/query.provider.mjs.map +1 -1
  92. package/dist/providers/whitelabel.provider.mjs.map +1 -1
  93. package/package.json +1 -1
  94. package/src/components/handlers/SearchParamsHandler.tsx +2 -0
  95. package/src/components/layouts/AppMobileNavBar.tsx +2 -0
  96. package/src/components/layouts/AppNavBar.tsx +2 -0
  97. package/src/components/layouts/MainLayout.tsx +2 -0
  98. package/src/components/layouts/MdSideBarNavigation.tsx +2 -0
  99. package/src/components/layouts/NavBar.tsx +2 -0
  100. package/src/components/layouts/NavBarItem.tsx +2 -0
  101. package/src/components/layouts/NotificationsPopover.tsx +2 -0
  102. package/src/components/layouts/ProfilePopover.tsx +2 -0
  103. package/src/components/layouts/SideBarNavigation.tsx +2 -0
  104. package/src/components/layouts/UsersSelectorPopover.tsx +2 -0
  105. package/src/components/pages/notifications/Notifications.tsx +2 -0
  106. package/src/components/ui/buttons/Button.tsx +2 -0
  107. package/src/components/ui/buttons/CancelButton.tsx +2 -0
  108. package/src/components/ui/buttons/CopyButton.tsx +2 -0
  109. package/src/components/ui/data-display/Accordion.tsx +2 -0
  110. package/src/components/ui/data-display/Badge.tsx +2 -0
  111. package/src/components/ui/data-display/Card.tsx +2 -0
  112. package/src/components/ui/data-display/Pagination.tsx +2 -0
  113. package/src/components/ui/data-display/ScrollArea.tsx +2 -0
  114. package/src/components/ui/data-display/Separator.tsx +2 -0
  115. package/src/components/ui/data-display/Table.tsx +2 -0
  116. package/src/components/ui/data-display/Tabs.tsx +2 -0
  117. package/src/components/ui/data-display/UserAvatar.tsx +2 -0
  118. package/src/components/ui/feedback/Progress.tsx +2 -0
  119. package/src/components/ui/feedback/Toast.tsx +2 -0
  120. package/src/components/ui/form/Calendar.tsx +2 -0
  121. package/src/components/ui/form/Checkbox.tsx +2 -0
  122. package/src/components/ui/form/DatePicker.tsx +2 -0
  123. package/src/components/ui/form/DateRangePicker.tsx +2 -0
  124. package/src/components/ui/form/Input.tsx +2 -0
  125. package/src/components/ui/form/InputOtp.tsx +2 -0
  126. package/src/components/ui/form/RadioGroup.tsx +2 -0
  127. package/src/components/ui/form/Select.tsx +2 -0
  128. package/src/components/ui/form/Switch.tsx +2 -0
  129. package/src/components/ui/form/Textarea.tsx +2 -0
  130. package/src/components/ui/overlay/Command.tsx +2 -0
  131. package/src/components/ui/overlay/Dialog.tsx +2 -0
  132. package/src/components/ui/overlay/Popover.tsx +2 -0
  133. package/src/components/ui/overlay/Sheet.tsx +2 -0
  134. package/src/components/ui/overlay/Tooltip.tsx +2 -0
  135. package/src/hooks/copy-to-clipboard.hook.tsx +2 -0
  136. package/src/modules/accounts/actions/account-management.action.ts +15 -15
  137. package/src/modules/accounts/actions/find-current-account.action.ts +1 -1
  138. package/src/modules/accounts/actions/list-currencies.action.ts +1 -1
  139. package/src/modules/accounts/actions/list-timezones.action.ts +1 -1
  140. package/src/modules/auth/actions/logout.action.ts +1 -1
  141. package/src/modules/auth/actions/register.action.ts +1 -1
  142. package/src/modules/auth/actions/verify-two-factor.action.ts +1 -1
  143. package/src/modules/auth/hooks/login.hook.tsx +2 -0
  144. package/src/modules/auth/hooks/logout.hook.tsx +2 -0
  145. package/src/modules/auth/hooks/register.hook.tsx +2 -0
  146. package/src/modules/ia-credits/actions/list-ia-credits.action.ts +1 -1
  147. package/src/modules/projects/actions/add-project-user.action.ts +1 -1
  148. package/src/modules/projects/actions/list-available-users.action.ts +1 -1
  149. package/src/modules/projects/actions/list-project-users.action.ts +1 -1
  150. package/src/modules/projects/actions/remove-project-user.action.ts +1 -1
  151. package/src/modules/subscriptions/actions/list-subscriptions.action.ts +1 -1
  152. package/src/modules/users/action/find-user-by-id.action.ts +1 -1
  153. package/src/modules/users/action/list-messages.action.ts +1 -1
  154. package/src/modules/users/action/mark-all-messages-as-read.action.ts +1 -1
  155. package/src/modules/users/action/mark-message-as-read.action.ts +1 -1
  156. package/src/providers/auth.provider.tsx +2 -0
  157. package/src/providers/query.provider.tsx +2 -0
  158. package/src/providers/whitelabel.provider.tsx +2 -0
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import { Check, Copy } from "lucide-react";
2
4
  import { toast } from "sonner";
3
5
  import { Toast } from "../feedback/Toast";
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client"
2
4
 
3
5
  import * as React from "react"
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import * as React from "react"
2
4
  import { Slot } from "@radix-ui/react-slot"
3
5
  import { cva, type VariantProps } from "class-variance-authority"
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import * as React from "react";
2
4
  import { cn } from "../../../infra/utils/clsx";
3
5
 
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import * as React from "react"
2
4
  import {
3
5
  ChevronLeftIcon,
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client"
2
4
 
3
5
  import * as React from "react"
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client"
2
4
 
3
5
  import * as React from "react"
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client"
2
4
 
3
5
  import * as React from "react"
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client"
2
4
 
3
5
  import * as React from "react"
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client"
2
4
 
3
5
  import Image from 'next/image';
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client"
2
4
 
3
5
  import * as React from "react"
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client"
2
4
 
3
5
  import * as React from "react"
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client"
2
4
 
3
5
  import * as React from "react"
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client";
2
4
 
3
5
  import * as React from "react";
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client";
2
4
 
3
5
  import { useState, forwardRef, useEffect } from "react";
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client";
2
4
 
3
5
  import { useState, forwardRef, useEffect } from "react";
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import * as React from "react"
2
4
  import { cn } from "../../../infra/utils/clsx"
3
5
 
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client"
2
4
 
3
5
  import * as React from "react"
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client"
2
4
 
3
5
  import * as React from "react"
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client";
2
4
 
3
5
  import * as React from "react";
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client"
2
4
 
3
5
  import * as React from "react"
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import * as React from "react"
2
4
  import { cn } from "../../../infra/utils/clsx"
3
5
 
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client"
2
4
 
3
5
  import * as React from "react"
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client";
2
4
 
3
5
  import * as React from "react";
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client"
2
4
 
3
5
  import * as React from "react"
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client";
2
4
 
3
5
  import * as React from "react";
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client"
2
4
 
3
5
  import * as React from "react"
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  import { useState, useCallback, useRef, useEffect } from "react";
2
4
 
3
5
  interface UseCopyToClipboardOptions {
@@ -11,61 +11,61 @@ import type {
11
11
  } from '../types';
12
12
  import { twoFactorService } from '../services/two-factor.service';
13
13
 
14
- export function listAccountUsersAction(params?: AccountUsersPaginationParams) {
14
+ export async function listAccountUsersAction(params?: AccountUsersPaginationParams) {
15
15
  return safeServerAction(async () => {
16
16
  const { users, total } = await accountService.listAccountUsers(params);
17
17
  return { data: users, total };
18
18
  });
19
19
  }
20
20
 
21
- export function updateUserAction(user: UpdateAccountUserRequest) {
21
+ export async function updateUserAction(user: UpdateAccountUserRequest) {
22
22
  return safeServerAction(() => accountService.updateAccountUser(user));
23
23
  }
24
24
 
25
- export function updateAccountUserByIdAction(
25
+ export async function updateAccountUserByIdAction(
26
26
  userId: number,
27
27
  user: UpdateAccountUserRequest
28
28
  ) {
29
29
  return safeServerAction(() => accountService.updateAccountUserById(userId, user));
30
30
  }
31
31
 
32
- export function updateAccountAction(data: UpdateAccountRequest) {
32
+ export async function updateAccountAction(data: UpdateAccountRequest) {
33
33
  return safeServerAction(() => accountService.updateAccount(data));
34
34
  }
35
35
 
36
- export function deleteAccountUserAction(userId: number) {
36
+ export async function deleteAccountUserAction(userId: number) {
37
37
  return safeServerAction(() => accountService.deleteAccountUser(userId));
38
38
  }
39
39
 
40
- export function deleteAccountAction() {
40
+ export async function deleteAccountAction() {
41
41
  return safeServerAction(() => accountService.deleteAccount());
42
42
  }
43
43
 
44
- export function createAccountUserAction(user: CreateAccountUserRequest) {
44
+ export async function createAccountUserAction(user: CreateAccountUserRequest) {
45
45
  return safeServerAction(() => accountService.createAccountUser(user));
46
46
  }
47
47
 
48
- export function changePasswordAction(data: ChangePasswordRequest) {
48
+ export async function changePasswordAction(data: ChangePasswordRequest) {
49
49
  return safeServerAction(() => accountService.changePassword(data));
50
50
  }
51
51
 
52
- export function requestEmailChangeAction(newEmail: string) {
52
+ export async function requestEmailChangeAction(newEmail: string) {
53
53
  return safeServerAction(() => accountService.requestContactReset('email', newEmail));
54
54
  }
55
55
 
56
- export function confirmEmailChangeAction(token: string, newEmail: string) {
56
+ export async function confirmEmailChangeAction(token: string, newEmail: string) {
57
57
  return safeServerAction(() => accountService.confirmContactReset('email', token, newEmail));
58
58
  }
59
59
 
60
- export function requestPhoneChangeAction(newPhone: string) {
60
+ export async function requestPhoneChangeAction(newPhone: string) {
61
61
  return safeServerAction(() => accountService.requestContactReset('phone', newPhone));
62
62
  }
63
63
 
64
- export function confirmPhoneChangeAction(token: string, newPhone: string) {
64
+ export async function confirmPhoneChangeAction(token: string, newPhone: string) {
65
65
  return safeServerAction(() => accountService.confirmContactReset('phone', token, newPhone));
66
66
  }
67
67
 
68
- export function generateTwoFactorAction() {
68
+ export async function generateTwoFactorAction() {
69
69
  return safeServerAction(async () => {
70
70
  const result = await twoFactorService.generate();
71
71
  return {
@@ -75,14 +75,14 @@ export function generateTwoFactorAction() {
75
75
  });
76
76
  }
77
77
 
78
- export function confirmTwoFactorAction(code: string) {
78
+ export async function confirmTwoFactorAction(code: string) {
79
79
  return safeServerAction(async () => {
80
80
  await twoFactorService.confirm(code);
81
81
  await accountService.updateAccountUser({ two_factor_authentication: true });
82
82
  });
83
83
  }
84
84
 
85
- export function disableTwoFactorAction(code: string) {
85
+ export async function disableTwoFactorAction(code: string) {
86
86
  return safeServerAction(async () => {
87
87
  await twoFactorService.verify(code);
88
88
  await twoFactorService.disable();
@@ -4,6 +4,6 @@ import { safeServerAction } from '../../../utils/safeServerAction';
4
4
  import { accountService } from '../services/account.service';
5
5
  import type { Account } from '../types';
6
6
 
7
- export function findCurrentAccount() {
7
+ export async function findCurrentAccount() {
8
8
  return safeServerAction<Account>(() => accountService.findCurrentAccount());
9
9
  }
@@ -3,6 +3,6 @@
3
3
  import { safeServerAction } from '../../../utils/safeServerAction';
4
4
  import { currencyService } from '../services/currency.service';
5
5
 
6
- export function listCurrenciesAction() {
6
+ export async function listCurrenciesAction() {
7
7
  return safeServerAction(() => currencyService.fetchOptions());
8
8
  }
@@ -3,6 +3,6 @@
3
3
  import { safeServerAction } from '../../../utils/safeServerAction';
4
4
  import { timezoneService } from '../services/timezone.service';
5
5
 
6
- export function listTimezonesAction() {
6
+ export async function listTimezonesAction() {
7
7
  return safeServerAction(() => timezoneService.fetchOptions());
8
8
  }
@@ -4,7 +4,7 @@ import { safeServerAction } from '../../../utils/safeServerAction';
4
4
  import { getClientInfoFromRequest } from '../../../infra/utils/client-info';
5
5
  import { authService } from '../services/auth.service';
6
6
 
7
- export function logoutAction() {
7
+ export async function logoutAction() {
8
8
  return safeServerAction(async () => {
9
9
  const clientInfo = await getClientInfoFromRequest();
10
10
  return authService.logout(clientInfo);
@@ -5,7 +5,7 @@ import { RegisterRequest } from '../schema';
5
5
  import { authService } from '../services/auth.service';
6
6
  import { getClientInfoFromRequest } from '../../../infra/utils/client-info';
7
7
 
8
- export function registerAction(data: RegisterRequest) {
8
+ export async function registerAction(data: RegisterRequest) {
9
9
  return safeServerAction(async () => {
10
10
  const clientInfo = await getClientInfoFromRequest();
11
11
  return authService.register(data, clientInfo);
@@ -4,7 +4,7 @@ import { safeServerAction } from '../../../utils/safeServerAction';
4
4
  import { authService } from '../services/auth.service';
5
5
  import { getClientInfoFromRequest } from '../../../infra/utils/client-info';
6
6
 
7
- export function verifyTwoFactorAction(cookie: string, code: string) {
7
+ export async function verifyTwoFactorAction(cookie: string, code: string) {
8
8
  return safeServerAction(async () => {
9
9
  if (!/^\d{6}$/.test(code)) {
10
10
  throw new Error('Formato inválido');
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client";
2
4
 
3
5
  import { useMutation } from "@tanstack/react-query";
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client";
2
4
 
3
5
  import { useMutation } from "@tanstack/react-query";
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client";
2
4
 
3
5
  import { useMutation } from "@tanstack/react-query";
@@ -3,6 +3,6 @@
3
3
  import { safeServerAction } from '../../../utils/safeServerAction';
4
4
  import { iaCreditsService } from '../services/ia-credits.service';
5
5
 
6
- export function listIaCreditsAction(subscriptionId: number | string) {
6
+ export async function listIaCreditsAction(subscriptionId: number | string) {
7
7
  return safeServerAction(() => iaCreditsService.listOperations(subscriptionId));
8
8
  }
@@ -4,6 +4,6 @@ import { safeServerAction } from '../../../utils/safeServerAction';
4
4
  import { projectUsersService } from '../services/project-users.service';
5
5
  import type { AddRemoveProjectUsersParams } from '../types';
6
6
 
7
- export function addProjectUserAction(params: AddRemoveProjectUsersParams) {
7
+ export async function addProjectUserAction(params: AddRemoveProjectUsersParams) {
8
8
  return safeServerAction(() => projectUsersService.addToProject(params));
9
9
  }
@@ -4,6 +4,6 @@ import { safeServerAction } from '../../../utils/safeServerAction';
4
4
  import { projectUsersService } from '../services/project-users.service';
5
5
  import type { ListUsersParams } from '../types';
6
6
 
7
- export function listAvailableUsersAction(projectId: number, params: ListUsersParams = {}) {
7
+ export async function listAvailableUsersAction(projectId: number, params: ListUsersParams = {}) {
8
8
  return safeServerAction(() => projectUsersService.listNotInProject(projectId, params));
9
9
  }
@@ -4,6 +4,6 @@ import { safeServerAction } from '../../../utils/safeServerAction';
4
4
  import { projectUsersService } from '../services/project-users.service';
5
5
  import type { ListUsersParams } from '../types';
6
6
 
7
- export function listProjectUsersAction(projectId: number, params: ListUsersParams = {}) {
7
+ export async function listProjectUsersAction(projectId: number, params: ListUsersParams = {}) {
8
8
  return safeServerAction(() => projectUsersService.listInProject(projectId, params));
9
9
  }
@@ -4,6 +4,6 @@ import { safeServerAction } from '../../../utils/safeServerAction';
4
4
  import { projectUsersService } from '../services/project-users.service';
5
5
  import type { AddRemoveProjectUsersParams } from '../types';
6
6
 
7
- export function removeProjectUserAction(params: AddRemoveProjectUsersParams) {
7
+ export async function removeProjectUserAction(params: AddRemoveProjectUsersParams) {
8
8
  return safeServerAction(() => projectUsersService.removeFromProject(params));
9
9
  }
@@ -4,6 +4,6 @@ import { safeServerAction } from '../../../utils/safeServerAction';
4
4
  import type { FindSubscriptionsParams } from '../types';
5
5
  import { subscriptionsService } from '../services/subscriptions.service';
6
6
 
7
- export function listSubscriptionsAction(params?: Partial<FindSubscriptionsParams>) {
7
+ export async function listSubscriptionsAction(params?: Partial<FindSubscriptionsParams>) {
8
8
  return safeServerAction(() => subscriptionsService.listSubscriptions(params));
9
9
  }
@@ -3,6 +3,6 @@
3
3
  import { safeServerAction } from '../../../utils/safeServerAction';
4
4
  import { userService } from '../services/user.service';
5
5
 
6
- export function findUserById() {
6
+ export async function findUserById() {
7
7
  return safeServerAction(() => userService.findById());
8
8
  }
@@ -4,7 +4,7 @@ import { safeServerAction } from '../../../utils/safeServerAction';
4
4
  import { messagesService } from '../services/messages.service';
5
5
  import type { FindMessagesParams } from '../schema/messages.schema';
6
6
 
7
- export function listMessagesAction(params?: Partial<FindMessagesParams>) {
7
+ export async function listMessagesAction(params?: Partial<FindMessagesParams>) {
8
8
  return safeServerAction(async () => {
9
9
  const result = await messagesService.listMessages(params);
10
10
  return { data: result.data, total: result.total, totalUnread: result.totalUnread };
@@ -3,6 +3,6 @@
3
3
  import { safeServerAction } from '../../../utils/safeServerAction';
4
4
  import { messagesService } from '../services/messages.service';
5
5
 
6
- export function markAllMessagesAsReadAction() {
6
+ export async function markAllMessagesAsReadAction() {
7
7
  return safeServerAction(() => messagesService.markAllAsRead());
8
8
  }
@@ -3,6 +3,6 @@
3
3
  import { safeServerAction } from '../../../utils/safeServerAction';
4
4
  import { messagesService } from '../services/messages.service';
5
5
 
6
- export function markMessageAsReadAction(messageId: string) {
6
+ export async function markMessageAsReadAction(messageId: string) {
7
7
  return safeServerAction(() => messagesService.markAsRead(messageId));
8
8
  }
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client";
2
4
 
3
5
  import {
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client";
2
4
 
3
5
  import {
@@ -1,3 +1,5 @@
1
+ 'use client';
2
+
1
3
  "use client";
2
4
 
3
5
  import { createContext, ReactNode, useContext } from "react";