flit-models 2.1.29 → 2.1.32
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 +2 -5
- package/lib/models/contas/lancamento/index.d.ts +4 -5
- package/lib/models/contas/lancamento/index.js +1 -3
- package/lib/models/contas/lancamento/lancamento-fire-convert.d.ts +2 -1
- package/lib/models/contas/lancamento/lancamento-fire-convert.js +30 -27
- package/lib/models/contas/lancamento/lancamento-json-convert.d.ts +2 -1
- package/lib/models/contas/lancamento/lancamento-json-convert.js +4 -2
- package/lib/models/contas/lancamento/verificacoes/verificacao-lancamento-fire-convert.d.ts +2 -2
- package/lib/models/contas/lancamento/verificacoes/verificacao-lancamento.d.ts +2 -2
- package/lib/models/contas/lancamento/verificacoes/verificacao-lancamento.js +6 -6
- package/lib/models/contas/ocorrencia_frequencia/index.d.ts +5 -0
- package/package.json +11 -11
- package/lib/models/contas/lancamento/logs/log-lancamento-fire-convert.d.ts +0 -20
- package/lib/models/contas/lancamento/logs/log-lancamento-fire-convert.js +0 -58
- package/lib/models/contas/lancamento/logs/log-lancamento.d.ts +0 -51
- package/lib/models/contas/lancamento/logs/log-lancamento.js +0 -40
- package/lib/models/contas/lancamento/usuarios/usuario-lancamento-fire-convert.d.ts +0 -12
- package/lib/models/contas/lancamento/usuarios/usuario-lancamento-fire-convert.js +0 -41
- package/lib/models/contas/lancamento/usuarios/usuario-lancamento.d.ts +0 -27
- package/lib/models/contas/lancamento/usuarios/usuario-lancamento.js +0 -28
package/lib/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { EmpresaFeriado, EmpresaFeriadoBase, EmpresaFeriadoFireConvert, EmpresaFeriadoFirestoreData, EnumExcecaoStatus, EnumExcecaoTipo, Excecao, Feriado, FeriadoBase, FeriadoFireConvert, FeriadoFirestoreData, FeriadoJsonConvert, FeriadoJsonData, FeriadoTipoEnum, IExcecao, Lancamento, LancamentoBase, LancamentoFireConvert, LancamentoFirestoreData, LancamentoJsonConvert, LancamentoJsonData, LancamentoStatusEnum, VerificacaoLancamentoFireConvert, VerificacaoLancamentoFirestoreData, TipoAcaoLancamentoEnum, TipoOcorrenciaFrequenciaEnum,
|
|
1
|
+
export { EmpresaFeriado, EmpresaFeriadoBase, EmpresaFeriadoFireConvert, EmpresaFeriadoFirestoreData, EnumExcecaoStatus, EnumExcecaoTipo, Excecao, Feriado, FeriadoBase, FeriadoFireConvert, FeriadoFirestoreData, FeriadoJsonConvert, FeriadoJsonData, FeriadoTipoEnum, IExcecao, Lancamento, LancamentoBase, LancamentoFireConvert, LancamentoFirestoreData, LancamentoJsonConvert, LancamentoJsonData, LancamentoStatusEnum, VerificacaoLancamentoFireConvert, VerificacaoLancamentoFirestoreData, TipoAcaoLancamentoEnum, TipoOcorrenciaFrequenciaEnum, TipoReferenciaVerificacaoLancamento, VerificacaoLancamento, VerificacaoLancamentoBase, OcorrenciaFrequenciaCopiaEmDocumento, } from './models/index';
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VerificacaoLancamento = exports.
|
|
3
|
+
exports.VerificacaoLancamento = exports.TipoReferenciaVerificacaoLancamento = exports.TipoOcorrenciaFrequenciaEnum = exports.TipoAcaoLancamentoEnum = exports.VerificacaoLancamentoFirestoreData = exports.VerificacaoLancamentoFireConvert = exports.LancamentoStatusEnum = 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.EnumExcecaoTipo = exports.EnumExcecaoStatus = exports.EmpresaFeriadoFirestoreData = exports.EmpresaFeriadoFireConvert = exports.EmpresaFeriado = void 0;
|
|
4
4
|
var index_1 = require("./models/index");
|
|
5
5
|
Object.defineProperty(exports, "EmpresaFeriado", { enumerable: true, get: function () { return index_1.EmpresaFeriado; } });
|
|
6
6
|
Object.defineProperty(exports, "EmpresaFeriadoFireConvert", { enumerable: true, get: function () { return index_1.EmpresaFeriadoFireConvert; } });
|
|
@@ -24,8 +24,5 @@ Object.defineProperty(exports, "VerificacaoLancamentoFireConvert", { enumerable:
|
|
|
24
24
|
Object.defineProperty(exports, "VerificacaoLancamentoFirestoreData", { enumerable: true, get: function () { return index_1.VerificacaoLancamentoFirestoreData; } });
|
|
25
25
|
Object.defineProperty(exports, "TipoAcaoLancamentoEnum", { enumerable: true, get: function () { return index_1.TipoAcaoLancamentoEnum; } });
|
|
26
26
|
Object.defineProperty(exports, "TipoOcorrenciaFrequenciaEnum", { enumerable: true, get: function () { return index_1.TipoOcorrenciaFrequenciaEnum; } });
|
|
27
|
-
Object.defineProperty(exports, "
|
|
28
|
-
Object.defineProperty(exports, "UsuarioLancamento", { enumerable: true, get: function () { return index_1.UsuarioLancamento; } });
|
|
29
|
-
Object.defineProperty(exports, "UsuarioLancamentoFireConvert", { enumerable: true, get: function () { return index_1.UsuarioLancamentoFireConvert; } });
|
|
30
|
-
Object.defineProperty(exports, "UsuarioLancamentoFirestoreData", { enumerable: true, get: function () { return index_1.UsuarioLancamentoFirestoreData; } });
|
|
27
|
+
Object.defineProperty(exports, "TipoReferenciaVerificacaoLancamento", { enumerable: true, get: function () { return index_1.TipoReferenciaVerificacaoLancamento; } });
|
|
31
28
|
Object.defineProperty(exports, "VerificacaoLancamento", { enumerable: true, get: function () { return index_1.VerificacaoLancamento; } });
|
|
@@ -3,8 +3,6 @@ export * from './lancamento-fire-convert';
|
|
|
3
3
|
export * from './lancamento-json-convert';
|
|
4
4
|
export * from './verificacoes/verificacao-lancamento-fire-convert';
|
|
5
5
|
export * from './verificacoes/verificacao-lancamento';
|
|
6
|
-
export * from './usuarios/usuario-lancamento-fire-convert';
|
|
7
|
-
export * from './usuarios/usuario-lancamento';
|
|
8
6
|
export declare enum LancamentoStatusEnum {
|
|
9
7
|
COMPLETO = "COMPLETO",
|
|
10
8
|
PROCESSANDO = "PROCESSANDO",
|
|
@@ -34,8 +32,7 @@ export interface LancamentoBase {
|
|
|
34
32
|
excluido: any;
|
|
35
33
|
acao_tipo: any;
|
|
36
34
|
ocorrencia: {
|
|
37
|
-
|
|
38
|
-
path?: any;
|
|
35
|
+
uid: any;
|
|
39
36
|
tipo: any;
|
|
40
37
|
descricao: any;
|
|
41
38
|
};
|
|
@@ -48,6 +45,7 @@ export interface LancamentoBase {
|
|
|
48
45
|
};
|
|
49
46
|
status: any;
|
|
50
47
|
todos_colaboradores: any;
|
|
48
|
+
colaboradores_ids: any[];
|
|
51
49
|
periodos: [
|
|
52
50
|
{
|
|
53
51
|
inicial: {
|
|
@@ -86,12 +84,13 @@ export declare class Lancamento implements LancamentoBase {
|
|
|
86
84
|
};
|
|
87
85
|
excluido: boolean;
|
|
88
86
|
ocorrencia: {
|
|
89
|
-
|
|
87
|
+
uid: string;
|
|
90
88
|
tipo: TipoOcorrenciaFrequenciaEnum;
|
|
91
89
|
descricao: string;
|
|
92
90
|
};
|
|
93
91
|
status: LancamentoStatusEnum;
|
|
94
92
|
todos_colaboradores: boolean;
|
|
93
|
+
colaboradores_ids: string[];
|
|
95
94
|
periodos: [
|
|
96
95
|
{
|
|
97
96
|
inicial: {
|
|
@@ -19,8 +19,6 @@ __exportStar(require("./lancamento-fire-convert"), exports);
|
|
|
19
19
|
__exportStar(require("./lancamento-json-convert"), exports);
|
|
20
20
|
__exportStar(require("./verificacoes/verificacao-lancamento-fire-convert"), exports);
|
|
21
21
|
__exportStar(require("./verificacoes/verificacao-lancamento"), exports);
|
|
22
|
-
__exportStar(require("./usuarios/usuario-lancamento-fire-convert"), exports);
|
|
23
|
-
__exportStar(require("./usuarios/usuario-lancamento"), exports);
|
|
24
22
|
var LancamentoStatusEnum;
|
|
25
23
|
(function (LancamentoStatusEnum) {
|
|
26
24
|
LancamentoStatusEnum["COMPLETO"] = "COMPLETO";
|
|
@@ -57,7 +55,7 @@ var Lancamento = /** @class */ (function () {
|
|
|
57
55
|
*/
|
|
58
56
|
function Lancamento(lancamentoPayload) {
|
|
59
57
|
var _this = this;
|
|
60
|
-
var keysOfProps = ["data_criacao", "status", "_id", "_path", "descricao", "excluido", "
|
|
58
|
+
var keysOfProps = ["data_criacao", "status", "_id", "_path", "descricao", "excluido", "data_atualizacao", "data_intervalo", "periodos", "data_inicial", "data_final", "acao_tipo", "ocorrencia", "empresa", "todos_colaboradores", "colaboradores_ids"];
|
|
61
59
|
keysOfProps.forEach(function (key) {
|
|
62
60
|
_this[key] = lancamentoPayload
|
|
63
61
|
? lancamentoPayload[key]
|
|
@@ -24,7 +24,7 @@ export declare class LancamentoFirestoreData implements LancamentoBase {
|
|
|
24
24
|
excluido: boolean;
|
|
25
25
|
acao_tipo: TipoAcaoLancamentoEnum;
|
|
26
26
|
ocorrencia: {
|
|
27
|
-
|
|
27
|
+
uid: string;
|
|
28
28
|
tipo: TipoOcorrenciaFrequenciaEnum;
|
|
29
29
|
descricao: string;
|
|
30
30
|
};
|
|
@@ -36,6 +36,7 @@ export declare class LancamentoFirestoreData implements LancamentoBase {
|
|
|
36
36
|
};
|
|
37
37
|
status: LancamentoStatusEnum;
|
|
38
38
|
todos_colaboradores: boolean;
|
|
39
|
+
colaboradores_ids: string[];
|
|
39
40
|
}
|
|
40
41
|
export declare abstract class LancamentoFireConvert {
|
|
41
42
|
static fromFirestore(doc: DocumentSnapshot<LancamentoFirestoreData> | QueryDocumentSnapshot<LancamentoFirestoreData>): Lancamento;
|
|
@@ -18,42 +18,44 @@ var LancamentoFireConvert = /** @class */ (function () {
|
|
|
18
18
|
function LancamentoFireConvert() {
|
|
19
19
|
}
|
|
20
20
|
LancamentoFireConvert.fromFirestore = function (doc) {
|
|
21
|
-
var _a, _b, _c, _d;
|
|
21
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
22
|
+
var docData = ((_a = doc.data()) !== null && _a !== void 0 ? _a : {});
|
|
22
23
|
return new _1.Lancamento({
|
|
23
|
-
_id: (
|
|
24
|
-
_path: (
|
|
25
|
-
data_inicial: (0, type_guards_1.TipoTimestampFirestore)(
|
|
26
|
-
?
|
|
24
|
+
_id: (_b = doc.id) !== null && _b !== void 0 ? _b : null,
|
|
25
|
+
_path: (_c = doc.ref.path) !== null && _c !== void 0 ? _c : null,
|
|
26
|
+
data_inicial: (0, type_guards_1.TipoTimestampFirestore)(docData.data_inicial)
|
|
27
|
+
? docData.data_inicial.toDate()
|
|
27
28
|
: null,
|
|
28
|
-
data_final: (0, type_guards_1.TipoTimestampFirestore)(
|
|
29
|
-
?
|
|
29
|
+
data_final: (0, type_guards_1.TipoTimestampFirestore)(docData.data_final)
|
|
30
|
+
? docData.data_final.toDate()
|
|
30
31
|
: null,
|
|
31
|
-
descricao: string_helper_1.StringHelper.trim(
|
|
32
|
-
excluido: boolean_helper_1.BooleanHelper.check(
|
|
33
|
-
acao_tipo: string_helper_1.StringHelper.trim(
|
|
34
|
-
status: string_helper_1.StringHelper.trim(
|
|
32
|
+
descricao: string_helper_1.StringHelper.trim(docData.descricao, null),
|
|
33
|
+
excluido: boolean_helper_1.BooleanHelper.check(docData.excluido, false),
|
|
34
|
+
acao_tipo: string_helper_1.StringHelper.trim(docData.acao_tipo, null),
|
|
35
|
+
status: string_helper_1.StringHelper.trim(docData.status, null),
|
|
35
36
|
empresa: {
|
|
36
|
-
documento: string_helper_1.StringHelper.trim(
|
|
37
|
-
fantasia: string_helper_1.StringHelper.trim(
|
|
38
|
-
razao: string_helper_1.StringHelper.trim(
|
|
39
|
-
path: string_helper_1.StringHelper.trim(
|
|
37
|
+
documento: string_helper_1.StringHelper.trim((_d = docData.empresa) === null || _d === void 0 ? void 0 : _d.documento, null),
|
|
38
|
+
fantasia: string_helper_1.StringHelper.trim((_e = docData.empresa) === null || _e === void 0 ? void 0 : _e.fantasia, null),
|
|
39
|
+
razao: string_helper_1.StringHelper.trim((_f = docData.empresa) === null || _f === void 0 ? void 0 : _f.razao, null),
|
|
40
|
+
path: string_helper_1.StringHelper.trim((_g = docData.empresa) === null || _g === void 0 ? void 0 : _g.ref.path, null),
|
|
40
41
|
},
|
|
41
|
-
ocorrencia:
|
|
42
|
+
ocorrencia: docData.ocorrencia
|
|
42
43
|
? {
|
|
43
|
-
descricao: string_helper_1.StringHelper.trim(
|
|
44
|
-
|
|
45
|
-
tipo: string_helper_1.StringHelper.trim(
|
|
44
|
+
descricao: string_helper_1.StringHelper.trim(docData.ocorrencia.descricao, null),
|
|
45
|
+
uid: string_helper_1.StringHelper.trim(docData.ocorrencia.uid, null),
|
|
46
|
+
tipo: string_helper_1.StringHelper.trim(docData.ocorrencia.tipo, null),
|
|
46
47
|
}
|
|
47
48
|
: null,
|
|
48
|
-
todos_colaboradores: boolean_helper_1.BooleanHelper.check(
|
|
49
|
-
periodos: ((
|
|
50
|
-
data_atualizacao: (0, type_guards_1.TipoTimestampFirestore)(
|
|
51
|
-
?
|
|
49
|
+
todos_colaboradores: boolean_helper_1.BooleanHelper.check(docData.todos_colaboradores, true),
|
|
50
|
+
periodos: ((_h = docData.periodos) === null || _h === void 0 ? void 0 : _h.length) ? docData.periodos : null,
|
|
51
|
+
data_atualizacao: (0, type_guards_1.TipoTimestampFirestore)(docData.data_atualizacao)
|
|
52
|
+
? docData.data_atualizacao.toDate()
|
|
52
53
|
: undefined,
|
|
53
|
-
data_criacao: (0, type_guards_1.TipoTimestampFirestore)(
|
|
54
|
-
?
|
|
54
|
+
data_criacao: (0, type_guards_1.TipoTimestampFirestore)(docData.data_criacao)
|
|
55
|
+
? docData.data_criacao.toDate()
|
|
55
56
|
: undefined,
|
|
56
|
-
data_intervalo: array_helpers_1.ArrayHelper.checkStringArray(
|
|
57
|
+
data_intervalo: array_helpers_1.ArrayHelper.checkStringArray(docData.data_intervalo, undefined),
|
|
58
|
+
colaboradores_ids: array_helpers_1.ArrayHelper.checkStringArray(docData.colaboradores_ids, null),
|
|
57
59
|
});
|
|
58
60
|
};
|
|
59
61
|
LancamentoFireConvert.toFirestore = function (lancamento, documentReferenceFromPath, timestampfromDate) {
|
|
@@ -74,6 +76,7 @@ var LancamentoFireConvert = /** @class */ (function () {
|
|
|
74
76
|
? firestore_1.Timestamp.fromDate(lancamento.data_final)
|
|
75
77
|
: null,
|
|
76
78
|
data_intervalo: array_helpers_1.ArrayHelper.checkStringArray(lancamento.data_intervalo, undefined),
|
|
79
|
+
colaboradores_ids: array_helpers_1.ArrayHelper.checkStringArray(lancamento.data_intervalo, undefined),
|
|
77
80
|
descricao: string_helper_1.StringHelper.trim(lancamento.descricao, null),
|
|
78
81
|
excluido: boolean_helper_1.BooleanHelper.check(lancamento.excluido, false),
|
|
79
82
|
acao_tipo: string_helper_1.StringHelper.trim(lancamento.acao_tipo, null),
|
|
@@ -86,7 +89,7 @@ var LancamentoFireConvert = /** @class */ (function () {
|
|
|
86
89
|
},
|
|
87
90
|
ocorrencia: lancamento.ocorrencia
|
|
88
91
|
? {
|
|
89
|
-
|
|
92
|
+
uid: string_helper_1.StringHelper.trim(lancamento.ocorrencia.uid, null),
|
|
90
93
|
descricao: string_helper_1.StringHelper.trim(lancamento.ocorrencia.descricao, null),
|
|
91
94
|
tipo: string_helper_1.StringHelper.trim(lancamento.acao_tipo, null),
|
|
92
95
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TipoAcaoLancamentoEnum, Lancamento, LancamentoBase, LancamentoStatusEnum } from '.';
|
|
2
2
|
import { TipoOcorrenciaFrequenciaEnum } from '../ocorrencia_frequencia';
|
|
3
3
|
export declare class LancamentoJsonData implements LancamentoBase {
|
|
4
|
+
colaboradores_ids: string[];
|
|
4
5
|
data_intervalo: string[];
|
|
5
6
|
data_criacao: string;
|
|
6
7
|
data_atualizacao: string;
|
|
@@ -25,7 +26,7 @@ export declare class LancamentoJsonData implements LancamentoBase {
|
|
|
25
26
|
excluido: boolean;
|
|
26
27
|
acao_tipo: TipoAcaoLancamentoEnum;
|
|
27
28
|
ocorrencia: {
|
|
28
|
-
|
|
29
|
+
uid: string;
|
|
29
30
|
tipo: TipoOcorrenciaFrequenciaEnum;
|
|
30
31
|
descricao: string;
|
|
31
32
|
};
|
|
@@ -36,7 +36,7 @@ var LancamentoJsonConvert = /** @class */ (function () {
|
|
|
36
36
|
ocorrencia: obj.ocorrencia
|
|
37
37
|
? {
|
|
38
38
|
descricao: string_helper_1.StringHelper.trim(obj.ocorrencia.descricao, null),
|
|
39
|
-
|
|
39
|
+
uid: string_helper_1.StringHelper.trim(obj.ocorrencia.uid, null),
|
|
40
40
|
tipo: string_helper_1.StringHelper.trim(obj.ocorrencia.tipo, null),
|
|
41
41
|
}
|
|
42
42
|
: null,
|
|
@@ -45,6 +45,7 @@ var LancamentoJsonConvert = /** @class */ (function () {
|
|
|
45
45
|
data_atualizacao: date_helper_1.DateHelper.fromString(obj.data_atualizacao, null),
|
|
46
46
|
data_criacao: date_helper_1.DateHelper.fromString(obj.data_criacao, null),
|
|
47
47
|
data_intervalo: array_helpers_1.ArrayHelper.checkStringArray(obj.data_intervalo, null),
|
|
48
|
+
colaboradores_ids: array_helpers_1.ArrayHelper.checkStringArray(obj.colaboradores_ids, null),
|
|
48
49
|
});
|
|
49
50
|
};
|
|
50
51
|
LancamentoJsonConvert.toJson = function (lancamento) {
|
|
@@ -67,7 +68,7 @@ var LancamentoJsonConvert = /** @class */ (function () {
|
|
|
67
68
|
ocorrencia: lancamento.ocorrencia
|
|
68
69
|
? {
|
|
69
70
|
descricao: string_helper_1.StringHelper.trim(lancamento.ocorrencia.descricao, null),
|
|
70
|
-
|
|
71
|
+
uid: string_helper_1.StringHelper.trim(lancamento.ocorrencia.uid, null),
|
|
71
72
|
tipo: string_helper_1.StringHelper.trim(lancamento.ocorrencia.tipo, null),
|
|
72
73
|
}
|
|
73
74
|
: null,
|
|
@@ -76,6 +77,7 @@ var LancamentoJsonConvert = /** @class */ (function () {
|
|
|
76
77
|
data_criacao: (_f = lancamento.data_criacao) === null || _f === void 0 ? void 0 : _f.toISOString(),
|
|
77
78
|
data_atualizacao: (_g = lancamento.data_atualizacao) === null || _g === void 0 ? void 0 : _g.toISOString(),
|
|
78
79
|
data_intervalo: array_helpers_1.ArrayHelper.checkStringArray(lancamento.data_intervalo, undefined),
|
|
80
|
+
colaboradores_ids: array_helpers_1.ArrayHelper.checkStringArray(lancamento.colaboradores_ids, undefined),
|
|
79
81
|
};
|
|
80
82
|
return (0, lodash_1.omitBy)(lancamentoJson, lodash_1.isUndefined);
|
|
81
83
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DocumentReference, DocumentSnapshot, QueryDocumentSnapshot, Timestamp } from 'firebase/firestore';
|
|
2
|
-
import { VerificacaoLancamento, VerificacaoLancamentoBase,
|
|
2
|
+
import { VerificacaoLancamento, VerificacaoLancamentoBase, TipoReferenciaVerificacaoLancamento } from './verificacao-lancamento';
|
|
3
3
|
export declare class VerificacaoLancamentoFirestoreData implements VerificacaoLancamentoBase {
|
|
4
4
|
detalhes?: {
|
|
5
5
|
[key: string]: any;
|
|
@@ -10,7 +10,7 @@ export declare class VerificacaoLancamentoFirestoreData implements VerificacaoLa
|
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
referencia: {
|
|
13
|
-
tipo:
|
|
13
|
+
tipo: TipoReferenciaVerificacaoLancamento;
|
|
14
14
|
data?: Timestamp;
|
|
15
15
|
ref: DocumentReference;
|
|
16
16
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare enum
|
|
1
|
+
export declare enum TipoReferenciaVerificacaoLancamento {
|
|
2
2
|
JORNADA = "JORNADA",
|
|
3
3
|
USUARIO = "USUARIO"
|
|
4
4
|
}
|
|
@@ -42,7 +42,7 @@ export declare class VerificacaoLancamento implements VerificacaoLancamentoBase
|
|
|
42
42
|
};
|
|
43
43
|
visto: boolean;
|
|
44
44
|
referencia: {
|
|
45
|
-
tipo:
|
|
45
|
+
tipo: TipoReferenciaVerificacaoLancamento;
|
|
46
46
|
data?: Date;
|
|
47
47
|
ref: string;
|
|
48
48
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VerificacaoLancamento = exports.
|
|
4
|
-
var
|
|
5
|
-
(function (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
})(
|
|
3
|
+
exports.VerificacaoLancamento = exports.TipoReferenciaVerificacaoLancamento = void 0;
|
|
4
|
+
var TipoReferenciaVerificacaoLancamento;
|
|
5
|
+
(function (TipoReferenciaVerificacaoLancamento) {
|
|
6
|
+
TipoReferenciaVerificacaoLancamento["JORNADA"] = "JORNADA";
|
|
7
|
+
TipoReferenciaVerificacaoLancamento["USUARIO"] = "USUARIO";
|
|
8
|
+
})(TipoReferenciaVerificacaoLancamento = exports.TipoReferenciaVerificacaoLancamento || (exports.TipoReferenciaVerificacaoLancamento = {}));
|
|
9
9
|
/**
|
|
10
10
|
* Internal class col contas/${contaId}/lancamentos/${lancamentoId}/verificacoes_lancamentos/${usuarioId}.
|
|
11
11
|
*
|
|
@@ -10,3 +10,8 @@ export declare enum TipoOcorrenciaFrequenciaEnum {
|
|
|
10
10
|
JornadaExterna = "Jornada externa",
|
|
11
11
|
Suspensao = "Suspens\u00E3o"
|
|
12
12
|
}
|
|
13
|
+
export interface OcorrenciaFrequenciaCopiaEmDocumento {
|
|
14
|
+
uid: string;
|
|
15
|
+
tipo: TipoOcorrenciaFrequenciaEnum;
|
|
16
|
+
descricao: string;
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flit-models",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.32",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -23,25 +23,25 @@
|
|
|
23
23
|
"author": "gustavo_damazio",
|
|
24
24
|
"license": "ISC",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"firebase": "^9.6.
|
|
26
|
+
"firebase": "^9.6.10",
|
|
27
27
|
"lodash": "^4.17.21",
|
|
28
28
|
"ts-transformer-keys": "^0.4.3"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/jest": "^27.4.1",
|
|
32
|
-
"@types/lodash": "^4.14.
|
|
33
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
34
|
-
"@typescript-eslint/parser": "^5.
|
|
35
|
-
"eslint": "^8.
|
|
32
|
+
"@types/lodash": "^4.14.181",
|
|
33
|
+
"@typescript-eslint/eslint-plugin": "^5.18.0",
|
|
34
|
+
"@typescript-eslint/parser": "^5.18.0",
|
|
35
|
+
"eslint": "^8.12.0",
|
|
36
36
|
"eslint-config-google": "^0.14.0",
|
|
37
37
|
"eslint-config-prettier": "^8.5.0",
|
|
38
|
-
"eslint-plugin-import": "^2.
|
|
39
|
-
"eslint-plugin-jest": "^26.1.
|
|
38
|
+
"eslint-plugin-import": "^2.26.0",
|
|
39
|
+
"eslint-plugin-jest": "^26.1.4",
|
|
40
40
|
"eslint-plugin-prettier": "^4.0.0",
|
|
41
41
|
"jest": "^27.5.1",
|
|
42
|
-
"prettier": "^2.6.
|
|
43
|
-
"ts-jest": "^27.1.
|
|
42
|
+
"prettier": "^2.6.2",
|
|
43
|
+
"ts-jest": "^27.1.4",
|
|
44
44
|
"ttypescript": "^1.5.13",
|
|
45
|
-
"typescript": "^4.6.
|
|
45
|
+
"typescript": "^4.6.3"
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { DocumentReference, DocumentSnapshot, QueryDocumentSnapshot, Timestamp } from 'firebase/firestore';
|
|
2
|
-
import { LogLancamento, LogLancamentoBase, LogLancamentoStatusEnum, TipoReferenciaLogLancamento } from './log-lancamento';
|
|
3
|
-
export declare class LogLancamentoFirestoreData implements LogLancamentoBase {
|
|
4
|
-
referencia: {
|
|
5
|
-
tipo: TipoReferenciaLogLancamento;
|
|
6
|
-
data?: Timestamp;
|
|
7
|
-
ref: DocumentReference;
|
|
8
|
-
};
|
|
9
|
-
visto: boolean;
|
|
10
|
-
data_criacao: Timestamp;
|
|
11
|
-
mensagem: string;
|
|
12
|
-
detalhes: {
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
};
|
|
15
|
-
tipo: LogLancamentoStatusEnum;
|
|
16
|
-
}
|
|
17
|
-
export declare abstract class LogLancamentoFireConvert {
|
|
18
|
-
static fromFirestore(doc: DocumentSnapshot<LogLancamentoFirestoreData> | QueryDocumentSnapshot<LogLancamentoFirestoreData>): LogLancamento;
|
|
19
|
-
static toFirestore(logLancamento: LogLancamento, timestampfromDate: (date: Date) => any, documentReferenceFromPath: (path: string) => DocumentReference<any>): Partial<LogLancamentoFirestoreData>;
|
|
20
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LogLancamentoFireConvert = exports.LogLancamentoFirestoreData = void 0;
|
|
4
|
-
var lodash_1 = require("lodash");
|
|
5
|
-
var boolean_helper_1 = require("../../../utils/boolean-helper");
|
|
6
|
-
var string_helper_1 = require("../../../utils/string-helper");
|
|
7
|
-
var type_guards_1 = require("../../../utils/type-guards");
|
|
8
|
-
var log_lancamento_1 = require("./log-lancamento");
|
|
9
|
-
var LogLancamentoFirestoreData = /** @class */ (function () {
|
|
10
|
-
function LogLancamentoFirestoreData() {
|
|
11
|
-
}
|
|
12
|
-
return LogLancamentoFirestoreData;
|
|
13
|
-
}());
|
|
14
|
-
exports.LogLancamentoFirestoreData = LogLancamentoFirestoreData;
|
|
15
|
-
var LogLancamentoFireConvert = /** @class */ (function () {
|
|
16
|
-
function LogLancamentoFireConvert() {
|
|
17
|
-
}
|
|
18
|
-
LogLancamentoFireConvert.fromFirestore = function (doc) {
|
|
19
|
-
var _a, _b, _c, _d;
|
|
20
|
-
return new log_lancamento_1.LogLancamento({
|
|
21
|
-
_id: (_a = doc.id) !== null && _a !== void 0 ? _a : null,
|
|
22
|
-
_path: (_b = doc.ref.path) !== null && _b !== void 0 ? _b : null,
|
|
23
|
-
data_criacao: (0, type_guards_1.TipoTimestampFirestore)(doc.get('data_criacao'))
|
|
24
|
-
? doc.get('data_criacao').toDate()
|
|
25
|
-
: null,
|
|
26
|
-
referencia: {
|
|
27
|
-
ref: (0, type_guards_1.TipoDocumentReference)(doc.get('referencia.ref'))
|
|
28
|
-
? doc.get('referencia.ref').path
|
|
29
|
-
: null,
|
|
30
|
-
data: (0, type_guards_1.TipoTimestampFirestore)(doc.get('referencia.data'))
|
|
31
|
-
? doc.get('referencia.data').toDate()
|
|
32
|
-
: null,
|
|
33
|
-
tipo: string_helper_1.StringHelper.trim(doc.get('referencia.tipo'), null),
|
|
34
|
-
},
|
|
35
|
-
mensagem: string_helper_1.StringHelper.trim(doc.get('mensagem'), null),
|
|
36
|
-
tipo: string_helper_1.StringHelper.trim(doc.get('tipo'), null),
|
|
37
|
-
detalhes: (_c = doc.get('detalhes')) !== null && _c !== void 0 ? _c : null,
|
|
38
|
-
visto: (_d = doc.get('visto')) !== null && _d !== void 0 ? _d : false,
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
LogLancamentoFireConvert.toFirestore = function (logLancamento, timestampfromDate, documentReferenceFromPath) {
|
|
42
|
-
var logLancamentoFirestore = {
|
|
43
|
-
mensagem: logLancamento.mensagem,
|
|
44
|
-
detalhes: logLancamento.detalhes,
|
|
45
|
-
tipo: logLancamento.tipo,
|
|
46
|
-
data_criacao: timestampfromDate(logLancamento.data_criacao),
|
|
47
|
-
referencia: {
|
|
48
|
-
data: timestampfromDate(logLancamento.referencia.data),
|
|
49
|
-
ref: documentReferenceFromPath(logLancamento.referencia.ref),
|
|
50
|
-
tipo: string_helper_1.StringHelper.trim(logLancamento.referencia.tipo, null),
|
|
51
|
-
},
|
|
52
|
-
visto: boolean_helper_1.BooleanHelper.check(logLancamento.visto, false),
|
|
53
|
-
};
|
|
54
|
-
return (0, lodash_1.omitBy)(logLancamentoFirestore, lodash_1.isUndefined);
|
|
55
|
-
};
|
|
56
|
-
return LogLancamentoFireConvert;
|
|
57
|
-
}());
|
|
58
|
-
exports.LogLancamentoFireConvert = LogLancamentoFireConvert;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
export declare enum LogLancamentoStatusEnum {
|
|
2
|
-
AVISO = "AVISO",
|
|
3
|
-
CRITICO = "CRITICO",
|
|
4
|
-
ERRO = "ERRO",
|
|
5
|
-
INFORMATIVO = "INFORMATIVO"
|
|
6
|
-
}
|
|
7
|
-
export declare enum TipoReferenciaLogLancamento {
|
|
8
|
-
JORNADA = "JORNADA",
|
|
9
|
-
USUARIO = "USUARIO"
|
|
10
|
-
}
|
|
11
|
-
export interface LogLancamentoBase {
|
|
12
|
-
data_criacao: any;
|
|
13
|
-
mensagem: any;
|
|
14
|
-
detalhes: any;
|
|
15
|
-
tipo: any;
|
|
16
|
-
referencia: {
|
|
17
|
-
tipo: any;
|
|
18
|
-
data?: any;
|
|
19
|
-
ref: any;
|
|
20
|
-
};
|
|
21
|
-
visto: any;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Internal class col contas/${contaId}/lancamentos/${lancamentoId}/logs_lancamentos/${usuarioId}.
|
|
25
|
-
*
|
|
26
|
-
* @export
|
|
27
|
-
* @class UsuarioLancamento
|
|
28
|
-
* @implements {LogLancamentoBase}
|
|
29
|
-
*/
|
|
30
|
-
export declare class LogLancamento implements LogLancamentoBase {
|
|
31
|
-
_id: string;
|
|
32
|
-
_path: string;
|
|
33
|
-
data_criacao: Date;
|
|
34
|
-
mensagem: string;
|
|
35
|
-
detalhes: {
|
|
36
|
-
[key: string]: any;
|
|
37
|
-
};
|
|
38
|
-
tipo: LogLancamentoStatusEnum;
|
|
39
|
-
visto: boolean;
|
|
40
|
-
referencia: {
|
|
41
|
-
tipo: TipoReferenciaLogLancamento;
|
|
42
|
-
data?: Date;
|
|
43
|
-
ref: string;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* Creates an instance of UsuarioLancamento.
|
|
47
|
-
* @param {Partial<LogLancamento>} usuarioLancamentoPayload
|
|
48
|
-
* @memberof Lancamento
|
|
49
|
-
*/
|
|
50
|
-
constructor(usuarioLancamentoPayload: Partial<LogLancamento>);
|
|
51
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LogLancamento = exports.TipoReferenciaLogLancamento = exports.LogLancamentoStatusEnum = void 0;
|
|
4
|
-
var LogLancamentoStatusEnum;
|
|
5
|
-
(function (LogLancamentoStatusEnum) {
|
|
6
|
-
LogLancamentoStatusEnum["AVISO"] = "AVISO";
|
|
7
|
-
LogLancamentoStatusEnum["CRITICO"] = "CRITICO";
|
|
8
|
-
LogLancamentoStatusEnum["ERRO"] = "ERRO";
|
|
9
|
-
LogLancamentoStatusEnum["INFORMATIVO"] = "INFORMATIVO";
|
|
10
|
-
})(LogLancamentoStatusEnum = exports.LogLancamentoStatusEnum || (exports.LogLancamentoStatusEnum = {}));
|
|
11
|
-
var TipoReferenciaLogLancamento;
|
|
12
|
-
(function (TipoReferenciaLogLancamento) {
|
|
13
|
-
TipoReferenciaLogLancamento["JORNADA"] = "JORNADA";
|
|
14
|
-
TipoReferenciaLogLancamento["USUARIO"] = "USUARIO";
|
|
15
|
-
})(TipoReferenciaLogLancamento = exports.TipoReferenciaLogLancamento || (exports.TipoReferenciaLogLancamento = {}));
|
|
16
|
-
/**
|
|
17
|
-
* Internal class col contas/${contaId}/lancamentos/${lancamentoId}/logs_lancamentos/${usuarioId}.
|
|
18
|
-
*
|
|
19
|
-
* @export
|
|
20
|
-
* @class UsuarioLancamento
|
|
21
|
-
* @implements {LogLancamentoBase}
|
|
22
|
-
*/
|
|
23
|
-
var LogLancamento = /** @class */ (function () {
|
|
24
|
-
/**
|
|
25
|
-
* Creates an instance of UsuarioLancamento.
|
|
26
|
-
* @param {Partial<LogLancamento>} usuarioLancamentoPayload
|
|
27
|
-
* @memberof Lancamento
|
|
28
|
-
*/
|
|
29
|
-
function LogLancamento(usuarioLancamentoPayload) {
|
|
30
|
-
var _this = this;
|
|
31
|
-
var keysOfProps = ["data_criacao", "tipo", "_id", "_path", "mensagem", "detalhes", "visto", "referencia"];
|
|
32
|
-
keysOfProps.forEach(function (key) {
|
|
33
|
-
_this[key] = usuarioLancamentoPayload
|
|
34
|
-
? usuarioLancamentoPayload[key]
|
|
35
|
-
: undefined;
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
return LogLancamento;
|
|
39
|
-
}());
|
|
40
|
-
exports.LogLancamento = LogLancamento;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DocumentReference, DocumentSnapshot, QueryDocumentSnapshot } from 'firebase/firestore';
|
|
2
|
-
import { UsuarioLancamento, UsuarioLancamentoBase } from './usuario-lancamento';
|
|
3
|
-
export declare class UsuarioLancamentoFirestoreData implements UsuarioLancamentoBase {
|
|
4
|
-
documento: string;
|
|
5
|
-
nome_completo: string;
|
|
6
|
-
nome: string;
|
|
7
|
-
ref: DocumentReference;
|
|
8
|
-
}
|
|
9
|
-
export declare abstract class UsuarioLancamentoFireConvert {
|
|
10
|
-
static fromFirestore(doc: DocumentSnapshot<UsuarioLancamentoFirestoreData> | QueryDocumentSnapshot<UsuarioLancamentoFirestoreData>): UsuarioLancamento;
|
|
11
|
-
static toFirestore(usuarioLancamento: UsuarioLancamento, documentReferenceFromPath: (path: string) => DocumentReference<any>): Partial<UsuarioLancamentoFirestoreData>;
|
|
12
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UsuarioLancamentoFireConvert = exports.UsuarioLancamentoFirestoreData = void 0;
|
|
4
|
-
var lodash_1 = require("lodash");
|
|
5
|
-
var string_helper_1 = require("../../../utils/string-helper");
|
|
6
|
-
var type_guards_1 = require("../../../utils/type-guards");
|
|
7
|
-
var usuario_lancamento_1 = require("./usuario-lancamento");
|
|
8
|
-
var UsuarioLancamentoFirestoreData = /** @class */ (function () {
|
|
9
|
-
function UsuarioLancamentoFirestoreData() {
|
|
10
|
-
}
|
|
11
|
-
return UsuarioLancamentoFirestoreData;
|
|
12
|
-
}());
|
|
13
|
-
exports.UsuarioLancamentoFirestoreData = UsuarioLancamentoFirestoreData;
|
|
14
|
-
var UsuarioLancamentoFireConvert = /** @class */ (function () {
|
|
15
|
-
function UsuarioLancamentoFireConvert() {
|
|
16
|
-
}
|
|
17
|
-
UsuarioLancamentoFireConvert.fromFirestore = function (doc) {
|
|
18
|
-
var _a, _b;
|
|
19
|
-
return new usuario_lancamento_1.UsuarioLancamento({
|
|
20
|
-
_id: (_a = doc.id) !== null && _a !== void 0 ? _a : null,
|
|
21
|
-
_path: (_b = doc.ref.path) !== null && _b !== void 0 ? _b : null,
|
|
22
|
-
ref: (0, type_guards_1.TipoDocumentReference)(doc.get('ref'))
|
|
23
|
-
? doc.get('ref').path
|
|
24
|
-
: null,
|
|
25
|
-
documento: string_helper_1.StringHelper.trim(doc.get('documento'), null),
|
|
26
|
-
nome_completo: string_helper_1.StringHelper.trim(doc.get('nome_completo'), null),
|
|
27
|
-
nome: string_helper_1.StringHelper.trim(doc.get('nome'), null),
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
UsuarioLancamentoFireConvert.toFirestore = function (usuarioLancamento, documentReferenceFromPath) {
|
|
31
|
-
var usuarioLancamentoFirestore = {
|
|
32
|
-
documento: usuarioLancamento.documento,
|
|
33
|
-
nome_completo: usuarioLancamento.nome_completo,
|
|
34
|
-
nome: usuarioLancamento.nome,
|
|
35
|
-
ref: documentReferenceFromPath(usuarioLancamento.ref),
|
|
36
|
-
};
|
|
37
|
-
return (0, lodash_1.omitBy)(usuarioLancamentoFirestore, lodash_1.isUndefined);
|
|
38
|
-
};
|
|
39
|
-
return UsuarioLancamentoFireConvert;
|
|
40
|
-
}());
|
|
41
|
-
exports.UsuarioLancamentoFireConvert = UsuarioLancamentoFireConvert;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface UsuarioLancamentoBase {
|
|
2
|
-
documento: any;
|
|
3
|
-
nome_completo: any;
|
|
4
|
-
nome: any;
|
|
5
|
-
ref: any;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Internal class col contas/${contaId}/lancamentos/${lancamentoId}/usuarios_lancamentos/${usuarioId}.
|
|
9
|
-
*
|
|
10
|
-
* @export
|
|
11
|
-
* @class UsuarioLancamento
|
|
12
|
-
* @implements {UsuarioLancamentoBase}
|
|
13
|
-
*/
|
|
14
|
-
export declare class UsuarioLancamento implements UsuarioLancamentoBase {
|
|
15
|
-
_id: string;
|
|
16
|
-
_path: string;
|
|
17
|
-
documento: string;
|
|
18
|
-
nome_completo: string;
|
|
19
|
-
nome: string;
|
|
20
|
-
ref: string;
|
|
21
|
-
/**
|
|
22
|
-
* Creates an instance of UsuarioLancamento.
|
|
23
|
-
* @param {Partial<UsuarioLancamento>} usuarioLancamentoPayload
|
|
24
|
-
* @memberof Lancamento
|
|
25
|
-
*/
|
|
26
|
-
constructor(usuarioLancamentoPayload: Partial<UsuarioLancamento>);
|
|
27
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UsuarioLancamento = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Internal class col contas/${contaId}/lancamentos/${lancamentoId}/usuarios_lancamentos/${usuarioId}.
|
|
6
|
-
*
|
|
7
|
-
* @export
|
|
8
|
-
* @class UsuarioLancamento
|
|
9
|
-
* @implements {UsuarioLancamentoBase}
|
|
10
|
-
*/
|
|
11
|
-
var UsuarioLancamento = /** @class */ (function () {
|
|
12
|
-
/**
|
|
13
|
-
* Creates an instance of UsuarioLancamento.
|
|
14
|
-
* @param {Partial<UsuarioLancamento>} usuarioLancamentoPayload
|
|
15
|
-
* @memberof Lancamento
|
|
16
|
-
*/
|
|
17
|
-
function UsuarioLancamento(usuarioLancamentoPayload) {
|
|
18
|
-
var _this = this;
|
|
19
|
-
var keysOfProps = ["_id", "_path", "documento", "nome", "ref", "nome_completo"];
|
|
20
|
-
keysOfProps.forEach(function (key) {
|
|
21
|
-
_this[key] = usuarioLancamentoPayload
|
|
22
|
-
? usuarioLancamentoPayload[key]
|
|
23
|
-
: undefined;
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
return UsuarioLancamento;
|
|
27
|
-
}());
|
|
28
|
-
exports.UsuarioLancamento = UsuarioLancamento;
|