Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • VlocityObject

Index

Constructors

constructor

  • Parameters

    • config: any

    Returns VlocityObject

Properties

Private cacheExpiration

cacheExpiration: Date = new Date(new Date().getTime() + 24 * 60000)

config

config: any

objectDetails

objectDetails: any

Methods

createAttributeAssignment

  • createAttributeAssignment(objectId: any, attributeId: any): Promise<any>
  • method

    createAttributeAssignment - Creates Attribute assignment

    example
    
       // Invoke API via method createAttributeAssignment()
       const objectId = "";
       const attributeId = "";
       productconsole
      .getVlocityObjectSdk().createAttributeAssignment(objectId,attributeId)
      .then(result => {
        Logger.info("vlocity facet details remote action success " + result);
      })
      .catch(error => {
        Logger.info("vlocity facet details remote action failed " + error);
      });
    throws

    {Error} - "createAttributeAssignment :: objectId is required to create Attribute assignment"

    throws

    {Error} - "createAttributeAssignment :: attributeId is required to create Attribute assignment"

    Parameters

    • objectId: any
    • attributeId: any

    Returns Promise<any>

    • Promise that returns a success or failure message.

createGetFacetDetailsInput

  • Returns the instance of GetFacetDetailsInput to get facet details

    Parameters

    • objectId: any
    • facetName: any

    Returns GetFacetDetailsInput

createObjectFieldAttribute

  • createObjectFieldAttribute(attributeIdOrField: any, objectId: any, isAttribute: any): Promise<any>
  • Parameters

    • attributeIdOrField: any
    • objectId: any
    • isAttribute: any

    Returns Promise<any>

createOrUpdateSectionElement

  • method

    createOrUpdateSectionElement - Creates or Updates section element

    example
       // Instantiate the input object for section element upsert using createSectionElementUpsertInput() to specify parameters
       // Assign sectionId, objectId and section element model to input object
    
       const input = productconsole.getVlocityObjectSdk.createSectionElementUpsertInput();
       input.sectionId = "";
       input.sectionElement = {};
       input.objectId = ""
    
       // Invoke API via method createOrUpdateSectionElement()
    
       productconsole
      .getVlocityObjectSdk().createOrUpdateSectionElement(input)
      .then(result => {
        Logger.info("vlocity facet details remote action success " + result);
      })
      .catch(error => {
        Logger.info("vlocity facet details remote action failed " + error);
      });
    throws

    {Error} - "UpsertSectionElementInput :: createOrUpdateSectionElement() must be defined"

    throws

    {Error} - "UpsertSectionElementInput :: createOrUpdateSectionElement() must have sectionId defined"

    throws

    {Error} - "UpsertSectionElementInput :: createOrUpdateSectionElement() must have sectionElement defined"

    Parameters

    Returns Promise<unknown>

    • Promise that returns a success or failure message.

createSectionElementUpsertInput

  • Returns the instance of UpsertSectionElementInput to upsert section element

    Returns UpsertSectionElementInput

createUpsertSectionInput

  • Returns the instance of UpsertSectionInput to create/update a section

    Returns UpsertSectionInput

getApplicableAttributesFields

  • getApplicableAttributesFields(objectId: any, facetName: any): Promise<unknown>
  • method

    getApplicableAttributesFields - returns unassigned attributes and fields for a facet

    example
    
       // Invoke API via method getApplicableAttributesFields()
       const objectId = "";
       const facetName = "";
       productconsole
      .getVlocityObjectSdk().getApplicableAttributesFields(objectId,facetName)
      .then(result => {
        Logger.info("vlocity facet details remote action success " + result);
      })
      .catch(error => {
        Logger.info("vlocity facet details remote action failed " + error);
      });
    throws

    {Error} - "getApplicableAttributesFields() :: objectId is requried to fetch facet details of object"

    throws

    {Error} - "getApplicableAttributesFields() :: facetName is requried to fetch facet details"

    Parameters

    • objectId: any
    • facetName: any

    Returns Promise<unknown>

    • Promise that returns a success or failure message.

getAttributeAssignment

  • getAttributeAssignment(objectId: any, attributeId: any): Promise<unknown>
  • method

    getAttributeAssignment - get attribute assignment, picklist vlaues and picklist object if data type is pick list

    example
    
       const objectId = ""
       const attributeId = ""
       // Invoke API via method getAttributeAssignment()
       productconsole
      .getVlocityObjectSdk().getAttributeAssignment(objectId,attributeId)
      .then(result => {
        Logger.info("getAttributeAssignment remote action success " + result);
      })
      .catch(error => {
        Logger.info("getAttributeAssignment remote action failed " + error);
      });
    throws

    {Error} - "getAttributeAssignment :: objectId must be defined"

    throws

    {Error} - "getAttributeAssignment :: attributeId must be defined"

    Parameters

    • objectId: any
    • attributeId: any

    Returns Promise<unknown>

    • Promise that returns a success or failure message.

