conductor-node 11.5.5 → 11.6.0

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
@@ -64,7 +64,7 @@ yarn add conductor-node
64
64
 
65
65
  ## Usage
66
66
 
67
- The full API documentation is available [here](https://docs.conductor.is) along with many code examples. The code below is a quickstart example.
67
+ The full API documentation is available [here](https://docs.conductor.is) along with many code examples. The following is a quickstart example:
68
68
 
69
69
  ```ts
70
70
  import Conductor from "conductor-node";
@@ -87,9 +87,11 @@ async function main() {
87
87
  });
88
88
  console.log("Complete the QuickBooks Desktop auth:", authSession.authFlowUrl);
89
89
 
90
- // 3. Get a list of all Customers from QuickBooks Desktop for this EndUser.
91
- const qbdCustomers = await conductor.qbd.customer.query(endUser.id);
92
- console.log("QuickBooks Desktop customers:", qbdCustomers);
90
+ // 3. Get a list of invoices from this EndUser's QuickBooks Desktop.
91
+ const qbdInvoices = await conductor.qbd.customer.query(endUser.id, {
92
+ MaxReturned: 10,
93
+ });
94
+ console.log("QuickBooks Desktop invoices:", qbdInvoices);
93
95
  }
94
96
 
95
97
  main();
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "11.5.5",
3
+ "version": "11.6.0",
4
4
  "description": "QuickBooks Desktop API for Node.js and TypeScript",
5
5
  "keywords": [
6
6
  "QuickBooks",
@@ -4,6 +4,10 @@ export interface AuthSession {
4
4
  * The unique identifier for the object.
5
5
  */
6
6
  readonly id: string;
7
+ /**
8
+ * The object's type. This will always be "auth_session".
9
+ */
10
+ readonly objectType: "auth_session";
7
11
  /**
8
12
  * The ID of the EndUser for whom to create an IntegrationConnection.
9
13
  */
@@ -1,5 +1,6 @@
1
1
  import BaseResource from "../resources/BaseResource";
2
2
  import type { IntegrationSlug } from "../resources/IntegrationConnectionsResource";
3
+ import type { ApiListResponse } from "../resources/base";
3
4
  export interface EndUser {
4
5
  /**
5
6
  * The unique identifier for this EndUser. You must save this value to your
@@ -7,6 +8,10 @@ export interface EndUser {
7
8
  * future.
8
9
  */
9
10
  readonly id: string;
11
+ /**
12
+ * The object's type. This will always be "end_user".
13
+ */
14
+ readonly objectType: "end_user";
10
15
  /**
11
16
  * Your end-user's unique ID in _your_ database. Must be distinct from your
12
17
  * other end-users.
@@ -37,7 +42,7 @@ export default class EndUsersResource extends BaseResource {
37
42
  /**
38
43
  * Returns a list of your EndUsers.
39
44
  */
40
- list(): Promise<EndUser[]>;
45
+ list(): Promise<ApiListResponse<EndUser>>;
41
46
  /**
42
47
  * Creates a new EndUser.
43
48
  */
@@ -1,10 +1,15 @@
1
1
  import BaseResource from "../resources/BaseResource";
2
+ import type { ApiListResponse } from "../resources/base";
2
3
  export type IntegrationSlug = "quickbooks_desktop";
3
4
  export interface IntegrationConnection {
4
5
  /**
5
6
  * The unique identifier for the object.
6
7
  */
7
8
  readonly id: string;
9
+ /**
10
+ * The object's type. This will always be "integration_connection".
11
+ */
12
+ readonly objectType: "integration_connection";
8
13
  /**
9
14
  * The ID of the EndUser who owns this IntegrationConnection.
10
15
  */
@@ -27,7 +32,7 @@ export default class IntegrationConnectionsResource extends BaseResource {
27
32
  /**
28
33
  * Returns a list of all IntegrationConnections of all your EndUsers.
29
34
  */
30
- list(): Promise<IntegrationConnection[]>;
35
+ list(): Promise<ApiListResponse<IntegrationConnection>>;
31
36
  /**
32
37
  * Retrieves the specified IntegrationConnection.
33
38
  */
@@ -0,0 +1,5 @@
1
+ export interface ApiListResponse<T> {
2
+ readonly url: string;
3
+ readonly objectType: "list";
4
+ readonly data: T[];
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -39,7 +39,7 @@ export declare abstract class ConductorError extends Error {
39
39
  * your end-users in your app's UI.
40
40
  *
41
41
  * This value exists for *every* error. E.g., for a QBD connection error, it
42
- * might recommend the end-user to check that their QuickBooks Desktop is open
42
+ * might recommend the end-user to confirm their QuickBooks Desktop is open
43
43
  * and that they're logged in. But if a Conductor API key is expired, e.g.,
44
44
  * this message will just say "An internal server error occurred. Please try
45
45
  * again later.".
@@ -29,7 +29,7 @@ class ConductorError extends Error {
29
29
  * your end-users in your app's UI.
30
30
  *
31
31
  * This value exists for *every* error. E.g., for a QBD connection error, it
32
- * might recommend the end-user to check that their QuickBooks Desktop is open
32
+ * might recommend the end-user to confirm their QuickBooks Desktop is open
33
33
  * and that they're logged in. But if a Conductor API key is expired, e.g.,
34
34
  * this message will just say "An internal server error occurred. Please try
35
35
  * again later.".
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "11.5.5",
3
+ "version": "11.6.0",
4
4
  "description": "QuickBooks Desktop API for Node.js and TypeScript",
5
5
  "keywords": [
6
6
  "QuickBooks",