first commit
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,318 @@
|
||||
import type {
|
||||
JsonObject,
|
||||
IDataObject,
|
||||
IExecuteFunctions,
|
||||
IHookFunctions,
|
||||
ILoadOptionsFunctions,
|
||||
INodePropertyOptions,
|
||||
IHttpRequestMethods,
|
||||
IRequestOptions,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
export interface ICustomInterface {
|
||||
name: string;
|
||||
key: string;
|
||||
field_type: string;
|
||||
options?: Array<{
|
||||
id: number;
|
||||
label: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
export interface ICustomProperties {
|
||||
[key: string]: ICustomInterface;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make an API request to Pipedrive
|
||||
*
|
||||
*/
|
||||
export async function pipedriveApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
method: IHttpRequestMethods,
|
||||
endpoint: string,
|
||||
body: IDataObject,
|
||||
query: IDataObject = {},
|
||||
formData?: IDataObject,
|
||||
downloadFile?: boolean,
|
||||
): Promise<any> {
|
||||
const authenticationMethod = this.getNodeParameter('authentication', 0);
|
||||
|
||||
const options: IRequestOptions = {
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
},
|
||||
method,
|
||||
qs: query,
|
||||
uri: `https://api.pipedrive.com/v1${endpoint}`,
|
||||
};
|
||||
|
||||
if (downloadFile === true) {
|
||||
options.encoding = null;
|
||||
} else {
|
||||
options.json = true;
|
||||
}
|
||||
|
||||
if (Object.keys(body).length !== 0) {
|
||||
options.body = body;
|
||||
}
|
||||
|
||||
if (formData !== undefined && Object.keys(formData).length !== 0) {
|
||||
options.formData = formData;
|
||||
}
|
||||
|
||||
if (query === undefined) {
|
||||
query = {};
|
||||
}
|
||||
|
||||
try {
|
||||
const credentialType =
|
||||
authenticationMethod === 'apiToken' ? 'pipedriveApi' : 'pipedriveOAuth2Api';
|
||||
const responseData = await this.helpers.requestWithAuthentication.call(
|
||||
this,
|
||||
credentialType,
|
||||
options,
|
||||
);
|
||||
|
||||
if (downloadFile === true) {
|
||||
return {
|
||||
data: responseData,
|
||||
};
|
||||
}
|
||||
|
||||
if (responseData.success === false) {
|
||||
throw new NodeApiError(this.getNode(), responseData as JsonObject);
|
||||
}
|
||||
|
||||
return {
|
||||
additionalData: responseData.additional_data,
|
||||
data: responseData.data === null ? [] : responseData.data,
|
||||
};
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Make an API request to paginated Pipedrive endpoint
|
||||
* and return all results
|
||||
*
|
||||
* @param {(IHookFunctions | IExecuteFunctions)} this
|
||||
*/
|
||||
export async function pipedriveApiRequestAllItems(
|
||||
this: IHookFunctions | IExecuteFunctions,
|
||||
method: IHttpRequestMethods,
|
||||
endpoint: string,
|
||||
body: IDataObject,
|
||||
query?: IDataObject,
|
||||
): Promise<any> {
|
||||
if (query === undefined) {
|
||||
query = {};
|
||||
}
|
||||
query.limit = 100;
|
||||
query.start = 0;
|
||||
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
let responseData;
|
||||
|
||||
do {
|
||||
responseData = await pipedriveApiRequest.call(this, method, endpoint, body, query);
|
||||
// the search path returns data diferently
|
||||
if (responseData.data.items) {
|
||||
returnData.push.apply(returnData, responseData.data.items as IDataObject[]);
|
||||
} else {
|
||||
returnData.push.apply(returnData, responseData.data as IDataObject[]);
|
||||
}
|
||||
|
||||
query.start = responseData.additionalData.pagination.next_start;
|
||||
} while (responseData.additionalData?.pagination?.more_items_in_collection === true);
|
||||
|
||||
return {
|
||||
data: returnData,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the custom properties from Pipedrive
|
||||
*
|
||||
* @param {(IHookFunctions | IExecuteFunctions)} this
|
||||
*/
|
||||
export async function pipedriveGetCustomProperties(
|
||||
this: IHookFunctions | IExecuteFunctions,
|
||||
resource: string,
|
||||
): Promise<ICustomProperties> {
|
||||
const endpoints: { [key: string]: string } = {
|
||||
activity: '/activityFields',
|
||||
deal: '/dealFields',
|
||||
organization: '/organizationFields',
|
||||
person: '/personFields',
|
||||
product: '/productFields',
|
||||
};
|
||||
|
||||
if (endpoints[resource] === undefined) {
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
`The resource "${resource}" is not supported for resolving custom values!`,
|
||||
);
|
||||
}
|
||||
|
||||
const requestMethod = 'GET';
|
||||
|
||||
const body = {};
|
||||
const qs = {};
|
||||
// Get the custom properties and their values
|
||||
const responseData = await pipedriveApiRequest.call(
|
||||
this,
|
||||
requestMethod,
|
||||
endpoints[resource],
|
||||
body,
|
||||
qs,
|
||||
);
|
||||
|
||||
const customProperties: ICustomProperties = {};
|
||||
|
||||
for (const customPropertyData of responseData.data) {
|
||||
customProperties[customPropertyData.key] = customPropertyData;
|
||||
}
|
||||
return customProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts names and values of custom properties from their actual values to the
|
||||
* Pipedrive internal ones
|
||||
*
|
||||
*/
|
||||
export function pipedriveEncodeCustomProperties(
|
||||
customProperties: ICustomProperties,
|
||||
item: IDataObject,
|
||||
): void {
|
||||
let customPropertyData;
|
||||
|
||||
for (const key of Object.keys(item)) {
|
||||
customPropertyData = Object.values(customProperties).find(
|
||||
(propertyData) => propertyData.name === key,
|
||||
);
|
||||
|
||||
if (customPropertyData !== undefined) {
|
||||
// Is a custom property
|
||||
|
||||
// Check if also the value has to be resolved or just the key
|
||||
if (
|
||||
item[key] !== null &&
|
||||
item[key] !== undefined &&
|
||||
customPropertyData.options !== undefined &&
|
||||
Array.isArray(customPropertyData.options)
|
||||
) {
|
||||
// Has an option key so get the actual option-value
|
||||
const propertyOption = customPropertyData.options.find(
|
||||
(option) => option.label.toString() === item[key]!.toString(),
|
||||
);
|
||||
|
||||
if (propertyOption !== undefined) {
|
||||
item[customPropertyData.key] = propertyOption.id;
|
||||
delete item[key];
|
||||
}
|
||||
} else {
|
||||
// Does already represent the actual value or is null
|
||||
item[customPropertyData.key] = item[key];
|
||||
delete item[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts names and values of custom properties to their actual values
|
||||
*
|
||||
*/
|
||||
export function pipedriveResolveCustomProperties(
|
||||
customProperties: ICustomProperties,
|
||||
item: IDataObject,
|
||||
): void {
|
||||
let customPropertyData;
|
||||
|
||||
const json = item.json as IDataObject;
|
||||
|
||||
// Iterate over all keys and replace the custom ones
|
||||
for (const [key, value] of Object.entries(json)) {
|
||||
if (customProperties[key] !== undefined) {
|
||||
// Is a custom property
|
||||
customPropertyData = customProperties[key];
|
||||
|
||||
// value is not set, so nothing to resolve
|
||||
if (value === null) {
|
||||
json[customPropertyData.name] = value;
|
||||
delete json[key];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (
|
||||
[
|
||||
'date',
|
||||
'address',
|
||||
'double',
|
||||
'monetary',
|
||||
'org',
|
||||
'people',
|
||||
'phone',
|
||||
'text',
|
||||
'time',
|
||||
'user',
|
||||
'varchar',
|
||||
'varchar_auto',
|
||||
'int',
|
||||
'time',
|
||||
'timerange',
|
||||
].includes(customPropertyData.field_type)
|
||||
) {
|
||||
json[customPropertyData.name] = value;
|
||||
delete json[key];
|
||||
// type options
|
||||
} else if (
|
||||
['enum', 'visible_to'].includes(customPropertyData.field_type) &&
|
||||
customPropertyData.options
|
||||
) {
|
||||
const propertyOption = customPropertyData.options.find(
|
||||
(option) => option.id.toString() === value?.toString(),
|
||||
);
|
||||
if (propertyOption !== undefined) {
|
||||
json[customPropertyData.name] = propertyOption.label;
|
||||
delete json[key];
|
||||
}
|
||||
// type multioptions
|
||||
} else if (
|
||||
['set'].includes(customPropertyData.field_type) &&
|
||||
customPropertyData.options &&
|
||||
typeof value === 'string'
|
||||
) {
|
||||
const selectedIds = value.split(',');
|
||||
const selectedLabels = customPropertyData.options
|
||||
.filter((option) => selectedIds.includes(option.id.toString()))
|
||||
.map((option) => option.label);
|
||||
json[customPropertyData.name] = selectedLabels;
|
||||
delete json[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
item.json = json;
|
||||
}
|
||||
|
||||
export function sortOptionParameters(
|
||||
optionParameters: INodePropertyOptions[],
|
||||
): INodePropertyOptions[] {
|
||||
optionParameters.sort((a, b) => {
|
||||
const aName = a.name.toLowerCase();
|
||||
const bName = b.name.toLowerCase();
|
||||
if (aName < bName) {
|
||||
return -1;
|
||||
}
|
||||
if (aName > bName) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
|
||||
return optionParameters;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"node": "n8n-nodes-base.pipedrive",
|
||||
"nodeVersion": "1.0",
|
||||
"codexVersion": "1.0",
|
||||
"categories": ["Sales"],
|
||||
"resources": {
|
||||
"credentialDocumentation": [
|
||||
{
|
||||
"url": "https://docs.n8n.io/integrations/builtin/credentials/pipedrive/"
|
||||
}
|
||||
],
|
||||
"primaryDocumentation": [
|
||||
{
|
||||
"url": "https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.pipedrive/"
|
||||
}
|
||||
],
|
||||
"generic": [
|
||||
{
|
||||
"label": "How to synchronize data between two systems (one-way vs. two-way sync",
|
||||
"icon": "🏬",
|
||||
"url": "https://n8n.io/blog/how-to-sync-data-between-two-systems/"
|
||||
},
|
||||
{
|
||||
"label": "How to get started with CRM automation (with 3 no-code workflow ideas",
|
||||
"icon": "👥",
|
||||
"url": "https://n8n.io/blog/how-to-get-started-with-crm-automation-and-no-code-workflow-ideas/"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"node": "n8n-nodes-base.pipedriveTrigger",
|
||||
"nodeVersion": "1.0",
|
||||
"codexVersion": "1.0",
|
||||
"categories": ["Sales"],
|
||||
"resources": {
|
||||
"credentialDocumentation": [
|
||||
{
|
||||
"url": "https://docs.n8n.io/integrations/builtin/credentials/pipedrive/"
|
||||
}
|
||||
],
|
||||
"primaryDocumentation": [
|
||||
{
|
||||
"url": "https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.pipedrivetrigger/"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,424 @@
|
||||
import basicAuth from 'basic-auth';
|
||||
import type { Response } from 'express';
|
||||
import {
|
||||
type IHookFunctions,
|
||||
type IWebhookFunctions,
|
||||
type ICredentialDataDecryptedObject,
|
||||
type IDataObject,
|
||||
type INodeType,
|
||||
type INodeTypeDescription,
|
||||
type IWebhookResponseData,
|
||||
NodeConnectionTypes,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { pipedriveApiRequest } from './GenericFunctions';
|
||||
|
||||
function authorizationError(resp: Response, realm: string, responseCode: number, message?: string) {
|
||||
if (message === undefined) {
|
||||
message = 'Authorization problem!';
|
||||
if (responseCode === 401) {
|
||||
message = 'Authorization is required!';
|
||||
} else if (responseCode === 403) {
|
||||
message = 'Authorization data is wrong!';
|
||||
}
|
||||
}
|
||||
|
||||
resp.writeHead(responseCode, { 'WWW-Authenticate': `Basic realm="${realm}"` });
|
||||
resp.end(message);
|
||||
return {
|
||||
noWebhookResponse: true,
|
||||
};
|
||||
}
|
||||
const entityOptions = [
|
||||
{
|
||||
name: 'Activity',
|
||||
value: 'activity',
|
||||
},
|
||||
{
|
||||
name: 'Activity Type',
|
||||
value: 'activityType',
|
||||
},
|
||||
{
|
||||
name: 'All',
|
||||
value: '*',
|
||||
},
|
||||
{
|
||||
name: 'Deal',
|
||||
value: 'deal',
|
||||
},
|
||||
{
|
||||
name: 'Note',
|
||||
value: 'note',
|
||||
},
|
||||
{
|
||||
name: 'Organization',
|
||||
value: 'organization',
|
||||
},
|
||||
{
|
||||
name: 'Person',
|
||||
value: 'person',
|
||||
},
|
||||
{
|
||||
name: 'Pipeline',
|
||||
value: 'pipeline',
|
||||
},
|
||||
{
|
||||
name: 'Product',
|
||||
value: 'product',
|
||||
},
|
||||
{
|
||||
name: 'Stage',
|
||||
value: 'stage',
|
||||
},
|
||||
{
|
||||
name: 'User',
|
||||
value: 'user',
|
||||
},
|
||||
];
|
||||
export class PipedriveTrigger implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'Pipedrive Trigger',
|
||||
name: 'pipedriveTrigger',
|
||||
icon: 'file:pipedrive.svg',
|
||||
group: ['trigger'],
|
||||
version: [1, 1.1],
|
||||
defaultVersion: 1.1,
|
||||
description: 'Starts the workflow when Pipedrive events occur',
|
||||
defaults: {
|
||||
name: 'Pipedrive Trigger',
|
||||
},
|
||||
inputs: [],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
credentials: [
|
||||
{
|
||||
name: 'pipedriveApi',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
authentication: ['apiToken'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'pipedriveOAuth2Api',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
authentication: ['oAuth2'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'httpBasicAuth',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
incomingAuthentication: ['basicAuth'],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
webhooks: [
|
||||
{
|
||||
name: 'default',
|
||||
httpMethod: 'POST',
|
||||
responseMode: 'onReceived',
|
||||
path: 'webhook',
|
||||
},
|
||||
],
|
||||
properties: [
|
||||
{
|
||||
displayName: 'Authentication',
|
||||
name: 'authentication',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'API Token',
|
||||
value: 'apiToken',
|
||||
},
|
||||
{
|
||||
name: 'OAuth2',
|
||||
value: 'oAuth2',
|
||||
},
|
||||
],
|
||||
default: 'apiToken',
|
||||
},
|
||||
{
|
||||
displayName: 'Incoming Authentication',
|
||||
name: 'incomingAuthentication',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Basic Auth',
|
||||
value: 'basicAuth',
|
||||
},
|
||||
{
|
||||
name: 'None',
|
||||
value: 'none',
|
||||
},
|
||||
],
|
||||
default: 'none',
|
||||
description: 'If authentication should be activated for the webhook (makes it more secure)',
|
||||
},
|
||||
{
|
||||
displayName: 'Action',
|
||||
name: 'action',
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
hide: {
|
||||
'@version': [{ _cnd: { gte: 1.1 } }],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Added',
|
||||
value: 'added',
|
||||
description: 'Data got added',
|
||||
action: 'Data was added',
|
||||
},
|
||||
{
|
||||
name: 'All',
|
||||
value: '*',
|
||||
description: 'Any change',
|
||||
action: 'Any change',
|
||||
},
|
||||
{
|
||||
name: 'Deleted',
|
||||
value: 'deleted',
|
||||
description: 'Data got deleted',
|
||||
action: 'Data was deleted',
|
||||
},
|
||||
{
|
||||
name: 'Merged',
|
||||
value: 'merged',
|
||||
description: 'Data got merged',
|
||||
action: 'Data was merged',
|
||||
},
|
||||
{
|
||||
name: 'Updated',
|
||||
value: 'updated',
|
||||
description: 'Data got updated',
|
||||
action: 'Data was updated',
|
||||
},
|
||||
],
|
||||
default: '*',
|
||||
description: 'Type of action to receive notifications about',
|
||||
},
|
||||
{
|
||||
displayName: 'Action',
|
||||
name: 'action',
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
hide: {
|
||||
'@version': [{ _cnd: { lte: 1 } }],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'All',
|
||||
value: '*',
|
||||
description: 'Any change',
|
||||
action: 'Any change',
|
||||
},
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
description: 'Data got added',
|
||||
action: 'Data was added',
|
||||
},
|
||||
{
|
||||
name: 'Delete',
|
||||
value: 'delete',
|
||||
description: 'Data got deleted',
|
||||
action: 'Data was deleted',
|
||||
},
|
||||
{
|
||||
name: 'Change',
|
||||
value: 'change',
|
||||
description: 'Data got changed',
|
||||
action: 'Data was changed',
|
||||
},
|
||||
],
|
||||
default: '*',
|
||||
description: 'Type of action to receive notifications about',
|
||||
},
|
||||
{
|
||||
displayName: 'Entity',
|
||||
name: 'entity',
|
||||
type: 'options',
|
||||
options: entityOptions,
|
||||
default: '*',
|
||||
description: 'Type of object to receive notifications about',
|
||||
displayOptions: {
|
||||
hide: {
|
||||
'@version': [{ _cnd: { lte: 1 } }],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Object',
|
||||
name: 'object',
|
||||
type: 'options',
|
||||
options: entityOptions,
|
||||
default: '*',
|
||||
description: 'Type of object to receive notifications about',
|
||||
displayOptions: {
|
||||
hide: {
|
||||
'@version': [{ _cnd: { gte: 1.1 } }],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
webhookMethods = {
|
||||
default: {
|
||||
async checkExists(this: IHookFunctions): Promise<boolean> {
|
||||
const webhookUrl = this.getNodeWebhookUrl('default');
|
||||
|
||||
const webhookData = this.getWorkflowStaticData('node');
|
||||
|
||||
const eventAction = this.getNodeParameter('action') as string;
|
||||
|
||||
const nodeVersion = this.getNode().typeVersion;
|
||||
const entityParamName = nodeVersion === 1 ? 'object' : 'entity';
|
||||
const eventObject = this.getNodeParameter(entityParamName) as string;
|
||||
|
||||
// Webhook got created before so check if it still exists
|
||||
const endpoint = '/webhooks';
|
||||
|
||||
const responseData = await pipedriveApiRequest.call(this, 'GET', endpoint, {});
|
||||
|
||||
if (responseData.data === undefined) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const existingData of responseData.data) {
|
||||
if (
|
||||
existingData.subscription_url === webhookUrl &&
|
||||
existingData.event_action === eventAction &&
|
||||
existingData.event_object === eventObject
|
||||
) {
|
||||
// The webhook exists already
|
||||
webhookData.webhookId = existingData.id;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
async create(this: IHookFunctions): Promise<boolean> {
|
||||
const webhookUrl = this.getNodeWebhookUrl('default');
|
||||
const incomingAuthentication = this.getNodeParameter('incomingAuthentication', 0) as string;
|
||||
const eventAction = this.getNodeParameter('action') as string;
|
||||
const nodeVersion = this.getNode().typeVersion;
|
||||
const entityParamName = nodeVersion === 1 ? 'object' : 'entity';
|
||||
const eventObject = this.getNodeParameter(entityParamName) as string;
|
||||
|
||||
const endpoint = '/webhooks';
|
||||
|
||||
const body = {
|
||||
event_action: eventAction,
|
||||
event_object: eventObject,
|
||||
subscription_url: webhookUrl,
|
||||
http_auth_user: undefined as string | undefined,
|
||||
http_auth_password: undefined as string | undefined,
|
||||
};
|
||||
|
||||
if (incomingAuthentication === 'basicAuth') {
|
||||
let httpBasicAuth;
|
||||
|
||||
try {
|
||||
httpBasicAuth = await this.getCredentials('httpBasicAuth');
|
||||
} catch (error) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
if (httpBasicAuth === undefined || !httpBasicAuth.user || !httpBasicAuth.password) {
|
||||
// Data is not defined on node so can not authenticate
|
||||
return false;
|
||||
}
|
||||
|
||||
body.http_auth_user = httpBasicAuth.user as string;
|
||||
body.http_auth_password = httpBasicAuth.password as string;
|
||||
}
|
||||
|
||||
const responseData = await pipedriveApiRequest.call(this, 'POST', endpoint, body);
|
||||
|
||||
if (responseData.data === undefined || responseData.data.id === undefined) {
|
||||
// Required data is missing so was not successful
|
||||
return false;
|
||||
}
|
||||
|
||||
const webhookData = this.getWorkflowStaticData('node');
|
||||
webhookData.webhookId = responseData.data.id as string;
|
||||
|
||||
return true;
|
||||
},
|
||||
async delete(this: IHookFunctions): Promise<boolean> {
|
||||
const webhookData = this.getWorkflowStaticData('node');
|
||||
|
||||
if (webhookData.webhookId !== undefined) {
|
||||
const endpoint = `/webhooks/${webhookData.webhookId}`;
|
||||
const body = {};
|
||||
|
||||
try {
|
||||
await pipedriveApiRequest.call(this, 'DELETE', endpoint, body);
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Remove from the static workflow data so that it is clear
|
||||
// that no webhooks are registered anymore
|
||||
delete webhookData.webhookId;
|
||||
delete webhookData.webhookEvents;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
async webhook(this: IWebhookFunctions): Promise<IWebhookResponseData> {
|
||||
const req = this.getRequestObject();
|
||||
const resp = this.getResponseObject();
|
||||
const realm = 'Webhook';
|
||||
|
||||
const incomingAuthentication = this.getNodeParameter('incomingAuthentication', 0) as string;
|
||||
|
||||
if (incomingAuthentication === 'basicAuth') {
|
||||
// Basic authorization is needed to call webhook
|
||||
let httpBasicAuth: ICredentialDataDecryptedObject | undefined;
|
||||
|
||||
try {
|
||||
httpBasicAuth = await this.getCredentials<ICredentialDataDecryptedObject>('httpBasicAuth');
|
||||
} catch (error) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
if (httpBasicAuth === undefined || !httpBasicAuth.user || !httpBasicAuth.password) {
|
||||
// Data is not defined on node so can not authenticate
|
||||
return authorizationError(resp, realm, 500, 'No authentication data defined on node!');
|
||||
}
|
||||
|
||||
const basicAuthData = basicAuth(req);
|
||||
|
||||
if (basicAuthData === undefined) {
|
||||
// Authorization data is missing
|
||||
return authorizationError(resp, realm, 401);
|
||||
}
|
||||
|
||||
if (
|
||||
basicAuthData.name !== httpBasicAuth.user ||
|
||||
basicAuthData.pass !== httpBasicAuth.password
|
||||
) {
|
||||
// Provided authentication data is wrong
|
||||
return authorizationError(resp, realm, 403);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
workflowData: [this.helpers.returnJsonArray(req.body as IDataObject[])],
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"assigned_to_user_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"attendees": {
|
||||
"type": "null"
|
||||
},
|
||||
"busy_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"calendar_sync_include_context": {
|
||||
"type": "null"
|
||||
},
|
||||
"company_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"conference_meeting_client": {
|
||||
"type": "null"
|
||||
},
|
||||
"conference_meeting_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"conference_meeting_url": {
|
||||
"type": "null"
|
||||
},
|
||||
"created_by_user_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"done": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"due_date": {
|
||||
"type": "string"
|
||||
},
|
||||
"due_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"duration": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"is_recurring": {
|
||||
"type": "null"
|
||||
},
|
||||
"last_notification_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"last_notification_user_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"location": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_admin_area_level_1": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_admin_area_level_2": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_country": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_formatted_address": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_locality": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_postal_code": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_route": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_street_number": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_sublocality": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_subpremise": {
|
||||
"type": "null"
|
||||
},
|
||||
"marked_as_done_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"notification_language_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"original_start_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"priority": {
|
||||
"type": "null"
|
||||
},
|
||||
"private": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"public_description": {
|
||||
"type": "null"
|
||||
},
|
||||
"rec_master_activity_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"rec_rule": {
|
||||
"type": "null"
|
||||
},
|
||||
"rec_rule_extension": {
|
||||
"type": "null"
|
||||
},
|
||||
"reference_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"reference_type": {
|
||||
"type": "null"
|
||||
},
|
||||
"series": {
|
||||
"type": "null"
|
||||
},
|
||||
"source_timezone": {
|
||||
"type": "null"
|
||||
},
|
||||
"subject": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"type_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"update_user_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"Add time": {
|
||||
"type": "string"
|
||||
},
|
||||
"Apartment/suite no of Location": {
|
||||
"type": "null"
|
||||
},
|
||||
"Assigned to user": {
|
||||
"type": "integer"
|
||||
},
|
||||
"assigned_to_user_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"City/town/village/locality of Location": {
|
||||
"type": "null"
|
||||
},
|
||||
"company_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"conference_meeting_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"Contact person": {
|
||||
"type": "integer"
|
||||
},
|
||||
"Country of Location": {
|
||||
"type": "null"
|
||||
},
|
||||
"Creator": {
|
||||
"type": "integer"
|
||||
},
|
||||
"District/sublocality of Location": {
|
||||
"type": "null"
|
||||
},
|
||||
"Done": {
|
||||
"type": "string"
|
||||
},
|
||||
"Due date": {
|
||||
"type": "string"
|
||||
},
|
||||
"Due time": {
|
||||
"type": "string"
|
||||
},
|
||||
"Duration": {
|
||||
"type": "string"
|
||||
},
|
||||
"Free/busy": {
|
||||
"type": "string"
|
||||
},
|
||||
"Full/combined address of Location": {
|
||||
"type": "null"
|
||||
},
|
||||
"House number of Location": {
|
||||
"type": "null"
|
||||
},
|
||||
"ID": {
|
||||
"type": "integer"
|
||||
},
|
||||
"is_recurring": {
|
||||
"type": "null"
|
||||
},
|
||||
"Last notification time": {
|
||||
"type": "null"
|
||||
},
|
||||
"last_notification_user_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"lead": {
|
||||
"type": "null"
|
||||
},
|
||||
"Lead": {
|
||||
"type": "null"
|
||||
},
|
||||
"lead_title": {
|
||||
"type": "null"
|
||||
},
|
||||
"Location": {
|
||||
"type": "null"
|
||||
},
|
||||
"Marked as done time": {
|
||||
"type": "string"
|
||||
},
|
||||
"Note": {
|
||||
"type": "string"
|
||||
},
|
||||
"Organisation": {
|
||||
"type": "integer"
|
||||
},
|
||||
"original_start_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"Priority": {
|
||||
"type": "null"
|
||||
},
|
||||
"private": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"rec_master_activity_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"rec_rule": {
|
||||
"type": "null"
|
||||
},
|
||||
"rec_rule_extension": {
|
||||
"type": "null"
|
||||
},
|
||||
"reference_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"Region of Location": {
|
||||
"type": "null"
|
||||
},
|
||||
"series": {
|
||||
"type": "null"
|
||||
},
|
||||
"State/county of Location": {
|
||||
"type": "null"
|
||||
},
|
||||
"Street/road name of Location": {
|
||||
"type": "null"
|
||||
},
|
||||
"Subject": {
|
||||
"type": "string"
|
||||
},
|
||||
"Type": {
|
||||
"type": "string"
|
||||
},
|
||||
"type_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"Update time": {
|
||||
"type": "string"
|
||||
},
|
||||
"ZIP/Postal code of Location": {
|
||||
"type": "null"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"assigned_to_user_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"busy_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"company_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"created_by_user_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"done": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"due_date": {
|
||||
"type": "string"
|
||||
},
|
||||
"due_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"duration": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"is_recurring": {
|
||||
"type": "null"
|
||||
},
|
||||
"last_notification_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"last_notification_user_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_admin_area_level_1": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_admin_area_level_2": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_country": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_formatted_address": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_locality": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_postal_code": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_route": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_street_number": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_sublocality": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_subpremise": {
|
||||
"type": "null"
|
||||
},
|
||||
"notification_language_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"original_start_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"private": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"reference_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"series": {
|
||||
"type": "null"
|
||||
},
|
||||
"subject": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"assigned_to_user_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"busy_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"company_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"conference_meeting_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"created_by_user_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"done": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"due_date": {
|
||||
"type": "string"
|
||||
},
|
||||
"due_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"duration": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"is_recurring": {
|
||||
"type": "null"
|
||||
},
|
||||
"last_notification_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"last_notification_user_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"lead": {
|
||||
"type": "null"
|
||||
},
|
||||
"lead_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"lead_title": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_admin_area_level_1": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_admin_area_level_2": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_country": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_formatted_address": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_locality": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_postal_code": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_route": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_street_number": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_sublocality": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_subpremise": {
|
||||
"type": "null"
|
||||
},
|
||||
"marked_as_done_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"notification_language_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"original_start_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"private": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"rec_master_activity_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"rec_rule": {
|
||||
"type": "null"
|
||||
},
|
||||
"rec_rule_extension": {
|
||||
"type": "null"
|
||||
},
|
||||
"reference_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"series": {
|
||||
"type": "null"
|
||||
},
|
||||
"subject": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"type_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"update_user_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,208 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"acv": {
|
||||
"type": "null"
|
||||
},
|
||||
"acv_currency": {
|
||||
"type": "null"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"arr": {
|
||||
"type": "null"
|
||||
},
|
||||
"arr_currency": {
|
||||
"type": "null"
|
||||
},
|
||||
"cc_email": {
|
||||
"type": "string"
|
||||
},
|
||||
"creator_user_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"has_pic": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"deleted": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"done_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"email_messages_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"expected_close_date": {
|
||||
"type": "null"
|
||||
},
|
||||
"files_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"followers_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"formatted_value": {
|
||||
"type": "string"
|
||||
},
|
||||
"formatted_weighted_value": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"last_activity_date": {
|
||||
"type": "null"
|
||||
},
|
||||
"last_activity_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"last_incoming_mail_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"last_outgoing_mail_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"local_lost_date": {
|
||||
"type": "null"
|
||||
},
|
||||
"lost_reason": {
|
||||
"type": "null"
|
||||
},
|
||||
"lost_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"mrr": {
|
||||
"type": "null"
|
||||
},
|
||||
"mrr_currency": {
|
||||
"type": "null"
|
||||
},
|
||||
"next_activity_date": {
|
||||
"type": "null"
|
||||
},
|
||||
"next_activity_duration": {
|
||||
"type": "null"
|
||||
},
|
||||
"next_activity_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"next_activity_note": {
|
||||
"type": "null"
|
||||
},
|
||||
"next_activity_subject": {
|
||||
"type": "null"
|
||||
},
|
||||
"next_activity_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"next_activity_type": {
|
||||
"type": "null"
|
||||
},
|
||||
"notes_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"org_hidden": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"origin": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"participants_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"person_hidden": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"pipeline_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"probability": {
|
||||
"type": "null"
|
||||
},
|
||||
"products_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"stage_change_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"stage_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"stage_order_nr": {
|
||||
"type": "integer"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"undone_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"has_pic": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"visible_to": {
|
||||
"type": "string"
|
||||
},
|
||||
"weighted_value_currency": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,289 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"0bb28fa193c6b091813e9ba57a42aae322b1f098": {
|
||||
"type": "string"
|
||||
},
|
||||
"0d2381bc2f18042052f532661380b2526d5d1418": {
|
||||
"type": "string"
|
||||
},
|
||||
"2b88250c8fe6de6a9c18a843012c3be4120bc977": {
|
||||
"type": "string"
|
||||
},
|
||||
"509080cf228cf9363d8d822ae4e7391e42b46bd0": {
|
||||
"type": "string"
|
||||
},
|
||||
"5a3096c3afe73de34f661fb2f39fd1730b8b9a14": {
|
||||
"type": "integer"
|
||||
},
|
||||
"5bf837804980758d9b007751a08a0282c400d7d8": {
|
||||
"type": "string"
|
||||
},
|
||||
"6978a0bb41b5952de4d88d432af93fcd1cee3c48": {
|
||||
"type": "string"
|
||||
},
|
||||
"6ed765e95e07cb884c5ca83bed7f9129687b06f1": {
|
||||
"type": "string"
|
||||
},
|
||||
"861f700a2a00ee759b696c61c68ad81d6add71b8": {
|
||||
"type": "string"
|
||||
},
|
||||
"943fc1f0be467988db62ed6e53b7662a9e03da71": {
|
||||
"type": "string"
|
||||
},
|
||||
"active": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"age": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"d": {
|
||||
"type": "integer"
|
||||
},
|
||||
"h": {
|
||||
"type": "integer"
|
||||
},
|
||||
"i": {
|
||||
"type": "integer"
|
||||
},
|
||||
"m": {
|
||||
"type": "integer"
|
||||
},
|
||||
"s": {
|
||||
"type": "integer"
|
||||
},
|
||||
"total_seconds": {
|
||||
"type": "integer"
|
||||
},
|
||||
"y": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"average_stage_progress": {
|
||||
"type": "integer"
|
||||
},
|
||||
"average_time_to_won": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"d": {
|
||||
"type": "integer"
|
||||
},
|
||||
"h": {
|
||||
"type": "integer"
|
||||
},
|
||||
"i": {
|
||||
"type": "integer"
|
||||
},
|
||||
"m": {
|
||||
"type": "integer"
|
||||
},
|
||||
"s": {
|
||||
"type": "integer"
|
||||
},
|
||||
"total_seconds": {
|
||||
"type": "integer"
|
||||
},
|
||||
"y": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cc_email": {
|
||||
"type": "string"
|
||||
},
|
||||
"creator_user_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"has_pic": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"deleted": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"done_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"email_messages_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"files_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"followers_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"formatted_value": {
|
||||
"type": "string"
|
||||
},
|
||||
"formatted_weighted_value": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"next_activity_duration": {
|
||||
"type": "null"
|
||||
},
|
||||
"next_activity_note": {
|
||||
"type": "null"
|
||||
},
|
||||
"next_activity_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"notes_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"org_hidden": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"participants_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"person_hidden": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"person_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"primary": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"phone": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"primary": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pipeline_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"products_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"stage_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"stage_order_nr": {
|
||||
"type": "integer"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"stay_in_pipeline_stages": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"order_of_stages": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"undone_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"has_pic": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"visible_to": {
|
||||
"type": "string"
|
||||
},
|
||||
"weighted_value_currency": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"archive_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"cc_email": {
|
||||
"type": "string"
|
||||
},
|
||||
"creator_user_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"has_pic": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"deleted": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"done_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"email_messages_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"files_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"followers_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"formatted_value": {
|
||||
"type": "string"
|
||||
},
|
||||
"formatted_weighted_value": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"is_archived": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"notes_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"org_hidden": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"org_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"cc_email": {
|
||||
"type": "string"
|
||||
},
|
||||
"label_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"people_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"origin": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"participants_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"person_hidden": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"pipeline_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"products_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"stage_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"stage_order_nr": {
|
||||
"type": "integer"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"undone_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"has_pic": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"visible_to": {
|
||||
"type": "string"
|
||||
},
|
||||
"weighted_value_currency": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"notes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"organization": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"owner": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"person": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"result_score": {
|
||||
"type": "number"
|
||||
},
|
||||
"stage": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"visible_to": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,187 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"cc_email": {
|
||||
"type": "string"
|
||||
},
|
||||
"creator_user_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"has_pic": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"deleted": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"done_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"email_messages_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"files_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"followers_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"formatted_value": {
|
||||
"type": "string"
|
||||
},
|
||||
"formatted_weighted_value": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"notes_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"org_hidden": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"participants_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"person_hidden": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"person_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"primary": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"phone": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"primary": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pipeline_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"products_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"stage_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"stage_order_nr": {
|
||||
"type": "integer"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"undone_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"has_pic": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"visible_to": {
|
||||
"type": "string"
|
||||
},
|
||||
"weighted_value_currency": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
+153
@@ -0,0 +1,153 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"assigned_to_user_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"attendees": {
|
||||
"type": "null"
|
||||
},
|
||||
"busy_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"company_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"conference_meeting_client": {
|
||||
"type": "null"
|
||||
},
|
||||
"conference_meeting_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"conference_meeting_url": {
|
||||
"type": "null"
|
||||
},
|
||||
"created_by_user_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"deal_dropbox_bcc": {
|
||||
"type": "string"
|
||||
},
|
||||
"deal_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"deal_title": {
|
||||
"type": "string"
|
||||
},
|
||||
"done": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"due_date": {
|
||||
"type": "string"
|
||||
},
|
||||
"due_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"duration": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"is_recurring": {
|
||||
"type": "null"
|
||||
},
|
||||
"last_notification_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"last_notification_user_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"lead": {
|
||||
"type": "null"
|
||||
},
|
||||
"lead_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"lead_title": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_admin_area_level_1": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_admin_area_level_2": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_country": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_formatted_address": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_locality": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_postal_code": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_route": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_street_number": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_sublocality": {
|
||||
"type": "null"
|
||||
},
|
||||
"location_subpremise": {
|
||||
"type": "null"
|
||||
},
|
||||
"marked_as_done_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"original_start_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"private": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"rec_master_activity_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"rec_rule": {
|
||||
"type": "null"
|
||||
},
|
||||
"rec_rule_extension": {
|
||||
"type": "null"
|
||||
},
|
||||
"reference_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"series": {
|
||||
"type": "null"
|
||||
},
|
||||
"source_timezone": {
|
||||
"type": "null"
|
||||
},
|
||||
"subject": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"type_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"billing_frequency": {
|
||||
"type": "string"
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"deal_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"discount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"discount_type": {
|
||||
"type": "string"
|
||||
},
|
||||
"enabled_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"last_edit": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"order_nr": {
|
||||
"type": "integer"
|
||||
},
|
||||
"product": {
|
||||
"type": "null"
|
||||
},
|
||||
"product_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"quantity": {
|
||||
"type": "integer"
|
||||
},
|
||||
"quantity_formatted": {
|
||||
"type": "string"
|
||||
},
|
||||
"sum_formatted": {
|
||||
"type": "string"
|
||||
},
|
||||
"tax_method": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"cc_email": {
|
||||
"type": "string"
|
||||
},
|
||||
"channel": {
|
||||
"type": "null"
|
||||
},
|
||||
"channel_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"creator_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"is_archived": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"label_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"next_activity_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"origin": {
|
||||
"type": "string"
|
||||
},
|
||||
"origin_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"owner_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"source_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"visible_to": {
|
||||
"type": "string"
|
||||
},
|
||||
"was_seen": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"archive_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"cc_email": {
|
||||
"type": "string"
|
||||
},
|
||||
"creator_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"db247a86f77b7a989f9c2834851c946b26718442": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"is_archived": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"label_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"origin": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"source_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"visible_to": {
|
||||
"type": "string"
|
||||
},
|
||||
"was_seen": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"cc_email": {
|
||||
"type": "string"
|
||||
},
|
||||
"channel_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"creator_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"is_archived": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"label_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"origin": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"source_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"visible_to": {
|
||||
"type": "string"
|
||||
},
|
||||
"was_seen": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"last_update_user_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"organization": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"person": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pinned_to_deal_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"pinned_to_lead_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"pinned_to_organization_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"pinned_to_person_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"user": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"is_you": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"person": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pinned_to_deal_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"pinned_to_lead_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"pinned_to_organization_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"pinned_to_person_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"pinned_to_project_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"project_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"user": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"is_you": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"address_admin_area_level_1": {
|
||||
"type": "null"
|
||||
},
|
||||
"address_admin_area_level_2": {
|
||||
"type": "null"
|
||||
},
|
||||
"address_country": {
|
||||
"type": "null"
|
||||
},
|
||||
"address_formatted_address": {
|
||||
"type": "null"
|
||||
},
|
||||
"address_route": {
|
||||
"type": "null"
|
||||
},
|
||||
"address_sublocality": {
|
||||
"type": "null"
|
||||
},
|
||||
"address_subpremise": {
|
||||
"type": "null"
|
||||
},
|
||||
"cc_email": {
|
||||
"type": "string"
|
||||
},
|
||||
"closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"country_code": {
|
||||
"type": "null"
|
||||
},
|
||||
"delete_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"done_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"edit_name": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email_messages_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"files_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"first_char": {
|
||||
"type": "string"
|
||||
},
|
||||
"followers_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"label_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"last_activity_date": {
|
||||
"type": "null"
|
||||
},
|
||||
"last_activity_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"lost_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"next_activity_date": {
|
||||
"type": "null"
|
||||
},
|
||||
"next_activity_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"next_activity_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"notes_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"owner_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"has_pic": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"people_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"picture_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"related_closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_lost_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_won_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"undone_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"visible_to": {
|
||||
"type": "string"
|
||||
},
|
||||
"won_deals_count": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"category_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"cc_email": {
|
||||
"type": "string"
|
||||
},
|
||||
"closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"country_code": {
|
||||
"type": "null"
|
||||
},
|
||||
"done_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"edit_name": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email_messages_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"files_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"first_char": {
|
||||
"type": "string"
|
||||
},
|
||||
"followers_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"label_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"lost_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"next_activity_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"notes_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"owner_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"has_pic": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"people_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"picture_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"related_closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_lost_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_won_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"undone_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"visible_to": {
|
||||
"type": "string"
|
||||
},
|
||||
"won_deals_count": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"cc_email": {
|
||||
"type": "string"
|
||||
},
|
||||
"closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"company_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"country_code": {
|
||||
"type": "null"
|
||||
},
|
||||
"delete_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"done_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"email_messages_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"files_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"first_char": {
|
||||
"type": "string"
|
||||
},
|
||||
"followers_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"label_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"lost_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"notes_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"owner_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"has_pic": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"people_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"picture_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"related_closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_lost_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_won_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"undone_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"visible_to": {
|
||||
"type": "string"
|
||||
},
|
||||
"won_deals_count": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"custom_fields": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"notes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"owner": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"result_score": {
|
||||
"type": "number"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"visible_to": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"version": 3
|
||||
}
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"annual_revenue": {
|
||||
"type": "null"
|
||||
},
|
||||
"cc_email": {
|
||||
"type": "string"
|
||||
},
|
||||
"closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"country_code": {
|
||||
"type": "null"
|
||||
},
|
||||
"delete_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"done_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"email_messages_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"employee_count": {
|
||||
"type": "null"
|
||||
},
|
||||
"files_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"first_char": {
|
||||
"type": "string"
|
||||
},
|
||||
"followers_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"industry": {
|
||||
"type": "null"
|
||||
},
|
||||
"label_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"linkedin": {
|
||||
"type": "null"
|
||||
},
|
||||
"lost_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"notes_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"owner_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"has_pic": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"people_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"picture_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"related_closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_lost_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_won_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"undone_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"visible_to": {
|
||||
"type": "string"
|
||||
},
|
||||
"website": {
|
||||
"type": "null"
|
||||
},
|
||||
"won_deals_count": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,227 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"birthday": {
|
||||
"type": "null"
|
||||
},
|
||||
"cc_email": {
|
||||
"type": "string"
|
||||
},
|
||||
"closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"delete_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"done_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"email": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"primary": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"email_messages_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"files_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"first_char": {
|
||||
"type": "string"
|
||||
},
|
||||
"followers_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"im": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"primary": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"label_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"last_activity_date": {
|
||||
"type": "null"
|
||||
},
|
||||
"last_activity_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"last_incoming_mail_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"last_outgoing_mail_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"lost_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"next_activity_date": {
|
||||
"type": "null"
|
||||
},
|
||||
"next_activity_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"next_activity_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"notes_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"owner_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"has_pic": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"participant_closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"participant_open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"phone": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"primary": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"picture_id": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_admin_area_level_1": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_admin_area_level_2": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_country": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_formatted_address": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_lat": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_locality": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_long": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_postal_code": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_route": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_street_number": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_sublocality": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_subpremise": {
|
||||
"type": "null"
|
||||
},
|
||||
"related_closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_lost_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_won_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"undone_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"visible_to": {
|
||||
"type": "string"
|
||||
},
|
||||
"won_deals_count": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,238 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"birthday": {
|
||||
"type": "null"
|
||||
},
|
||||
"cc_email": {
|
||||
"type": "string"
|
||||
},
|
||||
"closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"company_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"done_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"email": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"primary": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"email_messages_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"files_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"first_char": {
|
||||
"type": "string"
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"followers_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"im": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"primary": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"label_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"lost_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"notes_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"org_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"cc_email": {
|
||||
"type": "string"
|
||||
},
|
||||
"label_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"people_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"owner_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"has_pic": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"participant_closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"participant_open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"phone": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"primary": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"postal_address_admin_area_level_1": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_admin_area_level_2": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_country": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_formatted_address": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_lat": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_locality": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_long": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_postal_code": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_route": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_street_number": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_sublocality": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_subpremise": {
|
||||
"type": "null"
|
||||
},
|
||||
"related_closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_lost_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_won_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"undone_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"visible_to": {
|
||||
"type": "string"
|
||||
},
|
||||
"won_deals_count": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"version": 2
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"birthday": {
|
||||
"type": "null"
|
||||
},
|
||||
"cc_email": {
|
||||
"type": "string"
|
||||
},
|
||||
"closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"company_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"delete_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"done_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"email": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"primary": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"email_messages_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"files_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"first_char": {
|
||||
"type": "string"
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"followers_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"im": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"primary": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"label_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"lost_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"notes_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"owner_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"has_pic": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"participant_closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"participant_open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"phone": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"primary": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"postal_address_lat": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_long": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_subpremise": {
|
||||
"type": "null"
|
||||
},
|
||||
"related_closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_lost_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_won_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"undone_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"visible_to": {
|
||||
"type": "string"
|
||||
},
|
||||
"won_deals_count": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"custom_fields": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"emails": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"notes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"organization": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"owner": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"phones": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"result_score": {
|
||||
"type": "number"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"visible_to": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"version": 7
|
||||
}
|
||||
@@ -0,0 +1,211 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"cc_email": {
|
||||
"type": "string"
|
||||
},
|
||||
"closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"company_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"delete_time": {
|
||||
"type": "null"
|
||||
},
|
||||
"done_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"email": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"primary": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"email_messages_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"files_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"first_char": {
|
||||
"type": "string"
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"followers_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"im": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"primary": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"label_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"lost_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"notes_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"org_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"cc_email": {
|
||||
"type": "string"
|
||||
},
|
||||
"label_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"people_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"owner_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"has_pic": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"owner_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"participant_closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"participant_open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"phone": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
},
|
||||
"primary": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"postal_address_lat": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_long": {
|
||||
"type": "null"
|
||||
},
|
||||
"postal_address_subpremise": {
|
||||
"type": "null"
|
||||
},
|
||||
"related_closed_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_lost_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_open_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"related_won_deals_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"undone_activities_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"visible_to": {
|
||||
"type": "string"
|
||||
},
|
||||
"won_deals_count": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"1e901332a0666ef17792122457262233cfdb3d15": {
|
||||
"type": "null"
|
||||
},
|
||||
"73794f1db542a544402ab6cd42aaf337d2d8e51b": {
|
||||
"type": "null"
|
||||
},
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"add_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"billing_frequency": {
|
||||
"type": "string"
|
||||
},
|
||||
"billing_frequency_cycles": {
|
||||
"type": "null"
|
||||
},
|
||||
"first_char": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"owner_id": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active_flag": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"has_pic": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"pic_hash": {
|
||||
"type": "null"
|
||||
},
|
||||
"value": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"prices": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"notes": {
|
||||
"type": "string"
|
||||
},
|
||||
"product_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"product_variations": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"prices": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"comment": {
|
||||
"type": "string"
|
||||
},
|
||||
"cost": {
|
||||
"type": "integer"
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"overhead_cost": {
|
||||
"type": "integer"
|
||||
},
|
||||
"price": {
|
||||
"type": "integer"
|
||||
},
|
||||
"price_formatted": {
|
||||
"type": "string"
|
||||
},
|
||||
"product_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"product_variation_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"product_id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"selectable": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"tax": {
|
||||
"type": "integer"
|
||||
},
|
||||
"update_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"visible_to": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns:xlink="http://www.w3.org/1999/xlink" width="60" height="60" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="mask001" mask-type="alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="32" height="32" fill="#26292C"><path d="M2.73694 0H29.2631C30.7746 0 32 1.22507 32 2.73695V29.2631C32 30.7746 30.7749 32 29.2631 32H2.73694C1.22537 32 0 30.7749 0 29.2631V2.73695C0 1.22537 1.22508 0 2.73694 0Z" fill="#26292C"></path></mask><g mask="url(#mask001)" fill="#26292C"><path d="M2.73694 0H29.2631C30.7746 0 32 1.22507 32 2.73695V29.2631C32 30.7746 30.7749 32 29.2631 32H2.73694C1.22537 32 0 30.7749 0 29.2631V2.73695C0 1.22537 1.22508 0 2.73694 0Z" fill="#26292C"></path></g><mask id="mask1" mask-type="alpha" maskUnits="userSpaceOnUse" x="7" y="4" width="18" height="24" fill="#26292C"><path d="M13.3348 13.1766C13.3348 15.3194 14.4219 17.6311 16.8141 17.6311C18.5881 17.6311 20.3819 16.2461 20.3819 13.1451C20.3819 10.4264 18.9718 8.60127 16.8731 8.60127C15.163 8.60127 13.3348 9.80258 13.3348 13.1766ZM17.7158 4.63159C22.0051 4.63159 24.8891 8.02873 24.8891 13.0856C24.8891 18.0629 21.8509 21.5378 17.5076 21.5378C15.4368 21.5378 14.1103 20.6509 13.4168 20.0089C13.4217 20.1611 13.425 20.3316 13.425 20.5136V27.2632H8.98164V9.2797C8.98164 9.01824 8.89802 8.93552 8.63897 8.93552H7.11085V4.99729H10.8393C12.556 4.99729 12.9954 5.87097 13.079 6.54444C13.7759 5.76342 15.2204 4.63159 17.7158 4.63159Z" fill="#26292C"></path></mask><g mask="url(#mask1)" fill="#26292C"><path d="M13.3348 13.1766C13.3348 15.3194 14.4219 17.6311 16.8141 17.6311C18.5881 17.6311 20.3819 16.2461 20.3819 13.1451C20.3819 10.4264 18.9718 8.60127 16.8731 8.60127C15.163 8.60127 13.3348 9.80258 13.3348 13.1766ZM17.7158 4.63159C22.0051 4.63159 24.8891 8.02873 24.8891 13.0856C24.8891 18.0629 21.8509 21.5378 17.5076 21.5378C15.4368 21.5378 14.1103 20.6509 13.4168 20.0089C13.4217 20.1611 13.425 20.3316 13.425 20.5136V27.2632H8.98164V9.2797C8.98164 9.01824 8.89802 8.93552 8.63897 8.93552H7.11085V4.99729H10.8393C12.556 4.99729 12.9954 5.87097 13.079 6.54444C13.7759 5.76342 15.2204 4.63159 17.7158 4.63159Z" fill="#FFFFFF"></path></g></svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,109 @@
|
||||
import type { IHookFunctions } from 'n8n-workflow';
|
||||
|
||||
import { pipedriveApiRequest } from '../GenericFunctions';
|
||||
import { PipedriveTrigger } from '../PipedriveTrigger.node';
|
||||
|
||||
jest.mock('basic-auth');
|
||||
jest.mock('../GenericFunctions');
|
||||
|
||||
describe('PipedriveTrigger', () => {
|
||||
let pipedriveTrigger: PipedriveTrigger;
|
||||
let mockHookFunctions: jest.Mocked<IHookFunctions>;
|
||||
|
||||
beforeEach(() => {
|
||||
pipedriveTrigger = new PipedriveTrigger();
|
||||
|
||||
mockHookFunctions = {
|
||||
getNodeWebhookUrl: jest.fn(),
|
||||
getWorkflowStaticData: jest.fn(),
|
||||
getNodeParameter: jest.fn(),
|
||||
getNode: jest.fn().mockReturnValue({ typeVersion: 1.1 }),
|
||||
} as unknown as jest.Mocked<IHookFunctions>;
|
||||
});
|
||||
|
||||
describe('Webhook Methods', () => {
|
||||
describe('checkExists', () => {
|
||||
it('should return true if webhook already exists', async () => {
|
||||
mockHookFunctions.getNodeWebhookUrl.mockReturnValue('http://test-webhook-url');
|
||||
mockHookFunctions.getWorkflowStaticData.mockReturnValue({});
|
||||
mockHookFunctions.getNodeParameter.mockImplementation((param) => {
|
||||
if (param === 'action') return '*';
|
||||
if (param === 'entity') return 'deal';
|
||||
return null;
|
||||
});
|
||||
|
||||
(pipedriveApiRequest as jest.Mock).mockResolvedValue({
|
||||
data: [
|
||||
{
|
||||
id: '123',
|
||||
subscription_url: 'http://test-webhook-url',
|
||||
event_action: '*',
|
||||
event_object: 'deal',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const result =
|
||||
await pipedriveTrigger.webhookMethods.default.checkExists.call(mockHookFunctions);
|
||||
|
||||
expect(result).toBe(true);
|
||||
expect(mockHookFunctions.getWorkflowStaticData('node').webhookId).toBe('123');
|
||||
});
|
||||
|
||||
it('should return false if no matching webhook exists', async () => {
|
||||
mockHookFunctions.getNodeWebhookUrl.mockReturnValue('http://test-webhook-url');
|
||||
mockHookFunctions.getWorkflowStaticData.mockReturnValue({});
|
||||
mockHookFunctions.getNodeParameter.mockImplementation((param) => {
|
||||
if (param === 'action') return '*';
|
||||
if (param === 'entity') return 'deal';
|
||||
return null;
|
||||
});
|
||||
|
||||
(pipedriveApiRequest as jest.Mock).mockResolvedValue({
|
||||
data: [
|
||||
{
|
||||
subscription_url: 'http://different-url',
|
||||
event_action: 'create',
|
||||
event_object: 'person',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const result =
|
||||
await pipedriveTrigger.webhookMethods.default.checkExists.call(mockHookFunctions);
|
||||
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('create', () => {
|
||||
it('should create a webhook successfully', async () => {
|
||||
mockHookFunctions.getNodeWebhookUrl.mockReturnValue('http://test-webhook-url');
|
||||
mockHookFunctions.getNodeParameter.mockImplementation((param) => {
|
||||
if (param === 'incomingAuthentication') return 'none';
|
||||
if (param === 'action') return '*';
|
||||
if (param === 'entity') return 'deal';
|
||||
return null;
|
||||
});
|
||||
mockHookFunctions.getWorkflowStaticData.mockReturnValue({});
|
||||
|
||||
(pipedriveApiRequest as jest.Mock).mockResolvedValue({
|
||||
data: { id: '123' },
|
||||
});
|
||||
|
||||
const result = await pipedriveTrigger.webhookMethods.default.create.call(mockHookFunctions);
|
||||
|
||||
expect(result).toBe(true);
|
||||
expect(pipedriveApiRequest).toHaveBeenCalledWith(
|
||||
'POST',
|
||||
'/webhooks',
|
||||
expect.objectContaining({
|
||||
event_action: '*',
|
||||
event_object: 'deal',
|
||||
subscription_url: 'http://test-webhook-url',
|
||||
}),
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,89 @@
|
||||
export const currencies = [
|
||||
{ name: 'US Dollar', value: 'USD' },
|
||||
{ name: 'Euro', value: 'EUR' },
|
||||
{ name: 'UAE Dirham', value: 'AED' },
|
||||
{ name: 'Afghani', value: 'AFN' },
|
||||
{ name: 'Lek', value: 'ALL' },
|
||||
{ name: 'Argentine Peso', value: 'ARS' },
|
||||
{ name: 'Australian Dollar', value: 'AUD' },
|
||||
{ name: 'Azerbaijan Manat', value: 'AZN' },
|
||||
{ name: 'Barbados Dollar', value: 'BBD' },
|
||||
{ name: 'Taka', value: 'BDT' },
|
||||
{ name: 'Bulgarian Lev', value: 'BGN' },
|
||||
{ name: 'Bermudian Dollar', value: 'BMD' },
|
||||
{ name: 'Brunei Dollar', value: 'BND' },
|
||||
{ name: 'Boliviano', value: 'BOB' },
|
||||
{ name: 'Brazilian Real', value: 'BRL' },
|
||||
{ name: 'Bahamian Dollar', value: 'BSD' },
|
||||
{ name: 'Pula', value: 'BWP' },
|
||||
{ name: 'Belize Dollar', value: 'BZD' },
|
||||
{ name: 'Canadian Dollar', value: 'CAD' },
|
||||
{ name: 'Swiss Franc', value: 'CHF' },
|
||||
{ name: 'Chilean Peso', value: 'CLP' },
|
||||
{ name: 'Yuan Renminbi', value: 'CNY' },
|
||||
{ name: 'Colombian Peso', value: 'COP' },
|
||||
{ name: 'Costa Rican Colon', value: 'CRC' },
|
||||
{ name: 'Czech Koruna', value: 'CZK' },
|
||||
{ name: 'Danish Krone', value: 'DKK' },
|
||||
{ name: 'Dominican Peso', value: 'DOP' },
|
||||
{ name: 'Algerian Dinar', value: 'DZD' },
|
||||
{ name: 'Egyptian Pound', value: 'EGP' },
|
||||
{ name: 'Fiji Dollar', value: 'FJD' },
|
||||
{ name: 'Pound Sterling', value: 'GBP' },
|
||||
{ name: 'Quetzal', value: 'GTQ' },
|
||||
{ name: 'Hong Kong Dollar', value: 'HKD' },
|
||||
{ name: 'Lempira', value: 'HNL' },
|
||||
{ name: 'Kuna', value: 'HRK' },
|
||||
{ name: 'Forint', value: 'HUF' },
|
||||
{ name: 'Rupiah', value: 'IDR' },
|
||||
{ name: 'New Israeli Sheqel', value: 'ILS' },
|
||||
{ name: 'Indian Rupee', value: 'INR' },
|
||||
{ name: 'Jamaican Dollar', value: 'JMD' },
|
||||
{ name: 'Yen', value: 'JPY' },
|
||||
{ name: 'Kenyan Shilling', value: 'KES' },
|
||||
{ name: 'Won', value: 'KRW' },
|
||||
{ name: 'Tenge', value: 'KZT' },
|
||||
{ name: 'Lao Kip', value: 'LAK' },
|
||||
{ name: 'Lebanese Pound', value: 'LBP' },
|
||||
{ name: 'Sri Lanka Rupee', value: 'LKR' },
|
||||
{ name: 'Liberian Dollar', value: 'LRD' },
|
||||
{ name: 'Moroccan Dirham', value: 'MAD' },
|
||||
{ name: 'Kyat', value: 'MMK' },
|
||||
{ name: 'Pataca', value: 'MOP' },
|
||||
{ name: 'Ouguiya', value: 'MRO' },
|
||||
{ name: 'Mauritius Rupee', value: 'MUR' },
|
||||
{ name: 'Rufiyaa', value: 'MVR' },
|
||||
{ name: 'Mexican Peso', value: 'MXN' },
|
||||
{ name: 'Malaysian Ringgit', value: 'MYR' },
|
||||
{ name: 'Cordoba Oro', value: 'NIO' },
|
||||
{ name: 'Norwegian Krone', value: 'NOK' },
|
||||
{ name: 'Nepalese Rupee', value: 'NPR' },
|
||||
{ name: 'New Zealand Dollar', value: 'NZD' },
|
||||
{ name: 'Sol', value: 'PEN' },
|
||||
{ name: 'Kina', value: 'PGK' },
|
||||
{ name: 'Philippine Peso', value: 'PHP' },
|
||||
{ name: 'Pakistan Rupee', value: 'PKR' },
|
||||
{ name: 'Zloty', value: 'PLN' },
|
||||
{ name: 'Qatari Rial', value: 'QAR' },
|
||||
{ name: 'Romanian Leu', value: 'RON' },
|
||||
{ name: 'Russian Ruble', value: 'RUB' },
|
||||
{ name: 'Saudi Riyal', value: 'SAR' },
|
||||
{ name: 'Solomon Islands Dollar', value: 'SBD' },
|
||||
{ name: 'Seychelles Rupee', value: 'SCR' },
|
||||
{ name: 'Swedish Krona', value: 'SEK' },
|
||||
{ name: 'Singapore Dollar', value: 'SGD' },
|
||||
{ name: 'Syrian Pound', value: 'SYP' },
|
||||
{ name: 'Baht', value: 'THB' },
|
||||
{ name: 'Pa’anga', value: 'TOP' },
|
||||
{ name: 'Turkish Lira', value: 'TRY' },
|
||||
{ name: 'Trinidad and Tobago Dollar', value: 'TTD' },
|
||||
{ name: 'New Taiwan Dollar', value: 'TWD' },
|
||||
{ name: 'Hryvnia', value: 'UAH' },
|
||||
{ name: 'Dong', value: 'VND' },
|
||||
{ name: 'Vatu', value: 'VUV' },
|
||||
{ name: 'Tala', value: 'WST' },
|
||||
{ name: 'East Caribbean Dollar', value: 'XCD' },
|
||||
{ name: 'West African CFA Franc', value: 'XOF' },
|
||||
{ name: 'Yemeni Rial', value: 'YER' },
|
||||
{ name: 'Rand', value: 'ZAR' },
|
||||
];
|
||||
Reference in New Issue
Block a user