@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
53 lines (52 loc) • 1.44 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* AskNews API
* AskNews API
*
* The version of the OpenAPI document: 0.19.10
* 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 { WebhookParamsFromJSON, WebhookParamsToJSON, } from './WebhookParams';
/**
* @export
*/
export const WebhookActionActionEnum = {
Webhook: 'webhook'
};
/**
* Check if a given object implements the WebhookAction interface.
*/
export function instanceOfWebhookAction(value) {
if (!('params' in value) || value['params'] === undefined)
return false;
return true;
}
export function WebhookActionFromJSON(json) {
return WebhookActionFromJSONTyped(json, false);
}
export function WebhookActionFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'action': json['action'] == null ? undefined : json['action'],
'params': WebhookParamsFromJSON(json['params']),
};
}
export function WebhookActionToJSON(json) {
return WebhookActionToJSONTyped(json, false);
}
export function WebhookActionToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'action': value['action'],
'params': WebhookParamsToJSON(value['params']),
};
}