@sasjs/adapter 3.4.0 → 3.5.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
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { SASjsConfig, UploadFile, EditContextInput, PollOptions, FolderMember, ServiceMember, ExecutionQuery } from './types';
2
+ import { SASjsConfig, UploadFile, EditContextInput, PollOptions, ExecutionQuery, FileTree } from './types';
3
3
  import { SASViyaApiClient } from './SASViyaApiClient';
4
4
  import { SASjsAuthResponse } from './SASjsApiClient';
5
5
  import { MacroVar, AuthConfig, ExtraResponseAttributes, SasAuthResponse } from '@sasjs/utils/types';
@@ -89,11 +89,7 @@ export default class SASjs {
89
89
  * @param accessToken - an access token for an authorized user.
90
90
  */
91
91
  deleteComputeContext(contextName: string, accessToken?: string): Promise<{
92
- result: import("./types").Context; /**
93
- * Returns a JSON representation of a compute context.
94
- * @param contextId - an id of the context to return.
95
- * @param accessToken - an access token for an authorized user.
96
- */
92
+ result: import("./types").Context;
97
93
  etag: string;
98
94
  }>;
99
95
  /**
@@ -225,11 +221,7 @@ export default class SASjs {
225
221
  * Logs out of the configured SAS server.
226
222
  */
227
223
  logOut(): Promise<boolean | {
228
- result: unknown; /**
229
- * Returns a JSON representation of a compute context.
230
- * @param contextId - an id of the context to return.
231
- * @param accessToken - an access token for an authorized user.
232
- */
224
+ result: unknown;
233
225
  etag: string;
234
226
  }>;
235
227
  /**
@@ -307,7 +299,14 @@ export default class SASjs {
307
299
  * @param isForced - flag that indicates if target folder already exists, it and all subfolders have to be deleted.
308
300
  */
309
301
  deployServicePack(serviceJson: any, appLoc?: string, serverUrl?: string, accessToken?: string, isForced?: boolean): Promise<void>;
310
- deployToSASjs(members: [FolderMember, ServiceMember]): Promise<{
302
+ /**
303
+ * Creates the folders and services at the given location `appLoc` on the given server `serverUrl`.
304
+ * @param members - the JSON specifying the folders and services to be created.
305
+ * @param appLoc - the base folder in which to create the new folders and
306
+ * services. If not provided, is taken from SASjsConfig.
307
+ * @param authConfig - a valid client, secret, refresh and access tokens that are authorised to execute compute jobs.
308
+ */
309
+ deployToSASjs(members: FileTree, appLoc?: string, authConfig?: AuthConfig): Promise<{
311
310
  status: string;
312
311
  message: string;
313
312
  example?: {} | undefined;
@@ -318,6 +317,7 @@ export default class SASjs {
318
317
  log?: string | undefined;
319
318
  logPath?: string | undefined;
320
319
  error?: {} | undefined;
320
+ _webout?: string | undefined;
321
321
  } | undefined>;
322
322
  /**
323
323
  * Kicks off execution of the given job via the compute API.
@@ -1,11 +1,12 @@
1
- import { FolderMember, ServiceMember, ExecutionQuery } from './types';
1
+ import { AuthConfig } from '@sasjs/utils/types';
2
+ import { FileTree, ExecutionQuery } from './types';
2
3
  import { RequestClient } from './request/RequestClient';
3
4
  export declare class SASjsApiClient {
4
5
  private serverUrl;
5
6
  private requestClient;
6
7
  constructor(serverUrl: string, requestClient: RequestClient);
7
8
  setConfig(serverUrl: string): void;
8
- deploy(members: [FolderMember, ServiceMember], appLoc: string): Promise<{
9
+ deploy(members: FileTree, appLoc: string, authConfig?: AuthConfig): Promise<{
9
10
  status: string;
10
11
  message: string;
11
12
  example?: {} | undefined;
@@ -16,6 +17,7 @@ export declare class SASjsApiClient {
16
17
  log?: string | undefined;
17
18
  logPath?: string | undefined;
18
19
  error?: {} | undefined;
20
+ _webout?: string | undefined;
19
21
  }>;
20
22
  /**
21
23
  * Exchanges the auth code for an access token for the given client.
@@ -1 +1 @@
1
- import 'jest-extended';
1
+ export {};