import { A as ApiData } from '../ApiData-DPKNfY-9.js';
import { A as ApiDataInterface, J as JsonApiHydratedDataInterface, a as ApiRequestDataTypeInterface, F as FieldSelector } from '../ApiRequestDataTypeInterface-DIEOFn9s.js';
export { G as GetterKeys, c as createJsonApiInclusion } from '../ApiRequestDataTypeInterface-DIEOFn9s.js';
import { A as ApiResponseInterface } from '../ApiResponseInterface-BKyod24U.js';
import { c as AuthInterface, a as AuthInput, A as AbstractService, N as NextRef, P as PreviousRef, j as S3Interface, i as S3Input } from '../s3.service-BYs88XEE.js';
export { b as AuthQuery, d as AuthService, C as CompanyService, e as ContentService, F as FeatureService, H as HttpMethod, f as NotificationService, h as PushService, R as RoleService, k as S3Service, S as SelfRef, U as UserService, g as getGlobalErrorHandler, s as setGlobalErrorHandler } from '../s3.service-BYs88XEE.js';
import { M as ModuleWithPermissions, f as PermissionUser, A as Action, e as PermissionModule, g as ModuleFactory, i as ModuleInterface, F as FeatureInterface, k as RoleInterface, R as RoleInput, h as CompanyInterface, C as CompanyInput, U as UserInterface, l as UserInput, N as NotificationInterface, j as NotificationInput } from '../notification.interface-CqwaOIgM.js';
export { c as ModuleDefinition, b as ModulePermissionDefinition, a as PageUrl, P as PermissionCheck, d as PermissionConfig } from '../notification.interface-CqwaOIgM.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';
import { ClassValue } from 'clsx';
export { ClassValue } from 'clsx';
import * as React from 'react';
import { ReactElement, ReactNode } from 'react';
import { z } from 'zod';
import { PartialBlock } from '@blocknote/core';
import { LucideIcon } from 'lucide-react';
import { M as MeterInterface, o as MeterSummaryInterface, P as PaymentMethodInterface, S as StripeCustomerInterface, a as StripeInvoiceInterface, j as StripeSubscriptionInterface, I as InvoiceStatus, g as StripeProductInterface, d as StripePriceInterface, h as StripeProductInput, e as PriceRecurring, f as StripePriceInput, i as SubscriptionStatus, k as StripeSubscriptionInput, m as StripeSubscriptionCreateResponse, b as ProrationPreviewInterface, n as StripeUsageInterface, R as ReportUsageInput, U as UsageSummaryInterface } from '../stripe-subscription.interface-B-TM40Io.js';
export { A as AuthComponent, c as ProrationLineItem, l as StripeSubscriptionCreateMeta, p as UsageRecordInterface } from '../stripe-subscription.interface-B-TM40Io.js';
import { a as ContentInterface, C as ContentInput } from '../content.interface-4VICFRA0.js';
import 'd3';

declare abstract class AbstractApiData implements ApiDataInterface {
    protected _jsonApi?: any;
    protected _included?: any[];
    protected _id?: string;
    protected _type?: string;
    protected _createdAt?: Date;
    protected _updatedAt?: Date;
    protected _self?: string;
    get type(): string;
    get id(): string;
    get self(): string | undefined;
    get createdAt(): Date;
    get updatedAt(): Date;
    get included(): any[];
    get jsonApi(): any;
    ingestJsonApi(_data: JsonApiHydratedDataInterface): void;
    generateApiUrl(_params?: any): string;
    createJsonApi(_data?: any): any;
    protected _readIncluded<T extends ApiDataInterface>(data: JsonApiHydratedDataInterface, type: string, dataType: ApiRequestDataTypeInterface): T | T[] | undefined;
    /**
     * Read included relationship data and augment with relationship meta properties.
     * Handles both single relationships (one-to-one) and array relationships (one-to-many).
     *
     * For single relationships: meta is read from `relationships[type].meta`
     * For array relationships: per-item meta is read from `relationships[type].data[].meta`
     *
     * @param data - Hydrated JSON:API data
     * @param type - Relationship type key (e.g., "guide", "persons")
     * @param dataType - Module reference for rehydration
     * @returns Related object(s) augmented with meta properties, or undefined
     */
    protected _readIncludedWithMeta<T extends ApiDataInterface, M extends Record<string, any>>(data: JsonApiHydratedDataInterface, type: string, dataType: ApiRequestDataTypeInterface): (T & M) | (T & M)[] | undefined;
    dehydrate(): JsonApiHydratedDataInterface;
    rehydrate(data: JsonApiHydratedDataInterface): this;
}

declare enum ClientHttpMethod {
    GET = "GET",
    POST = "POST",
    PUT = "PUT",
    PATCH = "PATCH",
    DELETE = "DELETE"
}
interface ClientNextRef {
    next?: string;
}
interface ClientPreviousRef {
    previous?: string;
}
interface ClientSelfRef {
    self?: string;
}
/**
 * Set a global error handler for API errors (client-side only).
 * This handler will be called instead of throwing errors.
 */
declare function setClientGlobalErrorHandler(handler: (status: number, message: string) => void): void;
/**
 * Get the current global error handler.
 */
declare function getClientGlobalErrorHandler(): ((status: number, message: string) => void) | null;
/**
 * Client-side abstract base class for services that interact with the JSON:API.
 * Use this for client components.
 */
