pipedrive 19.0.1 → 20.0.0

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -1271,24 +1271,26 @@ Class | Method | HTTP request | Description
1271
1271
  - **Flow**: accessCode
1272
1272
  - **Authorization URL**: https://oauth.pipedrive.com/oauth/authorize
1273
1273
  - **Scopes**:
1274
- - deals:read: Read most data about deals and related entities.
1275
- - deals:full: Create, read, update and delete deals, its participants and followers.
1276
- - goals:read: Read data on all goals.
1277
- - goals:full: Create, read, update and delete goals.
1278
- - leads:read: Read leads and leads labels.
1279
- - leads:full: Create, read, update and delete leads and leads labels
1280
- - activities:read: Read activities, its fields and types; all files and filters.
1281
- - activities:full: Create, read, update and delete activities and all files and filters.
1282
- - contacts:read: Read data about persons and organizations, their related fields and followers.
1283
- - contacts:full: Create, read, update and delete persons and organizations and their followers.
1284
- - admin: Allows to do many things that an administrator can do in a Pipedrive company account.
1285
- - recents:read: Read all recent changes occured in an account.
1286
- - search:read: Search across the account for deals, persons, organizations, files and products and see details about the returned results.
1287
- - mail:read: Read mail threads and messages.
1288
- - mail:full: Read, update and delete mail threads. Also grants read access to mail messages.
1289
- - products:read: Read products, its fields, files, followers and products connected to a deal.
1274
+ - base: Read settings of the authorized user and currencies in an account
1275
+ - deals:read: Read most of the data about deals and related entities - deal fields, products, followers, participants; all notes, files, filters, pipelines, stages, and statistics. Does not include access to activities (except the last and next activity related to a deal)
1276
+ - deals:full: Create, read, update and delete deals, its participants and followers; all files, notes, and filters. It also includes read access to deal fields, pipelines, stages, and statistics. Does not include access to activities (except the last and next activity related to a deal)
1277
+ - mail:read: Read mail threads and messages
1278
+ - mail:full: Read, update and delete mail threads. Also grants read access to mail messages
1279
+ - activities:read: Read activities, its fields and types; all files and filters
1280
+ - activities:full: Create, read, update and delete activities and all files and filters. Also includes read access to activity fields and types
1281
+ - contacts:read: Read the data about persons and organizations, their related fields and followers; also all notes, files, filters
1282
+ - contacts:full: Create, read, update and delete persons and organizations and their followers; all notes, files, filters. Also grants read access to contacts-related fields
1283
+ - products:read: Read products, its fields, files, followers and products connected to a deal
1290
1284
  - products:full: Create, read, update and delete products and its fields; add products to deals
1291
- - users:read: Read data about users (people with access to a Pipedrive account), their permissions, roles and followers, as well as about legacy teams.
1292
- - base: Read settings of the authorized user and currencies in an account.
1293
- - phone-integration: Create, read and delete call logs and its audio recordings.
1285
+ - users:read: Read data about users (people with access to a Pipedrive account), their permissions, roles and followers
1286
+ - recents:read: Read all recent changes occurred in an account. Includes data about activities, activity types, deals, files, filters, notes, persons, organizations, pipelines, stages, products and users
1287
+ - search:read: Search across the account for deals, persons, organizations, files and products, and see details about the returned results
1288
+ - admin: Allows to do many things that an administrator can do in a Pipedrive company account - create, read, update and delete pipelines and its stages; deal, person and organization fields; activity types; users and permissions, etc. It also allows the app to create webhooks and fetch and delete webhooks that are created by the app
1289
+ - leads:read: Read data about leads and lead labels
1290
+ - leads:full: Create, read, update and delete leads and lead labels
1291
+ - phone-integration: Enables advanced call integration features like logging call duration and other metadata, and play call recordings inside Pipedrive
1292
+ - goals:read: Read data on all goals
1293
+ - goals:full: Create, read, update and delete goals
1294
+ - video-calls: Allows application to register as a video call integration provider and create conference links
1295
+ - messengers-integration: Allows application to register as a messengers integration provider and allows them to deliver incoming messages and their statuses
1294
1296
 
package/dist/ApiClient.js CHANGED
@@ -822,6 +822,74 @@ var ApiClient = /*#__PURE__*/function () {
822
822
  }
823
823
  }
824
824
 
