connectwise-rest 0.25.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +17 -52
- package/.gitattributes +1 -0
- package/.mocharc.json +5 -0
- package/.prettierrc +7 -0
- package/README.md +293 -230
- package/api-extractor.json +364 -0
- package/dist/Automate/AVTemplatePoliciesAPI.d.ts +36 -0
- package/dist/Automate/AVTemplatePoliciesAPI.d.ts.map +1 -0
- package/dist/Automate/AVTemplatePoliciesAPI.js +92 -0
- package/dist/Automate/AVTemplatePoliciesAPI.js.map +1 -0
- package/dist/Automate/ClientsAPI.d.ts +44 -0
- package/dist/Automate/ClientsAPI.d.ts.map +1 -0
- package/dist/Automate/ClientsAPI.js +119 -0
- package/dist/Automate/ClientsAPI.js.map +1 -0
- package/dist/Automate/CommandsAPI.d.ts +20 -0
- package/dist/Automate/CommandsAPI.d.ts.map +1 -0
- package/dist/Automate/CommandsAPI.js +36 -0
- package/dist/Automate/CommandsAPI.js.map +1 -0
- package/dist/Automate/ComputersAPI.d.ts +131 -0
- package/dist/Automate/ComputersAPI.d.ts.map +1 -0
- package/dist/Automate/ComputersAPI.js +358 -0
- package/dist/Automate/ComputersAPI.js.map +1 -0
- package/dist/Automate/ContactsAPI.d.ts +24 -0
- package/dist/Automate/ContactsAPI.d.ts.map +1 -0
- package/dist/Automate/ContactsAPI.js +50 -0
- package/dist/Automate/ContactsAPI.js.map +1 -0
- package/dist/Automate/DataViewsAPI.d.ts +22 -0
- package/dist/Automate/DataViewsAPI.d.ts.map +1 -0
- package/dist/Automate/DataViewsAPI.js +36 -0
- package/dist/Automate/DataViewsAPI.js.map +1 -0
- package/dist/Automate/DrivesAPI.d.ts +25 -0
- package/dist/Automate/DrivesAPI.d.ts.map +1 -0
- package/dist/Automate/DrivesAPI.js +57 -0
- package/dist/Automate/DrivesAPI.js.map +1 -0
- package/dist/Automate/EventLogsAPI.d.ts +19 -0
- package/dist/Automate/EventLogsAPI.d.ts.map +1 -0
- package/dist/Automate/EventLogsAPI.js +29 -0
- package/dist/Automate/EventLogsAPI.js.map +1 -0
- package/dist/Automate/LocationsAPI.d.ts +57 -0
- package/dist/Automate/LocationsAPI.d.ts.map +1 -0
- package/dist/Automate/LocationsAPI.js +138 -0
- package/dist/Automate/LocationsAPI.js.map +1 -0
- package/dist/Automate/MaintenanceWindowDefinitionsAPI.d.ts +19 -0
- package/dist/Automate/MaintenanceWindowDefinitionsAPI.d.ts.map +1 -0
- package/dist/Automate/MaintenanceWindowDefinitionsAPI.js +29 -0
- package/dist/Automate/MaintenanceWindowDefinitionsAPI.js.map +1 -0
- package/dist/Automate/MonitorsAPI.d.ts +29 -0
- package/dist/Automate/MonitorsAPI.d.ts.map +1 -0
- package/dist/Automate/MonitorsAPI.js +85 -0
- package/dist/Automate/MonitorsAPI.js.map +1 -0
- package/dist/Automate/NetworkDevicesAPI.d.ts +23 -0
- package/dist/Automate/NetworkDevicesAPI.d.ts.map +1 -0
- package/dist/Automate/NetworkDevicesAPI.js +43 -0
- package/dist/Automate/NetworkDevicesAPI.js.map +1 -0
- package/dist/Automate/PatchingAPI.d.ts +33 -0
- package/dist/Automate/PatchingAPI.d.ts.map +1 -0
- package/dist/Automate/PatchingAPI.js +99 -0
- package/dist/Automate/PatchingAPI.js.map +1 -0
- package/dist/Automate/RemoteAgentAPI.d.ts +24 -0
- package/dist/Automate/RemoteAgentAPI.d.ts.map +1 -0
- package/dist/Automate/RemoteAgentAPI.js +50 -0
- package/dist/Automate/RemoteAgentAPI.js.map +1 -0
- package/dist/Automate/ScriptingAPI.d.ts +41 -0
- package/dist/Automate/ScriptingAPI.d.ts.map +1 -0
- package/dist/Automate/ScriptingAPI.js +109 -0
- package/dist/Automate/ScriptingAPI.js.map +1 -0
- package/dist/Automate/SearchesAPI.d.ts +23 -0
- package/dist/Automate/SearchesAPI.d.ts.map +1 -0
- package/dist/Automate/SearchesAPI.js +43 -0
- package/dist/Automate/SearchesAPI.js.map +1 -0
- package/dist/Automate/SystemAPI.d.ts +97 -0
- package/dist/Automate/SystemAPI.d.ts.map +1 -0
- package/dist/Automate/SystemAPI.js +273 -0
- package/dist/Automate/SystemAPI.js.map +1 -0
- package/dist/Automate/TicketsAPI.d.ts +14 -0
- package/dist/Automate/TicketsAPI.d.ts.map +1 -0
- package/dist/Automate/TicketsAPI.js +29 -0
- package/dist/Automate/TicketsAPI.js.map +1 -0
- package/dist/Automate/UserProfilesAPI.d.ts +19 -0
- package/dist/Automate/UserProfilesAPI.d.ts.map +1 -0
- package/dist/Automate/UserProfilesAPI.js +28 -0
- package/dist/Automate/UserProfilesAPI.js.map +1 -0
- package/dist/Automate.d.ts +43 -0
- package/dist/Automate.d.ts.map +1 -0
- package/dist/Automate.js +164 -0
- package/dist/Automate.js.map +1 -0
- package/dist/AutomateAPI.d.ts +129 -0
- package/dist/AutomateAPI.d.ts.map +1 -0
- package/dist/AutomateAPI.js +175 -0
- package/dist/AutomateAPI.js.map +1 -0
- package/dist/AutomateTypes.d.ts +10437 -0
- package/dist/AutomateTypes.d.ts.map +1 -0
- package/dist/AutomateTypes.js +3 -0
- package/dist/AutomateTypes.js.map +1 -0
- package/dist/BaseAPI.d.ts +26 -0
- package/dist/BaseAPI.d.ts.map +1 -0
- package/dist/BaseAPI.js +116 -0
- package/dist/BaseAPI.js.map +1 -0
- package/dist/Manage/CompanyAPI.d.ts +662 -0
- package/dist/Manage/CompanyAPI.d.ts.map +1 -0
- package/dist/Manage/CompanyAPI.js +3299 -0
- package/dist/Manage/CompanyAPI.js.map +1 -0
- package/dist/Manage/ConfigurationsAPI.d.ts +32 -0
- package/dist/Manage/ConfigurationsAPI.d.ts.map +1 -0
- package/dist/Manage/ConfigurationsAPI.js +78 -0
- package/dist/Manage/ConfigurationsAPI.js.map +1 -0
- package/dist/Manage/ExpenseAPI.d.ts +85 -0
- package/dist/Manage/ExpenseAPI.d.ts.map +1 -0
- package/dist/Manage/ExpenseAPI.js +311 -0
- package/dist/Manage/ExpenseAPI.js.map +1 -0
- package/dist/Manage/FinanceAPI.d.ts +538 -0
- package/dist/Manage/FinanceAPI.d.ts.map +1 -0
- package/dist/Manage/FinanceAPI.js +2592 -0
- package/dist/Manage/FinanceAPI.js.map +1 -0
- package/dist/Manage/MarketingAPI.d.ts +142 -0
- package/dist/Manage/MarketingAPI.d.ts.map +1 -0
- package/dist/Manage/MarketingAPI.js +634 -0
- package/dist/Manage/MarketingAPI.js.map +1 -0
- package/dist/Manage/ProcurementAPI.d.ts +435 -0
- package/dist/Manage/ProcurementAPI.d.ts.map +1 -0
- package/dist/Manage/ProcurementAPI.js +2103 -0
- package/dist/Manage/ProcurementAPI.js.map +1 -0
- package/dist/Manage/ProjectAPI.d.ts +215 -0
- package/dist/Manage/ProjectAPI.d.ts.map +1 -0
- package/dist/Manage/ProjectAPI.js +945 -0
- package/dist/Manage/ProjectAPI.js.map +1 -0
- package/dist/Manage/SalesAPI.d.ts +299 -0
- package/dist/Manage/SalesAPI.d.ts.map +1 -0
- package/dist/Manage/SalesAPI.js +1397 -0
- package/dist/Manage/SalesAPI.js.map +1 -0
- package/dist/Manage/ScheduleAPI.d.ts +132 -0
- package/dist/Manage/ScheduleAPI.d.ts.map +1 -0
- package/dist/Manage/ScheduleAPI.js +580 -0
- package/dist/Manage/ScheduleAPI.js.map +1 -0
- package/dist/Manage/ServiceAPI.d.ts +493 -0
- package/dist/Manage/ServiceAPI.d.ts.map +1 -0
- package/dist/Manage/ServiceAPI.js +2339 -0
- package/dist/Manage/ServiceAPI.js.map +1 -0
- package/dist/Manage/SystemAPI.d.ts +954 -0
- package/dist/Manage/SystemAPI.d.ts.map +1 -0
- package/dist/Manage/SystemAPI.js +4536 -0
- package/dist/Manage/SystemAPI.js.map +1 -0
- package/dist/Manage/TimeAPI.d.ts +186 -0
- package/dist/Manage/TimeAPI.d.ts.map +1 -0
- package/dist/Manage/TimeAPI.js +840 -0
- package/dist/Manage/TimeAPI.js.map +1 -0
- package/dist/Manage.d.ts +39 -0
- package/dist/Manage.d.ts.map +1 -0
- package/dist/Manage.js +137 -0
- package/dist/Manage.js.map +1 -0
- package/dist/ManageAPI.d.ts +135 -0
- package/dist/ManageAPI.d.ts.map +1 -0
- package/dist/ManageAPI.js +115 -0
- package/dist/ManageAPI.js.map +1 -0
- package/dist/ManageTypes.d.ts +91320 -0
- package/dist/ManageTypes.d.ts.map +1 -0
- package/dist/ManageTypes.js +7 -0
- package/dist/ManageTypes.js.map +1 -0
- package/dist/connectwise-rest.d.ts +108638 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/dist/types.d.ts +48 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +21 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/Callback.d.ts +70 -0
- package/dist/utils/Callback.d.ts.map +1 -0
- package/dist/utils/Callback.js +109 -0
- package/dist/utils/Callback.js.map +1 -0
- package/dist/utils/Series.d.ts +42 -0
- package/dist/utils/Series.d.ts.map +1 -0
- package/dist/utils/Series.js +68 -0
- package/dist/utils/Series.js.map +1 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +11 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +50 -19
- package/src/Automate/AVTemplatePoliciesAPI.ts +124 -0
- package/src/Automate/ClientsAPI.ts +172 -0
- package/src/Automate/CommandsAPI.ts +39 -0
- package/src/Automate/ComputersAPI.ts +588 -0
- package/src/Automate/ContactsAPI.ts +63 -0
- package/src/Automate/DataViewsAPI.ts +43 -0
- package/src/Automate/DrivesAPI.ts +81 -0
- package/src/Automate/EventLogsAPI.ts +31 -0
- package/src/Automate/LocationsAPI.ts +222 -0
- package/src/Automate/MaintenanceWindowDefinitionsAPI.ts +34 -0
- package/src/Automate/MonitorsAPI.ts +101 -0
- package/src/Automate/NetworkDevicesAPI.ts +51 -0
- package/src/Automate/PatchingAPI.ts +116 -0
- package/src/Automate/RemoteAgentAPI.ts +65 -0
- package/src/Automate/ScriptingAPI.ts +147 -0
- package/src/Automate/SearchesAPI.ts +49 -0
- package/src/Automate/SystemAPI.ts +412 -0
- package/src/Automate/TicketsAPI.ts +29 -0
- package/src/Automate/UserProfilesAPI.ts +31 -0
- package/src/Automate.ts +204 -0
- package/src/AutomateAPI.ts +178 -0
- package/src/AutomateTypes.ts +10492 -0
- package/src/BaseAPI.ts +180 -0
- package/src/Manage/CompanyAPI.ts +4941 -0
- package/src/Manage/ConfigurationsAPI.ts +116 -0
- package/src/Manage/ExpenseAPI.ts +413 -0
- package/src/Manage/FinanceAPI.ts +3930 -0
- package/src/Manage/MarketingAPI.ts +958 -0
- package/src/Manage/ProcurementAPI.ts +3107 -0
- package/src/Manage/ProjectAPI.ts +1437 -0
- package/src/Manage/SalesAPI.ts +1968 -0
- package/src/Manage/ScheduleAPI.ts +773 -0
- package/src/Manage/ServiceAPI.ts +3476 -0
- package/src/Manage/SystemAPI.ts +6415 -0
- package/src/Manage/TimeAPI.ts +1151 -0
- package/src/Manage.ts +161 -0
- package/src/ManageAPI.ts +170 -0
- package/src/ManageTypes.ts +91318 -0
- package/src/index.ts +13 -0
- package/src/types.ts +68 -0
- package/src/utils/Callback.ts +148 -0
- package/src/utils/Series.ts +89 -0
- package/src/utils/index.ts +7 -0
- package/swagger-errors.md +25 -0
- package/test/.env.example +12 -6
- package/test/test-utils.ts +27 -0
- package/test/test.js +331 -108
- package/tsconfig.json +29 -0
- package/.travis.yml +0 -9
- package/doc.md +0 -5984
- package/docs/jsdoc.json +0 -15
- package/index.js +0 -10
- package/src/CompanyAPI/Companies.js +0 -149
- package/src/CompanyAPI/CompanyCompanyTypeAssociations.js +0 -111
- package/src/CompanyAPI/CompanySites.js +0 -80
- package/src/CompanyAPI/CompanyTeams.js +0 -108
- package/src/CompanyAPI/CompanyTypeInfos.js +0 -58
- package/src/CompanyAPI/CompanyTypes.js +0 -52
- package/src/CompanyAPI/Configurations.js +0 -152
- package/src/CompanyAPI/ContactContactTypeAssociations.js +0 -55
- package/src/CompanyAPI/ContactRelationships.js +0 -36
- package/src/CompanyAPI/Contacts.js +0 -199
- package/src/CompanyAPI/index.js +0 -53
- package/src/ConnectWise.js +0 -339
- package/src/ConnectWiseRest.js +0 -515
- package/src/FinanceAPI/Additions.js +0 -127
- package/src/FinanceAPI/Adjustments.js +0 -109
- package/src/FinanceAPI/AgreementSites.js +0 -108
- package/src/FinanceAPI/Agreements.js +0 -220
- package/src/FinanceAPI/BoardDefaults.js +0 -109
- package/src/FinanceAPI/WorkRoles.js +0 -113
- package/src/FinanceAPI/WorkTypeExclusions.js +0 -78
- package/src/FinanceAPI/WorkTypes.js +0 -124
- package/src/FinanceAPI/index.js +0 -50
- package/src/ProcurementAPI/CatalogItems.js +0 -94
- package/src/ProcurementAPI/index.js +0 -22
- package/src/ProjectAPI/Projects.js +0 -142
- package/src/ProjectAPI/index.js +0 -28
- package/src/SalesAPI/Activities.js +0 -149
- package/src/SalesAPI/index.js +0 -14
- package/src/ScheduleAPI/ScheduleEntries.js +0 -109
- package/src/ScheduleAPI/ScheduleTypes.js +0 -101
- package/src/ScheduleAPI/index.js +0 -30
- package/src/ServiceDeskAPI/BoardItems.js +0 -134
- package/src/ServiceDeskAPI/BoardSubTypes.js +0 -112
- package/src/ServiceDeskAPI/BoardTeams.js +0 -108
- package/src/ServiceDeskAPI/BoardTypes.js +0 -139
- package/src/ServiceDeskAPI/Boards.js +0 -100
- package/src/ServiceDeskAPI/Priorities.js +0 -47
- package/src/ServiceDeskAPI/ServiceNotes.js +0 -172
- package/src/ServiceDeskAPI/Statuses.js +0 -116
- package/src/ServiceDeskAPI/Tickets.js +0 -588
- package/src/ServiceDeskAPI/index.js +0 -53
- package/src/SystemAPI/Members.js +0 -139
- package/src/SystemAPI/Reports.js +0 -116
- package/src/SystemAPI/index.js +0 -32
- package/src/TimeAPI/TimeEntries.js +0 -121
- package/src/TimeAPI/index.js +0 -27
- package/src/utils/Callback.js +0 -124
- package/src/utils/Series.js +0 -63
- package/src/utils/index.js +0 -21
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by kgrube on 1/31/2019
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @private
|
|
8
|
-
*/
|
|
9
|
-
const inherits = require('util').inherits;
|
|
10
|
-
const ConnectWise = require('../ConnectWise.js');
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @typedef {object} BoardType
|
|
14
|
-
* @property id
|
|
15
|
-
* @property name
|
|
16
|
-
* @property category [Reactive, Proactive]
|
|
17
|
-
* @property defaultFlag
|
|
18
|
-
* @property inactiveFlag
|
|
19
|
-
* @property requestForChangeFlag
|
|
20
|
-
* @property integrationXref
|
|
21
|
-
* @property board
|
|
22
|
-
* @property location
|
|
23
|
-
* @property department
|
|
24
|
-
* @property {InfoHref} _info
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
* @param {CWOptions} options
|
|
30
|
-
* @constructor
|
|
31
|
-
*/
|
|
32
|
-
function BoardTypes(options) {
|
|
33
|
-
ConnectWise.apply(this, Array.prototype.slice.call(arguments));
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
inherits(BoardTypes, ConnectWise);
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
*
|
|
41
|
-
* @param id
|
|
42
|
-
* @param {Params} params
|
|
43
|
-
* @returns {Promise<BoardType[]>}
|
|
44
|
-
*/
|
|
45
|
-
BoardTypes.prototype.getTypes = function (id, params) {
|
|
46
|
-
return this.api(`/service/boards/${id}/types`, 'GET', params);
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
*
|
|
52
|
-
* @param boardId
|
|
53
|
-
* @param {BoardType} type
|
|
54
|
-
* @returns {Promise<BoardType>}
|
|
55
|
-
*/
|
|
56
|
-
BoardTypes.prototype.createType = function (boardId, type) {
|
|
57
|
-
return this.api(`/service/boards/${boardId}/types`, 'POST', type);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @param boardId
|
|
64
|
-
* @param typeId
|
|
65
|
-
* @returns {Promise<UsageCount[]>}
|
|
66
|
-
*/
|
|
67
|
-
BoardTypes.prototype.getTypeUsagesCount = function (boardId, typeId) {
|
|
68
|
-
return this.api(`/service/boards/${boardId}/types/${typeId}/usages`, 'GET');
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
*
|
|
74
|
-
* @param boardId
|
|
75
|
-
* @param typeId
|
|
76
|
-
* @returns {Promise<Usage[]>}
|
|
77
|
-
*/
|
|
78
|
-
BoardTypes.prototype.getTypeUsages = function (boardId, typeId) {
|
|
79
|
-
return this.api(`/service/boards/${boardId}/types/${typeId}/usages/list`, 'GET', params);
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
*
|
|
85
|
-
* @param id
|
|
86
|
-
* @param {Params} params
|
|
87
|
-
* @returns {Promise<Count>}
|
|
88
|
-
*/
|
|
89
|
-
BoardTypes.prototype.getTypesCount = function (id, params) {
|
|
90
|
-
return this.api(`/service/boards/${id}/types/count`, 'GET', params);
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
*
|
|
96
|
-
* @param boardId
|
|
97
|
-
* @param typeId
|
|
98
|
-
* @returns {Promise<BoardType>}
|
|
99
|
-
*/
|
|
100
|
-
BoardTypes.prototype.getTypeById = function (boardId, typeId) {
|
|
101
|
-
return this.api(`/service/boards/${boardId}/types/${typeId}`, 'GET');
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
*
|
|
107
|
-
* @param boardId
|
|
108
|
-
* @param typeId
|
|
109
|
-
* @returns {Promise<DeleteResponse>}
|
|
110
|
-
*/
|
|
111
|
-
BoardTypes.prototype.deleteType = function (boardId, typeId) {
|
|
112
|
-
return this.api(`/service/boards/${boardId}/types/${typeId}`, 'DELETE');
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
*
|
|
118
|
-
* @param boardId
|
|
119
|
-
* @param typeId
|
|
120
|
-
* @param {BoardType} type
|
|
121
|
-
* @returns {Promise<BoardType>}
|
|
122
|
-
*/
|
|
123
|
-
BoardTypes.prototype.replaceType = function (boardId, typeId, type) {
|
|
124
|
-
return this.api(`/service/boards/${boardId}/types/${typeId}`, 'PUT', type);
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
*
|
|
130
|
-
* @param boardId
|
|
131
|
-
* @param typeId
|
|
132
|
-
* @param {Operations[]} ops
|
|
133
|
-
* @returns {Promise<BoardType>}
|
|
134
|
-
*/
|
|
135
|
-
BoardTypes.prototype.updateType = function (boardId, typeId, ops) {
|
|
136
|
-
return this.api(`/service/boards/${boardId}/types/${typeId}`, 'PATCH', ops);
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
module.exports = BoardTypes;
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by kgrube on 12/24/2015.
|
|
3
|
-
* @author kgrube
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @private
|
|
8
|
-
*/
|
|
9
|
-
const inherits = require('util').inherits;
|
|
10
|
-
const ConnectWise = require('../ConnectWise.js');
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @typedef {object} Board
|
|
14
|
-
* @property {number} id
|
|
15
|
-
* @property {string} name
|
|
16
|
-
* @property {number} locationId
|
|
17
|
-
* @property {number} businessUnitId
|
|
18
|
-
* @property {boolean} inactive removed in 2019.1
|
|
19
|
-
* @property {boolean} inactiveFlag added in 2019.1
|
|
20
|
-
* @property {number} signOffTemplateId
|
|
21
|
-
* @property {boolean} sendToContact
|
|
22
|
-
* @property {number} contactTemplateId
|
|
23
|
-
* @property {boolean} sendToResource
|
|
24
|
-
* @property {number} resourceTemplateId
|
|
25
|
-
* @property {object} _info
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
* @param {CWOptions} options
|
|
32
|
-
* @constructor
|
|
33
|
-
*/
|
|
34
|
-
function Boards(options) {
|
|
35
|
-
ConnectWise.apply(this, Array.prototype.slice.call(arguments));
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
inherits(Boards, ConnectWise);
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* GET
|
|
42
|
-
* @param {Params} params
|
|
43
|
-
* @returns {Promise<Board[]>}
|
|
44
|
-
*/
|
|
45
|
-
Boards.prototype.getBoards = function (params) {
|
|
46
|
-
return this.api('/service/boards', 'GET', params);
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* POST
|
|
51
|
-
* @param {Board} board
|
|
52
|
-
* @returns {Promise<Board[]>}
|
|
53
|
-
*/
|
|
54
|
-
Boards.prototype.createBoard = function (board) {
|
|
55
|
-
return this.api('/service/boards', 'POST', board);
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* GET
|
|
60
|
-
* @param id
|
|
61
|
-
* @returns {Promise<Board[]>}
|
|
62
|
-
*/
|
|
63
|
-
Boards.prototype.getBoardById = function (id) {
|
|
64
|
-
return this.api(`/service/boards/${id}`, 'GET');
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* GET
|
|
69
|
-
* @param {ParamsConditions} params
|
|
70
|
-
* @returns {Promise<Count>}
|
|
71
|
-
*/
|
|
72
|
-
Boards.prototype.getBoardsCount = function (params) {
|
|
73
|
-
return this.api('/service/boards/count', 'GET', params);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* PATCH
|
|
78
|
-
* @param id
|
|
79
|
-
* @param {Operations[]} ops
|
|
80
|
-
* @returns {Promise<Board>}
|
|
81
|
-
*/
|
|
82
|
-
Boards.prototype.updateBoard = function (id, ops) {
|
|
83
|
-
return this.api(`/service/boards/${id}`, 'PATCH', ops);
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
*
|
|
88
|
-
* @param id
|
|
89
|
-
* @param {Board} board
|
|
90
|
-
* @returns {Promise<Board>}
|
|
91
|
-
*/
|
|
92
|
-
Boards.prototype.replaceBoard = function (id, board) {
|
|
93
|
-
return this.api(`/service/boards/${id}`, 'PUT', board);
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
*
|
|
98
|
-
* @type {Boards}
|
|
99
|
-
*/
|
|
100
|
-
module.exports = Boards;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by kgrube on 12/24/2015.
|
|
3
|
-
* @author kgrube
|
|
4
|
-
* @TODO complete module
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @private
|
|
9
|
-
*/
|
|
10
|
-
const inherits = require('util').inherits;
|
|
11
|
-
const ConnectWise = require('../ConnectWise.js');
|
|
12
|
-
/**
|
|
13
|
-
* @typedef {object} Priority
|
|
14
|
-
* @property {number} id
|
|
15
|
-
* @property {string} name
|
|
16
|
-
* @property {string} color
|
|
17
|
-
* @property {number} sortOrder
|
|
18
|
-
* @property {boolean} defaultFlag
|
|
19
|
-
* @property {string} imageLink
|
|
20
|
-
* @property {object} _info
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @param {CWOptions} options
|
|
27
|
-
* @constructor
|
|
28
|
-
*/
|
|
29
|
-
function Priorities(options) {
|
|
30
|
-
ConnectWise.apply(this, Array.prototype.slice.call(arguments));
|
|
31
|
-
}
|
|
32
|
-
inherits(Priorities, ConnectWise);
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* @param {Params} params
|
|
37
|
-
* @returns {Promise<Priority[]>}
|
|
38
|
-
*/
|
|
39
|
-
Priorities.prototype.getPriorities = function (params) {
|
|
40
|
-
return this.api('/service/priorities', 'GET', params);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @type {Priorities}
|
|
46
|
-
*/
|
|
47
|
-
module.exports = Priorities;
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by kgrube on 1/18/2016.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @private
|
|
7
|
-
*/
|
|
8
|
-
const inherits = require('util').inherits;
|
|
9
|
-
const ConnectWise = require('../ConnectWise.js');
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @typedef {object} ServiceNote
|
|
13
|
-
* @property {number} id
|
|
14
|
-
* @property {number} ticketId
|
|
15
|
-
* @property {string} text the text of the particular note
|
|
16
|
-
* @property {boolean} detailDescriptionFlag
|
|
17
|
-
* @property {boolean} internalAnalysisFlag
|
|
18
|
-
* @property {boolean} resolutionFlag
|
|
19
|
-
* @property {MemberHref} member null if not applicable
|
|
20
|
-
* @property {ContactHref} contact null if not applicable
|
|
21
|
-
* @property {boolean} [customerUpdatedFlag]
|
|
22
|
-
* @property {boolean} [processNotifications]
|
|
23
|
-
* @property {string} dateCreated
|
|
24
|
-
* @property {string} createdBy
|
|
25
|
-
* @property {boolean} internalFlag
|
|
26
|
-
* @property {boolean} externalFlag
|
|
27
|
-
* @property {object} _info
|
|
28
|
-
* @property {string} _info.lastUpdated
|
|
29
|
-
* @property {string} _info.updatedBy
|
|
30
|
-
*
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
*
|
|
35
|
-
* @param {CWOptions} options
|
|
36
|
-
* @constructor
|
|
37
|
-
*/
|
|
38
|
-
function ServiceNotes(options) {
|
|
39
|
-
ConnectWise.apply(this, Array.prototype.slice.call(arguments));
|
|
40
|
-
}
|
|
41
|
-
inherits(ServiceNotes, ConnectWise);
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* GET
|
|
45
|
-
* @param ticketId
|
|
46
|
-
* @param {Params} params
|
|
47
|
-
* @returns {Promise<ServiceNote[]>}
|
|
48
|
-
*/
|
|
49
|
-
ServiceNotes.prototype.getServiceNotes = function (ticketId, params) {
|
|
50
|
-
return this.api(`/service/tickets/${ticketId}/notes`, 'GET', params);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* POST
|
|
55
|
-
* @param {string|number} ticketId
|
|
56
|
-
* @param {ServiceNote} note
|
|
57
|
-
* @returns {Promise<ServiceNote>}
|
|
58
|
-
*/
|
|
59
|
-
ServiceNotes.prototype.createServiceNote = function (ticketId, note) {
|
|
60
|
-
return this.api(`/service/tickets/${ticketId}/notes`, 'POST', note);
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* GET
|
|
65
|
-
* @param ticketId
|
|
66
|
-
* @param {ParamsConditions} params
|
|
67
|
-
* @returns {Promise<Count>}
|
|
68
|
-
*/
|
|
69
|
-
ServiceNotes.prototype.getServiceNotesCount = function (ticketId, params) {
|
|
70
|
-
return this.api(`/service/tickets/${ticketId}/notes/count`, 'GET', params);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
*
|
|
75
|
-
* @param ticketId
|
|
76
|
-
* @param noteId
|
|
77
|
-
* @returns {Promise<DeleteResponse>}
|
|
78
|
-
*/
|
|
79
|
-
ServiceNotes.prototype.deleteServiceNoteById = function (ticketId, noteId) {
|
|
80
|
-
return this.api(`/service/tickets/${ticketId}/notes/${noteId}`, 'DELETE');
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
*
|
|
85
|
-
* @param ticketId
|
|
86
|
-
* @param noteId
|
|
87
|
-
* @returns {Promise<ServiceNote>}
|
|
88
|
-
*/
|
|
89
|
-
ServiceNotes.prototype.getServiceNoteById = function (ticketId, noteId) {
|
|
90
|
-
return this.api(`/service/tickets/${ticketId}/notes/${noteId}`, 'GET', params);
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
*
|
|
95
|
-
* @param ticketId
|
|
96
|
-
* @param noteId
|
|
97
|
-
* @param {ServiceNote} note
|
|
98
|
-
* @returns {Promise<ServiceNote>}
|
|
99
|
-
*/
|
|
100
|
-
ServiceNotes.prototype.updateServiceNote = function (ticketId, noteId, note) {
|
|
101
|
-
return this.api(`/service/tickets/${ticketId}/notes/${noteId}`, 'PATCH', note);
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
*
|
|
106
|
-
* @param ticketId
|
|
107
|
-
* @param noteId
|
|
108
|
-
* @param {ServiceNote} note
|
|
109
|
-
* @returns {Promise<ServiceNote>}
|
|
110
|
-
*/
|
|
111
|
-
ServiceNotes.prototype.replaceServiceNote = function (ticketId, noteId, note) {
|
|
112
|
-
return this.api(`/service/tickets/${ticketId}/notes/${noteId}`, 'PUT', note);
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
*
|
|
117
|
-
* @param {string|number} ticketId
|
|
118
|
-
* @param {string} text
|
|
119
|
-
* @returns {Promise<ServiceNote>}
|
|
120
|
-
*/
|
|
121
|
-
ServiceNotes.prototype.createServiceNoteInternal = function (ticketId, text) {
|
|
122
|
-
return this.createServiceNote(ticketId, {
|
|
123
|
-
text: text,
|
|
124
|
-
internalAnalysisFlag: true
|
|
125
|
-
});
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
*
|
|
130
|
-
* @param {string|number} ticketId
|
|
131
|
-
* @param {string} text
|
|
132
|
-
* @returns {Promise<ServiceNote>}
|
|
133
|
-
*/
|
|
134
|
-
ServiceNotes.prototype.createServiceNoteDetail = function (ticketId, text) {
|
|
135
|
-
return this.createServiceNote(ticketId, {
|
|
136
|
-
text: text,
|
|
137
|
-
detailDescriptionFlag: true
|
|
138
|
-
});
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
*
|
|
143
|
-
* @param {string|number} ticketId
|
|
144
|
-
* @param {string} text
|
|
145
|
-
* @returns {Promise<ServiceNote>}
|
|
146
|
-
*/
|
|
147
|
-
ServiceNotes.prototype.createServiceNoteResolution = function (ticketId, text) {
|
|
148
|
-
return this.createServiceNote(ticketId, {
|
|
149
|
-
text: text,
|
|
150
|
-
resolutionFlag: true
|
|
151
|
-
});
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
*
|
|
156
|
-
* @param {string|number} ticketId
|
|
157
|
-
* @param {string} text
|
|
158
|
-
* @returns {Promise<ServiceNote>}
|
|
159
|
-
*/
|
|
160
|
-
ServiceNotes.prototype.createServiceNoteDetailAndResolution = function (ticketId, text) {
|
|
161
|
-
return this.createServiceNote(ticketId, {
|
|
162
|
-
text: text,
|
|
163
|
-
detailDescriptionFlag: true,
|
|
164
|
-
resolutionFlag: true
|
|
165
|
-
});
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
*
|
|
170
|
-
* @type {ServiceNotes}
|
|
171
|
-
*/
|
|
172
|
-
module.exports = ServiceNotes;
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by kgrube on 1/8/2016.
|
|
3
|
-
* @author kgrube
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @private
|
|
8
|
-
*/
|
|
9
|
-
const inherits = require('util').inherits;
|
|
10
|
-
const ConnectWise = require('../ConnectWise.js');
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @typedef {object} Status
|
|
14
|
-
* @property {number} id
|
|
15
|
-
* @property {string} name
|
|
16
|
-
* @property {number} boardId
|
|
17
|
-
* @property {number} sortOrder
|
|
18
|
-
* @property {boolean} displayOnBoard
|
|
19
|
-
* @property {boolean} inactive removed in 2019.1
|
|
20
|
-
* @property {boolean} inactiveFlag added in 2019.1
|
|
21
|
-
* @property {boolean} closedStatus
|
|
22
|
-
* @property {boolean} timeEntryNotAllowed
|
|
23
|
-
* @property {boolean} defaultFlag
|
|
24
|
-
* @property {string} escalationStatus ['NotResponded', 'Responded', 'Plan', 'Resolved', 'NoEscalation']
|
|
25
|
-
* @property {object} _info
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
* @param {CWOptions} options
|
|
32
|
-
* @inherits {ConnectWise}
|
|
33
|
-
* @constructor
|
|
34
|
-
*/
|
|
35
|
-
function Statuses(options) {
|
|
36
|
-
ConnectWise.apply(this, Array.prototype.slice.call(arguments));
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
inherits(Statuses, ConnectWise);
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
*
|
|
43
|
-
* @param boardId
|
|
44
|
-
* @param {Params} params
|
|
45
|
-
* @returns {Promise<Status[]>}
|
|
46
|
-
*/
|
|
47
|
-
Statuses.prototype.getStatusesByBoardId = function (boardId, params) {
|
|
48
|
-
return this.api(`/service/boards/${boardId}/statuses`, 'GET', params);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
* @param boardId
|
|
54
|
-
* @param {Status} status
|
|
55
|
-
* @returns {Promise<Status>}
|
|
56
|
-
*/
|
|
57
|
-
Statuses.prototype.createStatuses = function (boardId, status) {
|
|
58
|
-
return this.api(`/service/boards/${boardId}/statuses`, 'POST', status);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @param boardId
|
|
64
|
-
* @returns {Promise<Count>}
|
|
65
|
-
*/
|
|
66
|
-
Statuses.prototype.getStatusesCount = function (boardId) {
|
|
67
|
-
return this.api(`/service/boards/${boardId}/statuses/count`, 'GET');
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
* @param boardId
|
|
73
|
-
* @param statusId
|
|
74
|
-
* @returns {Promise<DeleteResponse>}
|
|
75
|
-
*/
|
|
76
|
-
Statuses.prototype.deleteStatusById = function (boardId, statusId) {
|
|
77
|
-
return this.api(`/service/boards/${boardId}/statuses/${statusId}`, 'DELETE');
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
*
|
|
82
|
-
* @param boardId
|
|
83
|
-
* @param statusId
|
|
84
|
-
* @returns {Promise<Status>}
|
|
85
|
-
*/
|
|
86
|
-
Statuses.prototype.getStatusById = function (boardId, statusId) {
|
|
87
|
-
return this.api(`/service/boards/${boardId}/statuses/${statusId}`, 'GET');
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
*
|
|
92
|
-
* @param boardId
|
|
93
|
-
* @param statusId
|
|
94
|
-
* @param {Operations[]} operations
|
|
95
|
-
* @returns {Promise<Status>}
|
|
96
|
-
*/
|
|
97
|
-
Statuses.prototype.updateStatus = function (boardId, statusId, operations) {
|
|
98
|
-
return this.api(`/service/boards/${boardId}/statuses/${statusId}`, 'PATCH', operations);
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
*
|
|
103
|
-
* @param boardId
|
|
104
|
-
* @param statusId
|
|
105
|
-
* @param {Status} status
|
|
106
|
-
* @returns {Promise<Status>}
|
|
107
|
-
*/
|
|
108
|
-
Statuses.prototype.replaceStatuses = function (boardId, statusId, status) {
|
|
109
|
-
return this.api(`/service/boards/${boardId}/statuses/${statusId}`, 'PUT', status);
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
*
|
|
114
|
-
* @type {Statuses}
|
|
115
|
-
*/
|
|
116
|
-
module.exports = Statuses;
|