conductor-node 7.0.2 → 7.1.0
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 +32 -2
- package/dist/package.json +1 -1
- package/dist/src/Client.d.ts +3 -1
- package/dist/src/environment.d.ts +2 -2
- package/dist/src/environment.js +14 -10
- package/dist/src/graphql/__generated__/operationTypes.d.ts +2 -0
- package/dist/src/graphql/__generated__/operationTypes.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,10 +36,40 @@ const newAccount = await conductor.qbd.account.add(qbdConnections[0].id, {
|
|
|
36
36
|
|
|
37
37
|
### `createIntegrationConnection(input: CreateIntegrationConnectionInput)`
|
|
38
38
|
|
|
39
|
-
**🚧 Coming soon!**
|
|
40
|
-
|
|
41
39
|
Create a new integration-connection.
|
|
42
40
|
|
|
41
|
+
```ts
|
|
42
|
+
const newQbdConnection = await conductor.createIntegrationConnection({
|
|
43
|
+
integrationKey: "quickbooks-desktop",
|
|
44
|
+
endUserEmail: "danny@constructionco.com",
|
|
45
|
+
endUserName: "Construction Corp.",
|
|
46
|
+
});
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The response includes the following:
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
{
|
|
53
|
+
// ❗ Show this URL to your end-user: The URL for the QWC config file
|
|
54
|
+
// that your end-user must download and open on their computer to connect
|
|
55
|
+
// their QBD instance to Conductor.
|
|
56
|
+
qwcFileDownloadUrl: 'https://production.api.conductor.is/qwc/c1598ccf-0f84-4ac0-8703-f1b7260d59bf'
|
|
57
|
+
// ❗ Show this password/access-code to your end-user: The unique password
|
|
58
|
+
// that your end-user must enter into QuickBooks Web Connector after
|
|
59
|
+
// loading the config file. This value will never be shown again.
|
|
60
|
+
qbwcPassword: 'D+HaxP3p@@',
|
|
61
|
+
integrationConnection: {
|
|
62
|
+
// ❗ The `id` to save to you database to execute issue requests to
|
|
63
|
+
// this end-user's integration in the future.
|
|
64
|
+
id: 'c1598ccf-0f84-4ac0-8703-f1b7260d59bf',
|
|
65
|
+
integrationKey: 'quickbooks-desktop',
|
|
66
|
+
endUserEmail: 'danny@constructionco.com',
|
|
67
|
+
endUserName: 'Construction Corp.',
|
|
68
|
+
lastHeartbeatAt: null
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
43
73
|
### `qbd.*`
|
|
44
74
|
|
|
45
75
|
Execute any QuickBooks Desktop (QBD) API against a specific integration-connection id. See the official [QuickBooks Desktop API Reference](https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop) for a full list of available APIs.
|
package/dist/package.json
CHANGED
package/dist/src/Client.d.ts
CHANGED
|
@@ -28,7 +28,9 @@ export default class Client {
|
|
|
28
28
|
* @param input.endUserName Your end-user's name.
|
|
29
29
|
* @returns The newly created integration connection.
|
|
30
30
|
*/
|
|
31
|
-
createIntegrationConnection(input: GraphqlCreateIntegrationConnectionInput
|
|
31
|
+
createIntegrationConnection(input: GraphqlCreateIntegrationConnectionInput & {
|
|
32
|
+
integrationKey: "quickbooks-desktop";
|
|
33
|
+
}): Promise<GraphqlCreateIntegrationConnectionMutation["createIntegrationConnection"]>;
|
|
32
34
|
isIntegrationConnectionActive(integrationConnectionId: GraphqlIsIntegrationConnectionActiveQueryVariables["integrationConnectionId"], secondsSinceLastActive?: GraphqlIsIntegrationConnectionActiveQueryVariables["secondsSinceLastActive"]): Promise<GraphqlIsIntegrationConnectionActiveQuery["integrationConnection"]["isActive"]>;
|
|
33
35
|
integrationRequest(input: GraphqlIntegrationRequestInput): Promise<GraphqlIntegrationRequestQuery["integrationRequest"]>;
|
|
34
36
|
graphqlOperationWrapper<V, R>(operationName: string, variables: V, operation: (variables: V) => Promise<R>): Promise<R>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare type Environment = "development" | "production" | "staging" | "test";
|
|
2
|
-
export declare function getServerUrlForEnvironment(environment: Environment): string;
|
|
3
2
|
export declare const currentEnvironment: {
|
|
4
|
-
name:
|
|
3
|
+
name: Environment;
|
|
5
4
|
isTest: boolean;
|
|
6
5
|
isDevelopment: boolean;
|
|
7
6
|
isStaging: boolean;
|
|
8
7
|
isProduction: boolean;
|
|
9
8
|
};
|
|
9
|
+
export declare function getServerUrlForEnvironment(environment: Environment): string;
|
package/dist/src/environment.js
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getServerUrlForEnvironment = exports.currentEnvironment = void 0;
|
|
4
|
+
const currentEnvironmentName = process.env["NODE_ENV"] ?? "development";
|
|
5
|
+
exports.currentEnvironment = {
|
|
6
|
+
name: currentEnvironmentName,
|
|
7
|
+
isTest: currentEnvironmentName === "test",
|
|
8
|
+
isDevelopment: currentEnvironmentName === "development",
|
|
9
|
+
isStaging: currentEnvironmentName === "staging",
|
|
10
|
+
isProduction: currentEnvironmentName === "production",
|
|
11
|
+
};
|
|
4
12
|
function getServerUrlForEnvironment(environment) {
|
|
5
13
|
switch (environment) {
|
|
14
|
+
case "test": {
|
|
15
|
+
// DOES NOT EXIST.
|
|
16
|
+
return "https://test.api.conductor.is";
|
|
17
|
+
}
|
|
6
18
|
case "development": {
|
|
7
19
|
return "https://conductor.ngrok.io";
|
|
8
20
|
}
|
|
@@ -13,16 +25,8 @@ function getServerUrlForEnvironment(environment) {
|
|
|
13
25
|
return "https://production.api.conductor.is";
|
|
14
26
|
}
|
|
15
27
|
default: {
|
|
16
|
-
throw new Error(`Invalid environment
|
|
28
|
+
throw new Error(`Invalid environment`);
|
|
17
29
|
}
|
|
18
30
|
}
|
|
19
31
|
}
|
|
20
32
|
exports.getServerUrlForEnvironment = getServerUrlForEnvironment;
|
|
21
|
-
const currentEnvironmentName = process.env["NODE_ENV"] ?? "development";
|
|
22
|
-
exports.currentEnvironment = {
|
|
23
|
-
name: currentEnvironmentName,
|
|
24
|
-
isTest: currentEnvironmentName === "test",
|
|
25
|
-
isDevelopment: currentEnvironmentName === "development",
|
|
26
|
-
isStaging: currentEnvironmentName === "staging",
|
|
27
|
-
isProduction: currentEnvironmentName === "production",
|
|
28
|
-
};
|
|
@@ -31,6 +31,7 @@ export declare type GraphqlCreateIntegrationConnectionInput = {
|
|
|
31
31
|
export declare type GraphqlCreateIntegrationConnectionResult = {
|
|
32
32
|
integrationConnection: GraphqlIntegrationConnection;
|
|
33
33
|
qbwcPassword: Scalars["String"];
|
|
34
|
+
qwcFileDownloadUrl: Scalars["String"];
|
|
34
35
|
};
|
|
35
36
|
export declare type GraphqlIntegration = {
|
|
36
37
|
id: Scalars["ID"];
|
|
@@ -109,6 +110,7 @@ export declare type GraphqlCreateIntegrationConnectionMutationVariables = Exact<
|
|
|
109
110
|
export declare type GraphqlCreateIntegrationConnectionMutation = {
|
|
110
111
|
createIntegrationConnection: {
|
|
111
112
|
qbwcPassword: string;
|
|
113
|
+
qwcFileDownloadUrl: string;
|
|
112
114
|
integrationConnection: {
|
|
113
115
|
id: string;
|
|
114
116
|
integrationKey: string;
|
package/package.json
CHANGED