conductor-node 1.0.2 → 2.0.1

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
@@ -23,7 +23,7 @@ To send a request to a specific QuickBooks Desktop user, you must also supply th
23
23
 
24
24
  ```ts
25
25
  import Conductor from "conductor-node";
26
- const conductor = new Conductor({ apiKey: "sk_test_..." });
26
+ const conductor = new Conductor("sk_test_...");
27
27
 
28
28
  const mock_qbwc_user_id = "1";
29
29
  conductor.qbd.account
@@ -1,6 +1,5 @@
1
1
  import type { Environment } from "./environment";
2
2
  export interface BaseClientOptions {
3
- apiKey: string;
4
3
  verbose?: boolean;
5
4
  environment?: Environment;
6
5
  }
@@ -8,6 +7,6 @@ export default class BaseClient {
8
7
  protected readonly apiKey: string;
9
8
  protected readonly verbose: boolean;
10
9
  protected readonly serverURL: string;
11
- constructor({ apiKey, verbose, environment, }: BaseClientOptions);
10
+ constructor(apiKey: string, { verbose, environment }: BaseClientOptions);
12
11
  protected sendAPIRequest<T>(apiPath: string, qbwcUserId: string, requestObj: T): Promise<T>;
13
12
  }
@@ -11,7 +11,7 @@ class BaseClient {
11
11
  apiKey;
12
12
  verbose;
13
13
  serverURL;
14
- constructor({ apiKey, verbose = false, environment = "staging", }) {
14
+ constructor(apiKey, { verbose = false, environment = "staging" }) {
15
15
  this.apiKey = apiKey;
16
16
  this.verbose = verbose;
17
17
  this.serverURL = (0, environment_1.envToBaseServerURL)(environment);
@@ -3,5 +3,5 @@ import ClientQBD from "./qbd/ClientQBD";
3
3
  export default class Client {
4
4
  /** QuickBooks Desktop integration. */
5
5
  readonly qbd: ClientQBD;
6
- constructor(options: BaseClientOptions);
6
+ constructor(apiKey: string, options?: BaseClientOptions);
7
7
  }
@@ -7,8 +7,8 @@ const ClientQBD_1 = __importDefault(require("./qbd/ClientQBD"));
7
7
  class Client {
8
8
  /** QuickBooks Desktop integration. */
9
9
  qbd;
10
- constructor(options) {
11
- this.qbd = new ClientQBD_1.default(options);
10
+ constructor(apiKey, options = {}) {
11
+ this.qbd = new ClientQBD_1.default(apiKey, options);
12
12
  }
13
13
  }
14
14
  exports.default = Client;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "1.0.2",
3
+ "version": "2.0.1",
4
4
  "description": "Conductor API wrapper",
5
5
  "author": "Danny Nemer <hi@DannyNemer.com>",
6
6
  "license": "MIT",