import type { WCP_FEATURE_LABEL } from "./index.js"; export interface WcpProject { orgId: string; projectId: string; package: { features: ProjectPackageFeatures; }; } export interface ILicense { getRawLicense: () => DecryptedWcpProjectLicense | null; getProject(): WcpProject | null; toDto(): DecryptedWcpProjectLicense | null; canUseFeature: (featureId: keyof typeof WCP_FEATURE_LABEL) => boolean; canUseAacl: () => boolean; canUseTeams: () => boolean; canUseAuditLogs: () => boolean; canUsePrivateFiles: () => boolean; canUseFileManagerThreatDetection: () => boolean; canUseFolderLevelPermissions: () => boolean; canUseRecordLocking: () => boolean; canUseWorkflows: () => boolean; canUseHcmsFieldPermissions: () => boolean; canUseAiImageEnrichment: () => boolean; canUseAiPageGeneration: () => boolean; canUseAiLexicalGeneration: () => boolean; } export declare type WcpProjectEnvironment = { id: string; apiKey: string; org: { id: string; }; project: { id: string; }; }; export declare type EncryptedWcpProjectLicense = string; export declare enum PROJECT_PACKAGE_FEATURE_NAME { SEATS = "seats", MT = "multiTenancy", APW = "advancedPublishingWorkflow", AACL = "advancedAccessControlLayer", /** * @deprecated Use `AUDIT_LOGS` instead. * TODO: remove oxlint disable when removing AL enum value. */ AL = "auditLogs", AUDIT_LOGS = "auditLogs", RECORD_LOCKING = "recordLocking", FILE_MANAGER = "fileManager", AI_POWERUPS = "aiPowerups" } export declare enum MT_OPTIONS_MAX_COUNT_TYPE { SEAT_BASED = "seatBased", FIXED = "fixed" } export interface ProjectPackageFeatures { [PROJECT_PACKAGE_FEATURE_NAME.SEATS]: { enabled: true; options: { maxCount: number; }; }; [PROJECT_PACKAGE_FEATURE_NAME.MT]: { enabled: true; options: { maxCount: { type: MT_OPTIONS_MAX_COUNT_TYPE; count?: number; }; }; }; [PROJECT_PACKAGE_FEATURE_NAME.APW]: { enabled: boolean; }; [PROJECT_PACKAGE_FEATURE_NAME.AUDIT_LOGS]: { enabled: boolean; }; [PROJECT_PACKAGE_FEATURE_NAME.RECORD_LOCKING]: { enabled: boolean; }; [PROJECT_PACKAGE_FEATURE_NAME.AACL]: { enabled: boolean; options: { teams: boolean; privateFiles: boolean; folderLevelPermissions: boolean; hcmsFieldPermissions: boolean; }; }; [PROJECT_PACKAGE_FEATURE_NAME.AL]: { enabled: boolean; }; [PROJECT_PACKAGE_FEATURE_NAME.FILE_MANAGER]: { enabled: boolean; options: { threatDetection: boolean; }; }; [PROJECT_PACKAGE_FEATURE_NAME.AI_POWERUPS]: { enabled: boolean; options: { websiteBuilder?: { pageGeneration?: boolean; }; fileManager?: { imageEnrichment?: boolean; }; lexicalGeneration?: boolean; }; }; } export interface DecryptedWcpProjectLicense { orgId: string; projectId: string; package: { features: ProjectPackageFeatures; }; }