@bratislava/ginis-sdk 0.1.2

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.
Files changed (47) hide show
  1. package/.env.example +2 -0
  2. package/.eslintrc.json +84 -0
  3. package/.github/dependabot.yml +11 -0
  4. package/.github/workflows/publish.yml +18 -0
  5. package/.github/workflows/pull.yml +38 -0
  6. package/.prettierrc +7 -0
  7. package/LICENSE.md +291 -0
  8. package/README.md +130 -0
  9. package/__tests__/ssl.test.ts +30 -0
  10. package/__tests__/ude.test.ts +27 -0
  11. package/babel.config.js +6 -0
  12. package/dist/ginis-sdk.js +2 -0
  13. package/docs/.nojekyll +1 -0
  14. package/docs/assets/26e93147f10415a0ed4a.svg +6 -0
  15. package/docs/assets/75c9471662e97ee24f29.svg +7 -0
  16. package/docs/assets/custom.css +1 -0
  17. package/docs/assets/custom.js +1 -0
  18. package/docs/assets/db90e4df2373980c497d.svg +9 -0
  19. package/docs/assets/highlight.css +92 -0
  20. package/docs/assets/main.js +58 -0
  21. package/docs/assets/search.js +1 -0
  22. package/docs/assets/style.css +1280 -0
  23. package/docs/classes/index.Ginis.html +115 -0
  24. package/docs/functions/api_ssl.pridatSoubor-1.html +73 -0
  25. package/docs/functions/api_ude.seznamDokumentu-1.html +73 -0
  26. package/docs/index.html +110 -0
  27. package/docs/modules/api_ssl.html +75 -0
  28. package/docs/modules/api_ude.html +75 -0
  29. package/docs/modules/index.html +71 -0
  30. package/docs/modules.html +62 -0
  31. package/docs/types/api_ssl.pridatSoubor.html +87 -0
  32. package/docs/types/api_ude.seznamDokumentu.html +171 -0
  33. package/docs/types/index.GinisConfig.html +76 -0
  34. package/docs/variables/api_ssl.default.html +80 -0
  35. package/docs/variables/api_ude.default.html +80 -0
  36. package/jest.config.js +1 -0
  37. package/package.json +67 -0
  38. package/src/api/ssl.ts +71 -0
  39. package/src/api/ude.ts +141 -0
  40. package/src/ginis.ts +64 -0
  41. package/src/index.ts +3 -0
  42. package/src/utils/api.ts +39 -0
  43. package/src/utils/types.ts +7 -0
  44. package/tsconfig.json +37 -0
  45. package/tsconfig.spec.json +5 -0
  46. package/typedoc.json +9 -0
  47. package/webpack.config.js +38 -0
