conductor-node 11.3.0 → 11.3.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.
- package/README.md +1 -1
- package/dist/package.json +1 -1
- package/dist/src/Client.d.ts +0 -3
- package/dist/src/Client.js +7 -5
- package/dist/src/integrations/qbd/QbdIntegration.d.ts +3 -3
- package/dist/src/integrations/qbd/QbdIntegration.js +3 -3
- package/dist/src/utils/checkForUpdates.d.ts +1 -0
- package/dist/src/utils/checkForUpdates.js +22 -2
- package/package.json +1 -1
- package/dist/src/utils/http.d.ts +0 -1
- package/dist/src/utils/http.js +0 -12
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ Conductor, the company, is building a data integration platform for vertical Saa
|
|
|
41
41
|
|
|
42
42
|
## Requirements
|
|
43
43
|
|
|
44
|
-
1. A Conductor API key pair: one secret key, one publishable key. Please [
|
|
44
|
+
1. A Conductor API key pair: one secret key, one publishable key. Please [complete this form](https://73a5v9t55ed.typeform.com/to/VRX7rfrN) to join the beta.
|
|
45
45
|
2. Node.js v16 or later.
|
|
46
46
|
|
|
47
47
|
## Installation
|
package/dist/package.json
CHANGED
package/dist/src/Client.d.ts
CHANGED
|
@@ -14,9 +14,6 @@ export default class Client {
|
|
|
14
14
|
readonly authSessions: AuthSessionsResource;
|
|
15
15
|
/**
|
|
16
16
|
* Executes any QuickBooks Desktop (QBD) API against the specified end-user.
|
|
17
|
-
* See the official [QuickBooks Desktop API
|
|
18
|
-
* Reference](https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop)
|
|
19
|
-
* for a complete list of available APIs.
|
|
20
17
|
*/
|
|
21
18
|
readonly qbd: QbdIntegration;
|
|
22
19
|
private readonly httpClient;
|
package/dist/src/Client.js
CHANGED
|
@@ -11,7 +11,6 @@ const AuthSessionsResource_1 = __importDefault(require("./resources/AuthSessions
|
|
|
11
11
|
const EndUsersResource_1 = __importDefault(require("./resources/EndUsersResource"));
|
|
12
12
|
const IntegrationConnectionsResource_1 = __importDefault(require("./resources/IntegrationConnectionsResource"));
|
|
13
13
|
const checkForUpdates_1 = require("./utils/checkForUpdates");
|
|
14
|
-
const http_1 = require("./utils/http");
|
|
15
14
|
const axios_1 = __importDefault(require("axios"));
|
|
16
15
|
class Client {
|
|
17
16
|
endUsers;
|
|
@@ -19,9 +18,6 @@ class Client {
|
|
|
19
18
|
authSessions;
|
|
20
19
|
/**
|
|
21
20
|
* Executes any QuickBooks Desktop (QBD) API against the specified end-user.
|
|
22
|
-
* See the official [QuickBooks Desktop API
|
|
23
|
-
* Reference](https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop)
|
|
24
|
-
* for a complete list of available APIs.
|
|
25
21
|
*/
|
|
26
22
|
qbd;
|
|
27
23
|
httpClient;
|
|
@@ -34,8 +30,14 @@ class Client {
|
|
|
34
30
|
this.qbd = new QbdIntegration_1.default(this.httpClient);
|
|
35
31
|
}
|
|
36
32
|
createHttpClient(apiKey, verbose) {
|
|
33
|
+
// Use an environment variable for overriding the server URL for testing and
|
|
34
|
+
// development instead of checking `NODE_ENV` to allow `conductor-node`
|
|
35
|
+
// users to use the production API server when their `NODE_ENV` is set to
|
|
36
|
+
// "development".
|
|
37
|
+
const apiServerUrl = process.env["CONDUCTOR__MOCK_API_SERVER_URL"] ??
|
|
38
|
+
"https://api.conductor.is";
|
|
37
39
|
const httpClient = axios_1.default.create({
|
|
38
|
-
baseURL: `${
|
|
40
|
+
baseURL: `${apiServerUrl}/v1`,
|
|
39
41
|
headers: this.createHeaders(apiKey),
|
|
40
42
|
timeout: 0, // No timeout (default).
|
|
41
43
|
});
|
|
@@ -2159,13 +2159,13 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
2159
2159
|
/**
|
|
2160
2160
|
* This report returns information from any of three QuickBooks payroll
|
|
2161
2161
|
* reports:
|
|
2162
|
-
* - Payroll summary report This report shows the total wages, taxes
|
|
2162
|
+
* - Payroll summary report: This report shows the total wages, taxes
|
|
2163
2163
|
* withheld, deductions from net pay, additions to net pay, and
|
|
2164
2164
|
* employer-paid taxes and contributions for each employee on the payroll.
|
|
2165
|
-
* - Employee earnings summary report This report shows information similar
|
|
2165
|
+
* - Employee earnings summary report: This report shows information similar
|
|
2166
2166
|
* to the payroll summary report, but in a different layout. The report
|
|
2167
2167
|
* has a row for each employee and a column for each payroll item.
|
|
2168
|
-
* - Payroll liability balances report This report lists the payroll
|
|
2168
|
+
* - Payroll liability balances report: This report lists the payroll
|
|
2169
2169
|
* liabilities the QuickBooks company owes to various agencies, such as
|
|
2170
2170
|
* the federal government, your state government, insurance plan
|
|
2171
2171
|
* administrators, labor unions, etc. The report covers unpaid liabilities
|
|
@@ -2164,13 +2164,13 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
2164
2164
|
/**
|
|
2165
2165
|
* This report returns information from any of three QuickBooks payroll
|
|
2166
2166
|
* reports:
|
|
2167
|
-
* - Payroll summary report This report shows the total wages, taxes
|
|
2167
|
+
* - Payroll summary report: This report shows the total wages, taxes
|
|
2168
2168
|
* withheld, deductions from net pay, additions to net pay, and
|
|
2169
2169
|
* employer-paid taxes and contributions for each employee on the payroll.
|
|
2170
|
-
* - Employee earnings summary report This report shows information similar
|
|
2170
|
+
* - Employee earnings summary report: This report shows information similar
|
|
2171
2171
|
* to the payroll summary report, but in a different layout. The report
|
|
2172
2172
|
* has a row for each employee and a column for each payroll item.
|
|
2173
|
-
* - Payroll liability balances report This report lists the payroll
|
|
2173
|
+
* - Payroll liability balances report: This report lists the payroll
|
|
2174
2174
|
* liabilities the QuickBooks company owes to various agencies, such as
|
|
2175
2175
|
* the federal government, your state government, insurance plan
|
|
2176
2176
|
* administrators, labor unions, etc. The report covers unpaid liabilities
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.checkForUpdates = void 0;
|
|
6
|
+
exports.createFramedMessage = exports.checkForUpdates = void 0;
|
|
7
7
|
const package_json_1 = __importDefault(require("../../package.json"));
|
|
8
8
|
const node_child_process_1 = __importDefault(require("node:child_process"));
|
|
9
9
|
function checkForUpdates() {
|
|
@@ -26,7 +26,27 @@ function checkForUpdates() {
|
|
|
26
26
|
const updateCommand = process.env["npm_execpath"]?.includes("yarn") === true
|
|
27
27
|
? "yarn add"
|
|
28
28
|
: "npm install";
|
|
29
|
-
console.warn(
|
|
29
|
+
console.warn(createFramedMessage([
|
|
30
|
+
"🟡 UPDATE AVAILABLE for Conductor!",
|
|
31
|
+
`Current Version: ${currentVersion}`,
|
|
32
|
+
`Latest Version: ${latestVersion}`,
|
|
33
|
+
`To update, run: ${updateCommand} ${package_json_1.default.name}@latest`,
|
|
34
|
+
]));
|
|
30
35
|
}
|
|
31
36
|
}
|
|
32
37
|
exports.checkForUpdates = checkForUpdates;
|
|
38
|
+
function createFramedMessage(messageLines) {
|
|
39
|
+
const maxLength = Math.max(...messageLines.map((line) => line.length), 0);
|
|
40
|
+
return [
|
|
41
|
+
// Top border of the box.
|
|
42
|
+
`┌${"─".repeat(maxLength + 2)}┐`,
|
|
43
|
+
// Print each line of the message, padded to fit the box.
|
|
44
|
+
...messageLines.map((line) => {
|
|
45
|
+
const padding = " ".repeat(maxLength - line.length);
|
|
46
|
+
return `│ ${line}${padding} │`;
|
|
47
|
+
}),
|
|
48
|
+
// Bottom border of the box.
|
|
49
|
+
`└${"─".repeat(maxLength + 2)}┘`,
|
|
50
|
+
].join("\n");
|
|
51
|
+
}
|
|
52
|
+
exports.createFramedMessage = createFramedMessage;
|
package/package.json
CHANGED
package/dist/src/utils/http.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getApiServerUrlForEnvironment(): string;
|
package/dist/src/utils/http.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getApiServerUrlForEnvironment = void 0;
|
|
4
|
-
function getApiServerUrlForEnvironment() {
|
|
5
|
-
// Do not check if `NODE_ENV` is "production" because that requires the
|
|
6
|
-
// developer to have set `NODE_ENV` to use `conductor` as expected.
|
|
7
|
-
if (["development", "test"].includes(process.env.NODE_ENV)) {
|
|
8
|
-
return "http://localhost:4000";
|
|
9
|
-
}
|
|
10
|
-
return "https://api.conductor.is";
|
|
11
|
-
}
|
|
12
|
-
exports.getApiServerUrlForEnvironment = getApiServerUrlForEnvironment;
|