@nomalism-com/types 0.46.7 → 0.46.10

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 CHANGED
@@ -1975,6 +1975,7 @@ var updateManyKeys = {
1975
1975
  provider_estimated_delivery_date: joi18.date().allow(null, "").optional(),
1976
1976
  provider_purchase_discount: joi18.number().positive().allow(0).max(100).optional(),
1977
1977
  consignacao: joi18.boolean().optional(),
1978
+ abater_na_fatura_final: joi18.boolean().optional(),
1978
1979
  cancelled: joi18.boolean().optional(),
1979
1980
  force_closed: joi18.boolean().optional()
1980
1981
  };
@@ -5854,101 +5855,89 @@ var printLocationsQuery = joi118.object({
5854
5855
  // src/modules/user/timeSheet/interfaces.ts
5855
5856
  var interfaces_exports61 = {};
5856
5857
  __export(interfaces_exports61, {
5857
- IAdjustmentTypeEnum: () => IAdjustmentTypeEnum,
5858
- IClockTypeEnum: () => IClockTypeEnum,
5859
- IRegistryTypeEnum: () => IRegistryTypeEnum,
5860
- ITimesheetStateEnum: () => ITimesheetStateEnum,
5858
+ ITimeSheetRecordTypeEnum: () => ITimeSheetRecordTypeEnum,
5859
+ ITimeSheetRegistryTypeEnum: () => ITimeSheetRegistryTypeEnum,
5861
5860
  Route: () => Route131,
5862
- adjustmentTypes: () => adjustmentTypes,
5863
- clockTypes: () => clockTypes,
5864
- registryTypes: () => registryTypes,
5865
- timesheetStates: () => timesheetStates
5861
+ timeSheetRecordTypes: () => timeSheetRecordTypes,
5862
+ timeSheetRegistryTypes: () => timeSheetRegistryTypes
5866
5863
  });
5867
5864
  var Route131 = "time_sheet";
5868
- var IClockTypeEnum = {
5865
+ var ITimeSheetRecordTypeEnum = {
5869
5866
  ENTRY: "ENTRY",
5870
- EXIT: "EXIT"
5871
- };
5872
- var clockTypes = Object.keys(IClockTypeEnum);
5873
- var IAdjustmentTypeEnum = {
5867
+ EXIT: "EXIT",
5874
5868
  CREDIT: "CREDIT",
5875
5869
  DEBIT: "DEBIT"
5876
5870
  };
5877
- var adjustmentTypes = Object.keys(IAdjustmentTypeEnum);
5878
- var IRegistryTypeEnum = {
5871
+ var timeSheetRecordTypes = Object.values(ITimeSheetRecordTypeEnum);
5872
+ var ITimeSheetRegistryTypeEnum = {
5879
5873
  AUTOMATIC: "AUTOMATIC",
5880
5874
  MANUAL: "MANUAL"
5881
5875
  };
5882
- var registryTypes = Object.keys(IRegistryTypeEnum);
5883
- var ITimesheetStateEnum = {
5884
- CONFIRMED: "CONFIRMED",
5885
- PENDING: "PENDING",
5886
- ERROR: "ERROR"
5887
- };
5888
- var timesheetStates = Object.keys(ITimesheetStateEnum);
5876
+ var timeSheetRegistryTypes = Object.values(ITimeSheetRegistryTypeEnum);
5889
5877
 
5890
5878
  // src/modules/user/timeSheet/route.schema.ts
5891
5879
  var route_schema_exports118 = {};
5892
5880
  __export(route_schema_exports118, {
5893
5881
  createBody: () => createBody65,
5882
+ dailySummaryQuery: () => dailySummaryQuery,
5883
+ findByDateQuery: () => findByDateQuery,
5884
+ findQuery: () => findQuery34,
5894
5885
  updateBody: () => updateBody56
5895
5886
  });
5896
5887
  import joi119 from "joi";
5897
- var clockSchema = joi119.object({
5898
- id: joi119.string().uuid(),
5899
- time: joi119.date().required(),
5900
- type: joi119.string().valid(...Object.values(IClockTypeEnum)).required(),
5901
- registry_type: joi119.string().valid(...Object.values(IRegistryTypeEnum)).required(),
5902
- note: joi119.string().allow("", null).optional(),
5903
- created_by: joi119.string().uuid().required(),
5904
- updated_by: joi119.string().uuid().required()
5905
- });
5906
- var adjustmentSchema = joi119.object({
5907
- id: joi119.string().uuid(),
5908
- type: joi119.string().valid(...Object.values(IAdjustmentTypeEnum)).required(),
5909
- minutes: joi119.number().integer().min(1).required(),
5910
- // Mínimo 1 minuto de ajuste
5911
- note: joi119.string().allow("", null).optional(),
5912
- created_by: joi119.string().uuid().required(),
5913
- updated_by: joi119.string().uuid().required()
5914
- });
5915
5888
  var createBodyKeys64 = {
5916
- date: joi119.date().required(),
5917
5889
  user_id: joi119.string().uuid().required(),
5918
- total_worked: joi119.number().integer().min(0),
5919
- balance: joi119.number().integer(),
5920
- state: joi119.string().valid(...Object.values(ITimesheetStateEnum)),
5921
- created_by: joi119.string().uuid().required(),
5922
- updated_by: joi119.string().uuid().required(),
5923
- clock: joi119.object({
5924
- time: joi119.date(),
5925
- type: joi119.string().valid(...Object.values(IClockTypeEnum)).required(),
5926
- registry_type: joi119.string().valid(...Object.values(IRegistryTypeEnum)).required(),
5927
- note: joi119.string().allow("", null).optional(),
5928
- created_by: joi119.string().uuid().required(),
5929
- updated_by: joi119.string().uuid().required()
5890
+ type: joi119.string().valid("ENTRY", "EXIT", "CREDIT", "DEBIT").required(),
5891
+ time: joi119.when("type", {
5892
+ is: joi119.string().valid("ENTRY", "EXIT"),
5893
+ then: joi119.date().required(),
5894
+ otherwise: joi119.date().optional().allow(null)
5930
5895
  }),
5931
- // 🔥 NOVO: Validador do objeto opcional de acerto na criação do dia
5932
- adjustment: joi119.object({
5933
- type: joi119.string().valid(...Object.values(IAdjustmentTypeEnum)).required(),
5934
- minutes: joi119.number().integer().min(1).required(),
5935
- note: joi119.string().allow("", null).optional(),
5936
- created_by: joi119.string().uuid().required(),
5937
- updated_by: joi119.string().uuid().required()
5938
- })
5896
+ minutes: joi119.when("type", {
5897
+ is: joi119.string().valid("CREDIT", "DEBIT"),
5898
+ then: joi119.number().integer().min(1).required(),
5899
+ otherwise: joi119.number().optional().allow(null)
5900
+ }),
5901
+ registry_type: joi119.string().valid("AUTOMATIC", "MANUAL").default("MANUAL").optional(),
5902
+ note: joi119.string().allow("", null).optional(),
5903
+ created_by: joi119.string().uuid().required(),
5904
+ updated_by: joi119.string().uuid().required()
5939
5905
  };
5940
5906
  var createBody65 = joi119.object().keys(createBodyKeys64).messages(messages);
5941
5907
  var updateBodyKeys54 = {
5942
- total_worked: joi119.number().integer().min(0),
5943
- balance: joi119.number().integer(),
5944
- state: joi119.string().valid(...Object.values(ITimesheetStateEnum)),
5945
- created_by: joi119.string().uuid().optional(),
5908
+ type: joi119.string().valid("ENTRY", "EXIT", "CREDIT", "DEBIT").optional(),
5909
+ time: joi119.when("type", {
5910
+ is: joi119.string().valid("ENTRY", "EXIT"),
5911
+ then: joi119.date().optional(),
5912
+ otherwise: joi119.date().optional().allow(null)
5913
+ }),
5914
+ minutes: joi119.when("type", {
5915
+ is: joi119.string().valid("CREDIT", "DEBIT"),
5916
+ then: joi119.number().integer().min(1).optional(),
5917
+ otherwise: joi119.number().optional().allow(null)
5918
+ }),
5919
+ note: joi119.string().allow("", null).optional(),
5946
5920
  updated_by: joi119.string().uuid().required(),
5947
- clocks: joi119.array().items(clockSchema),
5948
- // 🔥 NOVO: Validador do array de acertos extraordinários enviados via PUT
5949
- adjustments: joi119.array().items(adjustmentSchema)
5921
+ updated_at: joi119.date().optional()
5950
5922
  };
5951
5923
  var updateBody56 = joi119.object().keys(updateBodyKeys54).messages(messages);
5924
+ var findQueryKeys32 = {
5925
+ user_id: joi119.string().uuid().optional(),
5926
+ start_date: joi119.date().optional(),
5927
+ end_date: joi119.date().optional()
5928
+ };
5929
+ var findQuery34 = joi119.object().keys(findQueryKeys32).messages(messages);
5930
+ var findByDateQueryKeys = {
5931
+ user_id: joi119.string().uuid().required(),
5932
+ date: joi119.string().isoDate().required()
5933
+ };
5934
+ var findByDateQuery = joi119.object().keys(findByDateQueryKeys).messages(messages);
5935
+ var dailySummaryQueryKeys = {
5936
+ user_id: joi119.string().uuid().required(),
5937
+ start_date: joi119.string().isoDate().required(),
5938
+ end_date: joi119.string().isoDate().required()
5939
+ };
5940
+ var dailySummaryQuery = joi119.object().keys(dailySummaryQueryKeys).messages(messages);
5952
5941
 
5953
5942
  // src/modules/document/CAT/interfaces.ts
5954
5943
  var interfaces_exports62 = {};
package/dist/index.js CHANGED
@@ -1975,6 +1975,7 @@ var updateManyKeys = {
1975
1975
  provider_estimated_delivery_date: joi18.date().allow(null, "").optional(),
1976
1976
  provider_purchase_discount: joi18.number().positive().allow(0).max(100).optional(),
1977
1977
  consignacao: joi18.boolean().optional(),
1978
+ abater_na_fatura_final: joi18.boolean().optional(),
1978
1979
  cancelled: joi18.boolean().optional(),
1979
1980
  force_closed: joi18.boolean().optional()
1980
1981
  };
@@ -5854,101 +5855,89 @@ var printLocationsQuery = joi118.object({
5854
5855
  // src/modules/user/timeSheet/interfaces.ts
5855
5856
  var interfaces_exports61 = {};
5856
5857
  __export(interfaces_exports61, {
5857
- IAdjustmentTypeEnum: () => IAdjustmentTypeEnum,
5858
- IClockTypeEnum: () => IClockTypeEnum,
5859
- IRegistryTypeEnum: () => IRegistryTypeEnum,
5860
- ITimesheetStateEnum: () => ITimesheetStateEnum,
5858
+ ITimeSheetRecordTypeEnum: () => ITimeSheetRecordTypeEnum,
5859
+ ITimeSheetRegistryTypeEnum: () => ITimeSheetRegistryTypeEnum,
5861
5860
  Route: () => Route131,
5862
- adjustmentTypes: () => adjustmentTypes,
5863
- clockTypes: () => clockTypes,
5864
- registryTypes: () => registryTypes,
5865
- timesheetStates: () => timesheetStates
5861
+ timeSheetRecordTypes: () => timeSheetRecordTypes,
5862
+ timeSheetRegistryTypes: () => timeSheetRegistryTypes
5866
5863
  });
5867
5864
  var Route131 = "time_sheet";
5868
- var IClockTypeEnum = {
5865
+ var ITimeSheetRecordTypeEnum = {
5869
5866
  ENTRY: "ENTRY",
5870
- EXIT: "EXIT"
5871
- };
5872
- var clockTypes = Object.keys(IClockTypeEnum);
5873
- var IAdjustmentTypeEnum = {
5867
+ EXIT: "EXIT",
5874
5868
  CREDIT: "CREDIT",
5875
5869
  DEBIT: "DEBIT"
5876
5870
  };
5877
- var adjustmentTypes = Object.keys(IAdjustmentTypeEnum);
5878
- var IRegistryTypeEnum = {
5871
+ var timeSheetRecordTypes = Object.values(ITimeSheetRecordTypeEnum);
5872
+ var ITimeSheetRegistryTypeEnum = {
5879
5873
  AUTOMATIC: "AUTOMATIC",
5880
5874
  MANUAL: "MANUAL"
5881
5875
  };
5882
- var registryTypes = Object.keys(IRegistryTypeEnum);
5883
- var ITimesheetStateEnum = {
5884
- CONFIRMED: "CONFIRMED",
5885
- PENDING: "PENDING",
5886
- ERROR: "ERROR"
5887
- };
5888
- var timesheetStates = Object.keys(ITimesheetStateEnum);
5876
+ var timeSheetRegistryTypes = Object.values(ITimeSheetRegistryTypeEnum);
5889
5877
 
5890
5878
  // src/modules/user/timeSheet/route.schema.ts
5891
5879
  var route_schema_exports118 = {};
5892
5880
  __export(route_schema_exports118, {
5893
5881
  createBody: () => createBody65,
5882
+ dailySummaryQuery: () => dailySummaryQuery,
5883
+ findByDateQuery: () => findByDateQuery,
5884
+ findQuery: () => findQuery34,
5894
5885
  updateBody: () => updateBody56
5895
5886
  });
5896
5887
  import joi119 from "joi";
5897
- var clockSchema = joi119.object({
5898
- id: joi119.string().uuid(),
5899
- time: joi119.date().required(),
5900
- type: joi119.string().valid(...Object.values(IClockTypeEnum)).required(),
5901
- registry_type: joi119.string().valid(...Object.values(IRegistryTypeEnum)).required(),
5902
- note: joi119.string().allow("", null).optional(),
5903
- created_by: joi119.string().uuid().required(),
5904
- updated_by: joi119.string().uuid().required()
5905
- });
5906
- var adjustmentSchema = joi119.object({
5907
- id: joi119.string().uuid(),
5908
- type: joi119.string().valid(...Object.values(IAdjustmentTypeEnum)).required(),
5909
- minutes: joi119.number().integer().min(1).required(),
5910
- // Mínimo 1 minuto de ajuste
5911
- note: joi119.string().allow("", null).optional(),
5912
- created_by: joi119.string().uuid().required(),
5913
- updated_by: joi119.string().uuid().required()
5914
- });
5915
5888
  var createBodyKeys64 = {
5916
- date: joi119.date().required(),
5917
5889
  user_id: joi119.string().uuid().required(),
5918
- total_worked: joi119.number().integer().min(0),
5919
- balance: joi119.number().integer(),
5920
- state: joi119.string().valid(...Object.values(ITimesheetStateEnum)),
5921
- created_by: joi119.string().uuid().required(),
5922
- updated_by: joi119.string().uuid().required(),
5923
- clock: joi119.object({
5924
- time: joi119.date(),
5925
- type: joi119.string().valid(...Object.values(IClockTypeEnum)).required(),
5926
- registry_type: joi119.string().valid(...Object.values(IRegistryTypeEnum)).required(),
5927
- note: joi119.string().allow("", null).optional(),
5928
- created_by: joi119.string().uuid().required(),
5929
- updated_by: joi119.string().uuid().required()
5890
+ type: joi119.string().valid("ENTRY", "EXIT", "CREDIT", "DEBIT").required(),
5891
+ time: joi119.when("type", {
5892
+ is: joi119.string().valid("ENTRY", "EXIT"),
5893
+ then: joi119.date().required(),
5894
+ otherwise: joi119.date().optional().allow(null)
5930
5895
  }),
5931
- // 🔥 NOVO: Validador do objeto opcional de acerto na criação do dia
5932
- adjustment: joi119.object({
5933
- type: joi119.string().valid(...Object.values(IAdjustmentTypeEnum)).required(),
5934
- minutes: joi119.number().integer().min(1).required(),
5935
- note: joi119.string().allow("", null).optional(),
5936
- created_by: joi119.string().uuid().required(),
5937
- updated_by: joi119.string().uuid().required()
5938
- })
5896
+ minutes: joi119.when("type", {
5897
+ is: joi119.string().valid("CREDIT", "DEBIT"),
5898
+ then: joi119.number().integer().min(1).required(),
5899
+ otherwise: joi119.number().optional().allow(null)
5900
+ }),
5901
+ registry_type: joi119.string().valid("AUTOMATIC", "MANUAL").default("MANUAL").optional(),
5902
+ note: joi119.string().allow("", null).optional(),
5903
+ created_by: joi119.string().uuid().required(),
5904
+ updated_by: joi119.string().uuid().required()
5939
5905
  };
5940
5906
  var createBody65 = joi119.object().keys(createBodyKeys64).messages(messages);
5941
5907
  var updateBodyKeys54 = {
5942
- total_worked: joi119.number().integer().min(0),
5943
- balance: joi119.number().integer(),
5944
- state: joi119.string().valid(...Object.values(ITimesheetStateEnum)),
5945
- created_by: joi119.string().uuid().optional(),
5908
+ type: joi119.string().valid("ENTRY", "EXIT", "CREDIT", "DEBIT").optional(),
5909
+ time: joi119.when("type", {
5910
+ is: joi119.string().valid("ENTRY", "EXIT"),
5911
+ then: joi119.date().optional(),
5912
+ otherwise: joi119.date().optional().allow(null)
5913
+ }),
5914
+ minutes: joi119.when("type", {
5915
+ is: joi119.string().valid("CREDIT", "DEBIT"),
5916
+ then: joi119.number().integer().min(1).optional(),
5917
+ otherwise: joi119.number().optional().allow(null)
5918
+ }),
5919
+ note: joi119.string().allow("", null).optional(),
5946
5920
  updated_by: joi119.string().uuid().required(),
5947
- clocks: joi119.array().items(clockSchema),
5948
- // 🔥 NOVO: Validador do array de acertos extraordinários enviados via PUT
5949
- adjustments: joi119.array().items(adjustmentSchema)
5921
+ updated_at: joi119.date().optional()
5950
5922
  };
5951
5923
  var updateBody56 = joi119.object().keys(updateBodyKeys54).messages(messages);
5924
+ var findQueryKeys32 = {
5925
+ user_id: joi119.string().uuid().optional(),
5926
+ start_date: joi119.date().optional(),
5927
+ end_date: joi119.date().optional()
5928
+ };
5929
+ var findQuery34 = joi119.object().keys(findQueryKeys32).messages(messages);
5930
+ var findByDateQueryKeys = {
5931
+ user_id: joi119.string().uuid().required(),
5932
+ date: joi119.string().isoDate().required()
5933
+ };
5934
+ var findByDateQuery = joi119.object().keys(findByDateQueryKeys).messages(messages);
5935
+ var dailySummaryQueryKeys = {
5936
+ user_id: joi119.string().uuid().required(),
5937
+ start_date: joi119.string().isoDate().required(),
5938
+ end_date: joi119.string().isoDate().required()
5939
+ };
5940
+ var dailySummaryQuery = joi119.object().keys(dailySummaryQueryKeys).messages(messages);
5952
5941
 
5953
5942
  // src/modules/document/CAT/interfaces.ts
5954
5943
  var interfaces_exports62 = {};
@@ -112,6 +112,7 @@ export interface IUpdateManyRequest {
112
112
  provider_estimated_delivery_date?: Date | null;
113
113
  provider_purchase_discount?: number;
114
114
  consignacao?: boolean;
115
+ abater_na_fatura_final?: boolean;
115
116
  cancelled?: boolean;
116
117
  force_closed?: boolean;
117
118
  }
@@ -1,95 +1,52 @@
1
1
  import * as IShared from '../../../shared/interface';
2
- import { TimeSheetDay, TimeSheetClock, TimeSheetAdjustment } from '../../../shared/entities/user';
3
- export type Entity = TimeSheetDay & {
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 IClockTypeEnum: {
9
- ENTRY: 'ENTRY';
10
- EXIT: 'EXIT';
11
- };
12
- export type IClockType = (typeof IClockTypeEnum)[keyof typeof IClockTypeEnum];
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 IRegistryType = (typeof IRegistryTypeEnum)[keyof typeof IRegistryTypeEnum];
25
- export declare const registryTypes: string[];
26
- export declare const ITimesheetStateEnum: {
27
- CONFIRMED: 'CONFIRMED';
28
- PENDING: 'PENDING';
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 ITimesheetState = (typeof ITimesheetStateEnum)[keyof typeof ITimesheetStateEnum];
32
- export declare const timesheetStates: string[];
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 ICreateRequest {
40
- date: Date;
24
+ export interface IFindByDateRequest {
41
25
  user_id: string;
42
- total_worked?: number;
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 IUpdateRequest {
64
- total_worked?: number;
65
- balance?: number;
66
- state?: ITimesheetState;
67
- created_by?: string;
68
- updated_by: string;
69
- clocks?: {
70
- id?: string;
71
- time: Date;
72
- type: IClockType;
73
- registry_type: IRegistryType;
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<Entity | null>;
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>;
@@ -385,6 +385,7 @@ export type DocumentLine = {
385
385
  cativado: boolean;
386
386
  cativado_date: Date | null;
387
387
  consignacao: boolean;
388
+ abater_na_fatura_final: boolean;
388
389
  document_line_group_id: string;
389
390
  index: number;
390
391
  data: IData;
@@ -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 { IClockType, IRegistryType, ITimesheetState, IAdjustmentType } from '../../modules/user/timeSheet/interfaces';
4
+ import { ITimeSheetRecordType, ITimeSheetRegistryType } from '../../modules/user/timeSheet/interfaces';
5
5
  /**
6
6
  * Model Users
7
7
  *
@@ -484,37 +484,14 @@ export type SystemModule = {
484
484
  };
485
485
  /**
486
486
  * Model TimeSheet
487
- *
488
487
  */
489
- export interface TimeSheetDay {
488
+ export interface TimeSheet {
490
489
  id: string;
491
- date: Date;
492
- total_worked: number;
493
- balance: number;
494
490
  user_id: string;
495
- state: ITimesheetState;
496
- created_at: Date;
497
- updated_at: Date;
498
- created_by: string;
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;
491
+ type: ITimeSheetRecordType;
492
+ time: Date | null;
493
+ minutes: number | null;
494
+ registry_type: ITimeSheetRegistryType;
518
495
  note: string | null;
519
496
  created_at: Date;
520
497
  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.7",
4
+ "version": "0.46.10",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -31,8 +31,8 @@
31
31
  "devDependencies": {
32
32
  "@swc/core": "^1.15.41",
33
33
  "@types/node": "^24.13.2",
34
- "@typescript-eslint/eslint-plugin": "^8.61.0",
35
- "@typescript-eslint/parser": "^8.61.0",
34
+ "@typescript-eslint/eslint-plugin": "^8.61.1",
35
+ "@typescript-eslint/parser": "^8.61.1",
36
36
  "eslint": "^9.39.4",
37
37
  "eslint-config-prettier": "^10.1.8",
38
38
  "eslint-import-resolver-typescript": "^4.4.5",