// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../core/resource'; import * as AccountsAPI from '../accounts/accounts'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; export class Messages extends APIResource { /** * Redact a message */ redact( messageID: string, params: MessageRedactParams, options?: RequestOptions, ): APIPromise { const { id } = params; return this._client.post(path`/issues/${id}/messages/${messageID}/redact`, options); } } export interface MessageRedactResponse { data?: MessageRedactResponse.Data; request_id?: string; } export namespace MessageRedactResponse { export interface Data { id?: string; author?: Data.Author; email_info?: Data.EmailInfo; file_urls?: Array; is_private?: boolean; message_html?: string; source?: string; thread_id?: string; timestamp?: string; } export namespace Data { export interface Author { avatar_url?: string; contact?: Author.Contact; name?: string; user?: AccountsAPI.UserReference; } export namespace Author { export interface Contact { id?: string; email?: string; } } export interface EmailInfo { bcc_emails?: Array; cc_emails?: Array; from_email?: string; to_emails?: Array; } } } export interface MessageRedactParams { /** * The ID of the issue that the message belongs to */ id: string; } export declare namespace Messages { export { type MessageRedactResponse as MessageRedactResponse, type MessageRedactParams as MessageRedactParams, }; }