@muni-sanfer/types-gestor-documental 0.0.1-beta.57 → 0.0.1-beta.59
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 +8 -0
- package/dist/base/entities.js +6 -2
- package/dist/contracts/document.contract.d.ts +2 -1
- package/dist/contracts/documentType.contract.d.ts +2 -1
- package/dist/entities/document/document.entity.d.ts +5 -0
- package/dist/entities/document/index.d.ts +1 -0
- package/dist/entities/document/index.js +1 -0
- package/dist/entities/document/stampPlacement.d.ts +42 -0
- package/dist/entities/document/stampPlacement.js +16 -0
- package/dist/entities/documentType/documentType.entity.d.ts +1 -0
- package/package.json +1 -1
- package/src/base/entities.ts +10 -0
- package/src/contracts/document.contract.ts +3 -0
- package/src/contracts/documentType.contract.ts +3 -0
- package/src/entities/document/document.entity.ts +5 -0
- package/src/entities/document/index.ts +1 -0
- package/src/entities/document/stampPlacement.ts +35 -0
- package/src/entities/documentType/documentType.entity.ts +2 -0
package/dist/base/entities.d.ts
CHANGED
|
@@ -4,6 +4,11 @@ export declare const DocumentCategory: {
|
|
|
4
4
|
Communication: "Communication";
|
|
5
5
|
Other: "Other";
|
|
6
6
|
};
|
|
7
|
+
export type DocumentVisaMode = 'Stamp' | 'Signature';
|
|
8
|
+
export declare const DocumentVisaMode: {
|
|
9
|
+
Stamp: "Stamp";
|
|
10
|
+
Signature: "Signature";
|
|
11
|
+
};
|
|
7
12
|
export type DocumentNumberingScope = 'Type' | 'Category';
|
|
8
13
|
export declare const DocumentNumberingScope: {
|
|
9
14
|
Type: "Type";
|
|
@@ -452,6 +457,7 @@ export interface DocumentTypeEntity {
|
|
|
452
457
|
numberingScope: DocumentNumberingScope;
|
|
453
458
|
allowsExternalNumber: boolean;
|
|
454
459
|
usesPartsOffice: boolean;
|
|
460
|
+
visaMode: DocumentVisaMode;
|
|
455
461
|
activeTransparency: boolean;
|
|
456
462
|
transparencySection?: string | null;
|
|
457
463
|
directorateCodeReference?: number | null;
|
|
@@ -518,6 +524,7 @@ export interface DocumentEntity {
|
|
|
518
524
|
departmentId?: string | null;
|
|
519
525
|
issuingUnitName?: string | null;
|
|
520
526
|
issuingDirectorateName?: string | null;
|
|
527
|
+
stampPlacements?: JsonValue | null;
|
|
521
528
|
selfValidated: boolean;
|
|
522
529
|
selfValidationNote?: string | null;
|
|
523
530
|
createdByEmployeeId: string;
|
|
@@ -684,6 +691,7 @@ export interface DocumentTypeVersionEntity {
|
|
|
684
691
|
numberingScope: DocumentNumberingScope;
|
|
685
692
|
allowsExternalNumber: boolean;
|
|
686
693
|
usesPartsOffice: boolean;
|
|
694
|
+
visaMode: DocumentVisaMode;
|
|
687
695
|
activeTransparency: boolean;
|
|
688
696
|
transparencySection?: string | null;
|
|
689
697
|
directorateCodeReference?: number | null;
|
package/dist/base/entities.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
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 = exports.DeskFileSource = exports.DataBreachNoticeMeans = exports.DataBreachEventAction = void 0;
|
|
4
|
+
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.DraftReviewStage = exports.DocumentTrackingAction = exports.DocumentParticipantStatus = exports.DocumentParticipantRole = exports.DocumentAccessLevel = exports.DocumentStatus = exports.DocumentNumberingScope = exports.DocumentVisaMode = exports.DocumentCategory = void 0;
|
|
5
|
+
exports.DraftingRequestEventAction = exports.DraftingRequestStatus = exports.MailAuthentication = exports.MailIntakeStatus = exports.DeskFileTarget = exports.DeskFileSource = exports.DataBreachNoticeMeans = exports.DataBreachEventAction = exports.DataBreachStatus = void 0;
|
|
6
6
|
exports.DocumentCategory = {
|
|
7
7
|
Decree: 'Decree',
|
|
8
8
|
Communication: 'Communication',
|
|
9
9
|
Other: 'Other',
|
|
10
10
|
};
|
|
11
|
+
exports.DocumentVisaMode = {
|
|
12
|
+
Stamp: 'Stamp',
|
|
13
|
+
Signature: 'Signature',
|
|
14
|
+
};
|
|
11
15
|
exports.DocumentNumberingScope = {
|
|
12
16
|
Type: 'Type',
|
|
13
17
|
Category: 'Category',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DocumentAccessAction, type DocumentAccessLevel, type DocumentAttachmentEntity, type DocumentDeliveryEntity, type DocumentEntity, type DocumentInstruction, type DocumentParticipantEntity, type DocumentStatus } from '../base/entities';
|
|
2
|
-
import { type DocumentAnnulResponseEntity, type DocumentCloseDeliveryResponseEntity, type DocumentCreateResponseEntity, type DocumentDeriveResponseEntity, type DocumentDiscardResponseEntity, type DocumentEmailCopyIssuedEntity, type DocumentEmailCopyViewEntity, type DocumentReminderEntity, type DocumentGetAllResponseEntity, type DocumentGetByIdResponseEntity, type DocumentGetSummaryResponseEntity, type DocumentInboxItemEntity, type DocumentPublicFileResponseEntity, type DocumentReassignResponseEntity, type DocumentReviewResponseEntity, type DocumentSignManyResponseEntity, type DocumentAgendaResponseEntity, type DocumentComposeResponseEntity, type DocumentComposition, type DocumentTrailExportEntity, type DocumentUpdateResponseEntity, type DocumentVerifyResponseEntity, type DocumentCommentResponseEntity, type DocumentCommentsResponseEntity, type DocumentVersionResponseEntity, type DocumentDraftCorrectionResponseEntity, type DocumentDraftReviewResponseEntity } from '../entities';
|
|
2
|
+
import { type DocumentAnnulResponseEntity, type DocumentCloseDeliveryResponseEntity, type DocumentCreateResponseEntity, type DocumentDeriveResponseEntity, type DocumentDiscardResponseEntity, type DocumentEmailCopyIssuedEntity, type DocumentEmailCopyViewEntity, type DocumentReminderEntity, type DocumentGetAllResponseEntity, type DocumentGetByIdResponseEntity, type DocumentGetSummaryResponseEntity, type DocumentInboxItemEntity, type DocumentPublicFileResponseEntity, type DocumentReassignResponseEntity, type DocumentReviewResponseEntity, type DocumentSignManyResponseEntity, type DocumentAgendaResponseEntity, type DocumentComposeResponseEntity, type DocumentComposition, type DocumentTrailExportEntity, type DocumentUpdateResponseEntity, type DocumentVerifyResponseEntity, type DocumentCommentResponseEntity, type DocumentCommentsResponseEntity, type DocumentVersionResponseEntity, type DocumentDraftCorrectionResponseEntity, type DocumentStampPlacements, type DocumentDraftReviewResponseEntity } from '../entities';
|
|
3
3
|
import { type RpcPage } from './contract';
|
|
4
4
|
/** Patrones NATS de `document`: `<servicio>.<recurso>.<acción>`. */
|
|
5
5
|
export declare const DocumentPatterns: {
|
|
@@ -93,6 +93,7 @@ export interface DocumentWritePayload extends Pick<DocumentEntity, 'subject' | '
|
|
|
93
93
|
departmentId?: string | null;
|
|
94
94
|
issuingUnitName?: string | null;
|
|
95
95
|
issuingDirectorateName?: string | null;
|
|
96
|
+
stampPlacements?: DocumentStampPlacements | null;
|
|
96
97
|
selfValidated?: boolean;
|
|
97
98
|
selfValidationNote?: string | null;
|
|
98
99
|
externalCorrelative?: number | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type DocumentCategory, type DocumentNumberingScope, type DocumentParticipantRole, type DocumentTypeEntity } from '../base/entities';
|
|
1
|
+
import { type DocumentCategory, type DocumentNumberingScope, type DocumentVisaMode, type DocumentParticipantRole, type DocumentTypeEntity } from '../base/entities';
|
|
2
2
|
import { type CategoryNumberingResponseEntity, type CategoryNumberingUpdateResponseEntity, type DocumentTemplateContent, type DocumentTypeCreateResponseEntity, type DocumentTypeGetAllResponseEntity, type DocumentTypeGetByIdResponseEntity, type DocumentTypeUpdateResponseEntity } from '../entities';
|
|
3
3
|
import { type RpcPage } from './contract';
|
|
4
4
|
/** Patrones NATS de `documentType`: `<servicio>.<recurso>.<acción>`. */
|
|
@@ -40,6 +40,7 @@ export interface DocumentTypeWritePayload {
|
|
|
40
40
|
numberingScope?: DocumentNumberingScope;
|
|
41
41
|
allowsExternalNumber?: boolean;
|
|
42
42
|
usesPartsOffice?: boolean;
|
|
43
|
+
visaMode?: DocumentVisaMode;
|
|
43
44
|
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
44
45
|
activeTransparency?: boolean;
|
|
45
46
|
transparencySection?: string | null;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type CommunicationMeans, DocumentAnnulledNumberEntity, DocumentAttachmentEntity, DocumentDeliveryEntity, DocumentEntity, DocumentParticipantEntity, DocumentRecipientEntity, type DocumentStatus, DocumentTrackingEntity, DocumentTypeEntity } from '../../base/entities';
|
|
2
2
|
import { type RichLetterhead, type RichPage, type RichSpacing, type RichTextStyle } from './richStyle';
|
|
3
3
|
import { type DocumentDraftingRequestEntity } from '../draftingRequest/draftingRequest.entity';
|
|
4
|
+
import { type DocumentStampPlacements } from './stampPlacement';
|
|
4
5
|
/** Tipo documental de un documento, con lo necesario para citarlo. */
|
|
5
6
|
export interface DocumentTypeSummaryEntity {
|
|
6
7
|
id: DocumentTypeEntity['id'];
|
|
@@ -213,6 +214,8 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
213
214
|
draftReview: DocumentDraftReviewInfoEntity | null;
|
|
214
215
|
/** Se subió como validado: no pasó por la revisión del tipo. */
|
|
215
216
|
selfValidation: DocumentSelfValidationEntity | null;
|
|
217
|
+
/** Dónde van las visaciones y las firmas, si quien redacta las ubicó; `null`, las ubica el sistema. */
|
|
218
|
+
stampPlacements: DocumentStampPlacements | null;
|
|
216
219
|
/** Solicitud de redacción que atiende, si se redactó a pedido de otra área. */
|
|
217
220
|
draftingRequest: DocumentDraftingRequestEntity | null;
|
|
218
221
|
replies: DocumentLinkEntity[];
|
|
@@ -239,6 +242,8 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
239
242
|
version: number;
|
|
240
243
|
current: boolean;
|
|
241
244
|
} | null;
|
|
245
|
+
/** Cómo se visa: con el sello del sistema o con la firma electrónica desatendida de cada visador (sin OTP). */
|
|
246
|
+
visaMode: DocumentTypeEntity['visaMode'];
|
|
242
247
|
participants: DocumentParticipantResponseEntity[];
|
|
243
248
|
attachments: {
|
|
244
249
|
id: DocumentAttachmentEntity['id'];
|
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./document.entity"), exports);
|
|
18
18
|
__exportStar(require("./richStyle"), exports);
|
|
19
|
+
__exportStar(require("./stampPlacement"), exports);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ubicación de un sello (una visación o una firma) que quien redacta fijó sobre el PDF: la página (desde 1) y el
|
|
3
|
+
* recuadro, en puntos PDF desde la esquina superior izquierda de esa página.
|
|
4
|
+
*/
|
|
5
|
+
export interface StampBox {
|
|
6
|
+
page: number;
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Dónde van las visaciones y las firmas de un documento, en el orden de sus turnos. Sin ellas (`null`), el sistema las
|
|
14
|
+
* ubica solo: al pie de la última página o en una hoja de firmas.
|
|
15
|
+
*/
|
|
16
|
+
export interface DocumentStampPlacements {
|
|
17
|
+
visas: StampBox[];
|
|
18
|
+
signatures: StampBox[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Tamaños que admite cada sello, en puntos. La firma conserva la proporción de la imagen que dibuja FirmaGob (su alto
|
|
22
|
+
* sale del ancho); la visación lleva sus cuatro líneas de texto.
|
|
23
|
+
*/
|
|
24
|
+
export declare const STAMP_PLACEMENT_LIMITS: {
|
|
25
|
+
/** Ancho sobre alto del sello de firma (la imagen de firmas-ms mide ~2084x835 px). */
|
|
26
|
+
readonly signatureAspect: number;
|
|
27
|
+
readonly signature: {
|
|
28
|
+
readonly minWidth: 90;
|
|
29
|
+
readonly maxWidth: 260;
|
|
30
|
+
readonly defaultWidth: 130;
|
|
31
|
+
};
|
|
32
|
+
readonly visa: {
|
|
33
|
+
readonly minWidth: 80;
|
|
34
|
+
readonly maxWidth: 220;
|
|
35
|
+
readonly minHeight: 34;
|
|
36
|
+
readonly maxHeight: 70;
|
|
37
|
+
readonly defaultWidth: 130;
|
|
38
|
+
readonly defaultHeight: 34;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
/** Alto del sello de firma para un ancho dado: el de su proporción. */
|
|
42
|
+
export declare const signatureHeightFor: (width: number) => number;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.signatureHeightFor = exports.STAMP_PLACEMENT_LIMITS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Tamaños que admite cada sello, en puntos. La firma conserva la proporción de la imagen que dibuja FirmaGob (su alto
|
|
6
|
+
* sale del ancho); la visación lleva sus cuatro líneas de texto.
|
|
7
|
+
*/
|
|
8
|
+
exports.STAMP_PLACEMENT_LIMITS = {
|
|
9
|
+
/** Ancho sobre alto del sello de firma (la imagen de firmas-ms mide ~2084x835 px). */
|
|
10
|
+
signatureAspect: 2084 / 835,
|
|
11
|
+
signature: { minWidth: 90, maxWidth: 260, defaultWidth: 130 },
|
|
12
|
+
visa: { minWidth: 80, maxWidth: 220, minHeight: 34, maxHeight: 70, defaultWidth: 130, defaultHeight: 34 },
|
|
13
|
+
};
|
|
14
|
+
/** Alto del sello de firma para un ancho dado: el de su proporción. */
|
|
15
|
+
const signatureHeightFor = (width) => Math.round((width / exports.STAMP_PLACEMENT_LIMITS.signatureAspect) * 100) / 100;
|
|
16
|
+
exports.signatureHeightFor = signatureHeightFor;
|
|
@@ -25,6 +25,7 @@ export interface DocumentTypeGetAllResponseEntity {
|
|
|
25
25
|
numberingScope: DocumentTypeEntity['numberingScope'];
|
|
26
26
|
allowsExternalNumber: DocumentTypeEntity['allowsExternalNumber'];
|
|
27
27
|
usesPartsOffice: DocumentTypeEntity['usesPartsOffice'];
|
|
28
|
+
visaMode: DocumentTypeEntity['visaMode'];
|
|
28
29
|
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
29
30
|
activeTransparency: DocumentTypeEntity['activeTransparency'];
|
|
30
31
|
transparencySection: DocumentTypeEntity['transparencySection'];
|
package/package.json
CHANGED
package/src/base/entities.ts
CHANGED
|
@@ -8,6 +8,13 @@ export const DocumentCategory = {
|
|
|
8
8
|
Other: 'Other',
|
|
9
9
|
} satisfies Record<string, DocumentCategory>;
|
|
10
10
|
|
|
11
|
+
export type DocumentVisaMode = 'Stamp' | 'Signature';
|
|
12
|
+
|
|
13
|
+
export const DocumentVisaMode = {
|
|
14
|
+
Stamp: 'Stamp',
|
|
15
|
+
Signature: 'Signature',
|
|
16
|
+
} satisfies Record<string, DocumentVisaMode>;
|
|
17
|
+
|
|
11
18
|
export type DocumentNumberingScope = 'Type' | 'Category';
|
|
12
19
|
|
|
13
20
|
export const DocumentNumberingScope = {
|
|
@@ -664,6 +671,7 @@ export interface DocumentTypeEntity {
|
|
|
664
671
|
numberingScope: DocumentNumberingScope;
|
|
665
672
|
allowsExternalNumber: boolean;
|
|
666
673
|
usesPartsOffice: boolean;
|
|
674
|
+
visaMode: DocumentVisaMode;
|
|
667
675
|
activeTransparency: boolean;
|
|
668
676
|
transparencySection?: string | null;
|
|
669
677
|
directorateCodeReference?: number | null;
|
|
@@ -731,6 +739,7 @@ export interface DocumentEntity {
|
|
|
731
739
|
departmentId?: string | null;
|
|
732
740
|
issuingUnitName?: string | null;
|
|
733
741
|
issuingDirectorateName?: string | null;
|
|
742
|
+
stampPlacements?: JsonValue | null;
|
|
734
743
|
selfValidated: boolean;
|
|
735
744
|
selfValidationNote?: string | null;
|
|
736
745
|
createdByEmployeeId: string;
|
|
@@ -906,6 +915,7 @@ export interface DocumentTypeVersionEntity {
|
|
|
906
915
|
numberingScope: DocumentNumberingScope;
|
|
907
916
|
allowsExternalNumber: boolean;
|
|
908
917
|
usesPartsOffice: boolean;
|
|
918
|
+
visaMode: DocumentVisaMode;
|
|
909
919
|
activeTransparency: boolean;
|
|
910
920
|
transparencySection?: string | null;
|
|
911
921
|
directorateCodeReference?: number | null;
|
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
type DocumentCommentsResponseEntity,
|
|
36
36
|
type DocumentVersionResponseEntity,
|
|
37
37
|
type DocumentDraftCorrectionResponseEntity,
|
|
38
|
+
type DocumentStampPlacements,
|
|
38
39
|
type DocumentDraftReviewResponseEntity,
|
|
39
40
|
} from '../entities';
|
|
40
41
|
import { type RpcPage } from './contract';
|
|
@@ -136,6 +137,8 @@ export interface DocumentWritePayload extends Pick<DocumentEntity, 'subject' | '
|
|
|
136
137
|
// Nombres del área responsable y de su dirección: los pone el gateway, no el navegador.
|
|
137
138
|
issuingUnitName?: string | null;
|
|
138
139
|
issuingDirectorateName?: string | null;
|
|
140
|
+
// Dónde van las visaciones y las firmas sobre el PDF, en el orden de sus turnos; sin valor, las ubica el sistema.
|
|
141
|
+
stampPlacements?: DocumentStampPlacements | null;
|
|
139
142
|
// PDF subido que quien redacta declara validado, con su justificación: no pasa por la revisión que exige el tipo.
|
|
140
143
|
selfValidated?: boolean;
|
|
141
144
|
selfValidationNote?: string | null;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
type DocumentCategory,
|
|
3
3
|
type DocumentNumberingScope,
|
|
4
|
+
type DocumentVisaMode,
|
|
4
5
|
type DocumentParticipantRole,
|
|
5
6
|
type DocumentTypeEntity,
|
|
6
7
|
} from '../base/entities';
|
|
@@ -56,6 +57,8 @@ export interface DocumentTypeWritePayload {
|
|
|
56
57
|
allowsExternalNumber?: boolean;
|
|
57
58
|
// Pasa por Oficina de Partes (por omisión, sí). Sin ella, el documento solo se firma: va solo a funcionarios y áreas.
|
|
58
59
|
usesPartsOffice?: boolean;
|
|
60
|
+
// Cómo visan sus documentos (por omisión, con el sello del sistema).
|
|
61
|
+
visaMode?: DocumentVisaMode;
|
|
59
62
|
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
60
63
|
activeTransparency?: boolean;
|
|
61
64
|
transparencySection?: string | null;
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
} from '../../base/entities';
|
|
13
13
|
import { type RichLetterhead, type RichPage, type RichSpacing, type RichTextStyle } from './richStyle';
|
|
14
14
|
import { type DocumentDraftingRequestEntity } from '../draftingRequest/draftingRequest.entity';
|
|
15
|
+
import { type DocumentStampPlacements } from './stampPlacement';
|
|
15
16
|
|
|
16
17
|
/** Tipo documental de un documento, con lo necesario para citarlo. */
|
|
17
18
|
export interface DocumentTypeSummaryEntity {
|
|
@@ -246,6 +247,8 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
246
247
|
draftReview: DocumentDraftReviewInfoEntity | null;
|
|
247
248
|
/** Se subió como validado: no pasó por la revisión del tipo. */
|
|
248
249
|
selfValidation: DocumentSelfValidationEntity | null;
|
|
250
|
+
/** Dónde van las visaciones y las firmas, si quien redacta las ubicó; `null`, las ubica el sistema. */
|
|
251
|
+
stampPlacements: DocumentStampPlacements | null;
|
|
249
252
|
/** Solicitud de redacción que atiende, si se redactó a pedido de otra área. */
|
|
250
253
|
draftingRequest: DocumentDraftingRequestEntity | null;
|
|
251
254
|
replies: DocumentLinkEntity[];
|
|
@@ -268,6 +271,8 @@ export interface DocumentGetByIdResponseEntity {
|
|
|
268
271
|
// Versión del tipo con que se tramita: la vigente mientras es borrador; desde que se envía, queda fija. `null` si
|
|
269
272
|
// el tipo ya no la tiene registrada.
|
|
270
273
|
documentTypeVersion: { version: number; current: boolean } | null;
|
|
274
|
+
/** Cómo se visa: con el sello del sistema o con la firma electrónica desatendida de cada visador (sin OTP). */
|
|
275
|
+
visaMode: DocumentTypeEntity['visaMode'];
|
|
271
276
|
participants: DocumentParticipantResponseEntity[];
|
|
272
277
|
attachments: {
|
|
273
278
|
id: DocumentAttachmentEntity['id'];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ubicación de un sello (una visación o una firma) que quien redacta fijó sobre el PDF: la página (desde 1) y el
|
|
3
|
+
* recuadro, en puntos PDF desde la esquina superior izquierda de esa página.
|
|
4
|
+
*/
|
|
5
|
+
export interface StampBox {
|
|
6
|
+
page: number;
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Dónde van las visaciones y las firmas de un documento, en el orden de sus turnos. Sin ellas (`null`), el sistema las
|
|
15
|
+
* ubica solo: al pie de la última página o en una hoja de firmas.
|
|
16
|
+
*/
|
|
17
|
+
export interface DocumentStampPlacements {
|
|
18
|
+
visas: StampBox[];
|
|
19
|
+
signatures: StampBox[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Tamaños que admite cada sello, en puntos. La firma conserva la proporción de la imagen que dibuja FirmaGob (su alto
|
|
24
|
+
* sale del ancho); la visación lleva sus cuatro líneas de texto.
|
|
25
|
+
*/
|
|
26
|
+
export const STAMP_PLACEMENT_LIMITS = {
|
|
27
|
+
/** Ancho sobre alto del sello de firma (la imagen de firmas-ms mide ~2084x835 px). */
|
|
28
|
+
signatureAspect: 2084 / 835,
|
|
29
|
+
signature: { minWidth: 90, maxWidth: 260, defaultWidth: 130 },
|
|
30
|
+
visa: { minWidth: 80, maxWidth: 220, minHeight: 34, maxHeight: 70, defaultWidth: 130, defaultHeight: 34 },
|
|
31
|
+
} as const;
|
|
32
|
+
|
|
33
|
+
/** Alto del sello de firma para un ancho dado: el de su proporción. */
|
|
34
|
+
export const signatureHeightFor = (width: number): number =>
|
|
35
|
+
Math.round((width / STAMP_PLACEMENT_LIMITS.signatureAspect) * 100) / 100;
|
|
@@ -35,6 +35,8 @@ export interface DocumentTypeGetAllResponseEntity {
|
|
|
35
35
|
// Pasa por Oficina de Partes: sus documentos pueden ir a otras instituciones y con copias por correo. Sin ella,
|
|
36
36
|
// solo se firman y van a funcionarios y áreas de la municipalidad.
|
|
37
37
|
usesPartsOffice: DocumentTypeEntity['usesPartsOffice'];
|
|
38
|
+
// Cómo visan sus documentos: con el sello del sistema o con la firma electrónica desatendida de cada visador.
|
|
39
|
+
visaMode: DocumentTypeEntity['visaMode'];
|
|
38
40
|
/** Transparencia Activa: sus documentos se publican cada mes, en esta sección del Portal. */
|
|
39
41
|
activeTransparency: DocumentTypeEntity['activeTransparency'];
|
|
40
42
|
transparencySection: DocumentTypeEntity['transparencySection'];
|