CreateFeedbackRequest.ts•3.81 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';
/**
* Request schema for creating feedback
* @export
* @interface CreateFeedbackRequest
*/
export interface CreateFeedbackRequest {
/**
* Original raw feedback content
* @type {string}
* @memberof CreateFeedbackRequest
*/
content: string;
/**
* Source of the feedback
* @type {string}
* @memberof CreateFeedbackRequest
*/
source: string;
/**
* Sentiment score from -1 (negative) to 1 (positive)
* @type {number}
* @memberof CreateFeedbackRequest
*/
sentimentScore?: number;
/**
* Sentiment classification category
* @type {string}
* @memberof CreateFeedbackRequest
*/
sentimentCategory?: CreateFeedbackRequestSentimentCategoryEnum;
/**
* Confidence in sentiment analysis (0-1)
* @type {number}
* @memberof CreateFeedbackRequest
*/
sentimentConfidence?: number;
/**
* Unix epoch timestamp for efficient Neo4j queries
* @type {number}
* @memberof CreateFeedbackRequest
*/
createdAtEpoch?: number;
/**
*
* @type {string}
* @memberof CreateFeedbackRequest
*/
id?: string;
}
/**
* @export
*/
export const CreateFeedbackRequestSentimentCategoryEnum = {
Positive: 'Positive',
Neutral: 'Neutral',
Negative: 'Negative'
} as const;
export type CreateFeedbackRequestSentimentCategoryEnum = typeof CreateFeedbackRequestSentimentCategoryEnum[keyof typeof CreateFeedbackRequestSentimentCategoryEnum];
/**
* Check if a given object implements the CreateFeedbackRequest interface.
*/
export function instanceOfCreateFeedbackRequest(value: object): value is CreateFeedbackRequest {
if (!('content' in value) || value['content'] === undefined) return false;
if (!('source' in value) || value['source'] === undefined) return false;
return true;
}
export function CreateFeedbackRequestFromJSON(json: any): CreateFeedbackRequest {
return CreateFeedbackRequestFromJSONTyped(json, false);
}
export function CreateFeedbackRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateFeedbackRequest {
if (json == null) {
return json;
}
return {
'content': json['content'],
'source': json['source'],
'sentimentScore': json['sentimentScore'] == null ? undefined : json['sentimentScore'],
'sentimentCategory': json['sentimentCategory'] == null ? undefined : json['sentimentCategory'],
'sentimentConfidence': json['sentimentConfidence'] == null ? undefined : json['sentimentConfidence'],
'createdAtEpoch': json['createdAtEpoch'] == null ? undefined : json['createdAtEpoch'],
'id': json['id'] == null ? undefined : json['id'],
};
}
export function CreateFeedbackRequestToJSON(json: any): CreateFeedbackRequest {
return CreateFeedbackRequestToJSONTyped(json, false);
}
export function CreateFeedbackRequestToJSONTyped(value?: CreateFeedbackRequest | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'content': value['content'],
'source': value['source'],
'sentimentScore': value['sentimentScore'],
'sentimentCategory': value['sentimentCategory'],
'sentimentConfidence': value['sentimentConfidence'],
'createdAtEpoch': value['createdAtEpoch'],
'id': value['id'],
};
}