0.8.0 • Published 5 years ago

c1-api v0.8.0

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

$ : object

Kind: global namespace
Version: 0.8
Author: Artur Arslanov a.arslanov@pravo.tech

$.scriptsGet

Kind: static interface of $

scriptsGet.scriptTypes() ⇒ Array.<object>

Return all script types

Kind: static method of scriptsGet
Returns: Array.<object> - Array of scripts types
Example

$.scriptsGet.scriptTypes()

scriptsGet.fieldByPath(fieldPath) ⇒ object

Return field info by provided path

Kind: static method of scriptsGet
Returns: object - Field structure

ParamTypeDescription
fieldPathArray.<string>Path like "Проект", "Дело", "Блоки дел", "Обьект"

Example

$.scriptsGet.fieldByPath()

scriptsGet.autoScriptTriggerFields(triggerType) ⇒ object

Return filed by trigger type

Kind: static method of scriptsGet
Returns: object - Field structure

ParamTypeDescription
triggerType'Fill' | 'Update' | 'SystemEvent' | 'Insert' | 'Delete'Trigger type

Example

$.scriptsGet.autoScriptTriggerFields()

scriptsGet.scriptAndFolders() ⇒ Array.<object>

Return scripts and folders

Kind: static method of scriptsGet
Returns: Array.<object> - Array of scripts and folders structures
Example

$.scriptsGet.scriptAndFolders()

$.scriptsSet

Kind: static interface of $

scriptsSet.createOrUpdate(scriptScheme) ⇒ object

Create or update script scheme

Kind: static method of scriptsSet
Returns: object - Script scheme structure

ParamTypeDescription
scriptSchemeobjectScript scheme structure

Example

$.scriptsSet.createOrUpdate(scriptScheme)

scriptsSet.deleteScript(scriptId) ⇒ boolean

Delete script

Kind: static method of scriptsSet
Returns: boolean - Result - true or false

ParamTypeDescription
scriptIdstringScript Id

Example

$.scriptsSet.deleteScript(scriptId)

$.utils

Kind: static interface of $

utils.uuidv4() ⇒ string

Generate groups of 4 random characters

Kind: static method of utils
Returns: string - New uuidv4
Example

$.utils.uuidv4()

$.settingsGet

Kind: static interface of $

settingsGet.instanceSettings() ⇒ object

Get instance bootstrap settings

Kind: static method of settingsGet
Returns: object - Bootstrap structure
Example

$.settingsGet.instanceSettings()

settingsGet.generalSettings() ⇒ object

Get instance general settings

Kind: static method of settingsGet
Returns: object - General settings structure
Example

$.settingsGet.generalSettings()

$.settingsSet

Kind: static interface of $

settingsSet.generalSettings(settingsStructure) ⇒ object

Set instance general settings

Kind: static method of settingsSet
Returns: object - Settings structure

ParamTypeDescription
settingsStructureobjectSettings structure

Example

$.settingsSet.generalSettings(settingsStructure)

$.dictionaryGet

Kind: static interface of $

$.dictionarySet

Kind: static interface of $

dictionarySet.createDict(dictStructure) ⇒ object

Create new dict

Kind: static method of dictionarySet
Returns: object - Dictionary structure

ParamTypeDescription
dictStructureobjectDictionary structure

Example

$.dictionarySet.createDict(dictStructure)

dictionarySet.deleteDict(dictId) ⇒ object

Delete dict by dictId

Kind: static method of dictionarySet
Returns: object - Dictionary structure

ParamTypeDescription
dictIdobjectDictionary Id

Example

$.dictionarySet.deleteDict(dictStructure)

$.projectsGet

Kind: static interface of $

projectsGet.projectSettings(projectId) ⇒ object

Get project settings

Kind: static method of projectsGet
Returns: object - Project settings structure

ParamTypeDescription
projectIdstringProject Id

Example

$.projectsGet.projectSettings(projectId)

projectsGet.projectBlocksTypes() ⇒ Array.<object>

Get all types of created visual blocks elements

Kind: static method of projectsGet
Returns: Array.<object> - Array or single project type
Example

$.projectsGet.projectBlocksTypes(projectId)

projectsGet.relatedProjects(projectId) ⇒ Array.<object>

Get project related projects

Kind: static method of projectsGet
Returns: Array.<object> - Array realted project structure, like { Id: string; Name?: string | undefined; Type?: "Project" | "IntakeForm" | undefined; Description?: string | undefined; }[]

