@carlonicora/nextjs-jsonapi 1.117.1 → 1.119.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/{BlockNoteEditor-CEWZCORH.js → BlockNoteEditor-BPACLNMB.js} +20 -20
  2. package/dist/{BlockNoteEditor-CEWZCORH.js.map → BlockNoteEditor-BPACLNMB.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-K4T6QOJO.mjs → BlockNoteEditor-CEDKBT67.mjs} +5 -5
  4. package/dist/JsonApiRequest-HE5LTEYK.js +26 -0
  5. package/dist/JsonApiRequest-HE5LTEYK.js.map +1 -0
  6. package/dist/{JsonApiRequest-IYL5RZ7I.mjs → JsonApiRequest-SN3DNFDR.mjs} +4 -2
  7. package/dist/billing/index.js +347 -347
  8. package/dist/billing/index.mjs +4 -4
  9. package/dist/{chunk-6D4GJHLK.mjs → chunk-4SPL6QH3.mjs} +277 -154
  10. package/dist/chunk-4SPL6QH3.mjs.map +1 -0
  11. package/dist/{chunk-6KLR3WJQ.js → chunk-55Q43DI5.js} +9 -9
  12. package/dist/{chunk-6KLR3WJQ.js.map → chunk-55Q43DI5.js.map} +1 -1
  13. package/dist/{chunk-WEPQD5MP.mjs → chunk-5U7QDGDQ.mjs} +3 -3
  14. package/dist/{chunk-S2PTWBN6.js → chunk-6P7MEU7Q.js} +64 -50
  15. package/dist/chunk-6P7MEU7Q.js.map +1 -0
  16. package/dist/{chunk-56QAXZKI.js → chunk-DXTOA7OO.js} +932 -809
  17. package/dist/chunk-DXTOA7OO.js.map +1 -0
  18. package/dist/{chunk-M7XAKLSP.mjs → chunk-FWOS6PC5.mjs} +38 -24
  19. package/dist/chunk-FWOS6PC5.mjs.map +1 -0
  20. package/dist/{chunk-J5LROFGL.js → chunk-RCMIVTVL.js} +14 -11
  21. package/dist/chunk-RCMIVTVL.js.map +1 -0
  22. package/dist/{chunk-KK7PYKVI.mjs → chunk-WC2BTKJP.mjs} +13 -10
  23. package/dist/{chunk-KK7PYKVI.mjs.map → chunk-WC2BTKJP.mjs.map} +1 -1
  24. package/dist/client/index.d.mts +15 -1
  25. package/dist/client/index.d.ts +15 -1
  26. package/dist/client/index.js +7 -5
  27. package/dist/client/index.js.map +1 -1
  28. package/dist/client/index.mjs +6 -4
  29. package/dist/components/index.d.mts +72 -30
  30. package/dist/components/index.d.ts +72 -30
  31. package/dist/components/index.js +7 -5
  32. package/dist/components/index.js.map +1 -1
  33. package/dist/components/index.mjs +6 -4
  34. package/dist/contexts/index.js +5 -5
  35. package/dist/contexts/index.mjs +4 -4
  36. package/dist/core/index.d.mts +7 -2
  37. package/dist/core/index.d.ts +7 -2
  38. package/dist/core/index.js +3 -3
  39. package/dist/core/index.mjs +2 -2
  40. package/dist/features/help/index.js +37 -37
  41. package/dist/features/help/index.mjs +4 -4
  42. package/dist/index.d.mts +2 -2
  43. package/dist/index.d.ts +2 -2
  44. package/dist/index.js +4 -4
  45. package/dist/index.mjs +3 -3
  46. package/dist/{s3.service-CihgBy97.d.mts → s3.service-CBqyDZyz.d.mts} +7 -0
  47. package/dist/{s3.service-Cyvfk3qV.d.ts → s3.service-gcEjq8gF.d.ts} +7 -0
  48. package/dist/server/index.d.mts +1 -1
  49. package/dist/server/index.d.ts +1 -1
  50. package/dist/server/index.js +12 -12
  51. package/dist/server/index.mjs +2 -2
  52. package/package.json +1 -1
  53. package/src/client/JsonApiClient.ts +23 -8
  54. package/src/client/__tests__/JsonApiClient.test.ts +31 -0
  55. package/src/components/containers/RoundPageContainer.tsx +197 -76
  56. package/src/components/containers/TabsContainer.tsx +14 -0
  57. package/src/components/containers/__tests__/partitionTabs.spec.ts +51 -0
  58. package/src/components/containers/index.ts +1 -0
  59. package/src/components/containers/partitionTabs.ts +43 -0
  60. package/src/components/forms/EditorSheet.tsx +7 -2
  61. package/src/core/abstracts/AbstractService.ts +13 -0
  62. package/src/core/abstracts/ClientAbstractService.ts +10 -0
  63. package/src/unified/JsonApiRequest.ts +22 -8
  64. package/src/unified/__tests__/JsonApiRequest.test.ts +29 -0
  65. package/dist/JsonApiRequest-OSGJ63XR.js +0 -24
  66. package/dist/JsonApiRequest-OSGJ63XR.js.map +0 -1
  67. package/dist/chunk-56QAXZKI.js.map +0 -1
  68. package/dist/chunk-6D4GJHLK.mjs.map +0 -1
  69. package/dist/chunk-J5LROFGL.js.map +0 -1
  70. package/dist/chunk-M7XAKLSP.mjs.map +0 -1
  71. package/dist/chunk-S2PTWBN6.js.map +0 -1
  72. /package/dist/{BlockNoteEditor-K4T6QOJO.mjs.map → BlockNoteEditor-CEDKBT67.mjs.map} +0 -0
  73. /package/dist/{JsonApiRequest-IYL5RZ7I.mjs.map → JsonApiRequest-SN3DNFDR.mjs.map} +0 -0
  74. /package/dist/{chunk-WEPQD5MP.mjs.map → chunk-5U7QDGDQ.mjs.map} +0 -0
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkS2PTWBN6js = require('./chunk-S2PTWBN6.js');
5
+ var _chunk6P7MEU7Qjs = require('./chunk-6P7MEU7Q.js');
6
6
 
