@carlonicora/nextjs-jsonapi 0.0.1

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 (222) hide show
  1. package/README.md +889 -0
  2. package/dist/AbstractService-BKlpJA61.d.mts +109 -0
  3. package/dist/AbstractService-D9eSVKNa.d.ts +109 -0
  4. package/dist/ApiData-DPKNfY-9.d.mts +10 -0
  5. package/dist/ApiData-DPKNfY-9.d.ts +10 -0
  6. package/dist/ApiDataInterface-DPP8s46n.d.mts +21 -0
  7. package/dist/ApiDataInterface-DPP8s46n.d.ts +21 -0
  8. package/dist/ApiRequestDataTypeInterface-CUKFDBx2.d.mts +20 -0
  9. package/dist/ApiRequestDataTypeInterface-CUKFDBx2.d.ts +20 -0
  10. package/dist/ApiResponseInterface-BHN5D9r5.d.mts +16 -0
  11. package/dist/ApiResponseInterface-DDI7QQPR.d.ts +16 -0
  12. package/dist/BlockNoteEditor-UVO3VZZE.mjs +396 -0
  13. package/dist/BlockNoteEditor-UVO3VZZE.mjs.map +1 -0
  14. package/dist/BlockNoteEditor-VFWG6LXI.js +396 -0
  15. package/dist/BlockNoteEditor-VFWG6LXI.js.map +1 -0
  16. package/dist/JsonApiRequest-S3ICLM7B.mjs +20 -0
  17. package/dist/JsonApiRequest-S3ICLM7B.mjs.map +1 -0
  18. package/dist/JsonApiRequest-ZZLSP26T.js +20 -0
  19. package/dist/JsonApiRequest-ZZLSP26T.js.map +1 -0
  20. package/dist/atoms/index.d.mts +12 -0
  21. package/dist/atoms/index.d.ts +12 -0
  22. package/dist/atoms/index.js +9 -0
  23. package/dist/atoms/index.js.map +1 -0
  24. package/dist/atoms/index.mjs +9 -0
  25. package/dist/atoms/index.mjs.map +1 -0
  26. package/dist/breadcrumb.item.data.interface-CgB4_1EE.d.mts +6 -0
  27. package/dist/breadcrumb.item.data.interface-CgB4_1EE.d.ts +6 -0
  28. package/dist/chunk-2K3Q24UF.js +89 -0
  29. package/dist/chunk-2K3Q24UF.js.map +1 -0
  30. package/dist/chunk-2LM6LCJW.mjs +1091 -0
  31. package/dist/chunk-2LM6LCJW.mjs.map +1 -0
  32. package/dist/chunk-366S2JCC.mjs +31 -0
  33. package/dist/chunk-366S2JCC.mjs.map +1 -0
  34. package/dist/chunk-3FBCC4G3.js +8 -0
  35. package/dist/chunk-3FBCC4G3.js.map +1 -0
  36. package/dist/chunk-4HCRAOS5.js +28 -0
  37. package/dist/chunk-4HCRAOS5.js.map +1 -0
  38. package/dist/chunk-5W6AKZE6.mjs +131 -0
  39. package/dist/chunk-5W6AKZE6.mjs.map +1 -0
  40. package/dist/chunk-6GKHCVF6.js +98 -0
  41. package/dist/chunk-6GKHCVF6.js.map +1 -0
  42. package/dist/chunk-7QVYU63E.js +7 -0
  43. package/dist/chunk-7QVYU63E.js.map +1 -0
  44. package/dist/chunk-A3J3AAYM.mjs +97 -0
  45. package/dist/chunk-A3J3AAYM.mjs.map +1 -0
  46. package/dist/chunk-A5DDIABK.js +4209 -0
  47. package/dist/chunk-A5DDIABK.js.map +1 -0
  48. package/dist/chunk-AUXK7QSA.mjs +15 -0
  49. package/dist/chunk-AUXK7QSA.mjs.map +1 -0
  50. package/dist/chunk-AWONBQQP.js +97 -0
  51. package/dist/chunk-AWONBQQP.js.map +1 -0
  52. package/dist/chunk-BLWVZK6J.mjs +28 -0
  53. package/dist/chunk-BLWVZK6J.mjs.map +1 -0
  54. package/dist/chunk-C7C7VY4F.mjs +77 -0
  55. package/dist/chunk-C7C7VY4F.mjs.map +1 -0
  56. package/dist/chunk-CXQOWQSY.js +55 -0
  57. package/dist/chunk-CXQOWQSY.js.map +1 -0
  58. package/dist/chunk-DD3KISNB.mjs +98 -0
  59. package/dist/chunk-DD3KISNB.mjs.map +1 -0
  60. package/dist/chunk-DKKMWBP4.mjs +1 -0
  61. package/dist/chunk-DKKMWBP4.mjs.map +1 -0
  62. package/dist/chunk-DO2HLAZO.js +48 -0
  63. package/dist/chunk-DO2HLAZO.js.map +1 -0
  64. package/dist/chunk-DZXDB3K2.mjs +17 -0
  65. package/dist/chunk-DZXDB3K2.mjs.map +1 -0
  66. package/dist/chunk-ECDTZBYO.mjs +230 -0
  67. package/dist/chunk-ECDTZBYO.mjs.map +1 -0
  68. package/dist/chunk-EFJEWLRL.js +16 -0
  69. package/dist/chunk-EFJEWLRL.js.map +1 -0
  70. package/dist/chunk-FY4SXJGU.js +806 -0
  71. package/dist/chunk-FY4SXJGU.js.map +1 -0
  72. package/dist/chunk-GYWPEPOH.mjs +1354 -0
  73. package/dist/chunk-GYWPEPOH.mjs.map +1 -0
  74. package/dist/chunk-H6FMOA6B.js +1 -0
  75. package/dist/chunk-H6FMOA6B.js.map +1 -0
  76. package/dist/chunk-HR4H2FP7.mjs +89 -0
  77. package/dist/chunk-HR4H2FP7.mjs.map +1 -0
  78. package/dist/chunk-I2REI7OA.js +462 -0
  79. package/dist/chunk-I2REI7OA.js.map +1 -0
  80. package/dist/chunk-IBS6NI7D.js +77 -0
  81. package/dist/chunk-IBS6NI7D.js.map +1 -0
  82. package/dist/chunk-IWFGEPAA.mjs +4209 -0
  83. package/dist/chunk-IWFGEPAA.mjs.map +1 -0
  84. package/dist/chunk-J4Q36PMP.js +31 -0
  85. package/dist/chunk-J4Q36PMP.js.map +1 -0
  86. package/dist/chunk-JC3WJK65.js +1091 -0
  87. package/dist/chunk-JC3WJK65.js.map +1 -0
  88. package/dist/chunk-L6EQEAXU.mjs +462 -0
  89. package/dist/chunk-L6EQEAXU.mjs.map +1 -0
  90. package/dist/chunk-LXKSUWAV.js +15 -0
  91. package/dist/chunk-LXKSUWAV.js.map +1 -0
  92. package/dist/chunk-MFO27OHB.mjs +48 -0
  93. package/dist/chunk-MFO27OHB.mjs.map +1 -0
  94. package/dist/chunk-PAWJFY3S.mjs +7 -0
  95. package/dist/chunk-PAWJFY3S.mjs.map +1 -0
  96. package/dist/chunk-Q2N6SQYW.mjs +8 -0
  97. package/dist/chunk-Q2N6SQYW.mjs.map +1 -0
  98. package/dist/chunk-RAF7PNLG.js +131 -0
  99. package/dist/chunk-RAF7PNLG.js.map +1 -0
  100. package/dist/chunk-RUR22SVM.js +17 -0
  101. package/dist/chunk-RUR22SVM.js.map +1 -0
  102. package/dist/chunk-TEGF6ZWG.js +109 -0
  103. package/dist/chunk-TEGF6ZWG.js.map +1 -0
  104. package/dist/chunk-TMVHSY3Y.js +230 -0
  105. package/dist/chunk-TMVHSY3Y.js.map +1 -0
  106. package/dist/chunk-V2JJPI7N.js +1354 -0
  107. package/dist/chunk-V2JJPI7N.js.map +1 -0
  108. package/dist/chunk-WWWMJZEF.mjs +806 -0
  109. package/dist/chunk-WWWMJZEF.mjs.map +1 -0
  110. package/dist/chunk-X4BIHJ2B.mjs +55 -0
  111. package/dist/chunk-X4BIHJ2B.mjs.map +1 -0
  112. package/dist/chunk-YDVTFM7X.mjs +109 -0
  113. package/dist/chunk-YDVTFM7X.mjs.map +1 -0
  114. package/dist/chunk-YF5XQZDR.mjs +16 -0
  115. package/dist/chunk-YF5XQZDR.mjs.map +1 -0
  116. package/dist/client/index.d.mts +252 -0
  117. package/dist/client/index.d.ts +252 -0
  118. package/dist/client/index.js +275 -0
  119. package/dist/client/index.js.map +1 -0
  120. package/dist/client/index.mjs +274 -0
  121. package/dist/client/index.mjs.map +1 -0
  122. package/dist/components/index.d.mts +441 -0
  123. package/dist/components/index.d.ts +441 -0
  124. package/dist/components/index.js +2474 -0
  125. package/dist/components/index.js.map +1 -0
  126. package/dist/components/index.mjs +2474 -0
  127. package/dist/components/index.mjs.map +1 -0
  128. package/dist/config-hXufftVS.d.mts +34 -0
  129. package/dist/config-hXufftVS.d.ts +34 -0
  130. package/dist/content.interface-BhyAiOFq.d.ts +35 -0
  131. package/dist/content.interface-Dg2lt_An.d.mts +35 -0
  132. package/dist/contexts/index.d.mts +56 -0
  133. package/dist/contexts/index.d.ts +56 -0
  134. package/dist/contexts/index.js +21 -0
  135. package/dist/contexts/index.js.map +1 -0
  136. package/dist/contexts/index.mjs +21 -0
  137. package/dist/contexts/index.mjs.map +1 -0
  138. package/dist/core/index.d.mts +152 -0
  139. package/dist/core/index.d.ts +152 -0
  140. package/dist/core/index.js +47 -0
  141. package/dist/core/index.js.map +1 -0
  142. package/dist/core/index.mjs +47 -0
  143. package/dist/core/index.mjs.map +1 -0
  144. package/dist/d3.link.interface-QMdB22bC.d.mts +20 -0
  145. package/dist/d3.link.interface-QMdB22bC.d.ts +20 -0
  146. package/dist/features/index.d.mts +553 -0
  147. package/dist/features/index.d.ts +553 -0
  148. package/dist/features/index.js +94 -0
  149. package/dist/features/index.js.map +1 -0
  150. package/dist/features/index.mjs +94 -0
  151. package/dist/features/index.mjs.map +1 -0
  152. package/dist/hooks/index.d.mts +94 -0
  153. package/dist/hooks/index.d.ts +94 -0
  154. package/dist/hooks/index.js +43 -0
  155. package/dist/hooks/index.js.map +1 -0
  156. package/dist/hooks/index.mjs +43 -0
  157. package/dist/hooks/index.mjs.map +1 -0
  158. package/dist/index.d.mts +72 -0
  159. package/dist/index.d.ts +72 -0
  160. package/dist/index.js +84 -0
  161. package/dist/index.js.map +1 -0
  162. package/dist/index.mjs +84 -0
  163. package/dist/index.mjs.map +1 -0
  164. package/dist/interfaces/index.d.mts +3 -0
  165. package/dist/interfaces/index.d.ts +3 -0
  166. package/dist/interfaces/index.js +2 -0
  167. package/dist/interfaces/index.js.map +1 -0
  168. package/dist/interfaces/index.mjs +2 -0
  169. package/dist/interfaces/index.mjs.map +1 -0
  170. package/dist/permissions/index.d.mts +41 -0
  171. package/dist/permissions/index.d.ts +41 -0
  172. package/dist/permissions/index.js +14 -0
  173. package/dist/permissions/index.js.map +1 -0
  174. package/dist/permissions/index.mjs +14 -0
  175. package/dist/permissions/index.mjs.map +1 -0
  176. package/dist/request-7FE3LJLV.mjs +9 -0
  177. package/dist/request-7FE3LJLV.mjs.map +1 -0
  178. package/dist/request-FYMQK5CX.mjs +9 -0
  179. package/dist/request-FYMQK5CX.mjs.map +1 -0
  180. package/dist/request-QFS7NEIE.js +9 -0
  181. package/dist/request-QFS7NEIE.js.map +1 -0
  182. package/dist/request-ZYY6RI5X.js +9 -0
  183. package/dist/request-ZYY6RI5X.js.map +1 -0
  184. package/dist/roles/index.d.mts +33 -0
  185. package/dist/roles/index.d.ts +33 -0
  186. package/dist/roles/index.js +12 -0
  187. package/dist/roles/index.js.map +1 -0
  188. package/dist/roles/index.mjs +12 -0
  189. package/dist/roles/index.mjs.map +1 -0
  190. package/dist/server/index.d.mts +44 -0
  191. package/dist/server/index.d.ts +44 -0
  192. package/dist/server/index.js +29 -0
  193. package/dist/server/index.js.map +1 -0
  194. package/dist/server/index.mjs +29 -0
  195. package/dist/server/index.mjs.map +1 -0
  196. package/dist/shadcnui/index.d.mts +698 -0
  197. package/dist/shadcnui/index.d.ts +698 -0
  198. package/dist/shadcnui/index.js +466 -0
  199. package/dist/shadcnui/index.js.map +1 -0
  200. package/dist/shadcnui/index.mjs +465 -0
  201. package/dist/shadcnui/index.mjs.map +1 -0
  202. package/dist/token-IJSPOMW6.mjs +9 -0
  203. package/dist/token-IJSPOMW6.mjs.map +1 -0
  204. package/dist/token-MJMC26ON.js +9 -0
  205. package/dist/token-MJMC26ON.js.map +1 -0
  206. package/dist/token-UADJQ7VC.mjs +9 -0
  207. package/dist/token-UADJQ7VC.mjs.map +1 -0
  208. package/dist/token-UYE7CV6X.js +9 -0
  209. package/dist/token-UYE7CV6X.js.map +1 -0
  210. package/dist/types-DluCaP1I.d.ts +95 -0
  211. package/dist/types-lQVA8d_P.d.mts +95 -0
  212. package/dist/useDataListRetriever-futhx3OP.d.mts +32 -0
  213. package/dist/useDataListRetriever-futhx3OP.d.ts +32 -0
  214. package/dist/user.interface-CAsTIbuQ.d.mts +85 -0
  215. package/dist/user.interface-CbWqMaaU.d.ts +85 -0
  216. package/dist/utils/index.d.mts +201 -0
  217. package/dist/utils/index.d.ts +201 -0
  218. package/dist/utils/index.js +32 -0
  219. package/dist/utils/index.js.map +1 -0
  220. package/dist/utils/index.mjs +32 -0
  221. package/dist/utils/index.mjs.map +1 -0
  222. package/package.json +205 -0
