conductor-node 10.2.0 → 10.3.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/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "10.2.0",
3
+ "version": "10.3.1",
4
4
  "description": "Easily integrate the entire QuickBooks Desktop API using fully-typed async TypeScript",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -3,6 +3,11 @@ import type { AxiosInstance } from "axios";
3
3
  export default abstract class BaseIntegration {
4
4
  protected readonly httpClient: AxiosInstance;
5
5
  constructor(httpClient: AxiosInstance);
6
+ /**
7
+ * @deprecated Use `sendRequestByEndUserIdAndIntegrationKey` after migrating
8
+ * to end-user model.
9
+ */
10
+ protected sendRequestDeprecated(id: IntegrationConnection["id"], payload: Record<string, unknown>): Promise<object>;
6
11
  /** Not intended for public use. */
7
- protected sendRequest(id: IntegrationConnection["id"], payload: Record<string, unknown>): Promise<object>;
12
+ protected sendRequest(endUserId: IntegrationConnection["endUserId"], integrationKey: IntegrationConnection["integrationKey"], payload: Record<string, unknown>): Promise<object>;
8
13
  }
@@ -5,10 +5,18 @@ class BaseIntegration {
5
5
  constructor(httpClient) {
6
6
  this.httpClient = httpClient;
7
7
  }
8
- /** Not intended for public use. */
9
- async sendRequest(id, payload) {
8
+ /**
9
+ * @deprecated Use `sendRequestByEndUserIdAndIntegrationKey` after migrating
10
+ * to end-user model.
11
+ */
12
+ async sendRequestDeprecated(id, payload) {
10
13
  const { data } = await this.httpClient.post(`/integration-connections/${id}/send-request`, payload);
11
14
  return data;
12
15
  }
16
+ /** Not intended for public use. */
17
+ async sendRequest(endUserId, integrationKey, payload) {
18
+ const { data } = await this.httpClient.post(`/end-users/${endUserId}/send-request/${integrationKey}`, payload);
19
+ return data;
20
+ }
13
21
  }
14
22
  exports.default = BaseIntegration;