From 950405eb5aa39fecd833845bbcdb7a879ea7c67c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Mat=C4=9Bj=C4=8Dek?= Date: Tue, 12 Sep 2023 08:29:10 +0200 Subject: [PATCH] Ares: support new API --- .gitattributes | 1 + .github/workflows/static-analysis.yml | 21 + .github/workflows/tests.yml | 45 +- .gitignore | 2 + README.md | 37 +- bin/endpoints | 36 + bin/legal-form | 16 + changelog.md | 62 +- composer.json | 24 +- phpstan.neon | 14 +- src/Ares.php | 59 +- src/Ares/Client.php | 71 + src/Ares/Core/ContentProvider.php | 90 + src/Ares/Core/Data.php | 124 + src/Ares/Core/DataInterface.php | 15 + src/Ares/Core/JsonToDataTransformer.php | 45 + .../Core/JsonToDataTransformerInterface.php | 11 + src/{Basic => Ares/Core}/SubjectType.php | 2 +- src/Ares/Helper.php | 102 + src/Ares/Sources.php | 40 + src/AresFactory.php | 33 +- src/Basic/ContentProvider.php | 159 - src/Basic/Data.php | 152 - src/Basic/DataProvider.php | 256 - src/Basic/DataProviderFactory.php | 13 - src/Basic/SubjectFlag.php | 28 - src/BusinessList/ContentProvider.php | 90 - src/DataBox/Client.php | 27 +- src/DataBox/ContentProvider.php | 4 +- src/Error.php | 34 - src/Exceptions/ConnectionException.php | 8 +- .../IdentificationNumberNotFoundException.php | 5 +- src/Exceptions/InvalidStateException.php | 8 + src/Exceptions/ResultException.php | 8 + src/Exceptions/ServerResponseException.php | 21 + src/Http/AresRequestProvider.php | 153 - src/Http/HttpFactory.php | 4 +- ...uestProvider.php => TransportProvider.php} | 47 +- src/Tools/Strings.php | 46 + src/Tools/Utils.php | 124 - src/Tools/Xml.php | 32 + src/aliases.php | 31 +- tests/.coveralls.yml | 4 + tests/AresRestApi-verejne.json | 6670 +++++++++++++++++ tests/fixtures/response/2491427.json | 37 + tests/fixtures/response/25110161.json | 59 + tests/fixtures/response/25596641.json | 24 +- tests/fixtures/response/26713250.json | 29 +- tests/fixtures/response/27082440.json | 47 +- tests/fixtures/response/49812670.json | 49 + tests/fixtures/response/62413686.json | 39 + tests/fixtures/response/87744473.json | 29 +- tests/fixtures/response/bl-02491427.json | 61 - tests/fixtures/response/bl-25110161.json | 384 - tests/fixtures/response/bl-27082440.json | 471 -- tests/fixtures/response/bl-49812670.json | 173 - tests/fixtures/response/bl-62413686.json | 363 - tests/src/AresTest.php | 257 - tests/src/E2E/CoreTest.php | 126 + tests/src/E2E/DataBoxTest.php | 25 + tests/src/E2E/VrEndpointTest.php | 34 + tests/src/Unit/Ares/Core/DataTest.php | 97 + .../Ares/Core/JsonToDataTransformerTest.php | 40 + 63 files changed, 8184 insertions(+), 2934 deletions(-) create mode 100644 .github/workflows/static-analysis.yml create mode 100755 bin/endpoints create mode 100755 bin/legal-form create mode 100644 src/Ares/Client.php create mode 100644 src/Ares/Core/ContentProvider.php create mode 100644 src/Ares/Core/Data.php create mode 100644 src/Ares/Core/DataInterface.php create mode 100644 src/Ares/Core/JsonToDataTransformer.php create mode 100644 src/Ares/Core/JsonToDataTransformerInterface.php rename src/{Basic => Ares/Core}/SubjectType.php (87%) create mode 100644 src/Ares/Helper.php create mode 100644 src/Ares/Sources.php delete mode 100644 src/Basic/ContentProvider.php delete mode 100644 src/Basic/Data.php delete mode 100644 src/Basic/DataProvider.php delete mode 100644 src/Basic/DataProviderFactory.php delete mode 100644 src/Basic/SubjectFlag.php delete mode 100644 src/BusinessList/ContentProvider.php delete mode 100644 src/Error.php create mode 100644 src/Exceptions/InvalidStateException.php create mode 100644 src/Exceptions/ResultException.php create mode 100644 src/Exceptions/ServerResponseException.php delete mode 100644 src/Http/AresRequestProvider.php rename src/Http/{RequestProvider.php => TransportProvider.php} (52%) create mode 100644 src/Tools/Strings.php delete mode 100644 src/Tools/Utils.php create mode 100644 src/Tools/Xml.php create mode 100644 tests/.coveralls.yml create mode 100644 tests/AresRestApi-verejne.json create mode 100644 tests/fixtures/response/2491427.json create mode 100644 tests/fixtures/response/25110161.json create mode 100644 tests/fixtures/response/49812670.json create mode 100644 tests/fixtures/response/62413686.json delete mode 100644 tests/fixtures/response/bl-02491427.json delete mode 100644 tests/fixtures/response/bl-25110161.json delete mode 100644 tests/fixtures/response/bl-27082440.json delete mode 100644 tests/fixtures/response/bl-49812670.json delete mode 100644 tests/fixtures/response/bl-62413686.json delete mode 100644 tests/src/AresTest.php create mode 100644 tests/src/E2E/CoreTest.php create mode 100644 tests/src/E2E/DataBoxTest.php create mode 100644 tests/src/E2E/VrEndpointTest.php create mode 100644 tests/src/Unit/Ares/Core/DataTest.php create mode 100644 tests/src/Unit/Ares/Core/JsonToDataTransformerTest.php diff --git a/.gitattributes b/.gitattributes index ca0225e..edb8fa0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,3 +5,4 @@ changelog.md export-ignore tests export-ignore phpstan.neon export-ignore README.md export-ignore +example export-ignore diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml new file mode 100644 index 0000000..198da3a --- /dev/null +++ b/.github/workflows/static-analysis.yml @@ -0,0 +1,21 @@ +name: Static Analysis (only informative) + +on: + push: + branches: + - master + +jobs: + phpstan: + name: PHPStan + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: shivammathur/setup-php@v2 + with: + php-version: 8.0 + coverage: none + + - run: composer install --no-progress --prefer-dist + - run: composer phpstan -- --no-progress + continue-on-error: true # is only informative diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a810021..49f2245 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,21 +28,32 @@ jobs: name: output path: tests/**/output + lowest_dependencies: + name: Lowest Dependencies + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: shivammathur/setup-php@v2 + with: + php-version: 8.0 + coverage: none + + - run: composer update --no-progress --prefer-dist --prefer-lowest --prefer-stable + - run: composer tests -# code_coverage: -# name: Code Coverage -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v3 -# - uses: shivammathur/setup-php@v2 -# with: -# php-version: 8.0 -# extensions: json, mbstring, tokenizer, fileinfo -# coverage: none -# -# - run: composer install --no-progress --prefer-dist -# - run: vendor/bin/tester -p phpdbg tests -s -C --coverage ./coverage.xml --coverage-src ./src -# - run: wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar -# - env: -# COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# run: php php-coveralls.phar --verbose --config tests/.coveralls.yml + code_coverage: + name: Code Coverage + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: shivammathur/setup-php@v2 + with: + php-version: 8.0 + coverage: none + + - run: composer install --no-progress --prefer-dist + - run: vendor/bin/tester -p phpdbg tests -s -C --coverage ./coverage.xml --coverage-src ./src + - run: wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar + - env: + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: php php-coveralls.phar --verbose --config tests/.coveralls.yml diff --git a/.gitignore b/.gitignore index a418dfa..75960ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ composer.lock /**/output/ /vendor/ +/AresRestApi-verejne.json +/coverage.html diff --git a/README.md b/README.md index 035cf79..83b7191 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,18 @@ More information about versions is in [changelog](changelog.md). +## Support development by QR code + +![QR payment](./.doc/payment.png) + +Thank you :) + ## Installation to project The best way to install h4kuna/ares is using Composer: + ```sh -$ composer require h4kuna/ares +composer require h4kuna/ares ``` Download information about customer via his IN. @@ -22,28 +29,33 @@ Download information about customer via his IN. Load data by one identification number ```php -$ares = (new h4kuna\Ares\AresFactory())->create(); +use h4kuna\Ares; +$ares = (new Ares\AresFactory())->create(); try { $response = $ares->loadBasic('87744473'); - /* @var $response h4kuna\Ares\Basic\Data */ + /* @var $response Ares\Ares\Core\Data */ var_dump($response); -} catch (h4kuna\Ares\Exceptions\IdentificationNumberNotFoundException $e) { +} catch (Ares\Exceptions\IdentificationNumberNotFoundException $e) { // log identification number, why is bad? Or make nothing. +} catch (Ares\Exceptions\ServerResponseException $e) { + // no response from server or broken json } ``` -Load data by many identification numbers +Load data by many identification numbers. Limit by ARES is 100 items, but library chunk it and check duplicity. ```php -/** @var h4kuna\Ares\Ares $ares */ +use h4kuna\Ares; +/** @var Ares\Ares $ares */ $numbers = ['25596641', '26713250', '27082440', '11111111']; -$res = $ares->loadBasicMulti($numbers); -if ($res[$ares::RESULT_FAILED] !== []) { - var_dump($res[$ares::RESULT_FAILED]); +try { + $dataGenerator = $ares->loadBasicMulti($numbers); +} catch (Ares\Exceptions\ServerResponseException $e) { + // no response from server or broken json } -foreach ($res[$ares::RESULT_SUCCESS] as $r) { +foreach ($dataGenerator as $r) { var_dump($r->company); } ``` @@ -51,11 +63,12 @@ foreach ($res[$ares::RESULT_SUCCESS] as $r) { ## Data Box ```php -/** @var h4kuna\Ares\Ares $ares */ +use h4kuna\Ares; +/** @var Ares\Ares $ares */ try { $response = $ares->loadDataBox('87744473'); var_dump($response->ISDS); -} catch (h4kuna\Ares\Exceptions\ConnectionException $e) { +} catch (h4kuna\Ares\Exceptions\ServerResponseException $e) { // catch error } ``` diff --git a/bin/endpoints b/bin/endpoints new file mode 100755 index 0000000..8ec8d3c --- /dev/null +++ b/bin/endpoints @@ -0,0 +1,36 @@ +#!/usr/bin/env php +create(); +try { + $response = $ares->loadBasic($IN); + /* @var $response Ares\Ares\Core\Data */ + $response->original = null; + dump($response); +} catch (Ares\Exceptions\IdentificationNumberNotFoundException $e) { + // log identification number, why is bad? Or make nothing. +} catch (Ares\Exceptions\ServerResponseException $e) { + // no response from server or broken json +} + +foreach ($response->sources as $name => $exists) { + if ($exists === false || Ares\Ares\Helper::endpointExists($name) === false) { + continue; + } + dump(Ares\Ares\Helper::prepareUrl($name, $IN)); + + try { + $result = $ares->getAresRequestProvider()->useEndpoint($name, $IN); + dump($result); + } catch (Ares\Exceptions\IdentificationNumberNotFoundException $e) { + // log identification number, why is bad? Or make nothing. + } catch (Ares\Exceptions\ServerResponseException $e) { + // no response from server or broken json + } +} diff --git a/bin/legal-form b/bin/legal-form new file mode 100755 index 0000000..96ea90a --- /dev/null +++ b/bin/legal-form @@ -0,0 +1,16 @@ +#!/usr/bin/env php +create(); +$result = $ares->getAresRequestProvider()->searchEndpoint(Ares\Ares\Sources::DIAL, [ + 'kodCiselniku' => 'PravniForma', + 'zdrojCiselniku' => 'res', +])->ciselniky[0]->polozkyCiselniku; + +foreach ($result as $item) { + dump($item); +} diff --git a/changelog.md b/changelog.md index 8e4268b..ecc9849 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,43 @@ -v2.0.0 -====== +# v3.0.0 + +- podpora nového API ARES2 +- v [bin](./bin) jsou spustitelné ukázky, jak se dostat na číselníky a jak na ostatní endpointy +- pro IČO je vyžadován formát \d{8}, pokud je kratší, knihovna sama doplní nuly zleva +- očekávám že se změní url API, pro tento případ je připravená `public static h4kuna\Ares\Ares\Helper::$baseUrl`, kterou lze nahradit, bez nutnosti vyčkávat na nový release +- podobně lze dopnit nebo upravit url adresy endpointů +- php 8.0+ + +### Třidy + +- h4kuna\Ares\Ares + - metoda `loadBasic()` nově vrací [DataInterface](./src/Ares/Core/DataInterface.php) implementace je původní [Data](./src/Ares/Core/Data.php) + - metoda `loadBasicMulti()` + - nově vrací Generator nikoliv pole + - vrací jen existující záznamy, třída Error byla smazána, nemá náhradu + - počet IČO není omezen, interně se rozdělí na dávky po 100 záznamech a ještě před tím se odeberou duplicity, při iteraci duplicity zůstanou, jen objekty budou mít stejné reference + + +- h4kuna\Ares\Ares\Core\Data + - zmizela metoda `psu()` bez náhrady, podobné informace jsou ve vlastnosti `$sources` + - zmizela metoda `isGroupVat()` ARES již vrací DIČ pro skupinové DPH + - odstraněné vlastnosti `$court`, `$file_number`, `$court_all` jsou dostupné na jiném endpointu, `Sources::SERVICE_VR` + - DIČ je nově bez prefixu `CZ`, vlastnost `$tin` z důvodu zpětné kompatibility, prefix nese, nová vlastnost `$vat_id` prefix nemá + - vlastnost `$created` je podle mě momentálně rozbitá, pro Alzu datumVzniku je 2003-08-26, ale dostávám 2023-09-04 (nahlášeno) + - původní název `h4kuna\Ares\Basic\Data`, ale je zde [aliases.php](./src/aliases.php) který zajistí zpětnou kompatibilitu a bude hlásit aby jste si třídu přejmnovali, nicméně stará třída bude fungovat + - už není možnost do metody `toArray()` předat vlastní pole pro úpravu mapování, pro změnu entity za vlastní využijte interface [JsonToDataTransformerInterface](./src/Ares/Core/JsonToDataTransformerInterface.php) + - přidané vlastnosti `$country` a `$country_code` + + +- h4kuna\Ares\Exceptions\ConnectionException + - nastavena jako deprecated, zpětně funkční + - nahrazena h4kuna\Ares\Exceptions\ServerResponseException + +### Závěrem + +Pokud si pohlídáte s jakými vlastnostmi pracujete a nebudou tam ty smazané, tak je to zpětně kompatibilní. Pracujete-li s `Ares::loadBasicMulti()` je potřeba vzít v potaz že to je zpětně nekompatibilní a nově se vrací Generator. + +# v2.0.0 + - remove support php < 7.4 - serialized date use RFC3339 instead of ISO8601, because ISO is deprecated by php - removed method Ares::getData() @@ -10,19 +48,19 @@ v2.0.0 - prepared AresFactory::create() for instance Ares class - Data::$tin is null if value is Skupinove_DPH -v1.4.0 -====== +# v1.4.0 + - remove support php < 7.1 - exceptions move to files -> one class is one file and change namespace -v1.3.0 -====== +# v1.3.0 + - remove support for php 5.5 - add Factory provide new instances Guzzle, Data, DataProvider -v1.2.0 -====== +# v1.2.0 + - interface IData was removed - change data keys: - person -> is_person @@ -33,15 +71,15 @@ v1.2.0 - class Data extends Messenger - class Data suggest property -v1.1.3 -====== +# v1.1.3 + - method Ares::loadData throw IdentificationNumberNotFoundException if find nothing - rename InNotFoundExceptions -> IdentificationNumberNotFoundException - rename vat_pay -> vat_payer and interface IData - try download exists item if is faild try download item with non-exists parameter -v1.1.2 -====== +# v1.1.2 + - method Ares::loadData throw InNotFoundExceptions if find nothing - attribute vat_pay in Data is bool instanceof empty string and string 1 - attribute created in Data is Datetime instanceof ISO date diff --git a/composer.json b/composer.json index 5449253..19d42f9 100644 --- a/composer.json +++ b/composer.json @@ -12,27 +12,25 @@ } ], "autoload": { - "files": [ - "src/aliases.php" - ], "psr-4": { "h4kuna\\Ares\\": "src/" - } + }, + "files": [ + "src/aliases.php" + ] }, "autoload-dev": { "psr-4": { - "h4kuna\\Ares\\Tests\\": "tests/src/" + "h4kuna\\Ares\\Tests\\": "tests/src" } }, "require": { "php": ">=8.0", "ext-curl": "*", "ext-json": "*", - "ext-simplexml": "*", + "h4kuna/memoize": "^0.1.4", "nette/utils": "^3.0 || ^4.0", - "psr/http-client": "^1.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0 || ^2.0" + "psr/http-factory": "^1.0" }, "require-dev": { "guzzlehttp/guzzle": "^7.5", @@ -42,11 +40,15 @@ "tracy/tracy": "^2.9" }, "config": { - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "php-http/discovery": true + } }, "scripts": { "phpstan": "vendor/bin/phpstan analyse", - "tests": "vendor/bin/tester -s -j 6 --colors 1 -s -C tests/src" + "tests": "vendor/bin/tester -s --colors 1 -s -C tests/src", + "coverage": "vendor/bin/tester --coverage coverage.html --coverage-src src/ --colors 1 -s -C tests/src" }, "suggest": { "guzzlehttp/guzzle": "As default implementation for PSR standards." diff --git a/phpstan.neon b/phpstan.neon index 748b5db..044f6e1 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -7,19 +7,11 @@ parameters: - tests ignoreErrors: - - message: "#^Variable property access on SimpleXMLElement\\.$#" - count: 4 - path: src/Basic/ContentProvider.php - - - message: "#^Variable property access on \\$this\\(h4kuna\\\\Ares\\\\Basic\\\\Data\\)\\.$#" - count: 1 - path: src/Basic/Data.php - - - message: "#^Call to an undefined method h4kuna\\\\Ares\\\\BusinessList\\\\ContentProvider\\:\\:onAfterContent\\(\\)\\.$#" + message: "#^Variable property access on \\$this\\(h4kuna\\\\Ares\\\\Ares\\\\Core\\\\Data\\)\\.$#" count: 1 - path: src/BusinessList/ContentProvider.php + path: src/Ares/Core/Data.php - - message: "#^If condition is always false.$#" + message: "#^If condition is always false\\.$#" count: 1 path: src/aliases.php diff --git a/src/Ares.php b/src/Ares.php index 3ca66c8..e9eb686 100644 --- a/src/Ares.php +++ b/src/Ares.php @@ -2,76 +2,65 @@ namespace h4kuna\Ares; -use h4kuna\Ares\Basic; +use Generator; +use h4kuna\Ares\Ares\Core\Data; +use h4kuna\Ares\Ares\Core\DataInterface; use h4kuna\Ares\Exceptions\IdentificationNumberNotFoundException; +use h4kuna\Memoize\MemoryStorage; +use stdClass; class Ares { - public const RESULT_FAILED = Basic\ContentProvider::RESULT_FAILED; - public const RESULT_SUCCESS = Basic\ContentProvider::RESULT_SUCCESS; - + use MemoryStorage; public function __construct( - private Basic\ContentProvider $basicContentProvider, - private BusinessList\ContentProvider $businessListContentProvider, + private Ares\Client $aresRequestProvider, private DataBox\ContentProvider $dataBoxContentProvider, ) { } - /** - * @param array $identificationNumbers - * @return array{failed: array, success: array} - * @deprecated use loadBasicMulti() - */ - public function loadByIdentificationNumbers(array $identificationNumbers): array + public function getAresRequestProvider(): Ares\Client { - return $this->basicContentProvider->loadByIdentificationNumbers($identificationNumbers); + return $this->aresRequestProvider; } /** * @param array $identificationNumbers - * @return array{failed: array, success: array} - */ - public function loadBasicMulti(array $identificationNumbers): array - { - return $this->basicContentProvider->loadByIdentificationNumbers($identificationNumbers); - } - - - /** - * @throws IdentificationNumberNotFoundException - * @deprecated use loadBasic() + * @return Generator */ - public function loadData(string $in): Basic\Data + public function loadBasicMulti(array $identificationNumbers): Generator { - return $this->basicContentProvider->load($in); + /** @var Generator $data */ + $data = $this->aresContentProvider()->loadByIdentificationNumbers($identificationNumbers); + return $data; } /** + * @return Data * @throws IdentificationNumberNotFoundException */ - public function loadBasic(string $in): Basic\Data + public function loadBasic(string $in): DataInterface { - return $this->basicContentProvider->load($in); + /** @var Data $data */ + $data = $this->aresContentProvider()->load($in); + return $data; } - /** - * @throws IdentificationNumberNotFoundException - */ - public function loadBusinessList(string $in): \stdClass + public function loadDataBox(string $in): stdClass { - return $this->businessListContentProvider->load($in); + return $this->dataBoxContentProvider->load($in); } - public function loadDataBox(string $in): \stdClass + protected function aresContentProvider(): Ares\Core\ContentProvider { - return $this->dataBoxContentProvider->load($in); + return $this->memoize(__METHOD__, fn ( + ) => new Ares\Core\ContentProvider(new Ares\Core\JsonToDataTransformer(), $this->aresRequestProvider)); } } diff --git a/src/Ares/Client.php b/src/Ares/Client.php new file mode 100644 index 0000000..3b2128b --- /dev/null +++ b/src/Ares/Client.php @@ -0,0 +1,71 @@ + $data + */ + public function searchEndpoint(string $key, array $data = []): stdClass + { + $request = $this->transportProvider->createJsonRequest(Helper::prepareUrlSearch($key), $data); + $response = $this->transportProvider->response($request); + + return $this->responseToStdClass($response); + } + + + /** + * @param Sources::SERVICE_* $key + */ + public function useEndpoint(string $key, string $in): stdClass + { + $request = $this->transportProvider->createRequest(Helper::prepareUrl($key, $in)); + $response = $this->transportProvider->response($request); + + try { + $json = $this->responseToStdClass($response); + } catch (ResultException $e) { + throw new IdentificationNumberNotFoundException(sprintf("Api: %s. %s", $key, $e->getMessage()), $in, $e); + } + + return $json; + } + + + protected function responseToStdClass(ResponseInterface $response): stdClass + { + try { + $json = Json::decode($response->getBody()->getContents()); + assert($json instanceof stdClass); + } catch (JsonException $e) { + throw new ServerResponseException($e->getMessage(), $e->getCode(), $e); + } + + if ($response->getStatusCode() !== 200) { + throw new ResultException(sprintf('%s%s: %s.', $json->kod, isset($json->subKod) ? " ($json->subKod)" : '', $json->popis ?? '')); + } + + return $json; + } + +} diff --git a/src/Ares/Core/ContentProvider.php b/src/Ares/Core/ContentProvider.php new file mode 100644 index 0000000..611c35e --- /dev/null +++ b/src/Ares/Core/ContentProvider.php @@ -0,0 +1,90 @@ + $identificationNumbers + * @return Generator + */ + public function loadByIdentificationNumbers(array $identificationNumbers): Generator + { + $duplicity = self::checkDuplicities($identificationNumbers); + $chunks = array_chunk(array_keys($duplicity), self::POST_IDENTIFICATION_NUMBERS_LIMIT); + + foreach ($chunks as $INs) { + $responseData = $this->client->searchEndpoint(Sources::SERVICE_CORE, [ + 'ico' => array_values($INs), + ])->ekonomickeSubjekty ?? []; + + foreach ($responseData as $item) { + $data = $this->jsonTransformer->transform($item); + foreach ($duplicity[$data->getIn()] as $in) { + yield $in => $data; + } + } + } + } + + + /** + * @throws IdentificationNumberNotFoundException + */ + public function load(string $in): DataInterface + { + try { + $json = $this->client->useEndpoint(Sources::SERVICE_CORE, $in); + } catch (IdentificationNumberNotFoundException) { + $json = $this->client->useEndpoint(Sources::SERVICE_RES, $in); + $records = $json->zaznamy ?? []; + $record = reset($records); + + if ($record === null) { + throw new IdentificationNumberNotFoundException(sprintf('Api: %s.', Sources::SERVICE_RES), (string) $json->icoId); + } + + return $this->jsonTransformer->transform($record); + } + return $this->jsonTransformer->transform($json); + } + + + /** + * @param array $INs + * @return array> + */ + private static function checkDuplicities(array $INs): array + { + $duplicity = []; + foreach ($INs as $IN) { + $strIN = (string) $IN; + $newIN = Helper::normalizeIN($strIN); + $duplicity[$newIN] ??= []; + + if ($duplicity[$newIN] === [] || array_search($strIN, $duplicity[$newIN], true) === false) { + $duplicity[$newIN][] = $strIN; + } + } + + return $duplicity; + } + +} diff --git a/src/Ares/Core/Data.php b/src/Ares/Core/Data.php new file mode 100644 index 0000000..20cb592 --- /dev/null +++ b/src/Ares/Core/Data.php @@ -0,0 +1,124 @@ + + */ +class Data implements DataInterface, JsonSerializable, Stringable +{ + public bool $active; + + public ?string $city; + + public ?string $company; + + public DateTimeImmutable $created; + + public ?DateTimeImmutable $dissolved; + + public ?string $city_district; + + public ?string $city_post; + + public string $in; + + public bool $is_person; + + public int $legal_form_code; + + public ?string $house_number; + + public ?string $street; + + /** DIČ */ + public ?string $tin; + + /** DIČ */ + public ?string $vat_id; + + public bool $vat_payer; + + public ?string $zip; + + public ?string $country; + + public ?string $country_code; + + /** + * @var array + */ + public array $nace = []; + + /** + * @var array + */ + public array $sources = []; + + public ?\stdClass $original = null; + + + public function getIn(): string + { + return $this->in; + } + + + /** + * @return array> + */ + public function jsonSerialize(): mixed + { + $data = $this->toArray(); + $data['created'] = Strings::exportDate($this->created); + + if ($this->dissolved !== null) { + $data['dissolved'] = Strings::exportDate($this->dissolved); + } + + /** @var array> $data */ + return $data; + } + + + public function __toString() + { + return (string) json_encode($this); + } + + + /** + * @return DataType + */ + public function __serialize(): array + { + return $this->toArray(); + } + + + /** + * @param DataType $data + */ + public function __unserialize(array $data): void + { + foreach ($data as $name => $value) { + $this->$name = $value; + } + } + + + public function toArray(): array + { + $data = get_object_vars($this); + unset($data['original']); + + return $data; + } + +} diff --git a/src/Ares/Core/DataInterface.php b/src/Ares/Core/DataInterface.php new file mode 100644 index 0000000..71927fb --- /dev/null +++ b/src/Ares/Core/DataInterface.php @@ -0,0 +1,15 @@ + + */ + function toArray(): array; + +} diff --git a/src/Ares/Core/JsonToDataTransformer.php b/src/Ares/Core/JsonToDataTransformer.php new file mode 100644 index 0000000..3e6fa55 --- /dev/null +++ b/src/Ares/Core/JsonToDataTransformer.php @@ -0,0 +1,45 @@ +original = $json; + + $data->in = (string) $json->ico; + $data->vat_id = Strings::trimNull($json->dic ?? null); + $data->tin = isset($data->vat_id) ? 'CZ' . $data->vat_id : null; + $data->vat_payer = (bool) $data->vat_id; + $data->company = Strings::trimNull($json->obchodniJmeno ?? null); + + $data->zip = Strings::trimNull((string) ($json->sidlo->psc ?? '')); // input is int + $data->street = Strings::trimNull($json->sidlo->nazevUlice ?? null); + $data->country = Strings::trimNull($json->sidlo->nazevStatu ?? null); + $data->country_code = Strings::trimNull($json->sidlo->kodStatu ?? null); + $data->street = Strings::trimNull($json->sidlo->nazevUlice ?? null); + $data->city = Strings::trimNull($json->sidlo->nazevObce ?? null); + $data->city_post = Strings::trimNull($json->sidlo->nazevMestskeCastiObvodu ?? null); + $data->city_district = Strings::trimNull($json->sidlo->nazevOkresu ?? $json->sidlo->nazevCastiObce ?? null); + $data->house_number = Helper::houseNumber((string) ($json->sidlo->cisloDomovni ?? ''), (string) ($json->sidlo->cisloOrientacni ?? '')); + + $data->nace = (array) ($json->czNace ?? []); + $data->legal_form_code = (int) $json->pravniForma; + $data->is_person = Helper::isPerson($data->legal_form_code); + $data->sources = Helper::services((array) ($json->seznamRegistraci ?? [])); + assert($json->datumVzniku !== null); + $data->created = Strings::createDateTime($json->datumVzniku); + $data->dissolved = Strings::createDateTime($json->datumZaniku ?? null); + $data->active = $data->dissolved === null; + + return $data; + } + +} diff --git a/src/Ares/Core/JsonToDataTransformerInterface.php b/src/Ares/Core/JsonToDataTransformerInterface.php new file mode 100644 index 0000000..8f17983 --- /dev/null +++ b/src/Ares/Core/JsonToDataTransformerInterface.php @@ -0,0 +1,11 @@ + + */ + public static $endpoints = [ + Sources::SERVICE_VR => '/ekonomicke-subjekty-vr/{ico}', + Sources::SERVICE_RES => '/ekonomicke-subjekty-res/{ico}', + Sources::SERVICE_RZP => '/ekonomicke-subjekty-rzp/{ico}', + Sources::SERVICE_NRPZS => '/ekonomicke-subjekty-nrpzs/{ico}', + Sources::SERVICE_RCNS => '/ekonomicke-subjekty-rcns/{ico}', + Sources::SERVICE_RPSH => '/ekonomicke-subjekty-rpsh/{ico}', + Sources::SERVICE_RS => '/ekonomicke-subjekty-rs/{ico}', + Sources::SERVICE_SZR => '/ekonomicke-subjekty-szr/{ico}', + Sources::SERVICE_CEU => '/ekonomicke-subjekty-ceu/{ico}', + Sources::SERVICE_CORE => '/ekonomicke-subjekty/{ico}', + Sources::DIAL => '/ciselniky-nazevniky/{ico}', + ]; + + + public static function endpointExists(string $source): bool + { + return isset(self::$endpoints[$source]); + } + + + /** + * @param Sources::SERVICE_*|Sources::DIAL $source + */ + public static function prepareUrlSearch(string $source): string + { + return self::prepareUrl($source, 'vyhledat'); + } + + + /** + * @param Sources::SERVICE_*|Sources::DIAL $source + */ + public static function prepareUrl(string $source, string $in): string + { + if (self::endpointExists($source) === false) { + throw new InvalidStateException(sprintf('Endpoint %s does not exists.', $source)); + } + + return str_replace( + '{ico}', + self::normalizeIN($in), + self::$baseUrl . self::$endpoints[$source], + ); + } + + + /** + * @param array $registrations + * @return array + */ + public static function services(array $registrations): array + { + $map = []; + foreach ($registrations as $k => $v) { + $map[$k] = $v === 'AKTIVNI'; + } + + return $map; + } + + + public static function houseNumber(?string $cisloDomovni, ?string $cisloOrientacni): ?string + { + $houseNumber = Strings::trimNull(trim($cisloDomovni . '/' . $cisloOrientacni, '/')); + + return $houseNumber === '0' ? null : $houseNumber; + } + + + public static function isPerson(int $legalForm): bool + { + return match ($legalForm) { + SubjectType::OSVC, 105, 107, 424, 425 => true, + default => false, + }; + } + + + public static function normalizeIN(string $in): string + { + return str_pad($in, 8, '0', STR_PAD_LEFT); + } +} diff --git a/src/Ares/Sources.php b/src/Ares/Sources.php new file mode 100644 index 0000000..61aeee5 --- /dev/null +++ b/src/Ares/Sources.php @@ -0,0 +1,40 @@ +createRequestFactory(); - $client = $this->createClient(); $streamFactory = $this->createStreamFactory(); - $requestProvider = new RequestProvider($requestFactory, $client); - $aresContentProvider = new AresRequestProvider($requestProvider, $streamFactory, $client); - - $basicContent = new Basic\ContentProvider(new Basic\DataProviderFactory(), $aresContentProvider); - $businessListProvider = new BusinessList\ContentProvider($aresContentProvider); + $transportProvider = $this->createTransportProvider($streamFactory); + $aresClient = new Ares\Client($transportProvider); - $dataBoxClient = new Client($requestProvider); + $dataBoxClient = new DataBox\Client($transportProvider); $dataBoxContentProvider = new DataBox\ContentProvider($dataBoxClient, $streamFactory); - return new Ares($basicContent, $businessListProvider, $dataBoxContentProvider); + return new Ares($aresClient, $dataBoxContentProvider); } @@ -42,7 +37,7 @@ protected function createRequestFactory(): RequestFactoryInterface } - protected function createClient(): ClientInterface + public function createClient(): ClientInterface { self::checkGuzzle(); @@ -50,7 +45,7 @@ protected function createClient(): ClientInterface } - protected function createStreamFactory(): StreamFactoryInterface + public function createStreamFactory(): StreamFactoryInterface { $factory = $this->createRequestFactory(); assert($factory instanceof StreamFactoryInterface); @@ -59,10 +54,18 @@ protected function createStreamFactory(): StreamFactoryInterface } + public function createTransportProvider(StreamFactoryInterface $streamFactory): TransportProvider + { + $client = $this->createClient(); + $requestFactory = $this->createRequestFactory(); + return new TransportProvider($requestFactory, $client, $streamFactory); + } + + private static function checkGuzzle(): void { if (!class_exists(GuzzleHttp\Client::class)) { - throw new \RuntimeException('Guzzle not found, let implement own solution or install guzzle by: composer require guzzlehttp/guzzle'); + throw new InvalidStateException('Guzzle not found, let implement own solution or install guzzle by: composer require guzzlehttp/guzzle'); } } diff --git a/src/Basic/ContentProvider.php b/src/Basic/ContentProvider.php deleted file mode 100644 index 51f11cf..0000000 --- a/src/Basic/ContentProvider.php +++ /dev/null @@ -1,159 +0,0 @@ - $identificationNumbers - * @return array{failed: array, success: array} - */ - public function loadByIdentificationNumbers(array $identificationNumbers): array - { - $offset = 0; - $output = [ - self::RESULT_FAILED => [], - self::RESULT_SUCCESS => [], - ]; - - $identificationNumbersCount = count($identificationNumbers); - while (($identificationNumbersCount - $offset) > 0) { - $identificationNumbersBatch = array_slice($identificationNumbers, $offset, self::POST_IDENTIFICATION_NUMBERS_LIMIT, true); - $offset += self::POST_IDENTIFICATION_NUMBERS_LIMIT; - - $responseData = $this->sendDoseOfInsRequest($identificationNumbersBatch); - - foreach ($responseData as $item) { - $D = $item->children('D', true); - $pid = (int) $D->PID->__toString(); - - try { - if ($D->E->asXML() !== false) { - $DE = $D->E->children('D', true); - throw new IdentificationNumberNotFoundException(trim($DE->ET->__toString()), (string) $identificationNumbers[$pid]); - } - - $provider = $this->dataProviderFactory->create(); - $this->processXml($D->VBAS, $provider); - - $output[self::RESULT_SUCCESS][$pid] = $provider->getData(); - } catch (IdentificationNumberNotFoundException $exception) { - $output[self::RESULT_FAILED][$pid] = new Error((string) $identificationNumbers[$pid], $exception->getCode(), $exception->getMessage()); - } - } - } - - return $output; - } - - - /** - * @throws IdentificationNumberNotFoundException - */ - public function load(string $in): Data - { - return $this->loadXML($in)->getData(); - } - - - /** - * Load XML and fill Data object - * @throws IdentificationNumberNotFoundException - */ - private function loadXML(string $in): DataProvider - { - $answer = $this->requestProvider->basic($in); - - $provider = $this->dataProviderFactory->create(); - $this->processXml($answer->VBAS, $provider); - - return $provider; - } - - - protected function processXml(\SimpleXMLElement $xml, DataProvider $dataProvider): void - { - $dataProvider->setIN((string) $xml->ICO) - ->setTIN((string) $xml->DIC) - ->setCompany((string) $xml->OF) - ->setZip(self::exists($xml->AA, 'PSC')) - ->setStreet(self::exists($xml->AA, 'NU')) - ->setCity(self::exists($xml->AA, 'N')) - ->setHouseNumber(self::exists($xml->AA, 'CD'), self::exists($xml->AA, 'CO'), self::exists($xml->AA, 'CA')) - ->setCityPost(self::exists($xml->AA, 'NMC')) - ->setCityDistrict(self::exists($xml->AA, 'NCO')) - ->setIsPerson(self::exists($xml->PF, 'KPF')) - ->setCreated((string) $xml->DV) - ->setNace(self::existsArray($xml->Nace, 'NACE')) - ->setPSU((string) $xml->PSU); - - $dataProvider->setDissolved(isset($xml->DZ) ? (string) $xml->DZ : null); - - if (isset($xml->ROR)) { - $dataProvider - ->setFileNumber((string) $xml->ROR->SZ->OV) - ->setCourt((string) $xml->ROR->SZ->SD->T); - } else { - $dataProvider - ->setFileNumber('') - ->setCourt(''); - } - } - - - private static function exists(?\SimpleXMLElement $element, string $property): string - { - return isset($element->$property) ? ((string) $element->$property) : ''; - } - - - /** - * @return array - */ - private static function existsArray(\SimpleXMLElement $element, string $property): array - { - return isset($element->$property) ? ((array) $element->$property) : []; - } - - - /** - * @param array|array $identificationNumbersBatch - */ - private function sendDoseOfInsRequest(array $identificationNumbersBatch): \SimpleXMLElement - { - $body = $this->requestProvider->basicMulti($identificationNumbersBatch) - ->getBody() - ->getContents(); - - $simpleXml = @simplexml_load_string($body, \SimpleXMLElement::class, 0, 'SOAP-ENV', true); - if ($simpleXml === false) { - throw new ConnectionException(); - } - $simpleXml->registerXPathNamespace('SOAP-ENV', 'http://schemas.xmlsoap.org/soap/envelope/'); - - return $simpleXml->children('SOAP-ENV', true) - ->Body - ->children('are', true) - ->children('are', true); - } - -} diff --git a/src/Basic/Data.php b/src/Basic/Data.php deleted file mode 100644 index 23ad20b..0000000 --- a/src/Basic/Data.php +++ /dev/null @@ -1,152 +0,0 @@ - - */ -class Data implements \JsonSerializable -{ - public bool $active; - - public ?string $city = null; - - public ?string $company = null; - - public ?string $court = null; - - public \DateTimeImmutable $created; - - public ?\DateTimeImmutable $dissolved = null; - - public ?string $file_number = null; - - public ?string $city_district = null; - - public ?string $city_post = null; - - public ?string $court_all = null; - - public string $in; - - public bool $is_person; - - public int $legal_form_code; - - public ?string $house_number = null; - - public ?string $street = null; - - public ?string $tin = null; - - public bool $vat_payer; - - public ?string $zip = null; - - /** - * @var array - */ - public array $nace = []; - - public string $psu = ''; - - - /** - * @param array $map - * @return array - */ - public function toArray(array $map = []): array - { - $data = $this->getData(); - if ($map === []) { - return $data; - } - $mappedData = []; - foreach ($map as $in => $out) { - if (array_key_exists($in, $data)) { - if ($out === null) { - $out = $in; - } - - $mappedData[$out] = $data[$in]; - } - } - - return $mappedData; - } - - - public function isGroupVat(): bool - { - return $this->psu(SubjectFlag::RPDPH_6) === 'S'; - } - - - /** - * @param SubjectFlag::* $index - */ - public function psu(int $index): string - { - return substr($this->psu, $index, 1); - } - - - /** - * @return array> - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() /* mixed */ - { - $data = $this->getData(); - $data['created'] = self::formatDate($this->created); - - if ($this->dissolved !== null) { - $data['dissolved'] = self::formatDate($this->dissolved); - } - - /** @var array> $data */ - return $data; - } - - - public function __toString() - { - return (string) json_encode($this->jsonSerialize()); - } - - - /** - * @return DataType - */ - public function __serialize(): array - { - return $this->getData(); - } - - - /** - * @param DataType $data - */ - public function __unserialize(array $data): void - { - foreach ($data as $name => $value) { - $this->$name = $value; - } - } - - - /** - * @return array - */ - private function getData(): array - { - return get_object_vars($this); - } - - - private static function formatDate(\DateTimeInterface $date): string - { - return $date->format($date::RFC3339); - } - -} diff --git a/src/Basic/DataProvider.php b/src/Basic/DataProvider.php deleted file mode 100644 index 89adc2b..0000000 --- a/src/Basic/DataProvider.php +++ /dev/null @@ -1,256 +0,0 @@ -setFileNumberAndCourt(); - - return $this->data; - } - - - /** - * @return static - */ - public function setActive(bool $active) - { - $this->data->active = $active; - - return $this; - } - - - /** - * @return static - */ - public function setCity(string $city) - { - $this->data->city = self::toNull($city); - - return $this; - } - - - /** - * @return static - */ - public function setCompany(string $company) - { - $this->data->company = self::toNull($company); - - return $this; - } - - - /** - * @return static - */ - public function setCourt(string $court) - { - $this->data->court = self::toNull($court); - - return $this; - } - - - /** - * @return static - */ - public function setCreated(string $date) - { - $this->data->created = self::createDateTime($date); - - return $this; - } - - - /** - * @return static - */ - public function setDissolved(?string $date) - { - if ($date === null) { - $this->setActive(true); - } else { - $this->data->dissolved = self::createDateTime($date); - $this->setActive(false); - } - - return $this; - } - - - /** - * @return static - */ - public function setFileNumber(string $fileNumber) - { - $this->data->file_number = self::toNull($fileNumber); - - return $this; - } - - - /** - * @return static - */ - public function setIN(string $in) - { - $this->data->in = $in; - - return $this; - } - - - /** - * @return static - */ - public function setIsPerson(string $s) - { - $this->data->is_person = $s <= '108' || $s === '424' || $s === '425'; - $this->data->legal_form_code = (int) $s; - - return $this; - } - - - /** - * Příznaky subjektu - NAAANANNNNNNNNNNNNNNPNNNANNNNN - * @see https://wwwinfo.mfcr.cz/ares/ares_xml_standard.html.cz - * - * @return static - */ - public function setPSU(string $psu) - { - $this->data->psu = $psu; - - return $this; - } - - - private function setFileNumberAndCourt(): void - { - $this->data->court_all = null; - if ($this->data->file_number !== null && $this->data->court !== null) { - $this->data->court_all = $this->data->file_number . ', ' . $this->data->court; - } - } - - - /** - * @return static - */ - public function setCityDistrict(string $district) - { - $this->data->city_district = self::toNull($district); - - return $this; - } - - - /** - * @return static - */ - public function setCityPost(string $district) - { - $this->data->city_post = self::toNull($district); - - return $this; - } - - - /** - * @return static - */ - public function setStreet(string $street) - { - $this->data->street = self::toNull($street); - - return $this; - } - - - /** - * @param string $cd - * @param string $co - * @return static - */ - public function setHouseNumber(string $cd, string $co, string $ca) - { - $houseNumber = self::toNull(trim($cd . '/' . $co, '/')); - if ($houseNumber === null) { - $houseNumber = self::toNull($ca); - } - - $this->data->house_number = $houseNumber === '0' ? null : $houseNumber; - - return $this; - } - - - /** - * @return static - */ - public function setTIN(string $s) - { - $tin = self::toNull($s); - $this->data->tin = $tin === 'Skupinove_DPH' ? null : $tin; - $this->data->vat_payer = (bool) $tin; - - return $this; - } - - - /** - * @return static - */ - public function setZip(string $zip) - { - $this->data->zip = self::toNull($zip); - - return $this; - } - - - /** - * @param array $nace - * @return static - */ - public function setNace(array $nace) - { - $newNace = []; - foreach ($nace as $item) { - $newNace[] = (string) $item; - } - $this->data->nace = $newNace; - - return $this; - } - - - private static function toNull(string $v): ?string - { - $string = trim($v); - if ($string === '') { - return null; - } - - return $string; - } - - - private static function createDateTime(string $date): \DateTimeImmutable - { - return new \DateTimeImmutable($date, new \DateTimeZone('Europe/Prague')); - } - -} diff --git a/src/Basic/DataProviderFactory.php b/src/Basic/DataProviderFactory.php deleted file mode 100644 index a7f9920..0000000 --- a/src/Basic/DataProviderFactory.php +++ /dev/null @@ -1,13 +0,0 @@ - - */ - public array $onAfterContent = []; - - - public function __construct(private AresRequestProvider $requestProvider) - { - $this->onAfterContent[] = fn (\stdClass $content) => self::fixContent($content); - } - - - /** - * @throws IdentificationNumberNotFoundException - */ - public function load(string $in): \stdClass - { - $answer = $this->requestProvider->businessList($in); - - $data = RequestProvider::toJson($answer); - - $this->onAfterContent($data); - - if (isset($data->Vypis_OR->ZAU->PFO->KPF)) { - $data->Vypis_OR->ZAU->PFO->KPF = intval($data->Vypis_OR->ZAU->PFO->KPF); - } - - return $data->Vypis_OR; - } - - - private static function fixContent(\stdClass $data): void - { - self::walk($data->Vypis_OR, function ($value) { - return Strings::replace(trim($value), '/ {2,}/', ' '); - }); - - Utils::nameAddress($data->Vypis_OR->SO ?? null, 'CSO'); - Utils::nameAddress($data->Vypis_OR->SSV ?? null, 'SS'); - Utils::nameAddress($data->Vypis_OR->DR ?? null, 'CDR'); - Utils::nameAddress($data->Vypis_OR->AKI ?? null, 'AKR'); - Utils::nameAddress($data->Vypis_OR->PRO ?? null, 'PRA'); - Utils::nameAddress($data->Vypis_OR->SOK ?? null, 'CSK'); - Utils::nameAddress($data->Vypis_OR->LI ?? null, 'LIR'); - - Utils::nameAddress($data->Vypis_OR->KME ?? null, 'KMA'); - Utils::nameAddress($data->Vypis_OR->KPI ?? null, 'KPR'); - - // o.s. / k.s. - Utils::address($data->Vypis_OR->ZAU->SI); - } - - - /** - * @param array|object|null $value - */ - private static function walk(&$value, \Closure $callback): void - { - if ($value === null) { - return; - } - - array_walk($value, function (&$value) use ($callback) { - if (is_string($value)) { - $value = ($callback)($value); - - return; - } - - self::walk($value, $callback); - }); - } - -} diff --git a/src/DataBox/Client.php b/src/DataBox/Client.php index b555338..e9ebbe8 100644 --- a/src/DataBox/Client.php +++ b/src/DataBox/Client.php @@ -2,33 +2,40 @@ namespace h4kuna\Ares\DataBox; -use h4kuna\Ares\Exceptions\ConnectionException; -use h4kuna\Ares\Http\RequestProvider; +use h4kuna\Ares\Exceptions\ResultException; +use h4kuna\Ares\Exceptions\ServerResponseException; +use h4kuna\Ares\Http\TransportProvider; +use h4kuna\Ares\Tools\Xml; use Psr\Http\Message\StreamInterface; +use stdClass; /** * @see https://www.mojedatovaschranka.cz/sds/p/download/sds_webove_sluzby.pdf#view=Fit */ final class Client { + public static string $url = 'https://www.mojedatovaschranka.cz/sds/ws/call'; + + public function __construct( - private RequestProvider $requestProvider, + private TransportProvider $requestProvider, ) { } - public function request(StreamInterface $body): \stdClass + public function request(StreamInterface $body): stdClass { - $request = $this->requestProvider->createXmlRequest('https://www.mojedatovaschranka.cz/sds/ws/call', $body); + $request = $this->requestProvider->createXmlRequest(self::$url, $body); + + $response = $this->requestProvider->response($request); - $xml = $this->requestProvider->xmlResponse($request); - $data = RequestProvider::toJson($xml); + $data = Xml::toJson($response); if (isset($data->Message)) { - throw new ConnectionException($data->Message); - } elseif (!isset($data->Osoba)) { - throw new ConnectionException('No content'); + throw new ResultException($data->Message); + } elseif (isset($data->Osoba) === false) { + throw new ServerResponseException('No content'); } return $data; diff --git a/src/DataBox/ContentProvider.php b/src/DataBox/ContentProvider.php index 457f5da..0b0b703 100644 --- a/src/DataBox/ContentProvider.php +++ b/src/DataBox/ContentProvider.php @@ -4,7 +4,7 @@ use Psr\Http\Message\StreamFactoryInterface; -final class ContentProvider +class ContentProvider { public function __construct( private Client $client, @@ -20,7 +20,7 @@ public function load(string $in): \stdClass } - private function xml(string $parameter, string $value): \stdClass + protected function xml(string $parameter, string $value): \stdClass { $xml = << diff --git a/src/Error.php b/src/Error.php deleted file mode 100644 index 72b0815..0000000 --- a/src/Error.php +++ /dev/null @@ -1,34 +0,0 @@ -code === 61; - } - - - /** - * @return array{in: string, code: int, message: string} - */ - public function toArray(): array - { - return [ - 'in' => $this->in, - 'code' => $this->code, - 'message' => $this->message, - ]; - } - -} diff --git a/src/Exceptions/ConnectionException.php b/src/Exceptions/ConnectionException.php index ef228f6..aa0b32e 100644 --- a/src/Exceptions/ConnectionException.php +++ b/src/Exceptions/ConnectionException.php @@ -4,7 +4,11 @@ use Psr\Http\Client\ClientExceptionInterface; -final class ConnectionException extends \RuntimeException implements ClientExceptionInterface +/** + * @deprecated see + * @see ServerResponseException + */ +class ConnectionException extends \RuntimeException implements ClientExceptionInterface { /** @@ -12,7 +16,7 @@ final class ConnectionException extends \RuntimeException implements ClientExcep * @param int $code */ public function __construct( - $message = 'The Ares probably is overloaded. Repeat request after few minutes.', + $message = 'The service is probably overloaded. Repeat request after a few minutes.', $code = 0, \Throwable $previous = null, ) diff --git a/src/Exceptions/IdentificationNumberNotFoundException.php b/src/Exceptions/IdentificationNumberNotFoundException.php index e3e6262..90e389f 100644 --- a/src/Exceptions/IdentificationNumberNotFoundException.php +++ b/src/Exceptions/IdentificationNumberNotFoundException.php @@ -2,7 +2,6 @@ namespace h4kuna\Ares\Exceptions; -use Nette\Utils\Strings; use Throwable; final class IdentificationNumberNotFoundException extends AresException @@ -13,9 +12,7 @@ final class IdentificationNumberNotFoundException extends AresException public function __construct(string $message = '', string $in = '', Throwable $previous = null) { - $match = Strings::match($message, '/Chyba +(?\d+)/'); - - parent::__construct($message, intval($match['code'] ?? 0), $previous); + parent::__construct($message, $previous === null ? 0 : $previous->getCode(), $previous); $this->in = $in; } diff --git a/src/Exceptions/InvalidStateException.php b/src/Exceptions/InvalidStateException.php new file mode 100644 index 0000000..6d11952 --- /dev/null +++ b/src/Exceptions/InvalidStateException.php @@ -0,0 +1,8 @@ + $in, - ]; - - $url = self::ONE_BL . '?' . http_build_query($parameters); - - return $this->xmlResponse($url, $in); - } - - - /** - * @throws IdentificationNumberNotFoundException - */ - public function basic(string $in): \SimpleXMLElement - { - $parameters = [ - 'ico' => $in, - 'aktivni' => 'false', - ]; - - $url = self::ONE_IN . '?' . http_build_query($parameters); - - return $this->xmlResponse($url, $in); - } - - - /** - * @throws IdentificationNumberNotFoundException - */ - private function xmlResponse(string $url, string $in): \SimpleXMLElement - { - $request = $this->requestProvider->createRequest($url); - $xml = $this->requestProvider->xmlResponse($request); - - $ns = $xml->getDocNamespaces(); - if (!isset($ns['are']) || !isset($ns['D'])) { - throw new ConnectionException(); - } - self::parseErrorAnswer($xml, $in); - - return $xml->children($ns['are'])->children($ns['D']); - } - - - /** - * @param array|array $identificationNumbersBatch - */ - public function basicMulti(array $identificationNumbersBatch): ResponseInterface - { - $request = $this->requestProvider->createXmlRequest(self::MULTI_IN, - $this->streamFactory->createStream( - $this->createBodyContent($identificationNumbersBatch), - ), - ); - - try { - return $this->client->sendRequest($request); - } catch (ClientExceptionInterface $e) { - throw new ConnectionException($e->getMessage(), $e->getCode(), $e); - } - } - - - /** - * @param array|array $identificationNumbers - */ - private function createBodyContent(array $identificationNumbers): string - { - $date = date('Y-m-dTH:i:s'); - $countIn = count($identificationNumbers); - $content = << - BODY; - - foreach ($identificationNumbers as $key => $in) { - $content .= "$key$in"; - } - - return $content . ''; - } - - - private static function parseErrorAnswer(\SimpleXMLElement $answer, string $in): void - { - $errorMessage = self::xmlValue($answer, '//D:ET[1]'); - $errorCode = self::xmlValue($answer, '//D:EK[1]'); - if ($errorMessage === null && $errorCode === null) { - return; - } - - // 61 - subject disappeared - // 71 - not exists - if ($errorMessage === '') { - throw new ConnectionException(); - } - throw new IdentificationNumberNotFoundException(sprintf('IN "%s", Error: #%s, %s', $in, $errorCode, $errorMessage), $in); - } - - - private static function xmlValue(\SimpleXMLElement $xml, string $xpath): ?string - { - $result = $xml->xpath($xpath); - if ($result === false || !isset($result[0])) { - return null; - } - - return trim((string) $result[0]); - } - -} diff --git a/src/Http/HttpFactory.php b/src/Http/HttpFactory.php index 4ff66c1..d9a5f88 100644 --- a/src/Http/HttpFactory.php +++ b/src/Http/HttpFactory.php @@ -12,7 +12,9 @@ use Psr\Http\Message\StreamInterface; /** - * fallback for guzzlehttp/psr7 + * @deprecated only for guzzle/psr7 < 2.0 + * Copy from see + * @see https://github.com/guzzle/psr7/blob/2.6/src/HttpFactory.php */ final class HttpFactory implements RequestFactoryInterface, StreamFactoryInterface { diff --git a/src/Http/RequestProvider.php b/src/Http/TransportProvider.php similarity index 52% rename from src/Http/RequestProvider.php rename to src/Http/TransportProvider.php index d449754..b198b12 100644 --- a/src/Http/RequestProvider.php +++ b/src/Http/TransportProvider.php @@ -2,39 +2,37 @@ namespace h4kuna\Ares\Http; -use h4kuna\Ares\Exceptions\ConnectionException; +use h4kuna\Ares\Exceptions\ServerResponseException; use Nette\Utils\Json; use Psr\Http\Client\ClientExceptionInterface; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestFactoryInterface; use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\StreamFactoryInterface; use Psr\Http\Message\StreamInterface; -final class RequestProvider +final class TransportProvider { public function __construct( private RequestFactoryInterface $requestFactory, private ClientInterface $client, + private StreamFactoryInterface $streamFactory, ) { } - public function xmlResponse(RequestInterface|string $url): \SimpleXMLElement + public function response(RequestInterface|string $url): ResponseInterface { $request = $url instanceof RequestInterface ? $url : $this->createRequest($url); try { $response = $this->client->sendRequest($request); } catch (ClientExceptionInterface $e) { - throw new ConnectionException($e->getMessage(), $e->getCode(), $e); + throw new ServerResponseException($e->getMessage(), $e->getCode(), $e); } - $xml = @simplexml_load_string($response->getBody()->getContents()); - if ($xml === false) { - throw new ConnectionException(); - } - - return $xml; + return $response; } @@ -45,24 +43,31 @@ public function createRequest(string $url, string $method = 'GET'): RequestInter } + /** + * @param array $data + */ + public function createJsonRequest(string $url, array $data = []): RequestInterface + { + $request = $this->createPost($url, 'application/json'); + if ($data !== []) { + $request = $request->withBody($this->streamFactory->createStream(Json::encode($data))); + } + + return $request; + } + + public function createXmlRequest(string $url, StreamInterface $body): RequestInterface { - return $this->createRequest($url, 'POST') - ->withHeader('Content-Type', 'application/xml; charset=utf-8') + return $this->createPost($url, 'application/xml') ->withBody($body); } - public static function toJson(\SimpleXMLElement $answer): \stdClass + private function createPost(string $url, string $contentType): RequestInterface { - try { - $data = Json::decode(Json::encode($answer)); - assert($data instanceof \stdClass); - } catch (\JsonException $e) { - throw new ConnectionException($e->getMessage(), $e->getCode(), $e); - } - - return $data; + return $this->createRequest($url, 'POST') + ->withHeader('Content-Type', "$contentType; charset=utf-8"); } } diff --git a/src/Tools/Strings.php b/src/Tools/Strings.php new file mode 100644 index 0000000..3874252 --- /dev/null +++ b/src/Tools/Strings.php @@ -0,0 +1,46 @@ +format($date::RFC3339); + } + +} diff --git a/src/Tools/Utils.php b/src/Tools/Utils.php deleted file mode 100644 index be19fe1..0000000 --- a/src/Tools/Utils.php +++ /dev/null @@ -1,124 +0,0 @@ -$property === null) { - $content->$property = []; - } elseif (is_array($content->$property) === false) { - $content->$property = [$content->$property]; - } - - return true; - } - - return false; - } - - - public static function nameAddress(?\stdClass $content, string $property): void - { - if (self::toArray($content, $property) === false) { - return; - } elseif (isset($content->$property) && is_array($content->$property) === true) { - foreach ($content->$property as $item) { - if (isset($item->C->FO)) { - self::person($item->C->FO); - } - if (isset($item->FO)) { - self::person($item->FO); - } - if (isset($item->C->PO)) { - self::company($item->C->PO); - } - if (isset($item->PO)) { - self::company($item->PO); - } - if (isset($item->C->VF->DZA)) { - $item->C->VF->DZA = self::toDate($item->C->VF->DZA); - } - if (isset($item->C->CLE->DZA)) { - $item->C->CLE->DZA = self::toDate($item->C->CLE->DZA); - } - } - } - } - - - private static function person(\stdClass $person): void - { - if (isset($person->DN)) { - $person->DN = self::toDate($person->DN); - } - - if (isset($person->J)) { - $person->J = self::capitalize($person->J); - } - - if (isset($person->P)) { - $person->P = self::capitalize($person->P); - } - - if (isset($person->B)) { - self::address($person->B); - } - } - - - private static function toDate(string $date): \DateTimeImmutable - { - $date = \DateTimeImmutable::createFromFormat('!Y-m-d', $date); - assert($date !== false); - - return $date; - } - - - private static function capitalize(string $string): string - { - return Strings::capitalize($string); - } - - - public static function address(\stdClass $address): void - { - $addr = new \stdClass(); - $addr->zip = $address->PSC ?? ''; - $addr->ks = $address->KS; - $addr->country = $address->NS; - - $cd = $address->CD ?? null; - $nu = $address->NU ?? ''; - $nco = $address->NCO ?? null; - if ($cd === null && $nu !== '') { // číslo domu je obsaženo v ulici - $match = Strings::match($nu, '/(?\d+(?:\/[\d\w]+)?)$/'); - $cd = $match['CD'] ?? ''; - $nu = trim(str_replace($cd, '', $nu)); - } - - if ($nu === '' && $nco !== null) { - $nu = $nco; - $nco = null; - } - - $addr->street = $nu === '' ? $nco : $nu; - $addr->house = isset($address->CO) ? trim($cd . '/' . $address->CO, '/') : $cd; - $addr->city = isset($nco) ? $address->N . ' - ' . $nco : $address->N; - - $address->optional = $addr; - } - - - private static function company(\stdClass $company): void - { - self::address($company->SI); - } - -} diff --git a/src/Tools/Xml.php b/src/Tools/Xml.php new file mode 100644 index 0000000..4b4d541 --- /dev/null +++ b/src/Tools/Xml.php @@ -0,0 +1,32 @@ +getBody()->getContents()); + if ($xml === false) { + throw new ServerResponseException(); + } + + try { + $data = Json::decode(Json::encode($xml)); + assert($data instanceof \stdClass); + } catch (JsonException $e) { + throw new ServerResponseException($e->getMessage(), $e->getCode(), $e); + } + + return $data; + } + +} diff --git a/src/aliases.php b/src/aliases.php index fd5aef8..f313af5 100644 --- a/src/aliases.php +++ b/src/aliases.php @@ -1,23 +1,18 @@ -> DTO_COMMON,<> Řazení a stránkování,<> Technické,<> DATOVE_TYPY_COMMON,<> StandardizovaneAdresySluzba,<> DTO_RUIAN_COMMON,<> CiselnikyNazevnikySluzba,<> DTO_CIS_COMMON,<> DTO_COMMON_DETAIL,<> EkonomickeSubjektySluzba,<> DTO_ARES_COMMON,<> EkonomickeSubjektyVrSluzba,<> DTO_VR,<> DTO_VR_COMMON,<> EkonomickeSubjektyResSluzba,<> DTO_RES_COMMON,<> EkonomickeSubjektyRzpSluzba,<> DTO_RZP_COMMON,<> DTO_RZP,<> EkonomickeSubjektyNrpzsSluzba,<> DTO_NRPZS_COMMON,<> EkonomickeSubjektyRcnsSluzba,<> DTO_RCNS_COMMON,<> DTO_RCNS,<> EkonomickeSubjektyRpshSluzba,<> DTO_RPSH_COMMON,<> EkonomickeSubjektyRsSluzba,<> DTO_RS_COMMON,<> DTO_RS,<> EkonomickeSubjektySzrSluzba,<> REST_SZR_DTO_COMMON,<> DTO_SZR,<> EkonomickeSubjektyCeuSluzba,<> REST_CEU_DTO_COMMON,<> DTO_CEU,<> DTO_COMMON_DETAIL_NEV", + "version" : "0.0.0.1" + }, + "security" : [ + { + "BasicAuth" : [ + ] + }, + { + "BearerAuth" : [ + ] + } + ], + "paths" : { + "/standardizovane-adresy/vyhledat" : { + "post" : { + "description" : "Vyhledání seznamu standardizovaných adres RÚIAN podle komplexního filtru", + "operationId" : "vyhledejStandardizovaneAdresy", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/StandardizovaneAdresySeznam" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/StandardizovanaAdresaFiltr" + } + } + } + }, + "tags" : [ + "standardizovane-adresy" + ] + } + }, + "/ciselniky-nazevniky/vyhledat" : { + "post" : { + "description" : "Vyhledání číselníků používaných v IS ARES podle komplexního filtru", + "operationId" : "vyhledejCiselnik", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CiselnikyNazevnikSeznam" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CiselnikyZakladniFiltr" + } + } + } + }, + "tags" : [ + "ciselniky-nazevniky" + ] + } + }, + "/ekonomicke-subjekty/vyhledat" : { + "post" : { + "description" : "Vyhledání seznamu ekonomických subjektů ARES podle komplexního filtru", + "operationId" : "vyhledejEkonomickeSubjekty", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektySeznam" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektyKomplexFiltr" + } + } + } + }, + "tags" : [ + "ekonomicke-subjekty" + ] + } + }, + "/ekonomicke-subjekty/{ico}" : { + "get" : { + "description" : "Vyhledání ekonomického subjektu ARES podle zadaného iča ", + "operationId" : "vratEkonomickySubjekt", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickySubjekt" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + { + "in" : "path", + "name" : "ico", + "required" : true, + "schema" : { + "maxLength" : 8, + "minLength" : 8, + "pattern" : "^\\d{8}$", + "type" : "string" + } + } + ], + "tags" : [ + "ekonomicke-subjekty" + ] + } + }, + "/ekonomicke-subjekty-vr/{ico}" : { + "get" : { + "description" : "Vyhledání konkrétního ekonomického subjektu ze zdroje VR", + "operationId" : "vratEkonomickySubjektVr", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickySubjektVr" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + { + "in" : "path", + "name" : "ico", + "required" : true, + "schema" : { + "maxLength" : 32, + "pattern" : "^(ARES_)?\\d{8}$", + "type" : "string" + } + } + ], + "tags" : [ + "ekonomicke-subjekty-vr" + ] + } + }, + "/ekonomicke-subjekty-vr/vyhledat" : { + "post" : { + "description" : "Vyhledání seznamu ekonomických subjektu ze zdroje VR", + "operationId" : "vyhledejSeznamEkonomickychSubjektuVr", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektyVrSeznam" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektyRegistraceFiltr" + } + } + } + }, + "tags" : [ + "ekonomicke-subjekty-vr" + ] + } + }, + "/ekonomicke-subjekty-res/{ico}" : { + "get" : { + "description" : "Vyhledání konkrétního ekonomického subjektu ze zdroje RES", + "operationId" : "vratEkonomickySubjektRes", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickySubjektRes" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + { + "in" : "path", + "name" : "ico", + "required" : true, + "schema" : { + "maxLength" : 32, + "pattern" : "^(ARES_)?\\d{8}$", + "type" : "string" + } + } + ], + "tags" : [ + "ekonomicke-subjekty-res" + ] + } + }, + "/ekonomicke-subjekty-res/vyhledat" : { + "post" : { + "description" : "Vyhledání seznamu ekonomických subjektu ze zdroje RES", + "operationId" : "vyhledejSeznamEkonomickychSubjektuRes", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektyResSeznam" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektyRegistraceFiltr" + } + } + } + }, + "tags" : [ + "ekonomicke-subjekty-res" + ] + } + }, + "/ekonomicke-subjekty-rzp/{ico}" : { + "get" : { + "description" : "Vyhledání konkrétního ekonomického subjektu ze zdroje RŽP", + "operationId" : "vratEkonomickySubjektRzp", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickySubjektRzp" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + { + "in" : "path", + "name" : "ico", + "required" : true, + "schema" : { + "maxLength" : 32, + "pattern" : "^(ARES_)?\\d{8}$", + "type" : "string" + } + } + ], + "tags" : [ + "ekonomicke-subjekty-rzp" + ] + } + }, + "/ekonomicke-subjekty-rzp/vyhledat" : { + "post" : { + "description" : "Vyhledání seznamu ekonomických subjektu ze zdroje RŽP", + "operationId" : "vyhledejSeznamEkonomickychSubjektuRzp", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektyRzpSeznam" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektyRegistraceFiltr" + } + } + } + }, + "tags" : [ + "ekonomicke-subjekty-rzp" + ] + } + }, + "/ekonomicke-subjekty-nrpzs/vyhledat" : { + "post" : { + "description" : "Vyhledání seznamu ekonomických subjektu ze zdroje NRPZS", + "operationId" : "vyhledejSeznamEkonomickychSubjektuNrpzs", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektyNrpzsSeznam" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektyRegistraceFiltr" + } + } + } + }, + "tags" : [ + "ekonomicke-subjekty-nrpzs" + ] + } + }, + "/ekonomicke-subjekty-nrpzs/{ico}" : { + "get" : { + "description" : "Vyhledání konkrétního ekonomického subjektu ze zdroje NRPZS", + "operationId" : "vratEkonomickySubjektNrpzs", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickySubjektNrpzs" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + { + "in" : "path", + "name" : "ico", + "required" : true, + "schema" : { + "maxLength" : 8, + "minLength" : 8, + "pattern" : "^\\d{8}$", + "type" : "string" + } + } + ], + "tags" : [ + "ekonomicke-subjekty-nrpzs" + ] + } + }, + "/ekonomicke-subjekty-rcns/{ico}" : { + "get" : { + "description" : "Vyhledání konkrétního ekonomického subjektu ze zdroje RCNS", + "operationId" : "vratEkonomickySubjektRcns", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickySubjektRcns" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + { + "in" : "path", + "name" : "ico", + "required" : true, + "schema" : { + "maxLength" : 32, + "pattern" : "^(ARES_)?\\d{8}$", + "type" : "string" + } + } + ], + "tags" : [ + "ekonomicke-subjekty-rcns" + ] + } + }, + "/ekonomicke-subjekty-rcns/vyhledat" : { + "post" : { + "description" : "Vyhledání seznamu ekonomických subjektu ze zdroje RCNS", + "operationId" : "vyhledejSeznamEkonomickychSubjektuRcns", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektyRcnsSeznam" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektyRegistraceFiltr" + } + } + } + }, + "tags" : [ + "ekonomicke-subjekty-rcns" + ] + } + }, + "/ekonomicke-subjekty-rpsh/{ico}" : { + "get" : { + "description" : "Vyhledání konkrétního ekonomického subjektu ze zdroje RPSH", + "operationId" : "vratEkonomickySubjektRpsh", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickySubjektRpsh" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + { + "in" : "path", + "name" : "ico", + "required" : true, + "schema" : { + "maxLength" : 32, + "pattern" : "^(ARES_)?\\d{8}$", + "type" : "string" + } + } + ], + "tags" : [ + "ekonomicke-subjekty-rpsh" + ] + } + }, + "/ekonomicke-subjekty-rpsh/vyhledat" : { + "post" : { + "description" : "Vyhledání seznamu ekonomických subjektu ze zdroje RPSH", + "operationId" : "vyhledejSeznamEkonomickychSubjektuRpsh", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektyRpshSeznam" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektyRegistraceFiltr" + } + } + } + }, + "tags" : [ + "ekonomicke-subjekty-rpsh" + ] + } + }, + "/ekonomicke-subjekty-rs/{ico}" : { + "get" : { + "description" : "Vyhledání konkrétního ekonomického subjektu ze zdroje RŠ", + "operationId" : "vratEkonomickySubjektRs", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickySubjektRs" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + { + "in" : "path", + "name" : "ico", + "required" : true, + "schema" : { + "maxLength" : 32, + "pattern" : "^(ARES_)?\\d{8}$", + "type" : "string" + } + } + ], + "tags" : [ + "ekonomicke-subjekty-rs" + ] + } + }, + "/ekonomicke-subjekty-rs/vyhledat" : { + "post" : { + "description" : "Vyhledání seznamu ekonomických subjektu ze zdroje RŠ", + "operationId" : "vyhledejSeznamEkonomickychSubjektuRs", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektyRsSeznam" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektyRegistraceFiltr" + } + } + } + }, + "tags" : [ + "ekonomicke-subjekty-rs" + ] + } + }, + "/ekonomicke-subjekty-szr/{ico}" : { + "get" : { + "description" : "Vyhledání konkrétního ekonomického subjektu ze zdroje SZR", + "operationId" : "vratEkonomickySubjektSzr", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickySubjektSzr" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + { + "in" : "path", + "name" : "ico", + "required" : true, + "schema" : { + "maxLength" : 32, + "pattern" : "^(ARES_)?\\d{8}$", + "type" : "string" + } + } + ], + "tags" : [ + "ekonomicke-subjekty-szr" + ] + } + }, + "/ekonomicke-subjekty-szr/vyhledat" : { + "post" : { + "description" : "Vyhledání seznamu ekonomických subjektu ze zdroje SZR", + "operationId" : "vyhledejSeznamEkonomickychSubjektuSzr", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektySzrSeznam" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektyRegistraceFiltr" + } + } + } + }, + "tags" : [ + "ekonomicke-subjekty-szr" + ] + } + }, + "/ekonomicke-subjekty-ceu/{ico}" : { + "get" : { + "description" : "Vyhledání konkrétního úpadce ze zdroje CEÚ", + "operationId" : "vratEkonomickySubjektCeu", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickySubjektCeu" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + { + "in" : "path", + "name" : "ico", + "required" : true, + "schema" : { + "maxLength" : 8, + "minLength" : 8, + "pattern" : "^\\d{8}$", + "type" : "string" + } + } + ], + "tags" : [ + "ekonomicke-subjekty-ceu" + ] + } + }, + "/ekonomicke-subjekty-ceu/vyhledat" : { + "post" : { + "description" : "Vyhledání seznamu úpadců ze zdroje CEÚ", + "operationId" : "vyhledejSeznamEkonomickychSubjektuCeu", + "responses" : { + "200" : { + "description" : "OK", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektyCeuSeznam" + } + } + } + }, + "400" : { + "description" : "Chyba vstupu", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "401" : { + "description" : "Chyba autentizace", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "403" : { + "description" : "Přístup zamítnut", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "404" : { + "description" : "Zdroj nenalezen", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "500" : { + "description" : "Neočekávaná chyba", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + } + }, + "parameters" : [ + ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/EkonomickeSubjektyRegistraceFiltr" + } + } + } + }, + "tags" : [ + "ekonomicke-subjekty-ceu" + ] + } + } + }, + "servers" : [ + { + "url" : "http://localhost/rest" + } + ], + "components" : { + "securitySchemes" : { + "BasicAuth" : { + "type" : "http", + "scheme" : "basic" + }, + "BearerAuth" : { + "type" : "http", + "scheme" : "bearer" + } + }, + "schemas" : { + "Adresa" : { + "type" : "object", + "description" : "Adresa ", + "properties" : { + "kodStatu" : { + "maxLength" : 3, + "minLength" : 3, + "type" : "string", + "description" : "Kód státu" + }, + "nazevStatu" : { + "maxLength" : 32, + "type" : "string", + "description" : "Název státu" + }, + "kodKraje" : { + "maximum" : 999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód kraje" + }, + "nazevKraje" : { + "maxLength" : 32, + "type" : "string", + "description" : "Název kraje" + }, + "kodOkresu" : { + "format" : "int32", + "maximum" : 9999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód okresu" + }, + "nazevOkresu" : { + "maxLength" : 32, + "type" : "string", + "description" : "Název okresu" + }, + "kodObce" : { + "format" : "int32", + "maximum" : 999999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód obce" + }, + "nazevObce" : { + "maxLength" : 48, + "type" : "string", + "description" : "Název obce" + }, + "kodSpravnihoObvodu" : { + "maximum" : 999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód správního obvodu Prahy" + }, + "nazevSpravnihoObvodu" : { + "maxLength" : 32, + "type" : "string", + "description" : "Název správního obvodu Prahy " + }, + "kodMestskehoObvodu" : { + "maximum" : 999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód městského obvodu Prahy" + }, + "nazevMestskehoObvodu" : { + "maxLength" : 32, + "type" : "string", + "description" : "Název městského obvodu Prahy" + }, + "kodMestskeCastiObvodu" : { + "format" : "int32", + "maximum" : 999999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód městské části statutárního města" + }, + "kodUlice" : { + "format" : "int32", + "maximum" : 9999999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód ulice, veřejného prostranství ze zdroje" + }, + "nazevMestskeCastiObvodu" : { + "maxLength" : 48, + "type" : "string", + "description" : "Název městské části statutárního města " + }, + "nazevUlice" : { + "maxLength" : 48, + "type" : "string", + "description" : "Název ulice, veřejného prostranství " + }, + "cisloDomovni" : { + "maximum" : 9999, + "type" : "integer", + "description" : "Číslo domovní" + }, + "doplnekAdresy" : { + "maxLength" : 1500, + "type" : "string" + }, + "kodCastiObce" : { + "format" : "int32", + "maximum" : 999999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód časti obce" + }, + "cisloOrientacni" : { + "maximum" : 999, + "type" : "integer", + "description" : "Číslo orientační - číselná část" + }, + "cisloOrientacniPismeno" : { + "maxLength" : 1, + "type" : "string", + "description" : "Číslo orientační - písmenná část" + }, + "nazevCastiObce" : { + "maxLength" : 48, + "type" : "string", + "description" : "Název části obce" + }, + "kodAdresnihoMista" : { + "maximum" : 999999999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód adresního místa" + }, + "psc" : { + "maximum" : 99999, + "type" : "integer", + "description" : "Poštovní směrovací číslo adresní pošty" + }, + "textovaAdresa" : { + "maxLength" : 1500, + "type" : "string", + "description" : "Nestrukturovaná adresa" + } + } + }, + "AngazovanaOsoba" : { + "type" : "object", + "description" : "Osoba v angažmá ekonomického subjektu", + "properties" : { + "jmeno" : { + "maxLength" : 100, + "type" : "string", + "description" : "Jméno fyzické osoby" + }, + "prijmeni" : { + "maxLength" : 100, + "type" : "string", + "description" : "Příjmení fyzické osoby" + }, + "titulPredJmenem" : { + "maxLength" : 32, + "type" : "string", + "description" : "Titul před jménem fyzické osoby " + }, + "titulZaJmenem" : { + "maxLength" : 32, + "type" : "string", + "description" : "Titul za jménem fyzické osoby" + }, + "datumNarozeni" : { + "format" : "date", + "type" : "string", + "description" : "Datum narození fyzické osoby" + } + } + }, + "EkonomickySubjektZaklad" : { + "type" : "object", + "description" : "Základní informace o ekonomickém subjektu", + "properties" : { + "ico" : { + "maxLength" : 8, + "minLength" : 8, + "pattern" : "^\\d{8}$", + "type" : "string", + "description" : "Identifikační číslo osoby - IČO" + }, + "obchodniJmeno" : { + "maxLength" : 2000, + "minLength" : 1, + "type" : "string", + "description" : "Obchodní jméno ekonomického subjektu" + }, + "sidlo" : { + "$ref" : "#/components/schemas/Adresa", + "description" : "Sídlo ekonomického subjektu" + }, + "pravniForma" : { + "maxLength" : 3, + "minLength" : 3, + "pattern" : "^\\d{3}$", + "type" : "string", + "description" : "Právní forma- kód (ciselnikKod: PravniForma) " + }, + "financniUrad" : { + "maxLength" : 3, + "minLength" : 3, + "pattern" : "^\\d{3}$", + "type" : "string", + "description" : "Finanční úřad - kód (ciselnikKod: FinancniUrad)" + }, + "datumVzniku" : { + "format" : "date", + "type" : "string", + "description" : "Datum vzniku ekonomického subjektu " + }, + "datumZaniku" : { + "format" : "date", + "type" : "string", + "description" : "Datum zániku ekonomického subjektu" + }, + "datumAktualizace" : { + "format" : "date", + "type" : "string", + "description" : "Datum aktualizace záznamu" + }, + "dic" : { + "type" : "string", + "description" : "Daňové identifikační číslo" + } + } + }, + "AdresaDorucovaci" : { + "type" : "object", + "description" : "Adresa doručovací dle vyhlášky 359/2011 sb.", + "properties" : { + "radekAdresy1" : { + "maxLength" : 255, + "type" : "string", + "description" : "1. řádek doručovací adresy" + }, + "radekAdresy2" : { + "maxLength" : 255, + "type" : "string", + "description" : "2. řádek doručovací adresy" + }, + "radekAdresy3" : { + "maxLength" : 255, + "type" : "string", + "description" : "3. řádek doručovací adresy" + } + } + }, + "Seznam" : { + "type" : "object", + "description" : "Předek pro všechny seznamy.", + "properties" : { + "pocetCelkem" : { + "format" : "int32", + "minimum" : 0, + "type" : "integer", + "description" : "Počet prvků seznamu." + } + } + }, + "StrankovaniARazeni" : { + "type" : "object", + "description" : "Předek pro všechny seznamy obsahující stránkování a řazení.", + "properties" : { + "start" : { + "format" : "int32", + "minimum" : 0, + "type" : "integer", + "description" : "Offset pro stránkování (poloha prvního vráceného prvku)." + }, + "pocet" : { + "format" : "int32", + "minimum" : 0, + "type" : "integer", + "description" : "Počet prvků k výstupu." + }, + "razeni" : { + "type" : "array", + "items" : { + "type" : "string", + "description" : "Seznam názvů definujících řazení výstupu." + } + } + } + }, + "Chyba" : { + "type" : "object", + "properties" : { + "kod" : { + "$ref" : "#/components/schemas/KodChybyEnum", + "description" : "Číselníkový kód chyby" + }, + "popis" : { + "type" : "string", + "description" : "Popis chyby" + }, + "subKod" : { + "type" : "string", + "description" : "Subkod chyby" + } + } + }, + "Chyby" : { + "type" : "object", + "properties" : { + "chyby" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Chyba" + } + } + } + }, + "StandardizovaneAdresySeznam" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/Seznam" + }, + { + "properties" : { + "standardizovaneAdresy" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/StandardizovanaAdresa" + } + }, + "stavStandardizace" : { + "type" : "string", + "description" : "Stav standardizace adresy - kod (Číselník kod:StavStandardizaceAdresy) UPLNA, CASTECNA_OBEC/..., NEUSPESNA" + }, + "request" : { + "$ref" : "#/components/schemas/StandardizovanaAdresaFiltr" + } + } + } + ] + }, + "StandardizovanaAdresa" : { + "type" : "object", + "properties" : { + "typStavebnihoObjektu" : { + "type" : "string" + }, + "cisloDomovni" : { + "maximum" : 9999, + "type" : "integer", + "description" : "Číslo domovní" + }, + "cisloOrientacni" : { + "maximum" : 999, + "type" : "integer", + "description" : "Číslo orientační - číselná část" + }, + "cisloOrientacniPismeno" : { + "maxLength" : 1, + "type" : "string", + "description" : "Číslo orientační - písmenná část" + }, + "kodAdresnihoMista" : { + "maximum" : 999999999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód adresního místa" + }, + "kodCastiObce" : { + "format" : "int32", + "maximum" : 999999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód časti obce" + }, + "kodKraje" : { + "maximum" : 999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód kraje" + }, + "kodMestskeCastiObvodu" : { + "format" : "int32", + "maximum" : 999999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód městské části statutárního města" + }, + "kodMestskehoObvoduP" : { + "maximum" : 999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód městského obvodu Prahy" + }, + "kodObce" : { + "format" : "int32", + "maximum" : 999999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód obce" + }, + "kodOkresu" : { + "format" : "int32", + "maximum" : 9999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód okresu" + }, + "kodSpravnihoObvoduP" : { + "maximum" : 999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód správního obvodu Prahy" + }, + "kodStavebnihoObjektu" : { + "maximum" : 999999999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód stavebního objektu" + }, + "kodUlice" : { + "format" : "int32", + "maximum" : 9999999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód ulice, veřejného prostranství ze zdroje" + }, + "nazevCastiObce" : { + "maxLength" : 48, + "type" : "string", + "description" : "Název části obce" + }, + "nazevKraje" : { + "maxLength" : 32, + "type" : "string", + "description" : "Název kraje" + }, + "nazevMestskeCastiObvodu" : { + "maxLength" : 48, + "type" : "string", + "description" : "Název městské části statutárního města " + }, + "nazevMestskehoObvoduP" : { + "maxLength" : 32, + "type" : "string", + "description" : "Název městského obvodu Prahy" + }, + "nazevObce" : { + "maxLength" : 48, + "type" : "string", + "description" : "Název obce" + }, + "nazevOkresu" : { + "maxLength" : 32, + "type" : "string", + "description" : "Název okresu" + }, + "nazevSpravnihoObvoduP" : { + "maxLength" : 32, + "type" : "string", + "description" : "Název správního obvodu Prahy " + }, + "nazevUlice" : { + "maxLength" : 48, + "type" : "string", + "description" : "Název ulice, veřejného prostranství " + }, + "psc" : { + "maximum" : 99999, + "type" : "integer", + "description" : "Poštovní směrovací číslo adresní pošty" + }, + "textovaAdresa" : { + "maxLength" : 1500, + "type" : "string" + } + } + }, + "StandardizovanaAdresaFiltr" : { + "type" : "object", + "description" : "Adresa ", + "allOf" : [ + { + "$ref" : "#/components/schemas/StrankovaniARazeni" + }, + { + "properties" : { + "kodObce" : { + "format" : "int32", + "maximum" : 999999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód obce" + }, + "nazevObce" : { + "maxLength" : 48, + "type" : "string", + "description" : "Název obce" + }, + "kodCastiObce" : { + "format" : "int32", + "maximum" : 999999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód části obce" + }, + "nazevCastiObce" : { + "maxLength" : 48, + "type" : "string", + "description" : "Název části obce" + }, + "kodMestskehoCastiObvodu" : { + "format" : "int32", + "maximum" : 999999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód městské části statutárního města nebo Prahy " + }, + "nazevMestskehoCastiObvodu" : { + "maxLength" : 32, + "type" : "string", + "description" : "Název městské části statutárního města nebo Prahy" + }, + "kodUlice" : { + "format" : "int32", + "maximum" : 9999999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód ulice, veřejného prostranství " + }, + "nazevUlice" : { + "maxLength" : 48, + "type" : "string", + "description" : "Název ulice, veřejného prostranství " + }, + "cisloDomovni" : { + "maximum" : 9999, + "type" : "integer", + "description" : "Číslo domovní" + }, + "cisloOrientacni" : { + "maximum" : 999, + "type" : "integer", + "description" : "Číslo orientační - číselná část" + }, + "cisloOrientacniPismeno" : { + "maxLength" : 1, + "type" : "string", + "description" : "Číslo orientační - písmenná část" + }, + "kodAdresnihoMista" : { + "maximum" : 999999999, + "minimum" : 0, + "type" : "integer" + }, + "textovaAdresa" : { + "maxLength" : 1500, + "type" : "string", + "description" : "Nestrukturovaná adresa" + }, + "typStandardizaceAdresy" : { + "type" : "string", + "description" : "Typ požadované standardizace - kód (číselník kod:TypStandardizaceAdresy) UPLNA_STANDARDIZACE, VYHOVUJICI_ADRESY" + } + } + } + ] + }, + "CiselnikyNazevnikSeznam" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/Seznam" + }, + { + "properties" : { + "ciselniky" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Ciselnik" + } + } + } + } + ] + }, + "Ciselnik" : { + "type" : "object", + "properties" : { + "kodCiselniku" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Kód číselníku" + }, + "nazevCiselniku" : { + "maxLength" : 255, + "type" : "string", + "description" : "Název číselníku" + }, + "polozkyCiselniku" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PolozkaCiselniku", + "description" : "Položky číselníku" + } + }, + "zdrojCiselniku" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Zdroj číselníku" + } + } + }, + "CiselnikyZakladniFiltr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/StrankovaniARazeni" + }, + { + "properties" : { + "zdrojCiselniku" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Zdroj/oblast číselníku" + }, + "kodCiselniku" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Kód číselníku" + } + } + } + ] + }, + "NazevPolozky" : { + "type" : "object", + "description" : "Seznam názvů položky číselníků z ohledem na jazykovou mutaci", + "properties" : { + "kodJazyka" : { + "type" : "string", + "description" : "Kód jazyka položky číselníku" + }, + "nazev" : { + "maxLength" : 255, + "type" : "string", + "description" : "Název položky číselníku" + } + } + }, + "PolozkaCiselniku" : { + "type" : "object", + "properties" : { + "kod" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Kód položky číselníku" + }, + "nazev" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/NazevPolozky", + "description" : "Názvy položky číselníku" + } + }, + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Platnost položky od data" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "Platnost položky do data " + }, + "kodNadrizeny" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Nadřízený záznam položky číselníku" + } + } + }, + "AdresaFiltr" : { + "type" : "object", + "description" : "Adresa ", + "properties" : { + "kodCastiObce" : { + "format" : "int32", + "maximum" : 999999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód časti obce" + }, + "kodSpravnihoObvodu" : { + "maximum" : 999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód správního obvodu Prahy" + }, + "kodMestskeCastiObvodu" : { + "format" : "int32", + "maximum" : 999999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód městské části statutárního města" + }, + "kodUlice" : { + "format" : "int32", + "maximum" : 9999999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód ulice, veřejného prostranství ze zdroje" + }, + "cisloDomovni" : { + "maximum" : 9999, + "type" : "integer", + "description" : "Číslo domovní" + }, + "kodObce" : { + "format" : "int32", + "maximum" : 999999, + "minimum" : 0, + "type" : "integer", + "description" : "Kód obce" + }, + "cisloOrientacni" : { + "maximum" : 999, + "type" : "integer", + "description" : "Číslo orientační - číselná část" + }, + "cisloOrientacniPismeno" : { + "maxLength" : 1, + "type" : "string", + "description" : "Číslo orientační - písmenná část" + }, + "textovaAdresa" : { + "maxLength" : 1500, + "type" : "string", + "description" : "Nestrukturovaná adresa" + } + } + }, + "EkonomickeSubjektyRegistraceFiltr" : { + "type" : "object", + "description" : "Filtr pro vyhledání seznamu ekonomických subjektů podle parametru IČO. ", + "allOf" : [ + { + "$ref" : "#/components/schemas/StrankovaniARazeni" + }, + { + "properties" : { + "ico" : { + "type" : "array", + "items" : { + "maxLength" : 8, + "minLength" : 8, + "pattern" : "^\\d{8}$", + "type" : "string", + "description" : "Ičo ekonomického subjektu" + } + } + } + } + ] + }, + "EkonomickeSubjektyZakladFiltr" : { + "type" : "object", + "description" : "Filtr pro vyhledání seznamu ekonomických subjektů", + "allOf" : [ + { + "$ref" : "#/components/schemas/StrankovaniARazeni" + }, + { + "properties" : { + "ico" : { + "type" : "array", + "items" : { + "maxLength" : 8, + "minLength" : 8, + "pattern" : "^\\d{8}$", + "type" : "string", + "description" : "Ičo ekonomického subjektu" + } + }, + "obchodniJmeno" : { + "maxLength" : 2000, + "minLength" : 1, + "type" : "string", + "description" : "Obchodní jméno ekonomického subjektu" + }, + "sidlo" : { + "$ref" : "#/components/schemas/AdresaFiltr", + "description" : "Adresa sídla ekonomického subjektu" + }, + "pravniForma" : { + "type" : "array", + "items" : { + "maxLength" : 3, + "minLength" : 3, + "pattern" : "^\\d{3}$", + "type" : "string", + "description" : "Právní forma ekonomického subjektu - kód (ciselnikKod: PravniForma)" + } + }, + "financniUrad" : { + "type" : "array", + "items" : { + "maxLength" : 3, + "minLength" : 3, + "pattern" : "^\\d{3}$", + "type" : "string", + "description" : "Správně příslušný finanční úřad - kód (ciselnikKod: FinancniUrad)" + } + } + } + } + ] + }, + "EkonomickySubjektDalsiUdaje" : { + "type" : "object", + "properties" : { + "obchodniJmeno" : { + "type" : "array", + "items" : { + "maxLength" : 2000, + "minLength" : 1, + "type" : "string", + "description" : "Obchodní jméno ekonomického subjektu" + } + }, + "sidlo" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Adresa", + "description" : "Sídlo ekonomického subjektu " + } + }, + "datovyZdroj" : { + "maxLength" : 30, + "type" : "string", + "description" : "Identifikace primárního zdroje dat." + } + } + }, + "EkonomickeSubjektyKomplexFiltr" : { + "type" : "object", + "description" : "Filtr pro vyhledání seznamu ekonomických subjektů", + "allOf" : [ + { + "$ref" : "#/components/schemas/EkonomickeSubjektyZakladFiltr" + }, + { + "properties" : { + "czNace" : { + "type" : "array", + "items" : { + "maxLength" : 5, + "minLength" : 1, + "type" : "string", + "description" : "CZ-NACE ekonomického subjektu" + } + } + } + } + ] + }, + "SeznamRegistraci" : { + "type" : "object", + "description" : "Seznam registrací ekonomického subjektu v jednotlivých zdrojích", + "properties" : { + "stavZdrojeVr" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Stav ekonomického subjektu ve zdroji VR (Veřejné rejstříky) - kód (ciselnikKod: StavSubjektuAres) " + }, + "stavZdrojeRes" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Stav ekonomického subjektu ve zdroji RES (Registr ekonomických subjektů) - kód (ciselnikKod: StavSubjektuAres) " + }, + "stavZdrojeRzp" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Stav ekonomického subjektu ve zdroji RŽP (Registr živnostenského podnikání) - kód (ciselnikKod: StavSubjektuAres) " + }, + "stavZdrojeNrpzs" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Stav ekonomického subjektu ve zdroji NRPZS (Národní registr poskytovatelů zdrovotnických služeb) - kód (ciselnikKod: StavSubjektuAres) " + }, + "stavZdrojeRpsh" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Stav ekonomického subjektu ve zdroji RPSH (Registr politických stran a hnutí) - kód (ciselnikKod: StavSubjektuAres) " + }, + "stavZdrojeRcns" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Stav ekonomického subjektu ve zdroji RCNS(Registr církví a náboženských společenství) - kód (ciselnikKod: StavSubjektuAres) " + }, + "stavZdrojeSzr" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Stav ekonomického subjektu ve zdroji SZR(Společný zemědělský registr) - kód (ciselnikKod: StavSubjektuAres) " + }, + "stavZdrojeDph" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Stav ekonomického subjektu ve zdroji DPH(Registr plátců daně s přidané hodnoty) - kód (ciselnikKod: StavSubjektuAres) " + }, + "stavZdrojeSd" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Stav ekonomického subjektu ve zdroji SD(Registr plátců spotřební daně) -kód (ciselnikKod: StavSubjektuAres) " + }, + "stavZdrojeIr" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Stav ekonomického subjektu ve zdroji ISIR(Insolvenční rejstřík) - kód (ciselnikKod: StavSubjektuAres) " + }, + "stavZdrojeCeu" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Stav ekonomického subjektu ve zdroji CEÚ(Centrální evidence úpadců) - kód (ciselnikKod: StavSubjektuAres) " + }, + "stavZdrojeRs" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Stav ekonomického subjektu ve zdroji RŠ(Registr škol) - kód (ciselnikKod: StavSubjektuAres) " + }, + "stavZdrojeRed" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Stav ekonomického subjektu ve zdroji RED(Registr evidence dotací) - kód (ciselnikKod: StavSubjektuAres)" + } + } + }, + "EkonomickeSubjektySeznam" : { + "type" : "object", + "description" : "Seznam ekonomických subjektů ARES", + "allOf" : [ + { + "$ref" : "#/components/schemas/Seznam" + }, + { + "properties" : { + "ekonomickeSubjekty" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EkonomickySubjekt", + "description" : "Seznam záznamů ekonomických subjektů ARES" + } + } + } + } + ] + }, + "EkonomickySubjekt" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/EkonomickySubjektZaklad" + }, + { + "properties" : { + "icoId" : { + "maxLength" : 32, + "pattern" : "^(ARES_)?\\d{8}$", + "type" : "string", + "description" : "Ičo ekonomického subjektu, pokud je ičo přidělené. Id ekonomického subjektu, pokud je ičo nepřidělené." + }, + "adresaDorucovaci" : { + "$ref" : "#/components/schemas/AdresaDorucovaci", + "description" : "Doručovací adresa sídla ekonomického subjektu" + }, + "seznamRegistraci" : { + "$ref" : "#/components/schemas/SeznamRegistraci", + "description" : "seznam registraci ekonomického subjektu v jednotlivých datových zdrojích" + }, + "primarniZdroj" : { + "maxLength" : 30, + "type" : "string", + "description" : "Identifikace primárního zdroje dat." + }, + "dalsiUdaje" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EkonomickySubjektDalsiUdaje" + } + }, + "czNace" : { + "type" : "array", + "items" : { + "maxLength" : 5, + "minLength" : 1, + "type" : "string", + "description" : "Seznam CZ-NACE - seznam ekonomické činnosti - kód " + } + }, + "subRegistrSzr" : { + "type" : "string", + "description" : "Indeftifikátor sub-registru zdroje SZR - kód (ciselnikKod: SubRegistrSzr(zdroj:com)) " + } + } + } + ] + }, + "AngazmaFyzickaOsobaVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "clenstvi" : { + "$ref" : "#/components/schemas/AngazmaClenstviVr", + "description" : "Členství" + }, + "fyzickaOsoba" : { + "$ref" : "#/components/schemas/FyzickaOsobaVr" + } + } + } + ] + }, + "AngazmaOsobaVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "skrytyUdaj" : { + "$ref" : "#/components/schemas/ObecnyTextVr" + }, + "clenstvi" : { + "$ref" : "#/components/schemas/AngazmaClenstviVr" + }, + "pravnickaOsoba" : { + "$ref" : "#/components/schemas/PravnickaOsobaVr" + }, + "fyzickaOsoba" : { + "$ref" : "#/components/schemas/FyzickaOsobaVr" + } + } + } + ] + }, + "EkonomickeSubjektyVrSeznam" : { + "type" : "object", + "description" : "Seznam ekonomických subjektů ze zdroje VR", + "allOf" : [ + { + "$ref" : "#/components/schemas/Seznam" + }, + { + "properties" : { + "ekonomickeSubjekty" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EkonomickySubjektVr", + "description" : "Seznam ekonomických subjektů zdroje VR " + } + } + } + } + ] + }, + "EkonomickySubjektVr" : { + "type" : "object", + "properties" : { + "icoId" : { + "maxLength" : 32, + "pattern" : "^(ARES_)?\\d{8}$", + "type" : "string", + "description" : "ičo/id ekonomického subjektu" + }, + "zaznamy" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZaznamVr", + "description" : "Seznam záznamů daného iča" + } + } + } + }, + "InsolvencniRizeniVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "spravce" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazmaOsobaVr" + } + }, + "insolvencniZapis" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/InsolvencniZapisVr" + } + } + } + } + ] + }, + "KonkursVr" : { + "type" : "object", + "description" : "Údaj s s informací z konkurzního řízení", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "spravce" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazmaOsobaVr", + "description" : "Informace o konkurzním správci" + } + }, + "typKonkursu" : { + "maxLength" : 50, + "type" : "string", + "description" : "Typ konkursu - kód (ciselnikKod: TypKonkursu) " + }, + "datumRozhodnutiOs" : { + "format" : "date", + "type" : "string", + "description" : "Datum rozhodnutí okresního soudu" + }, + "datumVyveseni" : { + "format" : "date", + "type" : "string", + "description" : "Datum vyvěšení rozhodnutí" + }, + "spisZnOs" : { + "maxLength" : 255, + "type" : "string" + }, + "text" : { + "type" : "string", + "description" : "Vlastní informace o konkurzním řízení" + }, + "zruseniKonkursu" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ObecnyTextVr", + "description" : "Zrušení konkurzu" + } + } + } + } + ] + }, + "OdstepnyZavodVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "vedouci" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazmaOsobaVr", + "description" : "Vedoucí odštěpného závodu" + } + }, + "ostatniSkutecnosti" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ObecnyTextVr", + "description" : "Ostatní skutečnosti odštěpného závodu" + } + }, + "cinnosti" : { + "$ref" : "#/components/schemas/CinnostiVr", + "description" : "Předmět podnikání, předmět činnosti, účel" + }, + "ico" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/IcoVr", + "description" : "IČO odštěpného závodu" + } + }, + "sidlo" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AdresaVr", + "description" : "Sídlo odštěpného závodu" + } + }, + "pravniForma" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PravniFormaVr", + "description" : "Právní forma odštěpného závodu" + } + }, + "obchodniJmeno" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ObchodniJmenoVr", + "description" : "Obchodní jméno odštěpného závodu" + } + } + } + } + ] + }, + "OrganVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/AngazmaVr" + }, + { + "properties" : { + "pocetClenu" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PocetClenuVr" + } + }, + "clenoveOrganu" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazmaOsobaVr" + } + } + } + } + ] + }, + "PodnikatelVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/AngazmaVr" + }, + { + "properties" : { + "bydliste" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AdresaVr", + "description" : "Adresa bydliště podnikatele" + } + }, + "osobaPodnikatel" : { + "$ref" : "#/components/schemas/AngazmaFyzickaOsobaVr", + "description" : "Informace o osobě podnikatele" + }, + "pobyt" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AdresaVr", + "description" : "Adresa pobytu podnikatele" + } + } + } + } + ] + }, + "PravnickaOsobaVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/OsobaVr" + }, + { + "properties" : { + "ico" : { + "maxLength" : 8, + "minLength" : 8, + "pattern" : "^\\d{8}$", + "type" : "string", + "description" : "Idenitifikační číslo právnické osoby" + }, + "obchodniJmeno" : { + "maxLength" : 2000, + "minLength" : 1, + "type" : "string", + "description" : "Název právnické osoby" + }, + "zastoupeni" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazmaFyzickaOsobaVr", + "description" : "Zastoupení právnické osoby" + } + }, + "pravniForma" : { + "maxLength" : 3, + "minLength" : 3, + "pattern" : "^\\d{3}$", + "type" : "string", + "description" : "Právní forma - kód (ciselnikKod: PravniForma)" + } + } + } + ] + }, + "SpolecniciVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "nazev" : { + "maxLength" : 255, + "type" : "string" + }, + "spolecnik" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/SpolecnikVr" + } + }, + "spolecnyPodil" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/SpolecnyPodilVr", + "description" : "Společný podíl společníků" + } + }, + "uvolnenyPodil" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/UvolnenyPodilVr" + } + } + } + } + ] + }, + "SpolecnikVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "podil" : { + "$ref" : "#/components/schemas/PodilVr" + }, + "osoba" : { + "$ref" : "#/components/schemas/AngazmaOsobaVr" + } + } + } + ] + }, + "SpolecnyPodilVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "podilnik" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazmaOsobaVr" + } + }, + "podil" : { + "$ref" : "#/components/schemas/PodilVr" + } + } + } + ] + }, + "StatutarniOrganVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/OrganVr" + }, + { + "properties" : { + "zpusobJednani" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ObecnyTextVr", + "description" : "Způsob jednání statutárního orgánu" + } + } + } + } + ] + }, + "ZaznamVr" : { + "type" : "object", + "description" : "Detailní informace o ekonomickém subjektu ze zdroje VR", + "allOf" : [ + { + "$ref" : "#/components/schemas/ZaznamVrZaklad" + }, + { + "properties" : { + "ostatniOrgany" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/OrganVr" + } + }, + "statutarniOrgany" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/StatutarniOrganVr" + } + }, + "podnikatel" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PodnikatelVr" + } + }, + "spolecnici" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/SpolecniciVr" + } + }, + "odstepneZavody" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/OdstepnyZavodVr", + "description" : "Základní informace o odštěpných závodech daného subjektu" + } + }, + "insolvence" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/InsolvencniRizeniVr", + "description" : "Konktétní zápis insolvenčního řízení nad daným subjektem" + } + }, + "konkursy" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/KonkursVr", + "description" : "Údaj s informací z konkurzního řízení podle zákona 328/1991Sb." + } + } + } + } + ] + }, + "AdresaVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "adresa" : { + "$ref" : "#/components/schemas/Adresa" + }, + "typAdresy" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ typu adresy - kód (ciselnikKod: TypAdresy) " + } + } + } + ] + }, + "AngazmaClenstviVr" : { + "type" : "object", + "properties" : { + "textZaOsobu" : { + "type" : "string", + "description" : "Doplňující text k osobě" + }, + "clenstvi" : { + "$ref" : "#/components/schemas/ClenstviVr", + "description" : "Členství osoby v angažmá" + }, + "funkce" : { + "$ref" : "#/components/schemas/FunkceVr", + "description" : "Funkce osoby v angažmá" + }, + "textZruseni" : { + "type" : "string", + "description" : "Doplňující text k zrušení osoby" + } + } + }, + "AngazmaVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "nazevAngazma" : { + "maxLength" : 255, + "type" : "string", + "description" : "Název angažmá - nestandardní" + }, + "typAngazma" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ angažmá osoby (PO, FO)- kód (ciselnikKod: TypAngazmaAres) " + } + } + } + ] + }, + "CinnostiVr" : { + "type" : "object", + "properties" : { + "predmetPodnikani" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ObecnyTextVr", + "description" : "Předmět podnikání" + } + }, + "doplnkovaCinnost" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ObecnyTextVr", + "description" : "Doplňková činnost" + } + }, + "predmetCinnosti" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ObecnyTextVr", + "description" : "Předmět činnosti" + } + }, + "ucel" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ObecnyTextVr", + "description" : "Účel" + } + } + } + }, + "ClenstviVr" : { + "type" : "object", + "properties" : { + "vznikClenstvi" : { + "format" : "date", + "type" : "string" + }, + "zanikClenstvi" : { + "format" : "date", + "type" : "string" + } + } + }, + "DatumVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "hodnota" : { + "format" : "date", + "type" : "string" + } + } + } + ] + }, + "DatumZapisuVymazuUdajeVr" : { + "type" : "object", + "properties" : { + "datumZapisu" : { + "format" : "date", + "type" : "string", + "description" : "Datum zápisu údaje" + }, + "datumVymazu" : { + "format" : "date", + "type" : "string", + "description" : "Datum výmazu údaje" + } + } + }, + "EmiseAkcieVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "typAkcie" : { + "maxLength" : 50, + "type" : "string", + "description" : "Typ akcie - kód (ciselnikKod: TypAkcie) " + }, + "podobaAkcie" : { + "maxLength" : 50, + "type" : "string", + "description" : "Podoby akcií (listinná, zaknihovaná, imobilizovaná) - kód (ciselnikKod: PodobaAkcie) " + }, + "pocet" : { + "format" : "int32", + "minimum" : 0, + "type" : "integer", + "description" : "Počet akcií v emisi" + }, + "text" : { + "type" : "string", + "description" : "Doplňkový text za akcií" + }, + "hodnota" : { + "$ref" : "#/components/schemas/ObnosVr", + "description" : "Hodnota akcie" + } + } + } + ] + }, + "FunkceVr" : { + "type" : "object", + "properties" : { + "vznikFunkce" : { + "format" : "date", + "type" : "string" + }, + "zanikFunkce" : { + "format" : "date", + "type" : "string" + }, + "nazev" : { + "maxLength" : 255, + "type" : "string", + "description" : "Název funkce" + } + } + }, + "FyzickaOsobaVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/OsobaVr" + }, + { + "properties" : { + "bydliste" : { + "$ref" : "#/components/schemas/Adresa", + "description" : "Adresa bydliště fyzické osoby" + }, + "datumNarozeni" : { + "format" : "date", + "type" : "string" + }, + "jmeno" : { + "maxLength" : 100, + "type" : "string" + }, + "prijmeni" : { + "maxLength" : 100, + "type" : "string" + }, + "statniObcanstvi" : { + "maxLength" : 3, + "minLength" : 3, + "type" : "string", + "description" : "Státní občanství osoby - kod (ciselnikKod: Stat)" + }, + "titulPredJmenem" : { + "maxLength" : 32, + "type" : "string" + }, + "titulZaJmenem" : { + "maxLength" : 32, + "type" : "string" + } + } + } + ] + }, + "IcoVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "hodnota" : { + "maxLength" : 8, + "minLength" : 8, + "pattern" : "^\\d{8}$", + "type" : "string", + "description" : "Hodnota IČO" + } + } + } + ] + }, + "InsolvencniZapisVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "text" : { + "type" : "string" + }, + "typZapisu" : { + "maxLength" : 50, + "type" : "string", + "description" : "Typ insolvenčního zápisu- kód (ciselnikKod: TypInsolvencnihoZapisu) " + } + } + } + ] + }, + "KategorieZoVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "typKategorieZo" : { + "maxLength" : 50, + "type" : "string", + "description" : "Typ kategorie zahraniční osoby - kód (ciselnikKod: TypKategorieZo) " + } + } + } + ] + }, + "ObecnyTextVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "hodnota" : { + "type" : "string" + } + } + } + ] + }, + "ObchodniJmenoCiziVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/ObchodniJmenoVr" + }, + { + "properties" : { + "jazyk" : { + "maxLength" : 255, + "type" : "string", + "description" : "jazyk" + } + } + } + ] + }, + "ObchodniJmenoVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "hodnota" : { + "maxLength" : 2000, + "minLength" : 1, + "type" : "string", + "description" : "Hodnota obchodního jména" + } + } + } + ] + }, + "ObnosVr" : { + "type" : "object", + "properties" : { + "typObnos" : { + "maxLength" : 50, + "type" : "string", + "description" : "Typ obnosu - kód (ciselnikKod: TypObnos)" + }, + "hodnota" : { + "type" : "string", + "description" : "Hodnota" + } + } + }, + "OsobaVr" : { + "type" : "object", + "properties" : { + "textOsoba" : { + "type" : "string", + "description" : "Doplňková informace k osobě" + }, + "textOsobaOd" : { + "format" : "date", + "type" : "string", + "description" : "Platnost doplňkové informace o osobě od data" + }, + "adresa" : { + "$ref" : "#/components/schemas/Adresa", + "description" : "Primární adresa dané osoby (u fyzické pobyt, u právnické sídlo)" + }, + "textOsobaDo" : { + "format" : "date", + "type" : "string", + "description" : "Platnost doplňkové informace o osobě od data" + } + } + }, + "PocetClenuVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "pocetClenu" : { + "format" : "int32", + "minimum" : 0, + "type" : "integer" + }, + "maxPocetClenu" : { + "format" : "int32", + "minimum" : 0, + "type" : "integer" + }, + "typ" : { + "maxLength" : 15, + "type" : "string", + "description" : "Typ počet členů - kód (ciselnikKod: TypPocetClenu) " + } + } + } + ] + }, + "PodilVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "text" : { + "type" : "string" + }, + "vklad" : { + "$ref" : "#/components/schemas/ObnosVr" + }, + "velikostPodilu" : { + "$ref" : "#/components/schemas/ObnosVr" + }, + "splaceni" : { + "$ref" : "#/components/schemas/ObnosVr" + }, + "zastavniPravo" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZastavniPravoVr" + } + } + } + } + ] + }, + "PravniFormaVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "hodnota" : { + "maxLength" : 3, + "minLength" : 3, + "pattern" : "^\\d{3}$", + "type" : "string", + "description" : "Hodnota pravní formy - kód" + } + } + } + ] + }, + "SpisovaZnackaVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "soud" : { + "maxLength" : 15, + "type" : "string", + "description" : "Obchodní soud" + }, + "oddil" : { + "maxLength" : 20, + "type" : "string", + "description" : "Oddíl spisové značky" + }, + "vlozka" : { + "type" : "integer", + "description" : "Vlozka spisové značky" + } + } + } + ] + }, + "UvolnenyPodilVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "clenstvi" : { + "$ref" : "#/components/schemas/AngazmaClenstviVr", + "description" : "Text k uvolněnému podílu" + }, + "podil" : { + "$ref" : "#/components/schemas/PodilVr" + } + } + } + ] + }, + "VkladVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "vklad" : { + "$ref" : "#/components/schemas/ObnosVr" + }, + "text" : { + "type" : "string" + }, + "typVkladu" : { + "maxLength" : 50, + "type" : "string", + "description" : "Typ vkladu - kód (ciselnikKod: TypVkladu)" + } + } + } + ] + }, + "ZakladniKapitalVr" : { + "type" : "object", + "description" : " údaj o základním kapitálu", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "typJmeni" : { + "maxLength" : 50, + "type" : "string", + "description" : "Typ jmění - kód (ciselnikKod: TypJmeni)" + }, + "text" : { + "type" : "string", + "description" : "Doplňující text" + }, + "vklad" : { + "$ref" : "#/components/schemas/ObnosVr", + "description" : "Celkový vklad" + }, + "splaceni" : { + "$ref" : "#/components/schemas/ObnosVr", + "description" : "Informace o splacení" + } + } + } + ] + }, + "ZastavniPravoVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "text" : { + "type" : "string" + }, + "vznikZastavnihoPrava" : { + "format" : "date", + "type" : "string" + }, + "zanikZastavnihoPrava" : { + "format" : "date", + "type" : "string" + } + } + } + ] + }, + "ZaznamVrZaklad" : { + "type" : "object", + "properties" : { + "akcie" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EmiseAkcieVr", + "description" : "Údaje popisující vlastnosti konkrétní akcie" + } + }, + "rejstrik" : { + "maxLength" : 15, + "type" : "string", + "description" : "Typ veřejného rejstříku (VR) - kód (ciselnikKod: TypRejstriku) " + }, + "primarniZaznam" : { + "type" : "boolean" + }, + "spisovaZnacka" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/SpisovaZnackaVr", + "description" : "Spisová značka" + } + }, + "ico" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/IcoVr", + "description" : "IČO" + } + }, + "obchodniJmeno" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ObchodniJmenoVr", + "description" : "Obchodní jméno firmy" + } + }, + "vklady" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/VkladVr", + "description" : "Údaje o vkladech" + } + }, + "obchodniJmenoCizi" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ObchodniJmenoCiziVr", + "description" : "Obchodní jméno firmy - zahraniční" + } + }, + "zakladniKapital" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZakladniKapitalVr", + "description" : "Údaj o základním kapitálu" + } + }, + "pravniForma" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PravniFormaVr", + "description" : "Právní forma - ROS" + } + }, + "financniUrad" : { + "maxLength" : 3, + "minLength" : 3, + "pattern" : "^\\d{3}$", + "type" : "string", + "description" : "Finanční úřad - kód (ciselnikKod: FinancniUrad) " + }, + "adresy" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AdresaVr", + "description" : "Sídlo firmy" + } + }, + "ostatniSkutecnosti" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ObecnyTextVr", + "description" : "Ostatní skutečnosti" + } + }, + "datumAktualizace" : { + "format" : "date", + "type" : "string", + "description" : "Datum aktualizace" + }, + "stavSubjektu" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Stav ekonomického subjektu v ARES - kód (ciselnikKod: StavZdroje (zdroj:com)) " + }, + "datumVzniku" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/DatumVr", + "description" : "Datum vzniku" + } + }, + "datumZapisu" : { + "format" : "date", + "type" : "string", + "description" : "Datum zápisu subjektu do VR" + }, + "datumVymazu" : { + "format" : "date", + "type" : "string", + "description" : "Datum výmazu subjektu z VR" + }, + "zpusobRizeni" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZpusobRizeniVr", + "description" : "Způsob řízení" + } + }, + "kategorieZO" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/KategorieZoVr", + "description" : "Kategorie zahraniční osoby" + } + }, + "pravniDuvodVymazu" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ObecnyTextVr", + "description" : "Právní důvod výmazu subjektu z VR" + } + }, + "cinnosti" : { + "$ref" : "#/components/schemas/CinnostiVr", + "description" : "Předmět podnikání, předmět činnosti, účel" + }, + "nazevNejvyssihoOrganu" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ObecnyTextVr", + "description" : "Název nejvyššího řídícího orgánu" + } + }, + "exekuce" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ObecnyTextVr" + } + } + } + }, + "ZpusobRizeniVr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/DatumZapisuVymazuUdajeVr" + }, + { + "properties" : { + "typ" : { + "maxLength" : 50, + "type" : "string", + "description" : "Způsob řízení - kód (ciselnikKod: ZpusobRizeni) " + } + } + } + ] + }, + "StatistickeUdaje" : { + "type" : "object", + "description" : "Statistické informace o subjektu", + "properties" : { + "institucionalniSektor2010" : { + "maxLength" : 5, + "minLength" : 5, + "pattern" : "^\\d{5}$", + "type" : "string", + "description" : "Institucinální sektor dle ESA2010 - kód" + }, + "kategoriePoctuPracovniku" : { + "maxLength" : 3, + "minLength" : 3, + "pattern" : "^\\d{3}$", + "type" : "string", + "description" : "Kategorie dle počtu pracovníků - kód" + } + } + }, + "ZaznamRes" : { + "type" : "object", + "description" : "Detailní informace o ekonomickém subjektu ze zdroje RES", + "allOf" : [ + { + "$ref" : "#/components/schemas/EkonomickySubjektZaklad" + }, + { + "properties" : { + "pravniFormaRos" : { + "maxLength" : 3, + "minLength" : 3, + "pattern" : "^\\d{3}$", + "type" : "string", + "description" : "Právní forma ROS" + }, + "czNace" : { + "type" : "array", + "items" : { + "maxLength" : 5, + "minLength" : 1, + "type" : "string", + "description" : "Seznam CZ-NACE - seznam ekonomické činnosti - kód " + } + }, + "doplnkovePravniFormy" : { + "type" : "array", + "items" : { + "maxLength" : 3, + "minLength" : 3, + "pattern" : "^\\d{3}$", + "type" : "string", + "description" : "Seznam doplňkových právních forem" + } + }, + "statistickeUdaje" : { + "$ref" : "#/components/schemas/StatistickeUdaje", + "description" : "Statistické údaje ekonomického subjektu" + }, + "zakladniUzemniJednotka" : { + "maxLength" : 6, + "minLength" : 6, + "pattern" : "^\\d{6}$", + "type" : "string", + "description" : "Základní územní jednotka sídla organizace - kód (ciselnikKod: ZakladniUzemniJednotka) " + }, + "primarniZaznam" : { + "type" : "boolean", + "description" : "Logická informace o primárním(hlavním) záznamu ekonomického subjektu. " + } + } + } + ] + }, + "EkonomickeSubjektyResSeznam" : { + "type" : "object", + "description" : "Seznam ekonomických subjektů ze zdroje RES", + "allOf" : [ + { + "$ref" : "#/components/schemas/Seznam" + }, + { + "properties" : { + "ekonomickeSubjekty" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EkonomickySubjektRes", + "description" : "Seznam ekonomických subjektů zdroje RES " + } + } + } + } + ] + }, + "EkonomickySubjektRes" : { + "type" : "object", + "properties" : { + "icoId" : { + "maxLength" : 32, + "pattern" : "^(ARES_)?\\d{8}$", + "type" : "string", + "description" : "ičo/id ekonomického subjektu " + }, + "zaznamy" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZaznamRes", + "description" : "Seznam záznamů daného iča" + } + } + } + }, + "AngazovanySubjektAdresa" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/Adresa" + }, + { + "properties" : { + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Platnost adresy od data" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "Platnost adresy do data" + } + } + } + ] + }, + "AngazovanySubjektRzpZaklad" : { + "type" : "object", + "description" : "Právnické osoby v angažmá ekonomického subjektu. ", + "properties" : { + "typAngazma" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ angažmá osoby u subjektu ve zdroji RŽP (Registr živnostenského podnikání) - kód (ciselnikKod: TypAngazmaAres) " + }, + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Platnost angažmá subjektu od data" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "Platnost angažmá subjektu do data" + }, + "ico" : { + "maxLength" : 8, + "minLength" : 8, + "pattern" : "^\\d{8}$", + "type" : "string", + "description" : "Ičo angažovaného subjektu" + }, + "obchodniJmeno" : { + "maxLength" : 2000, + "minLength" : 1, + "type" : "string", + "description" : "obchodní jméno angažovaného subjektu" + }, + "sidlo" : { + "$ref" : "#/components/schemas/AngazovanySubjektAdresa", + "description" : "Adresa sídla angažovaného subjektu" + }, + "typSubjektu" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ subjektu - kód (ciselnikKod: TypSubjektuRzp) " + }, + "pravniForma" : { + "maxLength" : 3, + "minLength" : 3, + "pattern" : "^\\d{3}$", + "type" : "string", + "description" : "Právní forma - kód" + }, + "kodStatu" : { + "maxLength" : 3, + "minLength" : 3, + "type" : "string", + "description" : "Kód státu " + } + } + }, + "EkonomickySubjektRzpAdresa" : { + "type" : "object", + "description" : "Vazební tabulka adres", + "allOf" : [ + { + "$ref" : "#/components/schemas/Adresa" + }, + { + "properties" : { + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Platnost adresy od data" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "Platnost adresy do data " + }, + "typAdresy" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ adresy - kód (ciselnikKod: TypAdresyAres) " + } + } + } + ] + }, + "InsolvencniRizeni" : { + "type" : "object", + "description" : "Události v rámci insolvenčního řízení", + "properties" : { + "datumZapisu" : { + "format" : "date", + "type" : "string", + "description" : "Datum zápisu události " + }, + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Datum zplatnění události " + } + } + }, + "ProvozovnaZaklad" : { + "type" : "object", + "properties" : { + "sidloProvozovny" : { + "$ref" : "#/components/schemas/Adresa", + "description" : "Adresa sídla provozovny" + }, + "umisteniProvozovny" : { + "maxLength" : 254, + "type" : "string", + "description" : "Umístění provozovny" + }, + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Platnost provozovny od data" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "Platnost provozovny do data " + }, + "pozastaveniProvozovny" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZivnostProvozovnaPozastaveni", + "description" : "Seznam období pozastavení provozovny" + } + }, + "typProvozovny" : { + "maxLength" : 1, + "minLength" : 1, + "pattern" : "^\\d{1}$", + "type" : "string", + "description" : "Typ provozovny - kód (ciselnikKod: TypProvozovny) " + }, + "nazev" : { + "maxLength" : 254, + "type" : "string", + "description" : "Název provozovny" + } + } + }, + "ProvozovnyRzpStav" : { + "type" : "object", + "properties" : { + "pocetCelkem" : { + "format" : "int32", + "minimum" : 0, + "type" : "integer", + "description" : "Celkový počet provozoven" + }, + "pocetZaniklych" : { + "format" : "int32", + "minimum" : 0, + "type" : "integer", + "description" : "Celkový počet zaniklých provozoven" + }, + "pocetAktivnich" : { + "format" : "int32", + "minimum" : 0, + "type" : "integer", + "description" : "Celkový počet aktivnich provozoven" + }, + "pocetPozastavenych" : { + "format" : "int32", + "minimum" : 0, + "type" : "integer", + "description" : "Celkový počet zaniklých provozoven" + } + } + }, + "ZaznamRzpZaklad" : { + "type" : "object", + "description" : "Detailní informace o ekonomickém subjektu ze zdroje RŽP", + "allOf" : [ + { + "$ref" : "#/components/schemas/EkonomickySubjektZaklad" + }, + { + "properties" : { + "insolvencniRizeni" : { + "$ref" : "#/components/schemas/InsolvencniRizeni", + "description" : "Události v rámci insolvenčního řízení" + }, + "datumDoruceniVypisu" : { + "format" : "date", + "type" : "string", + "description" : "Datum doručení prvního výpisu sloužícího jako průkaz živnostenského podnikání, " + }, + "adresySubjektu" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EkonomickySubjektRzpAdresa", + "description" : "Seznam adres " + } + }, + "typSubjektu" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ subjektu - kód (ciselnikKod: TypSubjektuRzp) " + }, + "zivnostenskyUrad" : { + "pattern" : "^\\d{6}$", + "type" : "string", + "description" : "Živnostenský úřadu - kód" + }, + "organizacniSlozka" : { + "maxLength" : 2000, + "minLength" : 1, + "type" : "string", + "description" : "Název organizační složky" + }, + "zivnostiStav" : { + "$ref" : "#/components/schemas/ZivnostiRzpStav" + }, + "datumZapisuVr" : { + "format" : "date", + "type" : "string", + "description" : "Datum zápisu do Obchodního nebo podobného rejstříku " + }, + "provozovnyStav" : { + "$ref" : "#/components/schemas/ProvozovnyRzpStav" + }, + "primarniZaznam" : { + "type" : "boolean" + }, + "kodStatu" : { + "maxLength" : 3, + "minLength" : 3, + "type" : "string", + "description" : "Kód státu " + } + } + } + ] + }, + "ZivnostBezOZ" : { + "type" : "object", + "properties" : { + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Zahájení vykonávání živnosti bez odpovědného zástupce od data " + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "Ukončení vykonávání živnosti bez odpovědného zástupce od data " + } + } + }, + "ZivnostiRzpStav" : { + "type" : "object", + "properties" : { + "pocetAktivnich" : { + "format" : "int32", + "minimum" : 0, + "type" : "integer", + "description" : "Celkový počet aktivních živností" + }, + "pocetZaniklych" : { + "format" : "int32", + "minimum" : 0, + "type" : "integer", + "description" : "Celkový počet zaniklých živností" + }, + "pocetPozastavenych" : { + "format" : "int32", + "minimum" : 0, + "type" : "integer", + "description" : "Celkový počet zaniklých živností" + }, + "pocetPrerusenych" : { + "format" : "int32", + "minimum" : 0, + "type" : "integer", + "description" : "Celkový počet zaniklých živností" + }, + "pocetCelkem" : { + "format" : "int32", + "minimum" : 0, + "type" : "integer", + "description" : "Celkový počet živností" + } + } + }, + "ZivnostOborCinnosti" : { + "type" : "object", + "properties" : { + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Platnost záznamu od data" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "Platnost záznamu do data" + }, + "oborNazev" : { + "maxLength" : 750, + "minLength" : 5, + "type" : "string", + "description" : "Název oboru" + } + } + }, + "ZivnostPodminky" : { + "type" : "object", + "description" : "Podmínky pro vykonávání živnosti", + "properties" : { + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Platnost podmínky od data" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "Platnost podmínky do data" + }, + "podminka" : { + "type" : "string", + "description" : "Text podmínky provozování živnosti" + } + } + }, + "ZivnostPreruseni" : { + "type" : "object", + "properties" : { + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Platnost přerušení živnosti od data" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "Platnost přerušení živnosti do data" + } + } + }, + "ZivnostProvozovnaPozastaveni" : { + "type" : "object", + "properties" : { + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Platnost pozastavení živnosti od data" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "Platnost pozastavení živnosti do data" + }, + "rozsahPozastaveni" : { + "maxLength" : 1024, + "type" : "string", + "description" : "Popis rozsahu pozastavení živnosti" + } + } + }, + "ZivnostZaklad" : { + "type" : "object", + "description" : "Živnosti, které ekonomický subjekt provozuje nebo provozoval", + "properties" : { + "datumVzniku" : { + "format" : "date", + "type" : "string", + "description" : "Datum vzniku živnosti " + }, + "datumZaniku" : { + "format" : "date", + "type" : "string", + "description" : "Datum zániku živnosti " + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "Platnost živnosti do data" + }, + "predmetPodnikani" : { + "maxLength" : 750, + "minLength" : 5, + "type" : "string", + "description" : "Předmět podnikáni živnosti" + }, + "pozastaveniZivnosti" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZivnostProvozovnaPozastaveni", + "description" : "Seznam období pozastavení živnosti" + } + }, + "podminkyProvozovaniZivnosti" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZivnostPodminky", + "description" : "Podmínky provozování živnosti" + } + }, + "preruseniZivnosti" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZivnostPreruseni", + "description" : "Seznam období přerušení živnosti " + } + }, + "zivnostBezOz" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZivnostBezOZ", + "description" : "Seznam období provozování živnosti bez odpovědného zástupce" + } + }, + "datumAktualizace" : { + "format" : "date", + "type" : "string", + "description" : "Datum aktualizace záznamu" + }, + "druhZivnosti" : { + "maxLength" : 1, + "minLength" : 1, + "type" : "string", + "description" : "Druh živnosti - kód (ciselnikKod: DruhZivnosti) " + } + } + }, + "AngazovanaOsobaRzp" : { + "type" : "object", + "description" : "Angažovaná osoba zdroje RŽP", + "allOf" : [ + { + "$ref" : "#/components/schemas/AngazovanaOsoba" + }, + { + "properties" : { + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Platnost angažmá osoby od data" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "Platnost angažmá osoby do data " + }, + "statniObcanstvi" : { + "maxLength" : 3, + "minLength" : 3, + "type" : "string", + "description" : "Státní občanství osoby - kod (ciselnikKod: Stat)" + }, + "typAngazma" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ angažmá osoby - kód (ciselnikKod: TypAngazmaAres) " + } + } + } + ] + }, + "AngazovanySubjektRzp" : { + "type" : "object", + "description" : "Právnické osoby v angažmá ekonomického subjektu. ", + "allOf" : [ + { + "$ref" : "#/components/schemas/AngazovanySubjektRzpZaklad" + }, + { + "properties" : { + "osobyZastupce" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazovanaOsobaRzp", + "description" : "Seznam zástupců angažovaného subjektu" + } + } + } + } + ] + }, + "EkonomickeSubjektyRzpSeznam" : { + "type" : "object", + "description" : "Seznam ekonomických subjektů ze zdroje RŽP", + "allOf" : [ + { + "$ref" : "#/components/schemas/Seznam" + }, + { + "properties" : { + "ekonomickeSubjekty" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EkonomickySubjektRzp", + "description" : "Seznam ekonomických subjektů zdroje RŽP " + } + } + } + } + ] + }, + "EkonomickySubjektRzp" : { + "type" : "object", + "properties" : { + "icoId" : { + "maxLength" : 32, + "pattern" : "^(ARES_)?\\d{8}$", + "type" : "string", + "description" : "ičo/id ekonomického subjektu" + }, + "zaznamy" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZaznamRzp", + "description" : "Seznam záznamů daného iča" + } + } + } + }, + "Provozovna" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/ProvozovnaZaklad" + }, + { + "properties" : { + "oboryCinnosti" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZivnostOborCinnosti", + "description" : "Seznam oborů činnosti živnosti" + } + } + } + } + ] + }, + "ZaznamRzp" : { + "type" : "object", + "description" : "Detailní informace o ekonomickém subjektu ze zdroje RŽP", + "allOf" : [ + { + "$ref" : "#/components/schemas/ZaznamRzpZaklad" + }, + { + "properties" : { + "souvisejiciSubjekty" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazovanySubjektRzp", + "description" : "Související subjekty, podílející se na řízení" + } + }, + "osobaPodnikatel" : { + "$ref" : "#/components/schemas/AngazovanaOsobaRzp", + "description" : "Informace o podnikateli" + }, + "angazovaneOsoby" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazovanaOsobaRzp", + "description" : "Seznam osob podílejícíh se na řízení" + } + }, + "zivnosti" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Zivnost", + "description" : "Seznam živností" + } + } + } + } + ] + }, + "Zivnost" : { + "type" : "object", + "description" : "Živnosti, které ekonomický subjekt provozuje nebo provozoval ve zdroji RŽP", + "allOf" : [ + { + "$ref" : "#/components/schemas/ZivnostZaklad" + }, + { + "properties" : { + "oboryCinnosti" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZivnostOborCinnosti", + "description" : "Seznam oborů činnosti živnosti" + } + }, + "odpovedniZastupci" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazovanaOsobaRzp", + "description" : "Odpovědní zástupci za živnost" + } + }, + "provozovny" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Provozovna", + "description" : "Provozovny" + } + } + } + } + ] + }, + "AngazovanaOsobaNrpzs" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/AngazovanaOsoba" + }, + { + "properties" : { + "typAngazma" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ angažmá osoby - kód (ciselnikKod: TypAngazmaAres) " + } + } + } + ] + }, + "Kontakty" : { + "type" : "object", + "properties" : { + "email" : { + "maxLength" : 50, + "type" : "string", + "description" : "Email zdravotnického zařízení " + }, + "fax" : { + "maxLength" : 25, + "minLength" : 1, + "type" : "string" + }, + "telefon" : { + "maxLength" : 25, + "minLength" : 1, + "type" : "string", + "description" : "Telefoní kontakt" + }, + "www" : { + "maxLength" : 255, + "minLength" : 1, + "type" : "string", + "description" : "WWW zdravotnického zařízení" + } + } + }, + "ZaznamNrpzs" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/EkonomickySubjektZaklad" + }, + { + "properties" : { + "poradoveCisloZar" : { + "maxLength" : 3, + "minLength" : 3, + "pattern" : "'^\\d{3}$'", + "type" : "string", + "description" : "Pořadové číslo zařízení " + }, + "poradoveCisloPrac" : { + "maxLength" : 3, + "minLength" : 3, + "pattern" : "'^\\d{3}$'", + "type" : "string", + "description" : "Pořadové číslo pracovistě " + }, + "typSubjektu" : { + "maxLength" : 2, + "minLength" : 2, + "type" : "string", + "description" : "Typ ekonomického subjektu - forma hospodaření - kód" + }, + "druhZarizeni" : { + "maxLength" : 3, + "minLength" : 3, + "pattern" : "'^\\d{3}$'", + "type" : "string", + "description" : "Druh zdravotnického zařízení" + }, + "primarniZaznam" : { + "type" : "boolean" + }, + "typZrizovatele" : { + "maxLength" : 1, + "minLength" : 1, + "type" : "string", + "description" : "Typ zřizovatele zdravotnického zařízení" + }, + "angazovaneOsoby" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazovanaOsobaNrpzs", + "description" : "Angažovaná osoba podílející se na řízení subjektu" + } + }, + "kontakty" : { + "$ref" : "#/components/schemas/Kontakty", + "description" : "Kontakty pro komunikaci se zdravotnickéhým zažízením" + } + } + } + ] + }, + "EkonomickeSubjektyNrpzsSeznam" : { + "type" : "object", + "description" : "Seznam ekonomických subjektů ze zdroje NRPZS", + "allOf" : [ + { + "$ref" : "#/components/schemas/Seznam" + }, + { + "properties" : { + "ekonomickeSubjekty" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EkonomickySubjektNrpzs", + "description" : "Seznam ekonomických subjektů zdroje NRPZS " + } + } + } + } + ] + }, + "EkonomickySubjektNrpzs" : { + "type" : "object", + "properties" : { + "icoId" : { + "maxLength" : 32, + "pattern" : "^(ARES_)?\\d{8}$", + "type" : "string", + "description" : "ičo/id ekonomického subjektu " + }, + "zaznamy" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZaznamNrpzs", + "description" : "Seznam záznamů daného iča" + } + } + } + }, + "AdresaRcns" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/Adresa" + }, + { + "properties" : { + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Platnost adresy od data" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "Platnost adresy do data" + }, + "typAdresy" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ adresy - kód (ciselnikKod: TypAdresyAres) " + } + } + } + ] + }, + "AngazovanySubjektRcnsZaklad" : { + "type" : "object", + "properties" : { + "ico" : { + "maxLength" : 8, + "minLength" : 8, + "pattern" : "^\\d{8}$", + "type" : "string" + }, + "dic" : { + "type" : "string", + "description" : "DIČ" + }, + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Platnost záznamu od data" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "Platnost záznamu do data" + }, + "sidlo" : { + "$ref" : "#/components/schemas/AdresaRcns", + "description" : "Adresa sídla" + }, + "obchodniJmeno" : { + "maxLength" : 2000, + "minLength" : 1, + "type" : "string", + "description" : "Obchodní jméno subjektu" + }, + "kodStatu" : { + "maxLength" : 3, + "minLength" : 3, + "type" : "string", + "description" : "Kód státu (ciselnikKod: Stat) " + }, + "pravniForma" : { + "maxLength" : 3, + "minLength" : 3, + "pattern" : "^\\d{3}$", + "type" : "string", + "description" : "Právní forma - kód (ciselnikKod: PravniForma) " + } + } + }, + "ClenSvazu" : { + "type" : "object", + "properties" : { + "ico" : { + "maxLength" : 8, + "minLength" : 8, + "pattern" : "^\\d{8}$", + "type" : "string" + }, + "platnostOd" : { + "format" : "date", + "type" : "string" + }, + "platnostDo" : { + "format" : "date", + "type" : "string" + } + } + }, + "PravoZvlastni" : { + "type" : "object", + "description" : "Oprávnění k výkonu zvláštních práv církve", + "properties" : { + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "začátek platnosti zvláštního práva subjektu " + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "konec platnosti zvláštního práva subjektu" + }, + "kodPravo" : { + "type" : "integer", + "description" : "Kód oprávnění pro výkon církve " + } + } + }, + "RegistraceRcns" : { + "type" : "object", + "properties" : { + "cisloRegistrace" : { + "maxLength" : 30, + "type" : "string", + "description" : "Pro subjekt typu církev a svaz církví je zde uvedeno registrační číslo pod kterým byl daný subjekt zaregistrován na MK. Pro subjekty typu právnická osoba je zde uvedeno evidenční číslo pod kterým byl daný subjekt zaevidován na MK." + }, + "cisloZruseniRegistrace" : { + "maxLength" : 30, + "type" : "string", + "description" : "Datum zrušení registrace, evidence subjektu na MK" + }, + "datumLikvidace" : { + "format" : "date", + "type" : "string", + "description" : "Datum vyhlášení likvidace subjektu" + }, + "datumKonkurzu" : { + "format" : "date", + "type" : "string", + "description" : "Datum vyhlášení konkurzu subjektu" + }, + "datumOpatrovnik" : { + "format" : "date", + "type" : "string", + "description" : "Datum jmenování opatrovníka" + }, + "datumZruseniRegistrace" : { + "format" : "date", + "type" : "string", + "description" : "Datum zrušení registrace, evidence subjektu na MK" + } + } + }, + "ZaznamRcnsZaklad" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/EkonomickySubjektZaklad" + }, + { + "properties" : { + "typSubjektu" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ subjektu - kód (ciselnikKod: TypSubjektuRcns) " + }, + "stat" : { + "maxLength" : 3, + "minLength" : 3, + "type" : "string" + }, + "primarniZaznam" : { + "type" : "boolean" + }, + "registrace" : { + "$ref" : "#/components/schemas/RegistraceRcns" + }, + "zpusobJednani" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZpusobJednani", + "description" : "Způsob jednání" + } + }, + "adresySubjektu" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AdresaRcns", + "description" : "Seznam adres subjektu" + } + }, + "zdrojId" : { + "maxLength" : 100, + "type" : "string", + "description" : "Identifikátor záznamu ve zdrojovém registru." + } + } + } + ] + }, + "ZpusobJednani" : { + "type" : "object", + "description" : "tabulka způsobů jednání subjektu", + "properties" : { + "popis" : { + "type" : "string", + "description" : "popis způsobu jednání" + }, + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "počátek platnosti způsobu jednání dle popisu" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "konec platnosti způsobu jednání dle popisu " + } + } + }, + "AngazovanaOsobaRcns" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/AngazovanaOsoba" + }, + { + "properties" : { + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Platnost angažované osoby od data" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "Platnost angažované osoby od data" + }, + "nazevAngazma" : { + "maxLength" : 100, + "type" : "string" + }, + "poznamka" : { + "maxLength" : 100, + "type" : "string" + }, + "kodStatu" : { + "maxLength" : 3, + "minLength" : 3, + "type" : "string", + "description" : "Kód státu (ciselnikKod: Stat) " + }, + "pravniForma" : { + "maxLength" : 3, + "minLength" : 3, + "pattern" : "^\\d{3}$", + "type" : "string", + "description" : "Právní forma - kód (ciselnikKod: PravniForma) " + } + } + } + ] + }, + "SubjektCirkevZaklad" : { + "type" : "object", + "properties" : { + "datumRegistracePrav" : { + "format" : "date", + "type" : "string", + "description" : "Datum registrace práv dané církvi." + }, + "cisloRegistracePrav" : { + "maxLength" : 30, + "type" : "string", + "description" : "Číslo registrace práv dané církvi." + }, + "icoNastupce" : { + "maxLength" : 8, + "minLength" : 8, + "pattern" : "^\\d{8}$", + "type" : "string", + "description" : "IČO nástupce zrušené právnické osoby. " + }, + "datumZruseniRegistracePrav" : { + "format" : "date", + "type" : "string", + "description" : "Datum zrušení registrace práv dané církvi." + }, + "pravoZvlastni" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/PravoZvlastni", + "description" : "Seznam informací o zvláštním právu církve." + } + }, + "cisloZruseniRegistracePrav" : { + "maxLength" : 30, + "type" : "string", + "description" : "Číslo zrušení registrace práv dané církvi." + } + } + }, + "SubjektPravnickaOsobaZaklad" : { + "type" : "object", + "properties" : { + "icoZrizovatel" : { + "maxLength" : 8, + "minLength" : 8, + "pattern" : "^\\d{8}$", + "type" : "string", + "description" : "IČO zřizovatele právnické osoby. " + }, + "icoNastupce" : { + "maxLength" : 8, + "minLength" : 8, + "pattern" : "^\\d{8}$", + "type" : "string", + "description" : "IČO nástupce zrušené právnické osoby. " + }, + "zpusobZruseniRegistrace" : { + "type" : "integer", + "description" : "Způsob zruseni registrace - kód" + } + } + }, + "SubjektSvazCirkviZaklad" : { + "type" : "object", + "properties" : { + "clenoveSvazu" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ClenSvazu", + "description" : "Struktura s informacemi o členech daného svazu církví. " + } + }, + "icoNastupce" : { + "maxLength" : 8, + "minLength" : 8, + "pattern" : "^\\d{8}$", + "type" : "string", + "description" : "IČO nástupce zrušené právnické osoby. " + } + } + }, + "AngazmaRcns" : { + "type" : "object", + "properties" : { + "osobaPravnicka" : { + "$ref" : "#/components/schemas/AngazovanySubjektRcns" + }, + "osobaFyzicka" : { + "$ref" : "#/components/schemas/AngazovanaOsobaRcns" + } + } + }, + "AngazovanySubjektRcns" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/AngazovanySubjektRcnsZaklad" + }, + { + "properties" : { + "statutarniOrgany" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazovanaOsobaRcns" + } + } + } + } + ] + }, + "EkonomickeSubjektyRcnsSeznam" : { + "type" : "object", + "description" : "Seznam ekonomických subjektů ze zdroje RCNS", + "allOf" : [ + { + "$ref" : "#/components/schemas/Seznam" + }, + { + "properties" : { + "ekonomickeSubjekty" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EkonomickySubjektRcns", + "description" : "Seznam ekonomických subjektů zdroje RŽP " + } + } + } + } + ] + }, + "StatutatniOrganRcns" : { + "type" : "object", + "properties" : { + "subjektCirkev" : { + "$ref" : "#/components/schemas/SubjektCirkev", + "description" : "Struktura s údaji sledovanými u subjektu typu církev" + }, + "subjektSvazCirkvi" : { + "$ref" : "#/components/schemas/SubjektSvazCirkvi", + "description" : "Struktura s údaji sledovanými u subjektu typu svaz církví" + }, + "subjektPravnickaOsoba" : { + "$ref" : "#/components/schemas/SubjektPravnickaOsoba", + "description" : "Struktura s údaji sledovanými u subjektu typu právnická osoba dříve církevní právnická osoba." + } + } + }, + "EkonomickySubjektRcns" : { + "type" : "object", + "properties" : { + "icoId" : { + "maxLength" : 32, + "pattern" : "^(ARES_)?\\d{8}$", + "type" : "string", + "description" : "ičo/id ekonomického subjektu " + }, + "zaznamy" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZaznamRcns", + "description" : "Seznam záznamů daného iča" + } + } + } + }, + "SubjektCirkev" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/SubjektCirkevZaklad" + }, + { + "properties" : { + "organy" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazovanySubjektRcns", + "description" : "Struktura s informacemi o právnických osobách, které mají právo jednat jménem daného svazu církví na území ČR. " + } + } + } + } + ] + }, + "SubjektPravnickaOsoba" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/SubjektPravnickaOsobaZaklad" + }, + { + "properties" : { + "organy" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazovanaOsobaRcns", + "description" : "Struktura s informacemi o statutárních orgánech (členech orgánu) dané právnické osoby." + } + } + } + } + ] + }, + "SubjektSvazCirkvi" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/SubjektSvazCirkviZaklad" + }, + { + "properties" : { + "organy" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazovanySubjektRcns", + "description" : "Struktura s údaji sledovanými u subjektu typu svaz církví" + } + } + } + } + ] + }, + "ZaznamRcns" : { + "type" : "object", + "description" : "Detailní informace o ekonomickém subjektu ze zdroje RCNS", + "allOf" : [ + { + "$ref" : "#/components/schemas/ZaznamRcnsZaklad" + }, + { + "properties" : { + "statutarniOrgan" : { + "$ref" : "#/components/schemas/StatutatniOrganRcns", + "description" : "Statutární orgány církve" + }, + "likvidatori" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazmaRcns", + "description" : "Struktura s údaji o likvidátorech." + } + }, + "konkurzniSpravci" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazmaRcns", + "description" : "Struktura s údaji o správcích konkurzní podstaty. " + } + }, + "opatrovnici" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazmaRcns", + "description" : "Opatrovníci" + } + } + } + } + ] + }, + "AngazovanaOsobaRpsh" : { + "type" : "object", + "description" : "Identifikace fyzické osoby statutárního orgánu subjektu. ", + "allOf" : [ + { + "$ref" : "#/components/schemas/AngazovanaOsoba" + }, + { + "properties" : { + "funkce" : { + "maxLength" : 120, + "type" : "string", + "description" : "Název fukce" + }, + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Platnost záznamu od data" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "Platnost záznamu do data " + }, + "adresa" : { + "$ref" : "#/components/schemas/Adresa", + "description" : "adresa angažované osoby" + }, + "kod" : { + "maxLength" : 10, + "type" : "string", + "description" : "Kód fukce" + }, + "typAngazma" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ angažmá osoby - kód (ciselnikKod: TypAngazmaAres) " + } + } + } + ] + }, + "StatutarniOrgan" : { + "type" : "object", + "description" : "Informace o způsobu jednání právnické osoby. ", + "properties" : { + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Platnost záznamu od data " + }, + "popis" : { + "maxLength" : 1000, + "type" : "string", + "description" : "Texty způsobu jednání právnické osoby. " + } + } + }, + "StavSubjektu" : { + "type" : "object", + "description" : "Stav, ve kterém se subjekt nachází, s udáním počátku platnosti. ", + "properties" : { + "popis" : { + "maxLength" : 1000, + "type" : "string", + "description" : "Popis stavu subjektu" + }, + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Platnost záznamu od data " + } + } + }, + "ZaznamRpsh" : { + "type" : "object", + "description" : "Detailní informace o ekonomickém subjektu ze zdroje RPSH", + "allOf" : [ + { + "$ref" : "#/components/schemas/EkonomickySubjektZaklad" + }, + { + "properties" : { + "cisloRegistrace" : { + "maxLength" : 20, + "type" : "string", + "description" : "Číslo registrace" + }, + "typSubjektu" : { + "maximum" : 1, + "minimum" : 1, + "pattern" : "^\\d{1}$", + "type" : "string", + "description" : "Typ subjektu - strana/hnutí - kód (ciselnikKod: TypSubjektuRpsh) " + }, + "obchodníJmenoZkratka" : { + "maxLength" : 1000, + "type" : "string", + "description" : "Obchodní jméno zkrácené" + }, + "angazovaneOsoby" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazovanaOsobaRpsh", + "description" : "Seznam angažovaných osob" + } + }, + "primarniZaznam" : { + "type" : "boolean" + }, + "zmenaStanov" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZmenaStanov", + "description" : "Seznam období změny stavov" + } + }, + "statutarniOrgan" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/StatutarniOrgan", + "description" : "Statutární orgán" + } + }, + "stavSubjektu" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/StavSubjektu", + "description" : "Stav subjektu" + } + } + } + } + ] + }, + "ZmenaStanov" : { + "type" : "object", + "description" : "Seznam datumů změn stanov. ", + "properties" : { + "datumZmeny" : { + "format" : "date", + "type" : "string", + "description" : "Datum změny stanov." + } + } + }, + "EkonomickeSubjektyRpshSeznam" : { + "type" : "object", + "description" : "Seznam ekonomických subjektů ze zdroje RPSH", + "allOf" : [ + { + "$ref" : "#/components/schemas/Seznam" + }, + { + "properties" : { + "ekonomickeSubjekty" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EkonomickySubjektRpsh", + "description" : "Seznam ekonomických subjektů zdroje RŽP " + } + } + } + } + ] + }, + "EkonomickySubjektRpsh" : { + "type" : "object", + "properties" : { + "icoId" : { + "maxLength" : 32, + "pattern" : "^(ARES_)?\\d{8}$", + "type" : "string", + "description" : "ičo/id ekonomického subjektu " + }, + "zaznamy" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZaznamRpsh", + "description" : "Seznam záznamů daného iča" + } + } + } + }, + "AngazovanaOsobaRs" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/AngazovanaOsoba" + }, + { + "properties" : { + "typAngazma" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string" + } + } + } + ] + }, + "AngazovanySubjektRs" : { + "type" : "object", + "description" : "Detailní informace o ekonomickém subjektu ze zdroje RŠ", + "properties" : { + "ico" : { + "maxLength" : 32, + "pattern" : "^(ARES_)?\\d{8}$", + "type" : "string", + "description" : "IČO" + }, + "obchodniJmeno" : { + "maxLength" : 2000, + "minLength" : 1, + "type" : "string", + "description" : "Jméno subjektu" + }, + "obchodniJmenoZkracene" : { + "maxLength" : 40, + "minLength" : 1, + "type" : "string", + "description" : "Zkrácené jméno subjektu" + }, + "typAngazma" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string" + }, + "adresa" : { + "$ref" : "#/components/schemas/Adresa", + "description" : "Adresa angažovaného subjektu" + }, + "pravniForma" : { + "maxLength" : 3, + "minLength" : 3, + "pattern" : "^\\d{3}$", + "type" : "string", + "description" : "Právní forma " + }, + "datumVzniku" : { + "format" : "date", + "type" : "string", + "description" : "Datum vzniku" + }, + "datumZaniku" : { + "format" : "date", + "type" : "string", + "description" : "Datum zániku" + } + } + }, + "KontaktyRs" : { + "type" : "object", + "description" : "Kontakty subjektu", + "properties" : { + "telefon" : { + "maxLength" : 25, + "minLength" : 1, + "type" : "string", + "description" : "kontaktní telefon" + }, + "fax" : { + "maxLength" : 25, + "minLength" : 1, + "type" : "string", + "description" : "číslo faxu" + }, + "email" : { + "type" : "array", + "items" : { + "maxLength" : 50, + "minLength" : 1, + "type" : "string", + "description" : "kontaktní email" + } + }, + "www" : { + "maxLength" : 255, + "minLength" : 1, + "type" : "string", + "description" : "webová adresa ekonomického subjektu" + } + } + }, + "SkolaZarizeni" : { + "type" : "object", + "properties" : { + "kontakty" : { + "$ref" : "#/components/schemas/KontaktyRs" + }, + "izo" : { + "maxLength" : 9, + "minLength" : 1, + "type" : "string", + "description" : "IZO - resortní identifikátor" + }, + "obchodniJmeno" : { + "maxLength" : 2000, + "minLength" : 1, + "type" : "string", + "description" : "Jméno subjektu" + }, + "obchodniJmenoZkracene" : { + "maxLength" : 40, + "minLength" : 1, + "type" : "string", + "description" : "Zkrácené jméno subjektu" + }, + "typSkoly" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ školy" + }, + "adresa" : { + "$ref" : "#/components/schemas/Adresa", + "description" : "Adresa angažovaného subjektu" + }, + "datumVzniku" : { + "format" : "date", + "type" : "string", + "description" : "Datum vzniku" + }, + "datumZaniku" : { + "format" : "date", + "type" : "string", + "description" : "Datum zániku" + } + } + }, + "ZaznamRsZaklad" : { + "type" : "object", + "description" : "Detailní informace o ekonomickém subjektu ze zdroje RŠ", + "allOf" : [ + { + "$ref" : "#/components/schemas/EkonomickySubjektZaklad" + }, + { + "properties" : { + "redizo" : { + "maxLength" : 9, + "minLength" : 1, + "type" : "string", + "description" : "REDIZO - resortní identifikátor" + }, + "obchodniJmenoZkracene" : { + "maxLength" : 40, + "minLength" : 1, + "type" : "string", + "description" : "Zkrácené obchodní jméno" + }, + "kontakty" : { + "$ref" : "#/components/schemas/KontaktyRs" + }, + "primarniZaznam" : { + "type" : "boolean" + }, + "skolyAZarizeni" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/SkolaZarizeni" + } + }, + "typSubjektu" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ subjektu" + } + } + } + ] + }, + "EkonomickeSubjektyRsSeznam" : { + "type" : "object", + "description" : "Seznam ekonomických subjektů ze zdroje RŠ", + "allOf" : [ + { + "$ref" : "#/components/schemas/Seznam" + }, + { + "properties" : { + "ekonomickeSubjekty" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EkonomickySubjektRs", + "description" : "Seznam ekonomických subjektů zdroje RŽP " + } + } + } + } + ] + }, + "EkonomickySubjektRs" : { + "type" : "object", + "properties" : { + "icoId" : { + "maxLength" : 32, + "pattern" : "^(ARES_)?\\d{8}$", + "type" : "string", + "description" : "ičo ekonomického subjektu" + }, + "zaznamy" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZaznamRs", + "description" : "Seznam záznamů daného iča" + } + } + } + }, + "ZaznamRs" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/ZaznamRsZaklad" + }, + { + "properties" : { + "angazovanySubjekt" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazovanySubjektRs", + "description" : "Angažovaný subjekt - například " + } + }, + "angazovanaOsoba" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AngazovanaOsobaRs" + } + } + } + } + ] + }, + "AdresaSzr" : { + "type" : "object", + "description" : "Tabulka adres SZR", + "allOf" : [ + { + "$ref" : "#/components/schemas/Adresa" + }, + { + "properties" : { + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Počátek platnosti vazby na adresu" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "Konec platnosti vazby na adresu " + }, + "typAdresy" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ adresy subjektu" + }, + "zdrojDat" : { + "minimum" : 1, + "type" : "integer", + "description" : "Zdroj dat" + } + } + } + ] + }, + "AngazovanySubjektSzr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/EkonomickySubjektZaklad" + }, + { + "properties" : { + "adresa" : { + "$ref" : "#/components/schemas/Adresa", + "description" : "Adresa angažovaného subjektu" + }, + "firma" : { + "maxLength" : 255, + "type" : "string", + "description" : "Firma" + }, + "jmeno" : { + "maxLength" : 100, + "type" : "string", + "description" : "Jméno" + }, + "odkaz" : { + "maxLength" : 255, + "type" : "string", + "description" : "Odkaz" + }, + "poznamka" : { + "maxLength" : 255, + "type" : "string", + "description" : "Poznámka" + }, + "prijmeni" : { + "maxLength" : 100, + "type" : "string", + "description" : "Příjmení" + }, + "rejstrik" : { + "type" : "integer", + "description" : "Číslo v rejstříku" + }, + "titulPred" : { + "maxLength" : 32, + "type" : "string", + "description" : "Titul před jménem" + }, + "titulZa" : { + "maxLength" : 32, + "type" : "string", + "description" : "Titul za jménem" + }, + "typZahajeni" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ zahájení" + }, + "zamereni" : { + "maxLength" : 100, + "type" : "string", + "description" : "Zaměření" + } + } + } + ] + }, + "EkonomickySubjektSzrZaklad" : { + "type" : "object", + "description" : "Detailní informace o ekonomickém subjektu ze zdroje SZR", + "allOf" : [ + { + "$ref" : "#/components/schemas/EkonomickySubjektZaklad" + }, + { + "properties" : { + "obchodniJmenoZkracene" : { + "maxLength" : 2000, + "minLength" : 1, + "type" : "string", + "description" : "Zkrácené obchodní jméno" + }, + "primarniZaznam" : { + "type" : "boolean", + "description" : "Primární záznam subjektu" + }, + "registraceDo" : { + "format" : "date", + "type" : "string", + "description" : "konec platnosti registrace" + }, + "registraceOd" : { + "format" : "date", + "type" : "string", + "description" : "začátek platnosti registrace " + }, + "kodUkonceni" : { + "format" : "int32", + "type" : "integer", + "description" : "kód ukončení" + }, + "datumVyrazeni" : { + "format" : "date", + "type" : "string", + "description" : "Datum vyřazení" + }, + "adresy" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AdresaSzr", + "description" : "Adresy subjektu" + } + }, + "platceDph" : { + "type" : "boolean", + "description" : "subjekt plátce DPH " + }, + "vyrazen" : { + "type" : "boolean", + "description" : "vyřazení subjektu" + }, + "obory" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/OborSzr", + "description" : "Obory" + } + }, + "exid" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Exid", + "description" : "Externí identifikátor subjektu" + } + }, + "kontakt" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/KontaktSzr", + "description" : "Kontakty " + } + }, + "odkazy" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/OdkazSzr", + "description" : "Odkazy" + } + } + } + } + ] + }, + "Exid" : { + "type" : "object", + "description" : "tabulka externích identifikátorů", + "properties" : { + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Začátek platnosti" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "konec platnosti" + }, + "zdrojDat" : { + "minimum" : 1, + "type" : "integer", + "description" : "Zdroj dat" + }, + "hodnota" : { + "maxLength" : 255, + "type" : "string", + "description" : "Externí zdroj" + }, + "kodExid" : { + "format" : "int32", + "type" : "integer", + "description" : "externí identifikátor" + } + } + }, + "KontaktSzr" : { + "type" : "object", + "properties" : { + "organJednotkaId" : { + "format" : "int32", + "type" : "integer", + "description" : "Organizační jednotka" + }, + "kontaktId" : { + "format" : "int32", + "type" : "integer", + "description" : "ID kontaktu" + }, + "zdrojDat" : { + "minimum" : 1, + "type" : "integer", + "description" : "zdroj dat" + }, + "hodnota" : { + "maxLength" : 255, + "minLength" : 1, + "type" : "string", + "description" : "hodnota" + }, + "typ" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string" + } + } + }, + "OborSzr" : { + "type" : "object", + "description" : "Tabulka finance", + "properties" : { + "agenda" : { + "maxLength" : 255, + "type" : "string", + "description" : "Agenda" + }, + "obor" : { + "maxLength" : 255, + "type" : "string", + "description" : "Obor" + }, + "oborText" : { + "maxLength" : 255, + "type" : "string", + "description" : "Popis oboru" + }, + "odkazRvp" : { + "maxLength" : 255, + "minLength" : 1, + "type" : "string", + "description" : "Odkaz RVP" + }, + "organJednotkaId" : { + "format" : "int32", + "type" : "integer", + "description" : "organizační jednotka" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "Platnost záznamu od" + }, + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "platnost záznamu do" + }, + "stav" : { + "maxLength" : 255, + "type" : "string" + }, + "registraceOz" : { + "format" : "date", + "type" : "string", + "description" : "Datum oznámení registrace" + } + } + }, + "OdkazSzr" : { + "type" : "object", + "properties" : { + "odkaz" : { + "maxLength" : 255, + "minLength" : 1, + "type" : "string", + "description" : "Odkaz" + }, + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "začátek platnosti" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "konec platnosti" + }, + "typ" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ kontaktu" + } + } + }, + "EkonomickeSubjektySzrSeznam" : { + "type" : "object", + "description" : "Seznam ekonomických subjektů ze zdroje SZR", + "allOf" : [ + { + "$ref" : "#/components/schemas/Seznam" + }, + { + "properties" : { + "ekonomickeSubjekty" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EkonomickySubjektSzr", + "description" : "Seznam ekonomických subjektů zdroje RŽP " + } + } + } + } + ] + }, + "EkonomickySubjektSzr" : { + "type" : "object", + "description" : "Tabulka záznamů daného IČO", + "properties" : { + "icoId" : { + "maxLength" : 32, + "pattern" : "^(ARES_)?\\d{8}$", + "type" : "string", + "description" : "ičo ekonomického subjektu" + }, + "zaznamy" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZaznamSzr", + "description" : "Seznam záznamů daného iča" + } + } + } + }, + "EZP" : { + "type" : "object", + "properties" : { + "evidenceOd" : { + "format" : "date", + "type" : "string", + "description" : "Datum počátku evidence" + }, + "angazovanySubjekt" : { + "$ref" : "#/components/schemas/AngazovanySubjektSzr" + }, + "vEvidenci" : { + "type" : "boolean", + "description" : "v evidenci" + }, + "uradEvidence" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string" + }, + "angazovanaOsoba" : { + "$ref" : "#/components/schemas/AngazovanaOsoba" + } + } + }, + "ProvozovnaSzr" : { + "type" : "object", + "properties" : { + "organJednotkaNazev" : { + "maxLength" : 2000, + "minLength" : 1, + "type" : "string", + "description" : "Organizační jednotka" + }, + "organJednotkaZkracenyNazev" : { + "maxLength" : 2000, + "minLength" : 1, + "type" : "string", + "description" : "Zkrácený název organizační jednotky" + }, + "organJednotkaId" : { + "format" : "int32", + "type" : "integer", + "description" : "Identifikátor organizační jednotky" + }, + "platnostOd" : { + "format" : "date", + "type" : "string", + "description" : "Začátek platnosti" + }, + "angazovanaOsoba" : { + "$ref" : "#/components/schemas/AngazovanaOsoba" + }, + "platnostDo" : { + "format" : "date", + "type" : "string", + "description" : "Konec platnosti" + } + } + }, + "ZaznamSzr" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/EkonomickySubjektSzrZaklad" + }, + { + "properties" : { + "provozovnaSzr" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ProvozovnaSzr", + "description" : "Provozovna" + } + }, + "ezp" : { + "$ref" : "#/components/schemas/EZP", + "description" : "evidence zemědělského podnikatele" + } + } + } + ] + }, + "AdresaCeu" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/Adresa" + }, + { + "properties" : { + "typAdresy" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ adresy" + } + } + } + ] + }, + "AngazovanaOsobaCeu" : { + "type" : "object", + "description" : "Tabulka angažovaných osob", + "properties" : { + "jmenoPrijmeni" : { + "maxLength" : 100, + "type" : "string", + "description" : "Jméno, příjmení správce" + }, + "typAngazma" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ angažmá" + } + } + }, + "EkonomickySubjektCeuZaklad" : { + "type" : "object", + "allOf" : [ + { + "$ref" : "#/components/schemas/EkonomickySubjektZaklad" + }, + { + "properties" : { + "typSubjektu" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ subjektu" + }, + "adresy" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/AdresaCeu", + "description" : "Adresy subjektu" + } + }, + "jmenoPrijmeni" : { + "maxLength" : 100, + "type" : "string", + "description" : "Jméno, příjmení fyzické osoby" + } + } + } + ] + }, + "UpadekCeu" : { + "type" : "object", + "properties" : { + "podnet" : { + "type" : "string", + "description" : "Podnět " + }, + "spisZn" : { + "type" : "string", + "description" : "Spisová značka" + }, + "stornuj" : { + "type" : "string", + "description" : "Storno" + }, + "datum" : { + "format" : "date", + "type" : "string", + "description" : "Datum" + }, + "detail" : { + "maxLength" : 255, + "minLength" : 1, + "type" : "string", + "description" : "Odkaz na detail úpadku " + }, + "usneseni" : { + "maxLength" : 255, + "minLength" : 1, + "type" : "string", + "description" : "Odkaz na usnesení" + }, + "akceUpadek" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Akce úpadku" + }, + "typUpadek" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Typ úpadku" + }, + "soudUpadek" : { + "maxLength" : 64, + "minLength" : 1, + "type" : "string", + "description" : "Soud rozhodující o úpadku" + } + } + }, + "EkonomickeSubjektyCeuSeznam" : { + "type" : "object", + "description" : "Seznam ekonomických subjektů ze zdroje CEÚ", + "allOf" : [ + { + "$ref" : "#/components/schemas/Seznam" + }, + { + "properties" : { + "ekonomickeSubjekty" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/EkonomickySubjektCeu", + "description" : "Seznam ekonomických subjektů zdroje RŽP " + } + } + } + } + ] + }, + "EkonomickySubjektCeu" : { + "type" : "object", + "properties" : { + "icoId" : { + "maxLength" : 32, + "pattern" : "^(ARES_)?\\d{8}$", + "type" : "string", + "description" : "ičo/Id ekonomického subjektu" + }, + "zaznamy" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ZaznamCeu", + "description" : "Seznam záznamů daného iča" + } + } + } + }, + "UpadekCeuVerejny" : { + "type" : "object", + "description" : "Tabulka úpadků", + "allOf" : [ + { + "$ref" : "#/components/schemas/UpadekCeu" + }, + { + "properties" : { + "spravceUpadku" : { + "$ref" : "#/components/schemas/AngazovanaOsobaCeu", + "description" : "Správce úpadku " + } + } + } + ] + }, + "ZaznamCeu" : { + "type" : "object", + "description" : "Detailní informace o ekonomickém subjektu ze zdroje CEÚ", + "allOf" : [ + { + "$ref" : "#/components/schemas/EkonomickySubjektCeuZaklad" + }, + { + "properties" : { + "upadek" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/UpadekCeuVerejny" + } + } + } + } + ] + }, + "AngazovanaOsobaFiltr" : { + "type" : "object", + "properties" : { + "jmeno" : { + "maxLength" : 100, + "type" : "string", + "description" : "Jméno angažované osoby" + }, + "rodneCislo" : { + "maxLength" : 10, + "minLength" : 9, + "type" : "string", + "description" : "Rodné číslo osoby" + }, + "prijmeni" : { + "maxLength" : 100, + "type" : "string", + "description" : "Příjmení angažované osoby" + }, + "datumNarozeni" : { + "format" : "date", + "type" : "string", + "description" : "Datum narození angažované osoby" + } + } + }, + "KodChybyEnum" : { + "description" : "Chybové kódy.", + "type" : "string", + "enum" : [ + "OBECNA_CHYBA", + "CHYBA_VSTUPU", + "NENALEZENO", + "NENI_IMPLEMENTOVANO", + "NEPRIHLASENY_UZIVATEL", + "NENI_OPRAVNENI" + ] + } + } + }, + "tags" : [ + { + "name" : "ciselniky-nazevniky", + "description" : "ciselniky-nazevniky operations" + }, + { + "name" : "ekonomicke-subjekty", + "description" : "ekonomicke-subjekty operations" + }, + { + "name" : "ekonomicke-subjekty-ceu", + "description" : "ekonomicke-subjekty-ceu operations" + }, + { + "name" : "ekonomicke-subjekty-nrpzs", + "description" : "ekonomicke-subjekty-nrpzs operations" + }, + { + "name" : "ekonomicke-subjekty-rcns", + "description" : "ekonomicke-subjekty-rcns operations" + }, + { + "name" : "ekonomicke-subjekty-res", + "description" : "ekonomicke-subjekty-res operations" + }, + { + "name" : "ekonomicke-subjekty-rpsh", + "description" : "ekonomicke-subjekty-rpsh operations" + }, + { + "name" : "ekonomicke-subjekty-rs", + "description" : "ekonomicke-subjekty-rs operations" + }, + { + "name" : "ekonomicke-subjekty-rzp", + "description" : "ekonomicke-subjekty-rzp operations" + }, + { + "name" : "ekonomicke-subjekty-szr", + "description" : "ekonomicke-subjekty-szr operations" + }, + { + "name" : "ekonomicke-subjekty-vr", + "description" : "ekonomicke-subjekty-vr operations" + }, + { + "name" : "standardizovane-adresy", + "description" : "standardizovane-adresy operations" + } + ] +} diff --git a/tests/fixtures/response/2491427.json b/tests/fixtures/response/2491427.json new file mode 100644 index 0000000..2bce3ea --- /dev/null +++ b/tests/fixtures/response/2491427.json @@ -0,0 +1,37 @@ +{ + "active": true, + "city": "P\u00edsek", + "company": "Z\u00e1pado\u010desk\u00e1 spole\u010dnost, o.s.", + "created": "2015-10-24T00:00:00+02:00", + "dissolved": null, + "city_district": "P\u00edsek", + "city_post": null, + "in": "02491427", + "is_person": false, + "legal_form_code": 706, + "house_number": "105\/4", + "street": "Budovcova", + "tin": null, + "vat_id": null, + "vat_payer": false, + "zip": "39701", + "country": "\u010ceska republika", + "country_code": "CZ", + "nace": [ + "9499" + ], + "sources": { + "stavZdrojeVr": true, + "stavZdrojeRes": true, + "stavZdrojeRzp": false, + "stavZdrojeNrpzs": false, + "stavZdrojeRpsh": false, + "stavZdrojeRcns": false, + "stavZdrojeSzr": false, + "stavZdrojeDph": false, + "stavZdrojeIr": false, + "stavZdrojeCeu": false, + "stavZdrojeRs": false, + "stavZdrojeRed": false + } +} \ No newline at end of file diff --git a/tests/fixtures/response/25110161.json b/tests/fixtures/response/25110161.json new file mode 100644 index 0000000..f6c98e6 --- /dev/null +++ b/tests/fixtures/response/25110161.json @@ -0,0 +1,59 @@ +{ + "active": true, + "city": "Praha", + "company": "Kaufland \u010cesk\u00e1 republika v.o.s.", + "created": "2022-03-30T00:00:00+02:00", + "dissolved": null, + "city_district": "B\u0159evnov", + "city_post": "Praha 6", + "in": "25110161", + "is_person": false, + "legal_form_code": 111, + "house_number": "2428\/203", + "street": "B\u011blohorsk\u00e1", + "tin": "CZ25110161", + "vat_id": "25110161", + "vat_payer": true, + "zip": "16900", + "country": "\u010ceska republika", + "country_code": "CZ", + "nace": [ + "4120", + "28990", + "10710", + "10110", + "772", + "74", + "73120", + "711", + "702", + "69200", + "68320", + "68310", + "6820", + "56100", + "52290", + "52100", + "49410", + "47300", + "47250", + "47110", + "46900", + "46460", + "45200" + ], + "sources": { + "stavZdrojeVr": true, + "stavZdrojeRes": true, + "stavZdrojeRzp": true, + "stavZdrojeNrpzs": false, + "stavZdrojeRpsh": false, + "stavZdrojeRcns": false, + "stavZdrojeSzr": false, + "stavZdrojeDph": true, + "stavZdrojeIr": false, + "stavZdrojeCeu": false, + "stavZdrojeRs": false, + "stavZdrojeRed": false + } +} \ No newline at end of file diff --git a/tests/fixtures/response/25596641.json b/tests/fixtures/response/25596641.json index d9b5517..2654725 100644 --- a/tests/fixtures/response/25596641.json +++ b/tests/fixtures/response/25596641.json @@ -1,22 +1,24 @@ { "active": false, - "city": "Brno", + "city": null, "company": "ZERO Brno s.r.o.", - "court": null, "created": "2000-04-13T00:00:00+02:00", "dissolved": "2009-05-26T00:00:00+02:00", - "file_number": null, - "city_district": "Star\u00e9 Brno", - "city_post": "Brno-st\u0159ed", - "court_all": null, + "city_district": null, + "city_post": null, "in": "25596641", "is_person": false, "legal_form_code": 112, - "house_number": "943\/24a", - "street": "K\u0159\u00eddlovick\u00e1", + "house_number": null, + "street": null, "tin": null, + "vat_id": null, "vat_payer": false, - "zip": "60300", - "nace": [], - "psu": "NZHHNNNNZNNNNNNNNNNNNNNNZNNNNN" + "zip": null, + "country": null, + "country_code": null, + "nace": [ + "620" + ], + "sources": [] } \ No newline at end of file diff --git a/tests/fixtures/response/26713250.json b/tests/fixtures/response/26713250.json index bbbd582..102610b 100644 --- a/tests/fixtures/response/26713250.json +++ b/tests/fixtures/response/26713250.json @@ -2,27 +2,40 @@ "active": true, "city": "Praha", "company": "BARVY FRAMAR s.r.o.", - "court": "M\u011bstsk\u00fd soud v Praze", - "created": "2002-08-03T00:00:00+02:00", + "created": "2022-02-27T00:00:00+01:00", "dissolved": null, - "file_number": "C 89035", "city_district": "Mod\u0159any", "city_post": "Praha 12", - "court_all": "C 89035, M\u011bstsk\u00fd soud v Praze", "in": "26713250", "is_person": false, "legal_form_code": 112, "house_number": "1213\/4", "street": "Barrandova", "tin": "CZ26713250", + "vat_id": "26713250", "vat_payer": true, "zip": "14300", + "country": "\u010ceska republika", + "country_code": "CZ", "nace": [ - "20120", - "433", - "46380", "4778", + "46380", + "433", + "20120", "68320" ], - "psu": "NAAANANNNNANNNNNNNNNNNNNANNNNN" + "sources": { + "stavZdrojeVr": true, + "stavZdrojeRes": true, + "stavZdrojeRzp": true, + "stavZdrojeNrpzs": false, + "stavZdrojeRpsh": false, + "stavZdrojeRcns": false, + "stavZdrojeSzr": false, + "stavZdrojeDph": true, + "stavZdrojeIr": false, + "stavZdrojeCeu": false, + "stavZdrojeRs": false, + "stavZdrojeRed": false + } } \ No newline at end of file diff --git a/tests/fixtures/response/27082440.json b/tests/fixtures/response/27082440.json index 5f88733..83d22ad 100644 --- a/tests/fixtures/response/27082440.json +++ b/tests/fixtures/response/27082440.json @@ -2,36 +2,49 @@ "active": true, "city": "Praha", "company": "Alza.cz a.s.", - "court": "M\u011bstsk\u00fd soud v Praze", - "created": "2003-08-26T00:00:00+02:00", + "created": "2023-09-04T00:00:00+02:00", "dissolved": null, - "file_number": "B 8573", "city_district": "Hole\u0161ovice", "city_post": "Praha 7", - "court_all": "B 8573, M\u011bstsk\u00fd soud v Praze", "in": "27082440", "is_person": false, "legal_form_code": 121, "house_number": "1522\/53", "street": "Jankovcova", "tin": "CZ27082440", + "vat_id": "27082440", "vat_payer": true, "zip": "17000", + "country": "\u010ceska republika", + "country_code": "CZ", "nace": [ - "26110", - "26300", "27900", - "33140", - "461", - "46900", - "471", - "47250", - "47911", - "49410", - "56100", - "620", + "26300", + "26110", + "731", "6492", - "731" + "620", + "56100", + "49410", + "47911", + "47250", + "471", + "46900", + "461", + "33140" ], - "psu": "NAAANANNNNNNNNNNNNNNPNNNANNNNN" + "sources": { + "stavZdrojeVr": true, + "stavZdrojeRes": true, + "stavZdrojeRzp": true, + "stavZdrojeNrpzs": false, + "stavZdrojeRpsh": false, + "stavZdrojeRcns": false, + "stavZdrojeSzr": false, + "stavZdrojeDph": true, + "stavZdrojeIr": false, + "stavZdrojeCeu": false, + "stavZdrojeRs": false, + "stavZdrojeRed": false + } } \ No newline at end of file diff --git a/tests/fixtures/response/49812670.json b/tests/fixtures/response/49812670.json new file mode 100644 index 0000000..8294fed --- /dev/null +++ b/tests/fixtures/response/49812670.json @@ -0,0 +1,49 @@ +{ + "active": true, + "city": "Pardubice", + "company": "H. A. C. spol. s r.o.", + "created": "2017-05-31T00:00:00+02:00", + "dissolved": null, + "city_district": "Pardubice", + "city_post": "Pardubice VII", + "in": "49812670", + "is_person": false, + "legal_form_code": 112, + "house_number": "97", + "street": null, + "tin": "CZ49812670", + "vat_id": "49812670", + "vat_payer": true, + "zip": "53353", + "country": "\u010ceska republika", + "country_code": "CZ", + "nace": [ + "4120", + "93110", + "90040", + "82110", + "74200", + "74100", + "74", + "73110", + "683", + "4778", + "46900", + "461", + "43120" + ], + "sources": { + "stavZdrojeVr": true, + "stavZdrojeRes": true, + "stavZdrojeRzp": true, + "stavZdrojeNrpzs": false, + "stavZdrojeRpsh": false, + "stavZdrojeRcns": false, + "stavZdrojeSzr": false, + "stavZdrojeDph": true, + "stavZdrojeIr": false, + "stavZdrojeCeu": false, + "stavZdrojeRs": false, + "stavZdrojeRed": false + } +} \ No newline at end of file diff --git a/tests/fixtures/response/62413686.json b/tests/fixtures/response/62413686.json new file mode 100644 index 0000000..298dccf --- /dev/null +++ b/tests/fixtures/response/62413686.json @@ -0,0 +1,39 @@ +{ + "active": true, + "city": "Praha", + "company": "ISMAJLER komanditn\u00ed spole\u010dnost", + "created": "2021-06-17T00:00:00+02:00", + "dissolved": null, + "city_district": "Libe\u0148", + "city_post": "Praha 8", + "in": "62413686", + "is_person": false, + "legal_form_code": 113, + "house_number": "1609\/2", + "street": "Lindnerova", + "tin": null, + "vat_id": null, + "vat_payer": false, + "zip": "18000", + "country": "\u010ceska republika", + "country_code": "CZ", + "nace": [ + "461", + "46", + "68310" + ], + "sources": { + "stavZdrojeVr": true, + "stavZdrojeRes": true, + "stavZdrojeRzp": true, + "stavZdrojeNrpzs": false, + "stavZdrojeRpsh": false, + "stavZdrojeRcns": false, + "stavZdrojeSzr": false, + "stavZdrojeDph": false, + "stavZdrojeIr": false, + "stavZdrojeCeu": false, + "stavZdrojeRs": false, + "stavZdrojeRed": false + } +} \ No newline at end of file diff --git a/tests/fixtures/response/87744473.json b/tests/fixtures/response/87744473.json index cb73f73..07d326d 100644 --- a/tests/fixtures/response/87744473.json +++ b/tests/fixtures/response/87744473.json @@ -2,27 +2,40 @@ "active": true, "city": "Doln\u00ed Bousov", "company": "Milan Mat\u011bj\u010dek", - "court": null, "created": "2011-04-04T00:00:00+02:00", "dissolved": null, - "file_number": null, - "city_district": "Doln\u00ed Bousov", + "city_district": "Mlad\u00e1 Boleslav", "city_post": null, - "court_all": null, "in": "87744473", "is_person": true, "legal_form_code": 101, "house_number": "765", "street": "Dubov\u00e1", "tin": "CZ8612301071", + "vat_id": "8612301071", "vat_payer": true, "zip": "29404", + "country": "\u010ceska republika", + "country_code": "CZ", "nace": [ - "461", - "471", - "620", "73110", + "620", + "471", + "461", "7490" ], - "psu": "NNAANANNNNNNNNNNNNNNNNNNANNNNN" + "sources": { + "stavZdrojeVr": false, + "stavZdrojeRes": true, + "stavZdrojeRzp": true, + "stavZdrojeNrpzs": false, + "stavZdrojeRpsh": false, + "stavZdrojeRcns": false, + "stavZdrojeSzr": false, + "stavZdrojeDph": true, + "stavZdrojeIr": false, + "stavZdrojeCeu": false, + "stavZdrojeRs": false, + "stavZdrojeRed": false + } } \ No newline at end of file diff --git a/tests/fixtures/response/bl-02491427.json b/tests/fixtures/response/bl-02491427.json deleted file mode 100644 index c677afb..0000000 --- a/tests/fixtures/response/bl-02491427.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "UVOD": {}, - "ZAU": { - "S": { - "SSU": "Aktivn\u00ed", - "KKZ": { - "K": "0" - }, - "VY": { - "K": "0" - }, - "ZAM": { - "K": "0" - }, - "LI": { - "K": "0" - } - }, - "ICO": "02491427", - "OF": "Z\u00e1pado\u010desk\u00e1 spole\u010dnost, o.s.", - "PFO": { - "KPF": 706, - "NPF": "Spolek", - "PFO": "P", - "TZU": "Tuzemsk\u00e1" - }, - "SI": { - "IDA": "16520806", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "P\u00edsek", - "N": "P\u00edsek", - "NCO": "Bud\u011bjovick\u00e9 P\u0159edm\u011bst\u00ed", - "NU": "Budovcova", - "CD": "105", - "TCD": "1", - "CO": "4", - "PSC": "39701", - "optional": { - "zip": "39701", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Budovcova", - "house": "105\/4", - "city": "P\u00edsek - Bud\u011bjovick\u00e9 P\u0159edm\u011bst\u00ed" - } - }, - "DVOR": "2013-12-27", - "DZOR": "2014-01-01", - "POD": "" - }, - "REG": { - "SZ": { - "SD": { - "K": "3", - "T": "Krajsk\u00fd soud v \u010cesk\u00fdch Bud\u011bjovic\u00edch" - }, - "OV": "L 6235" - } - } -} \ No newline at end of file diff --git a/tests/fixtures/response/bl-25110161.json b/tests/fixtures/response/bl-25110161.json deleted file mode 100644 index 2873815..0000000 --- a/tests/fixtures/response/bl-25110161.json +++ /dev/null @@ -1,384 +0,0 @@ -{ - "UVOD": {}, - "ZAU": { - "POD": "", - "S": { - "SSU": "Aktivn\u00ed", - "KKZ": { - "K": "0" - }, - "VY": { - "K": "0" - }, - "ZAM": { - "K": "0" - }, - "LI": { - "K": "0" - } - }, - "ICO": "25110161", - "OF": "Kaufland \u010cesk\u00e1 republika v.o.s.", - "PFO": { - "KPF": 111, - "NPF": "Ve\u0159ejn\u00e1 obchodn\u00ed spole\u010dnost", - "PFO": "P", - "TZU": "Tuzemsk\u00e1" - }, - "SI": { - "IDA": "47412192", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Hlavn\u00ed m\u011bsto Praha", - "N": "Praha", - "NCO": "B\u0159evnov", - "NU": "B\u011blohorsk\u00e1", - "CD": "2428", - "TCD": "1", - "CO": "203", - "PSC": "16900", - "optional": { - "zip": "16900", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "B\u011blohorsk\u00e1", - "house": "2428\/203", - "city": "Praha - B\u0159evnov" - } - }, - "DZOR": "1997-03-10" - }, - "REG": { - "SZ": { - "SD": { - "K": "1", - "T": "M\u011bstsk\u00fd soud v Praze" - }, - "OV": "A 20184" - } - }, - "CIN": { - "PP": { - "T": [ - "hostinsk\u00e1 \u010dinnost", - "projektov\u00e1 \u010dinnost ve v\u00fdstavb\u011b", - "prov\u00e1d\u011bn\u00ed staveb, jejich zm\u011bn a odstra\u0148ov\u00e1n\u00ed", - "\u0159eznictv\u00ed a uzen\u00e1\u0159stv\u00ed", - "pron\u00e1jem nemovitost\u00ed, byt\u016f a\u00a0nebytov\u00fdch prostor", - "\u010dinnost \u00fa\u010detn\u00edch poradc\u016f, veden\u00ed \u00fa\u010detnictv\u00ed, veden\u00ed da\u0148ov\u00e9 evidence", - "peka\u0159stv\u00ed, cukr\u00e1\u0159stv\u00ed", - "opravy ostatn\u00edch dopravn\u00edch prost\u0159edk\u016f a pracovn\u00edch stroj\u016f", - "silni\u010dn\u00ed motorov\u00e1 doprava - n\u00e1kladn\u00ed vnitrost\u00e1tn\u00ed provozovan\u00e1 vozidly o nejv\u011bt\u0161\u00ed povolen\u00e9 hmotnosti do 3,5 tuny v\u010detn\u011b, - n\u00e1kladn\u00ed vnitrost\u00e1tn\u00ed provozovan\u00e1 vozidly o nejv\u011bt\u0161\u00ed povolen\u00e9 hmotnosti nad 3,5 tuny, - n\u00e1kladn\u00ed mezin\u00e1rodn\u00ed provozovan\u00e1 vozidly o ne\njv\u011bt\u0161\u00ed povolen\u00e9 hmotnosti do 3,5 tuny v\u010detn\u011b", - "v\u00fdroba, obchod a slu\u017eby neuveden\u00e9 v p\u0159\u00edloh\u00e1ch 1 a\u017e 3 \u017eivnostensk\u00e9ho z\u00e1kona", - "Prodej kvasn\u00e9ho lihu, konzumn\u00edho lihu a lihovin" - ] - } - }, - "OSK": [ - { - "T": "Na spole\u010dnost Kaufland \u010cesk\u00e1 republika v.o.s. p\u0159e\u0161lo jm\u011bn\u00ed zanikl\u00e9 spole\u010dnosti Kaufland Immo - Brno s.r.o. se s\u00eddlem Praha 4, Pod Vi\u0161\u0148ovkou 25, PS\u010c: 140 00, I\u010c: 267\u00a020 418, zapsan\u00e9 v\u00a0obchodn\u00edm rejst\u0159\u00edku veden\u00e9m M\u011bstsk\u00fdm soudem v\u00a0praze, odd\u00edl C, vlo\u017eka 894\n76 v\u00a0d\u016fsledku p\u0159evzet\u00ed jm\u011bn\u00ed jedin\u00fdm spole\u010dn\u00edkem." - }, - { - "T": "Na spole\u010dnost Kaufland \u010cesk\u00e1 republika v.o.s. p\u0159e\u0161lo jm\u011bn\u00ed zanikl\u00e9 spole\u010dnosti Kaufland Immo - Log - Olomouc, s.r.o. se s\u00eddlem Praha 4, Pod Vi\u0161\u0148ovkou 1661\/25, PS\u010c: 140 00, I\u010c: 267 29 806, zapsan\u00e9 v\u00a0obchodn\u00edm rejst\u0159\u00edku veden\u00e9m M\u011bstsk\u00fdm soudem v\u00a0Praze, odd\u00ed\nl C, vlo\u017eka 90077 v\u00a0d\u016fsledku p\u0159evzet\u00ed jm\u011bn\u00ed jedin\u00fdm spole\u010dn\u00edkem." - }, - { - "T": "Na spole\u010dnost Kaufland \u010cesk\u00e1 republika v.o.s. p\u0159e\u0161lo jm\u011bn\u00ed zanikl\u00e9 spole\u010dnosti PROSS VYPICH s.r.o. se s\u00eddlem Praha 4, Pod Vi\u0161\u0148ovkou 1662\/25, PS\u010c 140 00, I\u010c: 252 40 048, zapsan\u00e9 v\u00a0obchodn\u00edm rejst\u0159\u00edku veden\u00e9m M\u011bstsk\u00fdm soudem v\u00a0Praze, odd\u00edl C, vlo\u017eka 137363\nv\u00a0d\u016fsledku p\u0159evzet\u00ed jm\u011bn\u00ed jedin\u00fdm spole\u010dn\u00edkem." - }, - { - "T": "Na spole\u010dnost p\u0159e\u0161lo v d\u016fsledku f\u00faze slou\u010den\u00edm jm\u011bn\u00ed zanikaj\u00edc\u00ed spole\u010dnosti Immo-Log-Omega v.o.s., se s\u00eddlem B\u011blohorsk\u00e1 2428\/203, B\u0159evnov, 169 00 Praha 6, identifika\u010dn\u00ed \u010d\u00edslo: 077 73 056, a to dle projektu f\u00faze slou\u010den\u00edm ze dne 29.05.2019." - } - ], - "SO": { - "CSO": [ - { - "C": { - "KAN": "1", - "PO": { - "ICO": "25080181", - "OF": "Kaufland Management \u010cR s.r.o.", - "NPF": "Spole\u010dnost s ru\u010den\u00edm omezen\u00fdm", - "SI": { - "IDA": "47412240", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Hlavn\u00ed m\u011bsto Praha", - "N": "Praha", - "NCO": "B\u0159evnov", - "NU": "B\u011blohorsk\u00e1", - "CD": "2428", - "TCD": "1", - "CO": "203", - "PSC": "16900", - "optional": { - "zip": "16900", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "B\u011blohorsk\u00e1", - "house": "2428\/203", - "city": "Praha - B\u0159evnov" - } - } - }, - "VF": { - "DZA": { - "date": "2018-01-31 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - } - }, - "T": "Kaufland Management \u010cR s.r.o. zastupuj\u00ed v\u017edy dva jednatel\u00e9 spole\u010dn\u011b. Jednateli Kaufland Management \u010cR s.r.o. jsou: \n\n- pan Stefan Hoppe, dat. nar. 12.02.1980, bytem \u0160tef\u00e1nikova 1\/65, Sm\u00edchov, 150 00 Praha 5, \n\n- pan Oliver Gschwendtner, dat. nar. 09.11.1972, bytem Pod ka\u0161tany 1106\/17, Bubene\u010d, 160 00 Praha 6, \n\n- pan Martin Piter\u00e1k, dat. nar. 06.03.1977, bytem U Rybn\u00ed\u010dka 767, 267 16 V\u00fdsok\u00fd \u00dajezd,\n\n- pan\u00ed Kl\u00e1ra Be\u0148a\u010dkov\u00e1, dat. nar. 16.05.1975, bytem Na Rym\u00e1ni 316\/13, Praha 5, 153 00, \n\n- pan Hans J\u00f6rg Bauer, dat. nar. 15.7.1974, bytem V p\u0159\u00edstavu 1585\/16, Hole\u0161ovice, 170 00 Praha 7." - } - } - ], - "T": "Statut\u00e1rn\u00edm org\u00e1nem spole\u010dnosti je spole\u010dn\u00edk - Kaufland Management \u010cR s.r.o., kter\u00fd je jako\u017eto statut\u00e1rn\u00ed org\u00e1n povinen a opr\u00e1vn\u011bn k obchodn\u00edmu veden\u00ed spole\u010dnosti." - }, - "PRO": { - "PRA": [ - { - "KAN": "3", - "FO": { - "TP": "Ing.", - "J": "Jana", - "P": "Karni\u0161ov\u00e1", - "DN": { - "date": "1970-09-24 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "47412254", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Hlavn\u00ed m\u011bsto Praha", - "N": "Praha", - "NCO": "Vy\u0161ehrad", - "NU": "Hostiv\u00edtova", - "CD": "115", - "TCD": "1", - "CO": "6", - "PSC": "12800", - "optional": { - "zip": "12800", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Hostiv\u00edtova", - "house": "115\/6", - "city": "Praha - Vy\u0161ehrad" - } - } - } - }, - { - "KAN": "3", - "FO": { - "J": "Vladim\u00edr", - "P": "Janda", - "DN": { - "date": "1966-02-19 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "47412271", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "N": "Studen\u00e1", - "NU": "Po\u010d\u00e1teck\u00e1", - "CD": "139", - "TCD": "1", - "PSC": "37856", - "optional": { - "zip": "37856", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Po\u010d\u00e1teck\u00e1", - "house": "139", - "city": "Studen\u00e1" - } - } - } - }, - { - "KAN": "3", - "FO": { - "J": "\u0160\u00e1rka", - "P": "Sobotkov\u00e1", - "DN": { - "date": "1961-01-12 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "47412281", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Hodon\u00edn", - "N": "\u010cejkovice", - "NU": "Mal\u00fd \u00dajezd", - "CD": "974", - "TCD": "1", - "PSC": "69615", - "optional": { - "zip": "69615", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Mal\u00fd \u00dajezd", - "house": "974", - "city": "\u010cejkovice" - } - } - } - }, - { - "KAN": "3", - "FO": { - "J": "Igor", - "P": "Kremla", - "DN": { - "date": "1973-09-25 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "47412282", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Hlavn\u00ed m\u011bsto Praha", - "N": "Praha", - "NCO": "Nov\u00e9 M\u011bsto", - "NU": "Trojick\u00e1", - "CD": "1904", - "TCD": "1", - "CO": "14", - "PSC": "12800", - "optional": { - "zip": "12800", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Trojick\u00e1", - "house": "1904\/14", - "city": "Praha - Nov\u00e9 M\u011bsto" - } - } - } - }, - { - "KAN": "3", - "FO": { - "J": "Juraj", - "P": "Bend\u00edk", - "DN": { - "date": "1975-12-10 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "47412283", - "KS": "703", - "NS": "Slovensk\u00e1 republika", - "N": "Dunajsk\u00e1 Lu\u017en\u00e1 - J\u00e1no\u0161\u00edkova", - "NU": "Mandl'ov\u00e1 1998\/52", - "optional": { - "zip": "", - "ks": "703", - "country": "Slovensk\u00e1 republika", - "street": "Mandl'ov\u00e1", - "house": "1998\/52", - "city": "Dunajsk\u00e1 Lu\u017en\u00e1 - J\u00e1no\u0161\u00edkova" - } - } - } - }, - { - "KAN": "3", - "FO": { - "J": "Monika", - "P": "Be\u010dv\u00e1\u0159ov\u00e1", - "DN": { - "date": "1976-10-28 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "47412286", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Hlavn\u00ed m\u011bsto Praha", - "N": "Praha", - "NCO": "Michle", - "NU": "Ohradn\u00ed", - "CD": "1335", - "TCD": "1", - "CO": "5", - "PSC": "14000", - "optional": { - "zip": "14000", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Ohradn\u00ed", - "house": "1335\/5", - "city": "Praha - Michle" - } - } - } - } - ], - "T": "K\u00a0zastupov\u00e1n\u00ed a\u00a0podepisov\u00e1n\u00ed jsou opr\u00e1vn\u011bni v\u017edy nejm\u00e9n\u011b dva prokurist\u00e9 spole\u010dn\u011b. Prokurist\u00e9 podepisuj\u00ed t\u00edm zp\u016fsobem, \u017ee k\u00a0obchodn\u00ed firm\u011b spole\u010dnosti p\u0159ipoj\u00ed dodatek ozna\u010duj\u00edc\u00ed prokuru a\u00a0sv\u016fj podpis." - }, - "SSV": { - "SS": [ - { - "KAN": "24", - "PO": { - "IZO": "HRB 107849", - "OF": "Kaufland International Zweite GmbH", - "SI": { - "IDA": "47412291", - "KS": "276", - "NS": "Spolkov\u00e1 republika N\u011bmecko", - "N": "Neckarsulm", - "NU": "R\u00f6telstr. 35", - "PSC": "74172", - "optional": { - "zip": "74172", - "ks": "276", - "country": "Spolkov\u00e1 republika N\u011bmecko", - "street": "R\u00f6telstr.", - "house": "35", - "city": "Neckarsulm" - } - } - } - }, - { - "KAN": "24", - "PO": { - "ICO": "25080181", - "OF": "Kaufland Management \u010cR s.r.o.", - "NPF": "Spole\u010dnost s ru\u010den\u00edm omezen\u00fdm", - "SI": { - "IDA": "47412294", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Hlavn\u00ed m\u011bsto Praha", - "N": "Praha", - "NCO": "B\u0159evnov", - "NU": "B\u011blohorsk\u00e1", - "CD": "2428", - "TCD": "1", - "CO": "203", - "PSC": "16900", - "optional": { - "zip": "16900", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "B\u011blohorsk\u00e1", - "house": "2428\/203", - "city": "Praha - B\u0159evnov" - } - } - } - } - ] - } -} \ No newline at end of file diff --git a/tests/fixtures/response/bl-27082440.json b/tests/fixtures/response/bl-27082440.json deleted file mode 100644 index a562319..0000000 --- a/tests/fixtures/response/bl-27082440.json +++ /dev/null @@ -1,471 +0,0 @@ -{ - "UVOD": {}, - "ZAU": { - "S": { - "SSU": "Aktivn\u00ed", - "KKZ": { - "K": "0" - }, - "VY": { - "K": "0" - }, - "ZAM": { - "K": "0" - }, - "LI": { - "K": "0" - } - }, - "ICO": "27082440", - "OF": "Alza.cz a.s.", - "PFO": { - "KPF": 121, - "NPF": "Akciov\u00e1 spole\u010dnost", - "PFO": "P", - "TZU": "Tuzemsk\u00e1" - }, - "SI": { - "IDA": "53142326", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Hlavn\u00ed m\u011bsto Praha", - "N": "Praha", - "NCO": "Hole\u0161ovice", - "NU": "Jankovcova", - "CD": "1522", - "TCD": "1", - "CO": "53", - "PSC": "17000", - "optional": { - "zip": "17000", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Jankovcova", - "house": "1522\/53", - "city": "Praha - Hole\u0161ovice" - } - }, - "DZOR": "2003-08-26", - "POD": "" - }, - "REG": { - "SZ": { - "SD": { - "K": "1", - "T": "M\u011bstsk\u00fd soud v Praze" - }, - "OV": "B 8573" - } - }, - "CIN": { - "PP": { - "T": [ - "v\u00fdroba, instalace, opravy elektrick\u00fdch stroj\u016f a p\u0159\u00edstroj\u016f, elektronick\u00fdch a telekomunika\u010dn\u00edch za\u0159\u00edzen\u00ed", - "v\u00fdroba, obchod a slu\u017eby neuveden\u00e9 v p\u0159\u00edloh\u00e1ch 1 a\u017e 3 \u017eivnostensk\u00e9ho z\u00e1kona, v oborech \u010dinnosti: \n\n\n\nzprost\u0159edkov\u00e1n\u00ed obchodu a slu\u017eeb\n\nvelkoobchod a maloobchod\n\nskladov\u00e1n\u00ed, balen\u00ed zbo\u017e\u00ed, manipulace s n\u00e1kladem a technick\u00e9 \u010dinnosti v doprav\u011b\n\nzasilatelstv\u00ed a zastupov\u00e1n\u00ed v celn\u00edm \u0159\u00edzen\u00ed\n\nposkytov\u00e1n\u00ed software, poradenstv\u00ed v oblasti informa\u010dn\u00edch technologi\u00ed, zpracov\u00e1n\u00ed dat, hostingov\u00e9 a souvisej\u00edc\u00ed \u010dinnosti a webov\u00e9 port\u00e1ly\n\npron\u00e1jem a p\u016fj\u010dov\u00e1n\u00ed v\u011bc\u00ed movit\u00fdch\n\nreklamn\u00ed \u010dinnost, marketing, medi\u00e1ln\u00ed zastoupen\u00ed", - "poskytov\u00e1n\u00ed nebo zprost\u0159edkov\u00e1n\u00ed spot\u0159ebitelsk\u00e9ho \u00fav\u011bru", - "zprost\u0159edkovatelsk\u00e1 \u010dinnost v poji\u0161\u0165ovnictv\u00ed", - "hostinsk\u00e1 \u010dinnost", - "silni\u010dn\u00ed motorov\u00e1 doprava - n\u00e1kladn\u00ed provozovan\u00e1 vozidly nebo j\u00edzdn\u00edmi soupravami o nejv\u011bt\u0161\u00ed povolen\u00e9 hmotnosti nep\u0159esahuj\u00edc\u00ed 3,5 tuny, jsou-li ur\u010deny k p\u0159eprav\u011b zv\u00ed\u0159at nebo v\u011bc\u00ed", - "prodej kvasn\u00e9ho lihu, konzumn\u00edho lihu a lihovin" - ] - } - }, - "OSK": [ - { - "T": "Obchodn\u00ed korporace se pod\u0159\u00eddila z\u00e1konu jako celku postupem podle \u00a7 777 odst. 5 z\u00e1kona \u010d. 90\/2012 Sb., o obchodn\u00edch spole\u010dnostech a dru\u017estvech." - }, - { - "T": "V souvislosti s procesem f\u00faze slou\u010den\u00edm obchodn\u00ed spole\u010dnosti Alza.cz a.s., se s\u00eddlem Praha 7, Jate\u010dn\u00ed 33a, PS\u010c 170 00, I\u010c: 27082440, zapsan\u00e9 v obchodn\u00edm rejst\u0159\u00edku veden\u00e9m M\u011bstsk\u00fdm soudem v Praze, v odd\u00edlu B, vlo\u017ece 8573, pr\u00e1vn\u00ed forma: akciov\u00e1 spole\u010dnost,\nzalo\u017een\u00e9 a existuj\u00edc\u00ed podle pr\u00e1va \u010cesk\u00e9 republiky, jako n\u00e1stupnick\u00e9 spole\u010dnosti (d\u00e1le t\u00e9\u017e jen jako \"Alza.cz a.s.\"), s obchodn\u00ed spole\u010dnost\u00ed PUBLERO s.r.o., se s\u00eddlem Hn\u011bvkovsk\u00e9ho 30\/65, Kom\u00e1rov, 617 00 Brno, I\u010c: 24723771, zapsan\u00e9 v obchodn\u00edm rejst\u0159\u00edku vede\nn\u00e9m u Krajsk\u00e9ho soudu v Brn\u011b, v odd\u00edlu C, vlo\u017ece 80153, pr\u00e1vn\u00ed forma: spole\u010dnost s ru\u010den\u00fdm omezen\u00fdm, zalo\u017eenou a existuj\u00edc\u00ed podle pr\u00e1va \u010cesk\u00e9 republiky, jako zanikaj\u00edc\u00ed spole\u010dnost\u00ed (d\u00e1le t\u00e9\u017e jen jako \"PUBLERO s.r.o.\"), podle projektu f\u00faze slou\u010den\u00edm ze dne\n 23.11.2015 (dvac\u00e1t\u00e9ho t\u0159et\u00edho listopadu roku dva tis\u00edce patn\u00e1ct) do\u0161lo ke slou\u010den\u00ed spole\u010dnosti Alza.cz a.s. se spole\u010dnost\u00ed PUBLERO s.r.o., p\u0159i\u010dem\u017e zanikaj\u00edc\u00ed spole\u010dnost PUBLERO s.r.o. slou\u010den\u00edm zanikla bez likvidace a jej\u00ed jm\u011bn\u00ed p\u0159e\u0161lo na n\u00e1stupnickou sp\nole\u010dnost Alza.cz a.s." - }, - { - "T": "Obchodn\u00ed spole\u010dnost Alza.cz a.s., se s\u00eddlem Jankovcova 1522\/53, Hole\u0161ovice, 170 00 Praha 7, I\u010cO: 270 82 440 (d\u00e1le jen Spole\u010dnost), t\u00edmto pln\u00ed svou povinnost ve smyslu ustanoven\u00ed \u00a7 529 z\u00e1kona \u010d. 89\/2012 Sb., ob\u010dansk\u00fd z\u00e1kon\u00edk, a zve\u0159ej\u0148uje, \u017ee jedin\u00fd akcion\n\u00e1\u0159 Spole\u010dnosti rozhodl v p\u016fsobnosti valn\u00e9 hromady Spole\u010dnosti dne 9.3.2023 o p\u0159em\u011bn\u011b podoby v\u0161ech 100 kmenov\u00fdch akci\u00ed na jm\u00e9no v listinn\u00e9 podob\u011b o jmenovit\u00e9 hodnot\u011b 20 000,- K\u010d jedn\u00e9 akcie na 100 kmenov\u00fdch akci\u00ed na jm\u00e9no v zaknihovan\u00e9 podob\u011b ve jmenovit\u00e9\nhodnot\u011b 20 000,- K\u010d jedn\u00e9 akcie. Akcion\u00e1\u0159 Spole\u010dnosti je povinen listinn\u00e9 akcie p\u0159edlo\u017eit ve lh\u016ft\u011b do 31.5.2023." - } - ], - "KAP": { - "ZA": { - "VK": { - "KC": "2000000;00" - }, - "SPL": { - "PRC": "100" - } - }, - "Akcie": { - "EM": { - "DA": "Kmenov\u00e9 akcie na jm\u00e9no", - "H": "20000", - "Pocet": "100", - "PD": "v zaknihovan\u00e9 podob\u011b" - } - } - }, - "SO": { - "CSO": [ - { - "C": { - "KAN": "1", - "F": "M\u00edstop\u0159edseda p\u0159edstavenstva", - "FO": { - "TP": "Ing.", - "J": "Petr", - "P": "Bena", - "DN": { - "date": "1969-12-02 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "53142341", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Hlavn\u00ed m\u011bsto Praha", - "N": "Praha", - "NCO": "Sm\u00edchov", - "NU": "Kobrova", - "CD": "3331", - "TCD": "1", - "CO": "3", - "PSC": "15000", - "optional": { - "zip": "15000", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Kobrova", - "house": "3331\/3", - "city": "Praha - Sm\u00edchov" - } - } - }, - "CLE": { - "DZA": { - "date": "2020-06-17 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - } - }, - "VF": { - "DZA": { - "date": "2020-06-17 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - } - } - } - }, - { - "C": { - "KAN": "1", - "F": "M\u00edstop\u0159edseda p\u0159edstavenstva", - "FO": { - "J": "Jakub", - "P": "Krej\u010d\u00ed\u0159", - "DN": { - "date": "1986-02-19 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "53142343", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "N": "Praha", - "NCO": "B\u0159evnov", - "NU": "B\u011blohorsk\u00e1", - "CD": "209", - "TCD": "1", - "CO": "133", - "PSC": "16900", - "optional": { - "zip": "16900", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "B\u011blohorsk\u00e1", - "house": "209\/133", - "city": "Praha - B\u0159evnov" - } - } - }, - "CLE": { - "DZA": { - "date": "2022-08-15 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - } - }, - "VF": { - "DZA": { - "date": "2022-08-15 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - } - } - } - }, - { - "C": { - "KAN": "1", - "F": "M\u00edstop\u0159edseda p\u0159edstavenstva", - "FO": { - "J": "Miroslav", - "P": "K\u00f6v\u00e1ry", - "DN": { - "date": "1989-07-27 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "53142344", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "N": "Praha", - "NCO": "Bubene\u010d", - "NU": "Zelen\u00e1", - "CD": "945", - "TCD": "1", - "CO": "3", - "PSC": "16000", - "optional": { - "zip": "16000", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Zelen\u00e1", - "house": "945\/3", - "city": "Praha - Bubene\u010d" - } - } - }, - "CLE": { - "DZA": { - "date": "2022-08-15 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - } - }, - "VF": { - "DZA": { - "date": "2022-08-15 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - } - } - } - }, - { - "C": { - "KAN": "1", - "F": "P\u0159edseda p\u0159edstavenstva", - "FO": { - "J": "Ale\u0161", - "P": "Zavoral", - "DN": { - "date": "1976-10-24 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "53142345", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "N": "Praha", - "NCO": "Libe\u0148", - "NU": "\u010ceskomoravsk\u00e1", - "CD": "809", - "TCD": "1", - "CO": "9", - "PSC": "19000", - "optional": { - "zip": "19000", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "\u010ceskomoravsk\u00e1", - "house": "809\/9", - "city": "Praha - Libe\u0148" - } - } - }, - "CLE": { - "DZA": { - "date": "2022-11-09 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - } - }, - "VF": { - "DZA": { - "date": "2022-11-16 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - } - } - } - } - ], - "T": "Ka\u017ed\u00fd \u010dlen p\u0159edstavenstva jedn\u00e1 jm\u00e9nem spole\u010dnosti samostatn\u011b." - }, - "DR": { - "CDR": [ - { - "C": { - "KAN": "4", - "F": "\u010clen dozor\u010d\u00ed rady", - "FO": { - "TP": "Ing.", - "J": "Hana", - "P": "\u017d\u00e1kov\u00e1 Petrov\u00e1", - "DN": { - "date": "1972-03-22 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "53142364", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Hlavn\u00ed m\u011bsto Praha", - "N": "Praha", - "NCO": "Liboc", - "NU": "Nov\u00e1 \u0160\u00e1rka", - "CD": "524", - "TCD": "1", - "CO": "13", - "PSC": "16100", - "optional": { - "zip": "16100", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Nov\u00e1 \u0160\u00e1rka", - "house": "524\/13", - "city": "Praha - Liboc" - } - } - }, - "CLE": { - "DZA": { - "date": "2018-11-28 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - } - } - } - }, - { - "C": { - "KAN": "4", - "F": "P\u0159edseda dozor\u010d\u00ed rady", - "FO": { - "J": "Jan", - "P": "Moud\u0159\u00edk", - "DN": { - "date": "1980-02-20 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "53142366", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "N": "Praha", - "NCO": "Prosek", - "NU": "M\u011b\u0161ick\u00e1", - "CD": "135", - "TCD": "1", - "CO": "60", - "PSC": "19000", - "optional": { - "zip": "19000", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "M\u011b\u0161ick\u00e1", - "house": "135\/60", - "city": "Praha - Prosek" - } - } - }, - "CLE": { - "DZA": { - "date": "2022-08-15 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - } - }, - "VF": { - "DZA": { - "date": "2022-08-15 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - } - } - } - }, - { - "C": { - "KAN": "4", - "F": "\u010clen dozor\u010d\u00ed rady", - "FO": { - "TP": "Bc.", - "J": "Katar\u00edna", - "P": "Lexov\u00e1", - "DN": { - "date": "1979-10-05 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "53142367", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Praha-v\u00fdchod", - "N": "Brand\u00fds nad Labem-Star\u00e1 Boleslav", - "NCO": "Popovice", - "CD": "6", - "TCD": "1", - "PSC": "25001", - "optional": { - "zip": "25001", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Popovice", - "house": "6", - "city": "Brand\u00fds nad Labem-Star\u00e1 Boleslav" - } - } - }, - "CLE": { - "DZA": { - "date": "2022-11-23 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - } - } - } - } - ] - }, - "AKI": { - "AKR": [ - { - "KAN": "5", - "PO": { - "IZO": "HE 197294", - "OF": "L.S. INVESTMENTS LIMITED", - "SI": { - "IDA": "53142371", - "KS": "196", - "NS": "Kypersk\u00e1 republika", - "N": "Nik\u00f3sie", - "NU": "CHAPO CENTRAL, 1st floor, Spyrou Kyprianou 20", - "PSC": "1075", - "optional": { - "zip": "1075", - "ks": "196", - "country": "Kypersk\u00e1 republika", - "street": "CHAPO CENTRAL, 1st floor, Spyrou Kyprianou", - "house": "20", - "city": "Nik\u00f3sie" - } - } - } - } - ] - } -} \ No newline at end of file diff --git a/tests/fixtures/response/bl-49812670.json b/tests/fixtures/response/bl-49812670.json deleted file mode 100644 index a9da465..0000000 --- a/tests/fixtures/response/bl-49812670.json +++ /dev/null @@ -1,173 +0,0 @@ -{ - "UVOD": {}, - "ZAU": { - "POD": "", - "S": { - "SSU": "Aktivn\u00ed", - "KKZ": { - "K": "0" - }, - "VY": { - "K": "0" - }, - "ZAM": { - "K": "0" - }, - "LI": { - "K": "0" - } - }, - "ICO": "49812670", - "OF": "H. A. C. spol. s r.o.", - "PFO": { - "KPF": 112, - "NPF": "Spole\u010dnost s ru\u010den\u00edm omezen\u00fdm", - "PFO": "P", - "TZU": "Tuzemsk\u00e1" - }, - "SI": { - "IDA": "27582046", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "N": "Pardubice", - "NCO": "Semt\u00edn", - "CD": "97", - "TCD": "1", - "PSC": "53353", - "optional": { - "zip": "53353", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Semt\u00edn", - "house": "97", - "city": "Pardubice" - } - }, - "DZOR": "1993-09-06" - }, - "REG": { - "SZ": { - "SD": { - "K": "6", - "T": "Krajsk\u00fd soud v Hradci Kr\u00e1lov\u00e9" - }, - "OV": "C 4902" - } - }, - "CIN": { - "PP": { - "T": [ - "Prov\u00e1d\u011bn\u00ed staveb, jejich zm\u011bn a odstra\u0148ov\u00e1n\u00ed", - "V\u00fdroba, obchod a slu\u017eby neuveden\u00e9 v p\u0159\u00edloh\u00e1ch 1 a\u017e 3 \u017eivnostensk\u00e9ho z\u00e1kona" - ] - } - }, - "OSK": [ - { - "T": "\u00dadaje o z\u0159\u00edzen\u00ed:\n\nSpole\u010d. s ru\u010den\u00edm omezen\u00fdm byla zalo\u017eena zakladatelskou listinou formou not\u00e1\u0159sk\u00e9ho z\u00e1pisu dne 11.6.1993, podle z\u00e1k. \u010d. 513\/91 Sb." - }, - { - "T": "Obchodn\u00ed korporace se pod\u0159\u00eddila z\u00e1konu jako celku postupem podle \u00a7 777 odst. 5 z\u00e1kona \u010d.90\/2012 Sb. o obchodn\u00edch spole\u010dnostech a dru\u017estvech" - } - ], - "KAP": { - "ZA": { - "VK": { - "KC": "100000;00" - } - } - }, - "SO": { - "CSO": [ - { - "C": { - "KAN": "1", - "F": "jednatel", - "FO": { - "J": "Ji\u0159\u00ed", - "P": "Hor\u00e1k", - "DN": { - "date": "1967-01-21 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "27582049", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "N": "Pardubice", - "NCO": "B\u00edl\u00e9 P\u0159edm\u011bst\u00ed", - "NU": "Labsk\u00e1", - "CD": "1833", - "TCD": "1", - "PSC": "53002", - "optional": { - "zip": "53002", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Labsk\u00e1", - "house": "1833", - "city": "Pardubice - B\u00edl\u00e9 P\u0159edm\u011bst\u00ed" - } - } - }, - "VF": { - "DZA": { - "date": "1993-09-06 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - } - } - } - } - ], - "T": "Statut\u00e1rn\u00edm org\u00e1nem spole\u010dnosti je jednatel a tento jedn\u00e1 jm\u00e9nem spole\u010dnosti samostatn\u011b." - }, - "SSV": { - "SS": [ - { - "KAN": "24", - "FO": { - "J": "Ji\u0159\u00ed", - "P": "Hor\u00e1k", - "DN": { - "date": "1967-01-21 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "27582052", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Pardubice", - "N": "Pardubice", - "NCO": "B\u00edl\u00e9 P\u0159edm\u011bst\u00ed", - "NU": "Labsk\u00e1", - "CD": "1833", - "TCD": "1", - "PSC": "53002", - "optional": { - "zip": "53002", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Labsk\u00e1", - "house": "1833", - "city": "Pardubice - B\u00edl\u00e9 P\u0159edm\u011bst\u00ed" - } - } - }, - "VKS": { - "VK": { - "KC": "100000;00" - }, - "SPL": { - "PRC": "100" - }, - "OP": { - "T": "100" - } - } - } - ] - } -} \ No newline at end of file diff --git a/tests/fixtures/response/bl-62413686.json b/tests/fixtures/response/bl-62413686.json deleted file mode 100644 index acfd686..0000000 --- a/tests/fixtures/response/bl-62413686.json +++ /dev/null @@ -1,363 +0,0 @@ -{ - "UVOD": {}, - "ZAU": { - "POD": "", - "S": { - "SSU": "Aktivn\u00ed", - "KKZ": { - "K": "0" - }, - "VY": { - "K": "0" - }, - "ZAM": { - "K": "0" - }, - "LI": { - "K": "0" - } - }, - "ICO": "62413686", - "OF": "ISMAJLER komanditn\u00ed spole\u010dnost", - "PFO": { - "KPF": 113, - "NPF": "Spole\u010dnost komanditn\u00ed", - "PFO": "P", - "TZU": "Tuzemsk\u00e1" - }, - "SI": { - "IDA": "44035432", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Praha 8", - "N": "Praha 8", - "NU": "Lindnerova", - "CA": "2", - "optional": { - "zip": "", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Lindnerova", - "house": "", - "city": "Praha 8" - } - }, - "DZOR": "1995-10-18" - }, - "REG": { - "SZ": { - "SD": { - "K": "1", - "T": "M\u011bstsk\u00fd soud v Praze" - }, - "OV": "A 15591" - } - }, - "CIN": { - "PP": { - "T": [ - "koup\u011b zbo\u017e\u00ed za \u00fa\u010delem jeho dal\u0161\u00edho prodeje a prodej (s v\u00fdjimkou\n\nzbo\u017e\u00ed vylou\u010den\u00e9ho z\u00e1k. \u010d. 455\/1991 Sb. a jeho p\u0159\u00edlohami)", - "realitn\u00ed kancel\u00e1\u0159", - "zprost\u0159edkovatelsk\u00e1 \u010dinnost v oblasti obchodu a slu\u017eeb (vyjma\n\n\u010dinnost\u00ed uveden\u00fdch v \u00a7 3 a v p\u0159\u00edl. \u010d. 3 z\u00e1kona \u010d. 455\/1991 Sb.\n\no \u017eivnostensk\u00e9m podnik\u00e1n\u00ed ve zn\u011bn\u00ed pozd\u011bj\u0161\u00edch p\u0159edpis\u016f" - ] - } - }, - "SO": { - "T": "Zp\u016fsob jedn\u00e1n\u00ed za spole\u010dnost:\n\nJm\u00e9nem spole\u010dnosti jedn\u00e1 a podepisuje se jako statut\u00e1rn\u00ed\n\nz\u00e1stupce komplement\u00e1\u0159 resp. jeho statut\u00e1rn\u00ed z\u00e1stupce ve funkci\n\njednatele a to samostatn\u011b." - }, - "SOK": { - "CSK": [ - { - "C": { - "KAN": "9", - "PO": { - "ICO": "63667258", - "OF": "L.E.V.,spol. s r.o. v likvidaci", - "NPF": "Spole\u010dnost s ru\u010den\u00edm omezen\u00fdm", - "SI": { - "IDA": "44035440", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Hlavn\u00ed m\u011bsto Praha", - "N": "Praha", - "NCO": "Libe\u0148", - "NU": "Lindnerova", - "CD": "1609", - "TCD": "1", - "CO": "2", - "PSC": "18000", - "optional": { - "zip": "18000", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Lindnerova", - "house": "1609\/2", - "city": "Praha - Libe\u0148" - } - } - } - } - } - ] - }, - "KME": { - "KMA": [ - { - "KAN": "10", - "FO": { - "J": "Oujakh", - "P": "Ismailov", - "DN": { - "date": "1920-12-17 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "44035449", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Hlavn\u00ed m\u011bsto Praha", - "N": "Praha", - "NCO": "Libe\u0148", - "NU": "Pod Labu\u0165kou", - "CD": "785", - "TCD": "1", - "CO": "19", - "PSC": "18000", - "optional": { - "zip": "18000", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Pod Labu\u0165kou", - "house": "785\/19", - "city": "Praha - Libe\u0148" - } - } - } - }, - { - "KAN": "10", - "FO": { - "J": "Ali", - "P": "Ismailov", - "DN": { - "date": "1959-03-30 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "44035451", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Hlavn\u00ed m\u011bsto Praha", - "N": "Praha", - "NCO": "Chodov", - "NU": "Klap\u00e1lkova", - "CD": "2242", - "TCD": "1", - "CO": "9", - "PSC": "14900", - "optional": { - "zip": "14900", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Klap\u00e1lkova", - "house": "2242\/9", - "city": "Praha - Chodov" - } - } - } - }, - { - "KAN": "10", - "FO": { - "J": "Marijat", - "P": "Kadijeva", - "DN": { - "date": "1959-10-02 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "44035453", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Hlavn\u00ed m\u011bsto Praha", - "N": "Praha", - "NCO": "Chodov", - "NU": "Klap\u00e1lkova", - "CD": "2242", - "TCD": "1", - "CO": "9", - "PSC": "14900", - "optional": { - "zip": "14900", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Klap\u00e1lkova", - "house": "2242\/9", - "city": "Praha - Chodov" - } - } - } - }, - { - "KAN": "10", - "FO": { - "J": "Bekchan", - "P": "Ismailov", - "DN": { - "date": "1964-06-19 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "44035455", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Praha 5", - "N": "Praha 5", - "NU": "Ham\u0161\u00edkova", - "CA": "21", - "optional": { - "zip": "", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Ham\u0161\u00edkova", - "house": "", - "city": "Praha 5" - } - } - } - }, - { - "KAN": "10", - "FO": { - "J": "Zarema", - "P": "Chacajeva", - "DN": { - "date": "1970-09-13 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "44035457", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Praha 5", - "N": "Praha 5", - "NU": "Ham\u0161\u00edkova", - "CA": "21", - "optional": { - "zip": "", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Ham\u0161\u00edkova", - "house": "", - "city": "Praha 5" - } - } - } - }, - { - "KAN": "10", - "FO": { - "J": "Taissija", - "P": "Ismailova", - "DN": { - "date": "1958-11-13 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "44035459", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Hlavn\u00ed m\u011bsto Praha", - "N": "Praha", - "NCO": "Hodkovi\u010dky", - "NU": "Na lysin\u00e1ch", - "CD": "455", - "TCD": "1", - "CO": "16", - "PSC": "14700", - "optional": { - "zip": "14700", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Na lysin\u00e1ch", - "house": "455\/16", - "city": "Praha - Hodkovi\u010dky" - } - } - } - }, - { - "KAN": "10", - "FO": { - "J": "Kourtki", - "P": "Tasoujeva", - "DN": { - "date": "1958-04-22 00:00:00.000000", - "timezone_type": 3, - "timezone": "Europe\/Prague" - }, - "B": { - "IDA": "44035461", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Hlavn\u00ed m\u011bsto Praha", - "N": "Praha", - "NCO": "Stod\u016flky", - "NU": "B\u011bhounkova", - "CD": "2344", - "TCD": "1", - "CO": "27", - "PSC": "15800", - "optional": { - "zip": "15800", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "B\u011bhounkova", - "house": "2344\/27", - "city": "Praha - Stod\u016flky" - } - } - } - } - ] - }, - "KPI": { - "KPR": [ - { - "KAN": "9", - "PO": { - "ICO": "63667258", - "OF": "L.E.V.,spol. s r.o. v likvidaci", - "NPF": "Spole\u010dnost s ru\u010den\u00edm omezen\u00fdm", - "SI": { - "IDA": "44035440", - "KS": "203", - "NS": "\u010cesk\u00e1 republika", - "NOK": "Hlavn\u00ed m\u011bsto Praha", - "N": "Praha", - "NCO": "Libe\u0148", - "NU": "Lindnerova", - "CD": "1609", - "TCD": "1", - "CO": "2", - "PSC": "18000", - "optional": { - "zip": "18000", - "ks": "203", - "country": "\u010cesk\u00e1 republika", - "street": "Lindnerova", - "house": "1609\/2", - "city": "Praha - Libe\u0148" - } - } - } - } - ] - } -} \ No newline at end of file diff --git a/tests/src/AresTest.php b/tests/src/AresTest.php deleted file mode 100644 index 3bf3f7d..0000000 --- a/tests/src/AresTest.php +++ /dev/null @@ -1,257 +0,0 @@ -create(); - $data = $ares->loadDataBox('27082440'); - Assert::same('xtkcrkz', $data->ISDS); - } - - - /** - * @dataProvider BusinessListData - */ - public function testBusinessList(string $in): void - { - $ares = (new Ares\AresFactory())->create(); - try { - $data = $ares->loadBusinessList($in); - } catch (IdentificationNumberNotFoundException $e) { - Assert::same('87744473', $e->getIn()); - - return; // intentionally - } - - $data->UVOD = new \stdClass(); - $data->ZAU->POD = ''; - $jsonData = Json::decode(Json::encode($data)); - Assert::equal(loadResult("bl-$in"), $jsonData); - } - - - /** - * @return array - */ - public static function BusinessListData(): array - { - return [ - [ - 'in' => '27082440', // a.s. - ], - [ - 'in' => '49812670', // s.r.o. - ], - [ - 'in' => '87744473', // freelancer - ], - [ - 'in' => '25110161', // v.o.s. - ], - [ - 'in' => '62413686', // k.s. - ], - [ - 'in' => '02491427', // o.s. - ], - ]; - } - - - /** - * @throws \h4kuna\Ares\Exceptions\IdentificationNumberNotFoundException - */ - public function testNotExists(): void - { - (new Ares\AresFactory())->create()->loadBasic('36620751'); - } - - - public function testFreelancer(): void - { - $ares = (new Ares\AresFactory())->create(); - $in = '87744473'; - $aresData = $ares->loadBasic($in); - $data = json_decode((string) $aresData); - Assert::equal(loadResult($in), $data); - - Assert::same('N', $aresData->psu(Ares\Basic\SubjectFlag::VR_2)); - Assert::same('A', $aresData->psu(Ares\Basic\SubjectFlag::RES_3)); - Assert::same('A', $aresData->psu(Ares\Basic\SubjectFlag::RZP_4)); - Assert::same('N', $aresData->psu(Ares\Basic\SubjectFlag::NRPZS_5)); - Assert::same('A', $aresData->psu(Ares\Basic\SubjectFlag::RPDPH_6)); - - Assert::equal($aresData, unserialize(serialize($aresData))); - } - - - public function testMerchant(): void - { - $ares = (new Ares\AresFactory())->create(); - $in = '27082440'; - $data = json_decode((string) $ares->loadBasic($in)); - Assert::equal(loadResult($in), $data); - } - - - public function testMerchantInActive(): void - { - $ares = (new Ares\AresFactory())->create(); - $in = '25596641'; - $data = json_decode((string) $ares->loadBasic($in)); - Assert::equal(loadResult($in), $data); - } - - - public function testHouseNumber(): void - { - $ares = (new Ares\AresFactory())->create(); - $in = '26713250'; - $data = json_decode((string) $ares->loadBasic($in)); - Assert::equal(loadResult($in), $data); - } - - - public function testGroupVAT(): void - { - $ares = (new Ares\AresFactory())->create(); - $in = '02319918'; - $data = $ares->loadBasic($in); - Assert::true($data->isGroupVat()); - Assert::null($data->tin); - Assert::true($data->vat_payer); - } - - - public function testToArray(): void - { - $ares = (new Ares\AresFactory())->create(); - $data = $ares->loadBasic('87744473'); - Assert::same('Milan Matějček', $data->company); - - $names = []; - $arrayData = $data->toArray(); - $properties = self::allPropertyRead(); - foreach ($properties as $key => $name) { - Assert::true(array_key_exists($name, $arrayData)); - unset($properties[$key]); - } - - Assert::same([], $properties); - - Assert::same(['461', '471', '620', '73110', '7490'], $data->nace); - - Assert::type('array', $data->toArray()); - Assert::same([ - 'c' => 'Milan Matějček', - 'company' => true, - 'city' => 'Dolní Bousov', - ], - $data->toArray(['company' => 'c', 'is_person' => 'company', 'city' => null])); - } - - - /** - * @throws \h4kuna\Ares\Exceptions\IdentificationNumberNotFoundException - */ - public function testNoIn(): void - { - (new Ares\AresFactory())->create()->loadBasic('123'); - } - - - public function testForeingPerson(): void - { - $data = (new Ares\AresFactory())->create()->loadBasic('6387446'); - Assert::true($data->is_person); - } - - - /** - * @return array - */ - private static function allPropertyRead(): array - { - $reflection = new \ReflectionClass(Ares\Basic\Data::class); - $properties = $reflection->getProperties(\ReflectionProperty::IS_PUBLIC); - - return array_column($properties, 'name'); - } - - - public function testLoadBasicMulti(): void - { - $identificationNumbers = ['6387446', '123', '87744473', '25596641']; - $results = (new Ares\AresFactory())->create()->loadBasicMulti($identificationNumbers); - Assert::count(2, $results[Ares\Ares::RESULT_FAILED]); - Assert::count(2, $results[Ares\Ares::RESULT_SUCCESS]); - Assert::same([ - 'c' => 'Ivan Šebesta', - 'company' => true, - 'city' => 'Břest', - ], $results[Ares\Ares::RESULT_SUCCESS][0]->toArray([ - 'company' => 'c', - 'is_person' => 'company', - 'city' => null, - ])); - Assert::same([ - 'c' => 'Milan Matějček', - 'company' => true, - 'city' => 'Dolní Bousov', - ], $results[Ares\Ares::RESULT_SUCCESS][2]->toArray([ - 'company' => 'c', - 'is_person' => 'company', - 'city' => null, - ])); - - Assert::same([ - 'in' => '123', - 'code' => 71, - 'message' => 'Chyba 71 - nenalezeno 123', - ], $results[Ares\Ares::RESULT_FAILED][1]->toArray()); - Assert::same([ - 'in' => '25596641', - 'code' => 61, - 'message' => 'Chyba 61 - subjekt zanikl', - ], $results[Ares\Ares::RESULT_FAILED][3]->toArray()); - - Assert::same(61, $results[Ares\Ares::RESULT_FAILED][3]->code); - Assert::true($results[Ares\Ares::RESULT_FAILED][3]->disappeared()); - Assert::same('25596641', $results[Ares\Ares::RESULT_FAILED][3]->in); - Assert::same('Chyba 61 - subjekt zanikl', $results[Ares\Ares::RESULT_FAILED][3]->message); - } - - - public function testLoadBasicMultiEmpty(): void - { - $identificationNumbers = []; - $results = (new Ares\AresFactory())->create()->loadBasicMulti([]); - Assert::same([ - Ares\Basic\ContentProvider::RESULT_FAILED => [], - Ares\Basic\ContentProvider::RESULT_SUCCESS => [], - ], $results); - } - - - public function testBackCompatibilityClass(): void - { - Assert::type(Ares\Basic\Data::class, new Ares\Data\Data()); - Assert::same(Ares\Basic\SubjectFlag::VR_2, Ares\Data\SubjectFlag::VR_2); - } - -} - -(new AresTest)->run(); diff --git a/tests/src/E2E/CoreTest.php b/tests/src/E2E/CoreTest.php new file mode 100644 index 0000000..c0e1b53 --- /dev/null +++ b/tests/src/E2E/CoreTest.php @@ -0,0 +1,126 @@ +> + */ + protected function provideNotFound(): array + { + return [ + ['36620751'], // canceled + ['123'], // never exists + ]; + } + + + /** + * @dataProvider provideNotFound + */ + public function testNotFound(string $in): void + { + try { + (new Ares\AresFactory())->create()->loadBasic($in); + Assert::fail('Must throw exception'); + } catch (Ares\Exceptions\IdentificationNumberNotFoundException $e) { + Assert::same($in, $e->getIn()); + } catch (\Throwable $e) { + Assert::fail('Must throw ' . Ares\Exceptions\IdentificationNumberNotFoundException::class); + } + } + + + /** + * @return array> + */ + protected function provideCore(): array + { + return [ + ['25596641'], // inactive + ['27082440'], // a.s. + ['87744473'], // freelancer + ['49812670'], // s.r.o. + ['25110161'], // v.o.s. + ['62413686'], // k.s. + ['2491427'], // o.s. + ['26713250'], + ]; + } + + + /** + * @dataProvider provideCore + */ + public function testCore(string $in): void + { + $data = (new Ares\AresFactory())->create()->loadBasic($in); + $json = Json::decode(Json::encode($data)); + Assert::equal(loadResult($in), $json); + } + + + public function testInactive(): void + { + $data = (new Ares\AresFactory())->create()->loadBasic('25596641'); + Assert::false($data->active); + } + + + public function testGroupVAT(): void + { + $in = '2319918'; + $data = (new Ares\AresFactory())->create()->loadBasic($in); + Assert::same("0$in", $data->vat_id); + Assert::same("CZ0$in", $data->tin); + Assert::true($data->vat_payer); + } + + + public function testForeignPerson(): void + { + $data = (new Ares\AresFactory())->create()->loadBasic('6387446'); + Assert::true($data->is_person); + } + + + public function testLoadBasicMulti(): void + { + $identificationNumbers = ['6387446', '123', '87744473', '25596641', '06387446']; + $results = (new Ares\AresFactory())->create()->loadBasicMulti($identificationNumbers); + $companies = []; + foreach ($results as $in => $result) { + $companies[$in] = $result; + } + + Assert::count(3, $companies); + Assert::same($companies['6387446'], $companies['06387446']); + } + + + public function testLoadBasicMultiEmpty(): void + { + $identificationNumbers = []; + $results = (new Ares\AresFactory())->create()->loadBasicMulti([]); + foreach ($results as $result) { + $identificationNumbers[] = $result; + } + + Assert::same([], $identificationNumbers); + } + +} + +(new CoreTest)->run(); diff --git a/tests/src/E2E/DataBoxTest.php b/tests/src/E2E/DataBoxTest.php new file mode 100644 index 0000000..d7ae895 --- /dev/null +++ b/tests/src/E2E/DataBoxTest.php @@ -0,0 +1,25 @@ +create(); + $data = $ares->loadDataBox('27082440'); + Assert::same('xtkcrkz', $data->ISDS); + } + +} + +(new DataBoxTest)->run(); diff --git a/tests/src/E2E/VrEndpointTest.php b/tests/src/E2E/VrEndpointTest.php new file mode 100644 index 0000000..b9bf4ac --- /dev/null +++ b/tests/src/E2E/VrEndpointTest.php @@ -0,0 +1,34 @@ +createTransportProvider($aresFactory->createStreamFactory()); + + $provider = new Ares\Ares\Client($transportProvider); + + $coreData = $provider->useEndpoint(Ares\Ares\Sources::SERVICE_CORE, '87744473'); + Assert::same('87744473', $coreData->ico); + + $data = $provider->useEndpoint(Ares\Ares\Sources::SERVICE_RES, '87744473'); + Assert::same('87744473', $data->icoId); + } + +} + +(new VrEndpointTest)->run(); diff --git a/tests/src/Unit/Ares/Core/DataTest.php b/tests/src/Unit/Ares/Core/DataTest.php new file mode 100644 index 0000000..a83bf03 --- /dev/null +++ b/tests/src/Unit/Ares/Core/DataTest.php @@ -0,0 +1,97 @@ +original = null; + Assert::equal($unserializeData, $data); + } + + + public function testToArray(): void + { + $data = self::createData(); + $arrayData = $data->toArray(); + $properties = self::allPropertyRead(); + foreach ($properties as $key => $name) { + $data->{$name}; // @phpstan-ignore-line touch + Assert::true(array_key_exists($name, $arrayData), $name); + unset($properties[$key]); + } + Assert::same([], $properties); + } + + + public function testJson(): void + { + $data = self::createData(); + $encode = json_encode($data); + Assert::same((string) $data, $encode); + Assert::same('{"active":true,"city":"a","company":"b","created":"2020-12-13T04:05:06+01:00","dissolved":"2021-01-14T05:06:07+01:00","city_district":"c","city_post":"d","in":"e","is_person":false,"legal_form_code":102,"house_number":"f","street":"g","tin":null,"vat_id":"i","vat_payer":false,"zip":"h","country":"j","country_code":"k","nace":["465"],"sources":{"stavZdrojeRes":true}}', $encode); + } + + + /** + * @return array + */ + private static function allPropertyRead(): array + { + $reflection = new \ReflectionClass(Data::class); + $properties = $reflection->getProperties(\ReflectionProperty::IS_PUBLIC); + $properties = array_column($properties, 'name'); + $key = array_search('original', $properties, true); + unset($properties[$key]); + + return $properties; + } + + + private static function createData(): Data + { + $data = new Data(); + $data->active = true; + $data->city = 'a'; + $data->company = 'b'; + $data->created = new DateTimeImmutable('2020-12-13 04:05:06'); + $data->dissolved = new DateTimeImmutable('2021-01-14 05:06:07'); + $data->city_district = 'c'; + $data->city_post = 'd'; + $data->in = 'e'; + $data->is_person = false; + $data->legal_form_code = 102; + $data->house_number = 'f'; + $data->street = 'g'; + $data->tin = null; + $data->vat_payer = false; + $data->zip = 'h'; + $data->nace = ['465']; + $data->sources = [Sources::SERVICE_RES => true]; + $data->vat_id = 'i'; + $data->country = 'j'; + $data->country_code = 'k'; + $data->original = new \stdClass(); + + return $data; + } + +} + +(new DataTest())->run(); diff --git a/tests/src/Unit/Ares/Core/JsonToDataTransformerTest.php b/tests/src/Unit/Ares/Core/JsonToDataTransformerTest.php new file mode 100644 index 0000000..ae74cfe --- /dev/null +++ b/tests/src/Unit/Ares/Core/JsonToDataTransformerTest.php @@ -0,0 +1,40 @@ +ico = '1'; + $json->pravniForma = '111'; + $json->datumVzniku = '2022-08-13'; + + $data = (new JsonToDataTransformer())->transform($json); + + $array = $data->toArray(); + if ($array === []) { + Assert::fail('Empty array'); + } + + foreach ($array as $name => $v) { + $data->{$name}; // @phpstan-ignore-line touch + } + + Assert::true(true); + } + +} + +(new JsonToDataTransformerTest)->run();