InsightArrayResponse.ts•2.13 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';
import type { InsightWithRelationships } from './InsightWithRelationships.js';
import {
InsightWithRelationshipsFromJSON,
InsightWithRelationshipsFromJSONTyped,
InsightWithRelationshipsToJSON,
InsightWithRelationshipsToJSONTyped,
} from './InsightWithRelationships.js';
/**
* Response containing an array of insight items
* @export
* @interface InsightArrayResponse
*/
export interface InsightArrayResponse {
/**
* Array of insight items
* @type {Array<InsightWithRelationships>}
* @memberof InsightArrayResponse
*/
data: Array<InsightWithRelationships>;
}
/**
* Check if a given object implements the InsightArrayResponse interface.
*/
export function instanceOfInsightArrayResponse(value: object): value is InsightArrayResponse {
if (!('data' in value) || value['data'] === undefined) return false;
return true;
}
export function InsightArrayResponseFromJSON(json: any): InsightArrayResponse {
return InsightArrayResponseFromJSONTyped(json, false);
}
export function InsightArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): InsightArrayResponse {
if (json == null) {
return json;
}
return {
'data': ((json['data'] as Array<any>).map(InsightWithRelationshipsFromJSON)),
};
}
export function InsightArrayResponseToJSON(json: any): InsightArrayResponse {
return InsightArrayResponseToJSONTyped(json, false);
}
export function InsightArrayResponseToJSONTyped(value?: InsightArrayResponse | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'data': ((value['data'] as Array<any>).map(InsightWithRelationshipsToJSON)),
};
}