export { A as ApiData } from './ApiData-DPKNfY-9.js';
export { A as ApiDataInterface, J as JsonApiHydratedDataInterface } from './ApiDataInterface-DPP8s46n.js';
export { A as ApiRequestDataTypeInterface, F as FieldSelector, G as GetterKeys, c as createJsonApiInclusion } from './ApiRequestDataTypeInterface-CYEcRUrh.js';
export { A as ApiResponseInterface } from './ApiResponseInterface-CAIAeP5d.js';
export { AbstractApiData, AppModuleDefinitions, Auth, AuthModule, AuthorModule, BackupCodeVerify, BackupCodeVerifyInput, BackupCodeVerifyModule, Billing, BillingModule, BillingService, BlockDiffOptions, BlockNoteDiffUtil, BlockNoteWordDiffRendererUtil, ClientAbstractService, ClientHttpMethod, ClientNextRef, ClientPreviousRef, ClientSelfRef, ClientTotalRef, Company, CompanyFields, CompanyModule, Content, ContentModule, DataClass, DataClass as DataClassRegistry, DiffBlock, DiffResult, EndpointCreator, EndpointQuery, EntityObject, Feature, FeatureModule, FormatOption, FoundationModuleDefinitions, InviteValidation, JsonApiDataFactory, Module, ModuleDefinitions, ModuleModule, 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, Push, PushInput, PushInterface, PushModule, 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, Waitlist, WaitlistInput, WaitlistInterface, WaitlistModule, WaitlistService, WaitlistStats, WaitlistStatsInterface, WaitlistStatsModule, WaitlistStatus, WordDiff, checkPermissions, checkPermissionsFromServer, cn, composeRefs, dismissToast, entityObjectSchema, exists, formatDate, getBootstrapper, getClientGlobalErrorHandler, getTableComponents, getTableOptions, getValueFromPath, hasBootstrapper, rehydrate, rehydrateList, resetBootstrapStore, setBootstrapper, setClientGlobalErrorHandler, showCustomToast, showError, showToast, translateData, translateResponse, tryBootstrap, useComposedRefs, useIsMobile, userObjectSchema } from './core/index.js';
export { A as AbstractService, b as AuthService, C as CompanyService, e as ContentService, F as FeatureService, H as HttpMethod, N as NextRef, f as NotificationService, P as PreviousRef, h as PushService, R as RoleService, i as S3Input, j as S3Interface, k as S3Service, S as SelfRef, T as TotalRef, d as TwoFactorChallengeInterface, U as UserService, c as clearLastApiTotal, a as getGlobalErrorHandler, g as getLastApiTotal, s as setGlobalErrorHandler } from './s3.service-C_K1VHyx.js';
export { B as BreadcrumbItemData } from './breadcrumb.item.data.interface-CgB4_1EE.js';
export { C as ContentFields, D as D3Link, a as D3Node, R as RoleFields, U as UserFields } from './content.fields-Ck5lkQ5d.js';
export { ClassValue } from 'clsx';
export { A as AuthComponent, P as PasskeyInterface, T as TotpAuthenticatorInterface, a as getIcon, g as getIconByModule, b as getIconByModuleName, c as getLucideIcon, d as getLucideIconByModule, e as getLucideIconByModuleName } from './AuthComponent-DCfP4o32.js';
export { A as Action, C as CompanyInput, h as CompanyInterface, c as ModuleDefinition, g as ModuleFactory, b as ModulePermissionDefinition, M as ModuleWithPermissions, i as NotificationInput, N as NotificationInterface, a as PageUrl, P as PermissionCheck, d as PermissionConfig, e as PermissionModule, f as PermissionUser, R as RoleInput, j as RoleInterface, k as UserInput, U as UserInterface } from './notification.interface-DEW8hR8g.js';
export { A as AuthInput, b as AuthInterface, a as AuthQuery } from './auth.interface-C4kEZscm.js';
export { I as InvoiceStatus, M as MeterInterface, o as MeterSummaryInterface, P as PaymentMethodInterface, e as PriceRecurring, q as PromotionCodeValidationResult, c as ProrationLineItem, b as ProrationPreviewInterface, R as ReportUsageInput, S as StripeCustomerInterface, a as StripeInvoiceInterface, f as StripePriceInput, d as StripePriceInterface, h as StripeProductInput, g as StripeProductInterface, l as StripeSubscriptionCreateMeta, m as StripeSubscriptionCreateResponse, k as StripeSubscriptionInput, j as StripeSubscriptionInterface, n as StripeUsageInterface, i as SubscriptionStatus, p as UsageRecordInterface, U as UsageSummaryInterface } from './stripe-promotion-code.interface-BcJty0rv.js';
export { C as ContentInput, a as ContentInterface } from './content.interface-Czin-YRh.js';
export { F as FeatureInterface, M as ModuleInterface } from './feature.interface-CIWxo8NP.js';
export { A as AVAILABLE_OAUTH_SCOPES, D as DEFAULT_GRANT_TYPES, g as OAUTH_SCOPE_DISPLAY, b as OAuthClientCreateRequest, c as OAuthClientCreateResponse, a as OAuthClientInput, O as OAuthClientInterface, f as OAuthConsentInfo, d as OAuthConsentRequest, e as OAuthScopeInfo } from './oauth.interface-vL7za9Bz.js';
export { I as I18nConfig, e as configureI18n, c as configureJsonApi, g as getApiUrl, a as getAppUrl, d as getStripePublishableKey, b as getTrackablePages } from './config-CPN6QZfo.js';
export { Q as QuestionnaireField, a as QuestionnaireFieldType, b as QuestionnaireOption, W as WaitlistConfig, c as configureWaitlist, g as getWaitlistConfig } from './waitlist.config-kPfjImle.js';
import 'react';
import 'zod';
import '@blocknote/core';
import 'sonner';
import '@simplewebauthn/browser';
import 'd3';
import 'lucide-react';

