/** * Apimatic APILib * * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). */ import { array, lazy, optional, Schema, string, typedExpandoObject, unknown, } from '../schema.js'; import { Field, fieldSchema } from './field.js'; import { ImplementationType, implementationTypeSchema, } from './implementationType.js'; /** This structure helps creates a new complex model type. */ export interface CustomType { /** Unique Type Identifier */ id: string; /** Unique API Entity identifier */ apiId: string; /** Custom Type Name */ name: string; /** Data Format */ baseType: string; /** The structure helps describes the nature of implementation of a custom model. A model can be of 3 types. */ implementationType: ImplementationType; /** Type Fields */ fields: Field[]; additionalProperties?: Record; } export const customTypeSchema: Schema = lazy(() => typedExpandoObject( { id: ['id', string()], apiId: ['apiId', string()], name: ['name', string()], baseType: ['baseType', string()], implementationType: ['implementationType', implementationTypeSchema], fields: ['fields', array(fieldSchema)], }, 'additionalProperties', optional(unknown()) ) );