Hierarchy

Implements

Constructors

Properties

Methods

Constructors

  • Base API Class which communicates with Veeva to manage document relationships on the platform.

    Parameters

    • restAPI: RestAPI

      Rest API instance

    • contentType: "documents" | "binders"

      The type of content to manage

    Returns BaseRelationshipAPI

Properties

contentType: "documents" | "binders"
restAPI: RestAPI

Methods

  • Add a relationship to a document

    // Add a shared resource to a document
    const service = new VeevaService(credentials)
    await service.document.relationship.create(2000, 0, 1, 2001, 'related_shared_resource__v')

    Returns

    Response from Veeva

    Parameters

    • id: number

      The id of the document to add the relationship too

    • majorVersion: number

      The major version number of the document

    • minorVersion: number

      The minor version number of the document

    • targetId: number

      The id of the target document of the relationship

    • relationshipType: string

      The value of the relationship to add

    Returns Promise<IVeevaResponse>

  • Get an array of relationships for a specific document.

    const service = new VeevaService(credentials)
    await service.document.relationship.get(2000, 0, 1)

    Returns

    An array of relationships

    Parameters

    • id: number

      The id of the document

    • majorVersion: number

      The major version number of the document

    • minorVersion: number

      The minor version number of the document

    Returns Promise<IDocumentRelationship[]>

Generated using TypeDoc