@gnosticdev/highlevel-sdk
Version:
SDK for the HighLevel API
781 lines • 21.1 kB
TypeScript
//#region src/v2/types/associations.d.ts
interface paths {
'/associations/': {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get all associations for a sub-account / location
* @description Get all Associations
*/
get: operations['find-associations'];
put?: never;
/**
* Create Association
* @description Allow you to create contact - contact , contact - custom objects associations, will add more in the future.Documentation Link - https://doc.clickup.com/8631005/d/h/87cpx-293776/cd0f4122abc04d3
*/
post: operations['create-association'];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
'/associations/{associationId}': {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get association by ID
* @description Using this api you can get SYSTEM_DEFINED / USER_DEFINED association by id
*/
get: operations['get-association-by-ID'];
/**
* Update Association By Id
* @description Update Association , Allows you to update labels of an associations. Documentation Link - https://doc.clickup.com/8631005/d/h/87cpx-293776/cd0f4122abc04d3
*/
put: operations['update-association'];
post?: never;
/**
* Delete Association
* @description Delete USER_DEFINED Association By Id, deleting an association will also all the relations for that association
*/
delete: operations['delete-association'];
options?: never;
head?: never;
patch?: never;
trace?: never;
};
'/associations/key/{key_name}': {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get association key by key name
* @description Using this api you can get standard / user defined association by key
*/
get: operations['get-association-key-by-key-name'];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
'/associations/objectKey/{objectKey}': {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get association by object keys
* @description Get association by object keys like contacts, custom objects and opportunities. Documentation Link - https://doc.clickup.com/8631005/d/h/87cpx-293776/cd0f4122abc04d3
*/
get: operations['get-association-by-object-keys'];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
'/associations/relations': {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Create Relation for you associated entities.
* @description Create Relation.Documentation Link - https://doc.clickup.com/8631005/d/h/87cpx-293776/cd0f4122abc04d3
*/
post: operations['create-relation'];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
'/associations/relations/{recordId}': {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get all relations By record Id
* @description Get all relations by record Id
*/
get: operations['get-relations-by-record-id'];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
'/associations/relations/{relationId}': {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
post?: never;
/**
* Delete Relation
* @description Delete Relation
*/
delete: operations['delete-relation'];
options?: never;
head?: never;
patch?: never;
trace?: never;
};
}
type webhooks = Record<string, never>;
interface components {
schemas: {
BadRequestDTO: {
/** @example Bad Request */message?: string; /** @example 400 */
statusCode?: number;
};
createAssociationReqDto: {
/**
* @description First Objects Key
* @example custom_objects.children
*/
firstObjectKey: Record<string, never>;
/**
* @description First Objects Association Label (custom_objects.children)
* @example student
*/
firstObjectLabel: Record<string, never>;
/**
* @description Association's Unique key
* @example student_teacher
*/
key: string; /** @example string */
locationId: string;
/**
* @description Second Objects Key
* @example contact
*/
secondObjectKey: Record<string, never>;
/**
* @description Second Object Association Label (contact)
* @example Teacher
*/
secondObjectLabel: Record<string, never>;
};
createRelationReqDto: {
/**
* @description Association's Id
* @example ve9EPM428h8vShlRW1KT
*/
associationId: string;
/**
* @description First Record's Id. For instance, if you have an association between a contact and a custom object, and you specify the contact as the first object while creating the association, then your firstRecordId would be the contactId
* @example ve9EPM428h8vShlRW1KT
*/
firstRecordId: string;
/**
* @description Your Sub Account's ID
* @example clF1LD04GTUKN3b3XuOj
*/
locationId: string;
/**
* @description Second Record's Id.For instance, if you have an association between a contact and a custom object, and you specify the custom object as the second entity while creating the association, then your secondRecordId would be the customObject record Id
* @example ve9EPM428h8vShlRW1KT
*/
secondRecordId: string;
};
DeleteAssociationsResponseDTO: {
/**
* @description Deletion status
* @example true
*/
deleted: boolean;
/**
* @description Association Id
* @example 6d6f6e676f5f6576656e7473
*/
id: string; /** @example Association deleted successfully */
message: string;
};
GetPostSuccessfulResponseDto: {
/**
* @description Association Type can be USER_DEFINED or SYSTEM_DEFINED
* @example USER_DEFINED
*/
associationType: Record<string, never>;
/**
* @description First Objects Key
* @example custom_objects.children
*/
firstObjectKey: Record<string, never>;
/**
* @description First Objects Association Label (custom_objects.children)
* @example student
*/
firstObjectLabel: Record<string, never>; /** @example ve9EPM428h8vShlRW1KT */
id: string;
/**
* @description First Objects Association Label (custom_objects.children)
* @example student
*/
key: string; /** @example string */
locationId: string;
/**
* @description Second Objects Key
* @example contact
*/
secondObjectKey: Record<string, never>;
/**
* @description Second Object Association Label (contact)
* @example Teacher
*/
secondObjectLabel: Record<string, never>;
};
UnauthorizedDTO: {
/** @example Unauthorized */error?: string; /** @example Invalid token: access token is invalid */
message?: string; /** @example 401 */
statusCode?: number;
};
UnprocessableDTO: {
/** @example Unprocessable Entity */error?: string;
/**
* @example [
* "Unprocessable Entity"
* ]
*/
message?: string[]; /** @example 422 */
statusCode?: number;
};
UpdateAssociationReqDto: {
/** @example student */firstObjectLabel: Record<string, never>; /** @example tutor */
secondObjectLabel: Record<string, never>;
};
};
responses: never;
parameters: never;
requestBodies: never;
headers: never;
pathItems: never;
}
type $defs = Record<string, never>;
interface operations {
'find-associations': {
parameters: {
query: {
limit: number;
locationId: string;
skip: number;
};
header: {
/** @description API Version */Version: '2021-07-28';
};
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful response */200: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['GetPostSuccessfulResponseDto'];
};
}; /** @description Bad Request */
400: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['BadRequestDTO'];
};
}; /** @description Unauthorized */
401: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnauthorizedDTO'];
};
}; /** @description Unprocessable Entity */
422: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnprocessableDTO'];
};
};
};
};
'create-association': {
parameters: {
query?: never;
header: {
/** @description API Version */Version: '2021-07-28';
};
path?: never;
cookie?: never;
};
requestBody: {
content: {
'application/json': components['schemas']['createAssociationReqDto'];
};
};
responses: {
/** @description Successful response */201: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['GetPostSuccessfulResponseDto'];
};
}; /** @description Bad Request */
400: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['BadRequestDTO'];
};
}; /** @description Unauthorized */
401: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnauthorizedDTO'];
};
}; /** @description Unprocessable Entity */
422: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnprocessableDTO'];
};
};
};
};
'get-association-by-ID': {
parameters: {
query?: never;
header: {
/** @description API Version */Version: '2021-07-28';
};
path: {
associationId: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful response */200: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['GetPostSuccessfulResponseDto'];
};
}; /** @description Bad Request */
400: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['BadRequestDTO'];
};
}; /** @description Unauthorized */
401: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnauthorizedDTO'];
};
}; /** @description Unprocessable Entity */
422: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnprocessableDTO'];
};
};
};
};
'update-association': {
parameters: {
query?: never;
header: {
/** @description API Version */Version: '2021-07-28';
};
path: {
associationId: string;
};
cookie?: never;
};
requestBody: {
content: {
'application/json': components['schemas']['UpdateAssociationReqDto'];
};
};
responses: {
/** @description Successful response */200: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['GetPostSuccessfulResponseDto'];
};
}; /** @description Bad Request */
400: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['BadRequestDTO'];
};
}; /** @description Unauthorized */
401: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnauthorizedDTO'];
};
}; /** @description Unprocessable Entity */
422: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnprocessableDTO'];
};
};
};
};
'delete-association': {
parameters: {
query?: never;
header: {
/** @description API Version */Version: '2021-07-28';
};
path: {
associationId: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful response */200: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['DeleteAssociationsResponseDTO'];
};
}; /** @description Bad Request */
400: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['BadRequestDTO'];
};
}; /** @description Unauthorized */
401: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnauthorizedDTO'];
};
}; /** @description Unprocessable Entity */
422: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnprocessableDTO'];
};
};
};
};
'get-association-key-by-key-name': {
parameters: {
query: {
locationId: string;
};
header: {
/** @description API Version */Version: '2021-07-28';
};
path: {
key_name: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful response */200: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['GetPostSuccessfulResponseDto'];
};
}; /** @description Bad Request */
400: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['BadRequestDTO'];
};
}; /** @description Unauthorized */
401: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnauthorizedDTO'];
};
}; /** @description Unprocessable Entity */
422: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnprocessableDTO'];
};
};
};
};
'get-association-by-object-keys': {
parameters: {
query?: {
locationId?: string;
};
header: {
/** @description API Version */Version: '2021-07-28';
};
path: {
objectKey: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful response */200: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['GetPostSuccessfulResponseDto'];
};
}; /** @description Bad Request */
400: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['BadRequestDTO'];
};
}; /** @description Unauthorized */
401: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnauthorizedDTO'];
};
}; /** @description Unprocessable Entity */
422: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnprocessableDTO'];
};
};
};
};
'create-relation': {
parameters: {
query?: never;
header: {
/** @description API Version */Version: '2021-07-28';
};
path?: never;
cookie?: never;
};
requestBody: {
content: {
'application/json': components['schemas']['createRelationReqDto'];
};
};
responses: {
/** @description Successful response */201: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['GetPostSuccessfulResponseDto'];
};
}; /** @description Bad Request */
400: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['BadRequestDTO'];
};
}; /** @description Unauthorized */
401: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnauthorizedDTO'];
};
}; /** @description Unprocessable Entity */
422: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnprocessableDTO'];
};
};
};
};
'get-relations-by-record-id': {
parameters: {
query: {
/** @description Association Ids */associationIds?: string[];
limit: number; /** @description Your Sub Account's ID */
locationId: string;
skip: number;
};
header: {
/** @description API Version */Version: '2021-07-28';
};
path: {
recordId: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful response */200: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['GetPostSuccessfulResponseDto'];
};
}; /** @description Bad Request */
400: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['BadRequestDTO'];
};
}; /** @description Unauthorized */
401: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnauthorizedDTO'];
};
}; /** @description Unprocessable Entity */
422: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnprocessableDTO'];
};
};
};
};
'delete-relation': {
parameters: {
query: {
/** @description Your Sub Account's ID */locationId: string;
};
header: {
/** @description API Version */Version: '2021-07-28';
};
path: {
relationId: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful response */200: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['GetPostSuccessfulResponseDto'];
};
}; /** @description Bad Request */
400: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['BadRequestDTO'];
};
}; /** @description Unauthorized */
401: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnauthorizedDTO'];
};
}; /** @description Unprocessable Entity */
422: {
headers: {
[name: string]: unknown;
};
content: {
'application/json': components['schemas']['UnprocessableDTO'];
};
};
};
};
}
//#endregion
export { webhooks as a, paths as i, components as n, operations as r, $defs as t };