@sassoftware/restaflib 5.5.1-0 → 5.5.1-10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,264 +1,264 @@
1
- <a name="module_casActionRun"></a>
2
-
3
- ## casActionRun ⇒ <code>object</code>
4
- Calls cas server and returns the results(async)
5
-
6
- **Returns**: <code>object</code> - returns results from cas
7
-
8
- | Param | Type | Description |
9
- | --- | --- | --- |
10
- | store | <code>object</code> | restaf store |
11
- | session | <code>object</code> | cas session |
12
- | parameters | <code>object</code> | parameters for the action |
13
-
14
- <a name="module_casFetchData"></a>
15
-
16
- ## casFetchData ⇒ <code>object</code>
17
- Fetch rows from cas Tables
18
-
19
- **Returns**: <code>object</code> - 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
20
-
21
- | Param | Type | Description |
22
- | --- | --- | --- |
23
- | store | <code>object</code> | restaf store |
24
- | session | <code>object</code> | cas session |
25
- | table | <code>object</code> | table {caslib: x, name: y} to read from |
26
- | control | <code>object</code> | what to read {from: n, count:n , format: true|false} |
27
-
28
- <a name="module_caslRunBase"></a>
29
-
30
- ## caslRunBase ⇒ <code>object</code>
31
- Calls cas server and returns the results(async)
32
-
33
- **Returns**: <code>object</code> - returns results from cas
34
-
35
- | Param | Type | Description |
36
- | --- | --- | --- |
37
- | store | <code>object</code> | restaf store |
38
- | session | <code>object</code> | cas session |
39
- | src | <code>object</code> | casl src statements |
40
- | args | <code>object</code> | user input args |
41
-
42
- <a name="module_caslRunBase"></a>
43
-
44
- ## caslRunBase ⇒ <code>object</code>
45
- Calls cas server and returns the results(async)
46
-
47
- **Returns**: <code>object</code> - standard return value from apiCall
48
-
49
- | Param | Type | Description |
50
- | --- | --- | --- |
51
- | store | <code>object</code> | restaf store |
52
- | session | <code>object</code> | cas session |
53
- | src | <code>object</code> | casl src statements |
54
- | args | <code>object</code> | arguments to pass to on to CAS as _args_ |
55
-
56
- <a name="module_caslScore"></a>
57
-
58
- ## caslScore ⇒ <code>object</code>
59
- Score data in casl
60
-
61
- **Returns**: <code>object</code> - returns the scores as an object
62
-
63
- | Param | Type | Description |
64
- | --- | --- | --- |
65
- | store | <code>object</code> | restaf store |
66
- | session | <code>object</code> | cas session |
67
- | scenario | <code>object</code> | scenario values |
68
-
69
- <a name="module_casSetup"></a>
70
-
71
- ## casSetup ⇒ <code>object</code>
72
- Calls cas server and returns the results(async)
73
-
74
- **Returns**: <code>object</code> - returns an object {session: xxx, servers: yyy}
75
-
76
- | Param | Type | Description |
77
- | --- | --- | --- |
78
- | store | <code>object</code> | restaf store |
79
- | logonPayload | <code>object</code> | if not null, then use this logon to Viya |
80
-
81
- <a name="module_casTableToJson"></a>
82
-
83
- ## casTableToJson ⇒ <code>object</code>
84
- Converts a cas table to JSON
85
-
86
- **Returns**: <code>object</code> - - the new json version
87
-
88
- | Param | Type | Description |
89
- | --- | --- | --- |
90
- | result | <code>object</code> | the raf object retrned from a call to cas |
91
- | table | <code>string</code> | the name of the table |
92
-
93
- <a name="module_computeFetchData"></a>
94
-
95
- ## computeFetchData ⇒ <code>object</code>
96
- Fetch data from a SAS Table
97
-
98
- **Returns**: <code>object</code> - - {columns: <columnames>, rows: <data for rows> , scrollOptions: <available scroll directions>}
99
-
100
- | Param | Type | Description |
101
- | --- | --- | --- |
102
- | store | <code>object</code> | restaf store |
103
- | computeSummary | <code>object</code> | Summary object created by computeSummary method |
104
- | table | <code>string</code> | name of the table |
105
- | direction | <code>string</code> | null|next|prev|first|last |
106
-
107
- <a name="module_computeResults"></a>
108
-
109
- ## computeResults ⇒ <code>object</code> \| <code>string</code>
110
- Return Log|listing|ODS|list of tables in the compute service job
111
-
112
- **Returns**: <code>object</code> \| <code>string</code> - - string for all except tables(array)
113
-
114
- | Param | Type | Description |
115
- | --- | --- | --- |
116
- | store | <code>object</code> | restaf store |
117
- | computeSummary | <code>object</code> | computeSummary object |
118
- | type | <code>string</code> | type of result( log|listing|ods\tables) |
119
-
120
- <a name="module_computeRun"></a>
121
-
122
- ## computeRun ⇒ <code>object</code>
123
- Prepare data for runCompute(@async)
124
-
125
- **Returns**: <code>object</code> - computeSummary object
126
-
127
- | Param | Type | Description |
128
- | --- | --- | --- |
129
- | store | <code>object</code> | restaf store |
130
- | session | <code>object</code> | current compute service session |
131
- | src | <code>string</code> | code to execute |
132
- | args | <code>object</code> | args to be passed on as macros |
133
-
134
- <a name="module_computeRunBase"></a>
135
-
136
- ## computeRunBase ⇒ <code>object</code>
137
- Reduce compute service to an consummable form(async)
138
-
139
- **Returns**: <code>object</code> - computeSummary Object
140
-
141
- | Param | Type | Description |
142
- | --- | --- | --- |
143
- | store | <code>object</code> | restaf store |
144
- | session | <code>object</code> | compute service session |
145
- | code | <code>code</code> | SAS code to be executed |
146
-
147
- <a name="module_computeSetup"></a>
148
-
149
- ## computeSetup ⇒ <code>object</code>
150
- Setup access to compute service
151
-
152
- **Returns**: <code>object</code> - - returns a compute session
153
-
154
- | Param | Type | Description |
155
- | --- | --- | --- |
156
- | store | <code>object</code> | restaf store |
157
- | contextName | <code>string</code> | name of the context( if null the first context in the list is used) |
158
- | payload | <code>object</code> | logon payload - If null assumes that logon was done earlier. |
159
-
160
- <a name="module_computeSummary"></a>
161
-
162
- ## computeSummary ⇒ <code>object</code>
163
- Reduce the job information into consummable form(async)
164
-
165
- **Returns**: <code>object</code> - - the computeSummary object for easy handling of logs,listing,ods, tables
166
-
167
- | Param | Type | Description |
168
- | --- | --- | --- |
169
- | store | <code>object</code> | restaf store |
170
- | job | <code>object</code> | rafObject representing the compute service job |
171
-
172
- <a name="module_findReport"></a>
173
-
174
- ## findReport ⇒ <code>object</code>
175
- Search for a named report(async)
176
-
177
- **Returns**: <code>object</code> - - either null or rafObject for the report
178
-
179
- | Param | Type | Description |
180
- | --- | --- | --- |
181
- | store | <code>object</code> | restaf store |
182
- | name | <code>string</code> | name of the VA report |
183
-
184
- <a name="module_getReportImage"></a>
185
-
186
- ## getReportImage ⇒ <code>string</code>
187
- Return the svg of the specified report(async)
188
-
189
- **Returns**: <code>string</code> - - the svg of the report
190
-
191
- | Param | Type | Description |
192
- | --- | --- | --- |
193
- | store | <code>object</code> | restaf store |
194
- | name | <code>string</code> | name of the report |
195
-
196
- <a name="module_getReportUrl"></a>
197
-
198
- ## getReportUrl ⇒ <code>string</code>
199
- Generate url for report(async)
200
-
201
- **Returns**: <code>string</code> - url for the report
202
-
203
- | Param | Type | Description |
204
- | --- | --- | --- |
205
- | store | <code>object</code> | restaf store |
206
- | name | <code>string</code> | name of report |
207
-
208
- <a name="module_getSASTableRows"></a>
209
-
210
- ## getSASTableRows ⇒ <code>object</code>
211
- Convert table to object of the form [{var1: value, var2: value,...},....](async)
212
-
213
- **Returns**: <code>object</code> - - resulting json
214
-
215
- | Param | Type | Description |
216
- | --- | --- | --- |
217
- | store | <code>object</code> | restaf store |
218
- | computeSummary | <code>object</code> | computeSummary |
219
- | tableName | <code>string</code> | name of the table |
220
-
221
- <a name="module_jsonToDict"></a>
222
-
223
- ## jsonToDict ⇒ <code>string</code>
224
- Produce a string with casl dictionary suitable for inclusion in casl code
225
-
226
- **Returns**: <code>string</code> - returns the string containing the casl dictionary
227
-
228
- | Param | Type | Description |
229
- | --- | --- | --- |
230
- | obj | <code>object</code> | the JS object of interest |
231
- | name | <code>string</code> | the name to assign to the dictionary |
232
-
233
- **Example**
234
- ```js
235
- obj = {x: 1, b:2, c: ['a','b']};
236
- name ='_appEnv_';
237
- result is a string _appEnv_ = {x=2, b=3, c={"a', "b"}}
238
- ```
239
- <a name="module_masRun"></a>
240
-
241
- ## masRun ⇒ <code>object</code>
242
- Score using MAS
243
-
244
- **Returns**: <code>object</code> - - return results {name: value, name: value}
245
-
246
- | Param | Type | Description |
247
- | --- | --- | --- |
248
- | restaf | <code>store</code> | store |
249
- | masControl | <code>object</code> | object from masSetup |
250
- | modelName | <code>string</code> | name of model to be executed |
251
- | stepName | <code>string</code> | if not specified it will default to the first step |
252
-
253
- <a name="module_masSetup"></a>
254
-
255
- ## masSetup ⇒ <code>object</code>
256
- setup access to MAS
257
-
258
- **Returns**: <code>object</code> - - masControl used in masRun
259
-
260
- | Param | Type | Description |
261
- | --- | --- | --- |
262
- | store | <code>object</code> | restaf store |
263
- | models | <code>object</code> | an array of model names |
1
+ <a name="module_casActionRun"></a>
2
+
3
+ ## casActionRun ⇒ <code>object</code>
4
+ Calls cas server and returns the results(async)
5
+
6
+ **Returns**: <code>object</code> - returns results from cas
7
+
8
+ | Param | Type | Description |
9
+ | --- | --- | --- |
10
+ | store | <code>object</code> | restaf store |
11
+ | session | <code>object</code> | cas session |
12
+ | parameters | <code>object</code> | parameters for the action |
13
+
14
+ <a name="module_casFetchData"></a>
15
+
16
+ ## casFetchData ⇒ <code>object</code>
17
+ Fetch rows from cas Tables
18
+
19
+ **Returns**: <code>object</code> - 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
20
+
21
+ | Param | Type | Description |
22
+ | --- | --- | --- |
23
+ | store | <code>object</code> | restaf store |
24
+ | session | <code>object</code> | cas session |
25
+ | table | <code>object</code> | table {caslib: x, name: y} to read from |
26
+ | control | <code>object</code> | what to read {from: n, count:n , format: true|false} |
27
+
28
+ <a name="module_caslRunBase"></a>
29
+
30
+ ## caslRunBase ⇒ <code>object</code>
31
+ Calls cas server and returns the results(async)
32
+
33
+ **Returns**: <code>object</code> - returns results from cas
34
+
35
+ | Param | Type | Description |
36
+ | --- | --- | --- |
37
+ | store | <code>object</code> | restaf store |
38
+ | session | <code>object</code> | cas session |
39
+ | src | <code>object</code> | casl src statements |
40
+ | args | <code>object</code> | user input args |
41
+
42
+ <a name="module_caslRunBase"></a>
43
+
44
+ ## caslRunBase ⇒ <code>object</code>
45
+ Calls cas server and returns the results(async)
46
+
47
+ **Returns**: <code>object</code> - standard return value from apiCall
48
+
49
+ | Param | Type | Description |
50
+ | --- | --- | --- |
51
+ | store | <code>object</code> | restaf store |
52
+ | session | <code>object</code> | cas session |
53
+ | src | <code>object</code> | casl src statements |
54
+ | args | <code>object</code> | arguments to pass to on to CAS as _args_ |
55
+
56
+ <a name="module_caslScore"></a>
57
+
58
+ ## caslScore ⇒ <code>object</code>
59
+ Score data in casl
60
+
61
+ **Returns**: <code>object</code> - returns the scores as an object
62
+
63
+ | Param | Type | Description |
64
+ | --- | --- | --- |
65
+ | store | <code>object</code> | restaf store |
66
+ | session | <code>object</code> | cas session |
67
+ | scenario | <code>object</code> | scenario values |
68
+
69
+ <a name="module_casSetup"></a>
70
+
71
+ ## casSetup ⇒ <code>object</code>
72
+ Calls cas server and returns the results(async)
73
+
74
+ **Returns**: <code>object</code> - returns an object {session: xxx, servers: yyy}
75
+
76
+ | Param | Type | Description |
77
+ | --- | --- | --- |
78
+ | store | <code>object</code> | restaf store |
79
+ | logonPayload | <code>object</code> | if not null, then use this logon to Viya |
80
+
81
+ <a name="module_casTableToJson"></a>
82
+
83
+ ## casTableToJson ⇒ <code>object</code>
84
+ Converts a cas table to JSON
85
+
86
+ **Returns**: <code>object</code> - - the new json version
87
+
88
+ | Param | Type | Description |
89
+ | --- | --- | --- |
90
+ | result | <code>object</code> | the raf object retrned from a call to cas |
91
+ | table | <code>string</code> | the name of the table |
92
+
93
+ <a name="module_computeFetchData"></a>
94
+
95
+ ## computeFetchData ⇒ <code>object</code>
96
+ Fetch data from a SAS Table
97
+
98
+ **Returns**: <code>object</code> - - {columns: <columnames>, rows: <data for rows> , scrollOptions: <available scroll directions>}
99
+
100
+ | Param | Type | Description |
101
+ | --- | --- | --- |
102
+ | store | <code>object</code> | restaf store |
103
+ | computeSummary | <code>object</code> | Summary object created by computeSummary method |
104
+ | table | <code>string</code> | name of the table |
105
+ | direction | <code>string</code> | null|next|prev|first|last |
106
+
107
+ <a name="module_computeResults"></a>
108
+
109
+ ## computeResults ⇒ <code>object</code> \| <code>string</code>
110
+ Return Log|listing|ODS|list of tables in the compute service job
111
+
112
+ **Returns**: <code>object</code> \| <code>string</code> - - string for all except tables(array)
113
+
114
+ | Param | Type | Description |
115
+ | --- | --- | --- |
116
+ | store | <code>object</code> | restaf store |
117
+ | computeSummary | <code>object</code> | computeSummary object |
118
+ | type | <code>string</code> | type of result( log|listing|ods\tables) |
119
+
120
+ <a name="module_computeRun"></a>
121
+
122
+ ## computeRun ⇒ <code>object</code>
123
+ Prepare data for runCompute(@async)
124
+
125
+ **Returns**: <code>object</code> - computeSummary object
126
+
127
+ | Param | Type | Description |
128
+ | --- | --- | --- |
129
+ | store | <code>object</code> | restaf store |
130
+ | session | <code>object</code> | current compute service session |
131
+ | src | <code>string</code> | code to execute |
132
+ | args | <code>object</code> | args to be passed on as macros |
133
+
134
+ <a name="module_computeRunBase"></a>
135
+
136
+ ## computeRunBase ⇒ <code>object</code>
137
+ Reduce compute service to an consummable form(async)
138
+
139
+ **Returns**: <code>object</code> - computeSummary Object
140
+
141
+ | Param | Type | Description |
142
+ | --- | --- | --- |
143
+ | store | <code>object</code> | restaf store |
144
+ | session | <code>object</code> | compute service session |
145
+ | code | <code>code</code> | SAS code to be executed |
146
+
147
+ <a name="module_computeSetup"></a>
148
+
149
+ ## computeSetup ⇒ <code>object</code>
150
+ Setup access to compute service
151
+
152
+ **Returns**: <code>object</code> - - returns a compute session
153
+
154
+ | Param | Type | Description |
155
+ | --- | --- | --- |
156
+ | store | <code>object</code> | restaf store |
157
+ | contextName | <code>string</code> | name of the context( if null the first context in the list is used) |
158
+ | payload | <code>object</code> | logon payload - If null assumes that logon was done earlier. |
159
+
160
+ <a name="module_computeSummary"></a>
161
+
162
+ ## computeSummary ⇒ <code>object</code>
163
+ Reduce the job information into consummable form(async)
164
+
165
+ **Returns**: <code>object</code> - - the computeSummary object for easy handling of logs,listing,ods, tables
166
+
167
+ | Param | Type | Description |
168
+ | --- | --- | --- |
169
+ | store | <code>object</code> | restaf store |
170
+ | job | <code>object</code> | rafObject representing the compute service job |
171
+
172
+ <a name="module_findReport"></a>
173
+
174
+ ## findReport ⇒ <code>object</code>
175
+ Search for a named report(async)
176
+
177
+ **Returns**: <code>object</code> - - either null or rafObject for the report
178
+
179
+ | Param | Type | Description |
180
+ | --- | --- | --- |
181
+ | store | <code>object</code> | restaf store |
182
+ | name | <code>string</code> | name of the VA report |
183
+
184
+ <a name="module_getReportImage"></a>
185
+
186
+ ## getReportImage ⇒ <code>string</code>
187
+ Return the svg of the specified report(async)
188
+
189
+ **Returns**: <code>string</code> - - the svg of the report
190
+
191
+ | Param | Type | Description |
192
+ | --- | --- | --- |
193
+ | store | <code>object</code> | restaf store |
194
+ | name | <code>string</code> | name of the report |
195
+
196
+ <a name="module_getReportUrl"></a>
197
+
198
+ ## getReportUrl ⇒ <code>string</code>
199
+ Generate url for report(async)
200
+
201
+ **Returns**: <code>string</code> - url for the report
202
+
203
+ | Param | Type | Description |
204
+ | --- | --- | --- |
205
+ | store | <code>object</code> | restaf store |
206
+ | name | <code>string</code> | name of report |
207
+
208
+ <a name="module_getSASTableRows"></a>
209
+
210
+ ## getSASTableRows ⇒ <code>object</code>
211
+ Convert table to object of the form [{var1: value, var2: value,...},....](async)
212
+
213
+ **Returns**: <code>object</code> - - resulting json
214
+
215
+ | Param | Type | Description |
216
+ | --- | --- | --- |
217
+ | store | <code>object</code> | restaf store |
218
+ | computeSummary | <code>object</code> | computeSummary |
219
+ | tableName | <code>string</code> | name of the table |
220
+
221
+ <a name="module_jsonToDict"></a>
222
+
223
+ ## jsonToDict ⇒ <code>string</code>
224
+ Produce a string with casl dictionary suitable for inclusion in casl code
225
+
226
+ **Returns**: <code>string</code> - returns the string containing the casl dictionary
227
+
228
+ | Param | Type | Description |
229
+ | --- | --- | --- |
230
+ | obj | <code>object</code> | the JS object of interest |
231
+ | name | <code>string</code> | the name to assign to the dictionary |
232
+
233
+ **Example**
234
+ ```js
235
+ obj = {x: 1, b:2, c: ['a','b']};
236
+ name ='_appEnv_';
237
+ result is a string _appEnv_ = {x=2, b=3, c={"a', "b"}}
238
+ ```
239
+ <a name="module_masRun"></a>
240
+
241
+ ## masRun ⇒ <code>object</code>
242
+ Score using MAS
243
+
244
+ **Returns**: <code>object</code> - - return results {name: value, name: value}
245
+
246
+ | Param | Type | Description |
247
+ | --- | --- | --- |
248
+ | restaf | <code>store</code> | store |
249
+ | masControl | <code>object</code> | object from masSetup |
250
+ | modelName | <code>string</code> | name of model to be executed |
251
+ | stepName | <code>string</code> | if not specified it will default to the first step |
252
+
253
+ <a name="module_masSetup"></a>
254
+
255
+ ## masSetup ⇒ <code>object</code>
256
+ setup access to MAS
257
+
258
+ **Returns**: <code>object</code> - - masControl used in masRun
259
+
260
+ | Param | Type | Description |
261
+ | --- | --- | --- |
262
+ | store | <code>object</code> | restaf store |
263
+ | models | <code>object</code> | an array of model names |
264
264
  | logonPayload | <code>object</code> | null|restaf logon payload |