@carlonicora/nextjs-jsonapi 1.86.0 → 1.87.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/{BlockNoteEditor-7TZA4XEN.mjs → BlockNoteEditor-7KIMGZC2.mjs} +26 -7
  2. package/dist/BlockNoteEditor-7KIMGZC2.mjs.map +1 -0
  3. package/dist/{BlockNoteEditor-KRDP6OSE.js → BlockNoteEditor-WKJFAEPW.js} +36 -17
  4. package/dist/BlockNoteEditor-WKJFAEPW.js.map +1 -0
  5. package/dist/{JsonApiRequest-I2S75QTJ.mjs → JsonApiRequest-IYL5RZ7I.mjs} +2 -2
  6. package/dist/JsonApiRequest-OSGJ63XR.js +24 -0
  7. package/dist/{JsonApiRequest-CRRH5B5V.js.map → JsonApiRequest-OSGJ63XR.js.map} +1 -1
  8. package/dist/billing/index.js +347 -347
  9. package/dist/billing/index.mjs +4 -4
  10. package/dist/{chunk-6UMB5LTQ.mjs → chunk-3KDGODJ7.mjs} +5 -5
  11. package/dist/{chunk-NEJ7CDM3.mjs → chunk-CK3BMQWY.mjs} +3 -3
  12. package/dist/{chunk-KJ4ETLJB.mjs → chunk-IEJYBQ6J.mjs} +2 -2
  13. package/dist/{chunk-KJ4ETLJB.mjs.map → chunk-IEJYBQ6J.mjs.map} +1 -1
  14. package/dist/{chunk-3ZPK4QOB.js → chunk-IOLU4ASD.js} +2 -2
  15. package/dist/{chunk-3ZPK4QOB.js.map → chunk-IOLU4ASD.js.map} +1 -1
  16. package/dist/{chunk-4MN547K7.js → chunk-J5LROFGL.js} +2 -2
  17. package/dist/{chunk-4MN547K7.js.map → chunk-J5LROFGL.js.map} +1 -1
  18. package/dist/{chunk-BTKJFMFL.mjs → chunk-KK7PYKVI.mjs} +2 -2
  19. package/dist/{chunk-CZ56O6JZ.mjs → chunk-NQVPYC5J.mjs} +1411 -1305
  20. package/dist/chunk-NQVPYC5J.mjs.map +1 -0
  21. package/dist/{chunk-2AK4GRIB.js → chunk-SE5HIHJS.js} +9 -9
  22. package/dist/{chunk-2AK4GRIB.js.map → chunk-SE5HIHJS.js.map} +1 -1
  23. package/dist/{chunk-N4YZ45SK.js → chunk-XAWKRNYM.js} +30 -30
  24. package/dist/{chunk-N4YZ45SK.js.map → chunk-XAWKRNYM.js.map} +1 -1
  25. package/dist/{chunk-AMP2ZDAV.js → chunk-YRGMYOY6.js} +797 -691
  26. package/dist/chunk-YRGMYOY6.js.map +1 -0
  27. package/dist/client/index.js +5 -5
  28. package/dist/client/index.mjs +4 -4
  29. package/dist/components/index.d.mts +45 -2
  30. package/dist/components/index.d.ts +45 -2
  31. package/dist/components/index.js +9 -5
  32. package/dist/components/index.js.map +1 -1
  33. package/dist/components/index.mjs +8 -4
  34. package/dist/contexts/index.js +5 -5
  35. package/dist/contexts/index.mjs +4 -4
  36. package/dist/core/index.js +3 -3
  37. package/dist/core/index.mjs +2 -2
  38. package/dist/index.js +4 -4
  39. package/dist/index.mjs +3 -3
  40. package/dist/{request-XABCMU25.mjs → request-6VYDNP5T.mjs} +2 -2
  41. package/dist/request-UR7VPG3G.js +8 -0
  42. package/dist/request-UR7VPG3G.js.map +1 -0
  43. package/dist/server/index.js +18 -18
  44. package/dist/server/index.mjs +3 -3
  45. package/package.json +2 -1
  46. package/src/components/editors/BlockNoteEditor.tsx +27 -1
  47. package/src/components/editors/BlockNoteEditorMentionInlineContent.tsx +54 -0
  48. package/src/components/editors/BlockNoteEditorSuggestionMenuController.tsx +87 -0
  49. package/src/components/editors/index.ts +2 -0
  50. package/src/hooks/url.rewriter.ts +1 -4
  51. package/src/server/request.ts +1 -1
  52. package/dist/BlockNoteEditor-7TZA4XEN.mjs.map +0 -1
  53. package/dist/BlockNoteEditor-KRDP6OSE.js.map +0 -1
  54. package/dist/JsonApiRequest-CRRH5B5V.js +0 -24
  55. package/dist/chunk-AMP2ZDAV.js.map +0 -1
  56. package/dist/chunk-CZ56O6JZ.mjs.map +0 -1
  57. package/dist/request-GBLBPYFM.js +0 -8
  58. package/dist/request-GBLBPYFM.js.map +0 -1
  59. /package/dist/{JsonApiRequest-I2S75QTJ.mjs.map → JsonApiRequest-IYL5RZ7I.mjs.map} +0 -0
  60. /package/dist/{chunk-6UMB5LTQ.mjs.map → chunk-3KDGODJ7.mjs.map} +0 -0
  61. /package/dist/{chunk-NEJ7CDM3.mjs.map → chunk-CK3BMQWY.mjs.map} +0 -0
  62. /package/dist/{chunk-BTKJFMFL.mjs.map → chunk-KK7PYKVI.mjs.map} +0 -0
  63. /package/dist/{request-XABCMU25.mjs.map → request-6VYDNP5T.mjs.map} +0 -0
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkN4YZ45SKjs = require('./chunk-N4YZ45SK.js');
5
+ var _chunkXAWKRNYMjs = require('./chunk-XAWKRNYM.js');
6
6
 