825
+ /**
826
+ * Revoke Refresh Token aka marking an app uninstalled or revoke the Access Token.
827
+ * @param {Object} optional opts object with tokenTypeHint param, values can be: 'access_token' or 'refresh_token'.
828
+ */
829
+ }, {
830
+ key: "revokeToken",
831
+ value: function () {
832
+ var _revokeToken = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
833
+ var opts,
834
+ tokenTypeHint,
835
+ token,
836
+ clientId,
837
+ clientSecret,
838
+ host,
839
+ revokeUrl,
840
+ clientIdAndSecretInBase64,
841
+ request,
842
+ response,
843
+ exception,
844
+ _args4 = arguments;
845
+ return _regenerator["default"].wrap(function _callee4$(_context4) {
846
+ while (1) {
847
+ switch (_context4.prev = _context4.next) {
848
+ case 0:
849
+ opts = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
850
+ tokenTypeHint = opts.tokenTypeHint;
851
+ if (this.isOauth2Supported()) {
852
+ _context4.next = 4;
853
+ break;
854
+ }
855
+ throw new Error('Could not revoke the token. OAuth 2 is not supported.');
856
+ case 4:
857
+ token = tokenTypeHint === 'refresh_token' ? this.getOAuth2Property('refreshToken') : encodeURIComponent(this.getOAuth2Property('accessToken'));
858
+ clientId = this.getOAuth2Property('clientId');
859
+ clientSecret = this.getOAuth2Property('clientSecret');
860
+ host = this.getOAuth2Property('host');
861
+ revokeUrl = "".concat(host, "/oauth/revoke");
862
+ clientIdAndSecretInBase64 = Buffer.from("".concat(clientId, ":").concat(clientSecret)).toString('base64');
863
+ _context4.prev = 10;
864
+ request = _superagent["default"].post(revokeUrl).set('User-Agent', this.getUserAgent()).set('Authorization', "Basic ".concat(clientIdAndSecretInBase64)).send("token=".concat(token));
865
+ if (tokenTypeHint) {
866
+ request = request.send("token_type_hint=".concat(tokenTypeHint));
867
+ }
868
+ _context4.next = 15;
869
+ return request;
870
+ case 15:
871
+ response = _context4.sent;
872
+ return _context4.abrupt("return", response.body);
873
+ case 19:
874
+ _context4.prev = 19;
875
+ _context4.t0 = _context4["catch"](10);
876
+ exception = new _OAuthProviderException["default"]();
877
+ exception.message = _context4.t0.response.res.statusMessage;
878
+ exception.errorCode = _context4.t0.status;
879
+ exception.context = _context4.t0.response;
880
+ throw exception;
881
+ case 26:
882
+ case "end":
883
+ return _context4.stop();
884
+ }
885
+ }
886
+ }, _callee4, this, [[10, 19]]);
887
+ }));
888
+ function revokeToken() {
889
+ return _revokeToken.apply(this, arguments);
890
+ }
891
+ return revokeToken;
892
+ }()
825
893
  /**
826
894
  * Parses an ISO-8601 string representation or epoch representation of a date value.
827
895
  * @param {String} str The date value as a string.
@@ -270,7 +270,7 @@ DealCollectionResponseObject.prototype['lost_time'] = undefined;
270
270
  DealCollectionResponseObject.prototype['expected_close_date'] = undefined;
271
271
 
272
272
  /**
273
- * The label or multiple labels assigned to the dea
273
+ * The label or multiple labels assigned to the deal
274
274
  * @member {String} label
275
275
  */
276
276
  DealCollectionResponseObject.prototype['label'] = undefined;
@@ -73,10 +73,6 @@ var ListProductAdditionalData = /*#__PURE__*/function () {
73
73
  obj['products_sum_total'] = _ApiClient["default"].convertToType(data['products_sum_total'], 'Number');
74
74
  delete data['products_sum_total'];
75
75
  }
76
- if (data.hasOwnProperty('variations_enabled')) {
77
- obj['variations_enabled'] = _ApiClient["default"].convertToType(data['variations_enabled'], 'Boolean');
78
- delete data['variations_enabled'];
79
- }
80
76
  if (data.hasOwnProperty('products_quantity_total_formatted')) {
81
77
  obj['products_quantity_total_formatted'] = _ApiClient["default"].convertToType(data['products_quantity_total_formatted'], 'String');
82
78
  delete data['products_quantity_total_formatted'];
@@ -110,12 +106,6 @@ ListProductAdditionalData.prototype['products_quantity_total'] = undefined;
110
106
  */
111
107
  ListProductAdditionalData.prototype['products_sum_total'] = undefined;
112
108
 
113
- /**
114
- * Whether variations is enabled or not
115
- * @member {Boolean} variations_enabled
116
- */
117
- ListProductAdditionalData.prototype['variations_enabled'] = undefined;
118
-
119
109
  /**
120
110
  * The total formatted quantity of the products
121
111
  * @member {String} products_quantity_total_formatted
@@ -144,11 +134,6 @@ _ListProductAdditionalDataAllOf["default"].prototype['products_quantity_total']
144
134
  * @member {Number} products_sum_total
145
135
  */
146
136
  _ListProductAdditionalDataAllOf["default"].prototype['products_sum_total'] = undefined;
147
- /**
148
- * Whether variations is enabled or not
149
- * @member {Boolean} variations_enabled
150
- */
151
- _ListProductAdditionalDataAllOf["default"].prototype['variations_enabled'] = undefined;
152
137
  /**
153
138
  * The total formatted quantity of the products
154
139
  * @member {String} products_quantity_total_formatted
@@ -64,10 +64,6 @@ var ListProductAdditionalDataAllOf = /*#__PURE__*/function () {
64
64
  obj['products_sum_total'] = _ApiClient["default"].convertToType(data['products_sum_total'], 'Number');
65
65
  delete data['products_sum_total'];
66
66
  }
67
- if (data.hasOwnProperty('variations_enabled')) {
68
- obj['variations_enabled'] = _ApiClient["default"].convertToType(data['variations_enabled'], 'Boolean');
69
- delete data['variations_enabled'];
70
- }
71
67
  if (data.hasOwnProperty('products_quantity_total_formatted')) {
72
68
  obj['products_quantity_total_formatted'] = _ApiClient["default"].convertToType(data['products_quantity_total_formatted'], 'String');
73
69
  delete data['products_quantity_total_formatted'];
@@ -97,12 +93,6 @@ ListProductAdditionalDataAllOf.prototype['products_quantity_total'] = undefined;
97
93
  */
98
94
  ListProductAdditionalDataAllOf.prototype['products_sum_total'] = undefined;
99
95
 
100
- /**
101
- * Whether variations is enabled or not
102
- * @member {Boolean} variations_enabled
103
- */
104
- ListProductAdditionalDataAllOf.prototype['variations_enabled'] = undefined;
105
-
106
96
  /**
107
97
  * The total formatted quantity of the products
108
98
  * @member {String} products_quantity_total_formatted
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pipedrive",
3
- "version": "19.0.1",
3
+ "version": "20.0.0",
4
4
  "description": "Pipedrive REST client for NodeJS",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",