Hierarchy

Properties

Readonly __createdAt

__createdAt: TDatetime

Date and time of creation.

Readonly __createdBy

__createdBy: UserItemRef

Object’s author.

Optional Readonly __deletedAt

__deletedAt: TDatetime

Date and time of deletion.

Readonly __id

__id: string

ID of the object.

__name

__name: TString

Name of the object.

Readonly __updatedAt

__updatedAt: TDatetime

Date and time of change.

Readonly __updatedBy

__updatedBy: UserItemRef

Author of the last change.

activationLink

activationLink: string

Link to activate the certificate.

body

body: string

Signed data.

The field stores the signature’s body in the base24 format. If a file was signed, the field stores the ID of the file’s body, not the content.

cert

cert: string

Public key of the digital signature in the base24 format.

comment

comment: string

Comment to the signature.

content

content: SignedContent

Signed data.

createdAt

createdAt: string

Date of creation.

hash

hash: string

Hash calculated for the signed content.

Hash used to determine which file version was signed.

id

id: string

ID of the signature.

lastSyncTime

lastSyncTime: TDatetime

Date and time of the last synchronization of the signing status with the digital signature provider.

operationStatus

operationStatus: EntitySignOperationStatus

Document signing operation status.

phone

phone: PhoneField

Phone number specified if signing is confirmed by phone.

provider

provider: SignProvider

Digital signature provider used for signing data.

sign

sign: string

Content of the calculated signature.

The field stores the signature’s body in the base64 format.

status

status: SignStatus

Signature status.

statusMessage

statusMessage: string

Message specifying the signature’s status.

The fields stores the comment to the current status of the signature.

type

type: SignType

Type of the calculated signature.

userID

userID: string

ID of the user who signed the item.

validUntilAt

validUntilAt: TDatetime

Date and time until which the certificate can be used to sign documents.

Methods

createAttributesFile

  • createAttributesFile(): Promise<FileItem | undefined>
  • obsolete

    Use methods in EntitySignItem. The method generates a file from the signed app item attributes. It returns the values of the signed attributes as a file. The example shows how to extract all attribute signatures of an app item:

    // The signature's ID is stored in the context  
    const signId = Context.data.signId; 
    if (!signId) { 
        throw new Error( 'Signature ID not found'); 
    } 
    // Search for the signature by ID 
    const sign  = await System.signs.entitySigns.search().where(q => q.__id.eq(signId)). first(); 
    if(!sign) { 
        throw new Error('Signature not found'); 
    } 
    //  Signature files request 
    const awaitSigns = sign.signs.map(signData =>  signData.createAttributesFile()); 
    // Wait for the requests to finish  
    Context.data.signFiles = await Promise.all(awaitSigns); 
    

    Returns Promise<FileItem | undefined>

    File with the attributes of an app item that have been signed.

createSignFile

  • obsolete

    Use methods in EntitySignItem. The method generates a file with a signature. It is used to get a signature’s body as a file. The example shows how to extract all file signatures of an app item:

    //  The signature's ID is stored in the context  
    const signId = Context.data. signId; 
    if (!signId) { 
        throw new Error('Signature ID not found'); 
    }  
    // Search for the signature by ID 
    const sign = await System.signs. entitySigns.search().where(q => q.__id.eq(signId)).first(); 
    if(!sign) {  
        throw new Error('Signature not found'); 
    } 
    // Request signature files  
    const awaitSigns = sign.signs.map(signData => signData.createSignFile());  
    // Wait for the requests to finish 
    Context.data.signFiles = await Promise. all(awaitSigns); 
    

    Returns Promise<FileItem>

    File with the signature.

getDetails

  • obsolete

    Используйте методы, описанные в EntitySignItem.

    Метод получает детальную информацию о подписи.

    Возвращает подробную информацию о подписи и публичном ключе, с помощью которого она вычислена. Из публичного ключа извлекаются атрибуты выдавшего и получившего сертификат, а также даты действия, название и номер публичного ключа. Атрибуты именуются в соответствии с RFC 2253, однако атрибуты, не входящие в список стандартных CertNames, не кодируются в формат hex.

    В примере извлекается детальная информация о подписи для сохранения серийного номера сертификата в контекст процесса:

    // Идентификатор подписи хранится в контексте
    const signId = Context.data.signId;
    if (!signId) {
        throw new Error('Идентификатор подписи не найден');
    }
    // Поиск подписи по идентификатору
    const sign = await System.signs.entitySigns.search().where(q => q.__id.eq(signId)).first();
    if(!sign) {
        throw new Error('Подпись не найдена');
    }
    // Извлечение последней подписи из истории
    const lastSign = sign.signs[0];
    if (!lastSign) {
        throw new Error('Необходима подпись для извлечения детальной информации');
    }
    // Извлечение деталей подписи
    const signDetails = await lastSign.getDetails();
    // Сохранение серийного номера сертификата в контекст
    Context.data.certificateId = signDetails.certSerialNumber;
    

    Returns Promise<SignDetails>