conductor-node 11.2.4 → 11.2.6
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/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Conductor Labs Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,14 +1,88 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- markdownlint-disable MD033 MD041 -->
|
|
2
|
+
<div align="center">
|
|
3
|
+
<h1><a href="https://conductor.is">Conductor</a></h1>
|
|
4
|
+
<h3>QuickBooks Desktop API for Node.js and TypeScript</h3>
|
|
5
|
+
<a href="https://npmjs.com/package/conductor-node"><img src="https://img.shields.io/npm/dm/conductor-node.svg?logo=npm" alt="NPM download count"></a>
|
|
6
|
+
<a href="https://npmjs.org/package/conductor-node"><img src="https://img.shields.io/npm/v/conductor-node.svg?logo=npm" alt="Package version"></a>
|
|
7
|
+
<img src="https://img.shields.io/badge/coverage-100%25-brightgreen" alt="Code coverage">
|
|
8
|
+
<img src="https://img.shields.io/badge/CI-passing-brightgreen?logo=github" alt="CI status">
|
|
9
|
+
<a href="LICENSE"><img src="https://img.shields.io/npm/l/conductor-node.svg?color=blue&logo=github" alt="License" /></a>
|
|
10
|
+
<br />
|
|
11
|
+
<br />
|
|
12
|
+
<a href="https://docs.conductor.is/overview/quickstart">Quickstart</a>
|
|
13
|
+
<span> • </span>
|
|
14
|
+
<a href="https://conductor.is">Website</a>
|
|
15
|
+
<span> • </span>
|
|
16
|
+
<a href="https://docs.conductor.is">Docs</a>
|
|
17
|
+
<span> • </span>
|
|
18
|
+
<a href="https://docs.conductor.is/qbd/examples">Examples</a>
|
|
19
|
+
<br />
|
|
20
|
+
<hr />
|
|
21
|
+
</div>
|
|
2
22
|
|
|
3
|
-
|
|
23
|
+
## What is Conductor?
|
|
24
|
+
|
|
25
|
+
Conductor is a TypeScript-first Node.js API for **QuickBooks Desktop** (also known as QuickBooks Enterprise). In just a few lines, get real-time access to fetch, create, or update [_any_ QuickBooks Desktop object type](https://docs.conductor.is/qbd/api#supported-object-types) and receive a fully-typed response. Check out [the documentation](https://docs.conductor.is) to get started.
|
|
4
26
|
|
|
5
27
|
<!-- markdownlint-disable MD033 -->
|
|
6
|
-
<
|
|
28
|
+
<div align="center">
|
|
29
|
+
<a href="https://docs.conductor.is"><img src="https://user-images.githubusercontent.com/170023/213273732-83dd6881-0b36-4787-820b-bd55cdc8444f.jpg" alt="QuickBooks Desktop autocomplete" width="600" /></a>
|
|
30
|
+
</div>
|
|
7
31
|
|
|
8
|
-
##
|
|
32
|
+
## Documentation
|
|
9
33
|
|
|
10
34
|
1. [Get Started](https://docs.conductor.is/overview/get-started)
|
|
11
35
|
2. [Quickstart](https://docs.conductor.is/overview/quickstart)
|
|
12
36
|
3. [QuickBooks Desktop APIs](https://docs.conductor.is/qbd/api)
|
|
13
37
|
4. [API Reference](https://docs.conductor.is/apis)
|
|
14
38
|
5. [Error Handling](https://docs.conductor.is/usage/error-handling)
|
|
39
|
+
|
|
40
|
+
## Requirements
|
|
41
|
+
|
|
42
|
+
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.
|
|
43
|
+
2. Node.js v16 or later.
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
npm install conductor-node
|
|
49
|
+
# or
|
|
50
|
+
yarn add conductor-node
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Usage
|
|
54
|
+
|
|
55
|
+
The full API documentation is available [here](https://docs.conductor.is) along with many code examples. The code below is a quickstart example.
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import Conductor from "conductor-node";
|
|
59
|
+
|
|
60
|
+
const conductor = new Conductor("{{YOUR_SECRET_KEY}}");
|
|
61
|
+
|
|
62
|
+
async function main() {
|
|
63
|
+
// 1. Create a new EndUser.
|
|
64
|
+
const endUser = await conductor.endUsers.create({
|
|
65
|
+
sourceId: "{{UNIQUE_ID_FROM_YOUR_DB}}",
|
|
66
|
+
email: "{{END_USER_EMAIL}}",
|
|
67
|
+
name: "{{END_USER_NAME}}",
|
|
68
|
+
});
|
|
69
|
+
console.log("Save this EndUser ID to auth future requests:", endUser.id);
|
|
70
|
+
|
|
71
|
+
// 2. Create an AuthSession to establish the QuickBooks Desktop connection.
|
|
72
|
+
const authSession = await conductor.authSessions.create({
|
|
73
|
+
publishableKey: "{{YOUR_PUBLISHABLE_KEY}}",
|
|
74
|
+
endUserId: endUser.id,
|
|
75
|
+
});
|
|
76
|
+
console.log("Complete the QuickBooks Desktop auth:", authSession.authFlowUrl);
|
|
77
|
+
|
|
78
|
+
// 3. Get a list of all Customers from QuickBooks Desktop for this EndUser.
|
|
79
|
+
const qbdCustomers = await conductor.qbd.customers.query(endUser.id);
|
|
80
|
+
console.log("QuickBooks Desktop customers:", qbdCustomers);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
main();
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## More Documentation
|
|
87
|
+
|
|
88
|
+
Please see our full documentation with guides and code examples [available here](https://docs.conductor.is).
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "conductor-node",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.6",
|
|
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.6",
|
|
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",
|