From d043a0b60c33ca44d29f29a42ea4e1d64f7af9ef Mon Sep 17 00:00:00 2001 From: robmachado Date: Mon, 27 Nov 2023 16:13:12 -0300 Subject: [PATCH] =?UTF-8?q?Altera=C3=A7=C3=A3o=20XSD=20EvtAberturaeFinance?= =?UTF-8?q?ira?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/Fake/v1_2_4/FaketestEnviaCrypto.php | 19 +- .../v1_2_4/FaketestEvtAberturaeFinanceira.php | 13 +- .../testJsonSchemaEvtAberturaeFinanceira.php | 403 ++++++ .../v1_2_1/evtAberturaeFinanceira.schema | 23 +- .../v1_2_4/consultarIntermediario.schema | 28 + .../v1_2_4/evtAberturaeFinanceira.schema | 293 ++++ jsonSchemes/v1_2_4/evtCadDeclarante.schema | 218 +++ jsonSchemes/v1_2_4/evtCadIntermediario.schema | 75 + jsonSchemes/v1_2_4/evtCadPatrocinado.schema | 232 +++ jsonSchemes/v1_2_4/evtExclusao.schema | 16 + .../v1_2_4/evtExclusaoeFinanceira.schema | 16 + .../v1_2_4/evtFechamentoeFinanceira.schema | 153 ++ jsonSchemes/v1_2_4/evtMovOpFin.schema | 1075 ++++++++++++++ jsonSchemes/v1_2_4/evtMovOpFinAnual.schema | 1009 ++++++++++++++ jsonSchemes/v1_2_4/evtMovPP.schema | 0 jsonSchemes/v1_2_4/evtRERCT.schema | 165 +++ ....xsd => evtAberturaeFinanceira-v1_2_1.xsd} | 1239 +++++++++-------- src/Factories/EvtAberturaeFinanceira.php | 18 +- 18 files changed, 4351 insertions(+), 644 deletions(-) create mode 100755 examples/schemes/v1_2_1/testJsonSchemaEvtAberturaeFinanceira.php create mode 100755 jsonSchemes/v1_2_4/consultarIntermediario.schema create mode 100755 jsonSchemes/v1_2_4/evtAberturaeFinanceira.schema create mode 100755 jsonSchemes/v1_2_4/evtCadDeclarante.schema create mode 100755 jsonSchemes/v1_2_4/evtCadIntermediario.schema create mode 100755 jsonSchemes/v1_2_4/evtCadPatrocinado.schema create mode 100755 jsonSchemes/v1_2_4/evtExclusao.schema create mode 100755 jsonSchemes/v1_2_4/evtExclusaoeFinanceira.schema create mode 100755 jsonSchemes/v1_2_4/evtFechamentoeFinanceira.schema create mode 100755 jsonSchemes/v1_2_4/evtMovOpFin.schema create mode 100755 jsonSchemes/v1_2_4/evtMovOpFinAnual.schema mode change 100644 => 100755 jsonSchemes/v1_2_4/evtMovPP.schema create mode 100755 jsonSchemes/v1_2_4/evtRERCT.schema rename schemes/v1_2_4/{evtAberturaeFinanceira-v1_2_0.xsd => evtAberturaeFinanceira-v1_2_1.xsd} (97%) diff --git a/examples/Fake/v1_2_4/FaketestEnviaCrypto.php b/examples/Fake/v1_2_4/FaketestEnviaCrypto.php index 6a95b28..6ae85e0 100644 --- a/examples/Fake/v1_2_4/FaketestEnviaCrypto.php +++ b/examples/Fake/v1_2_4/FaketestEnviaCrypto.php @@ -80,32 +80,33 @@ $content = file_get_contents('expired_certificate.pfx'); $password = 'associacao'; $certificate = Certificate::readPfx($content, $password); - + //usar a classe Fake para não tentar enviar apenas ver o resultado da chamada $soap = new SoapFake(); - //desativa a validação da validade do certificado + $soap->timeout(60); + //desativa a validação da validade do certificado //estamos usando um certificado vencido nesse teste $soap->disableCertValidation(true); - + $evento = Event::evtAberturaeFinanceira($configJson, $std); - + //instancia a classe responsável pela comunicação $tools = new Tools($configJson, $certificate); - + //carrega o certificado da RECEITA usado na encriptação das mensagens //$preprod = file_get_contents('preprod-efinanc_web.cer'); //$tools->setCertificateEFinanceira($preprod); - + //carrega a classe responsável pelo envio SOAP //nesse caso um envio falso $tools->loadSoapClass($soap); - + //executa o envio $response = $tools->enviar([$evento], $tools::MODO_CRYPTO); - + //retorna os dados que serão usados na conexão para conferência echo FakePretty::prettyPrint($response, ''); - + } catch (\Exception $e) { echo $e->getMessage(); } diff --git a/examples/Fake/v1_2_4/FaketestEvtAberturaeFinanceira.php b/examples/Fake/v1_2_4/FaketestEvtAberturaeFinanceira.php index 9220078..19b5cef 100644 --- a/examples/Fake/v1_2_4/FaketestEvtAberturaeFinanceira.php +++ b/examples/Fake/v1_2_4/FaketestEvtAberturaeFinanceira.php @@ -16,7 +16,7 @@ $std = new \stdClass(); $std->sequencial = '1'; -$std->indretificacao = 1;//1-original 2-retificação +$std->indretificacao = 1;//1-original 2-Retificador 3-Retificador a Pedido //$std->nrrecibo = '123456789012345678-12-123-1234-123456789012345678'; $std->dtinicio = '2017-01-01'; //A data informada deve pertencer ao mesmo semestre da dtFim $std->dtfim = '2017-05-31'; @@ -27,6 +27,7 @@ $std->aberturamovopfin = new \stdClass(); $std->aberturamovopfin->responsavelrmf = new \stdClass(); +//$std->aberturamovopfin->responsavelrmf->cnpj = '12345678901234'; $std->aberturamovopfin->responsavelrmf->cpf = '12345678901'; $std->aberturamovopfin->responsavelrmf->nome = 'lkslsklsklskslksl'; $std->aberturamovopfin->responsavelrmf->setor = 'lkslsklsk'; @@ -72,12 +73,12 @@ $std->aberturamovopfin->represlegal->telefone->ramal = '123'; try { - + //carrega a classe responsavel por lidar com os certificados $content = file_get_contents('expired_certificate.pfx'); $password = 'associacao'; $certificate = Certificate::readPfx($content, $password); - + //cria o evento e retorna o XML assinado $xml = Event::evtAberturaeFinanceira( $configJson, @@ -85,13 +86,13 @@ $certificate, '2017-08-03 10:37:00' )->toXml(); - + //$xml = Event::f1000($json, $std, $certificate)->toXML(); //$json = Event::evtAberturaeFinanceira($configjson, $std, $certificate)->toJson(); - + header('Content-type: text/xml; charset=UTF-8'); echo $xml; - + } catch (\Exception $e) { echo $e->getMessage(); } diff --git a/examples/schemes/v1_2_1/testJsonSchemaEvtAberturaeFinanceira.php b/examples/schemes/v1_2_1/testJsonSchemaEvtAberturaeFinanceira.php new file mode 100755 index 0000000..42997cd --- /dev/null +++ b/examples/schemes/v1_2_1/testJsonSchemaEvtAberturaeFinanceira.php @@ -0,0 +1,403 @@ +sequencial = '1'; +$std->indretificacao = 3; +$std->nrrecibo = '123456789012345678-12-123-1234-123456789012345678'; +$std->dtinicio = '2017-01-01'; //A data informada deve pertencer ao mesmo semestre da dtFim +$std->dtfim = '2017-05-31'; + +$std->aberturapp = new \stdClass(); +$std->aberturapp->tpempresa[0] = new \stdClass(); +$std->aberturapp->tpempresa[0]->tpprevpriv = 'X'; + +$std->aberturamovopfin = new \stdClass(); +$std->aberturamovopfin->responsavelrmf = new \stdClass(); +$std->aberturamovopfin->responsavelrmf->cnpj = '12345678901234'; +$std->aberturamovopfin->responsavelrmf->cpf = '12345678901'; +$std->aberturamovopfin->responsavelrmf->nome = 'lkslsklsklskslksl'; +$std->aberturamovopfin->responsavelrmf->setor = 'lkslsklsk'; +$std->aberturamovopfin->responsavelrmf->telefone = new \stdClass(); +$std->aberturamovopfin->responsavelrmf->telefone->ddd = '11'; +$std->aberturamovopfin->responsavelrmf->telefone->numero = '5555555'; +$std->aberturamovopfin->responsavelrmf->telefone->ramal = '123'; + +$std->aberturamovopfin->responsavelrmf->endereco = new \stdClass(); +$std->aberturamovopfin->responsavelrmf->endereco->logradouro = 'jhskhjskjhsjshjh'; +$std->aberturamovopfin->responsavelrmf->endereco->numero = 'km123'; +$std->aberturamovopfin->responsavelrmf->endereco->complemento = 'lkwlkwlkw'; +$std->aberturamovopfin->responsavelrmf->endereco->bairro = 'jdkjdkjd'; +$std->aberturamovopfin->responsavelrmf->endereco->cep = '12345678'; +$std->aberturamovopfin->responsavelrmf->endereco->municipio = 'lksklsk'; +$std->aberturamovopfin->responsavelrmf->endereco->uf = 'AC'; + +$std->aberturamovopfin->respefin[1] = new \stdClass(); +$std->aberturamovopfin->respefin[1]->cpf = '12345678901'; +$std->aberturamovopfin->respefin[1]->nome = 'lkslsklsklskslksl'; +$std->aberturamovopfin->respefin[1]->setor = 'lkslsklsk'; +$std->aberturamovopfin->respefin[1]->email = 'ksksk@msmsl.com'; +$std->aberturamovopfin->respefin[1]->telefone = new \stdClass(); +$std->aberturamovopfin->respefin[1]->telefone->ddd = '11'; +$std->aberturamovopfin->respefin[1]->telefone->numero = '5555555'; +$std->aberturamovopfin->respefin[1]->telefone->ramal = '123'; + +$std->aberturamovopfin->respefin[1]->endereco = new \stdClass(); +$std->aberturamovopfin->respefin[1]->endereco->logradouro = 'jhskhjskjhsjshjh'; +$std->aberturamovopfin->respefin[1]->endereco->numero = 'km123'; +$std->aberturamovopfin->respefin[1]->endereco->complemento = 'lkwlkwlkw'; +$std->aberturamovopfin->respefin[1]->endereco->bairro = 'jdkjdkjd'; +$std->aberturamovopfin->respefin[1]->endereco->cep = '12345678'; +$std->aberturamovopfin->respefin[1]->endereco->municipio = 'lksklsk'; +$std->aberturamovopfin->respefin[1]->endereco->uf = 'AC'; + + +$std->aberturamovopfin->represlegal = new \stdClass(); +$std->aberturamovopfin->represlegal->cpf = '12345678901'; +$std->aberturamovopfin->represlegal->setor = 'lkslsklsk'; +$std->aberturamovopfin->represlegal->telefone = new \stdClass(); +$std->aberturamovopfin->represlegal->telefone->ddd = '11'; +$std->aberturamovopfin->represlegal->telefone->numero = '5555555'; +$std->aberturamovopfin->represlegal->telefone->ramal = '123'; + +// Schema must be decoded before it can be used for validation +$jsonSchemaObject = json_decode($jsonSchema); +if (empty($jsonSchemaObject)) { + echo "

