UNPKG

boldsign

Version:

NodeJS client for boldsign

19 lines (17 loc) 711 B
import { DocumentApi } from '../api/documentApi'; import { EmbeddedDocumentEditJsonRequest } from '../model'; const documentApi = new DocumentApi(); documentApi.setApiKey("API_KEY"); var editRequest = new EmbeddedDocumentEditJsonRequest(); editRequest.locale = EmbeddedDocumentEditJsonRequest.LocaleEnum.En; editRequest.showToolbar = true; editRequest.redirectUrl = "https://yourapp.com/redirect"; async function editDocument() { try { var editUrl = await documentApi.createEmbeddedEditUrl("DOCUMENT_ID",editRequest) console.log("Embedded Edit URL:", editUrl); } catch (error:any) { console.error("Error occurred while calling the API:", error.message); } } editDocument();