conductor-node
Advanced tools
Comparing version 11.5.2 to 11.5.4
{ | ||
"name": "conductor-node", | ||
"version": "11.5.2", | ||
"version": "11.5.4", | ||
"description": "QuickBooks Desktop API for Node.js and TypeScript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -6,7 +6,14 @@ import type { AxiosInstance, AxiosRequestConfig } from "axios"; | ||
export declare function addLoggingInterceptors(httpClient: AxiosInstance, verbose: boolean): void; | ||
export declare function createRequestLogObject(config: AxiosRequestConfig): { | ||
endpoint: string; | ||
interface RequestLogObject { | ||
method?: string; | ||
url?: string; | ||
headers?: { | ||
"Content-Type"?: string; | ||
Authorization?: string; | ||
}; | ||
body?: Record<string, unknown>; | ||
}; | ||
} | ||
export declare function createRequestLogObject(config: AxiosRequestConfig): RequestLogObject; | ||
export declare function getDurationStringFromConfig(config: RequestConfigWithStartTime): string; | ||
export declare function stringifyForLogs(object: unknown): string; | ||
export {}; |
@@ -36,18 +36,21 @@ "use strict"; | ||
function createRequestLogObject(config) { | ||
let endpoint = config.method?.toUpperCase(); | ||
if (config.url !== undefined) { | ||
if (endpoint === undefined) { | ||
endpoint = config.url; | ||
} | ||
else { | ||
endpoint += ` ${config.url}`; | ||
} | ||
} | ||
const requestInfo = {}; | ||
if (endpoint !== undefined) { | ||
requestInfo.endpoint = endpoint; | ||
if (config.method !== undefined) { | ||
requestInfo.method = config.method.toUpperCase(); | ||
} | ||
if (config.baseURL !== undefined || config.url !== undefined) { | ||
requestInfo.url = (config.baseURL ?? "") + (config.url ?? ""); | ||
} | ||
if (config.data !== undefined) { | ||
requestInfo.body = config.data; | ||
} | ||
if (config.headers !== undefined) { | ||
requestInfo.headers = {}; | ||
if (config.headers["Content-Type"] !== undefined) { | ||
requestInfo.headers["Content-Type"] = config.headers["Content-Type"]; | ||
} | ||
if (config.headers.Authorization !== undefined) { | ||
requestInfo.headers.Authorization = "BEARER sk_live_************"; | ||
} | ||
} | ||
return requestInfo; | ||
@@ -54,0 +57,0 @@ } |
{ | ||
"name": "conductor-node", | ||
"version": "11.5.2", | ||
"version": "11.5.4", | ||
"description": "QuickBooks Desktop API for Node.js and TypeScript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
<!-- markdownlint-disable MD033 MD041 --> | ||
<div align="center"> | ||
<h1><a href="https://conductor.is">Conductor</a></h1> | ||
<a href="https://conductor.is"> | ||
<picture> | ||
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/conductor-is/quickbooks-desktop-api/assets/170023/162ee6a9-75ac-41e9-9f1e-2ecc1d88f841"> | ||
<img alt="Conductor logo" src="https://github.com/conductor-is/quickbooks-desktop-api/assets/170023/d67464b8-53a7-4d33-afeb-05a2efde1fa8" width="325"> | ||
</picture> | ||
</a> | ||
<h3>QuickBooks Desktop API for Node.js, TypeScript, and REST</h3> | ||
<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> | ||
<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> | ||
<img src="https://img.shields.io/badge/coverage-100%25-brightgreen" alt="Code coverage"> | ||
<img src="https://img.shields.io/badge/CI-passing-brightgreen?logo=github" alt="CI status"> | ||
<a href="LICENSE"><img src="https://img.shields.io/npm/l/conductor-node.svg?color=blue&logo=github" alt="License" /></a> | ||
<br /> | ||
<br /> | ||
<a href="https://docs.conductor.is/overview/quickstart">Quickstart</a> | ||
@@ -19,3 +17,10 @@ <span> • </span> | ||
<a href="https://docs.conductor.is/qbd-examples">Examples</a> | ||
<span> • </span> | ||
<a href="https://twitter.com/conductor_is">Twitter</a> | ||
<br /> | ||
<br /> | ||
<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> | ||
<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> | ||
<img src="https://img.shields.io/badge/coverage-100%25-brightgreen" alt="Code coverage"> | ||
<a href="LICENSE"><img src="https://img.shields.io/npm/l/conductor-node.svg?color=blue&logo=github" alt="License" /></a> | ||
<hr /> | ||
@@ -26,6 +31,4 @@ </div> | ||
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. | ||
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. | ||
We also offer a [REST API](https://docs.conductor.is/qbd/rest). | ||
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. | ||
@@ -35,18 +38,23 @@ | ||
<div align="center"> | ||
<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> | ||
<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> | ||
</div> | ||
## Documentation | ||
## What is this repo? | ||
1. [Get Started](https://docs.conductor.is/overview/get-started) | ||
2. [Quickstart](https://docs.conductor.is/overview/quickstart) | ||
3. [QuickBooks Desktop APIs](https://docs.conductor.is/qbd/api) | ||
4. [API Reference](https://docs.conductor.is/apis) | ||
5. [Error Handling](https://docs.conductor.is/usage/error-handling) | ||
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. | ||
## Requirements | ||
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. | ||
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).** | ||
2. Node.js v16 or later. | ||
## Documentation | ||
1. [Get Started](https://docs.conductor.is/overview/get-started) | ||
2. [Quickstart](https://docs.conductor.is/overview/quickstart) | ||
3. [Node.js / TypeScript API](https://docs.conductor.is/qbd/api) | ||
4. [REST API](https://docs.conductor.is/qbd/rest) | ||
5. [API Reference](https://docs.conductor.is/apis) | ||
6. [Error Handling](https://docs.conductor.is/usage/error-handling) | ||
## Installation | ||
@@ -86,3 +94,3 @@ | ||
// 3. Get a list of all Customers from QuickBooks Desktop for this EndUser. | ||
const qbdCustomers = await conductor.qbd.customers.query(endUser.id); | ||
const qbdCustomers = await conductor.qbd.customer.query(endUser.id); | ||
console.log("QuickBooks Desktop customers:", qbdCustomers); | ||
@@ -94,4 +102,4 @@ } | ||
## More Documentation | ||
## More documentation | ||
Please see our [full documentation site](https://docs.conductor.is) for more docs, guides, and code examples. |
2376725
22655
101