conductor-node 4.1.2 → 4.1.4

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": "4.1.2",
3
+ "version": "4.1.4",
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",
@@ -18,7 +18,7 @@ export default class Client {
18
18
  constructor(apiKey: string, { verbose, serverEnvironment }?: ClientOptions);
19
19
  getIntegrationConnection(integrationConnectionId: string): Promise<object>;
20
20
  getIntegrationConnections(): Promise<object[]>;
21
- logLastHeartbeats(): Promise<void>;
21
+ logConnectionStatuses(): Promise<void>;
22
22
  integrationRequest(integrationRequestParams: IntegrationRequestParams): Promise<object>;
23
23
  private request;
24
24
  private checkForUpdates;
@@ -61,17 +61,14 @@ class Client {
61
61
  // @ts-expect-error - This will pass after we integrate GQL codegen.
62
62
  return data.integrationConnections;
63
63
  }
64
- async logLastHeartbeats() {
65
- const integrationConnections = await this.getIntegrationConnections();
64
+ async logConnectionStatuses() {
65
+ const integrationConnections = (await this.getIntegrationConnections());
66
66
  console.log("Time since Conductor last heard from each integration connection:");
67
- integrationConnections.forEach((integrationConnection) => {
68
- // @ts-expect-error - This will pass after we integrate GQL codegen.
69
- let logMessage = `${integrationConnection.qbwcUsername}: `;
70
- // @ts-expect-error - This will pass after we integrate GQL codegen.
71
- const lastHeartbeatAt = integrationConnection.lastHeartbeatAt;
67
+ integrationConnections.forEach(({ qbwcUsername, lastHeartbeatAt }) => {
68
+ let logMessage = `${chalk_1.default.bold(qbwcUsername)}: `;
72
69
  if (lastHeartbeatAt !== undefined) {
73
70
  const secondsSinceLastHeartbeat = (Date.now() - new Date(lastHeartbeatAt).getTime()) / 1000;
74
- logMessage += `${secondsSinceLastHeartbeat}s ago`;
71
+ logMessage += chalk_1.default.yellow(`${secondsSinceLastHeartbeat}s ago`);
75
72
  }
76
73
  else {
77
74
  logMessage += "never";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node",
3
- "version": "4.1.2",
3
+ "version": "4.1.4",
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",