Erro de digitação no schema ! Revise

"; + echo "
";
+    print_r($jsonSchema);
+    echo "
"; + die(); +} +// The SchemaStorage can resolve references, loading additional schemas from file as needed, etc. +$schemaStorage = new SchemaStorage(); + +// This does two things: +// 1) Mutates $jsonSchemaObject to normalize the references (to file://mySchema#/definitions/integerData, etc) +// 2) Tells $schemaStorage that references to file://mySchema... should be resolved by looking in $jsonSchemaObject +$schemaStorage->addSchema('file://mySchema', $jsonSchemaObject); + +// Provide $schemaStorage to the Validator so that references can be resolved during validation +$jsonValidator = new Validator(new Factory($schemaStorage)); + +// Do validation (use isValid() and getErrors() to check the result) +$jsonValidator->validate( + $std, + $jsonSchemaObject +); + +if ($jsonValidator->isValid()) { + echo "The supplied JSON validates against the schema.
"; +} else { + echo "JSON does not validate. Violations:
"; + foreach ($jsonValidator->getErrors() as $error) { + echo sprintf("[%s] %s
", $error['property'], $error['message']); + } + die; +} +//salva se sucesso +file_put_contents("../../../jsonSchemes/v$version/$evento.schema", $jsonSchema); diff --git a/jsonSchemes/v1_2_1/evtAberturaeFinanceira.schema b/jsonSchemes/v1_2_1/evtAberturaeFinanceira.schema index 7794f0a..3d926d7 100755 --- a/jsonSchemes/v1_2_1/evtAberturaeFinanceira.schema +++ b/jsonSchemes/v1_2_1/evtAberturaeFinanceira.schema @@ -46,8 +46,8 @@ "maxLength": 1 } } - } - } + } + } } }, "aberturamovopfin": { @@ -58,6 +58,11 @@ "required": true, "type": "object", "properties": { + "cnpj": { + "required": true, + "type": "string", + "pattern": "^[0-9]{11}" + }, "cpf": { "required": true, "type": "string", @@ -94,7 +99,7 @@ "type": ["string","null"], "pattern": "^[0-9]{1,4}" } - } + } }, "endereco": { "required": true, @@ -110,7 +115,7 @@ "required": true, "type": "string", "minLength": 1, - "maxLength": 20 + "maxLength": 20 }, "complemento": { "required": false, @@ -142,7 +147,7 @@ "maxLength": 2 } } - } + } } }, "respefin": { @@ -192,7 +197,7 @@ "type": ["string","null"], "pattern": "^[0-9]{1,4}" } - } + } }, "endereco": { "required": true, @@ -208,7 +213,7 @@ "required": true, "type": "string", "minLength": 1, - "maxLength": 20 + "maxLength": 20 }, "complemento": { "required": false, @@ -242,7 +247,7 @@ } } } - } + } }, "represlegal": { "required": true, @@ -278,7 +283,7 @@ "type": ["string","null"], "pattern": "^[0-9]{1,4}" } - } + } } } } diff --git a/jsonSchemes/v1_2_4/consultarIntermediario.schema b/jsonSchemes/v1_2_4/consultarIntermediario.schema new file mode 100755 index 0000000..411951b --- /dev/null +++ b/jsonSchemes/v1_2_4/consultarIntermediario.schema @@ -0,0 +1,28 @@ +{ + "title": "consultarIntermediario", + "type": "object", + "properties": { + "cnpj": { + "required": true, + "type": "string", + "pattern": "^[0-9]{14}" + }, + "ginn": { + "required": false, + "type": ["string","null"], + "maxLength": "19", + "pattern": "^[0-9]" + }, + "tiponi": { + "required": false, + "type": ["integer","null"], + "minimum": 0, + "maximum": 4 + }, + "numeroidentificacao": { + "required": false, + "type": ["string","null"], + "maxLength": "28" + } + } +} \ No newline at end of file diff --git a/jsonSchemes/v1_2_4/evtAberturaeFinanceira.schema b/jsonSchemes/v1_2_4/evtAberturaeFinanceira.schema new file mode 100755 index 0000000..3d926d7 --- /dev/null +++ b/jsonSchemes/v1_2_4/evtAberturaeFinanceira.schema @@ -0,0 +1,293 @@ +{ + "title": "evtAberturaeFinanceira", + "type": "object", + "properties": { + "sequencial": { + "required": true, + "type": "string", + "pattern": "^[0-9]{1,18}" + }, + "indretificacao": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 3 + }, + "nrrecibo": { + "required": false, + "type": ["string","null"], + "pattern": "^([0-9]{1,18}[-][0-9]{2}[-][0-9]{3}[-][0-9]{4}[-][0-9]{1,18})$" + }, + "dtinicio": { + "required": true, + "type": "string", + "pattern": "^(19[0-9][0-9]|2[0-9][0-9][0-9])[-/](0?[1-9]|1[0-2])[-/](0?[1-9]|[12][0-9]|3[01])$" + }, + "dtfim": { + "required": true, + "type": "string", + "pattern": "^(19[0-9][0-9]|2[0-9][0-9][0-9])[-/](0?[1-9]|1[0-2])[-/](0?[1-9]|[12][0-9]|3[01])$" + }, + "aberturapp": { + "required": false, + "type": ["object","null"], + "properties": { + "tpempresa": { + "required": true, + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "tpprevpriv": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 1 + } + } + } + } + } + }, + "aberturamovopfin": { + "required": false, + "type": ["object","null"], + "properties": { + "responsavelrmf": { + "required": true, + "type": "object", + "properties": { + "cnpj": { + "required": true, + "type": "string", + "pattern": "^[0-9]{11}" + }, + "cpf": { + "required": true, + "type": "string", + "pattern": "^[0-9]{11}" + }, + "nome": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 100 + }, + "setor": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 90 + }, + "telefone": { + "required": true, + "type": "object", + "properties": { + "ddd": { + "required": true, + "type": "string", + "pattern": "^[0-9]{2,3}" + }, + "numero": { + "required": true, + "type": "string", + "pattern": "^[0-9]{4,10}" + }, + "ramal": { + "required": false, + "type": ["string","null"], + "pattern": "^[0-9]{1,4}" + } + } + }, + "endereco": { + "required": true, + "type": "object", + "properties": { + "logradouro": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 100 + }, + "numero": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 20 + }, + "complemento": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "bairro": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 100 + }, + "cep": { + "required": true, + "type": "string", + "pattern": "^[0-9]{8}" + }, + "municipio": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 100 + }, + "uf": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + } + } + }, + "respefin": { + "required": true, + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "cpf": { + "required": true, + "type": "string", + "pattern": "^[0-9]{11}" + }, + "nome": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 100 + }, + "setor": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 90 + }, + "email": { + "required": true, + "type": "email" + }, + "telefone": { + "required": true, + "type": "object", + "properties": { + "ddd": { + "required": true, + "type": "string", + "pattern": "^[0-9]{2,3}" + }, + "numero": { + "required": true, + "type": "string", + "pattern": "^[0-9]{4,10}" + }, + "ramal": { + "required": false, + "type": ["string","null"], + "pattern": "^[0-9]{1,4}" + } + } + }, + "endereco": { + "required": true, + "type": "object", + "properties": { + "logradouro": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 100 + }, + "numero": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 20 + }, + "complemento": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "bairro": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 100 + }, + "cep": { + "required": true, + "type": "string", + "pattern": "^[0-9]{8}" + }, + "municipio": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 100 + }, + "uf": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + } + } + } + }, + "represlegal": { + "required": true, + "type": "object", + "properties": { + "cpf": { + "required": true, + "type": "string", + "pattern": "^[0-9]{11}" + }, + "setor": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 90 + }, + "telefone": { + "required": true, + "type": "object", + "properties": { + "ddd": { + "required": true, + "type": "string", + "pattern": "^[0-9]{2,3}" + }, + "numero": { + "required": true, + "type": "string", + "pattern": "^[0-9]{4,10}" + }, + "ramal": { + "required": false, + "type": ["string","null"], + "pattern": "^[0-9]{1,4}" + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/jsonSchemes/v1_2_4/evtCadDeclarante.schema b/jsonSchemes/v1_2_4/evtCadDeclarante.schema new file mode 100755 index 0000000..6312772 --- /dev/null +++ b/jsonSchemes/v1_2_4/evtCadDeclarante.schema @@ -0,0 +1,218 @@ +{ + "title": "evtCadDeclarante", + "type": "object", + "properties": { + "sequencial": { + "required": true, + "type": "string", + "pattern": "^[0-9]{1,18}" + }, + "indretificacao": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 3 + }, + "nrrecibo": { + "required": false, + "type": ["string","null"], + "pattern": "^([0-9]{1,18}[-][0-9]{2}[-][0-9]{3}[-][0-9]{4}[-][0-9]{1,18})$" + }, + "infocadastro": { + "required": true, + "type": "object", + "properties": { + "giin": { + "required": false, + "type": ["string","null"], + "pattern": "^([0-9A-NP-Z]{6}[.][0-9A-NP-Z]{5}[.](LE|SL|ME|BR|SF|SD|SS|SB|SP)[.][0-9]{3})$" + }, + "categoriadeclarante": { + "required": false, + "type": ["string","null"], + "pattern": "FATCA601|FATCA602|FATCA603|FATCA604|FATCA605|FATCA606|FATCA610|FATCA611" + }, + "nome": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 100 + }, + "tpnome": { + "required": false, + "type": ["string","null"], + "pattern": "OECD202|OECD203|OECD204|OECD205|OECD206|OECD207|OECD208" + }, + "enderecolivre": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 200 + }, + "tpendereco": { + "required": false, + "type": ["string","null"], + "pattern": "OECD301|OECD302|OECD303|OECD304|OECD305" + }, + "municipio": { + "required": true, + "type": "string", + "pattern": "^[0-9]{7}" + }, + "uf": { + "required": true, + "type": "string", + "pattern": "^[A-Z]{2}" + }, + "cep": { + "required": true, + "type": "string", + "pattern": "^[0-9]{8}" + }, + "pais": { + "required": true, + "type": "string", + "pattern": "^[A-Z]{2}" + }, + "nif": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "numeronif": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 25 + }, + "paisemissao": { + "required": true, + "type": "string", + "pattern": "^[A-Z]{2}" + }, + "tpnif": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 30 + } + } + } + }, + "paisresid": { + "required": true, + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "pais": { + "required": true, + "type": "string", + "pattern": "^[A-Z]{2}" + } + } + } + }, + "enderecooutros": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "tpendereco": { + "required": false, + "type": ["string","null"], + "pattern": "OECD301|OECD302|OECD303|OECD304|OECD305" + }, + "enderecolivre": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 200 + }, + "pais": { + "required": true, + "type": "string", + "pattern": "^[A-Z]{2}" + }, + "enderecoestrutura": { + "required": false, + "type": ["object","null"], + "properties": { + "enderecolivre": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 200 + }, + "cep": { + "required": true, + "type": "string", + "pattern": "^[0-9]{8}" + }, + "municipio": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 60 + }, + "uf": { + "required": true, + "type": "string", + "pattern": "^[A-Z]{2}" + }, + "endereco": { + "required": false, + "type": ["object","null"], + "properties": { + "logradouro": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 60 + }, + "numero": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 10 + }, + "complemento": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 10 + }, + "andar": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 10 + }, + "bairro": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 40 + }, + "caixapostal": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 12 + } + } + } + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/jsonSchemes/v1_2_4/evtCadIntermediario.schema b/jsonSchemes/v1_2_4/evtCadIntermediario.schema new file mode 100755 index 0000000..19f8c20 --- /dev/null +++ b/jsonSchemes/v1_2_4/evtCadIntermediario.schema @@ -0,0 +1,75 @@ +{ + "title": "evtCadIntermediario", + "type": "object", + "properties": { + "sequencial": { + "required": true, + "type": "string", + "pattern": "^[0-9]{1,18}" + }, + "indretificacao": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 3 + }, + "nrrecibo": { + "required": false, + "type": ["string","null"], + "pattern": "^([0-9]{1,18}[-][0-9]{2}[-][0-9]{3}[-][0-9]{4}[-][0-9]{1,18})$" + }, + "giin": { + "required": false, + "type": ["string","null"], + "pattern": "^([0-9A-NP-Z]{6}[.][0-9A-NP-Z]{5}[.](LE|SL|ME|BR|SF|SD|SS|SB|SP)[.][0-9]{3})$" + }, + "tpni": { + "required": false, + "type": ["integer","null"], + "minimum": 1, + "maximum": 5 + }, + "niintermediario": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 25 + }, + "nomeintermediario": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 100 + }, + "paisresidencia": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "endereco": { + "required": true, + "type": "object", + "properties": { + "enderecolivre": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 200 + }, + "municipio": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 100 + }, + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + } + } +} \ No newline at end of file diff --git a/jsonSchemes/v1_2_4/evtCadPatrocinado.schema b/jsonSchemes/v1_2_4/evtCadPatrocinado.schema new file mode 100755 index 0000000..d75c340 --- /dev/null +++ b/jsonSchemes/v1_2_4/evtCadPatrocinado.schema @@ -0,0 +1,232 @@ +{ + "title": "evtCadPatrocinado", + "type": "object", + "properties": { + "sequencial": { + "required": true, + "type": "string", + "pattern": "^[0-9]{1,18}" + }, + "indretificacao": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 3 + }, + "nrrecibo": { + "required": false, + "type": ["string","null"], + "pattern": "^([0-9]{1,18}[-][0-9]{2}[-][0-9]{3}[-][0-9]{4}[-][0-9]{1,18})$" + }, + "giin": { + "required": false, + "type": ["string","null"], + "pattern": "^([0-9A-NP-Z]{6}[.][0-9A-NP-Z]{5}[.](LE|SL|ME|BR|SF|SD|SS|SB|SP)[.][0-9]{3})$" + }, + "categoriapatrocinador": { + "required": false, + "type": ["string","null"], + "pattern": "FATCA601|FATCA602|FATCA603|FATCA604|FATCA605|FATCA606|FATCA610|FATCA611" + }, + "infopatrocinado": { + "required": true, + "type": "object", + "properties": { + "giin": { + "required": false, + "type": ["string","null"], + "pattern": "^([0-9A-NP-Z]{6}[.][0-9A-NP-Z]{5}[.](LE|SL|ME|BR|SF|SD|SS|SB|SP)[.][0-9]{3})$" + }, + "cnpj": { + "required": true, + "type": "string", + "pattern": "^[0-9]{14}" + }, + "nomepatrocinado": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 100 + }, + "tpnome": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "tpendereco": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "nif": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "numeronif": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 25 + }, + "paisemissao": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "tpnif": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 30 + } + } + } + }, + "endereco": { + "required": true, + "type": "object", + "properties": { + "enderecolivre": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 200 + }, + "cep": { + "required": true, + "type": "string", + "pattern": "^[0-9]{8}" + }, + "municipio": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 100 + }, + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + }, + "enderecooutros": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "tpendereco": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "enderecolivre": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 200 + }, + "enderecoestrutura": { + "required": false, + "type": ["object","null"], + "properties": { + "enderecolivre": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 200 + }, + "cep": { + "required": true, + "type": "string", + "pattern": "^[0-9]{8}" + }, + "municipio": { + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 60 + }, + "uf": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 40 + }, + "endereco": { + "required": false, + "type": ["object","null"], + "properties": { + "logradouro": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 60 + }, + "numero": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "complemento": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "andar": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "bairro": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 40 + }, + "caixapostal": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 12 + } + } + } + } + } + } + } + }, + "paisresid": { + "required": true, + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/jsonSchemes/v1_2_4/evtExclusao.schema b/jsonSchemes/v1_2_4/evtExclusao.schema new file mode 100755 index 0000000..901756e --- /dev/null +++ b/jsonSchemes/v1_2_4/evtExclusao.schema @@ -0,0 +1,16 @@ +{ + "title": "evtExclusao", + "type": "object", + "properties": { + "sequencial": { + "required": true, + "type": "string", + "pattern": "^[0-9]{1,18}" + }, + "nrreciboevento": { + "required": true, + "type": "string", + "pattern": "^([0-9]{1,18}[-][0-9]{2}[-][0-9]{3}[-][0-9]{4}[-][0-9]{1,18})$" + } + } +} \ No newline at end of file diff --git a/jsonSchemes/v1_2_4/evtExclusaoeFinanceira.schema b/jsonSchemes/v1_2_4/evtExclusaoeFinanceira.schema new file mode 100755 index 0000000..319f651 --- /dev/null +++ b/jsonSchemes/v1_2_4/evtExclusaoeFinanceira.schema @@ -0,0 +1,16 @@ +{ + "title": "evtExclusaoeFinanceira", + "type": "object", + "properties": { + "sequencial": { + "required": true, + "type": "string", + "pattern": "^[0-9]{1,18}" + }, + "nrreciboevento": { + "required": true, + "type": "string", + "pattern": "^([0-9]{1,18}[-][0-9]{2}[-][0-9]{3}[-][0-9]{4}[-][0-9]{1,18})$" + } + } +} \ No newline at end of file diff --git a/jsonSchemes/v1_2_4/evtFechamentoeFinanceira.schema b/jsonSchemes/v1_2_4/evtFechamentoeFinanceira.schema new file mode 100755 index 0000000..315556d --- /dev/null +++ b/jsonSchemes/v1_2_4/evtFechamentoeFinanceira.schema @@ -0,0 +1,153 @@ +{ + "title": "evtFechamentoeFinanceira", + "type": "object", + "properties": { + "sequencial": { + "required": true, + "type": "string", + "pattern": "^[0-9]{1,18}" + }, + "indretificacao": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 3 + }, + "nrrecibo": { + "required": false, + "type": ["string","null"], + "pattern": "^([0-9]{1,18}[-][0-9]{2}[-][0-9]{3}[-][0-9]{4}[-][0-9]{1,18})$" + }, + "dtinicio": { + "required": true, + "type": "string", + "pattern": "^(19[0-9][0-9]|2[0-9][0-9][0-9])[-/](0?[1-9]|1[0-2])[-/](0?[1-9]|[12][0-9]|3[01])$" + }, + "dtfim": { + "required": true, + "type": "string", + "pattern": "^(19[0-9][0-9]|2[0-9][0-9][0-9])[-/](0?[1-9]|1[0-2])[-/](0?[1-9]|[12][0-9]|3[01])$" + }, + "sitespecial": { + "required": true, + "type": "integer", + "minimum": 0, + "maximum": 5 + }, + "fechamentopp": { + "required": false, + "type": ["object","null"], + "properties": { + "fechamentomes": { + "required": true, + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "anomescaixa": { + "required": true, + "type": "string", + "pattern": "^(19[0-9][0-9]|2[0-9][0-9][0-9])(0?[1-9]|1[0-3])$" + }, + "quantarqtrans": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 999999999 + } + } + } + } + } + }, + "fechamentomovopfin": { + "required": false, + "type": ["object","null"], + "properties": { + "fechamentomes": { + "required": true, + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "anomescaixa": { + "required": true, + "type": "string", + "pattern": "^(19[0-9][0-9]|2[0-9][0-9][0-9])(0?[1-9]|1[0-3])$" + }, + "quantarqtrans": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 999999999 + } + } + } + }, + "entdecexterior": { + "required": false, + "type": ["object","null"], + "properties": { + "contasareportar": { + "required": true, + "type": "integer", + "minimum": 0, + "maximum": 1 + } + } + }, + "entpatdecexterior": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "giin": { + "required": true, + "type": "string", + "pattern": "^([0-9A-NP-Z]{6}[.][0-9A-NP-Z]{5}[.](LE|SL|ME|BR|SF|SD|SS|SB|SP)[.][0-9]{3})$" + }, + "cnpj": { + "required": true, + "type": "string", + "pattern": "^[0-9]{14}" + }, + "contasareportar": { + "required": true, + "type": "integer", + "minimum": 0, + "maximum": 1 + } + } + } + } + } + }, + "fechamentomovopfinanual": { + "required": false, + "type": ["object","null"], + "properties": { + "fechamentoano": { + "required": true, + "type": "object", + "properties": { + "anocaixa": { + "required": true, + "type": "string", + "pattern": "^20([0-9][0-9])" + }, + "quantarqtrans": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 999999999 + } + } + } + } + } + } +} \ No newline at end of file diff --git a/jsonSchemes/v1_2_4/evtMovOpFin.schema b/jsonSchemes/v1_2_4/evtMovOpFin.schema new file mode 100755 index 0000000..655ba25 --- /dev/null +++ b/jsonSchemes/v1_2_4/evtMovOpFin.schema @@ -0,0 +1,1075 @@ +{ + "title": "evtMovOpFin", + "type": "object", + "properties": { + "sequencial": { + "required": true, + "type": "string", + "pattern": "^[0-9]{1,18}" + }, + "indretificacao": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 3 + }, + "nrrecibo": { + "required": false, + "type": ["string","null"], + "pattern": "^([0-9]{1,18}[-][0-9]{2}[-][0-9]{3}[-][0-9]{4}[-][0-9]{1,18})$" + }, + "tpni": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 99 + }, + "tpdeclarado": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 8 + }, + "nideclarado": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 25 + }, + "nomedeclarado": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "tpnomedeclarado": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "enderecolivre": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 200 + }, + "tpendereco": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "pais": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 2 + }, + "datanasc": { + "required": false, + "type": ["string","null"], + "pattern": "^(19[0-9][0-9]|2[0-9][0-9][0-9])[-/](0?[1-9]|1[0-2])[-/](0?[1-9]|[12][0-9]|3[01])$" + }, + "nif": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "numeronif": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 25 + }, + "paisemissaonif": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "tpnif": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 30 + } + } + } + }, + "nomeoutros": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "nomepf": { + "required": false, + "type": ["object","null"], + "properties": { + "tpnome": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "prectitulo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "titulo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "idgeracao": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "sufixo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "gensufixo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "primeironome": { + "required": true, + "type": "object", + "properties": { + "tipo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 20 + } + } + }, + "meionome": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "tipo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 20 + } + } + } + }, + "prefixonome": { + "required": false, + "type": ["object","null"], + "properties": { + "tipo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 10 + } + } + }, + "ultimonome": { + "required": true, + "type": "object", + "properties": { + "tipo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 20 + } + } + } + } + }, + "nomepj": { + "required": false, + "type": ["object","null"], + "properties": { + "tipo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 100 + } + } + }, + "infonascimento": { + "required": false, + "type": ["object","null"], + "properties": { + "municipio": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 60 + }, + "bairro": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 40 + }, + "pais": { + "required": false, + "type": ["string","null"], + "minLength": 2, + "maxLength": 2 + }, + "antigonomepais": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 40 + } + } + } + } + } + }, + "enderecooutros": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "tpendereco": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "enderecolivre": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 200 + }, + "enderecoestrutura": { + "required": false, + "type": ["object","null"], + "properties": { + "enderecolivre": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 200 + }, + "cep": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 12 + }, + "municipio": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 60 + }, + "uf": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 40 + }, + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "endereco": { + "required": false, + "type": ["object","null"], + "properties": { + "logradouro": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 60 + }, + "numero": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "complemento": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "andar": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "bairro": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 40 + }, + "caixapostal": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 12 + } + } + } + } + } + } + } + }, + "paisresid": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + } + }, + "paisnacionalidade": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + } + }, + "proprietarios": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "tpni": { + "required": true, + "type": "integer", + "minLength": 1, + "maxLength": 5 + }, + "niproprietario": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 25 + }, + "tpproprietario": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 8 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "tpnome": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "enderecolivre": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "tpendereco": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "datanasc": { + "required": false, + "type": ["string","null"], + "pattern": "^(19[0-9][0-9]|2[0-9][0-9][0-9])[-/](0?[1-9]|1[0-2])[-/](0?[1-9]|[12][0-9]|3[01])$" + }, + "nif": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "numeronif": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 25 + }, + "paisemissaonif": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + } + }, + "nomeoutros": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "nomepf": { + "required": false, + "type": ["object","null"], + "properties": { + "tpnome": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "prectitulo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "titulo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "idgeracao": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "sufixo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "gensufixo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "primeironome": { + "required": true, + "type": "object", + "properties": { + "tipo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 20 + } + } + }, + "meionome": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "tipo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 20 + } + } + } + }, + "prefixonome": { + "required": false, + "type": ["object","null"], + "properties": { + "tipo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 10 + } + } + }, + "ultimonome": { + "required": true, + "type": "object", + "properties": { + "tipo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 20 + } + } + } + } + } + } + } + }, + "enderecooutros": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "tpendereco": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "enderecolivre": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 200 + }, + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "enderecoestrutura": { + "required": false, + "type": ["object","null"], + "properties": { + "enderecolivre": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 200 + }, + "cep": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 12 + }, + "municipio": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 60 + }, + "uf": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 40 + }, + "endereco": { + "required": false, + "type": ["object","null"], + "properties": { + "logradouro": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 60 + }, + "numero": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "complemento": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "andar": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "bairro": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 40 + }, + "caixapostal": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 12 + } + } + } + } + } + } + } + }, + "paisresid": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + } + }, + "paisnacionalidade": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + } + }, + "infonascimento": { + "required": false, + "type": ["object","null"], + "properties": { + "municipio": { + "required": false, + "type": ["string","null"], + "minLength": 2, + "maxLength": 60 + }, + "bairro": { + "required": false, + "type": ["string","null"], + "minLength": 2, + "maxLength": 40 + }, + "pais": { + "required": false, + "type": ["string","null"], + "minLength": 2, + "maxLength": 2 + }, + "antigonomepais": { + "required": false, + "type": ["string","null"], + "minLength": 2, + "maxLength": 40 + } + } + }, + "reportavel": { + "required": true, + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + } + } + } + } + }, + "anomescaixa": { + "required": true, + "type": "string", + "pattern": "^[0-9]{6}" + }, + "conta": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "medjudic": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "numprocjud": { + "required": true, + "type": "string", + "pattern": "^[0-9]{1,21}" + }, + "vara": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 99 + }, + "secjud": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 99 + }, + "subsecjud": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 40 + }, + "dtconcessao": { + "required": true, + "type": "string", + "pattern": "^(19[0-9][0-9]|2[0-9][0-9][0-9])[-/](0?[1-9]|1[0-2])[-/](0?[1-9]|[12][0-9]|3[01])$" + }, + "dtcassacao": { + "required": false, + "type": ["string","null"], + "pattern": "^(19[0-9][0-9]|2[0-9][0-9][0-9])[-/](0?[1-9]|1[0-2])[-/](0?[1-9]|[12][0-9]|3[01])$" + } + } + } + }, + "infoconta": { + "required": false, + "type": ["object","null"], + "properties": { + "tpconta": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 1 + }, + "subtpconta": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 3 + }, + "tpnumconta": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 10 + }, + "numconta": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "tprelacaodeclarado": { + "required": true, + "type": "integer", + "minLength": 1, + "maxLength": 5 + }, + "notitulares": { + "required": false, + "type": ["integer","null"], + "minimum": 1, + "maximum": 99 + }, + "dtencerramentoconta": { + "required": false, + "type": ["string","null"], + "pattern": "^(19[0-9][0-9]|2[0-9][0-9][0-9])[-/](0?[1-9]|1[0-2])[-/](0?[1-9]|[12][0-9]|3[01])$" + }, + "indinatividade": { + "required": false, + "type": ["integer","null"], + "minimum": 1, + "maximum": 1 + }, + "indndoc": { + "required": false, + "type": ["integer","null"], + "minimum": 1, + "maximum": 1 + }, + "totcreditos": { + "required": true, + "type": "number" + }, + "totdebitos": { + "required": true, + "type": "number" + }, + "totcreditosmesmatitularidade": { + "required": true, + "type": "number" + }, + "totdebitosmesmatitularidade": { + "required": true, + "type": "number" + }, + "vlrultdia": { + "required": false, + "type": ["number","null"] + }, + "reportavel": { + "required": true, + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + } + }, + "intermediario": { + "required": false, + "type": ["object","null"], + "properties": { + "giin": { + "required": false, + "type": ["string","null"], + "pattern": "^([0-9A-NP-Z]{6}[.][0-9A-NP-Z]{5}[.](LE|SL|ME|BR|SF|SD|SS|SB|SP)[.][0-9]{3})$" + }, + "tpni": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 5 + }, + "niintermediario": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 25 + } + } + }, + "fundo": { + "required": false, + "type": ["object","null"], + "properties": { + "giin": { + "required": false, + "type": ["string","null"], + "pattern": "^([0-9A-NP-Z]{6}[.][0-9A-NP-Z]{5}[.](LE|SL|ME|BR|SF|SD|SS|SB|SP)[.][0-9]{3})$" + }, + "cnpj": { + "required": true, + "type": "string", + "pattern": "^[0-9]{14}" + } + } + }, + "pgtosacum": { + "required": true, + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "tppgto": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 10 + }, + "totpgtosacum": { + "required": true, + "type": "number" + } + } + } + } + } + } + } + } + }, + "cambio": { + "required": false, + "type": ["object","null"], + "properties": { + "totcompras": { + "required": true, + "type": "number" + }, + "totvendas": { + "required": true, + "type": "number" + }, + "tottransferencias": { + "required": true, + "type": "number" + }, + "medjudic": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "numprocjud": { + "required": true, + "type": "string", + "pattern": "^[0-9]{1,21}" + }, + "vara": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 99 + }, + "secjud": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 99 + }, + "subsecjud": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 40 + }, + "dtconcessao": { + "required": true, + "type": "string", + "pattern": "^(19[0-9][0-9]|2[0-9][0-9][0-9])[-/](0?[1-9]|1[0-2])[-/](0?[1-9]|[12][0-9]|3[01])$" + }, + "dtcassacao": { + "required": false, + "type": ["string","null"], + "pattern": "^(19[0-9][0-9]|2[0-9][0-9][0-9])[-/](0?[1-9]|1[0-2])[-/](0?[1-9]|[12][0-9]|3[01])$" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/jsonSchemes/v1_2_4/evtMovOpFinAnual.schema b/jsonSchemes/v1_2_4/evtMovOpFinAnual.schema new file mode 100755 index 0000000..8ed736e --- /dev/null +++ b/jsonSchemes/v1_2_4/evtMovOpFinAnual.schema @@ -0,0 +1,1009 @@ +{ + "title": "evtMovOpFinAnual", + "type": "object", + "properties": { + "sequencial": { + "required": true, + "type": "string", + "pattern": "^[0-9]{1,18}" + }, + "indretificacao": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 3 + }, + "nrrecibo": { + "required": false, + "type": ["string","null"], + "pattern": "^([0-9]{1,18}[-][0-9]{2}[-][0-9]{3}[-][0-9]{4}[-][0-9]{1,18})$" + }, + "anocaixa": { + "required": true, + "type": "string", + "pattern": "^20([0-9][0-9])" + }, + "semestre": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 2 + }, + "tpni": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 99 + }, + "tpdeclarado": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 8 + }, + "nideclarado": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 25 + }, + "nomedeclarado": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "tpnomedeclarado": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "enderecolivre": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 200 + }, + "tpendereco": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "pais": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 2 + }, + "datanasc": { + "required": false, + "type": ["string","null"], + "pattern": "^(19[0-9][0-9]|2[0-9][0-9][0-9])[-/](0?[1-9]|1[0-2])[-/](0?[1-9]|[12][0-9]|3[01])$" + }, + "nif": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "numeronif": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 25 + }, + "paisemissaonif": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "tpnif": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 30 + } + } + } + }, + "nomeoutros": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "nomepf": { + "required": false, + "type": ["object","null"], + "properties": { + "tpnome": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "prectitulo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "titulo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "idgeracao": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "sufixo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "gensufixo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "primeironome": { + "required": true, + "type": "object", + "properties": { + "tipo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 20 + } + } + }, + "meionome": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "tipo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 20 + } + } + } + }, + "prefixonome": { + "required": false, + "type": ["object","null"], + "properties": { + "tipo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 10 + } + } + }, + "ultimonome": { + "required": true, + "type": "object", + "properties": { + "tipo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 20 + } + } + } + } + }, + "nomepj": { + "required": false, + "type": ["object","null"], + "properties": { + "tipo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 100 + } + } + }, + "infonascimento": { + "required": false, + "type": ["object","null"], + "properties": { + "municipio": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 60 + }, + "bairro": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 40 + }, + "pais": { + "required": false, + "type": ["string","null"], + "minLength": 2, + "maxLength": 2 + }, + "antigonomepais": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 40 + } + } + } + } + } + }, + "enderecooutros": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "tpendereco": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "enderecolivre": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 200 + }, + "enderecoestrutura": { + "required": false, + "type": ["object","null"], + "properties": { + "enderecolivre": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 200 + }, + "cep": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 12 + }, + "municipio": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 60 + }, + "uf": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 40 + }, + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "endereco": { + "required": false, + "type": ["object","null"], + "properties": { + "logradouro": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 60 + }, + "numero": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "complemento": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "andar": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "bairro": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 40 + }, + "caixapostal": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 12 + } + } + } + } + } + } + } + }, + "paisresid": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + } + }, + "paisnacionalidade": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + } + }, + "proprietarios": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "tpni": { + "required": true, + "type": "integer", + "minLength": 1, + "maxLength": 5 + }, + "niproprietario": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 25 + }, + "tpproprietario": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 8 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 100 + }, + "tpnome": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "enderecolivre": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "tpendereco": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "datanasc": { + "required": false, + "type": ["string","null"], + "pattern": "^(19[0-9][0-9]|2[0-9][0-9][0-9])[-/](0?[1-9]|1[0-2])[-/](0?[1-9]|[12][0-9]|3[01])$" + }, + "nif": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "numeronif": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 25 + }, + "paisemissaonif": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + } + }, + "nomeoutros": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "nomepf": { + "required": false, + "type": ["object","null"], + "properties": { + "tpnome": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "prectitulo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "titulo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "idgeracao": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "sufixo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "gensufixo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "primeironome": { + "required": true, + "type": "object", + "properties": { + "tipo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 20 + } + } + }, + "meionome": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "tipo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 20 + } + } + } + }, + "prefixonome": { + "required": false, + "type": ["object","null"], + "properties": { + "tipo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 10 + } + } + }, + "ultimonome": { + "required": true, + "type": "object", + "properties": { + "tipo": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 20 + }, + "nome": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 20 + } + } + } + } + } + } + } + }, + "enderecooutros": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "tpendereco": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 7 + }, + "enderecolivre": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 200 + }, + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "enderecoestrutura": { + "required": false, + "type": ["object","null"], + "properties": { + "enderecolivre": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 200 + }, + "cep": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 12 + }, + "municipio": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 60 + }, + "uf": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 40 + }, + "endereco": { + "required": false, + "type": ["object","null"], + "properties": { + "logradouro": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 60 + }, + "numero": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "complemento": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "andar": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 10 + }, + "bairro": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 40 + }, + "caixapostal": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 12 + } + } + } + } + } + } + } + }, + "paisresid": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + } + }, + "paisnacionalidade": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + } + }, + "infonascimento": { + "required": false, + "type": ["object","null"], + "properties": { + "municipio": { + "required": false, + "type": ["string","null"], + "minLength": 2, + "maxLength": 60 + }, + "bairro": { + "required": false, + "type": ["string","null"], + "minLength": 2, + "maxLength": 40 + }, + "pais": { + "required": false, + "type": ["string","null"], + "minLength": 2, + "maxLength": 2 + }, + "antigonomepais": { + "required": false, + "type": ["string","null"], + "minLength": 2, + "maxLength": 40 + } + } + }, + "reportavel": { + "required": true, + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + } + } + } + } + }, + "anomescaixa": { + "required": true, + "type": "string", + "pattern": "^[0-9]{6}" + }, + "conta": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "medjudic": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "numprocjud": { + "required": true, + "type": "string", + "pattern": "^[0-9]{1,21}" + }, + "vara": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 99 + }, + "secjud": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 99 + }, + "subsecjud": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 40 + }, + "dtconcessao": { + "required": true, + "type": "string", + "pattern": "^(19[0-9][0-9]|2[0-9][0-9][0-9])[-/](0?[1-9]|1[0-2])[-/](0?[1-9]|[12][0-9]|3[01])$" + }, + "dtcassacao": { + "required": false, + "type": ["string","null"], + "pattern": "^(19[0-9][0-9]|2[0-9][0-9][0-9])[-/](0?[1-9]|1[0-2])[-/](0?[1-9]|[12][0-9]|3[01])$" + } + } + } + }, + "infoconta": { + "required": false, + "type": ["object","null"], + "properties": { + "tpconta": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 1 + }, + "subtpconta": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 3 + }, + "tpnumconta": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 10 + }, + "numconta": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "tprelacaodeclarado": { + "required": true, + "type": "integer", + "minLength": 1, + "maxLength": 5 + }, + "notitulares": { + "required": false, + "type": ["integer","null"], + "minimum": 1, + "maximum": 99 + }, + "dtencerramentoconta": { + "required": false, + "type": ["string","null"], + "pattern": "^(19[0-9][0-9]|2[0-9][0-9][0-9])[-/](0?[1-9]|1[0-2])[-/](0?[1-9]|[12][0-9]|3[01])$" + }, + "indinatividade": { + "required": false, + "type": ["integer","null"], + "minimum": 1, + "maximum": 1 + }, + "indndoc": { + "required": false, + "type": ["integer","null"], + "minimum": 1, + "maximum": 1 + }, + "vlrultdia": { + "required": false, + "type": ["number","null"] + }, + "reportavel": { + "required": true, + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "pais": { + "required": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + } + }, + "intermediario": { + "required": false, + "type": ["object","null"], + "properties": { + "giin": { + "required": false, + "type": ["string","null"], + "pattern": "^([0-9A-NP-Z]{6}[.][0-9A-NP-Z]{5}[.](LE|SL|ME|BR|SF|SD|SS|SB|SP)[.][0-9]{3})$" + }, + "tpni": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 5 + }, + "niintermediario": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 25 + } + } + }, + "fundo": { + "required": false, + "type": ["object","null"], + "properties": { + "giin": { + "required": false, + "type": ["string","null"], + "pattern": "^([0-9A-NP-Z]{6}[.][0-9A-NP-Z]{5}[.](LE|SL|ME|BR|SF|SD|SS|SB|SP)[.][0-9]{3})$" + }, + "cnpj": { + "required": true, + "type": "string", + "pattern": "^[0-9]{14}" + } + } + }, + "pgtosacum": { + "required": true, + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "tppgto": { + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 10 + }, + "totpgtosacum": { + "required": true, + "type": "number" + } + } + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/jsonSchemes/v1_2_4/evtMovPP.schema b/jsonSchemes/v1_2_4/evtMovPP.schema old mode 100644 new mode 100755 diff --git a/jsonSchemes/v1_2_4/evtRERCT.schema b/jsonSchemes/v1_2_4/evtRERCT.schema new file mode 100755 index 0000000..a86ede4 --- /dev/null +++ b/jsonSchemes/v1_2_4/evtRERCT.schema @@ -0,0 +1,165 @@ +{ + "title": "evtRERCT", + "type": "object", + "properties": { + "sequencial": { + "required": true, + "type": "string", + "pattern": "^[0-9]{1,18}" + }, + "indretificacao": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 3 + }, + "nrrecibo": { + "required": false, + "type": ["string","null"], + "pattern": "^([0-9]{1,18}[-][0-9]{2}[-][0-9]{3}[-][0-9]{4}[-][0-9]{1,18})$" + }, + "ideeventorerct": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 2 + }, + "idedeclarado": { + "required": true, + "type": "object", + "properties": { + "tpinscr": { + "required": true, + "type": "integer", + "minimum": 1, + "maximum": 2 + }, + "nrinscr": { + "required": true, + "type": "string", + "pattern": "[0-9]{11,14}" + } + } + }, + "rerct": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "nomebancoorigem": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 100 + }, + "paisorigem": { + "required": false, + "type": ["string","null"], + "minLength": 2, + "maxLength": 2 + }, + "bicbancoorigem": { + "required": false, + "type": ["string","null"], + "minLength": 11, + "maxLength": 11 + }, + "infocontaexterior": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "tpcontaexterior": { + "required": false, + "type": ["integer","null"], + "minimum": 1, + "maximum": 3 + }, + "numcontaexterior": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 50 + }, + "vlrultdia": { + "required": false, + "type": ["number","null"] + }, + "moeda": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 3 + }, + "titular": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "nometitular": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 100 + }, + "tpinscr": { + "required": false, + "type": ["integer","null"], + "minimum": 1, + "maximum": 2 + }, + "nrinscr": { + "required": false, + "type": ["string","null"], + "pattern": "[0-9]{11,14}" + }, + "niftitular": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 25 + } + } + } + }, + "beneficiariofinal": { + "required": false, + "type": ["array","null"], + "minItems": 0, + "items": { + "type": "object", + "properties": { + "nomebeneficiariofinal": { + "required": false, + "type": ["string","null"], + "minLength": 3, + "maxLength": 100 + }, + "cpfbeneficiariofinal": { + "required": false, + "type": ["string","null"], + "pattern": "[0-9]{11}" + }, + "nifbeneficiariofinal": { + "required": false, + "type": ["string","null"], + "minLength": 1, + "maxLength": 25 + } + } + } + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/schemes/v1_2_4/evtAberturaeFinanceira-v1_2_0.xsd b/schemes/v1_2_4/evtAberturaeFinanceira-v1_2_1.xsd similarity index 97% rename from schemes/v1_2_4/evtAberturaeFinanceira-v1_2_0.xsd rename to schemes/v1_2_4/evtAberturaeFinanceira-v1_2_1.xsd index b01a662..50cdc27 100644 --- a/schemes/v1_2_4/evtAberturaeFinanceira-v1_2_0.xsd +++ b/schemes/v1_2_4/evtAberturaeFinanceira-v1_2_1.xsd @@ -1,614 +1,625 @@ - - - - - - - - - Evento de Abertura da eFinanceira - - - - - - Identificação de Evento - - - - - - - - Indicativo de Retificação: - 1 - Original - 2 - Retificador - 3 - Retificador a Pedido - - - - - - - - - - - Número do recibo do arquivo a ser retificado. - - - - - - - - - - - - - Identificação do ambiente: - 1 - Produção - 2 - Homologação - - - - - - - - - - - - Processo de emissão do evento: - 1- Emissão com aplicativo da empresa - - - - - - - - - - - Versão do aplicativo de emissão do evento - - - - - - - - - - - - - - Informações de identificação da Entidade Declarante - - - - - CNPJ da Entidade Declarante - - - - - - - - - - - - - - - Informações de Abertura - - - - - Data Inicial - - - - - - - - - Data Final - - - - - - - - - - - - - Informações da Abertura referentes a Previdência Privada - - - - - - Tipo de Empresa de Previdência Privada - - - - - Tipo de Empresa de Previdência Privada - - - - - - - - - - - - - - - - - - Informações da Abertura referentes a Operações Financeiras - - - - - - Informações do Responsável pela RMF - - - - - CPF - - - - - - - - - - - Nome - - - - - - - - - - - Setor - - - - - - - - - - - - Telefone do responsável pela RMF - - - - - DDD do Telefone - - - - - - - - - - - Número do Telefone - - - - - - - - - - - Ramal - - - - - - - - - - - - - - - Endereço do responsável pela RMF - - - - - Logradouro - - - - - - - - - - - Número - - - - - - - - - - - Complemento - - - - - - - - - - - Bairro - - - - - - - - - - - Código de Endereçamento Postal do endereço - - - - - - - - - - - Município - - - - - - - - - - - Unidade da Federação - - - - - - - - - - - - - - - - - - Informações do(s) Responsável(is) pela e-Financeira - - - - - CPF - - - - - - - - - - - Nome - - - - - - - - - - - Setor - - - - - - - - - - - - Telefone do Responsável pela eFinanceira - - - - - DDD do Telefone - - - - - - - - - - - Número do Telefone - - - - - - - - - - - Ramal - - - - - - - - - - - - - - - Endereço do Responsável pela eFinanceira - - - - - Logradouro - - - - - - - - - - - Número - - - - - - - - - - - Complemento - - - - - - - - - - - Bairro - - - - - - - - - - - Código de Endereçamento Postal do endereço - - - - - - - - - - - Município - - - - - - - - - - - Unidade da Federação - - - - - - - - - - - - - - E-mail do Responsável pela e-Financeira - - - - - - - - - - - - - - - Informações do Representante Legal - - - - - CPF - - - - - - - - - - - Setor - - - - - - - - - - - - Telefone do Representante Legal - - - - - DDD do Telefone - - - - - - - - - - - Número do Telefone - - - - - - - - - - - Ramal - - - - - - - - - - - - - - - - - - - - - Identificador que representa unicamente o evento no sistema para a mesma entidade e mesmo tipo - - - - - - - - - - - - - - - + + + + + + + + + Evento de Abertura da eFinanceira + + + + + + Identificação de Evento + + + + + + + + Indicativo de Retificação: + 1 - Original + 2 - Retificador + 3 - Retificador a Pedido + + + + + + + + + + + Número do recibo do arquivo a ser retificado. + + + + + + + + + + + + + Identificação do ambiente: + 1 - Produção + 2 - Homologação + + + + + + + + + + + + Processo de emissão do evento: + 1- Emissão com aplicativo da empresa + + + + + + + + + + + Versão do aplicativo de emissão do evento + + + + + + + + + + + + + + Informações de identificação da Entidade Declarante + + + + + CNPJ da Entidade Declarante + + + + + + + + + + + + + + + Informações de Abertura + + + + + Data Inicial + + + + + + + + + Data Final + + + + + + + + + + + + + Informações da Abertura referentes a Previdência Privada + + + + + + Tipo de Empresa de Previdência Privada + + + + + Tipo de Empresa de Previdência Privada + + + + + + + + + + + + + + + + + + Informações da Abertura referentes a Operações Financeiras + + + + + + Informações do Responsável pela RMF + + + + + CNPJ da entidade responsável pela RMF + + + + + + + + + + + CPF + + + + + + + + + + + Nome + + + + + + + + + + + Setor + + + + + + + + + + + + Telefone do responsável pela RMF + + + + + DDD do Telefone + + + + + + + + + + + Número do Telefone + + + + + + + + + + + Ramal + + + + + + + + + + + + + + + Endereço do responsável pela RMF + + + + + Logradouro + + + + + + + + + + + Número + + + + + + + + + + + Complemento + + + + + + + + + + + Bairro + + + + + + + + + + + Código de Endereçamento Postal do endereço + + + + + + + + + + + Município + + + + + + + + + + + Unidade da Federação + + + + + + + + + + + + + + + + + + Informações do(s) Responsável(is) pela e-Financeira + + + + + CPF + + + + + + + + + + + Nome + + + + + + + + + + + Setor + + + + + + + + + + + + Telefone do Responsável pela eFinanceira + + + + + DDD do Telefone + + + + + + + + + + + Número do Telefone + + + + + + + + + + + Ramal + + + + + + + + + + + + + + + Endereço do Responsável pela eFinanceira + + + + + Logradouro + + + + + + + + + + + Número + + + + + + + + + + + Complemento + + + + + + + + + + + Bairro + + + + + + + + + + + Código de Endereçamento Postal do endereço + + + + + + + + + + + Município + + + + + + + + + + + Unidade da Federação + + + + + + + + + + + + + + E-mail do Responsável pela e-Financeira + + + + + + + + + + + + + + + Informações do Representante Legal + + + + + CPF + + + + + + + + + + + Setor + + + + + + + + + + + + Telefone do Representante Legal + + + + + DDD do Telefone + + + + + + + + + + + Número do Telefone + + + + + + + + + + + Ramal + + + + + + + + + + + + + + + + + + + + + Identificador que representa unicamente o evento no sistema para a mesma entidade e mesmo tipo + + + + + + + + + + + + + + + diff --git a/src/Factories/EvtAberturaeFinanceira.php b/src/Factories/EvtAberturaeFinanceira.php index e61997f..882e104 100755 --- a/src/Factories/EvtAberturaeFinanceira.php +++ b/src/Factories/EvtAberturaeFinanceira.php @@ -67,7 +67,7 @@ protected function toNode() true ); $this->node->insertBefore($ideEvento, $ideDeclarante); - + $infoAbertura = $this->dom->createElement("infoAbertura"); $this->dom->addChild( $infoAbertura, @@ -82,7 +82,7 @@ protected function toNode() true ); $this->node->appendChild($infoAbertura); - + if (!empty($this->std->aberturapp)) { $AberturaPP = $this->dom->createElement("AberturaPP"); $pp = $this->std->aberturapp; @@ -98,11 +98,17 @@ protected function toNode() } $this->node->appendChild($AberturaPP); } - + if (!empty($this->std->aberturamovopfin)) { $AberturaMovOpFin = $this->dom->createElement("AberturaMovOpFin"); $rmf = $this->std->aberturamovopfin->responsavelrmf; $ResponsavelRMF = $this->dom->createElement("ResponsavelRMF"); + $this->dom->addChild( + $ResponsavelRMF, + "CNPJ", + $rmf->cnpj ?? null, + false + ); $this->dom->addChild( $ResponsavelRMF, "CPF", @@ -280,7 +286,7 @@ protected function toNode() ); $AberturaMovOpFin->appendChild($RespeFin); } - + $RepresLegal = $this->dom->createElement("RepresLegal"); $rl = $this->std->aberturamovopfin->represlegal; $this->dom->addChild( @@ -316,10 +322,10 @@ protected function toNode() ); $RepresLegal->appendChild($Telefone); $AberturaMovOpFin->appendChild($RepresLegal); - + $this->node->appendChild($AberturaMovOpFin); } - + //finalização do xml $this->eFinanceira->appendChild($this->node); //$this->xml = $this->dom->saveXML($this->eFinanceira);