/*! * Copyright Adaptavist 2023 (c) All rights reserved */ import { HeadersOption } from '@managed-api/commons-core'; import { ErrorStrategyOption } from '../errorStrategy'; import { Attachment, AttachmentType } from '../definitions/attachment'; export interface GetAttachmentsRequest extends HeadersOption, ErrorStrategyOption { /** * Limit to be applied on pagination. * Note: Unusually large sysparm_limit values can impact system performance. */ sysparm_limit?: string; /** * Number of records to exclude from the query. Use this parameter to get more records than specified in sysparm_limit. * For example, if sysparm_limit is set to 500, but there are additional records you want to query, you can specify a sysparm_offset value of 500 to get the second set of records. */ sysparm_offset?: string; /** * Encoded query. Queries for the Attachment API are relative to the Attachments [sys_attachment] table. * For example: (sysparm_query=file_name=attachment.doc) */ sysparm_query?: string; } export declare type GetAttachmentsResponseOK = { result: AttachmentType[]; }; export declare type GetAttachmentsResponseError = undefined; export interface GetMetadataForAttachmentRequest extends HeadersOption, ErrorStrategyOption { /** * Sys_id of the attachment record for which to retrieve the metadata. */ sys_id: string; } export interface GetMetadataForAttachmentResponseOK extends Attachment { } export declare type GetMetadataForAttachmentResponseError = undefined; export interface UploadBinaryFileRequest extends HeadersOption, ErrorStrategyOption { /** * Sys_id of an encryption context record. Specify this parameter to allow only users with the specified encryption context to access the attachment. * For additional information on encryption context records, see Encryption Support. */ encryption_context?: string; /** * Name to give the attachment. */ file_name: string; /** * Name of the table to attach the file to. */ table_name: string; /** * Sys_id of the record in the table specified in table_name that you want to attach the file to. */ table_sys_id: string; body: string | ArrayBuffer; } export interface UploadBinaryFileResponseOK extends Attachment { } export declare type UploadBinaryFileResponseError = undefined; export interface UploadMultipartFileRequest extends HeadersOption, ErrorStrategyOption { body: { /** * Name of the table to attach the file to. */ table_name: string; /** * Sys_id of the record on the specified table to which you want to attach the file. */ table_sys_id: string; uploadFile: string | ArrayBuffer; /** * Name to give the attachment. */ file_name: string; }; } export interface UploadMultipartFileResponseOK extends Attachment { } export declare type UploadMultipartFileResponseError = undefined; export interface DeleteAttachmentRequest extends HeadersOption, ErrorStrategyOption { /** * Sys_id value of the attachment to delete. */ sys_id: string; } export declare type DeleteAttachmentResponseOK = undefined; export declare type DeleteAttachmentResponseError = undefined; //# sourceMappingURL=attachment.d.ts.map