UI protocol: update Insomnia requests collection
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 8 Sep 2022 22:25:51 +0000 (00:25 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Thu, 8 Sep 2022 22:25:51 +0000 (00:25 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/assets/ui-protocol/Insomnia_CSSimulatorUIProtocol.json
src/charging-station/ChargingStationWorkerBroadcastChannel.ts

index 5478e0fec213f9ca302bae5e27d6e636b3352a10..613aa1da408d138c411cfc9ded4a9f74197ab34a 100644 (file)
@@ -1,13 +1,13 @@
 {
   "_type": "export",
   "__export_format": 4,
-  "__export_date": "2022-09-08T16:13:30.328Z",
+  "__export_date": "2022-09-08T22:23:58.294Z",
   "__export_source": "insomnia.desktop.app:v2022.5.1",
   "resources": [
     {
       "_id": "req_606dcee139984772877def40fcbb5c76",
       "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205",
-      "modified": 1662652240497,
+      "modified": 1662675789048,
       "created": 1661789624987,
       "url": "{{baseUrl}}/{{protocol}}/{{version}}/listChargingStations",
       "name": "listChargingStations",
@@ -52,7 +52,7 @@
     {
       "_id": "req_7d5f9506e7ac49208a4f960a7740663e",
       "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205",
-      "modified": 1662653581303,
+      "modified": 1662675781452,
       "created": 1661789624990,
       "url": "{{baseUrl}}/{{protocol}}/{{version}}/startSimulator",
       "name": "startSimulator",
@@ -87,7 +87,7 @@
     {
       "_id": "req_59056be11534481c80a0b0da32e2a06a",
       "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205",
-      "modified": 1662653585962,
+      "modified": 1662675782590,
       "created": 1661789624994,
       "url": "{{baseUrl}}/{{protocol}}/{{version}}/stopSimulator",
       "name": "stopSimulator",
     {
       "_id": "req_aad7fd6db4c64869b60048b915010efc",
       "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205",
-      "modified": 1662649189382,
+      "modified": 1662675784826,
       "created": 1661789624998,
       "url": "{{baseUrl}}/{{protocol}}/{{version}}/startChargingStation",
       "name": "startChargingStation",
     {
       "_id": "req_d72d91cf3fb044179b8ae9d92a74f99c",
       "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205",
-      "modified": 1662653577920,
+      "modified": 1662674004751,
       "created": 1661789625002,
       "url": "{{baseUrl}}/{{protocol}}/{{version}}/stopChargingStation",
       "name": "stopChargingStation",
     {
       "_id": "req_747f458d196f4681b5fe15204b0067aa",
       "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205",
-      "modified": 1662653576909,
+      "modified": 1662675794900,
       "created": 1661789625005,
       "url": "{{baseUrl}}/{{protocol}}/{{version}}/openConnection",
       "name": "openConnection",
     {
       "_id": "req_401e6a62a33c4b6c90aaa2e019daab6d",
       "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205",
-      "modified": 1662653575192,
+      "modified": 1662675791687,
       "created": 1661789625014,
       "url": "{{baseUrl}}/{{protocol}}/{{version}}/closeConnection",
       "name": "closeConnection",
     {
       "_id": "req_2f757efe92fb4936ad4fa4b6763f9293",
       "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205",
-      "modified": 1662653573947,
+      "modified": 1662675797662,
       "created": 1661789625017,
       "url": "{{baseUrl}}/{{protocol}}/{{version}}/startTransaction",
       "name": "startTransaction",
     {
       "_id": "req_7c285fb6cb6948a08235a6c73cbeb1f9",
       "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205",
-      "modified": 1662653572192,
+      "modified": 1662675801164,
       "created": 1661789625020,
       "url": "{{baseUrl}}/{{protocol}}/{{version}}/stopTransaction",
       "name": "stopTransaction",
     {
       "_id": "req_b33c704fe3464dc5a5d3694abd9320d0",
       "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205",
-      "modified": 1662653571010,
+      "modified": 1662675804146,
       "created": 1661803778569,
       "url": "{{baseUrl}}/{{protocol}}/{{version}}/startAutomaticTransactionGenerator",
       "name": "startAutomaticTransactionGenerator",
     {
       "_id": "req_24c1c55fe3ba4ddb94702408f21a64df",
       "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205",
-      "modified": 1662653569672,
+      "modified": 1662675807062,
       "created": 1661803846882,
       "url": "{{baseUrl}}/{{protocol}}/{{version}}/stopAutomaticTransactionGenerator",
       "name": "stopAutomaticTransactionGenerator",
     {
       "_id": "req_6a78267706094fb59d85ed1531e07a55",
       "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205",
-      "modified": 1662653568405,
+      "modified": 1662675809951,
       "created": 1662330215407,
       "url": "{{baseUrl}}/{{protocol}}/{{version}}/statusNotification",
       "name": "statusNotification",
     {
       "_id": "req_61efafe9f4a14c268b948b9f9c5c4195",
       "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205",
-      "modified": 1662653565100,
+      "modified": 1662675812274,
       "created": 1662409405256,
       "url": "{{baseUrl}}/{{protocol}}/{{version}}/heartbeat",
       "name": "heartbeat",
     {
       "_id": "req_9633f79d949d491e8b6892eed08bd198",
       "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205",
-      "modified": 1662653567170,
+      "modified": 1662675815887,
       "created": 1662648910935,
       "url": "{{baseUrl}}/{{protocol}}/{{version}}/authorize",
       "name": "authorize",
       "settingFollowRedirects": "global",
       "_type": "request"
     },
+    {
+      "_id": "req_5874d988a93a4d28b860b7ab65e534e0",
+      "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205",
+      "modified": 1662675817875,
+      "created": 1662673259612,
+      "url": "{{baseUrl}}/{{protocol}}/{{version}}/meterValues",
+      "name": "meterValues",
+      "description": "",
+      "method": "POST",
+      "body": {
+        "mimeType": "application/json",
+        "text": "{\n\t\"hashIds\": [\n\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\",\n\t\t\"331d024fea36e3e2483a0e5dc9376234241c8c099ad201a441437b23622c308555183f37cbc84a1818c1c45aaae50896\"\n\t],\n\t\"connectorId\": 1,\n\t\"transactionId\": 556742\n}"
+      },
+      "parameters": [],
+      "headers": [
+        {
+          "name": "Content-Type",
+          "value": "application/json",
+          "id": "pair_3224616dd6604605a1e48b71f6e9f795"
+        }
+      ],
+      "authentication": {
+        "type": "basic",
+        "useISO88591": false,
+        "disabled": false,
+        "username": "{{username}}",
+        "password": "{{password}}"
+      },
+      "metaSortKey": -999999400,
+      "isPrivate": false,
+      "settingStoreCookies": true,
+      "settingSendCookies": true,
+      "settingDisableRenderRequestBody": false,
+      "settingEncodeUrl": true,
+      "settingRebuildPath": true,
+      "settingFollowRedirects": "global",
+      "_type": "request"
+    },
     {
       "_id": "env_74b29d59b9f04298b97fc9750476a4ca",
       "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205",
index cf089ee3919b54f8a77f16b77b27d0674ea4cf07..14d377065d3526b690d2e61c71d17155067cd612 100644 (file)
@@ -255,26 +255,23 @@ export default class ChargingStationWorkerBroadcastChannel extends WorkerBroadca
     requestPayload: BroadcastChannelRequestPayload,
     commandResponse: CommandResponse
   ): BroadcastChannelResponsePayload {
-    const commandResponseStatus = this.commandResponseStatusToResponseStatus(
-      command,
-      commandResponse
-    );
-    if (commandResponseStatus === ResponseStatus.SUCCESS) {
+    const responseStatus = this.commandResponseToResponseStatus(command, commandResponse);
+    if (responseStatus === ResponseStatus.SUCCESS) {
       return {
         hashId: this.chargingStation.stationInfo.hashId,
-        status: commandResponseStatus,
+        status: responseStatus,
       };
     }
     return {
       hashId: this.chargingStation.stationInfo.hashId,
-      status: commandResponseStatus,
+      status: responseStatus,
       command,
       requestPayload,
       commandResponse,
     };
   }
 
-  private commandResponseStatusToResponseStatus(
+  private commandResponseToResponseStatus(
     command: BroadcastChannelProcedureName,
     commandResponse: CommandResponse
   ): ResponseStatus {