getAttributeAssignmentObject

  • getAttributeAssignmentObject(objectId: any, attributeId: any): Promise<unknown>
  • method

    getAttributeAssignmentObject - get attribute assignment object, picklistByName

    example
    
       const objectId = ""
       const attributeId = ""
       // Invoke API via method getAttributeAssignmentObject()
       productconsole
      .getVlocityObjectSdk().getAttributeAssignmentObject(objectId,attributeId)
      .then(result => {
        Logger.info("getAttributeAssignmentObject remote action success " + result);
      })
      .catch(error => {
        Logger.info("getAttributeAssignmentObject remote action failed " + error);
      });

    Parameters

    • objectId: any
    • attributeId: any

    Returns Promise<unknown>

    • Promise that returns a success or failure message.

getErrorMessagesFromResponse

  • getErrorMessagesFromResponse(response: any): string
  • Parameters

    • response: any

    Returns string

getFacetDetails

  • method

    getFacetDetails - get facet details.

    example
    
       // Instantiate the input object for getFacetDetails using createGetFacetDetailsInput() to specify parameters
       // objectId and facetName as parameters to the createGetFacetDetailsInput method
       const objectId = "";
       const facetName = "";
       const input = productconsole.getVlocityObjectSdk.createGetFacetDetailsInput(objectId,facetName);
    
       // Invoke API via method getFacetDetails()
       productconsole
      .getVlocityObjectSdk().getFacetDetails(input)
      .then(result => {
        Logger.info("vlocity facet details remote action success " + result);
      })
      .catch(error => {
        Logger.info("vlocity facet details remote action failed " + error);
      });
    throws

    {Error} - "GetFacetDetailsInput :: getFacetDetails() must have objectId"

    throws

    {Error} - "GetFacetDetailsInput :: getFacetDetails() must have facetName"

    throws

    {Error} - "GetFacetDetailsInput :: getFacetDetails() must be defined"

    Parameters

    Returns Promise<any>

    • Promise that returns a success or failure message.

getLayoutDetails

  • getLayoutDetails(objectId: any, facetName: any): Promise<unknown>
  • method

    getLayoutDetails - method calls getFacetDetails, getObjectDetails and returns facetObject and objectDetails.

    example
    
       // objectId and facetName as parameters to the getLayoutDetails method
       const objectId = "";
       const facetName = "";
    
       // Invoke API via method getLayoutDetails()
       productconsole
      .getVlocityObjectSdk().getLayoutDetails(input)
      .then(result => {
        Logger.info("getLayoutDetails() success " + result);
      })
      .catch(error => {
        Logger.info("getLayoutDetails() failed " + error);
      });

    Parameters

    • objectId: any
    • facetName: any

    Returns Promise<unknown>

    • Promise that returns a success or failure message.

getObjectDetails

  • getObjectDetails(objectId: any): Promise<any>
  • method

    getObjectDetails - returns object details and describe object

    example
    
       // Invoke API via method getObjectDetails()
       const objectId = "";
       productconsole
      .getVlocityObjectSdk().getObjectDetails(objectId)
      .then(result => {
        Logger.info("getObjectDetails() remote action success " + result);
      })
      .catch(error => {
        Logger.info("getObjectDetails() remote action failed " + error);
      });
    throws

    {Error} - "getObjectDetails() :: objectId must be defined"

    Parameters

    • objectId: any

    Returns Promise<any>

    • Promise that returns a success or failure message.

getObjectPicklistsByName

  • getObjectPicklistsByName(objectName: any): Promise<any>
  • method

    getObjectPicklistsByName - get object picklist by name

    example
    
       const objectName = ""
       // Invoke API via method getObjectPicklistsByName()
       productconsole
      .getVlocityObjectSdk().getObjectPicklistsByName(picklistObjectId)
      .then(result => {
        Logger.info("getObjectPicklistsByName remote action success " + result);
      })
      .catch(error => {
        Logger.info("getObjectPicklistsByName remote action failed " + error);
      });
    throws

    {Error} - "getObjectPicklistsByName :: objectName must be defined"

    Parameters

    • objectName: any

    Returns Promise<any>

    • Promise that returns a success or failure message.

getPicklistItems

  • getPicklistItems(picklistObjectId: any): Promise<unknown>
  • method

    getPicklistItems - get picklist items by picklist id

    example
    
       const picklistObjectId = ""
       // Invoke API via method getPicklistItems()
       productconsole
      .getVlocityObjectSdk().getPicklistItems(picklistObjectId)
      .then(result => {
        Logger.info("getPicklistItems remote action success " + result);
      })
      .catch(error => {
        Logger.info("getPicklistItems remote action failed " + error);
      });
    throws

    {Error} - "getPicklistItems :: picklistObjectId must be defined"

    Parameters

    • picklistObjectId: any

    Returns Promise<unknown>

    • Promise that returns a success or failure message.

getPicklistObject

  • getPicklistObject(picklistId: any): Promise<any>
  • method

    getPicklistObject - get picklist object by picklist id

    example
    
       const picklistId = ""
       // Invoke API via method getPicklistObject()
       productconsole
      .getVlocityObjectSdk().getPicklistObject(picklistObjectId)
      .then(result => {
        Logger.info("getPicklistObject remote action success " + result);
      })
      .catch(error => {
        Logger.info("getPicklistObject remote action failed " + error);
      });
    throws

    {Error} - "getPicklistObject :: picklistId must be defined"

    Parameters

    • picklistId: any

    Returns Promise<any>

    • Promise that returns a success or failure message.

