/* tslint:disable */
/* eslint-disable */
/**
* Squad API
* API for managing Squad resources
*
* The version of the OpenAPI document: 4.8.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';
/**
* Gong integration configuration stored in database
* @export
* @interface GongDbConfig
*/
export interface GongDbConfig {
/**
* Whether the Gong integration is active
* @type {boolean}
* @memberof GongDbConfig
*/
active: boolean;
/**
* User ID who created this integration
* @type {string}
* @memberof GongDbConfig
*/
createdBy: string;
/**
* Composio connection ID for managing the OAuth connection
* @type {string}
* @memberof GongDbConfig
*/
composioConnectionId: string;
/**
* RSA public key from Gong for webhook JWT verification. User pastes this from Gong UI after configuring the webhook.
* @type {string}
* @memberof GongDbConfig
*/
webhookPublicKey?: string;
}
/**
* Check if a given object implements the GongDbConfig interface.
*/
export function instanceOfGongDbConfig(value: object): value is GongDbConfig {
if (!('active' in value) || value['active'] === undefined) return false;
if (!('createdBy' in value) || value['createdBy'] === undefined) return false;
if (!('composioConnectionId' in value) || value['composioConnectionId'] === undefined) return false;
return true;
}
export function GongDbConfigFromJSON(json: any): GongDbConfig {
return GongDbConfigFromJSONTyped(json, false);
}
export function GongDbConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): GongDbConfig {
if (json == null) {
return json;
}
return {
'active': json['active'],
'createdBy': json['created_by'],
'composioConnectionId': json['composio_connection_id'],
'webhookPublicKey': json['webhook_public_key'] == null ? undefined : json['webhook_public_key'],
};
}
export function GongDbConfigToJSON(json: any): GongDbConfig {
return GongDbConfigToJSONTyped(json, false);
}
export function GongDbConfigToJSONTyped(value?: GongDbConfig | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'active': value['active'],
'created_by': value['createdBy'],
'composio_connection_id': value['composioConnectionId'],
'webhook_public_key': value['webhookPublicKey'],
};
}