@carlonicora/nextjs-jsonapi 3.5.9 → 3.5.10

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 (48) hide show
  1. package/dist/{BlockNoteEditor-5AQQQQY3.mjs → BlockNoteEditor-5MOYLQXK.mjs} +5 -5
  2. package/dist/{BlockNoteEditor-EWMWY4SK.js → BlockNoteEditor-5UUTCRSX.js} +20 -20
  3. package/dist/{BlockNoteEditor-EWMWY4SK.js.map → BlockNoteEditor-5UUTCRSX.js.map} +1 -1
  4. package/dist/{JsonApiRequest-ADNIGXTP.mjs → JsonApiRequest-7AEQWMLJ.mjs} +2 -2
  5. package/dist/JsonApiRequest-E4PZPH3N.js +26 -0
  6. package/dist/{JsonApiRequest-WWGSGV2I.js.map → JsonApiRequest-E4PZPH3N.js.map} +1 -1
  7. package/dist/billing/index.js +399 -399
  8. package/dist/billing/index.mjs +4 -4
  9. package/dist/{chunk-DK5ZOPVF.mjs → chunk-2D4MFVDV.mjs} +3 -3
  10. package/dist/{chunk-RVASYIQG.mjs → chunk-BMVA2IM5.mjs} +2 -5
  11. package/dist/chunk-BMVA2IM5.mjs.map +1 -0
  12. package/dist/{chunk-H37WRSBU.mjs → chunk-HDZ2BL6D.mjs} +5 -5
  13. package/dist/{chunk-W42MYR3Y.js → chunk-LU7DJ4QF.js} +2 -5
  14. package/dist/chunk-LU7DJ4QF.js.map +1 -0
  15. package/dist/{chunk-EJIWXCXI.js → chunk-P7XPRUQI.js} +773 -773
  16. package/dist/{chunk-EJIWXCXI.js.map → chunk-P7XPRUQI.js.map} +1 -1
  17. package/dist/{chunk-OE2WEAPU.mjs → chunk-T4PD3Z6G.mjs} +7 -7
  18. package/dist/{chunk-B2OB3HQO.js → chunk-TULJCLZA.js} +13 -13
  19. package/dist/{chunk-B2OB3HQO.js.map → chunk-TULJCLZA.js.map} +1 -1
  20. package/dist/{chunk-PGA2VC3S.js → chunk-UYLS3LJW.js} +32 -32
  21. package/dist/{chunk-PGA2VC3S.js.map → chunk-UYLS3LJW.js.map} +1 -1
  22. package/dist/client/index.js +5 -5
  23. package/dist/client/index.mjs +4 -4
  24. package/dist/components/index.js +5 -5
  25. package/dist/components/index.mjs +4 -4
  26. package/dist/contexts/index.js +5 -5
  27. package/dist/contexts/index.mjs +4 -4
  28. package/dist/core/index.js +3 -3
  29. package/dist/core/index.mjs +2 -2
  30. package/dist/features/help/index.js +38 -38
  31. package/dist/features/help/index.mjs +4 -4
  32. package/dist/features/tokenusage/index.js +102 -102
  33. package/dist/features/tokenusage/index.mjs +4 -4
  34. package/dist/index.js +4 -4
  35. package/dist/index.mjs +3 -3
  36. package/dist/server/index.js +14 -14
  37. package/dist/server/index.mjs +2 -2
  38. package/package.json +1 -1
  39. package/src/core/registry/DataClassRegistry.ts +7 -4
  40. package/src/core/registry/__tests__/DataClassRegistry.test.ts +14 -0
  41. package/dist/JsonApiRequest-WWGSGV2I.js +0 -26
  42. package/dist/chunk-RVASYIQG.mjs.map +0 -1
  43. package/dist/chunk-W42MYR3Y.js.map +0 -1
  44. /package/dist/{BlockNoteEditor-5AQQQQY3.mjs.map → BlockNoteEditor-5MOYLQXK.mjs.map} +0 -0
  45. /package/dist/{JsonApiRequest-ADNIGXTP.mjs.map → JsonApiRequest-7AEQWMLJ.mjs.map} +0 -0
  46. /package/dist/{chunk-DK5ZOPVF.mjs.map → chunk-2D4MFVDV.mjs.map} +0 -0
  47. /package/dist/{chunk-H37WRSBU.mjs.map → chunk-HDZ2BL6D.mjs.map} +0 -0
  48. /package/dist/{chunk-OE2WEAPU.mjs.map → chunk-T4PD3Z6G.mjs.map} +0 -0
@@ -20,7 +20,7 @@ import {
20
20
  useI18nLocale,
21
21
  useI18nRouter,
22
22
  useI18nTranslations
23
- } from "./chunk-DK5ZOPVF.mjs";
23
+ } from "./chunk-2D4MFVDV.mjs";
24
24
  import {
25
25
  AVAILABLE_OAUTH_SCOPES,
26
26
  AiConnectionService,
@@ -71,10 +71,10 @@ import {
71
71
  useIsMobile,
72
72
  validateItalianTaxCode,
73
73
  validatePartitaIva
74
- } from "./chunk-H37WRSBU.mjs";
74
+ } from "./chunk-HDZ2BL6D.mjs";
75
75
  import {
76
76
  ENV
77
- } from "./chunk-RVASYIQG.mjs";
77
+ } from "./chunk-BMVA2IM5.mjs";
78
78
  import {
79
79
  JsonApiContext
80
80
  } from "./chunk-VOXD3ZLY.mjs";
@@ -10343,7 +10343,7 @@ import { useRef as useRef17 } from "react";
10343
10343
  import dynamic from "next/dynamic";
10344
10344
  import React18 from "react";
10345
10345
  import { jsx as jsx89 } from "react/jsx-runtime";
10346
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-5AQQQQY3.mjs"), {
10346
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-5MOYLQXK.mjs"), {
10347
10347
  ssr: false
10348
10348
  });
