@sasjs/adapter 3.10.4 → 3.10.7

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
@@ -94,10 +94,10 @@ const sasJs = new SASjs({your config})
94
94
  More on the config later.
95
95
 
96
96
  ### SAS Logon
97
- All authentication from the adapter is done against SASLogon. There are two approaches that can be taken, which are configured using the `LoginMechanism` attribute of the sasJs config object (above):
97
+ All authentication from the adapter is done against SASLogon. There are two approaches that can be taken, which are configured using the `loginMechanism` attribute of the sasJs config object (above):
98
98
 
99
- * `LoginMechanism:'Redirected'` - this approach enables authentication through a SASLogon window, supporting complex authentication flows (such as 2FA) and avoids the need to handle passwords in the application itself. The styling of the window can be modified using CSS.
100
- * `LoginMechanism:'Default'` - this approach requires that the username and password are captured, and used within the `.login()` method. This can be helpful for development, or automated testing.
99
+ * `loginMechanism:'Redirected'` - this approach enables authentication through a SASLogon window, supporting complex authentication flows (such as 2FA) and avoids the need to handle passwords in the application itself. The styling of the window can be modified using CSS.
100
+ * `loginMechanism:'Default'` - this approach requires that the username and password are captured, and used within the `.login()` method. This can be helpful for development, or automated testing.
101
101
 
102
102
  Sample code for logging in with the `Default` approach:
103
103
 
@@ -125,7 +125,11 @@ sasJs.request("/path/to/my/service", dataObject)
125
125
  })
126
126
  ```
127
127
 
128
- We supply the path to the SAS service, and a data object. The data object can be null (for services with no input), or can contain one or more tables in the following format:
128
+ We supply the path to the SAS service, and a data object.
129
+
130
+ If the path starts with a `/` then it should be a full path to the service. If there is no leading `/` then it is relative to the `appLoc`.
131
+
132
+ The data object can be null (for services with no input), or can contain one or more "tables" in the following format:
129
133
 
130
134
  ```javascript
131
135
  let dataObject={
@@ -141,7 +145,9 @@ let dataObject={
141
145
  };
142
146
  ```
143
147
 
144
- There are optional parameters such as a config object and a callback login function.
148
+ These tables (`tablewith2cols1row` and `tablewith1col2rows`) will be created in SAS WORK after running `%webout(FETCH)` in your SAS service.
149
+
150
+ The `request()` method also has optional parameters such as a config object and a callback login function.
145
151
 
146
152
  The response object will contain returned tables and columns. Table names are always lowercase, and column names uppercase.
147
153
 
@@ -248,6 +254,8 @@ Where an entire column is made up of special missing numerics, there would be no
248
254
  %webout(OBJ,a,missing=STRING,showmeta=YES)
249
255
  ```
250
256
 
257
+ The `%webout()` macro itself is just a wrapper for the [mp_jsonout](https://core.sasjs.io/mp__jsonout_8sas.html) macro.
258
+
251
259
  ## Configuration
252
260
 
253
261
  Configuration on the client side involves passing an object on startup, which can also be passed with each request. Technical documentation on the SASjsConfig class is available [here](https://adapter.sasjs.io/classes/types.sasjsconfig.html). The main config items are:
@@ -256,7 +264,7 @@ Configuration on the client side involves passing an object on startup, which ca
256
264
  * `serverType` - either `SAS9`, `SASVIYA` or `SASJS`. The `SASJS` server type is for use with [sasjs/server](https://github.com/sasjs/server).
257
265
  * `serverUrl` - the location (including http protocol and port) of the SAS Server. Can be omitted, eg if serving directly from the SAS Web Server, or in streaming mode.
258
266
  * `debug` - if `true` then SAS Logs and extra debug information is returned.
259
- * `LoginMechanism` - either `Default` or `Redirected`. See [SAS Logon](#sas-logon) section.
267
+ * `loginMechanism` - either `Default` or `Redirected`. See [SAS Logon](#sas-logon) section.
260
268
  * `useComputeApi` - Only relevant when the serverType is `SASVIYA`. If `true` the [Compute API](#using-the-compute-api) is used. If `false` the [JES API](#using-the-jes-api) is used. If `null` or `undefined` the [Web](#using-jes-web-app) approach is used.
261
269
  * `contextName` - Compute context on which the requests will be called. If missing or not provided, defaults to `Job Execution Compute context`.
262
270
  * `requestHistoryLimit` - Request history limit. Increasing this limit may affect browser performance, especially with debug (logs) enabled. Default is 10.