@nomalism-com/types 0.15.1 → 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 +5 -5
- package/dist/modules/user/clients/route.schema.js +1 -1
- package/dist/modules/user/commissioner/interface.d.ts +5 -2
- package/dist/modules/user/commissioner/route.schema.js +10 -1
- package/dist/modules/user/providers/interface.d.ts +5 -2
- package/dist/modules/user/providers/route.schema.js +10 -1
- package/dist/modules/user/users/interface.d.ts +9 -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
|
@@ -6,7 +6,9 @@ export declare const UpperName = "Clients";
|
|
|
6
6
|
export declare const LowerName: string;
|
|
7
7
|
interface IFindDetailedResponse extends Entity {
|
|
8
8
|
user: Users;
|
|
9
|
-
main_persona: Persona
|
|
9
|
+
main_persona: Persona & {
|
|
10
|
+
country: Country | null;
|
|
11
|
+
};
|
|
10
12
|
exemption_reason: ReasonForExemption | null;
|
|
11
13
|
client_type: ClientType | null;
|
|
12
14
|
segments_area: SegmentsArea | null;
|
|
@@ -31,9 +33,7 @@ export interface IFindPaginatedRequest extends IFindRequest, IShared.IPagination
|
|
|
31
33
|
}
|
|
32
34
|
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, ''>>;
|
|
33
35
|
export type ICreateUser = Pick<Users, 'email' | 'name'>;
|
|
34
|
-
export type ICreateMainPersona = Pick<Persona, 'nif' | 'name' | 'email' | 'telephone'
|
|
35
|
-
name?: string;
|
|
36
|
-
};
|
|
36
|
+
export type ICreateMainPersona = Pick<Persona, 'nif' | 'name' | 'email' | 'telephone'>;
|
|
37
37
|
export interface ICreateRequest {
|
|
38
38
|
user_id?: string;
|
|
39
39
|
user?: ICreateUser;
|
|
@@ -61,7 +61,7 @@ export interface IUpdateRequest {
|
|
|
61
61
|
inactive?: boolean;
|
|
62
62
|
segments_area_id?: string | null;
|
|
63
63
|
exemption_reason_id?: string | null;
|
|
64
|
-
|
|
64
|
+
main_persona_id?: string | null;
|
|
65
65
|
default_discount?: number;
|
|
66
66
|
default_payment_method_id?: string | null;
|
|
67
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(),
|
|
@@ -6,7 +6,9 @@ export declare const UpperName = "Commissioner";
|
|
|
6
6
|
export declare const LowerName: string;
|
|
7
7
|
interface IFindDetailedResponse extends Entity {
|
|
8
8
|
user: Users;
|
|
9
|
-
main_persona: Persona
|
|
9
|
+
main_persona: Persona & {
|
|
10
|
+
country: Country | null;
|
|
11
|
+
};
|
|
10
12
|
country: Country | null;
|
|
11
13
|
language: Language | null;
|
|
12
14
|
default_payment_method: PaymentMethods | null;
|
|
@@ -21,11 +23,12 @@ export type IFindResponse = Omit<IFindDetailedResponse, ''>;
|
|
|
21
23
|
export interface IFindPaginatedRequest extends IFindRequest, IShared.IPaginationRequest {
|
|
22
24
|
}
|
|
23
25
|
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, ''>>;
|
|
26
|
+
export type ICreateMainPersona = Pick<Persona, 'nif' | 'name' | 'email' | 'telephone'>;
|
|
24
27
|
export interface ICreateRequest {
|
|
25
28
|
user_id: string;
|
|
26
29
|
nif: string;
|
|
27
30
|
default_percentage?: number;
|
|
28
|
-
|
|
31
|
+
main_persona: ICreateMainPersona;
|
|
29
32
|
country_id?: string | null;
|
|
30
33
|
language_id?: string | null;
|
|
31
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(),
|
|
@@ -6,7 +6,9 @@ export declare const UpperName = "Providers";
|
|
|
6
6
|
export declare const LowerName: string;
|
|
7
7
|
interface IFindDetailedResponse extends Entity {
|
|
8
8
|
user: Users;
|
|
9
|
-
main_persona: Persona
|
|
9
|
+
main_persona: Persona & {
|
|
10
|
+
country: Country | null;
|
|
11
|
+
};
|
|
10
12
|
exemption_reason: ReasonForExemption | null;
|
|
11
13
|
country: Country | null;
|
|
12
14
|
language: Language | null;
|
|
@@ -29,6 +31,7 @@ export type IFindResponse = Omit<IFindDetailedResponse, ''>;
|
|
|
29
31
|
export type IFindPaginatedRequest = IShared.IPaginationRequest;
|
|
30
32
|
export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, ''>>;
|
|
31
33
|
export type ICreateUser = Pick<Users, 'email' | 'name'>;
|
|
34
|
+
export type ICreateMainPersona = Pick<Persona, 'nif' | 'name' | 'email' | 'telephone'>;
|
|
32
35
|
export interface ICreateRequest {
|
|
33
36
|
user_id?: string;
|
|
34
37
|
user?: ICreateUser;
|
|
@@ -37,7 +40,7 @@ export interface ICreateRequest {
|
|
|
37
40
|
nif: string;
|
|
38
41
|
default_discount?: number;
|
|
39
42
|
exemption_reason_id?: string | null;
|
|
40
|
-
|
|
43
|
+
main_persona: ICreateMainPersona;
|
|
41
44
|
provider_type_id?: string | null;
|
|
42
45
|
country_id?: string | null;
|
|
43
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(),
|
|
@@ -24,7 +24,9 @@ export interface IFindByIdResponse extends IFindDetailedResponse {
|
|
|
24
24
|
default_maturity_date: MaturityDates | null;
|
|
25
25
|
default_delivery_method: DeliveryMethods | null;
|
|
26
26
|
default_vehicle: Vehicles | null;
|
|
27
|
-
main_persona: Persona
|
|
27
|
+
main_persona: Persona & {
|
|
28
|
+
country: Country | null;
|
|
29
|
+
};
|
|
28
30
|
}) | null;
|
|
29
31
|
client: (Clients & {
|
|
30
32
|
country: Country | null;
|
|
@@ -36,7 +38,9 @@ export interface IFindByIdResponse extends IFindDetailedResponse {
|
|
|
36
38
|
default_maturity_date: MaturityDates | null;
|
|
37
39
|
default_delivery_method: DeliveryMethods | null;
|
|
38
40
|
default_vehicle: Vehicles | null;
|
|
39
|
-
main_persona: Persona
|
|
41
|
+
main_persona: Persona & {
|
|
42
|
+
country: Country | null;
|
|
43
|
+
};
|
|
40
44
|
}) | null;
|
|
41
45
|
store_operator: (StoreOperator & {
|
|
42
46
|
user_position: UserPositions | null;
|
|
@@ -49,7 +53,9 @@ export interface IFindByIdResponse extends IFindDetailedResponse {
|
|
|
49
53
|
default_maturity_date: MaturityDates | null;
|
|
50
54
|
default_delivery_method: DeliveryMethods | null;
|
|
51
55
|
default_vehicle: Vehicles | null;
|
|
52
|
-
main_persona: Persona
|
|
56
|
+
main_persona: Persona & {
|
|
57
|
+
country: Country | null;
|
|
58
|
+
};
|
|
53
59
|
}) | null;
|
|
54
60
|
}
|
|
55
61
|
export type IFindRequest = Record<string, unknown>;
|
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";
|