conductor-node 6.2.0 → 6.2.2

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
@@ -54,6 +54,18 @@ const newAccount = await conductor.qbd.account.add(qbdConnections[0].id, {
54
54
  });
55
55
  ```
56
56
 
57
+ ### `createIntegrationConnection(qbwcUsername: string)`
58
+
59
+ 🚧 Not yet enabled.
60
+
61
+ Create a new integration connection.
62
+
63
+ ```ts
64
+ const newQbdConnection = await conductor.createIntegrationConnection(
65
+ "qbwc_username"
66
+ );
67
+ ```
68
+
57
69
  ### `getIntegrationConnectionById(id: string)`
58
70
 
59
71
  Fetch a single integration connection by id.
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "6.2.0",
3
+ "version": "6.2.2",
4
4
  "description": "Easily integrate with the entire QuickBooks Desktop API with fully-typed async TypeScript",
5
5
  "keywords": [
6
6
  "accounting",
@@ -1,15 +1,11 @@
1
1
  import type { Environment } from "./environment";
2
- import type { IntegrationConnection } from "./graphqlTypes";
2
+ import type { IntegrationConnection, IntegrationRequestInput } from "./graphqlTypes";
3
3
  import QbdIntegration from "./integrations/qbd/QbdIntegration";
4
4
  export interface ClientOptions {
5
5
  /** Log each request and response. */
6
6
  verbose?: boolean;
7
7
  serverEnvironment?: Environment;
8
8
  }
9
- interface IntegrationRequestParams {
10
- integrationConnectionId: string;
11
- requestObject: object;
12
- }
13
9
  export default class Client {
14
10
  /** QuickBooks Desktop integration. */
15
11
  readonly qbd: QbdIntegration;
@@ -22,8 +18,7 @@ export default class Client {
22
18
  createIntegrationConnection(qbwcUsername: string): Promise<IntegrationConnection>;
23
19
  isIntegrationConnectionActive(integrationConnectionId: string, secondsSinceLastActive?: number): Promise<boolean>;
24
20
  logConnectionStatuses(): Promise<void>;
25
- integrationRequest(integrationRequestParams: IntegrationRequestParams): Promise<object>;
21
+ integrationRequest(input: IntegrationRequestInput): Promise<object>;
26
22
  private request;
27
23
  private checkForUpdates;
28
24
  }
29
- export {};
@@ -109,12 +109,12 @@ class Client {
109
109
  }
110
110
  // TODO: Hide this method from the dev user while still allowing the
111
111
  // integration clients to access it.
112
- async integrationRequest(integrationRequestParams) {
112
+ async integrationRequest(input) {
113
113
  const response = await this.request(`#graphql
114
- query IntegrationRequest($integrationRequestParams: IntegrationRequestParams!) {
115
- integrationRequest(integrationRequestParams: $integrationRequestParams)
114
+ query IntegrationRequest($input: IntegrationRequestInput!) {
115
+ integrationRequest(input: $input)
116
116
  }
117
- `, { integrationRequestParams });
117
+ `, { input });
118
118
  // @ts-expect-error - This will pass after we integrate GQL codegen.
119
119
  return response.integrationRequest;
120
120
  }
@@ -11,7 +11,7 @@ export interface IntegrationConnection {
11
11
  qbwcPassword: string;
12
12
  lastHeartbeatAt: string | null;
13
13
  }
14
- export interface IntegrationRequestParams {
14
+ export interface IntegrationRequestInput {
15
15
  integrationConnectionId: string;
16
16
  requestObject: object;
17
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "6.2.0",
3
+ "version": "6.2.2",
4
4
  "description": "Easily integrate with the entire QuickBooks Desktop API with fully-typed async TypeScript",
5
5
  "keywords": [
6
6
  "accounting",