scorb-api 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- scorb_api/__init__.py +39 -0
- scorb_api/helpers/http.py +72 -0
- scorb_api/models/authorization.py +34 -0
- scorb_api/models/endpoint.py +40 -0
- scorb_api/models/endpoints/__init__.py +225 -0
- scorb_api/models/endpoints/endpoint_customizado.py +10 -0
- scorb_api/models/endpoints/entidade_customizadas/__init__.py +8 -0
- scorb_api/models/endpoints/entidade_de_cenario/__init__.py +39 -0
- scorb_api/models/endpoints/entidade_de_cenario/alcance_excecao.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/calculo_alcance.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/calculo_alcance_verba_dependencia.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/cargo.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/cenario_visao.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/centro_custo.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/centro_custo_verba_valor_real.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/check_caderias_total.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/check_caderias_total_por_verba.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/consulta_cadeira_fixo.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/consulta_centro_de_custo_fixo_new.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/consulta_centro_de_custo_fixo_old.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/conta_contabil.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/cotacao.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/dias_uteis.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/expressao_customizada.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/faixa_salarial_alcance.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/faixa_salarial_esquema.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/faixa_salarial_esquema_item.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/faixa_salarial_reajuste_alcance.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/funcao_customizada.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/funcionario.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/funcionario_alocacao.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/funcionario_plano.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/funcionario_salario_previsto.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/funcionario_tipo.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/funcionario_verba_especifica.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/grupo_cargo.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/grupo_centro_custo.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/grupo_empregado.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/grupo_nivel_salarial.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/grupo_verba.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/moeda.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/nivel_salarial.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/plano.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/plano_contas.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/posicao.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/reajuste_alcance.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/reajuste_alcance_excecao.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/reajuste_alcance_motivo.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/report_calculated_field.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/verba.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/verba_categoria.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/verba_centro_custo_depara.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/verba_conta_contabil_alcance.py +10 -0
- scorb_api/models/endpoints/entidade_de_cenario/verba_reajuste_conta_contabil.py +10 -0
- scorb_api/models/endpoints/globais/__init__.py +10 -0
- scorb_api/models/endpoints/globais/alcance_tipo.py +12 -0
- scorb_api/models/endpoints/globais/atributo_customizado.py +12 -0
- scorb_api/models/endpoints/globais/cenario.py +12 -0
- scorb_api/models/endpoints/globais/cenario_campo.py +12 -0
- scorb_api/models/endpoints/globais/cenario_categoria.py +12 -0
- scorb_api/models/endpoints/globais/inventario_template.py +12 -0
- scorb_api/models/endpoints/globais/projector_template.py +12 -0
- scorb_api/models/endpoints/globais/resumo_hc_e_salario_cc_e_empresa.py +12 -0
- scorb_api/models/endpoints/globais/tabela_customizada.py +53 -0
- scorb_api/models/endpoints/globais/validation_configuration.py +12 -0
- scorb_api/models/endpoints/tabelas_customizadas/__init__.py +8 -0
- scorb_api/utils/filter_clean_utils.py +72 -0
- scorb_api-0.1.0.dist-info/LICENSE +21 -0
- scorb_api-0.1.0.dist-info/METADATA +70 -0
- scorb_api-0.1.0.dist-info/RECORD +71 -0
- scorb_api-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class FaixaSalarialAlcance(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/FaixaSalarialAlcance"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class FaixaSalarialEsquema(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/FaixaSalarialEsquema"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class FaixaSalarialEsquemaItem(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/FaixaSalarialEsquemaItem"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class FaixaSalarialReajusteAlcance(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/FaixaSalarialReajusteAlcance"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class FuncaoCustomizada(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/FuncaoCustomizada"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class Funcionario(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/Funcionario"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class FuncionarioAlocacao(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/FuncionarioAlocacao"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class FuncionarioPlano(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/FuncionarioPlano"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class FuncionarioSalarioPrevisto(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/FuncionarioSalarioPrevisto"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class FuncionarioTipo(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/FuncionarioTipo"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class FuncionarioVerbaEspecifica(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/FuncionarioVerbaEspecifica"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class GrupoCargo(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/GrupoCargo"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class GrupoCentroCusto(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/GrupoCentroCusto"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class GrupoEmpregado(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/GrupoEmpregado"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class GrupoNivelSalarial(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/GrupoNivelSalarial"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class GrupoVerba(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/GrupoVerba"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class Moeda(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/Moeda"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class NivelSalarial(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/NivelSalarial"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class Plano(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/Plano"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class PlanoContas(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/PlanoContas"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class Posicao(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/Posicao"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class ReajusteAlcance(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/Cadeiras _ Fixo por Verba"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class ReajusteAlcanceExcecao(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/ReajusteAlcanceExcecao"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class ReajusteAlcanceMotivo(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/ReajusteAlcanceMotivo"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class ReportCalculatedField(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/ReportCalculatedField"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class Verba(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/Verba"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class VerbaCategoria(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/VerbaCategoria"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class VerbaCentroCustoDepara(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/VerbaCentroCustoDepara"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class VerbaContaContabilAlcance(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/VerbaContaContabilAlcance"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class VerbaReajusteContaContabil(Endpoint):
|
|
5
|
+
def __init__(self, header_auth, cenario_code) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = f"/api/SCORC/crud/cenario/{cenario_code}/VerbaReajusteContaContabil"
|
|
8
|
+
|
|
9
|
+
def read(self):
|
|
10
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from scorb_api.models.endpoints.globais.cenario import Cenario
|
|
2
|
+
from scorb_api.models.endpoints.globais.cenario_campo import CenarioCampo
|
|
3
|
+
from scorb_api.models.endpoints.globais.cenario_categoria import CenarioCategoria
|
|
4
|
+
from scorb_api.models.endpoints.globais.inventario_template import InventarioTemplate
|
|
5
|
+
from scorb_api.models.endpoints.globais.projector_template import ProjectorTemplate
|
|
6
|
+
from scorb_api.models.endpoints.globais.tabela_customizada import TabelaCustomizadaGlobais
|
|
7
|
+
from scorb_api.models.endpoints.globais.validation_configuration import ValidationConfiguration
|
|
8
|
+
from scorb_api.models.endpoints.globais.resumo_hc_e_salario_cc_e_empresa import ResumoHCeSalarioCCeEmpresa
|
|
9
|
+
from scorb_api.models.endpoints.globais.atributo_customizado import AtributoCustomizado
|
|
10
|
+
from scorb_api.models.endpoints.globais.alcance_tipo import AlcanceTipo
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class AlcanceTipo(Endpoint):
|
|
5
|
+
def __init__(self, header_auth) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = "/api/SCORC/crud/AlcanceTipo"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def read(self):
|
|
11
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
12
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class AtributoCustomizado(Endpoint):
|
|
5
|
+
def __init__(self, header_auth) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = "/api/SCORC/crud/AtributoCustomizado"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def read(self):
|
|
11
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
12
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class Cenario(Endpoint):
|
|
5
|
+
def __init__(self, header_auth) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = "/api/SCORC/crud/Cenario"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def read(self):
|
|
11
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
12
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class CenarioCampo(Endpoint):
|
|
5
|
+
def __init__(self, header_auth) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = "/api/SCORC/crud/CenarioCampo"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def read(self):
|
|
11
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
12
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class CenarioCategoria(Endpoint):
|
|
5
|
+
def __init__(self, header_auth) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = "/api/SCORC/crud/CenarioCategoria"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def read(self):
|
|
11
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
12
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class InventarioTemplate(Endpoint):
|
|
5
|
+
def __init__(self, header_auth) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = "/api/SCORC/crud/InventarioTemplate"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def read(self):
|
|
11
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
12
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class ProjectorTemplate(Endpoint):
|
|
5
|
+
def __init__(self, header_auth) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = "/api/SCORC/crud/ProjectorTemplate"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def read(self):
|
|
11
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
12
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class ResumoHCeSalarioCCeEmpresa(Endpoint):
|
|
5
|
+
def __init__(self, header_auth) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = "/api/SCORC/crud/Resumo HC _ Salário _CC e Empresa_"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def read(self):
|
|
11
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
12
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class TabelaCustomizadaGlobais(Endpoint):
|
|
5
|
+
def __init__(self, header_auth) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = "/api/SCORC/crud/TabelaCustomizada"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def read(self):
|
|
11
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
["CalculoAlcance",
|
|
16
|
+
"CalculoAlcanceVerbaDependencia",
|
|
17
|
+
"Cargo",
|
|
18
|
+
"CenarioVisao",
|
|
19
|
+
"CentroCusto",
|
|
20
|
+
"CentroCustoVerbaValorReal",
|
|
21
|
+
"ContaContabil",
|
|
22
|
+
"Cotacao",
|
|
23
|
+
"DiasUteis",
|
|
24
|
+
"ExpressaoCustomizada",
|
|
25
|
+
"FaixaSalarialAlcance",
|
|
26
|
+
"FaixaSalarialEsquema",
|
|
27
|
+
"FaixaSalarialEsquemaItem",
|
|
28
|
+
"FaixaSalarialReajusteAlcance",
|
|
29
|
+
"FuncaoCustomizada",
|
|
30
|
+
"Funcionario",
|
|
31
|
+
"FuncionarioAlocacao",
|
|
32
|
+
"FuncionarioPlano",
|
|
33
|
+
"FuncionarioSalarioPrevisto",
|
|
34
|
+
"FuncionarioTipo",
|
|
35
|
+
"FuncionarioVerbaEspecifica",
|
|
36
|
+
"GrupoCargo",
|
|
37
|
+
"GrupoCentroCusto",
|
|
38
|
+
"GrupoEmpregado",
|
|
39
|
+
"GrupoNivelSalarial",
|
|
40
|
+
"GrupoVerba",
|
|
41
|
+
"Moeda",
|
|
42
|
+
"NivelSalarial",
|
|
43
|
+
"Plano",
|
|
44
|
+
"PlanoContas",
|
|
45
|
+
"Posicao",
|
|
46
|
+
"ReajusteAlcance",
|
|
47
|
+
"ReajusteAlcanceMotivo",
|
|
48
|
+
"ReportCalculatedField",
|
|
49
|
+
"Verba",
|
|
50
|
+
"VerbaCategoria",
|
|
51
|
+
"VerbaCentroCustoDepara",
|
|
52
|
+
"VerbaContaContabilAlcance",
|
|
53
|
+
"VerbaReajusteContaContabil",]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from scorb_api.models.endpoint import Endpoint
|
|
2
|
+
import asyncio
|
|
3
|
+
|
|
4
|
+
class ValidationConfiguration(Endpoint):
|
|
5
|
+
def __init__(self, header_auth) -> None:
|
|
6
|
+
super().__init__(header_auth=header_auth)
|
|
7
|
+
self.base_url = "/api/SCORC/crud/ValidationConfiguration"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def read(self):
|
|
11
|
+
return asyncio.run(self.http_request.request(f"{self.base_url}/read", "post", headers=self.header_auth))
|
|
12
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from scorb_api.models.endpoints.endpoint_customizado import EndpointCustomizado
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class TabelaCustomizada(EndpointCustomizado):
|
|
5
|
+
def __init__(self, header_auth, cenario_code, custom) -> None:
|
|
6
|
+
super().__init__(
|
|
7
|
+
header_auth=header_auth, cenario_code=cenario_code, custom=custom
|
|
8
|
+
)
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"""This module provides various utilities functions."""
|
|
2
|
+
|
|
3
|
+
from typing import List, Literal, Any
|
|
4
|
+
from datetime import date
|
|
5
|
+
from pydoc import locate
|
|
6
|
+
from operator import itemgetter
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@staticmethod
|
|
10
|
+
def split_str_to_list(
|
|
11
|
+
values: str,
|
|
12
|
+
split_by: str = ",",
|
|
13
|
+
dtype: Literal["int", "str", "float", "dict", "list"] = "str",
|
|
14
|
+
) -> List[Any]:
|
|
15
|
+
"""
|
|
16
|
+
Splits a string into a list of values of the specified data type.
|
|
17
|
+
|
|
18
|
+
Args:
|
|
19
|
+
values (str): The string to be split.\n
|
|
20
|
+
split_by (str, optional):
|
|
21
|
+
The character to split the string by. Defaults to ",".\n
|
|
22
|
+
dtype (Literal["int", "str", "float", "dict", "list"], optional):
|
|
23
|
+
The data type of the values. Defaults to "str".
|
|
24
|
+
|
|
25
|
+
Returns:
|
|
26
|
+
List[dtype]: A list of values converted to the specified data type.
|
|
27
|
+
"""
|
|
28
|
+
data_type = locate(dtype)
|
|
29
|
+
if isinstance(values, str):
|
|
30
|
+
return [data_type(element) for element in values.split(split_by)]
|
|
31
|
+
else:
|
|
32
|
+
return values
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@staticmethod
|
|
36
|
+
def filter_dict_with_falsy_values(dictionary: dict) -> dict:
|
|
37
|
+
"""
|
|
38
|
+
Filters a dictionary by removing key-value pairs where the value is falsy.
|
|
39
|
+
|
|
40
|
+
Args:
|
|
41
|
+
dictionary (dict): The dictionary to filter.
|
|
42
|
+
|
|
43
|
+
Returns:
|
|
44
|
+
dict: The filtered dictionary.
|
|
45
|
+
"""
|
|
46
|
+
return dict(filter(itemgetter(1), dictionary.items()))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@staticmethod
|
|
50
|
+
def convert_dict_dates_to_isoformat(dictionary: dict) -> dict:
|
|
51
|
+
"""
|
|
52
|
+
Converts date values in a dictionary to ISO 8601 format.
|
|
53
|
+
Nested dictionaries and lists are supported.
|
|
54
|
+
|
|
55
|
+
Args:
|
|
56
|
+
dictionary (dict): The dictionary to convert.
|
|
57
|
+
|
|
58
|
+
Returns:
|
|
59
|
+
dict: The dictionary with date values converted to ISO 8601 format.
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
def convert_value(value):
|
|
63
|
+
if isinstance(value, date):
|
|
64
|
+
return value.isoformat()
|
|
65
|
+
elif isinstance(value, dict):
|
|
66
|
+
return convert_dict_dates_to_isoformat(value)
|
|
67
|
+
elif isinstance(value, list):
|
|
68
|
+
return [convert_value(item) for item in value]
|
|
69
|
+
else:
|
|
70
|
+
return value
|
|
71
|
+
|
|
72
|
+
return {key: convert_value(value) for key, value in dictionary.items()}
|