UNPKG

@vectorize-io/vectorize-client

Version:
95 lines (81 loc) 2.6 kB
/* tslint:disable */ /* eslint-disable */ /** * Vectorize API * API for Vectorize services (Beta) * * The version of the OpenAPI document: 0.1.2 * * * 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'; /** * Configuration for Intercom connector * @export * @interface INTERCOMConfig */ export interface INTERCOMConfig { /** * Created After. Filter for conversations created after this date. Example: Enter a date: Example 2012-12-31 * @type {Date} * @memberof INTERCOMConfig */ createdAt: Date; /** * Updated After. Filter for conversations updated after this date. Example: Enter a date: Example 2012-12-31 * @type {Date} * @memberof INTERCOMConfig */ updatedAt?: Date; /** * State * @type {Array<string>} * @memberof INTERCOMConfig */ state?: INTERCOMConfigStateEnum; } /** * @export */ export const INTERCOMConfigStateEnum = { Open: 'open', Closed: 'closed', Snoozed: 'snoozed' } as const; export type INTERCOMConfigStateEnum = typeof INTERCOMConfigStateEnum[keyof typeof INTERCOMConfigStateEnum]; /** * Check if a given object implements the INTERCOMConfig interface. */ export function instanceOfINTERCOMConfig(value: object): value is INTERCOMConfig { if (!('createdAt' in value) || value['createdAt'] === undefined) return false; return true; } export function INTERCOMConfigFromJSON(json: any): INTERCOMConfig { return INTERCOMConfigFromJSONTyped(json, false); } export function INTERCOMConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): INTERCOMConfig { if (json == null) { return json; } return { 'createdAt': (new Date(json['created_at'])), 'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])), 'state': json['state'] == null ? undefined : json['state'], }; } export function INTERCOMConfigToJSON(json: any): INTERCOMConfig { return INTERCOMConfigToJSONTyped(json, false); } export function INTERCOMConfigToJSONTyped(value?: INTERCOMConfig | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'created_at': ((value['createdAt']).toISOString().substring(0,10)), 'updated_at': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString().substring(0,10)), 'state': value['state'], }; }