@nomalism-com/types 0.34.28 → 0.34.30
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/index.cjs +15 -7
- package/dist/index.js +15 -7
- package/dist/modules/document/order/interfaces.d.ts +1 -3
- package/dist/modules/user/persona/interface.d.ts +15 -0
- package/dist/modules/user/persona/route.schema.d.ts +1 -0
- package/dist/shared/entities/stock.d.ts +2 -0
- package/package-lock.json +239 -236
- package/package.json +1 -1
- package/src/modules/document/order/interfaces.ts +2 -6
- package/src/modules/user/persona/interface.ts +19 -0
- package/src/modules/user/persona/route.schema.ts +21 -15
- package/src/shared/entities/stock.ts +2 -0
package/dist/index.cjs
CHANGED
|
@@ -4508,6 +4508,7 @@ var LowerName73 = UpperName73[0].toLowerCase() + UpperName73.substring(1);
|
|
|
4508
4508
|
var route_schema_exports81 = {};
|
|
4509
4509
|
__export(route_schema_exports81, {
|
|
4510
4510
|
FindByEmailQueryValidate: () => FindByEmailQueryValidate,
|
|
4511
|
+
FindClientOrProviderQueryValidate: () => FindClientOrProviderQueryValidate,
|
|
4511
4512
|
createBody: () => createBody57,
|
|
4512
4513
|
deleteQueryValidate: () => deleteQueryValidate,
|
|
4513
4514
|
findQuery: () => findQuery31,
|
|
@@ -4515,6 +4516,7 @@ __export(route_schema_exports81, {
|
|
|
4515
4516
|
updateBody: () => updateBody51
|
|
4516
4517
|
});
|
|
4517
4518
|
import joi82 from "joi";
|
|
4519
|
+
var emailSchema = joi82.string().trim(true).lowercase().email({ tlds: { allow: false } });
|
|
4518
4520
|
var createBodyKeys56 = {
|
|
4519
4521
|
name: joi82.string().allow(null, "").optional(),
|
|
4520
4522
|
nif: joi82.string().allow(null, "").optional(),
|
|
@@ -4523,7 +4525,7 @@ var createBodyKeys56 = {
|
|
|
4523
4525
|
postal_code: joi82.string().trim(true).lowercase().allow(null, "").optional(),
|
|
4524
4526
|
country_id: joi82.string().uuid().allow(null, "").optional(),
|
|
4525
4527
|
telephone: joi82.string().allow(null, "").optional(),
|
|
4526
|
-
email:
|
|
4528
|
+
email: emailSchema.optional(),
|
|
4527
4529
|
observations: joi82.string().allow(null, "").optional(),
|
|
4528
4530
|
provider_id: joi82.string().uuid().allow(null, ""),
|
|
4529
4531
|
client_id: joi82.string().uuid().allow(null, ""),
|
|
@@ -4542,7 +4544,7 @@ var updateBodyKeys51 = {
|
|
|
4542
4544
|
postal_code: joi82.string().trim(true).lowercase().allow(null, "").optional(),
|
|
4543
4545
|
country_id: joi82.string().uuid().allow(null, "").optional(),
|
|
4544
4546
|
telephone: joi82.string().allow(null, "").optional(),
|
|
4545
|
-
email:
|
|
4547
|
+
email: emailSchema.optional(),
|
|
4546
4548
|
observations: joi82.string().allow(null, "").optional(),
|
|
4547
4549
|
reason_for_exemption_id: joi82.string().uuid().allow(null, "").optional(),
|
|
4548
4550
|
main: joi82.boolean().optional(),
|
|
@@ -4567,9 +4569,17 @@ var deleteQueryKeys = {
|
|
|
4567
4569
|
};
|
|
4568
4570
|
var deleteQueryValidate = joi82.object().keys(deleteQueryKeys).messages(messages);
|
|
4569
4571
|
var findByEmailQueryKeys = {
|
|
4570
|
-
email:
|
|
4572
|
+
email: emailSchema
|
|
4571
4573
|
};
|
|
4572
4574
|
var FindByEmailQueryValidate = joi82.object().keys(findByEmailQueryKeys).messages(messages);
|
|
4575
|
+
var findClientOrProviderQueryKeys = {
|
|
4576
|
+
name: joi82.string().allow("", null).optional(),
|
|
4577
|
+
nif: joi82.string().allow("", null).optional(),
|
|
4578
|
+
email: emailSchema.optional(),
|
|
4579
|
+
telephone: joi82.string().allow("", null).optional(),
|
|
4580
|
+
user_type: joi82.string().valid("client", "provider").optional()
|
|
4581
|
+
};
|
|
4582
|
+
var FindClientOrProviderQueryValidate = joi82.object().keys(findClientOrProviderQueryKeys).messages(messages);
|
|
4573
4583
|
|
|
4574
4584
|
// src/modules/integration/projectInfo/interfaces.ts
|
|
4575
4585
|
var interfaces_exports41 = {};
|
|
@@ -4755,16 +4765,14 @@ var ConferirEncomendaClienteOptionsEnum = {
|
|
|
4755
4765
|
"Encomendar Servi\xE7o": "Encomendar Servi\xE7o",
|
|
4756
4766
|
"Encomendar Servi\xE7o Sem Notifica\xE7\xE3o": "Encomendar Servi\xE7o Sem Notifica\xE7\xE3o",
|
|
4757
4767
|
"Encomendar VA": "Encomendar VA",
|
|
4768
|
+
"Encomendar VA c/ Anexos": "Encomendar VA c/ Anexos",
|
|
4758
4769
|
"Encomendar VA Sem Notifica\xE7\xE3o": "Encomendar VA Sem Notifica\xE7\xE3o",
|
|
4759
4770
|
"Encomendar Stock": "Encomendar Stock",
|
|
4760
4771
|
"Cancelar Encomendar": "Cancelar Encomendar",
|
|
4761
4772
|
"Stock em Loja": "Stock em Loja",
|
|
4762
4773
|
Refaturar: "Refaturar",
|
|
4763
4774
|
"Desligar do Sheets": "Desligar do Sheets",
|
|
4764
|
-
"Fechar Linha": "Fechar Linha"
|
|
4765
|
-
"Encomendar RM": "Encomendar RM",
|
|
4766
|
-
"Encomendar MT": "Encomendar MT",
|
|
4767
|
-
"M - terminado": "M - terminado"
|
|
4775
|
+
"Fechar Linha": "Fechar Linha"
|
|
4768
4776
|
};
|
|
4769
4777
|
var conferirEncomendaClienteOptions = Object.keys(ConferirEncomendaClienteOptionsEnum);
|
|
4770
4778
|
|
package/dist/index.js
CHANGED
|
@@ -4508,6 +4508,7 @@ var LowerName73 = UpperName73[0].toLowerCase() + UpperName73.substring(1);
|
|
|
4508
4508
|
var route_schema_exports81 = {};
|
|
4509
4509
|
__export(route_schema_exports81, {
|
|
4510
4510
|
FindByEmailQueryValidate: () => FindByEmailQueryValidate,
|
|
4511
|
+
FindClientOrProviderQueryValidate: () => FindClientOrProviderQueryValidate,
|
|
4511
4512
|
createBody: () => createBody57,
|
|
4512
4513
|
deleteQueryValidate: () => deleteQueryValidate,
|
|
4513
4514
|
findQuery: () => findQuery31,
|
|
@@ -4515,6 +4516,7 @@ __export(route_schema_exports81, {
|
|
|
4515
4516
|
updateBody: () => updateBody51
|
|
4516
4517
|
});
|
|
4517
4518
|
import joi82 from "joi";
|
|
4519
|
+
var emailSchema = joi82.string().trim(true).lowercase().email({ tlds: { allow: false } });
|
|
4518
4520
|
var createBodyKeys56 = {
|
|
4519
4521
|
name: joi82.string().allow(null, "").optional(),
|
|
4520
4522
|
nif: joi82.string().allow(null, "").optional(),
|
|
@@ -4523,7 +4525,7 @@ var createBodyKeys56 = {
|
|
|
4523
4525
|
postal_code: joi82.string().trim(true).lowercase().allow(null, "").optional(),
|
|
4524
4526
|
country_id: joi82.string().uuid().allow(null, "").optional(),
|
|
4525
4527
|
telephone: joi82.string().allow(null, "").optional(),
|
|
4526
|
-
email:
|
|
4528
|
+
email: emailSchema.optional(),
|
|
4527
4529
|
observations: joi82.string().allow(null, "").optional(),
|
|
4528
4530
|
provider_id: joi82.string().uuid().allow(null, ""),
|
|
4529
4531
|
client_id: joi82.string().uuid().allow(null, ""),
|
|
@@ -4542,7 +4544,7 @@ var updateBodyKeys51 = {
|
|
|
4542
4544
|
postal_code: joi82.string().trim(true).lowercase().allow(null, "").optional(),
|
|
4543
4545
|
country_id: joi82.string().uuid().allow(null, "").optional(),
|
|
4544
4546
|
telephone: joi82.string().allow(null, "").optional(),
|
|
4545
|
-
email:
|
|
4547
|
+
email: emailSchema.optional(),
|
|
4546
4548
|
observations: joi82.string().allow(null, "").optional(),
|
|
4547
4549
|
reason_for_exemption_id: joi82.string().uuid().allow(null, "").optional(),
|
|
4548
4550
|
main: joi82.boolean().optional(),
|
|
@@ -4567,9 +4569,17 @@ var deleteQueryKeys = {
|
|
|
4567
4569
|
};
|
|
4568
4570
|
var deleteQueryValidate = joi82.object().keys(deleteQueryKeys).messages(messages);
|
|
4569
4571
|
var findByEmailQueryKeys = {
|
|
4570
|
-
email:
|
|
4572
|
+
email: emailSchema
|
|
4571
4573
|
};
|
|
4572
4574
|
var FindByEmailQueryValidate = joi82.object().keys(findByEmailQueryKeys).messages(messages);
|
|
4575
|
+
var findClientOrProviderQueryKeys = {
|
|
4576
|
+
name: joi82.string().allow("", null).optional(),
|
|
4577
|
+
nif: joi82.string().allow("", null).optional(),
|
|
4578
|
+
email: emailSchema.optional(),
|
|
4579
|
+
telephone: joi82.string().allow("", null).optional(),
|
|
4580
|
+
user_type: joi82.string().valid("client", "provider").optional()
|
|
4581
|
+
};
|
|
4582
|
+
var FindClientOrProviderQueryValidate = joi82.object().keys(findClientOrProviderQueryKeys).messages(messages);
|
|
4573
4583
|
|
|
4574
4584
|
// src/modules/integration/projectInfo/interfaces.ts
|
|
4575
4585
|
var interfaces_exports41 = {};
|
|
@@ -4755,16 +4765,14 @@ var ConferirEncomendaClienteOptionsEnum = {
|
|
|
4755
4765
|
"Encomendar Servi\xE7o": "Encomendar Servi\xE7o",
|
|
4756
4766
|
"Encomendar Servi\xE7o Sem Notifica\xE7\xE3o": "Encomendar Servi\xE7o Sem Notifica\xE7\xE3o",
|
|
4757
4767
|
"Encomendar VA": "Encomendar VA",
|
|
4768
|
+
"Encomendar VA c/ Anexos": "Encomendar VA c/ Anexos",
|
|
4758
4769
|
"Encomendar VA Sem Notifica\xE7\xE3o": "Encomendar VA Sem Notifica\xE7\xE3o",
|
|
4759
4770
|
"Encomendar Stock": "Encomendar Stock",
|
|
4760
4771
|
"Cancelar Encomendar": "Cancelar Encomendar",
|
|
4761
4772
|
"Stock em Loja": "Stock em Loja",
|
|
4762
4773
|
Refaturar: "Refaturar",
|
|
4763
4774
|
"Desligar do Sheets": "Desligar do Sheets",
|
|
4764
|
-
"Fechar Linha": "Fechar Linha"
|
|
4765
|
-
"Encomendar RM": "Encomendar RM",
|
|
4766
|
-
"Encomendar MT": "Encomendar MT",
|
|
4767
|
-
"M - terminado": "M - terminado"
|
|
4775
|
+
"Fechar Linha": "Fechar Linha"
|
|
4768
4776
|
};
|
|
4769
4777
|
var conferirEncomendaClienteOptions = Object.keys(ConferirEncomendaClienteOptionsEnum);
|
|
4770
4778
|
|
|
@@ -31,6 +31,7 @@ export declare const ConferirEncomendaClienteOptionsEnum: {
|
|
|
31
31
|
'Encomendar Serviço': 'Encomendar Serviço';
|
|
32
32
|
'Encomendar Serviço Sem Notificação': 'Encomendar Serviço Sem Notificação';
|
|
33
33
|
'Encomendar VA': 'Encomendar VA';
|
|
34
|
+
'Encomendar VA c/ Anexos': 'Encomendar VA c/ Anexos';
|
|
34
35
|
'Encomendar VA Sem Notificação': 'Encomendar VA Sem Notificação';
|
|
35
36
|
'Encomendar Stock': 'Encomendar Stock';
|
|
36
37
|
'Cancelar Encomendar': 'Cancelar Encomendar';
|
|
@@ -38,9 +39,6 @@ export declare const ConferirEncomendaClienteOptionsEnum: {
|
|
|
38
39
|
Refaturar: 'Refaturar';
|
|
39
40
|
'Desligar do Sheets': 'Desligar do Sheets';
|
|
40
41
|
'Fechar Linha': 'Fechar Linha';
|
|
41
|
-
'Encomendar RM': 'Encomendar RM';
|
|
42
|
-
'Encomendar MT': 'Encomendar MT';
|
|
43
|
-
'M - terminado': 'M - terminado';
|
|
44
42
|
};
|
|
45
43
|
export type IConferirEncomendaClienteOptions = (typeof ConferirEncomendaClienteOptionsEnum)[keyof typeof ConferirEncomendaClienteOptionsEnum];
|
|
46
44
|
export declare const conferirEncomendaClienteOptions: string[];
|
|
@@ -99,6 +99,20 @@ export interface IFindByEmailResponse {
|
|
|
99
99
|
chat_type: IChatType;
|
|
100
100
|
} | null;
|
|
101
101
|
}
|
|
102
|
+
export interface IFindClientOrProviderRequest {
|
|
103
|
+
nif?: string | null;
|
|
104
|
+
name?: string | null;
|
|
105
|
+
email?: string | null;
|
|
106
|
+
telephone?: string | null;
|
|
107
|
+
user_type: 'client' | 'provider';
|
|
108
|
+
}
|
|
109
|
+
export interface IFindClientOrProviderResponse {
|
|
110
|
+
nif: string | null;
|
|
111
|
+
name: string | null;
|
|
112
|
+
email: string | null;
|
|
113
|
+
telephone: string | null;
|
|
114
|
+
user_type: 'client' | 'provider';
|
|
115
|
+
}
|
|
102
116
|
export interface IRepository {
|
|
103
117
|
findById(selector: IShared.IFindByIdRequest): Promise<IEntityExtended | null>;
|
|
104
118
|
findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IFindByOwnerIdResponse[]>;
|
|
@@ -109,5 +123,6 @@ export interface IRepository {
|
|
|
109
123
|
findByBasic(data: IBasicSearchRequest): Promise<IShared.IPaginationResponse<IBasicSearchResponse>>;
|
|
110
124
|
find(data: IFindRequest): Promise<IFindResponse[]>;
|
|
111
125
|
findByEmail(data: IFindByEmailRequest): Promise<IFindByEmailResponse[]>;
|
|
126
|
+
findClientOrProvider(data: IFindClientOrProviderRequest): Promise<IFindClientOrProviderResponse[]>;
|
|
112
127
|
}
|
|
113
128
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -5,3 +5,4 @@ export declare const findQuery: joi.ObjectSchema<any>;
|
|
|
5
5
|
export declare const getBasicSearchParamsValidate: joi.ObjectSchema<any>;
|
|
6
6
|
export declare const deleteQueryValidate: joi.ObjectSchema<any>;
|
|
7
7
|
export declare const FindByEmailQueryValidate: joi.ObjectSchema<any>;
|
|
8
|
+
export declare const FindClientOrProviderQueryValidate: joi.ObjectSchema<any>;
|
|
@@ -348,6 +348,8 @@ export type DocumentLine = {
|
|
|
348
348
|
cancelled: boolean;
|
|
349
349
|
original_product_id: string | null;
|
|
350
350
|
imported_from_sheets: IImportedFromSheets | null;
|
|
351
|
+
reinvoicing: boolean;
|
|
352
|
+
force_closed: boolean;
|
|
351
353
|
quantity: number;
|
|
352
354
|
preco_custo: number;
|
|
353
355
|
provider_discount: number;
|