flit-models 3.3.42 → 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.
@@ -34,14 +34,14 @@ export interface UsuarioStatusProgramado {
34
34
  }
35
35
  export type UsuarioBase = Omit<Partial<Usuario>, '_joins' | '_avatarBlob' | '_avatarBlobThumbnail' | '_jornadaAtual'>;
36
36
  export declare class Usuario {
37
- _id: string;
38
- _path: string;
37
+ _id?: string;
38
+ _path?: string;
39
39
  _avatarBlob?: Blob;
40
40
  _avatarBlobThumbnail?: Blob;
41
41
  _jornadaAtual?: any;
42
- _joins: {
43
- cargo: Cargo;
44
- esocial_categoria_de_trabalhador: EsocialCategoriaDeTrabalhador;
42
+ _joins?: {
43
+ cargo?: Cargo;
44
+ esocial_categoria_de_trabalhador?: EsocialCategoriaDeTrabalhador;
45
45
  conta?: any;
46
46
  departamento?: Departamento;
47
47
  empresa?: Empresa;
@@ -50,14 +50,14 @@ export declare class Usuario {
50
50
  perfil?: Perfil;
51
51
  multiplosPerimetros?: any[];
52
52
  };
53
- cargo_ref?: string;
54
- esocial_categoria_de_trabalhador_ref?: string;
55
- conta_ref?: string;
56
- departamento_ref?: string;
57
- empresa_ref?: string;
58
- escala_ref?: string;
59
- perimetros_refs?: string[];
60
- perfil_ref?: string;
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
61
  admissao?: any;
62
62
  ativo?: boolean;
63
63
  avatar_atualizacao?: any;
@@ -50,53 +50,69 @@ exports.StatusUsuarioArray = [
50
50
  ];
51
51
  var Usuario = /** @class */ (function () {
52
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;
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
54
  this._id = (_a = usuarioPayload._id) !== null && _a !== void 0 ? _a : undefined;
55
55
  this._path = (_b = usuarioPayload._path) !== null && _b !== void 0 ? _b : undefined;
56
- this.admissao = (_c = usuarioPayload.admissao) !== null && _c !== void 0 ? _c : undefined;
57
- this.ativo = (_d = usuarioPayload.ativo) !== null && _d !== void 0 ? _d : 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;
58
73
  this.avatar_thumbnail_path =
59
- (_e = usuarioPayload.avatar_thumbnail_path) !== null && _e !== void 0 ? _e : undefined;
74
+ (_j = usuarioPayload.avatar_thumbnail_path) !== null && _j !== void 0 ? _j : undefined;
60
75
  this.avatar_thumbnail_url =
61
- (_f = usuarioPayload.avatar_thumbnail_url) !== null && _f !== void 0 ? _f : undefined;
62
- this.avatarUrl = (_g = usuarioPayload.avatarUrl) !== null && _g !== void 0 ? _g : undefined;
63
- this.cargo_ref = (_h = usuarioPayload.cargo_ref) !== null && _h !== void 0 ? _h : undefined;
64
- this.beneficios = (_j = usuarioPayload.beneficios) !== null && _j !== void 0 ? _j : undefined;
65
- this.celular = (_k = usuarioPayload.celular) !== null && _k !== void 0 ? _k : undefined;
66
- this.conta_ref = (_l = usuarioPayload.conta_ref) !== null && _l !== void 0 ? _l : undefined;
67
- this.cpf = (_m = usuarioPayload.cpf) !== null && _m !== void 0 ? _m : undefined;
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;
68
83
  this.data_atualizacao_doc =
69
- (_o = usuarioPayload.data_atualizacao_doc) !== null && _o !== void 0 ? _o : undefined;
70
- this.data_criacao_doc = (_p = usuarioPayload.data_criacao_doc) !== null && _p !== void 0 ? _p : undefined;
71
- this.departamento_ref = (_q = usuarioPayload.departamento_ref) !== null && _q !== void 0 ? _q : undefined;
72
- this.desligamento = (_r = usuarioPayload.desligamento) !== null && _r !== void 0 ? _r : undefined;
73
- this.email = (_s = usuarioPayload.email) !== null && _s !== void 0 ? _s : undefined;
74
- this.empresa_ref = (_t = usuarioPayload.empresa_ref) !== null && _t !== void 0 ? _t : undefined;
75
- this.endereco = (_u = usuarioPayload.endereco) !== null && _u !== void 0 ? _u : undefined;
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;
76
91
  this.endereco_prestacao_diferente_empresa =
77
- (_v = usuarioPayload.endereco_prestacao_diferente_empresa) !== null && _v !== void 0 ? _v : false;
78
- this.endereco_prestacao = (_w = usuarioPayload.endereco_prestacao) !== null && _w !== void 0 ? _w : undefined;
79
- this.escala_ref = (_x = usuarioPayload.escala_ref) !== null && _x !== void 0 ? _x : undefined;
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;
80
95
  this.esocial_categoria_de_trabalhador_ref =
81
- (_y = usuarioPayload.esocial_categoria_de_trabalhador_ref) !== null && _y !== void 0 ? _y : undefined;
82
- this.excluido = (_z = usuarioPayload.excluido) !== null && _z !== void 0 ? _z : undefined;
83
- this.interno = (_0 = usuarioPayload.interno) !== null && _0 !== void 0 ? _0 : undefined;
84
- this.modificador = (_1 = usuarioPayload.modificador) !== null && _1 !== void 0 ? _1 : undefined;
85
- this.nascimento = (_2 = usuarioPayload.nascimento) !== null && _2 !== void 0 ? _2 : undefined;
86
- this.nome = (_3 = usuarioPayload.nome) !== null && _3 !== void 0 ? _3 : undefined;
87
- this.nomeCompleto = (_4 = usuarioPayload.nomeCompleto) !== null && _4 !== void 0 ? _4 : undefined;
88
- this.observacoes = (_5 = usuarioPayload.observacoes) !== null && _5 !== void 0 ? _5 : undefined;
89
- this.parametros = (_6 = usuarioPayload.parametros) !== null && _6 !== void 0 ? _6 : undefined;
90
- this.perfil_ref = (_7 = usuarioPayload.perfil_ref) !== null && _7 !== void 0 ? _7 : undefined;
91
- this.perimetros_refs = (_8 = usuarioPayload.perimetros_refs) !== null && _8 !== void 0 ? _8 : undefined;
92
- this.pin = (_9 = usuarioPayload.pin) !== null && _9 !== void 0 ? _9 : undefined;
93
- this.pis = (_10 = usuarioPayload.pis) !== null && _10 !== void 0 ? _10 : undefined;
94
- this.sem_autenticacao = (_11 = usuarioPayload.sem_autenticacao) !== null && _11 !== void 0 ? _11 : undefined;
95
- this.status = (_12 = usuarioPayload.status) !== null && _12 !== void 0 ? _12 : undefined;
96
- this.status_data_fim = (_13 = usuarioPayload.status_data_fim) !== null && _13 !== void 0 ? _13 : undefined;
97
- this.status_data_ini = (_14 = usuarioPayload.status_data_ini) !== null && _14 !== void 0 ? _14 : undefined;
98
- this.status_programado = (_15 = usuarioPayload.status_programado) !== null && _15 !== void 0 ? _15 : undefined;
99
- this.telefone = (_16 = usuarioPayload.telefone) !== null && _16 !== void 0 ? _16 : undefined;
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;
100
116
  }
101
117
  return Usuario;
102
118
  }());
@@ -2,23 +2,23 @@ import { BeneficiosUsuario, Integracao, IUsuarioStatusProgramado, ParametrosUsua
2
2
  import { AuditoriaModificadorFirestoreData } from '../auditoria/modificador';
3
3
  import { Endereco } from '../shared';
4
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;
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;
11
14
  esocial_categoria_de_trabalhador_ref?: any;
12
15
  conta_ref?: any;
13
16
  perimetros_refs?: any;
14
- cargo_ref: any;
15
- departamento_ref: any;
16
- empresa_ref: any;
17
- escala_ref: any;
18
- perfil_ref: any;
19
- avatarBlob?: Blob;
20
- avatarBlobThumbnail?: Blob;
21
- jornadaAtual?: any;
17
+ cargo_ref?: any;
18
+ departamento_ref?: any;
19
+ empresa_ref?: any;
20
+ escala_ref?: any;
21
+ perfil_ref?: any;
22
22
  admissao?: string;
23
23
  ativo?: boolean;
24
24
  avatar_atualizacao?: string;
@@ -11,11 +11,11 @@ var UsuarioElasticConvert = /** @class */ (function () {
11
11
  function UsuarioElasticConvert() {
12
12
  }
13
13
  UsuarioElasticConvert.fromElastic = function (doc) {
14
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
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
15
  var docData = doc;
16
16
  return new _1.Usuario({
17
- _id: (_a = doc.i_id) !== null && _a !== void 0 ? _a : null,
18
- _path: (_b = doc.i_path) !== null && _b !== void 0 ? _b : null,
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
19
  admissao: date_helper_1.DateHelper.fromString(docData.admissao, null),
20
20
  ativo: boolean_helper_1.BooleanHelper.check(docData.ativo, true),
21
21
  avatar_atualizacao: date_helper_1.DateHelper.fromString(docData.avatar_atualizacao, null),
@@ -29,16 +29,16 @@ var UsuarioElasticConvert = /** @class */ (function () {
29
29
  vale_transporte: (_e = docData.beneficios.vale_transporte) !== null && _e !== void 0 ? _e : false,
30
30
  }
31
31
  : null,
32
- cargo_ref: (_f = docData.cargo_ref.i_path) !== null && _f !== void 0 ? _f : 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
33
  celular: string_helper_1.StringHelper.trim(docData.celular, null),
34
- conta_ref: (_g = docData.conta_ref.i_path) !== null && _g !== void 0 ? _g : 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
35
  cpf: string_helper_1.StringHelper.trim(docData.cpf, null),
36
36
  data_atualizacao_doc: date_helper_1.DateHelper.fromString(docData.data_atualizacao_doc, new Date()),
37
37
  data_criacao_doc: date_helper_1.DateHelper.fromString(docData.data_atualizacao_doc, new Date()),
38
- departamento_ref: (_h = docData.departamento_ref.i_path) !== null && _h !== void 0 ? _h : null,
38
+ departamento_ref: (_l = (_k = docData.departamento_ref) === null || _k === void 0 ? void 0 : _k.i_path) !== null && _l !== void 0 ? _l : null,
39
39
  desligamento: date_helper_1.DateHelper.fromString(docData.desligamento, null),
40
40
  email: string_helper_1.StringHelper.trim(docData.email, null),
41
- empresa_ref: (_j = docData.empresa_ref.i_path) !== null && _j !== void 0 ? _j : 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
42
  endereco: docData.endereco
43
43
  ? {
44
44
  bairro: string_helper_1.StringHelper.trim(docData.endereco.bairro, null),
@@ -62,14 +62,14 @@ var UsuarioElasticConvert = /** @class */ (function () {
62
62
  uf: string_helper_1.StringHelper.trim(docData.endereco_prestacao.uf, null),
63
63
  }
64
64
  : null,
65
- escala_ref: (_k = docData.escala_ref.i_path) !== null && _k !== void 0 ? _k : null,
66
- esocial_categoria_de_trabalhador_ref: (_l = docData.esocial_categoria_de_trabalhador_ref.i_path) !== null && _l !== void 0 ? _l : 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
67
  excluido: boolean_helper_1.BooleanHelper.check(docData.excluido, false),
68
68
  id_externo: string_helper_1.StringHelper.trim(docData.id_externo, null),
69
69
  integracao: docData.integracao
70
70
  ? {
71
- id: string_helper_1.StringHelper.trim(docData.integracao.id, null),
72
- tipo: string_helper_1.StringHelper.trim(docData.integracao.tipo, null),
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
73
  }
74
74
  : null,
75
75
  interno: boolean_helper_1.BooleanHelper.check(docData.interno, false),
@@ -84,15 +84,14 @@ var UsuarioElasticConvert = /** @class */ (function () {
84
84
  capturar_localizacao_marcacao_externa: boolean_helper_1.BooleanHelper.check(docData.parametros.capturar_localizacao_marcacao_externa, null),
85
85
  cargo_confianca: boolean_helper_1.BooleanHelper.check(docData.parametros.cargo_confianca, null),
86
86
  codigo_externo: string_helper_1.StringHelper.check(docData.parametros.codigo_externo, null),
87
- horario_noturno: {
88
- tipo: string_helper_1.StringHelper.check(docData.parametros.horario_noturno.tipo, null),
89
- inicio: string_helper_1.StringHelper.check(docData.parametros.horario_noturno.inicio, null),
90
- fim: string_helper_1.StringHelper.check(docData.parametros.horario_noturno.fim, null),
91
- hora_reduzida_segundos: docData.parametros.horario_noturno
92
- .hora_reduzida_segundos
93
- ? number_helper_1.NumberHelper.convertToNumber(docData.parametros.horario_noturno.hora_reduzida_segundos)
94
- : null,
95
- },
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,
96
95
  horista: boolean_helper_1.BooleanHelper.check(docData.parametros.horista, null),
97
96
  marcacao_whatsapp: boolean_helper_1.BooleanHelper.check(docData.parametros.marcacao_whatsapp, null),
98
97
  marca_ponto_web: boolean_helper_1.BooleanHelper.check(docData.parametros.marca_ponto_web, null),
@@ -102,18 +101,15 @@ var UsuarioElasticConvert = /** @class */ (function () {
102
101
  reconhecimento_facial_obrigatorio: boolean_helper_1.BooleanHelper.check(docData.parametros.reconhecimento_facial_obrigatorio, null),
103
102
  marca_ponto_apenas_online: boolean_helper_1.BooleanHelper.check(docData.parametros.marca_ponto_apenas_online, null),
104
103
  configuracao_tipo_falta_jornada: string_helper_1.StringHelper.check(docData.parametros.configuracao_tipo_falta_jornada, null),
105
- limite_minutos_interjornada: docData.parametros
106
- .limite_minutos_interjornada
107
- ? number_helper_1.NumberHelper.convertToNumber(docData.parametros.limite_minutos_interjornada)
108
- : null,
104
+ limite_minutos_interjornada: number_helper_1.NumberHelper.convertToNumber((_0 = docData.parametros) === null || _0 === void 0 ? void 0 : _0.limite_minutos_interjornada),
109
105
  regime_compensacao: string_helper_1.StringHelper.check(docData.parametros.regime_compensacao, null),
110
106
  }
111
107
  : null,
112
- perfil_ref: (_m = docData.perfil_ref.i_path) !== null && _m !== void 0 ? _m : null,
108
+ perfil_ref: (_3 = (_2 = docData.perfil_ref) === null || _2 === void 0 ? void 0 : _2.i_path) !== null && _3 !== void 0 ? _3 : null,
113
109
  perimetros_refs: docData.perimetros_refs && docData.perimetros_refs.length
114
- ? docData.perimetros_refs.map(function (ref) { return ref.i_path; })
110
+ ? docData.perimetros_refs.map(function (ref) { return ref === null || ref === void 0 ? void 0 : ref.i_path; })
115
111
  : [],
116
- pin: docData.pin ? number_helper_1.NumberHelper.convertToNumber(docData.pin) : null,
112
+ pin: number_helper_1.NumberHelper.convertToNumber(docData === null || docData === void 0 ? void 0 : docData.pin),
117
113
  pis: string_helper_1.StringHelper.trim(docData.pis, null),
118
114
  sem_autenticacao: boolean_helper_1.BooleanHelper.check(docData.sem_autenticacao, false),
119
115
  status: string_helper_1.StringHelper.check(docData.status, null),
@@ -123,18 +119,18 @@ var UsuarioElasticConvert = /** @class */ (function () {
123
119
  ? {
124
120
  data_prevista: date_helper_1.DateHelper.fromString(docData.status_programado.data_prevista, null),
125
121
  executado: boolean_helper_1.BooleanHelper.check(docData.status_programado.executado, null),
126
- tipo: string_helper_1.StringHelper.check(docData.status_programado.tipo, null),
122
+ tipo: string_helper_1.StringHelper.check((_4 = docData.status_programado) === null || _4 === void 0 ? void 0 : _4.tipo, null),
127
123
  }
128
124
  : null,
129
125
  telefone: string_helper_1.StringHelper.trim(docData.telefone, null),
130
126
  modificador: docData.modificador
131
127
  ? (0, lodash_1.omitBy)({
132
- id: (0, lodash_1.get)(docData.modificador, 'id', null),
133
- ref: (0, lodash_1.get)(docData.modificador, 'ref.path', null),
134
- tipo: (0, lodash_1.get)(docData.modificador, 'tipo', null),
135
- nome: string_helper_1.StringHelper.trim((0, lodash_1.get)(docData.modificador, 'nome', null), null),
136
- documento: string_helper_1.StringHelper.trim((0, lodash_1.get)(docData.modificador, 'documento', null), null),
137
- email: string_helper_1.StringHelper.trim((0, lodash_1.get)(docData.modificador, 'email', null), null),
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),
138
134
  }, lodash_1.isUndefined)
139
135
  : undefined,
140
136
  });
@@ -16,34 +16,34 @@ var UsuarioFireConvert = /** @class */ (function () {
16
16
  function UsuarioFireConvert() {
17
17
  }
18
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;
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
20
  var d = ((_a = doc.data()) !== null && _a !== void 0 ? _a : {});
21
21
  return new _1.Usuario({
22
- _id: (_b = doc.id) !== null && _b !== void 0 ? _b : null,
23
- _path: (_c = doc.ref.path) !== null && _c !== void 0 ? _c : null,
24
- admissao: (_e = (_d = d.admissao) === null || _d === void 0 ? void 0 : _d.toDate()) !== null && _e !== void 0 ? _e : null,
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
25
  ativo: boolean_helper_1.BooleanHelper.check(d.ativo, true),
26
- avatar_atualizacao: (_g = (_f = d.avatar_atualizacao) === null || _f === void 0 ? void 0 : _f.toDate()) !== null && _g !== void 0 ? _g : null,
26
+ avatar_atualizacao: (_h = (_g = d.avatar_atualizacao) === null || _g === void 0 ? void 0 : _g.toDate()) !== null && _h !== void 0 ? _h : null,
27
27
  avatar_thumbnail_path: string_helper_1.StringHelper.trim(d.avatar_thumbnail_path, null),
28
28
  avatar_thumbnail_url: string_helper_1.StringHelper.trim(d.avatar_thumbnail_url, null),
29
29
  avatarUrl: string_helper_1.StringHelper.trim(d.avatarUrl, null),
30
30
  beneficios: d.beneficios
31
31
  ? {
32
- vale_alimentacao: (_h = d.beneficios.vale_alimentacao) !== null && _h !== void 0 ? _h : false,
33
- vale_refeicao: (_j = d.beneficios.vale_refeicao) !== null && _j !== void 0 ? _j : false,
34
- vale_transporte: (_k = d.beneficios.vale_transporte) !== null && _k !== void 0 ? _k : false,
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
35
  }
36
36
  : null,
37
- cargo_ref: d.cargo_ref ? d.cargo_ref.path : null,
37
+ cargo_ref: d.cargo_ref ? (_m = d.cargo_ref) === null || _m === void 0 ? void 0 : _m.path : null,
38
38
  celular: string_helper_1.StringHelper.trim(d.celular, null),
39
- conta_ref: d.conta_ref ? d.conta_ref.path : null,
39
+ conta_ref: d.conta_ref ? (_o = d.conta_ref) === null || _o === void 0 ? void 0 : _o.path : null,
40
40
  cpf: string_helper_1.StringHelper.trim(d.cpf, null),
41
- data_atualizacao_doc: ((_l = d.data_atualizacao_doc) === null || _l === void 0 ? void 0 : _l.toDate()) || new Date(),
42
- data_criacao_doc: ((_m = d.data_criacao_doc) === null || _m === void 0 ? void 0 : _m.toDate()) || new Date(),
43
- departamento_ref: d.departamento_ref ? d.departamento_ref.path : null,
44
- desligamento: (_p = (_o = d.desligamento) === null || _o === void 0 ? void 0 : _o.toDate()) !== null && _p !== void 0 ? _p : 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
45
  email: string_helper_1.StringHelper.trim(d.email, null),
46
- empresa_ref: d.empresa_ref ? d.empresa_ref.path : null,
46
+ empresa_ref: d.empresa_ref ? (_u = d.empresa_ref) === null || _u === void 0 ? void 0 : _u.path : null,
47
47
  endereco: d.endereco
48
48
  ? {
49
49
  bairro: string_helper_1.StringHelper.trim(d.endereco.bairro, null),
@@ -67,20 +67,20 @@ var UsuarioFireConvert = /** @class */ (function () {
67
67
  uf: string_helper_1.StringHelper.trim(d.endereco_prestacao.uf, null),
68
68
  }
69
69
  : null,
70
- escala_ref: d.escala_ref ? d.escala_ref.path : null,
70
+ escala_ref: d.escala_ref ? (_v = d.escala_ref) === null || _v === void 0 ? void 0 : _v.path : null,
71
71
  esocial_categoria_de_trabalhador_ref: d.esocial_categoria_de_trabalhador_ref
72
- ? d.esocial_categoria_de_trabalhador_ref.path
72
+ ? (_w = d.esocial_categoria_de_trabalhador_ref) === null || _w === void 0 ? void 0 : _w.path
73
73
  : null,
74
74
  excluido: boolean_helper_1.BooleanHelper.check(d.excluido, false),
75
75
  id_externo: string_helper_1.StringHelper.trim(d.id_externo, null),
76
76
  integracao: d.integracao
77
77
  ? {
78
- id: string_helper_1.StringHelper.trim(d.integracao.id, null),
79
- tipo: string_helper_1.StringHelper.trim(d.integracao.tipo, null),
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
80
  }
81
81
  : null,
82
82
  interno: boolean_helper_1.BooleanHelper.check(d.interno, false),
83
- nascimento: (_r = (_q = d.nascimento) === null || _q === void 0 ? void 0 : _q.toDate()) !== null && _r !== void 0 ? _r : null,
83
+ nascimento: (_0 = (_z = d.nascimento) === null || _z === void 0 ? void 0 : _z.toDate()) !== null && _0 !== void 0 ? _0 : null,
84
84
  nome: string_helper_1.StringHelper.trim(d.nome, null),
85
85
  nomeCompleto: string_helper_1.StringHelper.trim(d.nomeCompleto, null),
86
86
  observacoes: string_helper_1.StringHelper.trim(d.observacoes, null),
@@ -91,15 +91,14 @@ var UsuarioFireConvert = /** @class */ (function () {
91
91
  capturar_localizacao_marcacao_externa: boolean_helper_1.BooleanHelper.check(d.parametros.capturar_localizacao_marcacao_externa, null),
92
92
  cargo_confianca: boolean_helper_1.BooleanHelper.check(d.parametros.cargo_confianca, null),
93
93
  codigo_externo: string_helper_1.StringHelper.check(d.parametros.codigo_externo, null),
94
- horario_noturno: {
95
- tipo: string_helper_1.StringHelper.check(d.parametros.horario_noturno.tipo, null),
96
- inicio: string_helper_1.StringHelper.check(d.parametros.horario_noturno.inicio, null),
97
- fim: string_helper_1.StringHelper.check(d.parametros.horario_noturno.fim, null),
98
- hora_reduzida_segundos: d.parametros.horario_noturno
99
- .hora_reduzida_segundos
100
- ? number_helper_1.NumberHelper.convertToNumber(d.parametros.horario_noturno.hora_reduzida_segundos)
101
- : null,
102
- },
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,
103
102
  horista: boolean_helper_1.BooleanHelper.check(d.parametros.horista, null),
104
103
  marcacao_whatsapp: boolean_helper_1.BooleanHelper.check(d.parametros.marcacao_whatsapp, null),
105
104
  marca_ponto_web: boolean_helper_1.BooleanHelper.check(d.parametros.marca_ponto_web, null),
@@ -109,37 +108,34 @@ var UsuarioFireConvert = /** @class */ (function () {
109
108
  reconhecimento_facial_obrigatorio: boolean_helper_1.BooleanHelper.check(d.parametros.reconhecimento_facial_obrigatorio, null),
110
109
  marca_ponto_apenas_online: boolean_helper_1.BooleanHelper.check(d.parametros.marca_ponto_apenas_online, null),
111
110
  configuracao_tipo_falta_jornada: string_helper_1.StringHelper.check(d.parametros.configuracao_tipo_falta_jornada, null),
112
- limite_minutos_interjornada: d.parametros
113
- .limite_minutos_interjornada
114
- ? number_helper_1.NumberHelper.convertToNumber(d.parametros.limite_minutos_interjornada)
115
- : null,
111
+ limite_minutos_interjornada: number_helper_1.NumberHelper.convertToNumber((_7 = d.parametros) === null || _7 === void 0 ? void 0 : _7.limite_minutos_interjornada),
116
112
  regime_compensacao: string_helper_1.StringHelper.check(d.parametros.regime_compensacao, null),
117
113
  }
118
114
  : null,
119
- perfil_ref: d.perfil_ref ? d.perfil_ref.path : null,
120
- perimetros_refs: (_s = d.perimetros_refs) !== null && _s !== void 0 ? _s : [],
121
- pin: d.pin ? number_helper_1.NumberHelper.convertToNumber(d.pin) : 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),
122
118
  pis: string_helper_1.StringHelper.trim(d.pis, null),
123
119
  sem_autenticacao: boolean_helper_1.BooleanHelper.check(d.sem_autenticacao, false),
124
120
  status: string_helper_1.StringHelper.check(d.status, null),
125
- status_data_ini: (_u = (_t = d.status_data_ini) === null || _t === void 0 ? void 0 : _t.toDate()) !== null && _u !== void 0 ? _u : null,
126
- status_data_fim: (_w = (_v = d.status_data_fim) === null || _v === void 0 ? void 0 : _v.toDate()) !== null && _w !== void 0 ? _w : 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,
127
123
  status_programado: d.status_programado
128
124
  ? {
129
- data_prevista: (_y = (_x = d.status_programado.data_prevista) === null || _x === void 0 ? void 0 : _x.toDate()) !== null && _y !== void 0 ? _y : null,
130
- executado: boolean_helper_1.BooleanHelper.check(d.status_programado.executado, null),
131
- tipo: string_helper_1.StringHelper.check(d.status_programado.tipo, null),
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),
132
128
  }
133
129
  : null,
134
130
  telefone: string_helper_1.StringHelper.trim(d.telefone, null),
135
131
  modificador: d.modificador
136
132
  ? (0, lodash_1.omitBy)({
137
- id: (0, lodash_1.get)(d.modificador, 'id', null),
138
- ref: (0, lodash_1.get)(d.modificador, 'ref.path', null),
139
- tipo: (0, lodash_1.get)(d.modificador, 'tipo', null),
140
- nome: string_helper_1.StringHelper.trim((0, lodash_1.get)(d.modificador, 'nome', null), null),
141
- documento: string_helper_1.StringHelper.trim((0, lodash_1.get)(d.modificador, 'documento', null), null),
142
- email: string_helper_1.StringHelper.trim((0, lodash_1.get)(d.modificador, 'email', null), null),
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),
143
139
  }, lodash_1.isUndefined)
144
140
  : undefined,
145
141
  });
@@ -4,7 +4,7 @@ import { Endereco } from '../shared';
4
4
  export declare class UsuarioJsonData implements UsuarioBase {
5
5
  _id: string;
6
6
  _path: string;
7
- admissao?: string;
7
+ admissao?: number;
8
8
  ativo?: boolean;
9
9
  avatar_atualizacao?: string;
10
10
  avatar_thumbnail_path?: string;
@@ -18,7 +18,7 @@ export declare class UsuarioJsonData implements UsuarioBase {
18
18
  data_atualizacao_doc?: string;
19
19
  data_criacao_doc?: string;
20
20
  departamento_ref?: any;
21
- desligamento?: string;
21
+ desligamento?: number;
22
22
  email?: string;
23
23
  empresa_ref?: any;
24
24
  endereco?: Endereco;
@@ -30,7 +30,7 @@ export declare class UsuarioJsonData implements UsuarioBase {
30
30
  id_externo?: string;
31
31
  integracao?: Integracao;
32
32
  interno?: boolean;
33
- nascimento?: string;
33
+ nascimento?: number;
34
34
  nome?: string;
35
35
  nomeCompleto?: string;
36
36
  observacoes?: string;
@@ -41,8 +41,8 @@ export declare class UsuarioJsonData implements UsuarioBase {
41
41
  pis?: string;
42
42
  sem_autenticacao?: boolean;
43
43
  status?: StatusUsuario;
44
- status_data_ini?: string;
45
- status_data_fim?: string;
44
+ status_data_ini?: number;
45
+ status_data_fim?: number;
46
46
  status_programado?: UsuarioStatusProgramado;
47
47
  telefone?: string;
48
48
  modificador?: AuditoriaModificadorFirestoreData;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UsuarioJsonConvert = exports.UsuarioJsonData = void 0;
4
4
  var lodash_1 = require("lodash");
5
5
  var boolean_helper_1 = require("../../utils/boolean-helper");
6
+ var date_helper_1 = require("../../utils/date-helper");
6
7
  var number_helper_1 = require("../../utils/number-helper");
7
8
  var string_helper_1 = require("../../utils/string-helper");
8
9
  var UsuarioJsonData = /** @class */ (function () {
@@ -18,11 +19,11 @@ var UsuarioJsonConvert = /** @class */ (function () {
18
19
  // public static fromJson(obj: UsuarioJsonData): Usuario {
19
20
  // }
20
21
  UsuarioJsonConvert.toJson = function (usuario) {
21
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
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;
22
23
  var usuarioJson = {
23
- _id: (_a = usuario._id) !== null && _a !== void 0 ? _a : null,
24
- _path: (_b = usuario._path) !== null && _b !== void 0 ? _b : null,
25
- admissao: usuario.admissao ? usuario.admissao.toISOString() : null,
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(),
26
27
  ativo: boolean_helper_1.BooleanHelper.check(usuario.ativo, null),
27
28
  avatar_atualizacao: usuario.avatar_atualizacao
28
29
  ? usuario.avatar_atualizacao.toISOString()
@@ -32,14 +33,14 @@ var UsuarioJsonConvert = /** @class */ (function () {
32
33
  avatarUrl: string_helper_1.StringHelper.check(usuario.avatarUrl, null),
33
34
  beneficios: usuario.beneficios
34
35
  ? {
35
- vale_alimentacao: (_c = usuario.beneficios.vale_alimentacao) !== null && _c !== void 0 ? _c : false,
36
- vale_refeicao: (_d = usuario.beneficios.vale_refeicao) !== null && _d !== void 0 ? _d : false,
37
- vale_transporte: (_e = usuario.beneficios.vale_transporte) !== null && _e !== void 0 ? _e : false,
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,
38
39
  }
39
40
  : null,
40
- cargo_ref: (_f = usuario.cargo_ref) !== null && _f !== void 0 ? _f : null,
41
+ cargo_ref: (_g = usuario.cargo_ref) !== null && _g !== void 0 ? _g : null,
41
42
  celular: string_helper_1.StringHelper.trim(usuario.celular, null),
42
- conta_ref: (_g = usuario.conta_ref) !== null && _g !== void 0 ? _g : null,
43
+ conta_ref: (_h = usuario.conta_ref) !== null && _h !== void 0 ? _h : null,
43
44
  cpf: string_helper_1.StringHelper.trim(usuario.cpf, null),
44
45
  data_atualizacao_doc: usuario.data_atualizacao_doc
45
46
  ? usuario.data_atualizacao_doc.toISOString()
@@ -47,12 +48,10 @@ var UsuarioJsonConvert = /** @class */ (function () {
47
48
  data_criacao_doc: usuario.data_criacao_doc
48
49
  ? usuario.data_atualizacao_doc.toISOString()
49
50
  : null,
50
- departamento_ref: (_h = usuario.departamento_ref) !== null && _h !== void 0 ? _h : null,
51
- desligamento: usuario.desligamento
52
- ? usuario.desligamento.toISOString()
53
- : 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(),
54
53
  email: string_helper_1.StringHelper.trim(usuario.email, null),
55
- empresa_ref: (_j = usuario.empresa_ref) !== null && _j !== void 0 ? _j : null,
54
+ empresa_ref: (_l = usuario.empresa_ref) !== null && _l !== void 0 ? _l : null,
56
55
  endereco: usuario.endereco
57
56
  ? {
58
57
  bairro: string_helper_1.StringHelper.trim(usuario.endereco.bairro, null),
@@ -76,18 +75,18 @@ var UsuarioJsonConvert = /** @class */ (function () {
76
75
  uf: string_helper_1.StringHelper.trim(usuario.endereco_prestacao.uf, null),
77
76
  }
78
77
  : null,
79
- escala_ref: (_k = usuario.escala_ref) !== null && _k !== void 0 ? _k : null,
80
- esocial_categoria_de_trabalhador_ref: (_l = usuario.esocial_categoria_de_trabalhador_ref) !== null && _l !== void 0 ? _l : 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,
81
80
  excluido: boolean_helper_1.BooleanHelper.check(usuario.excluido, false),
82
81
  id_externo: string_helper_1.StringHelper.trim(usuario.id_externo, null),
83
82
  integracao: usuario.integracao
84
83
  ? {
85
- id: string_helper_1.StringHelper.trim(usuario.integracao.id, null),
86
- tipo: string_helper_1.StringHelper.trim(usuario.integracao.tipo, null),
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),
87
86
  }
88
87
  : null,
89
88
  interno: boolean_helper_1.BooleanHelper.check(usuario.interno, false),
90
- nascimento: usuario.nascimento ? usuario.nascimento.toISOString() : null,
89
+ nascimento: (_r = date_helper_1.DateHelper.fromString(usuario.nascimento, null)) === null || _r === void 0 ? void 0 : _r.getTime(),
91
90
  nome: string_helper_1.StringHelper.trim(usuario.nome, null),
92
91
  nomeCompleto: string_helper_1.StringHelper.trim(usuario.nomeCompleto, null),
93
92
  observacoes: string_helper_1.StringHelper.trim(usuario.observacoes, null),
@@ -98,15 +97,14 @@ var UsuarioJsonConvert = /** @class */ (function () {
98
97
  capturar_localizacao_marcacao_externa: boolean_helper_1.BooleanHelper.check(usuario.parametros.capturar_localizacao_marcacao_externa, null),
99
98
  cargo_confianca: boolean_helper_1.BooleanHelper.check(usuario.parametros.cargo_confianca, null),
100
99
  codigo_externo: string_helper_1.StringHelper.check(usuario.parametros.codigo_externo, null),
101
- horario_noturno: {
102
- tipo: string_helper_1.StringHelper.check(usuario.parametros.horario_noturno.tipo, null),
103
- inicio: string_helper_1.StringHelper.check(usuario.parametros.horario_noturno.inicio, null),
104
- fim: string_helper_1.StringHelper.check(usuario.parametros.horario_noturno.fim, null),
105
- hora_reduzida_segundos: usuario.parametros.horario_noturno
106
- .hora_reduzida_segundos
107
- ? number_helper_1.NumberHelper.convertToNumber(usuario.parametros.horario_noturno.hora_reduzida_segundos)
108
- : null,
109
- },
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,
110
108
  horista: boolean_helper_1.BooleanHelper.check(usuario.parametros.horista, null),
111
109
  marcacao_whatsapp: boolean_helper_1.BooleanHelper.check(usuario.parametros.marcacao_whatsapp, null),
112
110
  marca_ponto_web: boolean_helper_1.BooleanHelper.check(usuario.parametros.marca_ponto_web, null),
@@ -116,43 +114,34 @@ var UsuarioJsonConvert = /** @class */ (function () {
116
114
  reconhecimento_facial_obrigatorio: boolean_helper_1.BooleanHelper.check(usuario.parametros.reconhecimento_facial_obrigatorio, null),
117
115
  marca_ponto_apenas_online: boolean_helper_1.BooleanHelper.check(usuario.parametros.marca_ponto_apenas_online, null),
118
116
  configuracao_tipo_falta_jornada: string_helper_1.StringHelper.check(usuario.parametros.configuracao_tipo_falta_jornada, null),
119
- limite_minutos_interjornada: usuario.parametros
120
- .limite_minutos_interjornada
121
- ? number_helper_1.NumberHelper.convertToNumber(usuario.parametros.limite_minutos_interjornada)
122
- : null,
117
+ limite_minutos_interjornada: number_helper_1.NumberHelper.convertToNumber((_x = usuario.parametros) === null || _x === void 0 ? void 0 : _x.limite_minutos_interjornada),
123
118
  regime_compensacao: string_helper_1.StringHelper.check(usuario.parametros.regime_compensacao, null),
124
119
  }
125
120
  : null,
126
- perfil_ref: (_m = usuario.perfil_ref) !== null && _m !== void 0 ? _m : null,
127
- perimetros_refs: (_o = usuario.perimetros_refs) !== null && _o !== void 0 ? _o : null,
128
- pin: usuario.pin ? number_helper_1.NumberHelper.convertToNumber(usuario.pin) : 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),
129
124
  pis: string_helper_1.StringHelper.trim(usuario.pis, null),
130
125
  sem_autenticacao: boolean_helper_1.BooleanHelper.check(usuario.sem_autenticacao, null),
131
126
  status: string_helper_1.StringHelper.check(usuario.status, null),
132
- status_data_ini: usuario.status_data_ini
133
- ? usuario.status_data_ini.toISOString()
134
- : null,
135
- status_data_fim: usuario.status_data_fim
136
- ? usuario.status_data_fim.toISOString()
137
- : 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(),
138
129
  status_programado: usuario.status_programado
139
130
  ? {
140
- data_prevista: usuario.status_programado.data_prevista
141
- ? usuario.status_programado.data_prevista.toISOString()
142
- : null,
131
+ data_prevista: (_2 = date_helper_1.DateHelper.fromString(usuario.status_programado.data_prevista, null)) === null || _2 === void 0 ? void 0 : _2.getTime(),
143
132
  executado: boolean_helper_1.BooleanHelper.check(usuario.status_programado.executado, null),
144
- tipo: string_helper_1.StringHelper.check(usuario.status_programado.tipo, null),
133
+ tipo: string_helper_1.StringHelper.check((_3 = usuario.status_programado) === null || _3 === void 0 ? void 0 : _3.tipo, null),
145
134
  }
146
135
  : null,
147
136
  telefone: string_helper_1.StringHelper.trim(usuario.telefone, null),
148
137
  modificador: usuario.modificador
149
138
  ? (0, lodash_1.omitBy)({
150
- id: (0, lodash_1.get)(usuario.modificador, 'id', null),
151
- ref: (0, lodash_1.get)(usuario.modificador, 'ref', null),
152
- tipo: (0, lodash_1.get)(usuario.modificador, 'tipo', null),
153
- nome: string_helper_1.StringHelper.trim((0, lodash_1.get)(usuario.modificador, 'nome', null), null),
154
- documento: string_helper_1.StringHelper.trim((0, lodash_1.get)(usuario.modificador, 'documento', null), null),
155
- email: string_helper_1.StringHelper.trim((0, lodash_1.get)(usuario.modificador, 'email', null), null),
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),
156
145
  }, lodash_1.isUndefined)
157
146
  : undefined,
158
147
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flit-models",
3
- "version": "3.3.42",
3
+ "version": "3.3.43",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",