7
7
 
8
- var _chunkJ5LROFGLjs = require('./chunk-J5LROFGL.js');
8
+ var _chunkRCMIVTVLjs = require('./chunk-RCMIVTVL.js');
9
9
 
10
10
 
11
11
  var _chunk7QVYU63Ejs = require('./chunk-7QVYU63E.js');
@@ -34,7 +34,7 @@ function configureJsonApi(config) {
34
34
  _setStaticHelpContent(helpContent);
35
35
  }
36
36
  if (config.bootstrapper) {
37
- _chunkJ5LROFGLjs.setBootstrapper.call(void 0, config.bootstrapper);
37
+ _chunkRCMIVTVLjs.setBootstrapper.call(void 0, config.bootstrapper);
38
38
  config.bootstrapper();
39
39
  }
40
40
  }
@@ -216,7 +216,7 @@ var COMPANY_ADMINISTRATOR_ROLE_ID = "2e1eee00-6cba-4506-9059-ccd24e4ea5b0";
216
216
  var ACTION_TYPES = ["read", "create", "update", "delete"];
217
217
 
218
218
  // src/features/rbac/data/RbacService.ts
219
- var RbacService = class extends _chunkS2PTWBN6js.AbstractService {
219
+ var RbacService = class extends _chunk6P7MEU7Qjs.AbstractService {
220
220
  static {
221
221
  _chunk7QVYU63Ejs.__name.call(void 0, this, "RbacService");
222
222
  }
@@ -227,9 +227,9 @@ var RbacService = class extends _chunkS2PTWBN6js.AbstractService {
227
227
  * Dev-only endpoint — see class header.
228
228
  */
229
229
  static async fetchMatrix() {
230
- const endpoint = new (0, _chunkS2PTWBN6js.EndpointCreator)({ endpoint: _chunkS2PTWBN6js.Modules.RbacMatrix }).generate();
230
+ const endpoint = new (0, _chunk6P7MEU7Qjs.EndpointCreator)({ endpoint: _chunk6P7MEU7Qjs.Modules.RbacMatrix }).generate();
231
231
  const model = await this.callApi({
232
- type: _chunkS2PTWBN6js.Modules.RbacMatrix,
232
+ type: _chunk6P7MEU7Qjs.Modules.RbacMatrix,
233
233
  method: "GET" /* GET */,
234
234
  endpoint
235
235
  });
@@ -249,9 +249,9 @@ var RbacService = class extends _chunkS2PTWBN6js.AbstractService {
249
249
  * Dev-only endpoint — see class header.
250
250
  */
251
251
  static async saveMatrix(args) {
252
- const endpoint = new (0, _chunkS2PTWBN6js.EndpointCreator)({ endpoint: _chunkS2PTWBN6js.Modules.RbacMatrix }).generate();
252
+ const endpoint = new (0, _chunk6P7MEU7Qjs.EndpointCreator)({ endpoint: _chunk6P7MEU7Qjs.Modules.RbacMatrix }).generate();
253
253
  const model = await this.callApi({
254
- type: _chunkS2PTWBN6js.Modules.RbacMatrix,
254
+ type: _chunk6P7MEU7Qjs.Modules.RbacMatrix,
255
255
  method: "PUT" /* PUT */,
256
256
  endpoint,
257
257
  input: args
@@ -296,4 +296,4 @@ var RbacService = class extends _chunkS2PTWBN6js.AbstractService {
296
296
 
297
297
 
298
298
  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;
299
- //# sourceMappingURL=chunk-6KLR3WJQ.js.map
299
+ //# sourceMappingURL=chunk-55Q43DI5.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/chunk-6KLR3WJQ.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;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACA;ACDA,IAAM,iBAAA,kBAAmB,MAAA,CAAO,GAAA,CAAI,4BAA4B,CAAA;AAEhE,IAAM,YAAA,EAAc,UAAA;AAIpB,GAAA,CAAI,WAAA,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;AAAA,MACL,YAAA,mBAAc,KAAA,CAAM,YAAA,UAAgB,GAAA;AAAA,MACpC,IAAA,mBAAM,KAAA,CAAM,IAAA,UAAQ;AAAA,IACtB,CAAA;AAAA,EACF;AACF,CAAA;AT8LA;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-6KLR3WJQ.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 { 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 if (typeof process !== \"undefined\" && process.env?.NEXT_PUBLIC_API_URL) {\n return process.env.NEXT_PUBLIC_API_URL;\n }\n return \"\";\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 if (typeof process !== \"undefined\" && process.env?.NEXT_PUBLIC_API_URL) {\n return process.env.NEXT_PUBLIC_API_URL;\n }\n return \"\";\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 (typeof process !== \"undefined\" && process.env?.NEXT_PUBLIC_APP_URL) {\n return process.env.NEXT_PUBLIC_APP_URL;\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-55Q43DI5.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;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACA;ACDA,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;ADChB;AACA;AEnBA,IAAI,cAAA,EAOO,IAAA;AAOJ,SAAS,gBAAA,CAAiB,MAAA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IAAA,MAAM,MAAA,EAAQ,MAAM,IAAA,CAAK,OAAA,CAAyB;AAAA,MAChD,IAAA,EAAM,wBAAA,CAAQ,UAAA;AAAA,MACd,MAAA,EAAA,eAAA;AAAA,MACA;AAAA,IACF,CAAC,CAAA;AAED,IAAA,OAAO;AAAA,MACL,MAAA,mBAAQ,KAAA,CAAM,MAAA,UAAU,CAAC,GAAA;AAAA,MACzB,WAAA,mBAAa,KAAA,CAAM,WAAA,UAAe,CAAC;AAAA,IACrC,CAAA;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,OAAA,MAAa,UAAA,CAAW,IAAA,EAK4B;AAClD,IAAA,MAAM,SAAA,EAAW,IAAI,qCAAA,CAAgB,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;AT8LA;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-55Q43DI5.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 { 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 if (typeof process !== \"undefined\" && process.env?.NEXT_PUBLIC_API_URL) {\n return process.env.NEXT_PUBLIC_API_URL;\n }\n return \"\";\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 if (typeof process !== \"undefined\" && process.env?.NEXT_PUBLIC_API_URL) {\n return process.env.NEXT_PUBLIC_API_URL;\n }\n return \"\";\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 (typeof process !== \"undefined\" && process.env?.NEXT_PUBLIC_APP_URL) {\n return process.env.NEXT_PUBLIC_APP_URL;\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"]}
@@ -2,10 +2,10 @@ import {
2
2
  AbstractService,
3
3
  EndpointCreator,
4
4
  Modules
5
- } from "./chunk-M7XAKLSP.mjs";
5
+ } from "./chunk-FWOS6PC5.mjs";
6
6
  import {
7
7
  setBootstrapper
8
- } from "./chunk-KK7PYKVI.mjs";
8
+ } from "./chunk-WC2BTKJP.mjs";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-PAWJFY3S.mjs";
@@ -296,4 +296,4 @@ export {
296
296
  ACTION_TYPES,
297
297
  RbacService
298
298
  };
299
- //# sourceMappingURL=chunk-WEPQD5MP.mjs.map
299
+ //# sourceMappingURL=chunk-5U7QDGDQ.mjs.map
@@ -14,7 +14,7 @@ var _chunkIBS6NI7Djs = require('./chunk-IBS6NI7D.js');
14
14
 
15
15
 
16
16
 
17
- var _chunkJ5LROFGLjs = require('./chunk-J5LROFGL.js');
17
+ var _chunkRCMIVTVLjs = require('./chunk-RCMIVTVL.js');
18
18
 
19
19
 
20
20
  var _chunk7QVYU63Ejs = require('./chunk-7QVYU63E.js');
@@ -25,12 +25,12 @@ var RehydrationFactory = class {
25
25
  _chunk7QVYU63Ejs.__name.call(void 0, this, "RehydrationFactory");
26
26
  }
27
27
  static rehydrate(classKey, data) {
28
- const factoryClass = _chunkJ5LROFGLjs.DataClassRegistry.get(classKey);
28
+ const factoryClass = _chunkRCMIVTVLjs.DataClassRegistry.get(classKey);
29
29
  const instance = new factoryClass();
30
30
  return instance.rehydrate(data);
31
31
  }
32
32
  static rehydrateList(classKey, data) {
33
- const factoryClass = _chunkJ5LROFGLjs.DataClassRegistry.get(classKey);
33
+ const factoryClass = _chunkRCMIVTVLjs.DataClassRegistry.get(classKey);
34
34
  const response = data.map((item) => {
35
35
  const instance = new factoryClass();
36
36
  return instance.rehydrate(item);
@@ -326,7 +326,7 @@ var AbstractService = class {
326
326
  * Make an API call with automatic environment detection and error handling.
327
327
  */
328
328
  static async callApi(params) {
329
- const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-OSGJ63XR.js")));
329
+ const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-HE5LTEYK.js")));
330
330
  let apiResponse;
331
331
  let language = "en";
332
332
  if (typeof window === "undefined") {
@@ -341,7 +341,8 @@ var AbstractService = class {
341
341
  classKey: params.type,
342
342
  endpoint: params.endpoint,
343
343
  companyId: params.companyId,
344
- language
344
+ language,
345
+ baseUrl: params.baseUrl
345
346
  });
346
347
  break;
347
348
  case "POST" /* POST */:
@@ -354,7 +355,8 @@ var AbstractService = class {
354
355
  language,
355
356
  responseType: params.responseType,
356
357
  files: params.files,
357
- token: params.token
358
+ token: params.token,
359
+ baseUrl: params.baseUrl
358
360
  });
359
361
  break;
360
362
  case "PUT" /* PUT */:
@@ -365,7 +367,8 @@ var AbstractService = class {
365
367
  body: params.input,
366
368
  language,
367
369
  responseType: params.responseType,
368
- files: params.files
370
+ files: params.files,
371
+ baseUrl: params.baseUrl
369
372
  });
370
373
  break;
371
374
  case "PATCH" /* PATCH */:
@@ -377,7 +380,8 @@ var AbstractService = class {
377
380
  overridesJsonApiCreation: params.overridesJsonApiCreation,
378
381
  language,
379
382
  responseType: params.responseType,
380
- files: params.files
383
+ files: params.files,
384
+ baseUrl: params.baseUrl
381
385
  });
382
386
  break;
383
387
  case "DELETE" /* DELETE */:
@@ -386,7 +390,8 @@ var AbstractService = class {
386
390
  endpoint: params.endpoint,
387
391
  companyId: params.companyId,
388
392
  language,
389
- responseType: params.responseType
393
+ responseType: params.responseType,
394
+ baseUrl: params.baseUrl
390
395
  });
391
396
  break;
392
397
  default:
@@ -416,7 +421,7 @@ var AbstractService = class {
416
421
  * Make an API call and return both data and meta from the response.
417
422
  */
418
423
  static async callApiWithMeta(params) {
419
- const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-OSGJ63XR.js")));
424
+ const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-HE5LTEYK.js")));
420
425
  let apiResponse;
421
426
  let language = "en";
422
427
  if (typeof window === "undefined") {
@@ -501,7 +506,7 @@ var AbstractService = class {
501
506
  * Get raw JSON:API response data without deserialization.
502
507
  */
503
508
  static async getRawData(params) {
504
- const { JsonApiGet: JsonApiGet2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-OSGJ63XR.js")));
509
+ const { JsonApiGet: JsonApiGet2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-HE5LTEYK.js")));
505
510
  let language = "en";
506
511
  if (typeof window === "undefined") {
507
512
  const { getLocale } = await Promise.resolve().then(() => _interopRequireWildcard(require("next-intl/server")));
@@ -513,6 +518,7 @@ var AbstractService = class {
513
518
  classKey: params.type,
514
519
  endpoint: params.endpoint,
515
520
  companyId: params.companyId,
521
+ baseUrl: params.baseUrl,
516
522
  language
517
523
  });
518
524
  if (!apiResponse.ok) {
@@ -535,7 +541,7 @@ var _clientConfig = null;
535
541
  function configureClientJsonApi(config) {
536
542
  _clientConfig = config;
537
543
  if (config.bootstrapper) {
538
- _chunkJ5LROFGLjs.setBootstrapper.call(void 0, config.bootstrapper);
544
+ _chunkRCMIVTVLjs.setBootstrapper.call(void 0, config.bootstrapper);
539
545
  config.bootstrapper();
540
546
  }
541
547
  }
@@ -576,9 +582,10 @@ function runClientBootstrapper() {
576
582
  }
577
583
  }
578
584
  _chunk7QVYU63Ejs.__name.call(void 0, runClientBootstrapper, "runClientBootstrapper");
579
- function buildClientUrl(endpoint) {
580
- const apiUrl = getClientApiUrl();
581
- return endpoint.startsWith("http") ? endpoint : `${apiUrl}${endpoint}`;
585
+ function buildClientUrl(endpoint, baseUrl) {
586
+ if (endpoint.startsWith("http")) return endpoint;
587
+ const apiUrl = _nullishCoalesce(baseUrl, () => ( getClientApiUrl()));
588
+ return `${apiUrl}${endpoint}`;
582
589
  }
583
590
  _chunk7QVYU63Ejs.__name.call(void 0, buildClientUrl, "buildClientUrl");
584
591
  async function ClientJsonApiGet(params) {
@@ -586,13 +593,13 @@ async function ClientJsonApiGet(params) {
586
593
  const token = await _chunkLXKSUWAVjs.getClientToken.call(void 0, );
587
594
  const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
588
595
  method: "GET",
589
- url: buildClientUrl(params.endpoint),
596
+ url: buildClientUrl(params.endpoint, params.baseUrl),
590
597
  token,
591
598
  companyId: params.companyId,
592
599
  language: params.language,
593
600
  additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _26 => _26.additionalHeaders])
594
601
  });
595
- return _chunkJ5LROFGLjs.translateResponse.call(void 0, {
602
+ return _chunkRCMIVTVLjs.translateResponse.call(void 0, {
596
603
  classKey: params.classKey,
597
604
  apiResponse,
598
605
  companyId: params.companyId,
@@ -601,7 +608,8 @@ async function ClientJsonApiGet(params) {
601
608
  classKey: params.classKey,
602
609
  endpoint,
603
610
  companyId: params.companyId,
604
- language: params.language
611
+ language: params.language,
612
+ baseUrl: params.baseUrl
605
613
  }), "paginationHandler")
606
614
  });
607
615
  }
@@ -613,11 +621,11 @@ async function ClientJsonApiPost(params) {
613
621
  if (!body) {
614
622
  body = {};
615
623
  } else if (params.overridesJsonApiCreation !== true) {
616
- body = _chunkJ5LROFGLjs.JsonApiDataFactory.create(params.classKey, body);
624
+ body = _chunkRCMIVTVLjs.JsonApiDataFactory.create(params.classKey, body);
617
625
  }
618
626
  const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
619
627
  method: "POST",
620
- url: buildClientUrl(params.endpoint),
628
+ url: buildClientUrl(params.endpoint, params.baseUrl),
621
629
  token,
622
630
  body,
623
631
  files: params.files,
@@ -625,7 +633,7 @@ async function ClientJsonApiPost(params) {
625
633
  language: params.language,
626
634
  additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _27 => _27.additionalHeaders])
627
635
  });
628
- return _chunkJ5LROFGLjs.translateResponse.call(void 0, {
636
+ return _chunkRCMIVTVLjs.translateResponse.call(void 0, {
629
637
  classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
630
638
  apiResponse,
631
639
  companyId: params.companyId,
@@ -640,11 +648,11 @@ async function ClientJsonApiPut(params) {
640
648
  if (!body) {
641
649
  body = {};
642
650
  } else {
643
- body = _chunkJ5LROFGLjs.JsonApiDataFactory.create(params.classKey, body);
651
+ body = _chunkRCMIVTVLjs.JsonApiDataFactory.create(params.classKey, body);
644
652
  }
645
653
  const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
646
654
  method: "PUT",
647
- url: buildClientUrl(params.endpoint),
655
+ url: buildClientUrl(params.endpoint, params.baseUrl),
648
656
  token,
649
657
  body,
650
658
  files: params.files,
@@ -652,7 +660,7 @@ async function ClientJsonApiPut(params) {
652
660
  language: params.language,
653
661
  additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _28 => _28.additionalHeaders])
654
662
  });
655
- return _chunkJ5LROFGLjs.translateResponse.call(void 0, {
663
+ return _chunkRCMIVTVLjs.translateResponse.call(void 0, {
656
664
  classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
657
665
  apiResponse,
658
666
  companyId: params.companyId,
@@ -667,11 +675,11 @@ async function ClientJsonApiPatch(params) {
667
675
  if (!body) {
668
676
  body = {};
669
677
  } else if (params.overridesJsonApiCreation !== true) {
670
- body = _chunkJ5LROFGLjs.JsonApiDataFactory.create(params.classKey, body);
678
+ body = _chunkRCMIVTVLjs.JsonApiDataFactory.create(params.classKey, body);
671
679
  }
672
680
  const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
673
681
  method: "PATCH",
674
- url: buildClientUrl(params.endpoint),
682
+ url: buildClientUrl(params.endpoint, params.baseUrl),
675
683
  token,
676
684
  body,
677
685
  files: params.files,
@@ -679,7 +687,7 @@ async function ClientJsonApiPatch(params) {
679
687
  language: params.language,
680
688
  additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _29 => _29.additionalHeaders])
681
689
  });
682
- return _chunkJ5LROFGLjs.translateResponse.call(void 0, {
690
+ return _chunkRCMIVTVLjs.translateResponse.call(void 0, {
683
691
  classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
684
692
  apiResponse,
685
693
  companyId: params.companyId,
@@ -692,13 +700,13 @@ async function ClientJsonApiDelete(params) {
692
700
  const token = await _chunkLXKSUWAVjs.getClientToken.call(void 0, );
693
701
  const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
694
702
  method: "DELETE",
695
- url: buildClientUrl(params.endpoint),
703
+ url: buildClientUrl(params.endpoint, params.baseUrl),
696
704
  token,
697
705
  companyId: params.companyId,
698
706
  language: params.language,
699
707
  additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _30 => _30.additionalHeaders])
700
708
  });
701
- return _chunkJ5LROFGLjs.translateResponse.call(void 0, {
709
+ return _chunkRCMIVTVLjs.translateResponse.call(void 0, {
702
710
  classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
703
711
  apiResponse,
704
712
  companyId: params.companyId,
@@ -790,7 +798,8 @@ var ClientAbstractService = class {
790
798
  classKey: params.type,
791
799
  endpoint: params.endpoint,
792
800
  companyId: params.companyId,
793
- language
801
+ language,
802
+ baseUrl: params.baseUrl
794
803
  });
795
804
  break;
796
805
  case "POST" /* POST */:
@@ -802,7 +811,8 @@ var ClientAbstractService = class {
802
811
  overridesJsonApiCreation: params.overridesJsonApiCreation,
803
812
  language,
804
813
  responseType: params.responseType,
805
- files: params.files
814
+ files: params.files,
815
+ baseUrl: params.baseUrl
806
816
  });
807
817
  break;
808
818
  case "PUT" /* PUT */:
@@ -813,7 +823,8 @@ var ClientAbstractService = class {
813
823
  body: params.input,
814
824
  language,
815
825
  responseType: params.responseType,
816
- files: params.files
826
+ files: params.files,
827
+ baseUrl: params.baseUrl
817
828
  });
818
829
  break;
819
830
  case "PATCH" /* PATCH */:
@@ -825,7 +836,8 @@ var ClientAbstractService = class {
825
836
  overridesJsonApiCreation: params.overridesJsonApiCreation,
826
837
  language,
827
838
  responseType: params.responseType,
828
- files: params.files
839
+ files: params.files,
840
+ baseUrl: params.baseUrl
829
841
  });
830
842
  break;
831
843
  case "DELETE" /* DELETE */:
@@ -834,7 +846,8 @@ var ClientAbstractService = class {
834
846
  endpoint: params.endpoint,
835
847
  companyId: params.companyId,
836
848
  language,
837
- responseType: params.responseType
849
+ responseType: params.responseType,
850
+ baseUrl: params.baseUrl
838
851
  });
839
852
  break;
840
853
  default:
@@ -903,7 +916,7 @@ var ModuleRegistrar = (_class2 = class {
903
916
  }).map((key) => modulesClass[key]);
904
917
  data.forEach((item) => {
905
918
  if (item && item.model) {
906
- _chunkJ5LROFGLjs.DataClassRegistry.registerObjectClass(item, item.model);
919
+ _chunkRCMIVTVLjs.DataClassRegistry.registerObjectClass(item, item.model);
907
920
  }
908
921
  });
909
922
  this._isBootstrapped = true;
@@ -913,7 +926,7 @@ var ModuleRegistrar = (_class2 = class {
913
926
  */
914
927
  static reset() {
915
928
  this._isBootstrapped = false;
916
- _chunkJ5LROFGLjs.DataClassRegistry.clear();
929
+ _chunkRCMIVTVLjs.DataClassRegistry.clear();
917
930
  }
918
931
  }, _class2.__initStatic2(), _class2);
919
932
 
@@ -936,20 +949,20 @@ var ModuleRegistryClass = class {
936
949
  get(name) {
937
950
  let module = this._modules.get(name);
938
951
  if (!module) {
939
- const didBootstrap = _chunkJ5LROFGLjs.tryBootstrap.call(void 0, );
952
+ const didBootstrap = _chunkRCMIVTVLjs.tryBootstrap.call(void 0, );
940
953
  if (didBootstrap) {
941
954
  module = this._modules.get(name);
942
955
  }
943
956
  }
944
957
  if (!module) {
945
- const hint = _chunkJ5LROFGLjs.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.";
958
+ const hint = _chunkRCMIVTVLjs.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.";
946
959
  throw new Error(`Module "${String(name)}" not registered. ${hint}`);
947
960
  }
948
961
  return module;
949
962
  }
950
963
  findByName(moduleName) {
951
964
  if (this._modules.size === 0) {
952
- _chunkJ5LROFGLjs.tryBootstrap.call(void 0, );
965
+ _chunkRCMIVTVLjs.tryBootstrap.call(void 0, );
953
966
  }
954
967
  for (const module of this._modules.values()) {
955
968
  if (module.name === moduleName) {
@@ -960,7 +973,7 @@ var ModuleRegistryClass = class {
960
973
  }
961
974
  getAllPageUrls() {
962
975
  if (this._modules.size === 0) {
963
- _chunkJ5LROFGLjs.tryBootstrap.call(void 0, );
976
+ _chunkRCMIVTVLjs.tryBootstrap.call(void 0, );
964
977
  }
965
978
  const seen = /* @__PURE__ */ new Set();
966
979
  const result = [];
@@ -977,7 +990,7 @@ var ModuleRegistryClass = class {
977
990
  findByModelName(modelName) {
978
991
  let module = this._modules.get(modelName);
979
992
  if (!module) {
980
- const didBootstrap = _chunkJ5LROFGLjs.tryBootstrap.call(void 0, );
993
+ const didBootstrap = _chunkRCMIVTVLjs.tryBootstrap.call(void 0, );
981
994
  if (didBootstrap) {
982
995
  module = this._modules.get(modelName);
983
996
  }
@@ -999,7 +1012,7 @@ var ModuleRegistryClass = class {
999
1012
  }
1000
1013
  getAll() {
1001
1014
  if (this._modules.size === 0) {
1002
- _chunkJ5LROFGLjs.tryBootstrap.call(void 0, );
1015
+ _chunkRCMIVTVLjs.tryBootstrap.call(void 0, );
1003
1016
  }
1004
1017
  return Array.from(this._modules.values());
1005
1018
  }
@@ -2853,7 +2866,7 @@ var AuthService = class extends AbstractService {
2853
2866
  }
2854
2867
  static async login(params) {
2855
2868
  const language = params.language || "en-US";
2856
- const apiResponse = await _chunkJ5LROFGLjs.JsonApiPost.call(void 0, {
2869
+ const apiResponse = await _chunkRCMIVTVLjs.JsonApiPost.call(void 0, {
2857
2870
  classKey: Modules.Auth,
2858
2871
  endpoint: new EndpointCreator({ endpoint: Modules.Auth, id: "login" }).generate(),
2859
2872
  body: { email: params.email, password: params.password },
@@ -2887,7 +2900,7 @@ var AuthService = class extends AbstractService {
2887
2900
  }
2888
2901
  static async logout(params) {
2889
2902
  const language = _optionalChain([params, 'optionalAccess', _70 => _70.language]) || "en-US";
2890
- await _chunkJ5LROFGLjs.JsonApiDelete.call(void 0, {
2903
+ await _chunkRCMIVTVLjs.JsonApiDelete.call(void 0, {
2891
2904
  classKey: Modules.Auth,
2892
2905
  endpoint: new EndpointCreator({ endpoint: Modules.Auth }).generate(),
2893
2906
  language
@@ -2899,7 +2912,7 @@ var AuthService = class extends AbstractService {
2899
2912
  }
2900
2913
  static async initialiseForgotPassword(params) {
2901
2914
  const language = params.language || "en-US";
2902
- const response = await _chunkJ5LROFGLjs.JsonApiPost.call(void 0, {
2915
+ const response = await _chunkRCMIVTVLjs.JsonApiPost.call(void 0, {
2903
2916
  classKey: Modules.Auth,
2904
2917
  endpoint: new EndpointCreator({ endpoint: Modules.Auth, id: "forgot" }).generate(),
2905
2918
  body: { email: params.email },
@@ -2928,7 +2941,7 @@ var AuthService = class extends AbstractService {
2928
2941
  }
2929
2942
  static async validateCode(params) {
2930
2943
  const language = params.language || "en-US";
2931
- const apiResponse = await _chunkJ5LROFGLjs.JsonApiGet.call(void 0, {
2944
+ const apiResponse = await _chunkRCMIVTVLjs.JsonApiGet.call(void 0, {
2932
2945
  classKey: Modules.Auth,
2933
2946
  endpoint: new EndpointCreator({ endpoint: Modules.Auth, id: "validate", childEndpoint: params.code }).generate(),
2934
2947
  language
@@ -2972,7 +2985,7 @@ var AuthService = class extends AbstractService {
2972
2985
  }
2973
2986
  static async completeOAuthRegistration(params) {
2974
2987
  const endpoint = new EndpointCreator({ endpoint: Modules.Auth, id: "oauth", childEndpoint: "complete" });
2975
- const response = await _chunkJ5LROFGLjs.JsonApiPost.call(void 0, {
2988
+ const response = await _chunkRCMIVTVLjs.JsonApiPost.call(void 0, {
2976
2989
  classKey: Modules.Auth,
2977
2990
  endpoint: endpoint.generate(),
2978
2991
  body: params,
@@ -4735,7 +4748,7 @@ var StripePromotionCodeService = class {
4735
4748
  * @returns Validation result with discount details if valid
4736
4749
  */
4737
4750
  static async validatePromotionCode(params) {
4738
- const response = await _chunkJ5LROFGLjs.JsonApiPost.call(void 0, {
4751
+ const response = await _chunkRCMIVTVLjs.JsonApiPost.call(void 0, {
4739
4752
  classKey: Modules.StripePromotionCode,
4740
4753
  endpoint: `${STRIPE_PROMOTION_CODE_ENDPOINT}/validate`,
4741
4754
  body: {
@@ -7830,5 +7843,6 @@ var AuditLogModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (facto
7830
7843
 
7831
7844
 
7832
7845
 
7833
- exports.RehydrationFactory = RehydrationFactory; exports.AbstractApiData = AbstractApiData; exports.HttpMethod = HttpMethod; exports.getLastApiTotal = getLastApiTotal; exports.clearLastApiTotal = clearLastApiTotal; exports.setGlobalErrorHandler = setGlobalErrorHandler; exports.getGlobalErrorHandler = getGlobalErrorHandler; exports.AbstractService = AbstractService; exports.configureClientJsonApi = configureClientJsonApi; exports.getClientApiUrl = getClientApiUrl; exports.getClientAppUrl = getClientAppUrl; exports.getClientTrackablePages = getClientTrackablePages; 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.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.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.StripePriceService = StripePriceService; exports.StripePriceModule = StripePriceModule; exports.StripeProduct = StripeProduct; 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.Company = Company; exports.CompanyFields = CompanyFields; exports.CompanyService = CompanyService; 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.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.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.AuditLog = AuditLog; exports.AuditLogService = AuditLogService; exports.AuditLogModule = AuditLogModule;
7834
- //# sourceMappingURL=chunk-S2PTWBN6.js.map
7846
+
7847
+ exports.RehydrationFactory = RehydrationFactory; exports.AbstractApiData = AbstractApiData; exports.HttpMethod = HttpMethod; exports.getLastApiTotal = getLastApiTotal; exports.clearLastApiTotal = clearLastApiTotal; 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.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.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.StripePriceService = StripePriceService; exports.StripePriceModule = StripePriceModule; exports.StripeProduct = StripeProduct; 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.Company = Company; exports.CompanyFields = CompanyFields; exports.CompanyService = CompanyService; 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.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.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.AuditLog = AuditLog; exports.AuditLogService = AuditLogService; exports.AuditLogModule = AuditLogModule;
7848
+ //# sourceMappingURL=chunk-6P7MEU7Q.js.map