pipedrive 33.4.1 → 33.4.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.
|
@@ -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
|
-
|
|
25
|
-
|
|
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
|
-
|
|
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
|
-
|
|
25
|
-
|
|
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
|
-
|
|
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) => {
|
package/dist/versions/v1/base.js
CHANGED
|
@@ -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
|
-
|
|
31
|
-
const
|
|
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
|
-
|
|
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;
|
package/dist/versions/v2/base.js
CHANGED
|
@@ -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
|
-
|
|
31
|
-
const
|
|
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
|
-
|
|
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;
|