conductor-node 8.0.1 → 8.0.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 +9 -20
- package/dist/package.json +1 -2
- package/dist/src/Client.d.ts +1 -1
- package/dist/src/Client.js +1 -1
- package/dist/src/graphql/__generated__/operationTypes.d.ts +3 -2
- package/dist/src/graphql/__generated__/operationTypes.js +0 -2
- package/dist/src/utils/checkForUpdates.js +2 -3
- package/dist/src/utils/environment.js +3 -14
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -53,29 +53,18 @@ const newQbdConnection = await conductor.createIntegrationConnection({
|
|
|
53
53
|
});
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
The response
|
|
56
|
+
The response looks like the following:
|
|
57
57
|
|
|
58
58
|
```ts
|
|
59
59
|
{
|
|
60
|
-
// ❗
|
|
61
|
-
//
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
qbwcPassword: '{unique-password}',
|
|
69
|
-
integrationConnection: {
|
|
70
|
-
// ❗ Save this `id` to your database for executing requests to
|
|
71
|
-
// this end-user's integration in the future.
|
|
72
|
-
id: '{UUID}',
|
|
73
|
-
integrationKey: 'quickbooks-desktop',
|
|
74
|
-
endUserSourceId: "1234-abcd",
|
|
75
|
-
endUserEmail: 'danny@constructionco.com',
|
|
76
|
-
endUserCompanyName: 'Construction Corp',
|
|
77
|
-
lastHeartbeatAt: null
|
|
78
|
-
}
|
|
60
|
+
// ❗ Save this `id` to your database for executing requests to this
|
|
61
|
+
// end-user's integration in the future.
|
|
62
|
+
id: '{UUID}',
|
|
63
|
+
integrationKey: 'quickbooks-desktop',
|
|
64
|
+
endUserSourceId: "1234-abcd",
|
|
65
|
+
endUserEmail: 'danny@constructionco.com',
|
|
66
|
+
endUserCompanyName: 'Construction Corp',
|
|
67
|
+
lastHeartbeatAt: null
|
|
79
68
|
}
|
|
80
69
|
```
|
|
81
70
|
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conductor-node",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.2",
|
|
4
4
|
"description": "Easily integrate with the entire QuickBooks Desktop API with fully-typed async TypeScript",
|
|
5
5
|
"author": "Danny Nemer <hi@DannyNemer.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"node": ">=16"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"chalk": "^4",
|
|
27
26
|
"graphql": "^16.6.0",
|
|
28
27
|
"graphql-request": "^5.0.0"
|
|
29
28
|
},
|
package/dist/src/Client.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export default class Client {
|
|
|
51
51
|
*/
|
|
52
52
|
createIntegrationConnection(input: GraphqlCreateIntegrationConnectionInput & {
|
|
53
53
|
integrationKey: "quickbooks-desktop";
|
|
54
|
-
}): Promise<GraphqlCreateIntegrationConnectionMutation["createIntegrationConnection"]>;
|
|
54
|
+
}): Promise<GraphqlCreateIntegrationConnectionMutation["createIntegrationConnection"]["integrationConnection"]>;
|
|
55
55
|
/** Not intended for public use. */
|
|
56
56
|
sendIntegrationRequest(input: GraphqlSendIntegrationRequestInput): Promise<GraphqlSendIntegrationRequestMutation["sendIntegrationRequest"]["response"]>;
|
|
57
57
|
}
|
package/dist/src/Client.js
CHANGED
|
@@ -78,7 +78,7 @@ class Client {
|
|
|
78
78
|
async createIntegrationConnection(input) {
|
|
79
79
|
return this.graphqlOperations
|
|
80
80
|
.createIntegrationConnection({ input })
|
|
81
|
-
.then((result) => result.createIntegrationConnection);
|
|
81
|
+
.then((result) => result.createIntegrationConnection.integrationConnection);
|
|
82
82
|
}
|
|
83
83
|
// TODO: Find a way to make this private.
|
|
84
84
|
/** Not intended for public use. */
|
|
@@ -33,6 +33,9 @@ export type GraphqlSendIntegrationRequestInput = {
|
|
|
33
33
|
integrationConnectionId: Scalars["ID"];
|
|
34
34
|
requestObject: Scalars["JSONObject"];
|
|
35
35
|
};
|
|
36
|
+
export type GraphqlSetUpIntegrationConnectionInput = {
|
|
37
|
+
integrationConnectionId: Scalars["ID"];
|
|
38
|
+
};
|
|
36
39
|
export type GraphqlIntegrationConnectionFragment = {
|
|
37
40
|
id: string;
|
|
38
41
|
integrationKey: string;
|
|
@@ -92,8 +95,6 @@ export type GraphqlCreateIntegrationConnectionMutationVariables = Exact<{
|
|
|
92
95
|
}>;
|
|
93
96
|
export type GraphqlCreateIntegrationConnectionMutation = {
|
|
94
97
|
createIntegrationConnection: {
|
|
95
|
-
qbwcPassword: string;
|
|
96
|
-
qwcFileDownloadUrl: string;
|
|
97
98
|
integrationConnection: {
|
|
98
99
|
id: string;
|
|
99
100
|
integrationKey: string;
|
|
@@ -5,18 +5,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const package_json_1 = __importDefault(require("../../package.json"));
|
|
7
7
|
const environment_1 = require("../utils/environment");
|
|
8
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
9
8
|
const node_child_process_1 = require("node:child_process");
|
|
10
9
|
function checkForUpdates() {
|
|
11
10
|
if (environment_1.currentEnvironment.isTest) {
|
|
12
11
|
return;
|
|
13
12
|
}
|
|
14
13
|
const currentVersion = package_json_1.default.version;
|
|
15
|
-
const latestVersion = (0, node_child_process_1.execSync)(`
|
|
14
|
+
const latestVersion = (0, node_child_process_1.execSync)(`npm view ${package_json_1.default.name} version --silent`)
|
|
16
15
|
.toString()
|
|
17
16
|
.trim();
|
|
18
17
|
if (currentVersion !== latestVersion) {
|
|
19
|
-
console.warn(
|
|
18
|
+
console.warn(`⚠️ A new version of Conductor is available! You are using "${package_json_1.default.name}" version ${currentVersion} but the latest version is ${latestVersion}. Please run "yarn upgrade ${package_json_1.default.name} --latest" to update.`);
|
|
20
19
|
}
|
|
21
20
|
}
|
|
22
21
|
exports.default = checkForUpdates;
|
|
@@ -11,20 +11,9 @@ exports.currentEnvironment = {
|
|
|
11
11
|
isLocal: ["test", "development"].includes(currentEnvironmentName),
|
|
12
12
|
};
|
|
13
13
|
function getServerUrlForEnvironment(environment) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// DOES NOT EXIST.
|
|
17
|
-
return "https://test.api.conductor.is";
|
|
18
|
-
}
|
|
19
|
-
case "development": {
|
|
20
|
-
return "https://conductor.ngrok.io";
|
|
21
|
-
}
|
|
22
|
-
case "production": {
|
|
23
|
-
return "https://api.conductor.is";
|
|
24
|
-
}
|
|
25
|
-
default: {
|
|
26
|
-
throw new Error("Invalid environment");
|
|
27
|
-
}
|
|
14
|
+
if (environment === "production") {
|
|
15
|
+
return "https://api.conductor.is";
|
|
28
16
|
}
|
|
17
|
+
return "http://localhost:4000";
|
|
29
18
|
}
|
|
30
19
|
exports.getServerUrlForEnvironment = getServerUrlForEnvironment;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conductor-node",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.2",
|
|
4
4
|
"description": "Easily integrate with the entire QuickBooks Desktop API with fully-typed async TypeScript",
|
|
5
5
|
"author": "Danny Nemer <hi@DannyNemer.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"node": ">=16"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"chalk": "^4",
|
|
27
26
|
"graphql": "^16.6.0",
|
|
28
27
|
"graphql-request": "^5.0.0"
|
|
29
28
|
},
|