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.
Files changed (282) hide show
  1. package/.eslintrc +17 -52
  2. package/.gitattributes +1 -0
  3. package/.mocharc.json +5 -0
  4. package/.prettierrc +7 -0
  5. package/README.md +293 -230
  6. package/api-extractor.json +364 -0
  7. package/dist/Automate/AVTemplatePoliciesAPI.d.ts +36 -0
  8. package/dist/Automate/AVTemplatePoliciesAPI.d.ts.map +1 -0
  9. package/dist/Automate/AVTemplatePoliciesAPI.js +92 -0
  10. package/dist/Automate/AVTemplatePoliciesAPI.js.map +1 -0
  11. package/dist/Automate/ClientsAPI.d.ts +44 -0
  12. package/dist/Automate/ClientsAPI.d.ts.map +1 -0
  13. package/dist/Automate/ClientsAPI.js +119 -0
  14. package/dist/Automate/ClientsAPI.js.map +1 -0
  15. package/dist/Automate/CommandsAPI.d.ts +20 -0
  16. package/dist/Automate/CommandsAPI.d.ts.map +1 -0
  17. package/dist/Automate/CommandsAPI.js +36 -0
  18. package/dist/Automate/CommandsAPI.js.map +1 -0
  19. package/dist/Automate/ComputersAPI.d.ts +131 -0
  20. package/dist/Automate/ComputersAPI.d.ts.map +1 -0
  21. package/dist/Automate/ComputersAPI.js +358 -0
  22. package/dist/Automate/ComputersAPI.js.map +1 -0
  23. package/dist/Automate/ContactsAPI.d.ts +24 -0
  24. package/dist/Automate/ContactsAPI.d.ts.map +1 -0
  25. package/dist/Automate/ContactsAPI.js +50 -0
  26. package/dist/Automate/ContactsAPI.js.map +1 -0
  27. package/dist/Automate/DataViewsAPI.d.ts +22 -0
  28. package/dist/Automate/DataViewsAPI.d.ts.map +1 -0
  29. package/dist/Automate/DataViewsAPI.js +36 -0
  30. package/dist/Automate/DataViewsAPI.js.map +1 -0
  31. package/dist/Automate/DrivesAPI.d.ts +25 -0
  32. package/dist/Automate/DrivesAPI.d.ts.map +1 -0
  33. package/dist/Automate/DrivesAPI.js +57 -0
  34. package/dist/Automate/DrivesAPI.js.map +1 -0
  35. package/dist/Automate/EventLogsAPI.d.ts +19 -0
  36. package/dist/Automate/EventLogsAPI.d.ts.map +1 -0
  37. package/dist/Automate/EventLogsAPI.js +29 -0
  38. package/dist/Automate/EventLogsAPI.js.map +1 -0
  39. package/dist/Automate/LocationsAPI.d.ts +57 -0
  40. package/dist/Automate/LocationsAPI.d.ts.map +1 -0
  41. package/dist/Automate/LocationsAPI.js +138 -0
  42. package/dist/Automate/LocationsAPI.js.map +1 -0
  43. package/dist/Automate/MaintenanceWindowDefinitionsAPI.d.ts +19 -0
  44. package/dist/Automate/MaintenanceWindowDefinitionsAPI.d.ts.map +1 -0
  45. package/dist/Automate/MaintenanceWindowDefinitionsAPI.js +29 -0
  46. package/dist/Automate/MaintenanceWindowDefinitionsAPI.js.map +1 -0
  47. package/dist/Automate/MonitorsAPI.d.ts +29 -0
  48. package/dist/Automate/MonitorsAPI.d.ts.map +1 -0
  49. package/dist/Automate/MonitorsAPI.js +85 -0
  50. package/dist/Automate/MonitorsAPI.js.map +1 -0
  51. package/dist/Automate/NetworkDevicesAPI.d.ts +23 -0
  52. package/dist/Automate/NetworkDevicesAPI.d.ts.map +1 -0
  53. package/dist/Automate/NetworkDevicesAPI.js +43 -0
  54. package/dist/Automate/NetworkDevicesAPI.js.map +1 -0
  55. package/dist/Automate/PatchingAPI.d.ts +33 -0
  56. package/dist/Automate/PatchingAPI.d.ts.map +1 -0
  57. package/dist/Automate/PatchingAPI.js +99 -0
  58. package/dist/Automate/PatchingAPI.js.map +1 -0
  59. package/dist/Automate/RemoteAgentAPI.d.ts +24 -0
  60. package/dist/Automate/RemoteAgentAPI.d.ts.map +1 -0
  61. package/dist/Automate/RemoteAgentAPI.js +50 -0
  62. package/dist/Automate/RemoteAgentAPI.js.map +1 -0
  63. package/dist/Automate/ScriptingAPI.d.ts +41 -0
  64. package/dist/Automate/ScriptingAPI.d.ts.map +1 -0
  65. package/dist/Automate/ScriptingAPI.js +109 -0
  66. package/dist/Automate/ScriptingAPI.js.map +1 -0
  67. package/dist/Automate/SearchesAPI.d.ts +23 -0
  68. package/dist/Automate/SearchesAPI.d.ts.map +1 -0
  69. package/dist/Automate/SearchesAPI.js +43 -0
  70. package/dist/Automate/SearchesAPI.js.map +1 -0
  71. package/dist/Automate/SystemAPI.d.ts +97 -0
  72. package/dist/Automate/SystemAPI.d.ts.map +1 -0
  73. package/dist/Automate/SystemAPI.js +273 -0
  74. package/dist/Automate/SystemAPI.js.map +1 -0
  75. package/dist/Automate/TicketsAPI.d.ts +14 -0
  76. package/dist/Automate/TicketsAPI.d.ts.map +1 -0
  77. package/dist/Automate/TicketsAPI.js +29 -0
  78. package/dist/Automate/TicketsAPI.js.map +1 -0
  79. package/dist/Automate/UserProfilesAPI.d.ts +19 -0
  80. package/dist/Automate/UserProfilesAPI.d.ts.map +1 -0
  81. package/dist/Automate/UserProfilesAPI.js +28 -0
  82. package/dist/Automate/UserProfilesAPI.js.map +1 -0
  83. package/dist/Automate.d.ts +43 -0
  84. package/dist/Automate.d.ts.map +1 -0
  85. package/dist/Automate.js +164 -0
  86. package/dist/Automate.js.map +1 -0
  87. package/dist/AutomateAPI.d.ts +129 -0
  88. package/dist/AutomateAPI.d.ts.map +1 -0
  89. package/dist/AutomateAPI.js +175 -0
  90. package/dist/AutomateAPI.js.map +1 -0
  91. package/dist/AutomateTypes.d.ts +10437 -0
  92. package/dist/AutomateTypes.d.ts.map +1 -0
  93. package/dist/AutomateTypes.js +3 -0
  94. package/dist/AutomateTypes.js.map +1 -0
  95. package/dist/BaseAPI.d.ts +26 -0
  96. package/dist/BaseAPI.d.ts.map +1 -0
  97. package/dist/BaseAPI.js +116 -0
  98. package/dist/BaseAPI.js.map +1 -0
  99. package/dist/Manage/CompanyAPI.d.ts +662 -0
  100. package/dist/Manage/CompanyAPI.d.ts.map +1 -0
  101. package/dist/Manage/CompanyAPI.js +3299 -0
  102. package/dist/Manage/CompanyAPI.js.map +1 -0
  103. package/dist/Manage/ConfigurationsAPI.d.ts +32 -0
  104. package/dist/Manage/ConfigurationsAPI.d.ts.map +1 -0
  105. package/dist/Manage/ConfigurationsAPI.js +78 -0
  106. package/dist/Manage/ConfigurationsAPI.js.map +1 -0
  107. package/dist/Manage/ExpenseAPI.d.ts +85 -0
  108. package/dist/Manage/ExpenseAPI.d.ts.map +1 -0
  109. package/dist/Manage/ExpenseAPI.js +311 -0
  110. package/dist/Manage/ExpenseAPI.js.map +1 -0
  111. package/dist/Manage/FinanceAPI.d.ts +538 -0
  112. package/dist/Manage/FinanceAPI.d.ts.map +1 -0
  113. package/dist/Manage/FinanceAPI.js +2592 -0
  114. package/dist/Manage/FinanceAPI.js.map +1 -0
  115. package/dist/Manage/MarketingAPI.d.ts +142 -0
  116. package/dist/Manage/MarketingAPI.d.ts.map +1 -0
  117. package/dist/Manage/MarketingAPI.js +634 -0
  118. package/dist/Manage/MarketingAPI.js.map +1 -0
  119. package/dist/Manage/ProcurementAPI.d.ts +435 -0
  120. package/dist/Manage/ProcurementAPI.d.ts.map +1 -0
  121. package/dist/Manage/ProcurementAPI.js +2103 -0
  122. package/dist/Manage/ProcurementAPI.js.map +1 -0
  123. package/dist/Manage/ProjectAPI.d.ts +215 -0
  124. package/dist/Manage/ProjectAPI.d.ts.map +1 -0
  125. package/dist/Manage/ProjectAPI.js +945 -0
  126. package/dist/Manage/ProjectAPI.js.map +1 -0
  127. package/dist/Manage/SalesAPI.d.ts +299 -0
  128. package/dist/Manage/SalesAPI.d.ts.map +1 -0
  129. package/dist/Manage/SalesAPI.js +1397 -0
  130. package/dist/Manage/SalesAPI.js.map +1 -0
  131. package/dist/Manage/ScheduleAPI.d.ts +132 -0
  132. package/dist/Manage/ScheduleAPI.d.ts.map +1 -0
  133. package/dist/Manage/ScheduleAPI.js +580 -0
  134. package/dist/Manage/ScheduleAPI.js.map +1 -0
  135. package/dist/Manage/ServiceAPI.d.ts +493 -0
  136. package/dist/Manage/ServiceAPI.d.ts.map +1 -0
  137. package/dist/Manage/ServiceAPI.js +2339 -0
  138. package/dist/Manage/ServiceAPI.js.map +1 -0
  139. package/dist/Manage/SystemAPI.d.ts +954 -0
  140. package/dist/Manage/SystemAPI.d.ts.map +1 -0
  141. package/dist/Manage/SystemAPI.js +4536 -0
  142. package/dist/Manage/SystemAPI.js.map +1 -0
  143. package/dist/Manage/TimeAPI.d.ts +186 -0
  144. package/dist/Manage/TimeAPI.d.ts.map +1 -0
  145. package/dist/Manage/TimeAPI.js +840 -0
  146. package/dist/Manage/TimeAPI.js.map +1 -0
  147. package/dist/Manage.d.ts +39 -0
  148. package/dist/Manage.d.ts.map +1 -0
  149. package/dist/Manage.js +137 -0
  150. package/dist/Manage.js.map +1 -0
  151. package/dist/ManageAPI.d.ts +135 -0
  152. package/dist/ManageAPI.d.ts.map +1 -0
  153. package/dist/ManageAPI.js +115 -0
  154. package/dist/ManageAPI.js.map +1 -0
  155. package/dist/ManageTypes.d.ts +91320 -0
  156. package/dist/ManageTypes.d.ts.map +1 -0
  157. package/dist/ManageTypes.js +7 -0
  158. package/dist/ManageTypes.js.map +1 -0
  159. package/dist/connectwise-rest.d.ts +108638 -0
  160. package/dist/index.d.ts +12 -0
  161. package/dist/index.d.ts.map +1 -0
  162. package/dist/index.js +36 -0
  163. package/dist/index.js.map +1 -0
  164. package/dist/tsdoc-metadata.json +11 -0
  165. package/dist/types.d.ts +48 -0
  166. package/dist/types.d.ts.map +1 -0
  167. package/dist/types.js +21 -0
  168. package/dist/types.js.map +1 -0
  169. package/dist/utils/Callback.d.ts +70 -0
  170. package/dist/utils/Callback.d.ts.map +1 -0
  171. package/dist/utils/Callback.js +109 -0
  172. package/dist/utils/Callback.js.map +1 -0
  173. package/dist/utils/Series.d.ts +42 -0
  174. package/dist/utils/Series.d.ts.map +1 -0
  175. package/dist/utils/Series.js +68 -0
  176. package/dist/utils/Series.js.map +1 -0
  177. package/dist/utils/index.d.ts +7 -0
  178. package/dist/utils/index.d.ts.map +1 -0
  179. package/dist/utils/index.js +11 -0
  180. package/dist/utils/index.js.map +1 -0
  181. package/package.json +50 -19
  182. package/src/Automate/AVTemplatePoliciesAPI.ts +124 -0
  183. package/src/Automate/ClientsAPI.ts +172 -0
  184. package/src/Automate/CommandsAPI.ts +39 -0
  185. package/src/Automate/ComputersAPI.ts +588 -0
  186. package/src/Automate/ContactsAPI.ts +63 -0
  187. package/src/Automate/DataViewsAPI.ts +43 -0
  188. package/src/Automate/DrivesAPI.ts +81 -0
  189. package/src/Automate/EventLogsAPI.ts +31 -0
  190. package/src/Automate/LocationsAPI.ts +222 -0
  191. package/src/Automate/MaintenanceWindowDefinitionsAPI.ts +34 -0
  192. package/src/Automate/MonitorsAPI.ts +101 -0
  193. package/src/Automate/NetworkDevicesAPI.ts +51 -0
  194. package/src/Automate/PatchingAPI.ts +116 -0
  195. package/src/Automate/RemoteAgentAPI.ts +65 -0
  196. package/src/Automate/ScriptingAPI.ts +147 -0
  197. package/src/Automate/SearchesAPI.ts +49 -0
  198. package/src/Automate/SystemAPI.ts +412 -0
  199. package/src/Automate/TicketsAPI.ts +29 -0
  200. package/src/Automate/UserProfilesAPI.ts +31 -0
  201. package/src/Automate.ts +204 -0
  202. package/src/AutomateAPI.ts +178 -0
  203. package/src/AutomateTypes.ts +10492 -0
  204. package/src/BaseAPI.ts +180 -0
  205. package/src/Manage/CompanyAPI.ts +4941 -0
  206. package/src/Manage/ConfigurationsAPI.ts +116 -0
  207. package/src/Manage/ExpenseAPI.ts +413 -0
  208. package/src/Manage/FinanceAPI.ts +3930 -0
  209. package/src/Manage/MarketingAPI.ts +958 -0
  210. package/src/Manage/ProcurementAPI.ts +3107 -0
  211. package/src/Manage/ProjectAPI.ts +1437 -0
  212. package/src/Manage/SalesAPI.ts +1968 -0
  213. package/src/Manage/ScheduleAPI.ts +773 -0
  214. package/src/Manage/ServiceAPI.ts +3476 -0
  215. package/src/Manage/SystemAPI.ts +6415 -0
  216. package/src/Manage/TimeAPI.ts +1151 -0
  217. package/src/Manage.ts +161 -0
  218. package/src/ManageAPI.ts +170 -0
  219. package/src/ManageTypes.ts +91318 -0
  220. package/src/index.ts +13 -0
  221. package/src/types.ts +68 -0
  222. package/src/utils/Callback.ts +148 -0
  223. package/src/utils/Series.ts +89 -0
  224. package/src/utils/index.ts +7 -0
  225. package/swagger-errors.md +25 -0
  226. package/test/.env.example +12 -6
  227. package/test/test-utils.ts +27 -0
  228. package/test/test.js +331 -108
  229. package/tsconfig.json +29 -0
  230. package/.travis.yml +0 -9
  231. package/doc.md +0 -5984
  232. package/docs/jsdoc.json +0 -15
  233. package/index.js +0 -10
  234. package/src/CompanyAPI/Companies.js +0 -149
  235. package/src/CompanyAPI/CompanyCompanyTypeAssociations.js +0 -111
  236. package/src/CompanyAPI/CompanySites.js +0 -80
  237. package/src/CompanyAPI/CompanyTeams.js +0 -108
  238. package/src/CompanyAPI/CompanyTypeInfos.js +0 -58
  239. package/src/CompanyAPI/CompanyTypes.js +0 -52
  240. package/src/CompanyAPI/Configurations.js +0 -152
  241. package/src/CompanyAPI/ContactContactTypeAssociations.js +0 -55
  242. package/src/CompanyAPI/ContactRelationships.js +0 -36
  243. package/src/CompanyAPI/Contacts.js +0 -199
  244. package/src/CompanyAPI/index.js +0 -53
  245. package/src/ConnectWise.js +0 -339
  246. package/src/ConnectWiseRest.js +0 -515
  247. package/src/FinanceAPI/Additions.js +0 -127
  248. package/src/FinanceAPI/Adjustments.js +0 -109
  249. package/src/FinanceAPI/AgreementSites.js +0 -108
  250. package/src/FinanceAPI/Agreements.js +0 -220
  251. package/src/FinanceAPI/BoardDefaults.js +0 -109
  252. package/src/FinanceAPI/WorkRoles.js +0 -113
  253. package/src/FinanceAPI/WorkTypeExclusions.js +0 -78
  254. package/src/FinanceAPI/WorkTypes.js +0 -124
  255. package/src/FinanceAPI/index.js +0 -50
  256. package/src/ProcurementAPI/CatalogItems.js +0 -94
  257. package/src/ProcurementAPI/index.js +0 -22
  258. package/src/ProjectAPI/Projects.js +0 -142
  259. package/src/ProjectAPI/index.js +0 -28
  260. package/src/SalesAPI/Activities.js +0 -149
  261. package/src/SalesAPI/index.js +0 -14
  262. package/src/ScheduleAPI/ScheduleEntries.js +0 -109
  263. package/src/ScheduleAPI/ScheduleTypes.js +0 -101
  264. package/src/ScheduleAPI/index.js +0 -30
  265. package/src/ServiceDeskAPI/BoardItems.js +0 -134
  266. package/src/ServiceDeskAPI/BoardSubTypes.js +0 -112
  267. package/src/ServiceDeskAPI/BoardTeams.js +0 -108
  268. package/src/ServiceDeskAPI/BoardTypes.js +0 -139
  269. package/src/ServiceDeskAPI/Boards.js +0 -100
  270. package/src/ServiceDeskAPI/Priorities.js +0 -47
  271. package/src/ServiceDeskAPI/ServiceNotes.js +0 -172
  272. package/src/ServiceDeskAPI/Statuses.js +0 -116
  273. package/src/ServiceDeskAPI/Tickets.js +0 -588
  274. package/src/ServiceDeskAPI/index.js +0 -53
  275. package/src/SystemAPI/Members.js +0 -139
  276. package/src/SystemAPI/Reports.js +0 -116
  277. package/src/SystemAPI/index.js +0 -32
  278. package/src/TimeAPI/TimeEntries.js +0 -121
  279. package/src/TimeAPI/index.js +0 -27
  280. package/src/utils/Callback.js +0 -124
  281. package/src/utils/Series.js +0 -63
  282. package/src/utils/index.js +0 -21
