- Home [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
- Getting started
- Use cases
-
API
- Object types
- Data types
- Global constants
- Work with apps
- Web requests
- Access permissions
- Document flow
- Live Chats
- “Code” widget
-
Signatures
- DigitalSignIdentificationType
- DigitalSignRequestStatus
- EntitySignOperationStatus
- SignStatus
- SignType
- SignTypes
- CertData
- CertNames
- DigitalSign
- DigitalSignActualizationData
- DigitalSignItemData
- DigitalSignProviderRef
- DigitalSignRequest
- DigitalSignSearch
- DigitalSigns
- EntitySign
- EntitySignItem
- EntitySignSearch
- EntitySigns
- EntityVersion
- NewSign
- SignData
- SignDetails
- SignProvider
- SignProviderItem
- SignProviderSearch
- SignProviders
- Signs
- SignHash
- SignedContent
- Business calendars
- Integration with IP telephony
- Integration with email marketing services
Data stored in an app item’s signature
Hierarchy
Properties
Readonly __createdAt
Date and time of creation.
Readonly __createdBy
Object’s author.
Optional Readonly __deletedAt
Date and time of deletion.
Readonly __id
ID of the object.
__name
Name of the object.
Readonly __updatedAt
Date and time of change.
Readonly __updatedBy
Author of the last change.
activationLink
Link to activate the certificate.
body
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
Public key of the digital signature in the
base24
format.comment
Comment to the signature.
content
Signed data.
createdAt
Date of creation.
hash
Hash calculated for the signed content.
Hash used to determine which file version was signed.
id
ID of the signature.
lastSyncTime
Date and time of the last synchronization of the signing status with the digital signature provider.
operationStatus
Document signing operation status.
phone
Phone number specified if signing is confirmed by phone.
provider
Digital signature provider used for signing data.
sign
Content of the calculated signature.
The field stores the signature’s body in the
base64
format.status
Signature status.
statusMessage
Message specifying the signature’s status.
The fields stores the comment to the current status of the signature.
type
Type of the calculated signature.
userID
ID of the user who signed the item.
validUntilAt
Date and time until which the certificate can be used to sign documents.
Methods
createAttributesFile
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
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
Используйте методы, описанные в 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>
Properties
Methods