flit-models 2.1.5 → 2.1.6
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/models/contas/feriado/empresa-feriado-fire-convert.d.ts +3 -2
- package/lib/models/contas/feriado/empresa-feriado-fire-convert.js +9 -7
- package/lib/models/contas/feriado/empresa-feriado.d.ts +10 -8
- package/lib/models/contas/feriado/empresa-feriado.js +1 -1
- package/lib/models/contas/feriado/feriado-fire-convert.js +2 -2
- package/lib/models/contas/feriado/feriado-json-convert.d.ts +2 -2
- package/lib/models/contas/feriado/feriado-json-convert.js +4 -4
- package/lib/models/contas/feriado/index.d.ts +2 -2
- package/lib/models/contas/feriado/index.js +1 -1
- package/package.json +1 -1
- package/lib/models/contas/feriado/empresas-feriado-fire-convert.d.ts +0 -12
- package/lib/models/contas/feriado/empresas-feriado-fire-convert.js +0 -40
- package/lib/models/contas/feriado/empresas-feriado.d.ts +0 -27
- package/lib/models/contas/feriado/empresas-feriado.js +0 -28
|
@@ -3,8 +3,9 @@ import { EmpresaFeriado, EmpresaFeriadoBase } from './empresa-feriado';
|
|
|
3
3
|
export declare class EmpresaFeriadoFirestoreData implements EmpresaFeriadoBase {
|
|
4
4
|
ref: DocumentReference;
|
|
5
5
|
documento: string;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
municipio: string;
|
|
7
|
+
nome: string;
|
|
8
|
+
uf: string;
|
|
8
9
|
}
|
|
9
10
|
export declare abstract class EmpresaFeriadoFireConvert {
|
|
10
11
|
static fromFirestore(doc: DocumentSnapshot<EmpresaFeriadoFirestoreData> | QueryDocumentSnapshot<EmpresaFeriadoFirestoreData>): EmpresaFeriado;
|
|
@@ -17,22 +17,24 @@ var EmpresaFeriadoFireConvert = /** @class */ (function () {
|
|
|
17
17
|
EmpresaFeriadoFireConvert.fromFirestore = function (doc) {
|
|
18
18
|
var _a, _b;
|
|
19
19
|
return new empresa_feriado_1.EmpresaFeriado({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
documento: string_helper_1.StringHelper.trim(doc.get('documento'), null),
|
|
23
|
-
nome_fantasia: string_helper_1.StringHelper.trim(doc.get('nome_fantasia'), null),
|
|
24
|
-
razao_social: string_helper_1.StringHelper.trim(doc.get('razao_social'), null),
|
|
20
|
+
_id: (_a = doc.id) !== null && _a !== void 0 ? _a : null,
|
|
21
|
+
_path: (_b = doc.ref.path) !== null && _b !== void 0 ? _b : null,
|
|
25
22
|
ref: (0, type_guards_1.TipoDocumentReference)(doc.get('ref'))
|
|
26
23
|
? doc.get('ref').path
|
|
27
24
|
: null,
|
|
25
|
+
documento: string_helper_1.StringHelper.trim(doc.get('documento'), null),
|
|
26
|
+
municipio: string_helper_1.StringHelper.trim(doc.get('municipio'), null),
|
|
27
|
+
nome: string_helper_1.StringHelper.trim(doc.get('nome'), null),
|
|
28
|
+
uf: string_helper_1.StringHelper.trim(doc.get('uf'), null),
|
|
28
29
|
});
|
|
29
30
|
};
|
|
30
31
|
EmpresaFeriadoFireConvert.toFirestore = function (empresaFeriado, docRefConstructor) {
|
|
31
32
|
return (0, lodash_1.omitBy)({
|
|
32
33
|
documento: empresaFeriado.documento,
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
municipio: empresaFeriado.municipio,
|
|
35
|
+
nome: empresaFeriado.nome,
|
|
35
36
|
ref: docRefConstructor(empresaFeriado.ref),
|
|
37
|
+
uf: empresaFeriado.uf,
|
|
36
38
|
}, lodash_1.isUndefined);
|
|
37
39
|
};
|
|
38
40
|
return EmpresaFeriadoFireConvert;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export interface EmpresaFeriadoBase {
|
|
2
|
-
ref: any;
|
|
3
2
|
documento: any;
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
municipio: any;
|
|
4
|
+
nome: any;
|
|
5
|
+
ref: any;
|
|
6
|
+
uf: any;
|
|
6
7
|
}
|
|
7
8
|
/**
|
|
8
9
|
* Internal class col contas/${contaId}/feriados/${feriadoId}/empresas_feriado/${empresaId}.
|
|
@@ -12,12 +13,13 @@ export interface EmpresaFeriadoBase {
|
|
|
12
13
|
* @implements {FeriadoFirestoreData}
|
|
13
14
|
*/
|
|
14
15
|
export declare class EmpresaFeriado implements EmpresaFeriadoBase {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
ref: string;
|
|
16
|
+
_id: string;
|
|
17
|
+
_path: string;
|
|
18
18
|
documento: string;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
municipio: string;
|
|
20
|
+
nome: string;
|
|
21
|
+
ref: string;
|
|
22
|
+
uf: string;
|
|
21
23
|
/**
|
|
22
24
|
* Creates an instance of FeriadoEmpresa.
|
|
23
25
|
* @param {Partial<EmpresaFeriado>} feriadoEmpresaPayload
|
|
@@ -16,7 +16,7 @@ var EmpresaFeriado = /** @class */ (function () {
|
|
|
16
16
|
*/
|
|
17
17
|
function EmpresaFeriado(feriadoEmpresaPayload) {
|
|
18
18
|
var _this = this;
|
|
19
|
-
var keysOfProps = ["
|
|
19
|
+
var keysOfProps = ["_id", "_path", "documento", "municipio", "nome", "ref", "uf"];
|
|
20
20
|
keysOfProps.forEach(function (key) {
|
|
21
21
|
_this[key] = feriadoEmpresaPayload
|
|
22
22
|
? feriadoEmpresaPayload[key]
|
|
@@ -19,8 +19,8 @@ var FeriadoFireConvert = /** @class */ (function () {
|
|
|
19
19
|
FeriadoFireConvert.fromFirestore = function (doc) {
|
|
20
20
|
var _a, _b;
|
|
21
21
|
return new _1.Feriado({
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
_id: (_a = doc.id) !== null && _a !== void 0 ? _a : null,
|
|
23
|
+
_path: (_b = doc.ref.path) !== null && _b !== void 0 ? _b : null,
|
|
24
24
|
data: (0, type_guards_1.TipoTimestampFirestore)(doc.get('data'))
|
|
25
25
|
? doc.get('data').toDate()
|
|
26
26
|
: null,
|
|
@@ -18,8 +18,8 @@ var FeriadoJsonConvert = /** @class */ (function () {
|
|
|
18
18
|
FeriadoJsonConvert.fromJson = function (obj) {
|
|
19
19
|
var _a, _b;
|
|
20
20
|
return new _1.Feriado({
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
_id: (_a = obj._id) !== null && _a !== void 0 ? _a : null,
|
|
22
|
+
_path: (_b = obj._path) !== null && _b !== void 0 ? _b : null,
|
|
23
23
|
data: date_helper_1.DateHelper.fromString(obj.data, null),
|
|
24
24
|
descricao: string_helper_1.StringHelper.trim(obj.descricao, null),
|
|
25
25
|
excluido: boolean_helper_1.BooleanHelper.check(obj.excluido, false),
|
|
@@ -33,8 +33,8 @@ var FeriadoJsonConvert = /** @class */ (function () {
|
|
|
33
33
|
FeriadoJsonConvert.toJson = function (feriado) {
|
|
34
34
|
var _a, _b;
|
|
35
35
|
return (0, lodash_1.omitBy)({
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
_id: (_a = feriado._id) !== null && _a !== void 0 ? _a : null,
|
|
37
|
+
_path: (_b = feriado._path) !== null && _b !== void 0 ? _b : null,
|
|
38
38
|
data: feriado.data.toISOString(),
|
|
39
39
|
descricao: string_helper_1.StringHelper.trim(feriado.descricao, null),
|
|
40
40
|
excluido: boolean_helper_1.BooleanHelper.check(feriado.excluido, false),
|
|
@@ -35,7 +35,7 @@ var Feriado = /** @class */ (function () {
|
|
|
35
35
|
*/
|
|
36
36
|
function Feriado(feriadoPayload) {
|
|
37
37
|
var _this = this;
|
|
38
|
-
var keysOfProps = ["
|
|
38
|
+
var keysOfProps = ["tipo", "_id", "_path", "municipio", "uf", "data", "descricao", "excluido", "importacao_id", "todas_empresas"];
|
|
39
39
|
keysOfProps.forEach(function (key) {
|
|
40
40
|
_this[key] = feriadoPayload ? feriadoPayload[key] : undefined;
|
|
41
41
|
});
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DocumentReference, DocumentSnapshot, QueryDocumentSnapshot } from 'firebase/firestore';
|
|
2
|
-
import { EmpresaFeriado, EmpresaFeriadoBase } from './empresas-feriado';
|
|
3
|
-
export declare class EmpresaFeriadoFirestoreData implements EmpresaFeriadoBase {
|
|
4
|
-
ref: DocumentReference;
|
|
5
|
-
documento: string;
|
|
6
|
-
nome_fantasia: string;
|
|
7
|
-
razao_social: string;
|
|
8
|
-
}
|
|
9
|
-
export declare abstract class EmpresasFeriadoFireConvert {
|
|
10
|
-
static fromFirestore(doc: DocumentSnapshot<EmpresaFeriadoFirestoreData> | QueryDocumentSnapshot<EmpresaFeriadoFirestoreData>): EmpresaFeriado;
|
|
11
|
-
static toFirestore(empresaFeriado: EmpresaFeriado, docRefConstructor: (path: string) => DocumentReference<any>): Partial<EmpresaFeriadoFirestoreData>;
|
|
12
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EmpresasFeriadoFireConvert = exports.EmpresaFeriadoFirestoreData = 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 empresas_feriado_1 = require("./empresas-feriado");
|
|
8
|
-
var EmpresaFeriadoFirestoreData = /** @class */ (function () {
|
|
9
|
-
function EmpresaFeriadoFirestoreData() {
|
|
10
|
-
}
|
|
11
|
-
return EmpresaFeriadoFirestoreData;
|
|
12
|
-
}());
|
|
13
|
-
exports.EmpresaFeriadoFirestoreData = EmpresaFeriadoFirestoreData;
|
|
14
|
-
var EmpresasFeriadoFireConvert = /** @class */ (function () {
|
|
15
|
-
function EmpresasFeriadoFireConvert() {
|
|
16
|
-
}
|
|
17
|
-
EmpresasFeriadoFireConvert.fromFirestore = function (doc) {
|
|
18
|
-
var _a, _b;
|
|
19
|
-
return new empresas_feriado_1.EmpresaFeriado({
|
|
20
|
-
uid: (_a = doc.id) !== null && _a !== void 0 ? _a : null,
|
|
21
|
-
path: (_b = doc.ref.path) !== null && _b !== void 0 ? _b : null,
|
|
22
|
-
documento: string_helper_1.StringHelper.trim(doc.get('documento'), null),
|
|
23
|
-
nome_fantasia: string_helper_1.StringHelper.trim(doc.get('nome_fantasia'), null),
|
|
24
|
-
razao_social: string_helper_1.StringHelper.trim(doc.get('razao_social'), null),
|
|
25
|
-
ref: (0, type_guards_1.TipoDocumentReference)(doc.get('ref'))
|
|
26
|
-
? doc.get('ref').path
|
|
27
|
-
: null,
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
EmpresasFeriadoFireConvert.toFirestore = function (empresaFeriado, docRefConstructor) {
|
|
31
|
-
return (0, lodash_1.omitBy)({
|
|
32
|
-
documento: empresaFeriado.documento,
|
|
33
|
-
nome_fantasia: empresaFeriado.nome_fantasia,
|
|
34
|
-
razao_social: empresaFeriado.razao_social,
|
|
35
|
-
ref: docRefConstructor(empresaFeriado.ref),
|
|
36
|
-
}, lodash_1.isUndefined);
|
|
37
|
-
};
|
|
38
|
-
return EmpresasFeriadoFireConvert;
|
|
39
|
-
}());
|
|
40
|
-
exports.EmpresasFeriadoFireConvert = EmpresasFeriadoFireConvert;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface EmpresaFeriadoBase {
|
|
2
|
-
ref: any;
|
|
3
|
-
documento: any;
|
|
4
|
-
nome_fantasia: any;
|
|
5
|
-
razao_social: any;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Internal class col contas/${contaId}/feriados/${feriadoId}/empresas_feriado/${empresaId}.
|
|
9
|
-
*
|
|
10
|
-
* @export
|
|
11
|
-
* @class FeriadoEmpresa
|
|
12
|
-
* @implements {FeriadoFirestoreData}
|
|
13
|
-
*/
|
|
14
|
-
export declare class EmpresaFeriado implements EmpresaFeriadoBase {
|
|
15
|
-
uid: string;
|
|
16
|
-
path: string;
|
|
17
|
-
ref: string;
|
|
18
|
-
documento: string;
|
|
19
|
-
nome_fantasia: string;
|
|
20
|
-
razao_social: string;
|
|
21
|
-
/**
|
|
22
|
-
* Creates an instance of FeriadoEmpresa.
|
|
23
|
-
* @param {Partial<EmpresaFeriado>} feriadoEmpresaPayload
|
|
24
|
-
* @memberof Feriado
|
|
25
|
-
*/
|
|
26
|
-
constructor(feriadoEmpresaPayload: Partial<EmpresaFeriado>);
|
|
27
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EmpresaFeriado = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Internal class col contas/${contaId}/feriados/${feriadoId}/empresas_feriado/${empresaId}.
|
|
6
|
-
*
|
|
7
|
-
* @export
|
|
8
|
-
* @class FeriadoEmpresa
|
|
9
|
-
* @implements {FeriadoFirestoreData}
|
|
10
|
-
*/
|
|
11
|
-
var EmpresaFeriado = /** @class */ (function () {
|
|
12
|
-
/**
|
|
13
|
-
* Creates an instance of FeriadoEmpresa.
|
|
14
|
-
* @param {Partial<EmpresaFeriado>} feriadoEmpresaPayload
|
|
15
|
-
* @memberof Feriado
|
|
16
|
-
*/
|
|
17
|
-
function EmpresaFeriado(feriadoEmpresaPayload) {
|
|
18
|
-
var _this = this;
|
|
19
|
-
var keysOfProps = ["uid", "path", "ref", "documento", "nome_fantasia", "razao_social"];
|
|
20
|
-
keysOfProps.forEach(function (key) {
|
|
21
|
-
_this[key] = feriadoEmpresaPayload
|
|
22
|
-
? feriadoEmpresaPayload[key]
|
|
23
|
-
: undefined;
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
return EmpresaFeriado;
|
|
27
|
-
}());
|
|
28
|
-
exports.EmpresaFeriado = EmpresaFeriado;
|