// File generated from our OpenAPI spec by Stainless.
import { APIResource } from 'cloudflare/resource';
import * as SiteInfosAPI from 'cloudflare/resources/rum/site-infos';
import { V4PagePaginationArray } from 'cloudflare/pagination';
export class SiteInfos extends APIResource {
    /**
     * Creates a new Web Analytics site.
     */
    create(params, options) {
        const { account_id, ...body } = params;
        return this._client.post(`/accounts/${account_id}/rum/site_info`, { body, ...options })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Updates an existing Web Analytics site.
     */
    update(siteId, params, options) {
        const { account_id, ...body } = params;
        return this._client.put(`/accounts/${account_id}/rum/site_info/${siteId}`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Lists all Web Analytics sites of an account.
     */
    list(params, options) {
        const { account_id, ...query } = params;
        return this._client.getAPIList(`/accounts/${account_id}/rum/site_info/list`, RUMSitesV4PagePaginationArray, { query, ...options });
    }
    /**
     * Deletes an existing Web Analytics site.
     */
    delete(siteId, params, options) {
        const { account_id } = params;
        return this._client.delete(`/accounts/${account_id}/rum/site_info/${siteId}`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Retrieves a Web Analytics site.
     */
    get(siteId, params, options) {
        const { account_id } = params;
        return this._client.get(`/accounts/${account_id}/rum/site_info/${siteId}`, options)._thenUnwrap((obj) => obj.result);
    }
}
export class RUMSitesV4PagePaginationArray extends V4PagePaginationArray {
}
(function (SiteInfos) {
    SiteInfos.RUMSitesV4PagePaginationArray = SiteInfosAPI.RUMSitesV4PagePaginationArray;
})(SiteInfos || (SiteInfos = {}));
//# sourceMappingURL=site-infos.mjs.map