conductor-node 10.3.1 → 10.3.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
@@ -16,8 +16,7 @@ Execute _any_ read or write [QuickBooks Desktop API](https://developer.intuit.co
16
16
 
17
17
  ## Requirements
18
18
 
19
- 1. A Conductor API key.
20
- 2. A running version of QuickBooks Desktop connected to Conductor. See our [guide to connecting QuickBooks Desktop to Conductor](https://conductor-io.notion.site/QuickBooks-Desktop-integration-setup-86f6325f747d4447b95d27b59ad89ef5).
19
+ 1. A Conductor API key. [Please email us to join the private beta.](mailto:danny@conductor.is?subject=Conductor%20--%20Early%20Access)
21
20
 
22
21
  ## Installation
23
22
 
@@ -65,8 +64,7 @@ const newQbdConnection = await conductor.integrationConnections.create({
65
64
  // Your end-user's unique ID in your product's database. Must be
66
65
  // distinct from your other connections for the same integration.
67
66
  endUserSourceId: "1234-abcd",
68
- // Your end-user's email address for identification only. No emails
69
- // will be sent.
67
+ // Your end-user's email address.
70
68
  endUserEmail: "danny@constructionco.com",
71
69
  // Your end-user's company name shown elsewhere in Conductor.
72
70
  endUserCompanyName: "Construction Corp",
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "10.3.1",
3
+ "version": "10.3.2",
4
4
  "description": "Easily integrate the entire QuickBooks Desktop API using fully-typed async TypeScript",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -1,13 +1,14 @@
1
+ import type { EndUser } from "../resources/EndUsersResource";
1
2
  import type { IntegrationConnection } from "../resources/IntegrationConnectionsResource";
2
3
  import type { AxiosInstance } from "axios";
3
4
  export default abstract class BaseIntegration {
4
5
  protected readonly httpClient: AxiosInstance;
5
6
  constructor(httpClient: AxiosInstance);
6
7
  /**
7
- * @deprecated Use `sendRequestByEndUserIdAndIntegrationKey` after migrating
8
- * to end-user model.
8
+ * @deprecated Instead use `sendRequest` after migrating to the end-user
9
+ * model.
9
10
  */
10
11
  protected sendRequestDeprecated(id: IntegrationConnection["id"], payload: Record<string, unknown>): Promise<object>;
11
12
  /** Not intended for public use. */
12
- protected sendRequest(endUserId: IntegrationConnection["endUserId"], integrationKey: IntegrationConnection["integrationKey"], payload: Record<string, unknown>): Promise<object>;
13
+ protected sendRequest(endUserId: EndUser["id"], integrationKey: string, payload: Record<string, unknown>): Promise<object>;
13
14
  }
@@ -6,8 +6,8 @@ class BaseIntegration {
6
6
  this.httpClient = httpClient;
7
7
  }
8
8
  /**
9
- * @deprecated Use `sendRequestByEndUserIdAndIntegrationKey` after migrating
10
- * to end-user model.
9
+ * @deprecated Instead use `sendRequest` after migrating to the end-user
10
+ * model.
11
11
  */
12
12
  async sendRequestDeprecated(id, payload) {
13
13
  const { data } = await this.httpClient.post(`/integration-connections/${id}/send-request`, payload);
@@ -2404,14 +2404,9 @@ class QbdIntegration extends BaseIntegration_1.default {
2404
2404
  query: async (endUserId, params) => this.sendRequestWrapper(endUserId, { WorkersCompCodeQueryRq: params }, "WorkersCompCodeQueryRs", "WorkersCompCodeRet"),
2405
2405
  };
2406
2406
  async sendRequestWrapper(endUserId, params, responseWrapperKey, responseBodyKey) {
2407
- // Why is there no lint error for not initializing `response`?
2408
- let response;
2409
- if (endUserId.startsWith("int_conn")) {
2410
- response = (await this.sendRequestDeprecated(endUserId, params));
2411
- }
2412
- else {
2413
- response = (await this.sendRequest(endUserId, "quickbooks-desktop", params));
2414
- }
2407
+ const response = (endUserId.startsWith("int_conn")
2408
+ ? await this.sendRequestDeprecated(endUserId, params)
2409
+ : await this.sendRequest(endUserId, "quickbooks-desktop", params));
2415
2410
  const responseBody = response[responseWrapperKey]?.[responseBodyKey];
2416
2411
  if (responseBody === undefined) {
2417
2412
  throw new error_1.ConductorIntegrationError({
@@ -5,13 +5,12 @@ export interface EndUser {
5
5
  */
6
6
  id: string;
7
7
  /**
8
- * Your end-user's unique ID in your database. Must be distinct from
9
- * your other end-users.
8
+ * Your end-user's unique ID in your database. Must be distinct from your
9
+ * other end-users.
10
10
  */
11
11
  sourceId: string;
12
12
  /**
13
- * Your end-user's email address for identification only. No emails will be
14
- * sent.
13
+ * Your end-user's email address.
15
14
  */
16
15
  email: string;
17
16
  /**
@@ -36,8 +36,7 @@ export interface IntegrationConnectionCreateOldInput {
36
36
  */
37
37
  endUserSourceId: string;
38
38
  /**
39
- * Your end-user's email address for identification only. No emails will be
40
- * sent.
39
+ * Your end-user's email address.
41
40
  */
42
41
  endUserEmail: string;
43
42
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "10.3.1",
3
+ "version": "10.3.2",
4
4
  "description": "Easily integrate the entire QuickBooks Desktop API using fully-typed async TypeScript",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",