NotionIntegration.ts•3.92 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 { NotionResponseConfig } from './NotionResponseConfig.js';
import {
NotionResponseConfigFromJSON,
NotionResponseConfigFromJSONTyped,
NotionResponseConfigToJSON,
NotionResponseConfigToJSONTyped,
} from './NotionResponseConfig.js';
/**
* Notion integration record
* @export
* @interface NotionIntegration
*/
export interface NotionIntegration {
/**
*
* @type {number}
* @memberof NotionIntegration
*/
id: number;
/**
*
* @type {string}
* @memberof NotionIntegration
*/
integrationId: NotionIntegrationIntegrationIdEnum;
/**
*
* @type {string}
* @memberof NotionIntegration
*/
workspaceId: string;
/**
*
* @type {string}
* @memberof NotionIntegration
*/
organisationId: string;
/**
*
* @type {NotionResponseConfig}
* @memberof NotionIntegration
*/
config: NotionResponseConfig;
/**
*
* @type {Date}
* @memberof NotionIntegration
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof NotionIntegration
*/
updatedAt: Date;
}
/**
* @export
*/
export const NotionIntegrationIntegrationIdEnum = {
Notion: 'NOTION'
} as const;
export type NotionIntegrationIntegrationIdEnum = typeof NotionIntegrationIntegrationIdEnum[keyof typeof NotionIntegrationIntegrationIdEnum];
/**
* Check if a given object implements the NotionIntegration interface.
*/
export function instanceOfNotionIntegration(value: object): value is NotionIntegration {
if (!('id' in value) || value['id'] === undefined) return false;
if (!('integrationId' in value) || value['integrationId'] === undefined) return false;
if (!('workspaceId' in value) || value['workspaceId'] === undefined) return false;
if (!('organisationId' in value) || value['organisationId'] === undefined) return false;
if (!('config' in value) || value['config'] === undefined) return false;
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
return true;
}
export function NotionIntegrationFromJSON(json: any): NotionIntegration {
return NotionIntegrationFromJSONTyped(json, false);
}
export function NotionIntegrationFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotionIntegration {
if (json == null) {
return json;
}
return {
'id': json['id'],
'integrationId': json['integrationId'],
'workspaceId': json['workspaceId'],
'organisationId': json['organisationId'],
'config': NotionResponseConfigFromJSON(json['config']),
'createdAt': (new Date(json['createdAt'])),
'updatedAt': (new Date(json['updatedAt'])),
};
}
export function NotionIntegrationToJSON(json: any): NotionIntegration {
return NotionIntegrationToJSONTyped(json, false);
}
export function NotionIntegrationToJSONTyped(value?: NotionIntegration | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'integrationId': value['integrationId'],
'workspaceId': value['workspaceId'],
'organisationId': value['organisationId'],
'config': NotionResponseConfigToJSON(value['config']),
'createdAt': ((value['createdAt']).toISOString()),
'updatedAt': ((value['updatedAt']).toISOString()),
};
}