Hierarchy

  • DigitalSigns

Methods

createDraft

  • Creates digital signature draft.

    The method creates a draft of a digital signature that allows you to store the state and the public key of a third-party provider. The process of issuing a digital signature usually takes some time. Making a draft allows
    being in synch with the external provider.

    Parameters

    • issueId: string

      External ID of the digital signature issued by the provider.

    • provider: SignProviderItem

      Object for identifying the digital signature provider.

    Returns Promise<DigitalSign>

    Digital signature certificate. Example:

     // The function  that creates a digital signature on the side of the external provider is  called 
     // The name of the `createDigitalSignInExternalProvider` function  is given as an example 
     const issueId = await  createDigitalSignInExternalProvider(); 
     // Digital signature provider 
      const provider = await System.signs.providers.search().where(f => f.__id.eq( '<some id>')).first(); 
     const digitalSign = await System.signs.digitalSigns. createDraft(issueId, provider); 
    

getLastRequest

  • The method returns the most recent request created by the current user.

    The method allows you to get the most recent digital signature certificate issuing request created by the user. This method is used to organize digital signature certificate issuing processes. For example, after a request is created, the issuing of a certificate later needs to be confirmed by entering a password or authorizing in an external service. To make it possible, we need to get the most recent request created by a user and ask the provider to send a password. In the example, we get the most recent request of the current user and request a password for it.

    Parameters

    Returns Promise<DigitalSign>

    Digital signature certificate.

    // Получение последней  созданной заявки 
    const providerItem = await System.signs.providers.search(). first(); 
    const provider = {namespace: providerItem?.data.namespace, code:  providerItem?.data.code!}; 
    const lastRequest = await System.signs. digitalSigns.getLastRequest(provider); 
    

search

  • Performs search by digital signatures.

    Using this method, you can:

    • Filter signatures by different parameters.
    • Search and get a specific item in the search results or the first one.
    • Sort search results.
    • Limit the amount of search results or see search results on several pages.

    Returns DigitalSignSearch

    Object used to make search queries to search for signatures. Example:

    const digitalSign = await System.signs.digitalSigns.search(). where(f => f.__id.eq('<some id>')).first();