@nomalism-com/types 0.11.40 → 0.11.42
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/modules/document/order/interfaces.d.ts +4 -1
- package/dist/modules/integration/googleSheets/route.schema.js +13 -5
- package/dist/modules/integration/projectInfo/route.schema.js +5 -1
- package/dist/modules/stock/location/route.schema.js +2 -2
- package/dist/modules/stock/location/tests.js +4 -4
- package/dist/modules/supply/documentHeader/route.schema.js +55 -11
- package/dist/modules/supply/externalDocumentHeader/route.schema.js +1 -1
- package/dist/modules/supply/preSale/route.schema.js +1 -0
- package/dist/modules/supply/schedule/interface.d.ts +5 -1
- package/dist/modules/user/address/responseCreate.schema.js +1 -1
- package/dist/modules/user/address/route.schema.js +2 -2
- package/dist/modules/user/address/tests.js +3 -3
- package/dist/modules/user/persona/route.schema.js +2 -2
- package/dist/modules/user/tenant/route.schema.js +4 -4
- package/dist/modules/user/zipCode/route.schema.js +2 -2
- package/package.json +7 -7
|
@@ -41,6 +41,9 @@ export interface IConferirEncomendaClienteRequest {
|
|
|
41
41
|
plot_id?: string;
|
|
42
42
|
id_provider?: number;
|
|
43
43
|
}
|
|
44
|
+
export interface IConferirEncomendaClienteResponse {
|
|
45
|
+
document_line_id: string;
|
|
46
|
+
}
|
|
44
47
|
export interface IFindStockToOrderRequest {
|
|
45
48
|
id_provider: number;
|
|
46
49
|
}
|
|
@@ -64,7 +67,7 @@ export interface ISetProviderRequest {
|
|
|
64
67
|
export interface IRepository {
|
|
65
68
|
findStockToOrder(data: IFindStockToOrderRequest): Promise<IFindStockToOrderResponse[]>;
|
|
66
69
|
findProvidersWithStockToOrder(): Promise<IShared.IFindMinifiedResponse[]>;
|
|
67
|
-
conferirEncomendaCliente(data: IConferirEncomendaClienteRequest): Promise<
|
|
70
|
+
conferirEncomendaCliente(data: IConferirEncomendaClienteRequest): Promise<IConferirEncomendaClienteResponse>;
|
|
68
71
|
undoEncomendaVA(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
69
72
|
setProvider(selector: IShared.IFindByIdRequest, data: ISetProviderRequest): Promise<void>;
|
|
70
73
|
unsetProvider(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
@@ -24,22 +24,30 @@ var userData = {
|
|
|
24
24
|
emission_date: joi_1.default.date().optional(),
|
|
25
25
|
owner_number: joi_1.default.number().optional(),
|
|
26
26
|
contact_persona_name: joi_1.default.string().optional(),
|
|
27
|
-
contact_persona_email: joi_1.default.string().optional(),
|
|
27
|
+
contact_persona_email: joi_1.default.string().trim(true).lowercase().optional(),
|
|
28
28
|
contact_persona_telephone: joi_1.default.string().optional(),
|
|
29
29
|
billing_persona_nif: joi_1.default.string().optional(),
|
|
30
30
|
billing_persona_name: joi_1.default.string().optional(),
|
|
31
|
-
billing_persona_email: joi_1.default.string().optional(),
|
|
31
|
+
billing_persona_email: joi_1.default.string().trim(true).lowercase().optional(),
|
|
32
32
|
billing_persona_telephone: joi_1.default.string().optional(),
|
|
33
33
|
billing_persona_address_street: joi_1.default.string().optional(),
|
|
34
34
|
billing_persona_address_locality: joi_1.default.string().optional(),
|
|
35
|
-
billing_persona_address_postal_code: joi_1.default
|
|
35
|
+
billing_persona_address_postal_code: joi_1.default
|
|
36
|
+
.string()
|
|
37
|
+
.trim(true)
|
|
38
|
+
.lowercase()
|
|
39
|
+
.optional(),
|
|
36
40
|
billing_persona_address_country_name: joi_1.default.string().optional(),
|
|
37
41
|
delivery_persona_name: joi_1.default.string().optional(),
|
|
38
|
-
delivery_persona_email: joi_1.default.string().optional(),
|
|
42
|
+
delivery_persona_email: joi_1.default.string().trim(true).lowercase().optional(),
|
|
39
43
|
delivery_persona_telephone: joi_1.default.string().optional(),
|
|
40
44
|
delivery_persona_address_street: joi_1.default.string().optional(),
|
|
41
45
|
delivery_persona_address_locality: joi_1.default.string().optional(),
|
|
42
|
-
delivery_persona_address_postal_code: joi_1.default
|
|
46
|
+
delivery_persona_address_postal_code: joi_1.default
|
|
47
|
+
.string()
|
|
48
|
+
.trim(true)
|
|
49
|
+
.lowercase()
|
|
50
|
+
.optional(),
|
|
43
51
|
delivery_persona_address_country_name: joi_1.default.string().optional(),
|
|
44
52
|
};
|
|
45
53
|
var updateQueryKeys = {
|
|
@@ -11,7 +11,11 @@ var senEmailBodyKeys = {
|
|
|
11
11
|
description: joi_1.default.string().required(),
|
|
12
12
|
telephone: joi_1.default.string().required(),
|
|
13
13
|
type: joi_1.default.string().valid('particular', 'professional', 'company'),
|
|
14
|
-
email: joi_1.default
|
|
14
|
+
email: joi_1.default
|
|
15
|
+
.string()
|
|
16
|
+
.trim(true)
|
|
17
|
+
.lowercase()
|
|
18
|
+
.email({ tlds: { allow: false } }),
|
|
15
19
|
};
|
|
16
20
|
exports.sendEmailBody = joi_1.default
|
|
17
21
|
.object()
|
|
@@ -19,7 +19,7 @@ var createBodyKeys = {
|
|
|
19
19
|
.optional(),
|
|
20
20
|
street: joi_1.default.string().required(),
|
|
21
21
|
locality: joi_1.default.string().required(),
|
|
22
|
-
postal_code: joi_1.default.string().required(),
|
|
22
|
+
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
23
23
|
default_billing: joi_1.default.boolean(),
|
|
24
24
|
default_delivery: joi_1.default.boolean(),
|
|
25
25
|
};
|
|
@@ -37,7 +37,7 @@ var updateBodyKeys = {
|
|
|
37
37
|
.optional(),
|
|
38
38
|
street: joi_1.default.string().optional(),
|
|
39
39
|
locality: joi_1.default.string().optional(),
|
|
40
|
-
postal_code: joi_1.default.string().optional(),
|
|
40
|
+
postal_code: joi_1.default.string().trim(true).lowercase().optional(),
|
|
41
41
|
default_billing: joi_1.default.boolean(),
|
|
42
42
|
default_delivery: joi_1.default.boolean(),
|
|
43
43
|
};
|
|
@@ -57,7 +57,7 @@ var createUpdateDeleteBodyResponseKeys = {
|
|
|
57
57
|
origin_id: joi_1.default.string().allow(null).optional(),
|
|
58
58
|
street: joi_1.default.string().required(),
|
|
59
59
|
locality: joi_1.default.string().required(),
|
|
60
|
-
postal_code: joi_1.default.string().required(),
|
|
60
|
+
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
61
61
|
default_billing: joi_1.default.boolean(),
|
|
62
62
|
default_delivery: joi_1.default.boolean(),
|
|
63
63
|
};
|
|
@@ -79,7 +79,7 @@ var findBodyResponseKeys = {
|
|
|
79
79
|
origin_id: joi_1.default.string().allow(null).optional(),
|
|
80
80
|
street: joi_1.default.string().required(),
|
|
81
81
|
locality: joi_1.default.string().required(),
|
|
82
|
-
postal_code: joi_1.default.string().required(),
|
|
82
|
+
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
83
83
|
default_billing: joi_1.default.boolean(),
|
|
84
84
|
default_delivery: joi_1.default.boolean(),
|
|
85
85
|
};
|
|
@@ -103,7 +103,7 @@ var findByIdBodyResponseKeys = {
|
|
|
103
103
|
origin_id: joi_1.default.string().allow(null).optional(),
|
|
104
104
|
street: joi_1.default.string().required(),
|
|
105
105
|
locality: joi_1.default.string().required(),
|
|
106
|
-
postal_code: joi_1.default.string().required(),
|
|
106
|
+
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
107
107
|
default_billing: joi_1.default.boolean(),
|
|
108
108
|
default_delivery: joi_1.default.boolean(),
|
|
109
109
|
};
|
|
@@ -127,7 +127,7 @@ var findOwnerIdBodyResponsekeys = {
|
|
|
127
127
|
origin_id: joi_1.default.string().allow(null).optional(),
|
|
128
128
|
street: joi_1.default.string().required(),
|
|
129
129
|
locality: joi_1.default.string().required(),
|
|
130
|
-
postal_code: joi_1.default.string().required(),
|
|
130
|
+
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
131
131
|
default_billing: joi_1.default.boolean(),
|
|
132
132
|
default_delivery: joi_1.default.boolean(),
|
|
133
133
|
};
|
|
@@ -34,7 +34,12 @@ var createBodyKeys = {
|
|
|
34
34
|
.optional(),
|
|
35
35
|
billing_persona_telephone: joi_1.default.string().allow(null).optional(),
|
|
36
36
|
billing_persona_address_street: joi_1.default.string().allow(null).optional(),
|
|
37
|
-
billing_persona_address_postal_code: joi_1.default
|
|
37
|
+
billing_persona_address_postal_code: joi_1.default
|
|
38
|
+
.string()
|
|
39
|
+
.trim(true)
|
|
40
|
+
.lowercase()
|
|
41
|
+
.allow(null)
|
|
42
|
+
.optional(),
|
|
38
43
|
billing_persona_address_locality: joi_1.default.string().allow(null).optional(),
|
|
39
44
|
billing_persona_address_country_id: joi_1.default.string().allow(null).optional(),
|
|
40
45
|
billing_persona_address_country_name: joi_1.default.string().allow(null).optional(),
|
|
@@ -47,7 +52,12 @@ var createBodyKeys = {
|
|
|
47
52
|
.optional(),
|
|
48
53
|
delivery_persona_telephone: joi_1.default.string().allow(null).optional(),
|
|
49
54
|
delivery_persona_address_street: joi_1.default.string().allow(null).optional(),
|
|
50
|
-
delivery_persona_address_postal_code: joi_1.default
|
|
55
|
+
delivery_persona_address_postal_code: joi_1.default
|
|
56
|
+
.string()
|
|
57
|
+
.trim(true)
|
|
58
|
+
.lowercase()
|
|
59
|
+
.allow(null)
|
|
60
|
+
.optional(),
|
|
51
61
|
delivery_persona_address_locality: joi_1.default.string().allow(null).optional(),
|
|
52
62
|
delivery_persona_address_country_id: joi_1.default.string().allow(null).optional(),
|
|
53
63
|
delivery_persona_address_country_name: joi_1.default.string().allow(null).optional(),
|
|
@@ -60,7 +70,12 @@ var createBodyKeys = {
|
|
|
60
70
|
.optional(),
|
|
61
71
|
contact_persona_telephone: joi_1.default.string().allow(null).optional(),
|
|
62
72
|
contact_persona_address_street: joi_1.default.string().allow(null).optional(),
|
|
63
|
-
contact_persona_address_postal_code: joi_1.default
|
|
73
|
+
contact_persona_address_postal_code: joi_1.default
|
|
74
|
+
.string()
|
|
75
|
+
.trim(true)
|
|
76
|
+
.lowercase()
|
|
77
|
+
.allow(null)
|
|
78
|
+
.optional(),
|
|
64
79
|
contact_persona_address_locality: joi_1.default.string().allow(null).optional(),
|
|
65
80
|
contact_persona_address_country_id: joi_1.default.string().allow(null).optional(),
|
|
66
81
|
contact_persona_address_country_name: joi_1.default.string().allow(null).optional(),
|
|
@@ -70,7 +85,12 @@ var createBodyKeys = {
|
|
|
70
85
|
delivery_method_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
71
86
|
delivery_method: joi_1.default.string().allow(null).optional(),
|
|
72
87
|
delivery_departure_street: joi_1.default.string().allow(null).optional(),
|
|
73
|
-
delivery_departure_postal_code: joi_1.default
|
|
88
|
+
delivery_departure_postal_code: joi_1.default
|
|
89
|
+
.string()
|
|
90
|
+
.trim(true)
|
|
91
|
+
.lowercase()
|
|
92
|
+
.allow(null)
|
|
93
|
+
.optional(),
|
|
74
94
|
delivery_departure_locality: joi_1.default.string().allow(null).optional(),
|
|
75
95
|
vehicle_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
76
96
|
vehicle: joi_1.default.string().allow(null).optional(),
|
|
@@ -107,10 +127,14 @@ var createFromHeaderBodyKeys = {
|
|
|
107
127
|
.object({
|
|
108
128
|
delivery_departure_street: joi_1.default.string().required(),
|
|
109
129
|
delivery_departure_locality: joi_1.default.string().required(),
|
|
110
|
-
delivery_departure_postal_code: joi_1.default
|
|
130
|
+
delivery_departure_postal_code: joi_1.default
|
|
131
|
+
.string()
|
|
132
|
+
.trim(true)
|
|
133
|
+
.lowercase()
|
|
134
|
+
.required(),
|
|
111
135
|
delivery_street: joi_1.default.string().required(),
|
|
112
136
|
delivery_locality: joi_1.default.string().required(),
|
|
113
|
-
delivery_postal_code: joi_1.default.string().required(),
|
|
137
|
+
delivery_postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
114
138
|
})
|
|
115
139
|
.allow(null)
|
|
116
140
|
.optional(),
|
|
@@ -186,7 +210,12 @@ var updateBodyKeys = {
|
|
|
186
210
|
.optional(),
|
|
187
211
|
billing_persona_telephone: joi_1.default.string().allow(null).optional(),
|
|
188
212
|
billing_persona_address_street: joi_1.default.string().allow(null).optional(),
|
|
189
|
-
billing_persona_address_postal_code: joi_1.default
|
|
213
|
+
billing_persona_address_postal_code: joi_1.default
|
|
214
|
+
.string()
|
|
215
|
+
.trim(true)
|
|
216
|
+
.lowercase()
|
|
217
|
+
.allow(null)
|
|
218
|
+
.optional(),
|
|
190
219
|
billing_persona_address_locality: joi_1.default.string().allow(null).optional(),
|
|
191
220
|
billing_persona_address_country_id: joi_1.default.string().allow(null).optional(),
|
|
192
221
|
billing_persona_address_country_name: joi_1.default.string().allow(null).optional(),
|
|
@@ -199,7 +228,12 @@ var updateBodyKeys = {
|
|
|
199
228
|
.optional(),
|
|
200
229
|
delivery_persona_telephone: joi_1.default.string().allow(null).optional(),
|
|
201
230
|
delivery_persona_address_street: joi_1.default.string().allow(null).optional(),
|
|
202
|
-
delivery_persona_address_postal_code: joi_1.default
|
|
231
|
+
delivery_persona_address_postal_code: joi_1.default
|
|
232
|
+
.string()
|
|
233
|
+
.trim(true)
|
|
234
|
+
.lowercase()
|
|
235
|
+
.allow(null)
|
|
236
|
+
.optional(),
|
|
203
237
|
delivery_persona_address_locality: joi_1.default.string().allow(null).optional(),
|
|
204
238
|
delivery_persona_address_country_id: joi_1.default.string().allow(null).optional(),
|
|
205
239
|
delivery_persona_address_country_name: joi_1.default.string().allow(null).optional(),
|
|
@@ -212,7 +246,12 @@ var updateBodyKeys = {
|
|
|
212
246
|
.optional(),
|
|
213
247
|
contact_persona_telephone: joi_1.default.string().allow(null).optional(),
|
|
214
248
|
contact_persona_address_street: joi_1.default.string().allow(null).optional(),
|
|
215
|
-
contact_persona_address_postal_code: joi_1.default
|
|
249
|
+
contact_persona_address_postal_code: joi_1.default
|
|
250
|
+
.string()
|
|
251
|
+
.trim(true)
|
|
252
|
+
.lowercase()
|
|
253
|
+
.allow(null)
|
|
254
|
+
.optional(),
|
|
216
255
|
contact_persona_address_locality: joi_1.default.string().allow(null).optional(),
|
|
217
256
|
contact_persona_address_country_id: joi_1.default.string().allow(null).optional(),
|
|
218
257
|
contact_persona_address_country_name: joi_1.default.string().allow(null).optional(),
|
|
@@ -230,7 +269,12 @@ var updateBodyKeys = {
|
|
|
230
269
|
delivery_method_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
231
270
|
delivery_method: joi_1.default.string().allow(null).optional(),
|
|
232
271
|
delivery_departure_street: joi_1.default.string().allow(null).optional(),
|
|
233
|
-
delivery_departure_postal_code: joi_1.default
|
|
272
|
+
delivery_departure_postal_code: joi_1.default
|
|
273
|
+
.string()
|
|
274
|
+
.trim(true)
|
|
275
|
+
.lowercase()
|
|
276
|
+
.allow(null)
|
|
277
|
+
.optional(),
|
|
234
278
|
delivery_departure_locality: joi_1.default.string().allow(null).optional(),
|
|
235
279
|
vehicle_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
236
280
|
vehicle: joi_1.default.string().allow(null).optional(),
|
|
@@ -380,7 +424,7 @@ var updateManyWithPersonaBodyKeys = {
|
|
|
380
424
|
.optional(),
|
|
381
425
|
street: joi_1.default.string().optional(),
|
|
382
426
|
locality: joi_1.default.string().optional(),
|
|
383
|
-
postal_code: joi_1.default.string().optional(),
|
|
427
|
+
postal_code: joi_1.default.string().trim(true).lowercase().optional(),
|
|
384
428
|
country_id: joi_1.default.string().uuid().optional(),
|
|
385
429
|
country_name: joi_1.default.string().optional(),
|
|
386
430
|
};
|
|
@@ -35,6 +35,7 @@ exports.updateBody = joi_1.default
|
|
|
35
35
|
var updatePreSaleQuantityBodyKeys = {
|
|
36
36
|
quantity: joi_1.default.number().positive().required(),
|
|
37
37
|
type: joi_1.default.string().valid('plot', 'product').required(),
|
|
38
|
+
updated_by: joi_1.default.string().uuid().optional(),
|
|
38
39
|
};
|
|
39
40
|
exports.updatePreSaleQuantityBody = joi_1.default
|
|
40
41
|
.object()
|
|
@@ -13,6 +13,10 @@ export declare const ScheduleTypeLabel: Record<IScheduleType, string>;
|
|
|
13
13
|
export interface IRunImmediatelyRequest {
|
|
14
14
|
scheduleType: IScheduleType;
|
|
15
15
|
}
|
|
16
|
+
export interface IRunImmediatelyResponse {
|
|
17
|
+
messages?: string[];
|
|
18
|
+
line_count: number;
|
|
19
|
+
}
|
|
16
20
|
export interface IRepository {
|
|
17
|
-
runImmediately(params: IRunImmediatelyRequest): Promise<
|
|
21
|
+
runImmediately(params: IRunImmediatelyRequest): Promise<IRunImmediatelyResponse>;
|
|
18
22
|
}
|
|
@@ -49,7 +49,7 @@ var createUpdateDeleteBodyResponseKeys = {
|
|
|
49
49
|
country_id: joi_1.default.string().uuid().required(),
|
|
50
50
|
street: joi_1.default.string().required(),
|
|
51
51
|
locality: joi_1.default.string().required(),
|
|
52
|
-
postal_code: joi_1.default.string().required(),
|
|
52
|
+
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
53
53
|
billing: joi_1.default.boolean().required(),
|
|
54
54
|
delivery: joi_1.default.boolean().required(),
|
|
55
55
|
head_office: joi_1.default.boolean().required(),
|
|
@@ -12,7 +12,7 @@ var createBodyKeys = {
|
|
|
12
12
|
delivery: joi_1.default.boolean().default(false),
|
|
13
13
|
head_office: joi_1.default.boolean().default(false),
|
|
14
14
|
locality: joi_1.default.string().required(),
|
|
15
|
-
postal_code: joi_1.default.string().required(),
|
|
15
|
+
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
16
16
|
street: joi_1.default.string().required(),
|
|
17
17
|
provider_id: joi_1.default.string().uuid(),
|
|
18
18
|
client_id: joi_1.default.string().uuid(),
|
|
@@ -30,7 +30,7 @@ var updateBodyKeys = {
|
|
|
30
30
|
delivery: joi_1.default.boolean().default(false).optional(),
|
|
31
31
|
head_office: joi_1.default.boolean().default(false).optional(),
|
|
32
32
|
locality: joi_1.default.string().required(),
|
|
33
|
-
postal_code: joi_1.default.string().required(),
|
|
33
|
+
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
34
34
|
street: joi_1.default.string().required(),
|
|
35
35
|
};
|
|
36
36
|
exports.updateBody = joi_1.default.object().keys(updateBodyKeys).messages(messages_1.messages);
|
|
@@ -52,7 +52,7 @@ var findBodyResponseKeys = {
|
|
|
52
52
|
country_id: joi_1.default.string().uuid().required(),
|
|
53
53
|
street: joi_1.default.string().required(),
|
|
54
54
|
locality: joi_1.default.string().required(),
|
|
55
|
-
postal_code: joi_1.default.string().required(),
|
|
55
|
+
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
56
56
|
billing: joi_1.default.boolean().required(),
|
|
57
57
|
delivery: joi_1.default.boolean().required(),
|
|
58
58
|
head_office: joi_1.default.boolean().required(),
|
|
@@ -73,7 +73,7 @@ var findByIdBodyResponseKeys = {
|
|
|
73
73
|
country_id: joi_1.default.string().uuid().required(),
|
|
74
74
|
street: joi_1.default.string().required(),
|
|
75
75
|
locality: joi_1.default.string().required(),
|
|
76
|
-
postal_code: joi_1.default.string().required(),
|
|
76
|
+
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
77
77
|
billing: joi_1.default.boolean().required(),
|
|
78
78
|
delivery: joi_1.default.boolean().required(),
|
|
79
79
|
head_office: joi_1.default.boolean().required(),
|
|
@@ -94,7 +94,7 @@ exports.findOwnerIdBodyResponsekeys = {
|
|
|
94
94
|
country_id: joi_1.default.string().uuid().required(),
|
|
95
95
|
street: joi_1.default.string().required(),
|
|
96
96
|
locality: joi_1.default.string().required(),
|
|
97
|
-
postal_code: joi_1.default.string().required(),
|
|
97
|
+
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
98
98
|
billing: joi_1.default.boolean().required(),
|
|
99
99
|
delivery: joi_1.default.boolean().required(),
|
|
100
100
|
head_office: joi_1.default.boolean().required(),
|
|
@@ -11,7 +11,7 @@ var createBodyKeys = {
|
|
|
11
11
|
nif: joi_1.default.string().allow(null, '').optional(),
|
|
12
12
|
street: joi_1.default.string().allow(null, '').optional(),
|
|
13
13
|
locality: joi_1.default.string().allow(null, '').optional(),
|
|
14
|
-
postal_code: joi_1.default.string().allow(null, '').optional(),
|
|
14
|
+
postal_code: joi_1.default.string().trim(true).lowercase().allow(null, '').optional(),
|
|
15
15
|
country_id: joi_1.default.string().allow(null, '').optional(),
|
|
16
16
|
telephone: joi_1.default.string().allow(null, '').optional(),
|
|
17
17
|
email: joi_1.default
|
|
@@ -33,7 +33,7 @@ var updateBodyKeys = {
|
|
|
33
33
|
nif: joi_1.default.string().allow(null, '').optional(),
|
|
34
34
|
street: joi_1.default.string().allow(null, '').optional(),
|
|
35
35
|
locality: joi_1.default.string().allow(null, '').optional(),
|
|
36
|
-
postal_code: joi_1.default.string().allow(null, '').optional(),
|
|
36
|
+
postal_code: joi_1.default.string().trim(true).lowercase().allow(null, '').optional(),
|
|
37
37
|
country_id: joi_1.default.string().allow(null, '').optional(),
|
|
38
38
|
telephone: joi_1.default.string().allow(null, '').optional(),
|
|
39
39
|
email: joi_1.default
|
|
@@ -14,9 +14,9 @@ var createBodyKeys = {
|
|
|
14
14
|
share_capital: joi_1.default.number().greater(0),
|
|
15
15
|
conservatory: joi_1.default.string(),
|
|
16
16
|
logo: joi_1.default.string(),
|
|
17
|
-
email: joi_1.default.string().required(),
|
|
17
|
+
email: joi_1.default.string().trim(true).lowercase().required(),
|
|
18
18
|
address: joi_1.default.string().required(),
|
|
19
|
-
postal_code: joi_1.default.string().required(),
|
|
19
|
+
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
20
20
|
locality: joi_1.default.string().required(),
|
|
21
21
|
country: joi_1.default.string().required(),
|
|
22
22
|
Timezone: joi_1.default.string(),
|
|
@@ -33,9 +33,9 @@ var updateBodyKeys = {
|
|
|
33
33
|
share_capital: joi_1.default.number().greater(0),
|
|
34
34
|
conservatory: joi_1.default.string(),
|
|
35
35
|
logo: joi_1.default.string(),
|
|
36
|
-
email: joi_1.default.string(),
|
|
36
|
+
email: joi_1.default.string().trim(true).lowercase(),
|
|
37
37
|
address: joi_1.default.string(),
|
|
38
|
-
postal_code: joi_1.default.string(),
|
|
38
|
+
postal_code: joi_1.default.string().trim(true).lowercase(),
|
|
39
39
|
locality: joi_1.default.string(),
|
|
40
40
|
country: joi_1.default.string(),
|
|
41
41
|
Timezone: joi_1.default.string(),
|
|
@@ -10,7 +10,7 @@ var createBodyKeys = {
|
|
|
10
10
|
address: joi_1.default.string().required(),
|
|
11
11
|
county: joi_1.default.string().required(),
|
|
12
12
|
county_code: joi_1.default.number().required(),
|
|
13
|
-
postal_code: joi_1.default.string().required(),
|
|
13
|
+
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
14
14
|
locality: joi_1.default.string().required(),
|
|
15
15
|
parish: joi_1.default.string().required(),
|
|
16
16
|
district: joi_1.default.string().required(),
|
|
@@ -22,7 +22,7 @@ exports.createBody = joi_1.default
|
|
|
22
22
|
.items(joi_1.default.object().keys(createBodyKeys))
|
|
23
23
|
.messages(messages_1.messages);
|
|
24
24
|
var findByPostalCodeBodyKeys = {
|
|
25
|
-
postal_code: joi_1.default.string().required(),
|
|
25
|
+
postal_code: joi_1.default.string().trim(true).lowercase().required(),
|
|
26
26
|
};
|
|
27
27
|
exports.findByPostalCodeBody = joi_1.default
|
|
28
28
|
.object()
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"typescript",
|
|
10
10
|
"helper"
|
|
11
11
|
],
|
|
12
|
-
"version": "0.11.
|
|
12
|
+
"version": "0.11.42",
|
|
13
13
|
"main": "./dist/index.js",
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
15
|
"files": [
|
|
@@ -38,18 +38,18 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/convert-units": "^2.3.9",
|
|
41
|
-
"@types/node": "^18.18.
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
43
|
-
"@typescript-eslint/parser": "^6.
|
|
41
|
+
"@types/node": "^18.18.11",
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^6.12.0",
|
|
43
|
+
"@typescript-eslint/parser": "^6.12.0",
|
|
44
44
|
"concurrently": "^8.2.2",
|
|
45
|
-
"eslint": "^8.
|
|
45
|
+
"eslint": "^8.54.0",
|
|
46
46
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
47
47
|
"eslint-config-prettier": "^9.0.0",
|
|
48
48
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
49
49
|
"eslint-plugin-import": "^2.29.0",
|
|
50
50
|
"eslint-plugin-prettier": "^5.0.1",
|
|
51
51
|
"prettier": "^3.1.0",
|
|
52
|
-
"tsx": "^4.
|
|
53
|
-
"typescript": "^5.
|
|
52
|
+
"tsx": "^4.2.0",
|
|
53
|
+
"typescript": "^5.3.2"
|
|
54
54
|
}
|
|
55
55
|
}
|