flit-models 2.1.45 → 2.1.48

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.
@@ -14,7 +14,6 @@ export declare enum TipoAcaoLancamentoEnum {
14
14
  Afastado = "Afastado",
15
15
  Atestado = "Atestado",
16
16
  AtestadoParcial = "Atestado Parcial",
17
- Falta = "Falta",
18
17
  FaltaBH = "Falta BH",
19
18
  Ferias = "F\u00E9rias",
20
19
  Folga = "Folga",
@@ -53,6 +52,10 @@ export interface LancamentoBase {
53
52
  fantasia: any;
54
53
  documento: any;
55
54
  };
55
+ integracao?: {
56
+ id: string;
57
+ tipo: string;
58
+ };
56
59
  status: any;
57
60
  todos_colaboradores: any;
58
61
  colaboradores_ids: any[];
@@ -101,6 +104,10 @@ export declare class Lancamento implements LancamentoBase {
101
104
  status: LancamentoStatusEnum;
102
105
  todos_colaboradores: boolean;
103
106
  colaboradores_ids: string[];
107
+ integracao?: {
108
+ id: string;
109
+ tipo: string;
110
+ };
104
111
  /**
105
112
  * Creates an instance of Lancamento.
106
113
  * @param {Partial<Lancamento>} lancamentoPayload
@@ -33,7 +33,7 @@ var TipoAcaoLancamentoEnum;
33
33
  TipoAcaoLancamentoEnum["Afastado"] = "Afastado";
34
34
  TipoAcaoLancamentoEnum["Atestado"] = "Atestado";
35
35
  TipoAcaoLancamentoEnum["AtestadoParcial"] = "Atestado Parcial";
36
- TipoAcaoLancamentoEnum["Falta"] = "Falta";
36
+ // Falta = 'Falta',
37
37
  TipoAcaoLancamentoEnum["FaltaBH"] = "Falta BH";
38
38
  TipoAcaoLancamentoEnum["Ferias"] = "F\u00E9rias";
39
39
  TipoAcaoLancamentoEnum["Folga"] = "Folga";
@@ -64,7 +64,7 @@ var Lancamento = /** @class */ (function () {
64
64
  */
65
65
  function Lancamento(lancamentoPayload) {
66
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"];
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
68
  keysOfProps.forEach(function (key) {
69
69
  _this[key] = lancamentoPayload
70
70
  ? lancamentoPayload[key]
@@ -22,6 +22,10 @@ export declare class LancamentoFirestoreData implements LancamentoBase {
22
22
  fantasia: string;
23
23
  documento: string;
24
24
  };
25
+ integracao?: {
26
+ id: string;
27
+ tipo: string;
28
+ };
25
29
  status: LancamentoStatusEnum;
26
30
  todos_colaboradores: boolean;
27
31
  colaboradores_ids: string[];
@@ -56,6 +56,9 @@ var LancamentoFireConvert = /** @class */ (function () {
56
56
  : undefined,
57
57
  data_intervalo: array_helpers_1.ArrayHelper.checkStringArray(docData.data_intervalo, undefined),
58
58
  colaboradores_ids: array_helpers_1.ArrayHelper.checkStringArray(docData.colaboradores_ids, null),
59
+ integracao: docData.integracao
60
+ ? { id: docData.integracao.id, tipo: docData.integracao.tipo }
61
+ : undefined,
59
62
  });
60
63
  };
61
64
  LancamentoFireConvert.toFirestore = function (lancamento, documentReferenceFromPath, timestampfromDate) {
@@ -110,6 +113,9 @@ var LancamentoFireConvert = /** @class */ (function () {
110
113
  : lancamento.data_criacao
111
114
  ? firestore_1.Timestamp.fromDate(lancamento.data_criacao)
112
115
  : undefined,
116
+ integracao: lancamento.integracao
117
+ ? { id: lancamento.integracao.id, tipo: lancamento.integracao.tipo }
118
+ : undefined,
113
119
  };
114
120
  return (0, lodash_1.omitBy)(lancamentoFire, lodash_1.isUndefined);
115
121
  };
@@ -26,6 +26,10 @@ export declare class LancamentoJsonData implements LancamentoBase {
26
26
  };
27
27
  status: LancamentoStatusEnum;
28
28
  todos_colaboradores: boolean;
29
+ integracao?: {
30
+ id: string;
31
+ tipo: string;
32
+ };
29
33
  }
30
34
  export declare abstract class LancamentoJsonConvert {
31
35
  static fromJson(obj: LancamentoJsonData): Lancamento;
@@ -46,6 +46,9 @@ var LancamentoJsonConvert = /** @class */ (function () {
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
48
  colaboradores_ids: array_helpers_1.ArrayHelper.checkStringArray(obj.colaboradores_ids, null),
49
+ integracao: obj.integracao
50
+ ? { id: obj.integracao.id, tipo: obj.integracao.tipo }
51
+ : undefined,
49
52
  });
50
53
  };
51
54
  LancamentoJsonConvert.toJson = function (lancamento) {
@@ -78,6 +81,9 @@ var LancamentoJsonConvert = /** @class */ (function () {
78
81
  data_atualizacao: (_g = lancamento.data_atualizacao) === null || _g === void 0 ? void 0 : _g.toISOString(),
79
82
  data_intervalo: array_helpers_1.ArrayHelper.checkStringArray(lancamento.data_intervalo, undefined),
80
83
  colaboradores_ids: array_helpers_1.ArrayHelper.checkStringArray(lancamento.colaboradores_ids, undefined),
84
+ integracao: lancamento.integracao
85
+ ? { id: lancamento.integracao.id, tipo: lancamento.integracao.tipo }
86
+ : undefined,
81
87
  };
82
88
  return (0, lodash_1.omitBy)(lancamentoJson, lodash_1.isUndefined);
83
89
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flit-models",
3
- "version": "2.1.45",
3
+ "version": "2.1.48",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -23,22 +23,22 @@
23
23
  "author": "gustavo_damazio",
24
24
  "license": "ISC",
25
25
  "dependencies": {
26
- "firebase": "^9.8.3",
26
+ "firebase": "^9.8.4",
27
27
  "lodash": "^4.17.21",
28
28
  "ts-transformer-keys": "^0.4.3"
29
29
  },
30
30
  "devDependencies": {
31
- "@types/jest": "^28.1.2",
31
+ "@types/jest": "^28.1.3",
32
32
  "@types/lodash": "^4.14.182",
33
- "@typescript-eslint/eslint-plugin": "^5.28.0",
34
- "@typescript-eslint/parser": "^5.28.0",
33
+ "@typescript-eslint/eslint-plugin": "^5.30.0",
34
+ "@typescript-eslint/parser": "^5.30.0",
35
35
  "eslint": "^8.18.0",
36
36
  "eslint-config-google": "^0.14.0",
37
37
  "eslint-config-prettier": "^8.5.0",
38
38
  "eslint-plugin-import": "^2.26.0",
39
39
  "eslint-plugin-jest": "^26.5.3",
40
- "eslint-plugin-prettier": "^4.0.0",
41
- "jest": "^28.1.1",
40
+ "eslint-plugin-prettier": "^4.2.1",
41
+ "jest": "^28.1.2",
42
42
  "prettier": "^2.7.1",
43
43
  "ts-jest": "^28.0.5",
44
44
  "ttypescript": "^1.5.13",