iink-ts - v4.0.0
    Preparing search index...

    Class HTTPClientV2Configuration

    export class HTTPClientV2Configuration implements THTTPClientV2Configuration {
    recognition: THTTPClientV2RecognitionConfiguration
    server: TServerHTTPConfiguration

    constructor(configuration?: TPartialDeep<THTTPClientV2Configuration>) {
    this.server = mergeDeep({}, DefaultHTTPClientV2Configuration.server, configuration?.server)
    this.recognition = mergeDeep({}, DefaultHTTPClientV2Configuration.recognition, configuration?.recognition)

    if (configuration?.recognition?.text?.mimeTypes) {
    this.recognition.text.mimeTypes = configuration.recognition.text.mimeTypes.filter((t) => !!t)
    }
    this.recognition.text.mimeTypes = [...new Set(this.recognition.text.mimeTypes)]

    if (configuration?.recognition?.math?.mimeTypes) {
    this.recognition.math.mimeTypes = configuration.recognition.math.mimeTypes.filter((t) => !!t)
    }
    this.recognition.math.mimeTypes = [...new Set(this.recognition.math.mimeTypes)]

    if (configuration?.recognition?.shape?.mimeTypes) {
    this.recognition.shape.mimeTypes = configuration.recognition.shape.mimeTypes.filter((t) => !!t)
    }
    this.recognition.shape.mimeTypes = [...new Set(this.recognition.shape.mimeTypes)]

    if (configuration?.recognition?.["raw-content"]?.recognition?.types) {
    this.recognition["raw-content"].recognition!.types = configuration?.recognition?.[
    "raw-content"
    ]?.recognition?.types.filter((t) => !!t)
    }
    if (configuration?.recognition?.["raw-content"]?.classification?.types) {
    this.recognition["raw-content"].classification!.types = configuration?.recognition?.[
    "raw-content"
    ]?.classification?.types.filter((t) => !!t)
    }

    if (this.server.version) {
    if (!isVersionSuperiorOrEqual(this.server.version, "2.3.0")) {
    delete this.recognition.convert
    }
    if (!isVersionSuperiorOrEqual(this.server.version, "3.2.0")) {
    delete this.recognition.export.jiix.text.lines
    }
    }
    }
    }

    Implements

    Index
    • Parameters

      • Optionalconfiguration: {
            recognition?: {
                convert?: { force?: { "on-stylesheet-change"?: boolean } };
                export?: {
                    image?: {
                        guides?: boolean;
                        viewport?: {
                            height?: (...) | (...);
                            width?: (...) | (...);
                            x?: (...) | (...);
                            y?: (...) | (...);
                        };
                    };
                    "image-resolution"?: number;
                    jiix?: {
                        "bounding-box"?: boolean;
                        "full-stroke-ids"?: boolean;
                        ids?: boolean;
                        strokes?: boolean;
                        style?: boolean;
                        text?: {
                            chars?: (...)
                            | (...)
                            | (...);
                            lines?: (...) | (...) | (...);
                            words?: (...) | (...) | (...);
                        };
                    };
                    mathml?: { flavor?: { name?: (...)
                    | (...) } };
                };
                lang?: string;
                math?: {
                    customGrammar?: string;
                    customGrammarContent?: string;
                    customGrammarId?: string;
                    eraser?: { "erase-precisely"?: boolean };
                    margin?: { bottom?: number; left?: number; right?: number; top?: number };
                    mimeTypes?: (
                        | "application/vnd.myscript.jiix"
                        | "application/x-latex"
                        | "application/mathml+xml"
                        | undefined
                    )[];
                    "recognition-timeout"?: number;
                    "session-time"?: number;
                    solver?: {
                        "angle-unit"?: TAngleUnit;
                        "decimal-separator"?: string;
                        enable?: boolean;
                        "fractional-part-digits"?: number;
                        options?: TSolverOptions;
                        "rounding-mode"?: TRoundingMode;
                    };
                    "undo-redo"?: { mode?: TUndoRedoMode };
                };
                "raw-content"?: {
                    classification?: {
                        types?: ((...) | (...) | (...) | (...) | (...) | (...))[];
                    };
                    eraser?: { "erase-precisely"?: boolean };
                    recognition?: { types?: ((...) | (...) | (...) | (...) | (...))[] };
                    "session-time"?: number;
                    text?: {
                        addLKText?: boolean;
                        customLexicon?: ((...) | (...))[];
                        customResources?: ((...) | (...))[];
                    };
                };
                shape?: {
                    beautification?: { enable?: true };
                    convert?: { "match-text-size"?: boolean; types?: ((...) | (...))[] };
                    "enable-sub-blocks"?: boolean;
                    eraser?: { "erase-precisely"?: boolean };
                    mimeTypes?: (
                        | "application/vnd.myscript.jiix"
                        | "image/svg+xml"
                        | "application/vnd.openxmlformats-officedocument.presentationml.presentation"
                        | undefined
                    )[];
                    "session-time"?: number;
                };
                text?: {
                    configuration?: {
                        addLKText?: boolean;
                        customLexicon?: ((...) | (...))[];
                        customResources?: ((...) | (...))[];
                    };
                    eraser?: { "erase-precisely"?: boolean };
                    guides?: {
                        enable?: boolean;
                        "line-gap-mm"?: number;
                        "origin-y-mm"?: number;
                    };
                    margin?: { bottom?: number; left?: number; right?: number; top?: number };
                    mimeTypes?: ("application/vnd.myscript.jiix" | "text/plain" | undefined)[];
                    text?: boolean;
                };
                type?: TRecognitionTypeV2;
            };
            server?: {
                applicationKey?: string;
                hmacKey?: string
                | {};
                host?: string;
                scheme?: TScheme;
                version?: string;
            };
        }

      Returns HTTPClientV2Configuration