@truetms/truetms-node 0.2.1 → 0.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.
@@ -66,6 +66,7 @@ query getInvoiceById($id: String!) {
66
66
  weight
67
67
  }
68
68
  type
69
+ externalId
69
70
  }
70
71
  invoiceNumber
71
72
  pdfDocument {
@@ -160,6 +161,7 @@ query getInvoiceByNumber($invoiceNumber: String!) {
160
161
  weight
161
162
  }
162
163
  type
164
+ externalId
163
165
  }
164
166
  invoiceNumber
165
167
  pdfDocument {
@@ -0,0 +1,29 @@
1
+ import { TrueTMSOptions, authenticateApiCall } from ".";
2
+ import trueTmsGraphqlClient from "../providers/truetms-graphql-client";
3
+
4
+ class TrueTMSBusinessEntitiesSdk {
5
+ constructor(private options: TrueTMSOptions) {}
6
+
7
+ getBusinessEntityList = authenticateApiCall(
8
+ trueTmsGraphqlClient.getBusinessEntityList
9
+ );
10
+ getBusinessEntityDetails = authenticateApiCall(
11
+ trueTmsGraphqlClient.getBusinessEntityDetails
12
+ );
13
+ getBusinessEntityDetailsByExternalId = authenticateApiCall(
14
+ trueTmsGraphqlClient.getBusinessEntityDetailsByExternalId
15
+ );
16
+ addBusinessEntity = authenticateApiCall(
17
+ trueTmsGraphqlClient.addBusinessEntity
18
+ );
19
+
20
+ editBusinessEntity = authenticateApiCall(
21
+ trueTmsGraphqlClient.editBusinessEntity
22
+ );
23
+
24
+ deleteBusinessEntity = authenticateApiCall(
25
+ trueTmsGraphqlClient.deleteBusinessEntity
26
+ );
27
+ }
28
+
29
+ export default TrueTMSBusinessEntitiesSdk;
package/src/sdk/index.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import TrueTMSAuth, { exchangeRefreshTokenForAccessToken } from "./auth";
2
+ import TrueTMSBusinessEntitiesSdk from "./businessEntities";
2
3
  import TrueTMSDriverSdk from "./drivers";
3
4
  import TrueTMSDriverSettlementsSdk from "./driverSettlements";
4
5
  import TrueTMSInvoicesSdk from "./invoices";
@@ -21,6 +22,7 @@ class TrueTMS {
21
22
  public driverSettlements: TrueTMSDriverSettlementsSdk;
22
23
  public users: TrueTMSUsersSdk;
23
24
  public transactions: TrueTMSTransactionsSdk;
25
+ public businessEntities: TrueTMSBusinessEntitiesSdk;
24
26
 
25
27
  constructor(private options: TrueTMSOptions) {
26
28
  this.drivers = new TrueTMSDriverSdk(options);
@@ -30,6 +32,7 @@ class TrueTMS {
30
32
  this.driverSettlements = new TrueTMSDriverSettlementsSdk(options);
31
33
  this.users = new TrueTMSUsersSdk(options);
32
34
  this.transactions = new TrueTMSTransactionsSdk(options);
35
+ this.businessEntities = new TrueTMSBusinessEntitiesSdk(options);
33
36
  }
34
37
  }
35
38