@halcyontech/vscode-ibmi-types 1.6.2 → 1.6.8
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/api/IBMi.d.ts +8 -0
- package/api/IBMiContent.d.ts +38 -78
- package/api/Instance.d.ts +1 -0
- package/package.json +1 -1
- package/typings.d.ts +21 -0
package/api/IBMi.d.ts
CHANGED
@@ -72,5 +72,13 @@ export default class IBMi {
|
|
72
72
|
* @returns {string} result
|
73
73
|
*/
|
74
74
|
sysNameInAmerican(string: string): string;
|
75
|
+
uploadFiles(files: {
|
76
|
+
local: string | vscode.Uri;
|
77
|
+
remote: string;
|
78
|
+
}[], options?: node_ssh.SSHPutFilesOptions): Promise<void>;
|
79
|
+
downloadFile(localFile: string | vscode.Uri, remoteFile: string): Promise<void>;
|
80
|
+
uploadDirectory(localDirectory: string | vscode.Uri, remoteDirectory: string, options?: node_ssh.SSHGetPutDirectoryOptions): Promise<void>;
|
81
|
+
downloadDirectory(localDirectory: string | vscode.Uri, remoteDirectory: string, options?: node_ssh.SSHGetPutDirectoryOptions): Promise<void>;
|
82
|
+
fileToPath(file: string | vscode.Uri): string;
|
75
83
|
}
|
76
84
|
export {};
|
package/api/IBMiContent.d.ts
CHANGED
@@ -1,109 +1,69 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
* @param {string} localPath
|
12
|
-
*/
|
1
|
+
import { default as IBMi } from './IBMi';
|
2
|
+
import { Tools } from './Tools';
|
3
|
+
import { IBMiError, IBMiFile, IBMiMember, IBMiObject, IFSFile } from '../typings';
|
4
|
+
export default class IBMiContent {
|
5
|
+
readonly ibmi: IBMi;
|
6
|
+
constructor(ibmi: IBMi);
|
7
|
+
private get config();
|
8
|
+
private getTempRemote;
|
9
|
+
private getNotUTF8CCSID;
|
10
|
+
private convertToUTF8;
|
13
11
|
downloadStreamfile(remotePath: string, localPath?: string): Promise<string>;
|
14
|
-
writeStreamfile(originalPath: any, content: any): Promise<
|
12
|
+
writeStreamfile(originalPath: any, content: any): Promise<string | void>;
|
15
13
|
/**
|
16
14
|
* Download the contents of a source member
|
17
|
-
* @param {string|undefined} asp
|
18
|
-
* @param {string} lib
|
19
|
-
* @param {string} spf
|
20
|
-
* @param {string} mbr
|
21
15
|
*/
|
22
|
-
downloadMemberContent(asp: string | undefined,
|
16
|
+
downloadMemberContent(asp: string | undefined, library: string, sourceFile: string, member: string): Promise<string>;
|
23
17
|
/**
|
24
18
|
* Upload to a member
|
25
|
-
* @param {string|undefined} asp
|
26
|
-
* @param {string} lib
|
27
|
-
* @param {string} spf
|
28
|
-
* @param {string} mbr
|
29
|
-
* @param {string|Uint8Array} content
|
30
19
|
*/
|
31
|
-
uploadMemberContent(asp: string | undefined,
|
20
|
+
uploadMemberContent(asp: string | undefined, library: string, sourceFile: string, member: string, content: string | Uint8Array): Promise<boolean>;
|
32
21
|
/**
|
33
22
|
* Run an SQL statement
|
34
|
-
* @param
|
35
|
-
* @returns
|
23
|
+
* @param statement
|
24
|
+
* @returns a Result set
|
36
25
|
*/
|
37
26
|
runSQL(statement: string): Promise<Tools.DB2Row[]>;
|
38
27
|
/**
|
39
28
|
* Download the contents of a table.
|
40
|
-
* @param
|
41
|
-
* @param
|
42
|
-
* @param
|
43
|
-
* @param
|
29
|
+
* @param library
|
30
|
+
* @param file
|
31
|
+
* @param member Will default to file provided
|
32
|
+
* @param deleteTable Will delete the table after download
|
44
33
|
*/
|
45
|
-
getTable(
|
34
|
+
getTable(library: string, file: string, member: string, deleteTable: boolean): Promise<Tools.DB2Row[]>;
|
46
35
|
/**
|
47
36
|
* Get list of libraries with description and attribute
|
48
|
-
* @param
|
49
|
-
* @returns
|
37
|
+
* @param libraries Array of libraries to retrieve
|
38
|
+
* @returns an array of libraries as IBMiObject
|
50
39
|
*/
|
51
|
-
getLibraryList(libraries: string[]): Promise<
|
52
|
-
name: string;
|
53
|
-
text: string;
|
54
|
-
attribute: string;
|
55
|
-
}[]>;
|
40
|
+
getLibraryList(libraries: string[]): Promise<IBMiObject[]>;
|
56
41
|
/**
|
57
|
-
* @param
|
58
|
-
* @param
|
59
|
-
* @returns
|
42
|
+
* @param filters
|
43
|
+
* @param sortOrder
|
44
|
+
* @returns an array of IBMiFile
|
60
45
|
*/
|
61
46
|
getObjectList(filters: {
|
62
47
|
library: string;
|
63
48
|
object?: string;
|
64
49
|
types?: string[];
|
65
|
-
}, sortOrder?:
|
66
|
-
library: string;
|
67
|
-
name: string;
|
68
|
-
type: string;
|
69
|
-
text: string;
|
70
|
-
attribute: string;
|
71
|
-
count?: number;
|
72
|
-
}[]>;
|
50
|
+
}, sortOrder?: `name` | `type`): Promise<IBMiFile[]>;
|
73
51
|
/**
|
74
|
-
* @param
|
75
|
-
* @param
|
76
|
-
* @param
|
77
|
-
* @returns
|
52
|
+
* @param lib
|
53
|
+
* @param spf
|
54
|
+
* @param mbr
|
55
|
+
* @returns an array of IBMiMember
|
78
56
|
*/
|
79
|
-
getMemberList(lib: string, spf: string, mbr?: string, ext?: string): Promise<
|
80
|
-
asp?: string;
|
81
|
-
library: string;
|
82
|
-
file: string;
|
83
|
-
name: string;
|
84
|
-
extension: string;
|
85
|
-
recordLength: number;
|
86
|
-
text: string;
|
87
|
-
}[]>;
|
57
|
+
getMemberList(lib: string, spf: string, mbr?: string, ext?: string): Promise<IBMiMember[]>;
|
88
58
|
/**
|
89
59
|
* Get list of items in a path
|
90
|
-
* @param
|
91
|
-
* @return
|
60
|
+
* @param remotePath
|
61
|
+
* @return an array of IFSFile
|
92
62
|
*/
|
93
|
-
getFileList(remotePath: string): Promise<
|
94
|
-
type: "directory" | "streamfile";
|
95
|
-
name: string;
|
96
|
-
path: string;
|
97
|
-
}[]>;
|
63
|
+
getFileList(remotePath: string): Promise<IFSFile[]>;
|
98
64
|
/**
|
99
|
-
* @param
|
100
|
-
* @returns
|
65
|
+
* @param errorsString; several lines of `code:text`...
|
66
|
+
* @returns errors
|
101
67
|
*/
|
102
|
-
parseIBMiErrors(errorsString: string):
|
103
|
-
code: string;
|
104
|
-
text: string;
|
105
|
-
}[];
|
68
|
+
parseIBMiErrors(errorsString: string): IBMiError[];
|
106
69
|
}
|
107
|
-
import { default as IBMi } from "./IBMi";
|
108
|
-
import { Tools } from "./Tools";
|
109
|
-
import path = require("path");
|
package/api/Instance.d.ts
CHANGED
package/package.json
CHANGED
package/typings.d.ts
CHANGED
@@ -67,3 +67,24 @@ export interface IBMiObject {
|
|
67
67
|
text: string;
|
68
68
|
attribute?: string;
|
69
69
|
}
|
70
|
+
export interface IBMiFile extends IBMiObject {
|
71
|
+
count?: number;
|
72
|
+
}
|
73
|
+
export interface IBMiMember {
|
74
|
+
library: string;
|
75
|
+
file: string;
|
76
|
+
name: string;
|
77
|
+
extension: string;
|
78
|
+
recordLength: number;
|
79
|
+
text: string;
|
80
|
+
asp?: string;
|
81
|
+
}
|
82
|
+
export interface IFSFile {
|
83
|
+
type: "directory" | "streamfile";
|
84
|
+
name: string;
|
85
|
+
path: string;
|
86
|
+
}
|
87
|
+
export interface IBMiError {
|
88
|
+
code: string;
|
89
|
+
text: string;
|
90
|
+
}
|