declare abstract class ClientAbstractService {
    /**
     * Extract locale from client-side URL pathname
     * URL structure: /{locale}/route-path (e.g., /it/accounts)
     * Fallback chain: URL locale → navigator.language → "en"
     */
    private static getClientLocale;
    /**
     * Fetch the next page of results.
     */
    static next<T>(params: {
        type: ApiRequestDataTypeInterface;
        endpoint: string;
        next?: ClientNextRef;
        previous?: ClientPreviousRef;
        self?: ClientSelfRef;
    }): Promise<T>;
    /**
     * Fetch the previous page of results.
     */
    static previous<T>(params: {
        type: ApiRequestDataTypeInterface;
        endpoint: string;
        next?: ClientNextRef;
        previous?: ClientPreviousRef;
        self?: ClientSelfRef;
    }): Promise<T>;
    /**
     * Make a client-side API call.
     */
    protected static callApi<T>(params: {
        type: ApiRequestDataTypeInterface;
        method: ClientHttpMethod;
        endpoint: string;
        companyId?: string;
        input?: any;
        overridesJsonApiCreation?: boolean;
        next?: ClientNextRef;
        previous?: ClientPreviousRef;
        self?: ClientSelfRef;
        responseType?: ApiRequestDataTypeInterface;
        files?: {
            [key: string]: File | Blob;
        } | File | Blob;
    }): Promise<T>;
    /**
     * Get raw JSON:API response data without deserialization.
     */
    protected static getRawData(params: {
        type: ApiRequestDataTypeInterface;
        method: ClientHttpMethod;
        endpoint: string;
        companyId?: string;
    }): Promise<any>;
}

declare class JsonApiDataFactory {
    static create(classKey: ApiRequestDataTypeInterface, data: any): any;
}

declare class RehydrationFactory {
    static rehydrate<T extends ApiDataInterface>(classKey: ApiRequestDataTypeInterface, data: JsonApiHydratedDataInterface): T;
    static rehydrateList<T extends ApiDataInterface>(classKey: ApiRequestDataTypeInterface, data: JsonApiHydratedDataInterface[]): T[];
}

declare class DataClassRegistry {
    private static _map;
    static registerObjectClass(key: ApiRequestDataTypeInterface, classConstructor: {
        new (): ApiDataInterface;
    }): void;
    static get(classKey: ApiRequestDataTypeInterface): {
        new (): ApiDataInterface;
    };
    /**
     * Bootstrap the registry with all modules.
     * This is a convenience method for apps to register all their modules at once.
     *
     * @param modules - An object with module definitions (like the app's Modules class)
     */
    static bootstrap(modules: Record<string, ApiRequestDataTypeInterface>): void;
    /**
     * Clear all registered classes. Useful for testing.
     */
    static clear(): void;
}

/**
 * Helper class to bootstrap the registry from a Modules-style class.
 * This supports the pattern where modules are defined as static getters.
 */
declare class ModuleRegistrar {
    private static _isBootstrapped;
    /**
     * Bootstrap the registry from a Modules class.
     * Automatically detects static getters and registers their models.
     *
     * @param modulesClass - The Modules class with static getters
     */
    static bootstrap<T extends object>(modulesClass: T): void;
    /**
     * Reset the bootstrapped state. Useful for testing.
     */
    static reset(): void;
}

interface FoundationModuleDefinitions {
    S3: ModuleWithPermissions;
    Auth: ModuleWithPermissions;
    User: ModuleWithPermissions;
    Author: ModuleWithPermissions;
    Company: ModuleWithPermissions;
    Role: ModuleWithPermissions;
    Notification: ModuleWithPermissions;
    Push: ModuleWithPermissions;
    Feature: ModuleWithPermissions;
    Module: ModuleWithPermissions;
    Content: ModuleWithPermissions;
    UserTopic: ModuleWithPermissions;
    UserExpertise: ModuleWithPermissions;
    Billing: ModuleWithPermissions;
    StripeCustomer: ModuleWithPermissions;
    StripePaymentMethod: ModuleWithPermissions;
    StripeSubscription: ModuleWithPermissions;
    StripeInvoice: ModuleWithPermissions;
    StripeProduct: ModuleWithPermissions;
    StripePrice: ModuleWithPermissions;
    StripeUsage: ModuleWithPermissions;
}
interface AppModuleDefinitions {
}
type ModuleDefinitions = FoundationModuleDefinitions & AppModuleDefinitions;
declare class ModuleRegistryClass {
    private get _modules();
    register<K extends string>(name: K, module: ApiRequestDataTypeInterface): void;
    get<K extends keyof ModuleDefinitions>(name: K): ModuleDefinitions[K];
    findByName(moduleName: string): ModuleWithPermissions;
    findByModelName(modelName: string): ModuleWithPermissions;
}
declare const ModuleRegistry: ModuleRegistryClass;
declare const Modules: ModuleDefinitions & {
    findByName: (name: string) => ModuleWithPermissions;
    findByModelName: (name: string) => ModuleWithPermissions;
};

/**
 * Centralized bootstrap store accessible from ModuleRegistry.
 * This file has NO external dependencies to avoid circular imports.
 *
 * The bootstrap store allows ModuleRegistry to call the app's bootstrapper
 * when modules are accessed before bootstrap() was called, providing
 * self-healing behavior for module evaluation order issues.
 *
 * IMPORTANT: We use globalThis to persist state across HMR/Turbopack
 * module re-evaluations in development mode. Without this, the bootstrapper
 * reference would be lost when modules are hot-reloaded, causing
 * "Module not registered" errors during navigation.
 */
type BootstrapperFn = () => void;
/**
 * Register the bootstrapper function.
 * Called by configureJsonApi() from client/config, client/JsonApiClient, or unified/JsonApiRequest.
 */
declare function setBootstrapper(fn: BootstrapperFn): void;
/**
 * Get the registered bootstrapper function.
 * Returns null if no bootstrapper has been registered.
 */
