pipedrive 33.4.1 → 33.4.3

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 (21) hide show
  1. package/dist/esm/versions/v1/base.js +3 -23
  2. package/dist/esm/versions/v2/base.js +3 -23
  3. package/dist/esm/versions/v2/models/add-deal-field-request-required-fields.d.ts +1 -1
  4. package/dist/esm/versions/v2/models/delete-deal-field200-response-data.d.ts +5 -5
  5. package/dist/esm/versions/v2/models/get-activity-fields200-response-data-inner-options-inner-id.d.ts +17 -0
  6. package/dist/esm/versions/v2/models/get-activity-fields200-response-data-inner-options-inner-id.js +14 -0
  7. package/dist/esm/versions/v2/models/get-activity-fields200-response-data-inner-options-inner.d.ts +4 -3
  8. package/dist/esm/versions/v2/models/get-deal-fields200-response-data-inner.d.ts +5 -5
  9. package/dist/esm/versions/v2/models/index.d.ts +1 -0
  10. package/dist/esm/versions/v2/models/index.js +1 -0
  11. package/dist/versions/v1/base.js +3 -23
  12. package/dist/versions/v2/base.js +3 -23
  13. package/dist/versions/v2/models/add-deal-field-request-required-fields.d.ts +1 -1
  14. package/dist/versions/v2/models/delete-deal-field200-response-data.d.ts +5 -5
  15. package/dist/versions/v2/models/get-activity-fields200-response-data-inner-options-inner-id.d.ts +17 -0
  16. package/dist/versions/v2/models/get-activity-fields200-response-data-inner-options-inner-id.js +15 -0
  17. package/dist/versions/v2/models/get-activity-fields200-response-data-inner-options-inner.d.ts +4 -3
  18. package/dist/versions/v2/models/get-deal-fields200-response-data-inner.d.ts +5 -5
  19. package/dist/versions/v2/models/index.d.ts +1 -0
  20. package/dist/versions/v2/models/index.js +1 -0
  21. package/package.json +1 -1
@@ -21,8 +21,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import axios from 'axios';
24
- import { join, dirname } from 'path';
25
- import { existsSync } from 'fs';
24
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
25
+ const _pkg = require('../../../package.json');
26
26
  export const BASE_PATH = "https://api.pipedrive.com/v1".replace(/\/+$/, "");
27
27
  /**
28
28
  *
@@ -34,28 +34,8 @@ export const COLLECTION_FORMATS = {
34
34
  tsv: "\t",
35
35
  pipes: "|",
36
36
  };
37
- const searchForPackageJson = (startPath) => {
38
- const filePath = join(startPath, 'package.json');
39
- if (existsSync(filePath)) {
40
- return filePath;
41
- }
42
- const parentDir = dirname(startPath);
43
- // Stop if we've reached the root directory
44
- if (parentDir.endsWith('/pipedrive') || parentDir === startPath) {
45
- return null;
46
- }
47
- return searchForPackageJson(parentDir);
48
- };
49
37
  export const versionInterceptor = (config) => __awaiter(void 0, void 0, void 0, function* () {
50
- let version;
51
- try {
52
- const path = searchForPackageJson(__dirname);
53
- version = path ? require(path).version : '22.x';
54
- }
55
- catch (error) {
56
- version = '22.x';
57
- }
58
- config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
38
+ config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${_pkg.version}`;
59
39
  return config;
60
40
  });
61
41
  export const responseInterceptor = (response) => {
@@ -21,8 +21,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import axios from 'axios';
24
- import { join, dirname } from 'path';
25
- import { existsSync } from 'fs';
24
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
25
+ const _pkg = require('../../../package.json');
26
26
  export const BASE_PATH = "https://api.pipedrive.com/api/v2".replace(/\/+$/, "");
27
27
  /**
28
28
  *
@@ -34,28 +34,8 @@ export const COLLECTION_FORMATS = {
34
34
  tsv: "\t",
35
35
  pipes: "|",
36
36
  };
37
- const searchForPackageJson = (startPath) => {
38
- const filePath = join(startPath, 'package.json');
39
- if (existsSync(filePath)) {
40
- return filePath;
41
- }
42
- const parentDir = dirname(startPath);
43
- // Stop if we've reached the root directory
44
- if (parentDir.endsWith('/pipedrive') || parentDir === startPath) {
45
- return null;
46
- }
47
- return searchForPackageJson(parentDir);
48
- };
49
37
  export const versionInterceptor = (config) => __awaiter(void 0, void 0, void 0, function* () {
50
- let version;
51
- try {
52
- const path = searchForPackageJson(__dirname);
53
- version = path ? require(path).version : '22.x';
54
- }
55
- catch (error) {
56
- version = '22.x';
57
- }
58
- config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
38
+ config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${_pkg.version}`;
59
39
  return config;
60
40
  });
61
41
  export const responseInterceptor = (response) => {
@@ -27,7 +27,7 @@ export interface AddDealFieldRequestRequiredFields {
27
27
  */
