/** * Shell Data & Reporting APIsLib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { array, boolean, lazy, number, object, optional, Schema, string, } from '../schema.js'; import { SearchDocumentsInvoice, searchDocumentsInvoiceSchema, } from './searchDocumentsInvoice.js'; export interface SearchDocumentsResponse { /** UUID (according to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. */ requestId?: string; /** Indicates overall status of the request. Allowed values: SUCCES, FAILED */ status?: string; invoices?: SearchDocumentsInvoice[]; /** Total number of elements corresponding to the request */ totalRecords?: number; /** Number of elements in the page content. Will be lesser or equal to the size param. */ totalRecordsOnPage?: number; /** True if it is the first page, false otherwise */ isFirstPage?: boolean; /** True if it is the last page, false, otherwise. */ isLastPage?: boolean; } export const searchDocumentsResponseSchema: Schema = lazy( () => object({ requestId: ['RequestId', optional(string())], status: ['Status', optional(string())], invoices: ['Invoices', optional(array(searchDocumentsInvoiceSchema))], totalRecords: ['TotalRecords', optional(number())], totalRecordsOnPage: ['TotalRecordsOnPage', optional(number())], isFirstPage: ['IsFirstPage', optional(boolean())], isLastPage: ['IsLastPage', optional(boolean())], }) );