From 42e341c40076aa8c5fc37e10512ec41c9ab60825 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 31 Jan 2024 20:48:59 +0100 Subject: [PATCH] feat: add command to list templates on UI services MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- ...nia-CSSimulatorUIWSProtocolCollection.json | 253 +++++++++------ .../Insomnia_CSSimulatorUIProtocol.json | 305 ++++++++++-------- src/charging-station/Bootstrap.ts | 6 +- .../ui-services/AbstractUIService.ts | 8 + src/types/UIProtocol.ts | 1 + 5 files changed, 336 insertions(+), 237 deletions(-) diff --git a/src/assets/ui-protocol/Insomnia-CSSimulatorUIWSProtocolCollection.json b/src/assets/ui-protocol/Insomnia-CSSimulatorUIWSProtocolCollection.json index b21e0d87..526bf9a0 100644 --- a/src/assets/ui-protocol/Insomnia-CSSimulatorUIWSProtocolCollection.json +++ b/src/assets/ui-protocol/Insomnia-CSSimulatorUIWSProtocolCollection.json @@ -1,13 +1,13 @@ { "_type": "export", "__export_format": 4, - "__export_date": "2023-03-16T18:41:32.224Z", - "__export_source": "insomnia.desktop.app:v2023.1.0", + "__export_date": "2024-01-31T19:15:21.887Z", + "__export_source": "insomnia.desktop.app:v8.6.0", "resources": [ { - "_id": "ws-req_3168fa005f2f43efa8ab26d402d545e8", - "parentId": "wrk_fbb459cb79214e12a46e03e02ebc621a", - "modified": 1671365413550, + "_id": "ws-req_6815f92a40cf410383b99302180164f6", + "parentId": "wrk_64c9d5670f014930baf668326b95e601", + "modified": 1699892789456, "created": 1671297215175, "name": "startSimulator", "url": "{{ _.baseUrl }}", @@ -28,6 +28,7 @@ "password": "{{ _.password }}" }, "parameters": [], + "pathParameters": [], "settingEncodeUrl": true, "settingStoreCookies": true, "settingSendCookies": true, @@ -36,19 +37,19 @@ "_type": "websocket_request" }, { - "_id": "wrk_fbb459cb79214e12a46e03e02ebc621a", + "_id": "wrk_64c9d5670f014930baf668326b95e601", "parentId": null, - "modified": 1671183856465, - "created": 1671183643081, + "modified": 1695635939049, + "created": 1695635939049, "name": "CSSimulatorUIWSProtocolCollection", "description": "", "scope": "collection", "_type": "workspace" }, { - "_id": "ws-req_5fa1bd2aa33741bd88bbed71574795cf", - "parentId": "wrk_fbb459cb79214e12a46e03e02ebc621a", - "modified": 1671365428461, + "_id": "ws-req_6154d7eed8ba498ca6da5245e205a329", + "parentId": "wrk_64c9d5670f014930baf668326b95e601", + "modified": 1700682422930, "created": 1671191988912, "name": "stopSimulator", "url": "{{ _.baseUrl }}", @@ -69,6 +70,7 @@ "password": "{{ _.password }}" }, "parameters": [], + "pathParameters": [], "settingEncodeUrl": true, "settingStoreCookies": true, "settingSendCookies": true, @@ -77,8 +79,8 @@ "_type": "websocket_request" }, { - "_id": "ws-req_11d4fc7b15a7467585e9325ee1a9edfd", - "parentId": "wrk_fbb459cb79214e12a46e03e02ebc621a", + "_id": "ws-req_cd2c7d152f834abea3def6f66c63c7e2", + "parentId": "wrk_64c9d5670f014930baf668326b95e601", "modified": 1671365432495, "created": 1671297360420, "name": "openConnection", @@ -100,6 +102,7 @@ "password": "{{ _.password }}" }, "parameters": [], + "pathParameters": [], "settingEncodeUrl": true, "settingStoreCookies": true, "settingSendCookies": true, @@ -108,8 +111,8 @@ "_type": "websocket_request" }, { - "_id": "ws-req_5fa3addc8717485f8eb60b03c3f9eb4a", - "parentId": "wrk_fbb459cb79214e12a46e03e02ebc621a", + "_id": "ws-req_8f579f886db842118bf0e1835e7aa750", + "parentId": "wrk_64c9d5670f014930baf668326b95e601", "modified": 1671365435787, "created": 1671297412490, "name": "closeConnection", @@ -131,6 +134,7 @@ "password": "{{ _.password }}" }, "parameters": [], + "pathParameters": [], "settingEncodeUrl": true, "settingStoreCookies": true, "settingSendCookies": true, @@ -139,8 +143,40 @@ "_type": "websocket_request" }, { - "_id": "ws-req_783183d5e32d434f877355aec7bf4f22", - "parentId": "wrk_fbb459cb79214e12a46e03e02ebc621a", + "_id": "ws-req_3a0ff14878b449f4be3dfbb7432b5f87", + "parentId": "wrk_64c9d5670f014930baf668326b95e601", + "modified": 1706726397372, + "created": 1706726300033, + "name": "listTemplates", + "url": "{{ _.baseUrl }}", + "metaSortKey": -1671191988805.75, + "headers": [ + { + "id": "pair_9a64d3b0bc654ab68710ef138f00d3f5", + "name": "Sec-WebSocket-Protocol", + "value": "{{ _.protocol }}{{ _.version }}", + "description": "" + } + ], + "authentication": { + "type": "basic", + "useISO88591": false, + "disabled": false, + "username": "{{ _.username }}", + "password": "{{ _.password }}" + }, + "parameters": [], + "pathParameters": [], + "settingEncodeUrl": true, + "settingStoreCookies": true, + "settingSendCookies": true, + "settingFollowRedirects": "global", + "description": "", + "_type": "websocket_request" + }, + { + "_id": "ws-req_e5902850ac1d40369bd6e942a2755a9d", + "parentId": "wrk_64c9d5670f014930baf668326b95e601", "modified": 1671365444149, "created": 1671297544189, "name": "listChargingStations", @@ -162,6 +198,7 @@ "password": "{{ _.password }}" }, "parameters": [], + "pathParameters": [], "settingEncodeUrl": true, "settingStoreCookies": true, "settingSendCookies": true, @@ -170,8 +207,8 @@ "_type": "websocket_request" }, { - "_id": "ws-req_2d3c10b504454826ab4c257093272596", - "parentId": "wrk_fbb459cb79214e12a46e03e02ebc621a", + "_id": "ws-req_ebe5a555a6344dfba7e29f857af11d08", + "parentId": "wrk_64c9d5670f014930baf668326b95e601", "modified": 1671365448555, "created": 1671297697168, "name": "startChargingStation", @@ -193,6 +230,7 @@ "password": "{{ _.password }}" }, "parameters": [], + "pathParameters": [], "settingEncodeUrl": true, "settingStoreCookies": true, "settingSendCookies": true, @@ -201,8 +239,8 @@ "_type": "websocket_request" }, { - "_id": "ws-req_7cd5c1734a454970af5ac18e89a59b5e", - "parentId": "wrk_fbb459cb79214e12a46e03e02ebc621a", + "_id": "ws-req_720b5d562a0f42929ef9aa16019728fe", + "parentId": "wrk_64c9d5670f014930baf668326b95e601", "modified": 1671365453243, "created": 1671297731069, "name": "stopChargingStation", @@ -224,6 +262,7 @@ "password": "{{ _.password }}" }, "parameters": [], + "pathParameters": [], "settingEncodeUrl": true, "settingStoreCookies": true, "settingSendCookies": true, @@ -232,8 +271,8 @@ "_type": "websocket_request" }, { - "_id": "ws-req_b15fd2f214da40f7a1a77204cf7863b7", - "parentId": "wrk_fbb459cb79214e12a46e03e02ebc621a", + "_id": "ws-req_23025e078480491daf01406b2b5e9cc2", + "parentId": "wrk_64c9d5670f014930baf668326b95e601", "modified": 1671365457797, "created": 1671298432032, "name": "startAutomaticTransactionGenerator", @@ -255,6 +294,7 @@ "password": "{{ _.password }}" }, "parameters": [], + "pathParameters": [], "settingEncodeUrl": true, "settingStoreCookies": true, "settingSendCookies": true, @@ -263,8 +303,8 @@ "_type": "websocket_request" }, { - "_id": "ws-req_71c26454a7cc4217b24dbf999334ad33", - "parentId": "wrk_fbb459cb79214e12a46e03e02ebc621a", + "_id": "ws-req_bdbae9eeb408489ca8e3283b437ccbf4", + "parentId": "wrk_64c9d5670f014930baf668326b95e601", "modified": 1671365460922, "created": 1671298534995, "name": "stopAutomaticTransactionGenerator", @@ -286,6 +326,7 @@ "password": "{{ _.password }}" }, "parameters": [], + "pathParameters": [], "settingEncodeUrl": true, "settingStoreCookies": true, "settingSendCookies": true, @@ -294,8 +335,8 @@ "_type": "websocket_request" }, { - "_id": "ws-req_f41ad993a51244d08e45593c8fc52941", - "parentId": "wrk_fbb459cb79214e12a46e03e02ebc621a", + "_id": "ws-req_afbfa6e6824b427e99e735c0b1eabe3b", + "parentId": "wrk_64c9d5670f014930baf668326b95e601", "modified": 1678991663549, "created": 1678991663549, "name": "setSupervisionUrl", @@ -317,6 +358,7 @@ "password": "{{ _.password }}" }, "parameters": [], + "pathParameters": [], "settingEncodeUrl": true, "settingStoreCookies": true, "settingSendCookies": true, @@ -325,8 +367,8 @@ "_type": "websocket_request" }, { - "_id": "ws-req_1cc4e3f1725748f190d27ec2e60e5092", - "parentId": "wrk_fbb459cb79214e12a46e03e02ebc621a", + "_id": "ws-req_fc239903df2d46bb998c16dbcb8cafea", + "parentId": "wrk_64c9d5670f014930baf668326b95e601", "modified": 1674411529086, "created": 1674411426300, "name": "startTransaction", @@ -348,6 +390,7 @@ "password": "{{ _.password }}" }, "parameters": [], + "pathParameters": [], "settingEncodeUrl": true, "settingStoreCookies": true, "settingSendCookies": true, @@ -356,8 +399,8 @@ "_type": "websocket_request" }, { - "_id": "ws-req_1b7b1132e7bf456ea803d919a0080863", - "parentId": "wrk_fbb459cb79214e12a46e03e02ebc621a", + "_id": "ws-req_e3db8f3f31c947c1969a6a257b65a2d5", + "parentId": "wrk_64c9d5670f014930baf668326b95e601", "modified": 1674411532607, "created": 1674411483202, "name": "stopTransaction", @@ -379,6 +422,7 @@ "password": "{{ _.password }}" }, "parameters": [], + "pathParameters": [], "settingEncodeUrl": true, "settingStoreCookies": true, "settingSendCookies": true, @@ -387,8 +431,8 @@ "_type": "websocket_request" }, { - "_id": "ws-req_8a5160beab854556abba7fdff3a43437", - "parentId": "wrk_fbb459cb79214e12a46e03e02ebc621a", + "_id": "ws-req_d88784511f704224999e41bd53ba71b8", + "parentId": "wrk_64c9d5670f014930baf668326b95e601", "modified": 1673728884271, "created": 1673728879067, "name": "statusNotification", @@ -410,6 +454,7 @@ "password": "{{ _.password }}" }, "parameters": [], + "pathParameters": [], "settingEncodeUrl": true, "settingStoreCookies": true, "settingSendCookies": true, @@ -418,8 +463,8 @@ "_type": "websocket_request" }, { - "_id": "ws-req_7a67d113c68d4b04b93e4bb54cb25cdf", - "parentId": "wrk_fbb459cb79214e12a46e03e02ebc621a", + "_id": "ws-req_f836c127aca54a909a110a16b791c29b", + "parentId": "wrk_64c9d5670f014930baf668326b95e601", "modified": 1673277254273, "created": 1673277254273, "name": "diagnosticsStatusNotification", @@ -441,6 +486,7 @@ "password": "{{ _.password }}" }, "parameters": [], + "pathParameters": [], "settingEncodeUrl": true, "settingStoreCookies": true, "settingSendCookies": true, @@ -449,9 +495,9 @@ "_type": "websocket_request" }, { - "_id": "ws-req_d301022b325d4daeaa7f76275665552f", - "parentId": "wrk_fbb459cb79214e12a46e03e02ebc621a", - "modified": 1673279189370, + "_id": "ws-req_c326f21a473c430081d7229a82c69b33", + "parentId": "wrk_64c9d5670f014930baf668326b95e601", + "modified": 1699892802797, "created": 1673279189370, "name": "firmwareStatusNotification", "url": "{{ _.baseUrl }}", @@ -472,6 +518,7 @@ "password": "{{ _.password }}" }, "parameters": [], + "pathParameters": [], "settingEncodeUrl": true, "settingStoreCookies": true, "settingSendCookies": true, @@ -480,8 +527,8 @@ "_type": "websocket_request" }, { - "_id": "env_5e2b694e69a20eac33f0e6e21a40d99b05b8cfce", - "parentId": "wrk_fbb459cb79214e12a46e03e02ebc621a", + "_id": "env_153b4a78b3e048e4b7f38153f03789be", + "parentId": "wrk_64c9d5670f014930baf668326b95e601", "modified": 1671183643092, "created": 1671183643092, "name": "Base Environment", @@ -493,8 +540,8 @@ "_type": "environment" }, { - "_id": "jar_5e2b694e69a20eac33f0e6e21a40d99b05b8cfce", - "parentId": "wrk_fbb459cb79214e12a46e03e02ebc621a", + "_id": "jar_9863c1430a6f4653b051bc4764c9495d", + "parentId": "wrk_64c9d5670f014930baf668326b95e601", "modified": 1671183643097, "created": 1671183643097, "name": "Default Jar", @@ -502,19 +549,9 @@ "_type": "cookie_jar" }, { - "_id": "spc_61bb06ff9a2749ce85d506c25c747b21", - "parentId": "wrk_fbb459cb79214e12a46e03e02ebc621a", - "modified": 1671183643082, - "created": 1671183643082, - "fileName": "CSSimulatorUIWSProtocol", - "contents": "", - "contentType": "yaml", - "_type": "api_spec" - }, - { - "_id": "env_bcef03da4e0542c3833bbd57f1254609", - "parentId": "env_5e2b694e69a20eac33f0e6e21a40d99b05b8cfce", - "modified": 1678992030161, + "_id": "env_a978f8657cfa40439cb2123c92439ec9", + "parentId": "env_153b4a78b3e048e4b7f38153f03789be", + "modified": 1695636546254, "created": 1671183662528, "name": "CSSimulatorUIWSProtocolEnvironment", "data": { @@ -531,9 +568,9 @@ "_type": "environment" }, { - "_id": "ws-payload_d5cd140e264a4f548c19fcc346e04e03", - "parentId": "ws-req_5fa1bd2aa33741bd88bbed71574795cf", - "modified": 1678991609847, + "_id": "ws-payload_5a7ab577051646ff9975c34ccf900f18", + "parentId": "ws-req_6154d7eed8ba498ca6da5245e205a329", + "modified": 1706727907095, "created": 1671192074985, "name": "New Payload", "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"stopSimulator\",\n\t{}\n]", @@ -541,9 +578,9 @@ "_type": "websocket_payload" }, { - "_id": "ws-payload_1c4a192739f2449998bb4782956483a3", - "parentId": "ws-req_3168fa005f2f43efa8ab26d402d545e8", - "modified": 1678991609002, + "_id": "ws-payload_b6275ce690b5411eb84265642cda2014", + "parentId": "ws-req_6815f92a40cf410383b99302180164f6", + "modified": 1706727904055, "created": 1671297215182, "name": "New Payload", "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"startSimulator\",\n\t{}\n]", @@ -551,9 +588,9 @@ "_type": "websocket_payload" }, { - "_id": "ws-payload_55e195cc589a454f9153a6cfd4280d79", - "parentId": "ws-req_11d4fc7b15a7467585e9325ee1a9edfd", - "modified": 1678440795021, + "_id": "ws-payload_19c357dbe2fd4925aa43f58726af8b36", + "parentId": "ws-req_cd2c7d152f834abea3def6f66c63c7e2", + "modified": 1706727908632, "created": 1671297360441, "name": "New Payload", "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"openConnection\",\n\t{}\n]", @@ -561,9 +598,9 @@ "_type": "websocket_payload" }, { - "_id": "ws-payload_6a96def2049544a99fe0e805552a705a", - "parentId": "ws-req_5fa3addc8717485f8eb60b03c3f9eb4a", - "modified": 1677097818552, + "_id": "ws-payload_c61ab0e9f9ee43fe96782dfbeabf97d2", + "parentId": "ws-req_8f579f886db842118bf0e1835e7aa750", + "modified": 1706727909873, "created": 1671297412505, "name": "New Payload", "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"closeConnection\",\n\t{}\n]", @@ -571,9 +608,9 @@ "_type": "websocket_payload" }, { - "_id": "ws-payload_e90d242789294f2eb30439cd2cd2b4fd", - "parentId": "ws-req_783183d5e32d434f877355aec7bf4f22", - "modified": 1678991611087, + "_id": "ws-payload_2872e2656c164769acf98cc7ba7ea028", + "parentId": "ws-req_e5902850ac1d40369bd6e942a2755a9d", + "modified": 1706728496306, "created": 1671297544207, "name": "New Payload", "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"listChargingStations\",\n\t{}\n]", @@ -581,29 +618,29 @@ "_type": "websocket_payload" }, { - "_id": "ws-payload_c0b6ca95bed746679365c97c3bcbaaff", - "parentId": "ws-req_2d3c10b504454826ab4c257093272596", - "modified": 1678991640010, + "_id": "ws-payload_edebda0226aa43f88712d7feb60ac645", + "parentId": "ws-req_ebe5a555a6344dfba7e29f857af11d08", + "modified": 1706727996318, "created": 1671297697172, "name": "New Payload", - "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"startChargingStation\",\n\t{\n\t\t\"hashIds\": [\n\t\t\t\"60e00f5fa04d3d4429e4efba81474e6ba3f299a30687d876a548af51f5a67534b31e07c3a0e0653aaf35657ecfb9b582\"\n\t\t]\n\t}\n]", + "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"startChargingStation\",\n\t{\n\t\t\"hashIds\": [\n\t\t\t\"5b82a559d2b453f6277e272e134ae824ae358cfb6ee2415af9f7c2f325ef8b3e930aeeadcd866df4b8aec58786e60ae7\"\n\t\t]\n\t}\n]", "mode": "application/json", "_type": "websocket_payload" }, { - "_id": "ws-payload_5c1978f5d1f64a8aa6aa54362a2187ee", - "parentId": "ws-req_7cd5c1734a454970af5ac18e89a59b5e", - "modified": 1677093092324, + "_id": "ws-payload_20cb03a0142d44a98ddb7bc59ccfea11", + "parentId": "ws-req_720b5d562a0f42929ef9aa16019728fe", + "modified": 1706727990811, "created": 1671297731073, "name": "New Payload", - "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"stopChargingStation\",\n\t{\n\t\t\"hashIds\": [\n\t\t\t\"60e00f5fa04d3d4429e4efba81474e6ba3f299a30687d876a548af51f5a67534b31e07c3a0e0653aaf35657ecfb9b582\"\n\t\t]\n\t}\n]", + "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"stopChargingStation\",\n\t{\n\t\t\"hashIds\": [\n\t\t\t\"5b82a559d2b453f6277e272e134ae824ae358cfb6ee2415af9f7c2f325ef8b3e930aeeadcd866df4b8aec58786e60ae7\"\n\t\t]\n\t}\n]", "mode": "application/json", "_type": "websocket_payload" }, { - "_id": "ws-payload_def4ac84561f4a8da20591dadd25a3d4", - "parentId": "ws-req_b15fd2f214da40f7a1a77204cf7863b7", - "modified": 1677014576770, + "_id": "ws-payload_d8e66e0f933e4d74bb5fbff4d15a44bf", + "parentId": "ws-req_23025e078480491daf01406b2b5e9cc2", + "modified": 1706727997109, "created": 1671298432039, "name": "New Payload", "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"startAutomaticTransactionGenerator\",\n\t{}\n]", @@ -611,9 +648,9 @@ "_type": "websocket_payload" }, { - "_id": "ws-payload_27584690150941ec90f83625fb666595", - "parentId": "ws-req_71c26454a7cc4217b24dbf999334ad33", - "modified": 1678991647845, + "_id": "ws-payload_4f502389fb3348ee9dcaf3419fbc49ba", + "parentId": "ws-req_bdbae9eeb408489ca8e3283b437ccbf4", + "modified": 1706727959196, "created": 1671298535001, "name": "New Payload", "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"stopAutomaticTransactionGenerator\",\n\t{}\n]", @@ -621,9 +658,9 @@ "_type": "websocket_payload" }, { - "_id": "ws-payload_813e284fdf85450492023dfd6a6e5084", - "parentId": "ws-req_7a67d113c68d4b04b93e4bb54cb25cdf", - "modified": 1678991605850, + "_id": "ws-payload_1b02fae03f9c4f54af23911678519841", + "parentId": "ws-req_f836c127aca54a909a110a16b791c29b", + "modified": 1706728000568, "created": 1673277254287, "name": "New Payload", "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"diagnosticsStatusNotification\",\n\t{\n\t\t\"status\": \"Uploaded\"\n\t}\n]", @@ -631,9 +668,9 @@ "_type": "websocket_payload" }, { - "_id": "ws-payload_e1db523fe1404db08557ebaa4a2d4db5", - "parentId": "ws-req_d301022b325d4daeaa7f76275665552f", - "modified": 1678991606416, + "_id": "ws-payload_b563d5d8dc284ebb8f9dd2083734cc45", + "parentId": "ws-req_c326f21a473c430081d7229a82c69b33", + "modified": 1706727982679, "created": 1673279189375, "name": "New Payload", "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"firmwareStatusNotification\",\n\t{\n\t\t\"status\": \"Downloading\"\n\t}\n]", @@ -641,9 +678,9 @@ "_type": "websocket_payload" }, { - "_id": "ws-payload_e5a73c0ef37a4384969da13973f5dc03", - "parentId": "ws-req_8a5160beab854556abba7fdff3a43437", - "modified": 1678991605298, + "_id": "ws-payload_e2e7b8a7d8694b94a16868fcd0b90916", + "parentId": "ws-req_d88784511f704224999e41bd53ba71b8", + "modified": 1706696221191, "created": 1673728879079, "name": "New Payload", "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"statusNotification\",\n\t{\n\t\t\"connectorId\": 1,\n\t\t\"status\": \"Available\",\n\t\t\"errorCode\": \"NoError\"\n\t}\n]", @@ -651,9 +688,9 @@ "_type": "websocket_payload" }, { - "_id": "ws-payload_49814a11218940578cb954572f5606d9", - "parentId": "ws-req_1cc4e3f1725748f190d27ec2e60e5092", - "modified": 1678991604581, + "_id": "ws-payload_bf36aa8e9c8646d6a37697c6496e257f", + "parentId": "ws-req_fc239903df2d46bb998c16dbcb8cafea", + "modified": 1706727975045, "created": 1674411426307, "name": "New Payload", "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"startTransaction\",\n\t{\n\t\t\"hashIds\": [\n\t\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\"\n\t\t],\n\t\t\"connectorId\": 1,\n\t\t\"idTag\": \"test\"\n\t}\n]", @@ -661,9 +698,9 @@ "_type": "websocket_payload" }, { - "_id": "ws-payload_f363ff6a5a38493e9e67ab79c4a5ea3b", - "parentId": "ws-req_1b7b1132e7bf456ea803d919a0080863", - "modified": 1678991603850, + "_id": "ws-payload_43c713bdb0e64cbda34b3102f42da321", + "parentId": "ws-req_e3db8f3f31c947c1969a6a257b65a2d5", + "modified": 1706727977039, "created": 1674411483206, "name": "New Payload", "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"stopTransaction\",\n\t{\n\t\t\"hashIds\": [\n\t\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\"\n\t\t],\n\t\t\"transactionId\": 235051179\n\t}\n]", @@ -671,12 +708,22 @@ "_type": "websocket_payload" }, { - "_id": "ws-payload_d0997613809b452284e2ee1e95f29e13", - "parentId": "ws-req_f41ad993a51244d08e45593c8fc52941", - "modified": 1678992035807, + "_id": "ws-payload_95c28d71c8d940bb83ac514f8916a66d", + "parentId": "ws-req_afbfa6e6824b427e99e735c0b1eabe3b", + "modified": 1706727961046, "created": 1678991663554, "name": "New Payload", - "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"setSupervisionUrl\",\n\t{\n\t\t\"url\": \"http://domain.tld\"\n\t}\n]", + "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"setSupervisionUrl\",\n\t{\n\t\t\"hashIds\": [\n\t\t\t\"31f796168755b5dec7114fddebf951fcf37dd9c72e3f511fec5a86148be057ff239a57a51e65d254ec456dcd22f0df5a\"\n\t\t],\n\t\t\"url\": \"wss://ev-ocpp-json-server-plugncharge.cfapps.eu12.hana.ondemand.com/OCPP16/1839eb8b-b05e-49d5-bfff-04426b24834b/MBXDMg2i/6ceb0ecc\"\n\t}\n]", + "mode": "application/json", + "_type": "websocket_payload" + }, + { + "_id": "ws-payload_3e1dffbcefcc481286b44c694b9e6496", + "parentId": "ws-req_3a0ff14878b449f4be3dfbb7432b5f87", + "modified": 1706728496958, + "created": 1706726300041, + "name": "New Payload", + "value": "[\n\t\"{% uuid 'v4' %}\",\n\t\"listTemplates\",\n\t{}\n]", "mode": "application/json", "_type": "websocket_payload" } diff --git a/src/assets/ui-protocol/Insomnia_CSSimulatorUIProtocol.json b/src/assets/ui-protocol/Insomnia_CSSimulatorUIProtocol.json index ae963953..315978a2 100644 --- a/src/assets/ui-protocol/Insomnia_CSSimulatorUIProtocol.json +++ b/src/assets/ui-protocol/Insomnia_CSSimulatorUIProtocol.json @@ -1,16 +1,16 @@ { "_type": "export", "__export_format": 4, - "__export_date": "2022-12-17T19:35:48.380Z", - "__export_source": "insomnia.desktop.app:v2022.7.0", + "__export_date": "2024-01-31T19:03:49.139Z", + "__export_source": "insomnia.desktop.app:v8.6.0", "resources": [ { - "_id": "req_606dcee139984772877def40fcbb5c76", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", - "modified": 1669201600788, - "created": 1661789624987, - "url": "{{baseUrl}}/{{protocol}}/{{version}}/listChargingStations", - "name": "listChargingStations", + "_id": "req_09f5c772800b48d9aea7462de3379752", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", + "modified": 1699892808097, + "created": 1661789624990, + "url": "{{baseUrl}}/{{protocol}}/{{version}}/startSimulator", + "name": "startSimulator", "description": "", "method": "POST", "body": { "mimeType": "application/json", "text": "{}" }, @@ -19,7 +19,7 @@ { "name": "Content-Type", "value": "application/json", - "id": "pair_af9f914ca52f407488bc6df6c7db3a08" + "id": "pair_09b7c0032eac4b1e800c6eb253dc1525" } ], "authentication": { @@ -29,8 +29,9 @@ "username": "{{username}}", "password": "{{password}}" }, - "metaSortKey": -1000000000, + "metaSortKey": -1661726116055, "isPrivate": false, + "pathParameters": [], "settingStoreCookies": true, "settingSendCookies": true, "settingDisableRenderRequestBody": false, @@ -40,22 +41,22 @@ "_type": "request" }, { - "_id": "wrk_d64b10b1e0c14563a80484ee684b5205", + "_id": "wrk_509d4a5094fa485ba93e53bc735e8ac3", "parentId": null, - "modified": 1661790097981, - "created": 1661789624965, + "modified": 1695635686355, + "created": 1695635686355, "name": "CSSimulatorUIProtocolCollection", "description": "", "scope": "collection", "_type": "workspace" }, { - "_id": "req_7d5f9506e7ac49208a4f960a7740663e", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", - "modified": 1671134600177, - "created": 1661789624990, - "url": "{{baseUrl}}/{{protocol}}/{{version}}/startSimulator", - "name": "startSimulator", + "_id": "req_db48d65a6ab24a55b3d655704cc29d66", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", + "modified": 1699892810337, + "created": 1661789624994, + "url": "{{baseUrl}}/{{protocol}}/{{version}}/stopSimulator", + "name": "stopSimulator", "description": "", "method": "POST", "body": { "mimeType": "application/json", "text": "{}" }, @@ -64,7 +65,7 @@ { "name": "Content-Type", "value": "application/json", - "id": "pair_09b7c0032eac4b1e800c6eb253dc1525" + "id": "pair_7ea195d611f2460a8622e3c7c1784745" } ], "authentication": { @@ -74,8 +75,9 @@ "username": "{{username}}", "password": "{{password}}" }, - "metaSortKey": -1661726116055, + "metaSortKey": -831363058027.5, "isPrivate": false, + "pathParameters": [], "settingStoreCookies": true, "settingSendCookies": true, "settingDisableRenderRequestBody": false, @@ -85,12 +87,12 @@ "_type": "request" }, { - "_id": "req_59056be11534481c80a0b0da32e2a06a", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", - "modified": 1671134601914, - "created": 1661789624994, - "url": "{{baseUrl}}/{{protocol}}/{{version}}/stopSimulator", - "name": "stopSimulator", + "_id": "req_0304fc6bd9844a2fa390afd9a9c9d893", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", + "modified": 1706727111650, + "created": 1706726958993, + "url": "{{baseUrl}}/{{protocol}}/{{version}}/listTemplates", + "name": "listTemplates", "description": "", "method": "POST", "body": { "mimeType": "application/json", "text": "{}" }, @@ -99,7 +101,7 @@ { "name": "Content-Type", "value": "application/json", - "id": "pair_7ea195d611f2460a8622e3c7c1784745" + "id": "pair_af9f914ca52f407488bc6df6c7db3a08" } ], "authentication": { @@ -109,8 +111,45 @@ "username": "{{username}}", "password": "{{password}}" }, - "metaSortKey": -831363058027.5, + "metaSortKey": -416181529013.75, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_5a9d2e0f01e744acba4e218d7604b3e8", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", + "modified": 1706727100352, + "created": 1661789624987, + "url": "{{baseUrl}}/{{protocol}}/{{version}}/listChargingStations", + "name": "listChargingStations", + "description": "", + "method": "POST", + "body": { "mimeType": "application/json", "text": "{}" }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json", + "id": "pair_af9f914ca52f407488bc6df6c7db3a08" + } + ], + "authentication": { + "type": "basic", + "useISO88591": false, + "disabled": false, + "username": "{{username}}", + "password": "{{password}}" + }, + "metaSortKey": -1000000000, "isPrivate": false, + "pathParameters": [], "settingStoreCookies": true, "settingSendCookies": true, "settingDisableRenderRequestBody": false, @@ -120,8 +159,8 @@ "_type": "request" }, { - "_id": "req_aad7fd6db4c64869b60048b915010efc", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", + "_id": "req_85f61e3486114d52abd4e18f212afd59", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", "modified": 1669201600293, "created": 1661789624998, "url": "{{baseUrl}}/{{protocol}}/{{version}}/startChargingStation", @@ -149,6 +188,7 @@ }, "metaSortKey": -999999950, "isPrivate": false, + "pathParameters": [], "settingStoreCookies": true, "settingSendCookies": true, "settingDisableRenderRequestBody": false, @@ -158,8 +198,8 @@ "_type": "request" }, { - "_id": "req_d72d91cf3fb044179b8ae9d92a74f99c", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", + "_id": "req_f8aa418eb08e4164ac1c78baa3338c24", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", "modified": 1671134411162, "created": 1661789625002, "url": "{{baseUrl}}/{{protocol}}/{{version}}/stopChargingStation", @@ -187,6 +227,7 @@ }, "metaSortKey": -999999900, "isPrivate": false, + "pathParameters": [], "settingStoreCookies": true, "settingSendCookies": true, "settingDisableRenderRequestBody": false, @@ -196,8 +237,8 @@ "_type": "request" }, { - "_id": "req_747f458d196f4681b5fe15204b0067aa", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", + "_id": "req_defeae3c7421419cac661668e185e1ba", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", "modified": 1669201599251, "created": 1661789625005, "url": "{{baseUrl}}/{{protocol}}/{{version}}/openConnection", @@ -225,6 +266,7 @@ }, "metaSortKey": -999999850, "isPrivate": false, + "pathParameters": [], "settingStoreCookies": true, "settingSendCookies": true, "settingDisableRenderRequestBody": false, @@ -234,8 +276,8 @@ "_type": "request" }, { - "_id": "req_401e6a62a33c4b6c90aaa2e019daab6d", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", + "_id": "req_4433e8630cf54c0b9bef13c9d2feb285", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", "modified": 1669201591558, "created": 1661789625014, "url": "{{baseUrl}}/{{protocol}}/{{version}}/closeConnection", @@ -263,6 +305,7 @@ }, "metaSortKey": -999999800, "isPrivate": false, + "pathParameters": [], "settingStoreCookies": true, "settingSendCookies": true, "settingDisableRenderRequestBody": false, @@ -272,24 +315,24 @@ "_type": "request" }, { - "_id": "req_2f757efe92fb4936ad4fa4b6763f9293", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", - "modified": 1668619117955, - "created": 1661789625017, - "url": "{{baseUrl}}/{{protocol}}/{{version}}/startTransaction", - "name": "startTransaction", + "_id": "req_7ccfac1e7f6241f680d35aebc5969b0d", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", + "modified": 1668619123706, + "created": 1661803778569, + "url": "{{baseUrl}}/{{protocol}}/{{version}}/startAutomaticTransactionGenerator", + "name": "startAutomaticTransactionGenerator", "description": "", "method": "POST", "body": { "mimeType": "application/json", - "text": "{\n\t\"hashIds\": [\n\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\"\n\t],\n\t\"connectorId\": 1,\n\t\"idTag\": \"test\"\n}" + "text": "{\n\t\"hashIds\": [\n\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\",\n\t\t\"331d024fea36e3e2483a0e5dc9376234241c8c099ad201a441437b23622c308555183f37cbc84a1818c1c45aaae50896\"\n\t],\n\t\"connectorIds\": [\n\t\t1,\n\t\t2\n\t]\n}" }, "parameters": [], "headers": [ { "name": "Content-Type", "value": "application/json", - "id": "pair_2cdc0ded6a4441dfa56cf10efb57cb86" + "id": "pair_6186d06e91364153b6bc0461db66b2c1" } ], "authentication": { @@ -299,8 +342,9 @@ "username": "{{username}}", "password": "{{password}}" }, - "metaSortKey": -999999587.5, + "metaSortKey": -999999650, "isPrivate": false, + "pathParameters": [], "settingStoreCookies": true, "settingSendCookies": true, "settingDisableRenderRequestBody": false, @@ -310,24 +354,24 @@ "_type": "request" }, { - "_id": "req_7c285fb6cb6948a08235a6c73cbeb1f9", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", - "modified": 1669201590118, - "created": 1661789625020, - "url": "{{baseUrl}}/{{protocol}}/{{version}}/stopTransaction", - "name": "stopTransaction", + "_id": "req_d6a249987cc444cbb1ebef028c5514ae", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", + "modified": 1671134603417, + "created": 1661803846882, + "url": "{{baseUrl}}/{{protocol}}/{{version}}/stopAutomaticTransactionGenerator", + "name": "stopAutomaticTransactionGenerator", "description": "", "method": "POST", "body": { "mimeType": "application/json", - "text": "{\n\t\"hashIds\": [\n\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\"\n\t],\n\t\"transactionId\": 1906670842\n}" + "text": "{\n\t\"hashIds\": [\n\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\",\n\t\t\"331d024fea36e3e2483a0e5dc9376234241c8c099ad201a441437b23622c308555183f37cbc84a1818c1c45aaae50896\"\n\t],\n\t\"connectorIds\": [\n\t\t1,\n\t\t2\n\t]\n}" }, "parameters": [], "headers": [ { "name": "Content-Type", "value": "application/json", - "id": "pair_68d0e27cbf0b473096ba444aff9b1087" + "id": "pair_3224616dd6604605a1e48b71f6e9f795" } ], "authentication": { @@ -337,8 +381,9 @@ "username": "{{username}}", "password": "{{password}}" }, - "metaSortKey": -999999575, + "metaSortKey": -999999600, "isPrivate": false, + "pathParameters": [], "settingStoreCookies": true, "settingSendCookies": true, "settingDisableRenderRequestBody": false, @@ -348,24 +393,24 @@ "_type": "request" }, { - "_id": "req_b33c704fe3464dc5a5d3694abd9320d0", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", - "modified": 1668619123706, - "created": 1661803778569, - "url": "{{baseUrl}}/{{protocol}}/{{version}}/startAutomaticTransactionGenerator", - "name": "startAutomaticTransactionGenerator", + "_id": "req_74fff4ddc27448719f4994ce13e53461", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", + "modified": 1668619117955, + "created": 1661789625017, + "url": "{{baseUrl}}/{{protocol}}/{{version}}/startTransaction", + "name": "startTransaction", "description": "", "method": "POST", "body": { "mimeType": "application/json", - "text": "{\n\t\"hashIds\": [\n\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\",\n\t\t\"331d024fea36e3e2483a0e5dc9376234241c8c099ad201a441437b23622c308555183f37cbc84a1818c1c45aaae50896\"\n\t],\n\t\"connectorIds\": [\n\t\t1,\n\t\t2\n\t]\n}" + "text": "{\n\t\"hashIds\": [\n\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\"\n\t],\n\t\"connectorId\": 1,\n\t\"idTag\": \"test\"\n}" }, "parameters": [], "headers": [ { "name": "Content-Type", "value": "application/json", - "id": "pair_6186d06e91364153b6bc0461db66b2c1" + "id": "pair_2cdc0ded6a4441dfa56cf10efb57cb86" } ], "authentication": { @@ -375,8 +420,9 @@ "username": "{{username}}", "password": "{{password}}" }, - "metaSortKey": -999999650, + "metaSortKey": -999999587.5, "isPrivate": false, + "pathParameters": [], "settingStoreCookies": true, "settingSendCookies": true, "settingDisableRenderRequestBody": false, @@ -386,24 +432,24 @@ "_type": "request" }, { - "_id": "req_24c1c55fe3ba4ddb94702408f21a64df", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", - "modified": 1671134603417, - "created": 1661803846882, - "url": "{{baseUrl}}/{{protocol}}/{{version}}/stopAutomaticTransactionGenerator", - "name": "stopAutomaticTransactionGenerator", + "_id": "req_f5febb4303ab43979045a9177ecfc072", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", + "modified": 1669201590118, + "created": 1661789625020, + "url": "{{baseUrl}}/{{protocol}}/{{version}}/stopTransaction", + "name": "stopTransaction", "description": "", "method": "POST", "body": { "mimeType": "application/json", - "text": "{\n\t\"hashIds\": [\n\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\",\n\t\t\"331d024fea36e3e2483a0e5dc9376234241c8c099ad201a441437b23622c308555183f37cbc84a1818c1c45aaae50896\"\n\t],\n\t\"connectorIds\": [\n\t\t1,\n\t\t2\n\t]\n}" + "text": "{\n\t\"hashIds\": [\n\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\"\n\t],\n\t\"transactionId\": 1906670842\n}" }, "parameters": [], "headers": [ { "name": "Content-Type", "value": "application/json", - "id": "pair_3224616dd6604605a1e48b71f6e9f795" + "id": "pair_68d0e27cbf0b473096ba444aff9b1087" } ], "authentication": { @@ -413,8 +459,9 @@ "username": "{{username}}", "password": "{{password}}" }, - "metaSortKey": -999999600, + "metaSortKey": -999999575, "isPrivate": false, + "pathParameters": [], "settingStoreCookies": true, "settingSendCookies": true, "settingDisableRenderRequestBody": false, @@ -424,17 +471,17 @@ "_type": "request" }, { - "_id": "req_6a78267706094fb59d85ed1531e07a55", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", - "modified": 1671134605733, - "created": 1662330215407, - "url": "{{baseUrl}}/{{protocol}}/{{version}}/statusNotification", - "name": "statusNotification", + "_id": "req_f3103f7891a54b6785f32897fbbd1a9f", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", + "modified": 1671134604271, + "created": 1662648910935, + "url": "{{baseUrl}}/{{protocol}}/{{version}}/authorize", + "name": "authorize", "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\"errorCode\": \"NoError\",\n\t\"status\": \"Available\"\n}" + "text": "{\n\t\"hashIds\": [\n\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\",\n\t\t\"331d024fea36e3e2483a0e5dc9376234241c8c099ad201a441437b23622c308555183f37cbc84a1818c1c45aaae50896\"\n\t],\n\t\"idTag\": \"test\"\n}" }, "parameters": [], "headers": [ @@ -451,8 +498,9 @@ "username": "{{username}}", "password": "{{password}}" }, - "metaSortKey": -999999559.375, + "metaSortKey": -999999562.5, "isPrivate": false, + "pathParameters": [], "settingStoreCookies": true, "settingSendCookies": true, "settingDisableRenderRequestBody": false, @@ -462,17 +510,17 @@ "_type": "request" }, { - "_id": "req_61efafe9f4a14c268b948b9f9c5c4195", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", - "modified": 1671134607493, - "created": 1662409405256, - "url": "{{baseUrl}}/{{protocol}}/{{version}}/heartbeat", - "name": "heartbeat", + "_id": "req_165f49a1ebb14f09a210b514b78afbb4", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", + "modified": 1671134605733, + "created": 1662330215407, + "url": "{{baseUrl}}/{{protocol}}/{{version}}/statusNotification", + "name": "statusNotification", "description": "", "method": "POST", "body": { "mimeType": "application/json", - "text": "{\n\t\"hashIds\": [\n\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\",\n\t\t\"331d024fea36e3e2483a0e5dc9376234241c8c099ad201a441437b23622c308555183f37cbc84a1818c1c45aaae50896\"\n\t]\n}" + "text": "{\n\t\"hashIds\": [\n\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\",\n\t\t\"331d024fea36e3e2483a0e5dc9376234241c8c099ad201a441437b23622c308555183f37cbc84a1818c1c45aaae50896\"\n\t],\n\t\"connectorId\": 1,\n\t\"errorCode\": \"NoError\",\n\t\"status\": \"Available\"\n}" }, "parameters": [], "headers": [ @@ -489,8 +537,9 @@ "username": "{{username}}", "password": "{{password}}" }, - "metaSortKey": -999999500, + "metaSortKey": -999999559.375, "isPrivate": false, + "pathParameters": [], "settingStoreCookies": true, "settingSendCookies": true, "settingDisableRenderRequestBody": false, @@ -500,17 +549,17 @@ "_type": "request" }, { - "_id": "req_9633f79d949d491e8b6892eed08bd198", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", - "modified": 1671134604271, - "created": 1662648910935, - "url": "{{baseUrl}}/{{protocol}}/{{version}}/authorize", - "name": "authorize", + "_id": "req_986b6fbcef9748fa8e0c9d5abbcade6d", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", + "modified": 1671134606446, + "created": 1662780258593, + "url": "{{baseUrl}}/{{protocol}}/{{version}}/bootNotification", + "name": "bootNotification", "description": "", "method": "POST", "body": { "mimeType": "application/json", - "text": "{\n\t\"hashIds\": [\n\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\",\n\t\t\"331d024fea36e3e2483a0e5dc9376234241c8c099ad201a441437b23622c308555183f37cbc84a1818c1c45aaae50896\"\n\t],\n\t\"idTag\": \"test\"\n}" + "text": "{\n\t\"hashIds\": [\n\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\",\n\t\t\"331d024fea36e3e2483a0e5dc9376234241c8c099ad201a441437b23622c308555183f37cbc84a1818c1c45aaae50896\"\n\t]\n}" }, "parameters": [], "headers": [ @@ -527,8 +576,9 @@ "username": "{{username}}", "password": "{{password}}" }, - "metaSortKey": -999999562.5, + "metaSortKey": -999999556.25, "isPrivate": false, + "pathParameters": [], "settingStoreCookies": true, "settingSendCookies": true, "settingDisableRenderRequestBody": false, @@ -538,17 +588,17 @@ "_type": "request" }, { - "_id": "req_5874d988a93a4d28b860b7ab65e534e0", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", - "modified": 1671134615272, - "created": 1662673259612, - "url": "{{baseUrl}}/{{protocol}}/{{version}}/meterValues", - "name": "meterValues", + "_id": "req_570e0649542546d6a9ef7294d1461f9f", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", + "modified": 1671134607493, + "created": 1662409405256, + "url": "{{baseUrl}}/{{protocol}}/{{version}}/heartbeat", + "name": "heartbeat", "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}" + "text": "{\n\t\"hashIds\": [\n\t\t\"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\",\n\t\t\"331d024fea36e3e2483a0e5dc9376234241c8c099ad201a441437b23622c308555183f37cbc84a1818c1c45aaae50896\"\n\t]\n}" }, "parameters": [], "headers": [ @@ -565,8 +615,9 @@ "username": "{{username}}", "password": "{{password}}" }, - "metaSortKey": -999999400, + "metaSortKey": -999999500, "isPrivate": false, + "pathParameters": [], "settingStoreCookies": true, "settingSendCookies": true, "settingDisableRenderRequestBody": false, @@ -576,17 +627,17 @@ "_type": "request" }, { - "_id": "req_5185b096ec584dc78c277beff7bc9d4c", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", - "modified": 1671134606446, - "created": 1662780258593, - "url": "{{baseUrl}}/{{protocol}}/{{version}}/bootNotification", - "name": "bootNotification", + "_id": "req_c03b19dc2d8246aa90be29b8c484fefc", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", + "modified": 1671134615272, + "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}" + "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": [ @@ -603,8 +654,9 @@ "username": "{{username}}", "password": "{{password}}" }, - "metaSortKey": -999999556.25, + "metaSortKey": -999999400, "isPrivate": false, + "pathParameters": [], "settingStoreCookies": true, "settingSendCookies": true, "settingDisableRenderRequestBody": false, @@ -614,8 +666,8 @@ "_type": "request" }, { - "_id": "req_2e92042d18b5440296a68cb9d5adddfe", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", + "_id": "req_f13d4a3862674f1e9165a831e0233f37", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", "modified": 1671134609413, "created": 1668612774253, "url": "{{baseUrl}}/{{protocol}}/{{version}}/dataTransfer", @@ -643,6 +695,7 @@ }, "metaSortKey": -999999350, "isPrivate": false, + "pathParameters": [], "settingStoreCookies": true, "settingSendCookies": true, "settingDisableRenderRequestBody": false, @@ -652,8 +705,8 @@ "_type": "request" }, { - "_id": "env_74b29d59b9f04298b97fc9750476a4ca", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", + "_id": "env_9866e32d3029450ab75e8dc2b67f6246", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", "modified": 1662304741206, "created": 1661789624970, "name": "Base Environment", @@ -665,8 +718,8 @@ "_type": "environment" }, { - "_id": "jar_9c96e39753fb4bbd8a58b79d8f7bbc4e", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", + "_id": "jar_6bb737f544ed4335b4eaba5655f4c8b4", + "parentId": "wrk_509d4a5094fa485ba93e53bc735e8ac3", "modified": 1661789624980, "created": 1661789624980, "name": "Default Jar", @@ -674,18 +727,8 @@ "_type": "cookie_jar" }, { - "_id": "spc_7d600570d68c46cd8fdac6ad70929fc3", - "parentId": "wrk_d64b10b1e0c14563a80484ee684b5205", - "modified": 1661789625032, - "created": 1661789624984, - "fileName": "CSSimulatorUIProtocol", - "contents": "", - "contentType": "yaml", - "_type": "api_spec" - }, - { - "_id": "env_2874a21c9c3d4747af649e3b6e237791", - "parentId": "env_74b29d59b9f04298b97fc9750476a4ca", + "_id": "env_f128bddd5e284e0288a11c89bf7287b4", + "parentId": "env_9866e32d3029450ab75e8dc2b67f6246", "modified": 1671183736953, "created": 1661789624972, "name": "CSSimulatorUIProtocolEnvironment", diff --git a/src/charging-station/Bootstrap.ts b/src/charging-station/Bootstrap.ts index 96baeacb..ab935c7b 100644 --- a/src/charging-station/Bootstrap.ts +++ b/src/charging-station/Bootstrap.ts @@ -58,7 +58,7 @@ export class Bootstrap extends EventEmitter { private workerImplementation?: WorkerAbstract private readonly uiServer?: AbstractUIServer private storage?: Storage - private readonly chargingStationsByTemplate!: Map + private readonly chargingStationsByTemplate: Map private readonly version: string = version private initializedCounters: boolean private started: boolean @@ -83,11 +83,11 @@ export class Bootstrap extends EventEmitter { started: number } >() - this.initializedCounters = false - this.initializeCounters() this.uiServer = UIServerFactory.getUIServerImplementation( Configuration.getConfigurationSection(ConfigurationSection.uiServer) ) + this.initializedCounters = false + this.initializeCounters() Configuration.configurationChangeCallback = async () => { await Bootstrap.getInstance().restart(false) } diff --git a/src/charging-station/ui-server/ui-services/AbstractUIService.ts b/src/charging-station/ui-server/ui-services/AbstractUIService.ts index 416d660d..6eda2c9a 100644 --- a/src/charging-station/ui-server/ui-services/AbstractUIService.ts +++ b/src/charging-station/ui-server/ui-services/AbstractUIService.ts @@ -65,6 +65,7 @@ export abstract class AbstractUIService { this.uiServer = uiServer this.version = version this.requestHandlers = new Map([ + [ProcedureName.LIST_TEMPLATES, this.handleListTemplates.bind(this)], [ProcedureName.LIST_CHARGING_STATIONS, this.handleListChargingStations.bind(this)], [ProcedureName.START_SIMULATOR, this.handleStartSimulator.bind(this)], [ProcedureName.STOP_SIMULATOR, this.handleStopSimulator.bind(this)] @@ -202,6 +203,13 @@ export abstract class AbstractUIService { this.broadcastChannelRequests.set(uuid, expectedNumberOfResponses) } + private handleListTemplates (): ResponsePayload { + return { + status: ResponseStatus.SUCCESS, + templates: [...this.uiServer.chargingStationTemplates.values()] as JsonType[] + } satisfies ResponsePayload + } + private handleListChargingStations (): ResponsePayload { return { status: ResponseStatus.SUCCESS, diff --git a/src/types/UIProtocol.ts b/src/types/UIProtocol.ts index f44475d8..13da330e 100644 --- a/src/types/UIProtocol.ts +++ b/src/types/UIProtocol.ts @@ -30,6 +30,7 @@ export type ProtocolRequestHandler = ( export enum ProcedureName { START_SIMULATOR = 'startSimulator', STOP_SIMULATOR = 'stopSimulator', + LIST_TEMPLATES = 'listTemplates', LIST_CHARGING_STATIONS = 'listChargingStations', START_CHARGING_STATION = 'startChargingStation', STOP_CHARGING_STATION = 'stopChargingStation', -- 2.34.1