28
28
  'stage_ids'?: Array<number>;
29
29
  /**
30
- * Pipeline-specific status requirements for when deals are won or lost. Keys are pipeline IDs (as strings), values are arrays of status strings (\'won\', \'lost\'). Example - {\"1\":[\"won\",\"lost\"],\"2\":[\"won\"]} means the field is required when marking deals as won or lost in pipeline 1, and only when won in pipeline 2. Must reference valid, active pipelines.
30
+ * Pipeline-specific status requirements for when deals are won or lost. Keys are pipeline IDs (as strings), values are arrays of status strings (\'won\', \'lost\'). Example - `{\"1\":[\"won\",\"lost\"],\"2\":[\"won\"]}` means the field is required when marking deals as won or lost in pipeline 1, and only when won in pipeline 2. Must reference valid, active pipelines.
31
31
  * @type {{ [key: string]: Array<string> | undefined; }}
32
32
  */
33
33
  'statuses'?: {
@@ -26,11 +26,6 @@ export interface DeleteDealField200ResponseData {
26
26
  */
27
27
  'field_code': string;
28
28
  /**
29
- * The description of the field
30
- * @type {string}
31
- */
32
- 'description': string;
33
- /**
34
29
  * The type of the field
35
30
  * @type {string}
36
31
  */
@@ -46,6 +41,11 @@ export interface DeleteDealField200ResponseData {
46
41
  */
47
42
  'is_optional_response_field': boolean;
48
43
  /**
44
+ * The description of the field
45
+ * @type {string}
46
+ */
47
+ 'description'?: string;
48
+ /**
49
49
  * Array of available options for enum/set fields, null for other field types
50
50
  * @type {Array<object>}
51
51
  */
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Pipedrive API v2
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * @type GetActivityFields200ResponseDataInnerOptionsInnerId
14
+ * The option ID (integer for custom fields, string for built-in fields)
15
+ * @export
16
+ */
17
+ export type GetActivityFields200ResponseDataInnerOptionsInnerId = number | string;
@@ -0,0 +1,14 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Pipedrive API v2
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 2.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ export {};
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { GetActivityFields200ResponseDataInnerOptionsInnerId } from './get-activity-fields200-response-data-inner-options-inner-id';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -16,10 +17,10 @@
16
17
  */
17
18
  export interface GetActivityFields200ResponseDataInnerOptionsInner {
18
19
  /**
19
- * The option ID
20
- * @type {number}
20
+ *
21
+ * @type {GetActivityFields200ResponseDataInnerOptionsInnerId}
21
22
  */
22
- 'id'?: number;
23
+ 'id'?: GetActivityFields200ResponseDataInnerOptionsInnerId;
23
24
  /**
24
25
  * The option display label
25
26
  * @type {string}
@@ -31,11 +31,6 @@ export interface GetDealFields200ResponseDataInner {
31
31
  */
32
32
  'field_code': string;
33
33
  /**
34
- * The description of the field
35
- * @type {string}
36
- */
37
- 'description': string;
38
- /**
39
34
  * The type of the field
40
35
  * @type {string}
41
36
  */
@@ -51,6 +46,11 @@ export interface GetDealFields200ResponseDataInner {
51
46
  */
52
47
  'is_optional_response_field': boolean;
53
48
  /**
49
+ * The description of the field
50
+ * @type {string}
51
+ */
52
+ 'description'?: string;
53
+ /**
54
54
  * Array of available options for enum/set fields, null for other field types
55
55
  * @type {Array<GetActivityFields200ResponseDataInnerOptionsInner>}
56
56
  */
@@ -125,6 +125,7 @@ export * from './get-activity-fields200-response';
125
125
  export * from './get-activity-fields200-response-additional-data';
126
126
  export * from './get-activity-fields200-response-data-inner';
127
127
  export * from './get-activity-fields200-response-data-inner-options-inner';
128
+ export * from './get-activity-fields200-response-data-inner-options-inner-id';
128
129
  export * from './get-activity-fields200-response-data-inner-subfields-inner';
129
130
  export * from './get-activity-fields200-response-data-inner-ui-visibility';
130
131
  export * from './get-additional-discounts-response';
@@ -125,6 +125,7 @@ export * from './get-activity-fields200-response';
125
125
  export * from './get-activity-fields200-response-additional-data';
126
126
  export * from './get-activity-fields200-response-data-inner';
127
127
  export * from './get-activity-fields200-response-data-inner-options-inner';
128
+ export * from './get-activity-fields200-response-data-inner-options-inner-id';
128
129
  export * from './get-activity-fields200-response-data-inner-subfields-inner';
129
130
  export * from './get-activity-fields200-response-data-inner-ui-visibility';
130
131
  export * from './get-additional-discounts-response';
@@ -27,8 +27,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
28
  exports.RequiredError = exports.BaseAPI = exports.errorInterceptor = exports.responseInterceptor = exports.versionInterceptor = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
29
29
  const axios_1 = __importDefault(require("axios"));
30
- const path_1 = require("path");
31
- const fs_1 = require("fs");
30
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
31
+ const _pkg = require('../../../package.json');
32
32
  exports.BASE_PATH = "https://api.pipedrive.com/v1".replace(/\/+$/, "");
33
33
  /**
34
34
  *
@@ -40,28 +40,8 @@ exports.COLLECTION_FORMATS = {
40
40
  tsv: "\t",
41
41
  pipes: "|",
42
42
  };
43
- const searchForPackageJson = (startPath) => {
44
- const filePath = (0, path_1.join)(startPath, 'package.json');
45
- if ((0, fs_1.existsSync)(filePath)) {
46
- return filePath;
47
- }
48
- const parentDir = (0, path_1.dirname)(startPath);
49
- // Stop if we've reached the root directory
50
- if (parentDir.endsWith('/pipedrive') || parentDir === startPath) {
51
- return null;
52
- }
53
- return searchForPackageJson(parentDir);
54
- };
55
43
  const versionInterceptor = (config) => __awaiter(void 0, void 0, void 0, function* () {
56
- let version;
57
- try {
58
- const path = searchForPackageJson(__dirname);
59
- version = path ? require(path).version : '22.x';
60
- }
61
- catch (error) {
62
- version = '22.x';
63
- }
64
- config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
44
+ config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${_pkg.version}`;
65
45
  return config;
66
46
  });
67
47
  exports.versionInterceptor = versionInterceptor;
@@ -27,8 +27,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
28
  exports.RequiredError = exports.BaseAPI = exports.errorInterceptor = exports.responseInterceptor = exports.versionInterceptor = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
29
29
  const axios_1 = __importDefault(require("axios"));
30
- const path_1 = require("path");
31
- const fs_1 = require("fs");
30
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
31
+ const _pkg = require('../../../package.json');
32
32
  exports.BASE_PATH = "https://api.pipedrive.com/api/v2".replace(/\/+$/, "");
33
33
  /**
34
34
  *
@@ -40,28 +40,8 @@ exports.COLLECTION_FORMATS = {
40
40
  tsv: "\t",
41
41
  pipes: "|",
42
42
  };
43
- const searchForPackageJson = (startPath) => {
44
- const filePath = (0, path_1.join)(startPath, 'package.json');
45
- if ((0, fs_1.existsSync)(filePath)) {
46
- return filePath;
47
- }
48
- const parentDir = (0, path_1.dirname)(startPath);
49
- // Stop if we've reached the root directory
50
- if (parentDir.endsWith('/pipedrive') || parentDir === startPath) {
51
- return null;
52
- }
53
- return searchForPackageJson(parentDir);
54
- };
55
43
  const versionInterceptor = (config) => __awaiter(void 0, void 0, void 0, function* () {
56
- let version;
57
- try {
58
- const path = searchForPackageJson(__dirname);
59
- version = path ? require(path).version : '22.x';
60
- }
61
- catch (error) {
62
- version = '22.x';
63
- }
64
- config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${version}`;
44
+ config.headers['User-Agent'] = `Pipedrive-SDK-Javascript-${_pkg.version}`;
65
45
  return config;
66
46
  });
67
47
  exports.versionInterceptor = versionInterceptor;
@@ -27,7 +27,7 @@ export interface AddDealFieldRequestRequiredFields {
27
27
  */
28
28
  'stage_ids'?: Array<number>;
29
29
  /**
30
- * Pipeline-specific status requirements for when deals are won or lost. Keys are pipeline IDs (as strings), values are arrays of status strings (\'won\', \'lost\'). Example - {\"1\":[\"won\",\"lost\"],\"2\":[\"won\"]} means the field is required when marking deals as won or lost in pipeline 1, and only when won in pipeline 2. Must reference valid, active pipelines.
30
+ * Pipeline-specific status requirements for when deals are won or lost. Keys are pipeline IDs (as strings), values are arrays of status strings (\'won\', \'lost\'). Example - `{\"1\":[\"won\",\"lost\"],\"2\":[\"won\"]}` means the field is required when marking deals as won or lost in pipeline 1, and only when won in pipeline 2. Must reference valid, active pipelines.
31
31
  * @type {{ [key: string]: Array<string> | undefined; }}
32
32
  */
33
33
  'statuses'?: {
@@ -26,11 +26,6 @@ export interface DeleteDealField200ResponseData {
26
26
  */
27
27
  'field_code': string;
28
28
  /**
29
- * The description of the field
30
- * @type {string}
31
- */
32
- 'description': string;
33
- /**
34
29
  * The type of the field
35
30
  * @type {string}
36
31
  */
@@ -46,6 +41,11 @@ export interface DeleteDealField200ResponseData {
46
41
  */
47
42
  'is_optional_response_field': boolean;
48
43
  /**
44
+ * The description of the field
45
+ * @type {string}
46
+ */
47
+ 'description'?: string;
48
+ /**
49
49
  * Array of available options for enum/set fields, null for other field types
50
50
  * @type {Array<object>}
51
51
  */
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Pipedrive API v2
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * @type GetActivityFields200ResponseDataInnerOptionsInnerId
14
+ * The option ID (integer for custom fields, string for built-in fields)
15
+ * @export
16
+ */
17
+ export type GetActivityFields200ResponseDataInnerOptionsInnerId = number | string;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Pipedrive API v2
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 2.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { GetActivityFields200ResponseDataInnerOptionsInnerId } from './get-activity-fields200-response-data-inner-options-inner-id';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -16,10 +17,10 @@
16
17
  */
17
18
  export interface GetActivityFields200ResponseDataInnerOptionsInner {
18
19
  /**
19
- * The option ID
20
- * @type {number}
20
+ *
21
+ * @type {GetActivityFields200ResponseDataInnerOptionsInnerId}
21
22
  */
22
- 'id'?: number;
23
+ 'id'?: GetActivityFields200ResponseDataInnerOptionsInnerId;
23
24
  /**
24
25
  * The option display label
25
26
  * @type {string}
@@ -31,11 +31,6 @@ export interface GetDealFields200ResponseDataInner {
31
31
  */
32
32
  'field_code': string;
33
33
  /**
34
- * The description of the field
35
- * @type {string}
36
- */
37
- 'description': string;
38
- /**
39
34
  * The type of the field
40
35
  * @type {string}
41
36
  */
@@ -51,6 +46,11 @@ export interface GetDealFields200ResponseDataInner {
51
46
  */
52
47
  'is_optional_response_field': boolean;
53
48
  /**
49
+ * The description of the field
50
+ * @type {string}
51
+ */
52
+ 'description'?: string;
53
+ /**
54
54
  * Array of available options for enum/set fields, null for other field types
55
55
  * @type {Array<GetActivityFields200ResponseDataInnerOptionsInner>}
56
56
  */
@@ -125,6 +125,7 @@ export * from './get-activity-fields200-response';
125
125
  export * from './get-activity-fields200-response-additional-data';
126
126
  export * from './get-activity-fields200-response-data-inner';
127
127
  export * from './get-activity-fields200-response-data-inner-options-inner';
128
+ export * from './get-activity-fields200-response-data-inner-options-inner-id';
128
129
  export * from './get-activity-fields200-response-data-inner-subfields-inner';
129
130
  export * from './get-activity-fields200-response-data-inner-ui-visibility';
130
131
  export * from './get-additional-discounts-response';
@@ -141,6 +141,7 @@ __exportStar(require("./get-activity-fields200-response"), exports);
141
141
  __exportStar(require("./get-activity-fields200-response-additional-data"), exports);
142
142
  __exportStar(require("./get-activity-fields200-response-data-inner"), exports);
143
143
  __exportStar(require("./get-activity-fields200-response-data-inner-options-inner"), exports);
144
+ __exportStar(require("./get-activity-fields200-response-data-inner-options-inner-id"), exports);
144
145
  __exportStar(require("./get-activity-fields200-response-data-inner-subfields-inner"), exports);
145
146
  __exportStar(require("./get-activity-fields200-response-data-inner-ui-visibility"), exports);
146
147
  __exportStar(require("./get-additional-discounts-response"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pipedrive",
3
- "version": "33.4.1",
3
+ "version": "33.4.3",
4
4
  "description": "Pipedrive REST client for NodeJS",
5
5
  "license": "MIT",
6
6
  "homepage": "https://developers.pipedrive.com",