import { deserializeNotesConvertResponseV2026R0 } from '../schemas/v2026R0/notesConvertResponseV2026R0.js';
import { serializeNotesConvertRequestBodyV2026R0 } from '../schemas/v2026R0/notesConvertRequestBodyV2026R0.js';
import { NotesConvertRequestBodyV2026R0 } from '../schemas/v2026R0/notesConvertRequestBodyV2026R0.js';
import { NetworkSession } from '../networking/network.js';
import { FetchOptions } from '../networking/fetchOptions.js';
import { prepareParams } from '../internal/utils.js';
import { toString } from '../internal/utils.js';
export class CreateNoteConvertV2026R0Optionals {
    headers = new CreateNoteConvertV2026R0Headers({});
    cancellationToken = void 0;
    constructor(fields) {
        if (fields.headers !== undefined) {
            this.headers = fields.headers;
        }
        if (fields.cancellationToken !== undefined) {
            this.cancellationToken = fields.cancellationToken;
        }
    }
}
export class CreateNoteConvertV2026R0Headers {
    /**
     * Version header. */
    boxVersion = '2026.0';
    /**
     * Extra headers that will be included in the HTTP request. */
    extraHeaders = {};
    constructor(fields) {
        if (fields.boxVersion !== undefined) {
            this.boxVersion = fields.boxVersion;
        }
        if (fields.extraHeaders !== undefined) {
            this.extraHeaders = fields.extraHeaders;
        }
    }
}
export class NotesManager {
    auth;
    networkSession = new NetworkSession({});
    constructor(fields) {
        if (fields.auth !== undefined) {
            this.auth = fields.auth;
        }
        if (fields.networkSession !== undefined) {
            this.networkSession = fields.networkSession;
        }
    }
    /**
     * Creates a Box Note (`.boxnote` file) from supported source content. See the `content_format` field for supported formats.
     * @param {NotesConvertRequestBodyV2026R0Input} requestBodyInput Request body of createNoteConvertV2026R0 method
     * @param {CreateNoteConvertV2026R0OptionalsInput} optionalsInput
     * @returns {Promise<NotesConvertResponseV2026R0>}
     */
    async createNoteConvertV2026R0(requestBodyInput, optionalsInput = {}) {
        const requestBody = new NotesConvertRequestBodyV2026R0({
            content: requestBodyInput.content,
            contentFormat: requestBodyInput.contentFormat,
            parent: requestBodyInput.parent,
            name: requestBodyInput.name,
        });
        const optionals = new CreateNoteConvertV2026R0Optionals({
            headers: optionalsInput.headers,
            cancellationToken: optionalsInput.cancellationToken,
        });
        const headers = optionals.headers;
        const cancellationToken = optionals.cancellationToken;
        const headersMap = prepareParams({
            ...{ ['box-version']: toString(headers.boxVersion) },
            ...headers.extraHeaders,
        });
        const response = await this.networkSession.networkClient.fetch(new FetchOptions({
            url: ''.concat(this.networkSession.baseUrls.baseUrl, '/2.0/notes/convert'),
            method: 'POST',
            headers: headersMap,
            data: serializeNotesConvertRequestBodyV2026R0(requestBody),
            contentType: 'application/json',
            responseFormat: 'json',
            auth: this.auth,
            networkSession: this.networkSession,
            cancellationToken: cancellationToken,
        }));
        return {
            ...deserializeNotesConvertResponseV2026R0(response.data),
            rawData: response.data,
        };
    }
}
//# sourceMappingURL=notes.js.map