@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
48 lines (47 loc) • 1.45 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* AskNews API
* AskNews API [](https://status.asknews.app/status/prod)
*
* The version of the OpenAPI document: 0.24.22
* 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.
*/
/**
* Check if a given object implements the WebhookParams interface.
*/
export function instanceOfWebhookParams(value) {
if (!('url' in value) || value['url'] === undefined)
return false;
return true;
}
export function WebhookParamsFromJSON(json) {
return WebhookParamsFromJSONTyped(json, false);
}
export function WebhookParamsFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'url': json['url'],
'headers': json['headers'] == null ? undefined : json['headers'],
'payload': json['payload'] == null ? undefined : json['payload'],
};
}
export function WebhookParamsToJSON(json) {
return WebhookParamsToJSONTyped(json, false);
}
export function WebhookParamsToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'url': value['url'],
'headers': value['headers'],
'payload': value['payload'],
};
}