pipedrive 22.2.0 → 22.3.0

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 (57) hide show
  1. package/README.md +75 -0
  2. package/dist/api/ProjectTemplatesApi.js +258 -0
  3. package/dist/api/ProjectsApi.js +846 -0
  4. package/dist/api/TasksApi.js +328 -0
  5. package/dist/index.js +371 -0
  6. package/dist/model/AddProjectResponse201.js +96 -0
  7. package/dist/model/AddTaskResponse201.js +96 -0
  8. package/dist/model/DeleteProject.js +88 -0
  9. package/dist/model/DeleteProjectData.js +78 -0
  10. package/dist/model/DeleteProjectResponse200.js +96 -0
  11. package/dist/model/DeleteTask.js +88 -0
  12. package/dist/model/DeleteTaskData.js +78 -0
  13. package/dist/model/DeleteTaskResponse200.js +96 -0
  14. package/dist/model/FilterType.js +1 -0
  15. package/dist/model/FullProjectObject.js +324 -0
  16. package/dist/model/FullTaskObject.js +250 -0
  17. package/dist/model/GetProjectBoardResponse200.js +96 -0
  18. package/dist/model/GetProjectBoardsResponse200.js +96 -0
  19. package/dist/model/GetProjectGroupsResponse200.js +96 -0
  20. package/dist/model/GetProjectPhaseResponse200.js +96 -0
  21. package/dist/model/GetProjectPhasesResponse200.js +96 -0
  22. package/dist/model/GetProjectPlanResponse200.js +96 -0
  23. package/dist/model/GetProjectResponse200.js +96 -0
  24. package/dist/model/GetProjectTemplateResponse200.js +96 -0
  25. package/dist/model/GetProjectTemplatesResponse200.js +97 -0
  26. package/dist/model/GetProjectsResponse200.js +97 -0
  27. package/dist/model/GetTaskResponse200.js +96 -0
  28. package/dist/model/GetTasksResponse200.js +97 -0
  29. package/dist/model/ProjectBoardObject.js +118 -0
  30. package/dist/model/ProjectGroupsObject.js +98 -0
  31. package/dist/model/ProjectId.js +78 -0
  32. package/dist/model/ProjectMandatoryObjectFragment.js +98 -0
  33. package/dist/model/ProjectNotChangeableObjectFragment.js +108 -0
  34. package/dist/model/ProjectObjectFragment.js +158 -0
  35. package/dist/model/ProjectPhaseObject.js +128 -0
  36. package/dist/model/ProjectPlanItemObject.js +108 -0
  37. package/dist/model/ProjectPostObject.js +286 -0
  38. package/dist/model/ProjectPostObjectAllOf.js +78 -0
  39. package/dist/model/ProjectPutObject.js +259 -0
  40. package/dist/model/ProjectPutPlanItemBodyObject.js +88 -0
  41. package/dist/model/ProjectResponseObject.js +334 -0
  42. package/dist/model/RequiredPostProjectParameters.js +105 -0
  43. package/dist/model/RequiredPostTaskParameters.js +93 -0
  44. package/dist/model/TaskId.js +78 -0
  45. package/dist/model/TaskMandatoryObjectFragment.js +88 -0
  46. package/dist/model/TaskNotChangeableObjectFragment.js +108 -0
  47. package/dist/model/TaskObjectFragment.js +119 -0
  48. package/dist/model/TaskPostObject.js +190 -0
  49. package/dist/model/TaskPutObject.js +185 -0
  50. package/dist/model/TaskResponseObject.js +260 -0
  51. package/dist/model/TemplateObject.js +138 -0
  52. package/dist/model/TemplateResponseObject.js +179 -0
  53. package/dist/model/UpdateProjectResponse200.js +96 -0
  54. package/dist/model/UpdateTaskResponse200.js +96 -0
  55. package/dist/model/UpdatedActivityPlanItem200.js +96 -0
  56. package/dist/model/UpdatedTaskPlanItem200.js +96 -0
  57. package/package.json +1 -1
