Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ProductClass

Product class

Hierarchy

  • BasicFunctions
    • ProductClass

Index

Constructors

constructor

  • new ProductClass(__namedParameters?: { coreObject?: CoreObject; name?: string; productGroups?: {} }): ProductClass

Properties

coreObject

coreObject: CoreObject

CLA Wrapper attribute. Object used to send API requests and store technical information. Must be the same object for all classes within an instance of a CdiscLibrary class.

Optional href

href: string

CDISC Library API endpoint.

name

name: string

Product class name.

productGroups

productGroups: {}

An object with Product Groups.

Type declaration

Methods

getItemGroup

  • getItemGroup(name: string, productAlias: string, options: GetItemGroupOptions): Promise<string | ItemGroupType>
  • Get a dataset/dataStructure/domain for a specific product

    Parameters

    • name: string

      Dataset name

    • productAlias: string

      Product name alias. Examples: sdtmig3-3, sdtm1.7, adamig11.

    • options: GetItemGroupOptions

      @GetItemGroupOptions

    Returns Promise<string | ItemGroupType>

    Dataset/DataStruture/Domain

getItemGroups

  • getItemGroups(productAlias: string, options: GetItemGroupsOptions): Promise<ItemGroups>
  • Get an object with all datasets/domains/dataStructure
    This method does not update the main object

    Parameters

    • productAlias: string

      Product alias

    • options: GetItemGroupsOptions

      @GetItemGroupsOptions

    Returns Promise<ItemGroups>

    An object with datasets/domains/dataStructures
    In case options.short is set to true, only name and label for each itemGroup are returned. This approach does not load the full product and loads only the dataset information from the CDISC Library.

getProductGroup

  • Get a product group

    Parameters

    • name: string

      Valid product group name.

    Returns ProductGroup

    Product group or a blank

getProductGroupList

  • getProductGroupList(): string[]
  • Get a list of product group names

    Returns string[]

    Array of product group names

getProductGroups

  • getProductGroups(): {}

getProductIdByAlias

  • getProductIdByAlias(alias: string): { productGroupId: string; productId: string }
  • Get a product, product group IDs by alias or substring, e.g., adamig11 agamig1-1 adamig1.1 will return { productGroupId: 'adam', productId: 'adamig-1-1' }.

    Parameters

    • alias: string

      Product name alias

    Returns { productGroupId: string; productId: string }

    Product and product group IDs

    • productGroupId: string
    • productId: string

getProductList

  • getProductList(format?: "json" | "csv"): string | object
  • Get a list of product IDs

    Parameters

    • format: "json" | "csv" = 'json'

    Returns string | object

    List of product names (IDs)

getRawResponse

  • getRawResponse(href?: string): Promise<object>
  • Get raw API response

    Parameters

    • Optional href: string

      CDISC Library API endpoint. If not specified, href attribute of the object is used.

    Returns Promise<object>

    Returns a JSON response if the request was successfull, otherwise returns undefined.

load

  • load(href?: string): Promise<boolean>
  • Load object from the CDISC Library

    Parameters

    • Optional href: string

      CDISC Library API endpoint. If not specified, href attribute of the object is used.

    Returns Promise<boolean>

    Returns true in the object was successfully loaded, false otherwise

parseResponse

  • parseResponse(pcRaw: any, name: string): void
  • Parse API response to product classes

    Parameters

    • pcRaw: any

      Raw CDISC API response.

    • name: string

      Product class name.

    Returns void

toSimpleObject

  • toSimpleObject(): any
  • Convert class to a simple object, removes methods and technical elements (e.g., coreObject).

    Returns any

    A new object

Generated using TypeDoc