declare function getBootstrapper(): BootstrapperFn | null;
/**
 * Attempt to run the bootstrapper if one is registered.
 * Returns true if bootstrapper was executed, false if not available.
 * Safe to call multiple times - bootstrapper is expected to be idempotent.
 */
declare function tryBootstrap(): boolean;
/**
 * Check if a bootstrapper has been registered.
 */
declare function hasBootstrapper(): boolean;
/**
 * Reset the bootstrap store. Useful for testing.
 */
declare function resetBootstrapStore(): void;

type EndpointQuery = {
    endpoint: ApiRequestDataTypeInterface | string;
    id?: string;
    childEndpoint?: ApiRequestDataTypeInterface | string;
    childId?: string;
    additionalParams?: {
        key: string;
        value: string | string[];
    }[];
};
declare class EndpointCreator {
    private _endpoint;
    constructor(params: {
        endpoint: ApiRequestDataTypeInterface | string;
        id?: string;
        childEndpoint?: ApiRequestDataTypeInterface | string;
        childId?: string;
        additionalParams?: {
            key: string;
            value: string;
        }[];
    });
    endpoint(value: ApiRequestDataTypeInterface | string): EndpointCreator;
    id(value: string): EndpointCreator;
    childEndpoint(value: ApiRequestDataTypeInterface | string): EndpointCreator;
    childId(value: string): EndpointCreator;
    set additionalParams(value: {
        key: string;
        value: string;
    }[]);
    addAdditionalParam(key: string, value: string | string[]): EndpointCreator;
    limitToType(selectors: string[]): this;
    limitToFields(selectors: FieldSelector<any>[]): this;
    generate(): string;
}

/**
 * Translates raw JSON:API data into typed objects.
 * Does not require API response metadata.
 */
declare function translateData<T extends ApiDataInterface>(params: {
    classKey: ApiRequestDataTypeInterface;
    data: any;
}): T | T[];
/**
 * Translates a full API response into a typed ApiResponseInterface.
 * Includes pagination support.
 */
declare function translateResponse<T extends ApiDataInterface>(params: {
    classKey: ApiRequestDataTypeInterface;
    apiResponse: ApiData;
    companyId?: string;
    language: string;
    paginationHandler?: (endpoint: string) => Promise<ApiResponseInterface>;
}): Promise<ApiResponseInterface>;

/**
 * Rehydrate a single dehydrated object back into its typed class instance.
 */
declare function rehydrate<T extends ApiDataInterface>(classKey: ApiRequestDataTypeInterface, data: JsonApiHydratedDataInterface): T;
/**
 * Rehydrate a list of dehydrated objects back into typed class instances.
 */
declare function rehydrateList<T extends ApiDataInterface>(classKey: ApiRequestDataTypeInterface, data: JsonApiHydratedDataInterface[]): T[];

declare function cn(...inputs: ClassValue[]): string;

type PossibleRef<T> = React.Ref<T> | undefined;
/**
 * A utility to compose multiple refs together
 * Accepts callback refs and RefObject(s)
 */
declare function composeRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T>;
/**
 * A custom hook that composes multiple refs
 * Accepts callback refs and RefObject(s)
 */
declare function useComposedRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T>;

declare function useIsMobile(): boolean;

type FormatOption = "date" | "time" | "dateTime" | "timeSince" | "default";
declare const formatDate: (eventDate: Date, formatOption: FormatOption, locale?: string) => string;

declare const exists: <T>(itemOrArray: T | T[] | null | undefined) => boolean;

/**
 * Check if a user has permission to perform an action on a module.
 *
 * @param module - The module to check permissions for
 * @param action - The action to check (read, create, update, delete)
 * @param user - The user with their modules and permissions
 * @param data - Optional data object for path-based permission checks
 */
declare function checkPermissions<T extends PermissionUser>(params: {
    module: ModuleWithPermissions;
    action: Action;
    user: T;
    data?: any;
}): boolean;
/**
 * Check permissions from server context where user object is not fully available.
 *
 * @param module - The module to check permissions for
 * @param action - The action to check
 * @param userId - The user's ID
 * @param selectedModule - The selected module with its permissions
 * @param data - Optional data object for path-based permission checks
 */
declare function checkPermissionsFromServer(params: {
    module: ModuleWithPermissions;
    action: Action;
    userId: string;
    selectedModule?: PermissionModule;
    data?: any;
}): boolean;
/**
 * Traverse an object path and check if the value matches the user ID.
 * Handles nested objects, arrays, and various data structures.
 */
declare function getValueFromPath(obj: any, path: string, userId: string): any;

declare class TableOptions {
    private _components;
    private _hasPermissionToModule;
    constructor(hasPermissionToModule: <M extends ModuleWithPermissions>(params: {
        module: M;
        action: Action;
        data?: any;
    }) => boolean);
    addOption<M extends ModuleWithPermissions>(component: ReactElement<any> | null, module?: M, action?: Action): void;
    getComponents(): ReactElement<any>[];
    getOptions(): ReactElement<any> | null;
}
declare function getTableOptions(params: {
    hasPermissionToModule: <M extends ModuleWithPermissions>(params: {
        module: M;
        action: Action;
        data?: any;
    }) => boolean;
    options: {
        component: ReactElement<any> | null;
        module?: ModuleWithPermissions;
        action?: Action;
    }[];
}): ReactElement<any> | null;
declare function getTableComponents(params: {
    hasPermissionToModule: <M extends ModuleWithPermissions>(params: {
        module: M;
        action: Action;
        data?: any;
    }) => boolean;
    options: {
        component: ReactElement<any> | null;
        module?: ModuleWithPermissions;
        action?: Action;
    }[];
}): ReactElement<any>[];

