Hierarchy

  • default
    • FormElementLookups

Constructors

  • Example

    import { FormElementLookups } from '@oneblink/sdk'

    const options = {
    accessKey: '123455678901ABCDEFGHIJKL',
    secretKey: '123455678901ABCDEFGHIJKL123455678901ABCDEFGHIJKL',
    }
    const formElementLookups = new FormElementLookups(options)

    Parameters

    Returns FormElementLookups

Methods

  • Example

    const newLookup = {
    name: 'My New Lookup',
    environments: [
    {
    formsAppEnvironmentId: 1,
    urL: 'https://my-url.com/lookup',
    },
    ],
    type: 'DATA',
    organisationId: '',
    }
    const createdLookup = await lookups.createFormElementLookup(newLookup)
    // Use lookup here

    Parameters

    Returns Promise<FormElementLookup>

  • Example

    const lookupId = 7
    await formElementLookups.deleteFormElementLookup(lookupId)

    Parameters

    • id: number

      The id of the lookup to delete

    Returns Promise<void>

  • Example

    const lookupId = 1
    const lookup = await formElementLookups.getFormElementLookup(lookupId)
    // Use lookup here

    Parameters

    • id: number

      The exact id of the lookup you wish to get

    Returns Promise<FormElementLookup>

  • Example

    const organisationId = '2i4321a7n2389a2700065425'
    const lookups = await formElementLookups.searchFormElementLookups({
    organisationId,
    limit: 50,
    offset: 0,
    })
    // Use lookups here

    Parameters

    • options: {
          limit?: number;
          offset?: number;
          organisationId: string;
      }
      • Optional limit?: number
      • Optional offset?: number
      • organisationId: string

        The exact id of organisation associated with the lookups you wish to search

    Returns Promise<FormElementLookupSearchResult>

  • Example

    const lookup = {
    id: 1,
    createdAt: '2023-06-28T02:00:03.000Z',
    updatedAt: '2023-06-28T02:00:03.000Z',
    name: 'My New Lookup',
    environments: [
    {
    formsAppEnvironmentId: 1,
    url: 'https://my-url.com/lookup',
    },
    ],
    type: 'DATA',
    organisationId: '',
    }
    const updatedLookup = await formElementLookups.updateFormElementLookup(
    lookup,
    )
    // Use lookup here

    Parameters

    Returns Promise<FormElementLookup>