@orchesty/connector-flexi-bee 1.0.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/CHANGELOG.md +7 -0
- package/LICENSE +190 -0
- package/coverage/clover.xml +389 -0
- package/coverage/coverage-final.json +19 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +161 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov-report/src/Batch/FlexiBeeFormaDopravyBatch.ts.html +145 -0
- package/coverage/lcov-report/src/Batch/FlexiBeeFormaUhradyBatch.ts.html +148 -0
- package/coverage/lcov-report/src/Batch/FlexiBeeGetSkladovyPohybBatch.ts.html +139 -0
- package/coverage/lcov-report/src/Batch/FlexiBeeObjednavkaPrijataBatch.ts.html +145 -0
- package/coverage/lcov-report/src/Batch/FlexiBeeObjednavkaVydanaBatch.ts.html +145 -0
- package/coverage/lcov-report/src/Batch/FlexiBeeSimpleIterator.ts.html +295 -0
- package/coverage/lcov-report/src/Batch/FlexiBeeSkladoveKartyBatch.ts.html +298 -0
- package/coverage/lcov-report/src/Batch/FlexiBeeStitkyBatch.ts.html +145 -0
- package/coverage/lcov-report/src/Batch/index.html +221 -0
- package/coverage/lcov-report/src/Connector/FlexiBeeCreateObjednavkaVydanaConnector.ts.html +322 -0
- package/coverage/lcov-report/src/Connector/FlexiBeeCreateSkladovyPohybConnector.ts.html +346 -0
- package/coverage/lcov-report/src/Connector/FlexiBeeGetCenikKartyConnector.ts.html +829 -0
- package/coverage/lcov-report/src/Connector/FlexiBeeGetObjednavkaVydanaConnector.ts.html +316 -0
- package/coverage/lcov-report/src/Connector/FlexiBeeGetSarzeExpiraceKartyConnector.ts.html +304 -0
- package/coverage/lcov-report/src/Connector/FlexiBeeUpdateObjednavkaPrijataConnector.ts.html +322 -0
- package/coverage/lcov-report/src/Connector/FlexiBeeUpdateSkladovyPohybConnector.ts.html +361 -0
- package/coverage/lcov-report/src/Connector/index.html +206 -0
- package/coverage/lcov-report/src/FexiBeeApplication.ts.html +694 -0
- package/coverage/lcov-report/src/FlexiBee.utils.ts.html +142 -0
- package/coverage/lcov-report/src/index.html +131 -0
- package/coverage/lcov-report/test/dataProvider.ts.html +496 -0
- package/coverage/lcov-report/test/index.html +116 -0
- package/coverage/lcov.info +633 -0
- package/dist/Batch/FlexiBeeFormaDopravyBatch.d.ts +12 -0
- package/dist/Batch/FlexiBeeFormaDopravyBatch.js +12 -0
- package/dist/Batch/FlexiBeeFormaUhradyBatch.d.ts +13 -0
- package/dist/Batch/FlexiBeeFormaUhradyBatch.js +12 -0
- package/dist/Batch/FlexiBeeGetSkladovyPohybBatch.d.ts +9 -0
- package/dist/Batch/FlexiBeeGetSkladovyPohybBatch.js +12 -0
- package/dist/Batch/FlexiBeeObjednavkaPrijataBatch.d.ts +10 -0
- package/dist/Batch/FlexiBeeObjednavkaPrijataBatch.js +13 -0
- package/dist/Batch/FlexiBeeObjednavkaVydanaBatch.d.ts +10 -0
- package/dist/Batch/FlexiBeeObjednavkaVydanaBatch.js +13 -0
- package/dist/Batch/FlexiBeeSimpleIterator.d.ts +10 -0
- package/dist/Batch/FlexiBeeSimpleIterator.js +44 -0
- package/dist/Batch/FlexiBeeSkladoveKartyBatch.d.ts +60 -0
- package/dist/Batch/FlexiBeeSkladoveKartyBatch.js +12 -0
- package/dist/Batch/FlexiBeeStitkyBatch.d.ts +12 -0
- package/dist/Batch/FlexiBeeStitkyBatch.js +12 -0
- package/dist/Connector/FlexiBeeCreateNewContactConnector.d.ts +7 -0
- package/dist/Connector/FlexiBeeCreateNewContactConnector.js +84 -0
- package/dist/Connector/FlexiBeeCreateObjednavkaVydanaConnector.d.ts +20 -0
- package/dist/Connector/FlexiBeeCreateObjednavkaVydanaConnector.js +45 -0
- package/dist/Connector/FlexiBeeCreateSkladovyPohybConnector.d.ts +28 -0
- package/dist/Connector/FlexiBeeCreateSkladovyPohybConnector.js +45 -0
- package/dist/Connector/FlexiBeeGetCenikKartyConnector.d.ts +209 -0
- package/dist/Connector/FlexiBeeGetCenikKartyConnector.js +25 -0
- package/dist/Connector/FlexiBeeGetContactsArrayConnector.d.ts +6 -0
- package/dist/Connector/FlexiBeeGetContactsArrayConnector.js +21 -0
- package/dist/Connector/FlexiBeeGetObjednavkaVydanaConnector.d.ts +23 -0
- package/dist/Connector/FlexiBeeGetObjednavkaVydanaConnector.js +47 -0
- package/dist/Connector/FlexiBeeGetSarzeExpiraceKartyConnector.d.ts +32 -0
- package/dist/Connector/FlexiBeeGetSarzeExpiraceKartyConnector.js +27 -0
- package/dist/Connector/FlexiBeeUpdateObjednavkaPrijataConnector.d.ts +20 -0
- package/dist/Connector/FlexiBeeUpdateObjednavkaPrijataConnector.js +45 -0
- package/dist/Connector/FlexiBeeUpdateSkladovyPohybConnector.d.ts +30 -0
- package/dist/Connector/FlexiBeeUpdateSkladovyPohybConnector.js +45 -0
- package/dist/FexiBeeApplication.d.ts +28 -0
- package/dist/FexiBeeApplication.js +179 -0
- package/dist/FlexiBee.utils.d.ts +2 -0
- package/dist/FlexiBee.utils.js +12 -0
- package/dist/package.json +22 -0
- package/dist/types/FlexiBeeObjednavkaPrijata.d.ts +152 -0
- package/dist/types/FlexiBeeObjednavkaPrijata.js +2 -0
- package/dist/types/FlexiBeeObjednavkaVydana.d.ts +186 -0
- package/dist/types/FlexiBeeObjednavkaVydana.js +2 -0
- package/dist/types/FlexiBeeSkladovyPohyb.d.ts +96 -0
- package/dist/types/FlexiBeeSkladovyPohyb.js +2 -0
- package/jest.config.js +13 -0
- package/package.json +22 -0
- package/src/Batch/FlexiBeeFormaDopravyBatch.ts +20 -0
- package/src/Batch/FlexiBeeFormaUhradyBatch.ts +21 -0
- package/src/Batch/FlexiBeeGetSkladovyPohybBatch.ts +18 -0
- package/src/Batch/FlexiBeeObjednavkaPrijataBatch.ts +20 -0
- package/src/Batch/FlexiBeeObjednavkaVydanaBatch.ts +20 -0
- package/src/Batch/FlexiBeeSimpleIterator.ts +70 -0
- package/src/Batch/FlexiBeeSkladoveKartyBatch.ts +71 -0
- package/src/Batch/FlexiBeeStitkyBatch.ts +20 -0
- package/src/Batch/__tests__/Data/FlexiBeeFormaDopravyBatch/input.json +6 -0
- package/src/Batch/__tests__/Data/FlexiBeeFormaDopravyBatch/mock.json +18 -0
- package/src/Batch/__tests__/Data/FlexiBeeFormaDopravyBatch/output.json +11 -0
- package/src/Batch/__tests__/Data/FlexiBeeFormaUhradyBatch/input.json +6 -0
- package/src/Batch/__tests__/Data/FlexiBeeFormaUhradyBatch/mock.json +19 -0
- package/src/Batch/__tests__/Data/FlexiBeeFormaUhradyBatch/output.json +11 -0
- package/src/Batch/__tests__/Data/FlexiBeeGetSkladovyPohybBatch/input.json +8 -0
- package/src/Batch/__tests__/Data/FlexiBeeGetSkladovyPohybBatch/mock.json +107 -0
- package/src/Batch/__tests__/Data/FlexiBeeGetSkladovyPohybBatch/output.json +11 -0
- package/src/Batch/__tests__/Data/FlexiBeeObjednavkaPrijataBatch/input.json +6 -0
- package/src/Batch/__tests__/Data/FlexiBeeObjednavkaPrijataBatch/mock.json +162 -0
- package/src/Batch/__tests__/Data/FlexiBeeObjednavkaPrijataBatch/output.json +11 -0
- package/src/Batch/__tests__/Data/FlexiBeeObjednavkaVydanaBatch/input.json +6 -0
- package/src/Batch/__tests__/Data/FlexiBeeObjednavkaVydanaBatch/mock.json +200 -0
- package/src/Batch/__tests__/Data/FlexiBeeObjednavkaVydanaBatch/output.json +11 -0
- package/src/Batch/__tests__/Data/FlexiBeeSkladoveKartyBatch/input.json +6 -0
- package/src/Batch/__tests__/Data/FlexiBeeSkladoveKartyBatch/mock.json +66 -0
- package/src/Batch/__tests__/Data/FlexiBeeSkladoveKartyBatch/output.json +11 -0
- package/src/Batch/__tests__/Data/FlexiBeeStitkyBatch/input.json +6 -0
- package/src/Batch/__tests__/Data/FlexiBeeStitkyBatch/mock.json +18 -0
- package/src/Batch/__tests__/Data/FlexiBeeStitkyBatch/output.json +11 -0
- package/src/Batch/__tests__/FlexiBeeFormaDopravyBatch.ts +17 -0
- package/src/Batch/__tests__/FlexiBeeFormaUhradyBatch.ts +17 -0
- package/src/Batch/__tests__/FlexiBeeGetSkladovyPohybBatch.ts +17 -0
- package/src/Batch/__tests__/FlexiBeeObjednavkaPrijataBatch.ts +17 -0
- package/src/Batch/__tests__/FlexiBeeObjednavkaVydanaBatch.ts +17 -0
- package/src/Batch/__tests__/FlexiBeeSkladoveKartyBatch.ts +17 -0
- package/src/Batch/__tests__/FlexiBeeStitkyBatch.ts +17 -0
- package/src/Connector/FlexiBeeCreateNewContactConnector.ts +98 -0
- package/src/Connector/FlexiBeeCreateObjednavkaVydanaConnector.ts +79 -0
- package/src/Connector/FlexiBeeCreateSkladovyPohybConnector.ts +87 -0
- package/src/Connector/FlexiBeeGetCenikKartyConnector.ts +248 -0
- package/src/Connector/FlexiBeeGetContactsArrayConnector.ts +28 -0
- package/src/Connector/FlexiBeeGetObjednavkaVydanaConnector.ts +77 -0
- package/src/Connector/FlexiBeeGetSarzeExpiraceKartyConnector.ts +73 -0
- package/src/Connector/FlexiBeeUpdateObjednavkaPrijataConnector.ts +79 -0
- package/src/Connector/FlexiBeeUpdateSkladovyPohybConnector.ts +92 -0
- package/src/Connector/__tests__/Data/FlexiBeeCreateObjednavkaVydanaConnector/input.json +8 -0
- package/src/Connector/__tests__/Data/FlexiBeeCreateObjednavkaVydanaConnector/mock.json +24 -0
- package/src/Connector/__tests__/Data/FlexiBeeCreateObjednavkaVydanaConnector/output.json +12 -0
- package/src/Connector/__tests__/Data/FlexiBeeCreateSkladovyPohybConnector/input.json +8 -0
- package/src/Connector/__tests__/Data/FlexiBeeCreateSkladovyPohybConnector/mock.json +24 -0
- package/src/Connector/__tests__/Data/FlexiBeeCreateSkladovyPohybConnector/output.json +12 -0
- package/src/Connector/__tests__/Data/FlexiBeeGetCenikKartyConnector/input.json +59 -0
- package/src/Connector/__tests__/Data/FlexiBeeGetCenikKartyConnector/mock.json +211 -0
- package/src/Connector/__tests__/Data/FlexiBeeGetCenikKartyConnector/output.json +261 -0
- package/src/Connector/__tests__/Data/FlexiBeeGetObjednavkaVydanaConnector/input.json +8 -0
- package/src/Connector/__tests__/Data/FlexiBeeGetObjednavkaVydanaConnector/mock.json +193 -0
- package/src/Connector/__tests__/Data/FlexiBeeGetObjednavkaVydanaConnector/output.json +187 -0
- package/src/Connector/__tests__/Data/FlexiBeeGetSarzeExpiraceKartyConnector/input.json +261 -0
- package/src/Connector/__tests__/Data/FlexiBeeGetSarzeExpiraceKartyConnector/mock.json +49 -0
- package/src/Connector/__tests__/Data/FlexiBeeGetSarzeExpiraceKartyConnector/output.json +301 -0
- package/src/Connector/__tests__/Data/FlexiBeeUpdateObjednavkaPrijataConnector/input.json +8 -0
- package/src/Connector/__tests__/Data/FlexiBeeUpdateObjednavkaPrijataConnector/mock.json +24 -0
- package/src/Connector/__tests__/Data/FlexiBeeUpdateObjednavkaPrijataConnector/output.json +12 -0
- package/src/Connector/__tests__/Data/FlexiBeeUpdateSkladovyPohybConnector/input.json +9 -0
- package/src/Connector/__tests__/Data/FlexiBeeUpdateSkladovyPohybConnector/mock.json +24 -0
- package/src/Connector/__tests__/Data/FlexiBeeUpdateSkladovyPohybConnector/output.json +12 -0
- package/src/Connector/__tests__/FlexiBeeCreateObjednavkaVydanaConnector.ts +17 -0
- package/src/Connector/__tests__/FlexiBeeCreateSkladovyPohybConnector.ts +17 -0
- package/src/Connector/__tests__/FlexiBeeGetCenikKartyConnector.ts +17 -0
- package/src/Connector/__tests__/FlexiBeeGetObjednavkaVydanaConnector.ts +17 -0
- package/src/Connector/__tests__/FlexiBeeGetSarzeExpiraceKartyConnector.ts +17 -0
- package/src/Connector/__tests__/FlexiBeeUpdateObjednavkaPrijataConnector.ts +17 -0
- package/src/Connector/__tests__/FlexiBeeUpdateSkladovyPohybConnector.ts +17 -0
- package/src/FexiBeeApplication.ts +203 -0
- package/src/FlexiBee.utils.ts +19 -0
- package/src/types/FlexiBeeObjednavkaPrijata.ts +153 -0
- package/src/types/FlexiBeeObjednavkaVydana.ts +188 -0
- package/src/types/FlexiBeeSkladovyPohyb.ts +97 -0
- package/test/dataProvider.ts +137 -0
- package/tsconfig.json +8 -0
- package/tsconfig.prod.json +13 -0
- package/tsconfig.prod.tsbuildinfo +1 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
{
|
|
2
|
+
"http": "GET https://demo.flexibee.eu/c/demo/objednavka-vydana.json?detail=full&add-row-count=true&start=0&limit=100&relations=polozkyObchDokladu",
|
|
3
|
+
"code": 200,
|
|
4
|
+
"body": {
|
|
5
|
+
"winstrom": {
|
|
6
|
+
"@version": "1.0",
|
|
7
|
+
"@rowCount": "1",
|
|
8
|
+
"objednavka-vydana": [
|
|
9
|
+
{
|
|
10
|
+
"id": "6",
|
|
11
|
+
"lastUpdate": "2024-09-03T11:53:55.425+02:00",
|
|
12
|
+
"kod": "00000002/19",
|
|
13
|
+
"zamekK": "zamek.otevreno",
|
|
14
|
+
"zamekK@showAs": "Otevřeno",
|
|
15
|
+
"cisDosle": "",
|
|
16
|
+
"cisSml": "",
|
|
17
|
+
"cisDodak": "",
|
|
18
|
+
"doprava": "",
|
|
19
|
+
"datVyst": "2019-12-31+01:00",
|
|
20
|
+
"datTermin": "",
|
|
21
|
+
"datSazbyDph": "2019-12-31+01:00",
|
|
22
|
+
"popis": "",
|
|
23
|
+
"poznam": "",
|
|
24
|
+
"uvodTxt": "",
|
|
25
|
+
"zavTxt": "",
|
|
26
|
+
"sumOsv": "0.0",
|
|
27
|
+
"sumZklSniz": "0.0",
|
|
28
|
+
"sumZklSniz2": "0.0",
|
|
29
|
+
"sumZklZakl": "0.0",
|
|
30
|
+
"sumZklCelkem": "0.0",
|
|
31
|
+
"sumDphSniz": "0.0",
|
|
32
|
+
"sumDphSniz2": "0.0",
|
|
33
|
+
"sumDphZakl": "0.0",
|
|
34
|
+
"sumDphCelkem": "0.0",
|
|
35
|
+
"sumCelkSniz": "0.0",
|
|
36
|
+
"sumCelkSniz2": "0.0",
|
|
37
|
+
"sumCelkZakl": "0.0",
|
|
38
|
+
"sumCelkem": "0.0",
|
|
39
|
+
"sumOsvMen": "0.0",
|
|
40
|
+
"sumZklSnizMen": "0.0",
|
|
41
|
+
"sumZklSniz2Men": "0.0",
|
|
42
|
+
"sumZklZaklMen": "0.0",
|
|
43
|
+
"sumZklCelkemMen": "0.0",
|
|
44
|
+
"sumDphZaklMen": "0.0",
|
|
45
|
+
"sumDphSnizMen": "0.0",
|
|
46
|
+
"sumDphSniz2Men": "0.0",
|
|
47
|
+
"sumDphCelkemMen": "0.0",
|
|
48
|
+
"sumCelkSnizMen": "0.0",
|
|
49
|
+
"sumCelkSniz2Men": "0.0",
|
|
50
|
+
"sumCelkZaklMen": "0.0",
|
|
51
|
+
"sumCelkemMen": "0.0",
|
|
52
|
+
"slevaDokl": "0.0",
|
|
53
|
+
"kurz": "0.0",
|
|
54
|
+
"kurzMnozstvi": "0.0",
|
|
55
|
+
"stavUzivK": "stavDoklObch.hotovo",
|
|
56
|
+
"stavUzivK@showAs": "Hotovo",
|
|
57
|
+
"nazFirmy": "Fresharena, s.r.o.",
|
|
58
|
+
"ulice": "Muchova 7",
|
|
59
|
+
"mesto": "Brno",
|
|
60
|
+
"psc": "613 00",
|
|
61
|
+
"eanKod": "",
|
|
62
|
+
"ic": "25311506",
|
|
63
|
+
"dic": "CZ25311506",
|
|
64
|
+
"pocetPriloh": "0",
|
|
65
|
+
"postovniShodna": "true",
|
|
66
|
+
"faNazev": "",
|
|
67
|
+
"faNazev2": "",
|
|
68
|
+
"faUlice": "",
|
|
69
|
+
"faMesto": "",
|
|
70
|
+
"faPsc": "",
|
|
71
|
+
"faEanKod": "",
|
|
72
|
+
"bezPolozek": "false",
|
|
73
|
+
"szbDphSniz": "15.0",
|
|
74
|
+
"szbDphSniz2": "10.0",
|
|
75
|
+
"szbDphZakl": "21.0",
|
|
76
|
+
"storno": "true",
|
|
77
|
+
"stitky": "",
|
|
78
|
+
"typDokl": "code:POTVRZENO",
|
|
79
|
+
"typDokl@ref": "/c/demo/typ-objednavky-vydane/126.json",
|
|
80
|
+
"typDokl@showAs": "POTVRZENO: Potvrzeno",
|
|
81
|
+
"mena": "code:CZK",
|
|
82
|
+
"mena@ref": "/c/demo/mena/31.json",
|
|
83
|
+
"mena@showAs": "CZK: Česká koruna",
|
|
84
|
+
"firma": "code:5668",
|
|
85
|
+
"firma@ref": "/c/demo/adresar/657.json",
|
|
86
|
+
"firma@showAs": "5668: Fresharena, s.r.o.",
|
|
87
|
+
"stat": "code:CZ",
|
|
88
|
+
"stat@ref": "/c/demo/stat/39.json",
|
|
89
|
+
"stat@showAs": "Česká republika",
|
|
90
|
+
"faStat": "",
|
|
91
|
+
"stredisko": "code:C",
|
|
92
|
+
"stredisko@ref": "/c/demo/stredisko/1.json",
|
|
93
|
+
"stredisko@showAs": "C: Centrála",
|
|
94
|
+
"cinnost": "",
|
|
95
|
+
"zakazka": "",
|
|
96
|
+
"uzivatel": "code:oradl",
|
|
97
|
+
"uzivatel@ref": "/c/demo/uzivatel/1.json",
|
|
98
|
+
"uzivatel@showAs": "Tomáš Těžký",
|
|
99
|
+
"zodpOsoba": "code:oradl",
|
|
100
|
+
"zodpOsoba@ref": "/c/demo/uzivatel/1.json",
|
|
101
|
+
"zodpOsoba@showAs": "Tomáš Těžký",
|
|
102
|
+
"kontaktOsoba": "",
|
|
103
|
+
"kontaktJmeno": "",
|
|
104
|
+
"kontaktEmail": "",
|
|
105
|
+
"kontaktTel": "",
|
|
106
|
+
"rada": "code:OBV",
|
|
107
|
+
"rada@showAs": "OBV: Objednávka vydaná",
|
|
108
|
+
"rada@if-not-found": "null",
|
|
109
|
+
"rada@ref": "/c/demo/rada-objednavky-vydane/17.json",
|
|
110
|
+
"formaDopravy": "",
|
|
111
|
+
"uuid": "1bf3707e1e1a8e0ccde82a80b5f3541b2cd0780e",
|
|
112
|
+
"source": "",
|
|
113
|
+
"dodatNa": "",
|
|
114
|
+
"formaUhradyCis": "",
|
|
115
|
+
"typDoklNabFak": "",
|
|
116
|
+
"stavDoklObch": "code:HOTOVO",
|
|
117
|
+
"stavDoklObch@ref": "/c/demo/stav-obchodniho-dokladu/9.json",
|
|
118
|
+
"stavDoklObch@showAs": "HOTOVO: Hotovo",
|
|
119
|
+
"polozkyObchDokladu": [
|
|
120
|
+
{
|
|
121
|
+
"id": "8",
|
|
122
|
+
"lastUpdate": "2024-09-03T11:53:55.425+02:00",
|
|
123
|
+
"kod": "RÁFEK",
|
|
124
|
+
"eanKod": "",
|
|
125
|
+
"nazev": "Ráfek kola",
|
|
126
|
+
"nazevA": "",
|
|
127
|
+
"nazevB": "",
|
|
128
|
+
"nazevC": "",
|
|
129
|
+
"cisRad": "1",
|
|
130
|
+
"typPolozkyK": "typPolozky.katalog",
|
|
131
|
+
"typPolozkyK@showAs": "Položka z ceníku",
|
|
132
|
+
"baleniId": "0",
|
|
133
|
+
"mnozBaleni": "0.0",
|
|
134
|
+
"mnozMj": "3.0",
|
|
135
|
+
"typCenyDphK": "typCeny.bezDph",
|
|
136
|
+
"typCenyDphK@showAs": "bez DPH",
|
|
137
|
+
"typSzbDphK": "typSzbDph.dphZakl",
|
|
138
|
+
"typSzbDphK@showAs": "základní",
|
|
139
|
+
"szbDph": "21.0",
|
|
140
|
+
"cenaMj": "0.0",
|
|
141
|
+
"slevaPol": "0.0",
|
|
142
|
+
"uplSlevaDokl": "true",
|
|
143
|
+
"sumZkl": "0.0",
|
|
144
|
+
"sumDph": "0.0",
|
|
145
|
+
"sumCelkem": "0.0",
|
|
146
|
+
"sumZklMen": "0.0",
|
|
147
|
+
"sumDphMen": "0.0",
|
|
148
|
+
"sumCelkemMen": "0.0",
|
|
149
|
+
"objem": "0.0",
|
|
150
|
+
"cenJednotka": "1.0",
|
|
151
|
+
"objednatK": "",
|
|
152
|
+
"mnozMjPlan": "3.0",
|
|
153
|
+
"mnozMjReal": "3.0",
|
|
154
|
+
"autogen": "false",
|
|
155
|
+
"poznam": "",
|
|
156
|
+
"slevaDokl": "0.0",
|
|
157
|
+
"datVyst": "2019-12-31+01:00",
|
|
158
|
+
"kopZakazku": "true",
|
|
159
|
+
"kopStred": "true",
|
|
160
|
+
"kopCinnost": "true",
|
|
161
|
+
"kopKlice": "true",
|
|
162
|
+
"storno": "true",
|
|
163
|
+
"stornoPol": "false",
|
|
164
|
+
"sklad": "code:LIBEREC",
|
|
165
|
+
"sklad@ref": "/c/demo/sklad/5.json",
|
|
166
|
+
"sklad@showAs": "LIBEREC: Liberecký sklad",
|
|
167
|
+
"stredisko": "code:C",
|
|
168
|
+
"stredisko@ref": "/c/demo/stredisko/1.json",
|
|
169
|
+
"stredisko@showAs": "C: Centrála",
|
|
170
|
+
"cinnost": "",
|
|
171
|
+
"mena": "code:CZK",
|
|
172
|
+
"mena@ref": "/c/demo/mena/31.json",
|
|
173
|
+
"mena@showAs": "CZK: Česká koruna",
|
|
174
|
+
"zakazka": "",
|
|
175
|
+
"dodavatel": "",
|
|
176
|
+
"cenik": "code:RÁFEK",
|
|
177
|
+
"cenik@ref": "/c/demo/cenik/166.json",
|
|
178
|
+
"cenik@showAs": "RÁFEK: Ráfek kola",
|
|
179
|
+
"mj": "",
|
|
180
|
+
"mjObjem": "",
|
|
181
|
+
"sazbaDph": "23",
|
|
182
|
+
"sazbaDph@showAs": "21 %",
|
|
183
|
+
"sazbaDph@if-not-found": "null",
|
|
184
|
+
"sazbaDph@ref": "/c/demo/sazba-dph/23.json",
|
|
185
|
+
"idPolObchZdroj": "",
|
|
186
|
+
"stitky": "",
|
|
187
|
+
"source": "",
|
|
188
|
+
"doklObch": "code:00000002/19",
|
|
189
|
+
"doklObch@ref": "/c/demo/objednavka-vydana/6.json",
|
|
190
|
+
"doklObch@showAs": "00000002/19",
|
|
191
|
+
"poplatekParentPolObch": "",
|
|
192
|
+
"datTermin": "",
|
|
193
|
+
"kopDatTermin": "true"
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"headers": {
|
|
3
|
+
"user": "TestUser"
|
|
4
|
+
},
|
|
5
|
+
"data": [
|
|
6
|
+
{
|
|
7
|
+
"body": "{\"id\":\"6\",\"lastUpdate\":\"2024-09-03T11:53:55.425+02:00\",\"kod\":\"00000002/19\",\"zamekK\":\"zamek.otevreno\",\"zamekK@showAs\":\"Otevřeno\",\"cisDosle\":\"\",\"cisSml\":\"\",\"cisDodak\":\"\",\"doprava\":\"\",\"datVyst\":\"2019-12-31+01:00\",\"datTermin\":\"\",\"datSazbyDph\":\"2019-12-31+01:00\",\"popis\":\"\",\"poznam\":\"\",\"uvodTxt\":\"\",\"zavTxt\":\"\",\"sumOsv\":\"0.0\",\"sumZklSniz\":\"0.0\",\"sumZklSniz2\":\"0.0\",\"sumZklZakl\":\"0.0\",\"sumZklCelkem\":\"0.0\",\"sumDphSniz\":\"0.0\",\"sumDphSniz2\":\"0.0\",\"sumDphZakl\":\"0.0\",\"sumDphCelkem\":\"0.0\",\"sumCelkSniz\":\"0.0\",\"sumCelkSniz2\":\"0.0\",\"sumCelkZakl\":\"0.0\",\"sumCelkem\":\"0.0\",\"sumOsvMen\":\"0.0\",\"sumZklSnizMen\":\"0.0\",\"sumZklSniz2Men\":\"0.0\",\"sumZklZaklMen\":\"0.0\",\"sumZklCelkemMen\":\"0.0\",\"sumDphZaklMen\":\"0.0\",\"sumDphSnizMen\":\"0.0\",\"sumDphSniz2Men\":\"0.0\",\"sumDphCelkemMen\":\"0.0\",\"sumCelkSnizMen\":\"0.0\",\"sumCelkSniz2Men\":\"0.0\",\"sumCelkZaklMen\":\"0.0\",\"sumCelkemMen\":\"0.0\",\"slevaDokl\":\"0.0\",\"kurz\":\"0.0\",\"kurzMnozstvi\":\"0.0\",\"stavUzivK\":\"stavDoklObch.hotovo\",\"stavUzivK@showAs\":\"Hotovo\",\"nazFirmy\":\"Fresharena, s.r.o.\",\"ulice\":\"Muchova 7\",\"mesto\":\"Brno\",\"psc\":\"613 00\",\"eanKod\":\"\",\"ic\":\"25311506\",\"dic\":\"CZ25311506\",\"pocetPriloh\":\"0\",\"postovniShodna\":\"true\",\"faNazev\":\"\",\"faNazev2\":\"\",\"faUlice\":\"\",\"faMesto\":\"\",\"faPsc\":\"\",\"faEanKod\":\"\",\"bezPolozek\":\"false\",\"szbDphSniz\":\"15.0\",\"szbDphSniz2\":\"10.0\",\"szbDphZakl\":\"21.0\",\"storno\":\"true\",\"stitky\":\"\",\"typDokl\":\"code:POTVRZENO\",\"typDokl@ref\":\"/c/demo/typ-objednavky-vydane/126.json\",\"typDokl@showAs\":\"POTVRZENO: Potvrzeno\",\"mena\":\"code:CZK\",\"mena@ref\":\"/c/demo/mena/31.json\",\"mena@showAs\":\"CZK: Česká koruna\",\"firma\":\"code:5668\",\"firma@ref\":\"/c/demo/adresar/657.json\",\"firma@showAs\":\"5668: Fresharena, s.r.o.\",\"stat\":\"code:CZ\",\"stat@ref\":\"/c/demo/stat/39.json\",\"stat@showAs\":\"Česká republika\",\"faStat\":\"\",\"stredisko\":\"code:C\",\"stredisko@ref\":\"/c/demo/stredisko/1.json\",\"stredisko@showAs\":\"C: Centrála\",\"cinnost\":\"\",\"zakazka\":\"\",\"uzivatel\":\"code:oradl\",\"uzivatel@ref\":\"/c/demo/uzivatel/1.json\",\"uzivatel@showAs\":\"Tomáš Těžký\",\"zodpOsoba\":\"code:oradl\",\"zodpOsoba@ref\":\"/c/demo/uzivatel/1.json\",\"zodpOsoba@showAs\":\"Tomáš Těžký\",\"kontaktOsoba\":\"\",\"kontaktJmeno\":\"\",\"kontaktEmail\":\"\",\"kontaktTel\":\"\",\"rada\":\"code:OBV\",\"rada@showAs\":\"OBV: Objednávka vydaná\",\"rada@if-not-found\":\"null\",\"rada@ref\":\"/c/demo/rada-objednavky-vydane/17.json\",\"formaDopravy\":\"\",\"uuid\":\"1bf3707e1e1a8e0ccde82a80b5f3541b2cd0780e\",\"source\":\"\",\"dodatNa\":\"\",\"formaUhradyCis\":\"\",\"typDoklNabFak\":\"\",\"stavDoklObch\":\"code:HOTOVO\",\"stavDoklObch@ref\":\"/c/demo/stav-obchodniho-dokladu/9.json\",\"stavDoklObch@showAs\":\"HOTOVO: Hotovo\",\"polozkyObchDokladu\":[{\"id\":\"8\",\"lastUpdate\":\"2024-09-03T11:53:55.425+02:00\",\"kod\":\"RÁFEK\",\"eanKod\":\"\",\"nazev\":\"Ráfek kola\",\"nazevA\":\"\",\"nazevB\":\"\",\"nazevC\":\"\",\"cisRad\":\"1\",\"typPolozkyK\":\"typPolozky.katalog\",\"typPolozkyK@showAs\":\"Položka z ceníku\",\"baleniId\":\"0\",\"mnozBaleni\":\"0.0\",\"mnozMj\":\"3.0\",\"typCenyDphK\":\"typCeny.bezDph\",\"typCenyDphK@showAs\":\"bez DPH\",\"typSzbDphK\":\"typSzbDph.dphZakl\",\"typSzbDphK@showAs\":\"základní\",\"szbDph\":\"21.0\",\"cenaMj\":\"0.0\",\"slevaPol\":\"0.0\",\"uplSlevaDokl\":\"true\",\"sumZkl\":\"0.0\",\"sumDph\":\"0.0\",\"sumCelkem\":\"0.0\",\"sumZklMen\":\"0.0\",\"sumDphMen\":\"0.0\",\"sumCelkemMen\":\"0.0\",\"objem\":\"0.0\",\"cenJednotka\":\"1.0\",\"objednatK\":\"\",\"mnozMjPlan\":\"3.0\",\"mnozMjReal\":\"3.0\",\"autogen\":\"false\",\"poznam\":\"\",\"slevaDokl\":\"0.0\",\"datVyst\":\"2019-12-31+01:00\",\"kopZakazku\":\"true\",\"kopStred\":\"true\",\"kopCinnost\":\"true\",\"kopKlice\":\"true\",\"storno\":\"true\",\"stornoPol\":\"false\",\"sklad\":\"code:LIBEREC\",\"sklad@ref\":\"/c/demo/sklad/5.json\",\"sklad@showAs\":\"LIBEREC: Liberecký sklad\",\"stredisko\":\"code:C\",\"stredisko@ref\":\"/c/demo/stredisko/1.json\",\"stredisko@showAs\":\"C: Centrála\",\"cinnost\":\"\",\"mena\":\"code:CZK\",\"mena@ref\":\"/c/demo/mena/31.json\",\"mena@showAs\":\"CZK: Česká koruna\",\"zakazka\":\"\",\"dodavatel\":\"\",\"cenik\":\"code:RÁFEK\",\"cenik@ref\":\"/c/demo/cenik/166.json\",\"cenik@showAs\":\"RÁFEK: Ráfek kola\",\"mj\":\"\",\"mjObjem\":\"\",\"sazbaDph\":\"23\",\"sazbaDph@showAs\":\"21 %\",\"sazbaDph@if-not-found\":\"null\",\"sazbaDph@ref\":\"/c/demo/sazba-dph/23.json\",\"idPolObchZdroj\":\"\",\"stitky\":\"\",\"source\":\"\",\"doklObch\":\"code:00000002/19\",\"doklObch@ref\":\"/c/demo/objednavka-vydana/6.json\",\"doklObch@showAs\":\"00000002/19\",\"poplatekParentPolObch\":\"\",\"datTermin\":\"\",\"kopDatTermin\":\"true\"}]}",
|
|
8
|
+
"headers": {}
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"http": "GET https://demo.flexibee.eu/c/demo/skladova-karta.json?detail=full&add-row-count=true&start=0&limit=100",
|
|
3
|
+
"code": 200,
|
|
4
|
+
"body": {
|
|
5
|
+
"winstrom": {
|
|
6
|
+
"@version": "1.0",
|
|
7
|
+
"@rowCount": "1",
|
|
8
|
+
"skladova-karta": [
|
|
9
|
+
{
|
|
10
|
+
"id": "1",
|
|
11
|
+
"lastUpdate": "2023-06-06T13:54:08.663+02:00",
|
|
12
|
+
"prumCenaTuz": "0.0",
|
|
13
|
+
"prumCenaMen": "0.0",
|
|
14
|
+
"stavMJ": "20.0",
|
|
15
|
+
"stavTuz": "0.0",
|
|
16
|
+
"stavMen": "0.0",
|
|
17
|
+
"datPosl": "2020-11-01+01:00",
|
|
18
|
+
"pocatMJ": "0.0",
|
|
19
|
+
"pocatTuz": "0.0",
|
|
20
|
+
"pocatMen": "0.0",
|
|
21
|
+
"minMJ": "0.0",
|
|
22
|
+
"maxMJ": "0.0",
|
|
23
|
+
"rezervMJ": "0.0",
|
|
24
|
+
"datStavMJ": "0.0",
|
|
25
|
+
"datStavTuz": "0.0",
|
|
26
|
+
"datStavMen": "0.0",
|
|
27
|
+
"poslCenaTuz": "0.0",
|
|
28
|
+
"poslCenaMen": "0.0",
|
|
29
|
+
"vydExpir": "false",
|
|
30
|
+
"popis": "",
|
|
31
|
+
"popisA": "",
|
|
32
|
+
"popisB": "",
|
|
33
|
+
"popisC": "",
|
|
34
|
+
"poznamVelka": "",
|
|
35
|
+
"nazev": "Baterie sprch. pod omitku Focus E 2",
|
|
36
|
+
"nazevA": "",
|
|
37
|
+
"nazevB": "",
|
|
38
|
+
"nazevC": "",
|
|
39
|
+
"cenPopis": "popis1",
|
|
40
|
+
"cenPopisA": "",
|
|
41
|
+
"cenPopisB": "",
|
|
42
|
+
"cenPopisC": "",
|
|
43
|
+
"cenPoznam": "poznamka",
|
|
44
|
+
"pozadavkyMj": "0.0",
|
|
45
|
+
"stavMjSPozadavky": "48.0",
|
|
46
|
+
"dostupMj": "48.0",
|
|
47
|
+
"ucetObdobi": "code:2020",
|
|
48
|
+
"ucetObdobi@ref": "/c/demo/ucetni-obdobi/1.json",
|
|
49
|
+
"ucetObdobi@showAs": "2020",
|
|
50
|
+
"cenik": "code:31967000",
|
|
51
|
+
"cenik@ref": "/c/demo/cenik/2.json",
|
|
52
|
+
"cenik@showAs": "31967000: Baterie sprch. pod omitku Focus E 2",
|
|
53
|
+
"sklad": "code:LIBEREC",
|
|
54
|
+
"sklad@ref": "/c/demo/sklad/5.json",
|
|
55
|
+
"sklad@showAs": "LIBEREC: Liberecký sklad",
|
|
56
|
+
"typDokl": "code:LIBEREC",
|
|
57
|
+
"typDokl@ref": "/c/demo/sklad/5.json",
|
|
58
|
+
"typDokl@showAs": "LIBEREC: Liberecký sklad",
|
|
59
|
+
"mistnost": "",
|
|
60
|
+
"regal": "",
|
|
61
|
+
"police": ""
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"headers": {
|
|
3
|
+
"user": "TestUser"
|
|
4
|
+
},
|
|
5
|
+
"data": [
|
|
6
|
+
{
|
|
7
|
+
"body": "{\"id\":\"1\",\"lastUpdate\":\"2023-06-06T13:54:08.663+02:00\",\"prumCenaTuz\":\"0.0\",\"prumCenaMen\":\"0.0\",\"stavMJ\":\"20.0\",\"stavTuz\":\"0.0\",\"stavMen\":\"0.0\",\"datPosl\":\"2020-11-01+01:00\",\"pocatMJ\":\"0.0\",\"pocatTuz\":\"0.0\",\"pocatMen\":\"0.0\",\"minMJ\":\"0.0\",\"maxMJ\":\"0.0\",\"rezervMJ\":\"0.0\",\"datStavMJ\":\"0.0\",\"datStavTuz\":\"0.0\",\"datStavMen\":\"0.0\",\"poslCenaTuz\":\"0.0\",\"poslCenaMen\":\"0.0\",\"vydExpir\":\"false\",\"popis\":\"\",\"popisA\":\"\",\"popisB\":\"\",\"popisC\":\"\",\"poznamVelka\":\"\",\"nazev\":\"Baterie sprch. pod omitku Focus E 2\",\"nazevA\":\"\",\"nazevB\":\"\",\"nazevC\":\"\",\"cenPopis\":\"popis1\",\"cenPopisA\":\"\",\"cenPopisB\":\"\",\"cenPopisC\":\"\",\"cenPoznam\":\"poznamka\",\"pozadavkyMj\":\"0.0\",\"stavMjSPozadavky\":\"48.0\",\"dostupMj\":\"48.0\",\"ucetObdobi\":\"code:2020\",\"ucetObdobi@ref\":\"/c/demo/ucetni-obdobi/1.json\",\"ucetObdobi@showAs\":\"2020\",\"cenik\":\"code:31967000\",\"cenik@ref\":\"/c/demo/cenik/2.json\",\"cenik@showAs\":\"31967000: Baterie sprch. pod omitku Focus E 2\",\"sklad\":\"code:LIBEREC\",\"sklad@ref\":\"/c/demo/sklad/5.json\",\"sklad@showAs\":\"LIBEREC: Liberecký sklad\",\"typDokl\":\"code:LIBEREC\",\"typDokl@ref\":\"/c/demo/sklad/5.json\",\"typDokl@showAs\":\"LIBEREC: Liberecký sklad\",\"mistnost\":\"\",\"regal\":\"\",\"police\":\"\"}",
|
|
8
|
+
"headers": {}
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"http": "GET https://demo.flexibee.eu/c/demo/stitek.json?detail=full&add-row-count=true&start=0&limit=100",
|
|
3
|
+
"code": 200,
|
|
4
|
+
"body": {
|
|
5
|
+
"winstrom": {
|
|
6
|
+
"@version": "1.0",
|
|
7
|
+
"@rowCount": "1",
|
|
8
|
+
"stitek": [
|
|
9
|
+
{
|
|
10
|
+
"id": "107",
|
|
11
|
+
"lastUpdate": "2024-02-12T08:43:33.137+01:00",
|
|
12
|
+
"kod": "AAAA",
|
|
13
|
+
"nazev": "Aaaaaa"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
|
|
2
|
+
import NodeTester from '@orchesty/nodejs-sdk/dist/test/Testers/NodeTester';
|
|
3
|
+
import { initFlexiBeeTest } from '../../../test/dataProvider';
|
|
4
|
+
import { FLEXI_BEE_FORMA_DOPRAVY_BATCH } from '../FlexiBeeFormaDopravyBatch';
|
|
5
|
+
|
|
6
|
+
let tester: NodeTester;
|
|
7
|
+
|
|
8
|
+
describe('Tests for FlexiBeeFormaDopravyBatch', () => {
|
|
9
|
+
beforeAll(() => {
|
|
10
|
+
tester = new NodeTester(container, __filename);
|
|
11
|
+
initFlexiBeeTest();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('process - ok', async () => {
|
|
15
|
+
await tester.testBatch(FLEXI_BEE_FORMA_DOPRAVY_BATCH);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
|
|
2
|
+
import NodeTester from '@orchesty/nodejs-sdk/dist/test/Testers/NodeTester';
|
|
3
|
+
import { initFlexiBeeTest } from '../../../test/dataProvider';
|
|
4
|
+
import { FLEXI_BEE_FORMA_UHRADY_BATCH } from '../FlexiBeeFormaUhradyBatch';
|
|
5
|
+
|
|
6
|
+
let tester: NodeTester;
|
|
7
|
+
|
|
8
|
+
describe('Tests for FlexiBeeFormaUhradyBatch', () => {
|
|
9
|
+
beforeAll(() => {
|
|
10
|
+
tester = new NodeTester(container, __filename);
|
|
11
|
+
initFlexiBeeTest();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('process - ok', async () => {
|
|
15
|
+
await tester.testBatch(FLEXI_BEE_FORMA_UHRADY_BATCH);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
|
|
2
|
+
import NodeTester from '@orchesty/nodejs-sdk/dist/test/Testers/NodeTester';
|
|
3
|
+
import { initFlexiBeeTest } from '../../../test/dataProvider';
|
|
4
|
+
import { FLEXI_BEE_GET_SKLADOVY_POHYB_BATCH } from '../FlexiBeeGetSkladovyPohybBatch';
|
|
5
|
+
|
|
6
|
+
let tester: NodeTester;
|
|
7
|
+
|
|
8
|
+
describe('Tests for FlexiBeeGetSkladovyPohybBatch', () => {
|
|
9
|
+
beforeAll(() => {
|
|
10
|
+
tester = new NodeTester(container, __filename);
|
|
11
|
+
initFlexiBeeTest();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('process - ok', async () => {
|
|
15
|
+
await tester.testBatch(FLEXI_BEE_GET_SKLADOVY_POHYB_BATCH);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
|
|
2
|
+
import NodeTester from '@orchesty/nodejs-sdk/dist/test/Testers/NodeTester';
|
|
3
|
+
import { initFlexiBeeTest } from '../../../test/dataProvider';
|
|
4
|
+
import { FLEXI_BEE_OBJEDNAVKA_PRIJATA_BATCH } from '../FlexiBeeObjednavkaPrijataBatch';
|
|
5
|
+
|
|
6
|
+
let tester: NodeTester;
|
|
7
|
+
|
|
8
|
+
describe('Tests for FlexiBeeObjednavkaPrijataBatch', () => {
|
|
9
|
+
beforeAll(() => {
|
|
10
|
+
tester = new NodeTester(container, __filename);
|
|
11
|
+
initFlexiBeeTest();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('process - ok', async () => {
|
|
15
|
+
await tester.testBatch(FLEXI_BEE_OBJEDNAVKA_PRIJATA_BATCH);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
|
|
2
|
+
import NodeTester from '@orchesty/nodejs-sdk/dist/test/Testers/NodeTester';
|
|
3
|
+
import { initFlexiBeeTest } from '../../../test/dataProvider';
|
|
4
|
+
import { FLEXI_BEE_OBJEDNAVKA_VYDANA_BATCH } from '../FlexiBeeObjednavkaVydanaBatch';
|
|
5
|
+
|
|
6
|
+
let tester: NodeTester;
|
|
7
|
+
|
|
8
|
+
describe('Tests for FlexiBeeObjednavkaVydanaBatch', () => {
|
|
9
|
+
beforeAll(() => {
|
|
10
|
+
tester = new NodeTester(container, __filename);
|
|
11
|
+
initFlexiBeeTest();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('process - ok', async () => {
|
|
15
|
+
await tester.testBatch(FLEXI_BEE_OBJEDNAVKA_VYDANA_BATCH);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
|
|
2
|
+
import NodeTester from '@orchesty/nodejs-sdk/dist/test/Testers/NodeTester';
|
|
3
|
+
import { initFlexiBeeTest } from '../../../test/dataProvider';
|
|
4
|
+
import { FLEXI_BEE_SKLADOVE_KARTY_BATCH } from '../FlexiBeeSkladoveKartyBatch';
|
|
5
|
+
|
|
6
|
+
let tester: NodeTester;
|
|
7
|
+
|
|
8
|
+
describe('Tests for FlexiBeeSkladoveKartyBatch', () => {
|
|
9
|
+
beforeAll(() => {
|
|
10
|
+
tester = new NodeTester(container, __filename);
|
|
11
|
+
initFlexiBeeTest();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('process - ok', async () => {
|
|
15
|
+
await tester.testBatch(FLEXI_BEE_SKLADOVE_KARTY_BATCH);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { container } from '@orchesty/nodejs-connectors/test/TestAbstract';
|
|
2
|
+
import NodeTester from '@orchesty/nodejs-sdk/dist/test/Testers/NodeTester';
|
|
3
|
+
import { initFlexiBeeTest } from '../../../test/dataProvider';
|
|
4
|
+
import { FLEXI_BEE_STITKY_BATCH } from '../FlexiBeeStitkyBatch';
|
|
5
|
+
|
|
6
|
+
let tester: NodeTester;
|
|
7
|
+
|
|
8
|
+
describe('Tests for FlexiBeeStitkyBatch', () => {
|
|
9
|
+
beforeAll(() => {
|
|
10
|
+
tester = new NodeTester(container, __filename);
|
|
11
|
+
initFlexiBeeTest();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('process - ok', async () => {
|
|
15
|
+
await tester.testBatch(FLEXI_BEE_STITKY_BATCH);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
+
import { HttpMethods } from '@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods';
|
|
3
|
+
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
4
|
+
import ResultCode from '@orchesty/nodejs-sdk/dist/lib/Utils/ResultCode';
|
|
5
|
+
import FlexiBeeApplication from '../FexiBeeApplication';
|
|
6
|
+
|
|
7
|
+
export const NAME = 'flexibee-create-new-contact';
|
|
8
|
+
|
|
9
|
+
export default class FlexiBeeCreateNewContactConnector extends AConnector {
|
|
10
|
+
|
|
11
|
+
public getName(): string {
|
|
12
|
+
return NAME;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
public async processAction(dto: ProcessDto<Record<string, string>>): Promise<ProcessDto> {
|
|
16
|
+
const acceptedParams = ['name', 'use-demo', 'country', 'org-type', 'ic', 'vatid'];
|
|
17
|
+
|
|
18
|
+
const countryArrayWithTypes: Record<string, string[]> = {
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
20
|
+
CZ: [
|
|
21
|
+
'PODNIKATELE+PU',
|
|
22
|
+
'PODNIKATELE+DE',
|
|
23
|
+
'NEZISKOVE',
|
|
24
|
+
'ROZPOCTOVE',
|
|
25
|
+
],
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
27
|
+
SK: [
|
|
28
|
+
'PODNIKATELIA+PU',
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
let url = '';
|
|
33
|
+
let name;
|
|
34
|
+
let country: string | undefined;
|
|
35
|
+
let orgType;
|
|
36
|
+
const dtoDataArray = dto.getJsonData();
|
|
37
|
+
const { length } = Object.keys(dtoDataArray);
|
|
38
|
+
|
|
39
|
+
Object.entries(dtoDataArray)
|
|
40
|
+
.forEach(([key, value], index) => {
|
|
41
|
+
if (acceptedParams.includes(key) && value) {
|
|
42
|
+
switch (key) {
|
|
43
|
+
case 'name':
|
|
44
|
+
name = value;
|
|
45
|
+
break;
|
|
46
|
+
case 'country':
|
|
47
|
+
if (countryArrayWithTypes[value]) {
|
|
48
|
+
country = value;
|
|
49
|
+
}
|
|
50
|
+
break;
|
|
51
|
+
case 'org-type':
|
|
52
|
+
orgType = value;
|
|
53
|
+
break;
|
|
54
|
+
default:
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (index + 1 !== length) {
|
|
59
|
+
url = `${url}${key}=${value}&`;
|
|
60
|
+
} else {
|
|
61
|
+
url = `${url}${key}=${value}`;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
if (!name) {
|
|
67
|
+
dto.setStopProcess(ResultCode.DO_NOT_CONTINUE, 'Název organizace musí být vyplněný');
|
|
68
|
+
return dto;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (country) {
|
|
72
|
+
if (orgType) {
|
|
73
|
+
if (!countryArrayWithTypes[country].includes(orgType)) {
|
|
74
|
+
dto.setStopProcess(ResultCode.DO_NOT_CONTINUE, 'Zvolený typ organizace není platný.');
|
|
75
|
+
return dto;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
} else if (orgType) {
|
|
79
|
+
dto.setStopProcess(ResultCode.DO_NOT_CONTINUE, 'Zvolený typ organizace není platný.');
|
|
80
|
+
return dto;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const applicationInstall = await this.getApplicationInstallFromProcess(dto);
|
|
84
|
+
const application = this.getApplication<FlexiBeeApplication>();
|
|
85
|
+
|
|
86
|
+
const request = await application.getRequestDto(
|
|
87
|
+
dto,
|
|
88
|
+
applicationInstall,
|
|
89
|
+
HttpMethods.PUT,
|
|
90
|
+
application.getUrl(applicationInstall, `admin/zalozeni-firmy?${url}`),
|
|
91
|
+
);
|
|
92
|
+
const response = await this.getSender().send(request, { success: '200-201' });
|
|
93
|
+
dto.setData(response.getBody());
|
|
94
|
+
|
|
95
|
+
return dto;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
}
|