import { GrowiDeploymentType, GrowiServiceType } from '../consts/system'; import type * as os from 'node:os'; export declare const GrowiWikiType: { readonly open: "open"; readonly closed: "closed"; }; type GrowiWikiType = (typeof GrowiWikiType)[keyof typeof GrowiWikiType]; export interface GrowiInfoOptions { includeAttachmentInfo?: boolean; includeInstalledInfo?: boolean; includeUserCountInfo?: boolean; includePageCountInfo?: boolean; } interface IGrowiOSInfo { type?: ReturnType; platform?: ReturnType; arch?: ReturnType; totalmem?: ReturnType; } interface IAdditionalAttachmentInfo { attachmentType: string; activeExternalAccountTypes: string[]; } interface IAdditionalInstalledAtInfo { installedAt: Date; installedAtByOldestUser: Date | null; } interface IAdditionalUserCountInfo { currentUsersCount: number; currentActiveUsersCount: number; } interface IAdditionalPageCountInfo { currentPagesCount: number; } export interface IGrowiAdditionalInfo extends IAdditionalInstalledAtInfo, IAdditionalUserCountInfo, IAdditionalPageCountInfo, IAdditionalAttachmentInfo { } export type IGrowiAdditionalInfoByOptions = (T['includeAttachmentInfo'] extends true ? IAdditionalAttachmentInfo : Record) & (T['includeInstalledInfo'] extends true ? IAdditionalInstalledAtInfo : Record) & (T['includeUserCountInfo'] extends true ? IAdditionalUserCountInfo : Record) & (T['includePageCountInfo'] extends true ? IAdditionalPageCountInfo : Record); export type HasAnyOption = T['includeAttachmentInfo'] extends true ? true : T['includeInstalledInfo'] extends true ? true : T['includeUserCountInfo'] extends true ? true : T['includePageCountInfo'] extends true ? true : false; export type IGrowiAdditionalInfoResult = HasAnyOption extends true ? IGrowiAdditionalInfoByOptions : undefined; export interface IGrowiInfo { serviceInstanceId: string; appSiteUrl: string; osInfo: IGrowiOSInfo; version: string; type: GrowiServiceType; wikiType: GrowiWikiType; deploymentType: GrowiDeploymentType; additionalInfo?: A; } export {};