postUpdateSection

  • postUpdateSection(objectSectionId: any): Promise<any>
  • method

    postUpdateSection - update section to update column elements

    example
    
       const objectSectionId = ""
       // Invoke API via method postUpdateSection()
       productconsole
      .getVlocityObjectSdk().postUpdateSection(objectSectionId)
      .then(result => {
        Logger.info("postUpdateSection remote action success " + result);
      })
      .catch(error => {
        Logger.info("postUpdateSection remote action failed " + error);
      });
    throws

    {Error} - "postUpdateSection :: objectSectionId must be defined"

    Parameters

    • objectSectionId: any

    Returns Promise<any>

    • Promise that returns a success or failure message.

renumberSectionElements

  • renumberSectionElements(sectionId: any): Promise<any>
  • method

    renumberSectionElements - Reorder section elements

    example
    
       // Invoke API via method renumberSectionElements()
       const sectionId = "";
       productconsole
      .getVlocityObjectSdk().renumberSectionElements(sectionId)
      .then(result => {
        Logger.info("vlocity facet details remote action success " + result);
      })
      .catch(error => {
        Logger.info("vlocity facet details remote action failed " + error);
      });
    throws

    {Error} - "renumberSectionElements() :: sectionId is required to renumber section elements"

    Parameters

    • sectionId: any

    Returns Promise<any>

    • Promise that returns a success or failure message.

renumberSections

  • renumberSections(objectFacetId: any): Promise<any>
  • method

    renumberSections - update sequence of sections in a layout

    example
    
       const objectFacetId = ""
       // Invoke API via method postUpdateSection()
       productconsole
      .getVlocityObjectSdk().renumberSections(objectFacetId)
      .then(result => {
        Logger.info("renumberSections remote action success " + result);
      })
      .catch(error => {
        Logger.info("renumberSections remote action failed " + error);
      });

    Parameters

    • objectFacetId: any

    Returns Promise<any>

    • Promise that returns a success or failure message.

Private transformFacetDetails

  • transformFacetDetails(facetResponse: any): object
  • description

    Performs transformation necessary for the UI to render the facet details.

    method

    transformFacetDetails - returns facet object after necessary transformation

    Parameters

    • facetResponse: any

    Returns object

    • modify the facet object passed to the method.

transformSection

  • transformSection(section: any): any
  • method

    transformSection - returns section object fter necessary transformation

    Parameters

    • section: any

    Returns any

    • transformed section with formatted section elements.

upsertSection

  • method

    upsertSection - create/update Section

    example
    
       // Instantiate the input object for create section using createUpsertSectionInput() to specify parameters
       // Assign objectFacetId and section model to input object
    
       const input = productconsole.getVlocityObjectSdk.createUpsertSectionInput();
       input.objectFacetId = "";
        input.section = {};
    
       // Invoke API via method upsertSection()
       productconsole
      .getVlocityObjectSdk().upsertSection(input)
      .then(result => {
        Logger.info("upsert remote action success " + result);
      })
      .catch(error => {
        Logger.info("upsert remote action failed " + error);
      });
    throws

    {Error} - "UpsertSectionInput :: upsertSection() must be defined"

    throws

    {Error} - "UpsertSectionInput :: upsertSection() must have objectFacetId"

    Parameters

    Returns Promise<unknown>

    • Promise that returns a success or failure message.

upsertSectionEleAndObjectFieldAttribute

  • upsertSectionEleAndObjectFieldAttribute(input: any, attributeIdOrFieldApi: any, isAttribute: any): Promise<unknown>
  • Parameters

    • input: any
    • attributeIdOrFieldApi: any
    • isAttribute: any

    Returns Promise<unknown>

upsertSectionElement

  • method

    upsertSectionElement - create/update section element, created attribute assignment in case of attribute, renumber section elements.

    example
    
       // Instantiate the input object for section element upsert using createSectionElementUpsertInput() to specify parameters
       // Assign sectionId, objectId and section element model to input object
    
       const input = productconsole.getVlocityObjectSdk.createSectionElementUpsertInput();
       input.sectionId = "";
       input.sectionElement = {};
       input.objectId = ""
    
       // Invoke API via method upsertSectionElement()
       productconsole
      .getVlocityObjectSdk().upsertSectionElement(input)
      .then(result => {
        Logger.info("upsertSectionElement remote action success " + result);
      })
      .catch(error => {
        Logger.info("upsertSectionElement remote action failed " + error);
      });
    throws

    {Error} - "getApplicableAttributesFields() :: objectId is requried to fetch facet details of object"

    throws

    {Error} - "getApplicableAttributesFields() :: facetName is requried to fetch facet details"

    Parameters

    Returns Promise<unknown>

    • Promise that returns a success or failure message.

Generated using TypeDoc