@sasjs/adapter 4.8.0 → 4.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/SASjs.d.ts +22 -7
- package/index-dev.js +2 -2
- package/index.js +1 -1
- package/minified/sas9/SASjs.d.ts +1 -1
- package/minified_sas9.js +1 -1
- package/node/SASjs.d.ts +22 -7
- package/node/index.js +1 -1
- package/node/request/RequestClient.d.ts +11 -33
- package/node/request/SasjsRequestClient.d.ts +1 -7
- package/node/types/RequestClient.d.ts +46 -0
- package/node/types/SASjsConfig.d.ts +2 -1
- package/node/types/index.d.ts +3 -1
- package/node/utils/compareTimestamps.d.ts +1 -1
- package/package.json +1 -1
- package/request/RequestClient.d.ts +11 -33
- package/request/SasjsRequestClient.d.ts +1 -7
- package/src/SASjs.ts +40 -10
- package/src/api/viya/executeScript.ts +1 -1
- package/src/request/RequestClient.ts +96 -44
- package/src/request/SasjsRequestClient.ts +1 -9
- package/src/types/RequestClient.ts +55 -0
- package/src/types/SASjsConfig.ts +2 -1
- package/src/types/index.ts +3 -1
- package/src/utils/compareTimestamps.ts +1 -1
- package/types/RequestClient.d.ts +46 -0
- package/types/SASjsConfig.d.ts +2 -1
- package/types/index.d.ts +3 -1
- package/utils/compareTimestamps.d.ts +1 -1
- package/node/types/SASjsRequest.d.ts +0 -12
- package/src/types/SASjsRequest.ts +0 -12
- package/types/SASjsRequest.d.ts +0 -12
package/src/types/SASjsConfig.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as https from 'https'
|
|
2
2
|
import { ServerType } from '@sasjs/utils/types'
|
|
3
|
+
import { VerboseMode } from '../types'
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Specifies the configuration for the SASjs instance - eg where and how to
|
|
@@ -48,7 +49,7 @@ export class SASjsConfig {
|
|
|
48
49
|
/**
|
|
49
50
|
* Set to `true` to enable verbose mode that will log a summary of every HTTP response.
|
|
50
51
|
*/
|
|
51
|
-
verbose?:
|
|
52
|
+
verbose?: VerboseMode = true
|
|
52
53
|
/**
|
|
53
54
|
* The name of the compute context to use when calling the Viya services directly.
|
|
54
55
|
* Example value: 'SAS Job Execution compute context'
|
package/src/types/index.ts
CHANGED
|
@@ -6,10 +6,12 @@ export * from './Job'
|
|
|
6
6
|
export * from './JobDefinition'
|
|
7
7
|
export * from './JobResult'
|
|
8
8
|
export * from './Link'
|
|
9
|
+
export * from './Login'
|
|
9
10
|
export * from './SASjsConfig'
|
|
10
|
-
export * from './
|
|
11
|
+
export * from './RequestClient'
|
|
11
12
|
export * from './Session'
|
|
12
13
|
export * from './UploadFile'
|
|
13
14
|
export * from './PollOptions'
|
|
14
15
|
export * from './WriteStream'
|
|
15
16
|
export * from './ExecuteScript'
|
|
17
|
+
export * from './errors'
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { CsrfToken } from '..';
|
|
2
|
+
export interface HttpClient {
|
|
3
|
+
get<T>(url: string, accessToken: string | undefined, contentType: string, overrideHeaders: {
|
|
4
|
+
[key: string]: string | number;
|
|
5
|
+
}): Promise<{
|
|
6
|
+
result: T;
|
|
7
|
+
etag: string;
|
|
8
|
+
}>;
|
|
9
|
+
post<T>(url: string, data: any, accessToken: string | undefined, contentType: string, overrideHeaders: {
|
|
10
|
+
[key: string]: string | number;
|
|
11
|
+
}): Promise<{
|
|
12
|
+
result: T;
|
|
13
|
+
etag: string;
|
|
14
|
+
}>;
|
|
15
|
+
put<T>(url: string, data: any, accessToken: string | undefined, overrideHeaders: {
|
|
16
|
+
[key: string]: string | number;
|
|
17
|
+
}): Promise<{
|
|
18
|
+
result: T;
|
|
19
|
+
etag: string;
|
|
20
|
+
}>;
|
|
21
|
+
delete<T>(url: string, accessToken: string | undefined): Promise<{
|
|
22
|
+
result: T;
|
|
23
|
+
etag: string;
|
|
24
|
+
}>;
|
|
25
|
+
getCsrfToken(type: 'general' | 'file'): CsrfToken | undefined;
|
|
26
|
+
saveLocalStorageToken(accessToken: string, refreshToken: string): void;
|
|
27
|
+
clearCsrfTokens(): void;
|
|
28
|
+
clearLocalStorageTokens(): void;
|
|
29
|
+
getBaseUrl(): string;
|
|
30
|
+
}
|
|
31
|
+
export interface SASjsRequest {
|
|
32
|
+
serviceLink: string;
|
|
33
|
+
timestamp: Date;
|
|
34
|
+
sourceCode: string;
|
|
35
|
+
generatedCode: string;
|
|
36
|
+
logFile: string;
|
|
37
|
+
SASWORK: any;
|
|
38
|
+
}
|
|
39
|
+
export interface SasjsParsedResponse<T> {
|
|
40
|
+
result: T;
|
|
41
|
+
log: string;
|
|
42
|
+
etag: string;
|
|
43
|
+
status: number;
|
|
44
|
+
printOutput?: string;
|
|
45
|
+
}
|
|
46
|
+
export declare type VerboseMode = boolean | 'bleached';
|
package/types/SASjsConfig.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import * as https from 'https';
|
|
3
3
|
import { ServerType } from '@sasjs/utils/types';
|
|
4
|
+
import { VerboseMode } from '../types';
|
|
4
5
|
/**
|
|
5
6
|
* Specifies the configuration for the SASjs instance - eg where and how to
|
|
6
7
|
* connect to SAS.
|
|
@@ -48,7 +49,7 @@ export declare class SASjsConfig {
|
|
|
48
49
|
/**
|
|
49
50
|
* Set to `true` to enable verbose mode that will log a summary of every HTTP response.
|
|
50
51
|
*/
|
|
51
|
-
verbose?:
|
|
52
|
+
verbose?: VerboseMode;
|
|
52
53
|
/**
|
|
53
54
|
* The name of the compute context to use when calling the Viya services directly.
|
|
54
55
|
* Example value: 'SAS Job Execution compute context'
|
package/types/index.d.ts
CHANGED
|
@@ -6,10 +6,12 @@ export * from './Job';
|
|
|
6
6
|
export * from './JobDefinition';
|
|
7
7
|
export * from './JobResult';
|
|
8
8
|
export * from './Link';
|
|
9
|
+
export * from './Login';
|
|
9
10
|
export * from './SASjsConfig';
|
|
10
|
-
export * from './
|
|
11
|
+
export * from './RequestClient';
|
|
11
12
|
export * from './Session';
|
|
12
13
|
export * from './UploadFile';
|
|
13
14
|
export * from './PollOptions';
|
|
14
15
|
export * from './WriteStream';
|
|
15
16
|
export * from './ExecuteScript';
|
|
17
|
+
export * from './errors';
|
package/types/SASjsRequest.d.ts
DELETED