// This file was auto-generated by Fern from our API Definition.

import * as Intercom from "../../src/api/index";
import { IntercomClient } from "../../src/Client";
import { mockServerPool } from "../mock-server/MockServerPool";

describe("ArticlesClient", () => {
    test("list (1)", async () => {
        const server = mockServerPool.createServer();
        const client = new IntercomClient({
            maxRetries: 0,
            token: "test",
            version: "2.14",
            environment: server.baseUrl,
        });

        const rawResponseBody = {
            type: "list",
            pages: { key: "value" },
            total_count: 1,
            data: [
                {
                    type: "article",
                    id: "id",
                    workspace_id: "workspace_id",
                    title: "title",
                    description: "description",
                    body: "body",
                    author_id: 1,
                    state: "published",
                    created_at: 1,
                    updated_at: 1,
                    url: "url",
                    parent_id: 1,
                    parent_ids: [1, 1],
                    parent_type: "parent_type",
                    default_locale: "default_locale",
                    translated_content: {
                        type: "article_translated_content",
                        ar: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        bg: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        bs: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ca: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        cs: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        da: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        de: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        el: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        en: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        es: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        et: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        fi: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        fr: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        he: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        hr: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        hu: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        id: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        it: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ja: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ko: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        lt: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        lv: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        mn: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        nb: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        nl: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        pl: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        pt: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ro: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ru: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        sl: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        sr: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        sv: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        tr: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        vi: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        "pt-BR": {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        "zh-CN": {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        "zh-TW": {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                    },
                },
                {
                    type: "article",
                    id: "id",
                    workspace_id: "workspace_id",
                    title: "title",
                    description: "description",
                    body: "body",
                    author_id: 1,
                    state: "published",
                    created_at: 1,
                    updated_at: 1,
                    url: "url",
                    parent_id: 1,
                    parent_ids: [1, 1],
                    parent_type: "parent_type",
                    default_locale: "default_locale",
                    translated_content: {
                        type: "article_translated_content",
                        ar: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        bg: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        bs: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ca: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        cs: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        da: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        de: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        el: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        en: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        es: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        et: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        fi: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        fr: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        he: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        hr: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        hu: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        id: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        it: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ja: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ko: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        lt: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        lv: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        mn: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        nb: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        nl: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        pl: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        pt: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ro: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ru: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        sl: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        sr: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        sv: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        tr: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        vi: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        "pt-BR": {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        "zh-CN": {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        "zh-TW": {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                    },
                },
            ],
        };
        server
            .mockEndpoint({ once: false })
            .get("/articles")
            .respondWith()
            .statusCode(200)
            .jsonBody(rawResponseBody)
            .build();

        const expected = {
            type: "list",
            pages: {
                key: "value",
            },
            total_count: 1,
            data: [
                {
                    type: "article",
                    id: "id",
                    workspace_id: "workspace_id",
                    title: "title",
                    description: "description",
                    body: "body",
                    author_id: 1,
                    state: "published",
                    created_at: 1,
                    updated_at: 1,
                    url: "url",
                    parent_id: 1,
                    parent_ids: [1, 1],
                    parent_type: "parent_type",
                    default_locale: "default_locale",
                    translated_content: {
                        type: "article_translated_content",
                        ar: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        bg: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        bs: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ca: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        cs: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        da: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        de: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        el: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        en: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        es: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        et: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        fi: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        fr: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        he: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        hr: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        hu: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        id: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        it: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ja: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ko: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        lt: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        lv: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        mn: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        nb: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        nl: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        pl: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        pt: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ro: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ru: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        sl: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        sr: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        sv: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        tr: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        vi: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        "pt-BR": {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        "zh-CN": {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        "zh-TW": {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                    },
                },
                {
                    type: "article",
                    id: "id",
                    workspace_id: "workspace_id",
                    title: "title",
                    description: "description",
                    body: "body",
                    author_id: 1,
                    state: "published",
                    created_at: 1,
                    updated_at: 1,
                    url: "url",
                    parent_id: 1,
                    parent_ids: [1, 1],
                    parent_type: "parent_type",
                    default_locale: "default_locale",
                    translated_content: {
                        type: "article_translated_content",
                        ar: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        bg: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        bs: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ca: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        cs: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        da: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        de: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        el: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        en: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        es: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        et: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        fi: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        fr: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        he: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        hr: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        hu: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        id: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        it: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ja: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ko: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        lt: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        lv: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        mn: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        nb: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        nl: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        pl: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        pt: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ro: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        ru: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        sl: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        sr: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        sv: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        tr: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        vi: {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        "pt-BR": {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        "zh-CN": {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                        "zh-TW": {
                            type: "article_content",
                            title: "title",
                            description: "description",
                            body: "body",
                            author_id: 1,
                            state: "published",
                            created_at: 1,
                            updated_at: 1,
                            url: "url",
                        },
                    },
                },
            ],
        };
        const page = await client.articles.list();

        expect(expected.data).toEqual(page.data);
        expect(page.hasNextPage()).toBe(true);
        const nextPage = await page.getNextPage();
        expect(expected.data).toEqual(nextPage.data);
    });

    test("list (2)", async () => {
        const server = mockServerPool.createServer();
        const client = new IntercomClient({
            maxRetries: 0,
            token: "test",
            version: "2.14",
            environment: server.baseUrl,
        });

        const rawResponseBody = { type: "error.list", errors: [{ code: "code" }, { code: "code" }] };
        server
            .mockEndpoint({ once: false })
            .get("/articles")
            .respondWith()
            .statusCode(401)
            .jsonBody(rawResponseBody)
            .build();

        await expect(async () => {
            return await client.articles.list();
        }).rejects.toThrow(Intercom.UnauthorizedError);
    });

    test("create (1)", async () => {
        const server = mockServerPool.createServer();
        const client = new IntercomClient({
            maxRetries: 0,
            token: "test",
            version: "2.14",
            environment: server.baseUrl,
        });
        const rawRequestBody = {
            title: "Thanks for everything",
            description: "Description of the Article",
            body: "Body of the Article",
            author_id: 991267497,
            state: "published",
            parent_id: 145,
            parent_type: "collection",
            translated_content: {
                fr: {
                    title: "Merci pour tout",
                    description: "Description de l'article",
                    body: "Corps de l'article",
                    author_id: 991267497,
                    state: "published",
                },
            },
        };
        const rawResponseBody = {
            type: "article",
            id: "42",
            workspace_id: "this_is_an_id68_that_should_be_at_least_4",
            title: "Thanks for everything",
            description: "Description of the Article",
            body: '<p class="no-margin">Body of the Article</p>',
            author_id: 991267497,
            state: "published",
            created_at: 1734537288,
            updated_at: 1734537288,
            url: "http://help-center.test/myapp-68/en/articles/42-thanks-for-everything",
            parent_id: 145,
            parent_ids: [18, 19],
            parent_type: "collection",
            default_locale: "en",
            translated_content: {
                type: "article_translated_content",
                ar: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bg: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ca: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                cs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                da: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                de: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                el: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                en: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                es: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                et: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                he: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hu: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                id: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                it: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ja: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ko: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                mn: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nb: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ro: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ru: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                tr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                vi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "pt-BR": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-CN": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-TW": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
            },
            statistics: {
                type: "article_statistics",
                views: 0,
                conversions: 0,
                reactions: 0,
                happy_reaction_percentage: 0,
                neutral_reaction_percentage: 0,
                sad_reaction_percentage: 0,
            },
        };
        server
            .mockEndpoint()
            .post("/articles")
            .jsonBody(rawRequestBody)
            .respondWith()
            .statusCode(200)
            .jsonBody(rawResponseBody)
            .build();

        const response = await client.articles.create({
            title: "Thanks for everything",
            description: "Description of the Article",
            body: "Body of the Article",
            author_id: 991267497,
            state: "published",
            parent_id: 145,
            parent_type: "collection",
            translated_content: {
                fr: {
                    title: "Merci pour tout",
                    description: "Description de l'article",
                    body: "Corps de l'article",
                    author_id: 991267497,
                    state: "published",
                },
            },
        });
        expect(response).toEqual({
            type: "article",
            id: "42",
            workspace_id: "this_is_an_id68_that_should_be_at_least_4",
            title: "Thanks for everything",
            description: "Description of the Article",
            body: '<p class="no-margin">Body of the Article</p>',
            author_id: 991267497,
            state: "published",
            created_at: 1734537288,
            updated_at: 1734537288,
            url: "http://help-center.test/myapp-68/en/articles/42-thanks-for-everything",
            parent_id: 145,
            parent_ids: [18, 19],
            parent_type: "collection",
            default_locale: "en",
            translated_content: {
                type: "article_translated_content",
                ar: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bg: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ca: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                cs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                da: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                de: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                el: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                en: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                es: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                et: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                he: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hu: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                id: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                it: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ja: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ko: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                mn: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nb: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ro: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ru: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                tr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                vi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "pt-BR": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-CN": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-TW": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
            },
            statistics: {
                type: "article_statistics",
                views: 0,
                conversions: 0,
                reactions: 0,
                happy_reaction_percentage: 0,
                neutral_reaction_percentage: 0,
                sad_reaction_percentage: 0,
            },
        });
    });

    test("create (2)", async () => {
        const server = mockServerPool.createServer();
        const client = new IntercomClient({
            maxRetries: 0,
            token: "test",
            version: "2.14",
            environment: server.baseUrl,
        });
        const rawRequestBody = {
            title: "Thanks for everything",
            description: "Description of the Article",
            body: "Body of the Article",
            author_id: 1295,
            state: "published",
        };
        const rawResponseBody = {
            type: "article",
            id: "42",
            workspace_id: "this_is_an_id68_that_should_be_at_least_4",
            title: "Thanks for everything",
            description: "Description of the Article",
            body: '<p class="no-margin">Body of the Article</p>',
            author_id: 991267497,
            state: "published",
            created_at: 1734537288,
            updated_at: 1734537288,
            url: "http://help-center.test/myapp-68/en/articles/42-thanks-for-everything",
            parent_id: 145,
            parent_ids: [18, 19],
            parent_type: "collection",
            default_locale: "en",
            translated_content: {
                type: "article_translated_content",
                ar: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bg: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ca: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                cs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                da: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                de: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                el: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                en: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                es: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                et: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                he: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hu: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                id: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                it: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ja: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ko: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                mn: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nb: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ro: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ru: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                tr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                vi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "pt-BR": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-CN": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-TW": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
            },
            statistics: {
                type: "article_statistics",
                views: 0,
                conversions: 0,
                reactions: 0,
                happy_reaction_percentage: 0,
                neutral_reaction_percentage: 0,
                sad_reaction_percentage: 0,
            },
        };
        server
            .mockEndpoint()
            .post("/articles")
            .jsonBody(rawRequestBody)
            .respondWith()
            .statusCode(200)
            .jsonBody(rawResponseBody)
            .build();

        const response = await client.articles.create({
            title: "Thanks for everything",
            description: "Description of the Article",
            body: "Body of the Article",
            author_id: 1295,
            state: "published",
        });
        expect(response).toEqual({
            type: "article",
            id: "42",
            workspace_id: "this_is_an_id68_that_should_be_at_least_4",
            title: "Thanks for everything",
            description: "Description of the Article",
            body: '<p class="no-margin">Body of the Article</p>',
            author_id: 991267497,
            state: "published",
            created_at: 1734537288,
            updated_at: 1734537288,
            url: "http://help-center.test/myapp-68/en/articles/42-thanks-for-everything",
            parent_id: 145,
            parent_ids: [18, 19],
            parent_type: "collection",
            default_locale: "en",
            translated_content: {
                type: "article_translated_content",
                ar: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bg: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ca: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                cs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                da: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                de: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                el: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                en: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                es: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                et: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                he: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hu: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                id: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                it: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ja: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ko: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                mn: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nb: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ro: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ru: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                tr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                vi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "pt-BR": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-CN": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-TW": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
            },
            statistics: {
                type: "article_statistics",
                views: 0,
                conversions: 0,
                reactions: 0,
                happy_reaction_percentage: 0,
                neutral_reaction_percentage: 0,
                sad_reaction_percentage: 0,
            },
        });
    });

    test("create (3)", async () => {
        const server = mockServerPool.createServer();
        const client = new IntercomClient({
            maxRetries: 0,
            token: "test",
            version: "2.14",
            environment: server.baseUrl,
        });

        const rawResponseBody = { key: "value" };
        server.mockEndpoint().post("/articles").respondWith().statusCode(400).jsonBody(rawResponseBody).build();

        await expect(async () => {
            return await client.articles.create(undefined);
        }).rejects.toThrow(Intercom.BadRequestError);
    });

    test("create (4)", async () => {
        const server = mockServerPool.createServer();
        const client = new IntercomClient({
            maxRetries: 0,
            token: "test",
            version: "2.14",
            environment: server.baseUrl,
        });

        const rawResponseBody = { type: "error.list", errors: [{ code: "code" }, { code: "code" }] };
        server.mockEndpoint().post("/articles").respondWith().statusCode(401).jsonBody(rawResponseBody).build();

        await expect(async () => {
            return await client.articles.create(undefined);
        }).rejects.toThrow(Intercom.UnauthorizedError);
    });

    test("find (1)", async () => {
        const server = mockServerPool.createServer();
        const client = new IntercomClient({
            maxRetries: 0,
            token: "test",
            version: "2.14",
            environment: server.baseUrl,
        });

        const rawResponseBody = {
            type: "article",
            id: "45",
            workspace_id: "this_is_an_id74_that_should_be_at_least_4",
            title: "This is the article title",
            description: "",
            body: "",
            author_id: 991267502,
            state: "published",
            created_at: 1734537292,
            updated_at: 1734537292,
            url: "http://help-center.test/myapp-74/en/articles/45-this-is-the-article-title",
            parent_id: 148,
            parent_ids: [18, 19],
            parent_type: "collection",
            default_locale: "en",
            translated_content: {
                type: "article_translated_content",
                ar: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bg: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ca: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                cs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                da: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                de: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                el: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                en: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                es: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                et: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                he: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hu: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                id: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                it: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ja: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ko: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                mn: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nb: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ro: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ru: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                tr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                vi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "pt-BR": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-CN": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-TW": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
            },
            statistics: {
                type: "article_statistics",
                views: 0,
                conversions: 0,
                reactions: 0,
                happy_reaction_percentage: 0,
                neutral_reaction_percentage: 0,
                sad_reaction_percentage: 0,
            },
        };
        server.mockEndpoint().get("/articles/1").respondWith().statusCode(200).jsonBody(rawResponseBody).build();

        const response = await client.articles.find({
            article_id: 1,
        });
        expect(response).toEqual({
            type: "article",
            id: "45",
            workspace_id: "this_is_an_id74_that_should_be_at_least_4",
            title: "This is the article title",
            description: "",
            body: "",
            author_id: 991267502,
            state: "published",
            created_at: 1734537292,
            updated_at: 1734537292,
            url: "http://help-center.test/myapp-74/en/articles/45-this-is-the-article-title",
            parent_id: 148,
            parent_ids: [18, 19],
            parent_type: "collection",
            default_locale: "en",
            translated_content: {
                type: "article_translated_content",
                ar: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bg: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ca: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                cs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                da: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                de: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                el: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                en: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                es: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                et: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                he: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hu: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                id: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                it: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ja: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ko: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                mn: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nb: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ro: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ru: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                tr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                vi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "pt-BR": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-CN": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-TW": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
            },
            statistics: {
                type: "article_statistics",
                views: 0,
                conversions: 0,
                reactions: 0,
                happy_reaction_percentage: 0,
                neutral_reaction_percentage: 0,
                sad_reaction_percentage: 0,
            },
        });
    });

    test("find (2)", async () => {
        const server = mockServerPool.createServer();
        const client = new IntercomClient({
            maxRetries: 0,
            token: "test",
            version: "2.14",
            environment: server.baseUrl,
        });

        const rawResponseBody = { type: "error.list", errors: [{ code: "code" }, { code: "code" }] };
        server.mockEndpoint().get("/articles/1").respondWith().statusCode(401).jsonBody(rawResponseBody).build();

        await expect(async () => {
            return await client.articles.find({
                article_id: 1,
            });
        }).rejects.toThrow(Intercom.UnauthorizedError);
    });

    test("find (3)", async () => {
        const server = mockServerPool.createServer();
        const client = new IntercomClient({
            maxRetries: 0,
            token: "test",
            version: "2.14",
            environment: server.baseUrl,
        });

        const rawResponseBody = { key: "value" };
        server.mockEndpoint().get("/articles/1").respondWith().statusCode(404).jsonBody(rawResponseBody).build();

        await expect(async () => {
            return await client.articles.find({
                article_id: 1,
            });
        }).rejects.toThrow(Intercom.NotFoundError);
    });

    test("update (1)", async () => {
        const server = mockServerPool.createServer();
        const client = new IntercomClient({
            maxRetries: 0,
            token: "test",
            version: "2.14",
            environment: server.baseUrl,
        });
        const rawRequestBody = { title: "Christmas is here!", body: "<p>New gifts in store for the jolly season</p>" };
        const rawResponseBody = {
            type: "article",
            id: "48",
            workspace_id: "this_is_an_id80_that_should_be_at_least_4",
            title: "Christmas is here!",
            description: "",
            body: '<p class="no-margin">New gifts in store for the jolly season</p>',
            author_id: 991267508,
            state: "published",
            created_at: 1734537297,
            updated_at: 1734537298,
            url: "http://help-center.test/myapp-80/en/articles/48-christmas-is-here",
            parent_id: 151,
            parent_ids: [18, 19],
            parent_type: "collection",
            default_locale: "en",
            translated_content: {
                type: "article_translated_content",
                ar: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bg: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ca: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                cs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                da: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                de: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                el: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                en: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                es: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                et: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                he: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hu: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                id: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                it: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ja: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ko: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                mn: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nb: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ro: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ru: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                tr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                vi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "pt-BR": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-CN": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-TW": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
            },
            statistics: {
                type: "article_statistics",
                views: 0,
                conversions: 0,
                reactions: 0,
                happy_reaction_percentage: 0,
                neutral_reaction_percentage: 0,
                sad_reaction_percentage: 0,
            },
        };
        server
            .mockEndpoint()
            .put("/articles/1")
            .jsonBody(rawRequestBody)
            .respondWith()
            .statusCode(200)
            .jsonBody(rawResponseBody)
            .build();

        const response = await client.articles.update({
            article_id: 1,
            title: "Christmas is here!",
            body: "<p>New gifts in store for the jolly season</p>",
        });
        expect(response).toEqual({
            type: "article",
            id: "48",
            workspace_id: "this_is_an_id80_that_should_be_at_least_4",
            title: "Christmas is here!",
            description: "",
            body: '<p class="no-margin">New gifts in store for the jolly season</p>',
            author_id: 991267508,
            state: "published",
            created_at: 1734537297,
            updated_at: 1734537298,
            url: "http://help-center.test/myapp-80/en/articles/48-christmas-is-here",
            parent_id: 151,
            parent_ids: [18, 19],
            parent_type: "collection",
            default_locale: "en",
            translated_content: {
                type: "article_translated_content",
                ar: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bg: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ca: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                cs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                da: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                de: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                el: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                en: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                es: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                et: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                he: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hu: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                id: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                it: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ja: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ko: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                mn: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nb: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ro: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ru: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                tr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                vi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "pt-BR": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-CN": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-TW": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
            },
            statistics: {
                type: "article_statistics",
                views: 0,
                conversions: 0,
                reactions: 0,
                happy_reaction_percentage: 0,
                neutral_reaction_percentage: 0,
                sad_reaction_percentage: 0,
            },
        });
    });

    test("update (2)", async () => {
        const server = mockServerPool.createServer();
        const client = new IntercomClient({
            maxRetries: 0,
            token: "test",
            version: "2.14",
            environment: server.baseUrl,
        });
        const rawRequestBody = { title: "Christmas is here!", body: "<p>New gifts in store for the jolly season</p>" };
        const rawResponseBody = {
            type: "article",
            id: "48",
            workspace_id: "this_is_an_id80_that_should_be_at_least_4",
            title: "Christmas is here!",
            description: "",
            body: '<p class="no-margin">New gifts in store for the jolly season</p>',
            author_id: 991267508,
            state: "published",
            created_at: 1734537297,
            updated_at: 1734537298,
            url: "http://help-center.test/myapp-80/en/articles/48-christmas-is-here",
            parent_id: 151,
            parent_ids: [18, 19],
            parent_type: "collection",
            default_locale: "en",
            translated_content: {
                type: "article_translated_content",
                ar: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bg: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ca: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                cs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                da: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                de: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                el: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                en: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                es: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                et: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                he: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hu: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                id: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                it: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ja: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ko: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                mn: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nb: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ro: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ru: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                tr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                vi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "pt-BR": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-CN": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-TW": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
            },
            statistics: {
                type: "article_statistics",
                views: 0,
                conversions: 0,
                reactions: 0,
                happy_reaction_percentage: 0,
                neutral_reaction_percentage: 0,
                sad_reaction_percentage: 0,
            },
        };
        server
            .mockEndpoint()
            .put("/articles/1")
            .jsonBody(rawRequestBody)
            .respondWith()
            .statusCode(200)
            .jsonBody(rawResponseBody)
            .build();

        const response = await client.articles.update({
            article_id: 1,
            title: "Christmas is here!",
            body: "<p>New gifts in store for the jolly season</p>",
        });
        expect(response).toEqual({
            type: "article",
            id: "48",
            workspace_id: "this_is_an_id80_that_should_be_at_least_4",
            title: "Christmas is here!",
            description: "",
            body: '<p class="no-margin">New gifts in store for the jolly season</p>',
            author_id: 991267508,
            state: "published",
            created_at: 1734537297,
            updated_at: 1734537298,
            url: "http://help-center.test/myapp-80/en/articles/48-christmas-is-here",
            parent_id: 151,
            parent_ids: [18, 19],
            parent_type: "collection",
            default_locale: "en",
            translated_content: {
                type: "article_translated_content",
                ar: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bg: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                bs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ca: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                cs: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                da: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                de: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                el: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                en: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                es: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                et: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                fr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                he: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                hu: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                id: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                it: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ja: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ko: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                lv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                mn: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nb: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                nl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                pt: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ro: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                ru: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sl: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                sv: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                tr: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                vi: {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "pt-BR": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-CN": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
                "zh-TW": {
                    type: "article_content",
                    title: "How to create a new article",
                    description: "This article will show you how to create a new article.",
                    body: "This is the body of the article.",
                    author_id: 1,
                    state: "published",
                    created_at: 1663597223,
                    updated_at: 1663597260,
                    url: "http://intercom.test/help/en/articles/3-default-language",
                },
            },
            statistics: {
                type: "article_statistics",
                views: 0,
                conversions: 0,
                reactions: 0,
                happy_reaction_percentage: 0,
                neutral_reaction_percentage: 0,
                sad_reaction_percentage: 0,
            },
        });
    });

    test("update (3)", async () => {
        const server = mockServerPool.createServer();
        const client = new IntercomClient({
            maxRetries: 0,
            token: "test",
            version: "2.14",
            environment: server.baseUrl,
        });
        const rawRequestBody = {};
        const rawResponseBody = { type: "error.list", errors: [{ code: "code" }, { code: "code" }] };
        server
            .mockEndpoint()
            .put("/articles/1")
            .jsonBody(rawRequestBody)
            .respondWith()
            .statusCode(401)
            .jsonBody(rawResponseBody)
            .build();

        await expect(async () => {
            return await client.articles.update({
                article_id: 1,
            });
        }).rejects.toThrow(Intercom.UnauthorizedError);
    });

    test("update (4)", async () => {
        const server = mockServerPool.createServer();
        const client = new IntercomClient({
            maxRetries: 0,
            token: "test",
            version: "2.14",
            environment: server.baseUrl,
        });
        const rawRequestBody = {};
        const rawResponseBody = { key: "value" };
        server
            .mockEndpoint()
            .put("/articles/1")
            .jsonBody(rawRequestBody)
            .respondWith()
            .statusCode(404)
            .jsonBody(rawResponseBody)
            .build();

        await expect(async () => {
            return await client.articles.update({
                article_id: 1,
            });
        }).rejects.toThrow(Intercom.NotFoundError);
    });

    test("delete (1)", async () => {
        const server = mockServerPool.createServer();
        const client = new IntercomClient({
            maxRetries: 0,
            token: "test",
            version: "2.14",
            environment: server.baseUrl,
        });

        const rawResponseBody = { id: "51", object: "article", deleted: true };
        server.mockEndpoint().delete("/articles/1").respondWith().statusCode(200).jsonBody(rawResponseBody).build();

        const response = await client.articles.delete({
            article_id: 1,
        });
        expect(response).toEqual({
            id: "51",
            object: "article",
            deleted: true,
        });
    });

    test("delete (2)", async () => {
        const server = mockServerPool.createServer();
        const client = new IntercomClient({
            maxRetries: 0,
            token: "test",
            version: "2.14",
            environment: server.baseUrl,
        });

        const rawResponseBody = { type: "error.list", errors: [{ code: "code" }, { code: "code" }] };
        server.mockEndpoint().delete("/articles/1").respondWith().statusCode(401).jsonBody(rawResponseBody).build();

        await expect(async () => {
            return await client.articles.delete({
                article_id: 1,
            });
        }).rejects.toThrow(Intercom.UnauthorizedError);
    });

    test("delete (3)", async () => {
        const server = mockServerPool.createServer();
        const client = new IntercomClient({
            maxRetries: 0,
            token: "test",
            version: "2.14",
            environment: server.baseUrl,
        });

        const rawResponseBody = { key: "value" };
        server.mockEndpoint().delete("/articles/1").respondWith().statusCode(404).jsonBody(rawResponseBody).build();

        await expect(async () => {
            return await client.articles.delete({
                article_id: 1,
            });
        }).rejects.toThrow(Intercom.NotFoundError);
    });

    test("search (1)", async () => {
        const server = mockServerPool.createServer();
        const client = new IntercomClient({
            maxRetries: 0,
            token: "test",
            version: "2.14",
            environment: server.baseUrl,
        });

        const rawResponseBody = {
            type: "list",
            total_count: 1,
            data: {
                articles: [
                    {
                        type: "article",
                        id: "55",
                        workspace_id: "this_is_an_id92_that_should_be_at_least_4",
                        title: "Title 1",
                        description: "",
                        body: "",
                        author_id: 991267521,
                        state: "draft",
                        created_at: 1734537306,
                        updated_at: 1734537306,
                        url: "http://intercom.test/help/en/articles/3-default-language",
                        parent_ids: [18, 19],
                        parent_type: "collection",
                        default_locale: "en",
                    },
                ],
                highlights: [{ article_id: "123" }],
            },
            pages: {
                type: "pages",
                page: 1,
                next: { per_page: 2, starting_after: "your-cursor-from-response" },
                per_page: 10,
                total_pages: 1,
            },
        };
        server.mockEndpoint().get("/articles/search").respondWith().statusCode(200).jsonBody(rawResponseBody).build();

        const response = await client.articles.search({
            phrase: "Getting started",
            state: "published",
            help_center_id: 1,
            highlight: true,
        });
        expect(response).toEqual({
            type: "list",
            total_count: 1,
            data: {
                articles: [
                    {
                        type: "article",
                        id: "55",
                        workspace_id: "this_is_an_id92_that_should_be_at_least_4",
                        title: "Title 1",
                        description: "",
                        body: "",
                        author_id: 991267521,
                        state: "draft",
                        created_at: 1734537306,
                        updated_at: 1734537306,
                        url: "http://intercom.test/help/en/articles/3-default-language",
                        parent_ids: [18, 19],
                        parent_type: "collection",
                        default_locale: "en",
                    },
                ],
                highlights: [
                    {
                        article_id: "123",
                    },
                ],
            },
            pages: {
                type: "pages",
                page: 1,
                next: {
                    per_page: 2,
                    starting_after: "your-cursor-from-response",
                },
                per_page: 10,
                total_pages: 1,
            },
        });
    });

    test("search (2)", async () => {
        const server = mockServerPool.createServer();
        const client = new IntercomClient({
            maxRetries: 0,
            token: "test",
            version: "2.14",
            environment: server.baseUrl,
        });

        const rawResponseBody = { type: "error.list", errors: [{ code: "code" }, { code: "code" }] };
        server.mockEndpoint().get("/articles/search").respondWith().statusCode(401).jsonBody(rawResponseBody).build();

        await expect(async () => {
            return await client.articles.search();
        }).rejects.toThrow(Intercom.UnauthorizedError);
    });
});
