mirror of
https://github.com/sasjs/adapter.git
synced 2025-12-11 01:14:36 +00:00
Compare commits
83 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8467c24b1 | ||
|
|
fc9056c1ac | ||
|
|
9b1d295b82 | ||
|
|
99d0b01a24 | ||
|
|
131c672020 | ||
|
|
338f2fb2dd | ||
|
|
4552a9a856 | ||
|
|
daeb753f9e | ||
|
|
f50a99d0b8 | ||
|
|
e6d0d3efd5 | ||
|
|
057460467c | ||
|
|
5aee9d955e | ||
|
|
7fb1da31e4 | ||
|
|
1aa92c0a69 | ||
|
|
4c097a69fd | ||
|
|
2634933e84 | ||
|
|
d60c0850c2 | ||
|
|
491bc3371c | ||
|
|
c1bab07b08 | ||
|
|
95f3ebd51d | ||
|
|
0e5b72b54f | ||
|
|
33ce592379 | ||
|
|
9f6591d7e3 | ||
|
|
5343ca00d8 | ||
|
|
f764f1f22f | ||
|
|
978af5037e | ||
|
|
39e88052c7 | ||
|
|
889351caf1 | ||
|
|
e6476dc230 | ||
|
|
e7de45c94f | ||
|
|
2f822aba71 | ||
|
|
ba687bf8e2 | ||
|
|
618cbe5a21 | ||
|
|
d723150b6d | ||
|
|
b1ad983ca5 | ||
|
|
4711d0510e | ||
|
|
93854c287f | ||
|
|
687a3047fd | ||
|
|
c067c6e74d | ||
|
|
04b44f40ba | ||
|
|
ce2126bd34 | ||
|
|
638efe8899 | ||
|
|
23353355e4 | ||
|
|
1be64798c5 | ||
|
|
a92a458cf1 | ||
|
|
703fdf9c02 | ||
|
|
bc239cf5d6 | ||
|
|
86780db478 | ||
|
|
5d5afa20c7 | ||
|
|
d662c1a981 | ||
|
|
927bb8c78c | ||
|
|
509171c484 | ||
|
|
ae98b50a21 | ||
|
|
f3abafd5ed | ||
|
|
939e6803e1 | ||
|
|
6a055a4fc6 | ||
|
|
5076ea696c | ||
|
|
3a60e6422c | ||
|
|
b90b5d5c03 | ||
|
|
6fb9d11712 | ||
|
|
d61728e52a | ||
|
|
a9339b52ed | ||
|
|
970e14b2e1 | ||
|
|
d5a8140d4f | ||
|
|
dcc5a1efdd | ||
|
|
d517897615 | ||
|
|
5f5d84da87 | ||
|
|
8650d91672 | ||
|
|
4c9e48550e | ||
|
|
8504ec6c4d | ||
|
|
a0ad8b3f34 | ||
|
|
4ed150aff9 | ||
|
|
81be11f3b9 | ||
|
|
e7e238e20b | ||
|
|
53990a9ba3 | ||
|
|
afec560952 | ||
|
|
17d8ea8b17 | ||
|
|
9af45799b9 | ||
|
|
fdbb87ed7b | ||
|
|
5e7ffc1f58 | ||
|
|
3369b28933 | ||
|
|
129c582785 | ||
|
|
23bdeaafaf |
17
PULL_REQUEST_TEMPLATE.md
Normal file
17
PULL_REQUEST_TEMPLATE.md
Normal file
@@ -0,0 +1,17 @@
|
||||
## Issue
|
||||
|
||||
Link any related issue(s) in this section.
|
||||
|
||||
## Intent
|
||||
|
||||
What this PR intends to achieve.
|
||||
|
||||
## Implementation
|
||||
|
||||
What code changes have been made to achieve the intent.
|
||||
|
||||
## Checks
|
||||
|
||||
- [ ] Code is formatted correctly (`npm run lint:fix`).
|
||||
- [ ] All unit tests are passing (`npm test`).
|
||||
- [ ] All `sasjs-tests` are passing (instructions available [here](https://github.com/sasjs/adapter/blob/master/sasjs-tests/README.md)).
|
||||
File diff suppressed because one or more lines are too long
231
docs/classes/reflection-717.reflection-180.fileuploader.html
Normal file
231
docs/classes/reflection-717.reflection-180.fileuploader.html
Normal file
File diff suppressed because one or more lines are too long
312
docs/classes/reflection-717.reflection-180.sas9apiclient.html
Normal file
312
docs/classes/reflection-717.reflection-180.sas9apiclient.html
Normal file
File diff suppressed because one or more lines are too long
1336
docs/classes/reflection-717.reflection-180.sasjs.html
Normal file
1336
docs/classes/reflection-717.reflection-180.sasjs.html
Normal file
File diff suppressed because one or more lines are too long
1264
docs/classes/reflection-717.reflection-180.sasviyaapiclient.html
Normal file
1264
docs/classes/reflection-717.reflection-180.sasviyaapiclient.html
Normal file
File diff suppressed because one or more lines are too long
271
docs/classes/reflection-717.reflection-180.sessionmanager.html
Normal file
271
docs/classes/reflection-717.reflection-180.sessionmanager.html
Normal file
File diff suppressed because one or more lines are too long
231
docs/classes/reflection-724.reflection-187.fileuploader.html
Normal file
231
docs/classes/reflection-724.reflection-187.fileuploader.html
Normal file
@@ -0,0 +1,231 @@
|
||||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>FileUploader | @sasjs/adapter</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<ul class="results-priority" style="display:none">
|
||||
</ul>
|
||||
<a href="../index.html" class="title">@sasjs/adapter</a>
|
||||
 <a href="https://github.com/sasjs/adapter" class="title">SASjs on Github</a>
|
||||
 <a href="https://sasjs.io" class="title">SASjs.io</a>
|
||||
 <a href="https://github.com/sasjs/cli" class="title">SASjs CLI</a>
|
||||
 <a href="https://github.com/sasjs/react-seed-app" class="title">React Seed App</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li>
|
||||
<a href="../modules/reflection-724.html"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../modules/reflection-724.reflection-187.html"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="reflection-724.reflection-187.fileuploader.html">FileUploader</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-3 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation outline primary">
|
||||
<a style="margin-left:0em" href="../globals.html">Globals</a>
|
||||
<ul style="display:none">
|
||||
{"SAS Adapter":{"SASjs":"classes/reflection-717.reflection-180.sasjs","Types":"modules/types"},"SAS Viya API Client":"classes/reflection-717.reflection-180.sasviyaapiclient","SAS 9 API Client":"classes/reflection-717.reflection-180.sas9apiclient"}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="col-7 offset-3 col-content">
|
||||
<h1>Class FileUploader</h1>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h3>Hierarchy</h3>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li>
|
||||
<span class="target">FileUploader</span>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<div class="tsd-index-content">
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Constructors</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="reflection-724.reflection-187.fileuploader.html#constructor" class="tsd-kind-icon">constructor</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Methods</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="reflection-724.reflection-187.fileuploader.html#uploadfile" class="tsd-kind-icon">uploadFile</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Constructors</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class">
|
||||
<a name="constructor" class="tsd-anchor"></a>
|
||||
<h3>constructor</h3>
|
||||
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">new <wbr>File<wbr>Uploader<span class="tsd-signature-symbol">(</span>appLoc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, serverUrl<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, jobsPath<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, setCsrfTokenWeb<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, csrfToken<span class="tsd-signature-symbol">?: </span><a href="../interfaces/types.csrftoken.html" class="tsd-signature-type">CsrfToken</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="reflection-724.reflection-187.fileuploader.html" class="tsd-signature-type">FileUploader</a></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in
|
||||
<a href="https://github.com/sasjs/adapter/blob/master/src/FileUploader.ts#L7">
|
||||
FileUploader.ts:7
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>appLoc: <span class="tsd-signature-type">string</span></h5>
|
||||
</li>
|
||||
<li>
|
||||
<h5>serverUrl: <span class="tsd-signature-type">string</span></h5>
|
||||
</li>
|
||||
<li>
|
||||
<h5>jobsPath: <span class="tsd-signature-type">string</span></h5>
|
||||
</li>
|
||||
<li>
|
||||
<h5>setCsrfTokenWeb: <span class="tsd-signature-type">any</span></h5>
|
||||
</li>
|
||||
<li>
|
||||
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> csrfToken: <a href="../interfaces/types.csrftoken.html" class="tsd-signature-type">CsrfToken</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> = null</span></h5>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <a href="reflection-724.reflection-187.fileuploader.html" class="tsd-signature-type">FileUploader</a></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Methods</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
||||
<a name="uploadfile" class="tsd-anchor"></a>
|
||||
<h3>upload<wbr>File</h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">upload<wbr>File<span class="tsd-signature-symbol">(</span>sasJob<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, files<span class="tsd-signature-symbol">: </span><a href="../interfaces/types.uploadfile.html" class="tsd-signature-type">UploadFile</a><span class="tsd-signature-symbol">[]</span>, params<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in
|
||||
<a href="https://github.com/sasjs/adapter/blob/master/src/FileUploader.ts#L20">
|
||||
FileUploader.ts:20
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>sasJob: <span class="tsd-signature-type">string</span></h5>
|
||||
</li>
|
||||
<li>
|
||||
<h5>files: <a href="../interfaces/types.uploadfile.html" class="tsd-signature-type">UploadFile</a><span class="tsd-signature-symbol">[]</span></h5>
|
||||
</li>
|
||||
<li>
|
||||
<h5>params: <span class="tsd-signature-type">any</span></h5>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
<!--{"options":"/Users/allan/git/adapter","tsconfig":"/Users/allan/git/adapter","inputFiles":["/Users/allan/git/adapter/src/FileUploader.ts","/Users/allan/git/adapter/src/SAS9ApiClient.ts","/Users/allan/git/adapter/src/SASViyaApiClient.ts","/Users/allan/git/adapter/src/SASjs.ts","/Users/allan/git/adapter/src/SessionManager.ts","/Users/allan/git/adapter/src/index.ts","/Users/allan/git/adapter/src/types/Context.ts","/Users/allan/git/adapter/src/types/CsrfToken.ts","/Users/allan/git/adapter/src/types/ErrorResponse.ts","/Users/allan/git/adapter/src/types/Folder.ts","/Users/allan/git/adapter/src/types/Job.ts","/Users/allan/git/adapter/src/types/JobDefinition.ts","/Users/allan/git/adapter/src/types/JobResult.ts","/Users/allan/git/adapter/src/types/Link.ts","/Users/allan/git/adapter/src/types/SASjsConfig.ts","/Users/allan/git/adapter/src/types/SASjsRequest.ts","/Users/allan/git/adapter/src/types/SASjsWaitingRequest.ts","/Users/allan/git/adapter/src/types/ServerType.ts","/Users/allan/git/adapter/src/types/Session.ts","/Users/allan/git/adapter/src/types/UploadFile.ts","/Users/allan/git/adapter/src/types/index.ts","/Users/allan/git/adapter/src/utils/asyncForEach.ts","/Users/allan/git/adapter/src/utils/compareTimestamps.ts","/Users/allan/git/adapter/src/utils/convertToCsv.ts","/Users/allan/git/adapter/src/utils/formatDataForRequest.ts","/Users/allan/git/adapter/src/utils/index.ts","/Users/allan/git/adapter/src/utils/isAuthorizeFormRequired.ts","/Users/allan/git/adapter/src/utils/isIeOrEdge.ts","/Users/allan/git/adapter/src/utils/isLoginRequired.ts","/Users/allan/git/adapter/src/utils/isLoginSuccess.ts","/Users/allan/git/adapter/src/utils/isUri.ts","/Users/allan/git/adapter/src/utils/isUrl.ts","/Users/allan/git/adapter/src/utils/makeRequest.ts","/Users/allan/git/adapter/src/utils/needsRetry.ts","/Users/allan/git/adapter/src/utils/parseAndSubmitAuthorizeForm.ts","/Users/allan/git/adapter/src/utils/parseGeneratedCode.ts","/Users/allan/git/adapter/src/utils/parseSasViyaLog.ts","/Users/allan/git/adapter/src/utils/parseSourceCode.ts","/Users/allan/git/adapter/src/utils/parseWeboutResponse.ts","/Users/allan/git/adapter/src/utils/serialize.ts","/Users/allan/git/adapter/src/utils/splitChunks.ts"],"mode":1,"includeDeclarations":true,"entryPoint":"","exclude":["**/*+(index|.spec|.e2e).ts"],"externalPattern":[],"excludeExternals":true,"excludeNotExported":true,"excludeNotDocumented":false,"excludePrivate":true,"excludeProtected":false,"ignoreCompilerErrors":true,"disableSources":false,"includes":"","media":"","out":"docs","json":"","theme":"./node_modules/typedoc-neo-theme/bin/default","name":"","includeVersion":false,"excludeTags":[],"readme":"","defaultCategory":"Other","categoryOrder":[],"categorizeByGroup":true,"gitRevision":"","gitRemote":"origin","gaID":"","gaSite":"auto","hideGenerator":false,"toc":[],"disableOutputCheck":true,"help":false,"version":false,"plugin":[],"logger":"console","listInvalidSymbolLinks":false,"links":[{"label":"SASjs on Github","url":"https://github.com/sasjs/adapter"},{"label":"SASjs.io","url":"https://sasjs.io"},{"label":"SASjs CLI","url":"https://github.com/sasjs/cli"},{"label":"React Seed App","url":"https://github.com/sasjs/react-seed-app"}],"outline":[{"SAS Adapter":{"SASjs":"classes/reflection-717.reflection-180.sasjs","Types":"modules/types"},"SAS Viya API Client":"classes/reflection-717.reflection-180.sasviyaapiclient","SAS 9 API Client":"classes/reflection-717.reflection-180.sas9apiclient"}],"source":[{"path":"https://github.com/sasjs/adapter/blob/master/src/","line":"L"}],"disableAutoModuleName":"false"}-->
|
||||
</div>
|
||||
<div class="col-2 col-menu secondary-menu">
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
</ul>
|
||||
<ul class="current">
|
||||
<li class="current tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="reflection-724.reflection-187.fileuploader.html" class="tsd-kind-icon">File<wbr>Uploader</a>
|
||||
<ul>
|
||||
<li class=" tsd-kind-constructor tsd-parent-kind-class">
|
||||
<a href="reflection-724.reflection-187.fileuploader.html#constructor" class="tsd-kind-icon">constructor</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-method tsd-parent-kind-class">
|
||||
<a href="reflection-724.reflection-187.fileuploader.html#uploadfile" class="tsd-kind-icon">upload<wbr>File</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="after-current">
|
||||
<li class=" tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="reflection-724.reflection-187.sas9apiclient.html" class="tsd-kind-icon">SAS9<wbr>Api<wbr>Client</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="reflection-724.reflection-187.sasviyaapiclient.html" class="tsd-kind-icon">SASViya<wbr>Api<wbr>Client</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="reflection-724.reflection-187.sasjs.html" class="tsd-kind-icon">SASjs</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="reflection-724.reflection-187.sessionmanager.html" class="tsd-kind-icon">Session<wbr>Manager</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="http://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="../assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
312
docs/classes/reflection-724.reflection-187.sas9apiclient.html
Normal file
312
docs/classes/reflection-724.reflection-187.sas9apiclient.html
Normal file
@@ -0,0 +1,312 @@
|
||||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>SAS9ApiClient | @sasjs/adapter</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<ul class="results-priority" style="display:none">
|
||||
</ul>
|
||||
<a href="../index.html" class="title">@sasjs/adapter</a>
|
||||
 <a href="https://github.com/sasjs/adapter" class="title">SASjs on Github</a>
|
||||
 <a href="https://sasjs.io" class="title">SASjs.io</a>
|
||||
 <a href="https://github.com/sasjs/cli" class="title">SASjs CLI</a>
|
||||
 <a href="https://github.com/sasjs/react-seed-app" class="title">React Seed App</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li>
|
||||
<a href="../modules/reflection-724.html"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../modules/reflection-724.reflection-187.html"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="reflection-724.reflection-187.sas9apiclient.html">SAS9ApiClient</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-3 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation outline primary">
|
||||
<a style="margin-left:0em" href="../globals.html">Globals</a>
|
||||
<ul style="display:none">
|
||||
{"SAS Adapter":{"SASjs":"classes/reflection-717.reflection-180.sasjs","Types":"modules/types"},"SAS Viya API Client":"classes/reflection-717.reflection-180.sasviyaapiclient","SAS 9 API Client":"classes/reflection-717.reflection-180.sas9apiclient"}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="col-7 offset-3 col-content">
|
||||
<h1>Class SAS9ApiClient</h1>
|
||||
<section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography tsd-comment-shorttext">
|
||||
<div class="lead">
|
||||
<p>A client for interfacing with the SAS9 REST API.</p>
|
||||
</div>
|
||||
</div></section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h3>Hierarchy</h3>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li>
|
||||
<span class="target">SAS9ApiClient</span>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<div class="tsd-index-content">
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Constructors</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="reflection-724.reflection-187.sas9apiclient.html#constructor" class="tsd-kind-icon">constructor</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Methods</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="reflection-724.reflection-187.sas9apiclient.html#executescript" class="tsd-kind-icon">executeScript</a></li>
|
||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="reflection-724.reflection-187.sas9apiclient.html#getconfig" class="tsd-kind-icon">getConfig</a></li>
|
||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="reflection-724.reflection-187.sas9apiclient.html#setconfig" class="tsd-kind-icon">setConfig</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Constructors</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class">
|
||||
<a name="constructor" class="tsd-anchor"></a>
|
||||
<h3>constructor</h3>
|
||||
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">new SAS9<wbr>Api<wbr>Client<span class="tsd-signature-symbol">(</span>serverUrl<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="reflection-724.reflection-187.sas9apiclient.html" class="tsd-signature-type">SAS9ApiClient</a></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in
|
||||
<a href="https://github.com/sasjs/adapter/blob/master/src/SAS9ApiClient.ts#L7">
|
||||
SAS9ApiClient.ts:7
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>serverUrl: <span class="tsd-signature-type">string</span></h5>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <a href="reflection-724.reflection-187.sas9apiclient.html" class="tsd-signature-type">SAS9ApiClient</a></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Methods</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
||||
<a name="executescript" class="tsd-anchor"></a>
|
||||
<h3>execute<wbr>Script</h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">execute<wbr>Script<span class="tsd-signature-symbol">(</span>linesOfCode<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span>, serverName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, repositoryName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in
|
||||
<a href="https://github.com/sasjs/adapter/blob/master/src/SAS9ApiClient.ts#L35">
|
||||
SAS9ApiClient.ts:35
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography tsd-comment-shorttext">
|
||||
<div class="lead">
|
||||
<p>Executes code on a SAS9 server.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>linesOfCode: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h5>
|
||||
<div class="tsd-comment tsd-typography tsd-comment-text">
|
||||
<p>an array of code lines to execute.</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h5>serverName: <span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography tsd-comment-text">
|
||||
<p>the server to execute the code on.</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h5>repositoryName: <span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography tsd-comment-text">
|
||||
<p>the repository to execute the code in.</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
||||
<a name="getconfig" class="tsd-anchor"></a>
|
||||
<h3>get<wbr>Config</h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">get<wbr>Config<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">object</span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in
|
||||
<a href="https://github.com/sasjs/adapter/blob/master/src/SAS9ApiClient.ts#L15">
|
||||
SAS9ApiClient.ts:15
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography tsd-comment-shorttext">
|
||||
<div class="lead">
|
||||
<p>Returns an object containing server URL.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">object</span></h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li class="tsd-parameter">
|
||||
<h5>server<wbr>Url<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
||||
<a name="setconfig" class="tsd-anchor"></a>
|
||||
<h3>set<wbr>Config</h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">set<wbr>Config<span class="tsd-signature-symbol">(</span>serverUrl<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in
|
||||
<a href="https://github.com/sasjs/adapter/blob/master/src/SAS9ApiClient.ts#L25">
|
||||
SAS9ApiClient.ts:25
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography tsd-comment-shorttext">
|
||||
<div class="lead">
|
||||
<p>Updates server URL which is not null.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>serverUrl: <span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography tsd-comment-text">
|
||||
<p>URL of the server to be set.</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
<!--{"options":"/Users/allan/git/adapter","tsconfig":"/Users/allan/git/adapter","inputFiles":["/Users/allan/git/adapter/src/FileUploader.ts","/Users/allan/git/adapter/src/SAS9ApiClient.ts","/Users/allan/git/adapter/src/SASViyaApiClient.ts","/Users/allan/git/adapter/src/SASjs.ts","/Users/allan/git/adapter/src/SessionManager.ts","/Users/allan/git/adapter/src/index.ts","/Users/allan/git/adapter/src/types/Context.ts","/Users/allan/git/adapter/src/types/CsrfToken.ts","/Users/allan/git/adapter/src/types/ErrorResponse.ts","/Users/allan/git/adapter/src/types/Folder.ts","/Users/allan/git/adapter/src/types/Job.ts","/Users/allan/git/adapter/src/types/JobDefinition.ts","/Users/allan/git/adapter/src/types/JobResult.ts","/Users/allan/git/adapter/src/types/Link.ts","/Users/allan/git/adapter/src/types/SASjsConfig.ts","/Users/allan/git/adapter/src/types/SASjsRequest.ts","/Users/allan/git/adapter/src/types/SASjsWaitingRequest.ts","/Users/allan/git/adapter/src/types/ServerType.ts","/Users/allan/git/adapter/src/types/Session.ts","/Users/allan/git/adapter/src/types/UploadFile.ts","/Users/allan/git/adapter/src/types/index.ts","/Users/allan/git/adapter/src/utils/asyncForEach.ts","/Users/allan/git/adapter/src/utils/compareTimestamps.ts","/Users/allan/git/adapter/src/utils/convertToCsv.ts","/Users/allan/git/adapter/src/utils/formatDataForRequest.ts","/Users/allan/git/adapter/src/utils/index.ts","/Users/allan/git/adapter/src/utils/isAuthorizeFormRequired.ts","/Users/allan/git/adapter/src/utils/isIeOrEdge.ts","/Users/allan/git/adapter/src/utils/isLoginRequired.ts","/Users/allan/git/adapter/src/utils/isLoginSuccess.ts","/Users/allan/git/adapter/src/utils/isUri.ts","/Users/allan/git/adapter/src/utils/isUrl.ts","/Users/allan/git/adapter/src/utils/makeRequest.ts","/Users/allan/git/adapter/src/utils/needsRetry.ts","/Users/allan/git/adapter/src/utils/parseAndSubmitAuthorizeForm.ts","/Users/allan/git/adapter/src/utils/parseGeneratedCode.ts","/Users/allan/git/adapter/src/utils/parseSasViyaLog.ts","/Users/allan/git/adapter/src/utils/parseSourceCode.ts","/Users/allan/git/adapter/src/utils/parseWeboutResponse.ts","/Users/allan/git/adapter/src/utils/serialize.ts","/Users/allan/git/adapter/src/utils/splitChunks.ts"],"mode":1,"includeDeclarations":true,"entryPoint":"","exclude":["**/*+(index|.spec|.e2e).ts"],"externalPattern":[],"excludeExternals":true,"excludeNotExported":true,"excludeNotDocumented":false,"excludePrivate":true,"excludeProtected":false,"ignoreCompilerErrors":true,"disableSources":false,"includes":"","media":"","out":"docs","json":"","theme":"./node_modules/typedoc-neo-theme/bin/default","name":"","includeVersion":false,"excludeTags":[],"readme":"","defaultCategory":"Other","categoryOrder":[],"categorizeByGroup":true,"gitRevision":"","gitRemote":"origin","gaID":"","gaSite":"auto","hideGenerator":false,"toc":[],"disableOutputCheck":true,"help":false,"version":false,"plugin":[],"logger":"console","listInvalidSymbolLinks":false,"links":[{"label":"SASjs on Github","url":"https://github.com/sasjs/adapter"},{"label":"SASjs.io","url":"https://sasjs.io"},{"label":"SASjs CLI","url":"https://github.com/sasjs/cli"},{"label":"React Seed App","url":"https://github.com/sasjs/react-seed-app"}],"outline":[{"SAS Adapter":{"SASjs":"classes/reflection-717.reflection-180.sasjs","Types":"modules/types"},"SAS Viya API Client":"classes/reflection-717.reflection-180.sasviyaapiclient","SAS 9 API Client":"classes/reflection-717.reflection-180.sas9apiclient"}],"source":[{"path":"https://github.com/sasjs/adapter/blob/master/src/","line":"L"}],"disableAutoModuleName":"false"}-->
|
||||
</div>
|
||||
<div class="col-2 col-menu secondary-menu">
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
<li class=" tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="reflection-724.reflection-187.fileuploader.html" class="tsd-kind-icon">File<wbr>Uploader</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="current">
|
||||
<li class="current tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="reflection-724.reflection-187.sas9apiclient.html" class="tsd-kind-icon">SAS9<wbr>Api<wbr>Client</a>
|
||||
<ul>
|
||||
<li class=" tsd-kind-constructor tsd-parent-kind-class">
|
||||
<a href="reflection-724.reflection-187.sas9apiclient.html#constructor" class="tsd-kind-icon">constructor</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-method tsd-parent-kind-class">
|
||||
<a href="reflection-724.reflection-187.sas9apiclient.html#executescript" class="tsd-kind-icon">execute<wbr>Script</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-method tsd-parent-kind-class">
|
||||
<a href="reflection-724.reflection-187.sas9apiclient.html#getconfig" class="tsd-kind-icon">get<wbr>Config</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-method tsd-parent-kind-class">
|
||||
<a href="reflection-724.reflection-187.sas9apiclient.html#setconfig" class="tsd-kind-icon">set<wbr>Config</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="after-current">
|
||||
<li class=" tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="reflection-724.reflection-187.sasviyaapiclient.html" class="tsd-kind-icon">SASViya<wbr>Api<wbr>Client</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="reflection-724.reflection-187.sasjs.html" class="tsd-kind-icon">SASjs</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="reflection-724.reflection-187.sessionmanager.html" class="tsd-kind-icon">Session<wbr>Manager</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="http://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="../assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
1336
docs/classes/reflection-724.reflection-187.sasjs.html
Normal file
1336
docs/classes/reflection-724.reflection-187.sasjs.html
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
271
docs/classes/reflection-724.reflection-187.sessionmanager.html
Normal file
271
docs/classes/reflection-724.reflection-187.sessionmanager.html
Normal file
@@ -0,0 +1,271 @@
|
||||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>SessionManager | @sasjs/adapter</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<ul class="results-priority" style="display:none">
|
||||
</ul>
|
||||
<a href="../index.html" class="title">@sasjs/adapter</a>
|
||||
 <a href="https://github.com/sasjs/adapter" class="title">SASjs on Github</a>
|
||||
 <a href="https://sasjs.io" class="title">SASjs.io</a>
|
||||
 <a href="https://github.com/sasjs/cli" class="title">SASjs CLI</a>
|
||||
 <a href="https://github.com/sasjs/react-seed-app" class="title">React Seed App</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li>
|
||||
<a href="../modules/reflection-724.html"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../modules/reflection-724.reflection-187.html"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="reflection-724.reflection-187.sessionmanager.html">SessionManager</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-3 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation outline primary">
|
||||
<a style="margin-left:0em" href="../globals.html">Globals</a>
|
||||
<ul style="display:none">
|
||||
{"SAS Adapter":{"SASjs":"classes/reflection-717.reflection-180.sasjs","Types":"modules/types"},"SAS Viya API Client":"classes/reflection-717.reflection-180.sasviyaapiclient","SAS 9 API Client":"classes/reflection-717.reflection-180.sas9apiclient"}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="col-7 offset-3 col-content">
|
||||
<h1>Class SessionManager</h1>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h3>Hierarchy</h3>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li>
|
||||
<span class="target">SessionManager</span>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<div class="tsd-index-content">
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Constructors</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="reflection-724.reflection-187.sessionmanager.html#constructor" class="tsd-kind-icon">constructor</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Methods</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="reflection-724.reflection-187.sessionmanager.html#clearsession" class="tsd-kind-icon">clearSession</a></li>
|
||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="reflection-724.reflection-187.sessionmanager.html#getsession" class="tsd-kind-icon">getSession</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Constructors</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class">
|
||||
<a name="constructor" class="tsd-anchor"></a>
|
||||
<h3>constructor</h3>
|
||||
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">new <wbr>Session<wbr>Manager<span class="tsd-signature-symbol">(</span>serverUrl<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, contextName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, setCsrfToken<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="reflection-724.reflection-187.sessionmanager.html" class="tsd-signature-type">SessionManager</a></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in
|
||||
<a href="https://github.com/sasjs/adapter/blob/master/src/SessionManager.ts#L6">
|
||||
SessionManager.ts:6
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>serverUrl: <span class="tsd-signature-type">string</span></h5>
|
||||
</li>
|
||||
<li>
|
||||
<h5>contextName: <span class="tsd-signature-type">string</span></h5>
|
||||
</li>
|
||||
<li>
|
||||
<h5>setCsrfToken: <span class="tsd-signature-type">function</span></h5>
|
||||
<ul class="tsd-parameters">
|
||||
<li class="tsd-parameter-siganture">
|
||||
<ul class="tsd-signatures tsd-kind-type-literal">
|
||||
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>csrfToken<span class="tsd-signature-symbol">: </span><a href="../interfaces/types.csrftoken.html" class="tsd-signature-type">CsrfToken</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>csrfToken: <a href="../interfaces/types.csrftoken.html" class="tsd-signature-type">CsrfToken</a></h5>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <a href="reflection-724.reflection-187.sessionmanager.html" class="tsd-signature-type">SessionManager</a></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Methods</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
||||
<a name="clearsession" class="tsd-anchor"></a>
|
||||
<h3>clear<wbr>Session</h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">clear<wbr>Session<span class="tsd-signature-symbol">(</span>id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, accessToken<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in
|
||||
<a href="https://github.com/sasjs/adapter/blob/master/src/SessionManager.ts#L37">
|
||||
SessionManager.ts:37
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>id: <span class="tsd-signature-type">string</span></h5>
|
||||
</li>
|
||||
<li>
|
||||
<h5><span class="tsd-flag ts-flagOptional">Optional</span> accessToken: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h5>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
||||
<a name="getsession" class="tsd-anchor"></a>
|
||||
<h3>get<wbr>Session</h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">get<wbr>Session<span class="tsd-signature-symbol">(</span>accessToken<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/types.session.html" class="tsd-signature-type">Session</a><span class="tsd-signature-symbol">></span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in
|
||||
<a href="https://github.com/sasjs/adapter/blob/master/src/SessionManager.ts#L19">
|
||||
SessionManager.ts:19
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5><span class="tsd-flag ts-flagOptional">Optional</span> accessToken: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h5>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/types.session.html" class="tsd-signature-type">Session</a><span class="tsd-signature-symbol">></span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
<!--{"options":"/Users/allan/git/adapter","tsconfig":"/Users/allan/git/adapter","inputFiles":["/Users/allan/git/adapter/src/FileUploader.ts","/Users/allan/git/adapter/src/SAS9ApiClient.ts","/Users/allan/git/adapter/src/SASViyaApiClient.ts","/Users/allan/git/adapter/src/SASjs.ts","/Users/allan/git/adapter/src/SessionManager.ts","/Users/allan/git/adapter/src/index.ts","/Users/allan/git/adapter/src/types/Context.ts","/Users/allan/git/adapter/src/types/CsrfToken.ts","/Users/allan/git/adapter/src/types/ErrorResponse.ts","/Users/allan/git/adapter/src/types/Folder.ts","/Users/allan/git/adapter/src/types/Job.ts","/Users/allan/git/adapter/src/types/JobDefinition.ts","/Users/allan/git/adapter/src/types/JobResult.ts","/Users/allan/git/adapter/src/types/Link.ts","/Users/allan/git/adapter/src/types/SASjsConfig.ts","/Users/allan/git/adapter/src/types/SASjsRequest.ts","/Users/allan/git/adapter/src/types/SASjsWaitingRequest.ts","/Users/allan/git/adapter/src/types/ServerType.ts","/Users/allan/git/adapter/src/types/Session.ts","/Users/allan/git/adapter/src/types/UploadFile.ts","/Users/allan/git/adapter/src/types/index.ts","/Users/allan/git/adapter/src/utils/asyncForEach.ts","/Users/allan/git/adapter/src/utils/compareTimestamps.ts","/Users/allan/git/adapter/src/utils/convertToCsv.ts","/Users/allan/git/adapter/src/utils/formatDataForRequest.ts","/Users/allan/git/adapter/src/utils/index.ts","/Users/allan/git/adapter/src/utils/isAuthorizeFormRequired.ts","/Users/allan/git/adapter/src/utils/isIeOrEdge.ts","/Users/allan/git/adapter/src/utils/isLoginRequired.ts","/Users/allan/git/adapter/src/utils/isLoginSuccess.ts","/Users/allan/git/adapter/src/utils/isUri.ts","/Users/allan/git/adapter/src/utils/isUrl.ts","/Users/allan/git/adapter/src/utils/makeRequest.ts","/Users/allan/git/adapter/src/utils/needsRetry.ts","/Users/allan/git/adapter/src/utils/parseAndSubmitAuthorizeForm.ts","/Users/allan/git/adapter/src/utils/parseGeneratedCode.ts","/Users/allan/git/adapter/src/utils/parseSasViyaLog.ts","/Users/allan/git/adapter/src/utils/parseSourceCode.ts","/Users/allan/git/adapter/src/utils/parseWeboutResponse.ts","/Users/allan/git/adapter/src/utils/serialize.ts","/Users/allan/git/adapter/src/utils/splitChunks.ts"],"mode":1,"includeDeclarations":true,"entryPoint":"","exclude":["**/*+(index|.spec|.e2e).ts"],"externalPattern":[],"excludeExternals":true,"excludeNotExported":true,"excludeNotDocumented":false,"excludePrivate":true,"excludeProtected":false,"ignoreCompilerErrors":true,"disableSources":false,"includes":"","media":"","out":"docs","json":"","theme":"./node_modules/typedoc-neo-theme/bin/default","name":"","includeVersion":false,"excludeTags":[],"readme":"","defaultCategory":"Other","categoryOrder":[],"categorizeByGroup":true,"gitRevision":"","gitRemote":"origin","gaID":"","gaSite":"auto","hideGenerator":false,"toc":[],"disableOutputCheck":true,"help":false,"version":false,"plugin":[],"logger":"console","listInvalidSymbolLinks":false,"links":[{"label":"SASjs on Github","url":"https://github.com/sasjs/adapter"},{"label":"SASjs.io","url":"https://sasjs.io"},{"label":"SASjs CLI","url":"https://github.com/sasjs/cli"},{"label":"React Seed App","url":"https://github.com/sasjs/react-seed-app"}],"outline":[{"SAS Adapter":{"SASjs":"classes/reflection-717.reflection-180.sasjs","Types":"modules/types"},"SAS Viya API Client":"classes/reflection-717.reflection-180.sasviyaapiclient","SAS 9 API Client":"classes/reflection-717.reflection-180.sas9apiclient"}],"source":[{"path":"https://github.com/sasjs/adapter/blob/master/src/","line":"L"}],"disableAutoModuleName":"false"}-->
|
||||
</div>
|
||||
<div class="col-2 col-menu secondary-menu">
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
<li class=" tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="reflection-724.reflection-187.fileuploader.html" class="tsd-kind-icon">File<wbr>Uploader</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="reflection-724.reflection-187.sas9apiclient.html" class="tsd-kind-icon">SAS9<wbr>Api<wbr>Client</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="reflection-724.reflection-187.sasviyaapiclient.html" class="tsd-kind-icon">SASViya<wbr>Api<wbr>Client</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="reflection-724.reflection-187.sasjs.html" class="tsd-kind-icon">SASjs</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="current">
|
||||
<li class="current tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="reflection-724.reflection-187.sessionmanager.html" class="tsd-kind-icon">Session<wbr>Manager</a>
|
||||
<ul>
|
||||
<li class=" tsd-kind-constructor tsd-parent-kind-class">
|
||||
<a href="reflection-724.reflection-187.sessionmanager.html#constructor" class="tsd-kind-icon">constructor</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-method tsd-parent-kind-class">
|
||||
<a href="reflection-724.reflection-187.sessionmanager.html#clearsession" class="tsd-kind-icon">clear<wbr>Session</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-method tsd-parent-kind-class">
|
||||
<a href="reflection-724.reflection-187.sessionmanager.html#getsession" class="tsd-kind-icon">get<wbr>Session</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="after-current">
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="http://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="../assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1336
docs/classes/reflection-725.reflection-191.sasjs.html
Normal file
1336
docs/classes/reflection-725.reflection-191.sasjs.html
Normal file
File diff suppressed because one or more lines are too long
1267
docs/classes/reflection-725.reflection-191.sasviyaapiclient.html
Normal file
1267
docs/classes/reflection-725.reflection-191.sasviyaapiclient.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
231
docs/classes/reflection-725.reflection-194.fileuploader.html
Normal file
231
docs/classes/reflection-725.reflection-194.fileuploader.html
Normal file
File diff suppressed because one or more lines are too long
312
docs/classes/reflection-725.reflection-194.sas9apiclient.html
Normal file
312
docs/classes/reflection-725.reflection-194.sas9apiclient.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1270
docs/classes/reflection-725.reflection-194.sasviyaapiclient.html
Normal file
1270
docs/classes/reflection-725.reflection-194.sasviyaapiclient.html
Normal file
File diff suppressed because one or more lines are too long
271
docs/classes/reflection-725.reflection-194.sessionmanager.html
Normal file
271
docs/classes/reflection-725.reflection-194.sessionmanager.html
Normal file
File diff suppressed because one or more lines are too long
231
docs/classes/reflection-734.reflection-194.fileuploader.html
Normal file
231
docs/classes/reflection-734.reflection-194.fileuploader.html
Normal file
File diff suppressed because one or more lines are too long
312
docs/classes/reflection-734.reflection-194.sas9apiclient.html
Normal file
312
docs/classes/reflection-734.reflection-194.sas9apiclient.html
Normal file
File diff suppressed because one or more lines are too long
1385
docs/classes/reflection-734.reflection-194.sasjs.html
Normal file
1385
docs/classes/reflection-734.reflection-194.sasjs.html
Normal file
File diff suppressed because one or more lines are too long
1350
docs/classes/reflection-734.reflection-194.sasviyaapiclient.html
Normal file
1350
docs/classes/reflection-734.reflection-194.sasviyaapiclient.html
Normal file
File diff suppressed because one or more lines are too long
271
docs/classes/reflection-734.reflection-194.sessionmanager.html
Normal file
271
docs/classes/reflection-734.reflection-194.sessionmanager.html
Normal file
File diff suppressed because one or more lines are too long
231
docs/classes/reflection-743.reflection-195.fileuploader.html
Normal file
231
docs/classes/reflection-743.reflection-195.fileuploader.html
Normal file
File diff suppressed because one or more lines are too long
312
docs/classes/reflection-743.reflection-195.sas9apiclient.html
Normal file
312
docs/classes/reflection-743.reflection-195.sas9apiclient.html
Normal file
File diff suppressed because one or more lines are too long
1419
docs/classes/reflection-743.reflection-195.sasjs.html
Normal file
1419
docs/classes/reflection-743.reflection-195.sasjs.html
Normal file
File diff suppressed because one or more lines are too long
1415
docs/classes/reflection-743.reflection-195.sasviyaapiclient.html
Normal file
1415
docs/classes/reflection-743.reflection-195.sasviyaapiclient.html
Normal file
File diff suppressed because one or more lines are too long
271
docs/classes/reflection-743.reflection-195.sessionmanager.html
Normal file
271
docs/classes/reflection-743.reflection-195.sessionmanager.html
Normal file
File diff suppressed because one or more lines are too long
231
docs/classes/reflection-759.reflection-211.fileuploader.html
Normal file
231
docs/classes/reflection-759.reflection-211.fileuploader.html
Normal file
File diff suppressed because one or more lines are too long
312
docs/classes/reflection-759.reflection-211.sas9apiclient.html
Normal file
312
docs/classes/reflection-759.reflection-211.sas9apiclient.html
Normal file
File diff suppressed because one or more lines are too long
1430
docs/classes/reflection-759.reflection-211.sasjs.html
Normal file
1430
docs/classes/reflection-759.reflection-211.sasjs.html
Normal file
File diff suppressed because one or more lines are too long
1395
docs/classes/reflection-759.reflection-211.sasviyaapiclient.html
Normal file
1395
docs/classes/reflection-759.reflection-211.sasviyaapiclient.html
Normal file
File diff suppressed because one or more lines are too long
271
docs/classes/reflection-759.reflection-211.sessionmanager.html
Normal file
271
docs/classes/reflection-759.reflection-211.sessionmanager.html
Normal file
File diff suppressed because one or more lines are too long
231
docs/classes/reflection-762.reflection-214.fileuploader.html
Normal file
231
docs/classes/reflection-762.reflection-214.fileuploader.html
Normal file
File diff suppressed because one or more lines are too long
312
docs/classes/reflection-762.reflection-214.sas9apiclient.html
Normal file
312
docs/classes/reflection-762.reflection-214.sas9apiclient.html
Normal file
File diff suppressed because one or more lines are too long
1430
docs/classes/reflection-762.reflection-214.sasjs.html
Normal file
1430
docs/classes/reflection-762.reflection-214.sasjs.html
Normal file
File diff suppressed because one or more lines are too long
1395
docs/classes/reflection-762.reflection-214.sasviyaapiclient.html
Normal file
1395
docs/classes/reflection-762.reflection-214.sasviyaapiclient.html
Normal file
File diff suppressed because one or more lines are too long
271
docs/classes/reflection-762.reflection-214.sessionmanager.html
Normal file
271
docs/classes/reflection-762.reflection-214.sessionmanager.html
Normal file
File diff suppressed because one or more lines are too long
233
docs/classes/types.errorresponse.html
Normal file
233
docs/classes/types.errorresponse.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
398
docs/interfaces/types.contextallattributes.html
Normal file
398
docs/interfaces/types.contextallattributes.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
106
docs/modules/reflection-717.html
Normal file
106
docs/modules/reflection-717.html
Normal file
File diff suppressed because one or more lines are too long
128
docs/modules/reflection-717.reflection-180.html
Normal file
128
docs/modules/reflection-717.reflection-180.html
Normal file
File diff suppressed because one or more lines are too long
106
docs/modules/reflection-724.html
Normal file
106
docs/modules/reflection-724.html
Normal file
@@ -0,0 +1,106 @@
|
||||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title> | @sasjs/adapter</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<ul class="results-priority" style="display:none">
|
||||
</ul>
|
||||
<a href="../index.html" class="title">@sasjs/adapter</a>
|
||||
 <a href="https://github.com/sasjs/adapter" class="title">SASjs on Github</a>
|
||||
 <a href="https://sasjs.io" class="title">SASjs.io</a>
|
||||
 <a href="https://github.com/sasjs/cli" class="title">SASjs CLI</a>
|
||||
 <a href="https://github.com/sasjs/react-seed-app" class="title">React Seed App</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li>
|
||||
<a href="reflection-724.html"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-3 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation outline primary">
|
||||
<a style="margin-left:0em" href="../globals.html">Globals</a>
|
||||
<ul style="display:none">
|
||||
{"SAS Adapter":{"SASjs":"classes/reflection-717.reflection-180.sasjs","Types":"modules/types"},"SAS Viya API Client":"classes/reflection-717.reflection-180.sasviyaapiclient","SAS 9 API Client":"classes/reflection-717.reflection-180.sas9apiclient"}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="col-7 offset-3 col-content">
|
||||
<h1>Module</h1>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<div class="tsd-index-content">
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Modules</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-module tsd-parent-kind-module"><a href="reflection-724.reflection-187.html" class="tsd-kind-icon"><em>Module</em></a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<!--{"options":"/Users/allan/git/adapter","tsconfig":"/Users/allan/git/adapter","inputFiles":["/Users/allan/git/adapter/src/FileUploader.ts","/Users/allan/git/adapter/src/SAS9ApiClient.ts","/Users/allan/git/adapter/src/SASViyaApiClient.ts","/Users/allan/git/adapter/src/SASjs.ts","/Users/allan/git/adapter/src/SessionManager.ts","/Users/allan/git/adapter/src/index.ts","/Users/allan/git/adapter/src/types/Context.ts","/Users/allan/git/adapter/src/types/CsrfToken.ts","/Users/allan/git/adapter/src/types/ErrorResponse.ts","/Users/allan/git/adapter/src/types/Folder.ts","/Users/allan/git/adapter/src/types/Job.ts","/Users/allan/git/adapter/src/types/JobDefinition.ts","/Users/allan/git/adapter/src/types/JobResult.ts","/Users/allan/git/adapter/src/types/Link.ts","/Users/allan/git/adapter/src/types/SASjsConfig.ts","/Users/allan/git/adapter/src/types/SASjsRequest.ts","/Users/allan/git/adapter/src/types/SASjsWaitingRequest.ts","/Users/allan/git/adapter/src/types/ServerType.ts","/Users/allan/git/adapter/src/types/Session.ts","/Users/allan/git/adapter/src/types/UploadFile.ts","/Users/allan/git/adapter/src/types/index.ts","/Users/allan/git/adapter/src/utils/asyncForEach.ts","/Users/allan/git/adapter/src/utils/compareTimestamps.ts","/Users/allan/git/adapter/src/utils/convertToCsv.ts","/Users/allan/git/adapter/src/utils/formatDataForRequest.ts","/Users/allan/git/adapter/src/utils/index.ts","/Users/allan/git/adapter/src/utils/isAuthorizeFormRequired.ts","/Users/allan/git/adapter/src/utils/isIeOrEdge.ts","/Users/allan/git/adapter/src/utils/isLoginRequired.ts","/Users/allan/git/adapter/src/utils/isLoginSuccess.ts","/Users/allan/git/adapter/src/utils/isUri.ts","/Users/allan/git/adapter/src/utils/isUrl.ts","/Users/allan/git/adapter/src/utils/makeRequest.ts","/Users/allan/git/adapter/src/utils/needsRetry.ts","/Users/allan/git/adapter/src/utils/parseAndSubmitAuthorizeForm.ts","/Users/allan/git/adapter/src/utils/parseGeneratedCode.ts","/Users/allan/git/adapter/src/utils/parseSasViyaLog.ts","/Users/allan/git/adapter/src/utils/parseSourceCode.ts","/Users/allan/git/adapter/src/utils/parseWeboutResponse.ts","/Users/allan/git/adapter/src/utils/serialize.ts","/Users/allan/git/adapter/src/utils/splitChunks.ts"],"mode":1,"includeDeclarations":true,"entryPoint":"","exclude":["**/*+(index|.spec|.e2e).ts"],"externalPattern":[],"excludeExternals":true,"excludeNotExported":true,"excludeNotDocumented":false,"excludePrivate":true,"excludeProtected":false,"ignoreCompilerErrors":true,"disableSources":false,"includes":"","media":"","out":"docs","json":"","theme":"./node_modules/typedoc-neo-theme/bin/default","name":"","includeVersion":false,"excludeTags":[],"readme":"","defaultCategory":"Other","categoryOrder":[],"categorizeByGroup":true,"gitRevision":"","gitRemote":"origin","gaID":"","gaSite":"auto","hideGenerator":false,"toc":[],"disableOutputCheck":true,"help":false,"version":false,"plugin":[],"logger":"console","listInvalidSymbolLinks":false,"links":[{"label":"SASjs on Github","url":"https://github.com/sasjs/adapter"},{"label":"SASjs.io","url":"https://sasjs.io"},{"label":"SASjs CLI","url":"https://github.com/sasjs/cli"},{"label":"React Seed App","url":"https://github.com/sasjs/react-seed-app"}],"outline":[{"SAS Adapter":{"SASjs":"classes/reflection-717.reflection-180.sasjs","Types":"modules/types"},"SAS Viya API Client":"classes/reflection-717.reflection-180.sasviyaapiclient","SAS 9 API Client":"classes/reflection-717.reflection-180.sas9apiclient"}],"source":[{"path":"https://github.com/sasjs/adapter/blob/master/src/","line":"L"}],"disableAutoModuleName":"false"}-->
|
||||
</div>
|
||||
<div class="col-2 col-menu secondary-menu">
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="http://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="../assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
128
docs/modules/reflection-724.reflection-187.html
Normal file
128
docs/modules/reflection-724.reflection-187.html
Normal file
@@ -0,0 +1,128 @@
|
||||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title> | @sasjs/adapter</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<ul class="results-priority" style="display:none">
|
||||
</ul>
|
||||
<a href="../index.html" class="title">@sasjs/adapter</a>
|
||||
 <a href="https://github.com/sasjs/adapter" class="title">SASjs on Github</a>
|
||||
 <a href="https://sasjs.io" class="title">SASjs.io</a>
|
||||
 <a href="https://github.com/sasjs/cli" class="title">SASjs CLI</a>
|
||||
 <a href="https://github.com/sasjs/react-seed-app" class="title">React Seed App</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li>
|
||||
<a href="reflection-724.html"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="reflection-724.reflection-187.html"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-3 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation outline primary">
|
||||
<a style="margin-left:0em" href="../globals.html">Globals</a>
|
||||
<ul style="display:none">
|
||||
{"SAS Adapter":{"SASjs":"classes/reflection-717.reflection-180.sasjs","Types":"modules/types"},"SAS Viya API Client":"classes/reflection-717.reflection-180.sasviyaapiclient","SAS 9 API Client":"classes/reflection-717.reflection-180.sas9apiclient"}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="col-7 offset-3 col-content">
|
||||
<h1>Module</h1>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<div class="tsd-index-content">
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Classes</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-class tsd-parent-kind-module"><a href="../classes/reflection-724.reflection-187.fileuploader.html" class="tsd-kind-icon">FileUploader</a></li>
|
||||
<li class="tsd-kind-class tsd-parent-kind-module"><a href="../classes/reflection-724.reflection-187.sas9apiclient.html" class="tsd-kind-icon">SAS9ApiClient</a></li>
|
||||
<li class="tsd-kind-class tsd-parent-kind-module"><a href="../classes/reflection-724.reflection-187.sasviyaapiclient.html" class="tsd-kind-icon">SASViyaApiClient</a></li>
|
||||
<li class="tsd-kind-class tsd-parent-kind-module"><a href="../classes/reflection-724.reflection-187.sasjs.html" class="tsd-kind-icon">SASjs</a></li>
|
||||
<li class="tsd-kind-class tsd-parent-kind-module"><a href="../classes/reflection-724.reflection-187.sessionmanager.html" class="tsd-kind-icon">SessionManager</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<!--{"options":"/Users/allan/git/adapter","tsconfig":"/Users/allan/git/adapter","inputFiles":["/Users/allan/git/adapter/src/FileUploader.ts","/Users/allan/git/adapter/src/SAS9ApiClient.ts","/Users/allan/git/adapter/src/SASViyaApiClient.ts","/Users/allan/git/adapter/src/SASjs.ts","/Users/allan/git/adapter/src/SessionManager.ts","/Users/allan/git/adapter/src/index.ts","/Users/allan/git/adapter/src/types/Context.ts","/Users/allan/git/adapter/src/types/CsrfToken.ts","/Users/allan/git/adapter/src/types/ErrorResponse.ts","/Users/allan/git/adapter/src/types/Folder.ts","/Users/allan/git/adapter/src/types/Job.ts","/Users/allan/git/adapter/src/types/JobDefinition.ts","/Users/allan/git/adapter/src/types/JobResult.ts","/Users/allan/git/adapter/src/types/Link.ts","/Users/allan/git/adapter/src/types/SASjsConfig.ts","/Users/allan/git/adapter/src/types/SASjsRequest.ts","/Users/allan/git/adapter/src/types/SASjsWaitingRequest.ts","/Users/allan/git/adapter/src/types/ServerType.ts","/Users/allan/git/adapter/src/types/Session.ts","/Users/allan/git/adapter/src/types/UploadFile.ts","/Users/allan/git/adapter/src/types/index.ts","/Users/allan/git/adapter/src/utils/asyncForEach.ts","/Users/allan/git/adapter/src/utils/compareTimestamps.ts","/Users/allan/git/adapter/src/utils/convertToCsv.ts","/Users/allan/git/adapter/src/utils/formatDataForRequest.ts","/Users/allan/git/adapter/src/utils/index.ts","/Users/allan/git/adapter/src/utils/isAuthorizeFormRequired.ts","/Users/allan/git/adapter/src/utils/isIeOrEdge.ts","/Users/allan/git/adapter/src/utils/isLoginRequired.ts","/Users/allan/git/adapter/src/utils/isLoginSuccess.ts","/Users/allan/git/adapter/src/utils/isUri.ts","/Users/allan/git/adapter/src/utils/isUrl.ts","/Users/allan/git/adapter/src/utils/makeRequest.ts","/Users/allan/git/adapter/src/utils/needsRetry.ts","/Users/allan/git/adapter/src/utils/parseAndSubmitAuthorizeForm.ts","/Users/allan/git/adapter/src/utils/parseGeneratedCode.ts","/Users/allan/git/adapter/src/utils/parseSasViyaLog.ts","/Users/allan/git/adapter/src/utils/parseSourceCode.ts","/Users/allan/git/adapter/src/utils/parseWeboutResponse.ts","/Users/allan/git/adapter/src/utils/serialize.ts","/Users/allan/git/adapter/src/utils/splitChunks.ts"],"mode":1,"includeDeclarations":true,"entryPoint":"","exclude":["**/*+(index|.spec|.e2e).ts"],"externalPattern":[],"excludeExternals":true,"excludeNotExported":true,"excludeNotDocumented":false,"excludePrivate":true,"excludeProtected":false,"ignoreCompilerErrors":true,"disableSources":false,"includes":"","media":"","out":"docs","json":"","theme":"./node_modules/typedoc-neo-theme/bin/default","name":"","includeVersion":false,"excludeTags":[],"readme":"","defaultCategory":"Other","categoryOrder":[],"categorizeByGroup":true,"gitRevision":"","gitRemote":"origin","gaID":"","gaSite":"auto","hideGenerator":false,"toc":[],"disableOutputCheck":true,"help":false,"version":false,"plugin":[],"logger":"console","listInvalidSymbolLinks":false,"links":[{"label":"SASjs on Github","url":"https://github.com/sasjs/adapter"},{"label":"SASjs.io","url":"https://sasjs.io"},{"label":"SASjs CLI","url":"https://github.com/sasjs/cli"},{"label":"React Seed App","url":"https://github.com/sasjs/react-seed-app"}],"outline":[{"SAS Adapter":{"SASjs":"classes/reflection-717.reflection-180.sasjs","Types":"modules/types"},"SAS Viya API Client":"classes/reflection-717.reflection-180.sasviyaapiclient","SAS 9 API Client":"classes/reflection-717.reflection-180.sas9apiclient"}],"source":[{"path":"https://github.com/sasjs/adapter/blob/master/src/","line":"L"}],"disableAutoModuleName":"false"}-->
|
||||
</div>
|
||||
<div class="col-2 col-menu secondary-menu">
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
<li class=" tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="../classes/reflection-724.reflection-187.fileuploader.html" class="tsd-kind-icon">File<wbr>Uploader</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="../classes/reflection-724.reflection-187.sas9apiclient.html" class="tsd-kind-icon">SAS9<wbr>Api<wbr>Client</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="../classes/reflection-724.reflection-187.sasviyaapiclient.html" class="tsd-kind-icon">SASViya<wbr>Api<wbr>Client</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="../classes/reflection-724.reflection-187.sasjs.html" class="tsd-kind-icon">SASjs</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-class tsd-parent-kind-module root">
|
||||
<a href="../classes/reflection-724.reflection-187.sessionmanager.html" class="tsd-kind-icon">Session<wbr>Manager</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="http://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="../assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
106
docs/modules/reflection-725.html
Normal file
106
docs/modules/reflection-725.html
Normal file
File diff suppressed because one or more lines are too long
128
docs/modules/reflection-725.reflection-191.html
Normal file
128
docs/modules/reflection-725.reflection-191.html
Normal file
File diff suppressed because one or more lines are too long
128
docs/modules/reflection-725.reflection-194.html
Normal file
128
docs/modules/reflection-725.reflection-194.html
Normal file
File diff suppressed because one or more lines are too long
106
docs/modules/reflection-734.html
Normal file
106
docs/modules/reflection-734.html
Normal file
File diff suppressed because one or more lines are too long
128
docs/modules/reflection-734.reflection-194.html
Normal file
128
docs/modules/reflection-734.reflection-194.html
Normal file
File diff suppressed because one or more lines are too long
106
docs/modules/reflection-743.html
Normal file
106
docs/modules/reflection-743.html
Normal file
File diff suppressed because one or more lines are too long
128
docs/modules/reflection-743.reflection-195.html
Normal file
128
docs/modules/reflection-743.reflection-195.html
Normal file
File diff suppressed because one or more lines are too long
106
docs/modules/reflection-759.html
Normal file
106
docs/modules/reflection-759.html
Normal file
File diff suppressed because one or more lines are too long
128
docs/modules/reflection-759.reflection-211.html
Normal file
128
docs/modules/reflection-759.reflection-211.html
Normal file
File diff suppressed because one or more lines are too long
106
docs/modules/reflection-762.html
Normal file
106
docs/modules/reflection-762.html
Normal file
File diff suppressed because one or more lines are too long
128
docs/modules/reflection-762.reflection-214.html
Normal file
128
docs/modules/reflection-762.reflection-214.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -30,8 +30,8 @@
|
||||
$('#chart-container').append('<canvas id="myChart" style="display: none;"></canvas>')
|
||||
// make a request to a SAS service
|
||||
var type = $("#cars")[0].options[$("#cars")[0].selectedIndex].value;
|
||||
// request data from an endpoint under your appLoc
|
||||
sasJs.request("/common/getdata", {
|
||||
// request data from an endpoint under your appLoc (missing opening slash implies relative path)
|
||||
sasJs.request("common/getdata", {
|
||||
// send data as an array of objects - each object is one row
|
||||
fromjs: [{ type: type }]
|
||||
}).then((response) => {
|
||||
|
||||
2221
package-lock.json
generated
2221
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@@ -37,22 +37,22 @@
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@types/isomorphic-fetch": "0.0.35",
|
||||
"@types/jest": "^26.0.13",
|
||||
"@types/jest": "^26.0.14",
|
||||
"cp": "^0.2.0",
|
||||
"jest": "^25.5.4",
|
||||
"path": "^0.12.7",
|
||||
"rimraf": "^3.0.2",
|
||||
"semantic-release": "^17.1.1",
|
||||
"semantic-release": "^17.1.2",
|
||||
"terser-webpack-plugin": "^4.2.2",
|
||||
"ts-jest": "^25.5.1",
|
||||
"ts-loader": "^8.0.3",
|
||||
"ts-loader": "^8.0.4",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"typedoc": "^0.17.8",
|
||||
"typedoc-neo-theme": "^1.0.10",
|
||||
"typedoc-plugin-external-module-name": "^4.0.3",
|
||||
"typescript": "^3.9.7",
|
||||
"uglifyjs-webpack-plugin": "^2.2.0",
|
||||
"webpack": "^4.44.1",
|
||||
"webpack": "^4.44.2",
|
||||
"webpack-cli": "^3.3.12"
|
||||
},
|
||||
"main": "index.js",
|
||||
|
||||
6
sasjs-tests/package-lock.json
generated
6
sasjs-tests/package-lock.json
generated
@@ -1357,9 +1357,9 @@
|
||||
"integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw=="
|
||||
},
|
||||
"@sasjs/adapter": {
|
||||
"version": "1.3.13",
|
||||
"resolved": "https://registry.npmjs.org/@sasjs/adapter/-/adapter-1.3.13.tgz",
|
||||
"integrity": "sha512-dWcDxgY3FB7Yx1I5dPpeQeyJDu4lezhIFrjn6lbdwRhV15aqOt4l9o9qZP+VbgOXqyi9gN0Y+p+vs2chBDFQqg==",
|
||||
"version": "1.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@sasjs/adapter/-/adapter-1.12.0.tgz",
|
||||
"integrity": "sha512-0uGQH9ynomWzdBaEujEtcR38q6V7LCgG0mrb1Wellv6cC/IHD3j6WfeZZAgtiMPeOSJjbCDBOlVnzC2TlBqJFw==",
|
||||
"requires": {
|
||||
"es6-promise": "^4.2.8",
|
||||
"form-data": "^3.0.0",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"homepage": ".",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@sasjs/adapter": "^1.3.13",
|
||||
"@sasjs/adapter": "^1.12.0",
|
||||
"@sasjs/test-framework": "^1.4.0",
|
||||
"@testing-library/jest-dom": "^4.2.4",
|
||||
"@testing-library/react": "^9.5.0",
|
||||
|
||||
@@ -13,7 +13,7 @@ const defaultConfig: SASjsConfig = {
|
||||
};
|
||||
|
||||
const customConfig = {
|
||||
serverUrl: "url",
|
||||
serverUrl: "http://url.com",
|
||||
pathSAS9: "sas9",
|
||||
pathSASViya: "viya",
|
||||
appLoc: "/Public/seedapp",
|
||||
|
||||
@@ -47,6 +47,16 @@ const getLargeObjectData = () => {
|
||||
export const sendArrTests = (adapter: SASjs): TestSuite => ({
|
||||
name: "sendArr",
|
||||
tests: [
|
||||
{
|
||||
title: "Absolute paths",
|
||||
description: "Should work with absolute paths to SAS jobs",
|
||||
test: () => {
|
||||
return adapter.request("/Public/app/common/sendArr", stringData);
|
||||
},
|
||||
assertion: (res: any) => {
|
||||
return res.table1[0][0] === stringData.table1[0].col1;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "Single string value",
|
||||
description: "Should send an array with a single string value",
|
||||
@@ -78,7 +88,7 @@ export const sendArrTests = (adapter: SASjs): TestSuite => ({
|
||||
return adapter.request("common/sendArr", data).catch((e) => e);
|
||||
},
|
||||
assertion: (error: any) => {
|
||||
return !!error && !!error.MESSAGE;
|
||||
return !!error && !!error.body && !!error.body.message;
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -175,7 +185,7 @@ export const sendObjTests = (adapter: SASjs): TestSuite => ({
|
||||
};
|
||||
return adapter.request("common/sendObj", invalidData).catch((e) => e);
|
||||
},
|
||||
assertion: (error: any) => !!error && !!error.MESSAGE
|
||||
assertion: (error: any) => !!error && !!error.body && !!error.body.message
|
||||
},
|
||||
{
|
||||
title: "Single string value",
|
||||
@@ -209,7 +219,7 @@ export const sendObjTests = (adapter: SASjs): TestSuite => ({
|
||||
.catch((e) => e);
|
||||
},
|
||||
assertion: (error: any) => {
|
||||
return !!error && !!error.MESSAGE;
|
||||
return !!error && !!error.body && !!error.body.message;
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -18,7 +18,8 @@ export class FileUploader {
|
||||
private retryCount = 0
|
||||
|
||||
public uploadFile(sasJob: string, files: UploadFile[], params: any) {
|
||||
if (files?.length < 1) throw new Error('Atleast one file must be provided')
|
||||
if (files?.length < 1)
|
||||
throw new Error('At least one file must be provided.')
|
||||
|
||||
let paramsString = ''
|
||||
|
||||
@@ -75,7 +76,7 @@ export class FileUploader {
|
||||
})
|
||||
.then((responseText) => {
|
||||
if (isLogInRequired(responseText))
|
||||
reject('You must be logged in to upload a fle')
|
||||
reject('You must be logged in to upload a file')
|
||||
|
||||
if (needsRetry(responseText)) {
|
||||
if (this.retryCount < requestRetryLimit) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { isUrl } from './utils'
|
||||
|
||||
/**
|
||||
* A client for interfacing with the SAS9 REST API
|
||||
* A client for interfacing with the SAS9 REST API.
|
||||
*
|
||||
*/
|
||||
export class SAS9ApiClient {
|
||||
@@ -10,7 +10,7 @@ export class SAS9ApiClient {
|
||||
}
|
||||
|
||||
/**
|
||||
* returns on object containing the server URL
|
||||
* Returns an object containing server URL.
|
||||
*/
|
||||
public getConfig() {
|
||||
return {
|
||||
@@ -19,8 +19,8 @@ export class SAS9ApiClient {
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates serverurl which is not null
|
||||
* @param serverUrl - the URL of the server.
|
||||
* Updates server URL which is not null.
|
||||
* @param serverUrl - URL of the server to be set.
|
||||
*/
|
||||
public setConfig(serverUrl: string) {
|
||||
if (serverUrl) this.serverUrl = serverUrl
|
||||
@@ -28,9 +28,9 @@ export class SAS9ApiClient {
|
||||
|
||||
/**
|
||||
* Executes code on a SAS9 server.
|
||||
* @param linesOfCode - an array of lines of code to execute
|
||||
* @param serverName - the server to execute the code on
|
||||
* @param repositoryName - the repository to execute the code on
|
||||
* @param linesOfCode - an array of code lines to execute.
|
||||
* @param serverName - the server to execute the code on.
|
||||
* @param repositoryName - the repository to execute the code in.
|
||||
*/
|
||||
public async executeScript(
|
||||
linesOfCode: string[],
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
318
src/SASjs.ts
318
src/SASjs.ts
@@ -21,7 +21,8 @@ import {
|
||||
parseGeneratedCode,
|
||||
parseWeboutResponse,
|
||||
needsRetry,
|
||||
asyncForEach
|
||||
asyncForEach,
|
||||
isRelativePath
|
||||
} from './utils'
|
||||
import {
|
||||
SASjsConfig,
|
||||
@@ -30,7 +31,8 @@ import {
|
||||
ServerType,
|
||||
CsrfToken,
|
||||
UploadFile,
|
||||
EditContextInput
|
||||
EditContextInput,
|
||||
ErrorResponse
|
||||
} from './types'
|
||||
import { SASViyaApiClient } from './SASViyaApiClient'
|
||||
import { SAS9ApiClient } from './SAS9ApiClient'
|
||||
@@ -84,9 +86,8 @@ export default class SASjs {
|
||||
serverName: string,
|
||||
repositoryName: string
|
||||
) {
|
||||
if (this.sasjsConfig.serverType !== ServerType.SAS9) {
|
||||
throw new Error('This operation is only supported on SAS9 servers.')
|
||||
}
|
||||
this.isMethodSupported('executeScriptSAS9', ServerType.SAS9)
|
||||
|
||||
return await this.sas9ApiClient?.executeScript(
|
||||
linesOfCode,
|
||||
serverName,
|
||||
@@ -95,16 +96,14 @@ export default class SASjs {
|
||||
}
|
||||
|
||||
public async getAllContexts(accessToken: string) {
|
||||
if (this.sasjsConfig.serverType !== ServerType.SASViya) {
|
||||
throw new Error('This operation is only supported on SAS Viya servers.')
|
||||
}
|
||||
this.isMethodSupported('getAllContexts', ServerType.SASViya)
|
||||
|
||||
return await this.sasViyaApiClient!.getAllContexts(accessToken)
|
||||
}
|
||||
|
||||
public async getExecutableContexts(accessToken: string) {
|
||||
if (this.sasjsConfig.serverType !== ServerType.SASViya) {
|
||||
throw new Error('This operation is only supported on SAS Viya servers.')
|
||||
}
|
||||
this.isMethodSupported('getExecutableContexts', ServerType.SASViya)
|
||||
|
||||
return await this.sasViyaApiClient!.getExecutableContexts(accessToken)
|
||||
}
|
||||
|
||||
@@ -114,27 +113,26 @@ export default class SASjs {
|
||||
* @param launchContextName - the name of the launcher context used by the compute service.
|
||||
* @param sharedAccountId - the ID of the account to run the servers for this context as.
|
||||
* @param autoExecLines - the lines of code to execute during session initialization.
|
||||
* @param authorizedUsers - an optional list of authorized user IDs.
|
||||
* @param accessToken - an access token for an authorized user.
|
||||
* @param authorizedUsers - an optional list of authorized user IDs.
|
||||
*/
|
||||
public async createContext(
|
||||
contextName: string,
|
||||
launchContextName: string,
|
||||
sharedAccountId: string,
|
||||
autoExecLines: string[],
|
||||
authorizedUsers: string[],
|
||||
accessToken: string
|
||||
accessToken: string,
|
||||
authorizedUsers?: string[]
|
||||
) {
|
||||
if (this.sasjsConfig.serverType !== ServerType.SASViya) {
|
||||
throw new Error('This operation is only supported on SAS Viya servers.')
|
||||
}
|
||||
this.isMethodSupported('createContext', ServerType.SASViya)
|
||||
|
||||
return await this.sasViyaApiClient!.createContext(
|
||||
contextName,
|
||||
launchContextName,
|
||||
sharedAccountId,
|
||||
autoExecLines,
|
||||
authorizedUsers,
|
||||
accessToken
|
||||
accessToken,
|
||||
authorizedUsers
|
||||
)
|
||||
}
|
||||
|
||||
@@ -149,9 +147,8 @@ export default class SASjs {
|
||||
editedContext: EditContextInput,
|
||||
accessToken?: string
|
||||
) {
|
||||
if (this.sasjsConfig.serverType !== ServerType.SASViya) {
|
||||
throw new Error('This operation is only supported on SAS Viya servers.')
|
||||
}
|
||||
this.isMethodSupported('editContext', ServerType.SASViya)
|
||||
|
||||
return await this.sasViyaApiClient!.editContext(
|
||||
contextName,
|
||||
editedContext,
|
||||
@@ -165,16 +162,46 @@ export default class SASjs {
|
||||
* @param accessToken - an access token for an authorized user.
|
||||
*/
|
||||
public async deleteContext(contextName: string, accessToken?: string) {
|
||||
if (this.sasjsConfig.serverType !== ServerType.SASViya) {
|
||||
throw new Error('This operation is only supported on SAS Viya servers.')
|
||||
}
|
||||
this.isMethodSupported('deleteContext', ServerType.SASViya)
|
||||
|
||||
return await this.sasViyaApiClient!.deleteContext(contextName, accessToken)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a JSON representation of a compute context.
|
||||
* @example: { "createdBy": "admin", "links": [...], "id": "ID", "version": 2, "name": "context1" }
|
||||
* @param contextName - the name of the context to return.
|
||||
* @param accessToken - an access token for an authorized user.
|
||||
*/
|
||||
public async getComputeContextByName(
|
||||
contextName: string,
|
||||
accessToken?: string
|
||||
) {
|
||||
this.isMethodSupported('getComputeContextByName', ServerType.SASViya)
|
||||
|
||||
return await this.sasViyaApiClient!.getComputeContextByName(
|
||||
contextName,
|
||||
accessToken
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a JSON representation of a compute context.
|
||||
* @param contextId - an id of the context to return.
|
||||
* @param accessToken - an access token for an authorized user.
|
||||
*/
|
||||
public async getComputeContextById(contextId: string, accessToken?: string) {
|
||||
this.isMethodSupported('getComputeContextById', ServerType.SASViya)
|
||||
|
||||
return await this.sasViyaApiClient!.getComputeContextById(
|
||||
contextId,
|
||||
accessToken
|
||||
)
|
||||
}
|
||||
|
||||
public async createSession(contextName: string, accessToken: string) {
|
||||
if (this.sasjsConfig.serverType !== ServerType.SASViya) {
|
||||
throw new Error('This operation is only supported on SAS Viya servers.')
|
||||
}
|
||||
this.isMethodSupported('createSession', ServerType.SASViya)
|
||||
|
||||
return await this.sasViyaApiClient!.createSession(contextName, accessToken)
|
||||
}
|
||||
|
||||
@@ -186,9 +213,8 @@ export default class SASjs {
|
||||
sessionId = '',
|
||||
silent = false
|
||||
) {
|
||||
if (this.sasjsConfig.serverType !== ServerType.SASViya) {
|
||||
throw new Error('This operation is only supported on SAS Viya servers.')
|
||||
}
|
||||
this.isMethodSupported('executeScriptSASViya', ServerType.SASViya)
|
||||
|
||||
return await this.sasViyaApiClient!.executeScript(
|
||||
fileName,
|
||||
linesOfCode,
|
||||
@@ -201,7 +227,7 @@ export default class SASjs {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a folder at SAS file system
|
||||
* Creates a folder at SAS file system.
|
||||
* @param folderName - name of the folder to be created.
|
||||
* @param parentFolderPath - the full path (eg `/Public/example/myFolder`) of the parent folder.
|
||||
* @param parentFolderUri - the URI of the parent folder.
|
||||
@@ -217,9 +243,6 @@ export default class SASjs {
|
||||
sasApiClient?: SASViyaApiClient,
|
||||
isForced?: boolean
|
||||
) {
|
||||
if (this.sasjsConfig.serverType !== ServerType.SASViya) {
|
||||
throw new Error('This operation is only supported on SAS Viya servers.')
|
||||
}
|
||||
if (sasApiClient)
|
||||
return await sasApiClient.createFolder(
|
||||
folderName,
|
||||
@@ -236,6 +259,40 @@ export default class SASjs {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* For performance (and in case of accidental error) the `deleteFolder` function does not actually delete the folder (and all its content and subfolder content). Instead the folder is simply moved to the recycle bin. Deletion time will be added to the folder name.
|
||||
* @param folderPath - the full path (eg `/Public/example/deleteThis`) of the folder to be deleted.
|
||||
* @param accessToken - an access token for authorizing the request.
|
||||
*/
|
||||
public async deleteFolder(folderPath: string, accessToken: string) {
|
||||
this.isMethodSupported('deleteFolder', ServerType.SASViya)
|
||||
|
||||
return await this.sasViyaApiClient?.deleteFolder(folderPath, accessToken)
|
||||
}
|
||||
|
||||
/**
|
||||
* Moves folder to a new location. The folder may be renamed at the same time.
|
||||
* @param sourceFolder - the full path (eg `/Public/example/myFolder`) or URI of the source folder to be moved. Providing URI instead of path will save one extra request.
|
||||
* @param targetParentFolder - the full path or URI of the _parent_ folder to which the `sourceFolder` will be moved (eg `/Public/newDestination`). To move a folder, a user has to have write permissions in targetParentFolder. Providing URI instead of path will save one extra request.
|
||||
* @param targetFolderName - the name of the "moved" folder. If left blank, the original folder name will be used (eg `myFolder` in `/Public/newDestination/myFolder` for the example above). Optional field.
|
||||
* @param accessToken - an access token for authorizing the request.
|
||||
*/
|
||||
public async moveFolder(
|
||||
sourceFolder: string,
|
||||
targetParentFolder: string,
|
||||
targetFolderName: string,
|
||||
accessToken: string
|
||||
) {
|
||||
this.isMethodSupported('moveFolder', ServerType.SASViya)
|
||||
|
||||
return await this.sasViyaApiClient?.moveFolder(
|
||||
sourceFolder,
|
||||
targetParentFolder,
|
||||
targetFolderName,
|
||||
accessToken
|
||||
)
|
||||
}
|
||||
|
||||
public async createJobDefinition(
|
||||
jobName: string,
|
||||
code: string,
|
||||
@@ -244,9 +301,8 @@ export default class SASjs {
|
||||
accessToken?: string,
|
||||
sasApiClient?: SASViyaApiClient
|
||||
) {
|
||||
if (this.sasjsConfig.serverType !== ServerType.SASViya) {
|
||||
throw new Error('This operation is only supported on SAS Viya servers.')
|
||||
}
|
||||
this.isMethodSupported('createJobDefinition', ServerType.SASViya)
|
||||
|
||||
if (sasApiClient)
|
||||
return await sasApiClient!.createJobDefinition(
|
||||
jobName,
|
||||
@@ -265,9 +321,8 @@ export default class SASjs {
|
||||
}
|
||||
|
||||
public async getAuthCode(clientId: string) {
|
||||
if (this.sasjsConfig.serverType !== ServerType.SASViya) {
|
||||
throw new Error('This operation is only supported on SAS Viya servers.')
|
||||
}
|
||||
this.isMethodSupported('getAuthCode', ServerType.SASViya)
|
||||
|
||||
return await this.sasViyaApiClient!.getAuthCode(clientId)
|
||||
}
|
||||
|
||||
@@ -276,9 +331,8 @@ export default class SASjs {
|
||||
clientSecret: string,
|
||||
authCode: string
|
||||
) {
|
||||
if (this.sasjsConfig.serverType !== ServerType.SASViya) {
|
||||
throw new Error('This operation is only supported on SAS Viya servers.')
|
||||
}
|
||||
this.isMethodSupported('getAccessToken', ServerType.SASViya)
|
||||
|
||||
return await this.sasViyaApiClient!.getAccessToken(
|
||||
clientId,
|
||||
clientSecret,
|
||||
@@ -291,9 +345,8 @@ export default class SASjs {
|
||||
clientSecret: string,
|
||||
refreshToken: string
|
||||
) {
|
||||
if (this.sasjsConfig.serverType !== ServerType.SASViya) {
|
||||
throw new Error('This operation is only supported on SAS Viya servers.')
|
||||
}
|
||||
this.isMethodSupported('refreshTokens', ServerType.SASViya)
|
||||
|
||||
return await this.sasViyaApiClient!.refreshTokens(
|
||||
clientId,
|
||||
clientSecret,
|
||||
@@ -302,9 +355,8 @@ export default class SASjs {
|
||||
}
|
||||
|
||||
public async deleteClient(clientId: string, accessToken: string) {
|
||||
if (this.sasjsConfig.serverType !== ServerType.SASViya) {
|
||||
throw new Error('This operation is only supported on SAS Viya servers.')
|
||||
}
|
||||
this.isMethodSupported('deleteClient', ServerType.SASViya)
|
||||
|
||||
return await this.sasViyaApiClient!.deleteClient(clientId, accessToken)
|
||||
}
|
||||
|
||||
@@ -325,7 +377,7 @@ export default class SASjs {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the _csrf token of the current session for the API approach
|
||||
* Returns the _csrf token of the current session for the API approach.
|
||||
*
|
||||
*/
|
||||
public getCsrfApi() {
|
||||
@@ -342,7 +394,7 @@ export default class SASjs {
|
||||
|
||||
/**
|
||||
* Sets the SASjs configuration.
|
||||
* @param config - SASjsConfig indicating SASjs Configuration
|
||||
* @param config - SASjs configuration.
|
||||
*/
|
||||
public async setSASjsConfig(config: SASjsConfig) {
|
||||
this.sasjsConfig = {
|
||||
@@ -353,17 +405,16 @@ export default class SASjs {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the debug state. Turning this on will enable additional logging to
|
||||
* be returned to the adapter.
|
||||
* @param value - Boolean indicating debug state
|
||||
* Sets the debug state. Turning this on will enable additional logging in the adapter.
|
||||
* @param value - boolean indicating debug state (on/off).
|
||||
*/
|
||||
public setDebugState(value: boolean) {
|
||||
this.sasjsConfig.debug = value
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether a session is active, or login is required
|
||||
* @returns a promise which resolves with an object containing two values - a boolean `isLoggedIn`, and a string `userName`
|
||||
* Checks whether a session is active, or login is required.
|
||||
* @returns - a promise which resolves with an object containing two values - a boolean `isLoggedIn`, and a string `userName`.
|
||||
*/
|
||||
public async checkSession() {
|
||||
const loginResponse = await fetch(this.loginUrl.replace('.do', ''))
|
||||
@@ -377,9 +428,9 @@ export default class SASjs {
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs into the SAS server with the supplied credentials
|
||||
* @param username - a string representing the username
|
||||
* @param password - a string representing the password
|
||||
* Logs into the SAS server with the supplied credentials.
|
||||
* @param username - a string representing the username.
|
||||
* @param password - a string representing the password.
|
||||
*/
|
||||
public async logIn(username: string, password: string) {
|
||||
const loginParams: any = {
|
||||
@@ -448,7 +499,7 @@ export default class SASjs {
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out of the configured SAS server
|
||||
* Logs out of the configured SAS server.
|
||||
*/
|
||||
public logOut() {
|
||||
return new Promise((resolve, reject) => {
|
||||
@@ -462,12 +513,12 @@ export default class SASjs {
|
||||
}
|
||||
|
||||
/**
|
||||
* Uploads a file to the given service
|
||||
* @param sasJob - The path to the SAS program (ultimately resolves to
|
||||
* Uploads a file to the given service.
|
||||
* @param sasJob - the path to the SAS program (ultimately resolves to
|
||||
* the SAS `_program` parameter to run a Job Definition or SAS 9 Stored
|
||||
* Process.) Is prepended at runtime with the value of `appLoc`.
|
||||
* @param file - Array of files to be uploaded, including File object and file name.
|
||||
* @param params - Request URL paramaters
|
||||
* Process). Is prepended at runtime with the value of `appLoc`.
|
||||
* @param files - array of files to be uploaded, including File object and file name.
|
||||
* @param params - request URL parameters.
|
||||
*/
|
||||
public uploadFile(sasJob: string, files: UploadFile[], params: any) {
|
||||
const fileUploader =
|
||||
@@ -484,21 +535,21 @@ export default class SASjs {
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes a request to the SAS Service specified in `SASjob`. The response
|
||||
* Makes a request to the SAS Service specified in `SASjob`. The response
|
||||
* object will always contain table names in lowercase, and column names in
|
||||
* uppercase. Values are returned formatted by default, unformatted
|
||||
* uppercase. Values are returned formatted by default, unformatted
|
||||
* values can be configured as an option in the `%webout` macro.
|
||||
*
|
||||
* @param sasJob - The path to the SAS program (ultimately resolves to
|
||||
* @param sasJob - the path to the SAS program (ultimately resolves to
|
||||
* the SAS `_program` parameter to run a Job Definition or SAS 9 Stored
|
||||
* Process.) Is prepended at runtime with the value of `appLoc`.
|
||||
* @param data - A JSON object containing one or more tables to be sent to
|
||||
* SAS. Can be `null` if no inputs required.
|
||||
* @param config - Provide any changes to the config here, for instance to
|
||||
* enable / disable `debug`. Any change provided will override the global config,
|
||||
* Process). Is prepended at runtime with the value of `appLoc`.
|
||||
* @param data - a JSON object containing one or more tables to be sent to
|
||||
* SAS. Can be `null` if no inputs required.
|
||||
* @param config - provide any changes to the config here, for instance to
|
||||
* enable/disable `debug`. Any change provided will override the global config,
|
||||
* for that particular function call.
|
||||
* @param loginRequiredCallback - provide a function here to be called if the
|
||||
* user is not logged in (eg to display a login form). The request will be
|
||||
* user is not logged in (eg to display a login form). The request will be
|
||||
* resubmitted after logon.
|
||||
*/
|
||||
public async request(
|
||||
@@ -515,8 +566,6 @@ export default class SASjs {
|
||||
...config
|
||||
}
|
||||
|
||||
sasJob = sasJob.startsWith('/') ? sasJob.replace('/', '') : sasJob
|
||||
|
||||
if (config.serverType === ServerType.SASViya && config.contextName) {
|
||||
if (config.useComputeApi) {
|
||||
requestResponse = await this.executeJobViaComputeApi(
|
||||
@@ -552,8 +601,7 @@ export default class SASjs {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the folders and services in the provided JSON on the given location
|
||||
* (appLoc) on the given server (serverUrl).
|
||||
* Creates the folders and services at the given location `appLoc` on the given server `serverUrl`.
|
||||
* @param serviceJson - the JSON specifying the folders and services to be created.
|
||||
* @param appLoc - the base folder in which to create the new folders and
|
||||
* services. If not provided, is taken from SASjsConfig.
|
||||
@@ -570,9 +618,7 @@ export default class SASjs {
|
||||
accessToken?: string,
|
||||
isForced = false
|
||||
) {
|
||||
if (this.sasjsConfig.serverType !== ServerType.SASViya) {
|
||||
throw new Error('This operation is only supported on SAS Viya servers.')
|
||||
}
|
||||
this.isMethodSupported('deployServicePack', ServerType.SASViya)
|
||||
|
||||
let sasApiClient: any = null
|
||||
if (serverUrl || appLoc) {
|
||||
@@ -686,7 +732,9 @@ export default class SASjs {
|
||||
resolve(retryResponse)
|
||||
} else {
|
||||
this.retryCountComputeApi = 0
|
||||
reject({ MESSAGE: 'Compute API retry requests limit reached' })
|
||||
reject(
|
||||
new ErrorResponse('Compute API retry requests limit reached')
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -697,7 +745,7 @@ export default class SASjs {
|
||||
sasjsWaitingRequest.config = config
|
||||
this.sasjsWaitingRequests.push(sasjsWaitingRequest)
|
||||
} else {
|
||||
reject({ MESSAGE: error || 'Job execution failed' })
|
||||
reject(new ErrorResponse('Job execution failed', error))
|
||||
}
|
||||
|
||||
this.appendSasjsRequest(response.log, sasJob, null)
|
||||
@@ -728,7 +776,7 @@ export default class SASjs {
|
||||
async (resolve, reject) => {
|
||||
const session = await this.checkSession()
|
||||
|
||||
if (!session.isLoggedIn) {
|
||||
if (!session.isLoggedIn && !accessToken) {
|
||||
if (loginRequiredCallback) loginRequiredCallback(true)
|
||||
sasjsWaitingRequest.requestPromise.resolve = resolve
|
||||
sasjsWaitingRequest.requestPromise.reject = reject
|
||||
@@ -779,11 +827,13 @@ export default class SASjs {
|
||||
resolve(retryResponse)
|
||||
} else {
|
||||
this.retryCountJeseApi = 0
|
||||
reject({ MESSAGE: 'Jes API retry requests limit reached' })
|
||||
reject(
|
||||
new ErrorResponse('Jes API retry requests limit reached')
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
reject({ MESSAGE: (e && e.message) || 'Job execution failed' })
|
||||
reject(new ErrorResponse('Job execution failed', e))
|
||||
})
|
||||
)
|
||||
}
|
||||
@@ -807,11 +857,15 @@ export default class SASjs {
|
||||
SASjob: sasJob,
|
||||
data
|
||||
}
|
||||
const program = config.appLoc
|
||||
? config.appLoc.replace(/\/?$/, '/') + sasJob.replace(/^\//, '')
|
||||
const program = isRelativePath(sasJob)
|
||||
? config.appLoc
|
||||
? config.appLoc.replace(/\/?$/, '/') + sasJob.replace(/^\//, '')
|
||||
: sasJob
|
||||
: sasJob
|
||||
const jobUri =
|
||||
config.serverType === 'SASVIYA' ? await this.getJobUri(sasJob) : ''
|
||||
config.serverType === ServerType.SASViya
|
||||
? await this.getJobUri(sasJob)
|
||||
: ''
|
||||
const apiUrl = `${config.serverUrl}${this.jobsPath}/?${
|
||||
jobUri.length > 0
|
||||
? '__program=' + program + '&_job=' + jobUri
|
||||
@@ -895,7 +949,7 @@ export default class SASjs {
|
||||
sasjsWaitingRequest.requestPromise.promise = new Promise(
|
||||
(resolve, reject) => {
|
||||
if (isError) {
|
||||
reject({ MESSAGE: errorMsg })
|
||||
reject(new ErrorResponse(errorMsg))
|
||||
}
|
||||
const headers: any = {}
|
||||
if (this.csrfTokenWeb) {
|
||||
@@ -961,9 +1015,12 @@ export default class SASjs {
|
||||
if (jsonResponseText !== '') {
|
||||
resolve(JSON.parse(jsonResponseText))
|
||||
} else {
|
||||
reject({
|
||||
MESSAGE: this.parseSAS9ErrorResponse(responseText)
|
||||
})
|
||||
reject(
|
||||
new ErrorResponse(
|
||||
'Job WEB execution failed',
|
||||
this.parseSAS9ErrorResponse(responseText)
|
||||
)
|
||||
)
|
||||
}
|
||||
} else if (
|
||||
config.serverType === ServerType.SASViya &&
|
||||
@@ -976,15 +1033,30 @@ export default class SASjs {
|
||||
try {
|
||||
resolve(JSON.parse(resText))
|
||||
} catch (e) {
|
||||
reject({ MESSAGE: resText })
|
||||
reject(
|
||||
new ErrorResponse(
|
||||
'Job WEB debug response parsing failed',
|
||||
{ response: resText, exception: e }
|
||||
)
|
||||
)
|
||||
}
|
||||
},
|
||||
(err: any) => {
|
||||
reject({ MESSAGE: err })
|
||||
reject(
|
||||
new ErrorResponse(
|
||||
'Job WEB debug response parsing failed',
|
||||
err
|
||||
)
|
||||
)
|
||||
}
|
||||
)
|
||||
} catch (e) {
|
||||
reject({ MESSAGE: responseText })
|
||||
reject(
|
||||
new ErrorResponse(
|
||||
'Job WEB debug response parsing failed',
|
||||
{ response: responseText, exception: e }
|
||||
)
|
||||
)
|
||||
}
|
||||
} else {
|
||||
this.updateUsername(responseText)
|
||||
@@ -992,14 +1064,19 @@ export default class SASjs {
|
||||
const parsedJson = JSON.parse(responseText)
|
||||
resolve(parsedJson)
|
||||
} catch (e) {
|
||||
reject({ MESSAGE: responseText })
|
||||
reject(
|
||||
new ErrorResponse('Job WEB response parsing failed', {
|
||||
response: responseText,
|
||||
exception: e
|
||||
})
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((e: Error) => {
|
||||
reject(e)
|
||||
reject(new ErrorResponse('Job WEB request failed', e))
|
||||
})
|
||||
}
|
||||
)
|
||||
@@ -1074,28 +1151,33 @@ export default class SASjs {
|
||||
resolve(resText)
|
||||
})
|
||||
} else {
|
||||
reject('No debug info in response')
|
||||
reject('No debug info found in response.')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private async getJobUri(sasJob: string) {
|
||||
if (!this.sasViyaApiClient) return ''
|
||||
const jobMap: any = await this.sasViyaApiClient.getAppLocMap()
|
||||
let uri = ''
|
||||
|
||||
if (jobMap.size) {
|
||||
const jobKey = sasJob.split('/')[0]
|
||||
const jobName = sasJob.split('/')[1]
|
||||
let folderPath
|
||||
let jobName: string
|
||||
if (isRelativePath(sasJob)) {
|
||||
folderPath = sasJob.split('/')[0]
|
||||
jobName = sasJob.split('/')[1]
|
||||
} else {
|
||||
const folderPathParts = sasJob.split('/')
|
||||
jobName = folderPathParts.pop() || ''
|
||||
folderPath = folderPathParts.join('/')
|
||||
}
|
||||
|
||||
const locJobs = jobMap.get(jobKey)
|
||||
if (locJobs) {
|
||||
const job = locJobs.find(
|
||||
(el: any) => el.name === jobName && el.contentType === 'jobDefinition'
|
||||
)
|
||||
if (job) {
|
||||
uri = job.uri
|
||||
}
|
||||
const locJobs = await this.sasViyaApiClient.getJobsInFolder(folderPath)
|
||||
if (locJobs) {
|
||||
const job = locJobs.find(
|
||||
(el: any) => el.name === jobName && el.contentType === 'jobDefinition'
|
||||
)
|
||||
if (job) {
|
||||
uri = job.uri
|
||||
}
|
||||
}
|
||||
return uri
|
||||
@@ -1353,7 +1435,7 @@ export default class SASjs {
|
||||
)
|
||||
break
|
||||
default:
|
||||
throw new Error(`Unidenitied member present in Json: ${member.name}`)
|
||||
throw new Error(`Unidentified member '${member.name}' provided.`)
|
||||
}
|
||||
if (member.type === 'folder' && member.members && member.members.length)
|
||||
await this.createFoldersAndServices(
|
||||
@@ -1365,4 +1447,14 @@ export default class SASjs {
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
private isMethodSupported(method: string, serverType: string) {
|
||||
if (this.sasjsConfig.serverType !== serverType) {
|
||||
throw new Error(
|
||||
`Method '${method}' is only supported on ${
|
||||
serverType === ServerType.SAS9 ? 'SAS9' : 'SAS Viya'
|
||||
} servers.`
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ export class SessionManager {
|
||||
if (!this.currentContext) {
|
||||
const { result: contexts } = await this.request<{
|
||||
items: Context[]
|
||||
}>(`${this.serverUrl}/compute/contexts`, {
|
||||
}>(`${this.serverUrl}/compute/contexts?limit=10000`, {
|
||||
headers: this.getHeaders(accessToken)
|
||||
})
|
||||
|
||||
@@ -93,7 +93,7 @@ export class SessionManager {
|
||||
|
||||
if (!currentContext) {
|
||||
throw new Error(
|
||||
`The context ${this.contextName} was not found on the server ${this.serverUrl}`
|
||||
`The context '${this.contextName}' was not found on the server ${this.serverUrl}.`
|
||||
)
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ export class SessionManager {
|
||||
if (sessionState === 'pending') {
|
||||
if (stateLink) {
|
||||
if (!silent) {
|
||||
console.log('Polling session status... \n')
|
||||
console.log('Polling session status... \n') // ?
|
||||
}
|
||||
const { result: state } = await this.request<string>(
|
||||
`${this.serverUrl}${stateLink.href}?wait=30`,
|
||||
@@ -140,7 +140,7 @@ export class SessionManager {
|
||||
|
||||
sessionState = state.trim()
|
||||
if (!silent) {
|
||||
console.log(`Current state: ${sessionState}\n`)
|
||||
console.log(`Current state is '${sessionState}'\n`)
|
||||
}
|
||||
resolve(sessionState)
|
||||
}
|
||||
|
||||
@@ -14,4 +14,26 @@ export interface EditContextInput {
|
||||
attributes?: any
|
||||
authorizedUsers?: string[]
|
||||
authorizeAllAuthenticatedUsers?: boolean
|
||||
id?: string
|
||||
}
|
||||
|
||||
export interface ContextAllAttributes {
|
||||
attributes: {
|
||||
reuseServerProcesses: boolean
|
||||
runServerAs: string
|
||||
}
|
||||
modifiedTimeStamp: string
|
||||
createdBy: string
|
||||
creationTimeStamp: string
|
||||
launchType: string
|
||||
environment: {
|
||||
autoExecLines: [string]
|
||||
}
|
||||
launchContext: {
|
||||
contextName: string
|
||||
}
|
||||
modifiedBy: string
|
||||
id: string
|
||||
version: number
|
||||
name: string
|
||||
}
|
||||
|
||||
26
src/types/ErrorResponse.ts
Normal file
26
src/types/ErrorResponse.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
export class ErrorResponse {
|
||||
body: ErrorBody
|
||||
|
||||
constructor(message: string, details?: any) {
|
||||
let detailsString = ''
|
||||
let raw
|
||||
|
||||
try {
|
||||
detailsString = JSON.stringify(details)
|
||||
} catch {
|
||||
raw = details
|
||||
}
|
||||
|
||||
this.body = {
|
||||
message,
|
||||
details: detailsString,
|
||||
raw
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface ErrorBody {
|
||||
message: string
|
||||
details: string
|
||||
raw: any
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
import { ServerType } from './ServerType'
|
||||
|
||||
/**
|
||||
* Specifies the configuration for the SASjs instance.
|
||||
*
|
||||
* Specifies the configuration for the SASjs instance - eg where and how to
|
||||
* connect to SAS.
|
||||
*/
|
||||
export class SASjsConfig {
|
||||
/**
|
||||
@@ -11,21 +11,50 @@ export class SASjsConfig {
|
||||
* streamed.
|
||||
*/
|
||||
serverUrl: string = ''
|
||||
/**
|
||||
* The location of the Stored Process Web Application. By default the adapter
|
||||
* will use '/SASStoredProcess/do' on SAS 9.
|
||||
*/
|
||||
pathSAS9: string = ''
|
||||
/**
|
||||
* The location of the Job Execution Web Application. By default the adapter
|
||||
* will use '/SASJobExecution' on SAS Viya.
|
||||
*/
|
||||
pathSASViya: string = ''
|
||||
/**
|
||||
* The appLoc is the parent folder under which the SAS services (STPs or Job
|
||||
* Execution Services) are stored.
|
||||
* Execution Services) are stored. We recommend that each app is stored in
|
||||
* a dedicated parent folder (the appLoc) and the services are grouped inside
|
||||
* subfolders within the appLoc - allowing functionality to be restricted
|
||||
* according to those groups at backend.
|
||||
* When using appLoc, the paths provided in the `request` function should be
|
||||
* _without_ a leading slash (/).
|
||||
*/
|
||||
appLoc: string = ''
|
||||
/**
|
||||
* Can be SAS9 or SASVIYA
|
||||
* Can be `SAS9` or `SASVIYA`.
|
||||
*/
|
||||
serverType: ServerType | null = null
|
||||
/**
|
||||
* Set to `true` to enable additional debugging.
|
||||
*/
|
||||
debug: boolean = true
|
||||
/**
|
||||
* The name of the compute context to use when calling the Viya APIs directly.
|
||||
* Example value: 'SAS Job Execution compute context'
|
||||
* If set to missing or empty, and useComputeApi is true, the adapter will use
|
||||
* the JES APIs. If provided, the Job Code will be executed in pooled
|
||||
* compute sessions on this named context.
|
||||
*/
|
||||
contextName: string = ''
|
||||
/**
|
||||
* Set to `false` to use the Job Execution Web Service. To enhance VIYA
|
||||
* performance, set to `true` and provide a `contextName` on which to run
|
||||
* the code. When running on a named context, the code executes under the
|
||||
* user identity. When running as a Job Execution service, the code runs
|
||||
* under the identity in the JES context. If no `contextName` is provided,
|
||||
* and `useComputeApi` is `true`, then the service will run as a Job, except
|
||||
* triggered using the APIs instead of the Job Execution Web Service broker.
|
||||
*/
|
||||
useComputeApi = false
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Represents requests that are queued, pending a signon event
|
||||
* Represents requests that are queued, pending a signon event.
|
||||
*
|
||||
*/
|
||||
export interface SASjsWaitingRequest {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Server type - Viya or SAS9.
|
||||
* Server type that can be `Viya` or `SAS9`.
|
||||
*
|
||||
*/
|
||||
export enum ServerType {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Represents a object that is passed to file uploader
|
||||
* Represents an object that is passed to the file uploader.
|
||||
*
|
||||
*/
|
||||
export interface UploadFile {
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
export * from './Context'
|
||||
export * from './CsrfToken'
|
||||
export * from './ErrorResponse'
|
||||
export * from './Folder'
|
||||
export * from './Job'
|
||||
export * from './JobDefinition'
|
||||
export * from './JobResult'
|
||||
export * from './Link'
|
||||
export * from './SASjsConfig'
|
||||
export * from './SASjsRequest'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { SASjsRequest } from '../types/SASjsRequest'
|
||||
|
||||
/**
|
||||
* Comparator for SASjs request timestamps
|
||||
* Comparator for SASjs request timestamps.
|
||||
*
|
||||
*/
|
||||
export const compareTimestamps = (a: SASjsRequest, b: SASjsRequest) => {
|
||||
|
||||
@@ -4,6 +4,9 @@ export * from './convertToCsv'
|
||||
export * from './isAuthorizeFormRequired'
|
||||
export * from './isLoginRequired'
|
||||
export * from './isLoginSuccess'
|
||||
export * from './isRelativePath'
|
||||
export * from './isUri'
|
||||
export * from './isUrl'
|
||||
export * from './makeRequest'
|
||||
export * from './needsRetry'
|
||||
export * from './parseAndSubmitAuthorizeForm'
|
||||
@@ -13,5 +16,3 @@ export * from './parseSasViyaLog'
|
||||
export * from './serialize'
|
||||
export * from './splitChunks'
|
||||
export * from './parseWeboutResponse'
|
||||
export * from './isUri'
|
||||
export * from './isUrl'
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user