Outcome.ts•3.98 kB
/* tslint:disable */
/* eslint-disable */
/**
* Squad API
* API for managing Squad resources
*
* The version of the OpenAPI document: 4.0.0
* Contact: help@meetsquad.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.js';
/**
* Outcome data representing a business objective
* @export
* @interface Outcome
*/
export interface Outcome {
/**
* Unique identifier for the outcome
* @type {string}
* @memberof Outcome
*/
id: string;
/**
* Title of the outcome
* @type {string}
* @memberof Outcome
*/
title: string;
/**
* Detailed description of the outcome
* @type {string}
* @memberof Outcome
*/
description: string;
/**
* Priority level of the outcome
* @type {number}
* @memberof Outcome
*/
priority: number;
/**
* Trend indicator for the outcome
* @type {number}
* @memberof Outcome
*/
trend?: number;
/**
* List of analytic events associated with the outcome
* @type {Array<string>}
* @memberof Outcome
*/
analyticEvents?: Array<string>;
/**
* Whether the outcome is hidden
* @type {boolean}
* @memberof Outcome
*/
hideContent: boolean;
/**
* ID of the owner of the outcome
* @type {string}
* @memberof Outcome
*/
ownerId?: string;
/**
* Timestamp of when the outcome was created
* @type {string}
* @memberof Outcome
*/
createdAt: string;
/**
* Timestamp of when the outcome was last updated
* @type {string}
* @memberof Outcome
*/
updatedAt: string;
}
/**
* Check if a given object implements the Outcome interface.
*/
export function instanceOfOutcome(value: object): value is Outcome {
if (!('id' in value) || value['id'] === undefined) return false;
if (!('title' in value) || value['title'] === undefined) return false;
if (!('description' in value) || value['description'] === undefined) return false;
if (!('priority' in value) || value['priority'] === undefined) return false;
if (!('hideContent' in value) || value['hideContent'] === undefined) return false;
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
return true;
}
export function OutcomeFromJSON(json: any): Outcome {
return OutcomeFromJSONTyped(json, false);
}
export function OutcomeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Outcome {
if (json == null) {
return json;
}
return {
'id': json['id'],
'title': json['title'],
'description': json['description'],
'priority': json['priority'],
'trend': json['trend'] == null ? undefined : json['trend'],
'analyticEvents': json['analyticEvents'] == null ? undefined : json['analyticEvents'],
'hideContent': json['hideContent'],
'ownerId': json['ownerId'] == null ? undefined : json['ownerId'],
'createdAt': json['createdAt'],
'updatedAt': json['updatedAt'],
};
}
export function OutcomeToJSON(json: any): Outcome {
return OutcomeToJSONTyped(json, false);
}
export function OutcomeToJSONTyped(value?: Outcome | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'title': value['title'],
'description': value['description'],
'priority': value['priority'],
'trend': value['trend'],
'analyticEvents': value['analyticEvents'],
'hideContent': value['hideContent'],
'ownerId': value['ownerId'],
'createdAt': value['createdAt'],
'updatedAt': value['updatedAt'],
};
}