@@ -0,0 +1,328 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
12
+ var _AddTaskResponse = _interopRequireDefault(require("../model/AddTaskResponse201"));
13
+ var _DeleteTaskResponse = _interopRequireDefault(require("../model/DeleteTaskResponse200"));
14
+ var _GetTaskResponse = _interopRequireDefault(require("../model/GetTaskResponse200"));
15
+ var _GetTasksResponse = _interopRequireDefault(require("../model/GetTasksResponse200"));
16
+ var _NumberBoolean = _interopRequireDefault(require("../model/NumberBoolean"));
17
+ var _TaskPostObject = _interopRequireDefault(require("../model/TaskPostObject"));
18
+ var _TaskPutObject = _interopRequireDefault(require("../model/TaskPutObject"));
19
+ var _UpdateTaskResponse = _interopRequireDefault(require("../model/UpdateTaskResponse200"));
20
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
21
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
22
+ /**
23
+ * Tasks service.
24
+ * @module api/TasksApi
25
+ * @version 1.0.0
26
+ */
27
+ var TasksApi = /*#__PURE__*/function () {
28
+ /**
29
+ * Constructs a new TasksApi.
30
+ * @alias module:api/TasksApi
31
+ * @class
32
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
33
+ * default to {@link module:ApiClient#instance} if unspecified.
34
+ */
35
+ function TasksApi(apiClient) {
36
+ (0, _classCallCheck2["default"])(this, TasksApi);
37
+ this.apiClient = apiClient;
38
+ }
39
+
40
+ /**
41
+ * Add a task
42
+ * Adds a new task.
43
+ * @param {Object} opts Optional parameters
44
+ * @param {module:model/TaskPostObject} opts.taskPostObject
45
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AddTaskResponse201} and HTTP response
46
+ */
47
+ (0, _createClass2["default"])(TasksApi, [{
48
+ key: "addTaskWithHttpInfo",
49
+ value: function addTaskWithHttpInfo(opts) {
50
+ opts = opts || {};
51
+ var postBody = opts['taskPostObject'];
52
+ var pathParams = {};
53
+ var queryParams = {};
54
+ var headerParams = {};
55
+ var formParams = {};
56
+ var formParamArray = [];
57
+ var contentTypes = ['application/json'];
58
+ var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
59
+ var isJSON = contentTypes.includes('application/json');
60
+ if (isJSON) {
61
+ postBody = _objectSpread(_objectSpread({}, postBody), opts);
62
+ } else if (isURLEncoded) {
63
+ for (var key in opts) {
64
+ if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
65
+ formParams[key] = opts[key];
66
+ }
67
+ }
68
+ }
69
+ var authNames = ['api_key', 'oauth2'];
70
+ var accepts = ['application/json'];
71
+ var returnType = _AddTaskResponse["default"];
72
+ return this.apiClient.callApi('/tasks', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
73
+ }
74
+
75
+ /**
76
+ * Add a task
77
+ * Adds a new task.
78
+ * @param {Object} opts Optional parameters
79
+ * @param {module:model/TaskPostObject} opts.taskPostObject
80
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AddTaskResponse201}
81
+ */
82
+ }, {
83
+ key: "addTask",
84
+ value: function addTask(opts) {
85
+ return this.addTaskWithHttpInfo(opts).then(function (response_and_data) {
86
+ return response_and_data;
87
+ });
88
+ }
89
+
90
+ /**
91
+ * Delete a task
92
+ * Marks a task as deleted. If the task has subtasks then those will also be deleted.
93
+ * @param {Number} id The ID of the task
94
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteTaskResponse200} and HTTP response
95
+ */
96
+ }, {
97
+ key: "deleteTaskWithHttpInfo",
98
+ value: function deleteTaskWithHttpInfo(id) {
99
+ var opts = {};
100
+ var postBody = null;
101
+
102
+ // verify the required parameter 'id' is set
103
+ if (id === undefined || id === null) {
104
+ throw new Error("Missing the required parameter 'id' when calling deleteTask");
105
+ }
106
+ var pathParams = {
107
+ 'id': id
108
+ };
109
+ var queryParams = {};
110
+ var headerParams = {};
111
+ var formParams = {};
112
+ var formParamArray = [];
113
+ var contentTypes = [];
114
+ var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
115
+ var isJSON = contentTypes.includes('application/json');
116
+ if (isJSON) {
117
+ postBody = _objectSpread(_objectSpread({}, postBody), opts);
118
+ } else if (isURLEncoded) {
119
+ for (var key in opts) {
120
+ if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
121
+ formParams[key] = opts[key];
122
+ }
123
+ }
124
+ }
125
+ var authNames = ['api_key', 'oauth2'];
126
+ var accepts = ['application/json'];
127
+ var returnType = _DeleteTaskResponse["default"];
128
+ return this.apiClient.callApi('/tasks/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
129
+ }
130
+
131
+ /**
132
+ * Delete a task
133
+ * Marks a task as deleted. If the task has subtasks then those will also be deleted.
134
+ * @param {Number} id The ID of the task
135
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteTaskResponse200}
136
+ */
137
+ }, {
138
+ key: "deleteTask",
139
+ value: function deleteTask(id) {
140
+ return this.deleteTaskWithHttpInfo(id).then(function (response_and_data) {
141
+ return response_and_data;
142
+ });
143
+ }
144
+
145
+ /**
146
+ * Get details of a task
147
+ * Returns the details of a specific task.
148
+ * @param {Number} id The ID of the task
149
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetTaskResponse200} and HTTP response
150
+ */
151
+ }, {
152
+ key: "getTaskWithHttpInfo",
153
+ value: function getTaskWithHttpInfo(id) {
154
+ var opts = {};
155
+ var postBody = null;
156
+
157
+ // verify the required parameter 'id' is set
158
+ if (id === undefined || id === null) {
159
+ throw new Error("Missing the required parameter 'id' when calling getTask");
160
+ }
161
+ var pathParams = {
162
+ 'id': id
163
+ };
164
+ var queryParams = {};
165
+ var headerParams = {};
166
+ var formParams = {};
167
+ var formParamArray = [];
168
+ var contentTypes = [];
169
+ var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
170
+ var isJSON = contentTypes.includes('application/json');
171
+ if (isJSON) {
172
+ postBody = _objectSpread(_objectSpread({}, postBody), opts);
173
+ } else if (isURLEncoded) {
174
+ for (var key in opts) {
175
+ if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
176
+ formParams[key] = opts[key];
177
+ }
178
+ }
179
+ }
180
+ var authNames = ['api_key', 'oauth2'];
181
+ var accepts = ['application/json'];
182
+ var returnType = _GetTaskResponse["default"];
183
+ return this.apiClient.callApi('/tasks/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
184
+ }
185
+
186
+ /**
187
+ * Get details of a task
188
+ * Returns the details of a specific task.
189
+ * @param {Number} id The ID of the task
190
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetTaskResponse200}
191
+ */
192
+ }, {
193
+ key: "getTask",
194
+ value: function getTask(id) {
195
+ return this.getTaskWithHttpInfo(id).then(function (response_and_data) {
196
+ return response_and_data;
197
+ });
198
+ }
199
+
200
+ /**
201
+ * Get all tasks
202
+ * Returns all tasks. This is a cursor-paginated endpoint. For more information, please refer to our documentation on <a href=\"https://pipedrive.readme.io/docs/core-api-concepts-pagination\" target=\"_blank\" rel=\"noopener noreferrer\">pagination</a>.
203
+ * @param {Object} opts Optional parameters
204
+ * @param {String} opts.cursor For pagination, the marker (an opaque string value) representing the first item on the next page
205
+ * @param {Number} opts.limit For pagination, the limit of entries to be returned. If not provided, up to 500 items will be returned.
206
+ * @param {Number} opts.assigneeId If supplied, only tasks that are assigned to this user are returned
207
+ * @param {Number} opts.projectId If supplied, only tasks that are assigned to this project are returned
208
+ * @param {Number} opts.parentTaskId If `null` is supplied then only parent tasks are returned. If integer is supplied then only subtasks of a specific task are returned. By default all tasks are returned.
209
+ * @param {module:model/NumberBoolean} opts.done Whether the task is done or not. `0` = Not done, `1` = Done. If not omitted then returns both done and not done tasks.
210
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetTasksResponse200} and HTTP response
211
+ */
212
+ }, {
213
+ key: "getTasksWithHttpInfo",
214
+ value: function getTasksWithHttpInfo(opts) {
215
+ opts = opts || {};
216
+ var postBody = null;
217
+ var pathParams = {};
218
+ var queryParams = {
219
+ 'cursor': opts['cursor'] === undefined ? opts['cursor'] : opts['cursor'],
220
+ 'limit': opts['limit'] === undefined ? opts['limit'] : opts['limit'],
221
+ 'assignee_id': opts['assignee_id'] === undefined ? opts['assigneeId'] : opts['assignee_id'],
222
+ 'project_id': opts['project_id'] === undefined ? opts['projectId'] : opts['project_id'],
223
+ 'parent_task_id': opts['parent_task_id'] === undefined ? opts['parentTaskId'] : opts['parent_task_id'],
224
+ 'done': opts['done'] === undefined ? opts['done'] : opts['done']
225
+ };
226
+ var headerParams = {};
227
+ var formParams = {};
228
+ var formParamArray = [];
229
+ var contentTypes = [];
230
+ var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
231
+ var isJSON = contentTypes.includes('application/json');
232
+ if (isJSON) {
233
+ postBody = _objectSpread(_objectSpread({}, postBody), opts);
234
+ } else if (isURLEncoded) {
235
+ for (var key in opts) {
236
+ if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
237
+ formParams[key] = opts[key];
238
+ }
239
+ }
240
+ }
241
+ var authNames = ['api_key', 'oauth2'];
242
+ var accepts = ['application/json'];
243
+ var returnType = _GetTasksResponse["default"];
244
+ return this.apiClient.callApi('/tasks', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
245
+ }
246
+
247
+ /**
248
+ * Get all tasks
249
+ * Returns all tasks. This is a cursor-paginated endpoint. For more information, please refer to our documentation on <a href=\"https://pipedrive.readme.io/docs/core-api-concepts-pagination\" target=\"_blank\" rel=\"noopener noreferrer\">pagination</a>.
250
+ * @param {Object} opts Optional parameters
251
+ * @param {String} opts.cursor For pagination, the marker (an opaque string value) representing the first item on the next page
252
+ * @param {Number} opts.limit For pagination, the limit of entries to be returned. If not provided, up to 500 items will be returned.
253
+ * @param {Number} opts.assigneeId If supplied, only tasks that are assigned to this user are returned
254
+ * @param {Number} opts.projectId If supplied, only tasks that are assigned to this project are returned
255
+ * @param {Number} opts.parentTaskId If `null` is supplied then only parent tasks are returned. If integer is supplied then only subtasks of a specific task are returned. By default all tasks are returned.
256
+ * @param {module:model/NumberBoolean} opts.done Whether the task is done or not. `0` = Not done, `1` = Done. If not omitted then returns both done and not done tasks.
257
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetTasksResponse200}
258
+ */
259
+ }, {
260
+ key: "getTasks",
261
+ value: function getTasks(opts) {
262
+ return this.getTasksWithHttpInfo(opts).then(function (response_and_data) {
263
+ return response_and_data;
264
+ });
265
+ }
266
+
267
+ /**
268
+ * Update a task
269
+ * Updates a task.
270
+ * @param {Number} id The ID of the task
271
+ * @param {Object} opts Optional parameters
272
+ * @param {module:model/TaskPutObject} opts.taskPutObject
273
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UpdateTaskResponse200} and HTTP response
274
+ */
275
+ }, {
276
+ key: "updateTaskWithHttpInfo",
277
+ value: function updateTaskWithHttpInfo(id, opts) {
278
+ opts = opts || {};
279
+ var postBody = opts['taskPutObject'];
280
+
281
+ // verify the required parameter 'id' is set
282
+ if (id === undefined || id === null) {
283
+ throw new Error("Missing the required parameter 'id' when calling updateTask");
284
+ }
285
+ var pathParams = {
286
+ 'id': id
287
+ };
288
+ var queryParams = {};
289
+ var headerParams = {};
290
+ var formParams = {};
291
+ var formParamArray = [];
292
+ var contentTypes = ['application/json'];
293
+ var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
294
+ var isJSON = contentTypes.includes('application/json');
295
+ if (isJSON) {
296
+ postBody = _objectSpread(_objectSpread({}, postBody), opts);
297
+ } else if (isURLEncoded) {
298
+ for (var key in opts) {
299
+ if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
300
+ formParams[key] = opts[key];
301
+ }
302
+ }
303
+ }
304
+ var authNames = ['api_key', 'oauth2'];
305
+ var accepts = ['application/json'];
306
+ var returnType = _UpdateTaskResponse["default"];
307
+ return this.apiClient.callApi('/tasks/{id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
308
+ }
309
+
310
+ /**
311
+ * Update a task
312
+ * Updates a task.
313
+ * @param {Number} id The ID of the task
314
+ * @param {Object} opts Optional parameters
315
+ * @param {module:model/TaskPutObject} opts.taskPutObject
316
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UpdateTaskResponse200}
317
+ */
318
+ }, {
319
+ key: "updateTask",
320
+ value: function updateTask(id, opts) {
321
+ return this.updateTaskWithHttpInfo(id, opts).then(function (response_and_data) {
322
+ return response_and_data;
323
+ });
324
+ }
325
+ }]);
326
+ return TasksApi;
327
+ }();
328
+ exports["default"] = TasksApi;