/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { companyAttachmentsCreate } from "../funcs/companyAttachmentsCreate.js"; import { companyAttachmentsGetDetails } from "../funcs/companyAttachmentsGetDetails.js"; import { companyAttachmentsGetList } from "../funcs/companyAttachmentsGetList.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import { GetV1CompaniesAttachmentRequest, GetV1CompaniesAttachmentResponse, } from "../models/operations/getv1companiesattachment.js"; import { GetV1CompaniesAttachmentsRequest, GetV1CompaniesAttachmentsResponse, } from "../models/operations/getv1companiesattachments.js"; import { PostV1CompaniesAttachmentRequest, PostV1CompaniesAttachmentResponse, } from "../models/operations/postv1companiesattachment.js"; import { unwrapAsync } from "../types/fp.js"; export class CompanyAttachments extends ClientSDK { /** * Get Company Attachment Details * * @remarks * Retrieve the detail of an attachment uploaded by the company. * * ### Related guides * - [Manage company attachments](doc:manage-company-attachments) * * scope: `company_attachments:read` */ async getDetails( request: GetV1CompaniesAttachmentRequest, options?: RequestOptions, ): Promise { return unwrapAsync(companyAttachmentsGetDetails( this, request, options, )); } /** * Get List of Company Attachments * * @remarks * Retrieve a list of all the attachments uploaded by the company. * * ### Related guides * - [Manage company attachments](doc:manage-company-attachments) * * scope: `company_attachments:read` */ async getList( request: GetV1CompaniesAttachmentsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(companyAttachmentsGetList( this, request, options, )); } /** * Create Company Attachment and Upload File * * @remarks * Upload a file and create a company attachment. We recommend uploading PDF files for optimal compatibility. However, the following file types are allowed: .qbb, .qbm, .gif, .jpg, .png, .pdf, .xls, .xlsx, .doc and .docx. * * ### Related guides * - [Manage company attachments](doc:manage-company-attachments) * * scope: `company_attachments:write` */ async create( request: PostV1CompaniesAttachmentRequest, options?: RequestOptions, ): Promise { return unwrapAsync(companyAttachmentsCreate( this, request, options, )); } }