@nomalism-com/types 0.15.2 → 0.15.3
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/user/clients/interface.d.ts +2 -4
- package/dist/modules/user/clients/route.schema.js +1 -1
- package/dist/modules/user/commissioner/interface.d.ts +2 -1
- package/dist/modules/user/commissioner/route.schema.js +10 -1
- package/dist/modules/user/providers/interface.d.ts +2 -1
- package/dist/modules/user/providers/route.schema.js +10 -1
- package/package.json +1 -1
- package/dist/modules/user/clients/tests.d.ts +0 -0
- package/dist/modules/user/clients/tests.js +0 -1
- package/dist/modules/user/commissioner/tests.d.ts +0 -0
- package/dist/modules/user/commissioner/tests.js +0 -1
- package/dist/modules/user/providers/tests.d.ts +0 -0
- package/dist/modules/user/providers/tests.js +0 -1
|
@@ -33,9 +33,7 @@ export interface IFindPaginatedRequest extends IFindRequest, IShared.IPagination
|
|
|
33
33
|
}
|
|
34
34
|
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, ''>>;
|
|
35
35
|
export type ICreateUser = Pick<Users, 'email' | 'name'>;
|
|
36
|
-
export type ICreateMainPersona = Pick<Persona, 'nif' | 'name' | 'email' | 'telephone'
|
|
37
|
-
name?: string;
|
|
38
|
-
};
|
|
36
|
+
export type ICreateMainPersona = Pick<Persona, 'nif' | 'name' | 'email' | 'telephone'>;
|
|
39
37
|
export interface ICreateRequest {
|
|
40
38
|
user_id?: string;
|
|
41
39
|
user?: ICreateUser;
|
|
@@ -63,7 +61,7 @@ export interface IUpdateRequest {
|
|
|
63
61
|
inactive?: boolean;
|
|
64
62
|
segments_area_id?: string | null;
|
|
65
63
|
exemption_reason_id?: string | null;
|
|
66
|
-
|
|
64
|
+
main_persona_id?: string | null;
|
|
67
65
|
default_discount?: number;
|
|
68
66
|
default_payment_method_id?: string | null;
|
|
69
67
|
default_maturity_date_id?: string | null;
|
|
@@ -48,7 +48,7 @@ var createBodyKeys = {
|
|
|
48
48
|
};
|
|
49
49
|
exports.createBody = joi_1.default.object().keys(createBodyKeys).messages(messages_1.messages);
|
|
50
50
|
var updateBodyKeys = {
|
|
51
|
-
|
|
51
|
+
main_persona_id: joi_1.default.string().optional().allow(null),
|
|
52
52
|
nif: joi_1.default.string().allow(null).optional(),
|
|
53
53
|
country_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
54
54
|
language_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
@@ -23,11 +23,12 @@ export type IFindResponse = Omit<IFindDetailedResponse, ''>;
|
|
|
23
23
|
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
24
24
|
}
|
|
25
25
|
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, ''>>;
|
|
26
|
+
export type ICreateMainPersona = Pick<Persona, 'nif' | 'name' | 'email' | 'telephone'>;
|
|
26
27
|
export interface ICreateRequest {
|
|
27
28
|
user_id: string;
|
|
28
29
|
nif: string;
|
|
29
30
|
default_percentage?: number;
|
|
30
|
-
|
|
31
|
+
main_persona: ICreateMainPersona;
|
|
31
32
|
country_id?: string | null;
|
|
32
33
|
language_id?: string | null;
|
|
33
34
|
default_payment_method_id?: string | null;
|
|
@@ -6,11 +6,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.findWithPaginationQuery = exports.findQuery = exports.updateBody = exports.createBody = void 0;
|
|
7
7
|
var joi_1 = __importDefault(require("joi"));
|
|
8
8
|
var messages_1 = require("../../../shared/messages");
|
|
9
|
+
var createMainPersonaKeys = {
|
|
10
|
+
name: joi_1.default.string().optional(),
|
|
11
|
+
nif: joi_1.default.string().allow(null).optional(),
|
|
12
|
+
email: joi_1.default
|
|
13
|
+
.string()
|
|
14
|
+
.email({ tlds: { allow: false } })
|
|
15
|
+
.optional(),
|
|
16
|
+
telephone: joi_1.default.string().optional(),
|
|
17
|
+
};
|
|
9
18
|
var createBodyKeys = {
|
|
10
19
|
user_id: joi_1.default.string().uuid().required(),
|
|
11
20
|
nif: joi_1.default.string().required(),
|
|
12
21
|
default_percentage: joi_1.default.number().positive().allow(0).default(0).optional(),
|
|
13
|
-
|
|
22
|
+
main_persona: joi_1.default.object().keys(createMainPersonaKeys).required(),
|
|
14
23
|
country_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
15
24
|
language_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
16
25
|
default_payment_method_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
@@ -31,6 +31,7 @@ export type IFindResponse = Omit<IFindDetailedResponse, ''>;
|
|
|
31
31
|
export type IFindPaginatedRequest = IShared.IPaginationRequest;
|
|
32
32
|
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, ''>>;
|
|
33
33
|
export type ICreateUser = Pick<Users, 'email' | 'name'>;
|
|
34
|
+
export type ICreateMainPersona = Pick<Persona, 'nif' | 'name' | 'email' | 'telephone'>;
|
|
34
35
|
export interface ICreateRequest {
|
|
35
36
|
user_id?: string;
|
|
36
37
|
user?: ICreateUser;
|
|
@@ -39,7 +40,7 @@ export interface ICreateRequest {
|
|
|
39
40
|
nif: string;
|
|
40
41
|
default_discount?: number;
|
|
41
42
|
exemption_reason_id?: string | null;
|
|
42
|
-
|
|
43
|
+
main_persona: ICreateMainPersona;
|
|
43
44
|
provider_type_id?: string | null;
|
|
44
45
|
country_id?: string | null;
|
|
45
46
|
language_id?: string | null;
|
|
@@ -14,6 +14,15 @@ var createUserKeys = {
|
|
|
14
14
|
.allow(null)
|
|
15
15
|
.optional(),
|
|
16
16
|
};
|
|
17
|
+
var createMainPersonaKeys = {
|
|
18
|
+
name: joi_1.default.string().optional(),
|
|
19
|
+
nif: joi_1.default.string().allow(null).optional(),
|
|
20
|
+
email: joi_1.default
|
|
21
|
+
.string()
|
|
22
|
+
.email({ tlds: { allow: false } })
|
|
23
|
+
.optional(),
|
|
24
|
+
telephone: joi_1.default.string().optional(),
|
|
25
|
+
};
|
|
17
26
|
var createBodyKeys = {
|
|
18
27
|
user_id: joi_1.default.string().uuid().optional(),
|
|
19
28
|
user: joi_1.default.object().keys(createUserKeys).optional(),
|
|
@@ -28,7 +37,7 @@ var createBodyKeys = {
|
|
|
28
37
|
.max(99)
|
|
29
38
|
.optional(),
|
|
30
39
|
exemption_reason_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
31
|
-
|
|
40
|
+
main_persona: joi_1.default.object().keys(createMainPersonaKeys).required(),
|
|
32
41
|
provider_type_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
33
42
|
country_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
34
43
|
language_id: joi_1.default.string().uuid().allow(null).optional(),
|
package/package.json
CHANGED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|