@hed-hog/contact 0.0.266 → 0.0.274
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/README.md +470 -0
- 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/interaction-create.dto.d.ts +16 -0
- package/dist/person/dto/interaction-create.dto.d.ts.map +1 -0
- package/dist/person/dto/interaction-create.dto.js +57 -0
- package/dist/person/dto/interaction-create.dto.js.map +1 -0
- 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 +37 -8
- package/dist/person/person.controller.d.ts.map +1 -1
- package/dist/person/person.controller.js +29 -3
- package/dist/person/person.controller.js.map +1 -1
- package/dist/person/person.service.d.ts +71 -13
- package/dist/person/person.service.d.ts.map +1 -1
- package/dist/person/person.service.js +762 -108
- 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/role.yaml +9 -1
- package/hedhog/data/route.yaml +10 -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 +2277 -0
- package/hedhog/frontend/app/person/_components/person-types.ts.ejs +157 -0
- package/hedhog/frontend/app/person/page.tsx.ejs +1158 -1335
- package/hedhog/frontend/messages/en.json +114 -4
- package/hedhog/frontend/messages/pt.json +155 -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 +4 -0
- package/hedhog/table/person_individual_relation.yaml +39 -0
- package/package.json +6 -5
- 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 +8 -1
- package/src/language/pt.json +9 -1
- package/src/person/dto/create.dto.ts +49 -1
- package/src/person/dto/update.dto.ts +75 -3
- package/src/person/person.controller.ts +31 -14
- package/src/person/person.service.ts +1019 -121
- 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
|
@@ -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,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAG5E,qBACa,cAAc;IAEvB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ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AAK,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,gBAAW,GAAX,WAAW,CAAa;QACxB,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAEJ,KAAK,CAAC,SAAS,CAAC,QAAgB;QAC9B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC;YACxD,KAAK,EAAE;gBACL,EAAE,EAAE,QAAQ;aACb;YACD,OAAO,EAAE;gBACP,OAAO,EAAE,IAAI;gBACb,cAAc,EAAE;oBACd,OAA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X,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC;YACxC,IAAI,EAAE;gBACJ,KAAK;gBACL,gBAAgB,EAAE,MAAM;gBACxB,SAAS,EAAE,QAAQ;aACpB;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,QAAgB,EAAE,MAA6B;QACpE,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC;YAC1C,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,eAAe,EAAE,MAAM;aACxB;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,QAAgB,EAAE,MAA8B;QACtE,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;YAC3C,KAAK,EAAE;gBACL,SAAS,EAAE,QAAQ;gBACnB,gBAAgB,EAAE,MAAM;aACzB;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAjNY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;qCAGuB,sBAAa;QACb,0BAAa;QACf,sBAAW;QACZ,gBAAU;GAL9B,cAAc,CAiN1B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
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":";;;;;;;;;;;;AAAA,oDAAoD;AACpD,qDAMyB;AAEzB,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,uCAAyB,CAAA;IACzB,iCAAmB,CAAA;AACrB,CAAC,EAHW,UAAU,0BAAV,UAAU,QAGrB;AAED,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;AACvB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAED,IAAY,YAIX;AAJD,WAAY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onInteractionType {
|
|
2
|
+
CALL = "call",
|
|
3
|
+
EMAIL = "email",
|
|
4
|
+
WHATSAPP = "whatsapp",
|
|
5
|
+
MEETING = "meeting",
|
|
6
|
+
NOTE = "note"
|
|
7
|
+
}
|
|
8
|
+
export declare class CreateInteractionDTO {
|
|
9
|
+
type: PersonInteractionType;
|
|
10
|
+
happened_at?: string;
|
|
11
|
+
outcome?: string | null;
|
|
12
|
+
notes?: string | null;
|
|
13
|
+
next_action_at?: string | null;
|
|
14
|
+
owner_user_id?: number | null;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=interaction-create.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interaction-create.dto.d.ts","sourceRoot":"","sources":["../../../src/person/dto/interaction-create.dto.ts"],"names":[],"mappings":"AAGA,oBAAY,qBAAqB;IAC/B,IAAI,SAAS;IACb,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,IAAI,SAAS;CACd;AAED,qBAAa,oBAAoB;IAI/B,IAAI,EAAE,qBAAqB,CAAC;IAO5B,WAAW,CAAC,EAAE,MAAM,CAAC;IAIrB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAIxB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAOtB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAI/B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CreateInteractionDTO = exports.PersonInteractionType = void 0;
|
|
13
|
+
const api_locale_1 = require("@hed-hog/api-locale");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
var PersonInteractionType;
|
|
16
|
+
(function (PersonInteractionType) {
|
|
17
|
+
PersonInteractionType["CALL"] = "call";
|
|
18
|
+
PersonInteractionType["EMAIL"] = "email";
|
|
19
|
+
PersonInteractionType["WHATSAPP"] = "whatsapp";
|
|
20
|
+
PersonInteractionType["MEETING"] = "meeting";
|
|
21
|
+
PersonInteractionType["NOTE"] = "note";
|
|
22
|
+
})(PersonInteractionType || (exports.PersonInteractionType = PersonInteractionType = {}));
|
|
23
|
+
class CreateInteractionDTO {
|
|
24
|
+
}
|
|
25
|
+
exports.CreateInteractionDTO = CreateInteractionDTO;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsEnum)(PersonInteractionType, {
|
|
28
|
+
message: (args) => (0, api_locale_1.getLocaleText)('validation.interactionTypeMustBeEnum', args.value),
|
|
29
|
+
}),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], CreateInteractionDTO.prototype, "type", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
(0, class_validator_1.IsDateString)({}, { message: (args) => (0, api_locale_1.getLocaleText)('validation.dateMustBeString', args.value) }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], CreateInteractionDTO.prototype, "happened_at", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsOptional)(),
|
|
39
|
+
(0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.stringRequired', args.value) }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], CreateInteractionDTO.prototype, "outcome", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
44
|
+
(0, class_validator_1.IsString)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.notesMustBeString', args.value) }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], CreateInteractionDTO.prototype, "notes", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.IsOptional)(),
|
|
49
|
+
(0, class_validator_1.IsDateString)({}, { message: (args) => (0, api_locale_1.getLocaleText)('validation.dateMustBeString', args.value) }),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], CreateInteractionDTO.prototype, "next_action_at", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsOptional)(),
|
|
54
|
+
(0, class_validator_1.IsInt)({ message: (args) => (0, api_locale_1.getLocaleText)('validation.idMustBeInteger', args.value) }),
|
|
55
|
+
__metadata("design:type", Number)
|
|
56
|
+
], CreateInteractionDTO.prototype, "owner_user_id", void 0);
|
|
57
|
+
//# sourceMappingURL=interaction-create.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interaction-create.dto.js","sourceRoot":"","sources":["../../../src/person/dto/interaction-create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoD;AACpD,qDAAoF;AAEpF,IAAY,qBAMX;AAND,WAAY,qBAAqB;IAC/B,sCAAa,CAAA;IACb,wCAAe,CAAA;IACf,8CAAqB,CAAA;IACrB,4CAAmB,CAAA;IACnB,sCAAa,CAAA;AACf,CAAC,EANW,qBAAqB,qCAArB,qBAAqB,QAMhC;AAED,MAAa,oBAAoB;CA+BhC;AA/BD,o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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;IA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