flit-models 2.1.9 → 2.1.12

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 { EnumExcecaoStatus, EnumExcecaoTipo, Excecao, IExcecao, Feriado, EmpresaFeriado, EmpresaFeriadoFirestoreData, FeriadoFirestoreData, FeriadoTipoEnum, EmpresaFeriadoFireConvert, FeriadoFireConvert, FeriadoJsonConvert, FeriadoJsonData, } from './models/index';
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.FeriadoJsonData = exports.FeriadoJsonConvert = exports.FeriadoFireConvert = exports.EmpresaFeriadoFireConvert = exports.FeriadoTipoEnum = exports.FeriadoFirestoreData = exports.EmpresaFeriadoFirestoreData = exports.EmpresaFeriado = exports.Feriado = exports.Excecao = exports.EnumExcecaoTipo = exports.EnumExcecaoStatus = void 0;
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; } });
@@ -31,6 +31,10 @@ export interface LancamentoBase {
31
31
  };
32
32
  status: any;
33
33
  todos_colaboradores: any;
34
+ ajustes_jornada_realizada: [{
35
+ horasEMinutos: any;
36
+ timezoneValue: any;
37
+ }];
34
38
  }
35
39
  /**
36
40
  * Internal class col contas/${contaId}/lancamento/${lancamentoId}.
@@ -41,6 +45,10 @@ export interface LancamentoBase {
41
45
  export declare class Lancamento implements LancamentoBase {
42
46
  _id: string;
43
47
  _path: string;
48
+ ajustes_jornada_realizada: [{
49
+ horasEMinutos: string;
50
+ timezoneValue: string;
51
+ }];
44
52
  ocorrencia_tipo: TiposOcorrenciaFrequenciaEnum;
45
53
  data_final: Date;
46
54
  data_inicial: Date;
@@ -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", "todos_colaboradores", "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;
@@ -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,
@@ -43,6 +43,7 @@ var LancamentoFireConvert = /** @class */ (function () {
43
43
  tipo: string_helper_1.StringHelper.trim(doc.get('ocorrencia.tipo'), null),
44
44
  },
45
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,
46
47
  });
47
48
  };
48
49
  LancamentoFireConvert.toFirestore = function (lancamento, documentReferenceFromPath, timestampfromDate) {
@@ -69,6 +70,7 @@ var LancamentoFireConvert = /** @class */ (function () {
69
70
  tipo: string_helper_1.StringHelper.trim(lancamento.ocorrencia_tipo, null),
70
71
  },
71
72
  todos_colaboradores: boolean_helper_1.BooleanHelper.check(lancamento.todos_colaboradores, true),
73
+ ajustes_jornada_realizada: lancamento.ajustes_jornada_realizada,
72
74
  };
73
75
  return (0, lodash_1.omitBy)(lancamentoFire, lodash_1.isUndefined);
74
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;
@@ -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,
@@ -38,10 +38,11 @@ var LancamentoJsonConvert = /** @class */ (function () {
38
38
  tipo: string_helper_1.StringHelper.trim(obj.ocorrencia.tipo, null),
39
39
  },
40
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,
41
42
  });
42
43
  };
