conductor-node 11.5.1 → 11.5.4

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
@@ -1,14 +1,12 @@
1
1
  <!-- markdownlint-disable MD033 MD041 -->
2
2
  <div align="center">
3
- <h1><a href="https://conductor.is">Conductor</a></h1>
3
+ <a href="https://conductor.is">
4
+ <picture>
5
+ <source media="(prefers-color-scheme: dark)" srcset="https://github.com/conductor-is/quickbooks-desktop-api/assets/170023/162ee6a9-75ac-41e9-9f1e-2ecc1d88f841">
6
+ <img alt="Conductor logo" src="https://github.com/conductor-is/quickbooks-desktop-api/assets/170023/d67464b8-53a7-4d33-afeb-05a2efde1fa8" width="325">
7
+ </picture>
8
+ </a>
4
9
  <h3>QuickBooks Desktop API for Node.js, TypeScript, and REST</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
10
  <a href="https://docs.conductor.is/overview/quickstart">Quickstart</a>
13
11
  <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
14
12
  <a href="https://conductor.is">Website</a>
@@ -16,36 +14,46 @@
16
14
  <a href="https://docs.conductor.is">Docs</a>
17
15
  <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
18
16
  <a href="https://docs.conductor.is/qbd-examples">Examples</a>
17
+ <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
18
+ <a href="https://twitter.com/conductor_is">Twitter</a>
19
+ <br />
19
20
  <br />
21
+ <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>
22
+ <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>
23
+ <img src="https://img.shields.io/badge/coverage-100%25-brightgreen" alt="Code coverage">
24
+ <a href="LICENSE"><img src="https://img.shields.io/npm/l/conductor-node.svg?color=blue&logo=github" alt="License" /></a>
20
25
  <hr />
21
26
  </div>
22
27
 
23
28
  ## What is Conductor?
24
29
 
