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.
96 lines (90 loc) • 3.03 kB
text/typescript
/* 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 SMS
* @export
* @interface GenerateStructuredContentSmsOptions
*/
export interface GenerateStructuredContentSmsOptions {
/**
* SMS ID to read and pass to AI
* @type {string}
* @memberof GenerateStructuredContentSmsOptions
*/
smsId: string;
/**
* Optional instructions for the AI to follow. Try to be precise and clear. You can include examples and hints.
* @type {string}
* @memberof GenerateStructuredContentSmsOptions
*/
instructions?: string | null;
/**
*
* @type {StructuredOutputSchema}
* @memberof GenerateStructuredContentSmsOptions
*/
outputSchema?: StructuredOutputSchema | null;
/**
* ID of transformer to apply
* @type {string}
* @memberof GenerateStructuredContentSmsOptions
*/
transformId?: string | null;
}
export function GenerateStructuredContentSmsOptionsFromJSON(
json: any
): GenerateStructuredContentSmsOptions {
return GenerateStructuredContentSmsOptionsFromJSONTyped(json, false);
}
export function GenerateStructuredContentSmsOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): GenerateStructuredContentSmsOptions {
if (json === undefined || json === null) {
return json;
}
return {
smsId: json['smsId'],
instructions: !exists(json, 'instructions')
? undefined
: json['instructions'],
outputSchema: !exists(json, 'outputSchema')
? undefined
: StructuredOutputSchemaFromJSON(json['outputSchema']),
transformId: !exists(json, 'transformId') ? undefined : json['transformId'],
};
}
export function GenerateStructuredContentSmsOptionsToJSON(
value?: GenerateStructuredContentSmsOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
smsId: value.smsId,
instructions: value.instructions,
outputSchema: StructuredOutputSchemaToJSON(value.outputSchema),
transformId: value.transformId,
};
}