Feedback.ts•4.66 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';
/**
* Raw feedback data from a user
* @export
* @interface Feedback
*/
export interface Feedback {
/**
* Unique identifier for the feedback
* @type {string}
* @memberof Feedback
*/
id: string;
/**
* Original raw feedback content
* @type {string}
* @memberof Feedback
*/
content: string;
/**
* Source of the feedback
* @type {string}
* @memberof Feedback
*/
source: string;
/**
* ID of the user who submitted this feedback
* @type {string}
* @memberof Feedback
*/
submittedBy?: string;
/**
* Whether this feedback has been processed into insights
* @type {boolean}
* @memberof Feedback
*/
processed: boolean;
/**
* Sentiment score from -1 (negative) to 1 (positive)
* @type {number}
* @memberof Feedback
*/
sentimentScore?: number;
/**
* Sentiment classification category
* @type {string}
* @memberof Feedback
*/
sentimentCategory?: FeedbackSentimentCategoryEnum;
/**
* Confidence in sentiment analysis (0-1)
* @type {number}
* @memberof Feedback
*/
sentimentConfidence?: number;
/**
* Creation timestamp
* @type {string}
* @memberof Feedback
*/
createdAt: string;
/**
* Unix epoch timestamp for efficient Neo4j queries
* @type {number}
* @memberof Feedback
*/
createdAtEpoch?: number;
/**
* Last update timestamp
* @type {string}
* @memberof Feedback
*/
updatedAt: string;
}
/**
* @export
*/
export const FeedbackSentimentCategoryEnum = {
Positive: 'Positive',
Neutral: 'Neutral',
Negative: 'Negative'
} as const;
export type FeedbackSentimentCategoryEnum = typeof FeedbackSentimentCategoryEnum[keyof typeof FeedbackSentimentCategoryEnum];
/**
* Check if a given object implements the Feedback interface.
*/
export function instanceOfFeedback(value: object): value is Feedback {
if (!('id' in value) || value['id'] === undefined) return false;
if (!('content' in value) || value['content'] === undefined) return false;
if (!('source' in value) || value['source'] === undefined) return false;
if (!('processed' in value) || value['processed'] === 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 FeedbackFromJSON(json: any): Feedback {
return FeedbackFromJSONTyped(json, false);
}
export function FeedbackFromJSONTyped(json: any, ignoreDiscriminator: boolean): Feedback {
if (json == null) {
return json;
}
return {
'id': json['id'],
'content': json['content'],
'source': json['source'],
'submittedBy': json['submittedBy'] == null ? undefined : json['submittedBy'],
'processed': json['processed'],
'sentimentScore': json['sentimentScore'] == null ? undefined : json['sentimentScore'],
'sentimentCategory': json['sentimentCategory'] == null ? undefined : json['sentimentCategory'],
'sentimentConfidence': json['sentimentConfidence'] == null ? undefined : json['sentimentConfidence'],
'createdAt': json['createdAt'],
'createdAtEpoch': json['createdAtEpoch'] == null ? undefined : json['createdAtEpoch'],
'updatedAt': json['updatedAt'],
};
}
export function FeedbackToJSON(json: any): Feedback {
return FeedbackToJSONTyped(json, false);
}
export function FeedbackToJSONTyped(value?: Feedback | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'content': value['content'],
'source': value['source'],
'submittedBy': value['submittedBy'],
'processed': value['processed'],
'sentimentScore': value['sentimentScore'],
'sentimentCategory': value['sentimentCategory'],
'sentimentConfidence': value['sentimentConfidence'],
'createdAt': value['createdAt'],
'createdAtEpoch': value['createdAtEpoch'],
'updatedAt': value['updatedAt'],
};
}