NotionResponseConfig.ts•2.38 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';
/**
* Notion integration configuration in API response (sanitized)
* @export
* @interface NotionResponseConfig
*/
export interface NotionResponseConfig {
/**
* Whether the Notion integration is active
* @type {boolean}
* @memberof NotionResponseConfig
*/
active: boolean;
/**
* User ID who created this integration
* @type {string}
* @memberof NotionResponseConfig
*/
createdBy: string;
/**
*
* @type {Date}
* @memberof NotionResponseConfig
*/
lastSyncedAt?: Date | null;
}
/**
* Check if a given object implements the NotionResponseConfig interface.
*/
export function instanceOfNotionResponseConfig(value: object): value is NotionResponseConfig {
if (!('active' in value) || value['active'] === undefined) return false;
if (!('createdBy' in value) || value['createdBy'] === undefined) return false;
return true;
}
export function NotionResponseConfigFromJSON(json: any): NotionResponseConfig {
return NotionResponseConfigFromJSONTyped(json, false);
}
export function NotionResponseConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotionResponseConfig {
if (json == null) {
return json;
}
return {
'active': json['active'],
'createdBy': json['created_by'],
'lastSyncedAt': json['last_synced_at'] == null ? undefined : (new Date(json['last_synced_at'])),
};
}
export function NotionResponseConfigToJSON(json: any): NotionResponseConfig {
return NotionResponseConfigToJSONTyped(json, false);
}
export function NotionResponseConfigToJSONTyped(value?: NotionResponseConfig | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'active': value['active'],
'created_by': value['createdBy'],
'last_synced_at': value['lastSyncedAt'] == null ? undefined : ((value['lastSyncedAt'] as any).toISOString()),
};
}