Hierarchy

  • VersionAPI

Implements

Constructors

Properties

Methods

Constructors

  • Class which communicates with Veeva to manage document versions on the platform.

    Parameters

    • restAPI: RestAPI

      Rest API instance

    Returns VersionAPI

Properties

restAPI: RestAPI

Methods

  • Create a new version for a document in Veeva

    // 'uploadedContent' - Update the contents of the document by uploading a file
    const service = new VeevaService(credentials)
    await service.document.version.create(
    2000, 'uploadedContent', { file: 'updated_document.zip' }
    )
    // 'latestContent' - Keep the current document content, and release a new version
    const service = new VeevaService(credentials)
    await service.document.version.create(2000, 'latestContent', { name__v: 'Updated Name' })

    Returns

    Response from Veeva

    Parameters

    • id: number

      Id of the document

    • createDraft: CreateDraft

      Define which draft content to use

    • Optional data: IDocumentWithFile

      Document data to update

    Returns Promise<IVeevaResponse>

  • Delete a document version from Veeva.

    const service = new VeevaService(credentials)
    await service.document.version.delete(2000, 0, 1)

    Returns

    Response from Veeva

    Parameters

    • id: number

      Id of the document

    • majorVersion: number

      Major version of the document

    • minorVersion: number

      Minor version of the document

    Returns Promise<IVeevaResponse>

  • Update a specific document version in Veeva.

    const service = new VeevaService(credentials)
    await service.document.version.update(2000, 0, 1, { name__v: 'Updated Name' })

    Returns

    Response from Veeva

    Parameters

    • id: number

      Id of the document

    • majorVersion: number

      Major version of the document

    • minorVersion: number

      Minor version of the document

    • data: IDocument

      Document data to update

    Returns Promise<IVeevaResponse>

Generated using TypeDoc