import { ISignatureRequest, CadesType } from "../data"; /** * Interface for modifying digital signature requests. */ export interface ISignatureModifier { /** * Creates a new signature request with the given ID. * * @param signatureRequestId - The ID of the signature request to create. * @returns An instance of ISignatureBuilder for further configuration. */ create(signatureRequestId: string): ISignatureBuilder; /** * Edits an existing signature request with the given ID. * * @param signatureRequest - The signature request to edit. * @returns An instance of ISignatureBuilder for further configuration. */ edit(signatureRequest: ISignatureRequest): ISignatureBuilder; /** * Removes an existing signature request with the given ID. * * @param signatureRequestId - The ID of the signature request to remove. */ remove(signatureRequestId: string): void; } /** * Interface for building digital signature requests. */ export interface ISignatureBuilder { /** * Sets the position ID for the signature. * * @param positionId - The ID of the person position associated with the request. * @returns This instance of ISignatureBuilder for method chaining. */ withPositionId(positionId: number): ISignatureBuilder; /** * Sets the role for the signature. * * @param role - The role associated with the signature. * @returns This instance of ISignatureBuilder for method chaining. */ withRole(role: string): ISignatureBuilder; /** * Sets the flag sign for the signature. * * @param sign - The sign associated with the signature. * @returns This instance of ISignatureBuilder for method chaining. */ withSign(sign: string): ISignatureBuilder; /** * Sets the request signer for the signature. * * @param requestSigner - The request signer associated with the signature. * @returns This instance of ISignatureBuilder for method chaining. */ withRequestSigner(requestSigner: string): ISignatureBuilder; /** * Sets the object ID for the signature. * * @param objectId - The ID of the object associated with the signature. * @returns This instance of ISignatureBuilder for method chaining. */ withObjectId(objectId: string): ISignatureBuilder; /** * Set certificate's public key oid for the signature. * * @param publicKeyOid - certificate's public key oid. * @returns This instance of ISignatureBuilder for method chaining. */ withPublicKeyOid(publicKeyOid: string): ISignatureBuilder; /** * Set cades type of last signature. * * @param cadesType - cades type. * @returns This instance of ISignatureBuilder for method chaining. */ withLastSignCadesType(cadesType: CadesType): ISignatureBuilder; /** * Set requirement property for advancement of the signature. * * @param needAdvancement - signature needs advancement. * @returns This instance of ISignatureBuilder for method chaining. */ withIsAdvancementRequired(needAdvancement: boolean): ISignatureBuilder; }