UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
57 lines (56 loc) 1.76 kB
/* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API [![status](https://status.asknews.app/api/badge/2/status?style=for-the-badge)](https://status.asknews.app/status/prod) * * The version of the OpenAPI document: 0.24.66 * Contact: contact@emergentmethods.ai * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { DeltaFromJSON, DeltaToJSON, } from './Delta'; /** * @export */ export const ContentBlockDeltaEvent1TypeEnum = { ContentBlockDelta: 'content_block_delta' }; /** * Check if a given object implements the ContentBlockDeltaEvent1 interface. */ export function instanceOfContentBlockDeltaEvent1(value) { if (!('index' in value) || value['index'] === undefined) return false; if (!('delta' in value) || value['delta'] === undefined) return false; return true; } export function ContentBlockDeltaEvent1FromJSON(json) { return ContentBlockDeltaEvent1FromJSONTyped(json, false); } export function ContentBlockDeltaEvent1FromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'type': json['type'] == null ? undefined : json['type'], 'index': json['index'], 'delta': DeltaFromJSON(json['delta']), }; } export function ContentBlockDeltaEvent1ToJSON(json) { return ContentBlockDeltaEvent1ToJSONTyped(json, false); } export function ContentBlockDeltaEvent1ToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'type': value['type'], 'index': value['index'], 'delta': DeltaToJSON(value['delta']), }; }