@oneblink/sdk
    Preparing search index...

    Class FormElementLookups

    Hierarchy

    • default
      • FormElementLookups
    Index

    Constructors

    • Parameters

      Returns FormElementLookups

      import { FormElementLookups } from '@oneblink/sdk'
      const options = {
      accessKey: '123455678901ABCDEFGHIJKL',
      secretKey: '123455678901ABCDEFGHIJKL123455678901ABCDEFGHIJKL',
      }
      const formElementLookups = new FormElementLookups(options)

    Methods

    • Minimum Role Permission

      Lookups: Manager

      Parameters

      Returns Promise<FormElementLookup>

      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
    • Minimum Role Permission

      Lookups: Manager

      Parameters

      • id: number

        The id of the lookup to delete

      Returns Promise<void>

      const lookupId = 7
      await formElementLookups.deleteFormElementLookup(lookupId)
    • Minimum Role Permission

      Lookups: Read Only

      Parameters

      • id: number

        The exact id of the lookup you wish to get

      Returns Promise<FormElementLookup>

      const lookupId = 1
      const lookup = await formElementLookups.getFormElementLookup(lookupId)
      // Use lookup here
    • Minimum Role Permission

      Lookups: Read Only

      Parameters

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

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

      Returns Promise<FormElementLookupSearchResult>

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

      Lookups: Manager

      Parameters

      Returns Promise<FormElementLookup>

      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