flit-models 2.1.29 → 2.1.30
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 -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/package.json +1 -1
- 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/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, UsuarioLancamento, UsuarioLancamentoBase, UsuarioLancamentoFireConvert, UsuarioLancamentoFirestoreData, VerificacaoLancamento, VerificacaoLancamentoBase, } 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.UsuarioLancamentoFirestoreData = exports.UsuarioLancamentoFireConvert = exports.UsuarioLancamento = exports.
|
|
3
|
+
exports.VerificacaoLancamento = exports.UsuarioLancamentoFirestoreData = exports.UsuarioLancamentoFireConvert = exports.UsuarioLancamento = 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,7 +24,7 @@ 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, "
|
|
27
|
+
Object.defineProperty(exports, "TipoReferenciaVerificacaoLancamento", { enumerable: true, get: function () { return index_1.TipoReferenciaVerificacaoLancamento; } });
|
|
28
28
|
Object.defineProperty(exports, "UsuarioLancamento", { enumerable: true, get: function () { return index_1.UsuarioLancamento; } });
|
|
29
29
|
Object.defineProperty(exports, "UsuarioLancamentoFireConvert", { enumerable: true, get: function () { return index_1.UsuarioLancamentoFireConvert; } });
|
|
30
30
|
Object.defineProperty(exports, "UsuarioLancamentoFirestoreData", { enumerable: true, get: function () { return index_1.UsuarioLancamentoFirestoreData; } });
|
|
@@ -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
|
*
|
package/package.json
CHANGED
|
@@ -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;
|