@carlonicora/nextjs-jsonapi 3.11.0 → 3.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/{BlockNoteEditor-XOVNTXDY.js → BlockNoteEditor-6G27S6P3.js} +19 -19
  2. package/dist/{BlockNoteEditor-XOVNTXDY.js.map → BlockNoteEditor-6G27S6P3.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-NBHDEZ7W.mjs → BlockNoteEditor-CR5KH4AI.mjs} +4 -4
  4. package/dist/{BlockNoteViewer-C2UUOBAF.js → BlockNoteViewer-5MITJ7AD.js} +3 -3
  5. package/dist/{BlockNoteViewer-C2UUOBAF.js.map → BlockNoteViewer-5MITJ7AD.js.map} +1 -1
  6. package/dist/{BlockNoteViewer-TYLVTIUD.mjs → BlockNoteViewer-NJKFUNXP.mjs} +2 -2
  7. package/dist/billing/index.d.mts +27 -0
  8. package/dist/billing/index.d.ts +27 -0
  9. package/dist/billing/index.js +697 -450
  10. package/dist/billing/index.js.map +1 -1
  11. package/dist/billing/index.mjs +282 -35
  12. package/dist/billing/index.mjs.map +1 -1
  13. package/dist/{chunk-V6CGCARD.js → chunk-4ETVCRQD.js} +7 -7
  14. package/dist/{chunk-V6CGCARD.js.map → chunk-4ETVCRQD.js.map} +1 -1
  15. package/dist/{chunk-IMSIVIIC.mjs → chunk-HVNEWDRF.mjs} +2 -2
  16. package/dist/{chunk-XNGI4HDZ.mjs → chunk-JEGL7KHK.mjs} +49 -6
  17. package/dist/{chunk-XNGI4HDZ.mjs.map → chunk-JEGL7KHK.mjs.map} +1 -1
  18. package/dist/{chunk-6J2SQZ3G.js → chunk-L7DZSTFU.js} +2 -1
  19. package/dist/chunk-L7DZSTFU.js.map +1 -0
  20. package/dist/{chunk-YN4LOVL4.js → chunk-OKGGYCO5.js} +904 -861
  21. package/dist/chunk-OKGGYCO5.js.map +1 -0
  22. package/dist/{chunk-M5QAHSCY.mjs → chunk-Q2BREXH3.mjs} +2 -1
  23. package/dist/chunk-Q2BREXH3.mjs.map +1 -0
  24. package/dist/client/index.js +4 -4
  25. package/dist/client/index.mjs +3 -3
  26. package/dist/components/index.js +4 -4
  27. package/dist/components/index.mjs +3 -3
  28. package/dist/contexts/index.js +4 -4
  29. package/dist/contexts/index.mjs +3 -3
  30. package/dist/core/index.d.mts +2 -1
  31. package/dist/core/index.d.ts +2 -1
  32. package/dist/core/index.js +2 -2
  33. package/dist/core/index.mjs +1 -1
  34. package/dist/features/help/index.js +37 -37
  35. package/dist/features/help/index.mjs +3 -3
  36. package/dist/features/tokenusage/index.js +101 -101
  37. package/dist/features/tokenusage/index.mjs +3 -3
  38. package/dist/index.js +3 -3
  39. package/dist/index.mjs +2 -2
  40. package/dist/server/index.js +3 -3
  41. package/dist/server/index.mjs +1 -1
  42. package/package.json +1 -1
  43. package/src/features/billing/i18n-keys.ts +7 -0
  44. package/src/features/billing/stripe-price/components/forms/PriceEditor.tsx +108 -2
  45. package/src/features/billing/stripe-price/components/forms/__tests__/PriceEditor.spec.tsx +182 -0
  46. package/src/features/billing/stripe-price/components/lists/PricesList.tsx +152 -25
  47. package/src/features/billing/stripe-price/components/lists/__tests__/PricesList.spec.tsx +268 -0
  48. package/src/features/billing/stripe-price/data/__tests__/stripe-price.transfer.spec.ts +265 -0
  49. package/src/features/billing/stripe-price/data/stripe-price.fields.ts +1 -0
  50. package/src/features/billing/stripe-price/data/stripe-price.transfer.ts +194 -0
  51. package/src/features/billing/stripe-price/hooks/useStripePriceTableStructure.tsx +66 -2
  52. package/dist/chunk-6J2SQZ3G.js.map +0 -1
  53. package/dist/chunk-M5QAHSCY.mjs.map +0 -1
  54. package/dist/chunk-YN4LOVL4.js.map +0 -1
  55. /package/dist/{BlockNoteEditor-NBHDEZ7W.mjs.map → BlockNoteEditor-CR5KH4AI.mjs.map} +0 -0
  56. /package/dist/{BlockNoteViewer-TYLVTIUD.mjs.map → BlockNoteViewer-NJKFUNXP.mjs.map} +0 -0
  57. /package/dist/{chunk-IMSIVIIC.mjs.map → chunk-HVNEWDRF.mjs.map} +0 -0
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
 
21
- var _chunkV6CGCARDjs = require('./chunk-V6CGCARD.js');
21
+ var _chunk4ETVCRQDjs = require('./chunk-4ETVCRQD.js');
22
22
 
23
23
 
24
24
 
@@ -226,7 +226,7 @@ var _chunkV6CGCARDjs = require('./chunk-V6CGCARD.js');
226
226
 
227
227
 
228
228
 
229
- var _chunk6J2SQZ3Gjs = require('./chunk-6J2SQZ3G.js');
229
+ var _chunkL7DZSTFUjs = require('./chunk-L7DZSTFU.js');
230
230
  require('./chunk-LXKSUWAV.js');
231
231
  require('./chunk-IBS6NI7D.js');
232
232
 
@@ -479,5 +479,5 @@ require('./chunk-7QVYU63E.js');
479
479
 
480
480
 
481
481
 