43
44
  LancamentoJsonConvert.toJson = function (lancamento) {
44
- var _a, _b;
45
+ var _a, _b, _c;
45
46
  var lancamentoJson = {
46
47
  _id: (_a = lancamento._id) !== null && _a !== void 0 ? _a : null,
47
48
  _path: (_b = lancamento._path) !== null && _b !== void 0 ? _b : null,
@@ -63,6 +64,7 @@ var LancamentoJsonConvert = /** @class */ (function () {
63
64
  tipo: string_helper_1.StringHelper.trim(lancamento.ocorrencia.tipo, null),
64
65
  },
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,
66
68
  };
67
69
  return (0, lodash_1.omitBy)(lancamentoJson, lodash_1.isUndefined);
68
70
  };
@@ -1,6 +1,7 @@
1
1
  import { DocumentReference, DocumentSnapshot, QueryDocumentSnapshot, Timestamp } from 'firebase/firestore';
2
2
  import { LogLancamento, LogLancamentoBase, LogLancamentoStatusEnum } from './log-lancamento';
3
3
  export declare class LogLancamentoFirestoreData implements LogLancamentoBase {
4
+ visto: boolean;
4
5
  data: Timestamp;
5
6
  mensagem: string;
6
7
  detalhes: {
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LogLancamentoFireConvert = exports.LogLancamentoFirestoreData = void 0;
4
4
  var lodash_1 = require("lodash");
5
+ var boolean_helper_1 = require("../../../utils/boolean-helper");
5
6
  var string_helper_1 = require("../../../utils/string-helper");
6
7
  var type_guards_1 = require("../../../utils/type-guards");
7
8
  var log_lancamento_1 = require("./log-lancamento");
@@ -15,7 +16,7 @@ var LogLancamentoFireConvert = /** @class */ (function () {
15
16
  function LogLancamentoFireConvert() {
16
17
  }
17
18
  LogLancamentoFireConvert.fromFirestore = function (doc) {
18
- var _a, _b, _c;
19
+ var _a, _b, _c, _d;
19
20
  return new log_lancamento_1.LogLancamento({
20
21
  _id: (_a = doc.id) !== null && _a !== void 0 ? _a : null,
21
22
  _path: (_b = doc.ref.path) !== null && _b !== void 0 ? _b : null,
@@ -33,6 +34,7 @@ var LogLancamentoFireConvert = /** @class */ (function () {
33
34
  mensagem: string_helper_1.StringHelper.trim(doc.get('mensagem'), null),
34
35
  status: string_helper_1.StringHelper.trim(doc.get('status'), null),
35
36
  detalhes: (_c = doc.get('detalhes')) !== null && _c !== void 0 ? _c : null,
37
+ visto: (_d = doc.get('visto')) !== null && _d !== void 0 ? _d : false,
36
38
  });
37
39
  };
38
40
  LogLancamentoFireConvert.toFirestore = function (logLancamento, timestampfromDate, documentReferenceFromPath) {
@@ -45,6 +47,7 @@ var LogLancamentoFireConvert = /** @class */ (function () {
45
47
  data: timestampfromDate(logLancamento.jornada.data),
46
48
  ref: documentReferenceFromPath(logLancamento.jornada.ref),
47
49
  },
50
+ visto: boolean_helper_1.BooleanHelper.check(logLancamento.visto, false),
48
51
  };
49
52
  return (0, lodash_1.omitBy)(logLancamentoFirestore, lodash_1.isUndefined);
50
53
  };
@@ -11,6 +11,7 @@ export interface LogLancamentoBase {
11
11
  data: any;
12
12
  ref: any;
13
13
  };
14
+ visto: any;
14
15
  }
15
16
  /**
16
17
  * Internal class col contas/${contaId}/lancamento/${lancamentoId}/logs_lancamento/${usuarioId}.
@@ -32,6 +33,7 @@ export declare class LogLancamento implements LogLancamentoBase {
32
33
  data: Date;
33
34
  ref: string;
34
35
  };
36
+ visto: boolean;
35
37
  /**
36
38
  * Creates an instance of UsuarioLancamento.
37
39
  * @param {Partial<LogLancamento>} usuarioLancamentoPayload
@@ -21,7 +21,7 @@ var LogLancamento = /** @class */ (function () {
21
21
  */
22
22
  function LogLancamento(usuarioLancamentoPayload) {
23
23
  var _this = this;
24
- var keysOfProps = ["status", "_id", "_path", "data", "mensagem", "detalhes", "jornada"];
24
+ var keysOfProps = ["status", "_id", "_path", "data", "mensagem", "detalhes", "jornada", "visto"];
25
25
  keysOfProps.forEach(function (key) {
26
26
  _this[key] = usuarioLancamentoPayload
27
27
  ? usuarioLancamentoPayload[key]
@@ -1,5 +1,6 @@
1
1
  export declare enum TiposOcorrenciaFrequenciaEnum {
2
2
  Abono = "Abono",
3
+ AbonoParcial = "Abono Parcial",
3
4
  Afastado = "Afastado",
4
5
  Atestado = "Atestado",
5
6
  DiaTrabalhado = "Dia trabalhado",
@@ -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";
@@ -1,3 +1,4 @@
1
1
  export * from './contas/excecoes';
2
2
  export * from './contas/feriado';
3
3
  export * from './contas/lancamento';
4
+ export * from './contas/ocorrencia_frequencia';
@@ -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.9",
3
+ "version": "2.1.12",
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.179",
33
- "@typescript-eslint/eslint-plugin": "^5.14.0",
34
- "@typescript-eslint/parser": "^5.14.0",
35
- "eslint": "^8.10.0",
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",