UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
87 lines (74 loc) 1.96 kB
/* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API * * The version of the OpenAPI document: 0.18.6 * 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 { mapValues } from '../runtime'; import type { WebhookParams } from './WebhookParams'; import { WebhookParamsFromJSON, WebhookParamsFromJSONTyped, WebhookParamsToJSON, } from './WebhookParams'; /** * * @export * @interface WebhookAction */ export interface WebhookAction { /** * * @type {string} * @memberof WebhookAction */ action?: WebhookActionActionEnum; /** * * @type {WebhookParams} * @memberof WebhookAction */ params: WebhookParams; } /** * @export */ export const WebhookActionActionEnum = { Webhook: 'webhook' } as const; export type WebhookActionActionEnum = typeof WebhookActionActionEnum[keyof typeof WebhookActionActionEnum]; /** * Check if a given object implements the WebhookAction interface. */ export function instanceOfWebhookAction(value: object): boolean { if (!('params' in value)) return false; return true; } export function WebhookActionFromJSON(json: any): WebhookAction { return WebhookActionFromJSONTyped(json, false); } export function WebhookActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebhookAction { if (json == null) { return json; } return { 'action': json['action'] == null ? undefined : json['action'], 'params': WebhookParamsFromJSON(json['params']), }; } export function WebhookActionToJSON(value?: WebhookAction | null): any { if (value == null) { return value; } return { 'action': value['action'], 'params': WebhookParamsToJSON(value['params']), }; }