flit-models 2.1.8 → 2.1.11
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 +20 -6
- package/lib/models/contas/lancamento/index.d.ts +10 -0
- package/lib/models/contas/lancamento/index.js +1 -1
- package/lib/models/contas/lancamento/lancamento-fire-convert.d.ts +5 -0
- package/lib/models/contas/lancamento/lancamento-fire-convert.js +5 -1
- package/lib/models/contas/lancamento/lancamento-json-convert.d.ts +5 -0
- package/lib/models/contas/lancamento/lancamento-json-convert.js +6 -2
- package/lib/models/contas/ocorrencia_frequencia/index.d.ts +1 -0
- package/lib/models/contas/ocorrencia_frequencia/index.js +1 -0
- package/lib/models/index.d.ts +1 -0
- package/lib/models/index.js +1 -0
- package/package.json +5 -5
package/lib/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { EnumExcecaoStatus, EnumExcecaoTipo, Excecao,
|
|
1
|
+
export { EmpresaFeriado, EmpresaFeriadoBase, EmpresaFeriadoFireConvert, EmpresaFeriadoFirestoreData, EnumExcecaoStatus, EnumExcecaoTipo, Excecao, Feriado, FeriadoBase, FeriadoFireConvert, FeriadoFirestoreData, FeriadoJsonConvert, FeriadoJsonData, FeriadoTipoEnum, IExcecao, Lancamento, LancamentoBase, LancamentoFireConvert, LancamentoFirestoreData, LancamentoJsonConvert, LancamentoJsonData, LancamentoStatusEnum, LogLancamento, LogLancamentoBase, LogLancamentoFireConvert, LogLancamentoFirestoreData, LogLancamentoStatusEnum, TiposOcorrenciaFrequenciaEnum, UsuarioLancamento, UsuarioLancamentoBase, UsuarioLancamentoFireConvert, UsuarioLancamentoFirestoreData, } from './models/index';
|
package/lib/index.js
CHANGED
|
@@ -1,16 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.UsuarioLancamentoFirestoreData = exports.UsuarioLancamentoFireConvert = exports.UsuarioLancamento = exports.TiposOcorrenciaFrequenciaEnum = exports.LogLancamentoStatusEnum = exports.LogLancamentoFirestoreData = exports.LogLancamentoFireConvert = exports.LogLancamento = 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
|
+
Object.defineProperty(exports, "EmpresaFeriado", { enumerable: true, get: function () { return index_1.EmpresaFeriado; } });
|
|
6
|
+
Object.defineProperty(exports, "EmpresaFeriadoFireConvert", { enumerable: true, get: function () { return index_1.EmpresaFeriadoFireConvert; } });
|
|
7
|
+
Object.defineProperty(exports, "EmpresaFeriadoFirestoreData", { enumerable: true, get: function () { return index_1.EmpresaFeriadoFirestoreData; } });
|
|
5
8
|
Object.defineProperty(exports, "EnumExcecaoStatus", { enumerable: true, get: function () { return index_1.EnumExcecaoStatus; } });
|
|
6
9
|
Object.defineProperty(exports, "EnumExcecaoTipo", { enumerable: true, get: function () { return index_1.EnumExcecaoTipo; } });
|
|
7
10
|
Object.defineProperty(exports, "Excecao", { enumerable: true, get: function () { return index_1.Excecao; } });
|
|
8
11
|
Object.defineProperty(exports, "Feriado", { enumerable: true, get: function () { return index_1.Feriado; } });
|
|
9
|
-
Object.defineProperty(exports, "EmpresaFeriado", { enumerable: true, get: function () { return index_1.EmpresaFeriado; } });
|
|
10
|
-
Object.defineProperty(exports, "EmpresaFeriadoFirestoreData", { enumerable: true, get: function () { return index_1.EmpresaFeriadoFirestoreData; } });
|
|
11
|
-
Object.defineProperty(exports, "FeriadoFirestoreData", { enumerable: true, get: function () { return index_1.FeriadoFirestoreData; } });
|
|
12
|
-
Object.defineProperty(exports, "FeriadoTipoEnum", { enumerable: true, get: function () { return index_1.FeriadoTipoEnum; } });
|
|
13
|
-
Object.defineProperty(exports, "EmpresaFeriadoFireConvert", { enumerable: true, get: function () { return index_1.EmpresaFeriadoFireConvert; } });
|
|
14
12
|
Object.defineProperty(exports, "FeriadoFireConvert", { enumerable: true, get: function () { return index_1.FeriadoFireConvert; } });
|
|
13
|
+
Object.defineProperty(exports, "FeriadoFirestoreData", { enumerable: true, get: function () { return index_1.FeriadoFirestoreData; } });
|
|
15
14
|
Object.defineProperty(exports, "FeriadoJsonConvert", { enumerable: true, get: function () { return index_1.FeriadoJsonConvert; } });
|
|
16
15
|
Object.defineProperty(exports, "FeriadoJsonData", { enumerable: true, get: function () { return index_1.FeriadoJsonData; } });
|
|
16
|
+
Object.defineProperty(exports, "FeriadoTipoEnum", { enumerable: true, get: function () { return index_1.FeriadoTipoEnum; } });
|
|
17
|
+
Object.defineProperty(exports, "Lancamento", { enumerable: true, get: function () { return index_1.Lancamento; } });
|
|
18
|
+
Object.defineProperty(exports, "LancamentoFireConvert", { enumerable: true, get: function () { return index_1.LancamentoFireConvert; } });
|
|
19
|
+
Object.defineProperty(exports, "LancamentoFirestoreData", { enumerable: true, get: function () { return index_1.LancamentoFirestoreData; } });
|
|
20
|
+
Object.defineProperty(exports, "LancamentoJsonConvert", { enumerable: true, get: function () { return index_1.LancamentoJsonConvert; } });
|
|
21
|
+
Object.defineProperty(exports, "LancamentoJsonData", { enumerable: true, get: function () { return index_1.LancamentoJsonData; } });
|
|
22
|
+
Object.defineProperty(exports, "LancamentoStatusEnum", { enumerable: true, get: function () { return index_1.LancamentoStatusEnum; } });
|
|
23
|
+
Object.defineProperty(exports, "LogLancamento", { enumerable: true, get: function () { return index_1.LogLancamento; } });
|
|
24
|
+
Object.defineProperty(exports, "LogLancamentoFireConvert", { enumerable: true, get: function () { return index_1.LogLancamentoFireConvert; } });
|
|
25
|
+
Object.defineProperty(exports, "LogLancamentoFirestoreData", { enumerable: true, get: function () { return index_1.LogLancamentoFirestoreData; } });
|
|
26
|
+
Object.defineProperty(exports, "LogLancamentoStatusEnum", { enumerable: true, get: function () { return index_1.LogLancamentoStatusEnum; } });
|
|
27
|
+
Object.defineProperty(exports, "TiposOcorrenciaFrequenciaEnum", { enumerable: true, get: function () { return index_1.TiposOcorrenciaFrequenciaEnum; } });
|
|
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; } });
|
|
@@ -30,6 +30,11 @@ export interface LancamentoBase {
|
|
|
30
30
|
documento: any;
|
|
31
31
|
};
|
|
32
32
|
status: any;
|
|
33
|
+
todos_colaboradores: any;
|
|
34
|
+
ajustes_jornada_realizada: [{
|
|
35
|
+
horasEMinutos: any;
|
|
36
|
+
timezoneValue: any;
|
|
37
|
+
}];
|
|
33
38
|
}
|
|
34
39
|
/**
|
|
35
40
|
* Internal class col contas/${contaId}/lancamento/${lancamentoId}.
|
|
@@ -40,6 +45,10 @@ export interface LancamentoBase {
|
|
|
40
45
|
export declare class Lancamento implements LancamentoBase {
|
|
41
46
|
_id: string;
|
|
42
47
|
_path: string;
|
|
48
|
+
ajustes_jornada_realizada: [{
|
|
49
|
+
horasEMinutos: string;
|
|
50
|
+
timezoneValue: string;
|
|
51
|
+
}];
|
|
43
52
|
ocorrencia_tipo: TiposOcorrenciaFrequenciaEnum;
|
|
44
53
|
data_final: Date;
|
|
45
54
|
data_inicial: Date;
|
|
@@ -57,6 +66,7 @@ export declare class Lancamento implements LancamentoBase {
|
|
|
57
66
|
descricao: string;
|
|
58
67
|
};
|
|
59
68
|
status: LancamentoStatusEnum;
|
|
69
|
+
todos_colaboradores: boolean;
|
|
60
70
|
/**
|
|
61
71
|
* Creates an instance of Lancamento.
|
|
62
72
|
* @param {Partial<Lancamento>} lancamentoPayload
|
|
@@ -42,7 +42,7 @@ var Lancamento = /** @class */ (function () {
|
|
|
42
42
|
*/
|
|
43
43
|
function Lancamento(lancamentoPayload) {
|
|
44
44
|
var _this = this;
|
|
45
|
-
var keysOfProps = ["status", "_id", "_path", "descricao", "excluido", "data_inicial", "data_final", "ocorrencia_tipo", "ocorrencia", "empresa"];
|
|
45
|
+
var keysOfProps = ["status", "_id", "_path", "descricao", "excluido", "data_inicial", "data_final", "todos_colaboradores", "ajustes_jornada_realizada", "ocorrencia_tipo", "ocorrencia", "empresa"];
|
|
46
46
|
keysOfProps.forEach(function (key) {
|
|
47
47
|
_this[key] = lancamentoPayload
|
|
48
48
|
? lancamentoPayload[key]
|
|
@@ -2,6 +2,10 @@ import { DocumentReference, DocumentSnapshot, QueryDocumentSnapshot, Timestamp }
|
|
|
2
2
|
import { Lancamento, LancamentoBase, LancamentoStatusEnum } from '.';
|
|
3
3
|
import { TiposOcorrenciaFrequenciaEnum } from '../ocorrencia_frequencia';
|
|
4
4
|
export declare class LancamentoFirestoreData implements LancamentoBase {
|
|
5
|
+
ajustes_jornada_realizada: [{
|
|
6
|
+
horasEMinutos: string;
|
|
7
|
+
timezoneValue: string;
|
|
8
|
+
}];
|
|
5
9
|
data_inicial: Timestamp;
|
|
6
10
|
data_final: Timestamp;
|
|
7
11
|
descricao: string;
|
|
@@ -19,6 +23,7 @@ export declare class LancamentoFirestoreData implements LancamentoBase {
|
|
|
19
23
|
documento: string;
|
|
20
24
|
};
|
|
21
25
|
status: LancamentoStatusEnum;
|
|
26
|
+
todos_colaboradores: boolean;
|
|
22
27
|
}
|
|
23
28
|
export declare abstract class LancamentoFireConvert {
|
|
24
29
|
static fromFirestore(doc: DocumentSnapshot<LancamentoFirestoreData> | QueryDocumentSnapshot<LancamentoFirestoreData>): Lancamento;
|
|
@@ -17,7 +17,7 @@ var LancamentoFireConvert = /** @class */ (function () {
|
|
|
17
17
|
function LancamentoFireConvert() {
|
|
18
18
|
}
|
|
19
19
|
LancamentoFireConvert.fromFirestore = function (doc) {
|
|
20
|
-
var _a, _b, _c;
|
|
20
|
+
var _a, _b, _c, _d;
|
|
21
21
|
return new _1.Lancamento({
|
|
22
22
|
_id: (_a = doc.id) !== null && _a !== void 0 ? _a : null,
|
|
23
23
|
_path: (_b = doc.ref.path) !== null && _b !== void 0 ? _b : null,
|
|
@@ -42,6 +42,8 @@ var LancamentoFireConvert = /** @class */ (function () {
|
|
|
42
42
|
path: string_helper_1.StringHelper.trim(doc.get('ocorrencia.path'), null),
|
|
43
43
|
tipo: string_helper_1.StringHelper.trim(doc.get('ocorrencia.tipo'), null),
|
|
44
44
|
},
|
|
45
|
+
todos_colaboradores: boolean_helper_1.BooleanHelper.check(doc.get('todos_colaboradores'), true),
|
|
46
|
+
ajustes_jornada_realizada: (_d = doc.get('ajustes_jornada_realizada')) !== null && _d !== void 0 ? _d : undefined,
|
|
45
47
|
});
|
|
46
48
|
};
|
|
47
49
|
LancamentoFireConvert.toFirestore = function (lancamento, documentReferenceFromPath, timestampfromDate) {
|
|
@@ -67,6 +69,8 @@ var LancamentoFireConvert = /** @class */ (function () {
|
|
|
67
69
|
descricao: string_helper_1.StringHelper.trim(lancamento.ocorrencia.descricao, null),
|
|
68
70
|
tipo: string_helper_1.StringHelper.trim(lancamento.ocorrencia_tipo, null),
|
|
69
71
|
},
|
|
72
|
+
todos_colaboradores: boolean_helper_1.BooleanHelper.check(lancamento.todos_colaboradores, true),
|
|
73
|
+
ajustes_jornada_realizada: lancamento.ajustes_jornada_realizada,
|
|
70
74
|
};
|
|
71
75
|
return (0, lodash_1.omitBy)(lancamentoFire, lodash_1.isUndefined);
|
|
72
76
|
};
|
|
@@ -3,6 +3,10 @@ import { TiposOcorrenciaFrequenciaEnum } from '../ocorrencia_frequencia';
|
|
|
3
3
|
export declare class LancamentoJsonData implements LancamentoBase {
|
|
4
4
|
_id: string;
|
|
5
5
|
_path: string;
|
|
6
|
+
ajustes_jornada_realizada: [{
|
|
7
|
+
horasEMinutos: any;
|
|
8
|
+
timezoneValue: any;
|
|
9
|
+
}];
|
|
6
10
|
data_inicial: string;
|
|
7
11
|
data_final: string;
|
|
8
12
|
descricao: string;
|
|
@@ -20,6 +24,7 @@ export declare class LancamentoJsonData implements LancamentoBase {
|
|
|
20
24
|
documento: string;
|
|
21
25
|
};
|
|
22
26
|
status: LancamentoStatusEnum;
|
|
27
|
+
todos_colaboradores: boolean;
|
|
23
28
|
}
|
|
24
29
|
export declare abstract class LancamentoJsonConvert {
|
|
25
30
|
static fromJson(obj: LancamentoJsonData): Lancamento;
|
|
@@ -16,7 +16,7 @@ var LancamentoJsonConvert = /** @class */ (function () {
|
|
|
16
16
|
function LancamentoJsonConvert() {
|
|
17
17
|
}
|
|
18
18
|
LancamentoJsonConvert.fromJson = function (obj) {
|
|
19
|
-
var _a, _b;
|
|
19
|
+
var _a, _b, _c;
|
|
20
20
|
return new _1.Lancamento({
|
|
21
21
|
_id: (_a = obj._id) !== null && _a !== void 0 ? _a : null,
|
|
22
22
|
_path: (_b = obj._path) !== null && _b !== void 0 ? _b : null,
|
|
@@ -37,10 +37,12 @@ var LancamentoJsonConvert = /** @class */ (function () {
|
|
|
37
37
|
path: string_helper_1.StringHelper.trim(obj.ocorrencia.path, null),
|
|
38
38
|
tipo: string_helper_1.StringHelper.trim(obj.ocorrencia.tipo, null),
|
|
39
39
|
},
|
|
40
|
+
todos_colaboradores: boolean_helper_1.BooleanHelper.check(obj.excluido, true),
|
|
41
|
+
ajustes_jornada_realizada: (_c = obj.ajustes_jornada_realizada) !== null && _c !== void 0 ? _c : undefined,
|
|
40
42
|
});
|
|
41
43
|
};
|
|
42
44
|
LancamentoJsonConvert.toJson = function (lancamento) {
|
|
43
|
-
var _a, _b;
|
|
45
|
+
var _a, _b, _c;
|
|
44
46
|
var lancamentoJson = {
|
|
45
47
|
_id: (_a = lancamento._id) !== null && _a !== void 0 ? _a : null,
|
|
46
48
|
_path: (_b = lancamento._path) !== null && _b !== void 0 ? _b : null,
|
|
@@ -61,6 +63,8 @@ var LancamentoJsonConvert = /** @class */ (function () {
|
|
|
61
63
|
path: string_helper_1.StringHelper.trim(lancamento.ocorrencia.path, null),
|
|
62
64
|
tipo: string_helper_1.StringHelper.trim(lancamento.ocorrencia.tipo, null),
|
|
63
65
|
},
|
|
66
|
+
todos_colaboradores: boolean_helper_1.BooleanHelper.check(lancamento.todos_colaboradores, false),
|
|
67
|
+
ajustes_jornada_realizada: (_c = lancamento.ajustes_jornada_realizada) !== null && _c !== void 0 ? _c : undefined,
|
|
64
68
|
};
|
|
65
69
|
return (0, lodash_1.omitBy)(lancamentoJson, lodash_1.isUndefined);
|
|
66
70
|
};
|
|
@@ -4,6 +4,7 @@ exports.TiposOcorrenciaFrequenciaEnum = void 0;
|
|
|
4
4
|
var TiposOcorrenciaFrequenciaEnum;
|
|
5
5
|
(function (TiposOcorrenciaFrequenciaEnum) {
|
|
6
6
|
TiposOcorrenciaFrequenciaEnum["Abono"] = "Abono";
|
|
7
|
+
TiposOcorrenciaFrequenciaEnum["AbonoParcial"] = "Abono Parcial";
|
|
7
8
|
TiposOcorrenciaFrequenciaEnum["Afastado"] = "Afastado";
|
|
8
9
|
TiposOcorrenciaFrequenciaEnum["Atestado"] = "Atestado";
|
|
9
10
|
TiposOcorrenciaFrequenciaEnum["DiaTrabalhado"] = "Dia trabalhado";
|
package/lib/models/index.d.ts
CHANGED
package/lib/models/index.js
CHANGED
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./contas/excecoes"), exports);
|
|
18
18
|
__exportStar(require("./contas/feriado"), exports);
|
|
19
19
|
__exportStar(require("./contas/lancamento"), exports);
|
|
20
|
+
__exportStar(require("./contas/ocorrencia_frequencia"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flit-models",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -29,10 +29,10 @@
|
|
|
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.180",
|
|
33
|
+
"@typescript-eslint/eslint-plugin": "^5.15.0",
|
|
34
|
+
"@typescript-eslint/parser": "^5.15.0",
|
|
35
|
+
"eslint": "^8.11.0",
|
|
36
36
|
"eslint-config-google": "^0.14.0",
|
|
37
37
|
"eslint-config-prettier": "^8.5.0",
|
|
38
38
|
"eslint-plugin-import": "^2.25.4",
|