10349
10349
  var BlockNoteEditorContainer = React18.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -16246,7 +16246,7 @@ function useJsonApiGet(params) {
16246
16246
  setLoading(true);
16247
16247
  setError(null);
16248
16248
  try {
16249
- const { JsonApiGet } = await import("./JsonApiRequest-ADNIGXTP.mjs");
16249
+ const { JsonApiGet } = await import("./JsonApiRequest-7AEQWMLJ.mjs");
16250
16250
  const language = navigator.language.split("-")[0] || "en";
16251
16251
  const apiResponse = await JsonApiGet({
16252
16252
  classKey: params.classKey,
@@ -16351,7 +16351,7 @@ function useJsonApiMutation(config) {
16351
16351
  setLoading(true);
16352
16352
  setError(null);
16353
16353
  try {
16354
- const { JsonApiPost, JsonApiPut, JsonApiPatch, JsonApiDelete } = await import("./JsonApiRequest-ADNIGXTP.mjs");
16354
+ const { JsonApiPost, JsonApiPut, JsonApiPatch, JsonApiDelete } = await import("./JsonApiRequest-7AEQWMLJ.mjs");
16355
16355
  const language = navigator.language.split("-")[0] || "en";
16356
16356
  let apiResponse;
16357
16357
  switch (config.method) {
@@ -25647,4 +25647,4 @@ export {
25647
25647
  useOAuthClients,
25648
25648
  useOAuthClient
25649
25649
  };
25650
- //# sourceMappingURL=chunk-OE2WEAPU.mjs.map
25650
+ //# sourceMappingURL=chunk-T4PD3Z6G.mjs.map
@@ -2,11 +2,11 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkPGA2VC3Sjs = require('./chunk-PGA2VC3S.js');
5
+ var _chunkUYLS3LJWjs = require('./chunk-UYLS3LJW.js');
6
6
 
7
7
 
8
8
 
9
- var _chunkW42MYR3Yjs = require('./chunk-W42MYR3Y.js');
9
+ var _chunkLU7DJ4QFjs = require('./chunk-LU7DJ4QF.js');
10
10
 
11
11
 
12
12
  var _chunk7QVYU63Ejs = require('./chunk-7QVYU63E.js');
@@ -35,7 +35,7 @@ function configureJsonApi(config) {
35
35
  _setStaticHelpContent(helpContent);
36
36
  }
37
37
  if (config.bootstrapper) {
38
- _chunkW42MYR3Yjs.setBootstrapper.call(void 0, config.bootstrapper);
38
+ _chunkLU7DJ4QFjs.setBootstrapper.call(void 0, config.bootstrapper);
39
39
  config.bootstrapper();
40
40
  }
41
41
  }
@@ -48,19 +48,19 @@ function getApiUrl() {
48
48
  if (_optionalChain([_clientConfig, 'optionalAccess', _ => _.apiUrl])) {
49
49
  return _clientConfig.apiUrl;
50
50
  }
51
- return _chunkW42MYR3Yjs.ENV.API_URL;
51
+ return _chunkLU7DJ4QFjs.ENV.API_URL;
52
52
  }
53
53
  _chunk7QVYU63Ejs.__name.call(void 0, getApiUrl, "getApiUrl");
54
54
  function getPublicApiUrl() {
55
- return _chunkW42MYR3Yjs.ENV.API_URL;
55
+ return _chunkLU7DJ4QFjs.ENV.API_URL;
56
56
  }
57
57
  _chunk7QVYU63Ejs.__name.call(void 0, getPublicApiUrl, "getPublicApiUrl");
58
58
  function getAppUrl() {
59
59
  if (_optionalChain([_clientConfig, 'optionalAccess', _2 => _2.appUrl])) {
60
60
  return _clientConfig.appUrl;
61
61
  }
62
- if (_chunkW42MYR3Yjs.ENV.APP_URL_ALTERNATE) {
63
- return _chunkW42MYR3Yjs.ENV.APP_URL_ALTERNATE;
62
+ if (_chunkLU7DJ4QFjs.ENV.APP_URL_ALTERNATE) {
63
+ return _chunkLU7DJ4QFjs.ENV.APP_URL_ALTERNATE;
64
64
  }
65
65
  if (typeof window !== "undefined") {
66
66
  return window.location.origin;
@@ -211,7 +211,7 @@ var COMPANY_ADMINISTRATOR_ROLE_ID = "2e1eee00-6cba-4506-9059-ccd24e4ea5b0";
211
211
  var ACTION_TYPES = ["read", "create", "update", "delete"];
212
212
 
213
213
  // src/features/rbac/data/RbacService.ts
214
- var RbacService = class extends _chunkPGA2VC3Sjs.AbstractService {
214
+ var RbacService = class extends _chunkUYLS3LJWjs.AbstractService {
215
215
  static {
216
216
  _chunk7QVYU63Ejs.__name.call(void 0, this, "RbacService");
217
217
  }
@@ -222,9 +222,9 @@ var RbacService = class extends _chunkPGA2VC3Sjs.AbstractService {
222
222
  * Dev-only endpoint — see class header.
223
223
  */
224
224
  static async fetchMatrix() {
225
- const endpoint = new (0, _chunkPGA2VC3Sjs.EndpointCreator)({ endpoint: _chunkPGA2VC3Sjs.Modules.RbacMatrix }).generate();
225
+ const endpoint = new (0, _chunkUYLS3LJWjs.EndpointCreator)({ endpoint: _chunkUYLS3LJWjs.Modules.RbacMatrix }).generate();
226
226
  const model = await this.callApi({
227
- type: _chunkPGA2VC3Sjs.Modules.RbacMatrix,
227
+ type: _chunkUYLS3LJWjs.Modules.RbacMatrix,
228
228
  method: "GET" /* GET */,
229
229
  endpoint
230
230
  });
@@ -244,9 +244,9 @@ var RbacService = class extends _chunkPGA2VC3Sjs.AbstractService {
244
244
  * Dev-only endpoint — see class header.
245
245
  */
246
246
  static async saveMatrix(args) {
247
- const endpoint = new (0, _chunkPGA2VC3Sjs.EndpointCreator)({ endpoint: _chunkPGA2VC3Sjs.Modules.RbacMatrix }).generate();
247
+ const endpoint = new (0, _chunkUYLS3LJWjs.EndpointCreator)({ endpoint: _chunkUYLS3LJWjs.Modules.RbacMatrix }).generate();
248
248
  const model = await this.callApi({
249
- type: _chunkPGA2VC3Sjs.Modules.RbacMatrix,
249
+ type: _chunkUYLS3LJWjs.Modules.RbacMatrix,
250
250
  method: "PUT" /* PUT */,
251
251
  endpoint,
252
252
  input: args
@@ -291,4 +291,4 @@ var RbacService = class extends _chunkPGA2VC3Sjs.AbstractService {
291
291
 
292
292
 
293
293
  exports._getStaticHelpContent = _getStaticHelpContent; exports.configureJsonApi = configureJsonApi; exports.configureClientConfig = configureClientConfig; exports.getApiUrl = getApiUrl; exports.getPublicApiUrl = getPublicApiUrl; exports.getAppUrl = getAppUrl; exports.getTrackablePages = getTrackablePages; exports.getStripePublishableKey = getStripePublishableKey; exports.configureI18n = configureI18n; exports.useI18nRouter = useI18nRouter; exports.useI18nTranslations = useI18nTranslations; exports.getI18nLink = getI18nLink; exports.useI18nLocale = useI18nLocale; exports.useI18nDateFnsLocale = useI18nDateFnsLocale; exports.configureLogin = configureLogin; exports.isDiscordAuthEnabled = isDiscordAuthEnabled; exports.isGoogleAuthEnabled = isGoogleAuthEnabled; exports.isInternalAuthEnabled = isInternalAuthEnabled; exports.isRegistrationAllowed = isRegistrationAllowed; exports.getRegistrationMode = getRegistrationMode; exports.configureRoles = configureRoles; exports.getRoleId = getRoleId; exports.isRolesConfigured = isRolesConfigured; exports.configureWaitlist = configureWaitlist; exports.getWaitlistConfig = getWaitlistConfig; exports.configureReferral = configureReferral; exports.getReferralConfig = getReferralConfig; exports.isReferralEnabled = isReferralEnabled; exports.COMPANY_ADMINISTRATOR_ROLE_ID = COMPANY_ADMINISTRATOR_ROLE_ID; exports.ACTION_TYPES = ACTION_TYPES; exports.RbacService = RbacService;
294
- //# sourceMappingURL=chunk-B2OB3HQO.js.map
294
+ //# sourceMappingURL=chunk-TULJCLZA.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/chunk-B2OB3HQO.js","../src/core/registry/helpStore.ts","../src/client/config.ts","../src/i18n/config.ts","../src/login/config.ts","../src/roles/config.ts","../src/features/waitlist/config/waitlist.config.ts","../src/features/referral/config.ts","../src/features/rbac/data/RbacTypes.ts","../src/features/rbac/data/RbacService.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACF,sDAA4B;AAC5B;AACE;AACA;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACA;ACFA,IAAM,iBAAA,kBAAmB,MAAA,CAAO,GAAA,CAAI,4BAA4B,CAAA;AAEhE,IAAM,YAAA,EAAc,UAAA;AAIpB,GAAA,CAAI,WAAA,CAAY,gBAAgB,EAAA,IAAM,KAAA,CAAA,EAAW;AAC/C,EAAA,WAAA,CAAY,gBAAgB,EAAA,EAAI,IAAA;AAClC;AAEO,SAAS,qBAAA,CAAsB,GAAA,EAA2B;AAC/D,EAAA,WAAA,CAAY,gBAAgB,EAAA,EAAI,GAAA;AAClC;AAFgB,qCAAA,qBAAA,EAAA,uBAAA,CAAA;AAIT,SAAS,qBAAA,CAAA,EAA+C;AAC7D,EAAA,wBAAQ,WAAA,CAAY,gBAAgB,CAAA,UAAkB,MAAA;AACxD;AAFgB,qCAAA,qBAAA,EAAA,uBAAA,CAAA;ADEhB;AACA;AEnBA,IAAI,cAAA,EAOO,IAAA;AAOJ,SAAS,gBAAA,CAAiB,MAAA,EAQxB;AACP,EAAA,MAAM,EAAE,WAAA,EAAa,GAAG,KAAK,EAAA,EAAI,MAAA;AACjC,EAAA,cAAA,EAAgB,IAAA;AAChB,EAAA,GAAA,CAAI,WAAA,EAAa;AACf,IAAA,qBAAA,CAAsB,WAAW,CAAA;AAAA,EACnC;AAEA,EAAA,GAAA,CAAI,MAAA,CAAO,YAAA,EAAc;AACvB,IAAA,8CAAA,MAAgB,CAAO,YAAY,CAAA;AACnC,IAAA,MAAA,CAAO,YAAA,CAAa,CAAA;AAAA,EACtB;AACF;AAnBgB,qCAAA,gBAAA,EAAA,kBAAA,CAAA;AAyBT,SAAS,qBAAA,CAA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A;AAED,IAAA,OAAO;AAAA,MACL,YAAA,mBAAc,KAAA,CAAM,YAAA,UAAgB,GAAA;AAAA,MACpC,IAAA,mBAAM,KAAA,CAAM,IAAA,UAAQ;AAAA,IACtB,CAAA;AAAA,EACF;AACF,CAAA;ATyLA;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,g5CAAC","file":"/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/chunk-B2OB3HQO.js","sourcesContent":[null,"/**\n * Centralized help-content store accessible from client and server contexts.\n * Uses a globalThis Symbol key to persist across HMR/Turbopack reloads and to\n * bridge between the client-side `configureJsonApi` (in `client/config.ts`)\n * and the HelpProvider context. Holds the brand-only HelpContentConfig.\n *\n * NO external dependencies to avoid circular imports.\n *\n * Pattern mirrors `bootstrapStore.ts`.\n */\n\nconst HELP_CONTENT_KEY = Symbol.for(\"nextjs-jsonapi:helpContent\");\n\nconst globalStore = globalThis as unknown as {\n [HELP_CONTENT_KEY]?: unknown | null;\n};\n\nif (globalStore[HELP_CONTENT_KEY] === undefined) {\n globalStore[HELP_CONTENT_KEY] = null;\n}\n\nexport function _setStaticHelpContent(cfg: unknown | null): void {\n globalStore[HELP_CONTENT_KEY] = cfg;\n}\n\nexport function _getStaticHelpContent<T = unknown>(): T | null {\n return (globalStore[HELP_CONTENT_KEY] as T | null) ?? null;\n}\n","\"use client\";\n\nimport { ModuleWithPermissions } from \"../permissions/types\";\nimport { ENV } from \"../core/env\";\nimport { setBootstrapper } from \"../core/registry/bootstrapStore\";\nimport { _setStaticHelpContent } from \"../core/registry/helpStore\";\nimport type { HelpContentConfig } from \"../features/help/interfaces/help-content-config.interface\";\n\n// Config storage for client-side contexts\nlet _clientConfig: {\n apiUrl: string;\n appUrl?: string;\n trackablePages?: ModuleWithPermissions[];\n bootstrapper?: () => void;\n additionalHeaders?: Record<string, string>;\n stripePublishableKey?: string;\n} | null = null;\n\n/**\n * Configure the JSON:API client. This is the main configuration function.\n * This is typically called during app initialization.\n * @param config.helpContent - Optional help-content config (brand only). Forwarded to the help feature's globalThis-backed store; not stored on the client config.\n */\nexport function configureJsonApi(config: {\n apiUrl: string;\n appUrl?: string;\n trackablePages?: ModuleWithPermissions[];\n bootstrapper?: () => void;\n additionalHeaders?: Record<string, string>;\n stripePublishableKey?: string;\n helpContent?: HelpContentConfig;\n}): void {\n const { helpContent, ...rest } = config;\n _clientConfig = rest;\n if (helpContent) {\n _setStaticHelpContent(helpContent);\n }\n // Register and call bootstrapper to register all modules\n if (config.bootstrapper) {\n setBootstrapper(config.bootstrapper);\n config.bootstrapper();\n }\n}\n\n/**\n * Configure the client config. This is typically called during app initialization.\n * @deprecated Use configureJsonApi instead\n */\nexport function configureClientConfig(config: {\n apiUrl: string;\n appUrl?: string;\n trackablePages?: ModuleWithPermissions[];\n}): void {\n _clientConfig = config;\n}\n\n/**\n * Get the configured API URL.\n *\n * This may resolve to an internal/private host (e.g. a docker-network\n * hostname) when configured to do so for SSR fetches. Do NOT use this for\n * URLs that are rendered into HTML and followed by the browser — use\n * `getPublicApiUrl()` instead.\n */\nexport function getApiUrl(): string {\n if (_clientConfig?.apiUrl) {\n return _clientConfig.apiUrl;\n }\n return ENV.API_URL;\n}\n\n/**\n * Get the public-facing API URL.\n *\n * Always sourced from `NEXT_PUBLIC_API_URL` so it is identical on server\n * and client, and reachable from the user's browser. Use for any URL that\n * gets rendered into HTML the browser will navigate to (links, redirects,\n * OAuth hrefs).\n */\nexport function getPublicApiUrl(): string {\n return ENV.API_URL;\n}\n\n/**\n * Get the configured app URL.\n */\nexport function getAppUrl(): string {\n if (_clientConfig?.appUrl) {\n return _clientConfig.appUrl;\n }\n if (ENV.APP_URL_ALTERNATE) {\n return ENV.APP_URL_ALTERNATE;\n }\n if (typeof window !== \"undefined\") {\n return window.location.origin;\n }\n return \"\";\n}\n\n/**\n * Get the configured trackable pages.\n */\nexport function getTrackablePages(): ModuleWithPermissions[] {\n return _clientConfig?.trackablePages ?? [];\n}\n\n/**\n * Get the configured Stripe publishable key.\n */\nexport function getStripePublishableKey(): string | undefined {\n return _clientConfig?.stripePublishableKey;\n}\n","import { ComponentType } from \"react\";\n\n// Types for injected hooks\nexport interface I18nRouter {\n push: (href: string) => void;\n replace: (href: string) => void;\n back: () => void;\n forward: () => void;\n refresh: () => void;\n prefetch: (href: string) => void;\n}\n\nexport type UseRouterHook = () => I18nRouter;\nexport type UseTranslationsHook = (namespace?: string) => (key: string, values?: Record<string, any>) => string;\nexport type UseLocaleHook = () => string;\n\nexport type UseDateFnsLocaleHook = () => any; // date-fns Locale type\nexport type LinkComponent = ComponentType<{ href: string; children: React.ReactNode; [key: string]: any }>;\n\nexport interface I18nConfig {\n useRouter: UseRouterHook;\n useTranslations: UseTranslationsHook;\n useLocale?: UseLocaleHook;\n useDateFnsLocale?: UseDateFnsLocaleHook;\n Link: LinkComponent;\n usePathname: () => string;\n}\n\n// Private storage\nlet _config: I18nConfig | null = null;\n\n// Configuration function (called by app at startup)\nexport function configureI18n(config: I18nConfig): void {\n _config = config;\n}\n\n// Hooks for library components to use\nexport function useI18nRouter(): I18nRouter {\n if (!_config?.useRouter) {\n throw new Error(\"i18n not configured. Call configureI18n() at app startup.\");\n }\n return _config.useRouter();\n}\n\nexport function useI18nTranslations(namespace?: string): (key: string, values?: Record<string, any>) => string {\n if (!_config?.useTranslations) {\n // Fallback: return key as-is (safe for server/client)\n return (key: string) => key;\n }\n return _config.useTranslations(namespace);\n}\n\nexport function getI18nLink(): LinkComponent {\n if (!_config?.Link) {\n throw new Error(\"i18n not configured. Call configureI18n() at app startup.\");\n }\n return _config.Link;\n}\n\nexport function useI18nLocale(): string {\n if (_config?.useLocale) {\n return _config.useLocale();\n }\n // Fallback to English (safe for server/client)\n return \"en\";\n}\n\nexport function useI18nDateFnsLocale(): any {\n if (_config?.useDateFnsLocale) {\n return _config.useDateFnsLocale();\n }\n // Fallback to undefined (Calendar will use default)\n return undefined;\n}\n","let _useDiscordAuth: boolean = false;\nlet _useGoogleAuth: boolean = false;\nlet _useInternalAuth: boolean = true;\nlet _allowRegistration: boolean = true;\nlet _registrationMode: \"open\" | \"closed\" | \"waitlist\" = \"open\";\n\nexport type RegistrationMode = \"open\" | \"closed\" | \"waitlist\";\n\nexport interface LoginConfig {\n discordClientId?: string;\n googleClientId?: string;\n useInternalAuth?: boolean;\n allowRegistration?: boolean;\n registrationMode?: RegistrationMode;\n}\n\nexport function configureLogin(params: LoginConfig): void {\n _useDiscordAuth = !!params.discordClientId;\n _useGoogleAuth = !!params.googleClientId;\n _useInternalAuth = params.useInternalAuth ?? true;\n _allowRegistration = params.allowRegistration ?? true;\n _registrationMode = params.registrationMode ?? \"open\";\n}\n\nexport function isDiscordAuthEnabled(): boolean {\n return _useDiscordAuth;\n}\n\nexport function isGoogleAuthEnabled(): boolean {\n return _useGoogleAuth;\n}\n\nexport function isInternalAuthEnabled(): boolean {\n return _useInternalAuth;\n}\n\nexport function isRegistrationAllowed(): boolean {\n return _allowRegistration;\n}\n\nexport function getRegistrationMode(): RegistrationMode {\n return _registrationMode;\n}\n","/**\n * Role ID configuration interface\n * Apps provide their role IDs via configureRoles()\n */\nexport interface RoleIdConfig {\n Administrator: string;\n CompanyAdministrator: string;\n [key: string]: string; // Allow additional roles\n}\n\n// Private storage for the injected role IDs\nlet _roleId: RoleIdConfig | null = null;\n\n/**\n * Configure role IDs for the library\n * Call this at app startup to provide role ID constants\n *\n * @example\n * ```typescript\n * import { configureRoles } from \"@carlonicora/nextjs-jsonapi\";\n * import { RoleId } from \"@phlow/shared\";\n *\n * configureRoles(RoleId);\n * ```\n */\nexport function configureRoles(roleId: RoleIdConfig): void {\n _roleId = roleId;\n}\n\n/**\n * Get configured role IDs\n * @throws Error if roles not configured\n */\nexport function getRoleId(): RoleIdConfig {\n if (!_roleId) {\n throw new Error(\"Roles not configured. Call configureRoles() at app startup.\");\n }\n return _roleId;\n}\n\n/**\n * Check if roles have been configured\n */\nexport function isRolesConfigured(): boolean {\n return _roleId !== null;\n}\n","export type QuestionnaireFieldType = \"text\" | \"textarea\" | \"select\" | \"checkbox\";\n\nexport interface QuestionnaireOption {\n value: string;\n label: string;\n description?: string;\n}\n\nexport interface QuestionnaireField {\n id: string;\n type: QuestionnaireFieldType;\n label: string;\n description?: string;\n placeholder?: string;\n required?: boolean;\n options?: QuestionnaireOption[];\n}\n\nexport interface WaitlistConfig {\n questionnaire?: QuestionnaireField[];\n heroTitle?: string;\n heroSubtitle?: string;\n heroDescription?: string;\n benefits?: string[];\n}\n\nlet _waitlistConfig: WaitlistConfig = {};\n\nexport function configureWaitlist(config: WaitlistConfig): void {\n _waitlistConfig = config;\n}\n\nexport function getWaitlistConfig(): WaitlistConfig {\n return _waitlistConfig;\n}\n","/**\n * Configuration interface for frontend referral feature.\n */\nexport interface ReferralConfig {\n /**\n * Whether the referral feature is enabled.\n * When false, components render nothing and hooks return null.\n * @default false\n */\n enabled?: boolean;\n\n /**\n * Name of the cookie used to store referral codes.\n * @default \"referral_code\"\n */\n cookieName?: string;\n\n /**\n * Number of days the referral cookie is valid.\n * @default 30\n */\n cookieDays?: number;\n\n /**\n * Query parameter name for referral code in URL.\n * @default \"ref\"\n */\n urlParamName?: string;\n\n /**\n * Base URL for referral links.\n * @default window.location.origin (client-side only)\n */\n referralUrlBase?: string;\n\n /**\n * Path to append to base URL for referral links.\n * @default \"/\"\n */\n referralPath?: string;\n}\n\n/**\n * Default configuration values\n */\nexport const DEFAULT_REFERRAL_CONFIG: Required<ReferralConfig> = {\n enabled: false,\n cookieName: \"referral_code\",\n cookieDays: 30,\n urlParamName: \"ref\",\n referralUrlBase: \"\",\n referralPath: \"/\",\n};\n\n// Private storage for configuration\nlet _referralConfig: Required<ReferralConfig> = { ...DEFAULT_REFERRAL_CONFIG };\n\n/**\n * Configure referral feature settings.\n * Call this at app startup to enable and configure referral functionality.\n *\n * @example\n * ```typescript\n * import { configureReferral } from \"@carlonicora/nextjs-jsonapi\";\n *\n * configureReferral({\n * enabled: process.env.NEXT_PUBLIC_REFERRAL_ENABLED === 'true',\n * cookieDays: 30,\n * });\n * ```\n */\nexport function configureReferral(config: ReferralConfig): void {\n _referralConfig = { ...DEFAULT_REFERRAL_CONFIG, ...config };\n}\n\n/**\n * Get the current referral configuration.\n * @internal\n */\nexport function getReferralConfig(): Required<ReferralConfig> {\n return _referralConfig;\n}\n\n/**\n * Check if referral feature is enabled.\n */\nexport function isReferralEnabled(): boolean {\n return _referralConfig.enabled;\n}\n","export const COMPANY_ADMINISTRATOR_ROLE_ID = \"2e1eee00-6cba-4506-9059-ccd24e4ea5b0\";\n\nexport type PermissionValue = boolean | string;\n\nexport type ActionType = \"read\" | \"create\" | \"update\" | \"delete\";\n\nexport const ACTION_TYPES: ActionType[] = [\"read\", \"create\", \"update\", \"delete\"];\n\n/** The permissions object shape used by both Module and PermissionMapping entities */\nexport type PermissionsMap = {\n create?: PermissionValue;\n read?: PermissionValue;\n update?: PermissionValue;\n delete?: PermissionValue;\n};\n\n/**\n * Declarative-RBAC matrix types.\n *\n * Mirror of the library types defined in\n * `packages/nestjs-neo4jsonapi/src/foundations/rbac/dsl/types.ts`.\n * Frontend does not import from backend, so the shape is redefined here.\n *\n * A `PermToken` represents a single permission entry:\n * - `scope: true` → unconditional (e.g. full read of the module)\n * - `scope: false` → nothing (rarely used, mostly a placeholder)\n * - `scope: \"path\"` → scoped by relationship path (e.g. \"orders.account\")\n */\nexport type PermToken = { action: string; scope: boolean | string };\n\n/**\n * A per-module block of the matrix. Always has a `default` row (permissions\n * granted to every role). Additional keys are role IDs → role-specific\n * permission tokens that are unioned with `default` to produce the effective\n * permissions for that role in that module.\n */\nexport type RbacModuleBlock = { default: PermToken[] } & Record<string, PermToken[]>;\n\n/**\n * The full RBAC matrix as served by the dev endpoint `GET /_dev/rbac/matrix`.\n * Keys are module IDs; values are module blocks.\n */\nexport type RbacMatrix = Record<string, RbacModuleBlock>;\n","import { AbstractService, EndpointCreator, HttpMethod, Modules } from \"../../../core\";\nimport type { RbacMatrixModel } from \"./RbacMatrixModel\";\nimport type { RbacMatrix } from \"./RbacTypes\";\n\n/**\n * RbacService — fetches RBAC configuration for the admin UI.\n *\n * Declarative-matrix methods (`fetchMatrix`, `saveMatrix`) talk to the\n * dev-only endpoints added in\n * `packages/nestjs-neo4jsonapi/.../rbac-dev.controller.ts`. The controller\n * speaks JSON:API (singleton resource with `type: \"rbac-matrix\"`, `id:\n * \"singleton\"`), so these methods go through the standard `callApi()`\n * pipeline like every other service in the codebase.\n *\n * The backend only registers these routes when `devMode` is enabled on\n * `RbacModule.register` (see `apps/api/src/features/features.modules.ts`).\n * In production the routes return 404; callers should guard with a dev-mode\n * check.\n */\nexport class RbacService extends AbstractService {\n /**\n * Fetch the current RBAC matrix plus each module's known BFS relationship\n * paths (used by the permission picker as scope suggestions).\n *\n * Dev-only endpoint — see class header.\n */\n static async fetchMatrix(): Promise<{\n matrix: RbacMatrix;\n modulePaths: Record<string, readonly string[]>;\n }> {\n const endpoint = new EndpointCreator({ endpoint: Modules.RbacMatrix }).generate();\n\n const model = await this.callApi<RbacMatrixModel>({\n type: Modules.RbacMatrix,\n method: HttpMethod.GET,\n endpoint,\n });\n\n return {\n matrix: model.matrix ?? {},\n modulePaths: model.modulePaths ?? {},\n };\n }\n\n /**\n * Persist a matrix back to the declarative `permissions.ts` file.\n *\n * The backend serializes the matrix to formatted TypeScript using the\n * provided `roleNames` / `moduleNames` lookup tables (so the emitted file\n * references `RoleId.X` / `ModuleId.X` rather than raw UUIDs) and writes\n * it to `outputPath` (absolute, or relative to the repo root).\n *\n * Dev-only endpoint — see class header.\n */\n static async saveMatrix(args: {\n matrix: RbacMatrix;\n roleNames: Record<string, string>;\n moduleNames: Record<string, string>;\n outputPath: string;\n }): Promise<{ bytesWritten: number; path: string }> {\n const endpoint = new EndpointCreator({ endpoint: Modules.RbacMatrix }).generate();\n\n const model = await this.callApi<RbacMatrixModel>({\n type: Modules.RbacMatrix,\n method: HttpMethod.PUT,\n endpoint,\n input: args,\n });\n\n return {\n bytesWritten: model.bytesWritten ?? 0,\n path: model.path ?? \"\",\n };\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/chunk-TULJCLZA.js","../src/core/registry/helpStore.ts","../src/client/config.ts","../src/i18n/config.ts","../src/login/config.ts","../src/roles/config.ts","../src/features/waitlist/config/waitlist.config.ts","../src/features/referral/config.ts","../src/features/rbac/data/RbacTypes.ts","../src/features/rbac/data/RbacService.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACF,sDAA4B;AAC5B;AACE;AACA;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACA;ACFA,IAAM,iBAAA,kBAAmB,MAAA,CAAO,GAAA,CAAI,4BAA4B,CAAA;AAEhE,IAAM,YAAA,EAAc,UAAA;AAIpB,GAAA,CAAI,WAAA,CAAY,gBAAgB,EAAA,IAAM,KAAA,CAAA,EAAW;AAC/C,EAAA,WAAA,CAAY,gBAAgB,EAAA,EAAI,IAAA;AAClC;AAEO,SAAS,qBAAA,CAAsB,GAAA,EAA2B;AAC/D,EAAA,WAAA,CAAY,gBAAgB,EAAA,EAAI,GAAA;AAClC;AAFgB,qCAAA,qBAAA,EAAA,uBAAA,CAAA;AAIT,SAAS,qBAAA,CAAA,EAA+C;AAC7D,EAAA,wBAAQ,WAAA,CAAY,gBAAgB,CAAA,UAAkB,MAAA;AACxD;AAFgB,qCAAA,qBAAA,EAAA,uBAAA,CAAA;ADEhB;AACA;AEnBA,IAAI,cAAA,EAOO,IAAA;AAOJ,SAAS,gBAAA,CAAiB,MAAA,EAQxB;AACP,EAAA,MAAM,EAAE,WAAA,EAAa,GAAG,KAAK,EAAA,EAAI,MAAA;AACjC,EAAA,cAAA,EAAgB,IAAA;AAChB,EAAA,GAAA,CAAI,WAAA,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,EAAE,QAAA,EAAU,wBAAA,CAAQ,WAAW,CAAC,CAAA,CAAE,QAAA,CAAS,CAAA;AAEhF,IAAA,MAAM,MAAA,EAAQ,MAAM,IAAA,CAAK,OAAA,CAAyB;AAAA,MAChD,IAAA,EAAM,wBAAA,CAAQ,UAAA;AAAA,MACd,MAAA,EAAA,eAAA;AAAA,MACA,QAAA;AAAA,MACA,KAAA,EAAO;AAAA,IACT,CAAC,CAAA;AAED,IAAA,OAAO;AAAA,MACL,YAAA,mBAAc,KAAA,CAAM,YAAA,UAAgB,GAAA;AAAA,MACpC,IAAA,mBAAM,KAAA,CAAM,IAAA,UAAQ;AAAA,IACtB,CAAA;AAAA,EACF;AACF,CAAA;ATyLA;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,g5CAAC","file":"/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/chunk-TULJCLZA.js","sourcesContent":[null,"/**\n * Centralized help-content store accessible from client and server contexts.\n * Uses a globalThis Symbol key to persist across HMR/Turbopack reloads and to\n * bridge between the client-side `configureJsonApi` (in `client/config.ts`)\n * and the HelpProvider context. Holds the brand-only HelpContentConfig.\n *\n * NO external dependencies to avoid circular imports.\n *\n * Pattern mirrors `bootstrapStore.ts`.\n */\n\nconst HELP_CONTENT_KEY = Symbol.for(\"nextjs-jsonapi:helpContent\");\n\nconst globalStore = globalThis as unknown as {\n [HELP_CONTENT_KEY]?: unknown | null;\n};\n\nif (globalStore[HELP_CONTENT_KEY] === undefined) {\n globalStore[HELP_CONTENT_KEY] = null;\n}\n\nexport function _setStaticHelpContent(cfg: unknown | null): void {\n globalStore[HELP_CONTENT_KEY] = cfg;\n}\n\nexport function _getStaticHelpContent<T = unknown>(): T | null {\n return (globalStore[HELP_CONTENT_KEY] as T | null) ?? null;\n}\n","\"use client\";\n\nimport { ModuleWithPermissions } from \"../permissions/types\";\nimport { ENV } from \"../core/env\";\nimport { setBootstrapper } from \"../core/registry/bootstrapStore\";\nimport { _setStaticHelpContent } from \"../core/registry/helpStore\";\nimport type { HelpContentConfig } from \"../features/help/interfaces/help-content-config.interface\";\n\n// Config storage for client-side contexts\nlet _clientConfig: {\n apiUrl: string;\n appUrl?: string;\n trackablePages?: ModuleWithPermissions[];\n bootstrapper?: () => void;\n additionalHeaders?: Record<string, string>;\n stripePublishableKey?: string;\n} | null = null;\n\n/**\n * Configure the JSON:API client. This is the main configuration function.\n * This is typically called during app initialization.\n * @param config.helpContent - Optional help-content config (brand only). Forwarded to the help feature's globalThis-backed store; not stored on the client config.\n */\nexport function configureJsonApi(config: {\n apiUrl: string;\n appUrl?: string;\n trackablePages?: ModuleWithPermissions[];\n bootstrapper?: () => void;\n additionalHeaders?: Record<string, string>;\n stripePublishableKey?: string;\n helpContent?: HelpContentConfig;\n}): void {\n const { helpContent, ...rest } = config;\n _clientConfig = rest;\n if (helpContent) {\n _setStaticHelpContent(helpContent);\n }\n // Register and call bootstrapper to register all modules\n if (config.bootstrapper) {\n setBootstrapper(config.bootstrapper);\n config.bootstrapper();\n }\n}\n\n/**\n * Configure the client config. This is typically called during app initialization.\n * @deprecated Use configureJsonApi instead\n */\nexport function configureClientConfig(config: {\n apiUrl: string;\n appUrl?: string;\n trackablePages?: ModuleWithPermissions[];\n}): void {\n _clientConfig = config;\n}\n\n/**\n * Get the configured API URL.\n *\n * This may resolve to an internal/private host (e.g. a docker-network\n * hostname) when configured to do so for SSR fetches. Do NOT use this for\n * URLs that are rendered into HTML and followed by the browser — use\n * `getPublicApiUrl()` instead.\n */\nexport function getApiUrl(): string {\n if (_clientConfig?.apiUrl) {\n return _clientConfig.apiUrl;\n }\n return ENV.API_URL;\n}\n\n/**\n * Get the public-facing API URL.\n *\n * Always sourced from `NEXT_PUBLIC_API_URL` so it is identical on server\n * and client, and reachable from the user's browser. Use for any URL that\n * gets rendered into HTML the browser will navigate to (links, redirects,\n * OAuth hrefs).\n */\nexport function getPublicApiUrl(): string {\n return ENV.API_URL;\n}\n\n/**\n * Get the configured app URL.\n */\nexport function getAppUrl(): string {\n if (_clientConfig?.appUrl) {\n return _clientConfig.appUrl;\n }\n if (ENV.APP_URL_ALTERNATE) {\n return ENV.APP_URL_ALTERNATE;\n }\n if (typeof window !== \"undefined\") {\n return window.location.origin;\n }\n return \"\";\n}\n\n/**\n * Get the configured trackable pages.\n */\nexport function getTrackablePages(): ModuleWithPermissions[] {\n return _clientConfig?.trackablePages ?? [];\n}\n\n/**\n * Get the configured Stripe publishable key.\n */\nexport function getStripePublishableKey(): string | undefined {\n return _clientConfig?.stripePublishableKey;\n}\n","import { ComponentType } from \"react\";\n\n// Types for injected hooks\nexport interface I18nRouter {\n push: (href: string) => void;\n replace: (href: string) => void;\n back: () => void;\n forward: () => void;\n refresh: () => void;\n prefetch: (href: string) => void;\n}\n\nexport type UseRouterHook = () => I18nRouter;\nexport type UseTranslationsHook = (namespace?: string) => (key: string, values?: Record<string, any>) => string;\nexport type UseLocaleHook = () => string;\n\nexport type UseDateFnsLocaleHook = () => any; // date-fns Locale type\nexport type LinkComponent = ComponentType<{ href: string; children: React.ReactNode; [key: string]: any }>;\n\nexport interface I18nConfig {\n useRouter: UseRouterHook;\n useTranslations: UseTranslationsHook;\n useLocale?: UseLocaleHook;\n useDateFnsLocale?: UseDateFnsLocaleHook;\n Link: LinkComponent;\n usePathname: () => string;\n}\n\n// Private storage\nlet _config: I18nConfig | null = null;\n\n// Configuration function (called by app at startup)\nexport function configureI18n(config: I18nConfig): void {\n _config = config;\n}\n\n// Hooks for library components to use\nexport function useI18nRouter(): I18nRouter {\n if (!_config?.useRouter) {\n throw new Error(\"i18n not configured. Call configureI18n() at app startup.\");\n }\n return _config.useRouter();\n}\n\nexport function useI18nTranslations(namespace?: string): (key: string, values?: Record<string, any>) => string {\n if (!_config?.useTranslations) {\n // Fallback: return key as-is (safe for server/client)\n return (key: string) => key;\n }\n return _config.useTranslations(namespace);\n}\n\nexport function getI18nLink(): LinkComponent {\n if (!_config?.Link) {\n throw new Error(\"i18n not configured. Call configureI18n() at app startup.\");\n }\n return _config.Link;\n}\n\nexport function useI18nLocale(): string {\n if (_config?.useLocale) {\n return _config.useLocale();\n }\n // Fallback to English (safe for server/client)\n return \"en\";\n}\n\nexport function useI18nDateFnsLocale(): any {\n if (_config?.useDateFnsLocale) {\n return _config.useDateFnsLocale();\n }\n // Fallback to undefined (Calendar will use default)\n return undefined;\n}\n","let _useDiscordAuth: boolean = false;\nlet _useGoogleAuth: boolean = false;\nlet _useInternalAuth: boolean = true;\nlet _allowRegistration: boolean = true;\nlet _registrationMode: \"open\" | \"closed\" | \"waitlist\" = \"open\";\n\nexport type RegistrationMode = \"open\" | \"closed\" | \"waitlist\";\n\nexport interface LoginConfig {\n discordClientId?: string;\n googleClientId?: string;\n useInternalAuth?: boolean;\n allowRegistration?: boolean;\n registrationMode?: RegistrationMode;\n}\n\nexport function configureLogin(params: LoginConfig): void {\n _useDiscordAuth = !!params.discordClientId;\n _useGoogleAuth = !!params.googleClientId;\n _useInternalAuth = params.useInternalAuth ?? true;\n _allowRegistration = params.allowRegistration ?? true;\n _registrationMode = params.registrationMode ?? \"open\";\n}\n\nexport function isDiscordAuthEnabled(): boolean {\n return _useDiscordAuth;\n}\n\nexport function isGoogleAuthEnabled(): boolean {\n return _useGoogleAuth;\n}\n\nexport function isInternalAuthEnabled(): boolean {\n return _useInternalAuth;\n}\n\nexport function isRegistrationAllowed(): boolean {\n return _allowRegistration;\n}\n\nexport function getRegistrationMode(): RegistrationMode {\n return _registrationMode;\n}\n","/**\n * Role ID configuration interface\n * Apps provide their role IDs via configureRoles()\n */\nexport interface RoleIdConfig {\n Administrator: string;\n CompanyAdministrator: string;\n [key: string]: string; // Allow additional roles\n}\n\n// Private storage for the injected role IDs\nlet _roleId: RoleIdConfig | null = null;\n\n/**\n * Configure role IDs for the library\n * Call this at app startup to provide role ID constants\n *\n * @example\n * ```typescript\n * import { configureRoles } from \"@carlonicora/nextjs-jsonapi\";\n * import { RoleId } from \"@phlow/shared\";\n *\n * configureRoles(RoleId);\n * ```\n */\nexport function configureRoles(roleId: RoleIdConfig): void {\n _roleId = roleId;\n}\n\n/**\n * Get configured role IDs\n * @throws Error if roles not configured\n */\nexport function getRoleId(): RoleIdConfig {\n if (!_roleId) {\n throw new Error(\"Roles not configured. Call configureRoles() at app startup.\");\n }\n return _roleId;\n}\n\n/**\n * Check if roles have been configured\n */\nexport function isRolesConfigured(): boolean {\n return _roleId !== null;\n}\n","export type QuestionnaireFieldType = \"text\" | \"textarea\" | \"select\" | \"checkbox\";\n\nexport interface QuestionnaireOption {\n value: string;\n label: string;\n description?: string;\n}\n\nexport interface QuestionnaireField {\n id: string;\n type: QuestionnaireFieldType;\n label: string;\n description?: string;\n placeholder?: string;\n required?: boolean;\n options?: QuestionnaireOption[];\n}\n\nexport interface WaitlistConfig {\n questionnaire?: QuestionnaireField[];\n heroTitle?: string;\n heroSubtitle?: string;\n heroDescription?: string;\n benefits?: string[];\n}\n\nlet _waitlistConfig: WaitlistConfig = {};\n\nexport function configureWaitlist(config: WaitlistConfig): void {\n _waitlistConfig = config;\n}\n\nexport function getWaitlistConfig(): WaitlistConfig {\n return _waitlistConfig;\n}\n","/**\n * Configuration interface for frontend referral feature.\n */\nexport interface ReferralConfig {\n /**\n * Whether the referral feature is enabled.\n * When false, components render nothing and hooks return null.\n * @default false\n */\n enabled?: boolean;\n\n /**\n * Name of the cookie used to store referral codes.\n * @default \"referral_code\"\n */\n cookieName?: string;\n\n /**\n * Number of days the referral cookie is valid.\n * @default 30\n */\n cookieDays?: number;\n\n /**\n * Query parameter name for referral code in URL.\n * @default \"ref\"\n */\n urlParamName?: string;\n\n /**\n * Base URL for referral links.\n * @default window.location.origin (client-side only)\n */\n referralUrlBase?: string;\n\n /**\n * Path to append to base URL for referral links.\n * @default \"/\"\n */\n referralPath?: string;\n}\n\n/**\n * Default configuration values\n */\nexport const DEFAULT_REFERRAL_CONFIG: Required<ReferralConfig> = {\n enabled: false,\n cookieName: \"referral_code\",\n cookieDays: 30,\n urlParamName: \"ref\",\n referralUrlBase: \"\",\n referralPath: \"/\",\n};\n\n// Private storage for configuration\nlet _referralConfig: Required<ReferralConfig> = { ...DEFAULT_REFERRAL_CONFIG };\n\n/**\n * Configure referral feature settings.\n * Call this at app startup to enable and configure referral functionality.\n *\n * @example\n * ```typescript\n * import { configureReferral } from \"@carlonicora/nextjs-jsonapi\";\n *\n * configureReferral({\n * enabled: process.env.NEXT_PUBLIC_REFERRAL_ENABLED === 'true',\n * cookieDays: 30,\n * });\n * ```\n */\nexport function configureReferral(config: ReferralConfig): void {\n _referralConfig = { ...DEFAULT_REFERRAL_CONFIG, ...config };\n}\n\n/**\n * Get the current referral configuration.\n * @internal\n */\nexport function getReferralConfig(): Required<ReferralConfig> {\n return _referralConfig;\n}\n\n/**\n * Check if referral feature is enabled.\n */\nexport function isReferralEnabled(): boolean {\n return _referralConfig.enabled;\n}\n","export const COMPANY_ADMINISTRATOR_ROLE_ID = \"2e1eee00-6cba-4506-9059-ccd24e4ea5b0\";\n\nexport type PermissionValue = boolean | string;\n\nexport type ActionType = \"read\" | \"create\" | \"update\" | \"delete\";\n\nexport const ACTION_TYPES: ActionType[] = [\"read\", \"create\", \"update\", \"delete\"];\n\n/** The permissions object shape used by both Module and PermissionMapping entities */\nexport type PermissionsMap = {\n create?: PermissionValue;\n read?: PermissionValue;\n update?: PermissionValue;\n delete?: PermissionValue;\n};\n\n/**\n * Declarative-RBAC matrix types.\n *\n * Mirror of the library types defined in\n * `packages/nestjs-neo4jsonapi/src/foundations/rbac/dsl/types.ts`.\n * Frontend does not import from backend, so the shape is redefined here.\n *\n * A `PermToken` represents a single permission entry:\n * - `scope: true` → unconditional (e.g. full read of the module)\n * - `scope: false` → nothing (rarely used, mostly a placeholder)\n * - `scope: \"path\"` → scoped by relationship path (e.g. \"orders.account\")\n */\nexport type PermToken = { action: string; scope: boolean | string };\n\n/**\n * A per-module block of the matrix. Always has a `default` row (permissions\n * granted to every role). Additional keys are role IDs → role-specific\n * permission tokens that are unioned with `default` to produce the effective\n * permissions for that role in that module.\n */\nexport type RbacModuleBlock = { default: PermToken[] } & Record<string, PermToken[]>;\n\n/**\n * The full RBAC matrix as served by the dev endpoint `GET /_dev/rbac/matrix`.\n * Keys are module IDs; values are module blocks.\n */\nexport type RbacMatrix = Record<string, RbacModuleBlock>;\n","import { AbstractService, EndpointCreator, HttpMethod, Modules } from \"../../../core\";\nimport type { RbacMatrixModel } from \"./RbacMatrixModel\";\nimport type { RbacMatrix } from \"./RbacTypes\";\n\n/**\n * RbacService — fetches RBAC configuration for the admin UI.\n *\n * Declarative-matrix methods (`fetchMatrix`, `saveMatrix`) talk to the\n * dev-only endpoints added in\n * `packages/nestjs-neo4jsonapi/.../rbac-dev.controller.ts`. The controller\n * speaks JSON:API (singleton resource with `type: \"rbac-matrix\"`, `id:\n * \"singleton\"`), so these methods go through the standard `callApi()`\n * pipeline like every other service in the codebase.\n *\n * The backend only registers these routes when `devMode` is enabled on\n * `RbacModule.register` (see `apps/api/src/features/features.modules.ts`).\n * In production the routes return 404; callers should guard with a dev-mode\n * check.\n */\nexport class RbacService extends AbstractService {\n /**\n * Fetch the current RBAC matrix plus each module's known BFS relationship\n * paths (used by the permission picker as scope suggestions).\n *\n * Dev-only endpoint — see class header.\n */\n static async fetchMatrix(): Promise<{\n matrix: RbacMatrix;\n modulePaths: Record<string, readonly string[]>;\n }> {\n const endpoint = new EndpointCreator({ endpoint: Modules.RbacMatrix }).generate();\n\n const model = await this.callApi<RbacMatrixModel>({\n type: Modules.RbacMatrix,\n method: HttpMethod.GET,\n endpoint,\n });\n\n return {\n matrix: model.matrix ?? {},\n modulePaths: model.modulePaths ?? {},\n };\n }\n\n /**\n * Persist a matrix back to the declarative `permissions.ts` file.\n *\n * The backend serializes the matrix to formatted TypeScript using the\n * provided `roleNames` / `moduleNames` lookup tables (so the emitted file\n * references `RoleId.X` / `ModuleId.X` rather than raw UUIDs) and writes\n * it to `outputPath` (absolute, or relative to the repo root).\n *\n * Dev-only endpoint — see class header.\n */\n static async saveMatrix(args: {\n matrix: RbacMatrix;\n roleNames: Record<string, string>;\n moduleNames: Record<string, string>;\n outputPath: string;\n }): Promise<{ bytesWritten: number; path: string }> {\n const endpoint = new EndpointCreator({ endpoint: Modules.RbacMatrix }).generate();\n\n const model = await this.callApi<RbacMatrixModel>({\n type: Modules.RbacMatrix,\n method: HttpMethod.PUT,\n endpoint,\n input: args,\n });\n\n return {\n bytesWritten: model.bytesWritten ?? 0,\n path: model.path ?? \"\",\n };\n }\n}\n"]}
@@ -15,7 +15,7 @@ var _chunkIBS6NI7Djs = require('./chunk-IBS6NI7D.js');
15
15
 
16
16
 
17
17
 
18
- var _chunkW42MYR3Yjs = require('./chunk-W42MYR3Y.js');
18
+ var _chunkLU7DJ4QFjs = require('./chunk-LU7DJ4QF.js');
19
19
 
20
20
 
21
21
  var _chunk7QVYU63Ejs = require('./chunk-7QVYU63E.js');
@@ -26,12 +26,12 @@ var RehydrationFactory = class {
26
26
  _chunk7QVYU63Ejs.__name.call(void 0, this, "RehydrationFactory");
27
27
  }
28
28
  static rehydrate(classKey, data) {
29
- const factoryClass = _chunkW42MYR3Yjs.DataClassRegistry.get(classKey);
29
+ const factoryClass = _chunkLU7DJ4QFjs.DataClassRegistry.get(classKey);
30
30
  const instance = new factoryClass();
31
31
  return instance.rehydrate(data);
32
32
  }
33
33
  static rehydrateList(classKey, data) {
34
- const factoryClass = _chunkW42MYR3Yjs.DataClassRegistry.get(classKey);
34
+ const factoryClass = _chunkLU7DJ4QFjs.DataClassRegistry.get(classKey);
35
35
  const response = data.map((item) => {
36
36
  const instance = new factoryClass();
37
37
  return instance.rehydrate(item);
@@ -336,7 +336,7 @@ var AbstractService = class {
336
336
  * Make an API call with automatic environment detection and error handling.
337
337
  */
338
338
  static async callApi(params) {
339
- const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-WWGSGV2I.js")));
339
+ const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-E4PZPH3N.js")));
340
340
  let apiResponse;
341
341
  let language = "en";
342
342
  if (typeof window === "undefined") {
@@ -437,7 +437,7 @@ var AbstractService = class {
437
437
  * Make an API call and return both data and meta from the response.
438
438
  */
439
439
  static async callApiWithMeta(params) {
440
- const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-WWGSGV2I.js")));
440
+ const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-E4PZPH3N.js")));
441
441
  let apiResponse;
442
442
  let language = "en";
443
443
  if (typeof window === "undefined") {
@@ -523,7 +523,7 @@ var AbstractService = class {
523
523
  * Get raw JSON:API response data without deserialization.
524
524
  */
525
525
  static async getRawData(params) {
526
- const { JsonApiGet: JsonApiGet2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-WWGSGV2I.js")));
526
+ const { JsonApiGet: JsonApiGet2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-E4PZPH3N.js")));
527
527
  let language = "en";
528
528
  if (typeof window === "undefined") {
529
529
  const { getLocale } = await Promise.resolve().then(() => _interopRequireWildcard(require("next-intl/server")));
@@ -559,7 +559,7 @@ var _clientConfig = null;
559
559
  function configureClientJsonApi(config) {
560
560
  _clientConfig = config;
561
561
  if (config.bootstrapper) {
562
- _chunkW42MYR3Yjs.setBootstrapper.call(void 0, config.bootstrapper);
562
+ _chunkLU7DJ4QFjs.setBootstrapper.call(void 0, config.bootstrapper);
563
563
  config.bootstrapper();
564
564
  }
565
565
  }
@@ -568,7 +568,7 @@ function getClientApiUrl() {
568
568
  if (_optionalChain([_clientConfig, 'optionalAccess', _22 => _22.apiUrl])) {
569
569
  return _clientConfig.apiUrl;
570
570
  }
571
- const envUrl = _chunkW42MYR3Yjs.ENV.API_URL;
571
+ const envUrl = _chunkLU7DJ4QFjs.ENV.API_URL;
572
572
  if (!envUrl) {
573
573
  throw new Error(
574
574
  "API URL not configured. Use configureClientJsonApi() or set NEXT_PUBLIC_API_URL environment variable."
@@ -581,7 +581,7 @@ function getClientAppUrl() {
581
581
  if (_optionalChain([_clientConfig, 'optionalAccess', _23 => _23.appUrl])) {
582
582
  return _clientConfig.appUrl;
583
583
  }
584
- const envUrl = _chunkW42MYR3Yjs.ENV.APP_URL;
584
+ const envUrl = _chunkLU7DJ4QFjs.ENV.APP_URL;
585
585
  if (!envUrl) {
586
586
  throw new Error(
587
587
  "App URL not configured. Use configureClientJsonApi({ appUrl }) or set NEXT_PUBLIC_ADDRESS environment variable."
@@ -617,7 +617,7 @@ async function ClientJsonApiGet(params) {
617
617
  language: params.language,
618
618
  additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _26 => _26.additionalHeaders])
619
619
  });
620
- return _chunkW42MYR3Yjs.translateResponse.call(void 0, {
620
+ return _chunkLU7DJ4QFjs.translateResponse.call(void 0, {
621
621
  classKey: params.classKey,
622
622
  apiResponse,
623
623
  companyId: params.companyId,
@@ -639,7 +639,7 @@ async function ClientJsonApiPost(params) {
639
639
  if (!body) {
640
640
  body = {};
641
641
  } else if (params.overridesJsonApiCreation !== true) {
642
- body = _chunkW42MYR3Yjs.JsonApiDataFactory.create(params.classKey, body);
642
+ body = _chunkLU7DJ4QFjs.JsonApiDataFactory.create(params.classKey, body);
643
643
  }
644
644
  const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
645
645
  method: "POST",
@@ -651,7 +651,7 @@ async function ClientJsonApiPost(params) {
651
651
  language: params.language,
652
652
  additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _27 => _27.additionalHeaders])
653
653
  });
654
- return _chunkW42MYR3Yjs.translateResponse.call(void 0, {
654
+ return _chunkLU7DJ4QFjs.translateResponse.call(void 0, {
655
655
  classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
656
656
  apiResponse,
657
657
  companyId: params.companyId,
@@ -666,7 +666,7 @@ async function ClientJsonApiPut(params) {
666
666
  if (!body) {
667
667
  body = {};
668
668
  } else {
669
- body = _chunkW42MYR3Yjs.JsonApiDataFactory.create(params.classKey, body);
669
+ body = _chunkLU7DJ4QFjs.JsonApiDataFactory.create(params.classKey, body);
670
670
  }
671
671
  const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
672
672
  method: "PUT",
@@ -678,7 +678,7 @@ async function ClientJsonApiPut(params) {
678
678
  language: params.language,
679
679
  additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _28 => _28.additionalHeaders])
680
680
  });
681
- return _chunkW42MYR3Yjs.translateResponse.call(void 0, {
681
+ return _chunkLU7DJ4QFjs.translateResponse.call(void 0, {
682
682
  classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
683
683
  apiResponse,
684
684
  companyId: params.companyId,
@@ -693,7 +693,7 @@ async function ClientJsonApiPatch(params) {
693
693
  if (!body) {
694
694
  body = {};
695
695
  } else if (params.overridesJsonApiCreation !== true) {
696
- body = _chunkW42MYR3Yjs.JsonApiDataFactory.create(params.classKey, body);
696
+ body = _chunkLU7DJ4QFjs.JsonApiDataFactory.create(params.classKey, body);
697
697
  }
698
698
  const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
699
699
  method: "PATCH",
@@ -705,7 +705,7 @@ async function ClientJsonApiPatch(params) {
705
705
  language: params.language,
706
706
  additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _29 => _29.additionalHeaders])
707
707
  });
708
- return _chunkW42MYR3Yjs.translateResponse.call(void 0, {
708
+ return _chunkLU7DJ4QFjs.translateResponse.call(void 0, {
709
709
  classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
710
710
  apiResponse,
711
711
  companyId: params.companyId,
@@ -724,7 +724,7 @@ async function ClientJsonApiDelete(params) {
724
724
  language: params.language,
725
725
  additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _30 => _30.additionalHeaders])
726
726
  });
727
- return _chunkW42MYR3Yjs.translateResponse.call(void 0, {
727
+ return _chunkLU7DJ4QFjs.translateResponse.call(void 0, {
728
728
  classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
729
729
  apiResponse,
730
730
  companyId: params.companyId,
@@ -936,7 +936,7 @@ var ModuleRegistrar = (_class2 = class {
936
936
  }).map((key) => modulesClass[key]);
937
937
  data.forEach((item) => {
938
938
  if (item && item.model) {
939
- _chunkW42MYR3Yjs.DataClassRegistry.registerObjectClass(item, item.model);
939
+ _chunkLU7DJ4QFjs.DataClassRegistry.registerObjectClass(item, item.model);
940
940
  }
941
941
  });
942
942
  this._isBootstrapped = true;
@@ -946,7 +946,7 @@ var ModuleRegistrar = (_class2 = class {
946
946
  */
947
947
  static reset() {
948
948
  this._isBootstrapped = false;
949
- _chunkW42MYR3Yjs.DataClassRegistry.clear();
949
+ _chunkLU7DJ4QFjs.DataClassRegistry.clear();
950
950
  }
951
951
  }, _class2.__initStatic2(), _class2);
952
952
 
@@ -969,20 +969,20 @@ var ModuleRegistryClass = class {
969
969
  get(name) {
970
970
  let module = this._modules.get(name);
971
971
  if (!module) {
972
- const didBootstrap = _chunkW42MYR3Yjs.tryBootstrap.call(void 0, );
972
+ const didBootstrap = _chunkLU7DJ4QFjs.tryBootstrap.call(void 0, );
973
973
  if (didBootstrap) {
974
974
  module = this._modules.get(name);
975
975
  }
976
976
  }
977
977
  if (!module) {
978
- const hint = _chunkW42MYR3Yjs.hasBootstrapper.call(void 0, ) ? "Bootstrap was called but module still not found. Check module registration." : "No bootstrapper registered. Ensure configureJsonApi({ bootstrapper }) is called before accessing modules.";
978
+ const hint = _chunkLU7DJ4QFjs.hasBootstrapper.call(void 0, ) ? "Bootstrap was called but module still not found. Check module registration." : "No bootstrapper registered. Ensure configureJsonApi({ bootstrapper }) is called before accessing modules.";
979
979
  throw new Error(`Module "${String(name)}" not registered. ${hint}`);
980
980
  }
981
981
  return module;
982
982
  }
983
983
  findByName(moduleName) {
984
984
  if (this._modules.size === 0) {
985
- _chunkW42MYR3Yjs.tryBootstrap.call(void 0, );
985
+ _chunkLU7DJ4QFjs.tryBootstrap.call(void 0, );
986
986
  }
987
987
  for (const module of this._modules.values()) {
988
988
  if (module.name === moduleName) {
@@ -993,7 +993,7 @@ var ModuleRegistryClass = class {
993
993
  }
994
994
  getAllPageUrls() {
995
995
  if (this._modules.size === 0) {
996
- _chunkW42MYR3Yjs.tryBootstrap.call(void 0, );
996
+ _chunkLU7DJ4QFjs.tryBootstrap.call(void 0, );
997
997
  }
998
998
  const seen = /* @__PURE__ */ new Set();
999
999
  const result = [];
@@ -1010,7 +1010,7 @@ var ModuleRegistryClass = class {
1010
1010
  findByModelName(modelName) {
1011
1011
  let module = this._modules.get(modelName);
1012
1012
  if (!module) {
1013
- const didBootstrap = _chunkW42MYR3Yjs.tryBootstrap.call(void 0, );
1013
+ const didBootstrap = _chunkLU7DJ4QFjs.tryBootstrap.call(void 0, );
1014
1014
  if (didBootstrap) {
1015
1015
  module = this._modules.get(modelName);
1016
1016
  }
@@ -1032,7 +1032,7 @@ var ModuleRegistryClass = class {
1032
1032
  }
1033
1033
  getAll() {
1034
1034
  if (this._modules.size === 0) {
1035
- _chunkW42MYR3Yjs.tryBootstrap.call(void 0, );
1035
+ _chunkLU7DJ4QFjs.tryBootstrap.call(void 0, );
1036
1036
  }
1037
1037
  return Array.from(this._modules.values());
1038
1038
  }
@@ -2985,7 +2985,7 @@ var AuthService = class extends AbstractService {
2985
2985
  }
2986
2986
  static async login(params) {
2987
2987
  const language = params.language || "en-US";
2988
- const apiResponse = await _chunkW42MYR3Yjs.JsonApiPost.call(void 0, {
2988
+ const apiResponse = await _chunkLU7DJ4QFjs.JsonApiPost.call(void 0, {
2989
2989
  classKey: Modules.Auth,
2990
2990
  endpoint: new EndpointCreator({ endpoint: Modules.Auth, id: "login" }).generate(),
2991
2991
  body: { email: params.email, password: params.password },
@@ -3019,7 +3019,7 @@ var AuthService = class extends AbstractService {
3019
3019
  }
3020
3020
  static async logout(params) {
3021
3021
  const language = _optionalChain([params, 'optionalAccess', _71 => _71.language]) || "en-US";
3022
- await _chunkW42MYR3Yjs.JsonApiDelete.call(void 0, {
3022
+ await _chunkLU7DJ4QFjs.JsonApiDelete.call(void 0, {
3023
3023
  classKey: Modules.Auth,
3024
3024
  endpoint: new EndpointCreator({ endpoint: Modules.Auth }).generate(),
3025
3025
  language
@@ -3031,7 +3031,7 @@ var AuthService = class extends AbstractService {
3031
3031
  }
3032
3032
  static async initialiseForgotPassword(params) {
3033
3033
  const language = params.language || "en-US";
3034
- const response = await _chunkW42MYR3Yjs.JsonApiPost.call(void 0, {
3034
+ const response = await _chunkLU7DJ4QFjs.JsonApiPost.call(void 0, {
3035
3035
  classKey: Modules.Auth,
3036
3036
  endpoint: new EndpointCreator({ endpoint: Modules.Auth, id: "forgot" }).generate(),
3037
3037
  body: { email: params.email },
@@ -3060,7 +3060,7 @@ var AuthService = class extends AbstractService {
3060
3060
  }
3061
3061
  static async validateCode(params) {
3062
3062
  const language = params.language || "en-US";
3063
- const apiResponse = await _chunkW42MYR3Yjs.JsonApiGet.call(void 0, {
3063
+ const apiResponse = await _chunkLU7DJ4QFjs.JsonApiGet.call(void 0, {
3064
3064
  classKey: Modules.Auth,
3065
3065
  endpoint: new EndpointCreator({ endpoint: Modules.Auth, id: "validate", childEndpoint: params.code }).generate(),
3066
3066
  language
@@ -3104,7 +3104,7 @@ var AuthService = class extends AbstractService {
3104
3104
  }
3105
3105
  static async completeOAuthRegistration(params) {
3106
3106
  const endpoint = new EndpointCreator({ endpoint: Modules.Auth, id: "oauth", childEndpoint: "complete" });
3107
- const response = await _chunkW42MYR3Yjs.JsonApiPost.call(void 0, {
3107
+ const response = await _chunkLU7DJ4QFjs.JsonApiPost.call(void 0, {
3108
3108
  classKey: Modules.Auth,
3109
3109
  endpoint: endpoint.generate(),
3110
3110
  body: params,
@@ -4895,7 +4895,7 @@ var StripePromotionCodeService = class {
4895
4895
  * @returns Validation result with discount details if valid
4896
4896
  */
4897
4897
  static async validatePromotionCode(params) {
4898
- const response = await _chunkW42MYR3Yjs.JsonApiPost.call(void 0, {
4898
+ const response = await _chunkLU7DJ4QFjs.JsonApiPost.call(void 0, {
4899
4899
  classKey: Modules.StripePromotionCode,
4900
4900
  endpoint: `${STRIPE_PROMOTION_CODE_ENDPOINT}/validate`,
4901
4901
  body: {
@@ -8973,4 +8973,4 @@ var AuditLogModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (facto
8973
8973
 
8974
8974
 
8975
8975
  exports.RehydrationFactory = RehydrationFactory; exports.AbstractApiData = AbstractApiData; exports.HttpMethod = HttpMethod; exports.getLastApiTotal = getLastApiTotal; exports.clearLastApiTotal = clearLastApiTotal; exports.getLastApiMeta = getLastApiMeta; exports.clearLastApiMeta = clearLastApiMeta; exports.setGlobalErrorHandler = setGlobalErrorHandler; exports.getGlobalErrorHandler = getGlobalErrorHandler; exports.AbstractService = AbstractService; exports.configureClientJsonApi = configureClientJsonApi; exports.getClientApiUrl = getClientApiUrl; exports.getClientAppUrl = getClientAppUrl; exports.getClientTrackablePages = getClientTrackablePages; exports.buildClientUrl = buildClientUrl; exports.ClientJsonApiGet = ClientJsonApiGet; exports.ClientJsonApiPost = ClientJsonApiPost; exports.ClientJsonApiPut = ClientJsonApiPut; exports.ClientJsonApiPatch = ClientJsonApiPatch; exports.ClientJsonApiDelete = ClientJsonApiDelete; exports.ClientHttpMethod = ClientHttpMethod; exports.setClientGlobalErrorHandler = setClientGlobalErrorHandler; exports.getClientGlobalErrorHandler = getClientGlobalErrorHandler; exports.ClientAbstractService = ClientAbstractService; exports.ModuleRegistrar = ModuleRegistrar; exports.ModuleRegistry = ModuleRegistry; exports.Modules = Modules; exports.EndpointCreator = EndpointCreator; exports.createJsonApiInclusion = createJsonApiInclusion; exports.rehydrate = rehydrate; exports.rehydrateList = rehydrateList; exports.cn = cn; exports.composeRefs = composeRefs; exports.useComposedRefs = useComposedRefs; exports.MOBILE_BREAKPOINT = MOBILE_BREAKPOINT; exports.VIEWPORT_COOKIE_NAME = VIEWPORT_COOKIE_NAME; exports.getViewportContext = getViewportContext; exports.measureViewport = measureViewport; exports.persistViewport = persistViewport; exports.subscribeViewport = subscribeViewport; exports.useIsMobile = useIsMobile; exports.formatLocalDate = formatLocalDate; exports.formatDate = formatDate; exports.exists = exists; exports.TableOptions = TableOptions; exports.getTableOptions = getTableOptions; exports.getTableComponents = getTableComponents; exports.userObjectSchema = userObjectSchema; exports.entityObjectSchema = entityObjectSchema; exports.getInitials = getInitials; exports.isRemoteImageSrc = isRemoteImageSrc; exports.validatePartitaIva = validatePartitaIva; exports.validateCodiceFiscale = validateCodiceFiscale; exports.validateItalianTaxCode = validateItalianTaxCode; exports.formatPartitaIva = formatPartitaIva; exports.formatCodiceFiscale = formatCodiceFiscale; exports.BlockNoteDiffUtil = BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = BlockNoteWordDiffRendererUtil; exports.getIconByModule = getIconByModule; exports.getIcon = getIcon; exports.getIconByModuleName = getIconByModuleName; exports.getLucideIcon = getLucideIcon; exports.getLucideIconByModule = getLucideIconByModule; exports.getLucideIconByModuleName = getLucideIconByModuleName; exports.showToast = showToast; exports.showError = showError; exports.dismissToast = dismissToast; exports.showCustomToast = showCustomToast; exports.Action = Action; exports.checkPermissions = checkPermissions; exports.checkPermissionsFromServer = checkPermissionsFromServer; exports.getValueFromPath = getValueFromPath; exports.TotpAuthenticator = TotpAuthenticator; exports.TotpAuthenticatorModule = TotpAuthenticatorModule; exports.TotpSetup = TotpSetup; exports.TotpSetupModule = TotpSetupModule; exports.TotpVerify = TotpVerify; exports.TotpVerifyModule = TotpVerifyModule; exports.TotpVerifyLogin = TotpVerifyLogin; exports.TotpVerifyLoginModule = TotpVerifyLoginModule; exports.Passkey = Passkey; exports.PasskeyModule = PasskeyModule; exports.PasskeyRegistrationOptions = PasskeyRegistrationOptions; exports.PasskeyRegistrationOptionsModule = PasskeyRegistrationOptionsModule; exports.PasskeyRegistrationVerify = PasskeyRegistrationVerify; exports.PasskeyRegistrationVerifyModule = PasskeyRegistrationVerifyModule; exports.PasskeyRename = PasskeyRename; exports.PasskeyRenameModule = PasskeyRenameModule; exports.PasskeyVerifyLogin = PasskeyVerifyLogin; exports.PasskeyVerifyLoginModule = PasskeyVerifyLoginModule; exports.PasskeyAuthenticationOptions = PasskeyAuthenticationOptions; exports.PasskeyAuthenticationOptionsModule = PasskeyAuthenticationOptionsModule; exports.TwoFactorEnable = TwoFactorEnable; exports.TwoFactorEnableModule = TwoFactorEnableModule; exports.TwoFactorChallenge = TwoFactorChallenge; exports.TwoFactorChallengeModule = TwoFactorChallengeModule; exports.BackupCodeVerify = BackupCodeVerify; exports.BackupCodeVerifyModule = BackupCodeVerifyModule; exports.configureAuth = configureAuth; exports.getTokenHandler = getTokenHandler; exports.Auth = Auth; exports.AuthService = AuthService; exports.TwoFactorStatus = TwoFactorStatus; exports.TwoFactorService = TwoFactorService; exports.AuthComponent = AuthComponent; exports.AuthModule = AuthModule; exports.TwoFactorStatusModule = TwoFactorStatusModule; exports.BillingService = BillingService; exports.Billing = Billing; exports.BillingModule = BillingModule; exports.PaymentMethod = PaymentMethod; exports.StripeCustomer = StripeCustomer; exports.StripeCustomerService = StripeCustomerService; exports.StripeCustomerModule = StripeCustomerModule; exports.StripePaymentMethodModule = StripePaymentMethodModule; exports.StripeInvoice = StripeInvoice; exports.InvoiceStatus = InvoiceStatus; exports.StripeInvoiceService = StripeInvoiceService; exports.StripeInvoiceModule = StripeInvoiceModule; exports.StripePrice = StripePrice; exports.StripePriceFields = StripePriceFields; exports.StripePriceService = StripePriceService; exports.StripePriceModule = StripePriceModule; exports.StripeProduct = StripeProduct; exports.StripeProductFields = StripeProductFields; exports.StripeProductService = StripeProductService; exports.StripeProductModule = StripeProductModule; exports.StripeSubscription = StripeSubscription; exports.SubscriptionStatus = SubscriptionStatus; exports.StripeSubscriptionService = StripeSubscriptionService; exports.StripeSubscriptionModule = StripeSubscriptionModule; exports.StripeUsage = StripeUsage; exports.StripeUsageService = StripeUsageService; exports.StripeUsageModule = StripeUsageModule; exports.StripePromotionCodeService = StripePromotionCodeService; exports.StripePromotionCode = StripePromotionCode; exports.StripePromotionCodeModule = StripePromotionCodeModule; exports.AiConnection = AiConnection; exports.AiConnectionFields = AiConnectionFields; exports.AiConnectionService = AiConnectionService; exports.AiConnectionModule = AiConnectionModule; exports.Company = Company; exports.CompanyFields = CompanyFields; exports.CompanyService = CompanyService; exports.EntityAiStatus = EntityAiStatus; exports.CompanyModule = CompanyModule; exports.Content = Content; exports.ContentFields = ContentFields; exports.ContentService = ContentService; exports.ContentModule = ContentModule; exports.HowTo = HowTo; exports.HowToModule = HowToModule; exports.HowToFields = HowToFields; exports.HowToService = HowToService; exports.Assistant = Assistant; exports.AssistantModule = AssistantModule; exports.AssistantMessage = AssistantMessage; exports.AssistantService = AssistantService; exports.AssistantMessageModule = AssistantMessageModule; exports.AssistantMessageService = AssistantMessageService; exports.AssistantAction = AssistantAction; exports.AssistantActionModule = AssistantActionModule; exports.AssistantActionService = AssistantActionService; exports.Chunk = Chunk; exports.ChunkModule = ChunkModule; exports.Feature = Feature; exports.FeatureService = FeatureService; exports.FeatureModule = FeatureModule; exports.Module = Module; exports.ModuleModule = ModuleModule; exports.Notification = Notification; exports.NotificationFields = NotificationFields; exports.NotificationService = NotificationService; exports.NotificationModule = NotificationModule; exports.Push = Push; exports.PushService = PushService; exports.PushModule = PushModule; exports.Role = Role; exports.RoleFields = RoleFields; exports.RoleService = RoleService; exports.RoleModule = RoleModule; exports.S3 = S3; exports.S3Module = S3Module; exports.S3Service = S3Service; exports.User = User; exports.UserFields = UserFields; exports.UserService = UserService; exports.CURRENT_USER_STORAGE_KEY = CURRENT_USER_STORAGE_KEY; exports.AuthorModule = AuthorModule; exports.UserModule = UserModule; exports.OAuthClient = OAuthClient; exports.OAuthModule = OAuthModule; exports.OAuthService = OAuthService; exports.OAUTH_SCOPE_DISPLAY = OAUTH_SCOPE_DISPLAY; exports.AVAILABLE_OAUTH_SCOPES = AVAILABLE_OAUTH_SCOPES; exports.DEFAULT_GRANT_TYPES = DEFAULT_GRANT_TYPES; exports.Waitlist = Waitlist; exports.WaitlistService = WaitlistService; exports.WaitlistStats = WaitlistStats; exports.WaitlistModule = WaitlistModule; exports.WaitlistStatsModule = WaitlistStatsModule; exports.PermissionMapping = PermissionMapping; exports.ModulePaths = ModulePaths; exports.RbacMatrixModel = RbacMatrixModel; exports.PermissionMappingModule = PermissionMappingModule; exports.ModulePathsModule = ModulePathsModule; exports.RbacMatrixModule = RbacMatrixModule; exports.ReferralStats = ReferralStats; exports.ReferralService = ReferralService; exports.ReferralModule = ReferralModule; exports.ReferralStatsModule = ReferralStatsModule; exports.TokenUsageAdminBreakdown = TokenUsageAdminBreakdown; exports.TokenUsageAdminSummary = TokenUsageAdminSummary; exports.TokenUsageAdminTimeline = TokenUsageAdminTimeline; exports.TokenUsageAdminSummaryModule = TokenUsageAdminSummaryModule; exports.TokenUsageAdminTimelineModule = TokenUsageAdminTimelineModule; exports.TokenUsageAdminBreakdownModule = TokenUsageAdminBreakdownModule; exports.TokenUsageReportBreakdown = TokenUsageReportBreakdown; exports.TokenUsageReportSummary = TokenUsageReportSummary; exports.TokenUsageReportTimeline = TokenUsageReportTimeline; exports.tokenUsageModules = tokenUsageModules; exports.configureTokenUsage = configureTokenUsage; exports.getTokenUsageCurrency = getTokenUsageCurrency; exports.AuditLog = AuditLog; exports.AuditLogService = AuditLogService; exports.AuditLogModule = AuditLogModule;
8976
- //# sourceMappingURL=chunk-PGA2VC3S.js.map
8976
+ //# sourceMappingURL=chunk-UYLS3LJW.js.map