482
- exports.ACTION_TYPES = _chunkV6CGCARDjs.ACTION_TYPES; exports.AVAILABLE_OAUTH_SCOPES = _chunk6J2SQZ3Gjs.AVAILABLE_OAUTH_SCOPES; exports.AbstractApiData = _chunk6J2SQZ3Gjs.AbstractApiData; exports.AbstractService = _chunk6J2SQZ3Gjs.AbstractService; exports.Action = _chunk6J2SQZ3Gjs.Action; exports.AiConnection = _chunk6J2SQZ3Gjs.AiConnection; exports.AiConnectionFields = _chunk6J2SQZ3Gjs.AiConnectionFields; exports.AiConnectionModule = _chunk6J2SQZ3Gjs.AiConnectionModule; exports.AiConnectionService = _chunk6J2SQZ3Gjs.AiConnectionService; exports.Assistant = _chunk6J2SQZ3Gjs.Assistant; exports.AssistantAction = _chunk6J2SQZ3Gjs.AssistantAction; exports.AssistantActionModule = _chunk6J2SQZ3Gjs.AssistantActionModule; exports.AssistantActionService = _chunk6J2SQZ3Gjs.AssistantActionService; exports.AssistantMessage = _chunk6J2SQZ3Gjs.AssistantMessage; exports.AssistantMessageModule = _chunk6J2SQZ3Gjs.AssistantMessageModule; exports.AssistantMessageService = _chunk6J2SQZ3Gjs.AssistantMessageService; exports.AssistantModule = _chunk6J2SQZ3Gjs.AssistantModule; exports.AssistantService = _chunk6J2SQZ3Gjs.AssistantService; exports.AuditLog = _chunk6J2SQZ3Gjs.AuditLog; exports.AuditLogModule = _chunk6J2SQZ3Gjs.AuditLogModule; exports.AuditLogService = _chunk6J2SQZ3Gjs.AuditLogService; exports.Auth = _chunk6J2SQZ3Gjs.Auth; exports.AuthComponent = _chunk6J2SQZ3Gjs.AuthComponent; exports.AuthModule = _chunk6J2SQZ3Gjs.AuthModule; exports.AuthService = _chunk6J2SQZ3Gjs.AuthService; exports.AuthorModule = _chunk6J2SQZ3Gjs.AuthorModule; exports.BackupCodeVerify = _chunk6J2SQZ3Gjs.BackupCodeVerify; exports.BackupCodeVerifyModule = _chunk6J2SQZ3Gjs.BackupCodeVerifyModule; exports.Billing = _chunk6J2SQZ3Gjs.Billing; exports.BillingModule = _chunk6J2SQZ3Gjs.BillingModule; exports.BillingService = _chunk6J2SQZ3Gjs.BillingService; exports.BlockNoteDiffUtil = _chunk6J2SQZ3Gjs.BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = _chunk6J2SQZ3Gjs.BlockNoteWordDiffRendererUtil; exports.COMPANY_ADMINISTRATOR_ROLE_ID = _chunkV6CGCARDjs.COMPANY_ADMINISTRATOR_ROLE_ID; exports.CURRENT_USER_STORAGE_KEY = _chunk6J2SQZ3Gjs.CURRENT_USER_STORAGE_KEY; exports.Chunk = _chunk6J2SQZ3Gjs.Chunk; exports.ChunkModule = _chunk6J2SQZ3Gjs.ChunkModule; exports.ClientAbstractService = _chunk6J2SQZ3Gjs.ClientAbstractService; exports.ClientHttpMethod = _chunk6J2SQZ3Gjs.ClientHttpMethod; exports.Company = _chunk6J2SQZ3Gjs.Company; exports.CompanyFields = _chunk6J2SQZ3Gjs.CompanyFields; exports.CompanyModule = _chunk6J2SQZ3Gjs.CompanyModule; exports.CompanyService = _chunk6J2SQZ3Gjs.CompanyService; exports.Content = _chunk6J2SQZ3Gjs.Content; exports.ContentFields = _chunk6J2SQZ3Gjs.ContentFields; exports.ContentModule = _chunk6J2SQZ3Gjs.ContentModule; exports.ContentService = _chunk6J2SQZ3Gjs.ContentService; exports.DEFAULT_GRANT_TYPES = _chunk6J2SQZ3Gjs.DEFAULT_GRANT_TYPES; exports.DataClass = _chunkLU7DJ4QFjs.DataClassRegistry; exports.DataClassRegistry = _chunkLU7DJ4QFjs.DataClassRegistry; exports.ENV = _chunkLU7DJ4QFjs.ENV; exports.EndpointCreator = _chunk6J2SQZ3Gjs.EndpointCreator; exports.EntityAiStatus = _chunk6J2SQZ3Gjs.EntityAiStatus; exports.Feature = _chunk6J2SQZ3Gjs.Feature; exports.FeatureModule = _chunk6J2SQZ3Gjs.FeatureModule; exports.FeatureService = _chunk6J2SQZ3Gjs.FeatureService; exports.HowTo = _chunk6J2SQZ3Gjs.HowTo; exports.HowToFields = _chunk6J2SQZ3Gjs.HowToFields; exports.HowToModule = _chunk6J2SQZ3Gjs.HowToModule; exports.HowToService = _chunk6J2SQZ3Gjs.HowToService; exports.HttpMethod = _chunk6J2SQZ3Gjs.HttpMethod; exports.InvoiceStatus = _chunk6J2SQZ3Gjs.InvoiceStatus; exports.JsonApiDataFactory = _chunkLU7DJ4QFjs.JsonApiDataFactory; exports.MOBILE_BREAKPOINT = _chunk6J2SQZ3Gjs.MOBILE_BREAKPOINT; exports.Module = _chunk6J2SQZ3Gjs.Module; exports.ModuleModule = _chunk6J2SQZ3Gjs.ModuleModule; exports.ModulePaths = _chunk6J2SQZ3Gjs.ModulePaths; exports.ModulePathsModule = _chunk6J2SQZ3Gjs.ModulePathsModule; exports.ModuleRegistrar = _chunk6J2SQZ3Gjs.ModuleRegistrar; exports.ModuleRegistry = _chunk6J2SQZ3Gjs.ModuleRegistry; exports.Modules = _chunk6J2SQZ3Gjs.Modules; exports.Notification = _chunk6J2SQZ3Gjs.Notification; exports.NotificationFields = _chunk6J2SQZ3Gjs.NotificationFields; exports.NotificationModule = _chunk6J2SQZ3Gjs.NotificationModule; exports.NotificationService = _chunk6J2SQZ3Gjs.NotificationService; exports.OAUTH_SCOPE_DISPLAY = _chunk6J2SQZ3Gjs.OAUTH_SCOPE_DISPLAY; exports.OAuthClient = _chunk6J2SQZ3Gjs.OAuthClient; exports.OAuthModule = _chunk6J2SQZ3Gjs.OAuthModule; exports.OAuthService = _chunk6J2SQZ3Gjs.OAuthService; exports.Passkey = _chunk6J2SQZ3Gjs.Passkey; exports.PasskeyAuthenticationOptions = _chunk6J2SQZ3Gjs.PasskeyAuthenticationOptions; exports.PasskeyAuthenticationOptionsModule = _chunk6J2SQZ3Gjs.PasskeyAuthenticationOptionsModule; exports.PasskeyModule = _chunk6J2SQZ3Gjs.PasskeyModule; exports.PasskeyRegistrationOptions = _chunk6J2SQZ3Gjs.PasskeyRegistrationOptions; exports.PasskeyRegistrationOptionsModule = _chunk6J2SQZ3Gjs.PasskeyRegistrationOptionsModule; exports.PasskeyRegistrationVerify = _chunk6J2SQZ3Gjs.PasskeyRegistrationVerify; exports.PasskeyRegistrationVerifyModule = _chunk6J2SQZ3Gjs.PasskeyRegistrationVerifyModule; exports.PasskeyRename = _chunk6J2SQZ3Gjs.PasskeyRename; exports.PasskeyRenameModule = _chunk6J2SQZ3Gjs.PasskeyRenameModule; exports.PasskeyVerifyLogin = _chunk6J2SQZ3Gjs.PasskeyVerifyLogin; exports.PasskeyVerifyLoginModule = _chunk6J2SQZ3Gjs.PasskeyVerifyLoginModule; exports.PaymentMethod = _chunk6J2SQZ3Gjs.PaymentMethod; exports.PermissionMapping = _chunk6J2SQZ3Gjs.PermissionMapping; exports.PermissionMappingModule = _chunk6J2SQZ3Gjs.PermissionMappingModule; exports.Push = _chunk6J2SQZ3Gjs.Push; exports.PushModule = _chunk6J2SQZ3Gjs.PushModule; exports.PushService = _chunk6J2SQZ3Gjs.PushService; exports.RbacMatrixModel = _chunk6J2SQZ3Gjs.RbacMatrixModel; exports.RbacMatrixModule = _chunk6J2SQZ3Gjs.RbacMatrixModule; exports.RbacService = _chunkV6CGCARDjs.RbacService; exports.ReferralModule = _chunk6J2SQZ3Gjs.ReferralModule; exports.ReferralService = _chunk6J2SQZ3Gjs.ReferralService; exports.ReferralStats = _chunk6J2SQZ3Gjs.ReferralStats; exports.ReferralStatsModule = _chunk6J2SQZ3Gjs.ReferralStatsModule; exports.RehydrationFactory = _chunk6J2SQZ3Gjs.RehydrationFactory; exports.Role = _chunk6J2SQZ3Gjs.Role; exports.RoleFields = _chunk6J2SQZ3Gjs.RoleFields; exports.RoleModule = _chunk6J2SQZ3Gjs.RoleModule; exports.RoleService = _chunk6J2SQZ3Gjs.RoleService; exports.S3 = _chunk6J2SQZ3Gjs.S3; exports.S3Module = _chunk6J2SQZ3Gjs.S3Module; exports.S3Service = _chunk6J2SQZ3Gjs.S3Service; exports.StripeCustomer = _chunk6J2SQZ3Gjs.StripeCustomer; exports.StripeCustomerModule = _chunk6J2SQZ3Gjs.StripeCustomerModule; exports.StripeCustomerService = _chunk6J2SQZ3Gjs.StripeCustomerService; exports.StripeInvoice = _chunk6J2SQZ3Gjs.StripeInvoice; exports.StripeInvoiceModule = _chunk6J2SQZ3Gjs.StripeInvoiceModule; exports.StripeInvoiceService = _chunk6J2SQZ3Gjs.StripeInvoiceService; exports.StripePaymentMethodModule = _chunk6J2SQZ3Gjs.StripePaymentMethodModule; exports.StripePrice = _chunk6J2SQZ3Gjs.StripePrice; exports.StripePriceFields = _chunk6J2SQZ3Gjs.StripePriceFields; exports.StripePriceModule = _chunk6J2SQZ3Gjs.StripePriceModule; exports.StripePriceService = _chunk6J2SQZ3Gjs.StripePriceService; exports.StripeProduct = _chunk6J2SQZ3Gjs.StripeProduct; exports.StripeProductFields = _chunk6J2SQZ3Gjs.StripeProductFields; exports.StripeProductModule = _chunk6J2SQZ3Gjs.StripeProductModule; exports.StripeProductService = _chunk6J2SQZ3Gjs.StripeProductService; exports.StripePromotionCode = _chunk6J2SQZ3Gjs.StripePromotionCode; exports.StripePromotionCodeModule = _chunk6J2SQZ3Gjs.StripePromotionCodeModule; exports.StripePromotionCodeService = _chunk6J2SQZ3Gjs.StripePromotionCodeService; exports.StripeSubscription = _chunk6J2SQZ3Gjs.StripeSubscription; exports.StripeSubscriptionModule = _chunk6J2SQZ3Gjs.StripeSubscriptionModule; exports.StripeSubscriptionService = _chunk6J2SQZ3Gjs.StripeSubscriptionService; exports.StripeUsage = _chunk6J2SQZ3Gjs.StripeUsage; exports.StripeUsageModule = _chunk6J2SQZ3Gjs.StripeUsageModule; exports.StripeUsageService = _chunk6J2SQZ3Gjs.StripeUsageService; exports.SubscriptionStatus = _chunk6J2SQZ3Gjs.SubscriptionStatus; exports.TableOptions = _chunk6J2SQZ3Gjs.TableOptions; exports.TokenUsageAdminBreakdownModule = _chunk6J2SQZ3Gjs.TokenUsageAdminBreakdownModule; exports.TokenUsageAdminSummaryModule = _chunk6J2SQZ3Gjs.TokenUsageAdminSummaryModule; exports.TokenUsageAdminTimelineModule = _chunk6J2SQZ3Gjs.TokenUsageAdminTimelineModule; exports.TotpAuthenticator = _chunk6J2SQZ3Gjs.TotpAuthenticator; exports.TotpAuthenticatorModule = _chunk6J2SQZ3Gjs.TotpAuthenticatorModule; exports.TotpSetup = _chunk6J2SQZ3Gjs.TotpSetup; exports.TotpSetupModule = _chunk6J2SQZ3Gjs.TotpSetupModule; exports.TotpVerify = _chunk6J2SQZ3Gjs.TotpVerify; exports.TotpVerifyLogin = _chunk6J2SQZ3Gjs.TotpVerifyLogin; exports.TotpVerifyLoginModule = _chunk6J2SQZ3Gjs.TotpVerifyLoginModule; exports.TotpVerifyModule = _chunk6J2SQZ3Gjs.TotpVerifyModule; exports.TwoFactorChallenge = _chunk6J2SQZ3Gjs.TwoFactorChallenge; exports.TwoFactorChallengeModule = _chunk6J2SQZ3Gjs.TwoFactorChallengeModule; exports.TwoFactorEnable = _chunk6J2SQZ3Gjs.TwoFactorEnable; exports.TwoFactorEnableModule = _chunk6J2SQZ3Gjs.TwoFactorEnableModule; exports.TwoFactorService = _chunk6J2SQZ3Gjs.TwoFactorService; exports.TwoFactorStatus = _chunk6J2SQZ3Gjs.TwoFactorStatus; exports.TwoFactorStatusModule = _chunk6J2SQZ3Gjs.TwoFactorStatusModule; exports.User = _chunk6J2SQZ3Gjs.User; exports.UserFields = _chunk6J2SQZ3Gjs.UserFields; exports.UserModule = _chunk6J2SQZ3Gjs.UserModule; exports.UserService = _chunk6J2SQZ3Gjs.UserService; exports.VIEWPORT_COOKIE_NAME = _chunk6J2SQZ3Gjs.VIEWPORT_COOKIE_NAME; exports.Waitlist = _chunk6J2SQZ3Gjs.Waitlist; exports.WaitlistModule = _chunk6J2SQZ3Gjs.WaitlistModule; exports.WaitlistService = _chunk6J2SQZ3Gjs.WaitlistService; exports.WaitlistStats = _chunk6J2SQZ3Gjs.WaitlistStats; exports.WaitlistStatsModule = _chunk6J2SQZ3Gjs.WaitlistStatsModule; exports.checkPermissions = _chunk6J2SQZ3Gjs.checkPermissions; exports.checkPermissionsFromServer = _chunk6J2SQZ3Gjs.checkPermissionsFromServer; exports.clearLastApiMeta = _chunk6J2SQZ3Gjs.clearLastApiMeta; exports.clearLastApiTotal = _chunk6J2SQZ3Gjs.clearLastApiTotal; exports.cn = _chunk6J2SQZ3Gjs.cn; exports.composeRefs = _chunk6J2SQZ3Gjs.composeRefs; exports.configureAuth = _chunk6J2SQZ3Gjs.configureAuth; exports.configureI18n = _chunkV6CGCARDjs.configureI18n; exports.configureJsonApi = _chunkV6CGCARDjs.configureJsonApi; exports.configureLogin = _chunkV6CGCARDjs.configureLogin; exports.configureReferral = _chunkV6CGCARDjs.configureReferral; exports.configureRoles = _chunkV6CGCARDjs.configureRoles; exports.configureTokenUsage = _chunk6J2SQZ3Gjs.configureTokenUsage; exports.configureWaitlist = _chunkV6CGCARDjs.configureWaitlist; exports.createJsonApiInclusion = _chunk6J2SQZ3Gjs.createJsonApiInclusion; exports.dismissToast = _chunk6J2SQZ3Gjs.dismissToast; exports.entityObjectSchema = _chunk6J2SQZ3Gjs.entityObjectSchema; exports.exists = _chunk6J2SQZ3Gjs.exists; exports.formatCodiceFiscale = _chunk6J2SQZ3Gjs.formatCodiceFiscale; exports.formatDate = _chunk6J2SQZ3Gjs.formatDate; exports.formatLocalDate = _chunk6J2SQZ3Gjs.formatLocalDate; exports.formatPartitaIva = _chunk6J2SQZ3Gjs.formatPartitaIva; exports.getApiUrl = _chunkV6CGCARDjs.getApiUrl; exports.getAppUrl = _chunkV6CGCARDjs.getAppUrl; exports.getBootstrapper = _chunkLU7DJ4QFjs.getBootstrapper; exports.getClientGlobalErrorHandler = _chunk6J2SQZ3Gjs.getClientGlobalErrorHandler; exports.getGlobalErrorHandler = _chunk6J2SQZ3Gjs.getGlobalErrorHandler; exports.getIcon = _chunk6J2SQZ3Gjs.getIcon; exports.getIconByModule = _chunk6J2SQZ3Gjs.getIconByModule; exports.getIconByModuleName = _chunk6J2SQZ3Gjs.getIconByModuleName; exports.getInitials = _chunk6J2SQZ3Gjs.getInitials; exports.getLastApiMeta = _chunk6J2SQZ3Gjs.getLastApiMeta; exports.getLastApiTotal = _chunk6J2SQZ3Gjs.getLastApiTotal; exports.getLucideIcon = _chunk6J2SQZ3Gjs.getLucideIcon; exports.getLucideIconByModule = _chunk6J2SQZ3Gjs.getLucideIconByModule; exports.getLucideIconByModuleName = _chunk6J2SQZ3Gjs.getLucideIconByModuleName; exports.getPublicApiUrl = _chunkV6CGCARDjs.getPublicApiUrl; exports.getReferralConfig = _chunkV6CGCARDjs.getReferralConfig; exports.getRoleId = _chunkV6CGCARDjs.getRoleId; exports.getStripePublishableKey = _chunkV6CGCARDjs.getStripePublishableKey; exports.getTableComponents = _chunk6J2SQZ3Gjs.getTableComponents; exports.getTableOptions = _chunk6J2SQZ3Gjs.getTableOptions; exports.getTokenHandler = _chunk6J2SQZ3Gjs.getTokenHandler; exports.getTokenUsageCurrency = _chunk6J2SQZ3Gjs.getTokenUsageCurrency; exports.getTrackablePages = _chunkV6CGCARDjs.getTrackablePages; exports.getValueFromPath = _chunk6J2SQZ3Gjs.getValueFromPath; exports.getWaitlistConfig = _chunkV6CGCARDjs.getWaitlistConfig; exports.hasBootstrapper = _chunkLU7DJ4QFjs.hasBootstrapper; exports.isReferralEnabled = _chunkV6CGCARDjs.isReferralEnabled; exports.isRemoteImageSrc = _chunk6J2SQZ3Gjs.isRemoteImageSrc; exports.isRolesConfigured = _chunkV6CGCARDjs.isRolesConfigured; exports.rehydrate = _chunk6J2SQZ3Gjs.rehydrate; exports.rehydrateList = _chunk6J2SQZ3Gjs.rehydrateList; exports.resetBootstrapStore = _chunkLU7DJ4QFjs.resetBootstrapStore; exports.setBootstrapper = _chunkLU7DJ4QFjs.setBootstrapper; exports.setClientGlobalErrorHandler = _chunk6J2SQZ3Gjs.setClientGlobalErrorHandler; exports.setGlobalErrorHandler = _chunk6J2SQZ3Gjs.setGlobalErrorHandler; exports.showCustomToast = _chunk6J2SQZ3Gjs.showCustomToast; exports.showError = _chunk6J2SQZ3Gjs.showError; exports.showToast = _chunk6J2SQZ3Gjs.showToast; exports.tokenUsageModules = _chunk6J2SQZ3Gjs.tokenUsageModules; exports.translateData = _chunkLU7DJ4QFjs.translateData; exports.translateResponse = _chunkLU7DJ4QFjs.translateResponse; exports.tryBootstrap = _chunkLU7DJ4QFjs.tryBootstrap; exports.useComposedRefs = _chunk6J2SQZ3Gjs.useComposedRefs; exports.useIsMobile = _chunk6J2SQZ3Gjs.useIsMobile; exports.userObjectSchema = _chunk6J2SQZ3Gjs.userObjectSchema; exports.validateCodiceFiscale = _chunk6J2SQZ3Gjs.validateCodiceFiscale; exports.validateItalianTaxCode = _chunk6J2SQZ3Gjs.validateItalianTaxCode; exports.validatePartitaIva = _chunk6J2SQZ3Gjs.validatePartitaIva;
482
+ exports.ACTION_TYPES = _chunk4ETVCRQDjs.ACTION_TYPES; exports.AVAILABLE_OAUTH_SCOPES = _chunkL7DZSTFUjs.AVAILABLE_OAUTH_SCOPES; exports.AbstractApiData = _chunkL7DZSTFUjs.AbstractApiData; exports.AbstractService = _chunkL7DZSTFUjs.AbstractService; exports.Action = _chunkL7DZSTFUjs.Action; exports.AiConnection = _chunkL7DZSTFUjs.AiConnection; exports.AiConnectionFields = _chunkL7DZSTFUjs.AiConnectionFields; exports.AiConnectionModule = _chunkL7DZSTFUjs.AiConnectionModule; exports.AiConnectionService = _chunkL7DZSTFUjs.AiConnectionService; exports.Assistant = _chunkL7DZSTFUjs.Assistant; exports.AssistantAction = _chunkL7DZSTFUjs.AssistantAction; exports.AssistantActionModule = _chunkL7DZSTFUjs.AssistantActionModule; exports.AssistantActionService = _chunkL7DZSTFUjs.AssistantActionService; exports.AssistantMessage = _chunkL7DZSTFUjs.AssistantMessage; exports.AssistantMessageModule = _chunkL7DZSTFUjs.AssistantMessageModule; exports.AssistantMessageService = _chunkL7DZSTFUjs.AssistantMessageService; exports.AssistantModule = _chunkL7DZSTFUjs.AssistantModule; exports.AssistantService = _chunkL7DZSTFUjs.AssistantService; exports.AuditLog = _chunkL7DZSTFUjs.AuditLog; exports.AuditLogModule = _chunkL7DZSTFUjs.AuditLogModule; exports.AuditLogService = _chunkL7DZSTFUjs.AuditLogService; exports.Auth = _chunkL7DZSTFUjs.Auth; exports.AuthComponent = _chunkL7DZSTFUjs.AuthComponent; exports.AuthModule = _chunkL7DZSTFUjs.AuthModule; exports.AuthService = _chunkL7DZSTFUjs.AuthService; exports.AuthorModule = _chunkL7DZSTFUjs.AuthorModule; exports.BackupCodeVerify = _chunkL7DZSTFUjs.BackupCodeVerify; exports.BackupCodeVerifyModule = _chunkL7DZSTFUjs.BackupCodeVerifyModule; exports.Billing = _chunkL7DZSTFUjs.Billing; exports.BillingModule = _chunkL7DZSTFUjs.BillingModule; exports.BillingService = _chunkL7DZSTFUjs.BillingService; exports.BlockNoteDiffUtil = _chunkL7DZSTFUjs.BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = _chunkL7DZSTFUjs.BlockNoteWordDiffRendererUtil; exports.COMPANY_ADMINISTRATOR_ROLE_ID = _chunk4ETVCRQDjs.COMPANY_ADMINISTRATOR_ROLE_ID; exports.CURRENT_USER_STORAGE_KEY = _chunkL7DZSTFUjs.CURRENT_USER_STORAGE_KEY; exports.Chunk = _chunkL7DZSTFUjs.Chunk; exports.ChunkModule = _chunkL7DZSTFUjs.ChunkModule; exports.ClientAbstractService = _chunkL7DZSTFUjs.ClientAbstractService; exports.ClientHttpMethod = _chunkL7DZSTFUjs.ClientHttpMethod; exports.Company = _chunkL7DZSTFUjs.Company; exports.CompanyFields = _chunkL7DZSTFUjs.CompanyFields; exports.CompanyModule = _chunkL7DZSTFUjs.CompanyModule; exports.CompanyService = _chunkL7DZSTFUjs.CompanyService; exports.Content = _chunkL7DZSTFUjs.Content; exports.ContentFields = _chunkL7DZSTFUjs.ContentFields; exports.ContentModule = _chunkL7DZSTFUjs.ContentModule; exports.ContentService = _chunkL7DZSTFUjs.ContentService; exports.DEFAULT_GRANT_TYPES = _chunkL7DZSTFUjs.DEFAULT_GRANT_TYPES; exports.DataClass = _chunkLU7DJ4QFjs.DataClassRegistry; exports.DataClassRegistry = _chunkLU7DJ4QFjs.DataClassRegistry; exports.ENV = _chunkLU7DJ4QFjs.ENV; exports.EndpointCreator = _chunkL7DZSTFUjs.EndpointCreator; exports.EntityAiStatus = _chunkL7DZSTFUjs.EntityAiStatus; exports.Feature = _chunkL7DZSTFUjs.Feature; exports.FeatureModule = _chunkL7DZSTFUjs.FeatureModule; exports.FeatureService = _chunkL7DZSTFUjs.FeatureService; exports.HowTo = _chunkL7DZSTFUjs.HowTo; exports.HowToFields = _chunkL7DZSTFUjs.HowToFields; exports.HowToModule = _chunkL7DZSTFUjs.HowToModule; exports.HowToService = _chunkL7DZSTFUjs.HowToService; exports.HttpMethod = _chunkL7DZSTFUjs.HttpMethod; exports.InvoiceStatus = _chunkL7DZSTFUjs.InvoiceStatus; exports.JsonApiDataFactory = _chunkLU7DJ4QFjs.JsonApiDataFactory; exports.MOBILE_BREAKPOINT = _chunkL7DZSTFUjs.MOBILE_BREAKPOINT; exports.Module = _chunkL7DZSTFUjs.Module; exports.ModuleModule = _chunkL7DZSTFUjs.ModuleModule; exports.ModulePaths = _chunkL7DZSTFUjs.ModulePaths; exports.ModulePathsModule = _chunkL7DZSTFUjs.ModulePathsModule; exports.ModuleRegistrar = _chunkL7DZSTFUjs.ModuleRegistrar; exports.ModuleRegistry = _chunkL7DZSTFUjs.ModuleRegistry; exports.Modules = _chunkL7DZSTFUjs.Modules; exports.Notification = _chunkL7DZSTFUjs.Notification; exports.NotificationFields = _chunkL7DZSTFUjs.NotificationFields; exports.NotificationModule = _chunkL7DZSTFUjs.NotificationModule; exports.NotificationService = _chunkL7DZSTFUjs.NotificationService; exports.OAUTH_SCOPE_DISPLAY = _chunkL7DZSTFUjs.OAUTH_SCOPE_DISPLAY; exports.OAuthClient = _chunkL7DZSTFUjs.OAuthClient; exports.OAuthModule = _chunkL7DZSTFUjs.OAuthModule; exports.OAuthService = _chunkL7DZSTFUjs.OAuthService; exports.Passkey = _chunkL7DZSTFUjs.Passkey; exports.PasskeyAuthenticationOptions = _chunkL7DZSTFUjs.PasskeyAuthenticationOptions; exports.PasskeyAuthenticationOptionsModule = _chunkL7DZSTFUjs.PasskeyAuthenticationOptionsModule; exports.PasskeyModule = _chunkL7DZSTFUjs.PasskeyModule; exports.PasskeyRegistrationOptions = _chunkL7DZSTFUjs.PasskeyRegistrationOptions; exports.PasskeyRegistrationOptionsModule = _chunkL7DZSTFUjs.PasskeyRegistrationOptionsModule; exports.PasskeyRegistrationVerify = _chunkL7DZSTFUjs.PasskeyRegistrationVerify; exports.PasskeyRegistrationVerifyModule = _chunkL7DZSTFUjs.PasskeyRegistrationVerifyModule; exports.PasskeyRename = _chunkL7DZSTFUjs.PasskeyRename; exports.PasskeyRenameModule = _chunkL7DZSTFUjs.PasskeyRenameModule; exports.PasskeyVerifyLogin = _chunkL7DZSTFUjs.PasskeyVerifyLogin; exports.PasskeyVerifyLoginModule = _chunkL7DZSTFUjs.PasskeyVerifyLoginModule; exports.PaymentMethod = _chunkL7DZSTFUjs.PaymentMethod; exports.PermissionMapping = _chunkL7DZSTFUjs.PermissionMapping; exports.PermissionMappingModule = _chunkL7DZSTFUjs.PermissionMappingModule; exports.Push = _chunkL7DZSTFUjs.Push; exports.PushModule = _chunkL7DZSTFUjs.PushModule; exports.PushService = _chunkL7DZSTFUjs.PushService; exports.RbacMatrixModel = _chunkL7DZSTFUjs.RbacMatrixModel; exports.RbacMatrixModule = _chunkL7DZSTFUjs.RbacMatrixModule; exports.RbacService = _chunk4ETVCRQDjs.RbacService; exports.ReferralModule = _chunkL7DZSTFUjs.ReferralModule; exports.ReferralService = _chunkL7DZSTFUjs.ReferralService; exports.ReferralStats = _chunkL7DZSTFUjs.ReferralStats; exports.ReferralStatsModule = _chunkL7DZSTFUjs.ReferralStatsModule; exports.RehydrationFactory = _chunkL7DZSTFUjs.RehydrationFactory; exports.Role = _chunkL7DZSTFUjs.Role; exports.RoleFields = _chunkL7DZSTFUjs.RoleFields; exports.RoleModule = _chunkL7DZSTFUjs.RoleModule; exports.RoleService = _chunkL7DZSTFUjs.RoleService; exports.S3 = _chunkL7DZSTFUjs.S3; exports.S3Module = _chunkL7DZSTFUjs.S3Module; exports.S3Service = _chunkL7DZSTFUjs.S3Service; exports.StripeCustomer = _chunkL7DZSTFUjs.StripeCustomer; exports.StripeCustomerModule = _chunkL7DZSTFUjs.StripeCustomerModule; exports.StripeCustomerService = _chunkL7DZSTFUjs.StripeCustomerService; exports.StripeInvoice = _chunkL7DZSTFUjs.StripeInvoice; exports.StripeInvoiceModule = _chunkL7DZSTFUjs.StripeInvoiceModule; exports.StripeInvoiceService = _chunkL7DZSTFUjs.StripeInvoiceService; exports.StripePaymentMethodModule = _chunkL7DZSTFUjs.StripePaymentMethodModule; exports.StripePrice = _chunkL7DZSTFUjs.StripePrice; exports.StripePriceFields = _chunkL7DZSTFUjs.StripePriceFields; exports.StripePriceModule = _chunkL7DZSTFUjs.StripePriceModule; exports.StripePriceService = _chunkL7DZSTFUjs.StripePriceService; exports.StripeProduct = _chunkL7DZSTFUjs.StripeProduct; exports.StripeProductFields = _chunkL7DZSTFUjs.StripeProductFields; exports.StripeProductModule = _chunkL7DZSTFUjs.StripeProductModule; exports.StripeProductService = _chunkL7DZSTFUjs.StripeProductService; exports.StripePromotionCode = _chunkL7DZSTFUjs.StripePromotionCode; exports.StripePromotionCodeModule = _chunkL7DZSTFUjs.StripePromotionCodeModule; exports.StripePromotionCodeService = _chunkL7DZSTFUjs.StripePromotionCodeService; exports.StripeSubscription = _chunkL7DZSTFUjs.StripeSubscription; exports.StripeSubscriptionModule = _chunkL7DZSTFUjs.StripeSubscriptionModule; exports.StripeSubscriptionService = _chunkL7DZSTFUjs.StripeSubscriptionService; exports.StripeUsage = _chunkL7DZSTFUjs.StripeUsage; exports.StripeUsageModule = _chunkL7DZSTFUjs.StripeUsageModule; exports.StripeUsageService = _chunkL7DZSTFUjs.StripeUsageService; exports.SubscriptionStatus = _chunkL7DZSTFUjs.SubscriptionStatus; exports.TableOptions = _chunkL7DZSTFUjs.TableOptions; exports.TokenUsageAdminBreakdownModule = _chunkL7DZSTFUjs.TokenUsageAdminBreakdownModule; exports.TokenUsageAdminSummaryModule = _chunkL7DZSTFUjs.TokenUsageAdminSummaryModule; exports.TokenUsageAdminTimelineModule = _chunkL7DZSTFUjs.TokenUsageAdminTimelineModule; exports.TotpAuthenticator = _chunkL7DZSTFUjs.TotpAuthenticator; exports.TotpAuthenticatorModule = _chunkL7DZSTFUjs.TotpAuthenticatorModule; exports.TotpSetup = _chunkL7DZSTFUjs.TotpSetup; exports.TotpSetupModule = _chunkL7DZSTFUjs.TotpSetupModule; exports.TotpVerify = _chunkL7DZSTFUjs.TotpVerify; exports.TotpVerifyLogin = _chunkL7DZSTFUjs.TotpVerifyLogin; exports.TotpVerifyLoginModule = _chunkL7DZSTFUjs.TotpVerifyLoginModule; exports.TotpVerifyModule = _chunkL7DZSTFUjs.TotpVerifyModule; exports.TwoFactorChallenge = _chunkL7DZSTFUjs.TwoFactorChallenge; exports.TwoFactorChallengeModule = _chunkL7DZSTFUjs.TwoFactorChallengeModule; exports.TwoFactorEnable = _chunkL7DZSTFUjs.TwoFactorEnable; exports.TwoFactorEnableModule = _chunkL7DZSTFUjs.TwoFactorEnableModule; exports.TwoFactorService = _chunkL7DZSTFUjs.TwoFactorService; exports.TwoFactorStatus = _chunkL7DZSTFUjs.TwoFactorStatus; exports.TwoFactorStatusModule = _chunkL7DZSTFUjs.TwoFactorStatusModule; exports.User = _chunkL7DZSTFUjs.User; exports.UserFields = _chunkL7DZSTFUjs.UserFields; exports.UserModule = _chunkL7DZSTFUjs.UserModule; exports.UserService = _chunkL7DZSTFUjs.UserService; exports.VIEWPORT_COOKIE_NAME = _chunkL7DZSTFUjs.VIEWPORT_COOKIE_NAME; exports.Waitlist = _chunkL7DZSTFUjs.Waitlist; exports.WaitlistModule = _chunkL7DZSTFUjs.WaitlistModule; exports.WaitlistService = _chunkL7DZSTFUjs.WaitlistService; exports.WaitlistStats = _chunkL7DZSTFUjs.WaitlistStats; exports.WaitlistStatsModule = _chunkL7DZSTFUjs.WaitlistStatsModule; exports.checkPermissions = _chunkL7DZSTFUjs.checkPermissions; exports.checkPermissionsFromServer = _chunkL7DZSTFUjs.checkPermissionsFromServer; exports.clearLastApiMeta = _chunkL7DZSTFUjs.clearLastApiMeta; exports.clearLastApiTotal = _chunkL7DZSTFUjs.clearLastApiTotal; exports.cn = _chunkL7DZSTFUjs.cn; exports.composeRefs = _chunkL7DZSTFUjs.composeRefs; exports.configureAuth = _chunkL7DZSTFUjs.configureAuth; exports.configureI18n = _chunk4ETVCRQDjs.configureI18n; exports.configureJsonApi = _chunk4ETVCRQDjs.configureJsonApi; exports.configureLogin = _chunk4ETVCRQDjs.configureLogin; exports.configureReferral = _chunk4ETVCRQDjs.configureReferral; exports.configureRoles = _chunk4ETVCRQDjs.configureRoles; exports.configureTokenUsage = _chunkL7DZSTFUjs.configureTokenUsage; exports.configureWaitlist = _chunk4ETVCRQDjs.configureWaitlist; exports.createJsonApiInclusion = _chunkL7DZSTFUjs.createJsonApiInclusion; exports.dismissToast = _chunkL7DZSTFUjs.dismissToast; exports.entityObjectSchema = _chunkL7DZSTFUjs.entityObjectSchema; exports.exists = _chunkL7DZSTFUjs.exists; exports.formatCodiceFiscale = _chunkL7DZSTFUjs.formatCodiceFiscale; exports.formatDate = _chunkL7DZSTFUjs.formatDate; exports.formatLocalDate = _chunkL7DZSTFUjs.formatLocalDate; exports.formatPartitaIva = _chunkL7DZSTFUjs.formatPartitaIva; exports.getApiUrl = _chunk4ETVCRQDjs.getApiUrl; exports.getAppUrl = _chunk4ETVCRQDjs.getAppUrl; exports.getBootstrapper = _chunkLU7DJ4QFjs.getBootstrapper; exports.getClientGlobalErrorHandler = _chunkL7DZSTFUjs.getClientGlobalErrorHandler; exports.getGlobalErrorHandler = _chunkL7DZSTFUjs.getGlobalErrorHandler; exports.getIcon = _chunkL7DZSTFUjs.getIcon; exports.getIconByModule = _chunkL7DZSTFUjs.getIconByModule; exports.getIconByModuleName = _chunkL7DZSTFUjs.getIconByModuleName; exports.getInitials = _chunkL7DZSTFUjs.getInitials; exports.getLastApiMeta = _chunkL7DZSTFUjs.getLastApiMeta; exports.getLastApiTotal = _chunkL7DZSTFUjs.getLastApiTotal; exports.getLucideIcon = _chunkL7DZSTFUjs.getLucideIcon; exports.getLucideIconByModule = _chunkL7DZSTFUjs.getLucideIconByModule; exports.getLucideIconByModuleName = _chunkL7DZSTFUjs.getLucideIconByModuleName; exports.getPublicApiUrl = _chunk4ETVCRQDjs.getPublicApiUrl; exports.getReferralConfig = _chunk4ETVCRQDjs.getReferralConfig; exports.getRoleId = _chunk4ETVCRQDjs.getRoleId; exports.getStripePublishableKey = _chunk4ETVCRQDjs.getStripePublishableKey; exports.getTableComponents = _chunkL7DZSTFUjs.getTableComponents; exports.getTableOptions = _chunkL7DZSTFUjs.getTableOptions; exports.getTokenHandler = _chunkL7DZSTFUjs.getTokenHandler; exports.getTokenUsageCurrency = _chunkL7DZSTFUjs.getTokenUsageCurrency; exports.getTrackablePages = _chunk4ETVCRQDjs.getTrackablePages; exports.getValueFromPath = _chunkL7DZSTFUjs.getValueFromPath; exports.getWaitlistConfig = _chunk4ETVCRQDjs.getWaitlistConfig; exports.hasBootstrapper = _chunkLU7DJ4QFjs.hasBootstrapper; exports.isReferralEnabled = _chunk4ETVCRQDjs.isReferralEnabled; exports.isRemoteImageSrc = _chunkL7DZSTFUjs.isRemoteImageSrc; exports.isRolesConfigured = _chunk4ETVCRQDjs.isRolesConfigured; exports.rehydrate = _chunkL7DZSTFUjs.rehydrate; exports.rehydrateList = _chunkL7DZSTFUjs.rehydrateList; exports.resetBootstrapStore = _chunkLU7DJ4QFjs.resetBootstrapStore; exports.setBootstrapper = _chunkLU7DJ4QFjs.setBootstrapper; exports.setClientGlobalErrorHandler = _chunkL7DZSTFUjs.setClientGlobalErrorHandler; exports.setGlobalErrorHandler = _chunkL7DZSTFUjs.setGlobalErrorHandler; exports.showCustomToast = _chunkL7DZSTFUjs.showCustomToast; exports.showError = _chunkL7DZSTFUjs.showError; exports.showToast = _chunkL7DZSTFUjs.showToast; exports.tokenUsageModules = _chunkL7DZSTFUjs.tokenUsageModules; exports.translateData = _chunkLU7DJ4QFjs.translateData; exports.translateResponse = _chunkLU7DJ4QFjs.translateResponse; exports.tryBootstrap = _chunkLU7DJ4QFjs.tryBootstrap; exports.useComposedRefs = _chunkL7DZSTFUjs.useComposedRefs; exports.useIsMobile = _chunkL7DZSTFUjs.useIsMobile; exports.userObjectSchema = _chunkL7DZSTFUjs.userObjectSchema; exports.validateCodiceFiscale = _chunkL7DZSTFUjs.validateCodiceFiscale; exports.validateItalianTaxCode = _chunkL7DZSTFUjs.validateItalianTaxCode; exports.validatePartitaIva = _chunkL7DZSTFUjs.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-IMSIVIIC.mjs";
21
+ } from "./chunk-HVNEWDRF.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-M5QAHSCY.mjs";
229
+ } from "./chunk-Q2BREXH3.mjs";
230
230
  import "./chunk-AUXK7QSA.mjs";
