Add mapping v4
This commit is contained in:
parent
312fa55ab8
commit
793ade5d3e
8 changed files with 119 additions and 32 deletions
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
|
@ -59,7 +59,7 @@ jobs:
|
||||||
url: https://api.cloudflare.com/client/v4/zones/0dd93531047ba376c2a1167f841c2bfd/purge_cache
|
url: https://api.cloudflare.com/client/v4/zones/0dd93531047ba376c2a1167f841c2bfd/purge_cache
|
||||||
headers: ${{ secrets.custom_headers }}
|
headers: ${{ secrets.custom_headers }}
|
||||||
bearer-token: ${{ secrets.bearer_token }}
|
bearer-token: ${{ secrets.bearer_token }}
|
||||||
body: '{"files": ["https://messages.wulkanowy.net.pl/", "https://messages.wulkanowy.net.pl/v1.json", "https://messages.wulkanowy.net.pl/mapping1.json", "https://messages.wulkanowy.net.pl/mapping2.json", "https://messages.wulkanowy.net.pl/mapping3.json", "https://messages.wulkanowy.net.pl/end.json"]}'
|
body: '{"files": ["https://messages.wulkanowy.net.pl/", "https://messages.wulkanowy.net.pl/v1.json", "https://messages.wulkanowy.net.pl/mapping1.json", "https://messages.wulkanowy.net.pl/mapping2.json", "https://messages.wulkanowy.net.pl/mapping3.json", "https://messages.wulkanowy.net.pl/mapping4.json", "https://messages.wulkanowy.net.pl/end.json"]}'
|
||||||
accept: 200
|
accept: 200
|
||||||
log-response: false
|
log-response: false
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|
|
@ -20,6 +20,7 @@ fun generateMappingJson(
|
||||||
vTokenMap: Map<String, Map<String, Map<String, String>>>,
|
vTokenMap: Map<String, Map<String, Map<String, String>>>,
|
||||||
vTokenSchemeMap: Map<String, Map<String, String>>,
|
vTokenSchemeMap: Map<String, Map<String, String>>,
|
||||||
vHeaders: Map<String, Map<String, Map<String, String>>> = mapOf(),
|
vHeaders: Map<String, Map<String, Map<String, String>>> = mapOf(),
|
||||||
|
responseMap: Map<String, Map<String, Map<String, Map<String, String>>>> = mapOf(),
|
||||||
): String {
|
): String {
|
||||||
return json.encodeToString(
|
return json.encodeToString(
|
||||||
Mapping(
|
Mapping(
|
||||||
|
@ -27,6 +28,7 @@ fun generateMappingJson(
|
||||||
vTokens = vTokenMap,
|
vTokens = vTokenMap,
|
||||||
vTokenScheme = vTokenSchemeMap,
|
vTokenScheme = vTokenSchemeMap,
|
||||||
vHeaders = vHeaders,
|
vHeaders = vHeaders,
|
||||||
|
responseMap = responseMap,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,13 @@ fun main() {
|
||||||
vTokenSchemeMap = ApiEndpointsVTokenSchemeMap,
|
vTokenSchemeMap = ApiEndpointsVTokenSchemeMap,
|
||||||
vHeaders = ApiEndpointsVHeaders,
|
vHeaders = ApiEndpointsVHeaders,
|
||||||
)
|
)
|
||||||
|
val mappingV4 = generateMappingJson(
|
||||||
|
endpoints = ApiEndpointsMapV4,
|
||||||
|
vTokenMap = ApiEndpointsVTokenMap,
|
||||||
|
vTokenSchemeMap = ApiEndpointsVTokenSchemeMap,
|
||||||
|
vHeaders = ApiEndpointsVHeaders,
|
||||||
|
responseMap = ApiEndpointsResponseMapping,
|
||||||
|
)
|
||||||
val html = generateHtml(filteredMessages)
|
val html = generateHtml(filteredMessages)
|
||||||
val end = json.encodeToString(endMessage)
|
val end = json.encodeToString(endMessage)
|
||||||
|
|
||||||
|
@ -33,5 +40,6 @@ fun main() {
|
||||||
File("../dist/mapping1.json").writeText(mappingV1)
|
File("../dist/mapping1.json").writeText(mappingV1)
|
||||||
File("../dist/mapping2.json").writeText(mappingV2)
|
File("../dist/mapping2.json").writeText(mappingV2)
|
||||||
File("../dist/mapping3.json").writeText(mappingV3)
|
File("../dist/mapping3.json").writeText(mappingV3)
|
||||||
|
File("../dist/mapping4.json").writeText(mappingV4)
|
||||||
File("../dist/index.html").writeText(html)
|
File("../dist/index.html").writeText(html)
|
||||||
}
|
}
|
||||||
|
|
|
@ -547,35 +547,58 @@ val ApiEndpointsMap = mapOf(
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
private val UonetPlusUczen_24_04_0010_58863 = mapOf(
|
||||||
|
"Autoryzacja" to "325c0d1d-1b91-41e4-9bd9-7794ec90cca0",
|
||||||
|
"EgzaminyZewnetrzne" to "fe6b40ba-8a2f-4ad3-a519-343226a66a23",
|
||||||
|
"Frekwencja" to "c8dc2e1f-41e6-40c0-b04f-f49e3d5966ea",
|
||||||
|
"FrekwencjaStatystyki" to "fcefe7af-4324-4e70-ae42-c63dbe988099",
|
||||||
|
"FrekwencjaStatystykiPrzedmioty" to "bb36d4b5-a481-43f7-aae6-89b004451911",
|
||||||
|
"Homework" to "250e6ac4-ab2c-4784-9110-112b6c7b0410",
|
||||||
|
"LekcjeZrealizowane.mvc/GetPrzedmioty" to "ca9358ca-bab9-4e35-85c9-2c8eb1691a6e.mvc/Get",
|
||||||
|
"LekcjeZrealizowane.mvc/GetZrealizowane" to "1a83b152-3160-43db-8683-0fd25c65b78a.mvc/Get",
|
||||||
|
"Oceny" to "837fd82d-3b34-4ef2-9b6c-bbb4032b6975",
|
||||||
|
"Ogloszenia" to "ff3e1b2d-9106-4842-91e1-8db7af1b7819",
|
||||||
|
"PlanZajec" to "dbef1773-0db6-4d08-9a5b-85146a06dfae",
|
||||||
|
"RejestracjaUrzadzeniaToken" to "e581158e-8ff5-4461-9c35-0d9389fbd651",
|
||||||
|
"RejestracjaUrzadzeniaTokenCertyfikat" to "afd176b2-d574-470c-b83e-77ab45dfa8a1",
|
||||||
|
"Sprawdziany" to "81037688-53b4-4f1e-ab43-bc5eabe72501",
|
||||||
|
"Statystyki.mvc/GetOcenyCzastkowe" to "c56368dc-3530-4960-94e2-2b5435732bae.mvc/Get",
|
||||||
|
"Statystyki.mvc/GetPunkty" to "387d3492-5d9d-44f5-b028-4948a16e3e42.mvc/Get",
|
||||||
|
"Statystyki.mvc/GetOcenyRoczne" to "462d4b6d-f1d2-4c4b-8ebc-1aee25c69354.mvc/Get",
|
||||||
|
"SzkolaINauczyciele" to "0e484bbe-bc2e-4f80-9bc8-7ee67097f426",
|
||||||
|
"Uczen" to "630cd54b-b952-43ee-aeb4-4438a2b21e75",
|
||||||
|
"UczenCache" to "333dce23-9766-4f2a-bc30-689bc04f0765",
|
||||||
|
"UczenDziennik" to "6a523e4e-28dd-4123-98e5-ee10604f9e0b",
|
||||||
|
"UczenZdjecie" to "f3e2de45-912f-4d47-943f-25667b3e8a7b",
|
||||||
|
"Usprawiedliwienia" to "f13695db-b9d1-403e-8c7a-ad29b6e9ae7a",
|
||||||
|
"UwagiIOsiagniecia" to "6ac1eafd-38c0-48ab-adce-75c5f901592c",
|
||||||
|
"ZarejestrowaneUrzadzenia" to "1d63088d-02da-4feb-8906-08172e5fea1c",
|
||||||
|
"Zebrania" to "2dd7a794-62d9-4711-b000-b73de88a7990",
|
||||||
|
)
|
||||||
|
|
||||||
val ApiEndpointsMapV3 = ApiEndpointsMap + mapOf(
|
val ApiEndpointsMapV3 = ApiEndpointsMap + mapOf(
|
||||||
"24.04.0010.58863" to mapOf(
|
"24.04.0010.58863" to mapOf(
|
||||||
"uonetplus-uczen" to mapOf(
|
"uonetplus-uczen" to UonetPlusUczen_24_04_0010_58863,
|
||||||
"Autoryzacja" to "325c0d1d-1b91-41e4-9bd9-7794ec90cca0",
|
),
|
||||||
"EgzaminyZewnetrzne" to "fe6b40ba-8a2f-4ad3-a519-343226a66a23",
|
)
|
||||||
"Frekwencja" to "c8dc2e1f-41e6-40c0-b04f-f49e3d5966ea",
|
|
||||||
"FrekwencjaStatystyki" to "fcefe7af-4324-4e70-ae42-c63dbe988099",
|
val ApiEndpointsMapV4 = ApiEndpointsMap + mapOf(
|
||||||
"FrekwencjaStatystykiPrzedmioty" to "bb36d4b5-a481-43f7-aae6-89b004451911",
|
"24.04.0010.58863" to mapOf(
|
||||||
"Homework" to "250e6ac4-ab2c-4784-9110-112b6c7b0410",
|
"uonetplus-uczen" to UonetPlusUczen_24_04_0010_58863,
|
||||||
"LekcjeZrealizowane.mvc/GetPrzedmioty" to "ca9358ca-bab9-4e35-85c9-2c8eb1691a6e.mvc/Get",
|
"uonetplus-wiadomosciplus" to mapOf(
|
||||||
"LekcjeZrealizowane.mvc/GetZrealizowane" to "1a83b152-3160-43db-8683-0fd25c65b78a.mvc/Get",
|
"Skrzynki" to "99d282b8-c52a-486f-b182-081f17ab575b",
|
||||||
"Oceny" to "837fd82d-3b34-4ef2-9b6c-bbb4032b6975",
|
"Odebrane" to "9a3adc9d-57c0-489a-96f4-17216ad7f39b",
|
||||||
"Ogloszenia" to "ff3e1b2d-9106-4842-91e1-8db7af1b7819",
|
"OdebraneSkrzynka" to "87002a35-79b5-4098-9217-2f4580ed5c4f",
|
||||||
"PlanZajec" to "dbef1773-0db6-4d08-9a5b-85146a06dfae",
|
"Wyslane" to "813de405-818e-4bea-bb27-bb9ca58e4b35",
|
||||||
"RejestracjaUrzadzeniaToken" to "e581158e-8ff5-4461-9c35-0d9389fbd651",
|
"WyslaneSkrzynka" to "20fe222f-93ab-4862-ae1c-df4c6b91eed9",
|
||||||
"RejestracjaUrzadzeniaTokenCertyfikat" to "afd176b2-d574-470c-b83e-77ab45dfa8a1",
|
"Usuniete" to "b7c90b28-9e16-4631-859b-416dc67988f4",
|
||||||
"Sprawdziany" to "81037688-53b4-4f1e-ab43-bc5eabe72501",
|
"UsunieteSkrzynka" to "845deb00-e600-420a-bec4-7f8424a09024",
|
||||||
"Statystyki.mvc/GetOcenyCzastkowe" to "c56368dc-3530-4960-94e2-2b5435732bae.mvc/Get",
|
"WiadomoscSzczegoly" to "69f036da-5615-4b31-af18-cec2f10d2f0e",
|
||||||
"Statystyki.mvc/GetPunkty" to "387d3492-5d9d-44f5-b028-4948a16e3e42.mvc/Get",
|
"WiadomoscOdpowiedzPrzekaz" to "05301b98-99e9-405e-b373-b6b475848191",
|
||||||
"Statystyki.mvc/GetOcenyRoczne" to "462d4b6d-f1d2-4c4b-8ebc-1aee25c69354.mvc/Get",
|
"WiadomoscNowa" to "47625b4d-8492-4177-bf98-e471e1e8345f",
|
||||||
"SzkolaINauczyciele" to "0e484bbe-bc2e-4f80-9bc8-7ee67097f426",
|
"Pracownicy" to "89c9a7c2-e062-4d68-a66b-fb8406712351",
|
||||||
"Uczen" to "630cd54b-b952-43ee-aeb4-4438a2b21e75",
|
"MoveTrash" to "85be0a03-b0c0-4f2c-bd0c-660bb8ed7262",
|
||||||
"UczenCache" to "333dce23-9766-4f2a-bc30-689bc04f0765",
|
"RestoreTrash" to "8aec05e6-218e-4917-9f0b-8baed1560435",
|
||||||
"UczenDziennik" to "6a523e4e-28dd-4123-98e5-ee10604f9e0b",
|
)
|
||||||
"UczenZdjecie" to "f3e2de45-912f-4d47-943f-25667b3e8a7b",
|
|
||||||
"Usprawiedliwienia" to "f13695db-b9d1-403e-8c7a-ad29b6e9ae7a",
|
|
||||||
"UwagiIOsiagniecia" to "6ac1eafd-38c0-48ab-adce-75c5f901592c",
|
|
||||||
"ZarejestrowaneUrzadzenia" to "1d63088d-02da-4feb-8906-08172e5fea1c",
|
|
||||||
"Zebrania" to "2dd7a794-62d9-4711-b000-b73de88a7990",
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
|
@ -17,4 +17,7 @@ data class Mapping(
|
||||||
|
|
||||||
@SerialName("vHeaders")
|
@SerialName("vHeaders")
|
||||||
val vHeaders: Map<String, Map<String, Map<String, String>>>,
|
val vHeaders: Map<String, Map<String, Map<String, String>>>,
|
||||||
|
|
||||||
|
@SerialName("responseMap")
|
||||||
|
val responseMap: Map<String, Map<String, Map<String, Map<String, String>>>>,
|
||||||
)
|
)
|
||||||
|
|
42
generator/src/main/kotlin/mapping/ResponseKeys.kt
Normal file
42
generator/src/main/kotlin/mapping/ResponseKeys.kt
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
package mapping
|
||||||
|
|
||||||
|
internal val ApiEndpointsResponseMapping = mapOf(
|
||||||
|
"24.04.0010.58863" to mapOf(
|
||||||
|
"uonetplus-wiadomosciplus" to mapOf(
|
||||||
|
"__common__" to mapOf(
|
||||||
|
"apiGlobalKey" to "rtvrHBuCAwCEEAtIsBtuHJBtFttEtCIJ",
|
||||||
|
"data" to "GFBGBsJGJFHvErwAswuGruutHHtuHEuG",
|
||||||
|
"hasZalaczniki" to "IDJArEArvBsIErGDrsuEuGssHwsHGEts",
|
||||||
|
"id" to "IDwrCCJDGFrHEuIFsvEvDDJwtBFECCHJ",
|
||||||
|
"korespondenci" to "AurrDtEJwwrEEwJtIJvEHHwICuBBDFGF",
|
||||||
|
"nieprzeczytanePrzeczytanePrzez" to "DBtuuvuGvEBsEAHAJrJECsDGuFrFsuGw",
|
||||||
|
"przeczytana" to "FuBsJwBvHErtEDAwJGuHCuIHJwBrrJFI",
|
||||||
|
"skrzynka" to "AuvBvruBGtGvEJHtIrsGvrIBDGAIFJCB",
|
||||||
|
"temat" to "rtBCHvtsICwDEEFuJwvwJDCJBIAvAGCv",
|
||||||
|
"uzytkownikRola" to "twrCEIrHrsuGEIFIsCGEDJHDwrCICwBG",
|
||||||
|
"wazna" to "AtAsGsuEIAurEGBAJBCGIIFsuwFrwsJt",
|
||||||
|
"wycofana" to "twsrwAIrvGJFEutCrBrDvHCGwGHGCAGv",
|
||||||
|
),
|
||||||
|
"Skrzynki" to mapOf(
|
||||||
|
"globalKey" to "uwtBBGEJtGHCEEvvsuCJEtCJHCrustHu",
|
||||||
|
"nazwa" to "svttEIFJuuvGECBBrGCGtuuBFJBCAtGE",
|
||||||
|
"typUzytkownika" to "BAICCDrJHtAEEtABrJFuFtvGuICrrCGC",
|
||||||
|
),
|
||||||
|
"WiadomoscSzczegoly" to mapOf(
|
||||||
|
"apiGlobalKey" to "IvDDwGIurwIrEHDHIBvAvBEBvCsstBCC",
|
||||||
|
"data" to "utFsEtBJsrEuEECBJDuuIEsvFDCsEIuv",
|
||||||
|
"dataWycofania" to "DDAtuGHJBIEFErBArstDrsBAvIsvBHHs",
|
||||||
|
"id" to "vFICGIHIAwvBEwIHrvstBvwvCJJIGwJE",
|
||||||
|
"nadawca" to "DuJuEEvwFwAFEsAErCEtuIBtvwDsJutA",
|
||||||
|
"nadawcaInfo" to "DDAtuGHJBIEFErBArstDrsBAvIsvBHHs",
|
||||||
|
"nadawcaTyp" to "DGswFwrIGwFsEEFFrBDwvsrIsFHHCGst",
|
||||||
|
"odbiorcy" to "srBIECHwtJEuEJFIsBHBGsGIrHuBCJAu",
|
||||||
|
"odczytana" to "wwArFDurBrDFEvrAJGrsIIFADCswFuIE",
|
||||||
|
"temat" to "wuEwstuHDJCGEuEvsBJrEGFvIwvuvCJC",
|
||||||
|
"tresc" to "BEDvtCIEBCGJEDGwswIFIvIuAHFDrAJI",
|
||||||
|
"wycofana" to "HrvHItBsstFrEABGIDtuuGJJIGBECwFu",
|
||||||
|
"zalaczniki" to "GvtvvDBGvsAHEBsDsBJIJGtAtCvFswAI",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
|
@ -53,9 +53,9 @@ val ApiEndpointsVHeaders = mapOf(
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
"24.04.0010.58863" to mapOf(
|
"24.04.0010.58863" to mapOf(
|
||||||
// "uonetplus-wiadomosciplus" to mapOf(
|
"uonetplus-wiadomosciplus" to mapOf(
|
||||||
// "V-Apitoken" to "{UUID}-{appCustomerDb}-{appCustomerDbSig}-{appVersion}-{apiKey}",
|
"V-TokenApi" to "{UUID}-{appCustomerDb}-{appCustomerDbSig}-{appVersion}-{apiKey}",
|
||||||
// ),
|
),
|
||||||
"uonetplus-uczen" to mapOf(
|
"uonetplus-uczen" to mapOf(
|
||||||
"V-TokenApi" to "{%UUID%}-{%vTokenApiIndexed%}",
|
"V-TokenApi" to "{%UUID%}-{%vTokenApiIndexed%}",
|
||||||
),
|
),
|
||||||
|
|
|
@ -197,5 +197,14 @@ val ApiEndpointsVTokenMap = mapOf(
|
||||||
"SzkolaINauczyciele.mvc" to "fWw8j4JOE",
|
"SzkolaINauczyciele.mvc" to "fWw8j4JOE",
|
||||||
"Ogloszenia.mvc" to "XKkaYNx",
|
"Ogloszenia.mvc" to "XKkaYNx",
|
||||||
),
|
),
|
||||||
|
"uonetplus-wiadomosciplus" to mapOf(
|
||||||
|
"Skrzynki" to "MevM",
|
||||||
|
"Odebrane" to "KfA5",
|
||||||
|
"OdebraneSkrzynka" to "YhQzStvs3U",
|
||||||
|
"Wyslane" to "9pNDCfZWVU",
|
||||||
|
"WyslaneSkrzynka" to "9pTPrt",
|
||||||
|
"Usuniete" to "eu0uh61KM",
|
||||||
|
"UsunieteSkrzynka" to "W8vyUYqP",
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue