Hierarchy

  • default
    • EmailTemplates

Constructors

  • Parameters

    Returns EmailTemplates

    const OneBlink = require('@oneblink/sdk')
    const options = {
    accessKey: '123455678901ABCDEFGHIJKL',
    secretKey: '123455678901ABCDEFGHIJKL123455678901ABCDEFGHIJKL',
    }
    const emailTemplates = new OneBlink.EmailTemplates(options)

Methods

  • Minimum Role Permission

    Email Templates: Manager

    Parameters

    Returns Promise<EmailTemplate>

    const data = {
    name: 'my template',
    organisationId: 'abc123',
    environments: [
    {
    template: 'My email template {{custom:my-custom-tag}}',
    formsAppEnvironmentId: 1,
    },
    ],
    type: 'FORM_SUBMISSION_EVENT_PDF',
    }
    const emailTemplate = await emailTemplates.createEmailTemplate(data)
    // Use emailTemplate here...
  • Minimum Role Permission

    Email Templates: Manager

    Parameters

    • id: number

      The id of the email template to delete

    Returns Promise<void>

    await emailTemplates.deleteEmailTemplate(1)
    
  • Minimum Role Permission

    Email Templates: Read Only

    Parameters

    • id: number

      The id of the email template

    Returns Promise<EmailTemplate>

    const emailTemplate = await emailTemplates.getEmailTemplate(1)
    // Use data here...
  • Minimum Role Permission

    Email Templates: Read Only

    Parameters

    Returns Promise<EmailTemplatesSearchResult>

    const searchParams = {
    limit: 1,
    offset: 0,
    }
    const { emailTemplates, meta } =
    await emailTemplates.searchEmailTemplates(searchParams)
  • Minimum Role Permission

    Email Templates: Manager

    Parameters

    Returns Promise<EmailTemplate>

    const data = {
    id: 1,
    name: 'my updated template',
    organisationId: 'abc123',
    environments: [
    {
    template: 'My email template {{custom:my-custom-tag}}',
    formsAppEnvironmentId: 1,
    },
    ],
    type: 'FORM_SUBMISSION_EVENT_PDF',
    }
    const emailTemplate = await emailTemplates.updateEmailTemplate(data)
    // Use emailTemplate here...