231
231
  import "./chunk-C7C7VY4F.mjs";
232
232
  import {
@@ -15,7 +15,7 @@ var _chunkIOLU4ASDjs = require('../chunk-IOLU4ASD.js');
15
15
 
16
16
 
17
17
 
18
- var _chunk6J2SQZ3Gjs = require('../chunk-6J2SQZ3G.js');
18
+ var _chunkL7DZSTFUjs = require('../chunk-L7DZSTFU.js');
19
19
  require('../chunk-LXKSUWAV.js');
20
20
  require('../chunk-IBS6NI7D.js');
21
21
 
@@ -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 _chunk6J2SQZ3Gjs.checkPermissionsFromServer.call(void 0, {
90
+ return _chunkL7DZSTFUjs.checkPermissionsFromServer.call(void 0, {
91
91
  module: params.module,
92
92
  action: params.action,
93
93
  data: params.data,
@@ -297,5 +297,5 @@ _chunk7QVYU63Ejs.__name.call(void 0, ServerJsonApiDelete, "ServerJsonApiDelete")
297
297
 
298
298
 
299
299
 
300
- exports.ServerAuthService = _chunk6J2SQZ3Gjs.AuthService; exports.ServerCompanyService = _chunk6J2SQZ3Gjs.CompanyService; exports.ServerContentService = _chunk6J2SQZ3Gjs.ContentService; exports.ServerFeatureService = _chunk6J2SQZ3Gjs.FeatureService; exports.ServerJsonApiDelete = ServerJsonApiDelete; exports.ServerJsonApiGet = ServerJsonApiGet; exports.ServerJsonApiPatch = ServerJsonApiPatch; exports.ServerJsonApiPost = ServerJsonApiPost; exports.ServerJsonApiPut = ServerJsonApiPut; exports.ServerNotificationService = _chunk6J2SQZ3Gjs.NotificationService; exports.ServerPushService = _chunk6J2SQZ3Gjs.PushService; exports.ServerRoleService = _chunk6J2SQZ3Gjs.RoleService; exports.ServerS3Service = _chunk6J2SQZ3Gjs.S3Service; exports.ServerSession = ServerSession; exports.ServerUserService = _chunk6J2SQZ3Gjs.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;
300
+ exports.ServerAuthService = _chunkL7DZSTFUjs.AuthService; exports.ServerCompanyService = _chunkL7DZSTFUjs.CompanyService; exports.ServerContentService = _chunkL7DZSTFUjs.ContentService; exports.ServerFeatureService = _chunkL7DZSTFUjs.FeatureService; exports.ServerJsonApiDelete = ServerJsonApiDelete; exports.ServerJsonApiGet = ServerJsonApiGet; exports.ServerJsonApiPatch = ServerJsonApiPatch; exports.ServerJsonApiPost = ServerJsonApiPost; exports.ServerJsonApiPut = ServerJsonApiPut; exports.ServerNotificationService = _chunkL7DZSTFUjs.NotificationService; exports.ServerPushService = _chunkL7DZSTFUjs.PushService; exports.ServerRoleService = _chunkL7DZSTFUjs.RoleService; exports.ServerS3Service = _chunkL7DZSTFUjs.S3Service; exports.ServerSession = ServerSession; exports.ServerUserService = _chunkL7DZSTFUjs.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
@@ -15,7 +15,7 @@ import {
15
15
  S3Service,
16
16
  UserService,
17
17
  checkPermissionsFromServer
18
- } from "../chunk-M5QAHSCY.mjs";
18
+ } from "../chunk-Q2BREXH3.mjs";
19
19
  import "../chunk-AUXK7QSA.mjs";
20
20
  import "../chunk-C7C7VY4F.mjs";
21
21
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carlonicora/nextjs-jsonapi",
3
- "version": "3.11.0",
3
+ "version": "3.12.0",
4
4
  "description": "Next.js JSON:API client with server/client support and caching",
5
5
  "author": "Carlo Nicora",
6
6
  "license": "GPL-3.0-or-later",
@@ -36,6 +36,7 @@ export const BILLING_ADMIN_I18N_KEYS = [
36
36
  "billing.admin.prices.create",
37
37
  "billing.admin.prices.empty.title",
38
38
  "billing.admin.prices.empty.description",
39
+ "billing.admin.prices.fields.actions",
39
40
  "billing.admin.prices.fields.product",
40
41
  "billing.admin.prices.fields.nickname",
41
42
  "billing.admin.prices.fields.amount",
@@ -79,6 +80,12 @@ export const BILLING_ADMIN_I18N_KEYS = [
79
80
  "billing.admin.prices.immutability.description",
80
81
  "billing.admin.prices.actions.addFeature",
81
82
  "billing.admin.prices.actions.removeFeature",
83
+ "billing.admin.prices.actions.clone",
84
+ "billing.admin.prices.actions.export",
85
+ "billing.admin.prices.actions.import",
86
+ "billing.admin.prices.import.errors.title",
87
+ "billing.admin.prices.import.errors.invalid",
88
+ "billing.admin.prices.import.warnings.unknownFeatures",
82
89
  "billing.admin.prices.archive.title",
83
90
  "billing.admin.prices.archive.description",
84
91
  "billing.admin.prices.archive.confirm",
@@ -3,7 +3,7 @@
3
3
  import { zodResolver } from "@hookform/resolvers/zod";
4
4
  import { PlusIcon, XIcon } from "lucide-react";
5
5
  import { useTranslations } from "next-intl";
6
- import { ReactNode, useCallback, useEffect, useMemo, useState } from "react";
6
+ import { ReactNode, useCallback, useEffect, useMemo, useRef, useState } from "react";
7
7
  import { useForm } from "react-hook-form";
8
8
  import { v4 } from "uuid";
9
9
  import { z } from "zod";
@@ -11,13 +11,27 @@ import { EditorSheet, FieldLabel, FormCheckbox, FormInput, FormSelect, FormTexta
11
11
  import { Modules } from "../../../../../core";
12
12
  import { useI18nRouter } from "../../../../../i18n";
13
13
  import { Alert, AlertDescription, AlertTitle, Button, Checkbox, Input } from "../../../../../shadcnui";
14
+ import { showToast } from "../../../../../utils/toast";
14
15
  import { FeatureInterface, FeatureService } from "../../../../feature";
15
16
  import { priceLabel, usePriceContext } from "../../../contexts/PriceContext";
16
17
  import { StripePriceInput, StripePriceInterface } from "../../data/stripe-price.interface";
18
+ import { StripePriceSeed } from "../../data/stripe-price.transfer";
17
19
 
18
20
  export type PriceEditorProps = {
19
21
  productId?: string;
20
22
  price?: StripePriceInterface;
23
+ /**
24
+ * Pre-fills a NEW price — the Clone (a row in the prices list) and Import (a
25
+ * JSON document) paths both hand over the same seed.
26
+ *
27
+ * The seed deliberately carries NO identity: no Stripe price id, no internal
28
+ * id and no product id. A clone/import is a brand-new price, minted fresh by
29
+ * Stripe and attached to whatever product this editor is mounted for
30
+ * (`productId` / the context), so copying any identity across would either
31
+ * collide or silently re-point the new price at the source environment's
32
+ * objects. Seeding therefore never makes this an edit — see `isEdit` below.
33
+ */
34
+ seed?: StripePriceSeed;
21
35
  propagateChanges?: (price: StripePriceInterface) => void;
22
36
  onSuccess?: () => void | Promise<void>;
23
37
  trigger?: ReactNode;
@@ -30,6 +44,7 @@ export type PriceEditorProps = {
30
44
  function PriceEditorInternal({
31
45
  productId,
32
46
  price,
47
+ seed,
33
48
  propagateChanges,
34
49
  onSuccess,
35
50
  trigger,
@@ -42,6 +57,9 @@ function PriceEditorInternal({
42
57
  const router = useI18nRouter();
43
58
  const { createPrice, updatePrice, productId: contextProductId } = usePriceContext();
44
59
  const [allFeatures, setAllFeatures] = useState<FeatureInterface[]>([]);
60
+ // Stays `!!price`, never `!!price || !!seed`: a seeded editor is a CREATE, so
61
+ // the create branch of onSubmit (fresh v4(), targetProductId, no id reuse)
62
+ // must run for it exactly as it does for an empty form.
45
63
  const isEdit = !!price;
46
64
  // NOT `price.productId` — that getter throws when the attribute is absent, and
47
65
  // it always is (see the note in PriceContext). Only create mode needs this,
@@ -106,6 +124,24 @@ function PriceEditorInternal({
106
124
 
107
125
  type PriceFormValues = z.infer<typeof formSchema>;
108
126
 
127
+ // Seeds carry platform features as NAMES, never ids: Feature ids differ per
128
+ // environment, names are the stable handle. A name this environment does not
129
+ // know is DROPPED rather than failing the whole seed — the effect below
130
+ // reports the dropped ones once.
131
+ const resolvePlatformFeatures = useCallback(
132
+ (names: string[] | undefined): { ids: string[]; unknown: string[] } => {
133
+ const ids: string[] = [];
134
+ const unknown: string[] = [];
135
+ for (const name of names ?? []) {
136
+ const match = allFeatures.find((feature) => feature.name === name);
137
+ if (match) ids.push(match.id);
138
+ else unknown.push(name);
139
+ }
140
+ return { ids, unknown };
141
+ },
142
+ [allFeatures],
143
+ );
144
+
109
145
  // Fed to BOTH useForm and EditorSheet.onReset. The previous implementation
110
146
  // reseeded with its own `useEffect(… form.reset)` on open; EditorSheet already
111
147
  // owns that (EditorSheet.tsx:163-190) and running both fights over the form.
@@ -114,6 +150,30 @@ function PriceEditorInternal({
114
150
  // (PriceArchiver), and a second toggle here would let the two disagree.
115
151
  const getDefaultValues = useCallback((): PriceFormValues => {
116
152
  const coreFeatureIds = allFeatures.filter((feature) => feature.isCore).map((feature) => feature.id);
153
+
154
+ // Seed branch: create mode only (`price` always wins — an edit form must
155
+ // show the price it edits, never a seed). Mirrors the `price` branch below
156
+ // field for field, including the /100: the seed keeps Stripe's MINOR units
157
+ // while the form field is in MAJOR units.
158
+ if (!price && seed) {
159
+ return {
160
+ unitAmount: seed.unitAmount / 100,
161
+ currency: seed.currency,
162
+ interval: seed.interval,
163
+ intervalCount: seed.intervalCount ?? 1,
164
+ usageType: seed.usageType ?? "licensed",
165
+ nickname: seed.nickname ?? "",
166
+ isTrial: seed.isTrial ?? false,
167
+ description: seed.description ?? "",
168
+ features: seed.features ?? [],
169
+ // `.toString()`, for the same reason the schema keeps the token
170
+ // pipeline string-based: a seeded `0` must survive as "0" and not be
171
+ // dropped as falsy.
172
+ token: seed.token?.toString() ?? "",
173
+ featureIds: [...new Set([...resolvePlatformFeatures(seed.platformFeatures).ids, ...coreFeatureIds])],
174
+ };
175
+ }
176
+
117
177
  return {
118
178
  unitAmount: price?.unitAmount ? price.unitAmount / 100 : 0,
119
179
  currency: price?.currency ?? "usd",
@@ -127,13 +187,59 @@ function PriceEditorInternal({
127
187
  token: price?.token?.toString() ?? "",
128
188
  featureIds: [...new Set([...(price?.priceFeatures?.map((f) => f.id) ?? []), ...coreFeatureIds])],
129
189
  };
130
- }, [price, allFeatures]);
190
+ }, [price, seed, allFeatures, resolvePlatformFeatures]);
131
191
 
132
192
  const form = useForm<PriceFormValues>({
133
193
  resolver: zodResolver(formSchema) as any,
134
194
  defaultValues: getDefaultValues(),
135
195
  });
136
196
 
197
+ // ── The seeding race ──────────────────────────────────────────────────────
198
+ // `getDefaultValues` reads `allFeatures`, which the fetch effect above
199
+ // resolves asynchronously — so `useForm` has ALREADY seeded from an empty
200
+ // list by the time the features land, and every id-bearing default
201
+ // (`featureIds`: the core features, plus whatever the seed named) is missing.
202
+ //
203
+ // Nothing else fixes it: EditorSheet re-seeds on open only when `isEdit`
204
+ // (EditorSheet.tsx:209 — create defaults usually contain a fresh uuid, so an
205
+ // unconditional reset there would fire on every open and clobber parents that
206
+ // pre-fill via form.setValue). That is exactly why the core-feature
207
+ // checkboxes come up empty on a first create today.
208
+ //
209
+ // So catch up here, once, and only when it is safe:
210
+ // - `!isEdit` — the edit path is EditorSheet's, do not fight it.
211
+ // - `length > 0` — this is the empty → loaded transition, not the initial
212
+ // render (and not a genuinely empty feature list).
213
+ // - the ref — one shot per mount, so a later `allFeatures` identity
214
+ // change cannot re-reset a form the user is using.
215
+ // - `!isDirty` — never clobber anything already typed; a user who edited
216
+ // before the fetch returned keeps their input, and the
217
+ // one-shot ref is burned either way.
218
+ const hasCaughtUpWithFeatures = useRef(false);
219
+ useEffect(() => {
220
+ if (isEdit || hasCaughtUpWithFeatures.current || allFeatures.length === 0) return;
221
+ hasCaughtUpWithFeatures.current = true;
222
+ if (form.formState.isDirty) return;
223
+ form.reset(getDefaultValues());
224
+ }, [allFeatures, isEdit, form, getDefaultValues]);
225
+
226
+ // Unknown platform feature names are reported ONCE per seed, not per render:
227
+ // `seed` typically arrives as an object literal from the list row or the
228
+ // import dialog, so its identity changes on every parent render — the guard
229
+ // keys on the names themselves instead. Waits for `allFeatures`, since before
230
+ // the fetch resolves every name looks unknown.
231
+ const warnedUnknownFor = useRef<string | undefined>(undefined);
232
+ useEffect(() => {
233
+ if (isEdit || !seed || allFeatures.length === 0) return;
234
+ const fingerprint = JSON.stringify(seed.platformFeatures ?? []);
235
+ if (warnedUnknownFor.current === fingerprint) return;
236
+ warnedUnknownFor.current = fingerprint;
237
+
238
+ const { unknown } = resolvePlatformFeatures(seed.platformFeatures);
239
+ if (unknown.length > 0)
240
+ showToast(t("billing.admin.prices.import.warnings.unknownFeatures", { features: unknown.join(", ") }));
241
+ }, [seed, isEdit, allFeatures, resolvePlatformFeatures, t]);
242
+
137
243
  const watchInterval = form.watch("interval");
138
244
  const isRecurring = watchInterval !== "one_time";
139
245
 
@@ -0,0 +1,182 @@
1
+ import { fireEvent, render, screen, waitFor } from "@testing-library/react";
2
+ import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
3
+ import { ModuleRegistry } from "../../../../../../core/registry/ModuleRegistry";
4
+ import { configureI18n } from "../../../../../../i18n";
5
+ import { StripePriceSeed } from "../../../data/stripe-price.transfer";
6
+ import PriceEditor from "../PriceEditor";
7
+
8
+ // Hoisted so the vi.mock factories below (which run before the module body)
9
+ // can close over them.
10
+ const mocks = vi.hoisted(() => ({
11
+ findMany: vi.fn(),
12
+ createPrice: vi.fn(),
13
+ updatePrice: vi.fn(),
14
+ showToast: vi.fn(),
15
+ }));
16
+
17
+ vi.mock("../../../../../feature", () => ({
18
+ FeatureService: { findMany: mocks.findMany },
19
+ }));
20
+
21
+ vi.mock("../../../../contexts/PriceContext", () => ({
22
+ usePriceContext: () => ({
23
+ createPrice: mocks.createPrice,
24
+ updatePrice: mocks.updatePrice,
25
+ productId: "product-from-context",
26
+ }),
27
+ priceLabel: (price: { nickname?: string }) => price.nickname ?? "price",
28
+ }));
29
+
30
+ vi.mock("../../../../../../utils/toast", () => ({
31
+ showToast: mocks.showToast,
32
+ showError: vi.fn(),
33
+ dismissToast: vi.fn(),
34
+ showCustomToast: vi.fn(),
35
+ }));
36
+
37
+ const CORE = { id: "feature-core", name: "Core", isCore: true };
38
+ const AI = { id: "feature-ai", name: "AI Assistant", isCore: false };
39
+ const SSO = { id: "feature-sso", name: "SSO", isCore: false };
40
+
41
+ const seed: StripePriceSeed = {
42
+ unitAmount: 5900, // MINOR units — the form must render 59
43
+ currency: "usd",
44
+ interval: "year",
45
+ intervalCount: 1,
46
+ usageType: "licensed",
47
+ nickname: "Cloned Pro",
48
+ description: "A cloned plan",
49
+ features: ["Unlimited exports"],
50
+ token: 500,
51
+ isTrial: false,
52
+ platformFeatures: ["AI Assistant"],
53
+ };
54
+
55
+ /** The sheet is portaled, so everything is queried from document. */
56
+ const input = (name: string) => document.querySelector<HTMLInputElement>(`input[name="${name}"]`);
57
+ const selectTriggers = () => Array.from(document.querySelectorAll('[data-slot="select-trigger"]'));
58
+ // Base UI puts the `id` on the hidden native input it renders for the form,
59
+ // not on the visible control, so read the checked state from there.
60
+ const checkbox = (featureId: string) => document.getElementById(`feature-${featureId}`) as HTMLInputElement | null;
61
+ const isChecked = (featureId: string) => checkbox(featureId)?.checked === true;
62
+
63
+ /** Rendered once the async FeatureService.findMany has landed. */
64
+ const waitForFeatures = async () => {
65
+ await waitFor(() => expect(checkbox(CORE.id)).not.toBeNull());
66
+ };
67
+
68
+ // `Modules.StripePrice` resolves through the registry at render time.
69
+ beforeAll(() => {
70
+ ModuleRegistry.register("StripePrice", {
71
+ name: "stripe-prices",
72
+ pageUrl: "/administration/prices",
73
+ } as any);
74
+ });
75
+
76
+ beforeEach(() => {
77
+ vi.clearAllMocks();
78
+ mocks.findMany.mockResolvedValue([CORE, AI, SSO]);
79
+ mocks.createPrice.mockImplementation(async (payload: { id: string }) => ({ id: payload.id }));
80
+ configureI18n({
81
+ useRouter: () => ({
82
+ push: vi.fn(),
83
+ replace: vi.fn(),
84
+ back: vi.fn(),
85
+ forward: vi.fn(),
86
+ refresh: vi.fn(),
87
+ prefetch: vi.fn(),
88
+ }),
89
+ useTranslations: () => (key: string) => key,
90
+ Link: ({ children }: any) => children,
91
+ usePathname: () => "/",
92
+ });
93
+ });
94
+
95
+ describe("PriceEditor — seed", () => {
96
+ it("renders a seeded editor in CREATE mode", async () => {
97
+ render(<PriceEditor forceShow productId="product-1" seed={seed} />);
98
+
99
+ expect(await screen.findByText("common.edit.create.title")).not.toBeNull();
100
+ expect(screen.getByTestId("modal-button-create").textContent).toContain("ui.buttons.confirm_create");
101
+ expect(screen.queryByText("common.edit.update.title")).toBeNull();
102
+ expect(screen.queryByText("billing.admin.prices.immutability.title")).toBeNull();
103
+ });
104
+
105
+ it("pre-fills the fields from the seed, converting the amount to MAJOR units", async () => {
106
+ render(<PriceEditor forceShow productId="product-1" seed={seed} />);
107
+ await screen.findByText("common.edit.create.title");
108
+
109
+ // 5900 minor units -> 59 major units.
110
+ expect(input("unitAmount")?.value).toBe("59");
111
+ expect(input("nickname")?.value).toBe("Cloned Pro");
112
+ // The token pipeline is string-based end to end.
113
+ expect(input("token")?.value).toBe("500");
114
+ expect(input("intervalCount")?.value).toBe("1");
115
+ expect(screen.getByDisplayValue("A cloned plan")).not.toBeNull();
116
+ expect(screen.getByDisplayValue("Unlimited exports")).not.toBeNull();
117
+
118
+ // Trigger order: currency, interval, usageType.
119
+ expect(selectTriggers()[0]?.textContent).toContain("USD ($)");
120
+ expect(selectTriggers()[1]?.textContent).toContain("billing.admin.prices.interval.year");
121
+ });
122
+
123
+ it("checks the seeded platform features once the late feature list lands", async () => {
124
+ render(<PriceEditor forceShow productId="product-1" seed={seed} />);
125
+ await waitForFeatures();
126
+
127
+ // The guarded re-seed: `allFeatures` resolves AFTER useForm has seeded, and
128
+ // EditorSheet only re-seeds when isEdit — without the catch-up effect both
129
+ // of these stay unchecked.
130
+ await waitFor(() => expect(isChecked(AI.id)).toBe(true));
131
+ expect(isChecked(CORE.id)).toBe(true);
132
+ expect(isChecked(SSO.id)).toBe(false);
133
+ });
134
+
135
+ it("drops a platform feature this environment does not know, warns once, and does not throw", async () => {
136
+ const foreignSeed: StripePriceSeed = { ...seed, platformFeatures: ["AI Assistant", "Telepathy"] };
137
+
138
+ render(<PriceEditor forceShow productId="product-1" seed={foreignSeed} />);
139
+ await waitForFeatures();
140
+
141
+ await waitFor(() => expect(mocks.showToast).toHaveBeenCalledTimes(1));
142
+ expect(mocks.showToast).toHaveBeenCalledWith("billing.admin.prices.import.warnings.unknownFeatures");
143
+
144
+ // The known name still resolves; nothing extra gets checked.
145
+ await waitFor(() => expect(isChecked(AI.id)).toBe(true));
146
+ expect(isChecked(CORE.id)).toBe(true);
147
+ expect(isChecked(SSO.id)).toBe(false);
148
+ });
149
+
150
+ it("submits a seeded editor as a brand-new price: fresh uuid, no Stripe identity", async () => {
151
+ render(<PriceEditor forceShow productId="product-1" seed={seed} />);
152
+ await waitForFeatures();
153
+ await waitFor(() => expect(isChecked(AI.id)).toBe(true));
154
+
155
+ fireEvent.click(screen.getByTestId("modal-button-create"));
156
+
157
+ await waitFor(() => expect(mocks.createPrice).toHaveBeenCalledTimes(1));
158
+ expect(mocks.updatePrice).not.toHaveBeenCalled();
159
+
160
+ const payload = mocks.createPrice.mock.calls[0][0];
161
+ expect(payload.id).toMatch(/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i);
162
+ expect(payload).not.toHaveProperty("stripePriceId");
163
+ expect(JSON.stringify(payload)).not.toContain("stripePriceId");
164
+ expect(JSON.stringify(payload)).not.toContain("price_");
165
+
166
+ // The rest of the seed survives the round trip, back in MINOR units.
167
+ expect(payload.productId).toBe("product-1");
168
+ expect(payload.unitAmount).toBe(5900);
169
+ expect(payload.currency).toBe("usd");
170
+ expect(payload.recurring).toEqual({ interval: "year", intervalCount: 1, usageType: "licensed" });
171
+ expect(payload.token).toBe(500);
172
+ expect(payload.featureIds).toEqual(expect.arrayContaining([AI.id, CORE.id]));
173
+ });
174
+
175
+ it("does not put the editor in edit mode", async () => {
176
+ render(<PriceEditor forceShow productId="product-1" seed={seed} />);
177
+ await screen.findByText("common.edit.create.title");
178
+
179
+ expect(screen.queryByText("billing.admin.prices.immutability.title")).toBeNull();
180
+ expect(input("unitAmount")?.disabled).toBe(false);
181
+ });
182
+ });