// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../core/resource'; import { APIPromise } from '../core/api-promise'; import { type Uploadable } from '../core/uploads'; import { RequestOptions } from '../internal/request-options'; import { multipartFormRequestOptions } from '../internal/uploads'; export class Attachments extends APIResource { /** * Create an attachment */ create(body: AttachmentCreateParams, options?: RequestOptions): APIPromise { return this._client.post('/attachments', multipartFormRequestOptions({ body, ...options }, this._client)); } } export interface AttachmentCreateResponse { data?: AttachmentCreateResponse.Data; request_id?: string; } export namespace AttachmentCreateResponse { export interface Data { id?: string; description?: string; name?: string; url?: string; } } export interface AttachmentCreateParams { /** * The description of the file */ description?: string; /** * The file to upload */ file?: Uploadable; /** * The URL to fetch the file from, if the file is not provided */ file_url?: string; } export declare namespace Attachments { export { type AttachmentCreateResponse as AttachmentCreateResponse, type AttachmentCreateParams as AttachmentCreateParams, }; }