conductor-node 11.2.4 → 11.2.5
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
CHANGED
|
@@ -5,6 +5,52 @@ Execute _any_ read or write QuickBooks Desktop API through async TypeScript and
|
|
|
5
5
|
<!-- markdownlint-disable MD033 -->
|
|
6
6
|
<img src="https://user-images.githubusercontent.com/170023/213273732-83dd6881-0b36-4787-820b-bd55cdc8444f.jpg" alt="QuickBooks Desktop autocomplete" width="700"/>
|
|
7
7
|
|
|
8
|
+
## Requirements
|
|
9
|
+
|
|
10
|
+
1. A Conductor API key pair: one secret key, one publishable key. Please [email us](mailto:hello@conductor.is?subject=Conductor%20Beta) to join the private beta.
|
|
11
|
+
2. Node.js v16 or later.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npm install conductor-node
|
|
17
|
+
# or
|
|
18
|
+
yarn add conductor-node
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
The full API reference is available [here](https://docs.conductor.is). The code below is a quickstart example.
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import Conductor from "conductor-node";
|
|
27
|
+
|
|
28
|
+
const conductor = new Conductor("{{YOUR_SECRET_KEY}}");
|
|
29
|
+
|
|
30
|
+
async function main() {
|
|
31
|
+
// 1. Create a new EndUser.
|
|
32
|
+
const endUser = await conductor.endUsers.create({
|
|
33
|
+
sourceId: "{{UNIQUE_ID_FROM_YOUR_DB}}",
|
|
34
|
+
email: "{{END_USER_EMAIL}}",
|
|
35
|
+
name: "{{END_USER_NAME}}",
|
|
36
|
+
});
|
|
37
|
+
console.log("Save this EndUser ID to auth future requests:", endUser.id);
|
|
38
|
+
|
|
39
|
+
// 2. Create an AuthSession to establish the QuickBooks Desktop connection.
|
|
40
|
+
const authSession = await conductor.authSessions.create({
|
|
41
|
+
publishableKey: "{{YOUR_PUBLISHABLE_KEY}}",
|
|
42
|
+
endUserId: endUser.id,
|
|
43
|
+
});
|
|
44
|
+
console.log("Complete the QuickBooks Desktop auth:", authSession.authFlowUrl);
|
|
45
|
+
|
|
46
|
+
// 3. Get a list of all Customers from QuickBooks Desktop for this EndUser.
|
|
47
|
+
const qbdCustomers = await conductor.qbd.customers.query(endUser.id);
|
|
48
|
+
console.log("QuickBooks Desktop customers:", qbdCustomers);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
main();
|
|
52
|
+
```
|
|
53
|
+
|
|
8
54
|
## [Documentation 🚀](https://docs.conductor.is)
|
|
9
55
|
|
|
10
56
|
1. [Get Started](https://docs.conductor.is/overview/get-started)
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conductor-node",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.5",
|
|
4
4
|
"description": "Easily integrate the entire QuickBooks Desktop API using fully-typed async TypeScript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"QuickBooks Desktop",
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
"QBD"
|
|
15
15
|
],
|
|
16
16
|
"homepage": "https://conductor.is",
|
|
17
|
+
"repository": "github:conductor-is/conductor-node",
|
|
18
|
+
"author": "Conductor <support@conductor.is>",
|
|
17
19
|
"license": "MIT",
|
|
18
20
|
"type": "commonjs",
|
|
19
21
|
"main": "dist/src/index.js",
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/index.js
CHANGED
|
@@ -34,7 +34,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
34
34
|
const Client_1 = __importDefault(require("./Client"));
|
|
35
35
|
const ErrorModule = __importStar(require("./utils/error"));
|
|
36
36
|
/**
|
|
37
|
-
* CommonJS
|
|
37
|
+
* CommonJS support:
|
|
38
38
|
* const Conductor = require("conductor-node");
|
|
39
39
|
* const { ConductorIntegrationError } = require("conductor-node");
|
|
40
40
|
*/
|
|
@@ -44,7 +44,7 @@ if (module.exports !== undefined) {
|
|
|
44
44
|
Object.assign(module.exports, ErrorModule);
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* ESM
|
|
47
|
+
* ESM support:
|
|
48
48
|
* import Conductor from "conductor-node";
|
|
49
49
|
* import { ConductorIntegrationError } from "conductor-node";
|
|
50
50
|
* import type { QbdTypes } from "conductor-node";
|
|
@@ -19,7 +19,9 @@ export interface AuthSession {
|
|
|
19
19
|
*/
|
|
20
20
|
readonly authFlowUrl: string;
|
|
21
21
|
/**
|
|
22
|
-
* The time at which the AuthSession expires.
|
|
22
|
+
* The time at which the AuthSession expires. By default, this value is 30
|
|
23
|
+
* minutes from creation. You can extend this time by setting `linkExpiryMins`
|
|
24
|
+
* when creating the AuthSession.
|
|
23
25
|
*/
|
|
24
26
|
readonly expiresAt: string;
|
|
25
27
|
/**
|
|
@@ -40,8 +42,9 @@ export interface AuthSessionCreateInput {
|
|
|
40
42
|
*/
|
|
41
43
|
readonly endUserId: string;
|
|
42
44
|
/**
|
|
43
|
-
* The number of minutes after which the AuthSession will expire.
|
|
44
|
-
* provided, defaults to 30
|
|
45
|
+
* The number of minutes after which the AuthSession will expire. Must be at
|
|
46
|
+
* least 15 minutes and no more than 7 days. If not provided, defaults to 30
|
|
47
|
+
* minutes.
|
|
45
48
|
*/
|
|
46
49
|
readonly linkExpiryMins?: number;
|
|
47
50
|
/**
|
|
@@ -6,7 +6,7 @@ export interface EndUser {
|
|
|
6
6
|
*/
|
|
7
7
|
readonly id: string;
|
|
8
8
|
/**
|
|
9
|
-
* Your end-user's unique ID in
|
|
9
|
+
* Your end-user's unique ID in _your_ database. Must be distinct from your
|
|
10
10
|
* other end-users.
|
|
11
11
|
*/
|
|
12
12
|
readonly sourceId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conductor-node",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.5",
|
|
4
4
|
"description": "Easily integrate the entire QuickBooks Desktop API using fully-typed async TypeScript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"QuickBooks Desktop",
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
"QBD"
|
|
15
15
|
],
|
|
16
16
|
"homepage": "https://conductor.is",
|
|
17
|
+
"repository": "github:conductor-is/conductor-node",
|
|
18
|
+
"author": "Conductor <support@conductor.is>",
|
|
17
19
|
"license": "MIT",
|
|
18
20
|
"type": "commonjs",
|
|
19
21
|
"main": "dist/src/index.js",
|