UNPKG

mailslurp-client

Version:

Official client for MailSlurp Email and SMS API. Create email addresses and phone numbers in Javascript without a mail server. Send and receive real emails in applications or tests.

166 lines (160 loc) 4.55 kB
/* tslint:disable */ /* eslint-disable */ /** * MailSlurp API * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It\'s designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository * * The version of the OpenAPI document: 6.5.2 * Contact: contact@mailslurp.dev * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists, mapValues } from '../runtime'; import { PageableObject, PageableObjectFromJSON, PageableObjectFromJSONTyped, PageableObjectToJSON, SentEmailProjection, SentEmailProjectionFromJSON, SentEmailProjectionFromJSONTyped, SentEmailProjectionToJSON, SortObject, SortObjectFromJSON, SortObjectFromJSONTyped, SortObjectToJSON, } from './'; /** * Paginated sent email results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full sent email entity use the projection ID with individual method calls. * @export * @interface PageSentEmailProjection */ export interface PageSentEmailProjection { /** * Collection of items * @type {Array<SentEmailProjection>} * @memberof PageSentEmailProjection */ content: Array<SentEmailProjection>; /** * * @type {PageableObject} * @memberof PageSentEmailProjection */ pageable?: PageableObject; /** * * @type {number} * @memberof PageSentEmailProjection */ total?: number; /** * Size of page requested * @type {number} * @memberof PageSentEmailProjection */ size: number; /** * Page number starting at 0 * @type {number} * @memberof PageSentEmailProjection */ number: number; /** * Number of items returned * @type {number} * @memberof PageSentEmailProjection */ numberOfElements: number; /** * Total number of items available for querying * @type {number} * @memberof PageSentEmailProjection */ totalElements: number; /** * Total number of pages available * @type {number} * @memberof PageSentEmailProjection */ totalPages: number; /** * * @type {boolean} * @memberof PageSentEmailProjection */ last?: boolean; /** * * @type {SortObject} * @memberof PageSentEmailProjection */ sort?: SortObject; /** * * @type {boolean} * @memberof PageSentEmailProjection */ first?: boolean; /** * * @type {boolean} * @memberof PageSentEmailProjection */ empty?: boolean; } export function PageSentEmailProjectionFromJSON( json: any ): PageSentEmailProjection { return PageSentEmailProjectionFromJSONTyped(json, false); } export function PageSentEmailProjectionFromJSONTyped( json: any, ignoreDiscriminator: boolean ): PageSentEmailProjection { if (json === undefined || json === null) { return json; } return { content: (json['content'] as Array<any>).map(SentEmailProjectionFromJSON), pageable: !exists(json, 'pageable') ? undefined : PageableObjectFromJSON(json['pageable']), total: !exists(json, 'total') ? undefined : json['total'], size: json['size'], number: json['number'], numberOfElements: json['numberOfElements'], totalElements: json['totalElements'], totalPages: json['totalPages'], last: !exists(json, 'last') ? undefined : json['last'], sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']), first: !exists(json, 'first') ? undefined : json['first'], empty: !exists(json, 'empty') ? undefined : json['empty'], }; } export function PageSentEmailProjectionToJSON( value?: PageSentEmailProjection | null ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { content: (value.content as Array<any>).map(SentEmailProjectionToJSON), pageable: PageableObjectToJSON(value.pageable), total: value.total, size: value.size, number: value.number, numberOfElements: value.numberOfElements, totalElements: value.totalElements, totalPages: value.totalPages, last: value.last, sort: SortObjectToJSON(value.sort), first: value.first, empty: value.empty, }; }