Socket
Socket
Sign inDemoInstall

@sassoftware/restaflib

Package Overview
Dependencies
Maintainers
6
Versions
215
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sassoftware/restaflib

collection of useful functions for common scenarios


Version published
Weekly downloads
260
increased by1757.14%
Maintainers
6
Weekly downloads
 
Created
Source

casActionRun ⇒ object

Calls cas server and returns the results(async)

Returns: object - returns results from cas

ParamTypeDescription
storeobjectrestaf store
sessionobjectcas session
parametersobjectparameters for the action

casFetchData ⇒ object

Fetch rows from cas Tables

Returns: object - see doc. {pagination: {prev: pagePrev, next: pageNext, count: count}, data: {schema: co The prev and next are as follows: Either it is -1 to indicate EOF or a number to start the next obs no to start the fetc from

ParamTypeDescription
storeobjectrestaf store
sessionobjectcas session
tableobjecttable {caslib: x, name: y} to read from
controlobjectwhat to read {from: n, count:n , format: true

caslRunBase ⇒ object

Calls cas server and returns the results(async)

Returns: object - returns results from cas

ParamTypeDescription
storeobjectrestaf store
sessionobjectcas session
srcobjectcasl src statements
argsobjectuser input args

caslRunBase ⇒ object

Calls cas server and returns the results(async)

Returns: object - standard return value from apiCall

ParamTypeDescription
storeobjectrestaf store
sessionobjectcas session
srcobjectcasl src statements
argsobjectarguments to pass to on to CAS as args

caslScore ⇒ object

Score data in casl

Returns: object - returns the scores as an object

ParamTypeDescription
storeobjectrestaf store
sessionobjectcas session
scenarioobjectscenario values

casSetup ⇒ object

Calls cas server and returns the results(async)

Returns: object - returns an object {session: xxx, servers: yyy}

ParamTypeDescription
storeobjectrestaf store
logonPayloadobjectif not null, then use this logon to Viya

casTableToJson ⇒ object

Converts a cas table to JSON

Returns: object - - the new json version

ParamTypeDescription
resultobjectthe raf object retrned from a call to cas
tablestringthe name of the table

computeFetchData ⇒ object

Fetch data from a SAS Table

Returns: object - - {columns: , rows: , scrollOptions: }

ParamTypeDescription
storeobjectrestaf store
computeSummaryobjectSummary object created by computeSummary method
tablestringname of the table
directionstringnull

computeResults ⇒ object | string

Return Log|listing|ODS|list of tables in the compute service job

Returns: object | string - - string for all except tables(array)

ParamTypeDescription
storeobjectrestaf store
computeSummaryobjectcomputeSummary object
typestringtype of result( log

computeRun ⇒ object

Prepare data for runCompute(@async)

Returns: object - computeSummary object

ParamTypeDescription
storeobjectrestaf store
sessionobjectcurrent compute service session
srcstringcode to execute
argsobjectargs to be passed on as macros

computeRunBase ⇒ object

Reduce compute service to an consummable form(async)

Returns: object - computeSummary Object

ParamTypeDescription
storeobjectrestaf store
sessionobjectcompute service session
codecodeSAS code to be executed

computeSetup ⇒ object

Setup access to compute service

Returns: object - - returns a compute session

ParamTypeDescription
storeobjectrestaf store
contextNamestringname of the context( if null the first context in the list is used)
payloadobjectlogon payload - If null assumes that logon was done earlier.

computeSummary ⇒ object

Reduce the job information into consummable form(async)

Returns: object - - the computeSummary object for easy handling of logs,listing,ods, tables

ParamTypeDescription
storeobjectrestaf store
jobobjectrafObject representing the compute service job

findReport ⇒ object

Search for a named report(async)

Returns: object - - either null or rafObject for the report

ParamTypeDescription
storeobjectrestaf store
namestringname of the VA report

getReportImage ⇒ string

Return the svg of the specified report(async)

Returns: string - - the svg of the report

ParamTypeDescription
storeobjectrestaf store
namestringname of the report

getReportUrl ⇒ string

Generate url for report(async)

Returns: string - url for the report

ParamTypeDescription
storeobjectrestaf store
namestringname of report

getSASTableRows ⇒ object

Convert table to object of the form {var1: value, var2: value,...},....

Returns: object - - resulting json

ParamTypeDescription
storeobjectrestaf store
computeSummaryobjectcomputeSummary
tableNamestringname of the table

jsonToDict ⇒ string

Produce a string with casl dictionary suitable for inclusion in casl code

Returns: string - returns the string containing the casl dictionary

ParamTypeDescription
objobjectthe JS object of interest
namestringthe name to assign to the dictionary

Example

obj = {x: 1, b:2, c: ['a','b']};
 name ='_appEnv_';
 result is a string _appEnv_ = {x=2, b=3, c={"a', "b"}}

masRun ⇒ object

Score using MAS

Returns: object - - return results {name: value, name: value}

ParamTypeDescription
restafstorestore
masControlobjectobject from masSetup
modelNamestringname of model to be executed
stepNamestringif not specified it will default to the first step

masSetup ⇒ object

setup access to MAS

Returns: object - - masControl used in masRun

ParamTypeDescription
storeobjectrestaf store
modelsobjectan array of model names
logonPayloadobjectnull

FAQs

Package last updated on 06 Nov 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc