conductor-node 3.5.1 → 3.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.
@@ -1,4 +1,4 @@
1
- import type Client from "./Client";
1
+ import type Client from "@conductor/client/Client";
2
2
  export default class BaseClient {
3
3
  protected readonly root: Client;
4
4
  constructor(client: Client);
File without changes
@@ -1,7 +1,5 @@
1
- import type { Environment } from "./environment";
2
- import type * as Types from "./integrationTypes";
3
- import ClientQbd from "./qbd/ClientQbd";
4
- export { Types };
1
+ import type { Environment } from "@conductor/client/environment";
2
+ import ClientQbd from "@conductor/client/qbd/ClientQbd";
5
3
  export interface ClientOptions {
6
4
  /** Log the each request and response. */
7
5
  verbose?: boolean;
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const environment_1 = require("./environment");
7
- const ClientQbd_1 = __importDefault(require("./qbd/ClientQbd"));
6
+ const environment_1 = require("@conductor/client/environment");
7
+ const ClientQbd_1 = __importDefault(require("@conductor/client/qbd/ClientQbd"));
8
8
  const graphql_request_1 = require("graphql-request");
9
9
  class Client {
10
10
  /** QuickBooks Desktop integration. */
File without changes
File without changes
@@ -0,0 +1,5 @@
1
+ import type { ClientOptions } from "@conductor/client/Client";
2
+ import Client from "@conductor/client/Client";
3
+ import type * as Types from "@conductor/client/integrationTypes";
4
+ export default Client;
5
+ export type { ClientOptions, Types };
package/dist/index.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const Client_1 = __importDefault(require("@conductor/client/Client"));
7
+ exports.default = Client_1.default;
@@ -0,0 +1,2 @@
1
+ import type * as qbd from "@conductor/client/qbd/qbdTypes";
2
+ export { qbd };
@@ -1,5 +1,5 @@
1
- import BaseClient from "../BaseClient";
2
- import type * as QbdTypes from "../qbd/qbdTypes";
1
+ import BaseClient from "@conductor/client/BaseClient";
2
+ import type * as QbdTypes from "@conductor/client/qbd/qbdTypes";
3
3
  export default class ClientQbd extends BaseClient {
4
4
  account: {
5
5
  /**
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const BaseClient_1 = __importDefault(require("../BaseClient"));
6
+ const BaseClient_1 = __importDefault(require("@conductor/client/BaseClient"));
7
7
  class ClientQbd extends BaseClient_1.default {
8
8
  account = {
9
9
  /**
File without changes
File without changes
package/package.json CHANGED
@@ -1,18 +1,19 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "3.5.1",
3
+ "version": "3.5.4",
4
4
  "description": "Conductor API wrapper",
5
5
  "author": "Danny Nemer <hi@DannyNemer.com>",
6
6
  "license": "MIT",
7
7
  "type": "commonjs",
8
- "main": "dist/src/Client.js",
9
- "types": "dist/src/Client.d.ts",
8
+ "main": "dist/index.js",
9
+ "types": "dist/index.d.ts",
10
10
  "files": [
11
- "dist/src/**/*.[jt]s"
11
+ "dist/**/*.[jt]s"
12
12
  ],
13
13
  "scripts": {
14
14
  "prepack": "yarn tsc && yarn tsc-alias",
15
- "postpack": "rm -rf dist"
15
+ "postpack": "rm -rf dist",
16
+ "clean": "rm -rf dist package conductor-node-*.tgz tsconfig.tsbuildinfo"
16
17
  },
17
18
  "engines": {
18
19
  "node": ">=16"
@@ -1 +0,0 @@
1
- export {};
@@ -1,16 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const Client_1 = __importDefault(require("../Client"));
7
- describe("Client", () => {
8
- test("Create a new Client", () => {
9
- const client = new Client_1.default("mock_api_key");
10
- expect(client).toBeInstanceOf(Client_1.default);
11
- });
12
- test("Create a new Client with options", () => {
13
- const client = new Client_1.default("mock_api_key", { environment: "staging" });
14
- expect(client).toBeInstanceOf(Client_1.default);
15
- });
16
- });
@@ -1,2 +0,0 @@
1
- import type * as qbd from "./qbd/qbdTypes";
2
- export { qbd };
@@ -1 +0,0 @@
1
- export {};
@@ -1,30 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const Client_1 = __importDefault(require("../../Client"));
7
- describe("ClientQbd", () => {
8
- const client = new Client_1.default("sk_test_miter", { environment: "staging" });
9
- const mockQbdUserConnectionId = "mock_qbd_user_connection_id";
10
- jest.setTimeout(10_000);
11
- describe("Mock staging request", () => {
12
- test("Returns success", async () => {
13
- expect.hasAssertions();
14
- const response = await client.qbd.customer.query(mockQbdUserConnectionId, {
15
- MaxReturned: 3,
16
- NameFilter: {
17
- Name: "Mock",
18
- MatchCriterion: "StartsWith",
19
- },
20
- });
21
- expect(response).toBeDefined();
22
- });
23
- test("Throws an error for an unrecognizable field", async () => {
24
- expect.hasAssertions();
25
- await expect(async () => client.qbd.customer.add(mockQbdUserConnectionId,
26
- // @ts-expect-error - Intentionally passing an invalid field.
27
- { UnrecognizableField: true })).rejects.toThrow("This element is not expected.");
28
- });
29
- });
30
- });