type RegistrationMode = "open" | "closed" | "waitlist";
interface LoginConfig {
    discordClientId?: string;
    googleClientId?: string;
    useInternalAuth?: boolean;
    allowRegistration?: boolean;
    registrationMode?: RegistrationMode;
}
declare function configureLogin(params: LoginConfig): void;

/**
 * Role ID configuration interface
 * Apps provide their role IDs via configureRoles()
 */
interface RoleIdConfig {
    Administrator: string;
    CompanyAdministrator: string;
    [key: string]: string;
}
/**
 * Configure role IDs for the library
 * Call this at app startup to provide role ID constants
 *
 * @example
 * ```typescript
 * import { configureRoles } from "@carlonicora/nextjs-jsonapi";
 * import { RoleId } from "@phlow/shared";
 *
 * configureRoles(RoleId);
 * ```
 */
declare function configureRoles(roleId: RoleIdConfig): void;
/**
 * Get configured role IDs
 * @throws Error if roles not configured
 */
declare function getRoleId(): RoleIdConfig;
/**
 * Check if roles have been configured
 */
declare function isRolesConfigured(): boolean;

/**
 * Token parameters for authentication cookie management
 */
interface TokenParams {
    token?: string;
    refreshToken?: string;
    userId?: string;
    companyId?: string;
    roles?: string[];
    features?: string[];
    modules?: {
        id: string;
        permissions: {
            create: boolean | string;
            read: boolean | string;
            update: boolean | string;
            delete: boolean | string;
        };
    }[];
}
/**
 * Token handler interface for dependency injection
 * Apps must provide implementations of these functions via configureAuth()
 */
interface TokenHandler {
    updateToken: (params: TokenParams) => Promise<void>;
    removeToken: () => Promise<void>;
}
/**
 * Configure authentication token handling
 * Call this at app startup to provide Server Actions for cookie management
 *
 * @example
 * ```typescript
 * import { configureAuth } from "@carlonicora/nextjs-jsonapi";
 * import { updateToken, removeToken } from "@/features/auth/utils/AuthCookies";
 *
 * configureAuth({ updateToken, removeToken });
 * ```
 */
declare function configureAuth(handler: TokenHandler): void;
/**
 * Internal getter for AuthService to access the token handler
 * @internal
 */
declare function getTokenHandler(): TokenHandler | null;

/**
 * Configuration interface for frontend referral feature.
 */
interface ReferralConfig {
    /**
     * Whether the referral feature is enabled.
     * When false, components render nothing and hooks return null.
     * @default false
     */
    enabled?: boolean;
    /**
     * Name of the cookie used to store referral codes.
     * @default "referral_code"
     */
    cookieName?: string;
    /**
     * Number of days the referral cookie is valid.
     * @default 30
     */
    cookieDays?: number;
    /**
     * Query parameter name for referral code in URL.
     * @default "ref"
     */
    urlParamName?: string;
    /**
     * Base URL for referral links.
     * @default window.location.origin (client-side only)
     */
    referralUrlBase?: string;
    /**
     * Path to append to base URL for referral links.
     * @default "/"
     */
    referralPath?: string;
}
/**
 * Configure referral feature settings.
 * Call this at app startup to enable and configure referral functionality.
 *
 * @example
 * ```typescript
 * import { configureReferral } from "@carlonicora/nextjs-jsonapi";
 *
 * configureReferral({
 *   enabled: process.env.NEXT_PUBLIC_REFERRAL_ENABLED === 'true',
 *   cookieDays: 30,
 * });
 * ```
 */
declare function configureReferral(config: ReferralConfig): void;
/**
 * Get the current referral configuration.
 * @internal
 */
declare function getReferralConfig(): Required<ReferralConfig>;
/**
 * Check if referral feature is enabled.
 */
declare function isReferralEnabled(): boolean;

export { type LoginConfig, type ReferralConfig, type RoleIdConfig, type TokenHandler, type TokenParams, configureAuth, configureLogin, configureReferral, configureRoles, getReferralConfig, getRoleId, getTokenHandler, isReferralEnabled, isRolesConfigured };
