Install the Signplus Typescript SDK package

npm install @alohi/signplus-typescript

Call your first SDK method

import { CreateEnvelopeRequest, Signplus } from '@alohi/signplus-typescript';

(async () => {
  const signplus = new Signplus({
    token: 'YOUR_TOKEN',
  });

  const envelopeFlowType = EnvelopeFlowType.REQUESTSIGNATURE;

  const envelopeLegalityLevel = EnvelopeLegalityLevel.SES;

  const input: CreateEnvelopeRequest = {
    name: 'name',
    flowType: envelopeFlowType,
    legalityLevel: envelopeLegalityLevel,
    expiresAt: 1822567389015,
    comment: 'comment',
    sandbox: true,
  };

  const { data } = await signplus.signplus.createEnvelope(input);

  console.log(data);
})();