conductor-node 7.4.0 → 7.4.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": "7.4.0",
3
+ "version": "7.4.1",
4
4
  "description": "Easily integrate with the entire QuickBooks Desktop API with fully-typed async TypeScript",
5
5
  "author": "Danny Nemer <hi@DannyNemer.com>",
6
6
  "license": "MIT",
@@ -13,7 +13,7 @@
13
13
  ],
14
14
  "scripts": {
15
15
  "prepack": "yarn tsc && yarn delete-compiled-tests && yarn tsc-alias --verbose",
16
- "delete-compiled-tests": "rm -rf `find ./dist -type d -name __tests__`",
16
+ "delete-compiled-tests": "rm -rf `find ./dist -type d -name __tests__` ./dist/src/utils/testing.*",
17
17
  "postpack": "rm -rf dist",
18
18
  "clean": "rm -rf dist package conductor-node-*.tgz tsconfig.tsbuildinfo",
19
19
  "gen:graphql-types": "yarn graphql-codegen --config ./src/graphql/codegenConfig.ts",
@@ -1,5 +1,5 @@
1
1
  import type { Environment } from "./environment";
2
- import type { GraphqlCreateIntegrationConnectionMutation, GraphqlGetConnectionStatusQuery, GraphqlGetConnectionStatusQueryVariables, GraphqlGetIntegrationConnectionQuery, GraphqlGetIntegrationConnectionQueryVariables, GraphqlGetIntegrationConnectionsQuery, GraphqlSendIntegrationRequestInput, GraphqlSendIntegrationRequestMutation } from "./graphql/__generated__/operationTypes";
2
+ import type { GraphqlCreateIntegrationConnectionInput, GraphqlCreateIntegrationConnectionMutation, GraphqlGetConnectionStatusQuery, GraphqlGetConnectionStatusQueryVariables, GraphqlGetIntegrationConnectionQuery, GraphqlGetIntegrationConnectionQueryVariables, GraphqlGetIntegrationConnectionsQuery, GraphqlSendIntegrationRequestInput, GraphqlSendIntegrationRequestMutation } from "./graphql/__generated__/operationTypes";
3
3
  import QbdIntegration from "./integrations/qbd/QbdIntegration";
4
4
  export interface ClientOptions {
5
5
  /** Log each request and response. */
@@ -48,11 +48,7 @@ export default class Client {
48
48
  * shown elsewhere in Conductor.
49
49
  * @returns The newly created integration connection.
50
50
  */
51
- createIntegrationConnection(input: {
52
- endUserEmail: string;
53
- /** @deprecated Use endUserCompanyName instead */
54
- endUserName?: string;
55
- endUserCompanyName?: string;
51
+ createIntegrationConnection(input: GraphqlCreateIntegrationConnectionInput & {
56
52
  integrationKey: "quickbooks-desktop";
57
53
  }): Promise<GraphqlCreateIntegrationConnectionMutation["createIntegrationConnection"]>;
58
54
  sendIntegrationRequest(input: GraphqlSendIntegrationRequestInput): Promise<GraphqlSendIntegrationRequestMutation["sendIntegrationRequest"]["response"]>;
@@ -84,24 +84,8 @@ class Client {
84
84
  * @returns The newly created integration connection.
85
85
  */
86
86
  async createIntegrationConnection(input) {
87
- // TODO: Remove block below after removing the deprecated field `endUserName`.
88
- if (input.endUserName !== undefined) {
89
- console.warn(chalk_1.default.yellow(`⚠️ The field "endUserName" for "conductor.createIntegrationConnection()" is deprecated. Please use "endUserCompanyName" instead.`));
90
- }
91
- const endUserCompanyNameShimmed = input.endUserCompanyName ?? input.endUserName;
92
- if (endUserCompanyNameShimmed === undefined) {
93
- throw new Error("End-user company name is required when creating an integration-connection.");
94
- }
95
87
  return this.graphqlOperations
96
- .createIntegrationConnection({
97
- input: {
98
- endUserEmail: input.endUserEmail,
99
- // eslint-disable-next-line unicorn/no-null -- GraphQL does not support undefined.
100
- endUserName: null,
101
- endUserCompanyName: endUserCompanyNameShimmed,
102
- integrationKey: input.integrationKey,
103
- },
104
- })
88
+ .createIntegrationConnection({ input })
105
89
  .then((result) => result.createIntegrationConnection);
106
90
  }
107
91
  // TODO: Hide this method from the dev-user while still allowing the
@@ -29,10 +29,8 @@ export type GraphqlConnectionStatusResult = {
29
29
  isConnected: Scalars["Boolean"];
30
30
  };
31
31
  export type GraphqlCreateIntegrationConnectionInput = {
32
- endUserCompanyName: InputMaybe<Scalars["String"]>;
32
+ endUserCompanyName: Scalars["String"];
33
33
  endUserEmail: Scalars["String"];
34
- /** @deprecated Use endUserCompanyName instead */
35
- endUserName: InputMaybe<Scalars["String"]>;
36
34
  integrationKey: Scalars["String"];
37
35
  };
38
36
  export type GraphqlCreateIntegrationConnectionResult = {
@@ -50,8 +48,6 @@ export type GraphqlIntegrationConnection = {
50
48
  devUserId: Scalars["ID"];
51
49
  endUserCompanyName: Scalars["String"];
52
50
  endUserEmail: Scalars["String"];
53
- /** @deprecated Use endUserCompanyName instead */
54
- endUserName: Scalars["String"];
55
51
  id: Scalars["ID"];
56
52
  integration: GraphqlIntegration;
57
53
  integrationKey: Scalars["String"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "7.4.0",
3
+ "version": "7.4.1",
4
4
  "description": "Easily integrate with the entire QuickBooks Desktop API with fully-typed async TypeScript",
5
5
  "author": "Danny Nemer <hi@DannyNemer.com>",
6
6
  "license": "MIT",
@@ -13,7 +13,7 @@
13
13
  ],
14
14
  "scripts": {
15
15
  "prepack": "yarn tsc && yarn delete-compiled-tests && yarn tsc-alias --verbose",
16
- "delete-compiled-tests": "rm -rf `find ./dist -type d -name __tests__`",
16
+ "delete-compiled-tests": "rm -rf `find ./dist -type d -name __tests__` ./dist/src/utils/testing.*",
17
17
  "postpack": "rm -rf dist",
18
18
  "clean": "rm -rf dist package conductor-node-*.tgz tsconfig.tsbuildinfo",
19
19
  "gen:graphql-types": "yarn graphql-codegen --config ./src/graphql/codegenConfig.ts",
@@ -1,2 +0,0 @@
1
- export declare const CONDUCTOR_TEST_API_KEY = "063d95bc-a6f7-4b4b-841d-8007648a3112";
2
- export declare const CONDUCTOR_TEST_QBD_CONNECTION_ID = "49ee2e46-ec5a-40a0-8c37-43913994b2a9";
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CONDUCTOR_TEST_QBD_CONNECTION_ID = exports.CONDUCTOR_TEST_API_KEY = void 0;
4
- exports.CONDUCTOR_TEST_API_KEY = "063d95bc-a6f7-4b4b-841d-8007648a3112";
5
- exports.CONDUCTOR_TEST_QBD_CONNECTION_ID = "49ee2e46-ec5a-40a0-8c37-43913994b2a9";