@@ -0,0 +1,56 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React__default, { ReactNode } from 'react';
3
+ import { B as BreadcrumbItemData } from '../breadcrumb.item.data.interface-CgB4_1EE.mjs';
4
+ import { f as ModuleWithPermissions, A as Action } from '../types-lQVA8d_P.mjs';
5
+ import { U as UserInterface, C as CompanyInterface } from '../user.interface-CAsTIbuQ.mjs';
6
+ import '../ApiRequestDataTypeInterface-CUKFDBx2.mjs';
7
+ import '../ApiDataInterface-DPP8s46n.mjs';
8
+
9
+ interface SharedProviderProps {
10
+ children: ReactNode;
11
+ value: {
12
+ breadcrumbs: BreadcrumbItemData[];
13
+ title: {
14
+ type: string;
15
+ element?: string;
16
+ functions?: ReactNode;
17
+ };
18
+ };
19
+ }
20
+ declare const SharedProvider: ({ children, value }: SharedProviderProps) => react_jsx_runtime.JSX.Element;
21
+ declare const useSharedContext: () => {
22
+ breadcrumbs: BreadcrumbItemData[];
23
+ title: {
24
+ type: string | string[];
25
+ element?: string;
26
+ functions?: ReactNode;
27
+ };
28
+ };
29
+
30
+ interface CurrentUserContextType<T extends UserInterface = UserInterface> {
31
+ currentUser: T | null;
32
+ company: CompanyInterface | null;
33
+ setUser: (user?: T) => void;
34
+ hasPermissionToModule: <M extends ModuleWithPermissions>(params: {
35
+ module: M;
36
+ action: Action;
37
+ data?: any;
38
+ }) => boolean;
39
+ hasPermissionToModules: <M extends ModuleWithPermissions>(params: {
40
+ modules: M[];
41
+ action: Action;
42
+ data?: any;
43
+ }) => boolean;
44
+ hasPermissionToPath: (path: string) => boolean;
45
+ hasAccesToFeature: (featureIdentifier: string) => boolean;
46
+ matchUrlToModule: (prarms?: {
47
+ path: string;
48
+ }) => ModuleWithPermissions | undefined;
49
+ hasRole: (roleId: string) => boolean;
50
+ }
51
+ declare const CurrentUserProvider: ({ children }: {
52
+ children: React__default.ReactNode;
53
+ }) => react_jsx_runtime.JSX.Element;
54
+ declare function useCurrentUserContext<T extends UserInterface = UserInterface>(): CurrentUserContextType<T>;
55
+
56
+ export { type CurrentUserContextType, CurrentUserProvider, SharedProvider, useCurrentUserContext, useSharedContext };
@@ -0,0 +1,56 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React__default, { ReactNode } from 'react';
3
+ import { B as BreadcrumbItemData } from '../breadcrumb.item.data.interface-CgB4_1EE.js';
4
+ import { f as ModuleWithPermissions, A as Action } from '../types-DluCaP1I.js';
5
+ import { U as UserInterface, C as CompanyInterface } from '../user.interface-CbWqMaaU.js';
6
+ import '../ApiRequestDataTypeInterface-CUKFDBx2.js';
7
+ import '../ApiDataInterface-DPP8s46n.js';
8
+
9
+ interface SharedProviderProps {
10
+ children: ReactNode;
11
+ value: {
12
+ breadcrumbs: BreadcrumbItemData[];
13
+ title: {
14
+ type: string;
15
+ element?: string;
16
+ functions?: ReactNode;
17
+ };
18
+ };
19
+ }
20
+ declare const SharedProvider: ({ children, value }: SharedProviderProps) => react_jsx_runtime.JSX.Element;
21
+ declare const useSharedContext: () => {
22
+ breadcrumbs: BreadcrumbItemData[];
23
+ title: {
24
+ type: string | string[];
25
+ element?: string;
26
+ functions?: ReactNode;
27
+ };
28
+ };
29
+
30
+ interface CurrentUserContextType<T extends UserInterface = UserInterface> {
31
+ currentUser: T | null;
32
+ company: CompanyInterface | null;
33
+ setUser: (user?: T) => void;
34
+ hasPermissionToModule: <M extends ModuleWithPermissions>(params: {
35
+ module: M;
36
+ action: Action;
37
+ data?: any;
38
+ }) => boolean;
39
+ hasPermissionToModules: <M extends ModuleWithPermissions>(params: {
40
+ modules: M[];
41
+ action: Action;
42
+ data?: any;
43
+ }) => boolean;
44
+ hasPermissionToPath: (path: string) => boolean;
45
+ hasAccesToFeature: (featureIdentifier: string) => boolean;
46
+ matchUrlToModule: (prarms?: {
47
+ path: string;
48
+ }) => ModuleWithPermissions | undefined;
49
+ hasRole: (roleId: string) => boolean;
50
+ }
51
+ declare const CurrentUserProvider: ({ children }: {
52
+ children: React__default.ReactNode;
53
+ }) => react_jsx_runtime.JSX.Element;
54
+ declare function useCurrentUserContext<T extends UserInterface = UserInterface>(): CurrentUserContextType<T>;
55
+
56
+ export { type CurrentUserContextType, CurrentUserProvider, SharedProvider, useCurrentUserContext, useSharedContext };
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
3
+
4
+
5
+
6
+
7
+ var _chunkRAF7PNLGjs = require('../chunk-RAF7PNLG.js');
8
+ require('../chunk-6GKHCVF6.js');
9
+ require('../chunk-4HCRAOS5.js');
10
+ require('../chunk-I2REI7OA.js');
11
+ require('../chunk-TEGF6ZWG.js');
12
+ require('../chunk-J4Q36PMP.js');
13
+ require('../chunk-DO2HLAZO.js');
14
+ require('../chunk-7QVYU63E.js');
15
+
16
+
17
+
18
+
19
+
20
+ exports.CurrentUserProvider = _chunkRAF7PNLGjs.CurrentUserProvider; exports.SharedProvider = _chunkRAF7PNLGjs.SharedProvider; exports.useCurrentUserContext = _chunkRAF7PNLGjs.useCurrentUserContext; exports.useSharedContext = _chunkRAF7PNLGjs.useSharedContext;
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/carlo/Development/phlow2/packages/nextjs-jsonapi/dist/contexts/index.js"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACF,uDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,mQAAC","file":"/Users/carlo/Development/phlow2/packages/nextjs-jsonapi/dist/contexts/index.js"}
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import {
3
+ CurrentUserProvider,
4
+ SharedProvider,
5
+ useCurrentUserContext,
6
+ useSharedContext
7
+ } from "../chunk-5W6AKZE6.mjs";
8
+ import "../chunk-DD3KISNB.mjs";
9
+ import "../chunk-BLWVZK6J.mjs";
10
+ import "../chunk-L6EQEAXU.mjs";
11
+ import "../chunk-YDVTFM7X.mjs";
12
+ import "../chunk-366S2JCC.mjs";
13
+ import "../chunk-MFO27OHB.mjs";
14
+ import "../chunk-PAWJFY3S.mjs";
15
+ export {
16
+ CurrentUserProvider,
17
+ SharedProvider,
18
+ useCurrentUserContext,
19
+ useSharedContext
20
+ };
21
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,152 @@
1
+ import { A as ApiData } from '../ApiData-DPKNfY-9.mjs';
2
+ import { A as ApiDataInterface, J as JsonApiHydratedDataInterface } from '../ApiDataInterface-DPP8s46n.mjs';
3
+ import { A as ApiRequestDataTypeInterface, F as FieldSelector } from '../ApiRequestDataTypeInterface-CUKFDBx2.mjs';
4
+ export { G as GetterKeys, c as createJsonApiInclusion } from '../ApiRequestDataTypeInterface-CUKFDBx2.mjs';
5
+ import { A as ApiResponseInterface } from '../ApiResponseInterface-BHN5D9r5.mjs';
6
+ export { A as AbstractApiData, a as AbstractService, H as HttpMethod, N as NextRef, P as PreviousRef, S as SelfRef, g as getGlobalErrorHandler, s as setGlobalErrorHandler } from '../AbstractService-BKlpJA61.mjs';
7
+ import { f as ModuleWithPermissions } from '../types-lQVA8d_P.mjs';
8
+
9
+ declare class JsonApiDataFactory {
10
+ static create(classKey: ApiRequestDataTypeInterface, data: any): any;
11
+ }
12
+
13
+ declare class RehydrationFactory {
14
+ static rehydrate<T extends ApiDataInterface>(classKey: ApiRequestDataTypeInterface, data: JsonApiHydratedDataInterface): T;
15
+ static rehydrateList<T extends ApiDataInterface>(classKey: ApiRequestDataTypeInterface, data: JsonApiHydratedDataInterface[]): T[];
16
+ }
17
+
18
+ declare class DataClassRegistry {
19
+ private static _map;
20
+ static registerObjectClass(key: ApiRequestDataTypeInterface, classConstructor: {
21
+ new (): ApiDataInterface;
22
+ }): void;
23
+ static get(classKey: ApiRequestDataTypeInterface): {
24
+ new (): ApiDataInterface;
25
+ };
26
+ /**
27
+ * Bootstrap the registry with all modules.
28
+ * This is a convenience method for apps to register all their modules at once.
29
+ *
30
+ * @param modules - An object with module definitions (like the app's Modules class)
31
+ */
32
+ static bootstrap(modules: Record<string, ApiRequestDataTypeInterface>): void;
33
+ /**
34
+ * Clear all registered classes. Useful for testing.
35
+ */
36
+ static clear(): void;
37
+ }
38
+
39
+ /**
40
+ * Helper class to bootstrap the registry from a Modules-style class.
41
+ * This supports the pattern where modules are defined as static getters.
42
+ */
43
+ declare class ModuleRegistrar {
44
+ private static _isBootstrapped;
45
+ /**
46
+ * Bootstrap the registry from a Modules class.
47
+ * Automatically detects static getters and registers their models.
48
+ *
49
+ * @param modulesClass - The Modules class with static getters
50
+ */
51
+ static bootstrap<T extends object>(modulesClass: T): void;
52
+ /**
53
+ * Reset the bootstrapped state. Useful for testing.
54
+ */
55
+ static reset(): void;
56
+ }
57
+
58
+ interface FoundationModuleDefinitions {
59
+ S3: ModuleWithPermissions;
60
+ Auth: ModuleWithPermissions;
61
+ User: ModuleWithPermissions;
62
+ Author: ModuleWithPermissions;
63
+ Company: ModuleWithPermissions;
64
+ Role: ModuleWithPermissions;
65
+ Notification: ModuleWithPermissions;
66
+ Push: ModuleWithPermissions;
67
+ Feature: ModuleWithPermissions;
68
+ Module: ModuleWithPermissions;
69
+ Content: ModuleWithPermissions;
70
+ UserTopic: ModuleWithPermissions;
71
+ UserExpertise: ModuleWithPermissions;
72
+ }
73
+ interface AppModuleDefinitions {
74
+ }
75
+ type ModuleDefinitions = FoundationModuleDefinitions & AppModuleDefinitions;
76
+ declare class ModuleRegistryClass {
77
+ private _modules;
78
+ register<K extends string>(name: K, module: ApiRequestDataTypeInterface): void;
79
+ get<K extends keyof ModuleDefinitions>(name: K): ModuleDefinitions[K];
80
+ findByName(moduleName: string): ModuleWithPermissions;
81
+ }
82
+ declare const ModuleRegistry: ModuleRegistryClass;
83
+ declare const Modules: ModuleDefinitions & {
84
+ findByName: (name: string) => ModuleWithPermissions;
85
+ };
86
+
87
+ type EndpointQuery = {
88
+ endpoint: ApiRequestDataTypeInterface;
89
+ id?: string;
90
+ childEndpoint?: ApiRequestDataTypeInterface | string;
91
+ childId?: string;
92
+ additionalParams?: {
93
+ key: string;
94
+ value: string | string[];
95
+ }[];
96
+ };
97
+ declare class EndpointCreator {
98
+ private _endpoint;
99
+ constructor(params: {
100
+ endpoint: ApiRequestDataTypeInterface;
101
+ id?: string;
102
+ childEndpoint?: ApiRequestDataTypeInterface | string;
103
+ childId?: string;
104
+ additionalParams?: {
105
+ key: string;
106
+ value: string;
107
+ }[];
108
+ });
109
+ endpoint(value: ApiRequestDataTypeInterface): EndpointCreator;
110
+ id(value: string): EndpointCreator;
111
+ childEndpoint(value: ApiRequestDataTypeInterface | string): EndpointCreator;
112
+ childId(value: string): EndpointCreator;
113
+ set additionalParams(value: {
114
+ key: string;
115
+ value: string;
116
+ }[]);
117
+ addAdditionalParam(key: string, value: string | string[]): EndpointCreator;
118
+ limitToType(selectors: string[]): this;
119
+ limitToFields(selectors: FieldSelector<any>[]): this;
120
+ generate(): string;
121
+ }
122
+
123
+ /**
124
+ * Translates raw JSON:API data into typed objects.
125
+ * Does not require API response metadata.
126
+ */
127
+ declare function translateData<T extends ApiDataInterface>(params: {
128
+ classKey: ApiRequestDataTypeInterface;
129
+ data: any;
130
+ }): T | T[];
131
+ /**
132
+ * Translates a full API response into a typed ApiResponseInterface.
133
+ * Includes pagination support.
134
+ */
135
+ declare function translateResponse<T extends ApiDataInterface>(params: {
136
+ classKey: ApiRequestDataTypeInterface;
137
+ apiResponse: ApiData;
138
+ companyId?: string;
139
+ language: string;
140
+ paginationHandler?: (endpoint: string) => Promise<ApiResponseInterface>;
141
+ }): Promise<ApiResponseInterface>;
142
+
143
+ /**
144
+ * Rehydrate a single dehydrated object back into its typed class instance.
145
+ */
146
+ declare function rehydrate<T extends ApiDataInterface>(classKey: ApiRequestDataTypeInterface, data: JsonApiHydratedDataInterface): T;
147
+ /**
148
+ * Rehydrate a list of dehydrated objects back into typed class instances.
149
+ */
150
+ declare function rehydrateList<T extends ApiDataInterface>(classKey: ApiRequestDataTypeInterface, data: JsonApiHydratedDataInterface[]): T[];
151
+
152
+ export { ApiData, ApiDataInterface, ApiRequestDataTypeInterface, ApiResponseInterface, type AppModuleDefinitions, DataClassRegistry as DataClass, DataClassRegistry, EndpointCreator, type EndpointQuery, FieldSelector, type FoundationModuleDefinitions, JsonApiDataFactory, JsonApiHydratedDataInterface, type ModuleDefinitions, ModuleRegistrar, ModuleRegistry, Modules, RehydrationFactory, rehydrate, rehydrateList, translateData, translateResponse };
@@ -0,0 +1,152 @@
1
+ import { A as ApiData } from '../ApiData-DPKNfY-9.js';
2
+ import { A as ApiDataInterface, J as JsonApiHydratedDataInterface } from '../ApiDataInterface-DPP8s46n.js';
3
+ import { A as ApiRequestDataTypeInterface, F as FieldSelector } from '../ApiRequestDataTypeInterface-CUKFDBx2.js';
4
+ export { G as GetterKeys, c as createJsonApiInclusion } from '../ApiRequestDataTypeInterface-CUKFDBx2.js';
5
+ import { A as ApiResponseInterface } from '../ApiResponseInterface-DDI7QQPR.js';
6
+ export { A as AbstractApiData, a as AbstractService, H as HttpMethod, N as NextRef, P as PreviousRef, S as SelfRef, g as getGlobalErrorHandler, s as setGlobalErrorHandler } from '../AbstractService-D9eSVKNa.js';
7
+ import { f as ModuleWithPermissions } from '../types-DluCaP1I.js';
8
+
9
+ declare class JsonApiDataFactory {
10
+ static create(classKey: ApiRequestDataTypeInterface, data: any): any;
11
+ }
12
+
13
+ declare class RehydrationFactory {
14
+ static rehydrate<T extends ApiDataInterface>(classKey: ApiRequestDataTypeInterface, data: JsonApiHydratedDataInterface): T;
15
+ static rehydrateList<T extends ApiDataInterface>(classKey: ApiRequestDataTypeInterface, data: JsonApiHydratedDataInterface[]): T[];
16
+ }
17
+
18
+ declare class DataClassRegistry {
19
+ private static _map;
20
+ static registerObjectClass(key: ApiRequestDataTypeInterface, classConstructor: {
21
+ new (): ApiDataInterface;
22
+ }): void;
23
+ static get(classKey: ApiRequestDataTypeInterface): {
24
+ new (): ApiDataInterface;
25
+ };
26
+ /**
27
+ * Bootstrap the registry with all modules.
28
+ * This is a convenience method for apps to register all their modules at once.
29
+ *
30
+ * @param modules - An object with module definitions (like the app's Modules class)
31
+ */
32
+ static bootstrap(modules: Record<string, ApiRequestDataTypeInterface>): void;
33
+ /**
34
+ * Clear all registered classes. Useful for testing.
35
+ */
36
+ static clear(): void;
37
+ }
38
+
39
+ /**
40
+ * Helper class to bootstrap the registry from a Modules-style class.
41
+ * This supports the pattern where modules are defined as static getters.
42
+ */
43
+ declare class ModuleRegistrar {
44
+ private static _isBootstrapped;
45
+ /**
46
+ * Bootstrap the registry from a Modules class.
47
+ * Automatically detects static getters and registers their models.
48
+ *
49
+ * @param modulesClass - The Modules class with static getters
50
+ */
51
+ static bootstrap<T extends object>(modulesClass: T): void;
52
+ /**
53
+ * Reset the bootstrapped state. Useful for testing.
54
+ */
55
+ static reset(): void;
56
+ }
57
+
58
+ interface FoundationModuleDefinitions {
59
+ S3: ModuleWithPermissions;
60
+ Auth: ModuleWithPermissions;
61
+ User: ModuleWithPermissions;
62
+ Author: ModuleWithPermissions;
63
+ Company: ModuleWithPermissions;
64
+ Role: ModuleWithPermissions;
65
+ Notification: ModuleWithPermissions;
66
+ Push: ModuleWithPermissions;
67
+ Feature: ModuleWithPermissions;
68
+ Module: ModuleWithPermissions;
69
+ Content: ModuleWithPermissions;
70
+ UserTopic: ModuleWithPermissions;
71
+ UserExpertise: ModuleWithPermissions;
72
+ }
73
+ interface AppModuleDefinitions {
74
+ }
75
+ type ModuleDefinitions = FoundationModuleDefinitions & AppModuleDefinitions;
76
+ declare class ModuleRegistryClass {
77
+ private _modules;
78
+ register<K extends string>(name: K, module: ApiRequestDataTypeInterface): void;
79
+ get<K extends keyof ModuleDefinitions>(name: K): ModuleDefinitions[K];
80
+ findByName(moduleName: string): ModuleWithPermissions;
81
+ }
82
+ declare const ModuleRegistry: ModuleRegistryClass;
83
+ declare const Modules: ModuleDefinitions & {
84
+ findByName: (name: string) => ModuleWithPermissions;
85
+ };
86
+
87
+ type EndpointQuery = {
88
+ endpoint: ApiRequestDataTypeInterface;
89
+ id?: string;
90
+ childEndpoint?: ApiRequestDataTypeInterface | string;
91
+ childId?: string;
92
+ additionalParams?: {
93
+ key: string;
94
+ value: string | string[];
95
+ }[];
96
+ };
97
+ declare class EndpointCreator {
98
+ private _endpoint;
99
+ constructor(params: {
100
+ endpoint: ApiRequestDataTypeInterface;
101
+ id?: string;
102
+ childEndpoint?: ApiRequestDataTypeInterface | string;
103
+ childId?: string;
104
+ additionalParams?: {
105
+ key: string;
106
+ value: string;
107
+ }[];
108
+ });
109
+ endpoint(value: ApiRequestDataTypeInterface): EndpointCreator;
110
+ id(value: string): EndpointCreator;
111
+ childEndpoint(value: ApiRequestDataTypeInterface | string): EndpointCreator;
112
+ childId(value: string): EndpointCreator;
113
+ set additionalParams(value: {
114
+ key: string;
115
+ value: string;
116
+ }[]);
117
+ addAdditionalParam(key: string, value: string | string[]): EndpointCreator;
118
+ limitToType(selectors: string[]): this;
119
+ limitToFields(selectors: FieldSelector<any>[]): this;
120
+ generate(): string;
121
+ }
122
+
123
+ /**
124
+ * Translates raw JSON:API data into typed objects.
125
+ * Does not require API response metadata.
126
+ */
127
+ declare function translateData<T extends ApiDataInterface>(params: {
128
+ classKey: ApiRequestDataTypeInterface;
129
+ data: any;
130
+ }): T | T[];
131
+ /**
132
+ * Translates a full API response into a typed ApiResponseInterface.
133
+ * Includes pagination support.
134
+ */
135
+ declare function translateResponse<T extends ApiDataInterface>(params: {
136
+ classKey: ApiRequestDataTypeInterface;
137
+ apiResponse: ApiData;
138
+ companyId?: string;
139
+ language: string;
140
+ paginationHandler?: (endpoint: string) => Promise<ApiResponseInterface>;
141
+ }): Promise<ApiResponseInterface>;
142
+
143
+ /**
144
+ * Rehydrate a single dehydrated object back into its typed class instance.
145
+ */
146
+ declare function rehydrate<T extends ApiDataInterface>(classKey: ApiRequestDataTypeInterface, data: JsonApiHydratedDataInterface): T;
147
+ /**
148
+ * Rehydrate a list of dehydrated objects back into typed class instances.
149
+ */
150
+ declare function rehydrateList<T extends ApiDataInterface>(classKey: ApiRequestDataTypeInterface, data: JsonApiHydratedDataInterface[]): T[];
151
+
152
+ export { ApiData, ApiDataInterface, ApiRequestDataTypeInterface, ApiResponseInterface, type AppModuleDefinitions, DataClassRegistry as DataClass, DataClassRegistry, EndpointCreator, type EndpointQuery, FieldSelector, type FoundationModuleDefinitions, JsonApiDataFactory, JsonApiHydratedDataInterface, type ModuleDefinitions, ModuleRegistrar, ModuleRegistry, Modules, RehydrationFactory, rehydrate, rehydrateList, translateData, translateResponse };
@@ -0,0 +1,47 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+ var _chunkI2REI7OAjs = require('../chunk-I2REI7OA.js');
15
+
16
+
17
+
18
+
19
+ var _chunkTEGF6ZWGjs = require('../chunk-TEGF6ZWG.js');
20
+
21
+
22
+ var _chunkJ4Q36PMPjs = require('../chunk-J4Q36PMP.js');
23
+
24
+
25
+ var _chunkDO2HLAZOjs = require('../chunk-DO2HLAZO.js');
26
+ require('../chunk-7QVYU63E.js');
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+ exports.AbstractApiData = _chunkI2REI7OAjs.AbstractApiData; exports.AbstractService = _chunkI2REI7OAjs.AbstractService; exports.DataClass = _chunkDO2HLAZOjs.DataClassRegistry; exports.DataClassRegistry = _chunkDO2HLAZOjs.DataClassRegistry; exports.EndpointCreator = _chunkI2REI7OAjs.EndpointCreator; exports.HttpMethod = _chunkI2REI7OAjs.HttpMethod; exports.JsonApiDataFactory = _chunkTEGF6ZWGjs.JsonApiDataFactory; exports.ModuleRegistrar = _chunkI2REI7OAjs.ModuleRegistrar; exports.ModuleRegistry = _chunkI2REI7OAjs.ModuleRegistry; exports.Modules = _chunkI2REI7OAjs.Modules; exports.RehydrationFactory = _chunkJ4Q36PMPjs.RehydrationFactory; exports.createJsonApiInclusion = _chunkI2REI7OAjs.createJsonApiInclusion; exports.getGlobalErrorHandler = _chunkI2REI7OAjs.getGlobalErrorHandler; exports.rehydrate = _chunkI2REI7OAjs.rehydrate; exports.rehydrateList = _chunkI2REI7OAjs.rehydrateList; exports.setGlobalErrorHandler = _chunkI2REI7OAjs.setGlobalErrorHandler; exports.translateData = _chunkTEGF6ZWGjs.translateData; exports.translateResponse = _chunkTEGF6ZWGjs.translateResponse;
47
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/carlo/Development/phlow2/packages/nextjs-jsonapi/dist/core/index.js"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,uDAA6B;AAC7B;AACE;AACA;AACA;AACF,uDAA6B;AAC7B;AACE;AACF,uDAA6B;AAC7B;AACE;AACF,uDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,6jCAAC","file":"/Users/carlo/Development/phlow2/packages/nextjs-jsonapi/dist/core/index.js"}
@@ -0,0 +1,47 @@
1
+ import {
2
+ AbstractApiData,
3
+ AbstractService,
4
+ EndpointCreator,
5
+ HttpMethod,
6
+ ModuleRegistrar,
7
+ ModuleRegistry,
8
+ Modules,
9
+ createJsonApiInclusion,
10
+ getGlobalErrorHandler,
11
+ rehydrate,
12
+ rehydrateList,
13
+ setGlobalErrorHandler
14
+ } from "../chunk-L6EQEAXU.mjs";
15
+ import {
16
+ JsonApiDataFactory,
17
+ translateData,
18
+ translateResponse
19
+ } from "../chunk-YDVTFM7X.mjs";
20
+ import {
21
+ RehydrationFactory
22
+ } from "../chunk-366S2JCC.mjs";
23
+ import {
24
+ DataClassRegistry
25
+ } from "../chunk-MFO27OHB.mjs";
26
+ import "../chunk-PAWJFY3S.mjs";
27
+ export {
28
+ AbstractApiData,
29
+ AbstractService,
30
+ DataClassRegistry as DataClass,
31
+ DataClassRegistry,
32
+ EndpointCreator,
33
+ HttpMethod,
34
+ JsonApiDataFactory,
35
+ ModuleRegistrar,
36
+ ModuleRegistry,
37
+ Modules,
38
+ RehydrationFactory,
39
+ createJsonApiInclusion,
40
+ getGlobalErrorHandler,
41
+ rehydrate,
42
+ rehydrateList,
43
+ setGlobalErrorHandler,
44
+ translateData,
45
+ translateResponse
46
+ };
47
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,20 @@
1
+ import { LucideIcon } from 'lucide-react';
2
+
3
+ interface D3Node extends d3.SimulationNodeDatum {
4
+ id: string;
5
+ name: string;
6
+ instanceType: string;
7
+ relationshipType?: string;
8
+ isBrowsableNode?: boolean;
9
+ icon?: LucideIcon;
10
+ visible?: boolean;
11
+ washedOut?: boolean;
12
+ }
13
+
14
+ interface D3Link extends d3.SimulationLinkDatum<D3Node> {
15
+ source: string | D3Node;
16
+ target: string | D3Node;
17
+ relationshipType?: string;
18
+ }
19
+
20
+ export type { D3Link as D, D3Node as a };
@@ -0,0 +1,20 @@
1
+ import { LucideIcon } from 'lucide-react';
2
+
3
+ interface D3Node extends d3.SimulationNodeDatum {
4
+ id: string;
5
+ name: string;
6
+ instanceType: string;
7
+ relationshipType?: string;
8
+ isBrowsableNode?: boolean;
9
+ icon?: LucideIcon;
10
+ visible?: boolean;
11
+ washedOut?: boolean;
12
+ }
13
+
14
+ interface D3Link extends d3.SimulationLinkDatum<D3Node> {
15
+ source: string | D3Node;
16
+ target: string | D3Node;
17
+ relationshipType?: string;
18
+ }
19
+
20
+ export type { D3Link as D, D3Node as a };