@@ -0,0 +1,80 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>default | GINIS SDK</title><meta name="description" content="Documentation for GINIS SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script><link rel="stylesheet" href="../assets/custom.css"/></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
2
+ <div class="tsd-toolbar-contents container">
3
+ <div class="table-cell" id="tsd-search" data-base="..">
4
+ <div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
5
+ <div class="field">
6
+ <div id="tsd-toolbar-links"></div></div>
7
+ <ul class="results">
8
+ <li class="state loading">Preparing search index...</li>
9
+ <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">GINIS SDK</a></div>
10
+ <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
11
+ <div class="container container-main">
12
+ <div class="col-8 col-content">
13
+ <div class="tsd-page-title">
14
+ <ul class="tsd-breadcrumb">
15
+ <li><a href="../modules.html">GINIS SDK</a></li>
16
+ <li><a href="../modules/api_ude.html">api/ude</a></li>
17
+ <li><a href="api_ude.default.html">default</a></li></ul>
18
+ <h1>Variable default</h1></div>
19
+ <div class="tsd-signature">default<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span><br/><span>    </span>seznamDokumentu<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>config<span class="tsd-signature-symbol">: </span><a href="../types/index.GinisConfig.html" class="tsd-signature-type" data-tsd-kind="Type alias">GinisConfig</a>, url<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span>, bodyObj<span class="tsd-signature-symbol">: </span><a href="../functions/api_ude.seznamDokumentu-1.html" class="tsd-signature-type" data-tsd-kind="Function">seznamDokumentu</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span><br/><span>        </span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span><br/><span>        </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span>        </span>statusText<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span>    </span><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div>
20
+ <div class="tsd-type-declaration">
21
+ <h4>Type declaration</h4>
22
+ <ul class="tsd-parameters">
23
+ <li class="tsd-parameter">
24
+ <h5>seznam<wbr/>Dokumentu<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>config<span class="tsd-signature-symbol">: </span><a href="../types/index.GinisConfig.html" class="tsd-signature-type" data-tsd-kind="Type alias">GinisConfig</a>, url<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span>, bodyObj<span class="tsd-signature-symbol">: </span><a href="../functions/api_ude.seznamDokumentu-1.html" class="tsd-signature-type" data-tsd-kind="Function">seznamDokumentu</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span><br/><span>    </span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>statusText<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span></h5>
25
+ <ul class="tsd-parameters">
26
+ <li class="tsd-parameter-signature">
27
+ <ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-property">
28
+ <li class="tsd-signature" id="__type.seznamDokumentu.__type-1.__type-2"><span class="tsd-signature-symbol">(</span>config<span class="tsd-signature-symbol">: </span><a href="../types/index.GinisConfig.html" class="tsd-signature-type" data-tsd-kind="Type alias">GinisConfig</a>, url<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span>, bodyObj<span class="tsd-signature-symbol">: </span><a href="../functions/api_ude.seznamDokumentu-1.html" class="tsd-signature-type" data-tsd-kind="Function">seznamDokumentu</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span><br/><span>    </span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>statusText<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span></li>
29
+ <li class="tsd-description">
30
+ <div class="tsd-parameters">
31
+ <h4 class="tsd-parameters-title">Parameters</h4>
32
+ <ul class="tsd-parameter-list">
33
+ <li>
34
+ <h5>config: <a href="../types/index.GinisConfig.html" class="tsd-signature-type" data-tsd-kind="Type alias">GinisConfig</a></h5></li>
35
+ <li>
36
+ <h5>url: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h5></li>
37
+ <li>
38
+ <h5>bodyObj: <a href="../functions/api_ude.seznamDokumentu-1.html" class="tsd-signature-type" data-tsd-kind="Function">seznamDokumentu</a></h5></li></ul></div>
39
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span><br/><span>    </span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>status<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>statusText<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></li></ul></li></ul></div><aside class="tsd-sources">
40
+ <ul>
41
+ <li>Defined in <a href="https://github.com/bratislava/ginis-sdk/blob/0d2227f/src/api/ude.ts#L139">api/ude.ts:139</a></li></ul></aside></div>
42
+ <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
43
+ <div class="tree">
44
+ <div class="tree-settings">
45
+ <div class="tsd-navigation settings">
46
+ <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
47
+ <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
48
+ <div class="tsd-accordion-details">
49
+ <div class="tsd-filter-visibility">
50
+ <h4 class="uppercase">Member Visibility</h4><form>
51
+ <ul id="tsd-filter-options">
52
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
53
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
54
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
55
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
56
+ <div class="tsd-theme-toggle">
57
+ <h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div>
58
+ <div class="tree-config"><button class="tree-config__button tree-config__button--expand js-tree-expand" title="Expand All"><svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 490.72 490.72" fill="currentColor"><path d="M480.027,288.027H10.693c-5.867,0-10.667,4.8-10.667,10.667c0,5.867,4.8,10.667,10.667,10.667h213.333v144.96l-45.76-45.76c-4.267-4.053-10.987-3.947-15.04,0.213c-3.947,4.16-3.947,10.667,0,14.827l64,64c4.16,4.16,10.88,4.16,15.04,0l64-64c4.053-4.267,3.947-10.987-0.213-15.04c-4.16-3.947-10.667-3.947-14.827,0l-45.867,45.76V309.36h234.667c5.867,0,10.667-4.8,10.667-10.667C490.693,292.827,485.893,288.027,480.027,288.027z"></path><path d="M10.693,224.027h469.333c5.867,0,10.667-4.8,10.667-10.667c0-5.867-4.8-10.667-10.667-10.667H245.36V36.4l45.76,45.76c4.267,4.053,10.987,3.947,15.04-0.213c3.947-4.16,3.947-10.667,0-14.827l-64-64c-4.16-4.16-10.88-4.16-15.04,0l-64,64c-4.053,4.267-3.947,10.987,0.213,15.04c4.16,3.947,10.667,3.947,14.827,0l45.867-45.76v166.293H10.693c-5.867,0-10.667,4.8-10.667,10.667C0.027,219.227,4.827,224.027,10.693,224.027z"></path></svg></button><button class="tree-config__button tree-config__button--collapse js-tree-collapse" title="Collapse All"><svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" d="M1 8a.5.5 0 0 1 .5-.5h13a.5.5 0 0 1 0 1h-13A.5.5 0 0 1 1 8zm7-8a.5.5 0 0 1 .5.5v3.793l1.146-1.147a.5.5 0 0 1 .708.708l-2 2a.5.5 0 0 1-.708 0l-2-2a.5.5 0 1 1 .708-.708L7.5 4.293V.5A.5.5 0 0 1 8 0zm-.5 11.707-1.146 1.147a.5.5 0 0 1-.708-.708l2-2a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1-.708.708L8.5 11.707V15.5a.5.5 0 0 1-1 0v-3.793z"></path></svg></button><button class="tree-config__button tree-config__button--target js-tree-target" title="Scroll to current file"><svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><circle cx="12" cy="12" r="3"></circle><path d="M13 4.069V2h-2v2.069A8.008 8.008 0 0 0 4.069 11H2v2h2.069A8.007 8.007 0 0 0 11 19.931V22h2v-2.069A8.007 8.007 0 0 0 19.931 13H22v-2h-2.069A8.008 8.008 0 0 0 13 4.069zM12 18c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6z"></path></svg></button></div>
59
+ <div class="tree-content">
60
+ <ul class="js-category-list category" data-id="root">
61
+ <li><span class="js-category-title category__title" data-id="root-api">
62
+ <div class="category__folder" data-id="root-api"></div>api</span>
63
+ <ul class="js-category-list category" data-id="root-api">
64
+ <li><a class="category__link js-category-link category__link--ts" href="../modules/api_ssl.html" data-id="/modules/api_ssl.html">ssl.ts</a>
65
+ <ul>
66
+ <li class="tsd-kind-type-alias tsd-parent-kind-module"><a class="category__link js-category-link" href="../types/api_ssl.pridatSoubor.html" data-id="/types/api_ssl.pridatSoubor.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>pridatSoubor</a></li>
67
+ <li class="tsd-kind-variable tsd-parent-kind-module"><a class="category__link js-category-link" href="api_ssl.default.html" data-id="/variables/api_ssl.default.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-32-path"></rect><path d="M11.106 16L8.85 7.24H9.966L11.454 13.192C11.558 13.608 11.646 13.996 11.718 14.356C11.79 14.708 11.842 14.976 11.874 15.16C11.906 14.976 11.954 14.708 12.018 14.356C12.09 13.996 12.178 13.608 12.282 13.192L13.758 7.24H14.85L12.582 16H11.106Z" fill="var(--color-text)" id="icon-32-text"></path></svg>default</a></li>
68
+ <li class="tsd-kind-function tsd-parent-kind-module"><a class="category__link js-category-link" href="../functions/api_ssl.pridatSoubor-1.html" data-id="/functions/api_ssl.pridatSoubor-1.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-64-path"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)" id="icon-64-text"></path></svg>pridatSoubor</a></li></ul></li>
69
+ <li><a class="category__link js-category-link category__link--ts" href="../modules/api_ude.html" data-id="/modules/api_ude.html">ude.ts</a>
70
+ <ul>
71
+ <li class="tsd-kind-type-alias tsd-parent-kind-module"><a class="category__link js-category-link" href="../types/api_ude.seznamDokumentu.html" data-id="/types/api_ude.seznamDokumentu.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>seznamDokumentu</a></li>
72
+ <li class="tsd-kind-variable tsd-parent-kind-module"><a class="category__link js-category-link" href="api_ude.default.html" data-id="/variables/api_ude.default.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-32-path"></use><use href="#icon-32-text"></use></svg>default</a></li>
73
+ <li class="tsd-kind-function tsd-parent-kind-module"><a class="category__link js-category-link" href="../functions/api_ude.seznamDokumentu-1.html" data-id="/functions/api_ude.seznamDokumentu-1.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-64-path"></use><use href="#icon-64-text"></use></svg>seznamDokumentu</a></li></ul></li></ul></li>
74
+ <li><a class="category__link js-category-link category__link--ts" href="../modules/index.html" data-id="/modules/index.html">index.ts</a>
75
+ <ul>
76
+ <li class="tsd-kind-class tsd-parent-kind-module"><a class="category__link js-category-link" href="../classes/index.Ginis.html" data-id="/classes/index.Ginis.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg>Ginis</a></li>
77
+ <li class="tsd-kind-type-alias tsd-parent-kind-module"><a class="category__link js-category-link" href="../types/index.GinisConfig.html" data-id="/types/index.GinisConfig.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg>GinisConfig</a></li></ul></li></ul></div></div></div></div>
78
+ <div class="container tsd-generator">
79
+ <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
80
+ <div class="overlay"></div><script src="../assets/main.js"></script><script src="../assets/custom.js"></script></body></html>
package/jest.config.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = { setupFiles: ['dotenv/config'] }
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@bratislava/ginis-sdk",
3
+ "version": "0.1.2",
4
+ "description": "A small wrapper for most commonly used requests towards the Bratislava GINIS system",
5
+ "main": "dist/ginis-sdk.js",
6
+ "types": "dist/ginis-sdk.d.ts",
7
+ "scripts": {
8
+ "build": "webpack",
9
+ "test": "jest --watch",
10
+ "typecheck": "tsc && tsc-strict",
11
+ "eslint": "eslint --color --ext .js,.json,.ts .",
12
+ "eslint:fix": "npm run eslint -- --fix",
13
+ "docs": "typedoc --options typedoc.json"
14
+ },
15
+ "bin": {
16
+ "ginis-sdk": "./bin/index.js"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/bratislava/ginis-sdk.git"
21
+ },
22
+ "keywords": [],
23
+ "author": "",
24
+ "private": false,
25
+ "license": "EUPL-1.2",
26
+ "bugs": {
27
+ "url": "https://github.com/bratislava/ginis-sdk/issues"
28
+ },
29
+ "homepage": "https://github.com/bratislava/ginis-sdk#readme",
30
+ "devDependencies": {
31
+ "@babel/core": "^7.19.3",
32
+ "@babel/preset-env": "^7.19.3",
33
+ "@babel/preset-typescript": "^7.18.6",
34
+ "@types/jest": "^29.1.1",
35
+ "@types/lodash": "^4.14.186",
36
+ "@typescript-eslint/eslint-plugin": "^5.39.0",
37
+ "@typescript-eslint/parser": "^5.39.0",
38
+ "babel-jest": "^29.1.2",
39
+ "dotenv": "^16.0.3",
40
+ "eslint": "^8.24.0",
41
+ "eslint-config-prettier": "^8.5.0",
42
+ "eslint-plugin-eslint-comments": "^3.2.0",
43
+ "eslint-plugin-no-secrets": "^0.8.9",
44
+ "eslint-webpack-plugin": "^4.0.0",
45
+ "jest": "^29.1.2",
46
+ "ts-jest": "^29.0.3",
47
+ "ts-loader": "^9.4.1",
48
+ "typedoc": "^0.23.16",
49
+ "typedoc-theme-hierarchy": "^3.0.2",
50
+ "typescript-strict-plugin": "^2.1.0",
51
+ "webpack": "^5.74.0",
52
+ "webpack-cli": "^5.0.1"
53
+ },
54
+ "engines": {
55
+ "node": "16.x.x",
56
+ "npm": ">=6.0.0",
57
+ "yarn": "1.22"
58
+ },
59
+ "dependencies": {
60
+ "axios": "^1.3.2",
61
+ "lodash": "^4.17.21",
62
+ "typescript": "^4.8.4"
63
+ },
64
+ "volta": {
65
+ "node": "16.19.0"
66
+ }
67
+ }
package/src/api/ssl.ts ADDED
@@ -0,0 +1,71 @@
1
+ // full SSL service docs: https://robot.gordic.cz/xrg/Default.html?c=OpenModuleDetail&moduleName=SSL&language=cs-CZ&version=390
2
+ import type { AxiosRequestConfig } from 'axios'
3
+ import type { GinisConfig } from '../ginis'
4
+ import { makeAxiosRequest } from '../utils/api'
5
+
6
+ /**
7
+ * full docs https://robot.gordic.cz/xrg/Default.html?c=OpenMethodDetail&moduleName=UDE&version=390&methodName=seznam-dokumentu&type=request
8
+ */
9
+ export type pridatSoubor = {
10
+ 'Id-dokumentu'?: string
11
+ 'Id-souboru'?: string
12
+ 'Jmeno-souboru': string
13
+ /**
14
+ * elektronicky-obraz - Soubor je elektronický obrazem - obtiskem skutečného fyzického dokumentu. Fyzický dokument přitom nemusí v dané chvíli existovat. Např. bude vytištěn a nebo po nascanování byl uložen, zničen, odeslána atd.. Elektronický obraz může být k evidovanému dokumentu vždy jediný.
15
+ * elektronicka-priloha - Elektronický soubor je přílohou k evidovanému dokumentu. Evidovaný dokument může obsahovat neomezené množství příloh.
16
+ */
17
+ 'Typ-vazby': 'elektronicky-obraz' | 'elektronicka-priloha'
18
+ 'Popis-souboru'?: string
19
+ 'Podrobny-popis-souboru'?: string
20
+ /**
21
+ * Base64 encoded
22
+ */
23
+ Data: string
24
+ 'Kontrola-podpisu'?: string
25
+ }
26
+
27
+ export const pridatSoubor = async (
28
+ config: GinisConfig,
29
+ url: string | undefined,
30
+ bodyObj: pridatSoubor
31
+ ) => {
32
+ const axiosConfig: AxiosRequestConfig = {
33
+ headers: {
34
+ 'Content-Type': 'text/xml; charset=utf-8',
35
+ SOAPAction: 'http://www.gordic.cz/svc/xrg-ssl/v_1.0.0.0/Pridat-soubor',
36
+ },
37
+ }
38
+ const body = `
39
+ <s:Envelope
40
+ xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
41
+ xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
42
+ <s:Header>
43
+ <o:Security s:mustUnderstand="1"
44
+ xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
45
+ <o:UsernameToken u:Id="uuid-ea5d8d3d-df90-4b69-b034-9026f34a3f21-1">
46
+ <o:Username>${config.username}</o:Username>
47
+ <o:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">${
48
+ config.password
49
+ }</o:Password>
50
+ </o:UsernameToken>
51
+ </o:Security>
52
+ </s:Header>
53
+ <s:Body>
54
+ <Pridat-soubor xmlns="http://www.gordic.cz/svc/xrg-ssl/v_1.0.0.0">
55
+ <requestXml>
56
+ <Xrg xmlns="http://www.gordic.cz/xrg/ssl/wfl-dokument/pridat-soubor/request/v_1.0.0.0">
57
+ <Pridat-soubor>
58
+ ${Object.entries(bodyObj).map(([key, value]) => `<${key}>${value}</${key}>`)}
59
+ </Pridat-soubor>
60
+ </Xrg>
61
+ </requestXml>
62
+ </Pridat-soubor>
63
+ </s:Body>
64
+ </s:Envelope>
65
+ `
66
+ return makeAxiosRequest(axiosConfig, url, body, config.debug)
67
+ }
68
+
69
+ export default {
70
+ pridatSoubor,
71
+ }
package/src/api/ude.ts ADDED
@@ -0,0 +1,141 @@
1
+ // full UDE service docs: https://robot.gordic.cz/xrg/Default.html?c=OpenModuleDetail&moduleName=SSL&language=cs-CZ&version=390
2
+ import type { AxiosRequestConfig } from 'axios'
3
+ import type { GinisConfig } from '../ginis'
4
+ import { makeAxiosRequest } from '../utils/api'
5
+
6
+ /**
7
+ * Full docs: https://robot.gordic.cz/xrg/Default.html?c=OpenMethodDetail&moduleName=UDE&version=390&methodName=seznam-dokumentu&type=request
8
+ */
9
+ export type seznamDokumentu = {
10
+ /**
11
+ * UDE - Vrátit pouze informace evidované v GINIS modulu Úřední deska. Tj. základní informace o vyvěšeném záznamu. Elementy: Id-zaznamu ... Id-dokumentu.
12
+ * UDEWFL - Když byl záznam vyvěšen z GINIS modulu, jsou o něm dotaženy základní informace (další možno získat voláním XRG-SSL). Elementy: Id-zaznamu ... Id-dokumentu + Puvod-dokumentu ... Cj-spisu
13
+ * UDESML - Když byl záznam vyvěšen z GINIS modulu SML, jsou o něm dotaženy informace. Elementy: Id-zaznamu ... Id-dokumentu + Cislo-sml ... Odbor-sml.
14
+ * UDEWFLSML - Informace UDE + WFL + SML. Vrátí vše.
15
+ */
16
+ 'Vratit-info'?: 'UDE' | 'UDEWFL' | 'UDESML' | 'UDEWFLSML'
17
+ /**
18
+ * vyveseno - vyvěšeno
19
+ * sejmuto - sejmuto
20
+ */
21
+ Stav?: string
22
+ 'Id-uredni-desky'?: string
23
+ 'Id-kategorie'?: string
24
+ /**
25
+ * ISO-string date format
26
+ */
27
+ 'Vyveseno-od'?: string
28
+ /**
29
+ * ISO-string date format
30
+ */
31
+ 'Vyveseno-od-horni-mez'?: string
32
+ /**
33
+ * ISO-string date format
34
+ */
35
+ 'Sejmuto-od'?: string
36
+ /**
37
+ * ISO-string date format
38
+ */
39
+ 'Sejmuto-od-horni-mez'?: string
40
+ /**
41
+ * Název záznamu. Hledáno přes LIKE "%hodnota%" bez ohledu na diakritiku a velikost písmen (na db stroji Informix s ohledem na diakritiku)
42
+ * Max 254 chars
43
+ */
44
+ Nazev?: string
45
+ /**
46
+ * Popis záznamu. Hledáno přes LIKE "%hodnota%" bez ohledu na diakritiku a velikost písmen (na db stroji Informix s ohledem na diakritiku)
47
+ * Max 254 chars
48
+ */
49
+ Popis?: string
50
+ Zdroj?: string
51
+ /**
52
+ * rucni-evidence - ruční evidence
53
+ * elektronicke-podani - elektronické podání
54
+ * datova-schranka - datová schránka
55
+ * interface-xrg - interface, xrg
56
+ */
57
+ 'Puvod-dokumentu'?: string
58
+ 'Odesilatel-dokumentu'?: string
59
+ 'Cj-spisu'?: string
60
+ /**
61
+ * ISO-string date-time format
62
+ */
63
+ 'Datum-zmeny'?: string
64
+ /**
65
+ * ISO-string date-time format
66
+ */
67
+ 'Datum-zmeny-horni-mez'?: string
68
+ 'Cislo-sml'?: string
69
+ 'Typ-sml'?: string
70
+ 'Nazev-sml'?: string
71
+ 'Nazev-sub-sml'?: string
72
+ 'Prijmeni-sub-sml'?: string
73
+ 'Jmeno-sub-sml'?: string
74
+ 'Ico-sub-sml'?: string
75
+ 'Obec-sub-sml'?: string
76
+ 'Ulice-sub-sml'?: string
77
+ 'Cor-sub-sml'?: string
78
+ 'Cpop-sub-sml'?: string
79
+ 'Psc-sub-sml'?: string
80
+ 'Typ-sub-sml'?: string
81
+ /**
82
+ * ISO-string date format
83
+ */
84
+ 'Datum-uzavreni-sml-od'?: string
85
+ /**
86
+ * ISO-string date format
87
+ */
88
+ 'Datum-uzavreni-sml-do'?: string
89
+ 'Odbor-sml'?: string
90
+ 'Celkova-castka-od-sml'?: string
91
+ 'Celkova-castka-do-sml'?: string
92
+ 'Mena-sml'?: string
93
+ }
94
+
95
+ export const seznamDokumentu = async (
96
+ config: GinisConfig,
97
+ url: string | undefined,
98
+ bodyObj: seznamDokumentu
99
+ ) => {
100
+ const axiosConfig: AxiosRequestConfig = {
101
+ headers: {
102
+ 'Content-Type': 'text/xml; charset=utf-8',
103
+ SOAPAction: 'http://www.gordic.cz/svc/xrg-ude/v_1.0.0.0/Seznam-dokumentu',
104
+ },
105
+ }
106
+ const body = `
107
+ <s:Envelope
108
+ xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
109
+ xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
110
+ <s:Header>
111
+ <o:Security s:mustUnderstand="1"
112
+ xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
113
+ <o:UsernameToken u:Id="uuid-ea5d8d3d-df90-4b69-b034-9026f34a3f21-1">
114
+ <o:Username>${config.username}</o:Username>
115
+ <o:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">${
116
+ config.password
117
+ }</o:Password>
118
+ </o:UsernameToken>
119
+ </o:Security>
120
+ </s:Header>
121
+ <s:Body>
122
+ <Seznam-dokumentu
123
+ xmlns="http://www.gordic.cz/svc/xrg-ude/v_1.0.0.0">
124
+ <requestXml>
125
+ <Xrg
126
+ xmlns="http://www.gordic.cz/xrg/ude/seznam-dokumentu/request/v_1.0.0.0">
127
+ <Seznam-dokumentu>
128
+ ${Object.entries(bodyObj).map(([key, value]) => `<${key}>${value}</${key}>`)}
129
+ </Seznam-dokumentu>
130
+ </Xrg>
131
+ </requestXml>
132
+ </Seznam-dokumentu>
133
+ </s:Body>
134
+ </s:Envelope>
135
+ `
136
+ return makeAxiosRequest(axiosConfig, url, body, config.debug)
137
+ }
138
+
139
+ export default {
140
+ seznamDokumentu,
141
+ }
package/src/ginis.ts ADDED
@@ -0,0 +1,64 @@
1
+ import ude from './api/ude'
2
+ import ssl from './api/ssl'
3
+ import type { OmitFirstTwoArgs } from './utils/types'
4
+ import { bind, mapValues } from 'lodash'
5
+
6
+ export type GinisConfig = {
7
+ username: string
8
+ password: string
9
+ urls: {
10
+ ude?: string
11
+ ssl?: string
12
+ }
13
+ debug?: boolean
14
+ }
15
+
16
+ // presently empty, prepared in case we're to add default values in the future
17
+ export const defaultConfig = {}
18
+
19
+ type _Ude = typeof ude
20
+ /**
21
+ * full UDE service docs: https://robot.gordic.cz/xrg/Default.html?c=OpenModuleDetail&moduleName=UDE&language=cs-CZ&version=390
22
+ */
23
+ export type Ude = {
24
+ [P in keyof _Ude]: OmitFirstTwoArgs<_Ude[P]>
25
+ }
26
+
27
+ type _Ssl = typeof ssl
28
+ /**
29
+ * full SSL service docs: https://robot.gordic.cz/xrg/Default.html?c=OpenModuleDetail&moduleName=SSL&language=cs-CZ&version=390
30
+ */
31
+ export type Ssl = {
32
+ [P in keyof _Ssl]: OmitFirstTwoArgs<_Ssl[P]>
33
+ }
34
+
35
+ // exports all services with server config bound to the one passed at construction
36
+ export class Ginis {
37
+ config: GinisConfig
38
+ /**
39
+ * Exports functions of the api's with config and url values bound.
40
+ * See documentation of the api for request options.
41
+ * Inputs are typed objects, outputs unformatted xml.
42
+ */
43
+ xml: {
44
+ ude: Ude
45
+ ssl: Ssl
46
+ }
47
+
48
+ constructor(config: GinisConfig) {
49
+ this.config = {
50
+ ...defaultConfig,
51
+ ...config,
52
+ }
53
+ this.xml = {
54
+ ude: mapValues(
55
+ ude,
56
+ (v) => bind(v, this, this.config, this.config.urls.ude) as OmitFirstTwoArgs<typeof v>
57
+ ),
58
+ ssl: mapValues(
59
+ ssl,
60
+ (v) => bind(v, this, this.config, this.config.urls.ssl) as OmitFirstTwoArgs<typeof v>
61
+ ),
62
+ }
63
+ }
64
+ }
package/src/index.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { Ginis, GinisConfig } from './ginis'
2
+
3
+ export { Ginis, GinisConfig }
@@ -0,0 +1,39 @@
1
+ import axios, { AxiosRequestConfig } from 'axios'
2
+
3
+ export const makeAxiosRequest = async (
4
+ axiosConfig: AxiosRequestConfig,
5
+ url: string | undefined,
6
+ body: string,
7
+ debug?: boolean
8
+ ) => {
9
+ if (!url) {
10
+ throw new Error('Missing GINIS url for the service you are trying to reach.')
11
+ }
12
+ if (debug) {
13
+ console.log('########### GINIS REQUEST ###########')
14
+ console.log('headers: ', axiosConfig.headers)
15
+ console.log('body: ', body)
16
+ console.log('########### GINIS REQUEST END ###########')
17
+ }
18
+ let responseAxios
19
+ try {
20
+ responseAxios = await axios.post(url, body, axiosConfig)
21
+ } catch (error) {
22
+ if (debug) {
23
+ console.error(error)
24
+ }
25
+ throw error
26
+ }
27
+ if (debug) {
28
+ console.log('########### GINIS RESPONSE ###########')
29
+ console.log('status: ', responseAxios.status)
30
+ console.log('statusText: ', responseAxios.statusText)
31
+ console.log('data: ', responseAxios.data)
32
+ console.log('########### GINIS RESPONSE END ###########')
33
+ }
34
+ return {
35
+ data: responseAxios.data,
36
+ status: responseAxios.status,
37
+ statusText: responseAxios.statusText,
38
+ }
39
+ }
@@ -0,0 +1,7 @@
1
+ export type OmitFirstArg<F> = F extends (x: any, ...args: infer P) => infer R
2
+ ? (...args: P) => R
3
+ : never
4
+
5
+ export type OmitFirstTwoArgs<F> = F extends (x: any, y: any, ...args: infer P) => infer R
6
+ ? (...args: P) => R
7
+ : never
package/tsconfig.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "Node 16 + ESM + Strictest",
4
+ "compilerOptions": {
5
+ "outDir": "dist",
6
+ "lib": ["es2021"],
7
+ "module": "es2022",
8
+ "target": "es2021",
9
+ "allowJs": true,
10
+ "strict": true,
11
+ "esModuleInterop": true,
12
+ "skipLibCheck": true,
13
+ "forceConsistentCasingInFileNames": true,
14
+ "moduleResolution": "node",
15
+ "allowUnusedLabels": false,
16
+ "allowUnreachableCode": false,
17
+ "exactOptionalPropertyTypes": true,
18
+ "noFallthroughCasesInSwitch": true,
19
+ "noImplicitOverride": true,
20
+ "noImplicitReturns": true,
21
+ "noPropertyAccessFromIndexSignature": true,
22
+ "noUncheckedIndexedAccess": true,
23
+ "noUnusedLocals": true,
24
+ "noUnusedParameters": true,
25
+ "importsNotUsedAsValues": "error",
26
+ "checkJs": true,
27
+ "declaration": true,
28
+ "declarationMap": true,
29
+ "plugins": [
30
+ {
31
+ "name": "typescript-strict-plugin"
32
+ }
33
+ ]
34
+ },
35
+ "include": ["src/**/*"],
36
+ "exclude": ["dist", "docs", "node_modules", "bin"]
37
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "compilerOptions": {
3
+ "types": ["jest", "node"]
4
+ }
5
+ }
package/typedoc.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "https://typedoc.org/schema.json",
3
+ "entryPoints": ["./src/index.ts", "./src/api/ssl.ts", "./src/api/ude.ts"],
4
+ "entryPointStrategy": "Expand",
5
+ "plugin": ["typedoc-theme-hierarchy"],
6
+ "theme": "hierarchy",
7
+ "name": "GINIS SDK",
8
+ "out": "docs"
9
+ }
@@ -0,0 +1,38 @@
1
+ const path = require('path')
2
+ const ESLintPlugin = require('eslint-webpack-plugin')
3
+
4
+ module.exports = {
5
+ entry: './src/index.ts',
6
+ devtool: 'inline-source-map',
7
+ module: {
8
+ rules: [
9
+ {
10
+ test: /\.tsx?$/,
11
+ use: 'ts-loader',
12
+ exclude: /node_modules/,
13
+ },
14
+ ],
15
+ },
16
+ resolve: {
17
+ extensions: ['.tsx', '.ts', '.js'],
18
+ },
19
+ output: {
20
+ path: path.resolve(__dirname, 'dist'),
21
+ filename: 'ginis-sdk.js',
22
+ globalObject: 'this',
23
+ library: {
24
+ name: 'ginis-sdk',
25
+ type: 'umd',
26
+ },
27
+ },
28
+ mode: 'production',
29
+ plugins: [new ESLintPlugin()],
30
+ externals: {
31
+ lodash: {
32
+ commonjs: 'lodash',
33
+ commonjs2: 'lodash',
34
+ amd: 'lodash',
35
+ root: '_',
36
+ },
37
+ },
38
+ }