@hed-hog/contact 0.0.261 → 0.0.270
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/dist/address-type.enum.d.ts +10 -0
- package/dist/address-type.enum.d.ts.map +1 -0
- package/dist/address-type.enum.js +14 -0
- package/dist/address-type.enum.js.map +1 -0
- package/dist/contact.module.d.ts.map +1 -1
- package/dist/contact.module.js +0 -2
- package/dist/contact.module.js.map +1 -1
- package/dist/contact.service.d.ts +19 -22
- package/dist/contact.service.d.ts.map +1 -1
- package/dist/contact.service.js +22 -2
- package/dist/contact.service.js.map +1 -1
- package/dist/index.d.ts +5 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/dist/person/dto/create.dto.d.ts +14 -0
- package/dist/person/dto/create.dto.d.ts.map +1 -1
- package/dist/person/dto/create.dto.js +52 -1
- package/dist/person/dto/create.dto.js.map +1 -1
- package/dist/person/dto/update.dto.d.ts +17 -1
- package/dist/person/dto/update.dto.d.ts.map +1 -1
- package/dist/person/dto/update.dto.js +79 -3
- package/dist/person/dto/update.dto.js.map +1 -1
- package/dist/person/person.controller.d.ts +33 -8
- package/dist/person/person.controller.d.ts.map +1 -1
- package/dist/person/person.controller.js +19 -3
- package/dist/person/person.controller.js.map +1 -1
- package/dist/person/person.service.d.ts +59 -10
- package/dist/person/person.service.d.ts.map +1 -1
- package/dist/person/person.service.js +710 -107
- package/dist/person/person.service.js.map +1 -1
- package/dist/person-relation-type/person-relation-type.controller.d.ts +13 -9
- package/dist/person-relation-type/person-relation-type.controller.d.ts.map +1 -1
- package/dist/person-relation-type/person-relation-type.service.d.ts +16 -20
- package/dist/person-relation-type/person-relation-type.service.d.ts.map +1 -1
- package/dist/person-relation-type/person-relation-type.service.js +48 -41
- package/dist/person-relation-type/person-relation-type.service.js.map +1 -1
- package/hedhog/data/menu.yaml +2 -16
- package/hedhog/data/route.yaml +2 -21
- package/hedhog/data/setting_group.yaml +21 -0
- package/hedhog/frontend/app/person/_components/delete-person-dialog.tsx.ejs +59 -0
- package/hedhog/frontend/app/person/_components/person-field-with-create.tsx.ejs +831 -0
- package/hedhog/frontend/app/person/_components/person-form-sheet.tsx.ejs +1997 -0
- package/hedhog/frontend/app/person/_components/person-types.ts.ejs +115 -0
- package/hedhog/frontend/app/person/page.tsx.ejs +1209 -1530
- package/hedhog/frontend/messages/en.json +114 -4
- package/hedhog/frontend/messages/pt.json +114 -4
- package/hedhog/table/person.yaml +7 -0
- package/hedhog/table/person_address.yaml +18 -0
- package/hedhog/table/person_company.yaml +26 -11
- package/hedhog/table/person_individual.yaml +17 -13
- package/hedhog/table/person_individual_relation.yaml +39 -0
- package/package.json +8 -7
- package/src/address-type.enum.ts +9 -0
- package/src/contact.module.ts +46 -48
- package/src/contact.service.ts +28 -13
- package/src/index.ts +6 -13
- package/src/language/en.json +13 -6
- package/src/language/pt.json +14 -6
- package/src/person/dto/create.dto.ts +62 -14
- package/src/person/dto/update.dto.ts +147 -75
- package/src/person/person.controller.ts +39 -27
- package/src/person/person.service.ts +1071 -239
- package/src/person-relation-type/person-relation-type.service.ts +84 -76
- package/hedhog/data/address_type.yaml +0 -28
- package/hedhog/frontend/app/address-type/page.tsx.ejs +0 -480
- package/hedhog/query/add-unique-address-type-locale.sql +0 -3
- package/hedhog/table/address.yaml +0 -28
- package/hedhog/table/address_type.yaml +0 -11
- package/hedhog/table/person_relation.yaml +0 -20
- package/hedhog/table/person_relation_type.yaml +0 -6
- package/src/address-type/address-type.controller.ts +0 -55
- package/src/address-type/address-type.enum.ts +0 -9
- package/src/address-type/address-type.module.ts +0 -18
- package/src/address-type/address-type.service.ts +0 -121
- package/src/address-type/dto/create.dto.ts +0 -19
- package/src/address-type/dto/update.dto.ts +0 -9
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare enum AddressTypeEnum {
|
|
2
|
+
RESIDENTIAL = "residential",
|
|
3
|
+
COMMERCIAL = "commercial",
|
|
4
|
+
CORRESPONDENCE = "correspondence",
|
|
5
|
+
ALTERNATIVE = "alternative",
|
|
6
|
+
WORK = "work",
|
|
7
|
+
BILLING = "billing",
|
|
8
|
+
SHIPPING = "shipping"
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=address-type.enum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"address-type.enum.d.ts","sourceRoot":"","sources":["../src/address-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,WAAW,gBAAgB;IAC3B,UAAU,eAAe;IACzB,cAAc,mBAAmB;IACjC,WAAW,gBAAgB;IAC3B,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,QAAQ,aAAa;CACtB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddressTypeEnum = void 0;
|
|
4
|
+
var AddressTypeEnum;
|
|
5
|
+
(function (AddressTypeEnum) {
|
|
6
|
+
AddressTypeEnum["RESIDENTIAL"] = "residential";
|
|
7
|
+
AddressTypeEnum["COMMERCIAL"] = "commercial";
|
|
8
|
+
AddressTypeEnum["CORRESPONDENCE"] = "correspondence";
|
|
9
|
+
AddressTypeEnum["ALTERNATIVE"] = "alternative";
|
|
10
|
+
AddressTypeEnum["WORK"] = "work";
|
|
11
|
+
AddressTypeEnum["BILLING"] = "billing";
|
|
12
|
+
AddressTypeEnum["SHIPPING"] = "shipping";
|
|
13
|
+
})(AddressTypeEnum || (exports.AddressTypeEnum = AddressTypeEnum = {}));
|
|
14
|
+
//# sourceMappingURL=address-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"address-type.enum.js","sourceRoot":"","sources":["../src/address-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAQX;AARD,WAAY,eAAe;IACzB,8CAA2B,CAAA;IAC3B,4CAAyB,CAAA;IACzB,oDAAiC,CAAA;IACjC,8CAA2B,CAAA;IAC3B,gCAAa,CAAA;IACb,sCAAmB,CAAA;IACnB,wCAAqB,CAAA;AACvB,CAAC,EARW,eAAe,+BAAf,eAAe,QAQ1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact.module.d.ts","sourceRoot":"","sources":["../src/contact.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contact.module.d.ts","sourceRoot":"","sources":["../src/contact.module.ts"],"names":[],"mappings":"AAcA,qBA+Ba,aAAa;CAAG"}
|
package/dist/contact.module.js
CHANGED
|
@@ -15,7 +15,6 @@ const core_1 = require("@hed-hog/core");
|
|
|
15
15
|
const common_1 = require("@nestjs/common");
|
|
16
16
|
const config_1 = require("@nestjs/config");
|
|
17
17
|
const jwt_1 = require("@nestjs/jwt");
|
|
18
|
-
const address_type_module_1 = require("./address-type/address-type.module");
|
|
19
18
|
const contact_type_module_1 = require("./contact-type/contact-type.module");
|
|
20
19
|
const contact_service_1 = require("./contact.service");
|
|
21
20
|
const document_type_module_1 = require("./document-type/document-type.module");
|
|
@@ -44,7 +43,6 @@ exports.ContactModule = ContactModule = __decorate([
|
|
|
44
43
|
(0, common_1.forwardRef)(() => api_prisma_1.PrismaModule),
|
|
45
44
|
(0, common_1.forwardRef)(() => api_pagination_1.PaginationModule),
|
|
46
45
|
(0, common_1.forwardRef)(() => person_module_1.PersonModule),
|
|
47
|
-
(0, common_1.forwardRef)(() => address_type_module_1.PersonAddressTypeModule),
|
|
48
46
|
(0, common_1.forwardRef)(() => contact_type_module_1.PersonContactTypeModule),
|
|
49
47
|
(0, common_1.forwardRef)(() => document_type_module_1.PersonDocumentTypeModule),
|
|
50
48
|
(0, common_1.forwardRef)(() => person_relation_type_module_1.PersonRelationTypeModule),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact.module.js","sourceRoot":"","sources":["../src/contact.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,oDAAm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AC,6CAAuB,CAAC;YACzC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,+CAAwB,CAAC;YAC1C,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,sDAAwB,CAAC;YAC1C,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAU,CAAC;YAC5B,qBAAY,CAAC,OAAO,EAAE;SACvB;QACD,WAAW,EAAE,EAAE;QACf,SAAS,EAAE,CAAC,gCAAc,CAAC;QAC3B,OAAO,EAAE,CAAC,gCAAc,CAAC;KAC1B,CAAC;GACW,aAAa,CAAG"}
|
|
@@ -13,8 +13,7 @@ export declare class ContactService {
|
|
|
13
13
|
getPerson(personId: number): Promise<{
|
|
14
14
|
address: {
|
|
15
15
|
id: number;
|
|
16
|
-
|
|
17
|
-
address_type_id: number;
|
|
16
|
+
address_type: import("@prisma/client").$Enums.address_address_type_enum;
|
|
18
17
|
country_code: string;
|
|
19
18
|
state: string;
|
|
20
19
|
city: string;
|
|
@@ -28,42 +27,41 @@ export declare class ContactService {
|
|
|
28
27
|
contact: {
|
|
29
28
|
value: string;
|
|
30
29
|
id: number;
|
|
31
|
-
person_id: number;
|
|
32
30
|
is_primary: boolean;
|
|
33
31
|
created_at: Date;
|
|
34
32
|
updated_at: Date;
|
|
33
|
+
person_id: number;
|
|
35
34
|
contact_type_id: number;
|
|
36
35
|
}[];
|
|
37
36
|
document: {
|
|
38
37
|
value: string;
|
|
39
38
|
id: number;
|
|
40
|
-
person_id: number;
|
|
41
39
|
created_at: Date;
|
|
42
40
|
updated_at: Date;
|
|
41
|
+
person_id: number;
|
|
43
42
|
document_type_id: number;
|
|
44
43
|
}[];
|
|
45
44
|
person_metadata: {
|
|
46
45
|
value: import("@prisma/client/runtime/library").JsonValue;
|
|
47
46
|
id: number;
|
|
48
|
-
person_id: number;
|
|
49
47
|
created_at: Date;
|
|
50
48
|
updated_at: Date;
|
|
49
|
+
person_id: number;
|
|
51
50
|
key: string;
|
|
52
51
|
}[];
|
|
53
|
-
} & {
|
|
54
52
|
name: string;
|
|
55
53
|
type: import("@prisma/client").$Enums.person_type_enum;
|
|
56
54
|
id: number;
|
|
57
55
|
created_at: Date;
|
|
58
56
|
updated_at: Date;
|
|
59
57
|
status: import("@prisma/client").$Enums.person_status_enum;
|
|
58
|
+
avatar_id: number | null;
|
|
60
59
|
}>;
|
|
61
60
|
getPersonOrCreateIfNotExists(type_id: number, name: string, email: string, phone: string, cpf: string, cnpj: string): Promise<{
|
|
62
61
|
person: {
|
|
63
62
|
address: {
|
|
64
63
|
id: number;
|
|
65
|
-
|
|
66
|
-
address_type_id: number;
|
|
64
|
+
address_type: import("@prisma/client").$Enums.address_address_type_enum;
|
|
67
65
|
country_code: string;
|
|
68
66
|
state: string;
|
|
69
67
|
city: string;
|
|
@@ -77,35 +75,35 @@ export declare class ContactService {
|
|
|
77
75
|
contact: {
|
|
78
76
|
value: string;
|
|
79
77
|
id: number;
|
|
80
|
-
person_id: number;
|
|
81
78
|
is_primary: boolean;
|
|
82
79
|
created_at: Date;
|
|
83
80
|
updated_at: Date;
|
|
81
|
+
person_id: number;
|
|
84
82
|
contact_type_id: number;
|
|
85
83
|
}[];
|
|
86
84
|
document: {
|
|
87
85
|
value: string;
|
|
88
86
|
id: number;
|
|
89
|
-
person_id: number;
|
|
90
87
|
created_at: Date;
|
|
91
88
|
updated_at: Date;
|
|
89
|
+
person_id: number;
|
|
92
90
|
document_type_id: number;
|
|
93
91
|
}[];
|
|
94
92
|
person_metadata: {
|
|
95
93
|
value: import("@prisma/client/runtime/library").JsonValue;
|
|
96
94
|
id: number;
|
|
97
|
-
person_id: number;
|
|
98
95
|
created_at: Date;
|
|
99
96
|
updated_at: Date;
|
|
97
|
+
person_id: number;
|
|
100
98
|
key: string;
|
|
101
99
|
}[];
|
|
102
|
-
} & {
|
|
103
100
|
name: string;
|
|
104
101
|
type: import("@prisma/client").$Enums.person_type_enum;
|
|
105
102
|
id: number;
|
|
106
103
|
created_at: Date;
|
|
107
104
|
updated_at: Date;
|
|
108
105
|
status: import("@prisma/client").$Enums.person_status_enum;
|
|
106
|
+
avatar_id: number | null;
|
|
109
107
|
};
|
|
110
108
|
created: boolean;
|
|
111
109
|
code?: undefined;
|
|
@@ -113,8 +111,7 @@ export declare class ContactService {
|
|
|
113
111
|
person: {
|
|
114
112
|
address: {
|
|
115
113
|
id: number;
|
|
116
|
-
|
|
117
|
-
address_type_id: number;
|
|
114
|
+
address_type: import("@prisma/client").$Enums.address_address_type_enum;
|
|
118
115
|
country_code: string;
|
|
119
116
|
state: string;
|
|
120
117
|
city: string;
|
|
@@ -128,35 +125,35 @@ export declare class ContactService {
|
|
|
128
125
|
contact: {
|
|
129
126
|
value: string;
|
|
130
127
|
id: number;
|
|
131
|
-
person_id: number;
|
|
132
128
|
is_primary: boolean;
|
|
133
129
|
created_at: Date;
|
|
134
130
|
updated_at: Date;
|
|
131
|
+
person_id: number;
|
|
135
132
|
contact_type_id: number;
|
|
136
133
|
}[];
|
|
137
134
|
document: {
|
|
138
135
|
value: string;
|
|
139
136
|
id: number;
|
|
140
|
-
person_id: number;
|
|
141
137
|
created_at: Date;
|
|
142
138
|
updated_at: Date;
|
|
139
|
+
person_id: number;
|
|
143
140
|
document_type_id: number;
|
|
144
141
|
}[];
|
|
145
142
|
person_metadata: {
|
|
146
143
|
value: import("@prisma/client/runtime/library").JsonValue;
|
|
147
144
|
id: number;
|
|
148
|
-
person_id: number;
|
|
149
145
|
created_at: Date;
|
|
150
146
|
updated_at: Date;
|
|
147
|
+
person_id: number;
|
|
151
148
|
key: string;
|
|
152
149
|
}[];
|
|
153
|
-
} & {
|
|
154
150
|
name: string;
|
|
155
151
|
type: import("@prisma/client").$Enums.person_type_enum;
|
|
156
152
|
id: number;
|
|
157
153
|
created_at: Date;
|
|
158
154
|
updated_at: Date;
|
|
159
155
|
status: import("@prisma/client").$Enums.person_status_enum;
|
|
156
|
+
avatar_id: number | null;
|
|
160
157
|
};
|
|
161
158
|
created: boolean;
|
|
162
159
|
code: string;
|
|
@@ -164,35 +161,35 @@ export declare class ContactService {
|
|
|
164
161
|
addContactIfNotExists(personId: number, value: string, typeId: number): Promise<{
|
|
165
162
|
value: string;
|
|
166
163
|
id: number;
|
|
167
|
-
person_id: number;
|
|
168
164
|
is_primary: boolean;
|
|
169
165
|
created_at: Date;
|
|
170
166
|
updated_at: Date;
|
|
167
|
+
person_id: number;
|
|
171
168
|
contact_type_id: number;
|
|
172
169
|
}>;
|
|
173
170
|
addDocumentIfNotExists(personId: number, value: string, typeId: number): Promise<{
|
|
174
171
|
value: string;
|
|
175
172
|
id: number;
|
|
176
|
-
person_id: number;
|
|
177
173
|
created_at: Date;
|
|
178
174
|
updated_at: Date;
|
|
175
|
+
person_id: number;
|
|
179
176
|
document_type_id: number;
|
|
180
177
|
}>;
|
|
181
178
|
getPersonContact(personId: number, typeId: PersonContactTypeEnum): Promise<{
|
|
182
179
|
value: string;
|
|
183
180
|
id: number;
|
|
184
|
-
person_id: number;
|
|
185
181
|
is_primary: boolean;
|
|
186
182
|
created_at: Date;
|
|
187
183
|
updated_at: Date;
|
|
184
|
+
person_id: number;
|
|
188
185
|
contact_type_id: number;
|
|
189
186
|
}>;
|
|
190
187
|
getPersonDocument(personId: number, typeId: PersonDocumentTypeEnum): Promise<{
|
|
191
188
|
value: string;
|
|
192
189
|
id: number;
|
|
193
|
-
person_id: number;
|
|
194
190
|
created_at: Date;
|
|
195
191
|
updated_at: Date;
|
|
192
|
+
person_id: number;
|
|
196
193
|
document_type_id: number;
|
|
197
194
|
}>;
|
|
198
195
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact.service.d.ts","sourceRoot":"","sources":["../src/contact.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,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AAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqGR,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;;;;;;IAsBrE,sBAAsB,CAC1B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM;;;;;;;;IAuBV,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB;;;;;;;;;IAShE,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,sBAAsB;;;;;;;;CAQzE"}
|
package/dist/contact.service.js
CHANGED
|
@@ -8,6 +8,17 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
+
var t = {};
|
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
+
t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
11
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
23
|
exports.ContactService = void 0;
|
|
13
24
|
const api_mail_1 = require("@hed-hog/api-mail");
|
|
@@ -26,17 +37,26 @@ let ContactService = class ContactService {
|
|
|
26
37
|
this.jwtService = jwtService;
|
|
27
38
|
}
|
|
28
39
|
async getPerson(personId) {
|
|
29
|
-
|
|
40
|
+
const person = await this.prismaService.person.findUnique({
|
|
30
41
|
where: {
|
|
31
42
|
id: personId,
|
|
32
43
|
},
|
|
33
44
|
include: {
|
|
34
45
|
contact: true,
|
|
35
|
-
|
|
46
|
+
person_address: {
|
|
47
|
+
include: {
|
|
48
|
+
address: true,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
36
51
|
document: true,
|
|
37
52
|
person_metadata: true,
|
|
38
53
|
},
|
|
39
54
|
});
|
|
55
|
+
if (!person) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
const { person_address } = person, data = __rest(person, ["person_address"]);
|
|
59
|
+
return Object.assign(Object.assign({}, data), { address: person_address.map((item) => item.address) });
|
|
40
60
|
}
|
|
41
61
|
async getPersonOrCreateIfNotExists(type_id, name, email, phone, cpf, cnpj) {
|
|
42
62
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact.service.js","sourceRoot":"","sources":["../src/contact.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contact.service.js","sourceRoot":"","sources":["../src/contact.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAgD;AAChD,oDAAoD;AACpD,2CAA4C;AAC5C,2CAA+C;AAC/C,qCAAyC;AACzC,wEAAyE;AACzE,2EAA4E;AAC5E,qCAAwD;AAGjD,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,YACmB,aAA4B,EAC5B,aAA4B,EAC5B,WAAwB,EACxB,UAAsB;QAHtB,kBAAa,GAAb,aAAa,CAAe;QAC5B,kBAAa,GAAb,aAAa,CAAe;QAC5B,g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export * from "./address-type/address-type.enum";
|
|
7
|
-
export * from "./contact-type/contact-type.enum";
|
|
8
|
-
export * from "./document-type/document-type.enum";
|
|
1
|
+
export * from './contact.module';
|
|
2
|
+
export * from './contact.service';
|
|
3
|
+
export * from './address-type.enum';
|
|
4
|
+
export * from './contact-type/contact-type.enum';
|
|
5
|
+
export * from './document-type/document-type.enum';
|
|
9
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAElC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAElC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -16,10 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./contact.module"), exports);
|
|
18
18
|
__exportStar(require("./contact.service"), exports);
|
|
19
|
-
__exportStar(require("./address-type
|
|
20
|
-
__exportStar(require("./contact-type/contact-type.enum"), exports);
|
|
21
|
-
__exportStar(require("./document-type/document-type.enum"), exports);
|
|
22
|
-
__exportStar(require("./address-type/address-type.enum"), exports);
|
|
19
|
+
__exportStar(require("./address-type.enum"), exports);
|
|
23
20
|
__exportStar(require("./contact-type/contact-type.enum"), exports);
|
|
24
21
|
__exportStar(require("./document-type/document-type.enum"), exports);
|
|
25
22
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,oDAAkC;AAElC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,oDAAkC;AAElC,sDAAoC;AACpC,mEAAiD;AACjD,qEAAmD"}
|
|
@@ -6,9 +6,23 @@ export declare enum PersonStatus {
|
|
|
6
6
|
ACTIVE = "active",
|
|
7
7
|
INACTIVE = "inactive"
|
|
8
8
|
}
|
|
9
|
+
export declare enum PersonGender {
|
|
10
|
+
MALE = "male",
|
|
11
|
+
FEMALE = "female",
|
|
12
|
+
OTHER = "other"
|
|
13
|
+
}
|
|
9
14
|
export declare class CreateDTO {
|
|
10
15
|
name: string;
|
|
11
16
|
type: PersonType;
|
|
12
17
|
status: PersonStatus;
|
|
18
|
+
avatar_id?: number | null;
|
|
19
|
+
birth_date?: string | null;
|
|
20
|
+
gender?: PersonGender | null;
|
|
21
|
+
job_title?: string | null;
|
|
22
|
+
trade_name?: string | null;
|
|
23
|
+
foundation_date?: string | null;
|
|
24
|
+
legal_nature?: string | null;
|
|
25
|
+
notes?: string | null;
|
|
26
|
+
employer_company_id?: number | null;
|
|
13
27
|
}
|
|
14
28
|
//# sourceMappingURL=create.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/person/dto/create.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/person/dto/create.dto.ts"],"names":[],"mappings":"AASA,oBAAY,UAAU;IACpB,UAAU,eAAe;IACzB,OAAO,YAAY;CACpB;AAED,oBAAY,YAAY;IACtB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED,qBAAa,SAAS;IAEpB,IAAI,EAAE,MAAM,CAAC;IAGb,IAAI,EAAE,UAAU,CAAC;IAGjB,MAAM,EAAE,YAAY,CAAuB;IAI3C,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAI1B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAI3B,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAI7B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAI1B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAI3B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAIhC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAI7B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAItB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC"}
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.CreateDTO = exports.PersonStatus = exports.PersonType = void 0;
|
|
12
|
+
exports.CreateDTO = exports.PersonGender = exports.PersonStatus = exports.PersonType = void 0;
|
|
13
13
|
const api_locale_1 = require("@hed-hog/api-locale");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
var PersonType;
|
|
@@ -22,6 +22,12 @@ var PersonStatus;
|
|
|
22
22
|
PersonStatus["ACTIVE"] = "active";
|
|
23
23
|
PersonStatus["INACTIVE"] = "inactive";
|
|
24
24
|
})(PersonStatus || (exports.PersonStatus = PersonStatus = {}));
|
|
25
|
+
var PersonGender;
|
|
26
|
+
(function (PersonGender) {
|
|
27
|
+
PersonGender["MALE"] = "male";
|
|
28
|
+
PersonGender["FEMALE"] = "female";
|
|
29
|
+
PersonGender["OTHER"] = "other";
|
|
30
|
+
})(PersonGender || (exports.PersonGender = PersonGender = {}));
|
|
25
31
|
class CreateDTO {
|
|
26
32
|
constructor() {
|
|
27
33
|
this.status = PersonStatus.ACTIVE;
|
|
@@ -40,4 +46,49 @@ __decorate([
|
|
|
40
46
|
(0, class_validator_1.IsEnum)(PersonStatus, { message: (args) => (0, api_locale_1.getLocaleText)('validation.statusMustBeEnum', args.value) }),
|
|
41
47
|
__metadata("design:type", String)
|
|
42
48
|
], CreateDTO.prototype, "status", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.IsOptional)(),
|
|
51
|
+
(0, class_validator_1.IsInt)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.idMustBeInteger', args.value) }),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], CreateDTO.prototype, "avatar_id", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_validator_1.IsOptional)(),
|
|
56
|
+
(0, class_validator_1.IsDateString)({}, { message: (args) => (0, api_locale_1.getLocaleText)('validation.dateMustBeString', args.value) }),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], CreateDTO.prototype, "birth_date", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, class_validator_1.IsOptional)(),
|
|
61
|
+
(0, class_validator_1.IsEnum)(PersonGender, { message: (args) => (0, api_locale_1.getLocaleText)('validation.typeMustBeEnum', args.value) }),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], CreateDTO.prototype, "gender", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, class_validator_1.IsOptional)(),
|
|
66
|
+
(0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.stringRequired', args.value) }),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], CreateDTO.prototype, "job_title", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.IsOptional)(),
|
|
71
|
+
(0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.stringRequired', args.value) }),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], CreateDTO.prototype, "trade_name", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, class_validator_1.IsOptional)(),
|
|
76
|
+
(0, class_validator_1.IsDateString)({}, { message: (args) => (0, api_locale_1.getLocaleText)('validation.dateMustBeString', args.value) }),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], CreateDTO.prototype, "foundation_date", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, class_validator_1.IsOptional)(),
|
|
81
|
+
(0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.stringRequired', args.value) }),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], CreateDTO.prototype, "legal_nature", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, class_validator_1.IsOptional)(),
|
|
86
|
+
(0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.notesMustBeString', args.value) }),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], CreateDTO.prototype, "notes", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, class_validator_1.IsOptional)(),
|
|
91
|
+
(0, class_validator_1.IsInt)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.idMustBeInteger', args.value) }),
|
|
92
|
+
__metadata("design:type", Number)
|
|
93
|
+
], CreateDTO.prototype, "employer_company_id", void 0);
|
|
43
94
|
//# sourceMappingURL=create.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/person/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/person/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;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Aa,EAAC,8BAA8B,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;;wCACrE;AAItB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,EAAC,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0BAAa,EAAC,4BAA4B,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;;sDAClD"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AddressTypeEnum } from '../../address-type.enum';
|
|
2
|
+
import { PersonGender } from './create.dto';
|
|
1
3
|
export declare class UpdateAllContactDTO {
|
|
2
4
|
id?: number;
|
|
3
5
|
value: string;
|
|
@@ -7,10 +9,13 @@ export declare class UpdateAllContactDTO {
|
|
|
7
9
|
export declare class UpdateAllAddressDTO {
|
|
8
10
|
id?: number;
|
|
9
11
|
line1: string;
|
|
12
|
+
line2?: string;
|
|
10
13
|
city: string;
|
|
11
14
|
state: string;
|
|
15
|
+
country_code?: string;
|
|
16
|
+
postal_code?: string;
|
|
12
17
|
is_primary: boolean;
|
|
13
|
-
|
|
18
|
+
address_type: AddressTypeEnum;
|
|
14
19
|
}
|
|
15
20
|
export declare class UpdateAllDocumentDTO {
|
|
16
21
|
id?: number;
|
|
@@ -21,6 +26,17 @@ export declare class UpdateAllPersonDTO {
|
|
|
21
26
|
name: string;
|
|
22
27
|
type: string;
|
|
23
28
|
status: string;
|
|
29
|
+
avatar_id?: number | null;
|
|
30
|
+
birth_date?: string | null;
|
|
31
|
+
gender?: PersonGender | null;
|
|
32
|
+
job_title?: string | null;
|
|
33
|
+
trade_name?: string | null;
|
|
34
|
+
foundation_date?: string | null;
|
|
35
|
+
legal_nature?: string | null;
|
|
36
|
+
notes?: string | null;
|
|
37
|
+
employer_company_id?: number | null;
|
|
38
|
+
headquarter_id?: number | null;
|
|
39
|
+
branch_ids?: number[];
|
|
24
40
|
contacts: UpdateAllContactDTO[];
|
|
25
41
|
addresses: UpdateAllAddressDTO[];
|
|
26
42
|
documents: UpdateAllDocumentDTO[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../src/person/dto/update.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update.dto.d.ts","sourceRoot":"","sources":["../../../src/person/dto/update.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAc5C,qBAAa,mBAAmB;IAG9B,EAAE,CAAC,EAAE,MAAM,CAAC;IAGZ,KAAK,EAAE,MAAM,CAAC;IAGd,UAAU,EAAE,OAAO,CAAC;IAGpB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,qBAAa,mBAAmB;IAG9B,EAAE,CAAC,EAAE,MAAM,CAAC;IAGZ,KAAK,EAAE,MAAM,CAAC;IAId,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,MAAM,CAAC;IAId,YAAY,CAAC,EAAE,MAAM,CAAC;IAItB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,UAAU,EAAE,OAAO,CAAC;IAKpB,YAAY,EAAE,eAAe,CAAC;CAC/B;AAED,qBAAa,oBAAoB;IAG/B,EAAE,CAAC,EAAE,MAAM,CAAC;IAGZ,KAAK,EAAE,MAAM,CAAC;IAGd,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,qBAAa,kBAAkB;IAE7B,IAAI,EAAE,MAAM,CAAC;IAGb,IAAI,EAAE,MAAM,CAAC;IAGb,MAAM,EAAE,MAAM,CAAC;IAIf,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAI1B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAI3B,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAI7B,SAAS,CAAC,EAAE,M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