declare const userObjectSchema: z.ZodObject<{
    id: z.ZodString;
    name: z.ZodString;
    avatar: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type UserObject = z.infer<typeof userObjectSchema>;

declare const entityObjectSchema: z.ZodObject<{
    id: z.ZodUUID;
    name: z.ZodString;
}, z.core.$strip>;
type EntityObject = z.infer<typeof entityObjectSchema>;

interface WordDiff {
    type: "added" | "removed" | "unchanged";
    text: string;
    diffId: string;
    accepted?: boolean;
    rejected?: boolean;
}
interface DiffBlock {
    id?: string;
    type?: string;
    props?: any;
    content?: any;
    children?: DiffBlock[];
    diffType?: "added" | "removed" | "modified" | "unchanged";
    originalContent?: any;
    diffId?: string;
    wordDiffs?: WordDiff[];
    accepted?: boolean;
    rejected?: boolean;
}
interface DiffResult {
    blocks: DiffBlock[];
    hasChanges: boolean;
}
interface BlockDiffOptions {
    ignoreIds?: boolean;
    compareContent?: boolean;
    similarityThreshold?: number;
}
/**
 * BlockNote Diff Utility
 * Implements a sophisticated diff algorithm for BlockNote document structures
 */
declare class BlockNoteDiffUtil {
    private static readonly DEFAULT_OPTIONS;
    /**
     * Compare two BlockNote documents and return diff result
     */
    static diff(originalBlocks?: PartialBlock[], newBlocks?: PartialBlock[], options?: BlockDiffOptions): DiffResult;
    /**
     * Compare two blocks for equality
     */
    private static areBlocksEqual;
    /**
     * Deep equality comparison for objects
     */
    private static deepEqual;
    /**
     * Sort diff blocks to maintain logical order
     */
    private static sortDiffBlocks;
    /**
     * Calculate similarity between two text contents
     */
    private static calculateSimilarity;
    /**
     * Extract plain text from BlockNote content array
     */
    private static extractTextFromContent;
    /**
     * Calculate Levenshtein distance between two strings
     */
    private static levenshteinDistance;
    /**
     * Generate word-level diffs between two content arrays
     */
    static generateWordDiffs(originalContent: any, newContent: any, blockId: string): WordDiff[];
    /**
     * Perform word-level diff using word-only approach (no space tokenization)
     */
    private static diffWords; /**
     * Improved diff algorithm that better handles word insertions
     * Uses a combination of LCS and heuristics to minimize false changes
     */
    private static myersDiff;
    /**
     * Compute edit script using dynamic programming
     */
    private static computeEditScript;
    /**
     * Reconstruct the actual diff from the DP table
     */
    private static reconstructDiff;
    /**
     * Consolidate adjacent changes to reduce fragmentation
     * e.g., if we have: delete "Key", insert "Key!", delete "Challenges"
     * We can consolidate this into: replace ["Key", "Challenges"] with ["Key!"]
     */
    private static consolidateAdjacentChanges;
    /**
     * Determine if a sequence of changes should be consolidated
     */
    private static shouldConsolidateChanges;
    /**
     * Check if two words are similar enough to be considered a replacement
     */
    private static areWordsSimilar;
}

declare class BlockNoteWordDiffRendererUtil {
    static renderWordDiffs(diffBlocks: DiffBlock[], onAcceptChange?: (diffId: string) => void, onRejectChange?: (diffId: string) => void, acceptedChanges?: Set<string>, rejectedChanges?: Set<string>): PartialBlock[];
    private static updateWordDiffStates;
    private static renderDiffBlock;
    private static renderBlockLevelDiff;
    private static renderWordLevelDiff;
    private static groupAndRenderWordDiffs;
    private static cleanupSpaces;
    private static isLastDiffInGroup;
    private static createTextContent;
    private static getBlockProps;
    static generateChangeSummary(diffBlocks: DiffBlock[]): {
        totalWords: number;
        addedWords: number;
        removedWords: number;
        acceptedChanges: number;
        rejectedChanges: number;
        pendingChanges: number;
    };
}

declare const getIconByModule: (params: {
    module: ModuleWithPermissions;
    className?: string;
}) => ReactNode;
declare const getIcon: (params: {
    element: ApiDataInterface;
    className?: string;
}) => ReactNode;
declare const getIconByModuleName: (params: {
    name: string;
    className?: string;
}) => ReactNode;
declare const getLucideIcon: (params: {
    element: ApiDataInterface;
}) => LucideIcon | null;
declare const getLucideIconByModule: (params: {
    module: ModuleWithPermissions;
}) => LucideIcon | null;
declare const getLucideIconByModuleName: (params: {
    name: string;
}) => LucideIcon | null;

declare const AuthModule: (factory: ModuleFactory) => ModuleWithPermissions;

declare const ModuleModule: (factory: ModuleFactory) => ModuleWithPermissions;

declare class Module extends AbstractApiData implements ModuleInterface {
    private _name?;
    private _permissions?;
    get name(): string;
    get permissions(): {
        create: boolean | string;
        read: boolean | string;
        update: boolean | string;
        delete: boolean | string;
    };
    rehydrate(data: JsonApiHydratedDataInterface): this;
}

declare const FeatureModule: (factory: ModuleFactory) => ModuleWithPermissions;

declare class Feature extends AbstractApiData implements FeatureInterface {
    private _name?;
    private _isCore?;
    private _modules;
    get name(): string;
    get isCore(): boolean;
    get modules(): ModuleInterface[];
    rehydrate(data: JsonApiHydratedDataInterface): this;
}

declare const AuthorModule: (factory: ModuleFactory) => ModuleWithPermissions;

declare class Role extends AbstractApiData implements RoleInterface {
    private _name?;
    private _description?;
    private _isSelectable?;
    private _requiredFeature?;
    get name(): string;
    get description(): string;
    get isSelectable(): boolean;
    get requiredFeature(): FeatureInterface | undefined;
    rehydrate(data: JsonApiHydratedDataInterface): this;
    createJsonApi(data: RoleInput): any;
}

declare const RoleModule: (factory: ModuleFactory) => ModuleWithPermissions;

declare const CompanyModule: (factory: ModuleFactory) => ModuleWithPermissions;

declare class Company extends AbstractApiData implements CompanyInterface {
    private _name?;
    private _logo?;
    private _logoUrl?;
    private _configurations?;
    private _licenseExpirationDate?;
    private _features?;
    private _modules?;
    get name(): string;
    get logo(): string | undefined;
    get logoUrl(): string | undefined;
    get licenseExpirationDate(): Date | undefined;
    get features(): FeatureInterface[];
    get modules(): ModuleInterface[];
    get configurations(): any | undefined;
    rehydrate(data: JsonApiHydratedDataInterface): this;
    createJsonApi(data: CompanyInput): any;
}

declare enum CompanyFields {
    companyId = "companyId",
    name = "name",
    createdAt = "createdAt",
    updatedAt = "updatedAt"
}

interface SearchResultInterface {
    get searchResult(): string;
}

declare class User extends AbstractApiData implements UserInterface, SearchResultInterface {
    private _name?;
    private _email?;
    private _title?;
    private _bio?;
    private _avatar?;
    private _avatarUrl?;
    private _phone?;
    private _rate?;
    private _isActivated?;
    private _isDeleted?;
    private _lastLogin?;
    private _relevance?;
    private _roles;
    private _company?;
    private _modules;
    get searchResult(): string;
    get name(): string;
    get email(): string;
    get title(): string;
    get bio(): string;
    get avatar(): string | undefined;
    get avatarUrl(): string | undefined;
    get phone(): string | undefined;
    get rate(): number | undefined;
    get relevance(): number | undefined;
    get isActivated(): boolean;
    get isDeleted(): boolean;
    get lastLogin(): Date | undefined;
    get roles(): RoleInterface[];
    get company(): CompanyInterface | undefined;
    get modules(): ModuleInterface[];
    rehydrate(data: JsonApiHydratedDataInterface): this;
    createJsonApi(data: UserInput): any;
}

declare const UserModule: (factory: ModuleFactory) => ModuleWithPermissions;

declare class Auth extends AbstractApiData implements AuthInterface {
    private _token?;
    private _refreshToken?;
    private _user?;
    get token(): string;
    get refreshToken(): string;
    get user(): UserInterface;
    rehydrate(data: JsonApiHydratedDataInterface): this;
    createJsonApi(data: AuthInput): any;
}

/**
 * Legacy billing service - only contains meter methods
 * @deprecated Use StripeUsageService for meter methods, StripeInvoiceService for invoices,
 * StripeCustomerService for payment methods
 */
declare class BillingService extends AbstractService {
    /**
     * List all available usage meters
     * @deprecated Use StripeUsageService.listMeters() instead
     */
    static listMeters(params?: {
        next?: NextRef;
        prev?: PreviousRef;
    }): Promise<MeterInterface[]>;
    /**
     * Get meter summaries for a specific time period
     * @deprecated Use StripeUsageService.getMeterSummaries() instead
     */
    static getMeterSummaries(params: {
        meterId: string;
        startTime: Date;
        endTime: Date;
    }): Promise<MeterSummaryInterface[]>;
}

/**
 * Billing is a namespace module used for permissions and non-entity endpoints.
 * It doesn't correspond to a specific backend entity but provides routing for
 * meter-related endpoints and permission checks.
 */
declare class Billing extends AbstractApiData {
    rehydrate(data: JsonApiHydratedDataInterface): this;
    createJsonApi(_data?: any): any;
}

declare const BillingModule: (factory: ModuleFactory) => ModuleWithPermissions;

/**
 * PaymentMethod class for JSON:API rehydration
 *
 * Transforms flat JSON:API attributes into the nested PaymentMethodInterface structure
 * expected by the frontend components.
 */
declare class PaymentMethod extends AbstractApiData implements PaymentMethodInterface {
    private _paymentType?;
    private _card?;
    private _billingDetails?;
    get type(): string;
    get card(): {
        brand: string;
        last4: string;
        expMonth: number;
        expYear: number;
    } | undefined;
    get billingDetails(): {
        name?: string;
        email?: string;
        phone?: string;
        address?: {
            city?: string;
            country?: string;
            line1?: string;
            line2?: string;
            postalCode?: string;
            state?: string;
        };
    } | undefined;
    rehydrate(data: JsonApiHydratedDataInterface): this;
    createJsonApi(_data?: any): any;
}

declare class StripeCustomer extends AbstractApiData implements StripeCustomerInterface {
    private _stripeCustomerId?;
    private _email?;
    private _name?;
    private _defaultPaymentMethodId?;
    private _currency?;
    private _balance?;
    private _delinquent;
    private _metadata?;
    get stripeCustomerId(): string;
    get email(): string | undefined;
    get name(): string | undefined;
    get defaultPaymentMethodId(): string | undefined;
    get currency(): string | undefined;
    get balance(): number | undefined;
    get delinquent(): boolean;
    get metadata(): Record<string, any> | undefined;
    rehydrate(data: JsonApiHydratedDataInterface): this;
    createJsonApi(_data?: any): any;
}

/**
 * Customer-facing billing service for managing subscriptions, payments, and usage
 */
declare class StripeCustomerService extends AbstractService {
    /**
     * Get the current user's billing customer record
     */
    static getCustomer(): Promise<StripeCustomerInterface>;
    /**
     * Create a billing customer for the current user
     */
    static createCustomer(): Promise<StripeCustomerInterface>;
    /**
     * Create a setup intent for adding payment methods
     */
    static createSetupIntent(): Promise<{
        clientSecret: string;
    }>;
    /**
     * Create a Stripe customer portal session URL
     */
    static createPortalSession(): Promise<{
        url: string;
    }>;
    /**
     * List all payment methods for the current user
     */
    static listPaymentMethods(params?: {
        next?: NextRef;
        prev?: PreviousRef;
    }): Promise<PaymentMethodInterface[]>;
    /**
     * Set the default payment method for the current user
     */
    static setDefaultPaymentMethod(params: {
        paymentMethodId: string;
    }): Promise<StripeCustomerInterface>;
    /**
     * Remove a payment method
     */
    static removePaymentMethod(params: {
        paymentMethodId: string;
    }): Promise<void>;
}

declare const StripeCustomerModule: (factory: ModuleFactory) => ModuleWithPermissions;

declare const StripePaymentMethodModule: (factory: ModuleFactory) => ModuleWithPermissions;

declare class StripeInvoice extends AbstractApiData implements StripeInvoiceInterface {
    private _stripeInvoiceId?;
    private _stripeInvoiceNumber?;
    private _customerId?;
    private _subscriptionId?;
    private _subscription?;
    private _status?;
    private _amountDue?;
    private _amountPaid?;
    private _amountRemaining?;
    private _subtotal?;
    private _total?;
    private _tax?;
    private _currency?;
    private _periodStart?;
    private _periodEnd?;
    private _dueDate?;
    private _paidAt?;
    private _attemptCount;
    private _attempted;
    private _stripeHostedInvoiceUrl?;
    private _stripePdfUrl?;
    private _paid;
    private _metadata?;
    get stripeInvoiceId(): string;
    get stripeInvoiceNumber(): string | undefined;
    get customerId(): string | undefined;
    get subscriptionId(): string | undefined;
    get subscription(): StripeSubscriptionInterface | undefined;
    get status(): InvoiceStatus;
    get amountDue(): number;
    get amountPaid(): number;
    get amountRemaining(): number;
    get subtotal(): number;
    get total(): number;
    get tax(): number | undefined;
    get currency(): string;
    get periodStart(): Date;
    get periodEnd(): Date;
    get dueDate(): Date | undefined;
    get paidAt(): Date | undefined;
    get attemptCount(): number;
    get attempted(): boolean;
    get stripeHostedInvoiceUrl(): string | undefined;
    get stripePdfUrl(): string | undefined;
    get paid(): boolean;
    get metadata(): Record<string, any> | undefined;
    rehydrate(data: JsonApiHydratedDataInterface): this;
    createJsonApi(_data?: any): any;
}

/**
 * Service for managing Stripe invoices
 */
declare class StripeInvoiceService extends AbstractService {
    /**
     * List all invoices for the current user
     */
    static listInvoices(params?: {
        status?: string;
        next?: NextRef;
        prev?: PreviousRef;
    }): Promise<StripeInvoiceInterface[]>;
    /**
     * Get a specific invoice by ID
     */
    static getInvoice(params: {
        invoiceId: string;
    }): Promise<StripeInvoiceInterface>;
    /**
     * Get the upcoming invoice for the current user
     */
    static getUpcomingInvoice(): Promise<StripeInvoiceInterface>;
}

declare const StripeInvoiceModule: (factory: ModuleFactory) => ModuleWithPermissions;

declare class StripeProduct extends AbstractApiData implements StripeProductInterface {
    private _stripeProductId?;
    private _name?;
    private _description?;
    private _active;
    private _metadata?;
    private _stripePrices;
    get stripeProductId(): string;
    get name(): string;
    get description(): string | undefined;
    get active(): boolean;
    get metadata(): Record<string, any> | undefined;
    get stripePrices(): StripePriceInterface[];
    rehydrate(data: JsonApiHydratedDataInterface): this;
    createJsonApi(data: StripeProductInput): any;
}

declare class StripeProductService extends AbstractService {
    /**
     * List all products (admin)
     */
    static listProducts(params?: {
        active?: boolean;
        next?: NextRef;
        prev?: PreviousRef;
    }): Promise<StripeProductInterface[]>;
    /**
     * Get a specific product by ID (admin)
     */
    static getProduct(params: {
        id: string;
    }): Promise<StripeProductInterface>;
    /**
     * Create a new product (admin)
     */
    static createProduct(params: StripeProductInput): Promise<StripeProductInterface>;
    /**
     * Update an existing product (admin)
     */
    static updateProduct(params: StripeProductInput): Promise<StripeProductInterface>;
    /**
     * Archive a product (admin)
     */
    static archiveProduct(params: {
        id: string;
    }): Promise<StripeProductInterface>;
    /**
     * Reactivate a product (admin) - sets active to true
     */
    static reactivateProduct(params: {
        id: string;
    }): Promise<StripeProductInterface>;
}

declare const StripeProductModule: (factory: ModuleFactory) => ModuleWithPermissions;

declare class StripePrice extends AbstractApiData implements StripePriceInterface {
    private _stripePriceId?;
    private _productId?;
    private _product?;
    private _active;
    private _currency?;
    private _unitAmount?;
    private _recurring?;
    private _priceType?;
    private _nickname?;
    private _lookupKey?;
    private _metadata?;
    private _description?;
    private _features?;
    get stripePriceId(): string;
    get productId(): string;
    get product(): StripeProductInterface | undefined;
    get active(): boolean;
    get currency(): string;
    get unitAmount(): number | undefined;
    get recurring(): PriceRecurring | undefined;
    get priceType(): "one_time" | "recurring";
    get nickname(): string | undefined;
    get lookupKey(): string | undefined;
    get metadata(): Record<string, any> | undefined;
    get description(): string | undefined;
    get features(): string[] | undefined;
    rehydrate(data: JsonApiHydratedDataInterface): this;
    createJsonApi(data: StripePriceInput): any;
}

/**
 * Admin billing service for managing products and prices
 */
declare class StripePriceService extends AbstractService {
    /**
     * List all prices (admin)
     */
    static listPrices(params?: {
        productId?: string;
        active?: boolean;
        next?: NextRef;
        prev?: PreviousRef;
    }): Promise<StripePriceInterface[]>;
    /**
     * Get a specific price by ID (admin)
     */
    static getPrice(params: {
        id: string;
    }): Promise<StripePriceInterface>;
    /**
     * Create a new price (admin)
     */
    static createPrice(params: StripePriceInput): Promise<StripePriceInterface>;
    /**
     * Update an existing price (admin)
     */
    static updatePrice(params: StripePriceInput): Promise<StripePriceInterface>;
    /**
     * Archive a price (admin)
     *
     * Sets the price as inactive. Archived prices cannot be used for new subscriptions.
     */
    static archivePrice(params: {
        id: string;
    }): Promise<void>;
    /**
     * Reactivate a price (admin)
     *
     * Sets the price as active. Active prices can be used for new subscriptions.
     */
    static reactivatePrice(params: {
        id: string;
    }): Promise<void>;
}

declare const StripePriceModule: (factory: ModuleFactory) => ModuleWithPermissions;

declare class StripeSubscription extends AbstractApiData implements StripeSubscriptionInterface {
    private _stripeSubscriptionId?;
    private _status?;
    private _currentPeriodStart?;
    private _currentPeriodEnd?;
    private _cancelAtPeriodEnd;
    private _canceledAt?;
    private _trialStart?;
    private _trialEnd?;
    private _price?;
    get stripeSubscriptionId(): string;
    get status(): SubscriptionStatus;
    get currentPeriodStart(): Date;
    get currentPeriodEnd(): Date;
    get cancelAtPeriodEnd(): boolean;
    get canceledAt(): Date | undefined;
    get trialStart(): Date | undefined;
    get trialEnd(): Date | undefined;
    get price(): StripePriceInterface | undefined;
    rehydrate(data: JsonApiHydratedDataInterface): this;
    createJsonApi(data: StripeSubscriptionInput): any;
}

/**
 * Customer-facing billing service for managing subscriptions, payments, and usage
 */
declare class StripeSubscriptionService extends AbstractService {
    /**
     * List all subscriptions for the current user
     */
    static listSubscriptions(params?: {
        next?: NextRef;
        prev?: PreviousRef;
    }): Promise<StripeSubscriptionInterface[]>;
    /**
     * Get a specific subscription by ID
     */
    static getSubscription(params: {
        subscriptionId: string;
    }): Promise<StripeSubscriptionInterface>;
    /**
     * Create a new subscription
     * Returns subscription data along with meta containing SCA payment confirmation details
     */
    static createSubscription(params: StripeSubscriptionInput): Promise<StripeSubscriptionCreateResponse>;
    /**
     * Change the plan of an existing subscription
     */
    static changePlan(params: StripeSubscriptionInput): Promise<StripeSubscriptionInterface>;
    /**
     * Get a proration preview for a plan change
     */
    static getProrationPreview(params: {
        subscriptionId: string;
        newPriceId: string;
        quantity?: number;
    }): Promise<ProrationPreviewInterface>;
    /**
     * Cancel a subscription
     */
    static cancelSubscription(params: StripeSubscriptionInput): Promise<StripeSubscriptionInterface>;
    /**
     * Pause a subscription
     */
    static pauseSubscription(params: {
        subscriptionId: string;
    }): Promise<StripeSubscriptionInterface>;
    /**
     * Resume a paused subscription
     */
    static resumeSubscription(params: {
        subscriptionId: string;
    }): Promise<StripeSubscriptionInterface>;
    /**
     * Sync a subscription with the latest data from Stripe
     * This is useful after payment confirmation to get the updated status
     */
    static syncSubscription(params: {
        subscriptionId: string;
    }): Promise<StripeSubscriptionInterface>;
}

declare const StripeSubscriptionModule: (factory: ModuleFactory) => ModuleWithPermissions;

declare class StripeUsage extends AbstractApiData implements StripeUsageInterface {
    private _subscriptionId?;
    private _meterId?;
    private _meterEventName?;
    private _stripeEventId?;
    private _quantity?;
    private _timestamp?;
    get subscriptionId(): string;
    get meterId(): string;
    get meterEventName(): string;
    get stripeEventId(): string;
    get quantity(): number;
    get timestamp(): Date | undefined;
    rehydrate(data: JsonApiHydratedDataInterface): this;
    createJsonApi(data: ReportUsageInput): any;
}

/**
 * Service for managing Stripe usage tracking
 */
declare class StripeUsageService extends AbstractService {
    /**
     * List all available usage meters
     */
    static listMeters(params?: {
        next?: NextRef;
        prev?: PreviousRef;
    }): Promise<MeterInterface[]>;
    /**
     * Get meter summaries for a specific time period
     */
    static getMeterSummaries(params: {
        meterId: string;
        startTime: Date;
        endTime: Date;
    }): Promise<MeterSummaryInterface[]>;
    /**
     * Report usage for a subscription item
     */
    static reportUsage(params: ReportUsageInput): Promise<StripeUsageInterface>;
    /**
     * List usage records for a subscription item
     */
    static listUsageRecords(params: {
        subscriptionItemId: string;
        next?: NextRef;
        prev?: PreviousRef;
    }): Promise<StripeUsageInterface[]>;
    /**
     * Get usage summary for a subscription item
     */
    static getUsageSummary(params: {
        subscriptionItemId: string;
        start?: Date;
        end?: Date;
    }): Promise<UsageSummaryInterface>;
}

declare const StripeUsageModule: (factory: ModuleFactory) => ModuleWithPermissions;

declare const ContentModule: (factory: ModuleFactory) => ModuleWithPermissions;

declare class Content extends AbstractApiData implements ContentInterface, SearchResultInterface {
    private _contentType?;
    private _name?;
    private _abstract?;
    private _tldr?;
    private _aiStatus?;
    private _relevance?;
    private _author?;
    private _editors?;
    get searchResult(): string;
    get contentType(): string | undefined;
    get name(): string;
    get abstract(): string | undefined;
    get tldr(): string | undefined;
    get aiStatus(): string;
    get relevance(): number | undefined;
    get author(): UserInterface;
    get editors(): UserInterface[];
    rehydrate(data: JsonApiHydratedDataInterface): this;
    protected addContentInput(response: any, data: ContentInput): void;
}

declare class Notification extends AbstractApiData implements NotificationInterface {
    private _notificationType?;
    private _isRead?;
    private _message?;
    private _actionUrl?;
    private _actor?;
    get notificationType(): string;
    get isRead(): boolean;
    get message(): string | undefined;
    get actionUrl(): string | undefined;
    get actor(): UserInterface | undefined;
    rehydrate(data: JsonApiHydratedDataInterface): this;
    createJsonApi(data: NotificationInput): any;
}

declare enum NotificationFields {
    notificationId = "notificationId",
    name = "name",
    createdAt = "createdAt",
    updatedAt = "updatedAt"
}

declare const NotificationModule: (factory: ModuleFactory) => ModuleWithPermissions;

type PushInput = {
    key: string;
    contentType?: string;
};
interface PushInterface extends ApiDataInterface {
}

declare class Push extends AbstractApiData implements PushInterface {
    createJsonApi(data: PushInput): any;
}

declare const PushModule: (factory: ModuleFactory) => ModuleWithPermissions;

declare const S3Module: (factory: ModuleFactory) => ModuleWithPermissions;

declare class S3 extends AbstractApiData implements S3Interface {
    private _url?;
    private _storageType?;
    private _contentType?;
    private _blobType?;
    private _acl?;
    get url(): string;
    get headers(): Record<string, string>;
    rehydrate(data: JsonApiHydratedDataInterface): this;
    createJsonApi(data: S3Input): any;
}

export { AbstractApiData, AbstractService, Action, ApiData, ApiDataInterface, ApiRequestDataTypeInterface, ApiResponseInterface, type AppModuleDefinitions, Auth, AuthInput, AuthInterface, AuthModule, AuthorModule, Billing, BillingModule, BillingService, type BlockDiffOptions, BlockNoteDiffUtil, BlockNoteWordDiffRendererUtil, ClientAbstractService, ClientHttpMethod, type ClientNextRef, type ClientPreviousRef, type ClientSelfRef, Company, CompanyFields, CompanyInput, CompanyInterface, CompanyModule, Content, ContentInput, ContentInterface, ContentModule, DataClassRegistry as DataClass, DataClassRegistry, type DiffBlock, type DiffResult, EndpointCreator, type EndpointQuery, type EntityObject, Feature, FeatureInterface, FeatureModule, FieldSelector, type FormatOption, type FoundationModuleDefinitions, InvoiceStatus, JsonApiDataFactory, JsonApiHydratedDataInterface, MeterInterface, MeterSummaryInterface, Module, type ModuleDefinitions, ModuleFactory, ModuleInterface, ModuleModule, ModuleRegistrar, ModuleRegistry, ModuleWithPermissions, Modules, NextRef, Notification, NotificationFields, NotificationInput, NotificationInterface, NotificationModule, PaymentMethod, PaymentMethodInterface, PermissionModule, PermissionUser, PreviousRef, PriceRecurring, ProrationPreviewInterface, Push, type PushInput, type PushInterface, PushModule, RehydrationFactory, ReportUsageInput, Role, RoleInput, RoleInterface, RoleModule, S3, S3Input, S3Interface, S3Module, type SearchResultInterface, StripeCustomer, StripeCustomerInterface, StripeCustomerModule, StripeCustomerService, StripeInvoice, StripeInvoiceInterface, StripeInvoiceModule, StripeInvoiceService, StripePaymentMethodModule, StripePrice, StripePriceInput, StripePriceInterface, StripePriceModule, StripePriceService, StripeProduct, StripeProductInput, StripeProductInterface, StripeProductModule, StripeProductService, StripeSubscription, StripeSubscriptionCreateResponse, StripeSubscriptionInput, StripeSubscriptionInterface, StripeSubscriptionModule, StripeSubscriptionService, StripeUsage, StripeUsageInterface, StripeUsageModule, StripeUsageService, SubscriptionStatus, TableOptions, UsageSummaryInterface, User, UserInput, UserInterface, UserModule, type UserObject, type WordDiff, checkPermissions, checkPermissionsFromServer, cn, composeRefs, entityObjectSchema, exists, formatDate, getBootstrapper, getClientGlobalErrorHandler, getIcon, getIconByModule, getIconByModuleName, getLucideIcon, getLucideIconByModule, getLucideIconByModuleName, getTableComponents, getTableOptions, getValueFromPath, hasBootstrapper, rehydrate, rehydrateList, resetBootstrapStore, setBootstrapper, setClientGlobalErrorHandler, translateData, translateResponse, tryBootstrap, useComposedRefs, useIsMobile, userObjectSchema };
