@carlonicora/nextjs-jsonapi 3.5.9 → 3.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BlockNoteEditor-5AQQQQY3.mjs → BlockNoteEditor-5MOYLQXK.mjs} +5 -5
- package/dist/{BlockNoteEditor-EWMWY4SK.js → BlockNoteEditor-5UUTCRSX.js} +20 -20
- package/dist/{BlockNoteEditor-EWMWY4SK.js.map → BlockNoteEditor-5UUTCRSX.js.map} +1 -1
- package/dist/{JsonApiRequest-ADNIGXTP.mjs → JsonApiRequest-7AEQWMLJ.mjs} +2 -2
- package/dist/JsonApiRequest-E4PZPH3N.js +26 -0
- package/dist/{JsonApiRequest-WWGSGV2I.js.map → JsonApiRequest-E4PZPH3N.js.map} +1 -1
- package/dist/billing/index.js +399 -399
- package/dist/billing/index.mjs +4 -4
- package/dist/{chunk-DK5ZOPVF.mjs → chunk-2D4MFVDV.mjs} +3 -3
- package/dist/{chunk-RVASYIQG.mjs → chunk-BMVA2IM5.mjs} +2 -5
- package/dist/chunk-BMVA2IM5.mjs.map +1 -0
- package/dist/{chunk-H37WRSBU.mjs → chunk-HDZ2BL6D.mjs} +5 -5
- package/dist/{chunk-W42MYR3Y.js → chunk-LU7DJ4QF.js} +2 -5
- package/dist/chunk-LU7DJ4QF.js.map +1 -0
- package/dist/{chunk-EJIWXCXI.js → chunk-P7XPRUQI.js} +773 -773
- package/dist/{chunk-EJIWXCXI.js.map → chunk-P7XPRUQI.js.map} +1 -1
- package/dist/{chunk-OE2WEAPU.mjs → chunk-T4PD3Z6G.mjs} +7 -7
- package/dist/{chunk-B2OB3HQO.js → chunk-TULJCLZA.js} +13 -13
- package/dist/{chunk-B2OB3HQO.js.map → chunk-TULJCLZA.js.map} +1 -1
- package/dist/{chunk-PGA2VC3S.js → chunk-UYLS3LJW.js} +32 -32
- package/dist/{chunk-PGA2VC3S.js.map → chunk-UYLS3LJW.js.map} +1 -1
- package/dist/client/index.js +5 -5
- package/dist/client/index.mjs +4 -4
- package/dist/components/index.js +5 -5
- package/dist/components/index.mjs +4 -4
- package/dist/contexts/index.js +5 -5
- package/dist/contexts/index.mjs +4 -4
- package/dist/core/index.js +3 -3
- package/dist/core/index.mjs +2 -2
- package/dist/features/help/index.js +38 -38
- package/dist/features/help/index.mjs +4 -4
- package/dist/features/tokenusage/index.js +102 -102
- package/dist/features/tokenusage/index.mjs +4 -4
- package/dist/index.js +4 -4
- package/dist/index.mjs +3 -3
- package/dist/server/index.js +14 -14
- package/dist/server/index.mjs +2 -2
- package/package.json +1 -1
- package/src/core/registry/DataClassRegistry.ts +7 -4
- package/src/core/registry/__tests__/DataClassRegistry.test.ts +14 -0
- package/dist/JsonApiRequest-WWGSGV2I.js +0 -26
- package/dist/chunk-RVASYIQG.mjs.map +0 -1
- package/dist/chunk-W42MYR3Y.js.map +0 -1
- /package/dist/{BlockNoteEditor-5AQQQQY3.mjs.map → BlockNoteEditor-5MOYLQXK.mjs.map} +0 -0
- /package/dist/{JsonApiRequest-ADNIGXTP.mjs.map → JsonApiRequest-7AEQWMLJ.mjs.map} +0 -0
- /package/dist/{chunk-DK5ZOPVF.mjs.map → chunk-2D4MFVDV.mjs.map} +0 -0
- /package/dist/{chunk-H37WRSBU.mjs.map → chunk-HDZ2BL6D.mjs.map} +0 -0
- /package/dist/{chunk-OE2WEAPU.mjs.map → chunk-T4PD3Z6G.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkTULJCLZAjs = require('./chunk-TULJCLZA.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -226,7 +226,7 @@ var _chunkB2OB3HQOjs = require('./chunk-B2OB3HQO.js');
|
|
|
226
226
|
|
|
227
227
|
|
|
228
228
|
|
|
229
|
-
var
|
|
229
|
+
var _chunkUYLS3LJWjs = require('./chunk-UYLS3LJW.js');
|
|
230
230
|
require('./chunk-LXKSUWAV.js');
|
|
231
231
|
require('./chunk-IBS6NI7D.js');
|
|
232
232
|
|
|
@@ -240,7 +240,7 @@ require('./chunk-IBS6NI7D.js');
|
|
|
240
240
|
|
|
241
241
|
|
|
242
242
|
|
|
243
|
-
var
|
|
243
|
+
var _chunkLU7DJ4QFjs = require('./chunk-LU7DJ4QF.js');
|
|
244
244
|
require('./chunk-7QVYU63E.js');
|
|
245
245
|
|
|
246
246
|
|
|
@@ -479,5 +479,5 @@ require('./chunk-7QVYU63E.js');
|
|
|
479
479
|
|
|
480
480
|
|
|
481
481
|
|
|
482
|
-
exports.ACTION_TYPES = _chunkB2OB3HQOjs.ACTION_TYPES; exports.AVAILABLE_OAUTH_SCOPES = _chunkPGA2VC3Sjs.AVAILABLE_OAUTH_SCOPES; exports.AbstractApiData = _chunkPGA2VC3Sjs.AbstractApiData; exports.AbstractService = _chunkPGA2VC3Sjs.AbstractService; exports.Action = _chunkPGA2VC3Sjs.Action; exports.AiConnection = _chunkPGA2VC3Sjs.AiConnection; exports.AiConnectionFields = _chunkPGA2VC3Sjs.AiConnectionFields; exports.AiConnectionModule = _chunkPGA2VC3Sjs.AiConnectionModule; exports.AiConnectionService = _chunkPGA2VC3Sjs.AiConnectionService; exports.Assistant = _chunkPGA2VC3Sjs.Assistant; exports.AssistantAction = _chunkPGA2VC3Sjs.AssistantAction; exports.AssistantActionModule = _chunkPGA2VC3Sjs.AssistantActionModule; exports.AssistantActionService = _chunkPGA2VC3Sjs.AssistantActionService; exports.AssistantMessage = _chunkPGA2VC3Sjs.AssistantMessage; exports.AssistantMessageModule = _chunkPGA2VC3Sjs.AssistantMessageModule; exports.AssistantMessageService = _chunkPGA2VC3Sjs.AssistantMessageService; exports.AssistantModule = _chunkPGA2VC3Sjs.AssistantModule; exports.AssistantService = _chunkPGA2VC3Sjs.AssistantService; exports.AuditLog = _chunkPGA2VC3Sjs.AuditLog; exports.AuditLogModule = _chunkPGA2VC3Sjs.AuditLogModule; exports.AuditLogService = _chunkPGA2VC3Sjs.AuditLogService; exports.Auth = _chunkPGA2VC3Sjs.Auth; exports.AuthComponent = _chunkPGA2VC3Sjs.AuthComponent; exports.AuthModule = _chunkPGA2VC3Sjs.AuthModule; exports.AuthService = _chunkPGA2VC3Sjs.AuthService; exports.AuthorModule = _chunkPGA2VC3Sjs.AuthorModule; exports.BackupCodeVerify = _chunkPGA2VC3Sjs.BackupCodeVerify; exports.BackupCodeVerifyModule = _chunkPGA2VC3Sjs.BackupCodeVerifyModule; exports.Billing = _chunkPGA2VC3Sjs.Billing; exports.BillingModule = _chunkPGA2VC3Sjs.BillingModule; exports.BillingService = _chunkPGA2VC3Sjs.BillingService; exports.BlockNoteDiffUtil = _chunkPGA2VC3Sjs.BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = _chunkPGA2VC3Sjs.BlockNoteWordDiffRendererUtil; exports.COMPANY_ADMINISTRATOR_ROLE_ID = _chunkB2OB3HQOjs.COMPANY_ADMINISTRATOR_ROLE_ID; exports.CURRENT_USER_STORAGE_KEY = _chunkPGA2VC3Sjs.CURRENT_USER_STORAGE_KEY; exports.Chunk = _chunkPGA2VC3Sjs.Chunk; exports.ChunkModule = _chunkPGA2VC3Sjs.ChunkModule; exports.ClientAbstractService = _chunkPGA2VC3Sjs.ClientAbstractService; exports.ClientHttpMethod = _chunkPGA2VC3Sjs.ClientHttpMethod; exports.Company = _chunkPGA2VC3Sjs.Company; exports.CompanyFields = _chunkPGA2VC3Sjs.CompanyFields; exports.CompanyModule = _chunkPGA2VC3Sjs.CompanyModule; exports.CompanyService = _chunkPGA2VC3Sjs.CompanyService; exports.Content = _chunkPGA2VC3Sjs.Content; exports.ContentFields = _chunkPGA2VC3Sjs.ContentFields; exports.ContentModule = _chunkPGA2VC3Sjs.ContentModule; exports.ContentService = _chunkPGA2VC3Sjs.ContentService; exports.DEFAULT_GRANT_TYPES = _chunkPGA2VC3Sjs.DEFAULT_GRANT_TYPES; exports.DataClass = _chunkW42MYR3Yjs.DataClassRegistry; exports.DataClassRegistry = _chunkW42MYR3Yjs.DataClassRegistry; exports.ENV = _chunkW42MYR3Yjs.ENV; exports.EndpointCreator = _chunkPGA2VC3Sjs.EndpointCreator; exports.EntityAiStatus = _chunkPGA2VC3Sjs.EntityAiStatus; exports.Feature = _chunkPGA2VC3Sjs.Feature; exports.FeatureModule = _chunkPGA2VC3Sjs.FeatureModule; exports.FeatureService = _chunkPGA2VC3Sjs.FeatureService; exports.HowTo = _chunkPGA2VC3Sjs.HowTo; exports.HowToFields = _chunkPGA2VC3Sjs.HowToFields; exports.HowToModule = _chunkPGA2VC3Sjs.HowToModule; exports.HowToService = _chunkPGA2VC3Sjs.HowToService; exports.HttpMethod = _chunkPGA2VC3Sjs.HttpMethod; exports.InvoiceStatus = _chunkPGA2VC3Sjs.InvoiceStatus; exports.JsonApiDataFactory = _chunkW42MYR3Yjs.JsonApiDataFactory; exports.MOBILE_BREAKPOINT = _chunkPGA2VC3Sjs.MOBILE_BREAKPOINT; exports.Module = _chunkPGA2VC3Sjs.Module; exports.ModuleModule = _chunkPGA2VC3Sjs.ModuleModule; exports.ModulePaths = _chunkPGA2VC3Sjs.ModulePaths; exports.ModulePathsModule = _chunkPGA2VC3Sjs.ModulePathsModule; exports.ModuleRegistrar = _chunkPGA2VC3Sjs.ModuleRegistrar; exports.ModuleRegistry = _chunkPGA2VC3Sjs.ModuleRegistry; exports.Modules = _chunkPGA2VC3Sjs.Modules; exports.Notification = _chunkPGA2VC3Sjs.Notification; exports.NotificationFields = _chunkPGA2VC3Sjs.NotificationFields; exports.NotificationModule = _chunkPGA2VC3Sjs.NotificationModule; exports.NotificationService = _chunkPGA2VC3Sjs.NotificationService; exports.OAUTH_SCOPE_DISPLAY = _chunkPGA2VC3Sjs.OAUTH_SCOPE_DISPLAY; exports.OAuthClient = _chunkPGA2VC3Sjs.OAuthClient; exports.OAuthModule = _chunkPGA2VC3Sjs.OAuthModule; exports.OAuthService = _chunkPGA2VC3Sjs.OAuthService; exports.Passkey = _chunkPGA2VC3Sjs.Passkey; exports.PasskeyAuthenticationOptions = _chunkPGA2VC3Sjs.PasskeyAuthenticationOptions; exports.PasskeyAuthenticationOptionsModule = _chunkPGA2VC3Sjs.PasskeyAuthenticationOptionsModule; exports.PasskeyModule = _chunkPGA2VC3Sjs.PasskeyModule; exports.PasskeyRegistrationOptions = _chunkPGA2VC3Sjs.PasskeyRegistrationOptions; exports.PasskeyRegistrationOptionsModule = _chunkPGA2VC3Sjs.PasskeyRegistrationOptionsModule; exports.PasskeyRegistrationVerify = _chunkPGA2VC3Sjs.PasskeyRegistrationVerify; exports.PasskeyRegistrationVerifyModule = _chunkPGA2VC3Sjs.PasskeyRegistrationVerifyModule; exports.PasskeyRename = _chunkPGA2VC3Sjs.PasskeyRename; exports.PasskeyRenameModule = _chunkPGA2VC3Sjs.PasskeyRenameModule; exports.PasskeyVerifyLogin = _chunkPGA2VC3Sjs.PasskeyVerifyLogin; exports.PasskeyVerifyLoginModule = _chunkPGA2VC3Sjs.PasskeyVerifyLoginModule; exports.PaymentMethod = _chunkPGA2VC3Sjs.PaymentMethod; exports.PermissionMapping = _chunkPGA2VC3Sjs.PermissionMapping; exports.PermissionMappingModule = _chunkPGA2VC3Sjs.PermissionMappingModule; exports.Push = _chunkPGA2VC3Sjs.Push; exports.PushModule = _chunkPGA2VC3Sjs.PushModule; exports.PushService = _chunkPGA2VC3Sjs.PushService; exports.RbacMatrixModel = _chunkPGA2VC3Sjs.RbacMatrixModel; exports.RbacMatrixModule = _chunkPGA2VC3Sjs.RbacMatrixModule; exports.RbacService = _chunkB2OB3HQOjs.RbacService; exports.ReferralModule = _chunkPGA2VC3Sjs.ReferralModule; exports.ReferralService = _chunkPGA2VC3Sjs.ReferralService; exports.ReferralStats = _chunkPGA2VC3Sjs.ReferralStats; exports.ReferralStatsModule = _chunkPGA2VC3Sjs.ReferralStatsModule; exports.RehydrationFactory = _chunkPGA2VC3Sjs.RehydrationFactory; exports.Role = _chunkPGA2VC3Sjs.Role; exports.RoleFields = _chunkPGA2VC3Sjs.RoleFields; exports.RoleModule = _chunkPGA2VC3Sjs.RoleModule; exports.RoleService = _chunkPGA2VC3Sjs.RoleService; exports.S3 = _chunkPGA2VC3Sjs.S3; exports.S3Module = _chunkPGA2VC3Sjs.S3Module; exports.S3Service = _chunkPGA2VC3Sjs.S3Service; exports.StripeCustomer = _chunkPGA2VC3Sjs.StripeCustomer; exports.StripeCustomerModule = _chunkPGA2VC3Sjs.StripeCustomerModule; exports.StripeCustomerService = _chunkPGA2VC3Sjs.StripeCustomerService; exports.StripeInvoice = _chunkPGA2VC3Sjs.StripeInvoice; exports.StripeInvoiceModule = _chunkPGA2VC3Sjs.StripeInvoiceModule; exports.StripeInvoiceService = _chunkPGA2VC3Sjs.StripeInvoiceService; exports.StripePaymentMethodModule = _chunkPGA2VC3Sjs.StripePaymentMethodModule; exports.StripePrice = _chunkPGA2VC3Sjs.StripePrice; exports.StripePriceFields = _chunkPGA2VC3Sjs.StripePriceFields; exports.StripePriceModule = _chunkPGA2VC3Sjs.StripePriceModule; exports.StripePriceService = _chunkPGA2VC3Sjs.StripePriceService; exports.StripeProduct = _chunkPGA2VC3Sjs.StripeProduct; exports.StripeProductFields = _chunkPGA2VC3Sjs.StripeProductFields; exports.StripeProductModule = _chunkPGA2VC3Sjs.StripeProductModule; exports.StripeProductService = _chunkPGA2VC3Sjs.StripeProductService; exports.StripePromotionCode = _chunkPGA2VC3Sjs.StripePromotionCode; exports.StripePromotionCodeModule = _chunkPGA2VC3Sjs.StripePromotionCodeModule; exports.StripePromotionCodeService = _chunkPGA2VC3Sjs.StripePromotionCodeService; exports.StripeSubscription = _chunkPGA2VC3Sjs.StripeSubscription; exports.StripeSubscriptionModule = _chunkPGA2VC3Sjs.StripeSubscriptionModule; exports.StripeSubscriptionService = _chunkPGA2VC3Sjs.StripeSubscriptionService; exports.StripeUsage = _chunkPGA2VC3Sjs.StripeUsage; exports.StripeUsageModule = _chunkPGA2VC3Sjs.StripeUsageModule; exports.StripeUsageService = _chunkPGA2VC3Sjs.StripeUsageService; exports.SubscriptionStatus = _chunkPGA2VC3Sjs.SubscriptionStatus; exports.TableOptions = _chunkPGA2VC3Sjs.TableOptions; exports.TokenUsageAdminBreakdownModule = _chunkPGA2VC3Sjs.TokenUsageAdminBreakdownModule; exports.TokenUsageAdminSummaryModule = _chunkPGA2VC3Sjs.TokenUsageAdminSummaryModule; exports.TokenUsageAdminTimelineModule = _chunkPGA2VC3Sjs.TokenUsageAdminTimelineModule; exports.TotpAuthenticator = _chunkPGA2VC3Sjs.TotpAuthenticator; exports.TotpAuthenticatorModule = _chunkPGA2VC3Sjs.TotpAuthenticatorModule; exports.TotpSetup = _chunkPGA2VC3Sjs.TotpSetup; exports.TotpSetupModule = _chunkPGA2VC3Sjs.TotpSetupModule; exports.TotpVerify = _chunkPGA2VC3Sjs.TotpVerify; exports.TotpVerifyLogin = _chunkPGA2VC3Sjs.TotpVerifyLogin; exports.TotpVerifyLoginModule = _chunkPGA2VC3Sjs.TotpVerifyLoginModule; exports.TotpVerifyModule = _chunkPGA2VC3Sjs.TotpVerifyModule; exports.TwoFactorChallenge = _chunkPGA2VC3Sjs.TwoFactorChallenge; exports.TwoFactorChallengeModule = _chunkPGA2VC3Sjs.TwoFactorChallengeModule; exports.TwoFactorEnable = _chunkPGA2VC3Sjs.TwoFactorEnable; exports.TwoFactorEnableModule = _chunkPGA2VC3Sjs.TwoFactorEnableModule; exports.TwoFactorService = _chunkPGA2VC3Sjs.TwoFactorService; exports.TwoFactorStatus = _chunkPGA2VC3Sjs.TwoFactorStatus; exports.TwoFactorStatusModule = _chunkPGA2VC3Sjs.TwoFactorStatusModule; exports.User = _chunkPGA2VC3Sjs.User; exports.UserFields = _chunkPGA2VC3Sjs.UserFields; exports.UserModule = _chunkPGA2VC3Sjs.UserModule; exports.UserService = _chunkPGA2VC3Sjs.UserService; exports.VIEWPORT_COOKIE_NAME = _chunkPGA2VC3Sjs.VIEWPORT_COOKIE_NAME; exports.Waitlist = _chunkPGA2VC3Sjs.Waitlist; exports.WaitlistModule = _chunkPGA2VC3Sjs.WaitlistModule; exports.WaitlistService = _chunkPGA2VC3Sjs.WaitlistService; exports.WaitlistStats = _chunkPGA2VC3Sjs.WaitlistStats; exports.WaitlistStatsModule = _chunkPGA2VC3Sjs.WaitlistStatsModule; exports.checkPermissions = _chunkPGA2VC3Sjs.checkPermissions; exports.checkPermissionsFromServer = _chunkPGA2VC3Sjs.checkPermissionsFromServer; exports.clearLastApiMeta = _chunkPGA2VC3Sjs.clearLastApiMeta; exports.clearLastApiTotal = _chunkPGA2VC3Sjs.clearLastApiTotal; exports.cn = _chunkPGA2VC3Sjs.cn; exports.composeRefs = _chunkPGA2VC3Sjs.composeRefs; exports.configureAuth = _chunkPGA2VC3Sjs.configureAuth; exports.configureI18n = _chunkB2OB3HQOjs.configureI18n; exports.configureJsonApi = _chunkB2OB3HQOjs.configureJsonApi; exports.configureLogin = _chunkB2OB3HQOjs.configureLogin; exports.configureReferral = _chunkB2OB3HQOjs.configureReferral; exports.configureRoles = _chunkB2OB3HQOjs.configureRoles; exports.configureTokenUsage = _chunkPGA2VC3Sjs.configureTokenUsage; exports.configureWaitlist = _chunkB2OB3HQOjs.configureWaitlist; exports.createJsonApiInclusion = _chunkPGA2VC3Sjs.createJsonApiInclusion; exports.dismissToast = _chunkPGA2VC3Sjs.dismissToast; exports.entityObjectSchema = _chunkPGA2VC3Sjs.entityObjectSchema; exports.exists = _chunkPGA2VC3Sjs.exists; exports.formatCodiceFiscale = _chunkPGA2VC3Sjs.formatCodiceFiscale; exports.formatDate = _chunkPGA2VC3Sjs.formatDate; exports.formatLocalDate = _chunkPGA2VC3Sjs.formatLocalDate; exports.formatPartitaIva = _chunkPGA2VC3Sjs.formatPartitaIva; exports.getApiUrl = _chunkB2OB3HQOjs.getApiUrl; exports.getAppUrl = _chunkB2OB3HQOjs.getAppUrl; exports.getBootstrapper = _chunkW42MYR3Yjs.getBootstrapper; exports.getClientGlobalErrorHandler = _chunkPGA2VC3Sjs.getClientGlobalErrorHandler; exports.getGlobalErrorHandler = _chunkPGA2VC3Sjs.getGlobalErrorHandler; exports.getIcon = _chunkPGA2VC3Sjs.getIcon; exports.getIconByModule = _chunkPGA2VC3Sjs.getIconByModule; exports.getIconByModuleName = _chunkPGA2VC3Sjs.getIconByModuleName; exports.getInitials = _chunkPGA2VC3Sjs.getInitials; exports.getLastApiMeta = _chunkPGA2VC3Sjs.getLastApiMeta; exports.getLastApiTotal = _chunkPGA2VC3Sjs.getLastApiTotal; exports.getLucideIcon = _chunkPGA2VC3Sjs.getLucideIcon; exports.getLucideIconByModule = _chunkPGA2VC3Sjs.getLucideIconByModule; exports.getLucideIconByModuleName = _chunkPGA2VC3Sjs.getLucideIconByModuleName; exports.getPublicApiUrl = _chunkB2OB3HQOjs.getPublicApiUrl; exports.getReferralConfig = _chunkB2OB3HQOjs.getReferralConfig; exports.getRoleId = _chunkB2OB3HQOjs.getRoleId; exports.getStripePublishableKey = _chunkB2OB3HQOjs.getStripePublishableKey; exports.getTableComponents = _chunkPGA2VC3Sjs.getTableComponents; exports.getTableOptions = _chunkPGA2VC3Sjs.getTableOptions; exports.getTokenHandler = _chunkPGA2VC3Sjs.getTokenHandler; exports.getTokenUsageCurrency = _chunkPGA2VC3Sjs.getTokenUsageCurrency; exports.getTrackablePages = _chunkB2OB3HQOjs.getTrackablePages; exports.getValueFromPath = _chunkPGA2VC3Sjs.getValueFromPath; exports.getWaitlistConfig = _chunkB2OB3HQOjs.getWaitlistConfig; exports.hasBootstrapper = _chunkW42MYR3Yjs.hasBootstrapper; exports.isReferralEnabled = _chunkB2OB3HQOjs.isReferralEnabled; exports.isRemoteImageSrc = _chunkPGA2VC3Sjs.isRemoteImageSrc; exports.isRolesConfigured = _chunkB2OB3HQOjs.isRolesConfigured; exports.rehydrate = _chunkPGA2VC3Sjs.rehydrate; exports.rehydrateList = _chunkPGA2VC3Sjs.rehydrateList; exports.resetBootstrapStore = _chunkW42MYR3Yjs.resetBootstrapStore; exports.setBootstrapper = _chunkW42MYR3Yjs.setBootstrapper; exports.setClientGlobalErrorHandler = _chunkPGA2VC3Sjs.setClientGlobalErrorHandler; exports.setGlobalErrorHandler = _chunkPGA2VC3Sjs.setGlobalErrorHandler; exports.showCustomToast = _chunkPGA2VC3Sjs.showCustomToast; exports.showError = _chunkPGA2VC3Sjs.showError; exports.showToast = _chunkPGA2VC3Sjs.showToast; exports.tokenUsageModules = _chunkPGA2VC3Sjs.tokenUsageModules; exports.translateData = _chunkW42MYR3Yjs.translateData; exports.translateResponse = _chunkW42MYR3Yjs.translateResponse; exports.tryBootstrap = _chunkW42MYR3Yjs.tryBootstrap; exports.useComposedRefs = _chunkPGA2VC3Sjs.useComposedRefs; exports.useIsMobile = _chunkPGA2VC3Sjs.useIsMobile; exports.userObjectSchema = _chunkPGA2VC3Sjs.userObjectSchema; exports.validateCodiceFiscale = _chunkPGA2VC3Sjs.validateCodiceFiscale; exports.validateItalianTaxCode = _chunkPGA2VC3Sjs.validateItalianTaxCode; exports.validatePartitaIva = _chunkPGA2VC3Sjs.validatePartitaIva;
|
|
482
|
+
exports.ACTION_TYPES = _chunkTULJCLZAjs.ACTION_TYPES; exports.AVAILABLE_OAUTH_SCOPES = _chunkUYLS3LJWjs.AVAILABLE_OAUTH_SCOPES; exports.AbstractApiData = _chunkUYLS3LJWjs.AbstractApiData; exports.AbstractService = _chunkUYLS3LJWjs.AbstractService; exports.Action = _chunkUYLS3LJWjs.Action; exports.AiConnection = _chunkUYLS3LJWjs.AiConnection; exports.AiConnectionFields = _chunkUYLS3LJWjs.AiConnectionFields; exports.AiConnectionModule = _chunkUYLS3LJWjs.AiConnectionModule; exports.AiConnectionService = _chunkUYLS3LJWjs.AiConnectionService; exports.Assistant = _chunkUYLS3LJWjs.Assistant; exports.AssistantAction = _chunkUYLS3LJWjs.AssistantAction; exports.AssistantActionModule = _chunkUYLS3LJWjs.AssistantActionModule; exports.AssistantActionService = _chunkUYLS3LJWjs.AssistantActionService; exports.AssistantMessage = _chunkUYLS3LJWjs.AssistantMessage; exports.AssistantMessageModule = _chunkUYLS3LJWjs.AssistantMessageModule; exports.AssistantMessageService = _chunkUYLS3LJWjs.AssistantMessageService; exports.AssistantModule = _chunkUYLS3LJWjs.AssistantModule; exports.AssistantService = _chunkUYLS3LJWjs.AssistantService; exports.AuditLog = _chunkUYLS3LJWjs.AuditLog; exports.AuditLogModule = _chunkUYLS3LJWjs.AuditLogModule; exports.AuditLogService = _chunkUYLS3LJWjs.AuditLogService; exports.Auth = _chunkUYLS3LJWjs.Auth; exports.AuthComponent = _chunkUYLS3LJWjs.AuthComponent; exports.AuthModule = _chunkUYLS3LJWjs.AuthModule; exports.AuthService = _chunkUYLS3LJWjs.AuthService; exports.AuthorModule = _chunkUYLS3LJWjs.AuthorModule; exports.BackupCodeVerify = _chunkUYLS3LJWjs.BackupCodeVerify; exports.BackupCodeVerifyModule = _chunkUYLS3LJWjs.BackupCodeVerifyModule; exports.Billing = _chunkUYLS3LJWjs.Billing; exports.BillingModule = _chunkUYLS3LJWjs.BillingModule; exports.BillingService = _chunkUYLS3LJWjs.BillingService; exports.BlockNoteDiffUtil = _chunkUYLS3LJWjs.BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = _chunkUYLS3LJWjs.BlockNoteWordDiffRendererUtil; exports.COMPANY_ADMINISTRATOR_ROLE_ID = _chunkTULJCLZAjs.COMPANY_ADMINISTRATOR_ROLE_ID; exports.CURRENT_USER_STORAGE_KEY = _chunkUYLS3LJWjs.CURRENT_USER_STORAGE_KEY; exports.Chunk = _chunkUYLS3LJWjs.Chunk; exports.ChunkModule = _chunkUYLS3LJWjs.ChunkModule; exports.ClientAbstractService = _chunkUYLS3LJWjs.ClientAbstractService; exports.ClientHttpMethod = _chunkUYLS3LJWjs.ClientHttpMethod; exports.Company = _chunkUYLS3LJWjs.Company; exports.CompanyFields = _chunkUYLS3LJWjs.CompanyFields; exports.CompanyModule = _chunkUYLS3LJWjs.CompanyModule; exports.CompanyService = _chunkUYLS3LJWjs.CompanyService; exports.Content = _chunkUYLS3LJWjs.Content; exports.ContentFields = _chunkUYLS3LJWjs.ContentFields; exports.ContentModule = _chunkUYLS3LJWjs.ContentModule; exports.ContentService = _chunkUYLS3LJWjs.ContentService; exports.DEFAULT_GRANT_TYPES = _chunkUYLS3LJWjs.DEFAULT_GRANT_TYPES; exports.DataClass = _chunkLU7DJ4QFjs.DataClassRegistry; exports.DataClassRegistry = _chunkLU7DJ4QFjs.DataClassRegistry; exports.ENV = _chunkLU7DJ4QFjs.ENV; exports.EndpointCreator = _chunkUYLS3LJWjs.EndpointCreator; exports.EntityAiStatus = _chunkUYLS3LJWjs.EntityAiStatus; exports.Feature = _chunkUYLS3LJWjs.Feature; exports.FeatureModule = _chunkUYLS3LJWjs.FeatureModule; exports.FeatureService = _chunkUYLS3LJWjs.FeatureService; exports.HowTo = _chunkUYLS3LJWjs.HowTo; exports.HowToFields = _chunkUYLS3LJWjs.HowToFields; exports.HowToModule = _chunkUYLS3LJWjs.HowToModule; exports.HowToService = _chunkUYLS3LJWjs.HowToService; exports.HttpMethod = _chunkUYLS3LJWjs.HttpMethod; exports.InvoiceStatus = _chunkUYLS3LJWjs.InvoiceStatus; exports.JsonApiDataFactory = _chunkLU7DJ4QFjs.JsonApiDataFactory; exports.MOBILE_BREAKPOINT = _chunkUYLS3LJWjs.MOBILE_BREAKPOINT; exports.Module = _chunkUYLS3LJWjs.Module; exports.ModuleModule = _chunkUYLS3LJWjs.ModuleModule; exports.ModulePaths = _chunkUYLS3LJWjs.ModulePaths; exports.ModulePathsModule = _chunkUYLS3LJWjs.ModulePathsModule; exports.ModuleRegistrar = _chunkUYLS3LJWjs.ModuleRegistrar; exports.ModuleRegistry = _chunkUYLS3LJWjs.ModuleRegistry; exports.Modules = _chunkUYLS3LJWjs.Modules; exports.Notification = _chunkUYLS3LJWjs.Notification; exports.NotificationFields = _chunkUYLS3LJWjs.NotificationFields; exports.NotificationModule = _chunkUYLS3LJWjs.NotificationModule; exports.NotificationService = _chunkUYLS3LJWjs.NotificationService; exports.OAUTH_SCOPE_DISPLAY = _chunkUYLS3LJWjs.OAUTH_SCOPE_DISPLAY; exports.OAuthClient = _chunkUYLS3LJWjs.OAuthClient; exports.OAuthModule = _chunkUYLS3LJWjs.OAuthModule; exports.OAuthService = _chunkUYLS3LJWjs.OAuthService; exports.Passkey = _chunkUYLS3LJWjs.Passkey; exports.PasskeyAuthenticationOptions = _chunkUYLS3LJWjs.PasskeyAuthenticationOptions; exports.PasskeyAuthenticationOptionsModule = _chunkUYLS3LJWjs.PasskeyAuthenticationOptionsModule; exports.PasskeyModule = _chunkUYLS3LJWjs.PasskeyModule; exports.PasskeyRegistrationOptions = _chunkUYLS3LJWjs.PasskeyRegistrationOptions; exports.PasskeyRegistrationOptionsModule = _chunkUYLS3LJWjs.PasskeyRegistrationOptionsModule; exports.PasskeyRegistrationVerify = _chunkUYLS3LJWjs.PasskeyRegistrationVerify; exports.PasskeyRegistrationVerifyModule = _chunkUYLS3LJWjs.PasskeyRegistrationVerifyModule; exports.PasskeyRename = _chunkUYLS3LJWjs.PasskeyRename; exports.PasskeyRenameModule = _chunkUYLS3LJWjs.PasskeyRenameModule; exports.PasskeyVerifyLogin = _chunkUYLS3LJWjs.PasskeyVerifyLogin; exports.PasskeyVerifyLoginModule = _chunkUYLS3LJWjs.PasskeyVerifyLoginModule; exports.PaymentMethod = _chunkUYLS3LJWjs.PaymentMethod; exports.PermissionMapping = _chunkUYLS3LJWjs.PermissionMapping; exports.PermissionMappingModule = _chunkUYLS3LJWjs.PermissionMappingModule; exports.Push = _chunkUYLS3LJWjs.Push; exports.PushModule = _chunkUYLS3LJWjs.PushModule; exports.PushService = _chunkUYLS3LJWjs.PushService; exports.RbacMatrixModel = _chunkUYLS3LJWjs.RbacMatrixModel; exports.RbacMatrixModule = _chunkUYLS3LJWjs.RbacMatrixModule; exports.RbacService = _chunkTULJCLZAjs.RbacService; exports.ReferralModule = _chunkUYLS3LJWjs.ReferralModule; exports.ReferralService = _chunkUYLS3LJWjs.ReferralService; exports.ReferralStats = _chunkUYLS3LJWjs.ReferralStats; exports.ReferralStatsModule = _chunkUYLS3LJWjs.ReferralStatsModule; exports.RehydrationFactory = _chunkUYLS3LJWjs.RehydrationFactory; exports.Role = _chunkUYLS3LJWjs.Role; exports.RoleFields = _chunkUYLS3LJWjs.RoleFields; exports.RoleModule = _chunkUYLS3LJWjs.RoleModule; exports.RoleService = _chunkUYLS3LJWjs.RoleService; exports.S3 = _chunkUYLS3LJWjs.S3; exports.S3Module = _chunkUYLS3LJWjs.S3Module; exports.S3Service = _chunkUYLS3LJWjs.S3Service; exports.StripeCustomer = _chunkUYLS3LJWjs.StripeCustomer; exports.StripeCustomerModule = _chunkUYLS3LJWjs.StripeCustomerModule; exports.StripeCustomerService = _chunkUYLS3LJWjs.StripeCustomerService; exports.StripeInvoice = _chunkUYLS3LJWjs.StripeInvoice; exports.StripeInvoiceModule = _chunkUYLS3LJWjs.StripeInvoiceModule; exports.StripeInvoiceService = _chunkUYLS3LJWjs.StripeInvoiceService; exports.StripePaymentMethodModule = _chunkUYLS3LJWjs.StripePaymentMethodModule; exports.StripePrice = _chunkUYLS3LJWjs.StripePrice; exports.StripePriceFields = _chunkUYLS3LJWjs.StripePriceFields; exports.StripePriceModule = _chunkUYLS3LJWjs.StripePriceModule; exports.StripePriceService = _chunkUYLS3LJWjs.StripePriceService; exports.StripeProduct = _chunkUYLS3LJWjs.StripeProduct; exports.StripeProductFields = _chunkUYLS3LJWjs.StripeProductFields; exports.StripeProductModule = _chunkUYLS3LJWjs.StripeProductModule; exports.StripeProductService = _chunkUYLS3LJWjs.StripeProductService; exports.StripePromotionCode = _chunkUYLS3LJWjs.StripePromotionCode; exports.StripePromotionCodeModule = _chunkUYLS3LJWjs.StripePromotionCodeModule; exports.StripePromotionCodeService = _chunkUYLS3LJWjs.StripePromotionCodeService; exports.StripeSubscription = _chunkUYLS3LJWjs.StripeSubscription; exports.StripeSubscriptionModule = _chunkUYLS3LJWjs.StripeSubscriptionModule; exports.StripeSubscriptionService = _chunkUYLS3LJWjs.StripeSubscriptionService; exports.StripeUsage = _chunkUYLS3LJWjs.StripeUsage; exports.StripeUsageModule = _chunkUYLS3LJWjs.StripeUsageModule; exports.StripeUsageService = _chunkUYLS3LJWjs.StripeUsageService; exports.SubscriptionStatus = _chunkUYLS3LJWjs.SubscriptionStatus; exports.TableOptions = _chunkUYLS3LJWjs.TableOptions; exports.TokenUsageAdminBreakdownModule = _chunkUYLS3LJWjs.TokenUsageAdminBreakdownModule; exports.TokenUsageAdminSummaryModule = _chunkUYLS3LJWjs.TokenUsageAdminSummaryModule; exports.TokenUsageAdminTimelineModule = _chunkUYLS3LJWjs.TokenUsageAdminTimelineModule; exports.TotpAuthenticator = _chunkUYLS3LJWjs.TotpAuthenticator; exports.TotpAuthenticatorModule = _chunkUYLS3LJWjs.TotpAuthenticatorModule; exports.TotpSetup = _chunkUYLS3LJWjs.TotpSetup; exports.TotpSetupModule = _chunkUYLS3LJWjs.TotpSetupModule; exports.TotpVerify = _chunkUYLS3LJWjs.TotpVerify; exports.TotpVerifyLogin = _chunkUYLS3LJWjs.TotpVerifyLogin; exports.TotpVerifyLoginModule = _chunkUYLS3LJWjs.TotpVerifyLoginModule; exports.TotpVerifyModule = _chunkUYLS3LJWjs.TotpVerifyModule; exports.TwoFactorChallenge = _chunkUYLS3LJWjs.TwoFactorChallenge; exports.TwoFactorChallengeModule = _chunkUYLS3LJWjs.TwoFactorChallengeModule; exports.TwoFactorEnable = _chunkUYLS3LJWjs.TwoFactorEnable; exports.TwoFactorEnableModule = _chunkUYLS3LJWjs.TwoFactorEnableModule; exports.TwoFactorService = _chunkUYLS3LJWjs.TwoFactorService; exports.TwoFactorStatus = _chunkUYLS3LJWjs.TwoFactorStatus; exports.TwoFactorStatusModule = _chunkUYLS3LJWjs.TwoFactorStatusModule; exports.User = _chunkUYLS3LJWjs.User; exports.UserFields = _chunkUYLS3LJWjs.UserFields; exports.UserModule = _chunkUYLS3LJWjs.UserModule; exports.UserService = _chunkUYLS3LJWjs.UserService; exports.VIEWPORT_COOKIE_NAME = _chunkUYLS3LJWjs.VIEWPORT_COOKIE_NAME; exports.Waitlist = _chunkUYLS3LJWjs.Waitlist; exports.WaitlistModule = _chunkUYLS3LJWjs.WaitlistModule; exports.WaitlistService = _chunkUYLS3LJWjs.WaitlistService; exports.WaitlistStats = _chunkUYLS3LJWjs.WaitlistStats; exports.WaitlistStatsModule = _chunkUYLS3LJWjs.WaitlistStatsModule; exports.checkPermissions = _chunkUYLS3LJWjs.checkPermissions; exports.checkPermissionsFromServer = _chunkUYLS3LJWjs.checkPermissionsFromServer; exports.clearLastApiMeta = _chunkUYLS3LJWjs.clearLastApiMeta; exports.clearLastApiTotal = _chunkUYLS3LJWjs.clearLastApiTotal; exports.cn = _chunkUYLS3LJWjs.cn; exports.composeRefs = _chunkUYLS3LJWjs.composeRefs; exports.configureAuth = _chunkUYLS3LJWjs.configureAuth; exports.configureI18n = _chunkTULJCLZAjs.configureI18n; exports.configureJsonApi = _chunkTULJCLZAjs.configureJsonApi; exports.configureLogin = _chunkTULJCLZAjs.configureLogin; exports.configureReferral = _chunkTULJCLZAjs.configureReferral; exports.configureRoles = _chunkTULJCLZAjs.configureRoles; exports.configureTokenUsage = _chunkUYLS3LJWjs.configureTokenUsage; exports.configureWaitlist = _chunkTULJCLZAjs.configureWaitlist; exports.createJsonApiInclusion = _chunkUYLS3LJWjs.createJsonApiInclusion; exports.dismissToast = _chunkUYLS3LJWjs.dismissToast; exports.entityObjectSchema = _chunkUYLS3LJWjs.entityObjectSchema; exports.exists = _chunkUYLS3LJWjs.exists; exports.formatCodiceFiscale = _chunkUYLS3LJWjs.formatCodiceFiscale; exports.formatDate = _chunkUYLS3LJWjs.formatDate; exports.formatLocalDate = _chunkUYLS3LJWjs.formatLocalDate; exports.formatPartitaIva = _chunkUYLS3LJWjs.formatPartitaIva; exports.getApiUrl = _chunkTULJCLZAjs.getApiUrl; exports.getAppUrl = _chunkTULJCLZAjs.getAppUrl; exports.getBootstrapper = _chunkLU7DJ4QFjs.getBootstrapper; exports.getClientGlobalErrorHandler = _chunkUYLS3LJWjs.getClientGlobalErrorHandler; exports.getGlobalErrorHandler = _chunkUYLS3LJWjs.getGlobalErrorHandler; exports.getIcon = _chunkUYLS3LJWjs.getIcon; exports.getIconByModule = _chunkUYLS3LJWjs.getIconByModule; exports.getIconByModuleName = _chunkUYLS3LJWjs.getIconByModuleName; exports.getInitials = _chunkUYLS3LJWjs.getInitials; exports.getLastApiMeta = _chunkUYLS3LJWjs.getLastApiMeta; exports.getLastApiTotal = _chunkUYLS3LJWjs.getLastApiTotal; exports.getLucideIcon = _chunkUYLS3LJWjs.getLucideIcon; exports.getLucideIconByModule = _chunkUYLS3LJWjs.getLucideIconByModule; exports.getLucideIconByModuleName = _chunkUYLS3LJWjs.getLucideIconByModuleName; exports.getPublicApiUrl = _chunkTULJCLZAjs.getPublicApiUrl; exports.getReferralConfig = _chunkTULJCLZAjs.getReferralConfig; exports.getRoleId = _chunkTULJCLZAjs.getRoleId; exports.getStripePublishableKey = _chunkTULJCLZAjs.getStripePublishableKey; exports.getTableComponents = _chunkUYLS3LJWjs.getTableComponents; exports.getTableOptions = _chunkUYLS3LJWjs.getTableOptions; exports.getTokenHandler = _chunkUYLS3LJWjs.getTokenHandler; exports.getTokenUsageCurrency = _chunkUYLS3LJWjs.getTokenUsageCurrency; exports.getTrackablePages = _chunkTULJCLZAjs.getTrackablePages; exports.getValueFromPath = _chunkUYLS3LJWjs.getValueFromPath; exports.getWaitlistConfig = _chunkTULJCLZAjs.getWaitlistConfig; exports.hasBootstrapper = _chunkLU7DJ4QFjs.hasBootstrapper; exports.isReferralEnabled = _chunkTULJCLZAjs.isReferralEnabled; exports.isRemoteImageSrc = _chunkUYLS3LJWjs.isRemoteImageSrc; exports.isRolesConfigured = _chunkTULJCLZAjs.isRolesConfigured; exports.rehydrate = _chunkUYLS3LJWjs.rehydrate; exports.rehydrateList = _chunkUYLS3LJWjs.rehydrateList; exports.resetBootstrapStore = _chunkLU7DJ4QFjs.resetBootstrapStore; exports.setBootstrapper = _chunkLU7DJ4QFjs.setBootstrapper; exports.setClientGlobalErrorHandler = _chunkUYLS3LJWjs.setClientGlobalErrorHandler; exports.setGlobalErrorHandler = _chunkUYLS3LJWjs.setGlobalErrorHandler; exports.showCustomToast = _chunkUYLS3LJWjs.showCustomToast; exports.showError = _chunkUYLS3LJWjs.showError; exports.showToast = _chunkUYLS3LJWjs.showToast; exports.tokenUsageModules = _chunkUYLS3LJWjs.tokenUsageModules; exports.translateData = _chunkLU7DJ4QFjs.translateData; exports.translateResponse = _chunkLU7DJ4QFjs.translateResponse; exports.tryBootstrap = _chunkLU7DJ4QFjs.tryBootstrap; exports.useComposedRefs = _chunkUYLS3LJWjs.useComposedRefs; exports.useIsMobile = _chunkUYLS3LJWjs.useIsMobile; exports.userObjectSchema = _chunkUYLS3LJWjs.userObjectSchema; exports.validateCodiceFiscale = _chunkUYLS3LJWjs.validateCodiceFiscale; exports.validateItalianTaxCode = _chunkUYLS3LJWjs.validateItalianTaxCode; exports.validatePartitaIva = _chunkUYLS3LJWjs.validatePartitaIva;
|
|
483
483
|
//# sourceMappingURL=index.js.map
|
package/dist/index.mjs
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
getWaitlistConfig,
|
|
19
19
|
isReferralEnabled,
|
|
20
20
|
isRolesConfigured
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-2D4MFVDV.mjs";
|
|
22
22
|
import {
|
|
23
23
|
AVAILABLE_OAUTH_SCOPES,
|
|
24
24
|
AbstractApiData,
|
|
@@ -226,7 +226,7 @@ import {
|
|
|
226
226
|
validateCodiceFiscale,
|
|
227
227
|
validateItalianTaxCode,
|
|
228
228
|
validatePartitaIva
|
|
229
|
-
} from "./chunk-
|
|
229
|
+
} from "./chunk-HDZ2BL6D.mjs";
|
|
230
230
|
import "./chunk-AUXK7QSA.mjs";
|
|
231
231
|
import "./chunk-C7C7VY4F.mjs";
|
|
232
232
|
import {
|
|
@@ -240,7 +240,7 @@ import {
|
|
|
240
240
|
translateData,
|
|
241
241
|
translateResponse,
|
|
242
242
|
tryBootstrap
|
|
243
|
-
} from "./chunk-
|
|
243
|
+
} from "./chunk-BMVA2IM5.mjs";
|
|
244
244
|
import "./chunk-PAWJFY3S.mjs";
|
|
245
245
|
export {
|
|
246
246
|
ACTION_TYPES,
|
package/dist/server/index.js
CHANGED
|
@@ -15,14 +15,14 @@ var _chunkIOLU4ASDjs = require('../chunk-IOLU4ASD.js');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkUYLS3LJWjs = require('../chunk-UYLS3LJW.js');
|
|
19
19
|
require('../chunk-LXKSUWAV.js');
|
|
20
20
|
require('../chunk-IBS6NI7D.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkLU7DJ4QFjs = require('../chunk-LU7DJ4QF.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
var _chunk7QVYU63Ejs = require('../chunk-7QVYU63E.js');
|
|
@@ -87,7 +87,7 @@ var ServerSession = class {
|
|
|
87
87
|
if (!rawModules) return false;
|
|
88
88
|
const modules = JSON.parse(_pako.ungzip.call(void 0, Buffer.from(rawModules, "base64"), { toText: true }));
|
|
89
89
|
const selectedModule = modules.find((module) => module.id === params.module.moduleId);
|
|
90
|
-
return
|
|
90
|
+
return _chunkUYLS3LJWjs.checkPermissionsFromServer.call(void 0, {
|
|
91
91
|
module: params.module,
|
|
92
92
|
action: params.action,
|
|
93
93
|
data: params.data,
|
|
@@ -110,7 +110,7 @@ function getServerApiUrl() {
|
|
|
110
110
|
if (_optionalChain([_serverConfig, 'optionalAccess', _19 => _19.apiUrl])) {
|
|
111
111
|
return _serverConfig.apiUrl;
|
|
112
112
|
}
|
|
113
|
-
const envUrl =
|
|
113
|
+
const envUrl = _chunkLU7DJ4QFjs.ENV.API_URL;
|
|
114
114
|
if (!envUrl) {
|
|
115
115
|
throw new Error(
|
|
116
116
|
"API URL not configured. Use configureServerJsonApi() or set NEXT_PUBLIC_API_URL environment variable."
|
|
@@ -123,7 +123,7 @@ function getServerAppUrl() {
|
|
|
123
123
|
if (_optionalChain([_serverConfig, 'optionalAccess', _20 => _20.appUrl])) {
|
|
124
124
|
return _serverConfig.appUrl;
|
|
125
125
|
}
|
|
126
|
-
const envUrl =
|
|
126
|
+
const envUrl = _chunkLU7DJ4QFjs.ENV.APP_URL;
|
|
127
127
|
if (!envUrl) {
|
|
128
128
|
throw new Error(
|
|
129
129
|
"App URL not configured. Use configureServerJsonApi({ appUrl }) or set NEXT_PUBLIC_ADDRESS environment variable."
|
|
@@ -159,7 +159,7 @@ async function ServerJsonApiGet(params) {
|
|
|
159
159
|
language: params.language,
|
|
160
160
|
additionalHeaders: _optionalChain([_serverConfig, 'optionalAccess', _23 => _23.additionalHeaders])
|
|
161
161
|
});
|
|
162
|
-
return
|
|
162
|
+
return _chunkLU7DJ4QFjs.translateResponse.call(void 0, {
|
|
163
163
|
classKey: params.classKey,
|
|
164
164
|
apiResponse,
|
|
165
165
|
companyId: params.companyId,
|
|
@@ -180,7 +180,7 @@ async function ServerJsonApiPost(params) {
|
|
|
180
180
|
if (!body) {
|
|
181
181
|
body = {};
|
|
182
182
|
} else if (params.overridesJsonApiCreation !== true) {
|
|
183
|
-
body =
|
|
183
|
+
body = _chunkLU7DJ4QFjs.JsonApiDataFactory.create(params.classKey, body);
|
|
184
184
|
}
|
|
185
185
|
const apiResponse = await _chunkIOLU4ASDjs.serverRequest.call(void 0, {
|
|
186
186
|
method: "POST",
|
|
@@ -192,7 +192,7 @@ async function ServerJsonApiPost(params) {
|
|
|
192
192
|
language: params.language,
|
|
193
193
|
additionalHeaders: _optionalChain([_serverConfig, 'optionalAccess', _24 => _24.additionalHeaders])
|
|
194
194
|
});
|
|
195
|
-
return
|
|
195
|
+
return _chunkLU7DJ4QFjs.translateResponse.call(void 0, {
|
|
196
196
|
classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
|
|
197
197
|
apiResponse,
|
|
198
198
|
companyId: params.companyId,
|
|
@@ -207,7 +207,7 @@ async function ServerJsonApiPut(params) {
|
|
|
207
207
|
if (!body) {
|
|
208
208
|
body = {};
|
|
209
209
|
} else {
|
|
210
|
-
body =
|
|
210
|
+
body = _chunkLU7DJ4QFjs.JsonApiDataFactory.create(params.classKey, body);
|
|
211
211
|
}
|
|
212
212
|
const apiResponse = await _chunkIOLU4ASDjs.serverRequest.call(void 0, {
|
|
213
213
|
method: "PUT",
|
|
@@ -219,7 +219,7 @@ async function ServerJsonApiPut(params) {
|
|
|
219
219
|
language: params.language,
|
|
220
220
|
additionalHeaders: _optionalChain([_serverConfig, 'optionalAccess', _25 => _25.additionalHeaders])
|
|
221
221
|
});
|
|
222
|
-
return
|
|
222
|
+
return _chunkLU7DJ4QFjs.translateResponse.call(void 0, {
|
|
223
223
|
classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
|
|
224
224
|
apiResponse,
|
|
225
225
|
companyId: params.companyId,
|
|
@@ -234,7 +234,7 @@ async function ServerJsonApiPatch(params) {
|
|
|
234
234
|
if (!body) {
|
|
235
235
|
body = {};
|
|
236
236
|
} else if (params.overridesJsonApiCreation !== true) {
|
|
237
|
-
body =
|
|
237
|
+
body = _chunkLU7DJ4QFjs.JsonApiDataFactory.create(params.classKey, body);
|
|
238
238
|
}
|
|
239
239
|
const apiResponse = await _chunkIOLU4ASDjs.serverRequest.call(void 0, {
|
|
240
240
|
method: "PATCH",
|
|
@@ -246,7 +246,7 @@ async function ServerJsonApiPatch(params) {
|
|
|
246
246
|
language: params.language,
|
|
247
247
|
additionalHeaders: _optionalChain([_serverConfig, 'optionalAccess', _26 => _26.additionalHeaders])
|
|
248
248
|
});
|
|
249
|
-
return
|
|
249
|
+
return _chunkLU7DJ4QFjs.translateResponse.call(void 0, {
|
|
250
250
|
classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
|
|
251
251
|
apiResponse,
|
|
252
252
|
companyId: params.companyId,
|
|
@@ -265,7 +265,7 @@ async function ServerJsonApiDelete(params) {
|
|
|
265
265
|
language: params.language,
|
|
266
266
|
additionalHeaders: _optionalChain([_serverConfig, 'optionalAccess', _27 => _27.additionalHeaders])
|
|
267
267
|
});
|
|
268
|
-
return
|
|
268
|
+
return _chunkLU7DJ4QFjs.translateResponse.call(void 0, {
|
|
269
269
|
classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
|
|
270
270
|
apiResponse,
|
|
271
271
|
companyId: params.companyId,
|
|
@@ -297,5 +297,5 @@ _chunk7QVYU63Ejs.__name.call(void 0, ServerJsonApiDelete, "ServerJsonApiDelete")
|
|
|
297
297
|
|
|
298
298
|
|
|
299
299
|
|
|
300
|
-
exports.ServerAuthService =
|
|
300
|
+
exports.ServerAuthService = _chunkUYLS3LJWjs.AuthService; exports.ServerCompanyService = _chunkUYLS3LJWjs.CompanyService; exports.ServerContentService = _chunkUYLS3LJWjs.ContentService; exports.ServerFeatureService = _chunkUYLS3LJWjs.FeatureService; exports.ServerJsonApiDelete = ServerJsonApiDelete; exports.ServerJsonApiGet = ServerJsonApiGet; exports.ServerJsonApiPatch = ServerJsonApiPatch; exports.ServerJsonApiPost = ServerJsonApiPost; exports.ServerJsonApiPut = ServerJsonApiPut; exports.ServerNotificationService = _chunkUYLS3LJWjs.NotificationService; exports.ServerPushService = _chunkUYLS3LJWjs.PushService; exports.ServerRoleService = _chunkUYLS3LJWjs.RoleService; exports.ServerS3Service = _chunkUYLS3LJWjs.S3Service; exports.ServerSession = ServerSession; exports.ServerUserService = _chunkUYLS3LJWjs.UserService; exports.configureServerJsonApi = configureServerJsonApi; exports.getServerApiUrl = getServerApiUrl; exports.getServerAppUrl = getServerAppUrl; exports.getServerToken = _chunkYUO55Q5Ajs.getServerToken; exports.getServerTrackablePages = getServerTrackablePages; exports.invalidateCacheTag = invalidateCacheTag; exports.invalidateCacheTags = invalidateCacheTags; exports.serverRequest = _chunkIOLU4ASDjs.serverRequest;
|
|
301
301
|
//# sourceMappingURL=index.js.map
|
package/dist/server/index.mjs
CHANGED
|
@@ -15,14 +15,14 @@ import {
|
|
|
15
15
|
S3Service,
|
|
16
16
|
UserService,
|
|
17
17
|
checkPermissionsFromServer
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-HDZ2BL6D.mjs";
|
|
19
19
|
import "../chunk-AUXK7QSA.mjs";
|
|
20
20
|
import "../chunk-C7C7VY4F.mjs";
|
|
21
21
|
import {
|
|
22
22
|
ENV,
|
|
23
23
|
JsonApiDataFactory,
|
|
24
24
|
translateResponse
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-BMVA2IM5.mjs";
|
|
26
26
|
import {
|
|
27
27
|
__name
|
|
28
28
|
} from "../chunk-PAWJFY3S.mjs";
|
package/package.json
CHANGED
|
@@ -12,10 +12,13 @@ export class DataClassRegistry {
|
|
|
12
12
|
key: ApiRequestDataTypeInterface,
|
|
13
13
|
classConstructor: { new (): ApiDataInterface },
|
|
14
14
|
): void {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
// Last registration wins. An earlier version skipped re-registration, which
|
|
16
|
+
// silently pinned the registry to the FIRST constructor seen by the process.
|
|
17
|
+
// In dev that made a long-lived `next dev` server keep rehydrating with the
|
|
18
|
+
// pre-edit class after any model change, so SSR produced a different tree
|
|
19
|
+
// from the freshly bundled client and React threw a hydration mismatch.
|
|
20
|
+
// Production is unaffected either way: bootstrap runs once per process.
|
|
21
|
+
this._map.set(key.name, classConstructor);
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
public static get(classKey: ApiRequestDataTypeInterface): {
|
|
@@ -58,6 +58,20 @@ describe("DataClassRegistry", () => {
|
|
|
58
58
|
// Should not throw, just ignore duplicate
|
|
59
59
|
expect(() => DataClassRegistry.get(module)).not.toThrow();
|
|
60
60
|
});
|
|
61
|
+
|
|
62
|
+
// Re-registering the same key MUST replace the constructor. Keeping the first
|
|
63
|
+
// one pins a long-lived dev server to the pre-edit class, so SSR rehydrates
|
|
64
|
+
// with stale getters and React reports a hydration mismatch against the
|
|
65
|
+
// freshly bundled client.
|
|
66
|
+
it("should replace the constructor when the same key is registered again", () => {
|
|
67
|
+
class MockArticleV2 extends MockArticle {}
|
|
68
|
+
const module = createMockModule({ name: "articles" });
|
|
69
|
+
|
|
70
|
+
DataClassRegistry.registerObjectClass(module, MockArticle as any);
|
|
71
|
+
DataClassRegistry.registerObjectClass(module, MockArticleV2 as any);
|
|
72
|
+
|
|
73
|
+
expect(DataClassRegistry.get(module)).toBe(MockArticleV2);
|
|
74
|
+
});
|
|
61
75
|
});
|
|
62
76
|
|
|
63
77
|
describe("get", () => {
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _chunkW42MYR3Yjs = require('./chunk-W42MYR3Y.js');
|
|
13
|
-
require('./chunk-7QVYU63E.js');
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
exports.JsonApiDelete = _chunkW42MYR3Yjs.JsonApiDelete; exports.JsonApiGet = _chunkW42MYR3Yjs.JsonApiGet; exports.JsonApiPatch = _chunkW42MYR3Yjs.JsonApiPatch; exports.JsonApiPost = _chunkW42MYR3Yjs.JsonApiPost; exports.JsonApiPut = _chunkW42MYR3Yjs.JsonApiPut; exports.buildUrl = _chunkW42MYR3Yjs.buildUrl; exports.configureJsonApi = _chunkW42MYR3Yjs.configureJsonApi; exports.getApiUrl = _chunkW42MYR3Yjs.getApiUrl; exports.getAppUrl = _chunkW42MYR3Yjs.getAppUrl; exports.getTrackablePages = _chunkW42MYR3Yjs.getTrackablePages;
|
|
26
|
-
//# sourceMappingURL=JsonApiRequest-WWGSGV2I.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core/env.ts","../src/core/registry/DataClassRegistry.ts","../src/core/factories/JsonApiDataFactory.ts","../src/core/registry/bootstrapStore.ts","../src/core/utils/translateResponse.ts","../src/unified/JsonApiRequest.ts"],"sourcesContent":["/**\n * The single place in this package that reads `process.env`.\n *\n * Everything else imports {@link ENV}. Centralising the reads keeps every\n * default in one place — the same contract `base.config.ts` provides on the\n * NestJS side — instead of scattering `process.env.X || \"…\"` across hooks,\n * clients and components where the fallbacks silently drift apart.\n *\n * WHY THE READS MUST STAY LITERAL: Next.js inlines `NEXT_PUBLIC_*` by textual\n * substitution at build time, replacing the exact expression\n * `process.env.NEXT_PUBLIC_FOO` with a string literal. A computed lookup\n * (`process.env[key]`) is NOT substituted and reads as `undefined` in the\n * browser bundle. Every entry below therefore spells its variable out in full,\n * and new entries must do the same.\n *\n * WHY GETTERS AND NOT PLAIN PROPERTIES: every call site this replaced read\n * `process.env` at CALL time, not at import time. A plain property would freeze\n * the value when the module is first imported, which breaks any consumer that\n * assigns the variable after boot — the package's own tests do exactly that.\n * Getters keep the read lazy while leaving the expression literal, so the build\n * time substitution still applies.\n *\n * Because that substitution happens before the code runs, no reference to\n * `process` survives into the client bundle — so this module is safe to import\n * from client components, server components, route handlers and middleware\n * alike. It deliberately carries no `\"use client\"` directive for that reason.\n *\n * Values are normalised (empty string rather than `undefined`, booleans rather\n * than string comparisons) so callers never repeat the parsing. Callers that\n * must distinguish \"unset\" from \"set to empty\" — the URL getters, which throw a\n * configuration error — check for an empty string.\n */\nexport const ENV = {\n /** Public API base URL (NEXT_PUBLIC_API_URL). Empty when unset. */\n get API_URL(): string {\n return process.env.NEXT_PUBLIC_API_URL ?? \"\";\n },\n /** Public app base URL (NEXT_PUBLIC_ADDRESS). Empty when unset. */\n get APP_URL(): string {\n return process.env.NEXT_PUBLIC_ADDRESS ?? \"\";\n },\n /**\n * Alternative app base URL (NEXT_PUBLIC_APP_URL), used only by\n * `client/config.ts`'s `getAppUrl()` before it falls back to\n * `window.location.origin`. Empty when unset.\n */\n get APP_URL_ALTERNATE(): string {\n return process.env.NEXT_PUBLIC_APP_URL ?? \"\";\n },\n /** Web-push VAPID public key (NEXT_PUBLIC_VAPID_PUBLIC_KEY). Empty when unset. */\n get VAPID_PUBLIC_KEY(): string {\n return process.env.NEXT_PUBLIC_VAPID_PUBLIC_KEY ?? \"\";\n },\n /** Google Maps JS key (NEXT_PUBLIC_GOOGLE_MAPS_API_KEY). Empty disables autocomplete. */\n get GOOGLE_MAPS_API_KEY(): string {\n return process.env.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY ?? \"\";\n },\n /**\n * NEXT_PUBLIC_PRIVATE_INSTALLATION === \"true\", case-insensitively\n * (default false). A private installation is a single-tenant deployment.\n */\n get PRIVATE_INSTALLATION(): boolean {\n return process.env.NEXT_PUBLIC_PRIVATE_INSTALLATION?.toLowerCase() === \"true\";\n },\n /** NODE_ENV === \"production\" — set by the Next build, not by `.env`. */\n get IS_PRODUCTION(): boolean {\n return process.env.NODE_ENV === \"production\";\n },\n /** NODE_ENV === \"development\" — gates verbose client-side diagnostics. */\n get IS_DEVELOPMENT(): boolean {\n return process.env.NODE_ENV === \"development\";\n },\n};\n","import { ApiDataInterface } from \"../interfaces/ApiDataInterface\";\nimport { ApiRequestDataTypeInterface } from \"../interfaces/ApiRequestDataTypeInterface\";\n\nexport class DataClassRegistry {\n // Use Map with string key (module.name) for reliable lookup\n // String keys are stable across HMR and module re-evaluations\n // Note: WeakMap with object identity was tried but fails during Next.js navigation\n // because module re-evaluation creates new object instances with different identity\n private static _map = new Map<string, { new (): ApiDataInterface }>();\n\n public static registerObjectClass(\n key: ApiRequestDataTypeInterface,\n classConstructor: { new (): ApiDataInterface },\n ): void {\n const classKey = key.name;\n if (!this._map.has(classKey)) {\n this._map.set(classKey, classConstructor);\n }\n }\n\n public static get(classKey: ApiRequestDataTypeInterface): {\n new (): ApiDataInterface;\n } {\n const response = this._map.get(classKey.name);\n if (!response) {\n throw new Error(\n `Class not registered for key: ${typeof classKey === \"string\" ? classKey : classKey.name}. Ensure bootstrap() was called.`,\n );\n }\n\n return response;\n }\n\n /**\n * Get class constructor by JSON:API type name.\n * Used for polymorphic rehydration where the type is determined at runtime.\n */\n public static getByJsonApiType(typeName: string): { new (): ApiDataInterface } | undefined {\n return this._map.get(typeName);\n }\n\n /**\n * Bootstrap the registry with all modules.\n * This is a convenience method for apps to register all their modules at once.\n *\n * @param modules - An object with module definitions (like the app's Modules class)\n */\n public static bootstrap(modules: Record<string, ApiRequestDataTypeInterface>): void {\n Object.values(modules).forEach((module) => {\n if (module && module.model) {\n this.registerObjectClass(module, module.model);\n }\n });\n }\n\n /**\n * Clear all registered classes. Useful for testing.\n */\n public static clear(): void {\n this._map.clear();\n }\n}\n\n// Export alias for backward compatibility\nexport { DataClassRegistry as DataClass };\n","import { ApiDataInterface } from \"../interfaces/ApiDataInterface\";\nimport { ApiRequestDataTypeInterface } from \"../interfaces/ApiRequestDataTypeInterface\";\nimport { DataClassRegistry } from \"../registry/DataClassRegistry\";\n\nexport class JsonApiDataFactory {\n public static create(classKey: ApiRequestDataTypeInterface, data: any): any {\n const factoryClass = DataClassRegistry.get(classKey);\n\n const instance = new factoryClass() as ApiDataInterface;\n const result = instance.createJsonApi(data);\n return result;\n }\n}\n","/**\n * Centralized bootstrap store accessible from ModuleRegistry.\n * This file has NO external dependencies to avoid circular imports.\n *\n * The bootstrap store allows ModuleRegistry to call the app's bootstrapper\n * when modules are accessed before bootstrap() was called, providing\n * self-healing behavior for module evaluation order issues.\n *\n * IMPORTANT: We use globalThis to persist state across HMR/Turbopack\n * module re-evaluations in development mode. Without this, the bootstrapper\n * reference would be lost when modules are hot-reloaded, causing\n * \"Module not registered\" errors during navigation.\n */\n\ntype BootstrapperFn = () => void;\n\n// Symbol key to avoid conflicts with other globals\nconst BOOTSTRAP_KEY = Symbol.for(\"nextjs-jsonapi:bootstrapper\");\nconst BOOTSTRAP_ATTEMPTED_KEY = Symbol.for(\"nextjs-jsonapi:bootstrapAttempted\");\n\n// Use globalThis to persist across HMR reloads\nconst globalStore = globalThis as unknown as {\n [BOOTSTRAP_KEY]?: BootstrapperFn | null;\n [BOOTSTRAP_ATTEMPTED_KEY]?: boolean;\n};\n\n// Initialize from global if not set\nif (globalStore[BOOTSTRAP_KEY] === undefined) {\n globalStore[BOOTSTRAP_KEY] = null;\n}\nif (globalStore[BOOTSTRAP_ATTEMPTED_KEY] === undefined) {\n globalStore[BOOTSTRAP_ATTEMPTED_KEY] = false;\n}\n\n// Getters/setters that use the global store\nfunction getBootstrapperInternal(): BootstrapperFn | null {\n return globalStore[BOOTSTRAP_KEY] ?? null;\n}\n\nfunction setBootstrapperInternal(fn: BootstrapperFn | null): void {\n globalStore[BOOTSTRAP_KEY] = fn;\n}\n\nfunction getBootstrapAttempted(): boolean {\n return globalStore[BOOTSTRAP_ATTEMPTED_KEY] ?? false;\n}\n\nfunction setBootstrapAttempted(value: boolean): void {\n globalStore[BOOTSTRAP_ATTEMPTED_KEY] = value;\n}\n\n/**\n * Register the bootstrapper function.\n * Called by configureJsonApi() from client/config, client/JsonApiClient, or unified/JsonApiRequest.\n */\nexport function setBootstrapper(fn: BootstrapperFn): void {\n setBootstrapperInternal(fn);\n}\n\n/**\n * Get the registered bootstrapper function.\n * Returns null if no bootstrapper has been registered.\n */\nexport function getBootstrapper(): BootstrapperFn | null {\n return getBootstrapperInternal();\n}\n\n/**\n * Attempt to run the bootstrapper if one is registered.\n * Returns true if bootstrapper was executed, false if not available.\n * Safe to call multiple times - bootstrapper is expected to be idempotent.\n */\nexport function tryBootstrap(): boolean {\n const bootstrapper = getBootstrapperInternal();\n const attempted = getBootstrapAttempted();\n\n if (attempted && !bootstrapper) {\n // Already tried and no bootstrapper available\n return false;\n }\n setBootstrapAttempted(true);\n\n if (bootstrapper) {\n bootstrapper();\n return true;\n }\n return false;\n}\n\n/**\n * Check if a bootstrapper has been registered.\n */\nexport function hasBootstrapper(): boolean {\n return getBootstrapperInternal() !== null;\n}\n\n/**\n * Reset the bootstrap store. Useful for testing.\n */\nexport function resetBootstrapStore(): void {\n setBootstrapperInternal(null);\n setBootstrapAttempted(false);\n}\n","import { ApiData } from \"../interfaces/ApiData\";\nimport { ApiDataInterface } from \"../interfaces/ApiDataInterface\";\nimport { ApiRequestDataTypeInterface } from \"../interfaces/ApiRequestDataTypeInterface\";\nimport { ApiResponseInterface } from \"../interfaces/ApiResponseInterface\";\nimport { DataClassRegistry } from \"../registry/DataClassRegistry\";\n\n/**\n * Translates raw JSON:API data into typed objects.\n * Does not require API response metadata.\n */\nexport function translateData<T extends ApiDataInterface>(params: {\n classKey: ApiRequestDataTypeInterface;\n data: any;\n}): T | T[] {\n const factoryClass = DataClassRegistry.get(params.classKey);\n\n if (!factoryClass) {\n throw new Error(\n `Class not registered for key: ${typeof params.classKey === \"string\" ? params.classKey : params.classKey.name}`,\n );\n }\n\n const included: any = params.data.included ?? [];\n\n if (Array.isArray(params.data.data)) {\n const responseData: T[] = [];\n\n for (const data of params.data.data) {\n const object = new factoryClass();\n object.rehydrate({ jsonApi: data, included: included, allData: params.data.data });\n responseData.push(object as T);\n }\n\n return responseData as T[];\n } else {\n const responseData = new factoryClass();\n responseData.rehydrate({\n jsonApi: params.data.data,\n included: included,\n });\n\n return responseData as T;\n }\n}\n\n/**\n * Translates a full API response into a typed ApiResponseInterface.\n * Includes pagination support.\n */\nexport async function translateResponse<T extends ApiDataInterface>(params: {\n classKey: ApiRequestDataTypeInterface;\n apiResponse: ApiData;\n companyId?: string;\n language: string;\n paginationHandler?: (endpoint: string) => Promise<ApiResponseInterface>;\n}): Promise<ApiResponseInterface> {\n const response: ApiResponseInterface = {\n ok: true,\n response: 0,\n data: [],\n error: \"\",\n };\n\n const factoryClass = DataClassRegistry.get(params.classKey);\n\n if (!factoryClass) {\n throw new Error(\n `Class not registered for key: ${typeof params.classKey === \"string\" ? params.classKey : params.classKey.name}`,\n );\n }\n\n response.ok = params.apiResponse.ok;\n response.response = params.apiResponse.status;\n\n if (!params.apiResponse.ok) {\n // `statusText` is empty over HTTP/2 (the reason phrase was removed from the protocol), so the\n // body is the only reliable source of error text. APIs in this stack use either key.\n response.error =\n params.apiResponse?.data?.message ?? params.apiResponse?.data?.error ?? params.apiResponse.statusText;\n response.raw = params.apiResponse.data;\n return response;\n }\n\n if (params.apiResponse.status === 204) return response;\n\n // A success with no body (e.g. a 200 from a handler that sends nothing —\n // @HttpCode is inert when a controller injects @Res, so \"204\" endpoints can\n // arrive as empty 200s) translates to an empty success, not a crash on\n // `.included` below.\n if (params.apiResponse.data === undefined || params.apiResponse.data === null) return response;\n\n response.raw = params.apiResponse.data;\n\n // Extract meta from JSON:API response\n if (params.apiResponse.data?.meta) {\n response.meta = params.apiResponse.data.meta;\n }\n\n try {\n // Check if response is JSON:API formatted (has a 'data' property)\n // If not, return the raw response data directly (e.g., { url: \"...\" } or { clientSecret: \"...\" })\n if (\n params.apiResponse.data &&\n typeof params.apiResponse.data === \"object\" &&\n !Array.isArray(params.apiResponse.data) &&\n params.apiResponse.data.data === undefined\n ) {\n response.data = params.apiResponse.data;\n return response;\n }\n\n const included: any = params.apiResponse.data.included ?? [];\n\n if (params.apiResponse.data.links) {\n response.self = params.apiResponse.data.links.self;\n\n if (params.apiResponse.data.links.next && params.paginationHandler) {\n response.next = params.apiResponse.data.links.next;\n response.nextPage = async () => params.paginationHandler!(params.apiResponse.data.links.next);\n }\n\n if (params.apiResponse.data.links.prev && params.paginationHandler) {\n response.prev = params.apiResponse.data.links.prev;\n response.prevPage = async () => params.paginationHandler!(params.apiResponse.data.links.prev);\n }\n }\n\n if (Array.isArray(params.apiResponse.data.data)) {\n const responseData: T[] = [];\n\n for (const data of params.apiResponse.data.data) {\n const object = new factoryClass();\n object.rehydrate({ jsonApi: data, included: included, allData: params.apiResponse.data.data });\n responseData.push(object as T);\n }\n\n response.data = responseData;\n } else {\n const responseData = new factoryClass();\n responseData.rehydrate({\n jsonApi: params.apiResponse.data.data,\n included: included,\n });\n\n response.data = responseData;\n }\n } catch (e) {\n console.error(e);\n }\n\n return response;\n}\n","import { ENV } from \"../core/env\";\nimport { JsonApiDataFactory } from \"../core/factories/JsonApiDataFactory\";\nimport { ApiData } from \"../core/interfaces/ApiData\";\nimport { ApiRequestDataTypeInterface } from \"../core/interfaces/ApiRequestDataTypeInterface\";\nimport { ApiResponseInterface } from \"../core/interfaces/ApiResponseInterface\";\nimport { setBootstrapper } from \"../core/registry/bootstrapStore\";\nimport { translateResponse } from \"../core/utils/translateResponse\";\nimport { ModuleWithPermissions } from \"../permissions/types\";\n\n// Type definitions for dynamically imported functions (avoiding typeof import to prevent bundling)\ntype DirectFetchFn = (params: {\n method: string;\n url: string;\n token?: string;\n body?: any;\n files?: { [key: string]: File | Blob } | File | Blob;\n companyId?: string;\n language: string;\n additionalHeaders?: Record<string, string>;\n}) => Promise<ApiData>;\n\ntype ServerRequestFn = (params: {\n method: string;\n url: string;\n token?: string;\n cache?: string;\n body?: any;\n files?: { [key: string]: File | Blob } | File | Blob;\n companyId?: string;\n language: string;\n additionalHeaders?: Record<string, string>;\n}) => Promise<ApiData>;\n\ntype GetTokenFn = () => Promise<string | undefined>;\n\n// These will be dynamically imported based on environment\nlet _directFetch: DirectFetchFn;\nlet _serverRequest: ServerRequestFn;\nlet _getClientToken: GetTokenFn;\nlet _getServerToken: GetTokenFn;\n\n// Config storage for non-React contexts\nlet _staticConfig: {\n apiUrl: string;\n appUrl?: string;\n trackablePages?: ModuleWithPermissions[];\n bootstrapper?: () => void;\n additionalHeaders?: Record<string, string>;\n} | null = null;\n\n/**\n * Configure the JSON:API client for non-React contexts (e.g., server components).\n * For React contexts, use JsonApiProvider instead.\n */\nexport function configureJsonApi(config: {\n apiUrl: string;\n appUrl?: string;\n trackablePages?: ModuleWithPermissions[];\n bootstrapper?: () => void;\n additionalHeaders?: Record<string, string>;\n}): void {\n _staticConfig = config;\n // Register and call bootstrapper to register all modules\n if (config.bootstrapper) {\n setBootstrapper(config.bootstrapper);\n config.bootstrapper();\n }\n}\n\nasync function getToken(): Promise<string | undefined> {\n if (typeof window === \"undefined\") {\n // Server-side\n if (!_getServerToken) {\n const serverModule = await import(\"../server/token\");\n _getServerToken = serverModule.getServerToken;\n }\n return _getServerToken();\n } else {\n // Client-side\n if (!_getClientToken) {\n const clientModule = await import(\"../client/token\");\n _getClientToken = clientModule.getClientToken;\n }\n return _getClientToken();\n }\n}\n\nasync function makeRequest(params: {\n method: string;\n url: string;\n token?: string;\n cache?: string;\n body?: any;\n files?: { [key: string]: File | Blob } | File | Blob;\n companyId?: string;\n language: string;\n additionalHeaders?: Record<string, string>;\n}): Promise<ApiData> {\n if (typeof window !== \"undefined\") {\n // Client-side: use direct fetch\n if (!_directFetch) {\n const clientModule = await import(\"../client/request\");\n _directFetch = clientModule.directFetch;\n }\n return _directFetch({\n method: params.method,\n url: params.url,\n token: params.token,\n body: params.body,\n files: params.files,\n companyId: params.companyId,\n language: params.language,\n additionalHeaders: params.additionalHeaders,\n });\n } else {\n // Server-side: use server request with caching\n if (!_serverRequest) {\n const serverModule = await import(\"../server/request\");\n _serverRequest = serverModule.serverRequest;\n }\n return _serverRequest({\n method: params.method,\n url: params.url,\n token: params.token,\n cache: params.cache,\n body: params.body,\n files: params.files,\n companyId: params.companyId,\n language: params.language,\n additionalHeaders: params.additionalHeaders,\n });\n }\n}\n\nexport function getApiUrl(): string {\n if (_staticConfig?.apiUrl) {\n return _staticConfig.apiUrl;\n }\n // Fallback to environment variable\n const envUrl = ENV.API_URL;\n if (!envUrl) {\n throw new Error(\"API URL not configured. Use configureJsonApi() or set NEXT_PUBLIC_API_URL environment variable.\");\n }\n return envUrl;\n}\n\nexport function getAppUrl(): string {\n if (_staticConfig?.appUrl) {\n return _staticConfig.appUrl;\n }\n // Fallback to environment variable\n const envUrl = ENV.APP_URL;\n if (!envUrl) {\n throw new Error(\n \"App URL not configured. Use configureJsonApi({ appUrl }) or set NEXT_PUBLIC_ADDRESS environment variable.\",\n );\n }\n return envUrl.trim().replace(/\\/+$/, \"\");\n}\n\nexport function getTrackablePages(): ModuleWithPermissions[] {\n return _staticConfig?.trackablePages ?? [];\n}\n\nfunction runBootstrapper(): void {\n if (_staticConfig?.bootstrapper) {\n _staticConfig.bootstrapper();\n }\n}\n\n/**\n * Resolve the final request URL for an endpoint.\n *\n * - `endpoint` starting with \"http\" is always passed through unchanged (existing behaviour).\n * - Otherwise, an explicit `baseUrl` (per-call override) takes precedence over the global\n * `getApiUrl()` resolution. Omitting `baseUrl` preserves today's behaviour exactly.\n */\nexport function buildUrl(endpoint: string, baseUrl?: string): string {\n if (endpoint.startsWith(\"http\")) return endpoint;\n const apiUrl = baseUrl ?? getApiUrl();\n return `${apiUrl}${endpoint}`;\n}\n\nexport async function JsonApiGet(params: {\n classKey: ApiRequestDataTypeInterface;\n endpoint: string;\n companyId?: string;\n language: string;\n token?: string;\n baseUrl?: string;\n}): Promise<ApiResponseInterface> {\n runBootstrapper();\n const token = params.token ?? (await getToken());\n\n const apiResponse = await makeRequest({\n method: \"GET\",\n url: buildUrl(params.endpoint, params.baseUrl),\n token,\n cache: params.classKey.cache,\n companyId: params.companyId,\n language: params.language,\n additionalHeaders: _staticConfig?.additionalHeaders,\n });\n\n return translateResponse({\n classKey: params.classKey,\n apiResponse,\n companyId: params.companyId,\n language: params.language,\n paginationHandler: async (endpoint: string) =>\n JsonApiGet({\n classKey: params.classKey,\n endpoint,\n companyId: params.companyId,\n language: params.language,\n token: params.token,\n baseUrl: params.baseUrl,\n }),\n });\n}\n\nexport async function JsonApiPost(params: {\n classKey: ApiRequestDataTypeInterface;\n endpoint: string;\n companyId?: string;\n body?: any;\n overridesJsonApiCreation?: boolean;\n files?: { [key: string]: File | Blob } | File | Blob;\n language: string;\n responseType?: ApiRequestDataTypeInterface;\n token?: string;\n baseUrl?: string;\n}): Promise<ApiResponseInterface> {\n runBootstrapper();\n const token = params.token ?? (await getToken());\n\n let body = params.body;\n if (!body) {\n body = {};\n } else if (params.overridesJsonApiCreation !== true) {\n body = JsonApiDataFactory.create(params.classKey, body);\n }\n\n const apiResponse = await makeRequest({\n method: \"POST\",\n url: buildUrl(params.endpoint, params.baseUrl),\n token,\n body,\n files: params.files,\n companyId: params.companyId,\n language: params.language,\n additionalHeaders: _staticConfig?.additionalHeaders,\n });\n\n return translateResponse({\n classKey: params.responseType ?? params.classKey,\n apiResponse,\n companyId: params.companyId,\n language: params.language,\n });\n}\n\nexport async function JsonApiPut(params: {\n classKey: ApiRequestDataTypeInterface;\n endpoint: string;\n companyId?: string;\n body?: any;\n files?: { [key: string]: File | Blob } | File | Blob;\n language: string;\n responseType?: ApiRequestDataTypeInterface;\n token?: string;\n baseUrl?: string;\n}): Promise<ApiResponseInterface> {\n runBootstrapper();\n const token = params.token ?? (await getToken());\n\n let body = params.body;\n if (!body) {\n body = {};\n } else {\n body = JsonApiDataFactory.create(params.classKey, body);\n }\n\n const apiResponse = await makeRequest({\n method: \"PUT\",\n url: buildUrl(params.endpoint, params.baseUrl),\n token,\n body,\n files: params.files,\n companyId: params.companyId,\n language: params.language,\n additionalHeaders: _staticConfig?.additionalHeaders,\n });\n\n return translateResponse({\n classKey: params.responseType ?? params.classKey,\n apiResponse,\n companyId: params.companyId,\n language: params.language,\n });\n}\n\nexport async function JsonApiPatch(params: {\n classKey: ApiRequestDataTypeInterface;\n endpoint: string;\n companyId?: string;\n body?: any;\n files?: { [key: string]: File | Blob } | File | Blob;\n overridesJsonApiCreation?: boolean;\n responseType?: ApiRequestDataTypeInterface;\n language: string;\n token?: string;\n baseUrl?: string;\n}): Promise<ApiResponseInterface> {\n runBootstrapper();\n const token = params.token ?? (await getToken());\n\n let body = params.body;\n if (!body) {\n body = {};\n } else if (params.overridesJsonApiCreation !== true) {\n body = JsonApiDataFactory.create(params.classKey, body);\n }\n\n const apiResponse = await makeRequest({\n method: \"PATCH\",\n url: buildUrl(params.endpoint, params.baseUrl),\n token,\n body,\n files: params.files,\n companyId: params.companyId,\n language: params.language,\n additionalHeaders: _staticConfig?.additionalHeaders,\n });\n\n return translateResponse({\n classKey: params.responseType ?? params.classKey,\n apiResponse,\n companyId: params.companyId,\n language: params.language,\n });\n}\n\nexport async function JsonApiDelete(params: {\n classKey: ApiRequestDataTypeInterface;\n endpoint: string;\n companyId?: string;\n language: string;\n responseType?: ApiRequestDataTypeInterface;\n token?: string;\n baseUrl?: string;\n}): Promise<ApiResponseInterface> {\n runBootstrapper();\n const token = params.token ?? (await getToken());\n\n const apiResponse = await makeRequest({\n method: \"DELETE\",\n url: buildUrl(params.endpoint, params.baseUrl),\n token,\n companyId: params.companyId,\n language: params.language,\n additionalHeaders: _staticConfig?.additionalHeaders,\n });\n\n return translateResponse({\n classKey: params.responseType ?? params.classKey,\n apiResponse,\n companyId: params.companyId,\n language: params.language,\n });\n}\n"],"mappings":";;;;;AAgCO,IAAM,MAAM;AAAA;AAAA,EAEjB,IAAI,UAAkB;AACpB,WAAO,QAAQ,IAAI,uBAAuB;AAAA,EAC5C;AAAA;AAAA,EAEA,IAAI,UAAkB;AACpB,WAAO,QAAQ,IAAI,uBAAuB;AAAA,EAC5C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,oBAA4B;AAC9B,WAAO,QAAQ,IAAI,uBAAuB;AAAA,EAC5C;AAAA;AAAA,EAEA,IAAI,mBAA2B;AAC7B,WAAO,QAAQ,IAAI,gCAAgC;AAAA,EACrD;AAAA;AAAA,EAEA,IAAI,sBAA8B;AAChC,WAAO,QAAQ,IAAI,mCAAmC;AAAA,EACx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,OAAO,UAAU,OAAO,OAAO;AAAA,IAC7C;AAAA,IACA,WAAW,OAAO;AAAA,IAClB,UAAU,OAAO;AAAA,IACjB,mBAAmB,eAAe;AAAA,EACpC,CAAC;AAED,SAAO,kBAAkB;AAAA,IACvB,UAAU,OAAO,gBAAgB,OAAO;AAAA,IACxC;AAAA,IACA,WAAW,OAAO;AAAA,IAClB,UAAU,OAAO;AAAA,EACnB,CAAC;AACH;AA3BsB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/chunk-W42MYR3Y.js","../src/core/env.ts","../src/core/registry/DataClassRegistry.ts","../src/core/factories/JsonApiDataFactory.ts","../src/core/registry/bootstrapStore.ts","../src/core/utils/translateResponse.ts","../src/unified/JsonApiRequest.ts"],"names":[],"mappings":"AAAA;AACE;AACF,sDAA4B;AAC5B;AACA;AC4BO,IAAM,IAAA,EAAM;AAAA;AAAA,EAEjB,IAAI,OAAA,CAAA,EAAkB;AACpB,IAAA,wBAAO,OAAA,CAAQ,GAAA,CAAI,mBAAA,UAAuB,IAAA;AAAA,EAC5C,CAAA;AAAA;AAAA,EAEA,IAAI,OAAA,CAAA,EAAkB;AACpB,IAAA,wBAAO,OAAA,CAAQ,GAAA,CAAI,mBAAA,UAAuB,IAAA;AAAA,EAC5C,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,iBAAA,CAAA,EAA4B;AAC9B,IAAA,wBAAO,OAAA,CAAQ,GAAA,CAAI,mBAAA,UAAuB,IAAA;AAAA,EAC5C,CAAA;AAAA;AAAA,EAEA,IAAI,gBAAA,CAAA,EAA2B;AAC7B,IAAA,wBAAO,OAAA,CAAQ,GAAA,CAAI,4BAAA,UAAgC,IAAA;AAAA,EACrD,CAAA;AAAA;AAAA,EAEA,IAAI,mBAAA,CAAA,EAA8B;AAChC,IAAA,wBAAO,OAAA,CAAQ,GAAA,CAAI,+BAAA,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;AACA,EAAA;AACE,IAAA;AAAQ,EAAA;AAER,IAAA;AAAsD,EAAA;AAGxD,EAAA;AAAsC,IAAA;AAC5B,IAAA;AACqC,IAAA;AAC7C,IAAA;AACA,IAAA;AACc,IAAA;AACI,IAAA;AACD,IAAA;AACiB,EAAA;AAGpC,EAAA;AAAyB,IAAA;AACiB,IAAA;AACxC,IAAA;AACkB,IAAA;AACD,EAAA;AAErB;AAtCsB;AAwCtB;AAYE,EAAA;AACA,EAAA;AAEA,EAAA;AACA,EAAA;AACE,IAAA;AAAQ,EAAA;AAER,IAAA;AAAsD,EAAA;AAGxD,EAAA;AAAsC,IAAA;AAC5B,IAAA;AACqC,IAAA;AAC7C,IAAA;AACA,IAAA;AACc,IAAA;AACI,IAAA;AACD,IAAA;AACiB,EAAA;AAGpC,EAAA;AAAyB,IAAA;AACiB,IAAA;AACxC,IAAA;AACkB,IAAA;AACD,EAAA;AAErB;AAvCsB;AAyCtB;AASE,EAAA;AACA,EAAA;AAEA,EAAA;AAAsC,IAAA;AAC5B,IAAA;AACqC,IAAA;AAC7C,IAAA;AACkB,IAAA;AACD,IAAA;AACiB,EAAA;AAGpC,EAAA;AAAyB,IAAA;AACiB,IAAA;AACxC,IAAA;AACkB,IAAA;AACD,EAAA;AAErB;AA3BsB;AN0JtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/chunk-W42MYR3Y.js","sourcesContent":[null,"/**\n * The single place in this package that reads `process.env`.\n *\n * Everything else imports {@link ENV}. Centralising the reads keeps every\n * default in one place — the same contract `base.config.ts` provides on the\n * NestJS side — instead of scattering `process.env.X || \"…\"` across hooks,\n * clients and components where the fallbacks silently drift apart.\n *\n * WHY THE READS MUST STAY LITERAL: Next.js inlines `NEXT_PUBLIC_*` by textual\n * substitution at build time, replacing the exact expression\n * `process.env.NEXT_PUBLIC_FOO` with a string literal. A computed lookup\n * (`process.env[key]`) is NOT substituted and reads as `undefined` in the\n * browser bundle. Every entry below therefore spells its variable out in full,\n * and new entries must do the same.\n *\n * WHY GETTERS AND NOT PLAIN PROPERTIES: every call site this replaced read\n * `process.env` at CALL time, not at import time. A plain property would freeze\n * the value when the module is first imported, which breaks any consumer that\n * assigns the variable after boot — the package's own tests do exactly that.\n * Getters keep the read lazy while leaving the expression literal, so the build\n * time substitution still applies.\n *\n * Because that substitution happens before the code runs, no reference to\n * `process` survives into the client bundle — so this module is safe to import\n * from client components, server components, route handlers and middleware\n * alike. It deliberately carries no `\"use client\"` directive for that reason.\n *\n * Values are normalised (empty string rather than `undefined`, booleans rather\n * than string comparisons) so callers never repeat the parsing. Callers that\n * must distinguish \"unset\" from \"set to empty\" — the URL getters, which throw a\n * configuration error — check for an empty string.\n */\nexport const ENV = {\n /** Public API base URL (NEXT_PUBLIC_API_URL). Empty when unset. */\n get API_URL(): string {\n return process.env.NEXT_PUBLIC_API_URL ?? \"\";\n },\n /** Public app base URL (NEXT_PUBLIC_ADDRESS). Empty when unset. */\n get APP_URL(): string {\n return process.env.NEXT_PUBLIC_ADDRESS ?? \"\";\n },\n /**\n * Alternative app base URL (NEXT_PUBLIC_APP_URL), used only by\n * `client/config.ts`'s `getAppUrl()` before it falls back to\n * `window.location.origin`. Empty when unset.\n */\n get APP_URL_ALTERNATE(): string {\n return process.env.NEXT_PUBLIC_APP_URL ?? \"\";\n },\n /** Web-push VAPID public key (NEXT_PUBLIC_VAPID_PUBLIC_KEY). Empty when unset. */\n get VAPID_PUBLIC_KEY(): string {\n return process.env.NEXT_PUBLIC_VAPID_PUBLIC_KEY ?? \"\";\n },\n /** Google Maps JS key (NEXT_PUBLIC_GOOGLE_MAPS_API_KEY). Empty disables autocomplete. */\n get GOOGLE_MAPS_API_KEY(): string {\n return process.env.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY ?? \"\";\n },\n /**\n * NEXT_PUBLIC_PRIVATE_INSTALLATION === \"true\", case-insensitively\n * (default false). A private installation is a single-tenant deployment.\n */\n get PRIVATE_INSTALLATION(): boolean {\n return process.env.NEXT_PUBLIC_PRIVATE_INSTALLATION?.toLowerCase() === \"true\";\n },\n /** NODE_ENV === \"production\" — set by the Next build, not by `.env`. */\n get IS_PRODUCTION(): boolean {\n return process.env.NODE_ENV === \"production\";\n },\n /** NODE_ENV === \"development\" — gates verbose client-side diagnostics. */\n get IS_DEVELOPMENT(): boolean {\n return process.env.NODE_ENV === \"development\";\n },\n};\n","import { ApiDataInterface } from \"../interfaces/ApiDataInterface\";\nimport { ApiRequestDataTypeInterface } from \"../interfaces/ApiRequestDataTypeInterface\";\n\nexport class DataClassRegistry {\n // Use Map with string key (module.name) for reliable lookup\n // String keys are stable across HMR and module re-evaluations\n // Note: WeakMap with object identity was tried but fails during Next.js navigation\n // because module re-evaluation creates new object instances with different identity\n private static _map = new Map<string, { new (): ApiDataInterface }>();\n\n public static registerObjectClass(\n key: ApiRequestDataTypeInterface,\n classConstructor: { new (): ApiDataInterface },\n ): void {\n const classKey = key.name;\n if (!this._map.has(classKey)) {\n this._map.set(classKey, classConstructor);\n }\n }\n\n public static get(classKey: ApiRequestDataTypeInterface): {\n new (): ApiDataInterface;\n } {\n const response = this._map.get(classKey.name);\n if (!response) {\n throw new Error(\n `Class not registered for key: ${typeof classKey === \"string\" ? classKey : classKey.name}. Ensure bootstrap() was called.`,\n );\n }\n\n return response;\n }\n\n /**\n * Get class constructor by JSON:API type name.\n * Used for polymorphic rehydration where the type is determined at runtime.\n */\n public static getByJsonApiType(typeName: string): { new (): ApiDataInterface } | undefined {\n return this._map.get(typeName);\n }\n\n /**\n * Bootstrap the registry with all modules.\n * This is a convenience method for apps to register all their modules at once.\n *\n * @param modules - An object with module definitions (like the app's Modules class)\n */\n public static bootstrap(modules: Record<string, ApiRequestDataTypeInterface>): void {\n Object.values(modules).forEach((module) => {\n if (module && module.model) {\n this.registerObjectClass(module, module.model);\n }\n });\n }\n\n /**\n * Clear all registered classes. Useful for testing.\n */\n public static clear(): void {\n this._map.clear();\n }\n}\n\n// Export alias for backward compatibility\nexport { DataClassRegistry as DataClass };\n","import { ApiDataInterface } from \"../interfaces/ApiDataInterface\";\nimport { ApiRequestDataTypeInterface } from \"../interfaces/ApiRequestDataTypeInterface\";\nimport { DataClassRegistry } from \"../registry/DataClassRegistry\";\n\nexport class JsonApiDataFactory {\n public static create(classKey: ApiRequestDataTypeInterface, data: any): any {\n const factoryClass = DataClassRegistry.get(classKey);\n\n const instance = new factoryClass() as ApiDataInterface;\n const result = instance.createJsonApi(data);\n return result;\n }\n}\n","/**\n * Centralized bootstrap store accessible from ModuleRegistry.\n * This file has NO external dependencies to avoid circular imports.\n *\n * The bootstrap store allows ModuleRegistry to call the app's bootstrapper\n * when modules are accessed before bootstrap() was called, providing\n * self-healing behavior for module evaluation order issues.\n *\n * IMPORTANT: We use globalThis to persist state across HMR/Turbopack\n * module re-evaluations in development mode. Without this, the bootstrapper\n * reference would be lost when modules are hot-reloaded, causing\n * \"Module not registered\" errors during navigation.\n */\n\ntype BootstrapperFn = () => void;\n\n// Symbol key to avoid conflicts with other globals\nconst BOOTSTRAP_KEY = Symbol.for(\"nextjs-jsonapi:bootstrapper\");\nconst BOOTSTRAP_ATTEMPTED_KEY = Symbol.for(\"nextjs-jsonapi:bootstrapAttempted\");\n\n// Use globalThis to persist across HMR reloads\nconst globalStore = globalThis as unknown as {\n [BOOTSTRAP_KEY]?: BootstrapperFn | null;\n [BOOTSTRAP_ATTEMPTED_KEY]?: boolean;\n};\n\n// Initialize from global if not set\nif (globalStore[BOOTSTRAP_KEY] === undefined) {\n globalStore[BOOTSTRAP_KEY] = null;\n}\nif (globalStore[BOOTSTRAP_ATTEMPTED_KEY] === undefined) {\n globalStore[BOOTSTRAP_ATTEMPTED_KEY] = false;\n}\n\n// Getters/setters that use the global store\nfunction getBootstrapperInternal(): BootstrapperFn | null {\n return globalStore[BOOTSTRAP_KEY] ?? null;\n}\n\nfunction setBootstrapperInternal(fn: BootstrapperFn | null): void {\n globalStore[BOOTSTRAP_KEY] = fn;\n}\n\nfunction getBootstrapAttempted(): boolean {\n return globalStore[BOOTSTRAP_ATTEMPTED_KEY] ?? false;\n}\n\nfunction setBootstrapAttempted(value: boolean): void {\n globalStore[BOOTSTRAP_ATTEMPTED_KEY] = value;\n}\n\n/**\n * Register the bootstrapper function.\n * Called by configureJsonApi() from client/config, client/JsonApiClient, or unified/JsonApiRequest.\n */\nexport function setBootstrapper(fn: BootstrapperFn): void {\n setBootstrapperInternal(fn);\n}\n\n/**\n * Get the registered bootstrapper function.\n * Returns null if no bootstrapper has been registered.\n */\nexport function getBootstrapper(): BootstrapperFn | null {\n return getBootstrapperInternal();\n}\n\n/**\n * Attempt to run the bootstrapper if one is registered.\n * Returns true if bootstrapper was executed, false if not available.\n * Safe to call multiple times - bootstrapper is expected to be idempotent.\n */\nexport function tryBootstrap(): boolean {\n const bootstrapper = getBootstrapperInternal();\n const attempted = getBootstrapAttempted();\n\n if (attempted && !bootstrapper) {\n // Already tried and no bootstrapper available\n return false;\n }\n setBootstrapAttempted(true);\n\n if (bootstrapper) {\n bootstrapper();\n return true;\n }\n return false;\n}\n\n/**\n * Check if a bootstrapper has been registered.\n */\nexport function hasBootstrapper(): boolean {\n return getBootstrapperInternal() !== null;\n}\n\n/**\n * Reset the bootstrap store. Useful for testing.\n */\nexport function resetBootstrapStore(): void {\n setBootstrapperInternal(null);\n setBootstrapAttempted(false);\n}\n","import { ApiData } from \"../interfaces/ApiData\";\nimport { ApiDataInterface } from \"../interfaces/ApiDataInterface\";\nimport { ApiRequestDataTypeInterface } from \"../interfaces/ApiRequestDataTypeInterface\";\nimport { ApiResponseInterface } from \"../interfaces/ApiResponseInterface\";\nimport { DataClassRegistry } from \"../registry/DataClassRegistry\";\n\n/**\n * Translates raw JSON:API data into typed objects.\n * Does not require API response metadata.\n */\nexport function translateData<T extends ApiDataInterface>(params: {\n classKey: ApiRequestDataTypeInterface;\n data: any;\n}): T | T[] {\n const factoryClass = DataClassRegistry.get(params.classKey);\n\n if (!factoryClass) {\n throw new Error(\n `Class not registered for key: ${typeof params.classKey === \"string\" ? params.classKey : params.classKey.name}`,\n );\n }\n\n const included: any = params.data.included ?? [];\n\n if (Array.isArray(params.data.data)) {\n const responseData: T[] = [];\n\n for (const data of params.data.data) {\n const object = new factoryClass();\n object.rehydrate({ jsonApi: data, included: included, allData: params.data.data });\n responseData.push(object as T);\n }\n\n return responseData as T[];\n } else {\n const responseData = new factoryClass();\n responseData.rehydrate({\n jsonApi: params.data.data,\n included: included,\n });\n\n return responseData as T;\n }\n}\n\n/**\n * Translates a full API response into a typed ApiResponseInterface.\n * Includes pagination support.\n */\nexport async function translateResponse<T extends ApiDataInterface>(params: {\n classKey: ApiRequestDataTypeInterface;\n apiResponse: ApiData;\n companyId?: string;\n language: string;\n paginationHandler?: (endpoint: string) => Promise<ApiResponseInterface>;\n}): Promise<ApiResponseInterface> {\n const response: ApiResponseInterface = {\n ok: true,\n response: 0,\n data: [],\n error: \"\",\n };\n\n const factoryClass = DataClassRegistry.get(params.classKey);\n\n if (!factoryClass) {\n throw new Error(\n `Class not registered for key: ${typeof params.classKey === \"string\" ? params.classKey : params.classKey.name}`,\n );\n }\n\n response.ok = params.apiResponse.ok;\n response.response = params.apiResponse.status;\n\n if (!params.apiResponse.ok) {\n // `statusText` is empty over HTTP/2 (the reason phrase was removed from the protocol), so the\n // body is the only reliable source of error text. APIs in this stack use either key.\n response.error =\n params.apiResponse?.data?.message ?? params.apiResponse?.data?.error ?? params.apiResponse.statusText;\n response.raw = params.apiResponse.data;\n return response;\n }\n\n if (params.apiResponse.status === 204) return response;\n\n // A success with no body (e.g. a 200 from a handler that sends nothing —\n // @HttpCode is inert when a controller injects @Res, so \"204\" endpoints can\n // arrive as empty 200s) translates to an empty success, not a crash on\n // `.included` below.\n if (params.apiResponse.data === undefined || params.apiResponse.data === null) return response;\n\n response.raw = params.apiResponse.data;\n\n // Extract meta from JSON:API response\n if (params.apiResponse.data?.meta) {\n response.meta = params.apiResponse.data.meta;\n }\n\n try {\n // Check if response is JSON:API formatted (has a 'data' property)\n // If not, return the raw response data directly (e.g., { url: \"...\" } or { clientSecret: \"...\" })\n if (\n params.apiResponse.data &&\n typeof params.apiResponse.data === \"object\" &&\n !Array.isArray(params.apiResponse.data) &&\n params.apiResponse.data.data === undefined\n ) {\n response.data = params.apiResponse.data;\n return response;\n }\n\n const included: any = params.apiResponse.data.included ?? [];\n\n if (params.apiResponse.data.links) {\n response.self = params.apiResponse.data.links.self;\n\n if (params.apiResponse.data.links.next && params.paginationHandler) {\n response.next = params.apiResponse.data.links.next;\n response.nextPage = async () => params.paginationHandler!(params.apiResponse.data.links.next);\n }\n\n if (params.apiResponse.data.links.prev && params.paginationHandler) {\n response.prev = params.apiResponse.data.links.prev;\n response.prevPage = async () => params.paginationHandler!(params.apiResponse.data.links.prev);\n }\n }\n\n if (Array.isArray(params.apiResponse.data.data)) {\n const responseData: T[] = [];\n\n for (const data of params.apiResponse.data.data) {\n const object = new factoryClass();\n object.rehydrate({ jsonApi: data, included: included, allData: params.apiResponse.data.data });\n responseData.push(object as T);\n }\n\n response.data = responseData;\n } else {\n const responseData = new factoryClass();\n responseData.rehydrate({\n jsonApi: params.apiResponse.data.data,\n included: included,\n });\n\n response.data = responseData;\n }\n } catch (e) {\n console.error(e);\n }\n\n return response;\n}\n","import { ENV } from \"../core/env\";\nimport { JsonApiDataFactory } from \"../core/factories/JsonApiDataFactory\";\nimport { ApiData } from \"../core/interfaces/ApiData\";\nimport { ApiRequestDataTypeInterface } from \"../core/interfaces/ApiRequestDataTypeInterface\";\nimport { ApiResponseInterface } from \"../core/interfaces/ApiResponseInterface\";\nimport { setBootstrapper } from \"../core/registry/bootstrapStore\";\nimport { translateResponse } from \"../core/utils/translateResponse\";\nimport { ModuleWithPermissions } from \"../permissions/types\";\n\n// Type definitions for dynamically imported functions (avoiding typeof import to prevent bundling)\ntype DirectFetchFn = (params: {\n method: string;\n url: string;\n token?: string;\n body?: any;\n files?: { [key: string]: File | Blob } | File | Blob;\n companyId?: string;\n language: string;\n additionalHeaders?: Record<string, string>;\n}) => Promise<ApiData>;\n\ntype ServerRequestFn = (params: {\n method: string;\n url: string;\n token?: string;\n cache?: string;\n body?: any;\n files?: { [key: string]: File | Blob } | File | Blob;\n companyId?: string;\n language: string;\n additionalHeaders?: Record<string, string>;\n}) => Promise<ApiData>;\n\ntype GetTokenFn = () => Promise<string | undefined>;\n\n// These will be dynamically imported based on environment\nlet _directFetch: DirectFetchFn;\nlet _serverRequest: ServerRequestFn;\nlet _getClientToken: GetTokenFn;\nlet _getServerToken: GetTokenFn;\n\n// Config storage for non-React contexts\nlet _staticConfig: {\n apiUrl: string;\n appUrl?: string;\n trackablePages?: ModuleWithPermissions[];\n bootstrapper?: () => void;\n additionalHeaders?: Record<string, string>;\n} | null = null;\n\n/**\n * Configure the JSON:API client for non-React contexts (e.g., server components).\n * For React contexts, use JsonApiProvider instead.\n */\nexport function configureJsonApi(config: {\n apiUrl: string;\n appUrl?: string;\n trackablePages?: ModuleWithPermissions[];\n bootstrapper?: () => void;\n additionalHeaders?: Record<string, string>;\n}): void {\n _staticConfig = config;\n // Register and call bootstrapper to register all modules\n if (config.bootstrapper) {\n setBootstrapper(config.bootstrapper);\n config.bootstrapper();\n }\n}\n\nasync function getToken(): Promise<string | undefined> {\n if (typeof window === \"undefined\") {\n // Server-side\n if (!_getServerToken) {\n const serverModule = await import(\"../server/token\");\n _getServerToken = serverModule.getServerToken;\n }\n return _getServerToken();\n } else {\n // Client-side\n if (!_getClientToken) {\n const clientModule = await import(\"../client/token\");\n _getClientToken = clientModule.getClientToken;\n }\n return _getClientToken();\n }\n}\n\nasync function makeRequest(params: {\n method: string;\n url: string;\n token?: string;\n cache?: string;\n body?: any;\n files?: { [key: string]: File | Blob } | File | Blob;\n companyId?: string;\n language: string;\n additionalHeaders?: Record<string, string>;\n}): Promise<ApiData> {\n if (typeof window !== \"undefined\") {\n // Client-side: use direct fetch\n if (!_directFetch) {\n const clientModule = await import(\"../client/request\");\n _directFetch = clientModule.directFetch;\n }\n return _directFetch({\n method: params.method,\n url: params.url,\n token: params.token,\n body: params.body,\n files: params.files,\n companyId: params.companyId,\n language: params.language,\n additionalHeaders: params.additionalHeaders,\n });\n } else {\n // Server-side: use server request with caching\n if (!_serverRequest) {\n const serverModule = await import(\"../server/request\");\n _serverRequest = serverModule.serverRequest;\n }\n return _serverRequest({\n method: params.method,\n url: params.url,\n token: params.token,\n cache: params.cache,\n body: params.body,\n files: params.files,\n companyId: params.companyId,\n language: params.language,\n additionalHeaders: params.additionalHeaders,\n });\n }\n}\n\nexport function getApiUrl(): string {\n if (_staticConfig?.apiUrl) {\n return _staticConfig.apiUrl;\n }\n // Fallback to environment variable\n const envUrl = ENV.API_URL;\n if (!envUrl) {\n throw new Error(\"API URL not configured. Use configureJsonApi() or set NEXT_PUBLIC_API_URL environment variable.\");\n }\n return envUrl;\n}\n\nexport function getAppUrl(): string {\n if (_staticConfig?.appUrl) {\n return _staticConfig.appUrl;\n }\n // Fallback to environment variable\n const envUrl = ENV.APP_URL;\n if (!envUrl) {\n throw new Error(\n \"App URL not configured. Use configureJsonApi({ appUrl }) or set NEXT_PUBLIC_ADDRESS environment variable.\",\n );\n }\n return envUrl.trim().replace(/\\/+$/, \"\");\n}\n\nexport function getTrackablePages(): ModuleWithPermissions[] {\n return _staticConfig?.trackablePages ?? [];\n}\n\nfunction runBootstrapper(): void {\n if (_staticConfig?.bootstrapper) {\n _staticConfig.bootstrapper();\n }\n}\n\n/**\n * Resolve the final request URL for an endpoint.\n *\n * - `endpoint` starting with \"http\" is always passed through unchanged (existing behaviour).\n * - Otherwise, an explicit `baseUrl` (per-call override) takes precedence over the global\n * `getApiUrl()` resolution. Omitting `baseUrl` preserves today's behaviour exactly.\n */\nexport function buildUrl(endpoint: string, baseUrl?: string): string {\n if (endpoint.startsWith(\"http\")) return endpoint;\n const apiUrl = baseUrl ?? getApiUrl();\n return `${apiUrl}${endpoint}`;\n}\n\nexport async function JsonApiGet(params: {\n classKey: ApiRequestDataTypeInterface;\n endpoint: string;\n companyId?: string;\n language: string;\n token?: string;\n baseUrl?: string;\n}): Promise<ApiResponseInterface> {\n runBootstrapper();\n const token = params.token ?? (await getToken());\n\n const apiResponse = await makeRequest({\n method: \"GET\",\n url: buildUrl(params.endpoint, params.baseUrl),\n token,\n cache: params.classKey.cache,\n companyId: params.companyId,\n language: params.language,\n additionalHeaders: _staticConfig?.additionalHeaders,\n });\n\n return translateResponse({\n classKey: params.classKey,\n apiResponse,\n companyId: params.companyId,\n language: params.language,\n paginationHandler: async (endpoint: string) =>\n JsonApiGet({\n classKey: params.classKey,\n endpoint,\n companyId: params.companyId,\n language: params.language,\n token: params.token,\n baseUrl: params.baseUrl,\n }),\n });\n}\n\nexport async function JsonApiPost(params: {\n classKey: ApiRequestDataTypeInterface;\n endpoint: string;\n companyId?: string;\n body?: any;\n overridesJsonApiCreation?: boolean;\n files?: { [key: string]: File | Blob } | File | Blob;\n language: string;\n responseType?: ApiRequestDataTypeInterface;\n token?: string;\n baseUrl?: string;\n}): Promise<ApiResponseInterface> {\n runBootstrapper();\n const token = params.token ?? (await getToken());\n\n let body = params.body;\n if (!body) {\n body = {};\n } else if (params.overridesJsonApiCreation !== true) {\n body = JsonApiDataFactory.create(params.classKey, body);\n }\n\n const apiResponse = await makeRequest({\n method: \"POST\",\n url: buildUrl(params.endpoint, params.baseUrl),\n token,\n body,\n files: params.files,\n companyId: params.companyId,\n language: params.language,\n additionalHeaders: _staticConfig?.additionalHeaders,\n });\n\n return translateResponse({\n classKey: params.responseType ?? params.classKey,\n apiResponse,\n companyId: params.companyId,\n language: params.language,\n });\n}\n\nexport async function JsonApiPut(params: {\n classKey: ApiRequestDataTypeInterface;\n endpoint: string;\n companyId?: string;\n body?: any;\n files?: { [key: string]: File | Blob } | File | Blob;\n language: string;\n responseType?: ApiRequestDataTypeInterface;\n token?: string;\n baseUrl?: string;\n}): Promise<ApiResponseInterface> {\n runBootstrapper();\n const token = params.token ?? (await getToken());\n\n let body = params.body;\n if (!body) {\n body = {};\n } else {\n body = JsonApiDataFactory.create(params.classKey, body);\n }\n\n const apiResponse = await makeRequest({\n method: \"PUT\",\n url: buildUrl(params.endpoint, params.baseUrl),\n token,\n body,\n files: params.files,\n companyId: params.companyId,\n language: params.language,\n additionalHeaders: _staticConfig?.additionalHeaders,\n });\n\n return translateResponse({\n classKey: params.responseType ?? params.classKey,\n apiResponse,\n companyId: params.companyId,\n language: params.language,\n });\n}\n\nexport async function JsonApiPatch(params: {\n classKey: ApiRequestDataTypeInterface;\n endpoint: string;\n companyId?: string;\n body?: any;\n files?: { [key: string]: File | Blob } | File | Blob;\n overridesJsonApiCreation?: boolean;\n responseType?: ApiRequestDataTypeInterface;\n language: string;\n token?: string;\n baseUrl?: string;\n}): Promise<ApiResponseInterface> {\n runBootstrapper();\n const token = params.token ?? (await getToken());\n\n let body = params.body;\n if (!body) {\n body = {};\n } else if (params.overridesJsonApiCreation !== true) {\n body = JsonApiDataFactory.create(params.classKey, body);\n }\n\n const apiResponse = await makeRequest({\n method: \"PATCH\",\n url: buildUrl(params.endpoint, params.baseUrl),\n token,\n body,\n files: params.files,\n companyId: params.companyId,\n language: params.language,\n additionalHeaders: _staticConfig?.additionalHeaders,\n });\n\n return translateResponse({\n classKey: params.responseType ?? params.classKey,\n apiResponse,\n companyId: params.companyId,\n language: params.language,\n });\n}\n\nexport async function JsonApiDelete(params: {\n classKey: ApiRequestDataTypeInterface;\n endpoint: string;\n companyId?: string;\n language: string;\n responseType?: ApiRequestDataTypeInterface;\n token?: string;\n baseUrl?: string;\n}): Promise<ApiResponseInterface> {\n runBootstrapper();\n const token = params.token ?? (await getToken());\n\n const apiResponse = await makeRequest({\n method: \"DELETE\",\n url: buildUrl(params.endpoint, params.baseUrl),\n token,\n companyId: params.companyId,\n language: params.language,\n additionalHeaders: _staticConfig?.additionalHeaders,\n });\n\n return translateResponse({\n classKey: params.responseType ?? params.classKey,\n apiResponse,\n companyId: params.companyId,\n language: params.language,\n });\n}\n"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|