cloudflare
Version:
The official TypeScript library for the Cloudflare API
57 lines • 2.33 kB
TypeScript
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as ConfigurationAPI from 'cloudflare/resources/event-notifications/r2/configuration/configuration';
import * as QueuesAPI from 'cloudflare/resources/event-notifications/r2/configuration/queues';
export declare class Configuration extends APIResource {
queues: QueuesAPI.Queues;
/**
* Returns all notification rules for each queue for which bucket notifications are
* produced.
*/
get(bucketName: string, params: ConfigurationGetParams, options?: Core.RequestOptions): Core.APIPromise<ConfigurationGetResponse>;
}
export type ConfigurationGetResponse = Record<string, Record<string, ConfigurationGetResponse.mq_detail>>;
export declare namespace ConfigurationGetResponse {
interface mq_detail {
/**
* Queue ID that will receive notifications based on the configured rules
*/
queue: string;
/**
* Array of rules to drive notifications
*/
rules: Array<mq_detail.Rule>;
}
namespace mq_detail {
interface Rule {
/**
* Array of R2 object actions that will trigger notifications
*/
actions: Array<'PutObject' | 'CopyObject' | 'DeleteObject' | 'CompleteMultipartUpload' | 'AbortMultipartUpload'>;
/**
* Notifications will be sent only for objects with this prefix
*/
prefix?: string;
/**
* Notifications will be sent only for objects with this suffix
*/
suffix?: string;
}
}
}
export interface ConfigurationGetParams {
/**
* Identifier
*/
account_id: string;
}
export declare namespace Configuration {
export import ConfigurationGetResponse = ConfigurationAPI.ConfigurationGetResponse;
export import ConfigurationGetParams = ConfigurationAPI.ConfigurationGetParams;
export import Queues = QueuesAPI.Queues;
export import QueueUpdateResponse = QueuesAPI.QueueUpdateResponse;
export import QueueDeleteResponse = QueuesAPI.QueueDeleteResponse;
export import QueueUpdateParams = QueuesAPI.QueueUpdateParams;
export import QueueDeleteParams = QueuesAPI.QueueDeleteParams;
}
//# sourceMappingURL=configuration.d.ts.map