import { BaseApiParams } from '../../../shared/apiTypes';
import { ViewerPluginProps } from '../../../shared/BasePluginTypes';
export interface BaseDocumentArgs extends BaseApiParams {
    locale: string;
}
export interface DocumentsDocumentArgs extends BaseDocumentArgs {
    id: string;
    onError(errorCode: number): void;
}
export declare type DocumentUrlArgs = Omit<DocumentsDocumentArgs, 'onError'>;
export interface DownloadPDFArgs {
    url: string;
    withCredentials?: boolean;
    onError(errorCode: number): void;
}
export interface RelatedDocumentsDocumentArgs extends BaseDocumentArgs {
    queryParams: ViewerPluginProps<ServiceUrls>['queryParams'];
    onError(errorCode: number): void;
}
export interface DocumentsFieldsArgs extends BaseDocumentArgs {
    fieldId?: string;
}
interface TextFieldValue {
    label: string;
    id?: string;
    code?: string;
}
interface SelectFieldValue {
    id: string;
    label: string;
    code: string;
}
export declare type FieldValue = TextFieldValue | SelectFieldValue;
export declare enum FieldName {
    Name = "name",
    Status = "status",
    UploadedAt = "uploaded_at",
    UpdatedAt = "updated_at",
    CreatedAt = "created_at",
    UploadedBy = "uploaded_by",
    CreatedBy = "created_by",
    Revision = "revision",
    FileSize = "file_size",
    FileFormat = "file_format",
    Classification = "classification",
    Phase = "phase",
    Project = "project",
    Type = "type",
    Originator = "originator",
    OriginalFilename = "original_filename",
    Description = "description",
    Location = "location",
    Trade = "trade",
    Number = "number",
    VolumeOrSystem = "volume_or_system"
}
export declare enum FieldType {
    STRING = "string",
    REFERENCE = "reference",
    LOV_ENTRY = "lov_entry",
    LOV_ENTRIES = "love_entries",
    RICH_TEXT = "rich_text",
    DATETIME = "datetime"
}
export interface DocumentsMetadataField {
    id: string;
    name: FieldName;
    label: string;
    type: FieldType;
    description: string;
    values: FieldValue[];
}
export declare type FieldsByName = Record<FieldName, DocumentsMetadataField>;
export declare enum DocumentAllowedActions {
    View = "view",
    EditMarkup = "edit_markup"
}
export interface DocumentResponseBase {
    id: string;
    fields: DocumentsMetadataField[];
    file_locked: boolean;
    permissions: {
        allowed_actions: DocumentAllowedActions[];
    };
}
export interface DocumentsUploadsResponse extends DocumentResponseBase {
    upload_status: number;
}
export declare type DocumentsRevisionsResponse = DocumentResponseBase;
export declare type CDMResponse<T> = {
    data: T;
};
export declare type DocumentServiceUrls = {
    document_service: string;
    microsoft_office_service: string;
};
export declare type DocumentRevisionsServiceUrls = DocumentServiceUrls & {
    viewer_service: string;
};
export declare type ServiceUrls = DocumentServiceUrls | DocumentRevisionsServiceUrls;
export interface UseQueryOptions {
    enabled?: boolean;
}
export {};