ParamTypeDescription
projectIdstringProject Id

Example

$.projectsGet.relatedProjects(projectId)

projectsGet.projectsByFilters(filterFields, projectClass, page, pageSize, folderName) ⇒ Array.<object>

Get project related projects

Kind: static method of projectsGet
Returns: Array.<object> - Array of base information of projects

ParamTypeDescription
filterFieldsobjectField and values object, like {'Направление': 'продажи'}
projectClassstringClass of project
pagenumberPage number
pageSizenumberPage size
folderNamestringFolder of projects class

Example

$.projectsGet.projectsByFilters({'Направление': 'продажи'}, 'Дело', 1, 20, 'Папка с делами')

$.projectsSet

Kind: static interface of $

projectsSet.relatedProject(params) ⇒ boolean

Get project related projects

Kind: static method of projectsSet
Returns: boolean - Result true or false

ParamTypeDescription
paramsobjectParams to save

Example

$.projectsSet.relatedProject({ Id: string; Type?: "ProjectToProjects" | "ProjectToIntakeObjects" | "IntakeObjectToProjects" | undefined; RelatedObjects: { Id: string; Name?: string | undefined; Type?: "Project" | "IntakeForm" | undefined; Description?: string | undefined; }[])

projectsSet.projectSettings(projectSettingsStructure) ⇒ object

Get project related projects

Kind: static method of projectsSet
Returns: object - Settings structure

ParamTypeDescription
projectSettingsStructureobjectSettings structure

Example

$.projectsSet.projectSettings(projectSettingsStructure)

projectsSet.createProjectClass(classStructure) ⇒ object

Create class of projects

Kind: static method of projectsSet
Returns: object - Class structure

ParamTypeDescription
classStructureobjectClass structure, like { Name: string; Section: string; Icon: string; }

Example

$.projectsSet.createProjectClass({ Name: string; Section: string; Icon: string; })

projectsSet.createProjectType(projectTypeParams) ⇒ object

Create type of project

Kind: static method of projectsSet
Returns: object - Params of project type

ParamTypeDescription
projectTypeParamsobjectParams of project type

Example

$.projectsSet.createProjectType({ Name: string; Section: string; Icon: string; })

projectsSet.updateProjectType(projectTypeParams) ⇒ object

Update type of project

Kind: static method of projectsSet
Returns: object - Params of project type

ParamTypeDescription
projectTypeParamsobjectParams of project type

Example

$.projectsSet.updateProjectType(projectTypeParams)

projectsSet.deleteProjectType(projectTypeId) ⇒ object

Delete type of project

Kind: static method of projectsSet
Returns: object - Project type structure

ParamTypeDescription
projectTypeIdobjectProject type Id

Example

$.projectsSet.deleteProjectType(projectTypeId)

projectsSet.updateVisualBlock(blockData) ⇒ object

Update visulaBlock element

Kind: static method of projectsSet
Returns: object - Project type structure

ParamTypeDescription
blockDataobjectSingle block data

Example

$.projectsSet.updateVisualBlock(projectTypeId)

projectsSet.projectCreate(projectStructure) ⇒ object

Create new project

Kind: static method of projectsSet
Returns: object - Project structure

ParamTypeDescription
projectStructureobjectProject structure

Example

$.projectsSet.projectStructure(projectStructure)

projectsSet.projectCopy(projectStructure) ⇒ string

Copy project with part of data

Kind: static method of projectsSet
Returns: string - Text result

ParamTypeDescription
projectStructureobjectProject structure

Example

$.projectsSet.projectCopy(projectStructure)

projectsSet.updateProject(projectStructure) ⇒ object

Update project

Kind: static method of projectsSet
Returns: object - Project structure

ParamTypeDescription
projectStructureobjectProject structure

Example

$.projectsSet.updateProject(projectStructure, 'mainTab' | 'allTabs')

projectsSet.deleteProject(projectId) ⇒ boolean

Delete project

Kind: static method of projectsSet
Returns: boolean - True

ParamTypeDescription
projectIdobjectProject Id

Example

$.projectsSet.deleteProject(projectId)

$.projectsBlocksGet

Kind: static interface of $

projectsBlocksGet.blockByBlockName(project, blockName, removeIds) ⇒ object

Find block by block name and return it, can use for copy blocks with same structures

Kind: static method of projectsBlocksGet
Returns: object - Block structure

ParamTypeDescription
projectobjectProject structure, obtained by $.projectsGet.projectById(...)
blockNamestringName of block
removeIdsbooleanFalse by defaults

Example

$.projectsBlocksGet.blockByBlockName(project, 'Маркетинг', true)

projectsBlocksGet.pathsByName(project, params) ⇒ Array.<object>

Find path to value in blocks

Kind: static method of projectsBlocksGet
Returns: Array.<object> - FiledPaths array, like { blockId, lineId, FiledId, ...etc }[]

ParamTypeDescription
projectobjectProject structure, obtained by $.projectsGet.projectById(...)
paramsobjectParams for getting path

Example

$.projectsBlocksGet.pathsByName(project, { fieldNames: ['Поле 1', 'Поле 2'], blockName: 'Новый блок' })

projectsBlocksGet.blockIdByBlockName(project, blockName) ⇒ string

Find block by name and return block id

Kind: static method of projectsBlocksGet
Returns: string - Block Id

ParamTypeDescription
projectobjectProject structure, obtained by $.projectsGet.projectById(...)
blockNameobjectName of block

Example

$.projectsBlocksGet.pathsByName(project, 'Новый блок')

projectsBlocksGet.blockByBlockId(project, blockId) ⇒ string

Find block in blocks and return full structure of block

Kind: static method of projectsBlocksGet
Returns: string - Single block structure

ParamTypeDescription
projectobjectProject structure, obtained by $.projectsGet.projectById(...)
blockIdobjectBlock Id

Example

$.projectsBlocksGet.blockByBlockId(project, 'Новый блок')

$.projectsBlocksSet

Kind: static interface of $

projectsBlocksSet.valueToBlock(project, fieldPath, valueToSave)

Save value to block by path, after possible save project by use $.projectsSet.updateProject(...)

Kind: static method of projectsBlocksSet

ParamTypeDescription
projectobjectProject structure, obtained by $.projectsGet.projectById(...)
fieldPathobjectObject like { blockId, lineId, fieldId, blockOrder, lineOrder }, obtained by $.projectsBlockGet.pathByName(...)
valueToSaveanyValue to save

Example

$.projectsBlocksSet.valueToBlock(project, $.projectsBlockGet.pathByName(...), 'valueToSave')

$.filesGet

Kind: static interface of $

filesGet.fileById(fileId, binary) ⇒ string

Get file by Id

Kind: static method of filesGet
Returns: string - Text presentation of file

ParamTypeDescription
fileIdstringFile Id
binarybooleanFormat, by default false

Example

$.filesGet.fileById(fileId, false)

filesGet.fileByDocumentId(documentId, binary) ⇒ string

Get file by document Id

Kind: static method of filesGet
Returns: string - Text presentation of file

ParamTypeDescription
documentIdstringFile Id
binarybooleanFormat, by default false

Example

$.filesGet.fileByDocumentId(documentId, false)

$.filesSet

Kind: static interface of $

filesSet.uploadToFolder(folderId, file, fileName, fileFormat) ⇒ object

Upload file to folder

Kind: static method of filesSet
Returns: object - Attach result structure

ParamTypeDescription
folderIdstringFile Id
filestringText presentstion of file
fileNamestringName of file
fileFormatstring'Binary''Text'

Example

$.filesSet.uploadToFolder(folderId: string, file: string, fileName: string, fileFormat: 'Binary' | 'Text')

$.notificationsSet

Kind: static interface of $

notificationsSet.toSingleUser(notificationStructure) ⇒ object

Send notification to user by id

Kind: static method of notificationsSet
Returns: object - Notification structure

ParamTypeDescription
notificationStructureobjectNotification structure

Example

$.notificationsSet.toSingleUser({ NotificationUserId: string, NotificationHeaderText: string, NotificationText: string, NotificationType: "Success" | "Error" | "Info" | "Attention" })

$.tasksGet

Kind: static interface of $

tasksGet.taskById(taskId) ⇒ object

Get task by taskId

Kind: static method of tasksGet
Returns: object - Task structure

ParamTypeDescription
taskIdstringTask Id

Example

$.tasksGet.taskById(taskId)

$.usersGet

Kind: static interface of $

$.participantsGet

Kind: static interface of $

participantsGet.participantsByFilters(params, type) ⇒ boolean

Get participants by filters

Kind: static method of participantsGet
Returns: boolean - True or false result

ParamTypeDescription
paramsobjectParticipant filter structure
typestring | undefinedType of request - roled or undefined

Example

$.participantsGet.participantsByFilters(params, 'roled')

participantsGet.participantById(participantId) ⇒ object

Get participant

Kind: static method of participantsGet
Returns: object - Participant structure

ParamTypeDescription
participantIdstringParticipant Id

Example

$.participantsGet.participantById(participantId)

participantsGet.blockValueByName(participant, fieldName) ⇒ any

Find value in paticipant blocks

Kind: static method of participantsGet
Returns: any - Field value

ParamTypeDescription
participantobjectParticipant structure
fieldNamestringName of needed field

Example

$.participantsGet.blockValueByName(participantId)

$.participantsSet

Kind: static interface of $

participantsSet.participantToProject(participantInfo) ⇒ object

Set participant to project

Kind: static method of participantsSet
Returns: object - Participant structure

ParamTypeDescription
participantInfoobjectParticipant structure

Example

$.participantsSet.participantToProject(participantInfo)

participantsSet.createParticipant(participantStructure) ⇒ object

Create participant

Kind: static method of participantsSet
Returns: object - Participant structure

ParamTypeDescription
participantStructureobjectParticipant structure

Example

$.participantsSet.createParticipant(participantStructure)

$.feedsGet

Kind: static interface of $

feedsGet.feedById(feedId) ⇒ object

Get feed by feedId

Kind: static method of feedsGet
Returns: object - Structure of feed

ParamTypeDescription
feedIdstringFeed Id

Example

$.feedsGet.feedById(feedId)

feedsGet.feedsByFilters(feedsFilter) ⇒ Array.<object>

Find events in feed by filters

Kind: static method of feedsGet
Returns: Array.<object> - Array of feeds

ParamTypeDescription
feedsFilterobjectFeed filter structure

Example

$.feedsGet.feedsByFilters(feedsFilter)

$.commentsSet

Kind: static interface of $

commentsSet.createComment(commentStructure) ⇒ object

Create comment

Kind: static method of commentsSet
Returns: object - Structure of comment

ParamTypeDescription
commentStructureobjectStructure of comment

Example

$.commentsSet.createComment(commentStructure)

$.eventsSet

Kind: static interface of $

eventsSet.createEvent(eventStructure) ⇒ object

Get event structure by Id

Kind: static method of eventsSet
Returns: object - Event structure

ParamTypeDescription
eventStructureobjectId of event

Example

$.eventsSet.createEvent(eventStructure)

$.eventsGet

Kind: static interface of $

eventsGet.eventTypes() ⇒ Array.<object>

Get all event types

Kind: static method of eventsGet
Returns: Array.<object> - Event types list
Example

$.eventsGet.eventTypes()

$.casebookSet

Kind: static interface of $

casebookSet.enableSync(casebookData) ⇒ boolean

Enable CaseeBook sync

Kind: static method of casebookSet
Returns: boolean - True or false result

ParamTypeDescription
casebookDataobjectRequest structure

Example

$.casebookSet.enableSync({ ProjectId: 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx', CasebookNumber: 1234567 })

$.reportsGet

Kind: static interface of $

reportsGet.reportsList(params) ⇒ object

Kind: static method of reportsGet
Returns: object - Report list

ParamTypeDescription
paramsobjectStructure of request

Example

$.reportsGet.reportsList(reportRequestStructure)

reportsGet.reportData(params) ⇒ Array.<Array.<string>>

Kind: static method of reportsGet
Returns: Array.<Array.<string>> - Report data as lines

ParamTypeDescription
paramsobjectGet report data with filters

Example

$.reportsGet.reportData({ ReportMetadataId: uuid, Filters: { Дата: ['2020-01-01', '2020-01-30'], 'Тип дела':['Продажи'] }})

$.emailSet

Kind: static interface of $

emailSet.send(letter) ⇒ object

Kind: static method of emailSet
Returns: object - Single email structure

ParamTypeDescription
letterobjectSingle email structure

Example

$.emailGet.emailById(params)

$.emailGet

Kind: static interface of $

emailGet.emailById(emailId) ⇒ object

Kind: static method of emailGet
Returns: object - Single email structure

ParamTypeDescription
emailIdstringId of email

Example

$.emailGet.emailById('xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx')
0.8.0

5 years ago

1.0.22

5 years ago

1.0.23

5 years ago

1.0.21

5 years ago

1.0.20

5 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.0

6 years ago