// File generated from our OpenAPI spec by Stainless.
import { APIResource } from 'cloudflare/resource';
import * as PermissionsAPI from 'cloudflare/resources/intel/indicator-feeds/permissions';
import { multipartFormRequestOptions } from 'cloudflare/core';
export class IndicatorFeeds extends APIResource {
    constructor() {
        super(...arguments);
        this.permissions = new PermissionsAPI.Permissions(this._client);
    }
    /**
     * Create new indicator feed
     */
    create(params, options) {
        const { account_id, ...body } = params;
        return this._client.post(`/accounts/${account_id}/intel/indicator-feeds`, {
            body,
            ...options,
        })._thenUnwrap((obj) => obj.result);
    }
    /**
     * Update indicator feed data
     */
    update(feedId, params, options) {
        const { account_id, ...body } = params;
        return this._client.put(`/accounts/${account_id}/intel/indicator-feeds/${feedId}/snapshot`, multipartFormRequestOptions({ body, ...options }))._thenUnwrap((obj) => obj.result);
    }
    /**
     * Get indicator feeds owned by this account
     */
    list(params, options) {
        const { account_id } = params;
        return this._client.get(`/accounts/${account_id}/intel/indicator-feeds`, options)._thenUnwrap((obj) => obj.result);
    }
    /**
     * Get indicator feed data
     */
    data(feedId, params, options) {
        const { account_id } = params;
        return this._client.get(`/accounts/${account_id}/intel/indicator-feeds/${feedId}/data`, {
            ...options,
            headers: { Accept: 'text/csv', ...options?.headers },
        });
    }
    /**
     * Get indicator feed metadata
     */
    get(feedId, params, options) {
        const { account_id } = params;
        return this._client.get(`/accounts/${account_id}/intel/indicator-feeds/${feedId}`, options)._thenUnwrap((obj) => obj.result);
    }
}
(function (IndicatorFeeds) {
    IndicatorFeeds.Permissions = PermissionsAPI.Permissions;
})(IndicatorFeeds || (IndicatorFeeds = {}));
//# sourceMappingURL=indicator-feeds.mjs.map