@truetms/truetms-node 0.2.7 → 0.3.0

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
+ }
@@ -35,6 +35,10 @@ query listTrips(
35
35
  _id
36
36
  name
37
37
  addressLabel
38
+ location {
39
+ latitude
40
+ longitude
41
+ }
38
42
  addressTimezone
39
43
  locationType
40
44
  arrivalTime
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;