flit-models 3.3.41 → 3.3.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +1 -1
- package/lib/index.js +7 -2
- package/lib/models/contas/empresa/empresa-elastic-convert.d.ts +2 -1
- package/lib/models/contas/empresa/empresa-elastic-convert.js +2 -2
- package/lib/models/contas/empresa/empresa-fire-convert.d.ts +2 -1
- package/lib/models/contas/empresa/empresa-fire-convert.js +2 -2
- package/lib/models/contas/empresa/index.d.ts +1 -25
- package/lib/models/contas/empresa/index.js +1 -21
- package/lib/models/contas/shared/index.d.ts +20 -0
- package/lib/models/contas/shared/index.js +18 -0
- package/lib/models/contas/usuario/index.d.ts +159 -0
- package/lib/models/contas/usuario/index.js +196 -0
- package/lib/models/contas/usuario/usuario-elastic-convert.d.ts +59 -0
- package/lib/models/contas/usuario/usuario-elastic-convert.js +140 -0
- package/lib/models/contas/usuario/usuario-fire-convert.d.ts +51 -0
- package/lib/models/contas/usuario/usuario-fire-convert.js +145 -0
- package/lib/models/contas/usuario/usuario-json-convert.d.ts +52 -0
- package/lib/models/contas/usuario/usuario-json-convert.js +152 -0
- package/lib/models/index.d.ts +2 -0
- package/lib/models/index.js +2 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { AuditoriaModificador, AuditoriaModificadorBase, AuditoriaModificadorFireConvert, AuditoriaModificadorFirestoreData, Cargo, CargoBase, CargoFireConvert, CargoFirestoreData, CargoElasticSource, CargoElasticConvert, CargoJsonData, CargoJsonConvert, Departamento, DepartamentoBase, DepartamentoFireConvert, DepartamentoFirestoreData, DepartamentoElasticConvert, DepartamentoElasticSource, EmpresaFeriado, EmpresaFeriadoBase, EmpresaFeriadoFireConvert, EmpresaFeriadoFirestoreData, EnumAuditoriaModificadorTipo, EnumConfiguracaoTipoFaltaJornada, EnumEmpresasConfiguracaoNome, EnumExcecaoStatus, EnumExcecaoTipo, EnumFormatoArquivo, EnumStatusHistoricoRelatorioPontoApp, EnumStatusHistoricoRelatorioPontoAppLog, EnumStatusRelatorio, EnumTipoRelatorio, Escala, EscalaBase, EscalaFireConvert, EscalaFirestoreData, EscalaHelpers, Excecao, ExportarRelatorioRequest, ExportarRelatorioResponse, FaixaHoraExtraDiferenciada, Feriado, FeriadoBase, FeriadoFireConvert, FeriadoFirestoreData, FeriadoJsonConvert, FeriadoJsonData, FeriadoTipoEnum, HistoricoRelatorioPontoApp, HistoricoRelatorioPontoAppBase, HistoricoRelatorioPontoAppElasticConvert, HistoricoRelatorioPontoAppElasticData, HistoricoRelatorioPontoAppFireConvert, HistoricoRelatorioPontoAppFirestoreData, HistoricoRelatorioPontoAppLog, HistoricoRelatorioPontoAppLogAppInfo, HistoricoRelatorioPontoAppLogBase, HistoricoRelatorioPontoAppLogFireConvert, HistoricoRelatorioPontoAppLogFirestoreData, IExcecao, Lancamento, LancamentoBase, LancamentoElasticConvert, LancamentoElasticSource, LancamentoFireConvert, LancamentoFirestoreData, LancamentoIntegracaoTipoEnum, LancamentoJsonConvert, LancamentoJsonData, LancamentoPeriodo, LancamentoPeriodoBase, LancamentoStatusEnum, ModeloFaixaHoraExtra, ModeloFaixaHoraExtraBase, ModeloFaixaHoraExtraFireConvert, ModeloFaixaHoraExtraFirestoreData, NiveisDeFaixaDeHorasExtras, OcorrenciaFrequenciaCopiaEmDocumento, OcorrenciaFrequenciaRelacaoJornadas, OcorrenciaFrequenciaRelacaoJornadasValue, OnCallBuscarRelatorioAbsenteismoRequestModel, OnCallBuscarRelatorioAbsenteismoRequestModelBase, OnCallBuscarRelatorioAbsenteismoResponseModel, OnCallExportarRelatorioAbsenteismoRequestModel, OnCallExportarRelatorioAbsenteismoRequestModelBase, RegimesCompensacaoEscala, RelatorioAbsenteismo, RelatorioAbsenteismoBase, RelatorioAbsenteismoDadosDiarios, RelatorioAbsenteismoDadosDiariosBase, SolicitacoesUsuario, SolicitacoesUsuarioBase, SolicitacoesUsuarioFireConvert, SolicitacoesUsuarioFirestoreData, StatusSolicitacaoUsuario, TipoAcaoLancamentoEnum, TipoAnexoExtensao, TipoFaixaDeHorasExtras, TipoOcorrenciaFrequenciaEnum, TipoReferenciaVerificacaoLancamento, TipoSolicitacaoUsuario, VerificacaoLancamento, VerificacaoLancamentoBase, VerificacaoLancamentoFireConvert, VerificacaoLancamentoFirestoreData, Empresa, EmpresaBase,
|
|
1
|
+
export { AuditoriaModificador, AuditoriaModificadorBase, AuditoriaModificadorFireConvert, AuditoriaModificadorFirestoreData, Cargo, CargoBase, CargoFireConvert, CargoFirestoreData, CargoElasticSource, CargoElasticConvert, CargoJsonData, CargoJsonConvert, Departamento, DepartamentoBase, DepartamentoFireConvert, DepartamentoFirestoreData, DepartamentoElasticConvert, DepartamentoElasticSource, EmpresaFeriado, EmpresaFeriadoBase, EmpresaFeriadoFireConvert, EmpresaFeriadoFirestoreData, EnumAuditoriaModificadorTipo, EnumConfiguracaoTipoFaltaJornada, EnumEmpresasConfiguracaoNome, EnumExcecaoStatus, EnumExcecaoTipo, EnumFormatoArquivo, EnumStatusHistoricoRelatorioPontoApp, EnumStatusHistoricoRelatorioPontoAppLog, EnumStatusRelatorio, EnumTipoRelatorio, Escala, EscalaBase, EscalaFireConvert, EscalaFirestoreData, EscalaHelpers, Excecao, ExportarRelatorioRequest, ExportarRelatorioResponse, FaixaHoraExtraDiferenciada, Feriado, FeriadoBase, FeriadoFireConvert, FeriadoFirestoreData, FeriadoJsonConvert, FeriadoJsonData, FeriadoTipoEnum, HistoricoRelatorioPontoApp, HistoricoRelatorioPontoAppBase, HistoricoRelatorioPontoAppElasticConvert, HistoricoRelatorioPontoAppElasticData, HistoricoRelatorioPontoAppFireConvert, HistoricoRelatorioPontoAppFirestoreData, HistoricoRelatorioPontoAppLog, HistoricoRelatorioPontoAppLogAppInfo, HistoricoRelatorioPontoAppLogBase, HistoricoRelatorioPontoAppLogFireConvert, HistoricoRelatorioPontoAppLogFirestoreData, IExcecao, Lancamento, LancamentoBase, LancamentoElasticConvert, LancamentoElasticSource, LancamentoFireConvert, LancamentoFirestoreData, LancamentoIntegracaoTipoEnum, LancamentoJsonConvert, LancamentoJsonData, LancamentoPeriodo, LancamentoPeriodoBase, LancamentoStatusEnum, ModeloFaixaHoraExtra, ModeloFaixaHoraExtraBase, ModeloFaixaHoraExtraFireConvert, ModeloFaixaHoraExtraFirestoreData, NiveisDeFaixaDeHorasExtras, OcorrenciaFrequenciaCopiaEmDocumento, OcorrenciaFrequenciaRelacaoJornadas, OcorrenciaFrequenciaRelacaoJornadasValue, OnCallBuscarRelatorioAbsenteismoRequestModel, OnCallBuscarRelatorioAbsenteismoRequestModelBase, OnCallBuscarRelatorioAbsenteismoResponseModel, OnCallExportarRelatorioAbsenteismoRequestModel, OnCallExportarRelatorioAbsenteismoRequestModelBase, RegimesCompensacaoEscala, RelatorioAbsenteismo, RelatorioAbsenteismoBase, RelatorioAbsenteismoDadosDiarios, RelatorioAbsenteismoDadosDiariosBase, SolicitacoesUsuario, SolicitacoesUsuarioBase, SolicitacoesUsuarioFireConvert, SolicitacoesUsuarioFirestoreData, StatusSolicitacaoUsuario, TipoAcaoLancamentoEnum, TipoAnexoExtensao, TipoFaixaDeHorasExtras, TipoOcorrenciaFrequenciaEnum, TipoReferenciaVerificacaoLancamento, TipoSolicitacaoUsuario, VerificacaoLancamento, VerificacaoLancamentoBase, VerificacaoLancamentoFireConvert, VerificacaoLancamentoFirestoreData, Empresa, EmpresaBase, ParametrosEmpresa, ToleranciaIntervalosTipo, EmpresaFireConvert, EmpresaElasticSource, EmpresaFirestoreData, PercentuaisBancoHoras, Evento, EventoBase, EventoElasticConvert, EventoElasticSource, EventoFireConvert, EventoFirestoreData, TipoEventoFrequenciaEnum, Dispositivo, DispositivoBase, TipoDispositivo, DispositivoElasticConvert, DispositivoElasticSource, DispositivoFireConvert, DispositivoFirestoreData, Perfil, PerfilBase, PerfilFireConvert, PerfilFirestoreData, Usuario, UsuarioBase, UsuarioElasticConvert, UsuarioElasticSource, UsuarioFireConvert, UsuarioJsonConvert, UsuarioFirestoreData, Endereco, } from './models/index';
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LancamentoIntegracaoTipoEnum = exports.LancamentoFirestoreData = exports.LancamentoFireConvert = exports.LancamentoElasticConvert = exports.Lancamento = exports.HistoricoRelatorioPontoAppLogFirestoreData = exports.HistoricoRelatorioPontoAppLogFireConvert = exports.HistoricoRelatorioPontoAppLog = exports.HistoricoRelatorioPontoAppFirestoreData = exports.HistoricoRelatorioPontoAppFireConvert = exports.HistoricoRelatorioPontoAppElasticData = exports.HistoricoRelatorioPontoAppElasticConvert = exports.HistoricoRelatorioPontoApp = exports.FeriadoTipoEnum = exports.FeriadoJsonData = exports.FeriadoJsonConvert = exports.FeriadoFirestoreData = exports.FeriadoFireConvert = exports.Feriado = exports.Excecao = exports.EscalaHelpers = exports.EscalaFirestoreData = exports.EscalaFireConvert = exports.Escala = exports.EnumTipoRelatorio = exports.EnumStatusRelatorio = exports.EnumStatusHistoricoRelatorioPontoAppLog = exports.EnumStatusHistoricoRelatorioPontoApp = exports.EnumFormatoArquivo = exports.EnumExcecaoTipo = exports.EnumExcecaoStatus = exports.EnumEmpresasConfiguracaoNome = exports.EnumConfiguracaoTipoFaltaJornada = exports.EnumAuditoriaModificadorTipo = exports.EmpresaFeriadoFirestoreData = exports.EmpresaFeriadoFireConvert = exports.EmpresaFeriado = exports.DepartamentoElasticConvert = exports.DepartamentoFirestoreData = exports.DepartamentoFireConvert = exports.Departamento = exports.CargoJsonConvert = exports.CargoJsonData = exports.CargoElasticConvert = exports.CargoFirestoreData = exports.CargoFireConvert = exports.Cargo = exports.AuditoriaModificadorFirestoreData = exports.AuditoriaModificadorFireConvert = exports.AuditoriaModificador = void 0;
|
|
4
|
-
exports.PerfilFirestoreData = exports.PerfilFireConvert = exports.Perfil = exports.DispositivoFirestoreData = exports.DispositivoFireConvert = exports.DispositivoElasticConvert = exports.TipoDispositivo = exports.Dispositivo = exports.TipoEventoFrequenciaEnum = exports.EventoFirestoreData = exports.EventoFireConvert = exports.EventoElasticConvert = exports.Evento = exports.PercentuaisBancoHoras = exports.EmpresaFirestoreData = exports.EmpresaFireConvert = exports.ToleranciaIntervalosTipo = exports.ParametrosEmpresa = exports.
|
|
4
|
+
exports.Endereco = exports.UsuarioFirestoreData = exports.UsuarioJsonConvert = exports.UsuarioFireConvert = exports.UsuarioElasticConvert = exports.Usuario = exports.PerfilFirestoreData = exports.PerfilFireConvert = exports.Perfil = exports.DispositivoFirestoreData = exports.DispositivoFireConvert = exports.DispositivoElasticConvert = exports.TipoDispositivo = exports.Dispositivo = exports.TipoEventoFrequenciaEnum = exports.EventoFirestoreData = exports.EventoFireConvert = exports.EventoElasticConvert = exports.Evento = exports.PercentuaisBancoHoras = exports.EmpresaFirestoreData = exports.EmpresaFireConvert = exports.ToleranciaIntervalosTipo = exports.ParametrosEmpresa = exports.Empresa = exports.VerificacaoLancamentoFirestoreData = exports.VerificacaoLancamentoFireConvert = exports.VerificacaoLancamento = exports.TipoSolicitacaoUsuario = exports.TipoReferenciaVerificacaoLancamento = exports.TipoOcorrenciaFrequenciaEnum = exports.TipoFaixaDeHorasExtras = exports.TipoAnexoExtensao = exports.TipoAcaoLancamentoEnum = exports.StatusSolicitacaoUsuario = exports.SolicitacoesUsuarioFirestoreData = exports.SolicitacoesUsuarioFireConvert = exports.SolicitacoesUsuario = exports.RelatorioAbsenteismoDadosDiarios = exports.RelatorioAbsenteismo = exports.RegimesCompensacaoEscala = exports.OcorrenciaFrequenciaRelacaoJornadas = exports.NiveisDeFaixaDeHorasExtras = exports.ModeloFaixaHoraExtraFirestoreData = exports.ModeloFaixaHoraExtraFireConvert = exports.ModeloFaixaHoraExtra = exports.LancamentoStatusEnum = exports.LancamentoPeriodo = exports.LancamentoJsonData = exports.LancamentoJsonConvert = void 0;
|
|
5
5
|
var index_1 = require("./models/index");
|
|
6
6
|
Object.defineProperty(exports, "AuditoriaModificador", { enumerable: true, get: function () { return index_1.AuditoriaModificador; } });
|
|
7
7
|
Object.defineProperty(exports, "AuditoriaModificadorFireConvert", { enumerable: true, get: function () { return index_1.AuditoriaModificadorFireConvert; } });
|
|
@@ -79,7 +79,6 @@ Object.defineProperty(exports, "VerificacaoLancamento", { enumerable: true, get:
|
|
|
79
79
|
Object.defineProperty(exports, "VerificacaoLancamentoFireConvert", { enumerable: true, get: function () { return index_1.VerificacaoLancamentoFireConvert; } });
|
|
80
80
|
Object.defineProperty(exports, "VerificacaoLancamentoFirestoreData", { enumerable: true, get: function () { return index_1.VerificacaoLancamentoFirestoreData; } });
|
|
81
81
|
Object.defineProperty(exports, "Empresa", { enumerable: true, get: function () { return index_1.Empresa; } });
|
|
82
|
-
Object.defineProperty(exports, "Endereco", { enumerable: true, get: function () { return index_1.Endereco; } });
|
|
83
82
|
Object.defineProperty(exports, "ParametrosEmpresa", { enumerable: true, get: function () { return index_1.ParametrosEmpresa; } });
|
|
84
83
|
Object.defineProperty(exports, "ToleranciaIntervalosTipo", { enumerable: true, get: function () { return index_1.ToleranciaIntervalosTipo; } });
|
|
85
84
|
Object.defineProperty(exports, "EmpresaFireConvert", { enumerable: true, get: function () { return index_1.EmpresaFireConvert; } });
|
|
@@ -98,3 +97,9 @@ Object.defineProperty(exports, "DispositivoFirestoreData", { enumerable: true, g
|
|
|
98
97
|
Object.defineProperty(exports, "Perfil", { enumerable: true, get: function () { return index_1.Perfil; } });
|
|
99
98
|
Object.defineProperty(exports, "PerfilFireConvert", { enumerable: true, get: function () { return index_1.PerfilFireConvert; } });
|
|
100
99
|
Object.defineProperty(exports, "PerfilFirestoreData", { enumerable: true, get: function () { return index_1.PerfilFirestoreData; } });
|
|
100
|
+
Object.defineProperty(exports, "Usuario", { enumerable: true, get: function () { return index_1.Usuario; } });
|
|
101
|
+
Object.defineProperty(exports, "UsuarioElasticConvert", { enumerable: true, get: function () { return index_1.UsuarioElasticConvert; } });
|
|
102
|
+
Object.defineProperty(exports, "UsuarioFireConvert", { enumerable: true, get: function () { return index_1.UsuarioFireConvert; } });
|
|
103
|
+
Object.defineProperty(exports, "UsuarioJsonConvert", { enumerable: true, get: function () { return index_1.UsuarioJsonConvert; } });
|
|
104
|
+
Object.defineProperty(exports, "UsuarioFirestoreData", { enumerable: true, get: function () { return index_1.UsuarioFirestoreData; } });
|
|
105
|
+
Object.defineProperty(exports, "Endereco", { enumerable: true, get: function () { return index_1.Endereco; } });
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EmpresaElasticConvert = void 0;
|
|
4
|
+
var _1 = require(".");
|
|
4
5
|
var array_helpers_1 = require("../../utils/array-helpers");
|
|
5
6
|
var boolean_helper_1 = require("../../utils/boolean-helper");
|
|
6
|
-
var string_helper_1 = require("../../utils/string-helper");
|
|
7
7
|
var date_helper_1 = require("../../utils/date-helper");
|
|
8
8
|
var number_helper_1 = require("../../utils/number-helper");
|
|
9
|
-
var
|
|
9
|
+
var string_helper_1 = require("../../utils/string-helper");
|
|
10
10
|
var parametros_compartilhados_1 = require("../parametros_compartilhados");
|
|
11
11
|
var EmpresaElasticConvert = /** @class */ (function () {
|
|
12
12
|
function EmpresaElasticConvert() {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { Empresa, EmpresaBase, IEmpresasEcontador, ParametrosEmpresa, PercentuaisBancoHoras } from '.';
|
|
1
2
|
import { FirebaseDocumentSnapshotGeneric, FirebaseTimestampGeneric } from '../../../shared/flitModelsDependencyInjection';
|
|
2
|
-
import {
|
|
3
|
+
import { Endereco } from '../shared';
|
|
3
4
|
export declare class EmpresaFirestoreData implements EmpresaBase {
|
|
4
5
|
logo_path?: string;
|
|
5
6
|
ativo?: boolean;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EmpresaFireConvert = exports.EmpresaFirestoreData = void 0;
|
|
4
4
|
var lodash_1 = require("lodash");
|
|
5
|
-
var flitModelsDependencyInjection_1 = require("../../../shared/flitModelsDependencyInjection");
|
|
6
5
|
var _1 = require(".");
|
|
6
|
+
var flitModelsDependencyInjection_1 = require("../../../shared/flitModelsDependencyInjection");
|
|
7
|
+
var boolean_helper_1 = require("../../utils/boolean-helper");
|
|
7
8
|
var number_helper_1 = require("../../utils/number-helper");
|
|
8
9
|
var string_helper_1 = require("../../utils/string-helper");
|
|
9
10
|
var parametros_compartilhados_1 = require("../parametros_compartilhados");
|
|
10
|
-
var boolean_helper_1 = require("../../utils/boolean-helper");
|
|
11
11
|
var EmpresaFirestoreData = /** @class */ (function () {
|
|
12
12
|
function EmpresaFirestoreData() {
|
|
13
13
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './empresa-fire-convert';
|
|
2
2
|
export * from './empresa-elastic-convert';
|
|
3
3
|
import { ToleranciaIntervalosTipo } from '../parametros_compartilhados';
|
|
4
|
+
import { Endereco } from '../shared';
|
|
4
5
|
/**
|
|
5
6
|
* Classe interna de um campo da classe "Empresa".
|
|
6
7
|
*
|
|
@@ -68,31 +69,6 @@ export declare class Empresa implements EmpresaBase {
|
|
|
68
69
|
*/
|
|
69
70
|
constructor(empresaPayload: Partial<Empresa>);
|
|
70
71
|
}
|
|
71
|
-
/**
|
|
72
|
-
* Classe interna de um campo da classe "Empresa".
|
|
73
|
-
*
|
|
74
|
-
* @class Endereco
|
|
75
|
-
*/
|
|
76
|
-
export declare class Endereco {
|
|
77
|
-
bairro?: string;
|
|
78
|
-
cep?: string;
|
|
79
|
-
cidade?: string;
|
|
80
|
-
complemento?: string;
|
|
81
|
-
logradouro?: string;
|
|
82
|
-
numero?: string;
|
|
83
|
-
uf?: string;
|
|
84
|
-
fuso_horario?: string;
|
|
85
|
-
constructor({ bairro, cep, cidade, complemento, logradouro, numero, uf, fuso_horario, }: {
|
|
86
|
-
bairro?: string;
|
|
87
|
-
cep?: string;
|
|
88
|
-
cidade?: string;
|
|
89
|
-
complemento?: string;
|
|
90
|
-
logradouro?: string;
|
|
91
|
-
numero?: string;
|
|
92
|
-
uf?: string;
|
|
93
|
-
fuso_horario?: string;
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
72
|
/**
|
|
97
73
|
* Classe interna de um campo da classe "Empresa".
|
|
98
74
|
*
|
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.ParametrosEmpresa = exports.
|
|
17
|
+
exports.ParametrosEmpresa = exports.Empresa = exports.PercentuaisBancoHoras = void 0;
|
|
18
18
|
__exportStar(require("./empresa-fire-convert"), exports);
|
|
19
19
|
__exportStar(require("./empresa-elastic-convert"), exports);
|
|
20
20
|
var parametros_compartilhados_1 = require("../parametros_compartilhados");
|
|
@@ -72,26 +72,6 @@ var Empresa = /** @class */ (function () {
|
|
|
72
72
|
return Empresa;
|
|
73
73
|
}());
|
|
74
74
|
exports.Empresa = Empresa;
|
|
75
|
-
/**
|
|
76
|
-
* Classe interna de um campo da classe "Empresa".
|
|
77
|
-
*
|
|
78
|
-
* @class Endereco
|
|
79
|
-
*/
|
|
80
|
-
var Endereco = /** @class */ (function () {
|
|
81
|
-
function Endereco(_a) {
|
|
82
|
-
var bairro = _a.bairro, cep = _a.cep, cidade = _a.cidade, complemento = _a.complemento, logradouro = _a.logradouro, numero = _a.numero, uf = _a.uf, fuso_horario = _a.fuso_horario;
|
|
83
|
-
this.bairro = bairro !== null && bairro !== void 0 ? bairro : null;
|
|
84
|
-
this.cep = cep !== null && cep !== void 0 ? cep : null;
|
|
85
|
-
this.cidade = cidade !== null && cidade !== void 0 ? cidade : null;
|
|
86
|
-
this.complemento = complemento !== null && complemento !== void 0 ? complemento : null;
|
|
87
|
-
this.logradouro = logradouro !== null && logradouro !== void 0 ? logradouro : null;
|
|
88
|
-
this.numero = numero !== null && numero !== void 0 ? numero : null;
|
|
89
|
-
this.uf = uf !== null && uf !== void 0 ? uf : null;
|
|
90
|
-
this.fuso_horario = fuso_horario !== null && fuso_horario !== void 0 ? fuso_horario : null;
|
|
91
|
-
}
|
|
92
|
-
return Endereco;
|
|
93
|
-
}());
|
|
94
|
-
exports.Endereco = Endereco;
|
|
95
75
|
/**
|
|
96
76
|
* Classe interna de um campo da classe "Empresa".
|
|
97
77
|
*
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare class Endereco {
|
|
2
|
+
bairro?: string;
|
|
3
|
+
cep?: string;
|
|
4
|
+
cidade?: string;
|
|
5
|
+
complemento?: string;
|
|
6
|
+
logradouro?: string;
|
|
7
|
+
numero?: string;
|
|
8
|
+
uf?: string;
|
|
9
|
+
fuso_horario?: string;
|
|
10
|
+
constructor({ bairro, cep, cidade, complemento, logradouro, numero, uf, fuso_horario, }: {
|
|
11
|
+
bairro?: string;
|
|
12
|
+
cep?: string;
|
|
13
|
+
cidade?: string;
|
|
14
|
+
complemento?: string;
|
|
15
|
+
logradouro?: string;
|
|
16
|
+
numero?: string;
|
|
17
|
+
uf?: string;
|
|
18
|
+
fuso_horario?: string;
|
|
19
|
+
});
|
|
20
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Endereco = void 0;
|
|
4
|
+
var Endereco = /** @class */ (function () {
|
|
5
|
+
function Endereco(_a) {
|
|
6
|
+
var bairro = _a.bairro, cep = _a.cep, cidade = _a.cidade, complemento = _a.complemento, logradouro = _a.logradouro, numero = _a.numero, uf = _a.uf, fuso_horario = _a.fuso_horario;
|
|
7
|
+
this.bairro = bairro !== null && bairro !== void 0 ? bairro : null;
|
|
8
|
+
this.cep = cep !== null && cep !== void 0 ? cep : null;
|
|
9
|
+
this.cidade = cidade !== null && cidade !== void 0 ? cidade : null;
|
|
10
|
+
this.complemento = complemento !== null && complemento !== void 0 ? complemento : null;
|
|
11
|
+
this.logradouro = logradouro !== null && logradouro !== void 0 ? logradouro : null;
|
|
12
|
+
this.numero = numero !== null && numero !== void 0 ? numero : null;
|
|
13
|
+
this.uf = uf !== null && uf !== void 0 ? uf : null;
|
|
14
|
+
this.fuso_horario = fuso_horario !== null && fuso_horario !== void 0 ? fuso_horario : null;
|
|
15
|
+
}
|
|
16
|
+
return Endereco;
|
|
17
|
+
}());
|
|
18
|
+
exports.Endereco = Endereco;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { AuditoriaModificadorBase } from '../auditoria/modificador';
|
|
2
|
+
import { Cargo } from '../cargo';
|
|
3
|
+
import { Departamento } from '../departamento';
|
|
4
|
+
import { Empresa } from '../empresa';
|
|
5
|
+
import { Escala } from '../escala';
|
|
6
|
+
import { Perfil } from '../perfis';
|
|
7
|
+
import { Endereco } from '../shared';
|
|
8
|
+
export * from './usuario-elastic-convert';
|
|
9
|
+
export * from './usuario-fire-convert';
|
|
10
|
+
export * from './usuario-json-convert';
|
|
11
|
+
export type UsuarioKeys = keyof Usuario;
|
|
12
|
+
export declare enum StatusUsuario {
|
|
13
|
+
Afastado = "Afastado",
|
|
14
|
+
Ativo = "Ativo",
|
|
15
|
+
AguardandoAtivacao = "Aguardando Ativa\u00E7\u00E3o",
|
|
16
|
+
Demitido = "Demitido",
|
|
17
|
+
Ferias = "F\u00E9rias",
|
|
18
|
+
SuspensaoContrato = "Suspens\u00E3o de contrato"
|
|
19
|
+
}
|
|
20
|
+
export declare enum EnumParametrosTipoHorarioNoturno {
|
|
21
|
+
URBANO = "URBANO",
|
|
22
|
+
RURAL = "RURAL",
|
|
23
|
+
PECUARIA = "PECUARIA",
|
|
24
|
+
CUSTOMIZADO = "CUSTOMIZADO"
|
|
25
|
+
}
|
|
26
|
+
export declare const StatusUsuarioArray: {
|
|
27
|
+
label: string;
|
|
28
|
+
key: StatusUsuario;
|
|
29
|
+
}[];
|
|
30
|
+
export interface UsuarioStatusProgramado {
|
|
31
|
+
executado: boolean;
|
|
32
|
+
tipo: 'Ativo' | 'Demitido';
|
|
33
|
+
data_prevista: any;
|
|
34
|
+
}
|
|
35
|
+
export type UsuarioBase = Omit<Partial<Usuario>, '_joins' | '_avatarBlob' | '_avatarBlobThumbnail' | '_jornadaAtual'>;
|
|
36
|
+
export declare class Usuario {
|
|
37
|
+
_id?: string;
|
|
38
|
+
_path?: string;
|
|
39
|
+
_avatarBlob?: Blob;
|
|
40
|
+
_avatarBlobThumbnail?: Blob;
|
|
41
|
+
_jornadaAtual?: any;
|
|
42
|
+
_joins?: {
|
|
43
|
+
cargo?: Cargo;
|
|
44
|
+
esocial_categoria_de_trabalhador?: EsocialCategoriaDeTrabalhador;
|
|
45
|
+
conta?: any;
|
|
46
|
+
departamento?: Departamento;
|
|
47
|
+
empresa?: Empresa;
|
|
48
|
+
escala?: Escala;
|
|
49
|
+
perimetros?: any[];
|
|
50
|
+
perfil?: Perfil;
|
|
51
|
+
multiplosPerimetros?: any[];
|
|
52
|
+
};
|
|
53
|
+
cargo_ref?: any;
|
|
54
|
+
esocial_categoria_de_trabalhador_ref?: any;
|
|
55
|
+
conta_ref?: any;
|
|
56
|
+
departamento_ref?: any;
|
|
57
|
+
empresa_ref?: any;
|
|
58
|
+
escala_ref?: any;
|
|
59
|
+
perimetros_refs?: any[];
|
|
60
|
+
perfil_ref?: any;
|
|
61
|
+
admissao?: any;
|
|
62
|
+
ativo?: boolean;
|
|
63
|
+
avatar_atualizacao?: any;
|
|
64
|
+
avatar_thumbnail_path?: string;
|
|
65
|
+
avatar_thumbnail_url?: string;
|
|
66
|
+
avatarUrl?: string;
|
|
67
|
+
beneficios?: BeneficiosUsuario;
|
|
68
|
+
celular?: string;
|
|
69
|
+
cpf?: string;
|
|
70
|
+
data_atualizacao_doc?: any;
|
|
71
|
+
data_criacao_doc?: any;
|
|
72
|
+
desligamento?: any;
|
|
73
|
+
email?: string;
|
|
74
|
+
endereco?: Endereco;
|
|
75
|
+
endereco_prestacao_diferente_empresa?: boolean;
|
|
76
|
+
endereco_prestacao?: Endereco;
|
|
77
|
+
excluido?: boolean;
|
|
78
|
+
id_externo?: string;
|
|
79
|
+
integracao?: Integracao;
|
|
80
|
+
interno?: boolean;
|
|
81
|
+
nascimento?: any;
|
|
82
|
+
nome?: string;
|
|
83
|
+
nomeCompleto?: string;
|
|
84
|
+
observacoes?: string;
|
|
85
|
+
parametros?: ParametrosUsuario;
|
|
86
|
+
pin?: number;
|
|
87
|
+
pis?: string;
|
|
88
|
+
sem_autenticacao?: boolean;
|
|
89
|
+
status?: StatusUsuario;
|
|
90
|
+
status_data_ini?: any;
|
|
91
|
+
status_data_fim?: any;
|
|
92
|
+
status_programado?: UsuarioStatusProgramado;
|
|
93
|
+
telefone?: string;
|
|
94
|
+
modificador?: Partial<AuditoriaModificadorBase>;
|
|
95
|
+
constructor(usuarioPayload: Partial<Usuario>);
|
|
96
|
+
}
|
|
97
|
+
export declare class EsocialCategoriaDeTrabalhador {
|
|
98
|
+
_id: string;
|
|
99
|
+
_path: string;
|
|
100
|
+
codigo?: number;
|
|
101
|
+
descricao?: string;
|
|
102
|
+
grupo?: string;
|
|
103
|
+
constructor({ codigo, descricao, grupo, }: {
|
|
104
|
+
codigo?: number;
|
|
105
|
+
descricao?: string;
|
|
106
|
+
grupo?: string;
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
export declare enum EnumTipoIntegracao {
|
|
110
|
+
EPLUGIN = "EPLUGIN",
|
|
111
|
+
ECONTADOR = "ECONTADOR",
|
|
112
|
+
CONTROL_ID = "CONTROL_ID"
|
|
113
|
+
}
|
|
114
|
+
export interface IUsuarioStatusProgramado {
|
|
115
|
+
executado: boolean;
|
|
116
|
+
tipo: 'Ativo' | 'Demitido';
|
|
117
|
+
data_prevista: any;
|
|
118
|
+
}
|
|
119
|
+
export declare class Integracao {
|
|
120
|
+
id: string;
|
|
121
|
+
tipo: EnumTipoIntegracao;
|
|
122
|
+
constructor({ id, tipo }: {
|
|
123
|
+
id: string;
|
|
124
|
+
tipo: EnumTipoIntegracao;
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
export declare class BeneficiosUsuario {
|
|
128
|
+
vale_transporte?: boolean;
|
|
129
|
+
vale_refeicao?: boolean;
|
|
130
|
+
vale_alimentacao?: boolean;
|
|
131
|
+
constructor({ vale_transporte, vale_refeicao, vale_alimentacao, }: BeneficiosUsuario);
|
|
132
|
+
}
|
|
133
|
+
export declare class ParametrosHorarioNoturno {
|
|
134
|
+
tipo: EnumParametrosTipoHorarioNoturno;
|
|
135
|
+
inicio: string;
|
|
136
|
+
fim: string;
|
|
137
|
+
hora_reduzida_segundos: number;
|
|
138
|
+
constructor({ fim, hora_reduzida_segundos, inicio, tipo, }: ParametrosHorarioNoturno);
|
|
139
|
+
}
|
|
140
|
+
export declare class ParametrosUsuario {
|
|
141
|
+
acessar_manager?: boolean;
|
|
142
|
+
cargo_confianca?: boolean;
|
|
143
|
+
codigo_externo?: string;
|
|
144
|
+
configuracao_tipo_falta_jornada?: string;
|
|
145
|
+
horario_noturno?: ParametrosHorarioNoturno;
|
|
146
|
+
horista?: boolean;
|
|
147
|
+
limite_minutos_interjornada?: number;
|
|
148
|
+
marca_ponto_apenas_online?: boolean;
|
|
149
|
+
marca_ponto_flit?: boolean;
|
|
150
|
+
marca_ponto_multi_empresa?: boolean;
|
|
151
|
+
marca_ponto_web?: boolean;
|
|
152
|
+
reconhecimento_facial_obrigatorio?: boolean;
|
|
153
|
+
reconhecimento_facial?: boolean;
|
|
154
|
+
regime_compensacao?: string;
|
|
155
|
+
marcacao_whatsapp?: boolean;
|
|
156
|
+
capturar_foto_marcacao_externa?: boolean;
|
|
157
|
+
capturar_localizacao_marcacao_externa?: boolean;
|
|
158
|
+
constructor({ acessar_manager, capturar_foto_marcacao_externa, capturar_localizacao_marcacao_externa, cargo_confianca, codigo_externo, configuracao_tipo_falta_jornada, horario_noturno, horista, limite_minutos_interjornada, marca_ponto_apenas_online, marca_ponto_flit, marca_ponto_multi_empresa, marca_ponto_web, marcacao_whatsapp, reconhecimento_facial_obrigatorio, reconhecimento_facial, regime_compensacao, }: ParametrosUsuario);
|
|
159
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ParametrosUsuario = exports.ParametrosHorarioNoturno = exports.BeneficiosUsuario = exports.Integracao = exports.EnumTipoIntegracao = exports.EsocialCategoriaDeTrabalhador = exports.Usuario = exports.StatusUsuarioArray = exports.EnumParametrosTipoHorarioNoturno = exports.StatusUsuario = void 0;
|
|
18
|
+
var lodash_1 = require("lodash");
|
|
19
|
+
var number_helper_1 = require("../../utils/number-helper");
|
|
20
|
+
var parametros_compartilhados_1 = require("../parametros_compartilhados");
|
|
21
|
+
__exportStar(require("./usuario-elastic-convert"), exports);
|
|
22
|
+
__exportStar(require("./usuario-fire-convert"), exports);
|
|
23
|
+
__exportStar(require("./usuario-json-convert"), exports);
|
|
24
|
+
var StatusUsuario;
|
|
25
|
+
(function (StatusUsuario) {
|
|
26
|
+
StatusUsuario["Afastado"] = "Afastado";
|
|
27
|
+
StatusUsuario["Ativo"] = "Ativo";
|
|
28
|
+
StatusUsuario["AguardandoAtivacao"] = "Aguardando Ativa\u00E7\u00E3o";
|
|
29
|
+
StatusUsuario["Demitido"] = "Demitido";
|
|
30
|
+
StatusUsuario["Ferias"] = "F\u00E9rias";
|
|
31
|
+
StatusUsuario["SuspensaoContrato"] = "Suspens\u00E3o de contrato";
|
|
32
|
+
})(StatusUsuario = exports.StatusUsuario || (exports.StatusUsuario = {}));
|
|
33
|
+
var EnumParametrosTipoHorarioNoturno;
|
|
34
|
+
(function (EnumParametrosTipoHorarioNoturno) {
|
|
35
|
+
EnumParametrosTipoHorarioNoturno["URBANO"] = "URBANO";
|
|
36
|
+
EnumParametrosTipoHorarioNoturno["RURAL"] = "RURAL";
|
|
37
|
+
EnumParametrosTipoHorarioNoturno["PECUARIA"] = "PECUARIA";
|
|
38
|
+
EnumParametrosTipoHorarioNoturno["CUSTOMIZADO"] = "CUSTOMIZADO";
|
|
39
|
+
})(EnumParametrosTipoHorarioNoturno = exports.EnumParametrosTipoHorarioNoturno || (exports.EnumParametrosTipoHorarioNoturno = {}));
|
|
40
|
+
exports.StatusUsuarioArray = [
|
|
41
|
+
{ label: StatusUsuario.Afastado, key: StatusUsuario.Afastado },
|
|
42
|
+
{ label: StatusUsuario.Ativo, key: StatusUsuario.Ativo },
|
|
43
|
+
{ label: 'Desligado', key: StatusUsuario.Demitido },
|
|
44
|
+
{ label: 'Aguardando Ativação', key: StatusUsuario.AguardandoAtivacao },
|
|
45
|
+
{ label: StatusUsuario.Ferias, key: StatusUsuario.Ferias },
|
|
46
|
+
{
|
|
47
|
+
label: StatusUsuario.SuspensaoContrato,
|
|
48
|
+
key: StatusUsuario.SuspensaoContrato,
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
var Usuario = /** @class */ (function () {
|
|
52
|
+
function Usuario(usuarioPayload) {
|
|
53
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21;
|
|
54
|
+
this._id = (_a = usuarioPayload._id) !== null && _a !== void 0 ? _a : undefined;
|
|
55
|
+
this._path = (_b = usuarioPayload._path) !== null && _b !== void 0 ? _b : undefined;
|
|
56
|
+
// Inicializa internos
|
|
57
|
+
this._joins = (_c = usuarioPayload._joins) !== null && _c !== void 0 ? _c : {
|
|
58
|
+
cargo: null,
|
|
59
|
+
conta: null,
|
|
60
|
+
departamento: null,
|
|
61
|
+
empresa: null,
|
|
62
|
+
escala: null,
|
|
63
|
+
esocial_categoria_de_trabalhador: null,
|
|
64
|
+
multiplosPerimetros: null,
|
|
65
|
+
perfil: null,
|
|
66
|
+
perimetros: null,
|
|
67
|
+
};
|
|
68
|
+
this._avatarBlob = (_d = usuarioPayload._avatarBlob) !== null && _d !== void 0 ? _d : null;
|
|
69
|
+
this._avatarBlobThumbnail = (_e = usuarioPayload._avatarBlobThumbnail) !== null && _e !== void 0 ? _e : null;
|
|
70
|
+
this._jornadaAtual = (_f = usuarioPayload._jornadaAtual) !== null && _f !== void 0 ? _f : null;
|
|
71
|
+
this.admissao = (_g = usuarioPayload.admissao) !== null && _g !== void 0 ? _g : undefined;
|
|
72
|
+
this.ativo = (_h = usuarioPayload.ativo) !== null && _h !== void 0 ? _h : undefined;
|
|
73
|
+
this.avatar_thumbnail_path =
|
|
74
|
+
(_j = usuarioPayload.avatar_thumbnail_path) !== null && _j !== void 0 ? _j : undefined;
|
|
75
|
+
this.avatar_thumbnail_url =
|
|
76
|
+
(_k = usuarioPayload.avatar_thumbnail_url) !== null && _k !== void 0 ? _k : undefined;
|
|
77
|
+
this.avatarUrl = (_l = usuarioPayload.avatarUrl) !== null && _l !== void 0 ? _l : undefined;
|
|
78
|
+
this.cargo_ref = (_m = usuarioPayload.cargo_ref) !== null && _m !== void 0 ? _m : undefined;
|
|
79
|
+
this.beneficios = (_o = usuarioPayload.beneficios) !== null && _o !== void 0 ? _o : undefined;
|
|
80
|
+
this.celular = (_p = usuarioPayload.celular) !== null && _p !== void 0 ? _p : undefined;
|
|
81
|
+
this.conta_ref = (_q = usuarioPayload.conta_ref) !== null && _q !== void 0 ? _q : undefined;
|
|
82
|
+
this.cpf = (_r = usuarioPayload.cpf) !== null && _r !== void 0 ? _r : undefined;
|
|
83
|
+
this.data_atualizacao_doc =
|
|
84
|
+
(_s = usuarioPayload.data_atualizacao_doc) !== null && _s !== void 0 ? _s : undefined;
|
|
85
|
+
this.data_criacao_doc = (_t = usuarioPayload.data_criacao_doc) !== null && _t !== void 0 ? _t : undefined;
|
|
86
|
+
this.departamento_ref = (_u = usuarioPayload.departamento_ref) !== null && _u !== void 0 ? _u : undefined;
|
|
87
|
+
this.desligamento = (_v = usuarioPayload.desligamento) !== null && _v !== void 0 ? _v : undefined;
|
|
88
|
+
this.email = (_w = usuarioPayload.email) !== null && _w !== void 0 ? _w : undefined;
|
|
89
|
+
this.empresa_ref = (_x = usuarioPayload.empresa_ref) !== null && _x !== void 0 ? _x : undefined;
|
|
90
|
+
this.endereco = (_y = usuarioPayload.endereco) !== null && _y !== void 0 ? _y : undefined;
|
|
91
|
+
this.endereco_prestacao_diferente_empresa =
|
|
92
|
+
(_z = usuarioPayload.endereco_prestacao_diferente_empresa) !== null && _z !== void 0 ? _z : false;
|
|
93
|
+
this.endereco_prestacao = (_0 = usuarioPayload.endereco_prestacao) !== null && _0 !== void 0 ? _0 : undefined;
|
|
94
|
+
this.escala_ref = (_1 = usuarioPayload.escala_ref) !== null && _1 !== void 0 ? _1 : undefined;
|
|
95
|
+
this.esocial_categoria_de_trabalhador_ref =
|
|
96
|
+
(_2 = usuarioPayload.esocial_categoria_de_trabalhador_ref) !== null && _2 !== void 0 ? _2 : undefined;
|
|
97
|
+
this.excluido = (_3 = usuarioPayload.excluido) !== null && _3 !== void 0 ? _3 : undefined;
|
|
98
|
+
this.integracao = (_4 = usuarioPayload.integracao) !== null && _4 !== void 0 ? _4 : undefined;
|
|
99
|
+
this.interno = (_5 = usuarioPayload.interno) !== null && _5 !== void 0 ? _5 : undefined;
|
|
100
|
+
this.modificador = (_6 = usuarioPayload.modificador) !== null && _6 !== void 0 ? _6 : undefined;
|
|
101
|
+
this.nascimento = (_7 = usuarioPayload.nascimento) !== null && _7 !== void 0 ? _7 : undefined;
|
|
102
|
+
this.nome = (_8 = usuarioPayload.nome) !== null && _8 !== void 0 ? _8 : undefined;
|
|
103
|
+
this.nomeCompleto = (_9 = usuarioPayload.nomeCompleto) !== null && _9 !== void 0 ? _9 : undefined;
|
|
104
|
+
this.observacoes = (_10 = usuarioPayload.observacoes) !== null && _10 !== void 0 ? _10 : undefined;
|
|
105
|
+
this.parametros = (_11 = usuarioPayload.parametros) !== null && _11 !== void 0 ? _11 : undefined;
|
|
106
|
+
this.perfil_ref = (_12 = usuarioPayload.perfil_ref) !== null && _12 !== void 0 ? _12 : undefined;
|
|
107
|
+
this.perimetros_refs = (_13 = usuarioPayload.perimetros_refs) !== null && _13 !== void 0 ? _13 : undefined;
|
|
108
|
+
this.pin = (_14 = usuarioPayload.pin) !== null && _14 !== void 0 ? _14 : undefined;
|
|
109
|
+
this.pis = (_15 = usuarioPayload.pis) !== null && _15 !== void 0 ? _15 : undefined;
|
|
110
|
+
this.sem_autenticacao = (_16 = usuarioPayload.sem_autenticacao) !== null && _16 !== void 0 ? _16 : undefined;
|
|
111
|
+
this.status = (_17 = usuarioPayload.status) !== null && _17 !== void 0 ? _17 : undefined;
|
|
112
|
+
this.status_data_fim = (_18 = usuarioPayload.status_data_fim) !== null && _18 !== void 0 ? _18 : undefined;
|
|
113
|
+
this.status_data_ini = (_19 = usuarioPayload.status_data_ini) !== null && _19 !== void 0 ? _19 : undefined;
|
|
114
|
+
this.status_programado = (_20 = usuarioPayload.status_programado) !== null && _20 !== void 0 ? _20 : undefined;
|
|
115
|
+
this.telefone = (_21 = usuarioPayload.telefone) !== null && _21 !== void 0 ? _21 : undefined;
|
|
116
|
+
}
|
|
117
|
+
return Usuario;
|
|
118
|
+
}());
|
|
119
|
+
exports.Usuario = Usuario;
|
|
120
|
+
var EsocialCategoriaDeTrabalhador = /** @class */ (function () {
|
|
121
|
+
function EsocialCategoriaDeTrabalhador(_a) {
|
|
122
|
+
var codigo = _a.codigo, descricao = _a.descricao, grupo = _a.grupo;
|
|
123
|
+
this.codigo = codigo !== null && codigo !== void 0 ? codigo : undefined;
|
|
124
|
+
this.descricao = descricao !== null && descricao !== void 0 ? descricao : undefined;
|
|
125
|
+
this.grupo = grupo !== null && grupo !== void 0 ? grupo : undefined;
|
|
126
|
+
}
|
|
127
|
+
return EsocialCategoriaDeTrabalhador;
|
|
128
|
+
}());
|
|
129
|
+
exports.EsocialCategoriaDeTrabalhador = EsocialCategoriaDeTrabalhador;
|
|
130
|
+
var EnumTipoIntegracao;
|
|
131
|
+
(function (EnumTipoIntegracao) {
|
|
132
|
+
EnumTipoIntegracao["EPLUGIN"] = "EPLUGIN";
|
|
133
|
+
EnumTipoIntegracao["ECONTADOR"] = "ECONTADOR";
|
|
134
|
+
EnumTipoIntegracao["CONTROL_ID"] = "CONTROL_ID";
|
|
135
|
+
})(EnumTipoIntegracao = exports.EnumTipoIntegracao || (exports.EnumTipoIntegracao = {}));
|
|
136
|
+
var Integracao = /** @class */ (function () {
|
|
137
|
+
function Integracao(_a) {
|
|
138
|
+
var id = _a.id, tipo = _a.tipo;
|
|
139
|
+
this.id = id !== null && id !== void 0 ? id : undefined;
|
|
140
|
+
this.tipo = tipo !== null && tipo !== void 0 ? tipo : undefined;
|
|
141
|
+
}
|
|
142
|
+
return Integracao;
|
|
143
|
+
}());
|
|
144
|
+
exports.Integracao = Integracao;
|
|
145
|
+
var BeneficiosUsuario = /** @class */ (function () {
|
|
146
|
+
function BeneficiosUsuario(_a) {
|
|
147
|
+
var vale_transporte = _a.vale_transporte, vale_refeicao = _a.vale_refeicao, vale_alimentacao = _a.vale_alimentacao;
|
|
148
|
+
this.vale_transporte = vale_transporte !== null && vale_transporte !== void 0 ? vale_transporte : false;
|
|
149
|
+
this.vale_refeicao = vale_refeicao !== null && vale_refeicao !== void 0 ? vale_refeicao : false;
|
|
150
|
+
this.vale_alimentacao = vale_alimentacao !== null && vale_alimentacao !== void 0 ? vale_alimentacao : false;
|
|
151
|
+
}
|
|
152
|
+
return BeneficiosUsuario;
|
|
153
|
+
}());
|
|
154
|
+
exports.BeneficiosUsuario = BeneficiosUsuario;
|
|
155
|
+
var ParametrosHorarioNoturno = /** @class */ (function () {
|
|
156
|
+
function ParametrosHorarioNoturno(_a) {
|
|
157
|
+
var fim = _a.fim, hora_reduzida_segundos = _a.hora_reduzida_segundos, inicio = _a.inicio, tipo = _a.tipo;
|
|
158
|
+
this.tipo = tipo !== null && tipo !== void 0 ? tipo : undefined;
|
|
159
|
+
this.inicio = inicio !== null && inicio !== void 0 ? inicio : undefined;
|
|
160
|
+
this.fim = fim !== null && fim !== void 0 ? fim : undefined;
|
|
161
|
+
this.hora_reduzida_segundos = hora_reduzida_segundos !== null && hora_reduzida_segundos !== void 0 ? hora_reduzida_segundos : undefined;
|
|
162
|
+
}
|
|
163
|
+
return ParametrosHorarioNoturno;
|
|
164
|
+
}());
|
|
165
|
+
exports.ParametrosHorarioNoturno = ParametrosHorarioNoturno;
|
|
166
|
+
var ParametrosUsuario = /** @class */ (function () {
|
|
167
|
+
function ParametrosUsuario(_a) {
|
|
168
|
+
var acessar_manager = _a.acessar_manager, capturar_foto_marcacao_externa = _a.capturar_foto_marcacao_externa, capturar_localizacao_marcacao_externa = _a.capturar_localizacao_marcacao_externa, cargo_confianca = _a.cargo_confianca, codigo_externo = _a.codigo_externo, configuracao_tipo_falta_jornada = _a.configuracao_tipo_falta_jornada, horario_noturno = _a.horario_noturno, horista = _a.horista, limite_minutos_interjornada = _a.limite_minutos_interjornada, marca_ponto_apenas_online = _a.marca_ponto_apenas_online, marca_ponto_flit = _a.marca_ponto_flit, marca_ponto_multi_empresa = _a.marca_ponto_multi_empresa, marca_ponto_web = _a.marca_ponto_web, marcacao_whatsapp = _a.marcacao_whatsapp, reconhecimento_facial_obrigatorio = _a.reconhecimento_facial_obrigatorio, reconhecimento_facial = _a.reconhecimento_facial, regime_compensacao = _a.regime_compensacao;
|
|
169
|
+
this.acessar_manager = acessar_manager !== null && acessar_manager !== void 0 ? acessar_manager : false;
|
|
170
|
+
this.codigo_externo = codigo_externo !== null && codigo_externo !== void 0 ? codigo_externo : undefined;
|
|
171
|
+
this.cargo_confianca = cargo_confianca !== null && cargo_confianca !== void 0 ? cargo_confianca : false;
|
|
172
|
+
this.horista = horista !== null && horista !== void 0 ? horista : false;
|
|
173
|
+
this.marca_ponto_apenas_online = marca_ponto_apenas_online !== null && marca_ponto_apenas_online !== void 0 ? marca_ponto_apenas_online : true;
|
|
174
|
+
this.marca_ponto_flit = marca_ponto_flit !== null && marca_ponto_flit !== void 0 ? marca_ponto_flit : true;
|
|
175
|
+
this.marca_ponto_multi_empresa = marca_ponto_multi_empresa !== null && marca_ponto_multi_empresa !== void 0 ? marca_ponto_multi_empresa : false;
|
|
176
|
+
this.marca_ponto_web = marca_ponto_web !== null && marca_ponto_web !== void 0 ? marca_ponto_web : true;
|
|
177
|
+
this.reconhecimento_facial = reconhecimento_facial !== null && reconhecimento_facial !== void 0 ? reconhecimento_facial : false;
|
|
178
|
+
this.reconhecimento_facial_obrigatorio =
|
|
179
|
+
reconhecimento_facial_obrigatorio !== null && reconhecimento_facial_obrigatorio !== void 0 ? reconhecimento_facial_obrigatorio : false;
|
|
180
|
+
this.regime_compensacao = regime_compensacao !== null && regime_compensacao !== void 0 ? regime_compensacao : undefined;
|
|
181
|
+
this.limite_minutos_interjornada = number_helper_1.NumberHelper.convertToNumber(limite_minutos_interjornada);
|
|
182
|
+
this.configuracao_tipo_falta_jornada =
|
|
183
|
+
configuracao_tipo_falta_jornada !== null && configuracao_tipo_falta_jornada !== void 0 ? configuracao_tipo_falta_jornada : parametros_compartilhados_1.EnumConfiguracaoTipoFaltaJornada.FALTA_NORMAL;
|
|
184
|
+
this.horario_noturno =
|
|
185
|
+
(0, lodash_1.isNil)(horario_noturno) || (0, lodash_1.isEmpty)(horario_noturno)
|
|
186
|
+
? undefined
|
|
187
|
+
: new ParametrosHorarioNoturno(horario_noturno);
|
|
188
|
+
this.capturar_foto_marcacao_externa =
|
|
189
|
+
capturar_foto_marcacao_externa !== null && capturar_foto_marcacao_externa !== void 0 ? capturar_foto_marcacao_externa : undefined;
|
|
190
|
+
this.capturar_localizacao_marcacao_externa =
|
|
191
|
+
capturar_localizacao_marcacao_externa !== null && capturar_localizacao_marcacao_externa !== void 0 ? capturar_localizacao_marcacao_externa : undefined;
|
|
192
|
+
this.marcacao_whatsapp = marcacao_whatsapp !== null && marcacao_whatsapp !== void 0 ? marcacao_whatsapp : false;
|
|
193
|
+
}
|
|
194
|
+
return ParametrosUsuario;
|
|
195
|
+
}());
|
|
196
|
+
exports.ParametrosUsuario = ParametrosUsuario;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { BeneficiosUsuario, Integracao, IUsuarioStatusProgramado, ParametrosUsuario, StatusUsuario, Usuario } from '.';
|
|
2
|
+
import { AuditoriaModificadorFirestoreData } from '../auditoria/modificador';
|
|
3
|
+
import { Endereco } from '../shared';
|
|
4
|
+
export interface UsuarioElasticSource {
|
|
5
|
+
i_created?: string;
|
|
6
|
+
i_id?: string;
|
|
7
|
+
i_parent_id?: string;
|
|
8
|
+
i_path?: string;
|
|
9
|
+
i_type_sync?: string;
|
|
10
|
+
i_updated?: string;
|
|
11
|
+
_avatarBlob?: Blob;
|
|
12
|
+
_avatarBlobThumbnail?: Blob;
|
|
13
|
+
_jornadaAtual?: any;
|
|
14
|
+
esocial_categoria_de_trabalhador_ref?: any;
|
|
15
|
+
conta_ref?: any;
|
|
16
|
+
perimetros_refs?: any;
|
|
17
|
+
cargo_ref?: any;
|
|
18
|
+
departamento_ref?: any;
|
|
19
|
+
empresa_ref?: any;
|
|
20
|
+
escala_ref?: any;
|
|
21
|
+
perfil_ref?: any;
|
|
22
|
+
admissao?: string;
|
|
23
|
+
ativo?: boolean;
|
|
24
|
+
avatar_atualizacao?: string;
|
|
25
|
+
avatar_thumbnail_path?: string;
|
|
26
|
+
avatar_thumbnail_url?: string;
|
|
27
|
+
avatarUrl?: string;
|
|
28
|
+
beneficios?: BeneficiosUsuario;
|
|
29
|
+
celular?: string;
|
|
30
|
+
cpf?: string;
|
|
31
|
+
data_atualizacao_doc?: string;
|
|
32
|
+
data_criacao_doc?: string;
|
|
33
|
+
desligamento?: string;
|
|
34
|
+
email?: string;
|
|
35
|
+
endereco?: Endereco;
|
|
36
|
+
endereco_prestacao_diferente_empresa?: boolean;
|
|
37
|
+
endereco_prestacao?: Endereco;
|
|
38
|
+
excluido?: boolean;
|
|
39
|
+
id_externo?: string;
|
|
40
|
+
integracao?: Integracao;
|
|
41
|
+
interno?: boolean;
|
|
42
|
+
nascimento?: string;
|
|
43
|
+
nome?: string;
|
|
44
|
+
nomeCompleto?: string;
|
|
45
|
+
observacoes?: string;
|
|
46
|
+
parametros?: ParametrosUsuario;
|
|
47
|
+
pin?: number;
|
|
48
|
+
pis?: string;
|
|
49
|
+
sem_autenticacao?: boolean;
|
|
50
|
+
status?: StatusUsuario;
|
|
51
|
+
status_data_ini?: string;
|
|
52
|
+
status_data_fim?: string;
|
|
53
|
+
status_programado?: IUsuarioStatusProgramado;
|
|
54
|
+
telefone?: string;
|
|
55
|
+
modificador?: Partial<AuditoriaModificadorFirestoreData>;
|
|
56
|
+
}
|
|
57
|
+
export declare abstract class UsuarioElasticConvert {
|
|
58
|
+
static fromElastic(doc: UsuarioElasticSource): Usuario;
|
|
59
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UsuarioElasticConvert = void 0;
|
|
4
|
+
var lodash_1 = require("lodash");
|
|
5
|
+
var _1 = require(".");
|
|
6
|
+
var boolean_helper_1 = require("../../utils/boolean-helper");
|
|
7
|
+
var date_helper_1 = require("../../utils/date-helper");
|
|
8
|
+
var number_helper_1 = require("../../utils/number-helper");
|
|
9
|
+
var string_helper_1 = require("../../utils/string-helper");
|
|
10
|
+
var UsuarioElasticConvert = /** @class */ (function () {
|
|
11
|
+
function UsuarioElasticConvert() {
|
|
12
|
+
}
|
|
13
|
+
UsuarioElasticConvert.fromElastic = function (doc) {
|
|
14
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15;
|
|
15
|
+
var docData = doc;
|
|
16
|
+
return new _1.Usuario({
|
|
17
|
+
_id: (_a = doc === null || doc === void 0 ? void 0 : doc.i_id) !== null && _a !== void 0 ? _a : null,
|
|
18
|
+
_path: (_b = doc === null || doc === void 0 ? void 0 : doc.i_path) !== null && _b !== void 0 ? _b : null,
|
|
19
|
+
admissao: date_helper_1.DateHelper.fromString(docData.admissao, null),
|
|
20
|
+
ativo: boolean_helper_1.BooleanHelper.check(docData.ativo, true),
|
|
21
|
+
avatar_atualizacao: date_helper_1.DateHelper.fromString(docData.avatar_atualizacao, null),
|
|
22
|
+
avatar_thumbnail_path: string_helper_1.StringHelper.trim(docData.avatar_thumbnail_path, null),
|
|
23
|
+
avatar_thumbnail_url: string_helper_1.StringHelper.trim(docData.avatar_thumbnail_url, null),
|
|
24
|
+
avatarUrl: string_helper_1.StringHelper.trim(docData.avatarUrl, null),
|
|
25
|
+
beneficios: docData.beneficios
|
|
26
|
+
? {
|
|
27
|
+
vale_alimentacao: (_c = docData.beneficios.vale_alimentacao) !== null && _c !== void 0 ? _c : false,
|
|
28
|
+
vale_refeicao: (_d = docData.beneficios.vale_refeicao) !== null && _d !== void 0 ? _d : false,
|
|
29
|
+
vale_transporte: (_e = docData.beneficios.vale_transporte) !== null && _e !== void 0 ? _e : false,
|
|
30
|
+
}
|
|
31
|
+
: null,
|
|
32
|
+
cargo_ref: (_g = (_f = docData.cargo_ref) === null || _f === void 0 ? void 0 : _f.i_path) !== null && _g !== void 0 ? _g : null,
|
|
33
|
+
celular: string_helper_1.StringHelper.trim(docData.celular, null),
|
|
34
|
+
conta_ref: (_j = (_h = docData.conta_ref) === null || _h === void 0 ? void 0 : _h.i_path) !== null && _j !== void 0 ? _j : null,
|
|
35
|
+
cpf: string_helper_1.StringHelper.trim(docData.cpf, null),
|
|
36
|
+
data_atualizacao_doc: date_helper_1.DateHelper.fromString(docData.data_atualizacao_doc, new Date()),
|
|
37
|
+
data_criacao_doc: date_helper_1.DateHelper.fromString(docData.data_atualizacao_doc, new Date()),
|
|
38
|
+
departamento_ref: (_l = (_k = docData.departamento_ref) === null || _k === void 0 ? void 0 : _k.i_path) !== null && _l !== void 0 ? _l : null,
|
|
39
|
+
desligamento: date_helper_1.DateHelper.fromString(docData.desligamento, null),
|
|
40
|
+
email: string_helper_1.StringHelper.trim(docData.email, null),
|
|
41
|
+
empresa_ref: (_o = (_m = docData.empresa_ref) === null || _m === void 0 ? void 0 : _m.i_path) !== null && _o !== void 0 ? _o : null,
|
|
42
|
+
endereco: docData.endereco
|
|
43
|
+
? {
|
|
44
|
+
bairro: string_helper_1.StringHelper.trim(docData.endereco.bairro, null),
|
|
45
|
+
cep: string_helper_1.StringHelper.trim(docData.endereco.cep, null),
|
|
46
|
+
cidade: string_helper_1.StringHelper.trim(docData.endereco.cidade, null),
|
|
47
|
+
complemento: string_helper_1.StringHelper.trim(docData.endereco.complemento, null),
|
|
48
|
+
logradouro: string_helper_1.StringHelper.trim(docData.endereco.logradouro, null),
|
|
49
|
+
numero: string_helper_1.StringHelper.trim(docData.endereco.numero, null),
|
|
50
|
+
uf: string_helper_1.StringHelper.trim(docData.endereco.uf, null),
|
|
51
|
+
}
|
|
52
|
+
: null,
|
|
53
|
+
endereco_prestacao_diferente_empresa: boolean_helper_1.BooleanHelper.check(docData.endereco_prestacao_diferente_empresa, false),
|
|
54
|
+
endereco_prestacao: docData.endereco_prestacao
|
|
55
|
+
? {
|
|
56
|
+
bairro: string_helper_1.StringHelper.trim(docData.endereco_prestacao.bairro, null),
|
|
57
|
+
cep: string_helper_1.StringHelper.trim(docData.endereco_prestacao.cep, null),
|
|
58
|
+
cidade: string_helper_1.StringHelper.trim(docData.endereco_prestacao.cidade, null),
|
|
59
|
+
complemento: string_helper_1.StringHelper.trim(docData.endereco_prestacao.complemento, null),
|
|
60
|
+
logradouro: string_helper_1.StringHelper.trim(docData.endereco_prestacao.logradouro, null),
|
|
61
|
+
numero: string_helper_1.StringHelper.trim(docData.endereco_prestacao.numero, null),
|
|
62
|
+
uf: string_helper_1.StringHelper.trim(docData.endereco_prestacao.uf, null),
|
|
63
|
+
}
|
|
64
|
+
: null,
|
|
65
|
+
escala_ref: (_q = (_p = docData.escala_ref) === null || _p === void 0 ? void 0 : _p.i_path) !== null && _q !== void 0 ? _q : null,
|
|
66
|
+
esocial_categoria_de_trabalhador_ref: (_s = (_r = docData.esocial_categoria_de_trabalhador_ref) === null || _r === void 0 ? void 0 : _r.i_path) !== null && _s !== void 0 ? _s : null,
|
|
67
|
+
excluido: boolean_helper_1.BooleanHelper.check(docData.excluido, false),
|
|
68
|
+
id_externo: string_helper_1.StringHelper.trim(docData.id_externo, null),
|
|
69
|
+
integracao: docData.integracao
|
|
70
|
+
? {
|
|
71
|
+
id: string_helper_1.StringHelper.trim((_t = docData.integracao) === null || _t === void 0 ? void 0 : _t.id, null),
|
|
72
|
+
tipo: string_helper_1.StringHelper.trim((_u = docData.integracao) === null || _u === void 0 ? void 0 : _u.tipo, null),
|
|
73
|
+
}
|
|
74
|
+
: null,
|
|
75
|
+
interno: boolean_helper_1.BooleanHelper.check(docData.interno, false),
|
|
76
|
+
nascimento: date_helper_1.DateHelper.fromString(docData.nascimento, null),
|
|
77
|
+
nome: string_helper_1.StringHelper.trim(docData.nome, null),
|
|
78
|
+
nomeCompleto: string_helper_1.StringHelper.trim(docData.nomeCompleto, null),
|
|
79
|
+
observacoes: string_helper_1.StringHelper.trim(docData.observacoes, null),
|
|
80
|
+
parametros: docData.parametros
|
|
81
|
+
? {
|
|
82
|
+
acessar_manager: boolean_helper_1.BooleanHelper.check(docData.parametros.acessar_manager, null),
|
|
83
|
+
capturar_foto_marcacao_externa: boolean_helper_1.BooleanHelper.check(docData.parametros.capturar_foto_marcacao_externa, null),
|
|
84
|
+
capturar_localizacao_marcacao_externa: boolean_helper_1.BooleanHelper.check(docData.parametros.capturar_localizacao_marcacao_externa, null),
|
|
85
|
+
cargo_confianca: boolean_helper_1.BooleanHelper.check(docData.parametros.cargo_confianca, null),
|
|
86
|
+
codigo_externo: string_helper_1.StringHelper.check(docData.parametros.codigo_externo, null),
|
|
87
|
+
horario_noturno: ((_v = docData.parametros) === null || _v === void 0 ? void 0 : _v.horario_noturno)
|
|
88
|
+
? {
|
|
89
|
+
tipo: string_helper_1.StringHelper.check((_w = docData.parametros.horario_noturno) === null || _w === void 0 ? void 0 : _w.tipo, null),
|
|
90
|
+
inicio: string_helper_1.StringHelper.check((_x = docData.parametros.horario_noturno) === null || _x === void 0 ? void 0 : _x.inicio, null),
|
|
91
|
+
fim: string_helper_1.StringHelper.check((_y = docData.parametros.horario_noturno) === null || _y === void 0 ? void 0 : _y.fim, null),
|
|
92
|
+
hora_reduzida_segundos: number_helper_1.NumberHelper.convertToNumber((_z = docData.parametros.horario_noturno) === null || _z === void 0 ? void 0 : _z.hora_reduzida_segundos),
|
|
93
|
+
}
|
|
94
|
+
: null,
|
|
95
|
+
horista: boolean_helper_1.BooleanHelper.check(docData.parametros.horista, null),
|
|
96
|
+
marcacao_whatsapp: boolean_helper_1.BooleanHelper.check(docData.parametros.marcacao_whatsapp, null),
|
|
97
|
+
marca_ponto_web: boolean_helper_1.BooleanHelper.check(docData.parametros.marca_ponto_web, null),
|
|
98
|
+
marca_ponto_multi_empresa: boolean_helper_1.BooleanHelper.check(docData.parametros.marca_ponto_multi_empresa, null),
|
|
99
|
+
marca_ponto_flit: boolean_helper_1.BooleanHelper.check(docData.parametros.marca_ponto_flit, null),
|
|
100
|
+
reconhecimento_facial: boolean_helper_1.BooleanHelper.check(docData.parametros.reconhecimento_facial, null),
|
|
101
|
+
reconhecimento_facial_obrigatorio: boolean_helper_1.BooleanHelper.check(docData.parametros.reconhecimento_facial_obrigatorio, null),
|
|
102
|
+
marca_ponto_apenas_online: boolean_helper_1.BooleanHelper.check(docData.parametros.marca_ponto_apenas_online, null),
|
|
103
|
+
configuracao_tipo_falta_jornada: string_helper_1.StringHelper.check(docData.parametros.configuracao_tipo_falta_jornada, null),
|
|
104
|
+
limite_minutos_interjornada: number_helper_1.NumberHelper.convertToNumber((_0 = docData.parametros) === null || _0 === void 0 ? void 0 : _0.limite_minutos_interjornada),
|
|
105
|
+
regime_compensacao: string_helper_1.StringHelper.check(docData.parametros.regime_compensacao, null),
|
|
106
|
+
}
|
|
107
|
+
: null,
|
|
108
|
+
perfil_ref: (_3 = (_2 = docData.perfil_ref) === null || _2 === void 0 ? void 0 : _2.i_path) !== null && _3 !== void 0 ? _3 : null,
|
|
109
|
+
perimetros_refs: docData.perimetros_refs && docData.perimetros_refs.length
|
|
110
|
+
? docData.perimetros_refs.map(function (ref) { return ref === null || ref === void 0 ? void 0 : ref.i_path; })
|
|
111
|
+
: [],
|
|
112
|
+
pin: number_helper_1.NumberHelper.convertToNumber(docData === null || docData === void 0 ? void 0 : docData.pin),
|
|
113
|
+
pis: string_helper_1.StringHelper.trim(docData.pis, null),
|
|
114
|
+
sem_autenticacao: boolean_helper_1.BooleanHelper.check(docData.sem_autenticacao, false),
|
|
115
|
+
status: string_helper_1.StringHelper.check(docData.status, null),
|
|
116
|
+
status_data_ini: date_helper_1.DateHelper.fromString(docData.status_data_ini, null),
|
|
117
|
+
status_data_fim: date_helper_1.DateHelper.fromString(docData.status_data_fim, null),
|
|
118
|
+
status_programado: docData.status_programado
|
|
119
|
+
? {
|
|
120
|
+
data_prevista: date_helper_1.DateHelper.fromString(docData.status_programado.data_prevista, null),
|
|
121
|
+
executado: boolean_helper_1.BooleanHelper.check(docData.status_programado.executado, null),
|
|
122
|
+
tipo: string_helper_1.StringHelper.check((_4 = docData.status_programado) === null || _4 === void 0 ? void 0 : _4.tipo, null),
|
|
123
|
+
}
|
|
124
|
+
: null,
|
|
125
|
+
telefone: string_helper_1.StringHelper.trim(docData.telefone, null),
|
|
126
|
+
modificador: docData.modificador
|
|
127
|
+
? (0, lodash_1.omitBy)({
|
|
128
|
+
id: (_7 = (_6 = (_5 = docData.modificador) === null || _5 === void 0 ? void 0 : _5.ref) === null || _6 === void 0 ? void 0 : _6.id) !== null && _7 !== void 0 ? _7 : null,
|
|
129
|
+
ref: (_10 = (_9 = (_8 = docData.modificador) === null || _8 === void 0 ? void 0 : _8.ref) === null || _9 === void 0 ? void 0 : _9.path) !== null && _10 !== void 0 ? _10 : null,
|
|
130
|
+
tipo: (_12 = (_11 = docData.modificador) === null || _11 === void 0 ? void 0 : _11.tipo) !== null && _12 !== void 0 ? _12 : null,
|
|
131
|
+
nome: string_helper_1.StringHelper.trim((_13 = docData.modificador) === null || _13 === void 0 ? void 0 : _13.nome, null),
|
|
132
|
+
documento: string_helper_1.StringHelper.trim((_14 = docData.modificador) === null || _14 === void 0 ? void 0 : _14.documento, null),
|
|
133
|
+
email: string_helper_1.StringHelper.trim((_15 = docData.modificador) === null || _15 === void 0 ? void 0 : _15.email, null),
|
|
134
|
+
}, lodash_1.isUndefined)
|
|
135
|
+
: undefined,
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
return UsuarioElasticConvert;
|
|
139
|
+
}());
|
|
140
|
+
exports.UsuarioElasticConvert = UsuarioElasticConvert;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { BeneficiosUsuario, Integracao, ParametrosUsuario, StatusUsuario, Usuario, UsuarioBase, UsuarioStatusProgramado } from '.';
|
|
2
|
+
import { FirebaseDocumentSnapshotGeneric, FirebaseQueryDocumentSnapshotGeneric, FirebaseTimestampGeneric } from '../../../shared/flitModelsDependencyInjection';
|
|
3
|
+
import { AuditoriaModificadorFirestoreData } from '../auditoria/modificador';
|
|
4
|
+
import { Endereco } from '../shared';
|
|
5
|
+
export declare class UsuarioFirestoreData implements Omit<UsuarioBase, 'modificador'> {
|
|
6
|
+
admissao?: FirebaseTimestampGeneric;
|
|
7
|
+
ativo?: boolean;
|
|
8
|
+
avatar_atualizacao?: FirebaseTimestampGeneric;
|
|
9
|
+
avatar_thumbnail_path?: string;
|
|
10
|
+
avatar_thumbnail_url?: string;
|
|
11
|
+
avatarUrl?: string;
|
|
12
|
+
beneficios?: BeneficiosUsuario;
|
|
13
|
+
cargo_ref?: any;
|
|
14
|
+
celular?: string;
|
|
15
|
+
conta_ref?: any;
|
|
16
|
+
cpf?: string;
|
|
17
|
+
data_atualizacao_doc?: FirebaseTimestampGeneric;
|
|
18
|
+
data_criacao_doc?: FirebaseTimestampGeneric;
|
|
19
|
+
departamento_ref?: any;
|
|
20
|
+
desligamento?: FirebaseTimestampGeneric;
|
|
21
|
+
email?: string;
|
|
22
|
+
empresa_ref?: any;
|
|
23
|
+
endereco?: Endereco;
|
|
24
|
+
endereco_prestacao_diferente_empresa?: boolean;
|
|
25
|
+
endereco_prestacao?: Endereco;
|
|
26
|
+
escala_ref?: any;
|
|
27
|
+
esocial_categoria_de_trabalhador_ref?: any;
|
|
28
|
+
excluido?: boolean;
|
|
29
|
+
id_externo?: string;
|
|
30
|
+
integracao?: Integracao;
|
|
31
|
+
interno?: boolean;
|
|
32
|
+
nascimento?: FirebaseTimestampGeneric;
|
|
33
|
+
nome?: string;
|
|
34
|
+
nomeCompleto?: string;
|
|
35
|
+
observacoes?: string;
|
|
36
|
+
parametros?: ParametrosUsuario;
|
|
37
|
+
perfil_ref?: any;
|
|
38
|
+
perimetros_refs?: any[];
|
|
39
|
+
pin?: number;
|
|
40
|
+
pis?: string;
|
|
41
|
+
sem_autenticacao?: boolean;
|
|
42
|
+
status?: StatusUsuario;
|
|
43
|
+
status_data_ini?: FirebaseTimestampGeneric;
|
|
44
|
+
status_data_fim?: FirebaseTimestampGeneric;
|
|
45
|
+
status_programado?: UsuarioStatusProgramado;
|
|
46
|
+
telefone?: string;
|
|
47
|
+
modificador?: AuditoriaModificadorFirestoreData;
|
|
48
|
+
}
|
|
49
|
+
export declare abstract class UsuarioFireConvert {
|
|
50
|
+
static fromFirestore(doc: FirebaseDocumentSnapshotGeneric | FirebaseQueryDocumentSnapshotGeneric): Usuario;
|
|
51
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UsuarioFireConvert = exports.UsuarioFirestoreData = void 0;
|
|
4
|
+
var lodash_1 = require("lodash");
|
|
5
|
+
var _1 = require(".");
|
|
6
|
+
var boolean_helper_1 = require("../../utils/boolean-helper");
|
|
7
|
+
var number_helper_1 = require("../../utils/number-helper");
|
|
8
|
+
var string_helper_1 = require("../../utils/string-helper");
|
|
9
|
+
var UsuarioFirestoreData = /** @class */ (function () {
|
|
10
|
+
function UsuarioFirestoreData() {
|
|
11
|
+
}
|
|
12
|
+
return UsuarioFirestoreData;
|
|
13
|
+
}());
|
|
14
|
+
exports.UsuarioFirestoreData = UsuarioFirestoreData;
|
|
15
|
+
var UsuarioFireConvert = /** @class */ (function () {
|
|
16
|
+
function UsuarioFireConvert() {
|
|
17
|
+
}
|
|
18
|
+
UsuarioFireConvert.fromFirestore = function (doc) {
|
|
19
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28;
|
|
20
|
+
var d = ((_a = doc.data()) !== null && _a !== void 0 ? _a : {});
|
|
21
|
+
return new _1.Usuario({
|
|
22
|
+
_id: (_b = doc === null || doc === void 0 ? void 0 : doc.id) !== null && _b !== void 0 ? _b : null,
|
|
23
|
+
_path: (_d = (_c = doc.ref) === null || _c === void 0 ? void 0 : _c.path) !== null && _d !== void 0 ? _d : null,
|
|
24
|
+
admissao: (_f = (_e = d.admissao) === null || _e === void 0 ? void 0 : _e.toDate()) !== null && _f !== void 0 ? _f : null,
|
|
25
|
+
ativo: boolean_helper_1.BooleanHelper.check(d.ativo, true),
|
|
26
|
+
avatar_atualizacao: (_h = (_g = d.avatar_atualizacao) === null || _g === void 0 ? void 0 : _g.toDate()) !== null && _h !== void 0 ? _h : null,
|
|
27
|
+
avatar_thumbnail_path: string_helper_1.StringHelper.trim(d.avatar_thumbnail_path, null),
|
|
28
|
+
avatar_thumbnail_url: string_helper_1.StringHelper.trim(d.avatar_thumbnail_url, null),
|
|
29
|
+
avatarUrl: string_helper_1.StringHelper.trim(d.avatarUrl, null),
|
|
30
|
+
beneficios: d.beneficios
|
|
31
|
+
? {
|
|
32
|
+
vale_alimentacao: (_j = d.beneficios.vale_alimentacao) !== null && _j !== void 0 ? _j : false,
|
|
33
|
+
vale_refeicao: (_k = d.beneficios.vale_refeicao) !== null && _k !== void 0 ? _k : false,
|
|
34
|
+
vale_transporte: (_l = d.beneficios.vale_transporte) !== null && _l !== void 0 ? _l : false,
|
|
35
|
+
}
|
|
36
|
+
: null,
|
|
37
|
+
cargo_ref: d.cargo_ref ? (_m = d.cargo_ref) === null || _m === void 0 ? void 0 : _m.path : null,
|
|
38
|
+
celular: string_helper_1.StringHelper.trim(d.celular, null),
|
|
39
|
+
conta_ref: d.conta_ref ? (_o = d.conta_ref) === null || _o === void 0 ? void 0 : _o.path : null,
|
|
40
|
+
cpf: string_helper_1.StringHelper.trim(d.cpf, null),
|
|
41
|
+
data_atualizacao_doc: ((_p = d.data_atualizacao_doc) === null || _p === void 0 ? void 0 : _p.toDate()) || new Date(),
|
|
42
|
+
data_criacao_doc: ((_q = d.data_criacao_doc) === null || _q === void 0 ? void 0 : _q.toDate()) || new Date(),
|
|
43
|
+
departamento_ref: d.departamento_ref ? (_r = d.departamento_ref) === null || _r === void 0 ? void 0 : _r.path : null,
|
|
44
|
+
desligamento: (_t = (_s = d.desligamento) === null || _s === void 0 ? void 0 : _s.toDate()) !== null && _t !== void 0 ? _t : null,
|
|
45
|
+
email: string_helper_1.StringHelper.trim(d.email, null),
|
|
46
|
+
empresa_ref: d.empresa_ref ? (_u = d.empresa_ref) === null || _u === void 0 ? void 0 : _u.path : null,
|
|
47
|
+
endereco: d.endereco
|
|
48
|
+
? {
|
|
49
|
+
bairro: string_helper_1.StringHelper.trim(d.endereco.bairro, null),
|
|
50
|
+
cep: string_helper_1.StringHelper.trim(d.endereco.cep, null),
|
|
51
|
+
cidade: string_helper_1.StringHelper.trim(d.endereco.cidade, null),
|
|
52
|
+
complemento: string_helper_1.StringHelper.trim(d.endereco.complemento, null),
|
|
53
|
+
logradouro: string_helper_1.StringHelper.trim(d.endereco.logradouro, null),
|
|
54
|
+
numero: string_helper_1.StringHelper.trim(d.endereco.numero, null),
|
|
55
|
+
uf: string_helper_1.StringHelper.trim(d.endereco.uf, null),
|
|
56
|
+
}
|
|
57
|
+
: null,
|
|
58
|
+
endereco_prestacao_diferente_empresa: boolean_helper_1.BooleanHelper.check(d.endereco_prestacao_diferente_empresa, false),
|
|
59
|
+
endereco_prestacao: d.endereco_prestacao
|
|
60
|
+
? {
|
|
61
|
+
bairro: string_helper_1.StringHelper.trim(d.endereco_prestacao.bairro, null),
|
|
62
|
+
cep: string_helper_1.StringHelper.trim(d.endereco_prestacao.cep, null),
|
|
63
|
+
cidade: string_helper_1.StringHelper.trim(d.endereco_prestacao.cidade, null),
|
|
64
|
+
complemento: string_helper_1.StringHelper.trim(d.endereco_prestacao.complemento, null),
|
|
65
|
+
logradouro: string_helper_1.StringHelper.trim(d.endereco_prestacao.logradouro, null),
|
|
66
|
+
numero: string_helper_1.StringHelper.trim(d.endereco_prestacao.numero, null),
|
|
67
|
+
uf: string_helper_1.StringHelper.trim(d.endereco_prestacao.uf, null),
|
|
68
|
+
}
|
|
69
|
+
: null,
|
|
70
|
+
escala_ref: d.escala_ref ? (_v = d.escala_ref) === null || _v === void 0 ? void 0 : _v.path : null,
|
|
71
|
+
esocial_categoria_de_trabalhador_ref: d.esocial_categoria_de_trabalhador_ref
|
|
72
|
+
? (_w = d.esocial_categoria_de_trabalhador_ref) === null || _w === void 0 ? void 0 : _w.path
|
|
73
|
+
: null,
|
|
74
|
+
excluido: boolean_helper_1.BooleanHelper.check(d.excluido, false),
|
|
75
|
+
id_externo: string_helper_1.StringHelper.trim(d.id_externo, null),
|
|
76
|
+
integracao: d.integracao
|
|
77
|
+
? {
|
|
78
|
+
id: string_helper_1.StringHelper.trim((_x = d.integracao) === null || _x === void 0 ? void 0 : _x.id, null),
|
|
79
|
+
tipo: string_helper_1.StringHelper.trim((_y = d.integracao) === null || _y === void 0 ? void 0 : _y.tipo, null),
|
|
80
|
+
}
|
|
81
|
+
: null,
|
|
82
|
+
interno: boolean_helper_1.BooleanHelper.check(d.interno, false),
|
|
83
|
+
nascimento: (_0 = (_z = d.nascimento) === null || _z === void 0 ? void 0 : _z.toDate()) !== null && _0 !== void 0 ? _0 : null,
|
|
84
|
+
nome: string_helper_1.StringHelper.trim(d.nome, null),
|
|
85
|
+
nomeCompleto: string_helper_1.StringHelper.trim(d.nomeCompleto, null),
|
|
86
|
+
observacoes: string_helper_1.StringHelper.trim(d.observacoes, null),
|
|
87
|
+
parametros: d.parametros
|
|
88
|
+
? {
|
|
89
|
+
acessar_manager: boolean_helper_1.BooleanHelper.check(d.parametros.acessar_manager, null),
|
|
90
|
+
capturar_foto_marcacao_externa: boolean_helper_1.BooleanHelper.check(d.parametros.capturar_foto_marcacao_externa, null),
|
|
91
|
+
capturar_localizacao_marcacao_externa: boolean_helper_1.BooleanHelper.check(d.parametros.capturar_localizacao_marcacao_externa, null),
|
|
92
|
+
cargo_confianca: boolean_helper_1.BooleanHelper.check(d.parametros.cargo_confianca, null),
|
|
93
|
+
codigo_externo: string_helper_1.StringHelper.check(d.parametros.codigo_externo, null),
|
|
94
|
+
horario_noturno: ((_2 = d.parametros) === null || _2 === void 0 ? void 0 : _2.horario_noturno)
|
|
95
|
+
? {
|
|
96
|
+
tipo: string_helper_1.StringHelper.check((_3 = d.parametros.horario_noturno) === null || _3 === void 0 ? void 0 : _3.tipo, null),
|
|
97
|
+
inicio: string_helper_1.StringHelper.check((_4 = d.parametros.horario_noturno) === null || _4 === void 0 ? void 0 : _4.inicio, null),
|
|
98
|
+
fim: string_helper_1.StringHelper.check((_5 = d.parametros.horario_noturno) === null || _5 === void 0 ? void 0 : _5.fim, null),
|
|
99
|
+
hora_reduzida_segundos: number_helper_1.NumberHelper.convertToNumber((_6 = d.parametros.horario_noturno) === null || _6 === void 0 ? void 0 : _6.hora_reduzida_segundos),
|
|
100
|
+
}
|
|
101
|
+
: null,
|
|
102
|
+
horista: boolean_helper_1.BooleanHelper.check(d.parametros.horista, null),
|
|
103
|
+
marcacao_whatsapp: boolean_helper_1.BooleanHelper.check(d.parametros.marcacao_whatsapp, null),
|
|
104
|
+
marca_ponto_web: boolean_helper_1.BooleanHelper.check(d.parametros.marca_ponto_web, null),
|
|
105
|
+
marca_ponto_multi_empresa: boolean_helper_1.BooleanHelper.check(d.parametros.marca_ponto_multi_empresa, null),
|
|
106
|
+
marca_ponto_flit: boolean_helper_1.BooleanHelper.check(d.parametros.marca_ponto_flit, null),
|
|
107
|
+
reconhecimento_facial: boolean_helper_1.BooleanHelper.check(d.parametros.reconhecimento_facial, null),
|
|
108
|
+
reconhecimento_facial_obrigatorio: boolean_helper_1.BooleanHelper.check(d.parametros.reconhecimento_facial_obrigatorio, null),
|
|
109
|
+
marca_ponto_apenas_online: boolean_helper_1.BooleanHelper.check(d.parametros.marca_ponto_apenas_online, null),
|
|
110
|
+
configuracao_tipo_falta_jornada: string_helper_1.StringHelper.check(d.parametros.configuracao_tipo_falta_jornada, null),
|
|
111
|
+
limite_minutos_interjornada: number_helper_1.NumberHelper.convertToNumber((_7 = d.parametros) === null || _7 === void 0 ? void 0 : _7.limite_minutos_interjornada),
|
|
112
|
+
regime_compensacao: string_helper_1.StringHelper.check(d.parametros.regime_compensacao, null),
|
|
113
|
+
}
|
|
114
|
+
: null,
|
|
115
|
+
perfil_ref: d.perfil_ref ? (_8 = d.perfil_ref) === null || _8 === void 0 ? void 0 : _8.path : null,
|
|
116
|
+
perimetros_refs: (_9 = d.perimetros_refs) !== null && _9 !== void 0 ? _9 : [],
|
|
117
|
+
pin: number_helper_1.NumberHelper.convertToNumber(d === null || d === void 0 ? void 0 : d.pin),
|
|
118
|
+
pis: string_helper_1.StringHelper.trim(d.pis, null),
|
|
119
|
+
sem_autenticacao: boolean_helper_1.BooleanHelper.check(d.sem_autenticacao, false),
|
|
120
|
+
status: string_helper_1.StringHelper.check(d.status, null),
|
|
121
|
+
status_data_ini: (_11 = (_10 = d.status_data_ini) === null || _10 === void 0 ? void 0 : _10.toDate()) !== null && _11 !== void 0 ? _11 : null,
|
|
122
|
+
status_data_fim: (_13 = (_12 = d.status_data_fim) === null || _12 === void 0 ? void 0 : _12.toDate()) !== null && _13 !== void 0 ? _13 : null,
|
|
123
|
+
status_programado: d.status_programado
|
|
124
|
+
? {
|
|
125
|
+
data_prevista: (_15 = (_14 = d.status_programado.data_prevista) === null || _14 === void 0 ? void 0 : _14.toDate()) !== null && _15 !== void 0 ? _15 : null,
|
|
126
|
+
executado: boolean_helper_1.BooleanHelper.check((_16 = d.status_programado) === null || _16 === void 0 ? void 0 : _16.executado, null),
|
|
127
|
+
tipo: string_helper_1.StringHelper.check((_17 = d.status_programado) === null || _17 === void 0 ? void 0 : _17.tipo, null),
|
|
128
|
+
}
|
|
129
|
+
: null,
|
|
130
|
+
telefone: string_helper_1.StringHelper.trim(d.telefone, null),
|
|
131
|
+
modificador: d.modificador
|
|
132
|
+
? (0, lodash_1.omitBy)({
|
|
133
|
+
id: (_20 = (_19 = (_18 = d.modificador) === null || _18 === void 0 ? void 0 : _18.ref) === null || _19 === void 0 ? void 0 : _19.id) !== null && _20 !== void 0 ? _20 : null,
|
|
134
|
+
ref: (_23 = (_22 = (_21 = d.modificador) === null || _21 === void 0 ? void 0 : _21.ref) === null || _22 === void 0 ? void 0 : _22.path) !== null && _23 !== void 0 ? _23 : null,
|
|
135
|
+
tipo: (_25 = (_24 = d.modificador) === null || _24 === void 0 ? void 0 : _24.tipo) !== null && _25 !== void 0 ? _25 : null,
|
|
136
|
+
nome: string_helper_1.StringHelper.trim((_26 = d.modificador) === null || _26 === void 0 ? void 0 : _26.nome, null),
|
|
137
|
+
documento: string_helper_1.StringHelper.trim((_27 = d.modificador) === null || _27 === void 0 ? void 0 : _27.documento, null),
|
|
138
|
+
email: string_helper_1.StringHelper.trim((_28 = d.modificador) === null || _28 === void 0 ? void 0 : _28.email, null),
|
|
139
|
+
}, lodash_1.isUndefined)
|
|
140
|
+
: undefined,
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
return UsuarioFireConvert;
|
|
144
|
+
}());
|
|
145
|
+
exports.UsuarioFireConvert = UsuarioFireConvert;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { BeneficiosUsuario, Integracao, ParametrosUsuario, StatusUsuario, Usuario, UsuarioBase, UsuarioStatusProgramado } from '.';
|
|
2
|
+
import { AuditoriaModificadorFirestoreData } from '../auditoria/modificador';
|
|
3
|
+
import { Endereco } from '../shared';
|
|
4
|
+
export declare class UsuarioJsonData implements UsuarioBase {
|
|
5
|
+
_id: string;
|
|
6
|
+
_path: string;
|
|
7
|
+
admissao?: number;
|
|
8
|
+
ativo?: boolean;
|
|
9
|
+
avatar_atualizacao?: string;
|
|
10
|
+
avatar_thumbnail_path?: string;
|
|
11
|
+
avatar_thumbnail_url?: string;
|
|
12
|
+
avatarUrl?: string;
|
|
13
|
+
beneficios?: BeneficiosUsuario;
|
|
14
|
+
cargo_ref?: any;
|
|
15
|
+
celular?: string;
|
|
16
|
+
conta_ref?: any;
|
|
17
|
+
cpf?: string;
|
|
18
|
+
data_atualizacao_doc?: string;
|
|
19
|
+
data_criacao_doc?: string;
|
|
20
|
+
departamento_ref?: any;
|
|
21
|
+
desligamento?: number;
|
|
22
|
+
email?: string;
|
|
23
|
+
empresa_ref?: any;
|
|
24
|
+
endereco?: Endereco;
|
|
25
|
+
endereco_prestacao_diferente_empresa?: boolean;
|
|
26
|
+
endereco_prestacao?: Endereco;
|
|
27
|
+
escala_ref?: any;
|
|
28
|
+
esocial_categoria_de_trabalhador_ref?: any;
|
|
29
|
+
excluido?: boolean;
|
|
30
|
+
id_externo?: string;
|
|
31
|
+
integracao?: Integracao;
|
|
32
|
+
interno?: boolean;
|
|
33
|
+
nascimento?: number;
|
|
34
|
+
nome?: string;
|
|
35
|
+
nomeCompleto?: string;
|
|
36
|
+
observacoes?: string;
|
|
37
|
+
parametros?: ParametrosUsuario;
|
|
38
|
+
perfil_ref?: any;
|
|
39
|
+
perimetros_refs?: any[];
|
|
40
|
+
pin?: number;
|
|
41
|
+
pis?: string;
|
|
42
|
+
sem_autenticacao?: boolean;
|
|
43
|
+
status?: StatusUsuario;
|
|
44
|
+
status_data_ini?: number;
|
|
45
|
+
status_data_fim?: number;
|
|
46
|
+
status_programado?: UsuarioStatusProgramado;
|
|
47
|
+
telefone?: string;
|
|
48
|
+
modificador?: AuditoriaModificadorFirestoreData;
|
|
49
|
+
}
|
|
50
|
+
export declare abstract class UsuarioJsonConvert {
|
|
51
|
+
static toJson(usuario: Usuario): Partial<UsuarioJsonData>;
|
|
52
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UsuarioJsonConvert = exports.UsuarioJsonData = void 0;
|
|
4
|
+
var lodash_1 = require("lodash");
|
|
5
|
+
var boolean_helper_1 = require("../../utils/boolean-helper");
|
|
6
|
+
var date_helper_1 = require("../../utils/date-helper");
|
|
7
|
+
var number_helper_1 = require("../../utils/number-helper");
|
|
8
|
+
var string_helper_1 = require("../../utils/string-helper");
|
|
9
|
+
var UsuarioJsonData = /** @class */ (function () {
|
|
10
|
+
function UsuarioJsonData() {
|
|
11
|
+
}
|
|
12
|
+
return UsuarioJsonData;
|
|
13
|
+
}());
|
|
14
|
+
exports.UsuarioJsonData = UsuarioJsonData;
|
|
15
|
+
var UsuarioJsonConvert = /** @class */ (function () {
|
|
16
|
+
function UsuarioJsonConvert() {
|
|
17
|
+
}
|
|
18
|
+
// Não foi implementado no momento pois não foi utilizado no front
|
|
19
|
+
// public static fromJson(obj: UsuarioJsonData): Usuario {
|
|
20
|
+
// }
|
|
21
|
+
UsuarioJsonConvert.toJson = function (usuario) {
|
|
22
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14;
|
|
23
|
+
var usuarioJson = {
|
|
24
|
+
_id: (_a = usuario === null || usuario === void 0 ? void 0 : usuario._id) !== null && _a !== void 0 ? _a : null,
|
|
25
|
+
_path: (_b = usuario === null || usuario === void 0 ? void 0 : usuario._path) !== null && _b !== void 0 ? _b : null,
|
|
26
|
+
admissao: (_c = date_helper_1.DateHelper.fromString(usuario.admissao, null)) === null || _c === void 0 ? void 0 : _c.getTime(),
|
|
27
|
+
ativo: boolean_helper_1.BooleanHelper.check(usuario.ativo, null),
|
|
28
|
+
avatar_atualizacao: usuario.avatar_atualizacao
|
|
29
|
+
? usuario.avatar_atualizacao.toISOString()
|
|
30
|
+
: null,
|
|
31
|
+
avatar_thumbnail_path: string_helper_1.StringHelper.check(usuario.avatar_thumbnail_path, null),
|
|
32
|
+
avatar_thumbnail_url: string_helper_1.StringHelper.check(usuario.avatar_thumbnail_url, null),
|
|
33
|
+
avatarUrl: string_helper_1.StringHelper.check(usuario.avatarUrl, null),
|
|
34
|
+
beneficios: usuario.beneficios
|
|
35
|
+
? {
|
|
36
|
+
vale_alimentacao: (_d = usuario.beneficios.vale_alimentacao) !== null && _d !== void 0 ? _d : false,
|
|
37
|
+
vale_refeicao: (_e = usuario.beneficios.vale_refeicao) !== null && _e !== void 0 ? _e : false,
|
|
38
|
+
vale_transporte: (_f = usuario.beneficios.vale_transporte) !== null && _f !== void 0 ? _f : false,
|
|
39
|
+
}
|
|
40
|
+
: null,
|
|
41
|
+
cargo_ref: (_g = usuario.cargo_ref) !== null && _g !== void 0 ? _g : null,
|
|
42
|
+
celular: string_helper_1.StringHelper.trim(usuario.celular, null),
|
|
43
|
+
conta_ref: (_h = usuario.conta_ref) !== null && _h !== void 0 ? _h : null,
|
|
44
|
+
cpf: string_helper_1.StringHelper.trim(usuario.cpf, null),
|
|
45
|
+
data_atualizacao_doc: usuario.data_atualizacao_doc
|
|
46
|
+
? usuario.data_atualizacao_doc.toISOString()
|
|
47
|
+
: null,
|
|
48
|
+
data_criacao_doc: usuario.data_criacao_doc
|
|
49
|
+
? usuario.data_atualizacao_doc.toISOString()
|
|
50
|
+
: null,
|
|
51
|
+
departamento_ref: (_j = usuario.departamento_ref) !== null && _j !== void 0 ? _j : null,
|
|
52
|
+
desligamento: (_k = date_helper_1.DateHelper.fromString(usuario.desligamento, null)) === null || _k === void 0 ? void 0 : _k.getTime(),
|
|
53
|
+
email: string_helper_1.StringHelper.trim(usuario.email, null),
|
|
54
|
+
empresa_ref: (_l = usuario.empresa_ref) !== null && _l !== void 0 ? _l : null,
|
|
55
|
+
endereco: usuario.endereco
|
|
56
|
+
? {
|
|
57
|
+
bairro: string_helper_1.StringHelper.trim(usuario.endereco.bairro, null),
|
|
58
|
+
cep: string_helper_1.StringHelper.trim(usuario.endereco.cep, null),
|
|
59
|
+
cidade: string_helper_1.StringHelper.trim(usuario.endereco.cidade, null),
|
|
60
|
+
complemento: string_helper_1.StringHelper.trim(usuario.endereco.complemento, null),
|
|
61
|
+
logradouro: string_helper_1.StringHelper.trim(usuario.endereco.logradouro, null),
|
|
62
|
+
numero: string_helper_1.StringHelper.trim(usuario.endereco.numero, null),
|
|
63
|
+
uf: string_helper_1.StringHelper.trim(usuario.endereco.uf, null),
|
|
64
|
+
}
|
|
65
|
+
: null,
|
|
66
|
+
endereco_prestacao_diferente_empresa: boolean_helper_1.BooleanHelper.check(usuario.endereco_prestacao_diferente_empresa, false),
|
|
67
|
+
endereco_prestacao: usuario.endereco_prestacao
|
|
68
|
+
? {
|
|
69
|
+
bairro: string_helper_1.StringHelper.trim(usuario.endereco_prestacao.bairro, null),
|
|
70
|
+
cep: string_helper_1.StringHelper.trim(usuario.endereco_prestacao.cep, null),
|
|
71
|
+
cidade: string_helper_1.StringHelper.trim(usuario.endereco_prestacao.cidade, null),
|
|
72
|
+
complemento: string_helper_1.StringHelper.trim(usuario.endereco_prestacao.complemento, null),
|
|
73
|
+
logradouro: string_helper_1.StringHelper.trim(usuario.endereco_prestacao.logradouro, null),
|
|
74
|
+
numero: string_helper_1.StringHelper.trim(usuario.endereco_prestacao.numero, null),
|
|
75
|
+
uf: string_helper_1.StringHelper.trim(usuario.endereco_prestacao.uf, null),
|
|
76
|
+
}
|
|
77
|
+
: null,
|
|
78
|
+
escala_ref: (_m = usuario.escala_ref) !== null && _m !== void 0 ? _m : null,
|
|
79
|
+
esocial_categoria_de_trabalhador_ref: (_o = usuario.esocial_categoria_de_trabalhador_ref) !== null && _o !== void 0 ? _o : null,
|
|
80
|
+
excluido: boolean_helper_1.BooleanHelper.check(usuario.excluido, false),
|
|
81
|
+
id_externo: string_helper_1.StringHelper.trim(usuario.id_externo, null),
|
|
82
|
+
integracao: usuario.integracao
|
|
83
|
+
? {
|
|
84
|
+
id: string_helper_1.StringHelper.trim((_p = usuario.integracao) === null || _p === void 0 ? void 0 : _p.id, null),
|
|
85
|
+
tipo: string_helper_1.StringHelper.trim((_q = usuario.integracao) === null || _q === void 0 ? void 0 : _q.tipo, null),
|
|
86
|
+
}
|
|
87
|
+
: null,
|
|
88
|
+
interno: boolean_helper_1.BooleanHelper.check(usuario.interno, false),
|
|
89
|
+
nascimento: (_r = date_helper_1.DateHelper.fromString(usuario.nascimento, null)) === null || _r === void 0 ? void 0 : _r.getTime(),
|
|
90
|
+
nome: string_helper_1.StringHelper.trim(usuario.nome, null),
|
|
91
|
+
nomeCompleto: string_helper_1.StringHelper.trim(usuario.nomeCompleto, null),
|
|
92
|
+
observacoes: string_helper_1.StringHelper.trim(usuario.observacoes, null),
|
|
93
|
+
parametros: usuario.parametros
|
|
94
|
+
? {
|
|
95
|
+
acessar_manager: boolean_helper_1.BooleanHelper.check(usuario.parametros.acessar_manager, null),
|
|
96
|
+
capturar_foto_marcacao_externa: boolean_helper_1.BooleanHelper.check(usuario.parametros.capturar_foto_marcacao_externa, null),
|
|
97
|
+
capturar_localizacao_marcacao_externa: boolean_helper_1.BooleanHelper.check(usuario.parametros.capturar_localizacao_marcacao_externa, null),
|
|
98
|
+
cargo_confianca: boolean_helper_1.BooleanHelper.check(usuario.parametros.cargo_confianca, null),
|
|
99
|
+
codigo_externo: string_helper_1.StringHelper.check(usuario.parametros.codigo_externo, null),
|
|
100
|
+
horario_noturno: ((_s = usuario.parametros) === null || _s === void 0 ? void 0 : _s.horario_noturno)
|
|
101
|
+
? {
|
|
102
|
+
tipo: string_helper_1.StringHelper.check((_t = usuario.parametros.horario_noturno) === null || _t === void 0 ? void 0 : _t.tipo, null),
|
|
103
|
+
inicio: string_helper_1.StringHelper.check((_u = usuario.parametros.horario_noturno) === null || _u === void 0 ? void 0 : _u.inicio, null),
|
|
104
|
+
fim: string_helper_1.StringHelper.check((_v = usuario.parametros.horario_noturno) === null || _v === void 0 ? void 0 : _v.fim, null),
|
|
105
|
+
hora_reduzida_segundos: number_helper_1.NumberHelper.convertToNumber((_w = usuario.parametros.horario_noturno) === null || _w === void 0 ? void 0 : _w.hora_reduzida_segundos),
|
|
106
|
+
}
|
|
107
|
+
: null,
|
|
108
|
+
horista: boolean_helper_1.BooleanHelper.check(usuario.parametros.horista, null),
|
|
109
|
+
marcacao_whatsapp: boolean_helper_1.BooleanHelper.check(usuario.parametros.marcacao_whatsapp, null),
|
|
110
|
+
marca_ponto_web: boolean_helper_1.BooleanHelper.check(usuario.parametros.marca_ponto_web, null),
|
|
111
|
+
marca_ponto_multi_empresa: boolean_helper_1.BooleanHelper.check(usuario.parametros.marca_ponto_multi_empresa, null),
|
|
112
|
+
marca_ponto_flit: boolean_helper_1.BooleanHelper.check(usuario.parametros.marca_ponto_flit, null),
|
|
113
|
+
reconhecimento_facial: boolean_helper_1.BooleanHelper.check(usuario.parametros.reconhecimento_facial, null),
|
|
114
|
+
reconhecimento_facial_obrigatorio: boolean_helper_1.BooleanHelper.check(usuario.parametros.reconhecimento_facial_obrigatorio, null),
|
|
115
|
+
marca_ponto_apenas_online: boolean_helper_1.BooleanHelper.check(usuario.parametros.marca_ponto_apenas_online, null),
|
|
116
|
+
configuracao_tipo_falta_jornada: string_helper_1.StringHelper.check(usuario.parametros.configuracao_tipo_falta_jornada, null),
|
|
117
|
+
limite_minutos_interjornada: number_helper_1.NumberHelper.convertToNumber((_x = usuario.parametros) === null || _x === void 0 ? void 0 : _x.limite_minutos_interjornada),
|
|
118
|
+
regime_compensacao: string_helper_1.StringHelper.check(usuario.parametros.regime_compensacao, null),
|
|
119
|
+
}
|
|
120
|
+
: null,
|
|
121
|
+
perfil_ref: (_y = usuario.perfil_ref) !== null && _y !== void 0 ? _y : null,
|
|
122
|
+
perimetros_refs: (_z = usuario.perimetros_refs) !== null && _z !== void 0 ? _z : null,
|
|
123
|
+
pin: number_helper_1.NumberHelper.convertToNumber(usuario === null || usuario === void 0 ? void 0 : usuario.pin),
|
|
124
|
+
pis: string_helper_1.StringHelper.trim(usuario.pis, null),
|
|
125
|
+
sem_autenticacao: boolean_helper_1.BooleanHelper.check(usuario.sem_autenticacao, null),
|
|
126
|
+
status: string_helper_1.StringHelper.check(usuario.status, null),
|
|
127
|
+
status_data_ini: (_0 = date_helper_1.DateHelper.fromString(usuario.status_data_ini, null)) === null || _0 === void 0 ? void 0 : _0.getTime(),
|
|
128
|
+
status_data_fim: (_1 = date_helper_1.DateHelper.fromString(usuario.status_data_fim, null)) === null || _1 === void 0 ? void 0 : _1.getTime(),
|
|
129
|
+
status_programado: usuario.status_programado
|
|
130
|
+
? {
|
|
131
|
+
data_prevista: (_2 = date_helper_1.DateHelper.fromString(usuario.status_programado.data_prevista, null)) === null || _2 === void 0 ? void 0 : _2.getTime(),
|
|
132
|
+
executado: boolean_helper_1.BooleanHelper.check(usuario.status_programado.executado, null),
|
|
133
|
+
tipo: string_helper_1.StringHelper.check((_3 = usuario.status_programado) === null || _3 === void 0 ? void 0 : _3.tipo, null),
|
|
134
|
+
}
|
|
135
|
+
: null,
|
|
136
|
+
telefone: string_helper_1.StringHelper.trim(usuario.telefone, null),
|
|
137
|
+
modificador: usuario.modificador
|
|
138
|
+
? (0, lodash_1.omitBy)({
|
|
139
|
+
id: (_6 = (_5 = (_4 = usuario.modificador) === null || _4 === void 0 ? void 0 : _4.ref) === null || _5 === void 0 ? void 0 : _5.id) !== null && _6 !== void 0 ? _6 : null,
|
|
140
|
+
ref: (_9 = (_8 = (_7 = usuario.modificador) === null || _7 === void 0 ? void 0 : _7.ref) === null || _8 === void 0 ? void 0 : _8.path) !== null && _9 !== void 0 ? _9 : null,
|
|
141
|
+
tipo: (_11 = (_10 = usuario.modificador) === null || _10 === void 0 ? void 0 : _10.tipo) !== null && _11 !== void 0 ? _11 : null,
|
|
142
|
+
nome: string_helper_1.StringHelper.trim((_12 = usuario.modificador) === null || _12 === void 0 ? void 0 : _12.nome, null),
|
|
143
|
+
documento: string_helper_1.StringHelper.trim((_13 = usuario.modificador) === null || _13 === void 0 ? void 0 : _13.documento, null),
|
|
144
|
+
email: string_helper_1.StringHelper.trim((_14 = usuario.modificador) === null || _14 === void 0 ? void 0 : _14.email, null),
|
|
145
|
+
}, lodash_1.isUndefined)
|
|
146
|
+
: undefined,
|
|
147
|
+
};
|
|
148
|
+
return (0, lodash_1.omitBy)(usuarioJson, lodash_1.isUndefined);
|
|
149
|
+
};
|
|
150
|
+
return UsuarioJsonConvert;
|
|
151
|
+
}());
|
|
152
|
+
exports.UsuarioJsonConvert = UsuarioJsonConvert;
|
package/lib/models/index.d.ts
CHANGED
|
@@ -15,4 +15,6 @@ export * from './contas/parametros_compartilhados';
|
|
|
15
15
|
export * from './contas/solicitacoes-usuario';
|
|
16
16
|
export * from './contas/empresa';
|
|
17
17
|
export * from './contas/perfis';
|
|
18
|
+
export * from './contas/usuario';
|
|
19
|
+
export * from './contas/shared';
|
|
18
20
|
export * from './api';
|
package/lib/models/index.js
CHANGED
|
@@ -31,4 +31,6 @@ __exportStar(require("./contas/parametros_compartilhados"), exports);
|
|
|
31
31
|
__exportStar(require("./contas/solicitacoes-usuario"), exports);
|
|
32
32
|
__exportStar(require("./contas/empresa"), exports);
|
|
33
33
|
__exportStar(require("./contas/perfis"), exports);
|
|
34
|
+
__exportStar(require("./contas/usuario"), exports);
|
|
35
|
+
__exportStar(require("./contas/shared"), exports);
|
|
34
36
|
__exportStar(require("./api"), exports);
|