OpportunityArrayResponse.ts•2.24 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 { OpportunityWithRelationships } from './OpportunityWithRelationships.js';
import {
OpportunityWithRelationshipsFromJSON,
OpportunityWithRelationshipsFromJSONTyped,
OpportunityWithRelationshipsToJSON,
OpportunityWithRelationshipsToJSONTyped,
} from './OpportunityWithRelationships.js';
/**
* Response containing an array of opportunities
* @export
* @interface OpportunityArrayResponse
*/
export interface OpportunityArrayResponse {
/**
* Array of opportunities
* @type {Array<OpportunityWithRelationships>}
* @memberof OpportunityArrayResponse
*/
data: Array<OpportunityWithRelationships>;
}
/**
* Check if a given object implements the OpportunityArrayResponse interface.
*/
export function instanceOfOpportunityArrayResponse(value: object): value is OpportunityArrayResponse {
if (!('data' in value) || value['data'] === undefined) return false;
return true;
}
export function OpportunityArrayResponseFromJSON(json: any): OpportunityArrayResponse {
return OpportunityArrayResponseFromJSONTyped(json, false);
}
export function OpportunityArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpportunityArrayResponse {
if (json == null) {
return json;
}
return {
'data': ((json['data'] as Array<any>).map(OpportunityWithRelationshipsFromJSON)),
};
}
export function OpportunityArrayResponseToJSON(json: any): OpportunityArrayResponse {
return OpportunityArrayResponseToJSONTyped(json, false);
}
export function OpportunityArrayResponseToJSONTyped(value?: OpportunityArrayResponse | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'data': ((value['data'] as Array<any>).map(OpportunityWithRelationshipsToJSON)),
};
}