flit-models 3.0.7 → 3.1.0

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 CHANGED
@@ -1 +1 @@
1
- export { Cargo, CargoBase, CargoFireConvert, CargoFirestoreData, Departamento, DepartamentoBase, DepartamentoFireConvert, DepartamentoFirestoreData, EmpresaFeriado, EmpresaFeriadoBase, EmpresaFeriadoFireConvert, EmpresaFeriadoFirestoreData, EnumExcecaoStatus, EnumExcecaoTipo, Escala, EscalaBase, EscalaFireConvert, EscalaFirestoreData, Excecao, Feriado, FeriadoBase, FeriadoFireConvert, FeriadoFirestoreData, FeriadoJsonConvert, FeriadoJsonData, FeriadoTipoEnum, IExcecao, Lancamento, LancamentoBase, LancamentoFireConvert, LancamentoFirestoreData, LancamentoJsonConvert, LancamentoJsonData, LancamentoPeriodo, LancamentoPeriodoBase, LancamentoStatusEnum, OcorrenciaFrequenciaCopiaEmDocumento, OcorrenciaFrequenciaRelacaoJornadas, OcorrenciaFrequenciaRelacaoJornadasValue, TipoAcaoLancamentoEnum, TipoOcorrenciaFrequenciaEnum, TipoReferenciaVerificacaoLancamento, VerificacaoLancamento, VerificacaoLancamentoBase, VerificacaoLancamentoFireConvert, VerificacaoLancamentoFirestoreData, } from './models/index';
1
+ export { AuditoriaModificador, AuditoriaModificadorBase, Cargo, CargoBase, CargoFireConvert, CargoFirestoreData, Departamento, DepartamentoBase, DepartamentoFireConvert, DepartamentoFirestoreData, EmpresaFeriado, EmpresaFeriadoBase, EmpresaFeriadoFireConvert, EmpresaFeriadoFirestoreData, EnumAuditoriaModificadorTipo, EnumExcecaoStatus, EnumExcecaoTipo, Escala, EscalaBase, EscalaFireConvert, EscalaFirestoreData, Excecao, Feriado, FeriadoBase, FeriadoFireConvert, FeriadoFirestoreData, FeriadoJsonConvert, FeriadoJsonData, FeriadoTipoEnum, IExcecao, Lancamento, LancamentoBase, LancamentoFireConvert, LancamentoFirestoreData, LancamentoJsonConvert, LancamentoJsonData, LancamentoPeriodo, LancamentoPeriodoBase, LancamentoStatusEnum, OcorrenciaFrequenciaCopiaEmDocumento, OcorrenciaFrequenciaRelacaoJornadas, OcorrenciaFrequenciaRelacaoJornadasValue, TipoAcaoLancamentoEnum, TipoOcorrenciaFrequenciaEnum, TipoReferenciaVerificacaoLancamento, VerificacaoLancamento, VerificacaoLancamentoBase, VerificacaoLancamentoFireConvert, VerificacaoLancamentoFirestoreData, } from './models/index';
package/lib/index.js CHANGED
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VerificacaoLancamentoFirestoreData = exports.VerificacaoLancamentoFireConvert = exports.VerificacaoLancamento = exports.TipoReferenciaVerificacaoLancamento = exports.TipoOcorrenciaFrequenciaEnum = exports.TipoAcaoLancamentoEnum = exports.OcorrenciaFrequenciaRelacaoJornadas = exports.LancamentoStatusEnum = exports.LancamentoPeriodo = exports.LancamentoJsonData = exports.LancamentoJsonConvert = exports.LancamentoFirestoreData = exports.LancamentoFireConvert = exports.Lancamento = exports.FeriadoTipoEnum = exports.FeriadoJsonData = exports.FeriadoJsonConvert = exports.FeriadoFirestoreData = exports.FeriadoFireConvert = exports.Feriado = exports.Excecao = exports.EscalaFirestoreData = exports.EscalaFireConvert = exports.Escala = exports.EnumExcecaoTipo = exports.EnumExcecaoStatus = exports.EmpresaFeriadoFirestoreData = exports.EmpresaFeriadoFireConvert = exports.EmpresaFeriado = exports.DepartamentoFirestoreData = exports.DepartamentoFireConvert = exports.Departamento = exports.CargoFirestoreData = exports.CargoFireConvert = exports.Cargo = void 0;
3
+ exports.VerificacaoLancamentoFirestoreData = exports.VerificacaoLancamentoFireConvert = exports.VerificacaoLancamento = exports.TipoReferenciaVerificacaoLancamento = exports.TipoOcorrenciaFrequenciaEnum = exports.TipoAcaoLancamentoEnum = exports.OcorrenciaFrequenciaRelacaoJornadas = exports.LancamentoStatusEnum = exports.LancamentoPeriodo = exports.LancamentoJsonData = exports.LancamentoJsonConvert = exports.LancamentoFirestoreData = exports.LancamentoFireConvert = exports.Lancamento = exports.FeriadoTipoEnum = exports.FeriadoJsonData = exports.FeriadoJsonConvert = exports.FeriadoFirestoreData = exports.FeriadoFireConvert = exports.Feriado = exports.Excecao = exports.EscalaFirestoreData = exports.EscalaFireConvert = exports.Escala = exports.EnumExcecaoTipo = exports.EnumExcecaoStatus = exports.EnumAuditoriaModificadorTipo = exports.EmpresaFeriadoFirestoreData = exports.EmpresaFeriadoFireConvert = exports.EmpresaFeriado = exports.DepartamentoFirestoreData = exports.DepartamentoFireConvert = exports.Departamento = exports.CargoFirestoreData = exports.CargoFireConvert = exports.Cargo = exports.AuditoriaModificador = void 0;
4
4
  var index_1 = require("./models/index");
5
+ Object.defineProperty(exports, "AuditoriaModificador", { enumerable: true, get: function () { return index_1.AuditoriaModificador; } });
5
6
  Object.defineProperty(exports, "Cargo", { enumerable: true, get: function () { return index_1.Cargo; } });
6
7
  Object.defineProperty(exports, "CargoFireConvert", { enumerable: true, get: function () { return index_1.CargoFireConvert; } });
7
8
  Object.defineProperty(exports, "CargoFirestoreData", { enumerable: true, get: function () { return index_1.CargoFirestoreData; } });
@@ -11,6 +12,7 @@ Object.defineProperty(exports, "DepartamentoFirestoreData", { enumerable: true,
11
12
  Object.defineProperty(exports, "EmpresaFeriado", { enumerable: true, get: function () { return index_1.EmpresaFeriado; } });
12
13
  Object.defineProperty(exports, "EmpresaFeriadoFireConvert", { enumerable: true, get: function () { return index_1.EmpresaFeriadoFireConvert; } });
13
14
  Object.defineProperty(exports, "EmpresaFeriadoFirestoreData", { enumerable: true, get: function () { return index_1.EmpresaFeriadoFirestoreData; } });
15
+ Object.defineProperty(exports, "EnumAuditoriaModificadorTipo", { enumerable: true, get: function () { return index_1.EnumAuditoriaModificadorTipo; } });
14
16
  Object.defineProperty(exports, "EnumExcecaoStatus", { enumerable: true, get: function () { return index_1.EnumExcecaoStatus; } });
15
17
  Object.defineProperty(exports, "EnumExcecaoTipo", { enumerable: true, get: function () { return index_1.EnumExcecaoTipo; } });
16
18
  Object.defineProperty(exports, "Escala", { enumerable: true, get: function () { return index_1.Escala; } });
@@ -0,0 +1,28 @@
1
+ export declare enum EnumAuditoriaModificadorTipo {
2
+ USUARIO = "USUARIO",
3
+ API_ECONTADOR = "API_ECONTADOR",
4
+ API_DOMINIO = "API_DOMINIO"
5
+ }
6
+ export interface AuditoriaModificadorBase {
7
+ id: string;
8
+ ref: any;
9
+ tipo: EnumAuditoriaModificadorTipo;
10
+ nome: string;
11
+ documento: string;
12
+ email: string;
13
+ }
14
+ /**
15
+ * Internal class auditoria doc.
16
+ *
17
+ * @export
18
+ * @class Lancamento
19
+ */
20
+ export declare class AuditoriaModificador implements AuditoriaModificadorBase {
21
+ id: string;
22
+ ref: string;
23
+ tipo: EnumAuditoriaModificadorTipo;
24
+ nome: string;
25
+ documento: string;
26
+ email: string;
27
+ constructor(lancamentoPayload: Partial<AuditoriaModificador>);
28
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuditoriaModificador = exports.EnumAuditoriaModificadorTipo = void 0;
4
+ var EnumAuditoriaModificadorTipo;
5
+ (function (EnumAuditoriaModificadorTipo) {
6
+ EnumAuditoriaModificadorTipo["USUARIO"] = "USUARIO";
7
+ EnumAuditoriaModificadorTipo["API_ECONTADOR"] = "API_ECONTADOR";
8
+ EnumAuditoriaModificadorTipo["API_DOMINIO"] = "API_DOMINIO";
9
+ })(EnumAuditoriaModificadorTipo = exports.EnumAuditoriaModificadorTipo || (exports.EnumAuditoriaModificadorTipo = {}));
10
+ /**
11
+ * Internal class auditoria doc.
12
+ *
13
+ * @export
14
+ * @class Lancamento
15
+ */
16
+ var AuditoriaModificador = /** @class */ (function () {
17
+ function AuditoriaModificador(lancamentoPayload) {
18
+ var _a, _b, _c, _d, _e, _f;
19
+ this.id = (_a = lancamentoPayload.id) !== null && _a !== void 0 ? _a : undefined;
20
+ this.ref = (_b = lancamentoPayload.ref) !== null && _b !== void 0 ? _b : undefined;
21
+ this.tipo = (_c = lancamentoPayload.tipo) !== null && _c !== void 0 ? _c : undefined;
22
+ this.nome = (_d = lancamentoPayload.nome) !== null && _d !== void 0 ? _d : undefined;
23
+ this.documento = (_e = lancamentoPayload.documento) !== null && _e !== void 0 ? _e : undefined;
24
+ this.email = (_f = lancamentoPayload.email) !== null && _f !== void 0 ? _f : undefined;
25
+ }
26
+ return AuditoriaModificador;
27
+ }());
28
+ exports.AuditoriaModificador = AuditoriaModificador;
@@ -0,0 +1,14 @@
1
+ import { AuditoriaModificador, AuditoriaModificadorBase, EnumAuditoriaModificadorTipo } from '.';
2
+ import { FirebaseDocumentReferenceGeneric, FirebaseDocumentSnapshotGeneric, FirebaseQueryDocumentSnapshotGeneric } from '../../../../shared/flitModelsDependencyInjection';
3
+ export declare class AuditoriaModificadorFirestoreData implements AuditoriaModificadorBase {
4
+ id: string;
5
+ ref: FirebaseDocumentReferenceGeneric;
6
+ tipo: EnumAuditoriaModificadorTipo;
7
+ nome: string;
8
+ documento: string;
9
+ email: string;
10
+ }
11
+ export declare abstract class AuditoriaModificadorFireConvert {
12
+ static fromFirestore(doc: FirebaseDocumentSnapshotGeneric | FirebaseQueryDocumentSnapshotGeneric): AuditoriaModificador;
13
+ static toFirestore(auditoriaModificador: AuditoriaModificador): Partial<AuditoriaModificadorFirestoreData>;
14
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuditoriaModificadorFireConvert = exports.AuditoriaModificadorFirestoreData = void 0;
4
+ var lodash_1 = require("lodash");
5
+ var _1 = require(".");
6
+ var flitModelsDependencyInjection_1 = require("../../../../shared/flitModelsDependencyInjection");
7
+ var string_helper_1 = require("../../../utils/string-helper");
8
+ var AuditoriaModificadorFirestoreData = /** @class */ (function () {
9
+ function AuditoriaModificadorFirestoreData() {
10
+ }
11
+ return AuditoriaModificadorFirestoreData;
12
+ }());
13
+ exports.AuditoriaModificadorFirestoreData = AuditoriaModificadorFirestoreData;
14
+ var AuditoriaModificadorFireConvert = /** @class */ (function () {
15
+ function AuditoriaModificadorFireConvert() {
16
+ }
17
+ AuditoriaModificadorFireConvert.fromFirestore = function (doc) {
18
+ var _a, _b, _c, _d, _e;
19
+ var docData = ((_a = doc.data()) !== null && _a !== void 0 ? _a : {});
20
+ return new _1.AuditoriaModificador({
21
+ id: (_b = docData.id) !== null && _b !== void 0 ? _b : null,
22
+ ref: (_d = (_c = docData.ref) === null || _c === void 0 ? void 0 : _c.path) !== null && _d !== void 0 ? _d : null,
23
+ tipo: (_e = docData.tipo) !== null && _e !== void 0 ? _e : null,
24
+ nome: string_helper_1.StringHelper.trim(docData.nome, null),
25
+ documento: string_helper_1.StringHelper.check(docData.documento, null),
26
+ email: string_helper_1.StringHelper.lower(docData.email, null),
27
+ });
28
+ };
29
+ AuditoriaModificadorFireConvert.toFirestore = function (auditoriaModificador) {
30
+ var _a, _b, _c;
31
+ var auditoriaModificadorFire = {
32
+ id: (_a = auditoriaModificador.id) !== null && _a !== void 0 ? _a : null,
33
+ ref: (_b = flitModelsDependencyInjection_1.FlitModelsDependencyInjection.DocumentReferenceFromPath(auditoriaModificador.ref)) !== null && _b !== void 0 ? _b : null,
34
+ tipo: (_c = auditoriaModificador.tipo) !== null && _c !== void 0 ? _c : null,
35
+ nome: string_helper_1.StringHelper.trim(auditoriaModificador.nome, null),
36
+ documento: string_helper_1.StringHelper.check(auditoriaModificador.documento, null),
37
+ email: string_helper_1.StringHelper.lower(auditoriaModificador.email, null),
38
+ };
39
+ return (0, lodash_1.omitBy)(auditoriaModificadorFire, lodash_1.isUndefined);
40
+ };
41
+ return AuditoriaModificadorFireConvert;
42
+ }());
43
+ exports.AuditoriaModificadorFireConvert = AuditoriaModificadorFireConvert;
@@ -30,13 +30,15 @@ var Cargo = /** @class */ (function () {
30
30
  * @memberof Lancamento
31
31
  */
32
32
  function Cargo(lancamentoPayload) {
33
- var _this = this;
34
- var keysOfProps = ["_id", "_path", "nome", "excluido", "cbo", "data_atualizacao_doc", "data_criacao_doc"];
35
- keysOfProps.forEach(function (key) {
36
- _this[key] = lancamentoPayload
37
- ? lancamentoPayload[key]
38
- : undefined;
39
- });
33
+ var _a, _b, _c, _d, _e, _f, _g;
34
+ this._id = (_a = lancamentoPayload._id) !== null && _a !== void 0 ? _a : undefined;
35
+ this._path = (_b = lancamentoPayload._path) !== null && _b !== void 0 ? _b : undefined;
36
+ this.cbo = (_c = lancamentoPayload.cbo) !== null && _c !== void 0 ? _c : undefined;
37
+ this.data_atualizacao_doc =
38
+ (_d = lancamentoPayload.data_atualizacao_doc) !== null && _d !== void 0 ? _d : undefined;
39
+ this.data_criacao_doc = (_e = lancamentoPayload.data_criacao_doc) !== null && _e !== void 0 ? _e : undefined;
40
+ this.excluido = (_f = lancamentoPayload.excluido) !== null && _f !== void 0 ? _f : undefined;
41
+ this.nome = (_g = lancamentoPayload.nome) !== null && _g !== void 0 ? _g : undefined;
40
42
  }
41
43
  return Cargo;
42
44
  }());
@@ -30,13 +30,14 @@ var Departamento = /** @class */ (function () {
30
30
  * @memberof Lancamento
31
31
  */
32
32
  function Departamento(lancamentoPayload) {
33
- var _this = this;
34
- var keysOfProps = ["_id", "_path", "descricao", "excluido", "data_atualizacao_doc", "data_criacao_doc"];
35
- keysOfProps.forEach(function (key) {
36
- _this[key] = lancamentoPayload
37
- ? lancamentoPayload[key]
38
- : undefined;
39
- });
33
+ var _a, _b, _c, _d, _e, _f;
34
+ this._id = (_a = lancamentoPayload._id) !== null && _a !== void 0 ? _a : undefined;
35
+ this._path = (_b = lancamentoPayload._path) !== null && _b !== void 0 ? _b : undefined;
36
+ this.data_atualizacao_doc =
37
+ (_c = lancamentoPayload.data_atualizacao_doc) !== null && _c !== void 0 ? _c : undefined;
38
+ this.data_criacao_doc = (_d = lancamentoPayload.data_criacao_doc) !== null && _d !== void 0 ? _d : undefined;
39
+ this.descricao = (_e = lancamentoPayload.descricao) !== null && _e !== void 0 ? _e : undefined;
40
+ this.excluido = (_f = lancamentoPayload.excluido) !== null && _f !== void 0 ? _f : undefined;
40
41
  }
41
42
  return Departamento;
42
43
  }());
@@ -30,13 +30,18 @@ var Escala = /** @class */ (function () {
30
30
  * @memberof Lancamento
31
31
  */
32
32
  function Escala(lancamentoPayload) {
33
- var _this = this;
34
- var keysOfProps = ["_id", "_path", "descricao", "excluido", "data_inicial", "data_atualizacao_doc", "data_criacao_doc", "existe_marcacao_pre_assinalada", "jornadas"];
35
- keysOfProps.forEach(function (key) {
36
- _this[key] = lancamentoPayload
37
- ? lancamentoPayload[key]
38
- : undefined;
39
- });
33
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
34
+ this._id = (_a = lancamentoPayload._id) !== null && _a !== void 0 ? _a : undefined;
35
+ this._path = (_b = lancamentoPayload._path) !== null && _b !== void 0 ? _b : undefined;
36
+ this.data_atualizacao_doc =
37
+ (_c = lancamentoPayload.data_atualizacao_doc) !== null && _c !== void 0 ? _c : undefined;
38
+ this.data_criacao_doc = (_d = lancamentoPayload.data_criacao_doc) !== null && _d !== void 0 ? _d : undefined;
39
+ this.data_inicial = (_e = lancamentoPayload.data_inicial) !== null && _e !== void 0 ? _e : undefined;
40
+ this.descricao = (_f = lancamentoPayload.descricao) !== null && _f !== void 0 ? _f : undefined;
41
+ this.excluido = (_g = lancamentoPayload.excluido) !== null && _g !== void 0 ? _g : undefined;
42
+ this.existe_marcacao_pre_assinalada =
43
+ (_h = lancamentoPayload.existe_marcacao_pre_assinalada) !== null && _h !== void 0 ? _h : undefined;
44
+ this.jornadas = (_j = lancamentoPayload.jornadas) !== null && _j !== void 0 ? _j : undefined;
40
45
  }
41
46
  return Escala;
42
47
  }());
@@ -41,11 +41,23 @@ var Excecao = /** @class */ (function () {
41
41
  * @memberof Excecao
42
42
  */
43
43
  function Excecao(excecaoPayload) {
44
- var _this = this;
45
- var keysOfProps = ["path", "status", "uid", "usuario", "data_cancelamento", "data_criacao", "data_lancamento_manual_horas_extras", "data_parecer", "data_referencia", "gestor", "observacao", "parecer", "periodo", "retificacao_ref", "tempo", "timezone", "tipo", "usuario_ref"];
46
- keysOfProps.forEach(function (key) {
47
- _this[key] = excecaoPayload ? excecaoPayload[key] : undefined;
48
- });
44
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
45
+ this.data_cancelamento = (_a = excecaoPayload.data_cancelamento) !== null && _a !== void 0 ? _a : undefined;
46
+ this.data_criacao = (_b = excecaoPayload.data_criacao) !== null && _b !== void 0 ? _b : undefined;
47
+ this.data_lancamento_manual_horas_extras =
48
+ (_c = excecaoPayload.data_lancamento_manual_horas_extras) !== null && _c !== void 0 ? _c : undefined;
49
+ this.data_parecer = (_d = excecaoPayload.data_parecer) !== null && _d !== void 0 ? _d : undefined;
50
+ this.data_referencia = (_e = excecaoPayload.data_referencia) !== null && _e !== void 0 ? _e : undefined;
51
+ this.gestor = (_f = excecaoPayload.gestor) !== null && _f !== void 0 ? _f : undefined;
52
+ this.observacao = (_g = excecaoPayload.observacao) !== null && _g !== void 0 ? _g : undefined;
53
+ this.parecer = (_h = excecaoPayload.parecer) !== null && _h !== void 0 ? _h : undefined;
54
+ this.periodo = (_j = excecaoPayload.periodo) !== null && _j !== void 0 ? _j : undefined;
55
+ this.retificacao_ref = (_k = excecaoPayload.retificacao_ref) !== null && _k !== void 0 ? _k : undefined;
56
+ this.status = (_l = excecaoPayload.status) !== null && _l !== void 0 ? _l : undefined;
57
+ this.tempo = (_m = excecaoPayload.tempo) !== null && _m !== void 0 ? _m : undefined;
58
+ this.timezone = (_o = excecaoPayload.timezone) !== null && _o !== void 0 ? _o : undefined;
59
+ this.tipo = (_p = excecaoPayload.tipo) !== null && _p !== void 0 ? _p : undefined;
60
+ this.usuario_ref = (_q = excecaoPayload.usuario_ref) !== null && _q !== void 0 ? _q : undefined;
49
61
  }
50
62
  /**
51
63
  * Convert class in firestore date.
@@ -15,13 +15,14 @@ var EmpresaFeriado = /** @class */ (function () {
15
15
  * @memberof Feriado
16
16
  */
17
17
  function EmpresaFeriado(feriadoEmpresaPayload) {
18
- var _this = this;
19
- var keysOfProps = ["ref", "_id", "_path", "documento", "municipio", "nome", "uf"];
20
- keysOfProps.forEach(function (key) {
21
- _this[key] = feriadoEmpresaPayload
22
- ? feriadoEmpresaPayload[key]
23
- : undefined;
24
- });
18
+ var _a, _b, _c, _d, _e, _f, _g;
19
+ this._id = (_a = feriadoEmpresaPayload._id) !== null && _a !== void 0 ? _a : undefined;
20
+ this._path = (_b = feriadoEmpresaPayload._path) !== null && _b !== void 0 ? _b : undefined;
21
+ this.documento = (_c = feriadoEmpresaPayload.documento) !== null && _c !== void 0 ? _c : undefined;
22
+ this.municipio = (_d = feriadoEmpresaPayload.municipio) !== null && _d !== void 0 ? _d : undefined;
23
+ this.nome = (_e = feriadoEmpresaPayload.nome) !== null && _e !== void 0 ? _e : undefined;
24
+ this.ref = (_f = feriadoEmpresaPayload.ref) !== null && _f !== void 0 ? _f : undefined;
25
+ this.uf = (_g = feriadoEmpresaPayload.uf) !== null && _g !== void 0 ? _g : undefined;
25
26
  }
26
27
  return EmpresaFeriado;
27
28
  }());
@@ -38,11 +38,17 @@ var Feriado = /** @class */ (function () {
38
38
  * @memberof Feriado
39
39
  */
40
40
  function Feriado(feriadoPayload) {
41
- var _this = this;
42
- var keysOfProps = ["data", "tipo", "_id", "_path", "municipio", "uf", "descricao", "excluido", "importacao_id", "todas_empresas"];
43
- keysOfProps.forEach(function (key) {
44
- _this[key] = feriadoPayload ? feriadoPayload[key] : undefined;
45
- });
41
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
42
+ this._id = (_a = feriadoPayload._id) !== null && _a !== void 0 ? _a : undefined;
43
+ this._path = (_b = feriadoPayload._path) !== null && _b !== void 0 ? _b : undefined;
44
+ this.data = (_c = feriadoPayload.data) !== null && _c !== void 0 ? _c : undefined;
45
+ this.descricao = (_d = feriadoPayload.descricao) !== null && _d !== void 0 ? _d : undefined;
46
+ this.excluido = (_e = feriadoPayload.excluido) !== null && _e !== void 0 ? _e : undefined;
47
+ this.importacao_id = (_f = feriadoPayload.importacao_id) !== null && _f !== void 0 ? _f : undefined;
48
+ this.municipio = (_g = feriadoPayload.municipio) !== null && _g !== void 0 ? _g : undefined;
49
+ this.tipo = (_h = feriadoPayload.tipo) !== null && _h !== void 0 ? _h : undefined;
50
+ this.todas_empresas = (_j = feriadoPayload.todas_empresas) !== null && _j !== void 0 ? _j : undefined;
51
+ this.uf = (_k = feriadoPayload.uf) !== null && _k !== void 0 ? _k : undefined;
46
52
  }
47
53
  return Feriado;
48
54
  }());
@@ -63,13 +63,25 @@ var Lancamento = /** @class */ (function () {
63
63
  * @memberof Lancamento
64
64
  */
65
65
  function Lancamento(lancamentoPayload) {
66
- var _this = this;
67
- var keysOfProps = ["status", "data_criacao", "_id", "_path", "descricao", "excluido", "data_atualizacao", "acao_tipo", "data_final", "data_inicial", "data_intervalo", "empresa", "ocorrencia", "periodos", "todos_colaboradores", "colaboradores_ids", "integracao"];
68
- keysOfProps.forEach(function (key) {
69
- _this[key] = lancamentoPayload
70
- ? lancamentoPayload[key]
71
- : undefined;
72
- });
66
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
67
+ this._id = (_a = lancamentoPayload._id) !== null && _a !== void 0 ? _a : undefined;
68
+ this._path = (_b = lancamentoPayload._path) !== null && _b !== void 0 ? _b : undefined;
69
+ this.data_criacao = (_c = lancamentoPayload.data_criacao) !== null && _c !== void 0 ? _c : undefined;
70
+ this.data_atualizacao = (_d = lancamentoPayload.data_atualizacao) !== null && _d !== void 0 ? _d : undefined;
71
+ this.acao_tipo = (_e = lancamentoPayload.acao_tipo) !== null && _e !== void 0 ? _e : undefined;
72
+ this.data_final = (_f = lancamentoPayload.data_final) !== null && _f !== void 0 ? _f : undefined;
73
+ this.data_inicial = (_g = lancamentoPayload.data_inicial) !== null && _g !== void 0 ? _g : undefined;
74
+ this.data_intervalo = (_h = lancamentoPayload.data_intervalo) !== null && _h !== void 0 ? _h : undefined;
75
+ this.descricao = (_j = lancamentoPayload.descricao) !== null && _j !== void 0 ? _j : undefined;
76
+ this.empresa = (_k = lancamentoPayload.empresa) !== null && _k !== void 0 ? _k : undefined;
77
+ this.excluido = (_l = lancamentoPayload.excluido) !== null && _l !== void 0 ? _l : undefined;
78
+ this.ocorrencia = (_m = lancamentoPayload.ocorrencia) !== null && _m !== void 0 ? _m : undefined;
79
+ this.periodos = (_o = lancamentoPayload.periodos) !== null && _o !== void 0 ? _o : undefined;
80
+ this.status = (_p = lancamentoPayload.status) !== null && _p !== void 0 ? _p : undefined;
81
+ this.todos_colaboradores =
82
+ (_q = lancamentoPayload.todos_colaboradores) !== null && _q !== void 0 ? _q : undefined;
83
+ this.colaboradores_ids = (_r = lancamentoPayload.colaboradores_ids) !== null && _r !== void 0 ? _r : undefined;
84
+ this.integracao = (_s = lancamentoPayload.integracao) !== null && _s !== void 0 ? _s : undefined;
73
85
  }
74
86
  return Lancamento;
75
87
  }());
@@ -20,13 +20,14 @@ var VerificacaoLancamento = /** @class */ (function () {
20
20
  * @memberof Lancamento
21
21
  */
22
22
  function VerificacaoLancamento(usuarioLancamentoPayload) {
23
- var _this = this;
24
- var keysOfProps = ["data_criacao", "_id", "_path", "mensagem", "detalhes", "visto", "referencia"];
25
- keysOfProps.forEach(function (key) {
26
- _this[key] = usuarioLancamentoPayload
27
- ? usuarioLancamentoPayload[key]
28
- : undefined;
29
- });
23
+ var _a, _b, _c, _d, _e, _f, _g;
24
+ this._id = (_a = usuarioLancamentoPayload._id) !== null && _a !== void 0 ? _a : undefined;
25
+ this._path = (_b = usuarioLancamentoPayload._path) !== null && _b !== void 0 ? _b : undefined;
26
+ this.data_criacao = (_c = usuarioLancamentoPayload.data_criacao) !== null && _c !== void 0 ? _c : undefined;
27
+ this.mensagem = (_d = usuarioLancamentoPayload.mensagem) !== null && _d !== void 0 ? _d : undefined;
28
+ this.detalhes = (_e = usuarioLancamentoPayload.detalhes) !== null && _e !== void 0 ? _e : undefined;
29
+ this.visto = (_f = usuarioLancamentoPayload.visto) !== null && _f !== void 0 ? _f : undefined;
30
+ this.referencia = (_g = usuarioLancamentoPayload.referencia) !== null && _g !== void 0 ? _g : undefined;
30
31
  }
31
32
  return VerificacaoLancamento;
32
33
  }());
@@ -1,7 +1,8 @@
1
+ export * from './contas/auditoria/modificador';
2
+ export * from './contas/cargo';
3
+ export * from './contas/departamento';
4
+ export * from './contas/escala';
1
5
  export * from './contas/excecoes';
2
6
  export * from './contas/feriado';
3
7
  export * from './contas/lancamento';
4
8
  export * from './contas/ocorrencia_frequencia';
5
- export * from './contas/cargo';
6
- export * from './contas/departamento';
7
- export * from './contas/escala';
@@ -14,10 +14,11 @@ 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
+ __exportStar(require("./contas/auditoria/modificador"), exports);
18
+ __exportStar(require("./contas/cargo"), exports);
19
+ __exportStar(require("./contas/departamento"), exports);
20
+ __exportStar(require("./contas/escala"), exports);
17
21
  __exportStar(require("./contas/excecoes"), exports);
18
22
  __exportStar(require("./contas/feriado"), exports);
19
23
  __exportStar(require("./contas/lancamento"), exports);
20
24
  __exportStar(require("./contas/ocorrencia_frequencia"), exports);
21
- __exportStar(require("./contas/cargo"), exports);
22
- __exportStar(require("./contas/departamento"), exports);
23
- __exportStar(require("./contas/escala"), exports);
@@ -1,4 +1,5 @@
1
1
  export declare abstract class StringHelper {
2
2
  static check(str: string, def: string | null): string;
3
+ static lower(str: string, def: string | null): string;
3
4
  static trim(str: string, def: string | null): string;
4
5
  }
@@ -12,6 +12,14 @@ var StringHelper = /** @class */ (function () {
12
12
  return def;
13
13
  }
14
14
  };
15
+ StringHelper.lower = function (str, def) {
16
+ if (typeof str === 'string') {
17
+ return String(str).toLowerCase();
18
+ }
19
+ else {
20
+ return def;
21
+ }
22
+ };
15
23
  StringHelper.trim = function (str, def) {
16
24
  if (typeof str === 'string') {
17
25
  return str.trim();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flit-models",
3
- "version": "3.0.7",
3
+ "version": "3.1.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -12,7 +12,7 @@
12
12
  "lint": "eslint \"src/**/*\"",
13
13
  "format": "prettier --write \"src/**/*.ts\"",
14
14
  "prepublish-check": "npm test && npm run lint",
15
- "build": "ttsc",
15
+ "build": "tsc",
16
16
  "prepare": "npm run build",
17
17
  "prepublishOnly": "npm test && npm run lint",
18
18
  "preversion": "npm run lint",
@@ -23,26 +23,24 @@
23
23
  "author": "gustavo_damazio",
24
24
  "license": "ISC",
25
25
  "dependencies": {
26
- "firebase": "^9.9.0",
27
- "lodash": "^4.17.21",
28
- "ts-transformer-keys": "^0.4.3"
26
+ "firebase": "^9.10.0",
27
+ "lodash": "^4.17.21"
29
28
  },
30
29
  "devDependencies": {
31
- "@google-cloud/firestore": "^5.0.2",
32
- "@types/jest": "^28.1.4",
33
- "@types/lodash": "^4.14.182",
34
- "@typescript-eslint/eslint-plugin": "^5.30.6",
35
- "@typescript-eslint/parser": "^5.30.6",
36
- "eslint": "^8.19.0",
30
+ "@google-cloud/firestore": "^6.2.0",
31
+ "@types/jest": "^29.0.3",
32
+ "@types/lodash": "^4.14.185",
33
+ "@typescript-eslint/eslint-plugin": "^5.37.0",
34
+ "@typescript-eslint/parser": "^5.37.0",
35
+ "eslint": "^8.23.1",
37
36
  "eslint-config-google": "^0.14.0",
38
37
  "eslint-config-prettier": "^8.5.0",
39
38
  "eslint-plugin-import": "^2.26.0",
40
- "eslint-plugin-jest": "^26.5.3",
39
+ "eslint-plugin-jest": "^27.0.4",
41
40
  "eslint-plugin-prettier": "^4.2.1",
42
- "jest": "^28.1.2",
41
+ "jest": "^29.0.3",
43
42
  "prettier": "^2.7.1",
44
- "ts-jest": "^28.0.5",
45
- "ttypescript": "^1.5.13",
46
- "typescript": "^4.7.4"
43
+ "ts-jest": "^29.0.1",
44
+ "typescript": "^4.8.3"
47
45
  }
48
46
  }