Socket
Socket
Sign inDemoInstall

promax-api-modules

Package Overview
Dependencies
4
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    promax-api-modules

Set of axios functions to interact with CEC's RESTful API


Version published
Weekly downloads
0
Maintainers
1
Install size
441 kB
Created
Weekly downloads
 

Readme

Source

API Docs

ApiService (A.K.A BaseController)

Instantiation

  • Arguments:
    • companyName - String - 'ATG', 'CEC', or 'MEX' (upper or lower case)
    • environment - String - 'Production', 'Staging', or 'Local'
    • apiKey - String - used to verify that the application has permission to use the API

API key controller

createRecord

  • Function:
    • adds a new record to the DB
  • Parameters:
    • accessToken - String - Authorization header value that excludes 'bearer '. Allow the API to verify the user making each request.
    • data - JSON object - contains some or all of the following fields: 'id', 'keyName'
  • Return:
    • body - String - HTTP status code corresponding with the result of the request

deleteRecord

  • Function:
    • removes an existing record from the DB
  • Parameters:
    • accessToken - String - Authorization header value that excludes 'bearer '. Allow the API to verify the user making each request.
    • id - String - unique value used to identify a record
  • Return:
    • body - JSON object - object containing the record that has been deleted

getAllRecords

  • Function:
    • obtain some details about all records from the DB
  • Parameters:
    • accessToken - String - Authorization header value that excludes 'bearer '. Allow the API to verify the user making each request.
  • Return:
    • body - JSON object - an object with only the 'id' and 'keyName' fields on success. Error message on failure

getOneRecord

  • Function:
    • obtain all details about one record from the DB
  • Parameters:
    • accessToken - String - Authorization header value that excludes 'bearer '. Allow the API to verify the user making each request.
    • id - String - unique value used to identify a record
  • Return:
    • body - JSON object - an object with all fields including 'lastModified' on success. Error message on failure

updateRecord

  • Function:
    • change the details about one record from the DB
  • Parameters:
    • accessToken - String - Authorization header value that excludes 'bearer '. Allow the API to verify the user making each request.
    • data - JSON object - contains some or all of the following fields: 'keyName'
    • id - String - unique value used to identify a record
  • Return:
    • body - String - HTTP status code corresponding with the result of the request

billing terms controller

createRecord

  • Function:
    • adds a new record to the DB
  • Parameters:
    • accessToken - String - Authorization header value that excludes 'bearer '. Allow the API to verify the user making each request.
    • data - JSON object - contains some or all of the following fields: 'id', 'days', 'desc'
  • Return:
    • body - String - HTTP status code corresponding with the result of the request

deleteRecord

  • Function:
    • removes an existing record from the DB
  • Parameters:
    • accessToken - String - Authorization header value that excludes 'bearer '. Allow the API to verify the user making each request.
    • id - String - unique value used to identify a record
  • Return:
    • body - JSON object - object containing the record that has been deleted

getAllRecords

  • Function:
    • obtain some details about all records from the DB
  • Parameters:
    • accessToken - String - Authorization header value that excludes 'bearer '. Allow the API to verify the user making each request.
  • Return:
    • body - JSON object - an object with only the 'id' and 'desc' fields on success. Error message on failure

getOneRecord

  • Function:
    • obtain all details about one record from the DB
  • Parameters:
    • accessToken - String - Authorization header value that excludes 'bearer '. Allow the API to verify the user making each request.
    • id - String - unique value used to identify a record
  • Return:
    • body - JSON object - an object with all available fields on success. Error message on failure

updateRecord

  • Function:
    • change the details about one record from the DB
  • Parameters:
    • accessToken - String - Authorization header value that excludes 'bearer '. Allow the API to verify the user making each request.
    • data - JSON object - contains some or all of the following fields: 'days', 'desc'
    • id - String - unique value used to identify a record
  • Return:
    • body - String - HTTP status code corresponding with the result of the request

forecast review controller

createRecord

  • Function:
    • adds a new record to the DB
  • Parameters:
    • accessToken - String - Authorization header value that excludes 'bearer '. Allow the API to verify the user making each request.
    • data - JSON object - contains some or all of the following fields: 'jobNumber', 'notes', 'userName'
  • Return:
    • body - String - HTTP status code corresponding with the result of the request

getJobRecords

  • Function:
    • obtain all records for the specified job from the DB
  • Parameters:
    • accessToken - String - Authorization header value that excludes 'bearer '. Allow the API to verify the user making each request.
    • jobNum - String - ID of the job
  • Return:
    • body - JSON object - objects with all fields on success. Error message on failure

getOneRecord

  • Function:
    • obtain only the most recent record for each job from the DB
  • Parameters:
    • accessToken - String - Authorization header value that excludes 'bearer '. Allow the API to verify the user making each request.
  • Return:
    • body - JSON object - an object with all fields on success. Error message on failure

OEM controller

createRecord

  • Function:
    • adds a new record to the DB
  • Parameters:
    • accessToken - String - Authorization header value that excludes 'bearer '. Allow the API to verify the user making each request.
    • data - JSON object - contains some or all of the following fields: 'address1', 'address2', 'city', 'faxPhone', 'oemName', 'state', 'voicePhone', 'website', 'zipCode'
  • Return:
    • body - String - HTTP status code corresponding with the result of the request

deleteRecord

  • Function:
    • removes an existing record from the DB
  • Parameters:
    • accessToken - String - Authorization header value that excludes 'bearer '. Allow the API to verify the user making each request.
    • id - String - unique value used to identify a record
  • Return:
    • body - JSON object - object containing the record that has been deleted

getAllRecords

  • Function:
    • obtain some details about all records from the DB
  • Parameters:
    • accessToken - String - Authorization header value that excludes 'bearer '. Allow the API to verify the user making each request.
  • Return:
    • body - JSON object - an object with only the 'id' and 'oemName' fields on success. Error message on failure

getOneRecord

  • Function:
    • obtain all details about one record from the DB
  • Parameters:
    • accessToken - String - Authorization header value that excludes 'bearer '. Allow the API to verify the user making each request.
    • id - String - unique value used to identify a record
  • Return:
    • body - JSON object - an object with all fields including 'id' and 'version' on success. Error message on failure

updateRecord

  • Function:
    • change the details about one record from the DB
  • Parameters:
    • accessToken - String - Authorization header value that excludes 'bearer '. Allow the API to verify the user making each request.
    • data - JSON object - contains some or all of the following fields: 'address1', 'address2', 'city', 'faxPhone', 'oemName', 'state', 'voicePhone', 'website', 'zipCode'
    • id - String - unique value used to identify a record
  • Return:
    • body - String - HTTP status code corresponding with the result of the request

FAQs

Last updated on 11 Nov 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc