@bratislava/ginis-sdk 0.2.0 → 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.
package/package.json
CHANGED
|
@@ -11,23 +11,23 @@ export type DetailElPodaniRequest = {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export type DetailElPodaniXrg = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
DetailElPodani: {
|
|
15
|
+
DatumPrijeti: string
|
|
16
|
+
StavZpracovani: string
|
|
17
|
+
DuvodOdmitnuti?: string
|
|
18
|
+
StavPodaniKod: string
|
|
19
|
+
StavPodaniText?: string
|
|
20
|
+
StavOdpovediKod: string
|
|
21
|
+
StavOdpovediText?: string
|
|
22
|
+
IdDokumentu: string
|
|
23
23
|
Vec?: string
|
|
24
|
-
|
|
24
|
+
SpisZnacka?: string
|
|
25
25
|
Znacka?: string
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
}[]
|
|
27
|
+
NavazanyDokument?: {
|
|
28
|
+
IdDokumentu: string
|
|
29
29
|
Vec?: string
|
|
30
|
-
|
|
30
|
+
SpisZnacka?: string
|
|
31
31
|
Znacka?: string
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -49,7 +49,7 @@ export async function detailElPodani(
|
|
|
49
49
|
{
|
|
50
50
|
GRestHeader: getGRestHeader(
|
|
51
51
|
this.config,
|
|
52
|
-
'http://www.gordic.cz/xrg/
|
|
52
|
+
'http://www.gordic.cz/xrg/pod/detail-el-podani/request/v_1.0.0.0'
|
|
53
53
|
),
|
|
54
54
|
Xrg: { 'Detail-el-podani': bodyObj },
|
|
55
55
|
},
|
|
@@ -20,8 +20,8 @@ describe('Detail-el-podani', () => {
|
|
|
20
20
|
|
|
21
21
|
test('Basic request', async () => {
|
|
22
22
|
const data = await ginis.json.pod.detailElPodani({
|
|
23
|
-
'Id-
|
|
23
|
+
'Id-zpravy': '4f700d05-9989-4798-a469-1b05f03c9cb7',
|
|
24
24
|
})
|
|
25
|
-
expect(data[
|
|
25
|
+
expect(data.DetailElPodani[0]?.IdDokumentu).toBe('MAG0X03RZA55')
|
|
26
26
|
})
|
|
27
27
|
})
|
package/src/api/xml/ssl.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { GinisConfig } from '../../ginis'
|
|
|
4
4
|
import { makeAxiosRequest } from '../../utils/api'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* full docs https://robot.gordic.cz/xrg/Default.html?c=OpenMethodDetail&moduleName=UDE&version=390&methodName=
|
|
7
|
+
* full docs https://robot.gordic.cz/xrg/Default.html?c=OpenMethodDetail&moduleName=UDE&version=390&methodName=pridat-soubor&type=request
|
|
8
8
|
*/
|
|
9
9
|
export type pridatSoubor = {
|
|
10
10
|
'Id-dokumentu'?: string
|
package/src/utils/api.ts
CHANGED
|
@@ -31,7 +31,13 @@ export const makeAxiosRequest = async <T>(
|
|
|
31
31
|
responseAxios = await axios.post<T>(url, body, requestConfig)
|
|
32
32
|
} catch (error) {
|
|
33
33
|
if (debug) {
|
|
34
|
-
|
|
34
|
+
let anyError = error as any
|
|
35
|
+
console.error(anyError)
|
|
36
|
+
console.log('########### GINIS ERROR RESPONSE ###########')
|
|
37
|
+
console.log('status: ', anyError?.response?.status)
|
|
38
|
+
console.log('statusText: ', anyError?.response?.statusText)
|
|
39
|
+
console.log('data: ', anyError?.response?.data)
|
|
40
|
+
console.log('########### GINIS RESPONSE END ###########')
|
|
35
41
|
}
|
|
36
42
|
throw error
|
|
37
43
|
}
|