UNPKG

@universis/common

Version:

Universis - common directives and services

63 lines (62 loc) 2.12 kB
import { OnInit } from '@angular/core'; import { X509 } from 'jsrsasign'; import { CertificateService } from '../../services/certificate-service/certificate-service.service'; import { BsModalRef } from 'ngx-bootstrap/modal'; import { TranslateService } from '@ngx-translate/core'; /** * * @interface SignatureAttribute * * @property {string} translationKey The translation key to show to the user * @property {string} value The value to show to the user * @property {object} Validation data. isValid is the validation status, showValidation indicates whether to show the validation * */ interface SignatureAttribute { translationKey: string; value: string; validation?: { isValid: boolean; showValidation: boolean; }; } export declare class SignatureInfoComponent implements OnInit { private _bsModalRef; private _certificateService; private _translateService; /** * @property {Object} user The user who submitted the exam document */ user: any; /** * @property {boolean} isVerified A flag to indicate whether the signature was * verified at least once on server side. Can be use to show to the user that * the signature was accepted at some point in the past even if the certificate is expired. */ isVerified: boolean; certificate: string; signatureBlock: string; checkHashKey: string; examinationCode: string; dateCreated: Date; /** * @property The list of attributes to show to the user */ signatureAttributes: SignatureAttribute[]; tab: number; generalAttributes: SignatureAttribute[]; purposes: Array<any>; constructor(_bsModalRef: BsModalRef, _certificateService: CertificateService, _translateService: TranslateService); ngOnInit(): Promise<void>; /** * * Resolves a certificate to usable fields * * @param {X509} certificate The X509 object certificate * */ resolveAttributes(certificate: X509): any[]; getGeneralAttributes(certificate: any): SignatureAttribute[]; hideCertificateModal(): void; } export {};