@nomalism-com/types 0.46.9 → 0.46.12
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 +83 -68
- package/dist/index.js +83 -68
- package/dist/main.d.ts +2 -1
- package/dist/modules/stock/smsSender/interfaces.d.ts +42 -0
- package/dist/modules/ui/portal/interface.d.ts +5 -1
- package/dist/modules/ui/portal/route.schema.d.ts +1 -0
- package/dist/modules/user/chatSubscribers/interfaces.d.ts +10 -1
- package/dist/modules/user/chatSubscribers/route.schema.d.ts +1 -0
- package/dist/modules/user/timeSheet/interfaces.d.ts +32 -75
- package/dist/modules/user/timeSheet/route.schema.d.ts +3 -0
- package/dist/shared/entities/stock.d.ts +17 -0
- package/dist/shared/entities/user.d.ts +7 -29
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -204,6 +204,7 @@ __export(main_exports, {
|
|
|
204
204
|
SideMenuRoutes: () => route_schema_exports100,
|
|
205
205
|
SidemenuHighlight: () => interface_exports56,
|
|
206
206
|
SidemenuHighlightRoutes: () => route_schema_exports101,
|
|
207
|
+
SmsSender: () => interfaces_exports63,
|
|
207
208
|
StartDocumentHeaderLastUpdate: () => interface_exports42,
|
|
208
209
|
StockMovement: () => interface_exports36,
|
|
209
210
|
StockMovementRoutes: () => route_schema_exports57,
|
|
@@ -5454,6 +5455,7 @@ var Route113 = "chat_subscriber";
|
|
|
5454
5455
|
var route_schema_exports105 = {};
|
|
5455
5456
|
__export(route_schema_exports105, {
|
|
5456
5457
|
createOrUpdateBody: () => createOrUpdateBody2,
|
|
5458
|
+
emailTokenParam: () => emailTokenParam,
|
|
5457
5459
|
findDocumentHeaderSubscribersByLanguageQuery: () => findDocumentHeaderSubscribersByLanguageQuery,
|
|
5458
5460
|
findDocumentHeaderSubscribersQuery: () => findDocumentHeaderSubscribersQuery,
|
|
5459
5461
|
findSubscribedDocumentHeadersQuery: () => findSubscribedDocumentHeadersQuery
|
|
@@ -5477,6 +5479,9 @@ var findSubscribedDocumentHeadersQueryKeys = {
|
|
|
5477
5479
|
owner_id: joi106.string().uuid().required()
|
|
5478
5480
|
};
|
|
5479
5481
|
var findSubscribedDocumentHeadersQuery = joi106.object().keys(findSubscribedDocumentHeadersQueryKeys).messages(messages);
|
|
5482
|
+
var emailTokenParam = joi106.object().keys({
|
|
5483
|
+
token: joi106.string().pattern(/^[a-f0-9]{64}$/).required()
|
|
5484
|
+
}).messages(messages);
|
|
5480
5485
|
|
|
5481
5486
|
// src/modules/stock/tag/interface.ts
|
|
5482
5487
|
var interface_exports59 = {};
|
|
@@ -5682,9 +5687,15 @@ var IPublicDocumentHeaderNoteType = /* @__PURE__ */ ((IPublicDocumentHeaderNoteT
|
|
|
5682
5687
|
var route_schema_exports111 = {};
|
|
5683
5688
|
__export(route_schema_exports111, {
|
|
5684
5689
|
createNoteBody: () => createNoteBody,
|
|
5690
|
+
publicFindBySubscriberQuery: () => publicFindBySubscriberQuery,
|
|
5685
5691
|
updateNoteBody: () => updateNoteBody
|
|
5686
5692
|
});
|
|
5687
5693
|
import joi112 from "joi";
|
|
5694
|
+
var publicFindBySubscriberQueryKeys = {
|
|
5695
|
+
id: joi112.alternatives().try(joi112.string().uuid(), joi112.string().pattern(/^[a-f0-9]{64}$/)).required(),
|
|
5696
|
+
document_header_id: joi112.string().uuid().optional()
|
|
5697
|
+
};
|
|
5698
|
+
var publicFindBySubscriberQuery = joi112.object().keys(publicFindBySubscriberQueryKeys).messages(messages);
|
|
5688
5699
|
var createNoteBodyKeys = {
|
|
5689
5700
|
document_header_id: joi112.string().uuid().required(),
|
|
5690
5701
|
note: joi112.string().required(),
|
|
@@ -5855,101 +5866,89 @@ var printLocationsQuery = joi118.object({
|
|
|
5855
5866
|
// src/modules/user/timeSheet/interfaces.ts
|
|
5856
5867
|
var interfaces_exports61 = {};
|
|
5857
5868
|
__export(interfaces_exports61, {
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
IRegistryTypeEnum: () => IRegistryTypeEnum,
|
|
5861
|
-
ITimesheetStateEnum: () => ITimesheetStateEnum,
|
|
5869
|
+
ITimeSheetRecordTypeEnum: () => ITimeSheetRecordTypeEnum,
|
|
5870
|
+
ITimeSheetRegistryTypeEnum: () => ITimeSheetRegistryTypeEnum,
|
|
5862
5871
|
Route: () => Route131,
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
registryTypes: () => registryTypes,
|
|
5866
|
-
timesheetStates: () => timesheetStates
|
|
5872
|
+
timeSheetRecordTypes: () => timeSheetRecordTypes,
|
|
5873
|
+
timeSheetRegistryTypes: () => timeSheetRegistryTypes
|
|
5867
5874
|
});
|
|
5868
5875
|
var Route131 = "time_sheet";
|
|
5869
|
-
var
|
|
5876
|
+
var ITimeSheetRecordTypeEnum = {
|
|
5870
5877
|
ENTRY: "ENTRY",
|
|
5871
|
-
EXIT: "EXIT"
|
|
5872
|
-
};
|
|
5873
|
-
var clockTypes = Object.keys(IClockTypeEnum);
|
|
5874
|
-
var IAdjustmentTypeEnum = {
|
|
5878
|
+
EXIT: "EXIT",
|
|
5875
5879
|
CREDIT: "CREDIT",
|
|
5876
5880
|
DEBIT: "DEBIT"
|
|
5877
5881
|
};
|
|
5878
|
-
var
|
|
5879
|
-
var
|
|
5882
|
+
var timeSheetRecordTypes = Object.values(ITimeSheetRecordTypeEnum);
|
|
5883
|
+
var ITimeSheetRegistryTypeEnum = {
|
|
5880
5884
|
AUTOMATIC: "AUTOMATIC",
|
|
5881
5885
|
MANUAL: "MANUAL"
|
|
5882
5886
|
};
|
|
5883
|
-
var
|
|
5884
|
-
var ITimesheetStateEnum = {
|
|
5885
|
-
CONFIRMED: "CONFIRMED",
|
|
5886
|
-
PENDING: "PENDING",
|
|
5887
|
-
ERROR: "ERROR"
|
|
5888
|
-
};
|
|
5889
|
-
var timesheetStates = Object.keys(ITimesheetStateEnum);
|
|
5887
|
+
var timeSheetRegistryTypes = Object.values(ITimeSheetRegistryTypeEnum);
|
|
5890
5888
|
|
|
5891
5889
|
// src/modules/user/timeSheet/route.schema.ts
|
|
5892
5890
|
var route_schema_exports118 = {};
|
|
5893
5891
|
__export(route_schema_exports118, {
|
|
5894
5892
|
createBody: () => createBody65,
|
|
5893
|
+
dailySummaryQuery: () => dailySummaryQuery,
|
|
5894
|
+
findByDateQuery: () => findByDateQuery,
|
|
5895
|
+
findQuery: () => findQuery34,
|
|
5895
5896
|
updateBody: () => updateBody56
|
|
5896
5897
|
});
|
|
5897
5898
|
import joi119 from "joi";
|
|
5898
|
-
var clockSchema = joi119.object({
|
|
5899
|
-
id: joi119.string().uuid(),
|
|
5900
|
-
time: joi119.date().required(),
|
|
5901
|
-
type: joi119.string().valid(...Object.values(IClockTypeEnum)).required(),
|
|
5902
|
-
registry_type: joi119.string().valid(...Object.values(IRegistryTypeEnum)).required(),
|
|
5903
|
-
note: joi119.string().allow("", null).optional(),
|
|
5904
|
-
created_by: joi119.string().uuid().required(),
|
|
5905
|
-
updated_by: joi119.string().uuid().required()
|
|
5906
|
-
});
|
|
5907
|
-
var adjustmentSchema = joi119.object({
|
|
5908
|
-
id: joi119.string().uuid(),
|
|
5909
|
-
type: joi119.string().valid(...Object.values(IAdjustmentTypeEnum)).required(),
|
|
5910
|
-
minutes: joi119.number().integer().min(1).required(),
|
|
5911
|
-
// Mínimo 1 minuto de ajuste
|
|
5912
|
-
note: joi119.string().allow("", null).optional(),
|
|
5913
|
-
created_by: joi119.string().uuid().required(),
|
|
5914
|
-
updated_by: joi119.string().uuid().required()
|
|
5915
|
-
});
|
|
5916
5899
|
var createBodyKeys64 = {
|
|
5917
|
-
date: joi119.date().required(),
|
|
5918
5900
|
user_id: joi119.string().uuid().required(),
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
clock: joi119.object({
|
|
5925
|
-
time: joi119.date(),
|
|
5926
|
-
type: joi119.string().valid(...Object.values(IClockTypeEnum)).required(),
|
|
5927
|
-
registry_type: joi119.string().valid(...Object.values(IRegistryTypeEnum)).required(),
|
|
5928
|
-
note: joi119.string().allow("", null).optional(),
|
|
5929
|
-
created_by: joi119.string().uuid().required(),
|
|
5930
|
-
updated_by: joi119.string().uuid().required()
|
|
5901
|
+
type: joi119.string().valid("ENTRY", "EXIT", "CREDIT", "DEBIT").required(),
|
|
5902
|
+
time: joi119.when("type", {
|
|
5903
|
+
is: joi119.string().valid("ENTRY", "EXIT"),
|
|
5904
|
+
then: joi119.date().required(),
|
|
5905
|
+
otherwise: joi119.date().optional().allow(null)
|
|
5931
5906
|
}),
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5907
|
+
minutes: joi119.when("type", {
|
|
5908
|
+
is: joi119.string().valid("CREDIT", "DEBIT"),
|
|
5909
|
+
then: joi119.number().integer().min(1).required(),
|
|
5910
|
+
otherwise: joi119.number().optional().allow(null)
|
|
5911
|
+
}),
|
|
5912
|
+
registry_type: joi119.string().valid("AUTOMATIC", "MANUAL").default("MANUAL").optional(),
|
|
5913
|
+
note: joi119.string().allow("", null).optional(),
|
|
5914
|
+
created_by: joi119.string().uuid().required(),
|
|
5915
|
+
updated_by: joi119.string().uuid().required()
|
|
5940
5916
|
};
|
|
5941
5917
|
var createBody65 = joi119.object().keys(createBodyKeys64).messages(messages);
|
|
5942
5918
|
var updateBodyKeys54 = {
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5919
|
+
type: joi119.string().valid("ENTRY", "EXIT", "CREDIT", "DEBIT").optional(),
|
|
5920
|
+
time: joi119.when("type", {
|
|
5921
|
+
is: joi119.string().valid("ENTRY", "EXIT"),
|
|
5922
|
+
then: joi119.date().optional(),
|
|
5923
|
+
otherwise: joi119.date().optional().allow(null)
|
|
5924
|
+
}),
|
|
5925
|
+
minutes: joi119.when("type", {
|
|
5926
|
+
is: joi119.string().valid("CREDIT", "DEBIT"),
|
|
5927
|
+
then: joi119.number().integer().min(1).optional(),
|
|
5928
|
+
otherwise: joi119.number().optional().allow(null)
|
|
5929
|
+
}),
|
|
5930
|
+
note: joi119.string().allow("", null).optional(),
|
|
5947
5931
|
updated_by: joi119.string().uuid().required(),
|
|
5948
|
-
|
|
5949
|
-
// 🔥 NOVO: Validador do array de acertos extraordinários enviados via PUT
|
|
5950
|
-
adjustments: joi119.array().items(adjustmentSchema)
|
|
5932
|
+
updated_at: joi119.date().optional()
|
|
5951
5933
|
};
|
|
5952
5934
|
var updateBody56 = joi119.object().keys(updateBodyKeys54).messages(messages);
|
|
5935
|
+
var findQueryKeys32 = {
|
|
5936
|
+
user_id: joi119.string().uuid().optional(),
|
|
5937
|
+
start_date: joi119.date().optional(),
|
|
5938
|
+
end_date: joi119.date().optional()
|
|
5939
|
+
};
|
|
5940
|
+
var findQuery34 = joi119.object().keys(findQueryKeys32).messages(messages);
|
|
5941
|
+
var findByDateQueryKeys = {
|
|
5942
|
+
user_id: joi119.string().uuid().required(),
|
|
5943
|
+
date: joi119.string().isoDate().required()
|
|
5944
|
+
};
|
|
5945
|
+
var findByDateQuery = joi119.object().keys(findByDateQueryKeys).messages(messages);
|
|
5946
|
+
var dailySummaryQueryKeys = {
|
|
5947
|
+
user_id: joi119.string().uuid().required(),
|
|
5948
|
+
start_date: joi119.string().isoDate().required(),
|
|
5949
|
+
end_date: joi119.string().isoDate().required()
|
|
5950
|
+
};
|
|
5951
|
+
var dailySummaryQuery = joi119.object().keys(dailySummaryQueryKeys).messages(messages);
|
|
5953
5952
|
|
|
5954
5953
|
// src/modules/document/CAT/interfaces.ts
|
|
5955
5954
|
var interfaces_exports62 = {};
|
|
@@ -5971,6 +5970,22 @@ var createBody66 = joi120.object().keys({
|
|
|
5971
5970
|
document_line_ids: joi120.array().items(joi120.string().uuid().required()).required()
|
|
5972
5971
|
}).messages(messages);
|
|
5973
5972
|
|
|
5973
|
+
// src/modules/stock/smsSender/interfaces.ts
|
|
5974
|
+
var interfaces_exports63 = {};
|
|
5975
|
+
__export(interfaces_exports63, {
|
|
5976
|
+
ISmsSenderStatsEnum: () => ISmsSenderStatsEnum,
|
|
5977
|
+
Route: () => Route133,
|
|
5978
|
+
timeSheetRecordTypes: () => timeSheetRecordTypes2
|
|
5979
|
+
});
|
|
5980
|
+
var Route133 = "sms_sender";
|
|
5981
|
+
var ISmsSenderStatsEnum = {
|
|
5982
|
+
PENDING: "PENDING",
|
|
5983
|
+
PROCESSING: "PROCESSING",
|
|
5984
|
+
SENT: "SENT",
|
|
5985
|
+
FAILED: "FAILED"
|
|
5986
|
+
};
|
|
5987
|
+
var timeSheetRecordTypes2 = Object.values(ISmsSenderStatsEnum);
|
|
5988
|
+
|
|
5974
5989
|
// src/index.ts
|
|
5975
5990
|
var index_default = main_exports;
|
|
5976
5991
|
export {
|
package/dist/index.js
CHANGED
|
@@ -204,6 +204,7 @@ __export(main_exports, {
|
|
|
204
204
|
SideMenuRoutes: () => route_schema_exports100,
|
|
205
205
|
SidemenuHighlight: () => interface_exports56,
|
|
206
206
|
SidemenuHighlightRoutes: () => route_schema_exports101,
|
|
207
|
+
SmsSender: () => interfaces_exports63,
|
|
207
208
|
StartDocumentHeaderLastUpdate: () => interface_exports42,
|
|
208
209
|
StockMovement: () => interface_exports36,
|
|
209
210
|
StockMovementRoutes: () => route_schema_exports57,
|
|
@@ -5454,6 +5455,7 @@ var Route113 = "chat_subscriber";
|
|
|
5454
5455
|
var route_schema_exports105 = {};
|
|
5455
5456
|
__export(route_schema_exports105, {
|
|
5456
5457
|
createOrUpdateBody: () => createOrUpdateBody2,
|
|
5458
|
+
emailTokenParam: () => emailTokenParam,
|
|
5457
5459
|
findDocumentHeaderSubscribersByLanguageQuery: () => findDocumentHeaderSubscribersByLanguageQuery,
|
|
5458
5460
|
findDocumentHeaderSubscribersQuery: () => findDocumentHeaderSubscribersQuery,
|
|
5459
5461
|
findSubscribedDocumentHeadersQuery: () => findSubscribedDocumentHeadersQuery
|
|
@@ -5477,6 +5479,9 @@ var findSubscribedDocumentHeadersQueryKeys = {
|
|
|
5477
5479
|
owner_id: joi106.string().uuid().required()
|
|
5478
5480
|
};
|
|
5479
5481
|
var findSubscribedDocumentHeadersQuery = joi106.object().keys(findSubscribedDocumentHeadersQueryKeys).messages(messages);
|
|
5482
|
+
var emailTokenParam = joi106.object().keys({
|
|
5483
|
+
token: joi106.string().pattern(/^[a-f0-9]{64}$/).required()
|
|
5484
|
+
}).messages(messages);
|
|
5480
5485
|
|
|
5481
5486
|
// src/modules/stock/tag/interface.ts
|
|
5482
5487
|
var interface_exports59 = {};
|
|
@@ -5682,9 +5687,15 @@ var IPublicDocumentHeaderNoteType = /* @__PURE__ */ ((IPublicDocumentHeaderNoteT
|
|
|
5682
5687
|
var route_schema_exports111 = {};
|
|
5683
5688
|
__export(route_schema_exports111, {
|
|
5684
5689
|
createNoteBody: () => createNoteBody,
|
|
5690
|
+
publicFindBySubscriberQuery: () => publicFindBySubscriberQuery,
|
|
5685
5691
|
updateNoteBody: () => updateNoteBody
|
|
5686
5692
|
});
|
|
5687
5693
|
import joi112 from "joi";
|
|
5694
|
+
var publicFindBySubscriberQueryKeys = {
|
|
5695
|
+
id: joi112.alternatives().try(joi112.string().uuid(), joi112.string().pattern(/^[a-f0-9]{64}$/)).required(),
|
|
5696
|
+
document_header_id: joi112.string().uuid().optional()
|
|
5697
|
+
};
|
|
5698
|
+
var publicFindBySubscriberQuery = joi112.object().keys(publicFindBySubscriberQueryKeys).messages(messages);
|
|
5688
5699
|
var createNoteBodyKeys = {
|
|
5689
5700
|
document_header_id: joi112.string().uuid().required(),
|
|
5690
5701
|
note: joi112.string().required(),
|
|
@@ -5855,101 +5866,89 @@ var printLocationsQuery = joi118.object({
|
|
|
5855
5866
|
// src/modules/user/timeSheet/interfaces.ts
|
|
5856
5867
|
var interfaces_exports61 = {};
|
|
5857
5868
|
__export(interfaces_exports61, {
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
IRegistryTypeEnum: () => IRegistryTypeEnum,
|
|
5861
|
-
ITimesheetStateEnum: () => ITimesheetStateEnum,
|
|
5869
|
+
ITimeSheetRecordTypeEnum: () => ITimeSheetRecordTypeEnum,
|
|
5870
|
+
ITimeSheetRegistryTypeEnum: () => ITimeSheetRegistryTypeEnum,
|
|
5862
5871
|
Route: () => Route131,
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
registryTypes: () => registryTypes,
|
|
5866
|
-
timesheetStates: () => timesheetStates
|
|
5872
|
+
timeSheetRecordTypes: () => timeSheetRecordTypes,
|
|
5873
|
+
timeSheetRegistryTypes: () => timeSheetRegistryTypes
|
|
5867
5874
|
});
|
|
5868
5875
|
var Route131 = "time_sheet";
|
|
5869
|
-
var
|
|
5876
|
+
var ITimeSheetRecordTypeEnum = {
|
|
5870
5877
|
ENTRY: "ENTRY",
|
|
5871
|
-
EXIT: "EXIT"
|
|
5872
|
-
};
|
|
5873
|
-
var clockTypes = Object.keys(IClockTypeEnum);
|
|
5874
|
-
var IAdjustmentTypeEnum = {
|
|
5878
|
+
EXIT: "EXIT",
|
|
5875
5879
|
CREDIT: "CREDIT",
|
|
5876
5880
|
DEBIT: "DEBIT"
|
|
5877
5881
|
};
|
|
5878
|
-
var
|
|
5879
|
-
var
|
|
5882
|
+
var timeSheetRecordTypes = Object.values(ITimeSheetRecordTypeEnum);
|
|
5883
|
+
var ITimeSheetRegistryTypeEnum = {
|
|
5880
5884
|
AUTOMATIC: "AUTOMATIC",
|
|
5881
5885
|
MANUAL: "MANUAL"
|
|
5882
5886
|
};
|
|
5883
|
-
var
|
|
5884
|
-
var ITimesheetStateEnum = {
|
|
5885
|
-
CONFIRMED: "CONFIRMED",
|
|
5886
|
-
PENDING: "PENDING",
|
|
5887
|
-
ERROR: "ERROR"
|
|
5888
|
-
};
|
|
5889
|
-
var timesheetStates = Object.keys(ITimesheetStateEnum);
|
|
5887
|
+
var timeSheetRegistryTypes = Object.values(ITimeSheetRegistryTypeEnum);
|
|
5890
5888
|
|
|
5891
5889
|
// src/modules/user/timeSheet/route.schema.ts
|
|
5892
5890
|
var route_schema_exports118 = {};
|
|
5893
5891
|
__export(route_schema_exports118, {
|
|
5894
5892
|
createBody: () => createBody65,
|
|
5893
|
+
dailySummaryQuery: () => dailySummaryQuery,
|
|
5894
|
+
findByDateQuery: () => findByDateQuery,
|
|
5895
|
+
findQuery: () => findQuery34,
|
|
5895
5896
|
updateBody: () => updateBody56
|
|
5896
5897
|
});
|
|
5897
5898
|
import joi119 from "joi";
|
|
5898
|
-
var clockSchema = joi119.object({
|
|
5899
|
-
id: joi119.string().uuid(),
|
|
5900
|
-
time: joi119.date().required(),
|
|
5901
|
-
type: joi119.string().valid(...Object.values(IClockTypeEnum)).required(),
|
|
5902
|
-
registry_type: joi119.string().valid(...Object.values(IRegistryTypeEnum)).required(),
|
|
5903
|
-
note: joi119.string().allow("", null).optional(),
|
|
5904
|
-
created_by: joi119.string().uuid().required(),
|
|
5905
|
-
updated_by: joi119.string().uuid().required()
|
|
5906
|
-
});
|
|
5907
|
-
var adjustmentSchema = joi119.object({
|
|
5908
|
-
id: joi119.string().uuid(),
|
|
5909
|
-
type: joi119.string().valid(...Object.values(IAdjustmentTypeEnum)).required(),
|
|
5910
|
-
minutes: joi119.number().integer().min(1).required(),
|
|
5911
|
-
// Mínimo 1 minuto de ajuste
|
|
5912
|
-
note: joi119.string().allow("", null).optional(),
|
|
5913
|
-
created_by: joi119.string().uuid().required(),
|
|
5914
|
-
updated_by: joi119.string().uuid().required()
|
|
5915
|
-
});
|
|
5916
5899
|
var createBodyKeys64 = {
|
|
5917
|
-
date: joi119.date().required(),
|
|
5918
5900
|
user_id: joi119.string().uuid().required(),
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
clock: joi119.object({
|
|
5925
|
-
time: joi119.date(),
|
|
5926
|
-
type: joi119.string().valid(...Object.values(IClockTypeEnum)).required(),
|
|
5927
|
-
registry_type: joi119.string().valid(...Object.values(IRegistryTypeEnum)).required(),
|
|
5928
|
-
note: joi119.string().allow("", null).optional(),
|
|
5929
|
-
created_by: joi119.string().uuid().required(),
|
|
5930
|
-
updated_by: joi119.string().uuid().required()
|
|
5901
|
+
type: joi119.string().valid("ENTRY", "EXIT", "CREDIT", "DEBIT").required(),
|
|
5902
|
+
time: joi119.when("type", {
|
|
5903
|
+
is: joi119.string().valid("ENTRY", "EXIT"),
|
|
5904
|
+
then: joi119.date().required(),
|
|
5905
|
+
otherwise: joi119.date().optional().allow(null)
|
|
5931
5906
|
}),
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5907
|
+
minutes: joi119.when("type", {
|
|
5908
|
+
is: joi119.string().valid("CREDIT", "DEBIT"),
|
|
5909
|
+
then: joi119.number().integer().min(1).required(),
|
|
5910
|
+
otherwise: joi119.number().optional().allow(null)
|
|
5911
|
+
}),
|
|
5912
|
+
registry_type: joi119.string().valid("AUTOMATIC", "MANUAL").default("MANUAL").optional(),
|
|
5913
|
+
note: joi119.string().allow("", null).optional(),
|
|
5914
|
+
created_by: joi119.string().uuid().required(),
|
|
5915
|
+
updated_by: joi119.string().uuid().required()
|
|
5940
5916
|
};
|
|
5941
5917
|
var createBody65 = joi119.object().keys(createBodyKeys64).messages(messages);
|
|
5942
5918
|
var updateBodyKeys54 = {
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5919
|
+
type: joi119.string().valid("ENTRY", "EXIT", "CREDIT", "DEBIT").optional(),
|
|
5920
|
+
time: joi119.when("type", {
|
|
5921
|
+
is: joi119.string().valid("ENTRY", "EXIT"),
|
|
5922
|
+
then: joi119.date().optional(),
|
|
5923
|
+
otherwise: joi119.date().optional().allow(null)
|
|
5924
|
+
}),
|
|
5925
|
+
minutes: joi119.when("type", {
|
|
5926
|
+
is: joi119.string().valid("CREDIT", "DEBIT"),
|
|
5927
|
+
then: joi119.number().integer().min(1).optional(),
|
|
5928
|
+
otherwise: joi119.number().optional().allow(null)
|
|
5929
|
+
}),
|
|
5930
|
+
note: joi119.string().allow("", null).optional(),
|
|
5947
5931
|
updated_by: joi119.string().uuid().required(),
|
|
5948
|
-
|
|
5949
|
-
// 🔥 NOVO: Validador do array de acertos extraordinários enviados via PUT
|
|
5950
|
-
adjustments: joi119.array().items(adjustmentSchema)
|
|
5932
|
+
updated_at: joi119.date().optional()
|
|
5951
5933
|
};
|
|
5952
5934
|
var updateBody56 = joi119.object().keys(updateBodyKeys54).messages(messages);
|
|
5935
|
+
var findQueryKeys32 = {
|
|
5936
|
+
user_id: joi119.string().uuid().optional(),
|
|
5937
|
+
start_date: joi119.date().optional(),
|
|
5938
|
+
end_date: joi119.date().optional()
|
|
5939
|
+
};
|
|
5940
|
+
var findQuery34 = joi119.object().keys(findQueryKeys32).messages(messages);
|
|
5941
|
+
var findByDateQueryKeys = {
|
|
5942
|
+
user_id: joi119.string().uuid().required(),
|
|
5943
|
+
date: joi119.string().isoDate().required()
|
|
5944
|
+
};
|
|
5945
|
+
var findByDateQuery = joi119.object().keys(findByDateQueryKeys).messages(messages);
|
|
5946
|
+
var dailySummaryQueryKeys = {
|
|
5947
|
+
user_id: joi119.string().uuid().required(),
|
|
5948
|
+
start_date: joi119.string().isoDate().required(),
|
|
5949
|
+
end_date: joi119.string().isoDate().required()
|
|
5950
|
+
};
|
|
5951
|
+
var dailySummaryQuery = joi119.object().keys(dailySummaryQueryKeys).messages(messages);
|
|
5953
5952
|
|
|
5954
5953
|
// src/modules/document/CAT/interfaces.ts
|
|
5955
5954
|
var interfaces_exports62 = {};
|
|
@@ -5971,6 +5970,22 @@ var createBody66 = joi120.object().keys({
|
|
|
5971
5970
|
document_line_ids: joi120.array().items(joi120.string().uuid().required()).required()
|
|
5972
5971
|
}).messages(messages);
|
|
5973
5972
|
|
|
5973
|
+
// src/modules/stock/smsSender/interfaces.ts
|
|
5974
|
+
var interfaces_exports63 = {};
|
|
5975
|
+
__export(interfaces_exports63, {
|
|
5976
|
+
ISmsSenderStatsEnum: () => ISmsSenderStatsEnum,
|
|
5977
|
+
Route: () => Route133,
|
|
5978
|
+
timeSheetRecordTypes: () => timeSheetRecordTypes2
|
|
5979
|
+
});
|
|
5980
|
+
var Route133 = "sms_sender";
|
|
5981
|
+
var ISmsSenderStatsEnum = {
|
|
5982
|
+
PENDING: "PENDING",
|
|
5983
|
+
PROCESSING: "PROCESSING",
|
|
5984
|
+
SENT: "SENT",
|
|
5985
|
+
FAILED: "FAILED"
|
|
5986
|
+
};
|
|
5987
|
+
var timeSheetRecordTypes2 = Object.values(ISmsSenderStatsEnum);
|
|
5988
|
+
|
|
5974
5989
|
// src/index.ts
|
|
5975
5990
|
var index_default = main_exports;
|
|
5976
5991
|
export {
|
package/dist/main.d.ts
CHANGED
|
@@ -255,4 +255,5 @@ import * as TimeSheet from './modules/user/timeSheet/interfaces';
|
|
|
255
255
|
import * as TimeSheetRoutes from './modules/user/timeSheet/route.schema';
|
|
256
256
|
import * as Catalogo from './modules/document/CAT/interfaces';
|
|
257
257
|
import * as CatalogoRoutes from './modules/document/CAT/route.schema';
|
|
258
|
-
|
|
258
|
+
import * as SmsSender from './modules/stock/smsSender/interfaces';
|
|
259
|
+
export { shared, viewErrors, stockErrors, userErrors, documentManagementErrors, integrationErrors, ZipCode, ZipCodeRoutes, BankData, BankDataRoutes, Client, ClientRoutes, ClientType, ClientTypeRoutes, Chat, ChatRoutes, Commissioner, CommissionerRoutes, Country, CountryRoutes, DeliveryMethods, DeliveryMethodsRoutes, DocumentHeader, DocumentHeaderRoutes, DocumentHeaderHistory, BillOfLading, BillOfLadingRoutes, ProductionOrder, ProductionOrderRoutes, Proforma, ProformaRoutes, PropostaFornecedor, PropostaFornecedorRoutes, ProviderCreditNoteFromReturn, ProviderCreditNoteFromReturnRoutes, ProviderFinancialCreditNote, ProviderFinancialCreditNoteRoutes, ProviderServiceInvoice, ProviderServiceInvoiceRoutes, DocumentLine, DocumentLineRoutes, DocumentLineAssoc, DocumentSet, DocumentSetRoutes, DocumentType, DocumentTypeRoutes, ExternalDocumentType, ExternalDocumentHeader, ExternalDocumentHeaderRoutes, Favorites, FavoritesRoutes, File, FileRoutes, GoogleSheets, GoogleSheetsRoutes, Language, LanguageRoutes, Location, LocationRoutes, MaturityDates, MaturityDatesRoutes, Multimedia, MultimediaRoutes, OrderManagement, Observation, ObservationRoutes, ObservationType, ObservationTypeRoutes, Password, PasswordRoutes, Payment, PaymentRoutes, PaymentMethods, PaymentMethodsRoutes, ProductImage, ProductImageRoutes, Promotion, PromotionRoutes, PromotionAssoc, PromotionAssocRoutes, Providers, ProvidersRoutes, ProviderType, ProviderTypeRoutes, PurchaseConditions, PurchaseConditionsRoutes, ReasonForExemption, ReasonForExemptionRoutes, RefreshToken, RefreshTokenRoutes, SegmentsArea, SegmentsAreaRoutes, Sessions, SessionsRoutes, Shippings, ShippingsRoutes, StoreOperator, StoreOperatorRoutes, SystemModule, SystemModuleRoutes, Swift, SwiftRoutes, TypeOfLocation, TypeOfLocationRoutes, UnitOfMeasure, UnitOfMeasureRoutes, UserPositions, UserPositionsRoutes, Users, UsersRoutes, UserTokens, UserTokensRoutes, VatValidation, VatValidationRoutes, VatTax, VatTaxRoutes, VatTaxZone, VatTaxZoneRoutes, Vehicles, VehiclesRoutes, Workflow, WorkflowRoutes, StockMovement, StockMovementRoutes, Tenant, TenantRoutes, PreSale, PreSaleRoutes, PreSaleProduct, PreSaleProductRoutes, Npc, NpcRoutes, Printer, PrinterRoutes, SchedulePrintJob, SchedulePrintJobRoutes, QueryList, QueryListRoutes, QueryParameter, QueryParameterRoutes, ReturnReason, ReturnReasonRoutes, PropostaSheets, PropostaSheetsRoutes, Schedule, ScheduleRoutes, GoogleFilePermission, GoogleFilePermissionRoutes, Settings, SettingsRoutes, Tickets, TicketsRoutes, Channel, ChannelRoutes, TicketsLanguage, TicketsLanguageRoutes, CLT, CLTRoutes, StartDocumentHeaderLastUpdate, Persona, PersonaRoutes, ProjectInfo, ProjectInfoRoutes, EmailVerification, EmailVerificationRoutes, EmailLog, EmailLogRoutes, Purchase, PurchaseRoutes, Order, OrderRoutes, MaterialEntrance, MaterialEntranceRoutes, Transformado, TransformadoRoutes, Quebra, QuebraRoutes, UpfrontReturn, UpfrontReturnRoutes, SavedEmPicking, SavedEmPickingRoutes, EmailTemplate, EmailTemplateRoutes, EmailTemplateAttachment, EmailTemplateAttachmentRoutes, Inventario, InventarioRoutes, ReturnToProvider, ReturnToProviderRoutes, Prison, PrisonRoutes, DocumentLineNote, DocumentLineNoteRoutes, SavedProviderProposal, SavedProviderProposalRoutes, ProductGoogleSheets, ProductGoogleSheetsRoutes, Task, TaskRoutes, TaskMessage, TaskMessageRoutes, RecurrentTasks, TaskRead, TaskReadRoutes, Theme, ThemeRoutes, Dashboard, DashboardRoutes, ChatRapidMessage, ChatRapidMessageRoutes, SideMenu, SideMenuRoutes, SidemenuHighlight, SidemenuHighlightRoutes, AdminPanel, ErrorLog, ErrorLogRoutes, DocumentLineRm, DocumentLineRmRoutes, DocumentLineMt, DocumentLineMtRoutes, ChatSubscriber, ChatSubscriberRoutes, Tag, TagRoutes, Gmails, NPF, NPFRoutes, NRCL, NRCLRoutes, CurrentAccount, CurrentAccountRoutes, PaymentBatch, PaymentBatchRoutes, Portal, PortalRoutes, GoogleSheetPool, AccountCode, AccountCodeRoutes, LLM, LLMRoutes, PatchNotes, ConferirEncomenda, DocumentHeaderSurvey, DocumentHeaderSurveyRoutes, DocumentHeaderSubscriber, DocumentHeaderSubscriberRoutes, GoogleCalendar, GoogleCalendarRoutes, WebSocket, ProductLocation, MobilePrint, MobilePrintRoutes, TimeSheet, TimeSheetRoutes, Catalogo, CatalogoRoutes, SmsSender, };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { SmsSender } from '../../../shared/entities/stock';
|
|
2
|
+
export type Entity = SmsSender;
|
|
3
|
+
export declare const Route = "sms_sender";
|
|
4
|
+
export declare const ISmsSenderStatsEnum: {
|
|
5
|
+
readonly PENDING: "PENDING";
|
|
6
|
+
readonly PROCESSING: "PROCESSING";
|
|
7
|
+
readonly SENT: "SENT";
|
|
8
|
+
readonly FAILED: "FAILED";
|
|
9
|
+
};
|
|
10
|
+
export type ISmsSenderStats = (typeof ISmsSenderStatsEnum)[keyof typeof ISmsSenderStatsEnum];
|
|
11
|
+
export declare const timeSheetRecordTypes: ("PENDING" | "PROCESSING" | "SENT" | "FAILED")[];
|
|
12
|
+
export interface ICreateRequest {
|
|
13
|
+
phone: string;
|
|
14
|
+
message: string;
|
|
15
|
+
google_calendar_id: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IClaimResponse {
|
|
18
|
+
id: string;
|
|
19
|
+
phone: string;
|
|
20
|
+
message: string;
|
|
21
|
+
status: string;
|
|
22
|
+
}
|
|
23
|
+
export interface IResultRequest {
|
|
24
|
+
status: ISmsSenderStats;
|
|
25
|
+
error?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface IFindResponse {
|
|
28
|
+
id: string;
|
|
29
|
+
phone: string;
|
|
30
|
+
message: string;
|
|
31
|
+
status: string;
|
|
32
|
+
error?: string;
|
|
33
|
+
created_at: Date;
|
|
34
|
+
processed_at?: Date;
|
|
35
|
+
sent_at?: Date;
|
|
36
|
+
}
|
|
37
|
+
export interface IController {
|
|
38
|
+
claim(): Promise<IClaimResponse>;
|
|
39
|
+
result(id: string, data: IResultRequest): Promise<void>;
|
|
40
|
+
findById(id: string): Promise<IFindResponse>;
|
|
41
|
+
findAll(): Promise<IFindResponse[]>;
|
|
42
|
+
}
|
|
@@ -34,6 +34,10 @@ export interface IPublicFindBySubscriberId {
|
|
|
34
34
|
chat: IChatBalloon[];
|
|
35
35
|
documents: IPublicOtherDocument[];
|
|
36
36
|
}
|
|
37
|
+
export interface IPublicFindBySubscriberIdRequest {
|
|
38
|
+
id: string;
|
|
39
|
+
document_header_id?: string;
|
|
40
|
+
}
|
|
37
41
|
export declare enum IPublicDocumentHeaderNoteType {
|
|
38
42
|
Provider = "Provider",
|
|
39
43
|
Client = "Client"
|
|
@@ -56,7 +60,7 @@ export interface PublicDocumentHeaderNoteUpdateRequest {
|
|
|
56
60
|
note: string;
|
|
57
61
|
}
|
|
58
62
|
export interface IRepository {
|
|
59
|
-
publicFindBySubscriberId(params:
|
|
63
|
+
publicFindBySubscriberId(params: IPublicFindBySubscriberIdRequest): Promise<IPublicFindBySubscriberId>;
|
|
60
64
|
publicCreateDocumentHeaderNote: (data: PublicDocumentHeaderNoteCreateRequest[]) => Promise<PublicDocumentHeaderNote[]>;
|
|
61
65
|
publicUpdateDocumentHeaderNote: (selector: IShared.IFindByIdRequest, data: PublicDocumentHeaderNoteUpdateRequest[]) => Promise<PublicDocumentHeaderNote[]>;
|
|
62
66
|
}
|
|
@@ -17,9 +17,16 @@ export interface IFindDocumentHeaderSubscribersByLanguageRequest {
|
|
|
17
17
|
export interface IFindSubscribedDocumentHeadersRequest {
|
|
18
18
|
owner_id: string;
|
|
19
19
|
}
|
|
20
|
+
export interface IFindByEmailTokenRequest {
|
|
21
|
+
token: string;
|
|
22
|
+
}
|
|
23
|
+
export interface IPublicAuthenticateByEmailTokenRequest {
|
|
24
|
+
token: string;
|
|
25
|
+
}
|
|
20
26
|
export type IPersona = Pick<Persona, 'id' | 'external' | 'name' | 'email' | 'telephone' | 'language_id'>;
|
|
27
|
+
export type IPersonaWithToken = IPersona & Pick<Persona, 'email_access_token'>;
|
|
21
28
|
export interface IEntityWithPersona extends Pick<ChatSubscriber, 'id' | 'chat_document_header_id'> {
|
|
22
|
-
persona:
|
|
29
|
+
persona: IPersonaWithToken;
|
|
23
30
|
}
|
|
24
31
|
export interface IEntityWithPersonaAndSubscriptions extends IPersona {
|
|
25
32
|
subscriptions: Pick<Entity, 'id' | 'chat_document_header_id'>[];
|
|
@@ -29,6 +36,8 @@ export interface IRepository {
|
|
|
29
36
|
findDocumentHeaderSubscribersByLanguage(selector: IFindDocumentHeaderSubscribersByLanguageRequest): Promise<string[]>;
|
|
30
37
|
findSubscribedDocumentHeaders(selector: IFindSubscribedDocumentHeadersRequest): Promise<IEntityWithPersonaAndSubscriptions>;
|
|
31
38
|
findById(selector: IShared.IFindByIdRequest): Promise<IEntityWithPersonaAndSubscriptions>;
|
|
39
|
+
findByEmailToken(selector: IFindByEmailTokenRequest): Promise<IEntityWithPersonaAndSubscriptions>;
|
|
40
|
+
publicAuthenticateByEmailToken(selector: IPublicAuthenticateByEmailTokenRequest): Promise<string | null>;
|
|
32
41
|
createOrUpdate(data: ICreateOrUpdateRequest): Promise<string>;
|
|
33
42
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
34
43
|
deleteByDocumentHeader(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
@@ -4,3 +4,4 @@ export declare const createOrUpdateBody: joi.ObjectSchema<any>;
|
|
|
4
4
|
export declare const findDocumentHeaderSubscribersQuery: joi.ObjectSchema<any>;
|
|
5
5
|
export declare const findDocumentHeaderSubscribersByLanguageQuery: joi.ObjectSchema<IFindDocumentHeaderSubscribersByLanguageRequest>;
|
|
6
6
|
export declare const findSubscribedDocumentHeadersQuery: joi.ObjectSchema<any>;
|
|
7
|
+
export declare const emailTokenParam: joi.ObjectSchema<any>;
|
|
@@ -1,95 +1,52 @@
|
|
|
1
1
|
import * as IShared from '../../../shared/interface';
|
|
2
|
-
import {
|
|
3
|
-
export type Entity =
|
|
4
|
-
clocks: TimeSheetClock[];
|
|
5
|
-
adjustments: TimeSheetAdjustment[];
|
|
6
|
-
};
|
|
2
|
+
import { TimeSheet } from '../../../shared/entities/user';
|
|
3
|
+
export type Entity = TimeSheet;
|
|
7
4
|
export declare const Route = "time_sheet";
|
|
8
|
-
export declare const
|
|
9
|
-
ENTRY:
|
|
10
|
-
EXIT:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare const clockTypes: string[];
|
|
14
|
-
export declare const IAdjustmentTypeEnum: {
|
|
15
|
-
CREDIT: 'CREDIT';
|
|
16
|
-
DEBIT: 'DEBIT';
|
|
17
|
-
};
|
|
18
|
-
export type IAdjustmentType = (typeof IAdjustmentTypeEnum)[keyof typeof IAdjustmentTypeEnum];
|
|
19
|
-
export declare const adjustmentTypes: string[];
|
|
20
|
-
export declare const IRegistryTypeEnum: {
|
|
21
|
-
AUTOMATIC: 'AUTOMATIC';
|
|
22
|
-
MANUAL: 'MANUAL';
|
|
5
|
+
export declare const ITimeSheetRecordTypeEnum: {
|
|
6
|
+
readonly ENTRY: "ENTRY";
|
|
7
|
+
readonly EXIT: "EXIT";
|
|
8
|
+
readonly CREDIT: "CREDIT";
|
|
9
|
+
readonly DEBIT: "DEBIT";
|
|
23
10
|
};
|
|
24
|
-
export type
|
|
25
|
-
export declare const
|
|
26
|
-
export declare const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
ERROR: 'ERROR';
|
|
11
|
+
export type ITimeSheetRecordType = (typeof ITimeSheetRecordTypeEnum)[keyof typeof ITimeSheetRecordTypeEnum];
|
|
12
|
+
export declare const timeSheetRecordTypes: ("ENTRY" | "EXIT" | "CREDIT" | "DEBIT")[];
|
|
13
|
+
export declare const ITimeSheetRegistryTypeEnum: {
|
|
14
|
+
readonly AUTOMATIC: "AUTOMATIC";
|
|
15
|
+
readonly MANUAL: "MANUAL";
|
|
30
16
|
};
|
|
31
|
-
export type
|
|
32
|
-
export declare const
|
|
17
|
+
export type ITimeSheetRegistryType = (typeof ITimeSheetRegistryTypeEnum)[keyof typeof ITimeSheetRegistryTypeEnum];
|
|
18
|
+
export declare const timeSheetRegistryTypes: ("AUTOMATIC" | "MANUAL")[];
|
|
33
19
|
export interface IFindRequest {
|
|
34
20
|
user_id?: string;
|
|
35
21
|
start_date?: string;
|
|
36
22
|
end_date?: string;
|
|
37
|
-
state?: ITimesheetState;
|
|
38
23
|
}
|
|
39
|
-
export interface
|
|
40
|
-
date: Date;
|
|
24
|
+
export interface IFindByDateRequest {
|
|
41
25
|
user_id: string;
|
|
42
|
-
|
|
43
|
-
balance?: number;
|
|
44
|
-
state?: ITimesheetState;
|
|
45
|
-
created_by: string;
|
|
46
|
-
updated_by: string;
|
|
47
|
-
clock?: {
|
|
48
|
-
time?: Date;
|
|
49
|
-
type: IClockType;
|
|
50
|
-
registry_type: IRegistryType;
|
|
51
|
-
note?: string | null;
|
|
52
|
-
created_by: string;
|
|
53
|
-
updated_by: string;
|
|
54
|
-
};
|
|
55
|
-
adjustment?: {
|
|
56
|
-
type: IAdjustmentType;
|
|
57
|
-
minutes: number;
|
|
58
|
-
note?: string | null;
|
|
59
|
-
created_by: string;
|
|
60
|
-
updated_by: string;
|
|
61
|
-
};
|
|
26
|
+
date: string;
|
|
62
27
|
}
|
|
63
|
-
export interface
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
note?: string | null;
|
|
75
|
-
created_by: string;
|
|
76
|
-
updated_by: string;
|
|
77
|
-
}[];
|
|
78
|
-
adjustments?: {
|
|
79
|
-
id?: string;
|
|
80
|
-
type: IAdjustmentType;
|
|
81
|
-
minutes: number;
|
|
82
|
-
note?: string | null;
|
|
83
|
-
created_by: string;
|
|
84
|
-
updated_by: string;
|
|
85
|
-
}[];
|
|
28
|
+
export interface IDailySummaryRequest {
|
|
29
|
+
user_id: string;
|
|
30
|
+
start_date: string;
|
|
31
|
+
end_date: string;
|
|
32
|
+
}
|
|
33
|
+
export interface IDailySummaryResponse {
|
|
34
|
+
user_id: string;
|
|
35
|
+
date: string;
|
|
36
|
+
total_worked: number;
|
|
37
|
+
balance: number;
|
|
38
|
+
record_count: number;
|
|
86
39
|
}
|
|
40
|
+
export type ICreateRequest = Omit<Entity, 'id' | 'created_at' | 'updated_at'>;
|
|
41
|
+
export type IUpdateRequest = Partial<Pick<Entity, 'type' | 'time' | 'minutes' | 'note' | 'updated_by' | 'updated_at'>>;
|
|
87
42
|
export interface IRepository {
|
|
88
43
|
find(filters?: IFindRequest): Promise<Entity[]>;
|
|
89
44
|
findById(id: string): Promise<Entity | null>;
|
|
90
45
|
create(data: ICreateRequest): Promise<Entity>;
|
|
91
46
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity | null>;
|
|
92
|
-
deleteOne(selector: IShared.IFindByIdRequest): Promise<
|
|
47
|
+
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
48
|
+
findByUserAndDate(filters: IFindByDateRequest): Promise<Entity[]>;
|
|
49
|
+
getDailySummary(filters: IDailySummaryRequest): Promise<IDailySummaryResponse[]>;
|
|
93
50
|
}
|
|
94
51
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
95
52
|
export type IApi = Omit<IRepository, 'findById'>;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import joi from 'joi';
|
|
2
2
|
export declare const createBody: joi.ObjectSchema<any>;
|
|
3
3
|
export declare const updateBody: joi.ObjectSchema<any>;
|
|
4
|
+
export declare const findQuery: joi.ObjectSchema<any>;
|
|
5
|
+
export declare const findByDateQuery: joi.ObjectSchema<any>;
|
|
6
|
+
export declare const dailySummaryQuery: joi.ObjectSchema<any>;
|
|
@@ -14,6 +14,7 @@ import type { IRsaHashData, ITaxEntry } from '../../modules/supply/documentHeade
|
|
|
14
14
|
import type { ProjectInfo } from './integration';
|
|
15
15
|
import { IEstadoEncomenda } from '../../modules/stock/conferirEncomenda/interface';
|
|
16
16
|
import { IMotivosDeEsperaData } from '../../modules/document/order/interfaces';
|
|
17
|
+
import { ISmsSenderStats } from '../../modules/stock/smsSender/interfaces';
|
|
17
18
|
/**
|
|
18
19
|
* Model AccountCode
|
|
19
20
|
*
|
|
@@ -40,6 +41,7 @@ export type Chat = {
|
|
|
40
41
|
is_customer: boolean;
|
|
41
42
|
deleted: boolean;
|
|
42
43
|
lang: string | null;
|
|
44
|
+
lang_confidence: number | null;
|
|
43
45
|
created_by: string;
|
|
44
46
|
updated_by: string;
|
|
45
47
|
created_at: Date;
|
|
@@ -1143,3 +1145,18 @@ export type SidemenuHightlight = {
|
|
|
1143
1145
|
created_by: string;
|
|
1144
1146
|
updated_by: string;
|
|
1145
1147
|
};
|
|
1148
|
+
/**
|
|
1149
|
+
* Model SmsSender
|
|
1150
|
+
*
|
|
1151
|
+
*/
|
|
1152
|
+
export type SmsSender = {
|
|
1153
|
+
id: string;
|
|
1154
|
+
google_calendar_id: string;
|
|
1155
|
+
phone: string;
|
|
1156
|
+
message: string;
|
|
1157
|
+
status: ISmsSenderStats;
|
|
1158
|
+
error: string | null;
|
|
1159
|
+
created_at: Date;
|
|
1160
|
+
processed_at: Date | null;
|
|
1161
|
+
sent_at: Date | null;
|
|
1162
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IPaymentMethodsSaftCodeEnum } from '../../modules/user/paymentMethods/interfaces';
|
|
2
2
|
import type { IReasonForExemptionType } from '../../modules/user/reasonForExemption/interface';
|
|
3
3
|
import type { SystemModuleEnum } from '../../modules/user/systemModule/interface';
|
|
4
|
-
import {
|
|
4
|
+
import { ITimeSheetRecordType, ITimeSheetRegistryType } from '../../modules/user/timeSheet/interfaces';
|
|
5
5
|
/**
|
|
6
6
|
* Model Users
|
|
7
7
|
*
|
|
@@ -427,6 +427,7 @@ export type Persona = {
|
|
|
427
427
|
nif: string | null;
|
|
428
428
|
telephone: string | null;
|
|
429
429
|
email: string | null;
|
|
430
|
+
email_access_token: string | null;
|
|
430
431
|
observations: string | null;
|
|
431
432
|
street: string | null;
|
|
432
433
|
postal_code: string | null;
|
|
@@ -484,37 +485,14 @@ export type SystemModule = {
|
|
|
484
485
|
};
|
|
485
486
|
/**
|
|
486
487
|
* Model TimeSheet
|
|
487
|
-
*
|
|
488
488
|
*/
|
|
489
|
-
export interface
|
|
489
|
+
export interface TimeSheet {
|
|
490
490
|
id: string;
|
|
491
|
-
date: Date;
|
|
492
|
-
total_worked: number;
|
|
493
|
-
balance: number;
|
|
494
491
|
user_id: string;
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
updated_by: string;
|
|
500
|
-
}
|
|
501
|
-
export interface TimeSheetClock {
|
|
502
|
-
id: string;
|
|
503
|
-
timesheet_day_id: string;
|
|
504
|
-
time: Date;
|
|
505
|
-
type: IClockType;
|
|
506
|
-
registry_type: IRegistryType;
|
|
507
|
-
note: string | null;
|
|
508
|
-
created_at: Date;
|
|
509
|
-
updated_at: Date;
|
|
510
|
-
created_by: string;
|
|
511
|
-
updated_by: string;
|
|
512
|
-
}
|
|
513
|
-
export interface TimeSheetAdjustment {
|
|
514
|
-
id: string;
|
|
515
|
-
timesheet_day_id: string;
|
|
516
|
-
type: IAdjustmentType;
|
|
517
|
-
minutes: number;
|
|
492
|
+
type: ITimeSheetRecordType;
|
|
493
|
+
time: Date | null;
|
|
494
|
+
minutes: number | null;
|
|
495
|
+
registry_type: ITimeSheetRegistryType;
|
|
518
496
|
note: string | null;
|
|
519
497
|
created_at: Date;
|
|
520
498
|
updated_at: Date;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomalism-com/types",
|
|
3
3
|
"description": "A nomalism package with all necessary types and validations for developing APIs",
|
|
4
|
-
"version": "0.46.
|
|
4
|
+
"version": "0.46.12",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|