@muni-sanfer/types-gestor-documental 0.0.1-beta.44 → 0.0.1-beta.45
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/base/entities.d.ts +14 -0
- package/dist/base/entities.js +6 -2
- package/dist/contracts/holiday.contract.d.ts +13 -4
- package/dist/contracts/holiday.contract.js +1 -0
- package/dist/contracts/index.d.ts +1 -0
- package/dist/entities/holiday/holiday.entity.d.ts +22 -0
- package/package.json +1 -1
- package/src/base/entities.ts +17 -0
- package/src/contracts/holiday.contract.ts +13 -4
- package/src/entities/holiday/holiday.entity.ts +25 -0
package/dist/base/entities.d.ts
CHANGED
|
@@ -205,6 +205,11 @@ export declare const TextSnippetSection: {
|
|
|
205
205
|
Body: "Body";
|
|
206
206
|
Closing: "Closing";
|
|
207
207
|
};
|
|
208
|
+
export type HolidaySource = 'Manual' | 'Api';
|
|
209
|
+
export declare const HolidaySource: {
|
|
210
|
+
Manual: "Manual";
|
|
211
|
+
Api: "Api";
|
|
212
|
+
};
|
|
208
213
|
export type WorkFolderItemKind = 'Document' | 'File';
|
|
209
214
|
export declare const WorkFolderItemKind: {
|
|
210
215
|
Document: "Document";
|
|
@@ -915,7 +920,16 @@ export interface HolidayEntity {
|
|
|
915
920
|
id: string;
|
|
916
921
|
date: string;
|
|
917
922
|
name: string;
|
|
923
|
+
source: HolidaySource;
|
|
924
|
+
kind?: string | null;
|
|
925
|
+
excluded: boolean;
|
|
918
926
|
createdAt: string;
|
|
927
|
+
updatedAt: string;
|
|
928
|
+
}
|
|
929
|
+
export interface HolidaySyncEntity {
|
|
930
|
+
year: number;
|
|
931
|
+
syncedAt: string;
|
|
932
|
+
total: number;
|
|
919
933
|
}
|
|
920
934
|
export interface TextSnippetEntity {
|
|
921
935
|
id: string;
|
package/dist/base/entities.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by prisma-generator-typescript-interfaces
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
exports.DraftingRequestEventAction = exports.DraftingRequestStatus = exports.MailAuthentication = exports.MailIntakeStatus = exports.DeskFileTarget = void 0;
|
|
4
|
+
exports.DataBreachNoticeMeans = exports.DataBreachEventAction = exports.DataBreachStatus = exports.DataBreachKind = exports.DataRightsEventAction = exports.DataRightsResolution = exports.DataRightsRequestStatus = exports.DataRightsChannel = exports.DataRight = exports.DataLegalBasis = exports.TransparencyStatus = exports.AccessRequestEventAction = exports.AccessRequestResolution = exports.AccessRequestStatus = exports.AccessRequestChannel = exports.DispositionKind = exports.FinalDisposition = exports.AuditAction = exports.AuditEntity = exports.DocumentAccessAction = exports.QualityMetricKey = exports.ServiceOutageKind = exports.WorkFolderItemKind = exports.HolidaySource = exports.TextSnippetSection = exports.ScanSessionStatus = exports.CaseFileAccessAction = exports.CaseFileTrackingAction = exports.CaseFileActorType = exports.CaseFileActorRelation = exports.CaseFileEntryKind = exports.CaseFileActuationType = exports.CaseFileIncorporationMechanism = exports.CaseFileStatus = exports.DocumentInstruction = exports.DocumentDeliveryOrigin = exports.DocumentRecipientType = exports.DocumentAttachmentType = exports.DocumentFlowStepType = exports.DocDigitalInboundStatus = exports.DocumentDispatchStatus = exports.CommunicationMeans = exports.DocumentOrigin = exports.DraftReviewStatus = exports.DocumentTrackingAction = exports.DocumentParticipantStatus = exports.DocumentParticipantRole = exports.DocumentAccessLevel = exports.DocumentStatus = exports.DocumentCategory = void 0;
|
|
5
|
+
exports.DraftingRequestEventAction = exports.DraftingRequestStatus = exports.MailAuthentication = exports.MailIntakeStatus = exports.DeskFileTarget = exports.DeskFileSource = void 0;
|
|
6
6
|
exports.DocumentCategory = {
|
|
7
7
|
Decree: 'Decree',
|
|
8
8
|
Communication: 'Communication',
|
|
@@ -184,6 +184,10 @@ exports.TextSnippetSection = {
|
|
|
184
184
|
Body: 'Body',
|
|
185
185
|
Closing: 'Closing',
|
|
186
186
|
};
|
|
187
|
+
exports.HolidaySource = {
|
|
188
|
+
Manual: 'Manual',
|
|
189
|
+
Api: 'Api',
|
|
190
|
+
};
|
|
187
191
|
exports.WorkFolderItemKind = {
|
|
188
192
|
Document: 'Document',
|
|
189
193
|
File: 'File',
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { type HolidayRemoveResponseEntity, type HolidayResponseEntity } from '../entities';
|
|
1
|
+
import { type HolidayListResponseEntity, type HolidayRemoveResponseEntity, type HolidayResponseEntity, type HolidaySyncResponseEntity } from '../entities';
|
|
2
2
|
/** Patrones NATS de `holiday`: feriados para contar días hábiles. */
|
|
3
3
|
export declare const HolidayPatterns: {
|
|
4
4
|
readonly getAll: "gestorDocumental.holiday.getAll";
|
|
5
5
|
readonly create: "gestorDocumental.holiday.create";
|
|
6
6
|
readonly remove: "gestorDocumental.holiday.remove";
|
|
7
|
+
readonly sync: "gestorDocumental.holiday.sync";
|
|
7
8
|
};
|
|
8
9
|
export interface HolidayContract {
|
|
9
|
-
/** Feriados de un año, en orden. */
|
|
10
|
+
/** Feriados de un año, en orden (también los de la API que se quitaron a mano). */
|
|
10
11
|
[HolidayPatterns.getAll]: {
|
|
11
12
|
payload: {
|
|
12
13
|
year: number;
|
|
13
14
|
};
|
|
14
|
-
response:
|
|
15
|
+
response: HolidayListResponseEntity;
|
|
15
16
|
};
|
|
16
|
-
/** `date` como «AAAA-MM-DD». */
|
|
17
|
+
/** `date` como «AAAA-MM-DD». Si es uno de la API que se había quitado, vuelve a contar. */
|
|
17
18
|
[HolidayPatterns.create]: {
|
|
18
19
|
payload: {
|
|
19
20
|
date: string;
|
|
@@ -21,10 +22,18 @@ export interface HolidayContract {
|
|
|
21
22
|
};
|
|
22
23
|
response: HolidayResponseEntity;
|
|
23
24
|
};
|
|
25
|
+
/** Uno cargado a mano se borra; uno de la API se marca como quitado. */
|
|
24
26
|
[HolidayPatterns.remove]: {
|
|
25
27
|
payload: {
|
|
26
28
|
id: string;
|
|
27
29
|
};
|
|
28
30
|
response: HolidayRemoveResponseEntity;
|
|
29
31
|
};
|
|
32
|
+
/** Trae de la API pública los feriados de un año. Lo cargado o quitado a mano se respeta. */
|
|
33
|
+
[HolidayPatterns.sync]: {
|
|
34
|
+
payload: {
|
|
35
|
+
year: number;
|
|
36
|
+
};
|
|
37
|
+
response: HolidaySyncResponseEntity;
|
|
38
|
+
};
|
|
30
39
|
}
|
|
@@ -214,6 +214,7 @@ export declare const GestorDocumentalPatterns: {
|
|
|
214
214
|
readonly getAll: "gestorDocumental.holiday.getAll";
|
|
215
215
|
readonly create: "gestorDocumental.holiday.create";
|
|
216
216
|
readonly remove: "gestorDocumental.holiday.remove";
|
|
217
|
+
readonly sync: "gestorDocumental.holiday.sync";
|
|
217
218
|
};
|
|
218
219
|
readonly indicators: {
|
|
219
220
|
readonly getManagement: "gestorDocumental.indicators.getManagement";
|
|
@@ -1,10 +1,32 @@
|
|
|
1
|
+
import { type HolidaySource } from '../../base/entities';
|
|
1
2
|
/** Feriado: el día («AAAA-MM-DD») no cuenta como hábil en los plazos. */
|
|
2
3
|
export interface HolidayResponseEntity {
|
|
3
4
|
id: string;
|
|
4
5
|
date: string;
|
|
5
6
|
name: string;
|
|
7
|
+
/** Cargado a mano o traído de la API pública de feriados. */
|
|
8
|
+
source: HolidaySource;
|
|
9
|
+
/** Como lo informa la API. Ej: «Civil e Irrenunciable». */
|
|
10
|
+
kind: string | null;
|
|
11
|
+
/** Uno de la API que se quitó a mano: no cuenta, y la próxima actualización no lo vuelve a agregar. */
|
|
12
|
+
excluded: boolean;
|
|
13
|
+
}
|
|
14
|
+
/** Feriados de un año y cuándo se trajeron de la API por última vez (`null` si nunca). */
|
|
15
|
+
export interface HolidayListResponseEntity {
|
|
16
|
+
holidays: HolidayResponseEntity[];
|
|
17
|
+
syncedAt: string | null;
|
|
6
18
|
}
|
|
7
19
|
export interface HolidayRemoveResponseEntity {
|
|
8
20
|
id: string;
|
|
9
21
|
ok: boolean;
|
|
10
22
|
}
|
|
23
|
+
/** Resultado de traer de la API los feriados de un año: los agregados, actualizados y quitados por la API. */
|
|
24
|
+
export interface HolidaySyncResponseEntity {
|
|
25
|
+
year: number;
|
|
26
|
+
added: number;
|
|
27
|
+
updated: number;
|
|
28
|
+
removed: number;
|
|
29
|
+
/** Cuántos informó la API para ese año. */
|
|
30
|
+
total: number;
|
|
31
|
+
syncedAt: string;
|
|
32
|
+
}
|
package/package.json
CHANGED
package/src/base/entities.ts
CHANGED
|
@@ -310,6 +310,13 @@ export const TextSnippetSection = {
|
|
|
310
310
|
Closing: 'Closing',
|
|
311
311
|
} satisfies Record<string, TextSnippetSection>;
|
|
312
312
|
|
|
313
|
+
export type HolidaySource = 'Manual' | 'Api';
|
|
314
|
+
|
|
315
|
+
export const HolidaySource = {
|
|
316
|
+
Manual: 'Manual',
|
|
317
|
+
Api: 'Api',
|
|
318
|
+
} satisfies Record<string, HolidaySource>;
|
|
319
|
+
|
|
313
320
|
export type WorkFolderItemKind = 'Document' | 'File';
|
|
314
321
|
|
|
315
322
|
export const WorkFolderItemKind = {
|
|
@@ -1144,7 +1151,17 @@ export interface HolidayEntity {
|
|
|
1144
1151
|
id: string;
|
|
1145
1152
|
date: string;
|
|
1146
1153
|
name: string;
|
|
1154
|
+
source: HolidaySource;
|
|
1155
|
+
kind?: string | null;
|
|
1156
|
+
excluded: boolean;
|
|
1147
1157
|
createdAt: string;
|
|
1158
|
+
updatedAt: string;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
export interface HolidaySyncEntity {
|
|
1162
|
+
year: number;
|
|
1163
|
+
syncedAt: string;
|
|
1164
|
+
total: number;
|
|
1148
1165
|
}
|
|
1149
1166
|
|
|
1150
1167
|
export interface TextSnippetEntity {
|
|
@@ -1,16 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
type HolidayListResponseEntity,
|
|
3
|
+
type HolidayRemoveResponseEntity,
|
|
4
|
+
type HolidayResponseEntity,
|
|
5
|
+
type HolidaySyncResponseEntity,
|
|
6
|
+
} from '../entities';
|
|
2
7
|
|
|
3
8
|
/** Patrones NATS de `holiday`: feriados para contar días hábiles. */
|
|
4
9
|
export const HolidayPatterns = {
|
|
5
10
|
getAll: 'gestorDocumental.holiday.getAll',
|
|
6
11
|
create: 'gestorDocumental.holiday.create',
|
|
7
12
|
remove: 'gestorDocumental.holiday.remove',
|
|
13
|
+
sync: 'gestorDocumental.holiday.sync',
|
|
8
14
|
} as const;
|
|
9
15
|
|
|
10
16
|
export interface HolidayContract {
|
|
11
|
-
/** Feriados de un año, en orden. */
|
|
12
|
-
[HolidayPatterns.getAll]: { payload: { year: number }; response:
|
|
13
|
-
/** `date` como «AAAA-MM-DD». */
|
|
17
|
+
/** Feriados de un año, en orden (también los de la API que se quitaron a mano). */
|
|
18
|
+
[HolidayPatterns.getAll]: { payload: { year: number }; response: HolidayListResponseEntity };
|
|
19
|
+
/** `date` como «AAAA-MM-DD». Si es uno de la API que se había quitado, vuelve a contar. */
|
|
14
20
|
[HolidayPatterns.create]: { payload: { date: string; name: string }; response: HolidayResponseEntity };
|
|
21
|
+
/** Uno cargado a mano se borra; uno de la API se marca como quitado. */
|
|
15
22
|
[HolidayPatterns.remove]: { payload: { id: string }; response: HolidayRemoveResponseEntity };
|
|
23
|
+
/** Trae de la API pública los feriados de un año. Lo cargado o quitado a mano se respeta. */
|
|
24
|
+
[HolidayPatterns.sync]: { payload: { year: number }; response: HolidaySyncResponseEntity };
|
|
16
25
|
}
|
|
@@ -1,11 +1,36 @@
|
|
|
1
|
+
import { type HolidaySource } from '../../base/entities';
|
|
2
|
+
|
|
1
3
|
/** Feriado: el día («AAAA-MM-DD») no cuenta como hábil en los plazos. */
|
|
2
4
|
export interface HolidayResponseEntity {
|
|
3
5
|
id: string;
|
|
4
6
|
date: string;
|
|
5
7
|
name: string;
|
|
8
|
+
/** Cargado a mano o traído de la API pública de feriados. */
|
|
9
|
+
source: HolidaySource;
|
|
10
|
+
/** Como lo informa la API. Ej: «Civil e Irrenunciable». */
|
|
11
|
+
kind: string | null;
|
|
12
|
+
/** Uno de la API que se quitó a mano: no cuenta, y la próxima actualización no lo vuelve a agregar. */
|
|
13
|
+
excluded: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Feriados de un año y cuándo se trajeron de la API por última vez (`null` si nunca). */
|
|
17
|
+
export interface HolidayListResponseEntity {
|
|
18
|
+
holidays: HolidayResponseEntity[];
|
|
19
|
+
syncedAt: string | null;
|
|
6
20
|
}
|
|
7
21
|
|
|
8
22
|
export interface HolidayRemoveResponseEntity {
|
|
9
23
|
id: string;
|
|
10
24
|
ok: boolean;
|
|
11
25
|
}
|
|
26
|
+
|
|
27
|
+
/** Resultado de traer de la API los feriados de un año: los agregados, actualizados y quitados por la API. */
|
|
28
|
+
export interface HolidaySyncResponseEntity {
|
|
29
|
+
year: number;
|
|
30
|
+
added: number;
|
|
31
|
+
updated: number;
|
|
32
|
+
removed: number;
|
|
33
|
+
/** Cuántos informó la API para ese año. */
|
|
34
|
+
total: number;
|
|
35
|
+
syncedAt: string;
|
|
36
|
+
}
|