@carlonicora/nextjs-jsonapi 2.5.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BlockNoteEditor-TIMGYKAA.js → BlockNoteEditor-3IZ7PMFM.js} +19 -19
- package/dist/{BlockNoteEditor-TIMGYKAA.js.map → BlockNoteEditor-3IZ7PMFM.js.map} +1 -1
- package/dist/{BlockNoteEditor-YFJMXJEU.mjs → BlockNoteEditor-G4XNDV2O.mjs} +4 -4
- package/dist/billing/index.d.mts +127 -46
- package/dist/billing/index.d.ts +127 -46
- package/dist/billing/index.js +1243 -1084
- package/dist/billing/index.js.map +1 -1
- package/dist/billing/index.mjs +983 -824
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{chunk-RTOC53EZ.js → chunk-53B6NPGA.js} +34 -4
- package/dist/chunk-53B6NPGA.js.map +1 -0
- package/dist/{chunk-7HKJNUW7.js → chunk-5GVBUTS4.js} +1142 -953
- package/dist/chunk-5GVBUTS4.js.map +1 -0
- package/dist/{chunk-OTEDZ6YW.js → chunk-JKGEJGSD.js} +7 -7
- package/dist/{chunk-OTEDZ6YW.js.map → chunk-JKGEJGSD.js.map} +1 -1
- package/dist/{chunk-DJWNNV52.mjs → chunk-PHEFWL6L.mjs} +2 -2
- package/dist/{chunk-FS4RVV3K.mjs → chunk-TWXKAY34.mjs} +33 -3
- package/dist/chunk-TWXKAY34.mjs.map +1 -0
- package/dist/{chunk-G4YS52SO.mjs → chunk-WCX4CLRJ.mjs} +1607 -1418
- package/dist/chunk-WCX4CLRJ.mjs.map +1 -0
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/index.js +4 -4
- package/dist/components/index.mjs +3 -3
- package/dist/contexts/index.js +4 -4
- package/dist/contexts/index.mjs +3 -3
- package/dist/core/index.d.mts +17 -1
- package/dist/core/index.d.ts +17 -1
- package/dist/core/index.js +6 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +5 -1
- package/dist/features/help/index.js +37 -37
- package/dist/features/help/index.mjs +3 -3
- package/dist/features/tokenusage/index.js +101 -101
- package/dist/features/tokenusage/index.mjs +3 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +1 -1
- package/package.json +1 -1
- package/src/client/index.ts +4 -0
- package/src/features/administration/components/AdminIndexContainer.tsx +1 -1
- package/src/features/administration/components/__tests__/AdminIndexContainer.spec.tsx +1 -1
- package/src/features/billing/contexts/PriceContext.tsx +202 -0
- package/src/features/billing/contexts/ProductContext.tsx +185 -0
- package/src/features/billing/contexts/__tests__/PriceContext.spec.tsx +89 -0
- package/src/features/billing/contexts/__tests__/ProductContext.spec.tsx +81 -0
- package/src/features/billing/contexts/index.ts +2 -1
- package/src/features/billing/i18n-keys.ts +88 -0
- package/src/features/billing/stripe-price/components/containers/PriceContainer.tsx +21 -0
- package/src/features/billing/stripe-price/components/containers/index.ts +1 -0
- package/src/features/billing/stripe-price/components/details/PriceDetails.tsx +131 -0
- package/src/features/billing/stripe-price/components/details/index.ts +1 -0
- package/src/features/billing/stripe-price/components/forms/PriceArchiver.tsx +55 -0
- package/src/features/billing/stripe-price/components/forms/PriceEditor.tsx +307 -374
- package/src/features/billing/stripe-price/components/forms/index.ts +3 -1
- package/src/features/billing/stripe-price/components/index.ts +2 -0
- package/src/features/billing/stripe-price/components/lists/PricesList.tsx +49 -267
- package/src/features/billing/stripe-price/data/index.ts +1 -0
- package/src/features/billing/stripe-price/data/stripe-price.fields.ts +8 -0
- package/src/features/billing/stripe-price/hooks/useStripePriceTableStructure.tsx +119 -0
- package/src/features/billing/stripe-price/stripe-price.module.ts +5 -1
- package/src/features/billing/stripe-product/components/containers/ProductContainer.tsx +45 -0
- package/src/features/billing/stripe-product/components/containers/ProductsListContainer.tsx +27 -0
- package/src/features/billing/stripe-product/components/containers/index.ts +2 -2
- package/src/features/billing/stripe-product/components/details/ProductDetails.tsx +45 -0
- package/src/features/billing/stripe-product/components/details/index.ts +1 -0
- package/src/features/billing/stripe-product/components/forms/ProductArchiver.tsx +55 -0
- package/src/features/billing/stripe-product/components/forms/ProductEditor.tsx +92 -81
- package/src/features/billing/stripe-product/components/forms/index.ts +3 -1
- package/src/features/billing/stripe-product/components/index.ts +1 -0
- package/src/features/billing/stripe-product/components/lists/ProductsList.tsx +45 -187
- package/src/features/billing/stripe-product/data/index.ts +1 -0
- package/src/features/billing/stripe-product/data/stripe-product.fields.ts +6 -0
- package/src/features/billing/stripe-product/hooks/useStripeProductTableStructure.tsx +80 -0
- package/src/features/billing/stripe-product/stripe-product.module.ts +5 -1
- package/src/features/user/components/forms/UserEditor.tsx +11 -2
- package/dist/chunk-7HKJNUW7.js.map +0 -1
- package/dist/chunk-FS4RVV3K.mjs.map +0 -1
- package/dist/chunk-G4YS52SO.mjs.map +0 -1
- package/dist/chunk-RTOC53EZ.js.map +0 -1
- package/src/features/billing/contexts/BillingContext.tsx +0 -95
- package/src/features/billing/stripe-product/components/containers/ProductsAdminContainer.tsx +0 -98
- package/src/features/billing/stripe-product/components/containers/ProductsAdminPageContainer.tsx +0 -27
- /package/dist/{BlockNoteEditor-YFJMXJEU.mjs.map → BlockNoteEditor-G4XNDV2O.mjs.map} +0 -0
- /package/dist/{chunk-DJWNNV52.mjs.map → chunk-PHEFWL6L.mjs.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { A as AbstractApiData } from './config-BIjrg5wd.js';
|
|
|
6
6
|
export { b as TokenUsageAdminBreakdownModule, T as TokenUsageAdminSummaryModule, a as TokenUsageAdminTimelineModule, c as configureTokenUsage, g as getTokenUsageCurrency, t as tokenUsageModules } from './config-BIjrg5wd.js';
|
|
7
7
|
import { A as AbstractService } from './AbstractService-Cew0PD0L.js';
|
|
8
8
|
export { H as HttpMethod, N as NextRef, P as PreviousRef, S as SelfRef, T as TotalRef, b as clearLastApiMeta, c as clearLastApiTotal, d as getGlobalErrorHandler, a as getLastApiMeta, g as getLastApiTotal, s as setGlobalErrorHandler } from './AbstractService-Cew0PD0L.js';
|
|
9
|
-
export { AppModuleDefinitions, Assistant, AssistantAction, AssistantActionInput, AssistantActionInterface, AssistantActionModule, AssistantActionService, AssistantActionStatus, AssistantMessage, AssistantMessageModule, AssistantMessageService, AssistantModule, AssistantService, AuditLog, AuditLogInterface, AuditLogModule, AuditLogService, Auth, AuthModule, AuthorModule, BackupCodeVerify, BackupCodeVerifyInput, BackupCodeVerifyModule, Billing, BillingModule, BillingService, BlockDiffOptions, BlockNoteDiffUtil, BlockNoteWordDiffRendererUtil, Chunk, ChunkInput, ChunkModule, ClientAbstractService, ClientHttpMethod, ClientNextRef, ClientPreviousRef, ClientSelfRef, ClientTotalRef, CodiceFiscaleValidationOptions, Company, CompanyFields, CompanyModule, Content, ContentModule, DataClass, DataClass as DataClassRegistry, DiffBlock, DiffResult, EndpointCreator, EndpointQuery, EntityAiStatus, EntityObject, Feature, FeatureModule, FormatOption, FoundationModuleDefinitions, HowTo, HowToFields, HowToModule, HowToService, InviteValidation, JsonApiDataFactory, MOBILE_BREAKPOINT, Module, ModuleDefinitions, ModuleModule, ModulePathsModule, ModuleRegistrar, ModuleRegistry, Modules, Notification, NotificationFields, NotificationModule, OAuthClient, OAuthModule, OAuthService, Passkey, PasskeyAuthenticationOptions, PasskeyAuthenticationOptionsInput, PasskeyAuthenticationOptionsInterface, PasskeyAuthenticationOptionsModule, PasskeyModule, PasskeyRegistrationOptions, PasskeyRegistrationOptionsInput, PasskeyRegistrationOptionsInterface, PasskeyRegistrationOptionsModule, PasskeyRegistrationVerify, PasskeyRegistrationVerifyInput, PasskeyRegistrationVerifyModule, PasskeyRename, PasskeyRenameInput, PasskeyRenameModule, PasskeyVerifyLogin, PasskeyVerifyLoginInput, PasskeyVerifyLoginModule, PaymentMethod, PermissionMappingModule, Push, PushInput, PushInterface, PushModule, RbacMatrixModule, ReferralModule, ReferralService, ReferralStats, ReferralStatsModule, RehydrationFactory, Role, RoleModule, S3, S3Module, SearchResultInterface, StripeCustomer, StripeCustomerModule, StripeCustomerService, StripeInvoice, StripeInvoiceModule, StripeInvoiceService, StripePaymentMethodModule, StripePrice, StripePriceModule, StripePriceService, StripeProduct, StripeProductModule, StripeProductService, StripePromotionCode, StripePromotionCodeModule, StripePromotionCodeService, StripeSubscription, StripeSubscriptionModule, StripeSubscriptionService, StripeUsage, StripeUsageModule, StripeUsageService, TableOptions, ToastOptions, TotpAuthenticator, TotpAuthenticatorModule, TotpSetup, TotpSetupInput, TotpSetupInterface, TotpSetupModule, TotpVerify, TotpVerifyInput, TotpVerifyLogin, TotpVerifyLoginInput, TotpVerifyLoginModule, TotpVerifyModule, TwoFactorChallenge, TwoFactorChallengeInput, TwoFactorChallengeModule, TwoFactorEnable, TwoFactorEnableInput, TwoFactorEnableModule, TwoFactorService, TwoFactorStatus, TwoFactorStatusInterface, TwoFactorStatusModule, User, UserModule, UserObject, VIEWPORT_COOKIE_NAME, Waitlist, WaitlistInput, WaitlistInterface, WaitlistModule, WaitlistService, WaitlistStats, WaitlistStatsInterface, WaitlistStatsModule, WaitlistStatus, WordDiff, checkPermissions, checkPermissionsFromServer, cn, composeRefs, dismissToast, entityObjectSchema, exists, formatCodiceFiscale, formatDate, formatLocalDate, formatPartitaIva, getBootstrapper, getClientGlobalErrorHandler, getTableComponents, getTableOptions, getValueFromPath, hasBootstrapper, isRemoteImageSrc, rehydrate, rehydrateList, resetBootstrapStore, setBootstrapper, setClientGlobalErrorHandler, showCustomToast, showError, showToast, translateData, translateResponse, tryBootstrap, useComposedRefs, useIsMobile, userObjectSchema, validateCodiceFiscale, validateItalianTaxCode, validatePartitaIva } from './core/index.js';
|
|
9
|
+
export { AppModuleDefinitions, Assistant, AssistantAction, AssistantActionInput, AssistantActionInterface, AssistantActionModule, AssistantActionService, AssistantActionStatus, AssistantMessage, AssistantMessageModule, AssistantMessageService, AssistantModule, AssistantService, AuditLog, AuditLogInterface, AuditLogModule, AuditLogService, Auth, AuthModule, AuthorModule, BackupCodeVerify, BackupCodeVerifyInput, BackupCodeVerifyModule, Billing, BillingModule, BillingService, BlockDiffOptions, BlockNoteDiffUtil, BlockNoteWordDiffRendererUtil, Chunk, ChunkInput, ChunkModule, ClientAbstractService, ClientHttpMethod, ClientNextRef, ClientPreviousRef, ClientSelfRef, ClientTotalRef, CodiceFiscaleValidationOptions, Company, CompanyFields, CompanyModule, Content, ContentModule, DataClass, DataClass as DataClassRegistry, DiffBlock, DiffResult, EndpointCreator, EndpointQuery, EntityAiStatus, EntityObject, Feature, FeatureModule, FormatOption, FoundationModuleDefinitions, HowTo, HowToFields, HowToModule, HowToService, InviteValidation, JsonApiDataFactory, MOBILE_BREAKPOINT, Module, ModuleDefinitions, ModuleModule, ModulePathsModule, ModuleRegistrar, ModuleRegistry, Modules, Notification, NotificationFields, NotificationModule, OAuthClient, OAuthModule, OAuthService, Passkey, PasskeyAuthenticationOptions, PasskeyAuthenticationOptionsInput, PasskeyAuthenticationOptionsInterface, PasskeyAuthenticationOptionsModule, PasskeyModule, PasskeyRegistrationOptions, PasskeyRegistrationOptionsInput, PasskeyRegistrationOptionsInterface, PasskeyRegistrationOptionsModule, PasskeyRegistrationVerify, PasskeyRegistrationVerifyInput, PasskeyRegistrationVerifyModule, PasskeyRename, PasskeyRenameInput, PasskeyRenameModule, PasskeyVerifyLogin, PasskeyVerifyLoginInput, PasskeyVerifyLoginModule, PaymentMethod, PermissionMappingModule, Push, PushInput, PushInterface, PushModule, RbacMatrixModule, ReferralModule, ReferralService, ReferralStats, ReferralStatsModule, RehydrationFactory, Role, RoleModule, S3, S3Module, SearchResultInterface, StripeCustomer, StripeCustomerModule, StripeCustomerService, StripeInvoice, StripeInvoiceModule, StripeInvoiceService, StripePaymentMethodModule, StripePrice, StripePriceFields, StripePriceModule, StripePriceService, StripeProduct, StripeProductFields, StripeProductModule, StripeProductService, StripePromotionCode, StripePromotionCodeModule, StripePromotionCodeService, StripeSubscription, StripeSubscriptionModule, StripeSubscriptionService, StripeUsage, StripeUsageModule, StripeUsageService, TableOptions, ToastOptions, TotpAuthenticator, TotpAuthenticatorModule, TotpSetup, TotpSetupInput, TotpSetupInterface, TotpSetupModule, TotpVerify, TotpVerifyInput, TotpVerifyLogin, TotpVerifyLoginInput, TotpVerifyLoginModule, TotpVerifyModule, TwoFactorChallenge, TwoFactorChallengeInput, TwoFactorChallengeModule, TwoFactorEnable, TwoFactorEnableInput, TwoFactorEnableModule, TwoFactorService, TwoFactorStatus, TwoFactorStatusInterface, TwoFactorStatusModule, User, UserModule, UserObject, VIEWPORT_COOKIE_NAME, Waitlist, WaitlistInput, WaitlistInterface, WaitlistModule, WaitlistService, WaitlistStats, WaitlistStatsInterface, WaitlistStatsModule, WaitlistStatus, WordDiff, checkPermissions, checkPermissionsFromServer, cn, composeRefs, dismissToast, entityObjectSchema, exists, formatCodiceFiscale, formatDate, formatLocalDate, formatPartitaIva, getBootstrapper, getClientGlobalErrorHandler, getTableComponents, getTableOptions, getValueFromPath, hasBootstrapper, isRemoteImageSrc, rehydrate, rehydrateList, resetBootstrapStore, setBootstrapper, setClientGlobalErrorHandler, showCustomToast, showError, showToast, translateData, translateResponse, tryBootstrap, useComposedRefs, useIsMobile, userObjectSchema, validateCodiceFiscale, validateItalianTaxCode, validatePartitaIva } from './core/index.js';
|
|
10
10
|
export { c as AssistantMessageInput, d as AssistantMessageInterface, A as AssistantMessageRole, b as AssistantMessageType, B as BreadcrumbItemData, e as ChunkInterface, C as ChunkRelationshipMeta, H as HowToInput, a as HowToInterface } from './AssistantMessageInterface-Dh0BpbP2.js';
|
|
11
11
|
export { C as ContentFields, D as D3Link, a as D3Node, R as RoleFields, U as UserFields } from './content.fields-1AlHDtDb.js';
|
|
12
12
|
export { ClassValue } from 'clsx';
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkJKGEJGSDjs = require('./chunk-JKGEJGSD.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -219,7 +219,9 @@ var _chunkOTEDZ6YWjs = require('./chunk-OTEDZ6YW.js');
|
|
|
219
219
|
|
|
220
220
|
|
|
221
221
|
|
|
222
|
-
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
var _chunk53B6NPGAjs = require('./chunk-53B6NPGA.js');
|
|
223
225
|
require('./chunk-LXKSUWAV.js');
|
|
224
226
|
require('./chunk-IBS6NI7D.js');
|
|
225
227
|
|
|
@@ -463,5 +465,7 @@ require('./chunk-7QVYU63E.js');
|
|
|
463
465
|
|
|
464
466
|
|
|
465
467
|
|
|
466
|
-
exports.ACTION_TYPES = _chunkOTEDZ6YWjs.ACTION_TYPES; exports.AVAILABLE_OAUTH_SCOPES = _chunkRTOC53EZjs.AVAILABLE_OAUTH_SCOPES; exports.AbstractApiData = _chunkRTOC53EZjs.AbstractApiData; exports.AbstractService = _chunkRTOC53EZjs.AbstractService; exports.Action = _chunkRTOC53EZjs.Action; exports.Assistant = _chunkRTOC53EZjs.Assistant; exports.AssistantAction = _chunkRTOC53EZjs.AssistantAction; exports.AssistantActionModule = _chunkRTOC53EZjs.AssistantActionModule; exports.AssistantActionService = _chunkRTOC53EZjs.AssistantActionService; exports.AssistantMessage = _chunkRTOC53EZjs.AssistantMessage; exports.AssistantMessageModule = _chunkRTOC53EZjs.AssistantMessageModule; exports.AssistantMessageService = _chunkRTOC53EZjs.AssistantMessageService; exports.AssistantModule = _chunkRTOC53EZjs.AssistantModule; exports.AssistantService = _chunkRTOC53EZjs.AssistantService; exports.AuditLog = _chunkRTOC53EZjs.AuditLog; exports.AuditLogModule = _chunkRTOC53EZjs.AuditLogModule; exports.AuditLogService = _chunkRTOC53EZjs.AuditLogService; exports.Auth = _chunkRTOC53EZjs.Auth; exports.AuthComponent = _chunkRTOC53EZjs.AuthComponent; exports.AuthModule = _chunkRTOC53EZjs.AuthModule; exports.AuthService = _chunkRTOC53EZjs.AuthService; exports.AuthorModule = _chunkRTOC53EZjs.AuthorModule; exports.BackupCodeVerify = _chunkRTOC53EZjs.BackupCodeVerify; exports.BackupCodeVerifyModule = _chunkRTOC53EZjs.BackupCodeVerifyModule; exports.Billing = _chunkRTOC53EZjs.Billing; exports.BillingModule = _chunkRTOC53EZjs.BillingModule; exports.BillingService = _chunkRTOC53EZjs.BillingService; exports.BlockNoteDiffUtil = _chunkRTOC53EZjs.BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = _chunkRTOC53EZjs.BlockNoteWordDiffRendererUtil; exports.COMPANY_ADMINISTRATOR_ROLE_ID = _chunkOTEDZ6YWjs.COMPANY_ADMINISTRATOR_ROLE_ID; exports.Chunk = _chunkRTOC53EZjs.Chunk; exports.ChunkModule = _chunkRTOC53EZjs.ChunkModule; exports.ClientAbstractService = _chunkRTOC53EZjs.ClientAbstractService; exports.ClientHttpMethod = _chunkRTOC53EZjs.ClientHttpMethod; exports.Company = _chunkRTOC53EZjs.Company; exports.CompanyFields = _chunkRTOC53EZjs.CompanyFields; exports.CompanyModule = _chunkRTOC53EZjs.CompanyModule; exports.CompanyService = _chunkRTOC53EZjs.CompanyService; exports.Content = _chunkRTOC53EZjs.Content; exports.ContentFields = _chunkRTOC53EZjs.ContentFields; exports.ContentModule = _chunkRTOC53EZjs.ContentModule; exports.ContentService = _chunkRTOC53EZjs.ContentService; exports.DEFAULT_GRANT_TYPES = _chunkRTOC53EZjs.DEFAULT_GRANT_TYPES; exports.DataClass = _chunkFPO4DLZNjs.DataClassRegistry; exports.DataClassRegistry = _chunkFPO4DLZNjs.DataClassRegistry; exports.EndpointCreator = _chunkRTOC53EZjs.EndpointCreator; exports.EntityAiStatus = _chunkRTOC53EZjs.EntityAiStatus; exports.Feature = _chunkRTOC53EZjs.Feature; exports.FeatureModule = _chunkRTOC53EZjs.FeatureModule; exports.FeatureService = _chunkRTOC53EZjs.FeatureService; exports.HowTo = _chunkRTOC53EZjs.HowTo; exports.HowToFields = _chunkRTOC53EZjs.HowToFields; exports.HowToModule = _chunkRTOC53EZjs.HowToModule; exports.HowToService = _chunkRTOC53EZjs.HowToService; exports.HttpMethod = _chunkRTOC53EZjs.HttpMethod; exports.InvoiceStatus = _chunkRTOC53EZjs.InvoiceStatus; exports.JsonApiDataFactory = _chunkFPO4DLZNjs.JsonApiDataFactory; exports.MOBILE_BREAKPOINT = _chunkRTOC53EZjs.MOBILE_BREAKPOINT; exports.Module = _chunkRTOC53EZjs.Module; exports.ModuleModule = _chunkRTOC53EZjs.ModuleModule; exports.ModulePaths = _chunkRTOC53EZjs.ModulePaths; exports.ModulePathsModule = _chunkRTOC53EZjs.ModulePathsModule; exports.ModuleRegistrar = _chunkRTOC53EZjs.ModuleRegistrar; exports.ModuleRegistry = _chunkRTOC53EZjs.ModuleRegistry; exports.Modules = _chunkRTOC53EZjs.Modules; exports.Notification = _chunkRTOC53EZjs.Notification; exports.NotificationFields = _chunkRTOC53EZjs.NotificationFields; exports.NotificationModule = _chunkRTOC53EZjs.NotificationModule; exports.NotificationService = _chunkRTOC53EZjs.NotificationService; exports.OAUTH_SCOPE_DISPLAY = _chunkRTOC53EZjs.OAUTH_SCOPE_DISPLAY; exports.OAuthClient = _chunkRTOC53EZjs.OAuthClient; exports.OAuthModule = _chunkRTOC53EZjs.OAuthModule; exports.OAuthService = _chunkRTOC53EZjs.OAuthService; exports.Passkey = _chunkRTOC53EZjs.Passkey; exports.PasskeyAuthenticationOptions = _chunkRTOC53EZjs.PasskeyAuthenticationOptions; exports.PasskeyAuthenticationOptionsModule = _chunkRTOC53EZjs.PasskeyAuthenticationOptionsModule; exports.PasskeyModule = _chunkRTOC53EZjs.PasskeyModule; exports.PasskeyRegistrationOptions = _chunkRTOC53EZjs.PasskeyRegistrationOptions; exports.PasskeyRegistrationOptionsModule = _chunkRTOC53EZjs.PasskeyRegistrationOptionsModule; exports.PasskeyRegistrationVerify = _chunkRTOC53EZjs.PasskeyRegistrationVerify; exports.PasskeyRegistrationVerifyModule = _chunkRTOC53EZjs.PasskeyRegistrationVerifyModule; exports.PasskeyRename = _chunkRTOC53EZjs.PasskeyRename; exports.PasskeyRenameModule = _chunkRTOC53EZjs.PasskeyRenameModule; exports.PasskeyVerifyLogin = _chunkRTOC53EZjs.PasskeyVerifyLogin; exports.PasskeyVerifyLoginModule = _chunkRTOC53EZjs.PasskeyVerifyLoginModule; exports.PaymentMethod = _chunkRTOC53EZjs.PaymentMethod; exports.PermissionMapping = _chunkRTOC53EZjs.PermissionMapping; exports.PermissionMappingModule = _chunkRTOC53EZjs.PermissionMappingModule; exports.Push = _chunkRTOC53EZjs.Push; exports.PushModule = _chunkRTOC53EZjs.PushModule; exports.PushService = _chunkRTOC53EZjs.PushService; exports.RbacMatrixModel = _chunkRTOC53EZjs.RbacMatrixModel; exports.RbacMatrixModule = _chunkRTOC53EZjs.RbacMatrixModule; exports.RbacService = _chunkOTEDZ6YWjs.RbacService; exports.ReferralModule = _chunkRTOC53EZjs.ReferralModule; exports.ReferralService = _chunkRTOC53EZjs.ReferralService; exports.ReferralStats = _chunkRTOC53EZjs.ReferralStats; exports.ReferralStatsModule = _chunkRTOC53EZjs.ReferralStatsModule; exports.RehydrationFactory = _chunkRTOC53EZjs.RehydrationFactory; exports.Role = _chunkRTOC53EZjs.Role; exports.RoleFields = _chunkRTOC53EZjs.RoleFields; exports.RoleModule = _chunkRTOC53EZjs.RoleModule; exports.RoleService = _chunkRTOC53EZjs.RoleService; exports.S3 = _chunkRTOC53EZjs.S3; exports.S3Module = _chunkRTOC53EZjs.S3Module; exports.S3Service = _chunkRTOC53EZjs.S3Service; exports.StripeCustomer = _chunkRTOC53EZjs.StripeCustomer; exports.StripeCustomerModule = _chunkRTOC53EZjs.StripeCustomerModule; exports.StripeCustomerService = _chunkRTOC53EZjs.StripeCustomerService; exports.StripeInvoice = _chunkRTOC53EZjs.StripeInvoice; exports.StripeInvoiceModule = _chunkRTOC53EZjs.StripeInvoiceModule; exports.StripeInvoiceService = _chunkRTOC53EZjs.StripeInvoiceService; exports.StripePaymentMethodModule = _chunkRTOC53EZjs.StripePaymentMethodModule; exports.StripePrice = _chunkRTOC53EZjs.StripePrice; exports.StripePriceModule = _chunkRTOC53EZjs.StripePriceModule; exports.StripePriceService = _chunkRTOC53EZjs.StripePriceService; exports.StripeProduct = _chunkRTOC53EZjs.StripeProduct; exports.StripeProductModule = _chunkRTOC53EZjs.StripeProductModule; exports.StripeProductService = _chunkRTOC53EZjs.StripeProductService; exports.StripePromotionCode = _chunkRTOC53EZjs.StripePromotionCode; exports.StripePromotionCodeModule = _chunkRTOC53EZjs.StripePromotionCodeModule; exports.StripePromotionCodeService = _chunkRTOC53EZjs.StripePromotionCodeService; exports.StripeSubscription = _chunkRTOC53EZjs.StripeSubscription; exports.StripeSubscriptionModule = _chunkRTOC53EZjs.StripeSubscriptionModule; exports.StripeSubscriptionService = _chunkRTOC53EZjs.StripeSubscriptionService; exports.StripeUsage = _chunkRTOC53EZjs.StripeUsage; exports.StripeUsageModule = _chunkRTOC53EZjs.StripeUsageModule; exports.StripeUsageService = _chunkRTOC53EZjs.StripeUsageService; exports.SubscriptionStatus = _chunkRTOC53EZjs.SubscriptionStatus; exports.TableOptions = _chunkRTOC53EZjs.TableOptions; exports.TokenUsageAdminBreakdownModule = _chunkRTOC53EZjs.TokenUsageAdminBreakdownModule; exports.TokenUsageAdminSummaryModule = _chunkRTOC53EZjs.TokenUsageAdminSummaryModule; exports.TokenUsageAdminTimelineModule = _chunkRTOC53EZjs.TokenUsageAdminTimelineModule; exports.TotpAuthenticator = _chunkRTOC53EZjs.TotpAuthenticator; exports.TotpAuthenticatorModule = _chunkRTOC53EZjs.TotpAuthenticatorModule; exports.TotpSetup = _chunkRTOC53EZjs.TotpSetup; exports.TotpSetupModule = _chunkRTOC53EZjs.TotpSetupModule; exports.TotpVerify = _chunkRTOC53EZjs.TotpVerify; exports.TotpVerifyLogin = _chunkRTOC53EZjs.TotpVerifyLogin; exports.TotpVerifyLoginModule = _chunkRTOC53EZjs.TotpVerifyLoginModule; exports.TotpVerifyModule = _chunkRTOC53EZjs.TotpVerifyModule; exports.TwoFactorChallenge = _chunkRTOC53EZjs.TwoFactorChallenge; exports.TwoFactorChallengeModule = _chunkRTOC53EZjs.TwoFactorChallengeModule; exports.TwoFactorEnable = _chunkRTOC53EZjs.TwoFactorEnable; exports.TwoFactorEnableModule = _chunkRTOC53EZjs.TwoFactorEnableModule; exports.TwoFactorService = _chunkRTOC53EZjs.TwoFactorService; exports.TwoFactorStatus = _chunkRTOC53EZjs.TwoFactorStatus; exports.TwoFactorStatusModule = _chunkRTOC53EZjs.TwoFactorStatusModule; exports.User = _chunkRTOC53EZjs.User; exports.UserFields = _chunkRTOC53EZjs.UserFields; exports.UserModule = _chunkRTOC53EZjs.UserModule; exports.UserService = _chunkRTOC53EZjs.UserService; exports.VIEWPORT_COOKIE_NAME = _chunkRTOC53EZjs.VIEWPORT_COOKIE_NAME; exports.Waitlist = _chunkRTOC53EZjs.Waitlist; exports.WaitlistModule = _chunkRTOC53EZjs.WaitlistModule; exports.WaitlistService = _chunkRTOC53EZjs.WaitlistService; exports.WaitlistStats = _chunkRTOC53EZjs.WaitlistStats; exports.WaitlistStatsModule = _chunkRTOC53EZjs.WaitlistStatsModule; exports.checkPermissions = _chunkRTOC53EZjs.checkPermissions; exports.checkPermissionsFromServer = _chunkRTOC53EZjs.checkPermissionsFromServer; exports.clearLastApiMeta = _chunkRTOC53EZjs.clearLastApiMeta; exports.clearLastApiTotal = _chunkRTOC53EZjs.clearLastApiTotal; exports.cn = _chunkRTOC53EZjs.cn; exports.composeRefs = _chunkRTOC53EZjs.composeRefs; exports.configureAuth = _chunkRTOC53EZjs.configureAuth; exports.configureI18n = _chunkOTEDZ6YWjs.configureI18n; exports.configureJsonApi = _chunkOTEDZ6YWjs.configureJsonApi; exports.configureLogin = _chunkOTEDZ6YWjs.configureLogin; exports.configureReferral = _chunkOTEDZ6YWjs.configureReferral; exports.configureRoles = _chunkOTEDZ6YWjs.configureRoles; exports.configureTokenUsage = _chunkRTOC53EZjs.configureTokenUsage; exports.configureWaitlist = _chunkOTEDZ6YWjs.configureWaitlist; exports.createJsonApiInclusion = _chunkRTOC53EZjs.createJsonApiInclusion; exports.dismissToast = _chunkRTOC53EZjs.dismissToast; exports.entityObjectSchema = _chunkRTOC53EZjs.entityObjectSchema; exports.exists = _chunkRTOC53EZjs.exists; exports.formatCodiceFiscale = _chunkRTOC53EZjs.formatCodiceFiscale; exports.formatDate = _chunkRTOC53EZjs.formatDate; exports.formatLocalDate = _chunkRTOC53EZjs.formatLocalDate; exports.formatPartitaIva = _chunkRTOC53EZjs.formatPartitaIva; exports.getApiUrl = _chunkOTEDZ6YWjs.getApiUrl; exports.getAppUrl = _chunkOTEDZ6YWjs.getAppUrl; exports.getBootstrapper = _chunkFPO4DLZNjs.getBootstrapper; exports.getClientGlobalErrorHandler = _chunkRTOC53EZjs.getClientGlobalErrorHandler; exports.getGlobalErrorHandler = _chunkRTOC53EZjs.getGlobalErrorHandler; exports.getIcon = _chunkRTOC53EZjs.getIcon; exports.getIconByModule = _chunkRTOC53EZjs.getIconByModule; exports.getIconByModuleName = _chunkRTOC53EZjs.getIconByModuleName; exports.getInitials = _chunkRTOC53EZjs.getInitials; exports.getLastApiMeta = _chunkRTOC53EZjs.getLastApiMeta; exports.getLastApiTotal = _chunkRTOC53EZjs.getLastApiTotal; exports.getLucideIcon = _chunkRTOC53EZjs.getLucideIcon; exports.getLucideIconByModule = _chunkRTOC53EZjs.getLucideIconByModule; exports.getLucideIconByModuleName = _chunkRTOC53EZjs.getLucideIconByModuleName; exports.getPublicApiUrl = _chunkOTEDZ6YWjs.getPublicApiUrl; exports.getReferralConfig = _chunkOTEDZ6YWjs.getReferralConfig; exports.getRoleId = _chunkOTEDZ6YWjs.getRoleId; exports.getStripePublishableKey = _chunkOTEDZ6YWjs.getStripePublishableKey; exports.getTableComponents = _chunkRTOC53EZjs.getTableComponents; exports.getTableOptions = _chunkRTOC53EZjs.getTableOptions; exports.getTokenHandler = _chunkRTOC53EZjs.getTokenHandler; exports.getTokenUsageCurrency = _chunkRTOC53EZjs.getTokenUsageCurrency; exports.getTrackablePages = _chunkOTEDZ6YWjs.getTrackablePages; exports.getValueFromPath = _chunkRTOC53EZjs.getValueFromPath; exports.getWaitlistConfig = _chunkOTEDZ6YWjs.getWaitlistConfig; exports.hasBootstrapper = _chunkFPO4DLZNjs.hasBootstrapper; exports.isReferralEnabled = _chunkOTEDZ6YWjs.isReferralEnabled; exports.isRemoteImageSrc = _chunkRTOC53EZjs.isRemoteImageSrc; exports.isRolesConfigured = _chunkOTEDZ6YWjs.isRolesConfigured; exports.rehydrate = _chunkRTOC53EZjs.rehydrate; exports.rehydrateList = _chunkRTOC53EZjs.rehydrateList; exports.resetBootstrapStore = _chunkFPO4DLZNjs.resetBootstrapStore; exports.setBootstrapper = _chunkFPO4DLZNjs.setBootstrapper; exports.setClientGlobalErrorHandler = _chunkRTOC53EZjs.setClientGlobalErrorHandler; exports.setGlobalErrorHandler = _chunkRTOC53EZjs.setGlobalErrorHandler; exports.showCustomToast = _chunkRTOC53EZjs.showCustomToast; exports.showError = _chunkRTOC53EZjs.showError; exports.showToast = _chunkRTOC53EZjs.showToast; exports.tokenUsageModules = _chunkRTOC53EZjs.tokenUsageModules; exports.translateData = _chunkFPO4DLZNjs.translateData; exports.translateResponse = _chunkFPO4DLZNjs.translateResponse; exports.tryBootstrap = _chunkFPO4DLZNjs.tryBootstrap; exports.useComposedRefs = _chunkRTOC53EZjs.useComposedRefs; exports.useIsMobile = _chunkRTOC53EZjs.useIsMobile; exports.userObjectSchema = _chunkRTOC53EZjs.userObjectSchema; exports.validateCodiceFiscale = _chunkRTOC53EZjs.validateCodiceFiscale; exports.validateItalianTaxCode = _chunkRTOC53EZjs.validateItalianTaxCode; exports.validatePartitaIva = _chunkRTOC53EZjs.validatePartitaIva;
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
exports.ACTION_TYPES = _chunkJKGEJGSDjs.ACTION_TYPES; exports.AVAILABLE_OAUTH_SCOPES = _chunk53B6NPGAjs.AVAILABLE_OAUTH_SCOPES; exports.AbstractApiData = _chunk53B6NPGAjs.AbstractApiData; exports.AbstractService = _chunk53B6NPGAjs.AbstractService; exports.Action = _chunk53B6NPGAjs.Action; exports.Assistant = _chunk53B6NPGAjs.Assistant; exports.AssistantAction = _chunk53B6NPGAjs.AssistantAction; exports.AssistantActionModule = _chunk53B6NPGAjs.AssistantActionModule; exports.AssistantActionService = _chunk53B6NPGAjs.AssistantActionService; exports.AssistantMessage = _chunk53B6NPGAjs.AssistantMessage; exports.AssistantMessageModule = _chunk53B6NPGAjs.AssistantMessageModule; exports.AssistantMessageService = _chunk53B6NPGAjs.AssistantMessageService; exports.AssistantModule = _chunk53B6NPGAjs.AssistantModule; exports.AssistantService = _chunk53B6NPGAjs.AssistantService; exports.AuditLog = _chunk53B6NPGAjs.AuditLog; exports.AuditLogModule = _chunk53B6NPGAjs.AuditLogModule; exports.AuditLogService = _chunk53B6NPGAjs.AuditLogService; exports.Auth = _chunk53B6NPGAjs.Auth; exports.AuthComponent = _chunk53B6NPGAjs.AuthComponent; exports.AuthModule = _chunk53B6NPGAjs.AuthModule; exports.AuthService = _chunk53B6NPGAjs.AuthService; exports.AuthorModule = _chunk53B6NPGAjs.AuthorModule; exports.BackupCodeVerify = _chunk53B6NPGAjs.BackupCodeVerify; exports.BackupCodeVerifyModule = _chunk53B6NPGAjs.BackupCodeVerifyModule; exports.Billing = _chunk53B6NPGAjs.Billing; exports.BillingModule = _chunk53B6NPGAjs.BillingModule; exports.BillingService = _chunk53B6NPGAjs.BillingService; exports.BlockNoteDiffUtil = _chunk53B6NPGAjs.BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = _chunk53B6NPGAjs.BlockNoteWordDiffRendererUtil; exports.COMPANY_ADMINISTRATOR_ROLE_ID = _chunkJKGEJGSDjs.COMPANY_ADMINISTRATOR_ROLE_ID; exports.Chunk = _chunk53B6NPGAjs.Chunk; exports.ChunkModule = _chunk53B6NPGAjs.ChunkModule; exports.ClientAbstractService = _chunk53B6NPGAjs.ClientAbstractService; exports.ClientHttpMethod = _chunk53B6NPGAjs.ClientHttpMethod; exports.Company = _chunk53B6NPGAjs.Company; exports.CompanyFields = _chunk53B6NPGAjs.CompanyFields; exports.CompanyModule = _chunk53B6NPGAjs.CompanyModule; exports.CompanyService = _chunk53B6NPGAjs.CompanyService; exports.Content = _chunk53B6NPGAjs.Content; exports.ContentFields = _chunk53B6NPGAjs.ContentFields; exports.ContentModule = _chunk53B6NPGAjs.ContentModule; exports.ContentService = _chunk53B6NPGAjs.ContentService; exports.DEFAULT_GRANT_TYPES = _chunk53B6NPGAjs.DEFAULT_GRANT_TYPES; exports.DataClass = _chunkFPO4DLZNjs.DataClassRegistry; exports.DataClassRegistry = _chunkFPO4DLZNjs.DataClassRegistry; exports.EndpointCreator = _chunk53B6NPGAjs.EndpointCreator; exports.EntityAiStatus = _chunk53B6NPGAjs.EntityAiStatus; exports.Feature = _chunk53B6NPGAjs.Feature; exports.FeatureModule = _chunk53B6NPGAjs.FeatureModule; exports.FeatureService = _chunk53B6NPGAjs.FeatureService; exports.HowTo = _chunk53B6NPGAjs.HowTo; exports.HowToFields = _chunk53B6NPGAjs.HowToFields; exports.HowToModule = _chunk53B6NPGAjs.HowToModule; exports.HowToService = _chunk53B6NPGAjs.HowToService; exports.HttpMethod = _chunk53B6NPGAjs.HttpMethod; exports.InvoiceStatus = _chunk53B6NPGAjs.InvoiceStatus; exports.JsonApiDataFactory = _chunkFPO4DLZNjs.JsonApiDataFactory; exports.MOBILE_BREAKPOINT = _chunk53B6NPGAjs.MOBILE_BREAKPOINT; exports.Module = _chunk53B6NPGAjs.Module; exports.ModuleModule = _chunk53B6NPGAjs.ModuleModule; exports.ModulePaths = _chunk53B6NPGAjs.ModulePaths; exports.ModulePathsModule = _chunk53B6NPGAjs.ModulePathsModule; exports.ModuleRegistrar = _chunk53B6NPGAjs.ModuleRegistrar; exports.ModuleRegistry = _chunk53B6NPGAjs.ModuleRegistry; exports.Modules = _chunk53B6NPGAjs.Modules; exports.Notification = _chunk53B6NPGAjs.Notification; exports.NotificationFields = _chunk53B6NPGAjs.NotificationFields; exports.NotificationModule = _chunk53B6NPGAjs.NotificationModule; exports.NotificationService = _chunk53B6NPGAjs.NotificationService; exports.OAUTH_SCOPE_DISPLAY = _chunk53B6NPGAjs.OAUTH_SCOPE_DISPLAY; exports.OAuthClient = _chunk53B6NPGAjs.OAuthClient; exports.OAuthModule = _chunk53B6NPGAjs.OAuthModule; exports.OAuthService = _chunk53B6NPGAjs.OAuthService; exports.Passkey = _chunk53B6NPGAjs.Passkey; exports.PasskeyAuthenticationOptions = _chunk53B6NPGAjs.PasskeyAuthenticationOptions; exports.PasskeyAuthenticationOptionsModule = _chunk53B6NPGAjs.PasskeyAuthenticationOptionsModule; exports.PasskeyModule = _chunk53B6NPGAjs.PasskeyModule; exports.PasskeyRegistrationOptions = _chunk53B6NPGAjs.PasskeyRegistrationOptions; exports.PasskeyRegistrationOptionsModule = _chunk53B6NPGAjs.PasskeyRegistrationOptionsModule; exports.PasskeyRegistrationVerify = _chunk53B6NPGAjs.PasskeyRegistrationVerify; exports.PasskeyRegistrationVerifyModule = _chunk53B6NPGAjs.PasskeyRegistrationVerifyModule; exports.PasskeyRename = _chunk53B6NPGAjs.PasskeyRename; exports.PasskeyRenameModule = _chunk53B6NPGAjs.PasskeyRenameModule; exports.PasskeyVerifyLogin = _chunk53B6NPGAjs.PasskeyVerifyLogin; exports.PasskeyVerifyLoginModule = _chunk53B6NPGAjs.PasskeyVerifyLoginModule; exports.PaymentMethod = _chunk53B6NPGAjs.PaymentMethod; exports.PermissionMapping = _chunk53B6NPGAjs.PermissionMapping; exports.PermissionMappingModule = _chunk53B6NPGAjs.PermissionMappingModule; exports.Push = _chunk53B6NPGAjs.Push; exports.PushModule = _chunk53B6NPGAjs.PushModule; exports.PushService = _chunk53B6NPGAjs.PushService; exports.RbacMatrixModel = _chunk53B6NPGAjs.RbacMatrixModel; exports.RbacMatrixModule = _chunk53B6NPGAjs.RbacMatrixModule; exports.RbacService = _chunkJKGEJGSDjs.RbacService; exports.ReferralModule = _chunk53B6NPGAjs.ReferralModule; exports.ReferralService = _chunk53B6NPGAjs.ReferralService; exports.ReferralStats = _chunk53B6NPGAjs.ReferralStats; exports.ReferralStatsModule = _chunk53B6NPGAjs.ReferralStatsModule; exports.RehydrationFactory = _chunk53B6NPGAjs.RehydrationFactory; exports.Role = _chunk53B6NPGAjs.Role; exports.RoleFields = _chunk53B6NPGAjs.RoleFields; exports.RoleModule = _chunk53B6NPGAjs.RoleModule; exports.RoleService = _chunk53B6NPGAjs.RoleService; exports.S3 = _chunk53B6NPGAjs.S3; exports.S3Module = _chunk53B6NPGAjs.S3Module; exports.S3Service = _chunk53B6NPGAjs.S3Service; exports.StripeCustomer = _chunk53B6NPGAjs.StripeCustomer; exports.StripeCustomerModule = _chunk53B6NPGAjs.StripeCustomerModule; exports.StripeCustomerService = _chunk53B6NPGAjs.StripeCustomerService; exports.StripeInvoice = _chunk53B6NPGAjs.StripeInvoice; exports.StripeInvoiceModule = _chunk53B6NPGAjs.StripeInvoiceModule; exports.StripeInvoiceService = _chunk53B6NPGAjs.StripeInvoiceService; exports.StripePaymentMethodModule = _chunk53B6NPGAjs.StripePaymentMethodModule; exports.StripePrice = _chunk53B6NPGAjs.StripePrice; exports.StripePriceFields = _chunk53B6NPGAjs.StripePriceFields; exports.StripePriceModule = _chunk53B6NPGAjs.StripePriceModule; exports.StripePriceService = _chunk53B6NPGAjs.StripePriceService; exports.StripeProduct = _chunk53B6NPGAjs.StripeProduct; exports.StripeProductFields = _chunk53B6NPGAjs.StripeProductFields; exports.StripeProductModule = _chunk53B6NPGAjs.StripeProductModule; exports.StripeProductService = _chunk53B6NPGAjs.StripeProductService; exports.StripePromotionCode = _chunk53B6NPGAjs.StripePromotionCode; exports.StripePromotionCodeModule = _chunk53B6NPGAjs.StripePromotionCodeModule; exports.StripePromotionCodeService = _chunk53B6NPGAjs.StripePromotionCodeService; exports.StripeSubscription = _chunk53B6NPGAjs.StripeSubscription; exports.StripeSubscriptionModule = _chunk53B6NPGAjs.StripeSubscriptionModule; exports.StripeSubscriptionService = _chunk53B6NPGAjs.StripeSubscriptionService; exports.StripeUsage = _chunk53B6NPGAjs.StripeUsage; exports.StripeUsageModule = _chunk53B6NPGAjs.StripeUsageModule; exports.StripeUsageService = _chunk53B6NPGAjs.StripeUsageService; exports.SubscriptionStatus = _chunk53B6NPGAjs.SubscriptionStatus; exports.TableOptions = _chunk53B6NPGAjs.TableOptions; exports.TokenUsageAdminBreakdownModule = _chunk53B6NPGAjs.TokenUsageAdminBreakdownModule; exports.TokenUsageAdminSummaryModule = _chunk53B6NPGAjs.TokenUsageAdminSummaryModule; exports.TokenUsageAdminTimelineModule = _chunk53B6NPGAjs.TokenUsageAdminTimelineModule; exports.TotpAuthenticator = _chunk53B6NPGAjs.TotpAuthenticator; exports.TotpAuthenticatorModule = _chunk53B6NPGAjs.TotpAuthenticatorModule; exports.TotpSetup = _chunk53B6NPGAjs.TotpSetup; exports.TotpSetupModule = _chunk53B6NPGAjs.TotpSetupModule; exports.TotpVerify = _chunk53B6NPGAjs.TotpVerify; exports.TotpVerifyLogin = _chunk53B6NPGAjs.TotpVerifyLogin; exports.TotpVerifyLoginModule = _chunk53B6NPGAjs.TotpVerifyLoginModule; exports.TotpVerifyModule = _chunk53B6NPGAjs.TotpVerifyModule; exports.TwoFactorChallenge = _chunk53B6NPGAjs.TwoFactorChallenge; exports.TwoFactorChallengeModule = _chunk53B6NPGAjs.TwoFactorChallengeModule; exports.TwoFactorEnable = _chunk53B6NPGAjs.TwoFactorEnable; exports.TwoFactorEnableModule = _chunk53B6NPGAjs.TwoFactorEnableModule; exports.TwoFactorService = _chunk53B6NPGAjs.TwoFactorService; exports.TwoFactorStatus = _chunk53B6NPGAjs.TwoFactorStatus; exports.TwoFactorStatusModule = _chunk53B6NPGAjs.TwoFactorStatusModule; exports.User = _chunk53B6NPGAjs.User; exports.UserFields = _chunk53B6NPGAjs.UserFields; exports.UserModule = _chunk53B6NPGAjs.UserModule; exports.UserService = _chunk53B6NPGAjs.UserService; exports.VIEWPORT_COOKIE_NAME = _chunk53B6NPGAjs.VIEWPORT_COOKIE_NAME; exports.Waitlist = _chunk53B6NPGAjs.Waitlist; exports.WaitlistModule = _chunk53B6NPGAjs.WaitlistModule; exports.WaitlistService = _chunk53B6NPGAjs.WaitlistService; exports.WaitlistStats = _chunk53B6NPGAjs.WaitlistStats; exports.WaitlistStatsModule = _chunk53B6NPGAjs.WaitlistStatsModule; exports.checkPermissions = _chunk53B6NPGAjs.checkPermissions; exports.checkPermissionsFromServer = _chunk53B6NPGAjs.checkPermissionsFromServer; exports.clearLastApiMeta = _chunk53B6NPGAjs.clearLastApiMeta; exports.clearLastApiTotal = _chunk53B6NPGAjs.clearLastApiTotal; exports.cn = _chunk53B6NPGAjs.cn; exports.composeRefs = _chunk53B6NPGAjs.composeRefs; exports.configureAuth = _chunk53B6NPGAjs.configureAuth; exports.configureI18n = _chunkJKGEJGSDjs.configureI18n; exports.configureJsonApi = _chunkJKGEJGSDjs.configureJsonApi; exports.configureLogin = _chunkJKGEJGSDjs.configureLogin; exports.configureReferral = _chunkJKGEJGSDjs.configureReferral; exports.configureRoles = _chunkJKGEJGSDjs.configureRoles; exports.configureTokenUsage = _chunk53B6NPGAjs.configureTokenUsage; exports.configureWaitlist = _chunkJKGEJGSDjs.configureWaitlist; exports.createJsonApiInclusion = _chunk53B6NPGAjs.createJsonApiInclusion; exports.dismissToast = _chunk53B6NPGAjs.dismissToast; exports.entityObjectSchema = _chunk53B6NPGAjs.entityObjectSchema; exports.exists = _chunk53B6NPGAjs.exists; exports.formatCodiceFiscale = _chunk53B6NPGAjs.formatCodiceFiscale; exports.formatDate = _chunk53B6NPGAjs.formatDate; exports.formatLocalDate = _chunk53B6NPGAjs.formatLocalDate; exports.formatPartitaIva = _chunk53B6NPGAjs.formatPartitaIva; exports.getApiUrl = _chunkJKGEJGSDjs.getApiUrl; exports.getAppUrl = _chunkJKGEJGSDjs.getAppUrl; exports.getBootstrapper = _chunkFPO4DLZNjs.getBootstrapper; exports.getClientGlobalErrorHandler = _chunk53B6NPGAjs.getClientGlobalErrorHandler; exports.getGlobalErrorHandler = _chunk53B6NPGAjs.getGlobalErrorHandler; exports.getIcon = _chunk53B6NPGAjs.getIcon; exports.getIconByModule = _chunk53B6NPGAjs.getIconByModule; exports.getIconByModuleName = _chunk53B6NPGAjs.getIconByModuleName; exports.getInitials = _chunk53B6NPGAjs.getInitials; exports.getLastApiMeta = _chunk53B6NPGAjs.getLastApiMeta; exports.getLastApiTotal = _chunk53B6NPGAjs.getLastApiTotal; exports.getLucideIcon = _chunk53B6NPGAjs.getLucideIcon; exports.getLucideIconByModule = _chunk53B6NPGAjs.getLucideIconByModule; exports.getLucideIconByModuleName = _chunk53B6NPGAjs.getLucideIconByModuleName; exports.getPublicApiUrl = _chunkJKGEJGSDjs.getPublicApiUrl; exports.getReferralConfig = _chunkJKGEJGSDjs.getReferralConfig; exports.getRoleId = _chunkJKGEJGSDjs.getRoleId; exports.getStripePublishableKey = _chunkJKGEJGSDjs.getStripePublishableKey; exports.getTableComponents = _chunk53B6NPGAjs.getTableComponents; exports.getTableOptions = _chunk53B6NPGAjs.getTableOptions; exports.getTokenHandler = _chunk53B6NPGAjs.getTokenHandler; exports.getTokenUsageCurrency = _chunk53B6NPGAjs.getTokenUsageCurrency; exports.getTrackablePages = _chunkJKGEJGSDjs.getTrackablePages; exports.getValueFromPath = _chunk53B6NPGAjs.getValueFromPath; exports.getWaitlistConfig = _chunkJKGEJGSDjs.getWaitlistConfig; exports.hasBootstrapper = _chunkFPO4DLZNjs.hasBootstrapper; exports.isReferralEnabled = _chunkJKGEJGSDjs.isReferralEnabled; exports.isRemoteImageSrc = _chunk53B6NPGAjs.isRemoteImageSrc; exports.isRolesConfigured = _chunkJKGEJGSDjs.isRolesConfigured; exports.rehydrate = _chunk53B6NPGAjs.rehydrate; exports.rehydrateList = _chunk53B6NPGAjs.rehydrateList; exports.resetBootstrapStore = _chunkFPO4DLZNjs.resetBootstrapStore; exports.setBootstrapper = _chunkFPO4DLZNjs.setBootstrapper; exports.setClientGlobalErrorHandler = _chunk53B6NPGAjs.setClientGlobalErrorHandler; exports.setGlobalErrorHandler = _chunk53B6NPGAjs.setGlobalErrorHandler; exports.showCustomToast = _chunk53B6NPGAjs.showCustomToast; exports.showError = _chunk53B6NPGAjs.showError; exports.showToast = _chunk53B6NPGAjs.showToast; exports.tokenUsageModules = _chunk53B6NPGAjs.tokenUsageModules; exports.translateData = _chunkFPO4DLZNjs.translateData; exports.translateResponse = _chunkFPO4DLZNjs.translateResponse; exports.tryBootstrap = _chunkFPO4DLZNjs.tryBootstrap; exports.useComposedRefs = _chunk53B6NPGAjs.useComposedRefs; exports.useIsMobile = _chunk53B6NPGAjs.useIsMobile; exports.userObjectSchema = _chunk53B6NPGAjs.userObjectSchema; exports.validateCodiceFiscale = _chunk53B6NPGAjs.validateCodiceFiscale; exports.validateItalianTaxCode = _chunk53B6NPGAjs.validateItalianTaxCode; exports.validatePartitaIva = _chunk53B6NPGAjs.validatePartitaIva;
|
|
467
471
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/index.js"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,sDAA4B;AAC5B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,sDAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,sDAA4B;AAC5B,+BAA4B;AAC5B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/index.js"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,sDAA4B;AAC5B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,sDAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,sDAA4B;AAC5B,+BAA4B;AAC5B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yvbAAC","file":"/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/index.js"}
|
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-PHEFWL6L.mjs";
|
|
22
22
|
import {
|
|
23
23
|
AVAILABLE_OAUTH_SCOPES,
|
|
24
24
|
AbstractApiData,
|
|
@@ -128,9 +128,11 @@ import {
|
|
|
128
128
|
StripeInvoiceService,
|
|
129
129
|
StripePaymentMethodModule,
|
|
130
130
|
StripePrice,
|
|
131
|
+
StripePriceFields,
|
|
131
132
|
StripePriceModule,
|
|
132
133
|
StripePriceService,
|
|
133
134
|
StripeProduct,
|
|
135
|
+
StripeProductFields,
|
|
134
136
|
StripeProductModule,
|
|
135
137
|
StripeProductService,
|
|
136
138
|
StripePromotionCode,
|
|
@@ -219,7 +221,7 @@ import {
|
|
|
219
221
|
validateCodiceFiscale,
|
|
220
222
|
validateItalianTaxCode,
|
|
221
223
|
validatePartitaIva
|
|
222
|
-
} from "./chunk-
|
|
224
|
+
} from "./chunk-TWXKAY34.mjs";
|
|
223
225
|
import "./chunk-AUXK7QSA.mjs";
|
|
224
226
|
import "./chunk-C7C7VY4F.mjs";
|
|
225
227
|
import {
|
|
@@ -349,9 +351,11 @@ export {
|
|
|
349
351
|
StripeInvoiceService,
|
|
350
352
|
StripePaymentMethodModule,
|
|
351
353
|
StripePrice,
|
|
354
|
+
StripePriceFields,
|
|
352
355
|
StripePriceModule,
|
|
353
356
|
StripePriceService,
|
|
354
357
|
StripeProduct,
|
|
358
|
+
StripeProductFields,
|
|
355
359
|
StripeProductModule,
|
|
356
360
|
StripeProductService,
|
|
357
361
|
StripePromotionCode,
|
package/dist/server/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var _chunkIOLU4ASDjs = require('../chunk-IOLU4ASD.js');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunk53B6NPGAjs = require('../chunk-53B6NPGA.js');
|
|
19
19
|
require('../chunk-LXKSUWAV.js');
|
|
20
20
|
require('../chunk-IBS6NI7D.js');
|
|
21
21
|
|
|
@@ -86,7 +86,7 @@ var ServerSession = class {
|
|
|
86
86
|
if (!rawModules) return false;
|
|
87
87
|
const modules = JSON.parse(_pako.ungzip.call(void 0, Buffer.from(rawModules, "base64"), { toText: true }));
|
|
88
88
|
const selectedModule = modules.find((module) => module.id === params.module.moduleId);
|
|
89
|
-
return
|
|
89
|
+
return _chunk53B6NPGAjs.checkPermissionsFromServer.call(void 0, {
|
|
90
90
|
module: params.module,
|
|
91
91
|
action: params.action,
|
|
92
92
|
data: params.data,
|
|
@@ -296,5 +296,5 @@ _chunk7QVYU63Ejs.__name.call(void 0, ServerJsonApiDelete, "ServerJsonApiDelete")
|
|
|
296
296
|
|
|
297
297
|
|
|
298
298
|
|
|
299
|
-
exports.ServerAuthService =
|
|
299
|
+
exports.ServerAuthService = _chunk53B6NPGAjs.AuthService; exports.ServerCompanyService = _chunk53B6NPGAjs.CompanyService; exports.ServerContentService = _chunk53B6NPGAjs.ContentService; exports.ServerFeatureService = _chunk53B6NPGAjs.FeatureService; exports.ServerJsonApiDelete = ServerJsonApiDelete; exports.ServerJsonApiGet = ServerJsonApiGet; exports.ServerJsonApiPatch = ServerJsonApiPatch; exports.ServerJsonApiPost = ServerJsonApiPost; exports.ServerJsonApiPut = ServerJsonApiPut; exports.ServerNotificationService = _chunk53B6NPGAjs.NotificationService; exports.ServerPushService = _chunk53B6NPGAjs.PushService; exports.ServerRoleService = _chunk53B6NPGAjs.RoleService; exports.ServerS3Service = _chunk53B6NPGAjs.S3Service; exports.ServerSession = ServerSession; exports.ServerUserService = _chunk53B6NPGAjs.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
300
|
//# sourceMappingURL=index.js.map
|
package/dist/server/index.mjs
CHANGED
package/package.json
CHANGED
package/src/client/index.ts
CHANGED
|
@@ -19,6 +19,8 @@ export * from "../hooks";
|
|
|
19
19
|
import { useCompanyTableStructure } from "../features/company/hooks";
|
|
20
20
|
import { useRoleTableStructure } from "../features/role/hooks";
|
|
21
21
|
import { useUserTableStructure } from "../features/user/hooks";
|
|
22
|
+
import { useStripePriceTableStructure } from "../features/billing/stripe-price/hooks/useStripePriceTableStructure";
|
|
23
|
+
import { useStripeProductTableStructure } from "../features/billing/stripe-product/hooks/useStripeProductTableStructure";
|
|
22
24
|
import { registerTableGenerator } from "../hooks";
|
|
23
25
|
|
|
24
26
|
export * from "../features/content/hooks";
|
|
@@ -30,4 +32,6 @@ export * from "../features/company/hooks/useSubscriptionStatus";
|
|
|
30
32
|
registerTableGenerator("roles", useRoleTableStructure);
|
|
31
33
|
registerTableGenerator("users", useUserTableStructure);
|
|
32
34
|
registerTableGenerator("companies", useCompanyTableStructure);
|
|
35
|
+
registerTableGenerator("stripe-products", useStripeProductTableStructure);
|
|
36
|
+
registerTableGenerator("stripe-prices", useStripePriceTableStructure);
|
|
33
37
|
// Note: Content registration moved to app-level to support app-specific cellTopic
|
|
@@ -60,7 +60,7 @@ const BILLING_SECTION: AdminSection = {
|
|
|
60
60
|
icon: CreditCardIcon,
|
|
61
61
|
labelKey: "billing.admin.products.title",
|
|
62
62
|
descriptionKey: "administration.billing.description",
|
|
63
|
-
href: "/administration/
|
|
63
|
+
href: "/administration/products",
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
/** Keys of the built-in platform sections, for `hiddenSections`. */
|
|
@@ -66,7 +66,7 @@ describe("AdminIndexGrid", () => {
|
|
|
66
66
|
configure("pk_test_123");
|
|
67
67
|
render(<AdminIndexGrid />);
|
|
68
68
|
|
|
69
|
-
expect(screen.getByTestId("admin-index-billing")).toHaveAttribute("href", "/administration/
|
|
69
|
+
expect(screen.getByTestId("admin-index-billing")).toHaveAttribute("href", "/administration/products");
|
|
70
70
|
});
|
|
71
71
|
|
|
72
72
|
it("appends additionalGroups after the platform group, in order", () => {
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useTranslations } from "next-intl";
|
|
4
|
+
import { createContext, ReactNode, useCallback, useContext, useMemo, useState } from "react";
|
|
5
|
+
import { SharedProvider } from "../../../contexts/SharedContext";
|
|
6
|
+
import { JsonApiHydratedDataInterface, Modules, rehydrate } from "../../../core";
|
|
7
|
+
import { usePageUrlGenerator } from "../../../hooks";
|
|
8
|
+
import { BreadcrumbItemData } from "../../../interfaces";
|
|
9
|
+
import { getRoleId } from "../../../roles";
|
|
10
|
+
import { useCurrentUserContext } from "../../user/contexts";
|
|
11
|
+
import { formatCurrency, formatInterval } from "../components/utils/currency";
|
|
12
|
+
import { PriceArchiver } from "../stripe-price/components/forms/PriceArchiver";
|
|
13
|
+
import PriceEditor from "../stripe-price/components/forms/PriceEditor";
|
|
14
|
+
import { StripePriceInput, StripePriceInterface } from "../stripe-price/data/stripe-price.interface";
|
|
15
|
+
import { StripePriceService } from "../stripe-price/data/stripe-price.service";
|
|
16
|
+
|
|
17
|
+
export interface PriceContextType {
|
|
18
|
+
price: StripePriceInterface | undefined;
|
|
19
|
+
setPrice: (value: StripePriceInterface | undefined) => void;
|
|
20
|
+
reloadPrice: () => Promise<void>;
|
|
21
|
+
createPrice: (input: StripePriceInput) => Promise<StripePriceInterface>;
|
|
22
|
+
updatePrice: (input: StripePriceInput) => Promise<StripePriceInterface>;
|
|
23
|
+
archivePrice: (id?: string) => Promise<void>;
|
|
24
|
+
restorePrice: (id?: string) => Promise<void>;
|
|
25
|
+
/** Bumped by every mutation. Mounted lists re-fetch on it. */
|
|
26
|
+
priceVersion: number;
|
|
27
|
+
refreshPrices: () => void;
|
|
28
|
+
/** Product a newly created price attaches to. Set in list mode (prices tab). */
|
|
29
|
+
productId: string | undefined;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const PriceContext = createContext<PriceContextType | undefined>(undefined);
|
|
33
|
+
|
|
34
|
+
export type PriceProviderProps = {
|
|
35
|
+
children: ReactNode;
|
|
36
|
+
dehydratedPrice?: JsonApiHydratedDataInterface;
|
|
37
|
+
/**
|
|
38
|
+
* Publish breadcrumbs + title into SharedProvider. Pass `false` when this
|
|
39
|
+
* provider is mounted INSIDE another entity's page (the prices tab mounts
|
|
40
|
+
* PriceProvider that way): SharedProvider replaces its value for the subtree
|
|
41
|
+
* rather than merging (SharedContext.tsx:35-37), so a nested provider that
|
|
42
|
+
* publishes chrome would blank the host page's title.
|
|
43
|
+
*/
|
|
44
|
+
publishChrome?: boolean;
|
|
45
|
+
/** Required in list mode (the prices tab) so new prices attach to the right product. */
|
|
46
|
+
productId?: string;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const defaultContextValue: PriceContextType = {
|
|
50
|
+
price: undefined,
|
|
51
|
+
setPrice: () => {},
|
|
52
|
+
reloadPrice: async () => {},
|
|
53
|
+
createPrice: async () => {
|
|
54
|
+
throw new Error("createPrice requires a PriceProvider");
|
|
55
|
+
},
|
|
56
|
+
updatePrice: async () => {
|
|
57
|
+
throw new Error("updatePrice requires a PriceProvider");
|
|
58
|
+
},
|
|
59
|
+
archivePrice: async () => {},
|
|
60
|
+
restorePrice: async () => {},
|
|
61
|
+
priceVersion: 0,
|
|
62
|
+
refreshPrices: () => {},
|
|
63
|
+
productId: undefined,
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/** Human label for a price: its nickname, else amount + interval. */
|
|
67
|
+
export function priceLabel(price: StripePriceInterface): string {
|
|
68
|
+
return price.nickname ?? `${formatCurrency(price.unitAmount, price.currency)} ${formatInterval(price)}`.trim();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export const PriceProvider = ({
|
|
72
|
+
children,
|
|
73
|
+
dehydratedPrice,
|
|
74
|
+
publishChrome = true,
|
|
75
|
+
productId: productIdProp,
|
|
76
|
+
}: PriceProviderProps) => {
|
|
77
|
+
const t = useTranslations();
|
|
78
|
+
const generateUrl = usePageUrlGenerator();
|
|
79
|
+
const { hasRole } = useCurrentUserContext();
|
|
80
|
+
|
|
81
|
+
const [price, setPrice] = useState<StripePriceInterface | undefined>(
|
|
82
|
+
dehydratedPrice ? rehydrate<StripePriceInterface>(Modules.StripePrice, dehydratedPrice) : undefined,
|
|
83
|
+
);
|
|
84
|
+
const [priceVersion, setPriceVersion] = useState<number>(0);
|
|
85
|
+
|
|
86
|
+
const refreshPrices = useCallback(() => setPriceVersion((value) => value + 1), []);
|
|
87
|
+
|
|
88
|
+
// NOT `price.productId`: that getter throws ("productId is not defined") when
|
|
89
|
+
// the attribute is absent, and it always is — the API's mapStripePrice sets
|
|
90
|
+
// `stripeProduct: undefined`, and the serialiser derives the productId
|
|
91
|
+
// attribute from exactly that field, so a price never carries one over the
|
|
92
|
+
// wire. Reading it here crashed the whole price page on mount. Fall back to
|
|
93
|
+
// the hydrated relationship, which is a safe optional getter.
|
|
94
|
+
const productId = productIdProp ?? price?.product?.id;
|
|
95
|
+
|
|
96
|
+
const reloadPrice = useCallback(async () => {
|
|
97
|
+
if (!price?.id) return;
|
|
98
|
+
setPrice(await StripePriceService.getPrice({ id: price.id }));
|
|
99
|
+
}, [price?.id]);
|
|
100
|
+
|
|
101
|
+
const createPrice = useCallback(
|
|
102
|
+
async (input: StripePriceInput) => {
|
|
103
|
+
const saved = await StripePriceService.createPrice(input);
|
|
104
|
+
refreshPrices();
|
|
105
|
+
return saved;
|
|
106
|
+
},
|
|
107
|
+
[refreshPrices],
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
const updatePrice = useCallback(
|
|
111
|
+
async (input: StripePriceInput) => {
|
|
112
|
+
const saved = await StripePriceService.updatePrice(input);
|
|
113
|
+
setPrice(saved);
|
|
114
|
+
refreshPrices();
|
|
115
|
+
return saved;
|
|
116
|
+
},
|
|
117
|
+
[refreshPrices],
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
// The archive/reactivate routes answer 204 NO_CONTENT with an empty body
|
|
121
|
+
// (stripe-price.controller.ts:129-155) even though the service signature
|
|
122
|
+
// claims it returns void — so the response is discarded and the entity is
|
|
123
|
+
// re-read instead.
|
|
124
|
+
const archivePrice = useCallback(
|
|
125
|
+
async (id?: string) => {
|
|
126
|
+
const target = id ?? price?.id;
|
|
127
|
+
if (!target) return;
|
|
128
|
+
await StripePriceService.archivePrice({ id: target });
|
|
129
|
+
await reloadPrice();
|
|
130
|
+
refreshPrices();
|
|
131
|
+
},
|
|
132
|
+
[price?.id, reloadPrice, refreshPrices],
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
const restorePrice = useCallback(
|
|
136
|
+
async (id?: string) => {
|
|
137
|
+
const target = id ?? price?.id;
|
|
138
|
+
if (!target) return;
|
|
139
|
+
await StripePriceService.reactivatePrice({ id: target });
|
|
140
|
+
await reloadPrice();
|
|
141
|
+
refreshPrices();
|
|
142
|
+
},
|
|
143
|
+
[price?.id, reloadPrice, refreshPrices],
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
const value = useMemo<PriceContextType>(
|
|
147
|
+
() => ({
|
|
148
|
+
price,
|
|
149
|
+
setPrice,
|
|
150
|
+
reloadPrice,
|
|
151
|
+
createPrice,
|
|
152
|
+
updatePrice,
|
|
153
|
+
archivePrice,
|
|
154
|
+
restorePrice,
|
|
155
|
+
priceVersion,
|
|
156
|
+
refreshPrices,
|
|
157
|
+
productId,
|
|
158
|
+
}),
|
|
159
|
+
[price, reloadPrice, createPrice, updatePrice, archivePrice, restorePrice, priceVersion, refreshPrices, productId],
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
if (!publishChrome) return <PriceContext.Provider value={value}>{children}</PriceContext.Provider>;
|
|
163
|
+
|
|
164
|
+
const breadcrumb = (): BreadcrumbItemData[] => {
|
|
165
|
+
const items: BreadcrumbItemData[] = [
|
|
166
|
+
{ name: t("billing.admin.products.title"), href: generateUrl({ page: Modules.StripeProduct }) },
|
|
167
|
+
];
|
|
168
|
+
if (price?.product)
|
|
169
|
+
items.push({
|
|
170
|
+
name: price.product.name,
|
|
171
|
+
href: generateUrl({ page: Modules.StripeProduct, id: price.product.id }),
|
|
172
|
+
});
|
|
173
|
+
if (price) items.push({ name: priceLabel(price) });
|
|
174
|
+
return items;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
const title = () => {
|
|
178
|
+
const response: any = { type: t("billing.admin.prices.title") };
|
|
179
|
+
if (!price) return response;
|
|
180
|
+
|
|
181
|
+
response.element = priceLabel(price);
|
|
182
|
+
|
|
183
|
+
// narr8 note: gate on hasRole ONLY. hasPermissionToModule always returns
|
|
184
|
+
// false in this app, so gating an editor on it hides the editor outright.
|
|
185
|
+
if (hasRole(getRoleId().Administrator)) {
|
|
186
|
+
response.functions = [
|
|
187
|
+
<PriceArchiver key="priceArchiver" price={price} />,
|
|
188
|
+
<PriceEditor key="priceEditor" price={price} propagateChanges={setPrice} />,
|
|
189
|
+
];
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
return response;
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
return (
|
|
196
|
+
<SharedProvider value={{ breadcrumbs: breadcrumb(), title: title() }}>
|
|
197
|
+
<PriceContext.Provider value={value}>{children}</PriceContext.Provider>
|
|
198
|
+
</SharedProvider>
|
|
199
|
+
);
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
export const usePriceContext = (): PriceContextType => useContext(PriceContext) ?? defaultContextValue;
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useTranslations } from "next-intl";
|
|
4
|
+
import { createContext, ReactNode, useCallback, useContext, useMemo, useState } from "react";
|
|
5
|
+
import { SharedProvider } from "../../../contexts/SharedContext";
|
|
6
|
+
import { JsonApiHydratedDataInterface, Modules, rehydrate } from "../../../core";
|
|
7
|
+
import { usePageUrlGenerator } from "../../../hooks";
|
|
8
|
+
import { BreadcrumbItemData } from "../../../interfaces";
|
|
9
|
+
import { getRoleId } from "../../../roles";
|
|
10
|
+
import { useCurrentUserContext } from "../../user/contexts";
|
|
11
|
+
import { ProductArchiver } from "../stripe-product/components/forms/ProductArchiver";
|
|
12
|
+
import ProductEditor from "../stripe-product/components/forms/ProductEditor";
|
|
13
|
+
import { StripeProductInput, StripeProductInterface } from "../stripe-product/data/stripe-product.interface";
|
|
14
|
+
import { StripeProductService } from "../stripe-product/data/stripe-product.service";
|
|
15
|
+
|
|
16
|
+
export interface ProductContextType {
|
|
17
|
+
product: StripeProductInterface | undefined;
|
|
18
|
+
setProduct: (value: StripeProductInterface | undefined) => void;
|
|
19
|
+
reloadProduct: () => Promise<void>;
|
|
20
|
+
createProduct: (input: StripeProductInput) => Promise<StripeProductInterface>;
|
|
21
|
+
updateProduct: (input: StripeProductInput) => Promise<StripeProductInterface>;
|
|
22
|
+
archiveProduct: (id?: string) => Promise<void>;
|
|
23
|
+
restoreProduct: (id?: string) => Promise<void>;
|
|
24
|
+
/** Bumped by every mutation. Mounted lists re-fetch on it. */
|
|
25
|
+
catalogueVersion: number;
|
|
26
|
+
refreshCatalogue: () => void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const ProductContext = createContext<ProductContextType | undefined>(undefined);
|
|
30
|
+
|
|
31
|
+
export type ProductProviderProps = {
|
|
32
|
+
children: ReactNode;
|
|
33
|
+
dehydratedProduct?: JsonApiHydratedDataInterface;
|
|
34
|
+
/**
|
|
35
|
+
* Publish breadcrumbs + title into SharedProvider. Pass `false` when this
|
|
36
|
+
* provider is mounted INSIDE another entity's page (the prices tab mounts
|
|
37
|
+
* PriceProvider that way): SharedProvider replaces its value for the subtree
|
|
38
|
+
* rather than merging (SharedContext.tsx:35-37), so a nested provider that
|
|
39
|
+
* publishes chrome would blank the host page's title.
|
|
40
|
+
*/
|
|
41
|
+
publishChrome?: boolean;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const defaultContextValue: ProductContextType = {
|
|
45
|
+
product: undefined,
|
|
46
|
+
setProduct: () => {},
|
|
47
|
+
reloadProduct: async () => {},
|
|
48
|
+
createProduct: async () => {
|
|
49
|
+
throw new Error("createProduct requires a ProductProvider");
|
|
50
|
+
},
|
|
51
|
+
updateProduct: async () => {
|
|
52
|
+
throw new Error("updateProduct requires a ProductProvider");
|
|
53
|
+
},
|
|
54
|
+
archiveProduct: async () => {},
|
|
55
|
+
restoreProduct: async () => {},
|
|
56
|
+
catalogueVersion: 0,
|
|
57
|
+
refreshCatalogue: () => {},
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const ProductProvider = ({ children, dehydratedProduct, publishChrome = true }: ProductProviderProps) => {
|
|
61
|
+
const t = useTranslations();
|
|
62
|
+
const generateUrl = usePageUrlGenerator();
|
|
63
|
+
const { hasRole } = useCurrentUserContext();
|
|
64
|
+
|
|
65
|
+
const [product, setProduct] = useState<StripeProductInterface | undefined>(
|
|
66
|
+
dehydratedProduct ? rehydrate<StripeProductInterface>(Modules.StripeProduct, dehydratedProduct) : undefined,
|
|
67
|
+
);
|
|
68
|
+
const [catalogueVersion, setCatalogueVersion] = useState<number>(0);
|
|
69
|
+
|
|
70
|
+
const refreshCatalogue = useCallback(() => setCatalogueVersion((value) => value + 1), []);
|
|
71
|
+
|
|
72
|
+
const reloadProduct = useCallback(async () => {
|
|
73
|
+
if (!product?.id) return;
|
|
74
|
+
setProduct(await StripeProductService.getProduct({ id: product.id }));
|
|
75
|
+
}, [product?.id]);
|
|
76
|
+
|
|
77
|
+
const createProduct = useCallback(
|
|
78
|
+
async (input: StripeProductInput) => {
|
|
79
|
+
const saved = await StripeProductService.createProduct(input);
|
|
80
|
+
refreshCatalogue();
|
|
81
|
+
return saved;
|
|
82
|
+
},
|
|
83
|
+
[refreshCatalogue],
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
const updateProduct = useCallback(
|
|
87
|
+
async (input: StripeProductInput) => {
|
|
88
|
+
const saved = await StripeProductService.updateProduct(input);
|
|
89
|
+
setProduct(saved);
|
|
90
|
+
refreshCatalogue();
|
|
91
|
+
return saved;
|
|
92
|
+
},
|
|
93
|
+
[refreshCatalogue],
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
// The archive/reactivate routes answer 204 NO_CONTENT with an empty body
|
|
97
|
+
// (stripe-product.controller.ts:99-115) even though the service signature
|
|
98
|
+
// claims it returns a product — so the response is discarded and the entity
|
|
99
|
+
// is re-read instead.
|
|
100
|
+
const archiveProduct = useCallback(
|
|
101
|
+
async (id?: string) => {
|
|
102
|
+
const target = id ?? product?.id;
|
|
103
|
+
if (!target) return;
|
|
104
|
+
await StripeProductService.archiveProduct({ id: target });
|
|
105
|
+
await reloadProduct();
|
|
106
|
+
refreshCatalogue();
|
|
107
|
+
},
|
|
108
|
+
[product?.id, reloadProduct, refreshCatalogue],
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
const restoreProduct = useCallback(
|
|
112
|
+
async (id?: string) => {
|
|
113
|
+
const target = id ?? product?.id;
|
|
114
|
+
if (!target) return;
|
|
115
|
+
await StripeProductService.reactivateProduct({ id: target });
|
|
116
|
+
await reloadProduct();
|
|
117
|
+
refreshCatalogue();
|
|
118
|
+
},
|
|
119
|
+
[product?.id, reloadProduct, refreshCatalogue],
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
const value = useMemo<ProductContextType>(
|
|
123
|
+
() => ({
|
|
124
|
+
product,
|
|
125
|
+
setProduct,
|
|
126
|
+
reloadProduct,
|
|
127
|
+
createProduct,
|
|
128
|
+
updateProduct,
|
|
129
|
+
archiveProduct,
|
|
130
|
+
restoreProduct,
|
|
131
|
+
catalogueVersion,
|
|
132
|
+
refreshCatalogue,
|
|
133
|
+
}),
|
|
134
|
+
[
|
|
135
|
+
product,
|
|
136
|
+
reloadProduct,
|
|
137
|
+
createProduct,
|
|
138
|
+
updateProduct,
|
|
139
|
+
archiveProduct,
|
|
140
|
+
restoreProduct,
|
|
141
|
+
catalogueVersion,
|
|
142
|
+
refreshCatalogue,
|
|
143
|
+
],
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
if (!publishChrome) return <ProductContext.Provider value={value}>{children}</ProductContext.Provider>;
|
|
147
|
+
|
|
148
|
+
const breadcrumb = (): BreadcrumbItemData[] => {
|
|
149
|
+
const items: BreadcrumbItemData[] = [
|
|
150
|
+
{
|
|
151
|
+
name: t("billing.admin.products.title"),
|
|
152
|
+
// Linked only when it is NOT the current page.
|
|
153
|
+
...(product ? { href: generateUrl({ page: Modules.StripeProduct }) } : {}),
|
|
154
|
+
},
|
|
155
|
+
];
|
|
156
|
+
if (product) items.push({ name: product.name });
|
|
157
|
+
return items;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const title = () => {
|
|
161
|
+
const response: any = { type: t("billing.admin.products.title") };
|
|
162
|
+
if (!product) return response;
|
|
163
|
+
|
|
164
|
+
response.element = product.name;
|
|
165
|
+
|
|
166
|
+
// narr8 note: gate on hasRole ONLY. hasPermissionToModule always returns
|
|
167
|
+
// false in this app, so gating an editor on it hides the editor outright.
|
|
168
|
+
if (hasRole(getRoleId().Administrator)) {
|
|
169
|
+
response.functions = [
|
|
170
|
+
<ProductArchiver key="productArchiver" product={product} />,
|
|
171
|
+
<ProductEditor key="productEditor" product={product} propagateChanges={setProduct} />,
|
|
172
|
+
];
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
return response;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
return (
|
|
179
|
+
<SharedProvider value={{ breadcrumbs: breadcrumb(), title: title() }}>
|
|
180
|
+
<ProductContext.Provider value={value}>{children}</ProductContext.Provider>
|
|
181
|
+
</SharedProvider>
|
|
182
|
+
);
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
export const useProductContext = (): ProductContextType => useContext(ProductContext) ?? defaultContextValue;
|