UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
83 lines (72 loc) 2.04 kB
/* 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 { mapValues } from '../runtime'; /** * * @export * @interface WebhookParams */ export interface WebhookParams { /** * The URL to send the webhook when the alert triggers * @type {string} * @memberof WebhookParams */ url: string; /** * * @type {{ [key: string]: string; }} * @memberof WebhookParams */ headers?: { [key: string]: string; } | null; /** * * @type {{ [key: string]: any; }} * @memberof WebhookParams */ payload?: { [key: string]: any; } | null; } /** * Check if a given object implements the WebhookParams interface. */ export function instanceOfWebhookParams(value: object): value is WebhookParams { if (!('url' in value) || value['url'] === undefined) return false; return true; } export function WebhookParamsFromJSON(json: any): WebhookParams { return WebhookParamsFromJSONTyped(json, false); } export function WebhookParamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): WebhookParams { 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: any): WebhookParams { return WebhookParamsToJSONTyped(json, false); } export function WebhookParamsToJSONTyped(value?: WebhookParams | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'url': value['url'], 'headers': value['headers'], 'payload': value['payload'], }; }