@carlonicora/nextjs-jsonapi 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ApiResponseInterface-DDI7QQPR.d.ts → ApiResponseInterface-CfcC7pPC.d.mts} +11 -2
- package/dist/{ApiResponseInterface-BHN5D9r5.d.mts → ApiResponseInterface-DTBJaV5R.d.ts} +11 -2
- package/dist/AuthComponent-hxOPs9o8.d.mts +11 -0
- package/dist/AuthComponent-hxOPs9o8.d.ts +11 -0
- package/dist/{BlockNoteEditor-G6AK2NWA.js → BlockNoteEditor-7FM7B737.js} +19 -22
- package/dist/BlockNoteEditor-7FM7B737.js.map +1 -0
- package/dist/{BlockNoteEditor-AIEEQM6A.mjs → BlockNoteEditor-RVL76ZAS.mjs} +11 -14
- package/dist/BlockNoteEditor-RVL76ZAS.mjs.map +1 -0
- package/dist/JsonApiRequest-KOKGVPBI.js +25 -0
- package/dist/{JsonApiRequest-UJ7FGIVI.js.map → JsonApiRequest-KOKGVPBI.js.map} +1 -1
- package/dist/{JsonApiRequest-6UR7DIAR.mjs → JsonApiRequest-VCCRO732.mjs} +2 -2
- package/dist/chunk-2Z56AS2S.js +2723 -0
- package/dist/chunk-2Z56AS2S.js.map +1 -0
- package/dist/chunk-37NJZ2VD.mjs +637 -0
- package/dist/chunk-37NJZ2VD.mjs.map +1 -0
- package/dist/{chunk-2K3Q24UF.js → chunk-3ZPK4QOB.js} +24 -14
- package/dist/chunk-3ZPK4QOB.js.map +1 -0
- package/dist/chunk-AGWQ75PQ.js +142 -0
- package/dist/chunk-AGWQ75PQ.js.map +1 -0
- package/dist/{chunk-32HM6MDD.js → chunk-CSM6AIAP.js} +1 -1
- package/dist/{chunk-32HM6MDD.js.map → chunk-CSM6AIAP.js.map} +1 -1
- package/dist/{chunk-IKBA4AHN.mjs → chunk-F4Y3GZG4.mjs} +3 -3
- package/dist/{chunk-YF5XQZDR.mjs → chunk-F5UNXZ3J.mjs} +1 -1
- package/dist/chunk-F5UNXZ3J.mjs.map +1 -0
- package/dist/chunk-IGOWVLJH.mjs +142 -0
- package/dist/chunk-IGOWVLJH.mjs.map +1 -0
- package/dist/{chunk-HAG77QBV.mjs → chunk-K4W5QXL5.mjs} +1 -1
- package/dist/chunk-KFL5ZFM4.mjs +2723 -0
- package/dist/chunk-KFL5ZFM4.mjs.map +1 -0
- package/dist/{chunk-HR4H2FP7.mjs → chunk-KJ4ETLJB.mjs} +24 -14
- package/dist/chunk-KJ4ETLJB.mjs.map +1 -0
- package/dist/chunk-LOSPCUCF.js +637 -0
- package/dist/chunk-LOSPCUCF.js.map +1 -0
- package/dist/{chunk-VET55IZO.js → chunk-SVX7E6RR.js} +10293 -7536
- package/dist/chunk-SVX7E6RR.js.map +1 -0
- package/dist/{chunk-EFJEWLRL.js → chunk-YUO55Q5A.js} +1 -1
- package/dist/chunk-YUO55Q5A.js.map +1 -0
- package/dist/chunk-ZQTFZKLJ.mjs +12089 -0
- package/dist/chunk-ZQTFZKLJ.mjs.map +1 -0
- package/dist/{chunk-PMXG5WBC.js → chunk-ZUEEIQHW.js} +3 -3
- package/dist/{chunk-PMXG5WBC.js.map → chunk-ZUEEIQHW.js.map} +1 -1
- package/dist/client/index.d.mts +161 -11
- package/dist/client/index.d.ts +161 -11
- package/dist/client/index.js +74 -11
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +73 -10
- package/dist/components/index.d.mts +763 -11
- package/dist/components/index.d.ts +763 -11
- package/dist/components/index.js +465 -11
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +466 -12
- package/dist/config-B43zxEvn.d.mts +69 -0
- package/dist/config-D2OUrI_G.d.ts +69 -0
- package/dist/content.fields-Ck5lkQ5d.d.mts +47 -0
- package/dist/content.fields-Ck5lkQ5d.d.ts +47 -0
- package/dist/{content.interface-CR2aBeAW.d.ts → content.interface-Bs8a7uW6.d.mts} +2 -3
- package/dist/{content.interface-FpLfsaRm.d.mts → content.interface-UtsJ-mzs.d.ts} +2 -3
- package/dist/contexts/index.d.mts +13 -6
- package/dist/contexts/index.d.ts +13 -6
- package/dist/contexts/index.js +10 -11
- package/dist/contexts/index.js.map +1 -1
- package/dist/contexts/index.mjs +9 -10
- package/dist/core/index.d.mts +539 -8
- package/dist/core/index.d.ts +539 -8
- package/dist/core/index.js +104 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +105 -3
- package/dist/index.d.mts +131 -70
- package/dist/index.d.ts +131 -70
- package/dist/index.js +97 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +118 -28
- package/dist/notification.interface-BdcwkuQE.d.mts +228 -0
- package/dist/notification.interface-BdcwkuQE.d.ts +228 -0
- package/dist/request-GBLBPYFM.js +8 -0
- package/dist/request-GBLBPYFM.js.map +1 -0
- package/dist/request-XABCMU25.mjs +8 -0
- package/dist/{AbstractService-wLid8dB0.d.ts → s3.interface-D7ttGatc.d.ts} +36 -26
- package/dist/{AbstractService-BsY6W3Ej.d.mts → s3.interface-DlaMDRTn.d.mts} +36 -26
- package/dist/server/index.d.mts +299 -4
- package/dist/server/index.d.ts +299 -4
- package/dist/server/index.js +215 -5
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +214 -4
- package/dist/server/index.mjs.map +1 -1
- package/dist/token-2UWQJY5T.js +8 -0
- package/dist/token-2UWQJY5T.js.map +1 -0
- package/dist/token-EOK3N45S.mjs +8 -0
- package/dist/{useSocket-BV6yMdWS.d.ts → useSocket-8vwK_R_c.d.ts} +1 -1
- package/dist/{useSocket-L-An7_Mr.d.mts → useSocket-BWJUXuOl.d.mts} +1 -1
- package/package.json +12 -52
- package/src/client/JsonApiClient.ts +248 -0
- package/src/client/config.ts +78 -0
- package/src/client/index.ts +6 -1
- package/src/components/containers/TabsContainer.tsx +1 -1
- package/src/components/editors/BlockNoteEditor.tsx +3 -1
- package/src/components/index.ts +4 -0
- package/src/components/navigations/Breadcrumb.tsx +1 -1
- package/src/components/navigations/Header.tsx +2 -2
- package/src/contexts/CommonContext.tsx +1 -1
- package/src/contexts/SocketContext.tsx +1 -1
- package/src/contexts/index.ts +3 -0
- package/src/core/abstracts/ClientAbstractService.ts +255 -0
- package/src/core/abstracts/ServerAbstractService.ts +180 -0
- package/src/core/abstracts/index.ts +2 -0
- package/src/core/index.ts +32 -3
- package/src/discord/config.ts +15 -0
- package/src/discord/index.ts +1 -0
- package/src/features/auth/components/details/LandingComponent.tsx +2 -2
- package/src/features/auth/components/forms/AcceptInvitation.tsx +1 -1
- package/src/features/auth/components/forms/ActivateAccount.tsx +1 -1
- package/src/features/auth/components/forms/Cookies.tsx +2 -1
- package/src/features/auth/components/forms/ForgotPassword.tsx +1 -1
- package/src/features/auth/components/forms/Login.tsx +1 -1
- package/src/features/auth/components/forms/Logout.tsx +1 -1
- package/src/features/auth/components/forms/RefreshUser.tsx +2 -1
- package/src/features/auth/components/forms/Register.tsx +1 -1
- package/src/features/auth/components/forms/ResetPassword.tsx +1 -1
- package/src/features/auth/data/auth.service.ts +1 -1
- package/src/features/auth/data/index.ts +0 -1
- package/src/features/auth/utils/AuthCookies.ts +1 -1
- package/src/features/company/components/forms/CompanyConfigurationEditor.tsx +4 -2
- package/src/features/company/components/forms/CompanyDeleter.tsx +2 -1
- package/src/features/company/components/forms/CompanyEditor.tsx +6 -3
- package/src/features/company/components/forms/CompanyLicense.tsx +4 -2
- package/src/features/company/components/lists/CompaniesList.tsx +2 -1
- package/src/features/company/data/index.ts +0 -1
- package/src/features/content/components/lists/ContentsListById.tsx +2 -1
- package/src/features/content/components/lists/RelevantContentsList.tsx +2 -1
- package/src/features/content/data/index.ts +0 -1
- package/src/features/feature/data/index.ts +0 -1
- package/src/features/notification/components/lists/NotificationsList.tsx +2 -1
- package/src/features/notification/contexts/NotificationContext.tsx +2 -1
- package/src/features/notification/data/index.ts +0 -1
- package/src/features/push/data/index.ts +0 -1
- package/src/features/role/components/forms/RemoveUserFromRole.tsx +4 -2
- package/src/features/role/components/forms/UserRoleAdd.tsx +2 -1
- package/src/features/role/components/lists/RolesList.tsx +2 -1
- package/src/features/role/components/lists/UserRolesList.tsx +2 -1
- package/src/features/role/data/index.ts +0 -1
- package/src/features/s3/data/index.ts +0 -1
- package/src/features/user/components/forms/RoleUserAdd.tsx +4 -2
- package/src/features/user/components/forms/UserDeleter.tsx +2 -1
- package/src/features/user/components/forms/UserEditor.tsx +6 -3
- package/src/features/user/components/forms/UserMultiSelect.tsx +2 -1
- package/src/features/user/components/forms/UserReactivator.tsx +2 -1
- package/src/features/user/components/forms/UserResentInvitationEmail.tsx +2 -1
- package/src/features/user/components/forms/UserSelector.tsx +2 -1
- package/src/features/user/components/lists/AdminUsersList.tsx +2 -1
- package/src/features/user/components/lists/CompanyUsersList.tsx +2 -1
- package/src/features/user/components/lists/RelevantUsersList.tsx +2 -1
- package/src/features/user/components/lists/RoleUsersList.tsx +2 -1
- package/src/features/user/components/lists/UsersListByContentIds.tsx +2 -1
- package/src/features/user/data/index.ts +0 -1
- package/src/features/user/hooks/useUserSearch.ts +2 -1
- package/src/hooks/useDataListRetriever.ts +4 -4
- package/src/hooks/usePageTracker.ts +1 -1
- package/src/hooks/usePushNotifications.ts +3 -2
- package/src/hooks/useSocket.ts +1 -1
- package/src/index.ts +7 -2
- package/src/roles/config.ts +0 -15
- package/src/roles/index.ts +1 -9
- package/src/server/JsonApiServer.ts +249 -0
- package/src/server/cache.ts +1 -1
- package/src/server/index.ts +13 -0
- package/src/server/request.ts +32 -18
- package/src/server/token.ts +1 -1
- package/dist/ApiData-DPKNfY-9.d.mts +0 -10
- package/dist/ApiData-DPKNfY-9.d.ts +0 -10
- package/dist/ApiDataInterface-DPP8s46n.d.mts +0 -21
- package/dist/ApiDataInterface-DPP8s46n.d.ts +0 -21
- package/dist/AuthComponent-B_Ps2Vb9.d.ts +0 -78
- package/dist/AuthComponent-CxnGgvoh.d.mts +0 -78
- package/dist/BlockNoteEditor-AIEEQM6A.mjs.map +0 -1
- package/dist/BlockNoteEditor-G6AK2NWA.js.map +0 -1
- package/dist/JsonApiRequest-UJ7FGIVI.js +0 -25
- package/dist/atoms/index.d.mts +0 -12
- package/dist/atoms/index.d.ts +0 -12
- package/dist/atoms/index.js +0 -9
- package/dist/atoms/index.js.map +0 -1
- package/dist/atoms/index.mjs +0 -9
- package/dist/chunk-2K3Q24UF.js.map +0 -1
- package/dist/chunk-3FBCC4G3.js +0 -8
- package/dist/chunk-3FBCC4G3.js.map +0 -1
- package/dist/chunk-3UELCPIN.js +0 -46
- package/dist/chunk-3UELCPIN.js.map +0 -1
- package/dist/chunk-5IET37O4.js +0 -4210
- package/dist/chunk-5IET37O4.js.map +0 -1
- package/dist/chunk-AYHKQWHH.js +0 -68
- package/dist/chunk-AYHKQWHH.js.map +0 -1
- package/dist/chunk-DEYKTLA3.js +0 -1131
- package/dist/chunk-DEYKTLA3.js.map +0 -1
- package/dist/chunk-EFJEWLRL.js.map +0 -1
- package/dist/chunk-FMBQZAIP.mjs +0 -490
- package/dist/chunk-FMBQZAIP.mjs.map +0 -1
- package/dist/chunk-HR4H2FP7.mjs.map +0 -1
- package/dist/chunk-J7YDGYSW.mjs +0 -9332
- package/dist/chunk-J7YDGYSW.mjs.map +0 -1
- package/dist/chunk-JGFWIT2E.mjs +0 -1131
- package/dist/chunk-JGFWIT2E.mjs.map +0 -1
- package/dist/chunk-P2F54I7Q.mjs +0 -4210
- package/dist/chunk-P2F54I7Q.mjs.map +0 -1
- package/dist/chunk-Q2N6SQYW.mjs +0 -8
- package/dist/chunk-Q2N6SQYW.mjs.map +0 -1
- package/dist/chunk-Q4FXESVT.js +0 -490
- package/dist/chunk-Q4FXESVT.js.map +0 -1
- package/dist/chunk-SM63SZCP.mjs +0 -68
- package/dist/chunk-SM63SZCP.mjs.map +0 -1
- package/dist/chunk-SZZYEG3P.mjs +0 -46
- package/dist/chunk-SZZYEG3P.mjs.map +0 -1
- package/dist/chunk-VET55IZO.js.map +0 -1
- package/dist/chunk-YF5XQZDR.mjs.map +0 -1
- package/dist/config-BmnK65TD.d.mts +0 -35
- package/dist/config-BmnK65TD.d.ts +0 -35
- package/dist/config-DQeAo9Kf.d.mts +0 -49
- package/dist/config-DQeAo9Kf.d.ts +0 -49
- package/dist/content.fields-cHPdM8GJ.d.mts +0 -27
- package/dist/content.fields-cHPdM8GJ.d.ts +0 -27
- package/dist/d3.link.interface-ClC4Irqp.d.mts +0 -21
- package/dist/d3.link.interface-ClC4Irqp.d.ts +0 -21
- package/dist/features/index.d.mts +0 -477
- package/dist/features/index.d.ts +0 -477
- package/dist/features/index.js +0 -108
- package/dist/features/index.js.map +0 -1
- package/dist/features/index.mjs +0 -108
- package/dist/hooks/index.d.mts +0 -69
- package/dist/hooks/index.d.ts +0 -69
- package/dist/hooks/index.js +0 -55
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/index.mjs +0 -55
- package/dist/hooks/index.mjs.map +0 -1
- package/dist/interfaces/index.d.mts +0 -4
- package/dist/interfaces/index.d.ts +0 -4
- package/dist/interfaces/index.js +0 -2
- package/dist/interfaces/index.js.map +0 -1
- package/dist/interfaces/index.mjs +0 -2
- package/dist/interfaces/index.mjs.map +0 -1
- package/dist/notification.interface-B2BrLoDA.d.mts +0 -14
- package/dist/notification.interface-DlZLnAfg.d.ts +0 -14
- package/dist/permissions/index.d.mts +0 -41
- package/dist/permissions/index.d.ts +0 -41
- package/dist/permissions/index.js +0 -14
- package/dist/permissions/index.js.map +0 -1
- package/dist/permissions/index.mjs +0 -14
- package/dist/permissions/index.mjs.map +0 -1
- package/dist/request-7FE3LJLV.mjs +0 -9
- package/dist/request-7FE3LJLV.mjs.map +0 -1
- package/dist/request-QFS7NEIE.js +0 -9
- package/dist/request-QFS7NEIE.js.map +0 -1
- package/dist/roles/index.d.mts +0 -39
- package/dist/roles/index.d.ts +0 -39
- package/dist/roles/index.js +0 -18
- package/dist/roles/index.js.map +0 -1
- package/dist/roles/index.mjs +0 -18
- package/dist/roles/index.mjs.map +0 -1
- package/dist/shadcnui/index.d.mts +0 -698
- package/dist/shadcnui/index.d.ts +0 -698
- package/dist/shadcnui/index.js +0 -468
- package/dist/shadcnui/index.js.map +0 -1
- package/dist/shadcnui/index.mjs +0 -467
- package/dist/shadcnui/index.mjs.map +0 -1
- package/dist/token-IJSPOMW6.mjs +0 -9
- package/dist/token-IJSPOMW6.mjs.map +0 -1
- package/dist/token-UYE7CV6X.js +0 -9
- package/dist/token-UYE7CV6X.js.map +0 -1
- package/dist/types-B2QRyqyK.d.ts +0 -39
- package/dist/types-CgvNmxTd.d.mts +0 -39
- package/dist/types-t2PyXhDu.d.mts +0 -116
- package/dist/types-t2PyXhDu.d.ts +0 -116
- package/dist/user.interface-CooB1R79.d.mts +0 -85
- package/dist/user.interface-KnIT9pVY.d.ts +0 -85
- package/dist/utils/index.d.mts +0 -224
- package/dist/utils/index.d.ts +0 -224
- package/dist/utils/index.js +0 -46
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/index.mjs +0 -46
- package/dist/utils/index.mjs.map +0 -1
- /package/dist/{JsonApiRequest-6UR7DIAR.mjs.map → JsonApiRequest-VCCRO732.mjs.map} +0 -0
- /package/dist/{chunk-IKBA4AHN.mjs.map → chunk-F4Y3GZG4.mjs.map} +0 -0
- /package/dist/{chunk-HAG77QBV.mjs.map → chunk-K4W5QXL5.mjs.map} +0 -0
- /package/dist/{atoms/index.mjs.map → request-XABCMU25.mjs.map} +0 -0
- /package/dist/{features/index.mjs.map → token-EOK3N45S.mjs.map} +0 -0
package/src/roles/config.ts
CHANGED
|
@@ -10,8 +10,6 @@ export interface RoleIdConfig {
|
|
|
10
10
|
|
|
11
11
|
// Private storage for the injected role IDs
|
|
12
12
|
let _roleId: RoleIdConfig | null = null;
|
|
13
|
-
let _useDiscord: boolean = false;
|
|
14
|
-
let _useInternalAuth: boolean = true;
|
|
15
13
|
|
|
16
14
|
/**
|
|
17
15
|
* Configure role IDs for the library
|
|
@@ -29,11 +27,6 @@ export function configureRoles(roleId: RoleIdConfig): void {
|
|
|
29
27
|
_roleId = roleId;
|
|
30
28
|
}
|
|
31
29
|
|
|
32
|
-
export function configureDiscord(params: { useDiscord: boolean; useInternalAuth: boolean }): void {
|
|
33
|
-
_useDiscord = params.useDiscord;
|
|
34
|
-
_useInternalAuth = params.useInternalAuth;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
30
|
/**
|
|
38
31
|
* Get configured role IDs
|
|
39
32
|
* @throws Error if roles not configured
|
|
@@ -51,11 +44,3 @@ export function getRoleId(): RoleIdConfig {
|
|
|
51
44
|
export function isRolesConfigured(): boolean {
|
|
52
45
|
return _roleId !== null;
|
|
53
46
|
}
|
|
54
|
-
|
|
55
|
-
export function isDiscordConfigured(): boolean {
|
|
56
|
-
return _useDiscord;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export function isInternalAuthConfigured(): boolean {
|
|
60
|
-
return _useInternalAuth;
|
|
61
|
-
}
|
package/src/roles/index.ts
CHANGED
|
@@ -1,9 +1 @@
|
|
|
1
|
-
export {
|
|
2
|
-
configureDiscord,
|
|
3
|
-
configureRoles,
|
|
4
|
-
getRoleId,
|
|
5
|
-
isDiscordConfigured,
|
|
6
|
-
isInternalAuthConfigured,
|
|
7
|
-
isRolesConfigured,
|
|
8
|
-
type RoleIdConfig,
|
|
9
|
-
} from "./config";
|
|
1
|
+
export { configureRoles, getRoleId, isRolesConfigured, type RoleIdConfig } from "./config";
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
// Server-only utilities (NOT server actions - these cannot be called from client components)
|
|
2
|
+
|
|
3
|
+
import { JsonApiDataFactory } from "../core/factories/JsonApiDataFactory";
|
|
4
|
+
import { ApiRequestDataTypeInterface } from "../core/interfaces/ApiRequestDataTypeInterface";
|
|
5
|
+
import { ApiResponseInterface } from "../core/interfaces/ApiResponseInterface";
|
|
6
|
+
import { translateResponse } from "../core/utils/translateResponse";
|
|
7
|
+
import { ModuleWithPermissions } from "../permissions/types";
|
|
8
|
+
import { serverRequest } from "./request";
|
|
9
|
+
import { getServerToken } from "./token";
|
|
10
|
+
|
|
11
|
+
// Config storage for server contexts
|
|
12
|
+
let _serverConfig: {
|
|
13
|
+
apiUrl: string;
|
|
14
|
+
appUrl?: string;
|
|
15
|
+
trackablePages?: ModuleWithPermissions[];
|
|
16
|
+
bootstrapper?: () => void;
|
|
17
|
+
additionalHeaders?: Record<string, string>;
|
|
18
|
+
} | null = null;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Configure the JSON:API server client.
|
|
22
|
+
* Call this in your Bootstrapper or server initialization.
|
|
23
|
+
*/
|
|
24
|
+
export function configureServerJsonApi(config: {
|
|
25
|
+
apiUrl: string;
|
|
26
|
+
appUrl?: string;
|
|
27
|
+
trackablePages?: ModuleWithPermissions[];
|
|
28
|
+
bootstrapper?: () => void;
|
|
29
|
+
additionalHeaders?: Record<string, string>;
|
|
30
|
+
}): void {
|
|
31
|
+
_serverConfig = config;
|
|
32
|
+
if (config.bootstrapper) {
|
|
33
|
+
config.bootstrapper();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function getServerApiUrl(): string {
|
|
38
|
+
if (_serverConfig?.apiUrl) {
|
|
39
|
+
return _serverConfig.apiUrl;
|
|
40
|
+
}
|
|
41
|
+
const envUrl = process.env.NEXT_PUBLIC_API_URL;
|
|
42
|
+
if (!envUrl) {
|
|
43
|
+
throw new Error("API URL not configured. Use configureServerJsonApi() or set NEXT_PUBLIC_API_URL environment variable.");
|
|
44
|
+
}
|
|
45
|
+
return envUrl;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function getServerAppUrl(): string {
|
|
49
|
+
if (_serverConfig?.appUrl) {
|
|
50
|
+
return _serverConfig.appUrl;
|
|
51
|
+
}
|
|
52
|
+
const envUrl = process.env.NEXT_PUBLIC_ADDRESS;
|
|
53
|
+
if (!envUrl) {
|
|
54
|
+
throw new Error("App URL not configured. Use configureServerJsonApi({ appUrl }) or set NEXT_PUBLIC_ADDRESS environment variable.");
|
|
55
|
+
}
|
|
56
|
+
return envUrl.trim().replace(/\/+$/, "");
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function getServerTrackablePages(): ModuleWithPermissions[] {
|
|
60
|
+
return _serverConfig?.trackablePages ?? [];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function runServerBootstrapper(): void {
|
|
64
|
+
if (_serverConfig?.bootstrapper) {
|
|
65
|
+
_serverConfig.bootstrapper();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function buildServerUrl(endpoint: string): string {
|
|
70
|
+
const apiUrl = getServerApiUrl();
|
|
71
|
+
return endpoint.startsWith("http") ? endpoint : `${apiUrl}${endpoint}`;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export async function ServerJsonApiGet(params: {
|
|
75
|
+
classKey: ApiRequestDataTypeInterface;
|
|
76
|
+
endpoint: string;
|
|
77
|
+
companyId?: string;
|
|
78
|
+
language: string;
|
|
79
|
+
}): Promise<ApiResponseInterface> {
|
|
80
|
+
runServerBootstrapper();
|
|
81
|
+
const token = await getServerToken();
|
|
82
|
+
|
|
83
|
+
const apiResponse = await serverRequest({
|
|
84
|
+
method: "GET",
|
|
85
|
+
url: buildServerUrl(params.endpoint),
|
|
86
|
+
token,
|
|
87
|
+
cache: params.classKey.cache,
|
|
88
|
+
companyId: params.companyId,
|
|
89
|
+
language: params.language,
|
|
90
|
+
additionalHeaders: _serverConfig?.additionalHeaders,
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
return translateResponse({
|
|
94
|
+
classKey: params.classKey,
|
|
95
|
+
apiResponse,
|
|
96
|
+
companyId: params.companyId,
|
|
97
|
+
language: params.language,
|
|
98
|
+
paginationHandler: async (endpoint: string) =>
|
|
99
|
+
ServerJsonApiGet({
|
|
100
|
+
classKey: params.classKey,
|
|
101
|
+
endpoint,
|
|
102
|
+
companyId: params.companyId,
|
|
103
|
+
language: params.language,
|
|
104
|
+
}),
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export async function ServerJsonApiPost(params: {
|
|
109
|
+
classKey: ApiRequestDataTypeInterface;
|
|
110
|
+
endpoint: string;
|
|
111
|
+
companyId?: string;
|
|
112
|
+
body?: any;
|
|
113
|
+
overridesJsonApiCreation?: boolean;
|
|
114
|
+
files?: { [key: string]: File | Blob } | File | Blob;
|
|
115
|
+
language: string;
|
|
116
|
+
responseType?: ApiRequestDataTypeInterface;
|
|
117
|
+
}): Promise<ApiResponseInterface> {
|
|
118
|
+
runServerBootstrapper();
|
|
119
|
+
const token = await getServerToken();
|
|
120
|
+
|
|
121
|
+
let body = params.body;
|
|
122
|
+
if (!body) {
|
|
123
|
+
body = {};
|
|
124
|
+
} else if (params.overridesJsonApiCreation !== true) {
|
|
125
|
+
body = JsonApiDataFactory.create(params.classKey, body);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const apiResponse = await serverRequest({
|
|
129
|
+
method: "POST",
|
|
130
|
+
url: buildServerUrl(params.endpoint),
|
|
131
|
+
token,
|
|
132
|
+
body,
|
|
133
|
+
files: params.files,
|
|
134
|
+
companyId: params.companyId,
|
|
135
|
+
language: params.language,
|
|
136
|
+
additionalHeaders: _serverConfig?.additionalHeaders,
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
return translateResponse({
|
|
140
|
+
classKey: params.responseType ?? params.classKey,
|
|
141
|
+
apiResponse,
|
|
142
|
+
companyId: params.companyId,
|
|
143
|
+
language: params.language,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export async function ServerJsonApiPut(params: {
|
|
148
|
+
classKey: ApiRequestDataTypeInterface;
|
|
149
|
+
endpoint: string;
|
|
150
|
+
companyId?: string;
|
|
151
|
+
body?: any;
|
|
152
|
+
files?: { [key: string]: File | Blob } | File | Blob;
|
|
153
|
+
language: string;
|
|
154
|
+
responseType?: ApiRequestDataTypeInterface;
|
|
155
|
+
}): Promise<ApiResponseInterface> {
|
|
156
|
+
runServerBootstrapper();
|
|
157
|
+
const token = await getServerToken();
|
|
158
|
+
|
|
159
|
+
let body = params.body;
|
|
160
|
+
if (!body) {
|
|
161
|
+
body = {};
|
|
162
|
+
} else {
|
|
163
|
+
body = JsonApiDataFactory.create(params.classKey, body);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const apiResponse = await serverRequest({
|
|
167
|
+
method: "PUT",
|
|
168
|
+
url: buildServerUrl(params.endpoint),
|
|
169
|
+
token,
|
|
170
|
+
body,
|
|
171
|
+
files: params.files,
|
|
172
|
+
companyId: params.companyId,
|
|
173
|
+
language: params.language,
|
|
174
|
+
additionalHeaders: _serverConfig?.additionalHeaders,
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
return translateResponse({
|
|
178
|
+
classKey: params.responseType ?? params.classKey,
|
|
179
|
+
apiResponse,
|
|
180
|
+
companyId: params.companyId,
|
|
181
|
+
language: params.language,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export async function ServerJsonApiPatch(params: {
|
|
186
|
+
classKey: ApiRequestDataTypeInterface;
|
|
187
|
+
endpoint: string;
|
|
188
|
+
companyId?: string;
|
|
189
|
+
body?: any;
|
|
190
|
+
files?: { [key: string]: File | Blob } | File | Blob;
|
|
191
|
+
overridesJsonApiCreation?: boolean;
|
|
192
|
+
responseType?: ApiRequestDataTypeInterface;
|
|
193
|
+
language: string;
|
|
194
|
+
}): Promise<ApiResponseInterface> {
|
|
195
|
+
runServerBootstrapper();
|
|
196
|
+
const token = await getServerToken();
|
|
197
|
+
|
|
198
|
+
let body = params.body;
|
|
199
|
+
if (!body) {
|
|
200
|
+
body = {};
|
|
201
|
+
} else if (params.overridesJsonApiCreation !== true) {
|
|
202
|
+
body = JsonApiDataFactory.create(params.classKey, body);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
const apiResponse = await serverRequest({
|
|
206
|
+
method: "PATCH",
|
|
207
|
+
url: buildServerUrl(params.endpoint),
|
|
208
|
+
token,
|
|
209
|
+
body,
|
|
210
|
+
files: params.files,
|
|
211
|
+
companyId: params.companyId,
|
|
212
|
+
language: params.language,
|
|
213
|
+
additionalHeaders: _serverConfig?.additionalHeaders,
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
return translateResponse({
|
|
217
|
+
classKey: params.responseType ?? params.classKey,
|
|
218
|
+
apiResponse,
|
|
219
|
+
companyId: params.companyId,
|
|
220
|
+
language: params.language,
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export async function ServerJsonApiDelete(params: {
|
|
225
|
+
classKey: ApiRequestDataTypeInterface;
|
|
226
|
+
endpoint: string;
|
|
227
|
+
companyId?: string;
|
|
228
|
+
language: string;
|
|
229
|
+
responseType?: ApiRequestDataTypeInterface;
|
|
230
|
+
}): Promise<ApiResponseInterface> {
|
|
231
|
+
runServerBootstrapper();
|
|
232
|
+
const token = await getServerToken();
|
|
233
|
+
|
|
234
|
+
const apiResponse = await serverRequest({
|
|
235
|
+
method: "DELETE",
|
|
236
|
+
url: buildServerUrl(params.endpoint),
|
|
237
|
+
token,
|
|
238
|
+
companyId: params.companyId,
|
|
239
|
+
language: params.language,
|
|
240
|
+
additionalHeaders: _serverConfig?.additionalHeaders,
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
return translateResponse({
|
|
244
|
+
classKey: params.responseType ?? params.classKey,
|
|
245
|
+
apiResponse,
|
|
246
|
+
companyId: params.companyId,
|
|
247
|
+
language: params.language,
|
|
248
|
+
});
|
|
249
|
+
}
|
package/src/server/cache.ts
CHANGED
package/src/server/index.ts
CHANGED
|
@@ -2,3 +2,16 @@ export * from "./cache";
|
|
|
2
2
|
export * from "./request";
|
|
3
3
|
export * from "./ServerSession";
|
|
4
4
|
export * from "./token";
|
|
5
|
+
export * from "./JsonApiServer";
|
|
6
|
+
|
|
7
|
+
// Server-side services for use in RSC and server actions
|
|
8
|
+
// Re-exported from unified services with Server prefix aliases
|
|
9
|
+
export { AuthService as ServerAuthService } from "../features/auth/data/auth.service";
|
|
10
|
+
export { UserService as ServerUserService } from "../features/user/data/user.service";
|
|
11
|
+
export { CompanyService as ServerCompanyService } from "../features/company/data/company.service";
|
|
12
|
+
export { RoleService as ServerRoleService } from "../features/role/data/role.service";
|
|
13
|
+
export { ContentService as ServerContentService } from "../features/content/data/content.service";
|
|
14
|
+
export { NotificationService as ServerNotificationService } from "../features/notification/data/notification.service";
|
|
15
|
+
export { FeatureService as ServerFeatureService } from "../features/feature/data/feature.service";
|
|
16
|
+
export { PushService as ServerPushService } from "../features/push/data/push.service";
|
|
17
|
+
export { S3Service as ServerS3Service } from "../features/s3/data/s3.service";
|
package/src/server/request.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// Server-only utilities (NOT server actions - these cannot be called from client components)
|
|
2
2
|
|
|
3
3
|
import { ApiData } from "../core/interfaces/ApiData";
|
|
4
|
-
import { cacheLife } from "next/dist/server/use-cache/cache-life";
|
|
5
|
-
import { cacheTag } from "next/dist/server/use-cache/cache-tag";
|
|
6
4
|
|
|
7
5
|
export interface ServerRequestParams {
|
|
8
6
|
method: string;
|
|
@@ -16,13 +14,22 @@ export interface ServerRequestParams {
|
|
|
16
14
|
additionalHeaders?: Record<string, string>;
|
|
17
15
|
}
|
|
18
16
|
|
|
17
|
+
// Map cache configuration names to revalidation times in seconds
|
|
18
|
+
const cacheLifeToSeconds: Record<string, number> = {
|
|
19
|
+
seconds: 1,
|
|
20
|
+
minutes: 60,
|
|
21
|
+
hours: 3600,
|
|
22
|
+
days: 86400,
|
|
23
|
+
weeks: 604800,
|
|
24
|
+
max: 31536000, // 1 year
|
|
25
|
+
default: 60,
|
|
26
|
+
};
|
|
27
|
+
|
|
19
28
|
/**
|
|
20
29
|
* Server-side request with Next.js caching support.
|
|
21
|
-
* Uses
|
|
30
|
+
* Uses fetch's native caching options for Next.js compatibility.
|
|
22
31
|
*/
|
|
23
32
|
export async function serverRequest(params: ServerRequestParams): Promise<ApiData> {
|
|
24
|
-
"use cache";
|
|
25
|
-
|
|
26
33
|
const response: ApiData = {
|
|
27
34
|
data: undefined,
|
|
28
35
|
ok: false,
|
|
@@ -30,17 +37,6 @@ export async function serverRequest(params: ServerRequestParams): Promise<ApiDat
|
|
|
30
37
|
statusText: "",
|
|
31
38
|
};
|
|
32
39
|
|
|
33
|
-
// Apply caching configuration
|
|
34
|
-
if (params.cache) {
|
|
35
|
-
if (["days", "default", "hours", "max", "minutes", "seconds", "weeks"].includes(params.cache)) {
|
|
36
|
-
cacheLife(params.cache as any);
|
|
37
|
-
} else {
|
|
38
|
-
cacheTag(params.cache);
|
|
39
|
-
}
|
|
40
|
-
} else {
|
|
41
|
-
cacheLife("seconds");
|
|
42
|
-
}
|
|
43
|
-
|
|
44
40
|
const additionalHeaders: Record<string, string> = { ...params.additionalHeaders };
|
|
45
41
|
|
|
46
42
|
if (params.companyId) {
|
|
@@ -79,9 +75,27 @@ export async function serverRequest(params: ServerRequestParams): Promise<ApiDat
|
|
|
79
75
|
additionalHeaders["Content-Type"] = "application/json";
|
|
80
76
|
}
|
|
81
77
|
|
|
82
|
-
|
|
78
|
+
// Build Next.js fetch caching options
|
|
79
|
+
const nextOptions: { revalidate?: number; tags?: string[] } = {};
|
|
80
|
+
|
|
81
|
+
if (params.cache) {
|
|
82
|
+
// Check if it's a predefined cache life name
|
|
83
|
+
if (params.cache in cacheLifeToSeconds) {
|
|
84
|
+
nextOptions.revalidate = cacheLifeToSeconds[params.cache];
|
|
85
|
+
} else {
|
|
86
|
+
// Treat as a cache tag
|
|
87
|
+
nextOptions.tags = [params.cache];
|
|
88
|
+
nextOptions.revalidate = 60; // Default revalidation time for tagged caches
|
|
89
|
+
}
|
|
90
|
+
} else {
|
|
91
|
+
// Default to short caching
|
|
92
|
+
nextOptions.revalidate = 1;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const options: RequestInit & { next?: { revalidate?: number; tags?: string[] } } = {
|
|
83
96
|
method: params.method,
|
|
84
97
|
headers: { Accept: "application/json", ...additionalHeaders },
|
|
98
|
+
next: nextOptions,
|
|
85
99
|
};
|
|
86
100
|
|
|
87
101
|
if (requestBody !== undefined) {
|
package/src/server/token.ts
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
interface JsonApiHydratedDataInterface {
|
|
2
|
-
jsonApi: any;
|
|
3
|
-
included: any[];
|
|
4
|
-
allData?: any[];
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
interface ApiDataInterface {
|
|
8
|
-
get included(): any[];
|
|
9
|
-
get type(): string;
|
|
10
|
-
get id(): string;
|
|
11
|
-
get createdAt(): Date;
|
|
12
|
-
get updatedAt(): Date;
|
|
13
|
-
get self(): string | undefined;
|
|
14
|
-
get jsonApi(): any;
|
|
15
|
-
generateApiUrl(params?: any): string;
|
|
16
|
-
dehydrate(): JsonApiHydratedDataInterface;
|
|
17
|
-
rehydrate(data: JsonApiHydratedDataInterface): this;
|
|
18
|
-
createJsonApi(data: any): any;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export type { ApiDataInterface as A, JsonApiHydratedDataInterface as J };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
interface JsonApiHydratedDataInterface {
|
|
2
|
-
jsonApi: any;
|
|
3
|
-
included: any[];
|
|
4
|
-
allData?: any[];
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
interface ApiDataInterface {
|
|
8
|
-
get included(): any[];
|
|
9
|
-
get type(): string;
|
|
10
|
-
get id(): string;
|
|
11
|
-
get createdAt(): Date;
|
|
12
|
-
get updatedAt(): Date;
|
|
13
|
-
get self(): string | undefined;
|
|
14
|
-
get jsonApi(): any;
|
|
15
|
-
generateApiUrl(params?: any): string;
|
|
16
|
-
dehydrate(): JsonApiHydratedDataInterface;
|
|
17
|
-
rehydrate(data: JsonApiHydratedDataInterface): this;
|
|
18
|
-
createJsonApi(data: any): any;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export type { ApiDataInterface as A, JsonApiHydratedDataInterface as J };
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { R as RoleInterface, U as UserInterface } from './user.interface-KnIT9pVY.js';
|
|
3
|
-
|
|
4
|
-
type AddUserToRoleProps = {
|
|
5
|
-
role: RoleInterface;
|
|
6
|
-
refresh: () => Promise<void>;
|
|
7
|
-
};
|
|
8
|
-
declare function AddUserToRole(props: AddUserToRoleProps): react_jsx_runtime.JSX.Element;
|
|
9
|
-
|
|
10
|
-
type UserAvatarEditorProps = {
|
|
11
|
-
user?: UserInterface;
|
|
12
|
-
file?: File | null;
|
|
13
|
-
setFile: (file: File | null) => void;
|
|
14
|
-
resetImage: boolean;
|
|
15
|
-
setResetImage: (reset: boolean) => void;
|
|
16
|
-
};
|
|
17
|
-
declare function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }: UserAvatarEditorProps): react_jsx_runtime.JSX.Element;
|
|
18
|
-
|
|
19
|
-
type UserDeleterProps = {
|
|
20
|
-
user: UserInterface;
|
|
21
|
-
companyId?: string;
|
|
22
|
-
onDeleted?: () => void;
|
|
23
|
-
};
|
|
24
|
-
declare function UserDeleter(props: UserDeleterProps): react_jsx_runtime.JSX.Element | null;
|
|
25
|
-
|
|
26
|
-
type UserEditorProps = {
|
|
27
|
-
user?: UserInterface;
|
|
28
|
-
propagateChanges?: (user: UserInterface) => void;
|
|
29
|
-
adminCreated?: boolean;
|
|
30
|
-
trigger?: React.ReactNode;
|
|
31
|
-
onRevalidate?: (path: string) => Promise<void>;
|
|
32
|
-
};
|
|
33
|
-
declare function UserEditor(props: UserEditorProps): react_jsx_runtime.JSX.Element | null;
|
|
34
|
-
|
|
35
|
-
type UserMultiSelectProps = {
|
|
36
|
-
id: string;
|
|
37
|
-
form: any;
|
|
38
|
-
currentUser?: UserInterface;
|
|
39
|
-
label?: string;
|
|
40
|
-
placeholder?: string;
|
|
41
|
-
onChange?: (users?: UserInterface[]) => void;
|
|
42
|
-
maxCount?: number;
|
|
43
|
-
isRequired?: boolean;
|
|
44
|
-
};
|
|
45
|
-
declare function UserMultiSelect({ id, form, currentUser, label, placeholder, onChange, maxCount, isRequired, }: UserMultiSelectProps): react_jsx_runtime.JSX.Element;
|
|
46
|
-
|
|
47
|
-
type UserReactivatorProps = {
|
|
48
|
-
user: UserInterface;
|
|
49
|
-
propagateChanges: (user: UserInterface) => void;
|
|
50
|
-
};
|
|
51
|
-
declare function UserReactivator(props: UserReactivatorProps): react_jsx_runtime.JSX.Element | null;
|
|
52
|
-
|
|
53
|
-
type UserResentInvitationEmailProps = {
|
|
54
|
-
user: UserInterface;
|
|
55
|
-
};
|
|
56
|
-
declare function UserResentInvitationEmail(props: UserResentInvitationEmailProps): react_jsx_runtime.JSX.Element | null;
|
|
57
|
-
|
|
58
|
-
type UserSelectorProps = {
|
|
59
|
-
id: string;
|
|
60
|
-
form: any;
|
|
61
|
-
label?: string;
|
|
62
|
-
placeholder?: string;
|
|
63
|
-
onChange?: (user?: UserInterface) => void;
|
|
64
|
-
isRequired?: boolean;
|
|
65
|
-
};
|
|
66
|
-
declare function UserSelector({ id, form, label, placeholder, onChange, isRequired }: UserSelectorProps): react_jsx_runtime.JSX.Element;
|
|
67
|
-
|
|
68
|
-
declare enum AuthComponent {
|
|
69
|
-
Login = 0,
|
|
70
|
-
ForgotPassword = 1,
|
|
71
|
-
ResetPassword = 2,
|
|
72
|
-
ActivateAccount = 3,
|
|
73
|
-
AcceptInvitation = 4,
|
|
74
|
-
Register = 5,
|
|
75
|
-
Landing = 6
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export { AuthComponent as A, UserAvatarEditor as U, AddUserToRole as a, UserDeleter as b, UserEditor as c, UserMultiSelect as d, UserReactivator as e, UserResentInvitationEmail as f, UserSelector as g };
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { R as RoleInterface, U as UserInterface } from './user.interface-CooB1R79.mjs';
|
|
3
|
-
|
|
4
|
-
type AddUserToRoleProps = {
|
|
5
|
-
role: RoleInterface;
|
|
6
|
-
refresh: () => Promise<void>;
|
|
7
|
-
};
|
|
8
|
-
declare function AddUserToRole(props: AddUserToRoleProps): react_jsx_runtime.JSX.Element;
|
|
9
|
-
|
|
10
|
-
type UserAvatarEditorProps = {
|
|
11
|
-
user?: UserInterface;
|
|
12
|
-
file?: File | null;
|
|
13
|
-
setFile: (file: File | null) => void;
|
|
14
|
-
resetImage: boolean;
|
|
15
|
-
setResetImage: (reset: boolean) => void;
|
|
16
|
-
};
|
|
17
|
-
declare function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }: UserAvatarEditorProps): react_jsx_runtime.JSX.Element;
|
|
18
|
-
|
|
19
|
-
type UserDeleterProps = {
|
|
20
|
-
user: UserInterface;
|
|
21
|
-
companyId?: string;
|
|
22
|
-
onDeleted?: () => void;
|
|
23
|
-
};
|
|
24
|
-
declare function UserDeleter(props: UserDeleterProps): react_jsx_runtime.JSX.Element | null;
|
|
25
|
-
|
|
26
|
-
type UserEditorProps = {
|
|
27
|
-
user?: UserInterface;
|
|
28
|
-
propagateChanges?: (user: UserInterface) => void;
|
|
29
|
-
adminCreated?: boolean;
|
|
30
|
-
trigger?: React.ReactNode;
|
|
31
|
-
onRevalidate?: (path: string) => Promise<void>;
|
|
32
|
-
};
|
|
33
|
-
declare function UserEditor(props: UserEditorProps): react_jsx_runtime.JSX.Element | null;
|
|
34
|
-
|
|
35
|
-
type UserMultiSelectProps = {
|
|
36
|
-
id: string;
|
|
37
|
-
form: any;
|
|
38
|
-
currentUser?: UserInterface;
|
|
39
|
-
label?: string;
|
|
40
|
-
placeholder?: string;
|
|
41
|
-
onChange?: (users?: UserInterface[]) => void;
|
|
42
|
-
maxCount?: number;
|
|
43
|
-
isRequired?: boolean;
|
|
44
|
-
};
|
|
45
|
-
declare function UserMultiSelect({ id, form, currentUser, label, placeholder, onChange, maxCount, isRequired, }: UserMultiSelectProps): react_jsx_runtime.JSX.Element;
|
|
46
|
-
|
|
47
|
-
type UserReactivatorProps = {
|
|
48
|
-
user: UserInterface;
|
|
49
|
-
propagateChanges: (user: UserInterface) => void;
|
|
50
|
-
};
|
|
51
|
-
declare function UserReactivator(props: UserReactivatorProps): react_jsx_runtime.JSX.Element | null;
|
|
52
|
-
|
|
53
|
-
type UserResentInvitationEmailProps = {
|
|
54
|
-
user: UserInterface;
|
|
55
|
-
};
|
|
56
|
-
declare function UserResentInvitationEmail(props: UserResentInvitationEmailProps): react_jsx_runtime.JSX.Element | null;
|
|
57
|
-
|
|
58
|
-
type UserSelectorProps = {
|
|
59
|
-
id: string;
|
|
60
|
-
form: any;
|
|
61
|
-
label?: string;
|
|
62
|
-
placeholder?: string;
|
|
63
|
-
onChange?: (user?: UserInterface) => void;
|
|
64
|
-
isRequired?: boolean;
|
|
65
|
-
};
|
|
66
|
-
declare function UserSelector({ id, form, label, placeholder, onChange, isRequired }: UserSelectorProps): react_jsx_runtime.JSX.Element;
|
|
67
|
-
|
|
68
|
-
declare enum AuthComponent {
|
|
69
|
-
Login = 0,
|
|
70
|
-
ForgotPassword = 1,
|
|
71
|
-
ResetPassword = 2,
|
|
72
|
-
ActivateAccount = 3,
|
|
73
|
-
AcceptInvitation = 4,
|
|
74
|
-
Register = 5,
|
|
75
|
-
Landing = 6
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export { AuthComponent as A, UserAvatarEditor as U, AddUserToRole as a, UserDeleter as b, UserEditor as c, UserMultiSelect as d, UserReactivator as e, UserResentInvitationEmail as f, UserSelector as g };
|