25
- Conductor is a TypeScript-first Node.js API for **QuickBooks Desktop** (sometimes called 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.
26
-
27
- We also offer a [REST API](https://docs.conductor.is/qbd/rest).
30
+ Conductor is a real-time, fully-typed API for **QuickBooks Desktop** (sometimes called QuickBooks Enterprise), available via TypeScript, Node.js, and REST. 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.
28
31
 
29
32
  Conductor, the company, is building a data integration platform for vertical SaaS companies, starting with QuickBooks Desktop. Our team has spent over a decade building companies, scaling vast software systems, and obsessing over quality.
30
33
 
31
34
  <!-- markdownlint-disable MD033 -->
32
35
  <div align="center">
33
- <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>
36
+ <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" style="border-radius: 20px;" /></a>
34
37
  </div>
35
38
 
36
- ## Documentation
39
+ ## What is this repo?
37
40
 
38
- 1. [Get Started](https://docs.conductor.is/overview/get-started)
39
- 2. [Quickstart](https://docs.conductor.is/overview/quickstart)
40
- 3. [QuickBooks Desktop APIs](https://docs.conductor.is/qbd/api)
41
- 4. [API Reference](https://docs.conductor.is/apis)
42
- 5. [Error Handling](https://docs.conductor.is/usage/error-handling)
41
+ This repository is a library for conveniently accessing Conductor's QuickBooks Desktop API from TypeScript or JavaScript. The library is a wrapper around the Conductor REST API, providing a fully-typed, easy-to-use interface for fetching, creating, and updating QuickBooks Desktop objects.
43
42
 
44
43
  ## Requirements
45
44
 
46
- 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
+ 1. A Conductor API key pair: one secret key, one publishable key. **Please [sign up to join the beta](https://73a5v9t55ed.typeform.com/to/VRX7rfrN).**
47
46
  2. Node.js v16 or later.
48
47
 
48
+ ## Documentation
49
+
50
+ 1. [Get Started](https://docs.conductor.is/overview/get-started)
51
+ 2. [Quickstart](https://docs.conductor.is/overview/quickstart)
52
+ 3. [Node.js / TypeScript API](https://docs.conductor.is/qbd/api)
53
+ 4. [REST API](https://docs.conductor.is/qbd/rest)
54
+ 5. [API Reference](https://docs.conductor.is/apis)
55
+ 6. [Error Handling](https://docs.conductor.is/usage/error-handling)
56
+
49
57
  ## Installation
50
58
 
51
59
  ```sh
@@ -80,13 +88,13 @@ async function main() {
80
88
  console.log("Complete the QuickBooks Desktop auth:", authSession.authFlowUrl);
81
89
 
82
90
  // 3. Get a list of all Customers from QuickBooks Desktop for this EndUser.
83
- const qbdCustomers = await conductor.qbd.customers.query(endUser.id);
91
+ const qbdCustomers = await conductor.qbd.customer.query(endUser.id);
84
92
  console.log("QuickBooks Desktop customers:", qbdCustomers);
85
93
  }
86
94
 
87
95
  main();
88
96
  ```
89
97
 
90
- ## More Documentation
98
+ ## More documentation
91
99
 
92
100
  Please see our [full documentation site](https://docs.conductor.is) for more docs, guides, and code examples.
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "11.5.1",
3
+ "version": "11.5.4",
4
4
  "description": "QuickBooks Desktop API for Node.js and TypeScript",
5
5
  "keywords": [
6
6
  "QuickBooks",
@@ -3,9 +3,16 @@ export interface RequestConfigWithStartTime extends AxiosRequestConfig {
3
3
  startTime: number;
4
4
  }
5
5
  export declare function addLoggingInterceptors(httpClient: AxiosInstance, verbose: boolean): void;
6
- export declare function createRequestLogObject(config: AxiosRequestConfig): {
7
- endpoint: string;
6
+ interface RequestLogObject {
7
+ method?: string;
8
+ url?: string;
9
+ headers?: {
10
+ "Content-Type"?: string;
11
+ Authorization?: string;
12
+ };
8
13
  body?: Record<string, unknown>;
9
- };
14
+ }
15
+ export declare function createRequestLogObject(config: AxiosRequestConfig): RequestLogObject;
10
16
  export declare function getDurationStringFromConfig(config: RequestConfigWithStartTime): string;
11
17
  export declare function stringifyForLogs(object: unknown): string;
18
+ export {};
@@ -33,22 +33,25 @@ function addLoggingInterceptors(httpClient, verbose) {
33
33
  }
34
34
  exports.addLoggingInterceptors = addLoggingInterceptors;
35
35
  function createRequestLogObject(config) {
36
- let endpoint = config.method?.toUpperCase();
37
- if (config.url !== undefined) {
38
- if (endpoint === undefined) {
39
- endpoint = config.url;
40
- }
41
- else {
42
- endpoint += ` ${config.url}`;
43
- }
44
- }
45
36
  const requestInfo = {};
46
- if (endpoint !== undefined) {
47
- requestInfo.endpoint = endpoint;
37
+ if (config.method !== undefined) {
38
+ requestInfo.method = config.method.toUpperCase();
39
+ }
40
+ if (config.baseURL !== undefined || config.url !== undefined) {
41
+ requestInfo.url = (config.baseURL ?? "") + (config.url ?? "");
48
42
  }
49
43
  if (config.data !== undefined) {
50
44
  requestInfo.body = config.data;
51
45
  }
46
+ if (config.headers !== undefined) {
47
+ requestInfo.headers = {};
48
+ if (config.headers["Content-Type"] !== undefined) {
49
+ requestInfo.headers["Content-Type"] = config.headers["Content-Type"];
50
+ }
51
+ if (config.headers.Authorization !== undefined) {
52
+ requestInfo.headers.Authorization = "BEARER sk_live_************";
53
+ }
54
+ }
52
55
  return requestInfo;
53
56
  }
54
57
  exports.createRequestLogObject = createRequestLogObject;
@@ -16,9 +16,12 @@ function checkForUpdates() {
16
16
  if ((0, env_1.isEnvironmentVariableTruthy)("CONDUCTOR_HIDE_UPDATE_MESSAGE")) {
17
17
  return;
18
18
  }
19
- // Exit early if npm is not installed.
19
+ // Exit early if `npm` is not installed.
20
20
  try {
21
- node_child_process_1.default.execSync("which npm");
21
+ node_child_process_1.default.execSync("npm --version", {
22
+ // Prevent the shell from internally logging the error message.
23
+ stdio: "ignore",
24
+ });
22
25
  }
23
26
  catch {
24
27
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "11.5.1",
3
+ "version": "11.5.4",
4
4
  "description": "QuickBooks Desktop API for Node.js and TypeScript",
5
5
  "keywords": [
6
6
  "QuickBooks",