7
7
 
8
- var _chunk4MN547K7js = require('./chunk-4MN547K7.js');
8
+ var _chunkJ5LROFGLjs = require('./chunk-J5LROFGL.js');
9
9
 
10
10
 
11
11
  var _chunk7QVYU63Ejs = require('./chunk-7QVYU63E.js');
@@ -15,7 +15,7 @@ var _clientConfig = null;
15
15
  function configureJsonApi(config) {
16
16
  _clientConfig = config;
17
17
  if (config.bootstrapper) {
18
- _chunk4MN547K7js.setBootstrapper.call(void 0, config.bootstrapper);
18
+ _chunkJ5LROFGLjs.setBootstrapper.call(void 0, config.bootstrapper);
19
19
  config.bootstrapper();
20
20
  }
21
21
  }
@@ -197,7 +197,7 @@ var COMPANY_ADMINISTRATOR_ROLE_ID = "2e1eee00-6cba-4506-9059-ccd24e4ea5b0";
197
197
  var ACTION_TYPES = ["read", "create", "update", "delete"];
198
198
 
199
199
  // src/features/rbac/data/RbacService.ts
200
- var RbacService = class extends _chunkN4YZ45SKjs.AbstractService {
200
+ var RbacService = class extends _chunkXAWKRNYMjs.AbstractService {
201
201
  static {
202
202
  _chunk7QVYU63Ejs.__name.call(void 0, this, "RbacService");
203
203
  }
@@ -208,9 +208,9 @@ var RbacService = class extends _chunkN4YZ45SKjs.AbstractService {
208
208
  * Dev-only endpoint — see class header.
209
209
  */
210
210
  static async fetchMatrix() {
211
- const endpoint = new (0, _chunkN4YZ45SKjs.EndpointCreator)({ endpoint: _chunkN4YZ45SKjs.Modules.RbacMatrix }).generate();
211
+ const endpoint = new (0, _chunkXAWKRNYMjs.EndpointCreator)({ endpoint: _chunkXAWKRNYMjs.Modules.RbacMatrix }).generate();
212
212
  const model = await this.callApi({
213
- type: _chunkN4YZ45SKjs.Modules.RbacMatrix,
213
+ type: _chunkXAWKRNYMjs.Modules.RbacMatrix,
214
214
  method: "GET" /* GET */,
215
215
  endpoint
216
216
  });
@@ -230,9 +230,9 @@ var RbacService = class extends _chunkN4YZ45SKjs.AbstractService {
230
230
  * Dev-only endpoint — see class header.
231
231
  */
232
232
  static async saveMatrix(args) {
233
- const endpoint = new (0, _chunkN4YZ45SKjs.EndpointCreator)({ endpoint: _chunkN4YZ45SKjs.Modules.RbacMatrix }).generate();
233
+ const endpoint = new (0, _chunkXAWKRNYMjs.EndpointCreator)({ endpoint: _chunkXAWKRNYMjs.Modules.RbacMatrix }).generate();
234
234
  const model = await this.callApi({
235
- type: _chunkN4YZ45SKjs.Modules.RbacMatrix,
235
+ type: _chunkXAWKRNYMjs.Modules.RbacMatrix,
236
236
  method: "PUT" /* PUT */,
237
237
  endpoint,
238
238
  input: args
@@ -276,4 +276,4 @@ var RbacService = class extends _chunkN4YZ45SKjs.AbstractService {
276
276
 
277
277
 
278
278
  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;
279
- //# sourceMappingURL=chunk-2AK4GRIB.js.map
279
+ //# sourceMappingURL=chunk-SE5HIHJS.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/chunk-2AK4GRIB.js","../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;ACNA,IAAI,cAAA,EAOO,IAAA;AAMJ,SAAS,gBAAA,CAAiB,MAAA,EAOxB;AACP,EAAA,cAAA,EAAgB,MAAA;AAEhB,EAAA,GAAA,CAAI,MAAA,CAAO,YAAA,EAAc;AACvB,IAAA,8CAAA,MAAgB,CAAO,YAAY,CAAA;AACnC,IAAA,MAAA,CAAO,YAAA,CAAa,CAAA;AAAA,EACtB;AACF;AAdgB,qCAAA,gBAAA,EAAA,kBAAA,CAAA;AAoBT,SAAS,qBAAA,CAAsB,M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A,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;AR2KA;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;AACF,y1CAAC","file":"/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/chunk-2AK4GRIB.js","sourcesContent":[null,"\"use client\";\n\nimport { ModuleWithPermissions } from \"../permissions/types\";\nimport { setBootstrapper } from \"../core/registry/bootstrapStore\";\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 */\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}): void {\n _clientConfig = config;\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-SE5HIHJS.js","../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;ACNA,IAAI,cAAA,EAOO,IAAA;AAMJ,SAAS,gBAAA,CAAiB,MAAA,EAOxB;AACP,EAAA,cAAA,EAAgB,MAAA;AAEhB,EAAA,GAAA,CAAI,MAAA,CAAO,YAAA,EAAc;AACvB,IAAA,8CAAA,MAAgB,CAAO,YAAY,CAAA;AACnC,IAAA,MAAA,CAAO,YAAA,CAAa,CAAA;AAAA,EACtB;AACF;AAdgB,qCAAA,gBAAA,EAAA,kBAAA,CAAA;AAoBT,SAAS,qBAAA,CAAsB,MAAA,EAI7B;AACP,EAAA,cAAA,EAAgB,MAAA;AAClB;AANgB,qCAAA,qBAAA,EAAA,uBAAA,CAAA;AAgBT,SAAS,SAAA,CAAA,EAAoB;AAClC,EAAA,GAAA,iBAAI,aAAA,2BAAe,QAAA,EAAQ;AACzB,IAAA,OAAO,aAAA,CAAc,MAAA;AAAA,EACvB;AACA,EAAA,GAAA,CAAI,OAAO,QAAA,IAAY,YAAA,mBAAe,OAAA,qBAAQ,GAAA,6BAAK,qBAAA,EAAqB;AACtE,IAAA,OAAO,OAAA,CAAQ,GAAA,CAAI,mBAAA;AAAA,EACrB;AACA,EAAA,OAAO,EAAA;AACT;AARgB,qCAAA,SAAA,EAAA,WAAA,CAAA;AAkBT,SAAS,eAAA,CAAA,EAA0B;AACxC,EAAA,GAAA,CAAI,OAAO,QAAA,IAAY,YAAA,mBAAe,OAAA,qBAAQ,GAAA,6BAAK,qBAAA,EAAqB;AACtE,IAAA,OAAO,OAAA,CAAQ,GAAA,CAAI,mBAAA;AAAA,EACrB;AACA,EAAA,OAAO,EAAA;AACT;AALgB,qCAAA,eAAA,EA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runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/chunk-SE5HIHJS.js","sourcesContent":[null,"\"use client\";\n\nimport { ModuleWithPermissions } from \"../permissions/types\";\nimport { setBootstrapper } from \"../core/registry/bootstrapStore\";\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 */\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}): void {\n _clientConfig = config;\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"]}
@@ -14,7 +14,7 @@ var _chunkIBS6NI7Djs = require('./chunk-IBS6NI7D.js');
14
14
 
15
15
 
16
16
 
17
- var _chunk4MN547K7js = require('./chunk-4MN547K7.js');
17
+ var _chunkJ5LROFGLjs = require('./chunk-J5LROFGL.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 = _chunk4MN547K7js.DataClassRegistry.get(classKey);
28
+ const factoryClass = _chunkJ5LROFGLjs.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 = _chunk4MN547K7js.DataClassRegistry.get(classKey);
33
+ const factoryClass = _chunkJ5LROFGLjs.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-CRRH5B5V.js")));
329
+ const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-OSGJ63XR.js")));
330
330
  let apiResponse;
331
331
  let language = "en";
332
332
  if (typeof window === "undefined") {
@@ -416,7 +416,7 @@ var AbstractService = class {
416
416
  * Make an API call and return both data and meta from the response.
417
417
  */
418
418
  static async callApiWithMeta(params) {
419
- const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-CRRH5B5V.js")));
419
+ const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-OSGJ63XR.js")));
420
420
  let apiResponse;
421
421
  let language = "en";
422
422
  if (typeof window === "undefined") {
@@ -501,7 +501,7 @@ var AbstractService = class {
501
501
  * Get raw JSON:API response data without deserialization.
502
502
  */
503
503
  static async getRawData(params) {
504
- const { JsonApiGet: JsonApiGet2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-CRRH5B5V.js")));
504
+ const { JsonApiGet: JsonApiGet2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-OSGJ63XR.js")));
505
505
  let language = "en";
506
506
  if (typeof window === "undefined") {
507
507
  const { getLocale } = await Promise.resolve().then(() => _interopRequireWildcard(require("next-intl/server")));
@@ -535,7 +535,7 @@ var _clientConfig = null;
535
535
  function configureClientJsonApi(config) {
536
536
  _clientConfig = config;
537
537
  if (config.bootstrapper) {
538
- _chunk4MN547K7js.setBootstrapper.call(void 0, config.bootstrapper);
538
+ _chunkJ5LROFGLjs.setBootstrapper.call(void 0, config.bootstrapper);
539
539
  config.bootstrapper();
540
540
  }
541
541
  }
@@ -592,7 +592,7 @@ async function ClientJsonApiGet(params) {
592
592
  language: params.language,
593
593
  additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _26 => _26.additionalHeaders])
594
594
  });
595
- return _chunk4MN547K7js.translateResponse.call(void 0, {
595
+ return _chunkJ5LROFGLjs.translateResponse.call(void 0, {
596
596
  classKey: params.classKey,
597
597
  apiResponse,
598
598
  companyId: params.companyId,
@@ -613,7 +613,7 @@ async function ClientJsonApiPost(params) {
613
613
  if (!body) {
614
614
  body = {};
615
615
  } else if (params.overridesJsonApiCreation !== true) {
616
- body = _chunk4MN547K7js.JsonApiDataFactory.create(params.classKey, body);
616
+ body = _chunkJ5LROFGLjs.JsonApiDataFactory.create(params.classKey, body);
617
617
  }
618
618
  const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
619
619
  method: "POST",
@@ -625,7 +625,7 @@ async function ClientJsonApiPost(params) {
625
625
  language: params.language,
626
626
  additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _27 => _27.additionalHeaders])
627
627
  });
628
- return _chunk4MN547K7js.translateResponse.call(void 0, {
628
+ return _chunkJ5LROFGLjs.translateResponse.call(void 0, {
629
629
  classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
630
630
  apiResponse,
631
631
  companyId: params.companyId,
@@ -640,7 +640,7 @@ async function ClientJsonApiPut(params) {
640
640
  if (!body) {
641
641
  body = {};
642
642
  } else {
643
- body = _chunk4MN547K7js.JsonApiDataFactory.create(params.classKey, body);
643
+ body = _chunkJ5LROFGLjs.JsonApiDataFactory.create(params.classKey, body);
644
644
  }
645
645
  const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
646
646
  method: "PUT",
@@ -652,7 +652,7 @@ async function ClientJsonApiPut(params) {
652
652
  language: params.language,
653
653
  additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _28 => _28.additionalHeaders])
654
654
  });
655
- return _chunk4MN547K7js.translateResponse.call(void 0, {
655
+ return _chunkJ5LROFGLjs.translateResponse.call(void 0, {
656
656
  classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
657
657
  apiResponse,
658
658
  companyId: params.companyId,
@@ -667,7 +667,7 @@ async function ClientJsonApiPatch(params) {
667
667
  if (!body) {
668
668
  body = {};
669
669
  } else if (params.overridesJsonApiCreation !== true) {
670
- body = _chunk4MN547K7js.JsonApiDataFactory.create(params.classKey, body);
670
+ body = _chunkJ5LROFGLjs.JsonApiDataFactory.create(params.classKey, body);
671
671
  }
672
672
  const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
673
673
  method: "PATCH",
@@ -679,7 +679,7 @@ async function ClientJsonApiPatch(params) {
679
679
  language: params.language,
680
680
  additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _29 => _29.additionalHeaders])
681
681
  });
682
- return _chunk4MN547K7js.translateResponse.call(void 0, {
682
+ return _chunkJ5LROFGLjs.translateResponse.call(void 0, {
683
683
  classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
684
684
  apiResponse,
685
685
  companyId: params.companyId,
@@ -698,7 +698,7 @@ async function ClientJsonApiDelete(params) {
698
698
  language: params.language,
699
699
  additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _30 => _30.additionalHeaders])
700
700
  });
701
- return _chunk4MN547K7js.translateResponse.call(void 0, {
701
+ return _chunkJ5LROFGLjs.translateResponse.call(void 0, {
702
702
  classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
703
703
  apiResponse,
704
704
  companyId: params.companyId,
@@ -903,7 +903,7 @@ var ModuleRegistrar = (_class2 = class {
903
903
  }).map((key) => modulesClass[key]);
904
904
  data.forEach((item) => {
905
905
  if (item && item.model) {
906
- _chunk4MN547K7js.DataClassRegistry.registerObjectClass(item, item.model);
906
+ _chunkJ5LROFGLjs.DataClassRegistry.registerObjectClass(item, item.model);
907
907
  }
908
908
  });
909
909
  this._isBootstrapped = true;
@@ -913,7 +913,7 @@ var ModuleRegistrar = (_class2 = class {
913
913
  */
914
914
  static reset() {
915
915
  this._isBootstrapped = false;
916
- _chunk4MN547K7js.DataClassRegistry.clear();
916
+ _chunkJ5LROFGLjs.DataClassRegistry.clear();
917
917
  }
918
918
  }, _class2.__initStatic2(), _class2);
919
919
 
@@ -936,20 +936,20 @@ var ModuleRegistryClass = class {
936
936
  get(name) {
937
937
  let module = this._modules.get(name);
938
938
  if (!module) {
939
- const didBootstrap = _chunk4MN547K7js.tryBootstrap.call(void 0, );
939
+ const didBootstrap = _chunkJ5LROFGLjs.tryBootstrap.call(void 0, );
940
940
  if (didBootstrap) {
941
941
  module = this._modules.get(name);
942
942
  }
943
943
  }
944
944
  if (!module) {
945
- const hint = _chunk4MN547K7js.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.";
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.";
946
946
  throw new Error(`Module "${String(name)}" not registered. ${hint}`);
947
947
  }
948
948
  return module;
949
949
  }
950
950
  findByName(moduleName) {
951
951
  if (this._modules.size === 0) {
952
- _chunk4MN547K7js.tryBootstrap.call(void 0, );
952
+ _chunkJ5LROFGLjs.tryBootstrap.call(void 0, );
953
953
  }
954
954
  for (const module of this._modules.values()) {
955
955
  if (module.name === moduleName) {
@@ -960,7 +960,7 @@ var ModuleRegistryClass = class {
960
960
  }
961
961
  getAllPageUrls() {
962
962
  if (this._modules.size === 0) {
963
- _chunk4MN547K7js.tryBootstrap.call(void 0, );
963
+ _chunkJ5LROFGLjs.tryBootstrap.call(void 0, );
964
964
  }
965
965
  const seen = /* @__PURE__ */ new Set();
966
966
  const result = [];
@@ -977,7 +977,7 @@ var ModuleRegistryClass = class {
977
977
  findByModelName(modelName) {
978
978
  let module = this._modules.get(modelName);
979
979
  if (!module) {
980
- const didBootstrap = _chunk4MN547K7js.tryBootstrap.call(void 0, );
980
+ const didBootstrap = _chunkJ5LROFGLjs.tryBootstrap.call(void 0, );
981
981
  if (didBootstrap) {
982
982
  module = this._modules.get(modelName);
983
983
  }
@@ -999,7 +999,7 @@ var ModuleRegistryClass = class {
999
999
  }
1000
1000
  getAll() {
1001
1001
  if (this._modules.size === 0) {
1002
- _chunk4MN547K7js.tryBootstrap.call(void 0, );
1002
+ _chunkJ5LROFGLjs.tryBootstrap.call(void 0, );
1003
1003
  }
1004
1004
  return Array.from(this._modules.values());
1005
1005
  }
@@ -2847,7 +2847,7 @@ var AuthService = class extends AbstractService {
2847
2847
  }
2848
2848
  static async login(params) {
2849
2849
  const language = params.language || "en-US";
2850
- const apiResponse = await _chunk4MN547K7js.JsonApiPost.call(void 0, {
2850
+ const apiResponse = await _chunkJ5LROFGLjs.JsonApiPost.call(void 0, {
2851
2851
  classKey: Modules.Auth,
2852
2852
  endpoint: new EndpointCreator({ endpoint: Modules.Auth, id: "login" }).generate(),
2853
2853
  body: { email: params.email, password: params.password },
@@ -2881,7 +2881,7 @@ var AuthService = class extends AbstractService {
2881
2881
  }
2882
2882
  static async logout(params) {
2883
2883
  const language = _optionalChain([params, 'optionalAccess', _70 => _70.language]) || "en-US";
2884
- await _chunk4MN547K7js.JsonApiDelete.call(void 0, {
2884
+ await _chunkJ5LROFGLjs.JsonApiDelete.call(void 0, {
2885
2885
  classKey: Modules.Auth,
2886
2886
  endpoint: new EndpointCreator({ endpoint: Modules.Auth }).generate(),
2887
2887
  language
@@ -2893,7 +2893,7 @@ var AuthService = class extends AbstractService {
2893
2893
  }
2894
2894
  static async initialiseForgotPassword(params) {
2895
2895
  const language = params.language || "en-US";
2896
- const response = await _chunk4MN547K7js.JsonApiPost.call(void 0, {
2896
+ const response = await _chunkJ5LROFGLjs.JsonApiPost.call(void 0, {
2897
2897
  classKey: Modules.Auth,
2898
2898
  endpoint: new EndpointCreator({ endpoint: Modules.Auth, id: "forgot" }).generate(),
2899
2899
  body: { email: params.email },
@@ -2922,7 +2922,7 @@ var AuthService = class extends AbstractService {
2922
2922
  }
2923
2923
  static async validateCode(params) {
2924
2924
  const language = params.language || "en-US";
2925
- const apiResponse = await _chunk4MN547K7js.JsonApiGet.call(void 0, {
2925
+ const apiResponse = await _chunkJ5LROFGLjs.JsonApiGet.call(void 0, {
2926
2926
  classKey: Modules.Auth,
2927
2927
  endpoint: new EndpointCreator({ endpoint: Modules.Auth, id: "validate", childEndpoint: params.code }).generate(),
2928
2928
  language
@@ -2966,7 +2966,7 @@ var AuthService = class extends AbstractService {
2966
2966
  }
2967
2967
  static async completeOAuthRegistration(params) {
2968
2968
  const endpoint = new EndpointCreator({ endpoint: Modules.Auth, id: "oauth", childEndpoint: "complete" });
2969
- const response = await _chunk4MN547K7js.JsonApiPost.call(void 0, {
2969
+ const response = await _chunkJ5LROFGLjs.JsonApiPost.call(void 0, {
2970
2970
  classKey: Modules.Auth,
2971
2971
  endpoint: endpoint.generate(),
2972
2972
  body: params,
@@ -4729,7 +4729,7 @@ var StripePromotionCodeService = class {
4729
4729
  * @returns Validation result with discount details if valid
4730
4730
  */
4731
4731
  static async validatePromotionCode(params) {
4732
- const response = await _chunk4MN547K7js.JsonApiPost.call(void 0, {
4732
+ const response = await _chunkJ5LROFGLjs.JsonApiPost.call(void 0, {
4733
4733
  classKey: Modules.StripePromotionCode,
4734
4734
  endpoint: `${STRIPE_PROMOTION_CODE_ENDPOINT}/validate`,
4735
4735
  body: {
@@ -7612,4 +7612,4 @@ var AuditLogModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (facto
7612
7612
 
7613
7613
 
7614
7614
  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.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.AssistantService = AssistantService; exports.AssistantMessage = AssistantMessage; 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;
7615
- //# sourceMappingURL=chunk-N4YZ45SK.js.map
7615
+ //# sourceMappingURL=chunk-XAWKRNYM.js.map