@nomalism-com/types 0.15.2 → 0.15.4
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 +3 -2
- package/dist/modules/user/commissioner/route.schema.js +11 -2
- package/dist/modules/user/providers/interface.d.ts +3 -2
- package/dist/modules/user/providers/route.schema.js +11 -2
- package/dist/shared/entities/user.d.ts +3 -3
- 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;
|
|
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(),
|
|
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;
|
|
@@ -38,7 +39,7 @@ export interface ICreateRequest {
|
|
|
38
39
|
export interface IUpdateRequest {
|
|
39
40
|
nif?: string;
|
|
40
41
|
default_percentage?: number;
|
|
41
|
-
main_persona_id?: string
|
|
42
|
+
main_persona_id?: string;
|
|
42
43
|
country_id?: string | null;
|
|
43
44
|
language_id?: string | null;
|
|
44
45
|
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(),
|
|
@@ -22,7 +31,7 @@ exports.createBody = joi_1.default.object().keys(createBodyKeys).messages(messag
|
|
|
22
31
|
var updateBodyKeys = {
|
|
23
32
|
nif: joi_1.default.string().optional(),
|
|
24
33
|
default_percentage: joi_1.default.number().positive().allow(0).optional(),
|
|
25
|
-
main_persona_id: joi_1.default.string().uuid().
|
|
34
|
+
main_persona_id: joi_1.default.string().uuid().optional(),
|
|
26
35
|
country_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
27
36
|
language_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
28
37
|
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;
|
|
@@ -55,7 +56,7 @@ export interface IUpdateRequest {
|
|
|
55
56
|
nif?: string;
|
|
56
57
|
default_discount?: number;
|
|
57
58
|
exemption_reason_id?: string | null;
|
|
58
|
-
main_persona_id?: string
|
|
59
|
+
main_persona_id?: string;
|
|
59
60
|
country_id?: string;
|
|
60
61
|
language_id?: string;
|
|
61
62
|
support_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(),
|
|
@@ -49,7 +58,7 @@ var updateBodyKeys = {
|
|
|
49
58
|
country_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
50
59
|
language_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
51
60
|
support_language_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
52
|
-
main_persona_id: joi_1.default.string().uuid().
|
|
61
|
+
main_persona_id: joi_1.default.string().uuid().optional(),
|
|
53
62
|
default_payment_method_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
54
63
|
default_maturity_date_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
55
64
|
default_delivery_method_id: joi_1.default.string().uuid().allow(null).optional(),
|
|
@@ -73,7 +73,7 @@ export type UserPermissions = {
|
|
|
73
73
|
export type Providers = {
|
|
74
74
|
id: string;
|
|
75
75
|
user_id: string;
|
|
76
|
-
main_persona_id: string
|
|
76
|
+
main_persona_id: string;
|
|
77
77
|
number: number;
|
|
78
78
|
nif: string | null;
|
|
79
79
|
country_id: string | null;
|
|
@@ -127,7 +127,7 @@ export type Language = {
|
|
|
127
127
|
export type Clients = {
|
|
128
128
|
id: string;
|
|
129
129
|
user_id: string;
|
|
130
|
-
main_persona_id: string
|
|
130
|
+
main_persona_id: string;
|
|
131
131
|
number: number;
|
|
132
132
|
nif: string | null;
|
|
133
133
|
country_id: string | null;
|
|
@@ -220,7 +220,7 @@ export type SocialMedia = {
|
|
|
220
220
|
export type Commissioner = {
|
|
221
221
|
id: string;
|
|
222
222
|
user_id: string;
|
|
223
|
-
main_persona_id: string
|
|
223
|
+
main_persona_id: string;
|
|
224
224
|
number: number;
|
|
225
225
|
nif: string | null;
|
|
226
226
|
country_id: string | null;
|
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";
|