@@ -0,0 +1,1968 @@
1
+ /* This file was auto-generated, do not manually edit. */
2
+ import Manage from '../Manage'
3
+ import { components } from '../ManageTypes'
4
+ import { CommonParameters, CWMOptions } from '../ManageAPI'
5
+ import { NoContentResponse, OctetStreamResponse, PDFResponse, HTMLResponse } from '../types'
6
+ type schemas = components['schemas']
7
+
8
+ /** {@link Activity} */
9
+ export type Activity = schemas['Activity']
10
+ /** {@link ActivityStatus} */
11
+ export type ActivityStatus = schemas['ActivityStatus']
12
+ /** {@link ActivityStatusInfo} */
13
+ export type ActivityStatusInfo = schemas['ActivityStatusInfo']
14
+ /** {@link ActivityType} */
15
+ export type ActivityType = schemas['ActivityType']
16
+ /** {@link Agreement} */
17
+ export type Agreement = schemas['Agreement']
18
+ /** {@link Commission} */
19
+ export type Commission = schemas['Commission']
20
+ /** {@link Count} */
21
+ export type Count = schemas['Count']
22
+ /** {@link Forecast} */
23
+ export type Forecast = schemas['Forecast']
24
+ /** {@link ForecastItem} */
25
+ export type ForecastItem = schemas['ForecastItem']
26
+ /** {@link Opportunity} */
27
+ export type Opportunity = schemas['Opportunity']
28
+ /** {@link OpportunityContact} */
29
+ export type OpportunityContact = schemas['OpportunityContact']
30
+ /** {@link OpportunityNote} */
31
+ export type OpportunityNote = schemas['OpportunityNote']
32
+ /** {@link OpportunityRating} */
33
+ export type OpportunityRating = schemas['OpportunityRating']
34
+ /** {@link OpportunityRatingInfo} */
35
+ export type OpportunityRatingInfo = schemas['OpportunityRatingInfo']
36
+ /** {@link OpportunityStage} */
37
+ export type OpportunityStage = schemas['OpportunityStage']
38
+ /** {@link OpportunityStageInfo} */
39
+ export type OpportunityStageInfo = schemas['OpportunityStageInfo']
40
+ /** {@link OpportunityStatus} */
41
+ export type OpportunityStatus = schemas['OpportunityStatus']
42
+ /** {@link OpportunityStatusInfo} */
43
+ export type OpportunityStatusInfo = schemas['OpportunityStatusInfo']
44
+ /** {@link OpportunityToAgreementConversion} */
45
+ export type OpportunityToAgreementConversion = schemas['OpportunityToAgreementConversion']
46
+ /** {@link OpportunityToProjectConversion} */
47
+ export type OpportunityToProjectConversion = schemas['OpportunityToProjectConversion']
48
+ /** {@link OpportunityToSalesOrderConversion} */
49
+ export type OpportunityToSalesOrderConversion = schemas['OpportunityToSalesOrderConversion']
50
+ /** {@link OpportunityToServiceTicketConversion} */
51
+ export type OpportunityToServiceTicketConversion = schemas['OpportunityToServiceTicketConversion']
52
+ /** {@link OpportunityType} */
53
+ export type OpportunityType = schemas['OpportunityType']
54
+ /** {@link OpportunityTypeInfo} */
55
+ export type OpportunityTypeInfo = schemas['OpportunityTypeInfo']
56
+ /** {@link Order} */
57
+ export type Order = schemas['Order']
58
+ /** {@link OrderStatus} */
59
+ export type OrderStatus = schemas['OrderStatus']
60
+ /** {@link OrderStatusEmailTemplate} */
61
+ export type OrderStatusEmailTemplate = schemas['OrderStatusEmailTemplate']
62
+ /** {@link OrderStatusInfo} */
63
+ export type OrderStatusInfo = schemas['OrderStatusInfo']
64
+ /** {@link OrderStatusNotification} */
65
+ export type OrderStatusNotification = schemas['OrderStatusNotification']
66
+ /** {@link PatchOperation} */
67
+ export type PatchOperation = schemas['PatchOperation']
68
+ /** {@link Project} */
69
+ export type Project = schemas['Project']
70
+ /** {@link Role} */
71
+ export type Role = schemas['Role']
72
+ /** {@link SalesProbability} */
73
+ export type SalesProbability = schemas['SalesProbability']
74
+ /** {@link SalesProbabilityInfo} */
75
+ export type SalesProbabilityInfo = schemas['SalesProbabilityInfo']
76
+ /** {@link SalesQuota} */
77
+ export type SalesQuota = schemas['SalesQuota']
78
+ /** {@link SalesTeam} */
79
+ export type SalesTeam = schemas['SalesTeam']
80
+ /** {@link SalesTeamMember} */
81
+ export type SalesTeamMember = schemas['SalesTeamMember']
82
+ /** {@link SuccessResponse} */
83
+ export type SuccessResponse = schemas['SuccessResponse']
84
+ /** {@link Team} */
85
+ export type Team = schemas['Team']
86
+ /** {@link Ticket} */
87
+ export type Ticket = schemas['Ticket']
88
+ /** {@link Usage} */
89
+ export type Usage = schemas['Usage']
90
+
91
+ /**
92
+ * @module SalesAPI
93
+ */
94
+
95
+ /**
96
+ * Sales module
97
+ * @public
98
+ */
99
+ export class SalesAPI extends Manage {
100
+ constructor(props: CWMOptions) {
101
+ super(props)
102
+ }
103
+
104
+ getSalesActivities(params: CommonParameters = {}): Promise<Array<Activity>> {
105
+ return this.request({
106
+ path: `/sales/activities`,
107
+ method: 'get',
108
+ params,
109
+ })
110
+ }
111
+
112
+ postSalesActivities(activity: Activity): Promise<Activity> {
113
+ return this.request({
114
+ path: `/sales/activities`,
115
+ method: 'post',
116
+ data: activity,
117
+ })
118
+ }
119
+
120
+ getSalesActivitiesById(id: number, params: CommonParameters = {}): Promise<Activity> {
121
+ return this.request({
122
+ path: `/sales/activities/${id}`,
123
+ method: 'get',
124
+ params,
125
+ })
126
+ }
127
+
128
+ deleteSalesActivitiesById(id: number): Promise<NoContentResponse> {
129
+ return this.request({
130
+ path: `/sales/activities/${id}`,
131
+ method: 'delete',
132
+ })
133
+ }
134
+
135
+ putSalesActivitiesById(id: number, activity: Activity): Promise<Activity> {
136
+ return this.request({
137
+ path: `/sales/activities/${id}`,
138
+ method: 'put',
139
+ data: activity,
140
+ })
141
+ }
142
+
143
+ patchSalesActivitiesById(id: number, patchOperations: Array<PatchOperation>): Promise<Activity> {
144
+ return this.request({
145
+ path: `/sales/activities/${id}`,
146
+ method: 'patch',
147
+ data: patchOperations,
148
+ })
149
+ }
150
+
151
+ getSalesActivitiesCount(params: CommonParameters = {}): Promise<Count> {
152
+ return this.request({
153
+ path: `/sales/activities/count`,
154
+ method: 'get',
155
+ params,
156
+ })
157
+ }
158
+
159
+ getSalesActivitiesStatuses(params: CommonParameters = {}): Promise<Array<ActivityStatus>> {
160
+ return this.request({
161
+ path: `/sales/activities/statuses`,
162
+ method: 'get',
163
+ params,
164
+ })
165
+ }
166
+
167
+ postSalesActivitiesStatuses(activityStatus: ActivityStatus): Promise<ActivityStatus> {
168
+ return this.request({
169
+ path: `/sales/activities/statuses`,
170
+ method: 'post',
171
+ data: activityStatus,
172
+ })
173
+ }
174
+
175
+ getSalesActivitiesStatusesById(
176
+ id: number,
177
+ params: CommonParameters = {},
178
+ ): Promise<ActivityStatus> {
179
+ return this.request({
180
+ path: `/sales/activities/statuses/${id}`,
181
+ method: 'get',
182
+ params,
183
+ })
184
+ }
185
+
186
+ deleteSalesActivitiesStatusesById(id: number): Promise<NoContentResponse> {
187
+ return this.request({
188
+ path: `/sales/activities/statuses/${id}`,
189
+ method: 'delete',
190
+ })
191
+ }
192
+
193
+ putSalesActivitiesStatusesById(
194
+ id: number,
195
+ activityStatus: ActivityStatus,
196
+ ): Promise<ActivityStatus> {
197
+ return this.request({
198
+ path: `/sales/activities/statuses/${id}`,
199
+ method: 'put',
200
+ data: activityStatus,
201
+ })
202
+ }
203
+
204
+ patchSalesActivitiesStatusesById(
205
+ id: number,
206
+ patchOperations: Array<PatchOperation>,
207
+ ): Promise<ActivityStatus> {
208
+ return this.request({
209
+ path: `/sales/activities/statuses/${id}`,
210
+ method: 'patch',
211
+ data: patchOperations,
212
+ })
213
+ }
214
+
215
+ getSalesActivitiesStatusesByIdInfo(
216
+ id: number,
217
+ params: CommonParameters = {},
218
+ ): Promise<ActivityStatusInfo> {
219
+ return this.request({
220
+ path: `/sales/activities/statuses/${id}/info`,
221
+ method: 'get',
222
+ params,
223
+ })
224
+ }
225
+
226
+ getSalesActivitiesStatusesCount(params: CommonParameters = {}): Promise<Count> {
227
+ return this.request({
228
+ path: `/sales/activities/statuses/count`,
229
+ method: 'get',
230
+ params,
231
+ })
232
+ }
233
+
234
+ getSalesActivitiesStatusesInfo(
235
+ params: CommonParameters = {},
236
+ ): Promise<Array<ActivityStatusInfo>> {
237
+ return this.request({
238
+ path: `/sales/activities/statuses/info`,
239
+ method: 'get',
240
+ params,
241
+ })
242
+ }
243
+
244
+ getSalesActivitiesStatusesInfoCount(params: CommonParameters = {}): Promise<Count> {
245
+ return this.request({
246
+ path: `/sales/activities/statuses/info/count`,
247
+ method: 'get',
248
+ params,
249
+ })
250
+ }
251
+
252
+ getSalesActivitiesTypes(params: CommonParameters = {}): Promise<Array<ActivityType>> {
253
+ return this.request({
254
+ path: `/sales/activities/types`,
255
+ method: 'get',
256
+ params,
257
+ })
258
+ }
259
+
260
+ postSalesActivitiesTypes(activityType: ActivityType): Promise<ActivityType> {
261
+ return this.request({
262
+ path: `/sales/activities/types`,
263
+ method: 'post',
264
+ data: activityType,
265
+ })
266
+ }
267
+
268
+ getSalesActivitiesTypesById(id: number, params: CommonParameters = {}): Promise<ActivityType> {
269
+ return this.request({
270
+ path: `/sales/activities/types/${id}`,
271
+ method: 'get',
272
+ params,
273
+ })
274
+ }
275
+
276
+ deleteSalesActivitiesTypesById(id: number): Promise<NoContentResponse> {
277
+ return this.request({
278
+ path: `/sales/activities/types/${id}`,
279
+ method: 'delete',
280
+ })
281
+ }
282
+
283
+ putSalesActivitiesTypesById(id: number, activityType: ActivityType): Promise<ActivityType> {
284
+ return this.request({
285
+ path: `/sales/activities/types/${id}`,
286
+ method: 'put',
287
+ data: activityType,
288
+ })
289
+ }
290
+
291
+ patchSalesActivitiesTypesById(
292
+ id: number,
293
+ patchOperations: Array<PatchOperation>,
294
+ ): Promise<ActivityType> {
295
+ return this.request({
296
+ path: `/sales/activities/types/${id}`,
297
+ method: 'patch',
298
+ data: patchOperations,
299
+ })
300
+ }
301
+
302
+ getSalesActivitiesTypesByIdUsages(
303
+ id: number,
304
+ params: CommonParameters = {},
305
+ ): Promise<Array<Usage>> {
306
+ return this.request({
307
+ path: `/sales/activities/types/${id}/usages`,
308
+ method: 'get',
309
+ params,
310
+ })
311
+ }
312
+
313
+ getSalesActivitiesTypesByIdUsagesList(
314
+ id: number,
315
+ params: CommonParameters = {},
316
+ ): Promise<Array<Usage>> {
317
+ return this.request({
318
+ path: `/sales/activities/types/${id}/usages/list`,
319
+ method: 'get',
320
+ params,
321
+ })
322
+ }
323
+
324
+ getSalesActivitiesTypesCount(params: CommonParameters = {}): Promise<Count> {
325
+ return this.request({
326
+ path: `/sales/activities/types/count`,
327
+ method: 'get',
328
+ params,
329
+ })
330
+ }
331
+
332
+ getSalesCommissions(params: CommonParameters = {}): Promise<Array<Commission>> {
333
+ return this.request({
334
+ path: `/sales/commissions`,
335
+ method: 'get',
336
+ params,
337
+ })
338
+ }
339
+
340
+ postSalesCommissions(commission: Commission): Promise<Commission> {
341
+ return this.request({
342
+ path: `/sales/commissions`,
343
+ method: 'post',
344
+ data: commission,
345
+ })
346
+ }
347
+
348
+ getSalesCommissionsById(id: number, params: CommonParameters = {}): Promise<Commission> {
349
+ return this.request({
350
+ path: `/sales/commissions/${id}`,
351
+ method: 'get',
352
+ params,
353
+ })
354
+ }
355
+
356
+ deleteSalesCommissionsById(id: number): Promise<NoContentResponse> {
357
+ return this.request({
358
+ path: `/sales/commissions/${id}`,
359
+ method: 'delete',
360
+ })
361
+ }
362
+
363
+ putSalesCommissionsById(id: number, commission: Commission): Promise<Commission> {
364
+ return this.request({
365
+ path: `/sales/commissions/${id}`,
366
+ method: 'put',
367
+ data: commission,
368
+ })
369
+ }
370
+
371
+ patchSalesCommissionsById(
372
+ id: number,
373
+ patchOperations: Array<PatchOperation>,
374
+ ): Promise<Commission> {
375
+ return this.request({
376
+ path: `/sales/commissions/${id}`,
377
+ method: 'patch',
378
+ data: patchOperations,
379
+ })
380
+ }
381
+
382
+ getSalesCommissionsByIdUsages(id: number, params: CommonParameters = {}): Promise<Array<Usage>> {
383
+ return this.request({
384
+ path: `/sales/commissions/${id}/usages`,
385
+ method: 'get',
386
+ params,
387
+ })
388
+ }
389
+
390
+ getSalesCommissionsByIdUsagesList(
391
+ id: number,
392
+ params: CommonParameters = {},
393
+ ): Promise<Array<Usage>> {
394
+ return this.request({
395
+ path: `/sales/commissions/${id}/usages/list`,
396
+ method: 'get',
397
+ params,
398
+ })
399
+ }
400
+
401
+ getSalesCommissionsCount(params: CommonParameters = {}): Promise<Count> {
402
+ return this.request({
403
+ path: `/sales/commissions/count`,
404
+ method: 'get',
405
+ params,
406
+ })
407
+ }
408
+
409
+ getSalesOpportunities(params: CommonParameters = {}): Promise<Array<Opportunity>> {
410
+ return this.request({
411
+ path: `/sales/opportunities`,
412
+ method: 'get',
413
+ params,
414
+ })
415
+ }
416
+
417
+ postSalesOpportunities(opportunity: Opportunity): Promise<Opportunity> {
418
+ return this.request({
419
+ path: `/sales/opportunities`,
420
+ method: 'post',
421
+ data: opportunity,
422
+ })
423
+ }
424
+
425
+ getSalesOpportunitiesById(id: number, params: CommonParameters = {}): Promise<Opportunity> {
426
+ return this.request({
427
+ path: `/sales/opportunities/${id}`,
428
+ method: 'get',
429
+ params,
430
+ })
431
+ }
432
+
433
+ deleteSalesOpportunitiesById(id: number): Promise<NoContentResponse> {
434
+ return this.request({
435
+ path: `/sales/opportunities/${id}`,
436
+ method: 'delete',
437
+ })
438
+ }
439
+
440
+ putSalesOpportunitiesById(id: number, opportunity: Opportunity): Promise<Opportunity> {
441
+ return this.request({
442
+ path: `/sales/opportunities/${id}`,
443
+ method: 'put',
444
+ data: opportunity,
445
+ })
446
+ }
447
+
448
+ patchSalesOpportunitiesById(
449
+ id: number,
450
+ patchOperations: Array<PatchOperation>,
451
+ ): Promise<Opportunity> {
452
+ return this.request({
453
+ path: `/sales/opportunities/${id}`,
454
+ method: 'patch',
455
+ data: patchOperations,
456
+ })
457
+ }
458
+
459
+ postSalesOpportunitiesByIdConvertToAgreement(
460
+ id: number,
461
+ conversion: OpportunityToAgreementConversion,
462
+ ): Promise<Agreement> {
463
+ return this.request({
464
+ path: `/sales/opportunities/${id}/convertToAgreement`,
465
+ method: 'post',
466
+ data: conversion,
467
+ })
468
+ }
469
+
470
+ postSalesOpportunitiesByIdConvertToProject(
471
+ id: number,
472
+ conversion: OpportunityToProjectConversion,
473
+ ): Promise<Project> {
474
+ return this.request({
475
+ path: `/sales/opportunities/${id}/convertToProject`,
476
+ method: 'post',
477
+ data: conversion,
478
+ })
479
+ }
480
+
481
+ postSalesOpportunitiesByIdConvertToSalesOrder(
482
+ id: number,
483
+ conversion: OpportunityToSalesOrderConversion,
484
+ ): Promise<Order> {
485
+ return this.request({
486
+ path: `/sales/opportunities/${id}/convertToSalesOrder`,
487
+ method: 'post',
488
+ data: conversion,
489
+ })
490
+ }
491
+
492
+ postSalesOpportunitiesByIdConvertToServiceTicket(
493
+ id: number,
494
+ conversion: OpportunityToServiceTicketConversion,
495
+ ): Promise<Ticket> {
496
+ return this.request({
497
+ path: `/sales/opportunities/${id}/convertToServiceTicket`,
498
+ method: 'post',
499
+ data: conversion,
500
+ })
501
+ }
502
+
503
+ getSalesOpportunitiesByParentIdContacts(
504
+ parentId: number,
505
+ params: CommonParameters = {},
506
+ ): Promise<Array<OpportunityContact>> {
507
+ return this.request({
508
+ path: `/sales/opportunities/${parentId}/contacts`,
509
+ method: 'get',
510
+ params,
511
+ })
512
+ }
513
+
514
+ postSalesOpportunitiesByParentIdContacts(
515
+ parentId: number,
516
+ opportunityContact: OpportunityContact,
517
+ ): Promise<OpportunityContact> {
518
+ return this.request({
519
+ path: `/sales/opportunities/${parentId}/contacts`,
520
+ method: 'post',
521
+ data: opportunityContact,
522
+ })
523
+ }
524
+
525
+ getSalesOpportunitiesByParentIdContactsById(
526
+ id: number,
527
+ parentId: number,
528
+ params: CommonParameters = {},
529
+ ): Promise<OpportunityContact> {
530
+ return this.request({
531
+ path: `/sales/opportunities/${parentId}/contacts/${id}`,
532
+ method: 'get',
533
+ params,
534
+ })
535
+ }
536
+
537
+ deleteSalesOpportunitiesByParentIdContactsById(
538
+ id: number,
539
+ parentId: number,
540
+ ): Promise<NoContentResponse> {
541
+ return this.request({
542
+ path: `/sales/opportunities/${parentId}/contacts/${id}`,
543
+ method: 'delete',
544
+ })
545
+ }
546
+
547
+ putSalesOpportunitiesByParentIdContactsById(
548
+ id: number,
549
+ parentId: number,
550
+ opportunityContact: OpportunityContact,
551
+ ): Promise<OpportunityContact> {
552
+ return this.request({
553
+ path: `/sales/opportunities/${parentId}/contacts/${id}`,
554
+ method: 'put',
555
+ data: opportunityContact,
556
+ })
557
+ }
558
+
559
+ patchSalesOpportunitiesByParentIdContactsById(
560
+ id: number,
561
+ parentId: number,
562
+ patchOperations: Array<PatchOperation>,
563
+ ): Promise<OpportunityContact> {
564
+ return this.request({
565
+ path: `/sales/opportunities/${parentId}/contacts/${id}`,
566
+ method: 'patch',
567
+ data: patchOperations,
568
+ })
569
+ }
570
+
571
+ getSalesOpportunitiesByParentIdContactsCount(
572
+ parentId: number,
573
+ params: CommonParameters = {},
574
+ ): Promise<Count> {
575
+ return this.request({
576
+ path: `/sales/opportunities/${parentId}/contacts/count`,
577
+ method: 'get',
578
+ params,
579
+ })
580
+ }
581
+
582
+ getSalesOpportunitiesByParentIdForecast(
583
+ parentId: number,
584
+ params: CommonParameters = {},
585
+ ): Promise<Array<Forecast>> {
586
+ return this.request({
587
+ path: `/sales/opportunities/${parentId}/forecast`,
588
+ method: 'get',
589
+ params,
590
+ })
591
+ }
592
+
593
+ postSalesOpportunitiesByParentIdForecast(
594
+ parentId: number,
595
+ forecast: Forecast,
596
+ ): Promise<Forecast> {
597
+ return this.request({
598
+ path: `/sales/opportunities/${parentId}/forecast`,
599
+ method: 'post',
600
+ data: forecast,
601
+ })
602
+ }
603
+
604
+ deleteSalesOpportunitiesByParentIdForecast(parentId: number): Promise<NoContentResponse> {
605
+ return this.request({
606
+ path: `/sales/opportunities/${parentId}/forecast/`,
607
+ method: 'delete',
608
+ })
609
+ }
610
+
611
+ putSalesOpportunitiesByParentIdForecast(parentId: number, forecast: Forecast): Promise<Forecast> {
612
+ return this.request({
613
+ path: `/sales/opportunities/${parentId}/forecast/`,
614
+ method: 'put',
615
+ data: forecast,
616
+ })
617
+ }
618
+
619
+ patchSalesOpportunitiesByParentIdForecast(
620
+ parentId: number,
621
+ patchOperations: Array<PatchOperation>,
622
+ ): Promise<Forecast> {
623
+ return this.request({
624
+ path: `/sales/opportunities/${parentId}/forecast/`,
625
+ method: 'patch',
626
+ data: patchOperations,
627
+ })
628
+ }
629
+
630
+ getSalesOpportunitiesByParentIdForecastById(
631
+ id: number,
632
+ parentId: number,
633
+ params: CommonParameters = {},
634
+ ): Promise<ForecastItem> {
635
+ return this.request({
636
+ path: `/sales/opportunities/${parentId}/forecast/${id}`,
637
+ method: 'get',
638
+ params,
639
+ })
640
+ }
641
+
642
+ postSalesOpportunitiesByParentIdForecastById(
643
+ id: number,
644
+ parentId: number,
645
+ forecast: ForecastItem,
646
+ ): Promise<ForecastItem> {
647
+ return this.request({
648
+ path: `/sales/opportunities/${parentId}/forecast/${id}`,
649
+ method: 'post',
650
+ data: forecast,
651
+ })
652
+ }
653
+
654
+ deleteSalesOpportunitiesByParentIdForecastById(
655
+ id: number,
656
+ parentId: number,
657
+ ): Promise<NoContentResponse> {
658
+ return this.request({
659
+ path: `/sales/opportunities/${parentId}/forecast/${id}`,
660
+ method: 'delete',
661
+ })
662
+ }
663
+
664
+ putSalesOpportunitiesByParentIdForecastById(
665
+ id: number,
666
+ parentId: number,
667
+ forecast: ForecastItem,
668
+ ): Promise<ForecastItem> {
669
+ return this.request({
670
+ path: `/sales/opportunities/${parentId}/forecast/${id}`,
671
+ method: 'put',
672
+ data: forecast,
673
+ })
674
+ }
675
+
676
+ patchSalesOpportunitiesByParentIdForecastById(
677
+ id: number,
678
+ parentId: number,
679
+ patchOperations: Array<PatchOperation>,
680
+ ): Promise<ForecastItem> {
681
+ return this.request({
682
+ path: `/sales/opportunities/${parentId}/forecast/${id}`,
683
+ method: 'patch',
684
+ data: patchOperations,
685
+ })
686
+ }
687
+
688
+ postSalesOpportunitiesByParentIdForecastCopyById(
689
+ id: number,
690
+ parentId: number,
691
+ ): Promise<SuccessResponse> {
692
+ return this.request({
693
+ path: `/sales/opportunities/${parentId}/forecast/copy/${id}`,
694
+ method: 'post',
695
+ })
696
+ }
697
+
698
+ getSalesOpportunitiesByParentIdForecastCount(
699
+ parentId: number,
700
+ params: CommonParameters = {},
701
+ ): Promise<Count> {
702
+ return this.request({
703
+ path: `/sales/opportunities/${parentId}/forecast/count`,
704
+ method: 'get',
705
+ params,
706
+ })
707
+ }
708
+
709
+ getSalesOpportunitiesByParentIdNotes(
710
+ parentId: number,
711
+ params: CommonParameters = {},
712
+ ): Promise<Array<OpportunityNote>> {
713
+ return this.request({
714
+ path: `/sales/opportunities/${parentId}/notes`,
715
+ method: 'get',
716
+ params,
717
+ })
718
+ }
719
+
720
+ postSalesOpportunitiesByParentIdNotes(
721
+ parentId: number,
722
+ note: OpportunityNote,
723
+ ): Promise<OpportunityNote> {
724
+ return this.request({
725
+ path: `/sales/opportunities/${parentId}/notes`,
726
+ method: 'post',
727
+ data: note,
728
+ })
729
+ }
730
+
731
+ getSalesOpportunitiesByParentIdNotesById(
732
+ id: number,
733
+ parentId: number,
734
+ params: CommonParameters = {},
735
+ ): Promise<OpportunityNote> {
736
+ return this.request({
737
+ path: `/sales/opportunities/${parentId}/notes/${id}`,
738
+ method: 'get',
739
+ params,
740
+ })
741
+ }
742
+
743
+ deleteSalesOpportunitiesByParentIdNotesById(
744
+ id: number,
745
+ parentId: number,
746
+ ): Promise<NoContentResponse> {
747
+ return this.request({
748
+ path: `/sales/opportunities/${parentId}/notes/${id}`,
749
+ method: 'delete',
750
+ })
751
+ }
752
+
753
+ putSalesOpportunitiesByParentIdNotesById(
754
+ id: number,
755
+ parentId: number,
756
+ note: OpportunityNote,
757
+ ): Promise<OpportunityNote> {
758
+ return this.request({
759
+ path: `/sales/opportunities/${parentId}/notes/${id}`,
760
+ method: 'put',
761
+ data: note,
762
+ })
763
+ }
764
+
765
+ patchSalesOpportunitiesByParentIdNotesById(
766
+ id: number,
767
+ parentId: number,
768
+ patchOperations: Array<PatchOperation>,
769
+ ): Promise<OpportunityNote> {
770
+ return this.request({
771
+ path: `/sales/opportunities/${parentId}/notes/${id}`,
772
+ method: 'patch',
773
+ data: patchOperations,
774
+ })
775
+ }
776
+
777
+ getSalesOpportunitiesByParentIdNotesCount(
778
+ parentId: number,
779
+ params: CommonParameters = {},
780
+ ): Promise<Array<OpportunityNote>> {
781
+ return this.request({
782
+ path: `/sales/opportunities/${parentId}/notes/count`,
783
+ method: 'get',
784
+ params,
785
+ })
786
+ }
787
+
788
+ getSalesOpportunitiesByParentIdTeam(
789
+ parentId: number,
790
+ params: CommonParameters = {},
791
+ ): Promise<Array<Team>> {
792
+ return this.request({
793
+ path: `/sales/opportunities/${parentId}/team`,
794
+ method: 'get',
795
+ params,
796
+ })
797
+ }
798
+
799
+ postSalesOpportunitiesByParentIdTeam(parentId: number, team: Team): Promise<Team> {
800
+ return this.request({
801
+ path: `/sales/opportunities/${parentId}/team`,
802
+ method: 'post',
803
+ data: team,
804
+ })
805
+ }
806
+
807
+ getSalesOpportunitiesByParentIdTeamById(
808
+ id: number,
809
+ parentId: number,
810
+ params: CommonParameters = {},
811
+ ): Promise<Team> {
812
+ return this.request({
813
+ path: `/sales/opportunities/${parentId}/team/${id}`,
814
+ method: 'get',
815
+ params,
816
+ })
817
+ }
818
+
819
+ deleteSalesOpportunitiesByParentIdTeamById(
820
+ id: number,
821
+ parentId: number,
822
+ ): Promise<NoContentResponse> {
823
+ return this.request({
824
+ path: `/sales/opportunities/${parentId}/team/${id}`,
825
+ method: 'delete',
826
+ })
827
+ }
828
+
829
+ putSalesOpportunitiesByParentIdTeamById(id: number, parentId: number, team: Team): Promise<Team> {
830
+ return this.request({
831
+ path: `/sales/opportunities/${parentId}/team/${id}`,
832
+ method: 'put',
833
+ data: team,
834
+ })
835
+ }
836
+
837
+ patchSalesOpportunitiesByParentIdTeamById(
838
+ id: number,
839
+ parentId: number,
840
+ patchOperations: Array<PatchOperation>,
841
+ ): Promise<Team> {
842
+ return this.request({
843
+ path: `/sales/opportunities/${parentId}/team/${id}`,
844
+ method: 'patch',
845
+ data: patchOperations,
846
+ })
847
+ }
848
+
849
+ getSalesOpportunitiesByParentIdTeamCount(
850
+ parentId: number,
851
+ params: CommonParameters = {},
852
+ ): Promise<Count> {
853
+ return this.request({
854
+ path: `/sales/opportunities/${parentId}/team/count`,
855
+ method: 'get',
856
+ params,
857
+ })
858
+ }
859
+
860
+ getSalesOpportunitiesCount(params: CommonParameters = {}): Promise<Count> {
861
+ return this.request({
862
+ path: `/sales/opportunities/count`,
863
+ method: 'get',
864
+ params,
865
+ })
866
+ }
867
+
868
+ getSalesOpportunitiesDefault(params: CommonParameters = {}): Promise<Opportunity> {
869
+ return this.request({
870
+ path: `/sales/opportunities/default`,
871
+ method: 'get',
872
+ params,
873
+ })
874
+ }
875
+
876
+ getSalesOpportunitiesRatings(params: CommonParameters = {}): Promise<Array<OpportunityRating>> {
877
+ return this.request({
878
+ path: `/sales/opportunities/ratings`,
879
+ method: 'get',
880
+ params,
881
+ })
882
+ }
883
+
884
+ postSalesOpportunitiesRatings(opportunityRating: OpportunityRating): Promise<OpportunityRating> {
885
+ return this.request({
886
+ path: `/sales/opportunities/ratings`,
887
+ method: 'post',
888
+ data: opportunityRating,
889
+ })
890
+ }
891
+
892
+ getSalesOpportunitiesRatingsById(
893
+ id: number,
894
+ params: CommonParameters = {},
895
+ ): Promise<OpportunityRating> {
896
+ return this.request({
897
+ path: `/sales/opportunities/ratings/${id}`,
898
+ method: 'get',
899
+ params,
900
+ })
901
+ }
902
+
903
+ deleteSalesOpportunitiesRatingsById(id: number): Promise<NoContentResponse> {
904
+ return this.request({
905
+ path: `/sales/opportunities/ratings/${id}`,
906
+ method: 'delete',
907
+ })
908
+ }
909
+
910
+ putSalesOpportunitiesRatingsById(
911
+ id: number,
912
+ opportunityRating: OpportunityRating,
913
+ ): Promise<OpportunityRating> {
914
+ return this.request({
915
+ path: `/sales/opportunities/ratings/${id}`,
916
+ method: 'put',
917
+ data: opportunityRating,
918
+ })
919
+ }
920
+
921
+ patchSalesOpportunitiesRatingsById(
922
+ id: number,
923
+ patchOperations: Array<PatchOperation>,
924
+ ): Promise<OpportunityRating> {
925
+ return this.request({
926
+ path: `/sales/opportunities/ratings/${id}`,
927
+ method: 'patch',
928
+ data: patchOperations,
929
+ })
930
+ }
931
+
932
+ getSalesOpportunitiesRatingsByIdInfo(
933
+ id: number,
934
+ params: CommonParameters = {},
935
+ ): Promise<OpportunityRatingInfo> {
936
+ return this.request({
937
+ path: `/sales/opportunities/ratings/${id}/info`,
938
+ method: 'get',
939
+ params,
940
+ })
941
+ }
942
+
943
+ getSalesOpportunitiesRatingsCount(params: CommonParameters = {}): Promise<Count> {
944
+ return this.request({
945
+ path: `/sales/opportunities/ratings/count`,
946
+ method: 'get',
947
+ params,
948
+ })
949
+ }
950
+
951
+ getSalesOpportunitiesRatingsInfo(
952
+ params: CommonParameters = {},
953
+ ): Promise<Array<OpportunityRatingInfo>> {
954
+ return this.request({
955
+ path: `/sales/opportunities/ratings/info`,
956
+ method: 'get',
957
+ params,
958
+ })
959
+ }
960
+
961
+ getSalesOpportunitiesRatingsInfoCount(params: CommonParameters = {}): Promise<Count> {
962
+ return this.request({
963
+ path: `/sales/opportunities/ratings/info/count`,
964
+ method: 'get',
965
+ params,
966
+ })
967
+ }
968
+
969
+ getSalesOpportunitiesStatuses(params: CommonParameters = {}): Promise<Array<OpportunityStatus>> {
970
+ return this.request({
971
+ path: `/sales/opportunities/statuses`,
972
+ method: 'get',
973
+ params,
974
+ })
975
+ }
976
+
977
+ postSalesOpportunitiesStatuses(status: OpportunityStatus): Promise<OpportunityStatus> {
978
+ return this.request({
979
+ path: `/sales/opportunities/statuses`,
980
+ method: 'post',
981
+ data: status,
982
+ })
983
+ }
984
+
985
+ getSalesOpportunitiesStatusesById(
986
+ id: number,
987
+ params: CommonParameters = {},
988
+ ): Promise<OpportunityStatus> {
989
+ return this.request({
990
+ path: `/sales/opportunities/statuses/${id}`,
991
+ method: 'get',
992
+ params,
993
+ })
994
+ }
995
+
996
+ deleteSalesOpportunitiesStatusesById(id: number): Promise<NoContentResponse> {
997
+ return this.request({
998
+ path: `/sales/opportunities/statuses/${id}`,
999
+ method: 'delete',
1000
+ })
1001
+ }
1002
+
1003
+ putSalesOpportunitiesStatusesById(
1004
+ id: number,
1005
+ status: OpportunityStatus,
1006
+ ): Promise<OpportunityStatus> {
1007
+ return this.request({
1008
+ path: `/sales/opportunities/statuses/${id}`,
1009
+ method: 'put',
1010
+ data: status,
1011
+ })
1012
+ }
1013
+
1014
+ patchSalesOpportunitiesStatusesById(
1015
+ id: number,
1016
+ patchOperations: Array<PatchOperation>,
1017
+ ): Promise<OpportunityStatus> {
1018
+ return this.request({
1019
+ path: `/sales/opportunities/statuses/${id}`,
1020
+ method: 'patch',
1021
+ data: patchOperations,
1022
+ })
1023
+ }
1024
+
1025
+ getSalesOpportunitiesStatusesByIdInfo(
1026
+ id: number,
1027
+ params: CommonParameters = {},
1028
+ ): Promise<OpportunityStatusInfo> {
1029
+ return this.request({
1030
+ path: `/sales/opportunities/statuses/${id}/info`,
1031
+ method: 'get',
1032
+ params,
1033
+ })
1034
+ }
1035
+
1036
+ getSalesOpportunitiesStatusesByIdUsages(
1037
+ id: number,
1038
+ params: CommonParameters = {},
1039
+ ): Promise<Array<Usage>> {
1040
+ return this.request({
1041
+ path: `/sales/opportunities/statuses/${id}/usages`,
1042
+ method: 'get',
1043
+ params,
1044
+ })
1045
+ }
1046
+
1047
+ getSalesOpportunitiesStatusesByIdUsagesList(
1048
+ id: number,
1049
+ params: CommonParameters = {},
1050
+ ): Promise<Array<Usage>> {
1051
+ return this.request({
1052
+ path: `/sales/opportunities/statuses/${id}/usages/list`,
1053
+ method: 'get',
1054
+ params,
1055
+ })
1056
+ }
1057
+
1058
+ getSalesOpportunitiesStatusesCount(params: CommonParameters = {}): Promise<Count> {
1059
+ return this.request({
1060
+ path: `/sales/opportunities/statuses/count`,
1061
+ method: 'get',
1062
+ params,
1063
+ })
1064
+ }
1065
+
1066
+ getSalesOpportunitiesStatusesInfo(
1067
+ params: CommonParameters = {},
1068
+ ): Promise<Array<OpportunityStatusInfo>> {
1069
+ return this.request({
1070
+ path: `/sales/opportunities/statuses/info`,
1071
+ method: 'get',
1072
+ params,
1073
+ })
1074
+ }
1075
+
1076
+ getSalesOpportunitiesStatusesInfoCount(params: CommonParameters = {}): Promise<Count> {
1077
+ return this.request({
1078
+ path: `/sales/opportunities/statuses/info/count`,
1079
+ method: 'get',
1080
+ params,
1081
+ })
1082
+ }
1083
+
1084
+ getSalesOpportunitiesTypes(params: CommonParameters = {}): Promise<Array<OpportunityType>> {
1085
+ return this.request({
1086
+ path: `/sales/opportunities/types`,
1087
+ method: 'get',
1088
+ params,
1089
+ })
1090
+ }
1091
+
1092
+ postSalesOpportunitiesTypes(opportunityType: OpportunityType): Promise<OpportunityType> {
1093
+ return this.request({
1094
+ path: `/sales/opportunities/types`,
1095
+ method: 'post',
1096
+ data: opportunityType,
1097
+ })
1098
+ }
1099
+
1100
+ getSalesOpportunitiesTypesById(
1101
+ id: number,
1102
+ params: CommonParameters = {},
1103
+ ): Promise<OpportunityType> {
1104
+ return this.request({
1105
+ path: `/sales/opportunities/types/${id}`,
1106
+ method: 'get',
1107
+ params,
1108
+ })
1109
+ }
1110
+
1111
+ deleteSalesOpportunitiesTypesById(id: number): Promise<NoContentResponse> {
1112
+ return this.request({
1113
+ path: `/sales/opportunities/types/${id}`,
1114
+ method: 'delete',
1115
+ })
1116
+ }
1117
+
1118
+ putSalesOpportunitiesTypesById(
1119
+ id: number,
1120
+ opportunityType: OpportunityType,
1121
+ ): Promise<OpportunityType> {
1122
+ return this.request({
1123
+ path: `/sales/opportunities/types/${id}`,
1124
+ method: 'put',
1125
+ data: opportunityType,
1126
+ })
1127
+ }
1128
+
1129
+ patchSalesOpportunitiesTypesById(
1130
+ id: number,
1131
+ patchOperations: Array<PatchOperation>,
1132
+ ): Promise<OpportunityType> {
1133
+ return this.request({
1134
+ path: `/sales/opportunities/types/${id}`,
1135
+ method: 'patch',
1136
+ data: patchOperations,
1137
+ })
1138
+ }
1139
+
1140
+ getSalesOpportunitiesTypesByIdInfo(
1141
+ id: number,
1142
+ params: CommonParameters = {},
1143
+ ): Promise<OpportunityTypeInfo> {
1144
+ return this.request({
1145
+ path: `/sales/opportunities/types/${id}/info`,
1146
+ method: 'get',
1147
+ params,
1148
+ })
1149
+ }
1150
+
1151
+ getSalesOpportunitiesTypesByIdUsages(
1152
+ id: number,
1153
+ params: CommonParameters = {},
1154
+ ): Promise<Array<Usage>> {
1155
+ return this.request({
1156
+ path: `/sales/opportunities/types/${id}/usages`,
1157
+ method: 'get',
1158
+ params,
1159
+ })
1160
+ }
1161
+
1162
+ getSalesOpportunitiesTypesByIdUsagesList(
1163
+ id: number,
1164
+ params: CommonParameters = {},
1165
+ ): Promise<Array<Usage>> {
1166
+ return this.request({
1167
+ path: `/sales/opportunities/types/${id}/usages/list`,
1168
+ method: 'get',
1169
+ params,
1170
+ })
1171
+ }
1172
+
1173
+ getSalesOpportunitiesTypesCount(params: CommonParameters = {}): Promise<Count> {
1174
+ return this.request({
1175
+ path: `/sales/opportunities/types/count`,
1176
+ method: 'get',
1177
+ params,
1178
+ })
1179
+ }
1180
+
1181
+ getSalesOpportunitiesTypesInfo(
1182
+ params: CommonParameters = {},
1183
+ ): Promise<Array<OpportunityTypeInfo>> {
1184
+ return this.request({
1185
+ path: `/sales/opportunities/types/info`,
1186
+ method: 'get',
1187
+ params,
1188
+ })
1189
+ }
1190
+
1191
+ getSalesOpportunitiesTypesInfoCount(params: CommonParameters = {}): Promise<Count> {
1192
+ return this.request({
1193
+ path: `/sales/opportunities/types/info/count`,
1194
+ method: 'get',
1195
+ params,
1196
+ })
1197
+ }
1198
+
1199
+ getSalesOrders(params: CommonParameters = {}): Promise<Array<Order>> {
1200
+ return this.request({
1201
+ path: `/sales/orders`,
1202
+ method: 'get',
1203
+ params,
1204
+ })
1205
+ }
1206
+
1207
+ postSalesOrders(order: Order): Promise<Order> {
1208
+ return this.request({
1209
+ path: `/sales/orders`,
1210
+ method: 'post',
1211
+ data: order,
1212
+ })
1213
+ }
1214
+
1215
+ getSalesOrdersById(id: number, params: CommonParameters = {}): Promise<Order> {
1216
+ return this.request({
1217
+ path: `/sales/orders/${id}`,
1218
+ method: 'get',
1219
+ params,
1220
+ })
1221
+ }
1222
+
1223
+ deleteSalesOrdersById(id: number): Promise<NoContentResponse> {
1224
+ return this.request({
1225
+ path: `/sales/orders/${id}`,
1226
+ method: 'delete',
1227
+ })
1228
+ }
1229
+
1230
+ putSalesOrdersById(id: number, order: Order): Promise<Order> {
1231
+ return this.request({
1232
+ path: `/sales/orders/${id}`,
1233
+ method: 'put',
1234
+ data: order,
1235
+ })
1236
+ }
1237
+
1238
+ patchSalesOrdersById(id: number, patchOperations: Array<PatchOperation>): Promise<Order> {
1239
+ return this.request({
1240
+ path: `/sales/orders/${id}`,
1241
+ method: 'patch',
1242
+ data: patchOperations,
1243
+ })
1244
+ }
1245
+
1246
+ postSalesOrdersByIdConvertToServiceTicket(id: number): Promise<Ticket> {
1247
+ return this.request({
1248
+ path: `/sales/orders/${id}/convertToServiceTicket`,
1249
+ method: 'post',
1250
+ })
1251
+ }
1252
+
1253
+ getSalesOrdersCount(params: CommonParameters = {}): Promise<Count> {
1254
+ return this.request({
1255
+ path: `/sales/orders/count`,
1256
+ method: 'get',
1257
+ params,
1258
+ })
1259
+ }
1260
+
1261
+ getSalesOrdersStatuses(params: CommonParameters = {}): Promise<Array<OrderStatus>> {
1262
+ return this.request({
1263
+ path: `/sales/orders/statuses`,
1264
+ method: 'get',
1265
+ params,
1266
+ })
1267
+ }
1268
+
1269
+ postSalesOrdersStatuses(status: OrderStatus): Promise<Array<OrderStatus>> {
1270
+ return this.request({
1271
+ path: `/sales/orders/statuses`,
1272
+ method: 'post',
1273
+ data: status,
1274
+ })
1275
+ }
1276
+
1277
+ getSalesOrdersStatusesById(id: number, params: CommonParameters = {}): Promise<OrderStatus> {
1278
+ return this.request({
1279
+ path: `/sales/orders/statuses/${id}`,
1280
+ method: 'get',
1281
+ params,
1282
+ })
1283
+ }
1284
+
1285
+ deleteSalesOrdersStatusesById(id: number): Promise<NoContentResponse> {
1286
+ return this.request({
1287
+ path: `/sales/orders/statuses/${id}`,
1288
+ method: 'delete',
1289
+ })
1290
+ }
1291
+
1292
+ putSalesOrdersStatusesById(id: number, status: OrderStatus): Promise<OrderStatus> {
1293
+ return this.request({
1294
+ path: `/sales/orders/statuses/${id}`,
1295
+ method: 'put',
1296
+ data: status,
1297
+ })
1298
+ }
1299
+
1300
+ patchSalesOrdersStatusesById(
1301
+ id: number,
1302
+ patchOperations: Array<PatchOperation>,
1303
+ ): Promise<OrderStatus> {
1304
+ return this.request({
1305
+ path: `/sales/orders/statuses/${id}`,
1306
+ method: 'patch',
1307
+ data: patchOperations,
1308
+ })
1309
+ }
1310
+
1311
+ getSalesOrdersStatusesByIdInfo(
1312
+ id: number,
1313
+ params: CommonParameters = {},
1314
+ ): Promise<OrderStatusInfo> {
1315
+ return this.request({
1316
+ path: `/sales/orders/statuses/${id}/info`,
1317
+ method: 'get',
1318
+ params,
1319
+ })
1320
+ }
1321
+
1322
+ getSalesOrdersStatusesByIdUsages(
1323
+ id: number,
1324
+ params: CommonParameters = {},
1325
+ ): Promise<Array<Usage>> {
1326
+ return this.request({
1327
+ path: `/sales/orders/statuses/${id}/usages`,
1328
+ method: 'get',
1329
+ params,
1330
+ })
1331
+ }
1332
+
1333
+ getSalesOrdersStatusesByIdUsagesList(
1334
+ id: number,
1335
+ params: CommonParameters = {},
1336
+ ): Promise<Array<Usage>> {
1337
+ return this.request({
1338
+ path: `/sales/orders/statuses/${id}/usages/list`,
1339
+ method: 'get',
1340
+ params,
1341
+ })
1342
+ }
1343
+
1344
+ getSalesOrdersStatusesByParentIdEmailtemplates(
1345
+ parentId: number,
1346
+ params: CommonParameters = {},
1347
+ ): Promise<Array<OrderStatusEmailTemplate>> {
1348
+ return this.request({
1349
+ path: `/sales/orders/statuses/${parentId}/emailtemplates/`,
1350
+ method: 'get',
1351
+ params,
1352
+ })
1353
+ }
1354
+
1355
+ postSalesOrdersStatusesByParentIdEmailtemplates(
1356
+ parentId: number,
1357
+ orderStatusEmailTemplate: OrderStatusEmailTemplate,
1358
+ ): Promise<OrderStatusEmailTemplate> {
1359
+ return this.request({
1360
+ path: `/sales/orders/statuses/${parentId}/emailtemplates/`,
1361
+ method: 'post',
1362
+ data: orderStatusEmailTemplate,
1363
+ })
1364
+ }
1365
+
1366
+ getSalesOrdersStatusesByParentIdEmailtemplatesById(
1367
+ id: number,
1368
+ parentId: number,
1369
+ params: CommonParameters = {},
1370
+ ): Promise<OrderStatusEmailTemplate> {
1371
+ return this.request({
1372
+ path: `/sales/orders/statuses/${parentId}/emailtemplates/${id}`,
1373
+ method: 'get',
1374
+ params,
1375
+ })
1376
+ }
1377
+
1378
+ deleteSalesOrdersStatusesByParentIdEmailtemplatesById(
1379
+ id: number,
1380
+ parentId: number,
1381
+ ): Promise<NoContentResponse> {
1382
+ return this.request({
1383
+ path: `/sales/orders/statuses/${parentId}/emailtemplates/${id}`,
1384
+ method: 'delete',
1385
+ })
1386
+ }
1387
+
1388
+ putSalesOrdersStatusesByParentIdEmailtemplatesById(
1389
+ id: number,
1390
+ parentId: number,
1391
+ orderStatusEmailTemplate: OrderStatusEmailTemplate,
1392
+ ): Promise<OrderStatusEmailTemplate> {
1393
+ return this.request({
1394
+ path: `/sales/orders/statuses/${parentId}/emailtemplates/${id}`,
1395
+ method: 'put',
1396
+ data: orderStatusEmailTemplate,
1397
+ })
1398
+ }
1399
+
1400
+ patchSalesOrdersStatusesByParentIdEmailtemplatesById(
1401
+ id: number,
1402
+ parentId: number,
1403
+ patchOperations: Array<PatchOperation>,
1404
+ ): Promise<OrderStatusEmailTemplate> {
1405
+ return this.request({
1406
+ path: `/sales/orders/statuses/${parentId}/emailtemplates/${id}`,
1407
+ method: 'patch',
1408
+ data: patchOperations,
1409
+ })
1410
+ }
1411
+
1412
+ getSalesOrdersStatusesByParentIdEmailtemplatesCount(
1413
+ parentId: number,
1414
+ params: CommonParameters = {},
1415
+ ): Promise<Count> {
1416
+ return this.request({
1417
+ path: `/sales/orders/statuses/${parentId}/emailtemplates/count`,
1418
+ method: 'get',
1419
+ params,
1420
+ })
1421
+ }
1422
+
1423
+ getSalesOrdersStatusesByParentIdNotifications(
1424
+ parentId: number,
1425
+ params: CommonParameters = {},
1426
+ ): Promise<Array<OrderStatusNotification>> {
1427
+ return this.request({
1428
+ path: `/sales/orders/statuses/${parentId}/notifications`,
1429
+ method: 'get',
1430
+ params,
1431
+ })
1432
+ }
1433
+
1434
+ postSalesOrdersStatusesByParentIdNotifications(
1435
+ parentId: number,
1436
+ orderStatusNotification: OrderStatusNotification,
1437
+ ): Promise<OrderStatusNotification> {
1438
+ return this.request({
1439
+ path: `/sales/orders/statuses/${parentId}/notifications`,
1440
+ method: 'post',
1441
+ data: orderStatusNotification,
1442
+ })
1443
+ }
1444
+
1445
+ getSalesOrdersStatusesByParentIdNotificationsById(
1446
+ id: number,
1447
+ parentId: number,
1448
+ params: CommonParameters = {},
1449
+ ): Promise<OrderStatusNotification> {
1450
+ return this.request({
1451
+ path: `/sales/orders/statuses/${parentId}/notifications/${id}`,
1452
+ method: 'get',
1453
+ params,
1454
+ })
1455
+ }
1456
+
1457
+ deleteSalesOrdersStatusesByParentIdNotificationsById(
1458
+ id: number,
1459
+ parentId: number,
1460
+ ): Promise<NoContentResponse> {
1461
+ return this.request({
1462
+ path: `/sales/orders/statuses/${parentId}/notifications/${id}`,
1463
+ method: 'delete',
1464
+ })
1465
+ }
1466
+
1467
+ putSalesOrdersStatusesByParentIdNotificationsById(
1468
+ id: number,
1469
+ parentId: number,
1470
+ orderStatusNotification: OrderStatusNotification,
1471
+ ): Promise<OrderStatusNotification> {
1472
+ return this.request({
1473
+ path: `/sales/orders/statuses/${parentId}/notifications/${id}`,
1474
+ method: 'put',
1475
+ data: orderStatusNotification,
1476
+ })
1477
+ }
1478
+
1479
+ patchSalesOrdersStatusesByParentIdNotificationsById(
1480
+ id: number,
1481
+ parentId: number,
1482
+ patchOperations: Array<PatchOperation>,
1483
+ ): Promise<OrderStatusNotification> {
1484
+ return this.request({
1485
+ path: `/sales/orders/statuses/${parentId}/notifications/${id}`,
1486
+ method: 'patch',
1487
+ data: patchOperations,
1488
+ })
1489
+ }
1490
+
1491
+ getSalesOrdersStatusesByParentIdNotificationsCount(
1492
+ parentId: number,
1493
+ params: CommonParameters = {},
1494
+ ): Promise<Count> {
1495
+ return this.request({
1496
+ path: `/sales/orders/statuses/${parentId}/notifications/count`,
1497
+ method: 'get',
1498
+ params,
1499
+ })
1500
+ }
1501
+
1502
+ getSalesOrdersStatusesCount(params: CommonParameters = {}): Promise<Count> {
1503
+ return this.request({
1504
+ path: `/sales/orders/statuses/count`,
1505
+ method: 'get',
1506
+ params,
1507
+ })
1508
+ }
1509
+
1510
+ getSalesOrdersStatusesInfo(params: CommonParameters = {}): Promise<Array<OrderStatusInfo>> {
1511
+ return this.request({
1512
+ path: `/sales/orders/statuses/info`,
1513
+ method: 'get',
1514
+ params,
1515
+ })
1516
+ }
1517
+
1518
+ getSalesOrdersStatusesInfoCount(params: CommonParameters = {}): Promise<Count> {
1519
+ return this.request({
1520
+ path: `/sales/orders/statuses/info/count`,
1521
+ method: 'get',
1522
+ params,
1523
+ })
1524
+ }
1525
+
1526
+ getSalesProbabilities(params: CommonParameters = {}): Promise<Array<SalesProbability>> {
1527
+ return this.request({
1528
+ path: `/sales/probabilities`,
1529
+ method: 'get',
1530
+ params,
1531
+ })
1532
+ }
1533
+
1534
+ postSalesProbabilities(probability: SalesProbability): Promise<SalesProbability> {
1535
+ return this.request({
1536
+ path: `/sales/probabilities`,
1537
+ method: 'post',
1538
+ data: probability,
1539
+ })
1540
+ }
1541
+
1542
+ getSalesProbabilitiesById(id: number, params: CommonParameters = {}): Promise<SalesProbability> {
1543
+ return this.request({
1544
+ path: `/sales/probabilities/${id}`,
1545
+ method: 'get',
1546
+ params,
1547
+ })
1548
+ }
1549
+
1550
+ deleteSalesProbabilitiesById(id: number): Promise<NoContentResponse> {
1551
+ return this.request({
1552
+ path: `/sales/probabilities/${id}`,
1553
+ method: 'delete',
1554
+ })
1555
+ }
1556
+
1557
+ putSalesProbabilitiesById(id: number, probability: SalesProbability): Promise<SalesProbability> {
1558
+ return this.request({
1559
+ path: `/sales/probabilities/${id}`,
1560
+ method: 'put',
1561
+ data: probability,
1562
+ })
1563
+ }
1564
+
1565
+ patchSalesProbabilitiesById(
1566
+ id: number,
1567
+ patchOperations: Array<PatchOperation>,
1568
+ ): Promise<SalesProbability> {
1569
+ return this.request({
1570
+ path: `/sales/probabilities/${id}`,
1571
+ method: 'patch',
1572
+ data: patchOperations,
1573
+ })
1574
+ }
1575
+
1576
+ getSalesProbabilitiesByIdInfo(
1577
+ id: number,
1578
+ params: CommonParameters = {},
1579
+ ): Promise<SalesProbabilityInfo> {
1580
+ return this.request({
1581
+ path: `/sales/probabilities/${id}/info`,
1582
+ method: 'get',
1583
+ params,
1584
+ })
1585
+ }
1586
+
1587
+ getSalesProbabilitiesCount(params: CommonParameters = {}): Promise<Count> {
1588
+ return this.request({
1589
+ path: `/sales/probabilities/count`,
1590
+ method: 'get',
1591
+ params,
1592
+ })
1593
+ }
1594
+
1595
+ getSalesProbabilitiesInfo(params: CommonParameters = {}): Promise<Array<SalesProbabilityInfo>> {
1596
+ return this.request({
1597
+ path: `/sales/probabilities/info`,
1598
+ method: 'get',
1599
+ params,
1600
+ })
1601
+ }
1602
+
1603
+ getSalesProbabilitiesInfoCount(params: CommonParameters = {}): Promise<Count> {
1604
+ return this.request({
1605
+ path: `/sales/probabilities/info/count`,
1606
+ method: 'get',
1607
+ params,
1608
+ })
1609
+ }
1610
+
1611
+ getSalesQuotas(params: CommonParameters = {}): Promise<Array<SalesQuota>> {
1612
+ return this.request({
1613
+ path: `/sales/quotas`,
1614
+ method: 'get',
1615
+ params,
1616
+ })
1617
+ }
1618
+
1619
+ postSalesQuotas(salesQuota: SalesQuota): Promise<SalesQuota> {
1620
+ return this.request({
1621
+ path: `/sales/quotas`,
1622
+ method: 'post',
1623
+ data: salesQuota,
1624
+ })
1625
+ }
1626
+
1627
+ getSalesQuotasById(id: number, params: CommonParameters = {}): Promise<SalesQuota> {
1628
+ return this.request({
1629
+ path: `/sales/quotas/${id}`,
1630
+ method: 'get',
1631
+ params,
1632
+ })
1633
+ }
1634
+
1635
+ deleteSalesQuotasById(id: number): Promise<NoContentResponse> {
1636
+ return this.request({
1637
+ path: `/sales/quotas/${id}`,
1638
+ method: 'delete',
1639
+ })
1640
+ }
1641
+
1642
+ putSalesQuotasById(id: number, salesQuota: SalesQuota): Promise<SalesQuota> {
1643
+ return this.request({
1644
+ path: `/sales/quotas/${id}`,
1645
+ method: 'put',
1646
+ data: salesQuota,
1647
+ })
1648
+ }
1649
+
1650
+ patchSalesQuotasById(id: number, patchOperations: Array<PatchOperation>): Promise<SalesQuota> {
1651
+ return this.request({
1652
+ path: `/sales/quotas/${id}`,
1653
+ method: 'patch',
1654
+ data: patchOperations,
1655
+ })
1656
+ }
1657
+
1658
+ getSalesQuotasCount(params: CommonParameters = {}): Promise<Count> {
1659
+ return this.request({
1660
+ path: `/sales/quotas/count`,
1661
+ method: 'get',
1662
+ params,
1663
+ })
1664
+ }
1665
+
1666
+ getSalesRoles(params: CommonParameters = {}): Promise<Array<Role>> {
1667
+ return this.request({
1668
+ path: `/sales/roles`,
1669
+ method: 'get',
1670
+ params,
1671
+ })
1672
+ }
1673
+
1674
+ postSalesRoles(role: Role): Promise<Role> {
1675
+ return this.request({
1676
+ path: `/sales/roles`,
1677
+ method: 'post',
1678
+ data: role,
1679
+ })
1680
+ }
1681
+
1682
+ getSalesRolesById(id: number, params: CommonParameters = {}): Promise<Role> {
1683
+ return this.request({
1684
+ path: `/sales/roles/${id}`,
1685
+ method: 'get',
1686
+ params,
1687
+ })
1688
+ }
1689
+
1690
+ deleteSalesRolesById(id: number): Promise<NoContentResponse> {
1691
+ return this.request({
1692
+ path: `/sales/roles/${id}`,
1693
+ method: 'delete',
1694
+ })
1695
+ }
1696
+
1697
+ putSalesRolesById(id: number, role: Role): Promise<Role> {
1698
+ return this.request({
1699
+ path: `/sales/roles/${id}`,
1700
+ method: 'put',
1701
+ data: role,
1702
+ })
1703
+ }
1704
+
1705
+ patchSalesRolesById(id: number, patchOperations: Array<PatchOperation>): Promise<Role> {
1706
+ return this.request({
1707
+ path: `/sales/roles/${id}`,
1708
+ method: 'patch',
1709
+ data: patchOperations,
1710
+ })
1711
+ }
1712
+
1713
+ getSalesRolesCount(params: CommonParameters = {}): Promise<Count> {
1714
+ return this.request({
1715
+ path: `/sales/roles/count`,
1716
+ method: 'get',
1717
+ params,
1718
+ })
1719
+ }
1720
+
1721
+ getSalesSalesTeams(params: CommonParameters = {}): Promise<Array<SalesTeam>> {
1722
+ return this.request({
1723
+ path: `/sales/salesTeams`,
1724
+ method: 'get',
1725
+ params,
1726
+ })
1727
+ }
1728
+
1729
+ postSalesSalesTeams(salesTeam: SalesTeam): Promise<SalesTeam> {
1730
+ return this.request({
1731
+ path: `/sales/salesTeams`,
1732
+ method: 'post',
1733
+ data: salesTeam,
1734
+ })
1735
+ }
1736
+
1737
+ getSalesSalesTeamsById(id: number, params: CommonParameters = {}): Promise<SalesTeam> {
1738
+ return this.request({
1739
+ path: `/sales/salesTeams/${id}`,
1740
+ method: 'get',
1741
+ params,
1742
+ })
1743
+ }
1744
+
1745
+ deleteSalesSalesTeamsById(id: number): Promise<NoContentResponse> {
1746
+ return this.request({
1747
+ path: `/sales/salesTeams/${id}`,
1748
+ method: 'delete',
1749
+ })
1750
+ }
1751
+
1752
+ putSalesSalesTeamsById(id: number, salesTeam: SalesTeam): Promise<SalesTeam> {
1753
+ return this.request({
1754
+ path: `/sales/salesTeams/${id}`,
1755
+ method: 'put',
1756
+ data: salesTeam,
1757
+ })
1758
+ }
1759
+
1760
+ patchSalesSalesTeamsById(id: number, patchOperations: Array<PatchOperation>): Promise<SalesTeam> {
1761
+ return this.request({
1762
+ path: `/sales/salesTeams/${id}`,
1763
+ method: 'patch',
1764
+ data: patchOperations,
1765
+ })
1766
+ }
1767
+
1768
+ getSalesSalesTeamsByParentIdMembers(
1769
+ parentId: number,
1770
+ params: CommonParameters = {},
1771
+ ): Promise<Array<SalesTeamMember>> {
1772
+ return this.request({
1773
+ path: `/sales/salesTeams/${parentId}/members`,
1774
+ method: 'get',
1775
+ params,
1776
+ })
1777
+ }
1778
+
1779
+ postSalesSalesTeamsByParentIdMembers(
1780
+ parentId: number,
1781
+ salesTeamMember: SalesTeamMember,
1782
+ ): Promise<SalesTeamMember> {
1783
+ return this.request({
1784
+ path: `/sales/salesTeams/${parentId}/members`,
1785
+ method: 'post',
1786
+ data: salesTeamMember,
1787
+ })
1788
+ }
1789
+
1790
+ getSalesSalesTeamsByParentIdMembersById(
1791
+ id: number,
1792
+ parentId: number,
1793
+ params: CommonParameters = {},
1794
+ ): Promise<SalesTeamMember> {
1795
+ return this.request({
1796
+ path: `/sales/salesTeams/${parentId}/members/${id}`,
1797
+ method: 'get',
1798
+ params,
1799
+ })
1800
+ }
1801
+
1802
+ deleteSalesSalesTeamsByParentIdMembersById(
1803
+ id: number,
1804
+ parentId: number,
1805
+ ): Promise<NoContentResponse> {
1806
+ return this.request({
1807
+ path: `/sales/salesTeams/${parentId}/members/${id}`,
1808
+ method: 'delete',
1809
+ })
1810
+ }
1811
+
1812
+ putSalesSalesTeamsByParentIdMembersById(
1813
+ id: number,
1814
+ parentId: number,
1815
+ salesTeamMember: SalesTeamMember,
1816
+ ): Promise<SalesTeamMember> {
1817
+ return this.request({
1818
+ path: `/sales/salesTeams/${parentId}/members/${id}`,
1819
+ method: 'put',
1820
+ data: salesTeamMember,
1821
+ })
1822
+ }
1823
+
1824
+ patchSalesSalesTeamsByParentIdMembersById(
1825
+ id: number,
1826
+ parentId: number,
1827
+ patchOperations: Array<PatchOperation>,
1828
+ ): Promise<SalesTeamMember> {
1829
+ return this.request({
1830
+ path: `/sales/salesTeams/${parentId}/members/${id}`,
1831
+ method: 'patch',
1832
+ data: patchOperations,
1833
+ })
1834
+ }
1835
+
1836
+ getSalesSalesTeamsByParentIdMembersCount(
1837
+ parentId: number,
1838
+ params: CommonParameters = {},
1839
+ ): Promise<Count> {
1840
+ return this.request({
1841
+ path: `/sales/salesTeams/${parentId}/members/count`,
1842
+ method: 'get',
1843
+ params,
1844
+ })
1845
+ }
1846
+
1847
+ getSalesSalesTeamsCount(params: CommonParameters = {}): Promise<Count> {
1848
+ return this.request({
1849
+ path: `/sales/salesTeams/count`,
1850
+ method: 'get',
1851
+ params,
1852
+ })
1853
+ }
1854
+
1855
+ getSalesScheduleHolidaylistsInfoCount(params: CommonParameters = {}): Promise<Count> {
1856
+ return this.request({
1857
+ path: `/sales/schedule/holidaylists/info/count`,
1858
+ method: 'get',
1859
+ params,
1860
+ })
1861
+ }
1862
+
1863
+ getSalesServicePriorityInfoCount(params: CommonParameters = {}): Promise<Count> {
1864
+ return this.request({
1865
+ path: `/sales/service/priority/info/count`,
1866
+ method: 'get',
1867
+ params,
1868
+ })
1869
+ }
1870
+
1871
+ getSalesStages(params: CommonParameters = {}): Promise<Array<OpportunityStage>> {
1872
+ return this.request({
1873
+ path: `/sales/stages`,
1874
+ method: 'get',
1875
+ params,
1876
+ })
1877
+ }
1878
+
1879
+ postSalesStages(stage: OpportunityStage): Promise<OpportunityStage> {
1880
+ return this.request({
1881
+ path: `/sales/stages`,
1882
+ method: 'post',
1883
+ data: stage,
1884
+ })
1885
+ }
1886
+
1887
+ getSalesStagesById(id: number, params: CommonParameters = {}): Promise<OpportunityStage> {
1888
+ return this.request({
1889
+ path: `/sales/stages/${id}`,
1890
+ method: 'get',
1891
+ params,
1892
+ })
1893
+ }
1894
+
1895
+ deleteSalesStagesById(id: number): Promise<NoContentResponse> {
1896
+ return this.request({
1897
+ path: `/sales/stages/${id}`,
1898
+ method: 'delete',
1899
+ })
1900
+ }
1901
+
1902
+ putSalesStagesById(id: number, stage: OpportunityStage): Promise<OpportunityStage> {
1903
+ return this.request({
1904
+ path: `/sales/stages/${id}`,
1905
+ method: 'put',
1906
+ data: stage,
1907
+ })
1908
+ }
1909
+
1910
+ patchSalesStagesById(
1911
+ id: number,
1912
+ patchOperations: Array<PatchOperation>,
1913
+ ): Promise<OpportunityStage> {
1914
+ return this.request({
1915
+ path: `/sales/stages/${id}`,
1916
+ method: 'patch',
1917
+ data: patchOperations,
1918
+ })
1919
+ }
1920
+
1921
+ getSalesStagesByIdInfo(id: number, params: CommonParameters = {}): Promise<OpportunityStageInfo> {
1922
+ return this.request({
1923
+ path: `/sales/stages/${id}/info`,
1924
+ method: 'get',
1925
+ params,
1926
+ })
1927
+ }
1928
+
1929
+ getSalesStagesByIdUsages(id: number, params: CommonParameters = {}): Promise<Array<Usage>> {
1930
+ return this.request({
1931
+ path: `/sales/stages/${id}/usages`,
1932
+ method: 'get',
1933
+ params,
1934
+ })
1935
+ }
1936
+
1937
+ getSalesStagesByIdUsagesList(id: number, params: CommonParameters = {}): Promise<Array<Usage>> {
1938
+ return this.request({
1939
+ path: `/sales/stages/${id}/usages/list`,
1940
+ method: 'get',
1941
+ params,
1942
+ })
1943
+ }
1944
+
1945
+ getSalesStagesCount(params: CommonParameters = {}): Promise<Count> {
1946
+ return this.request({
1947
+ path: `/sales/stages/count`,
1948
+ method: 'get',
1949
+ params,
1950
+ })
1951
+ }
1952
+
1953
+ getSalesStagesInfo(params: CommonParameters = {}): Promise<Array<OpportunityStageInfo>> {
1954
+ return this.request({
1955
+ path: `/sales/stages/info`,
1956
+ method: 'get',
1957
+ params,
1958
+ })
1959
+ }
1960
+
1961
+ getSalesStagesInfoCount(params: CommonParameters = {}): Promise<Count> {
1962
+ return this.request({
1963
+ path: `/sales/stages/info/count`,
1964
+ method: 'get',
1965
+ params,
1966
+ })
1967
+ }
1968
+ }