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.

116 lines (109 loc) 3.62 kB
/* tslint:disable */ /* eslint-disable */ /** * MailSlurp API * MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. 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 { StructuredOutputSchema, StructuredOutputSchemaFromJSON, StructuredOutputSchemaFromJSONTyped, StructuredOutputSchemaToJSON, } from './'; /** * Options for generating structured content output from an email * @export * @interface GenerateStructuredContentEmailOptions */ export interface GenerateStructuredContentEmailOptions { /** * Email ID to read and pass to AI * @type {string} * @memberof GenerateStructuredContentEmailOptions */ emailId: string; /** * Content selector to select part of email to operate on * @type {string} * @memberof GenerateStructuredContentEmailOptions */ contentSelector?: GenerateStructuredContentEmailOptionsContentSelectorEnum; /** * Optional instructions for the AI to follow. Try to be precise and clear. You can include examples and hints. * @type {string} * @memberof GenerateStructuredContentEmailOptions */ instructions?: string | null; /** * * @type {StructuredOutputSchema} * @memberof GenerateStructuredContentEmailOptions */ outputSchema?: StructuredOutputSchema | null; /** * ID of transformer to apply * @type {string} * @memberof GenerateStructuredContentEmailOptions */ transformId?: string | null; } /** * @export * @enum {string} */ export enum GenerateStructuredContentEmailOptionsContentSelectorEnum { RAW = 'RAW', BODY = 'BODY', BODY_ATTACHMENTS = 'BODY_ATTACHMENTS', } export function GenerateStructuredContentEmailOptionsFromJSON( json: any ): GenerateStructuredContentEmailOptions { return GenerateStructuredContentEmailOptionsFromJSONTyped(json, false); } export function GenerateStructuredContentEmailOptionsFromJSONTyped( json: any, ignoreDiscriminator: boolean ): GenerateStructuredContentEmailOptions { if (json === undefined || json === null) { return json; } return { emailId: json['emailId'], contentSelector: !exists(json, 'contentSelector') ? undefined : json['contentSelector'], instructions: !exists(json, 'instructions') ? undefined : json['instructions'], outputSchema: !exists(json, 'outputSchema') ? undefined : StructuredOutputSchemaFromJSON(json['outputSchema']), transformId: !exists(json, 'transformId') ? undefined : json['transformId'], }; } export function GenerateStructuredContentEmailOptionsToJSON( value?: GenerateStructuredContentEmailOptions | null ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { emailId: value.emailId, contentSelector: value.contentSelector, instructions: value.instructions, outputSchema: StructuredOutputSchemaToJSON(value.outputSchema), transformId: value.transformId, }; }