@truetms/truetms-node 0.2.8 → 0.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.
@@ -0,0 +1,20 @@
1
+ mutation addStorageFacilityReading(
2
+ $newStorageFacilityReadingData: NewStorageFacilityReadingInput!
3
+ ) {
4
+ addStorageFacilityReading(
5
+ newStorageFacilityReadingData: $newStorageFacilityReadingData
6
+ ) {
7
+ _id
8
+ }
9
+ }
10
+
11
+ query getReceiverReadings($receiverId: ObjectId!) {
12
+ storageFacilityReadings(receiverId: $receiverId) {
13
+ data {
14
+ _id
15
+ storageFacilityId
16
+ date
17
+ level
18
+ }
19
+ }
20
+ }
package/src/sdk/index.ts CHANGED
@@ -3,6 +3,7 @@ import TrueTMSBusinessEntitiesSdk from "./businessEntities";
3
3
  import TrueTMSDriverSdk from "./drivers";
4
4
  import TrueTMSDriverSettlementsSdk from "./driverSettlements";
5
5
  import TrueTMSInvoicesSdk from "./invoices";
6
+ import TrueTMSStorageFacilityReadingsSdk from "./storageFacilityReadings";
6
7
  import TrueTMSTractorsSdk from "./tractors";
7
8
  import TrueTMSTransactionsSdk from "./transactions";
8
9
  import TrueTMSTripsSdk from "./trips";
@@ -25,6 +26,7 @@ class TrueTMS {
25
26
  public transactions: TrueTMSTransactionsSdk;
26
27
  public businessEntities: TrueTMSBusinessEntitiesSdk;
27
28
  public trips: TrueTMSTripsSdk;
29
+ public storageFacilityReadings: TrueTMSStorageFacilityReadingsSdk;
28
30
 
29
31
  constructor(private options: TrueTMSOptions) {
30
32
  this.drivers = new TrueTMSDriverSdk(options);
@@ -36,6 +38,9 @@ class TrueTMS {
36
38
  this.transactions = new TrueTMSTransactionsSdk(options);
37
39
  this.businessEntities = new TrueTMSBusinessEntitiesSdk(options);
38
40
  this.trips = new TrueTMSTripsSdk(options);
41
+ this.storageFacilityReadings = new TrueTMSStorageFacilityReadingsSdk(
42
+ options
43
+ );
39
44
  }
40
45
  }
41
46
 
@@ -0,0 +1,15 @@
1
+ import { TrueTMSOptions, authenticateApiCall } from ".";
2
+ import trueTmsGraphqlClient from "../providers/truetms-graphql-client";
3
+
4
+ class TrueTMSStorageFacilityReadingsSdk {
5
+ constructor(private options: TrueTMSOptions) {}
6
+
7
+ getReceiverReadings = authenticateApiCall(
8
+ trueTmsGraphqlClient.getReceiverReadings
9
+ );
10
+ addStorageFacilityReading = authenticateApiCall(
11
+ trueTmsGraphqlClient.addStorageFacilityReading
12
+ );
13
+ }
14
+
15
+ export default TrueTMSStorageFacilityReadingsSdk;