pipedrive 13.3.4 → 15.0.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.
- package/CHANGELOG.md +18 -1
- package/README.md +32 -9
- package/dist/api/ChannelsApi.js +328 -0
- package/dist/api/LegacyTeamsApi.js +557 -0
- package/dist/api/PersonsApi.js +5 -9
- package/dist/index.js +168 -8
- package/dist/model/AnyOfRecents.js +43 -0
- package/dist/model/BasicPerson.js +15 -18
- package/dist/model/ChannelObject.js +166 -0
- package/dist/model/ChannelObjectResponse.js +101 -0
- package/dist/model/ChannelObjectResponseData.js +214 -0
- package/dist/model/DeleteChannelSuccess.js +89 -0
- package/dist/model/DeleteConversationSuccess.js +89 -0
- package/dist/model/GetRecents.js +3 -3
- package/dist/model/InlineResponse400.js +122 -0
- package/dist/model/InlineResponse4001.js +122 -0
- package/dist/model/InlineResponse4001AdditionalData.js +90 -0
- package/dist/model/InlineResponse400AdditionalData.js +90 -0
- package/dist/model/InlineResponse403.js +122 -0
- package/dist/model/InlineResponse4031.js +122 -0
- package/dist/model/InlineResponse4031AdditionalData.js +90 -0
- package/dist/model/InlineResponse403AdditionalData.js +90 -0
- package/dist/model/InlineResponse404.js +122 -0
- package/dist/model/InlineResponse404AdditionalData.js +90 -0
- package/dist/model/MessageObject.js +237 -0
- package/dist/model/MessageObjectAttachments.js +164 -0
- package/dist/model/NewPerson.js +10 -10
- package/dist/model/NewPersonAllOf.js +12 -9
- package/dist/model/UpdatePerson.js +240 -0
- package/dist/model/UpdatePersonAllOf.js +90 -0
- package/package.json +1 -1
@@ -0,0 +1,557 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
7
|
+
});
|
8
|
+
exports["default"] = void 0;
|
9
|
+
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
11
|
+
|
12
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
13
|
+
|
14
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
15
|
+
|
16
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
17
|
+
|
18
|
+
var _AddTeamUserRequest = _interopRequireDefault(require("../model/AddTeamUserRequest"));
|
19
|
+
|
20
|
+
var _CreateTeam = _interopRequireDefault(require("../model/CreateTeam"));
|
21
|
+
|
22
|
+
var _DeleteTeamUserRequest = _interopRequireDefault(require("../model/DeleteTeamUserRequest"));
|
23
|
+
|
24
|
+
var _FailResponse = _interopRequireDefault(require("../model/FailResponse"));
|
25
|
+
|
26
|
+
var _NumberBooleanDefault = _interopRequireDefault(require("../model/NumberBooleanDefault0"));
|
27
|
+
|
28
|
+
var _Team = _interopRequireDefault(require("../model/Team"));
|
29
|
+
|
30
|
+
var _Teams = _interopRequireDefault(require("../model/Teams"));
|
31
|
+
|
32
|
+
var _UpdateTeam = _interopRequireDefault(require("../model/UpdateTeam"));
|
33
|
+
|
34
|
+
var _UserIDs = _interopRequireDefault(require("../model/UserIDs"));
|
35
|
+
|
36
|
+
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; }
|
37
|
+
|
38
|
+
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; }
|
39
|
+
|
40
|
+
/**
|
41
|
+
* LegacyTeams service.
|
42
|
+
* @module api/LegacyTeamsApi
|
43
|
+
* @version 1.0.0
|
44
|
+
*/
|
45
|
+
var LegacyTeamsApi = /*#__PURE__*/function () {
|
46
|
+
/**
|
47
|
+
* Constructs a new LegacyTeamsApi.
|
48
|
+
* @alias module:api/LegacyTeamsApi
|
49
|
+
* @class
|
50
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
51
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
52
|
+
*/
|
53
|
+
function LegacyTeamsApi(apiClient) {
|
54
|
+
(0, _classCallCheck2["default"])(this, LegacyTeamsApi);
|
55
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
56
|
+
}
|
57
|
+
/**
|
58
|
+
* Add a new team
|
59
|
+
* Adds a new team to the company and returns the created object.
|
60
|
+
* @param {Object} opts Optional parameters
|
61
|
+
* @param {module:model/CreateTeam} opts.createTeam
|
62
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Team} and HTTP response
|
63
|
+
*/
|
64
|
+
|
65
|
+
|
66
|
+
(0, _createClass2["default"])(LegacyTeamsApi, [{
|
67
|
+
key: "addTeamWithHttpInfo",
|
68
|
+
value: function addTeamWithHttpInfo(opts) {
|
69
|
+
opts = opts || {};
|
70
|
+
var postBody = opts['createTeam'];
|
71
|
+
|
72
|
+
if (opts['name'] === undefined || opts['name'] === null) {
|
73
|
+
throw new Error("Missing the required parameter 'name' when calling addTeam");
|
74
|
+
}
|
75
|
+
|
76
|
+
if (opts['manager_id'] === undefined || opts['manager_id'] === null) {
|
77
|
+
throw new Error("Missing the required parameter 'manager_id' when calling addTeam");
|
78
|
+
}
|
79
|
+
|
80
|
+
var pathParams = {};
|
81
|
+
var queryParams = {};
|
82
|
+
var headerParams = {};
|
83
|
+
var formParams = {};
|
84
|
+
var formParamArray = [];
|
85
|
+
var contentTypes = ['application/json'];
|
86
|
+
var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
|
87
|
+
var isJSON = contentTypes.includes('application/json');
|
88
|
+
|
89
|
+
if (isJSON) {
|
90
|
+
postBody = _objectSpread(_objectSpread({}, postBody), opts);
|
91
|
+
} else if (isURLEncoded) {
|
92
|
+
for (var key in opts) {
|
93
|
+
if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
|
94
|
+
formParams[key] = opts[key];
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
|
99
|
+
var authNames = ['api_key', 'oauth2'];
|
100
|
+
var accepts = ['application/json'];
|
101
|
+
var returnType = _Team["default"];
|
102
|
+
return this.apiClient.callApi('/legacyTeams', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
103
|
+
}
|
104
|
+
/**
|
105
|
+
* Add a new team
|
106
|
+
* Adds a new team to the company and returns the created object.
|
107
|
+
* @param {Object} opts Optional parameters
|
108
|
+
* @param {module:model/CreateTeam} opts.createTeam
|
109
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Team}
|
110
|
+
*/
|
111
|
+
|
112
|
+
}, {
|
113
|
+
key: "addTeam",
|
114
|
+
value: function addTeam(opts) {
|
115
|
+
return this.addTeamWithHttpInfo(opts).then(function (response_and_data) {
|
116
|
+
return response_and_data;
|
117
|
+
});
|
118
|
+
}
|
119
|
+
/**
|
120
|
+
* Add users to a team
|
121
|
+
* Adds users to an existing team.
|
122
|
+
* @param {Number} id The ID of the team
|
123
|
+
* @param {Object} opts Optional parameters
|
124
|
+
* @param {module:model/AddTeamUserRequest} opts.addTeamUserRequest
|
125
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UserIDs} and HTTP response
|
126
|
+
*/
|
127
|
+
|
128
|
+
}, {
|
129
|
+
key: "addTeamUserWithHttpInfo",
|
130
|
+
value: function addTeamUserWithHttpInfo(id, opts) {
|
131
|
+
opts = opts || {};
|
132
|
+
var postBody = opts['addTeamUserRequest']; // verify the required parameter 'id' is set
|
133
|
+
|
134
|
+
if (id === undefined || id === null) {
|
135
|
+
throw new Error("Missing the required parameter 'id' when calling addTeamUser");
|
136
|
+
}
|
137
|
+
|
138
|
+
if (opts['users'] === undefined || opts['users'] === null) {
|
139
|
+
throw new Error("Missing the required parameter 'users' when calling addTeamUser");
|
140
|
+
}
|
141
|
+
|
142
|
+
var pathParams = {
|
143
|
+
'id': id
|
144
|
+
};
|
145
|
+
var queryParams = {};
|
146
|
+
var headerParams = {};
|
147
|
+
var formParams = {};
|
148
|
+
var formParamArray = [];
|
149
|
+
var contentTypes = ['application/json'];
|
150
|
+
var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
|
151
|
+
var isJSON = contentTypes.includes('application/json');
|
152
|
+
|
153
|
+
if (isJSON) {
|
154
|
+
postBody = _objectSpread(_objectSpread({}, postBody), opts);
|
155
|
+
} else if (isURLEncoded) {
|
156
|
+
for (var key in opts) {
|
157
|
+
if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
|
158
|
+
formParams[key] = opts[key];
|
159
|
+
}
|
160
|
+
}
|
161
|
+
}
|
162
|
+
|
163
|
+
var authNames = ['api_key', 'oauth2'];
|
164
|
+
var accepts = ['application/json'];
|
165
|
+
var returnType = _UserIDs["default"];
|
166
|
+
return this.apiClient.callApi('/legacyTeams/{id}/users', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
167
|
+
}
|
168
|
+
/**
|
169
|
+
* Add users to a team
|
170
|
+
* Adds users to an existing team.
|
171
|
+
* @param {Number} id The ID of the team
|
172
|
+
* @param {Object} opts Optional parameters
|
173
|
+
* @param {module:model/AddTeamUserRequest} opts.addTeamUserRequest
|
174
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserIDs}
|
175
|
+
*/
|
176
|
+
|
177
|
+
}, {
|
178
|
+
key: "addTeamUser",
|
179
|
+
value: function addTeamUser(id, opts) {
|
180
|
+
return this.addTeamUserWithHttpInfo(id, opts).then(function (response_and_data) {
|
181
|
+
return response_and_data;
|
182
|
+
});
|
183
|
+
}
|
184
|
+
/**
|
185
|
+
* Delete users from a team
|
186
|
+
* Deletes users from an existing team.
|
187
|
+
* @param {Number} id The ID of the team
|
188
|
+
* @param {Object} opts Optional parameters
|
189
|
+
* @param {module:model/DeleteTeamUserRequest} opts.deleteTeamUserRequest
|
190
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UserIDs} and HTTP response
|
191
|
+
*/
|
192
|
+
|
193
|
+
}, {
|
194
|
+
key: "deleteTeamUserWithHttpInfo",
|
195
|
+
value: function deleteTeamUserWithHttpInfo(id, opts) {
|
196
|
+
opts = opts || {};
|
197
|
+
var postBody = opts['deleteTeamUserRequest']; // verify the required parameter 'id' is set
|
198
|
+
|
199
|
+
if (id === undefined || id === null) {
|
200
|
+
throw new Error("Missing the required parameter 'id' when calling deleteTeamUser");
|
201
|
+
}
|
202
|
+
|
203
|
+
if (opts['users'] === undefined || opts['users'] === null) {
|
204
|
+
throw new Error("Missing the required parameter 'users' when calling deleteTeamUser");
|
205
|
+
}
|
206
|
+
|
207
|
+
var pathParams = {
|
208
|
+
'id': id
|
209
|
+
};
|
210
|
+
var queryParams = {};
|
211
|
+
var headerParams = {};
|
212
|
+
var formParams = {};
|
213
|
+
var formParamArray = [];
|
214
|
+
var contentTypes = ['application/json'];
|
215
|
+
var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
|
216
|
+
var isJSON = contentTypes.includes('application/json');
|
217
|
+
|
218
|
+
if (isJSON) {
|
219
|
+
postBody = _objectSpread(_objectSpread({}, postBody), opts);
|
220
|
+
} else if (isURLEncoded) {
|
221
|
+
for (var key in opts) {
|
222
|
+
if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
|
223
|
+
formParams[key] = opts[key];
|
224
|
+
}
|
225
|
+
}
|
226
|
+
}
|
227
|
+
|
228
|
+
var authNames = ['api_key', 'oauth2'];
|
229
|
+
var accepts = ['application/json'];
|
230
|
+
var returnType = _UserIDs["default"];
|
231
|
+
return this.apiClient.callApi('/legacyTeams/{id}/users', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
232
|
+
}
|
233
|
+
/**
|
234
|
+
* Delete users from a team
|
235
|
+
* Deletes users from an existing team.
|
236
|
+
* @param {Number} id The ID of the team
|
237
|
+
* @param {Object} opts Optional parameters
|
238
|
+
* @param {module:model/DeleteTeamUserRequest} opts.deleteTeamUserRequest
|
239
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserIDs}
|
240
|
+
*/
|
241
|
+
|
242
|
+
}, {
|
243
|
+
key: "deleteTeamUser",
|
244
|
+
value: function deleteTeamUser(id, opts) {
|
245
|
+
return this.deleteTeamUserWithHttpInfo(id, opts).then(function (response_and_data) {
|
246
|
+
return response_and_data;
|
247
|
+
});
|
248
|
+
}
|
249
|
+
/**
|
250
|
+
* Get a single team
|
251
|
+
* Returns data about a specific team.
|
252
|
+
* @param {Number} id The ID of the team
|
253
|
+
* @param {Object} opts Optional parameters
|
254
|
+
* @param {module:model/NumberBooleanDefault0} opts.skipUsers When enabled, the teams will not include IDs of member users
|
255
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Team} and HTTP response
|
256
|
+
*/
|
257
|
+
|
258
|
+
}, {
|
259
|
+
key: "getTeamWithHttpInfo",
|
260
|
+
value: function getTeamWithHttpInfo(id, opts) {
|
261
|
+
opts = opts || {};
|
262
|
+
var postBody = null; // verify the required parameter 'id' is set
|
263
|
+
|
264
|
+
if (id === undefined || id === null) {
|
265
|
+
throw new Error("Missing the required parameter 'id' when calling getTeam");
|
266
|
+
}
|
267
|
+
|
268
|
+
var pathParams = {
|
269
|
+
'id': id
|
270
|
+
};
|
271
|
+
var queryParams = {
|
272
|
+
'skip_users': opts['skipUsers']
|
273
|
+
};
|
274
|
+
var headerParams = {};
|
275
|
+
var formParams = {};
|
276
|
+
var formParamArray = [];
|
277
|
+
var contentTypes = [];
|
278
|
+
var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
|
279
|
+
var isJSON = contentTypes.includes('application/json');
|
280
|
+
|
281
|
+
if (isJSON) {
|
282
|
+
postBody = _objectSpread(_objectSpread({}, postBody), opts);
|
283
|
+
} else if (isURLEncoded) {
|
284
|
+
for (var key in opts) {
|
285
|
+
if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
|
286
|
+
formParams[key] = opts[key];
|
287
|
+
}
|
288
|
+
}
|
289
|
+
}
|
290
|
+
|
291
|
+
var authNames = ['api_key', 'oauth2'];
|
292
|
+
var accepts = ['application/json'];
|
293
|
+
var returnType = _Team["default"];
|
294
|
+
return this.apiClient.callApi('/legacyTeams/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
295
|
+
}
|
296
|
+
/**
|
297
|
+
* Get a single team
|
298
|
+
* Returns data about a specific team.
|
299
|
+
* @param {Number} id The ID of the team
|
300
|
+
* @param {Object} opts Optional parameters
|
301
|
+
* @param {module:model/NumberBooleanDefault0} opts.skipUsers When enabled, the teams will not include IDs of member users
|
302
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Team}
|
303
|
+
*/
|
304
|
+
|
305
|
+
}, {
|
306
|
+
key: "getTeam",
|
307
|
+
value: function getTeam(id, opts) {
|
308
|
+
return this.getTeamWithHttpInfo(id, opts).then(function (response_and_data) {
|
309
|
+
return response_and_data;
|
310
|
+
});
|
311
|
+
}
|
312
|
+
/**
|
313
|
+
* Get all users in a team
|
314
|
+
* Returns a list of all user IDs within a team.
|
315
|
+
* @param {Number} id The ID of the team
|
316
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UserIDs} and HTTP response
|
317
|
+
*/
|
318
|
+
|
319
|
+
}, {
|
320
|
+
key: "getTeamUsersWithHttpInfo",
|
321
|
+
value: function getTeamUsersWithHttpInfo(id) {
|
322
|
+
var opts = {};
|
323
|
+
var postBody = null; // verify the required parameter 'id' is set
|
324
|
+
|
325
|
+
if (id === undefined || id === null) {
|
326
|
+
throw new Error("Missing the required parameter 'id' when calling getTeamUsers");
|
327
|
+
}
|
328
|
+
|
329
|
+
var pathParams = {
|
330
|
+
'id': id
|
331
|
+
};
|
332
|
+
var queryParams = {};
|
333
|
+
var headerParams = {};
|
334
|
+
var formParams = {};
|
335
|
+
var formParamArray = [];
|
336
|
+
var contentTypes = [];
|
337
|
+
var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
|
338
|
+
var isJSON = contentTypes.includes('application/json');
|
339
|
+
|
340
|
+
if (isJSON) {
|
341
|
+
postBody = _objectSpread(_objectSpread({}, postBody), opts);
|
342
|
+
} else if (isURLEncoded) {
|
343
|
+
for (var key in opts) {
|
344
|
+
if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
|
345
|
+
formParams[key] = opts[key];
|
346
|
+
}
|
347
|
+
}
|
348
|
+
}
|
349
|
+
|
350
|
+
var authNames = ['api_key', 'oauth2'];
|
351
|
+
var accepts = ['application/json'];
|
352
|
+
var returnType = _UserIDs["default"];
|
353
|
+
return this.apiClient.callApi('/legacyTeams/{id}/users', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
354
|
+
}
|
355
|
+
/**
|
356
|
+
* Get all users in a team
|
357
|
+
* Returns a list of all user IDs within a team.
|
358
|
+
* @param {Number} id The ID of the team
|
359
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserIDs}
|
360
|
+
*/
|
361
|
+
|
362
|
+
}, {
|
363
|
+
key: "getTeamUsers",
|
364
|
+
value: function getTeamUsers(id) {
|
365
|
+
return this.getTeamUsersWithHttpInfo(id).then(function (response_and_data) {
|
366
|
+
return response_and_data;
|
367
|
+
});
|
368
|
+
}
|
369
|
+
/**
|
370
|
+
* Get all teams
|
371
|
+
* Returns data about teams within the company.
|
372
|
+
* @param {Object} opts Optional parameters
|
373
|
+
* @param {module:model/String} opts.orderBy The field name to sort returned teams by (default to 'id')
|
374
|
+
* @param {module:model/NumberBooleanDefault0} opts.skipUsers When enabled, the teams will not include IDs of member users
|
375
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Teams} and HTTP response
|
376
|
+
*/
|
377
|
+
|
378
|
+
}, {
|
379
|
+
key: "getTeamsWithHttpInfo",
|
380
|
+
value: function getTeamsWithHttpInfo(opts) {
|
381
|
+
opts = opts || {};
|
382
|
+
var postBody = null;
|
383
|
+
var pathParams = {};
|
384
|
+
var queryParams = {
|
385
|
+
'order_by': opts['orderBy'],
|
386
|
+
'skip_users': opts['skipUsers']
|
387
|
+
};
|
388
|
+
var headerParams = {};
|
389
|
+
var formParams = {};
|
390
|
+
var formParamArray = [];
|
391
|
+
var contentTypes = [];
|
392
|
+
var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
|
393
|
+
var isJSON = contentTypes.includes('application/json');
|
394
|
+
|
395
|
+
if (isJSON) {
|
396
|
+
postBody = _objectSpread(_objectSpread({}, postBody), opts);
|
397
|
+
} else if (isURLEncoded) {
|
398
|
+
for (var key in opts) {
|
399
|
+
if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
|
400
|
+
formParams[key] = opts[key];
|
401
|
+
}
|
402
|
+
}
|
403
|
+
}
|
404
|
+
|
405
|
+
var authNames = ['api_key', 'oauth2'];
|
406
|
+
var accepts = ['application/json'];
|
407
|
+
var returnType = _Teams["default"];
|
408
|
+
return this.apiClient.callApi('/legacyTeams', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
409
|
+
}
|
410
|
+
/**
|
411
|
+
* Get all teams
|
412
|
+
* Returns data about teams within the company.
|
413
|
+
* @param {Object} opts Optional parameters
|
414
|
+
* @param {module:model/String} opts.orderBy The field name to sort returned teams by (default to 'id')
|
415
|
+
* @param {module:model/NumberBooleanDefault0} opts.skipUsers When enabled, the teams will not include IDs of member users
|
416
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Teams}
|
417
|
+
*/
|
418
|
+
|
419
|
+
}, {
|
420
|
+
key: "getTeams",
|
421
|
+
value: function getTeams(opts) {
|
422
|
+
return this.getTeamsWithHttpInfo(opts).then(function (response_and_data) {
|
423
|
+
return response_and_data;
|
424
|
+
});
|
425
|
+
}
|
426
|
+
/**
|
427
|
+
* Get all teams of a user
|
428
|
+
* Returns data about all teams which have the specified user as a member.
|
429
|
+
* @param {Number} id The ID of the user
|
430
|
+
* @param {Object} opts Optional parameters
|
431
|
+
* @param {module:model/String} opts.orderBy The field name to sort returned teams by (default to 'id')
|
432
|
+
* @param {module:model/NumberBooleanDefault0} opts.skipUsers When enabled, the teams will not include IDs of member users
|
433
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Teams} and HTTP response
|
434
|
+
*/
|
435
|
+
|
436
|
+
}, {
|
437
|
+
key: "getUserTeamsWithHttpInfo",
|
438
|
+
value: function getUserTeamsWithHttpInfo(id, opts) {
|
439
|
+
opts = opts || {};
|
440
|
+
var postBody = null; // verify the required parameter 'id' is set
|
441
|
+
|
442
|
+
if (id === undefined || id === null) {
|
443
|
+
throw new Error("Missing the required parameter 'id' when calling getUserTeams");
|
444
|
+
}
|
445
|
+
|
446
|
+
var pathParams = {
|
447
|
+
'id': id
|
448
|
+
};
|
449
|
+
var queryParams = {
|
450
|
+
'order_by': opts['orderBy'],
|
451
|
+
'skip_users': opts['skipUsers']
|
452
|
+
};
|
453
|
+
var headerParams = {};
|
454
|
+
var formParams = {};
|
455
|
+
var formParamArray = [];
|
456
|
+
var contentTypes = [];
|
457
|
+
var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
|
458
|
+
var isJSON = contentTypes.includes('application/json');
|
459
|
+
|
460
|
+
if (isJSON) {
|
461
|
+
postBody = _objectSpread(_objectSpread({}, postBody), opts);
|
462
|
+
} else if (isURLEncoded) {
|
463
|
+
for (var key in opts) {
|
464
|
+
if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
|
465
|
+
formParams[key] = opts[key];
|
466
|
+
}
|
467
|
+
}
|
468
|
+
}
|
469
|
+
|
470
|
+
var authNames = ['api_key', 'oauth2'];
|
471
|
+
var accepts = ['application/json'];
|
472
|
+
var returnType = _Teams["default"];
|
473
|
+
return this.apiClient.callApi('/legacyTeams/user/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
474
|
+
}
|
475
|
+
/**
|
476
|
+
* Get all teams of a user
|
477
|
+
* Returns data about all teams which have the specified user as a member.
|
478
|
+
* @param {Number} id The ID of the user
|
479
|
+
* @param {Object} opts Optional parameters
|
480
|
+
* @param {module:model/String} opts.orderBy The field name to sort returned teams by (default to 'id')
|
481
|
+
* @param {module:model/NumberBooleanDefault0} opts.skipUsers When enabled, the teams will not include IDs of member users
|
482
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Teams}
|
483
|
+
*/
|
484
|
+
|
485
|
+
}, {
|
486
|
+
key: "getUserTeams",
|
487
|
+
value: function getUserTeams(id, opts) {
|
488
|
+
return this.getUserTeamsWithHttpInfo(id, opts).then(function (response_and_data) {
|
489
|
+
return response_and_data;
|
490
|
+
});
|
491
|
+
}
|
492
|
+
/**
|
493
|
+
* Update a team
|
494
|
+
* Updates an existing team and returns the updated object.
|
495
|
+
* @param {Number} id The ID of the team
|
496
|
+
* @param {Object} opts Optional parameters
|
497
|
+
* @param {module:model/UpdateTeam} opts.updateTeam
|
498
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Team} and HTTP response
|
499
|
+
*/
|
500
|
+
|
501
|
+
}, {
|
502
|
+
key: "updateTeamWithHttpInfo",
|
503
|
+
value: function updateTeamWithHttpInfo(id, opts) {
|
504
|
+
opts = opts || {};
|
505
|
+
var postBody = opts['updateTeam']; // verify the required parameter 'id' is set
|
506
|
+
|
507
|
+
if (id === undefined || id === null) {
|
508
|
+
throw new Error("Missing the required parameter 'id' when calling updateTeam");
|
509
|
+
}
|
510
|
+
|
511
|
+
var pathParams = {
|
512
|
+
'id': id
|
513
|
+
};
|
514
|
+
var queryParams = {};
|
515
|
+
var headerParams = {};
|
516
|
+
var formParams = {};
|
517
|
+
var formParamArray = [];
|
518
|
+
var contentTypes = ['application/json'];
|
519
|
+
var isURLEncoded = contentTypes.includes('application/x-www-form-urlencoded');
|
520
|
+
var isJSON = contentTypes.includes('application/json');
|
521
|
+
|
522
|
+
if (isJSON) {
|
523
|
+
postBody = _objectSpread(_objectSpread({}, postBody), opts);
|
524
|
+
} else if (isURLEncoded) {
|
525
|
+
for (var key in opts) {
|
526
|
+
if (opts.hasOwnProperty(key) && !formParamArray.includes(key)) {
|
527
|
+
formParams[key] = opts[key];
|
528
|
+
}
|
529
|
+
}
|
530
|
+
}
|
531
|
+
|
532
|
+
var authNames = ['api_key', 'oauth2'];
|
533
|
+
var accepts = ['application/json'];
|
534
|
+
var returnType = _Team["default"];
|
535
|
+
return this.apiClient.callApi('/legacyTeams/{id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
536
|
+
}
|
537
|
+
/**
|
538
|
+
* Update a team
|
539
|
+
* Updates an existing team and returns the updated object.
|
540
|
+
* @param {Number} id The ID of the team
|
541
|
+
* @param {Object} opts Optional parameters
|
542
|
+
* @param {module:model/UpdateTeam} opts.updateTeam
|
543
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Team}
|
544
|
+
*/
|
545
|
+
|
546
|
+
}, {
|
547
|
+
key: "updateTeam",
|
548
|
+
value: function updateTeam(id, opts) {
|
549
|
+
return this.updateTeamWithHttpInfo(id, opts).then(function (response_and_data) {
|
550
|
+
return response_and_data;
|
551
|
+
});
|
552
|
+
}
|
553
|
+
}]);
|
554
|
+
return LegacyTeamsApi;
|
555
|
+
}();
|
556
|
+
|
557
|
+
exports["default"] = LegacyTeamsApi;
|
package/dist/api/PersonsApi.js
CHANGED
@@ -23,8 +23,6 @@ var _AddPersonPictureResponse = _interopRequireDefault(require("../model/AddPers
|
|
23
23
|
|
24
24
|
var _AddPersonResponse = _interopRequireDefault(require("../model/AddPersonResponse"));
|
25
25
|
|
26
|
-
var _BasicPerson = _interopRequireDefault(require("../model/BasicPerson"));
|
27
|
-
|
28
26
|
var _DeletePersonResponse = _interopRequireDefault(require("../model/DeletePersonResponse"));
|
29
27
|
|
30
28
|
var _DeletePersonsInBulkResponse = _interopRequireDefault(require("../model/DeletePersonsInBulkResponse"));
|
@@ -59,6 +57,8 @@ var _PersonFlowResponse = _interopRequireDefault(require("../model/PersonFlowRes
|
|
59
57
|
|
60
58
|
var _PersonSearchResponse = _interopRequireDefault(require("../model/PersonSearchResponse"));
|
61
59
|
|
60
|
+
var _UpdatePerson = _interopRequireDefault(require("../model/UpdatePerson"));
|
61
|
+
|
62
62
|
var _UpdatePersonResponse = _interopRequireDefault(require("../model/UpdatePersonResponse"));
|
63
63
|
|
64
64
|
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; }
|
@@ -1323,7 +1323,7 @@ var PersonsApi = /*#__PURE__*/function () {
|
|
1323
1323
|
* Updates the properties of a person. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/updating-a-person\" target=\"_blank\" rel=\"noopener noreferrer\">updating a person</a>.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field.
|
1324
1324
|
* @param {Number} id The ID of the person
|
1325
1325
|
* @param {Object} opts Optional parameters
|
1326
|
-
* @param {module:model/
|
1326
|
+
* @param {module:model/UpdatePerson} opts.updatePerson
|
1327
1327
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UpdatePersonResponse} and HTTP response
|
1328
1328
|
*/
|
1329
1329
|
|
@@ -1331,16 +1331,12 @@ var PersonsApi = /*#__PURE__*/function () {
|
|
1331
1331
|
key: "updatePersonWithHttpInfo",
|
1332
1332
|
value: function updatePersonWithHttpInfo(id, opts) {
|
1333
1333
|
opts = opts || {};
|
1334
|
-
var postBody = opts['
|
1334
|
+
var postBody = opts['updatePerson']; // verify the required parameter 'id' is set
|
1335
1335
|
|
1336
1336
|
if (id === undefined || id === null) {
|
1337
1337
|
throw new Error("Missing the required parameter 'id' when calling updatePerson");
|
1338
1338
|
}
|
1339
1339
|
|
1340
|
-
if (opts['name'] === undefined || opts['name'] === null) {
|
1341
|
-
throw new Error("Missing the required parameter 'name' when calling updatePerson");
|
1342
|
-
}
|
1343
|
-
|
1344
1340
|
var pathParams = {
|
1345
1341
|
'id': id
|
1346
1342
|
};
|
@@ -1372,7 +1368,7 @@ var PersonsApi = /*#__PURE__*/function () {
|
|
1372
1368
|
* Updates the properties of a person. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/updating-a-person\" target=\"_blank\" rel=\"noopener noreferrer\">updating a person</a>.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field.
|
1373
1369
|
* @param {Number} id The ID of the person
|
1374
1370
|
* @param {Object} opts Optional parameters
|
1375
|
-
* @param {module:model/
|
1371
|
+
* @param {module:model/UpdatePerson} opts.updatePerson
|
1376
1372
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UpdatePersonResponse}
|
1377
1373
|
*/
|
1378
1374
|
|