import { APIResource } from "../../resource.js"; import * as Core from "../../core.js"; import { SinglePage } from "../../pagination.js"; export declare class Silences extends APIResource { /** * Creates a new silence for an account. * * @example * ```ts * const silence = await client.alerting.silences.create({ * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * body: [{}], * }); * ``` */ create(params: SilenceCreateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Updates existing silences for an account. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const silenceUpdateResponse of client.alerting.silences.update( * { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * body: [{}], * }, * )) { * // ... * } * ``` */ update(params: SilenceUpdateParams, options?: Core.RequestOptions): Core.PagePromise; /** * Gets a list of silences for an account. * * @example * ```ts * // Automatically fetches more pages as needed. * for await (const silenceListResponse of client.alerting.silences.list( * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * )) { * // ... * } * ``` */ list(params: SilenceListParams, options?: Core.RequestOptions): Core.PagePromise; /** * Deletes an existing silence for an account. * * @example * ```ts * const silence = await client.alerting.silences.delete( * 'f878e90c23f44126ae3cfc399f646977', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ delete(silenceId: string, params: SilenceDeleteParams, options?: Core.RequestOptions): Core.APIPromise; /** * Gets a specific silence for an account. * * @example * ```ts * const silence = await client.alerting.silences.get( * 'f878e90c23f44126ae3cfc399f646977', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ get(silenceId: string, params: SilenceGetParams, options?: Core.RequestOptions): Core.APIPromise; } export declare class SilenceUpdateResponsesSinglePage extends SinglePage { } export declare class SilenceListResponsesSinglePage extends SinglePage { } export interface SilenceCreateResponse { errors: Array; messages: Array; /** * Whether the API call was successful */ success: true; } export declare namespace SilenceCreateResponse { interface Error { message: string; code?: number; } interface Message { message: string; code?: number; } } export interface SilenceUpdateResponse { /** * Silence ID */ id?: string; /** * When the silence was created. */ created_at?: string; /** * When the silence ends. */ end_time?: string; /** * The unique identifier of a notification policy */ policy_id?: string; /** * When the silence starts. */ start_time?: string; /** * When the silence was modified. */ updated_at?: string; } export interface SilenceListResponse { /** * Silence ID */ id?: string; /** * When the silence was created. */ created_at?: string; /** * When the silence ends. */ end_time?: string; /** * The unique identifier of a notification policy */ policy_id?: string; /** * When the silence starts. */ start_time?: string; /** * When the silence was modified. */ updated_at?: string; } export interface SilenceDeleteResponse { errors: Array; messages: Array; /** * Whether the API call was successful */ success: true; } export declare namespace SilenceDeleteResponse { interface Error { message: string; code?: number; } interface Message { message: string; code?: number; } } export interface SilenceGetResponse { /** * Silence ID */ id?: string; /** * When the silence was created. */ created_at?: string; /** * When the silence ends. */ end_time?: string; /** * The unique identifier of a notification policy */ policy_id?: string; /** * When the silence starts. */ start_time?: string; /** * When the silence was modified. */ updated_at?: string; } export interface SilenceCreateParams { /** * Path param: The account id */ account_id: string; /** * Body param */ body: Array; } export declare namespace SilenceCreateParams { interface Body { /** * When the silence ends. */ end_time?: string; /** * The unique identifier of a notification policy */ policy_id?: string; /** * When the silence starts. */ start_time?: string; } } export interface SilenceUpdateParams { /** * Path param: The account id */ account_id: string; /** * Body param */ body: Array; } export declare namespace SilenceUpdateParams { interface Body { /** * Silence ID */ id?: string; /** * When the silence ends. */ end_time?: string; /** * When the silence starts. */ start_time?: string; } } export interface SilenceListParams { /** * The account id */ account_id: string; } export interface SilenceDeleteParams { /** * The account id */ account_id: string; } export interface SilenceGetParams { /** * The account id */ account_id: string; } export declare namespace Silences { export { type SilenceCreateResponse as SilenceCreateResponse, type SilenceUpdateResponse as SilenceUpdateResponse, type SilenceListResponse as SilenceListResponse, type SilenceDeleteResponse as SilenceDeleteResponse, type SilenceGetResponse as SilenceGetResponse, SilenceUpdateResponsesSinglePage as SilenceUpdateResponsesSinglePage, SilenceListResponsesSinglePage as SilenceListResponsesSinglePage, type SilenceCreateParams as SilenceCreateParams, type SilenceUpdateParams as SilenceUpdateParams, type SilenceListParams as SilenceListParams, type SilenceDeleteParams as SilenceDeleteParams, type SilenceGetParams as SilenceGetParams, }; } //# sourceMappingURL=silences.d.ts.map