@sasjs/adapter 3.7.13 → 3.8.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/SASjs.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  import { SASjsConfig, UploadFile, EditContextInput, PollOptions, ExecutionQuery, FileTree } from './types';
3
3
  import { SASViyaApiClient } from './SASViyaApiClient';
4
4
  import { SASjsAuthResponse } from './SASjsApiClient';
5
- import { MacroVar, AuthConfig, ExtraResponseAttributes, SasAuthResponse } from '@sasjs/utils/types';
5
+ import { MacroVar, AuthConfig, ExtraResponseAttributes, SasAuthResponse, StreamConfig } from '@sasjs/utils/types';
6
6
  import { LoginOptions, LoginResult } from './types/Login';
7
7
  /**
8
8
  * SASjs is a JavaScript adapter for SAS.
@@ -42,7 +42,7 @@ export default class SASjs {
42
42
  executeScriptSASViya(fileName: string, linesOfCode: string[], contextName: string, authConfig?: AuthConfig, debug?: boolean): Promise<any>;
43
43
  /**
44
44
  * Gets compute contexts.
45
- * @param accessToken - an access token for an authorized user.
45
+ * @param accessToken - an access token for an authorised user.
46
46
  */
47
47
  getComputeContexts(accessToken: string): Promise<{
48
48
  createdBy: any;
@@ -53,7 +53,7 @@ export default class SASjs {
53
53
  }[]>;
54
54
  /**
55
55
  * Gets launcher contexts.
56
- * @param accessToken - an access token for an authorized user.
56
+ * @param accessToken - an access token for an authorised user.
57
57
  */
58
58
  getLauncherContexts(accessToken: string): Promise<{
59
59
  createdBy: any;
@@ -68,7 +68,7 @@ export default class SASjs {
68
68
  getDefaultComputeContexts(): string[];
69
69
  /**
70
70
  * Gets executable compute contexts.
71
- * @param authConfig - an access token, refresh token, client and secret for an authorized user.
71
+ * @param authConfig - an access token, refresh token, client and secret for an authorised user.
72
72
  */
73
73
  getExecutableContexts(authConfig: AuthConfig): Promise<any[]>;
74
74
  /**
@@ -77,23 +77,23 @@ export default class SASjs {
77
77
  * @param launchContextName - the name of the launcher context used by the compute service.
78
78
  * @param sharedAccountId - the ID of the account to run the servers for this context as.
79
79
  * @param autoExecLines - the lines of code to execute during session initialization.
80
- * @param accessToken - an access token for an authorized user.
81
- * @param authorizedUsers - an optional list of authorized user IDs.
80
+ * @param accessToken - an access token for an authorised user.
81
+ * @param authorisedUsers - an optional list of authorised user IDs.
82
82
  */
83
- createComputeContext(contextName: string, launchContextName: string, sharedAccountId: string, autoExecLines: string[], accessToken: string, authorizedUsers?: string[]): Promise<import("./types").Context>;
83
+ createComputeContext(contextName: string, launchContextName: string, sharedAccountId: string, autoExecLines: string[], accessToken: string, authorisedUsers?: string[]): Promise<import("./types").Context>;
84
84
  /**
85
85
  * Creates a launcher context on the given server.
86
86
  * @param contextName - the name of the context to be created.
87
87
  * @param description - the description of the context to be created.
88
88
  * @param launchType - launch type of the context to be created.
89
- * @param accessToken - an access token for an authorized user.
89
+ * @param accessToken - an access token for an authorised user.
90
90
  */
91
91
  createLauncherContext(contextName: string, description: string, launchType: string, accessToken: string): Promise<import("./types").Context>;
92
92
  /**
93
93
  * Updates a compute context on the given server.
94
94
  * @param contextName - the original name of the context to be deleted.
95
95
  * @param editedContext - an object with the properties to be updated.
96
- * @param accessToken - an access token for an authorized user.
96
+ * @param accessToken - an access token for an authorised user.
97
97
  */
98
98
  editComputeContext(contextName: string, editedContext: EditContextInput, accessToken?: string): Promise<{
99
99
  result: import("./types").Context;
@@ -102,7 +102,7 @@ export default class SASjs {
102
102
  /**
103
103
  * Deletes a compute context on the given server.
104
104
  * @param contextName - the name of the context to be deleted.
105
- * @param accessToken - an access token for an authorized user.
105
+ * @param accessToken - an access token for an authorised user.
106
106
  */
107
107
  deleteComputeContext(contextName: string, accessToken?: string): Promise<{
108
108
  result: import("./types").Context;
@@ -112,13 +112,13 @@ export default class SASjs {
112
112
  * Returns a JSON representation of a compute context.
113
113
  * @example: { "createdBy": "admin", "links": [...], "id": "ID", "version": 2, "name": "context1" }
114
114
  * @param contextName - the name of the context to return.
115
- * @param accessToken - an access token for an authorized user.
115
+ * @param accessToken - an access token for an authorised user.
116
116
  */
117
117
  getComputeContextByName(contextName: string, accessToken?: string): Promise<import("./types").Context>;
118
118
  /**
119
119
  * Returns a JSON representation of a compute context.
120
120
  * @param contextId - an id of the context to return.
121
- * @param accessToken - an access token for an authorized user.
121
+ * @param accessToken - an access token for an authorised user.
122
122
  */
123
123
  getComputeContextById(contextId: string, accessToken?: string): Promise<import("./types").ContextAllAttributes>;
124
124
  createSession(contextName: string, accessToken: string): Promise<import("./types").Session>;
@@ -313,11 +313,13 @@ export default class SASjs {
313
313
  * @param members - the JSON specifying the folders and services to be created.
314
314
  * @param appLoc - the base folder in which to create the new folders and
315
315
  * services. If not provided, is taken from SASjsConfig.
316
+ * @param streamConfig - optional configuration object of StreamConfig for deploying streaming app.
316
317
  * @param authConfig - a valid client, secret, refresh and access tokens that are authorised to execute compute jobs.
317
318
  */
318
- deployToSASjs(members: FileTree, appLoc?: string, authConfig?: AuthConfig): Promise<{
319
+ deployToSASjs(members: FileTree, appLoc?: string, streamConfig?: StreamConfig, authConfig?: AuthConfig): Promise<{
319
320
  status: string;
320
321
  message: string;
322
+ streamServiceName?: string | undefined;
321
323
  example?: {} | undefined;
322
324
  } | undefined>;
323
325
  executeJobSASjs(query: ExecutionQuery): Promise<{
@@ -351,7 +353,7 @@ export default class SASjs {
351
353
  /**
352
354
  * Fetches content of the log file
353
355
  * @param logUrl - url of the log file.
354
- * @param accessToken - an access token for an authorized user.
356
+ * @param accessToken - an access token for an authorised user.
355
357
  */
356
358
  fetchLogFileContent(logUrl: string, accessToken?: string): Promise<string>;
357
359
  /**
@@ -1,4 +1,4 @@
1
- import { AuthConfig } from '@sasjs/utils/types';
1
+ import { AuthConfig, StreamConfig } from '@sasjs/utils/types';
2
2
  import { FileTree, ExecutionQuery } from './types';
3
3
  import { RequestClient } from './request/RequestClient';
4
4
  export declare class SASjsApiClient {
@@ -6,9 +6,10 @@ export declare class SASjsApiClient {
6
6
  private requestClient;
7
7
  constructor(serverUrl: string, requestClient: RequestClient);
8
8
  setConfig(serverUrl: string): void;
9
- deploy(members: FileTree, appLoc: string, authConfig?: AuthConfig): Promise<{
9
+ deploy(members: FileTree, appLoc: string, streamConfig?: StreamConfig, authConfig?: AuthConfig): Promise<{
10
10
  status: string;
11
11
  message: string;
12
+ streamServiceName?: string | undefined;
12
13
  example?: {} | undefined;
13
14
  }>;
14
15
  executeJob(query: ExecutionQuery): Promise<{