testit-api-client 1.0.4 → 2.0.0
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 +251 -27
- package/dist/api.d.ts +8733 -0
- package/dist/api.js +10319 -0
- package/dist/base.d.ts +55 -0
- package/dist/base.js +82 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +250 -0
- package/dist/configuration.d.ts +83 -0
- package/dist/configuration.js +44 -0
- package/dist/index.d.ts +13 -2
- package/dist/index.js +20 -3
- package/package.json +22 -40
- package/dist/client.d.ts +0 -23
- package/dist/client.js +0 -166
- package/dist/types/attachment.d.ts +0 -14
- package/dist/types/attachment.js +0 -2
- package/dist/types/autotest.d.ts +0 -97
- package/dist/types/autotest.js +0 -2
- package/dist/types/autotestResults.d.ts +0 -22
- package/dist/types/autotestResults.js +0 -2
- package/dist/types/autotestStep.d.ts +0 -5
- package/dist/types/autotestStep.js +0 -2
- package/dist/types/capabilities.d.ts +0 -1
- package/dist/types/capabilities.js +0 -2
- package/dist/types/client.d.ts +0 -15
- package/dist/types/client.js +0 -2
- package/dist/types/config.d.ts +0 -10
- package/dist/types/config.js +0 -2
- package/dist/types/configuration.d.ts +0 -16
- package/dist/types/configuration.js +0 -2
- package/dist/types/index.d.ts +0 -18
- package/dist/types/index.js +0 -30
- package/dist/types/label.d.ts +0 -7
- package/dist/types/label.js +0 -2
- package/dist/types/link.d.ts +0 -24
- package/dist/types/link.js +0 -2
- package/dist/types/outcome.d.ts +0 -1
- package/dist/types/outcome.js +0 -2
- package/dist/types/parameters.d.ts +0 -1
- package/dist/types/parameters.js +0 -2
- package/dist/types/properties.d.ts +0 -1
- package/dist/types/properties.js +0 -2
- package/dist/types/stepResults.d.ts +0 -14
- package/dist/types/stepResults.js +0 -2
- package/dist/types/tag.d.ts +0 -3
- package/dist/types/tag.js +0 -2
- package/dist/types/testPoint.d.ts +0 -9
- package/dist/types/testPoint.js +0 -2
- package/dist/types/testResult.d.ts +0 -31
- package/dist/types/testResult.js +0 -2
- package/dist/types/testRun.d.ts +0 -20
- package/dist/types/testRun.js +0 -2
- package/dist/types/workItem.d.ts +0 -3
- package/dist/types/workItem.js +0 -2
- package/dist/validation.d.ts +0 -2
- package/dist/validation.js +0 -15
package/package.json
CHANGED
|
@@ -1,52 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testit-api-client",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "OpenAPI client for testit-api-client",
|
|
5
|
+
"author": "OpenAPI-Generator Contributors",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/testit-tms/api-client-js"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
"axios",
|
|
12
|
+
"typescript",
|
|
13
|
+
"openapi-client",
|
|
14
|
+
"openapi-generator",
|
|
15
|
+
"testit-api-client"
|
|
16
|
+
],
|
|
17
|
+
"license": "Unlicense",
|
|
5
18
|
"main": "dist/index.js",
|
|
19
|
+
"typings": "dist/index.d.ts",
|
|
6
20
|
"scripts": {
|
|
7
|
-
"test": "jest",
|
|
8
21
|
"build": "tsc",
|
|
9
22
|
"prebuild": "rimraf dist"
|
|
10
23
|
},
|
|
11
|
-
"keywords": [],
|
|
12
|
-
"author": "Andrey Kiselev",
|
|
13
|
-
"license": "Apache-2.0",
|
|
14
|
-
"devDependencies": {
|
|
15
|
-
"@babel/core": "^7.15.8",
|
|
16
|
-
"@babel/preset-env": "^7.15.8",
|
|
17
|
-
"@babel/preset-typescript": "^7.15.0",
|
|
18
|
-
"@types/jest": "^27.0.2",
|
|
19
|
-
"@types/minimist": "^1.2.2",
|
|
20
|
-
"@types/node": "^16.10.2",
|
|
21
|
-
"@types/uuid": "^8.3.1",
|
|
22
|
-
"babel-jest": "^27.2.5",
|
|
23
|
-
"jest": "^27.2.5",
|
|
24
|
-
"rimraf": "^3.0.2",
|
|
25
|
-
"ts-node": "^10.2.1",
|
|
26
|
-
"typescript": "^4.5.5",
|
|
27
|
-
"uuid": "^8.3.2"
|
|
28
|
-
},
|
|
29
24
|
"dependencies": {
|
|
30
|
-
"axios": "^0.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"xmlhttprequest": "^1.8.0"
|
|
25
|
+
"axios": "^0.26.1"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/node": "^12.11.5",
|
|
29
|
+
"typescript": "^4.0"
|
|
36
30
|
},
|
|
37
31
|
"files": [
|
|
38
32
|
"dist"
|
|
39
|
-
]
|
|
40
|
-
"bugs": {
|
|
41
|
-
"url": "https://github.com/testit-tms/api-client-js/issues"
|
|
42
|
-
},
|
|
43
|
-
"homepage": "https://github.com/testit-tms/api-client-js",
|
|
44
|
-
"repository": {
|
|
45
|
-
"type": "git",
|
|
46
|
-
"url": "git+https://github.com/testit-tms/api-client-js.git"
|
|
47
|
-
},
|
|
48
|
-
"types": "./dist\\index.d.ts",
|
|
49
|
-
"directories": {
|
|
50
|
-
"test": "test"
|
|
51
|
-
}
|
|
33
|
+
]
|
|
52
34
|
}
|
package/dist/client.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Attachment, Autotest, AutotestPost, AutotestPut, AutotestQuery, AutotestResultsForTestRun, ClientConfig, ClientConfigWithFile, IClient, TestRunGet, TestRunPost, WorkItemId } from './types';
|
|
2
|
-
export declare class Client implements IClient {
|
|
3
|
-
private readonly axios;
|
|
4
|
-
private config;
|
|
5
|
-
private readonly request;
|
|
6
|
-
constructor(config: Partial<ClientConfigWithFile>);
|
|
7
|
-
checkConnection(): Promise<void>;
|
|
8
|
-
getAutotest(query: AutotestQuery): Promise<Autotest[]>;
|
|
9
|
-
createAutotest(autotest: AutotestPost): Promise<Autotest>;
|
|
10
|
-
updateAutotest(autotest: AutotestPut): Promise<void>;
|
|
11
|
-
linkToWorkItem(autotestId: string, workItem: WorkItemId): Promise<void>;
|
|
12
|
-
getTestRun(testRunId: string): TestRunGet;
|
|
13
|
-
createTestRun(testRun: TestRunPost): Promise<TestRunGet>;
|
|
14
|
-
startTestRun(testRunId: string): Promise<void>;
|
|
15
|
-
loadTestRunResults(testRunId: string, results: AutotestResultsForTestRun[]): Promise<string[]>;
|
|
16
|
-
completeTestRun(testRunId: string): Promise<void>;
|
|
17
|
-
getConfig(): ClientConfig;
|
|
18
|
-
loadAttachment(filePath: string): Promise<Attachment>;
|
|
19
|
-
private readCliConfig;
|
|
20
|
-
private readEnvConfig;
|
|
21
|
-
private readConfigFile;
|
|
22
|
-
static mergeConfig(oldConfig: Partial<ClientConfig>, newConfig: Partial<ClientConfig>): Partial<ClientConfig>;
|
|
23
|
-
}
|
package/dist/client.js
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Client = void 0;
|
|
18
|
-
const axios_1 = __importDefault(require("axios"));
|
|
19
|
-
const minimist_1 = __importDefault(require("minimist"));
|
|
20
|
-
const fs_1 = require("fs");
|
|
21
|
-
const form_data_1 = __importDefault(require("form-data"));
|
|
22
|
-
const path_1 = require("path");
|
|
23
|
-
const validation_1 = require("./validation");
|
|
24
|
-
// TODO: implement via the base client
|
|
25
|
-
const XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
|
|
26
|
-
class Client {
|
|
27
|
-
constructor(config) {
|
|
28
|
-
const { configFile } = config, restConfig = __rest(config, ["configFile"]);
|
|
29
|
-
let finalConfig = restConfig;
|
|
30
|
-
if (configFile) {
|
|
31
|
-
finalConfig = Client.mergeConfig(finalConfig, this.readConfigFile(configFile));
|
|
32
|
-
}
|
|
33
|
-
finalConfig = Client.mergeConfig(finalConfig, this.readEnvConfig());
|
|
34
|
-
finalConfig = Client.mergeConfig(finalConfig, this.readCliConfig());
|
|
35
|
-
this.config = (0, validation_1.validateConfig)(finalConfig);
|
|
36
|
-
const baseURL = new URL('/api/v2', this.config.url).toString();
|
|
37
|
-
this.axios = axios_1.default.create({
|
|
38
|
-
baseURL,
|
|
39
|
-
headers: {
|
|
40
|
-
Authorization: `PrivateToken ${this.config.privateToken}`,
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
// TODO: implement via the base client
|
|
44
|
-
this.request = new XMLHttpRequest();
|
|
45
|
-
}
|
|
46
|
-
async checkConnection() {
|
|
47
|
-
try {
|
|
48
|
-
await axios_1.default.get(new URL('version.json', this.config.url).toString());
|
|
49
|
-
}
|
|
50
|
-
catch (err) {
|
|
51
|
-
throw new Error('Cannot connect to TestIt');
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
// TODO: add query object
|
|
55
|
-
async getAutotest(query) {
|
|
56
|
-
const params = new URLSearchParams();
|
|
57
|
-
Object.keys(query).forEach((key) => {
|
|
58
|
-
const value = query[key];
|
|
59
|
-
if (value === undefined) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
if (Array.isArray(value)) {
|
|
63
|
-
value.forEach((v) => params.append(key, v));
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
params.append(key, value.toString());
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
return this.axios
|
|
70
|
-
.get(`/autoTests?${params.toString()}`)
|
|
71
|
-
.then((res) => res.data);
|
|
72
|
-
}
|
|
73
|
-
async createAutotest(autotest) {
|
|
74
|
-
return this.axios.post('/autoTests', autotest).then((res) => res.data);
|
|
75
|
-
}
|
|
76
|
-
async updateAutotest(autotest) {
|
|
77
|
-
return this.axios.put('/autoTests', autotest);
|
|
78
|
-
}
|
|
79
|
-
async linkToWorkItem(autotestId, workItem) {
|
|
80
|
-
return this.axios.post(`/autoTests/${autotestId}/workItems`, workItem);
|
|
81
|
-
}
|
|
82
|
-
// TODO: implement via the base client
|
|
83
|
-
getTestRun(testRunId) {
|
|
84
|
-
const baseURL = new URL('/api/v2', this.config.url).toString();
|
|
85
|
-
this.request.open("GET", `${baseURL}/testRuns/${testRunId}`, false);
|
|
86
|
-
this.request.setRequestHeader('Authorization', `PrivateToken ${this.config.privateToken}`);
|
|
87
|
-
this.request.send(null);
|
|
88
|
-
return JSON.parse(this.request.responseText);
|
|
89
|
-
}
|
|
90
|
-
async createTestRun(testRun) {
|
|
91
|
-
return this.axios
|
|
92
|
-
.post('/testRuns', testRun)
|
|
93
|
-
.then((res) => res.data);
|
|
94
|
-
}
|
|
95
|
-
async startTestRun(testRunId) {
|
|
96
|
-
return this.axios.post(`/testRuns/${testRunId}/start`);
|
|
97
|
-
}
|
|
98
|
-
async loadTestRunResults(testRunId, results) {
|
|
99
|
-
return await this.axios
|
|
100
|
-
.post(`/testRuns/${testRunId}/testResults`, results)
|
|
101
|
-
.then((res) => res.data);
|
|
102
|
-
}
|
|
103
|
-
async completeTestRun(testRunId) {
|
|
104
|
-
return this.axios.post(`/testRuns/${testRunId}/complete`);
|
|
105
|
-
}
|
|
106
|
-
getConfig() {
|
|
107
|
-
return this.config;
|
|
108
|
-
}
|
|
109
|
-
async loadAttachment(filePath) {
|
|
110
|
-
const form = new form_data_1.default();
|
|
111
|
-
form.append('file', (0, fs_1.readFileSync)(filePath), (0, path_1.basename)(filePath));
|
|
112
|
-
return this.axios
|
|
113
|
-
.post('/Attachments', form, {
|
|
114
|
-
headers: form.getHeaders(),
|
|
115
|
-
})
|
|
116
|
-
.then((res) => res.data);
|
|
117
|
-
}
|
|
118
|
-
readCliConfig() {
|
|
119
|
-
const args = (0, minimist_1.default)(process.argv.slice(2));
|
|
120
|
-
let config = {};
|
|
121
|
-
if (args['testitConfig']) {
|
|
122
|
-
config = this.readConfigFile(args['testitConfig']);
|
|
123
|
-
}
|
|
124
|
-
return Client.mergeConfig(config, {
|
|
125
|
-
url: args['testitUrl'],
|
|
126
|
-
privateToken: args['testitPrivateToken'],
|
|
127
|
-
projectId: args['testitProjectId'],
|
|
128
|
-
configurationId: args['testitConfigurationId'],
|
|
129
|
-
testRunId: args['testitTestRunId'],
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
readEnvConfig() {
|
|
133
|
-
let config = {};
|
|
134
|
-
if (process.env['TESTIT_CONFIG_FILE']) {
|
|
135
|
-
config = this.readConfigFile(process.env['TESTIT_CONFIG_FILE']);
|
|
136
|
-
}
|
|
137
|
-
return Client.mergeConfig(config, {
|
|
138
|
-
url: process.env['TESTIT_URL'],
|
|
139
|
-
privateToken: process.env['TESTIT_PRIVATE_TOKEN'],
|
|
140
|
-
projectId: process.env['TESTIT_PROJECT_ID'],
|
|
141
|
-
configurationId: process.env['TESTIT_CONFIGURATION_ID'],
|
|
142
|
-
testRunId: process.env['TESTIT_TEST_RUN_ID'],
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
readConfigFile(path) {
|
|
146
|
-
if (!(0, fs_1.existsSync)(path)) {
|
|
147
|
-
throw new Error('Config file not found');
|
|
148
|
-
}
|
|
149
|
-
const config = JSON.parse((0, fs_1.readFileSync)(path, { encoding: 'utf8' }));
|
|
150
|
-
if (config.privateToken) {
|
|
151
|
-
console.warn('Private token is in config file, it is not secure');
|
|
152
|
-
}
|
|
153
|
-
return config;
|
|
154
|
-
}
|
|
155
|
-
static mergeConfig(oldConfig, newConfig) {
|
|
156
|
-
var _a, _b, _c, _d, _e;
|
|
157
|
-
return {
|
|
158
|
-
url: (_a = newConfig.url) !== null && _a !== void 0 ? _a : oldConfig.url,
|
|
159
|
-
privateToken: (_b = newConfig.privateToken) !== null && _b !== void 0 ? _b : oldConfig.privateToken,
|
|
160
|
-
projectId: (_c = newConfig.projectId) !== null && _c !== void 0 ? _c : oldConfig.projectId,
|
|
161
|
-
configurationId: (_d = newConfig.configurationId) !== null && _d !== void 0 ? _d : oldConfig.configurationId,
|
|
162
|
-
testRunId: (_e = newConfig.testRunId) !== null && _e !== void 0 ? _e : oldConfig.testRunId,
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
exports.Client = Client;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface AttachmentPut {
|
|
2
|
-
id: string;
|
|
3
|
-
}
|
|
4
|
-
export interface Attachment {
|
|
5
|
-
fileId: string;
|
|
6
|
-
type: string;
|
|
7
|
-
size: number;
|
|
8
|
-
name: string;
|
|
9
|
-
createDate?: string;
|
|
10
|
-
modifiedDate?: string;
|
|
11
|
-
createdById?: string;
|
|
12
|
-
modifiedById?: string;
|
|
13
|
-
id?: string;
|
|
14
|
-
}
|
package/dist/types/attachment.js
DELETED
package/dist/types/autotest.d.ts
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { LabelPost, LabelShort } from './label';
|
|
2
|
-
import { Link, LinkPost, LinkPut } from './link';
|
|
3
|
-
import { AutotestStep } from './autotestStep';
|
|
4
|
-
export interface AutotestPost {
|
|
5
|
-
globalId?: number;
|
|
6
|
-
isDeleted?: boolean;
|
|
7
|
-
id?: string;
|
|
8
|
-
createdDate?: string;
|
|
9
|
-
modifiedDate?: string;
|
|
10
|
-
createdById?: string;
|
|
11
|
-
modifiedById?: string;
|
|
12
|
-
mustBeApproved?: boolean;
|
|
13
|
-
externalId: string;
|
|
14
|
-
links?: LinkPost[];
|
|
15
|
-
projectId: string;
|
|
16
|
-
name: string;
|
|
17
|
-
namespace?: string;
|
|
18
|
-
classname?: string;
|
|
19
|
-
steps?: AutotestStep[];
|
|
20
|
-
setup?: AutotestStep[];
|
|
21
|
-
teardown?: AutotestStep[];
|
|
22
|
-
title?: string;
|
|
23
|
-
description?: string;
|
|
24
|
-
labels?: LabelPost[];
|
|
25
|
-
}
|
|
26
|
-
export interface AutotestPut {
|
|
27
|
-
id?: string;
|
|
28
|
-
externalId: string;
|
|
29
|
-
links?: LinkPost[];
|
|
30
|
-
projectId: string;
|
|
31
|
-
name: string;
|
|
32
|
-
namespace?: string;
|
|
33
|
-
classname?: string;
|
|
34
|
-
steps?: AutotestStep[];
|
|
35
|
-
setup?: AutotestStep[];
|
|
36
|
-
teardown?: AutotestStep[];
|
|
37
|
-
title?: string;
|
|
38
|
-
description?: string;
|
|
39
|
-
labels?: LabelPost[];
|
|
40
|
-
}
|
|
41
|
-
export interface Autotest {
|
|
42
|
-
globalId?: number;
|
|
43
|
-
isDeleted?: boolean;
|
|
44
|
-
id?: string;
|
|
45
|
-
createdDate?: string;
|
|
46
|
-
modifiedDate?: string;
|
|
47
|
-
createdById?: string;
|
|
48
|
-
modifiedById?: string;
|
|
49
|
-
mustBeApproved?: boolean;
|
|
50
|
-
externalId: string;
|
|
51
|
-
links?: LinkPut[];
|
|
52
|
-
projectId: string;
|
|
53
|
-
name: string;
|
|
54
|
-
namespace?: string;
|
|
55
|
-
classname?: string;
|
|
56
|
-
steps?: AutotestStep[];
|
|
57
|
-
setup?: AutotestStep[];
|
|
58
|
-
teardown?: AutotestStep[];
|
|
59
|
-
title?: string;
|
|
60
|
-
description?: string;
|
|
61
|
-
labels?: LabelPost[];
|
|
62
|
-
}
|
|
63
|
-
export interface AutotestGet {
|
|
64
|
-
externalId?: string;
|
|
65
|
-
links?: Link[];
|
|
66
|
-
projectId?: string;
|
|
67
|
-
name?: string;
|
|
68
|
-
namespace?: string;
|
|
69
|
-
classname?: string;
|
|
70
|
-
steps?: AutotestStep[];
|
|
71
|
-
setup?: AutotestStep[];
|
|
72
|
-
teardown: AutotestStep[];
|
|
73
|
-
global?: number;
|
|
74
|
-
createdDate?: string;
|
|
75
|
-
modifiedDate?: string;
|
|
76
|
-
createdById?: string;
|
|
77
|
-
modifiedById?: string;
|
|
78
|
-
labels?: LabelShort[];
|
|
79
|
-
id?: string;
|
|
80
|
-
isDeleted?: boolean;
|
|
81
|
-
}
|
|
82
|
-
export interface AutotestQuery {
|
|
83
|
-
projectId?: string;
|
|
84
|
-
externalId?: string;
|
|
85
|
-
globalId?: number;
|
|
86
|
-
namespace?: string;
|
|
87
|
-
isNamespaceNull?: boolean;
|
|
88
|
-
classname?: string;
|
|
89
|
-
isClassnameNull?: boolean;
|
|
90
|
-
isDeleted?: boolean;
|
|
91
|
-
labels?: string[];
|
|
92
|
-
skip?: number;
|
|
93
|
-
take?: number;
|
|
94
|
-
orderBy?: string;
|
|
95
|
-
searchField?: string;
|
|
96
|
-
searchValue?: string;
|
|
97
|
-
}
|
package/dist/types/autotest.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { AttachmentPut } from './attachment';
|
|
2
|
-
import { LinkPost } from './link';
|
|
3
|
-
import { OutcomeType } from './outcome';
|
|
4
|
-
import { Parameters } from './parameters';
|
|
5
|
-
import { AttachmentPutModelAutotestStepResults } from './stepResults';
|
|
6
|
-
export interface AutotestResultsForTestRun {
|
|
7
|
-
configurationId: string;
|
|
8
|
-
links?: LinkPost[];
|
|
9
|
-
failureReasonName?: string;
|
|
10
|
-
autotestExternalId: string;
|
|
11
|
-
outcome: OutcomeType;
|
|
12
|
-
message?: string;
|
|
13
|
-
traces?: string;
|
|
14
|
-
startedOn?: string;
|
|
15
|
-
completeOn?: string;
|
|
16
|
-
duration?: number;
|
|
17
|
-
attachments?: AttachmentPut[];
|
|
18
|
-
parameters?: Parameters;
|
|
19
|
-
stepResults?: AttachmentPutModelAutotestStepResults[];
|
|
20
|
-
setupResults?: AttachmentPutModelAutotestStepResults[];
|
|
21
|
-
teardownResults?: AttachmentPutModelAutotestStepResults[];
|
|
22
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type Capabilities = Record<string, string>;
|
package/dist/types/client.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Attachment, Autotest, AutotestPost, AutotestPut, AutotestQuery, AutotestResultsForTestRun, ClientConfig, TestRunGet, TestRunPost, WorkItemId } from '.';
|
|
2
|
-
export interface IClient {
|
|
3
|
-
checkConnection(): Promise<void>;
|
|
4
|
-
getAutotest(query: AutotestQuery): Promise<Autotest[]>;
|
|
5
|
-
createAutotest(autotest: AutotestPost): Promise<Autotest>;
|
|
6
|
-
updateAutotest(autotest: AutotestPut): Promise<void>;
|
|
7
|
-
linkToWorkItem(autotestId: string, workItem: WorkItemId): Promise<void>;
|
|
8
|
-
getTestRun(testRunId: string): TestRunGet;
|
|
9
|
-
createTestRun(testRun: TestRunPost): Promise<TestRunGet>;
|
|
10
|
-
startTestRun(testRunId: string): Promise<void>;
|
|
11
|
-
loadTestRunResults(testRunId: string, results: AutotestResultsForTestRun[]): Promise<string[]>;
|
|
12
|
-
completeTestRun(testRunId: string): Promise<void>;
|
|
13
|
-
getConfig(): ClientConfig;
|
|
14
|
-
loadAttachment(fileName: string): Promise<Attachment>;
|
|
15
|
-
}
|
package/dist/types/client.js
DELETED
package/dist/types/config.d.ts
DELETED
package/dist/types/config.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Capabilities } from './capabilities';
|
|
2
|
-
export interface Configuration {
|
|
3
|
-
description?: string;
|
|
4
|
-
isActive?: boolean;
|
|
5
|
-
capabilities: Capabilities;
|
|
6
|
-
projectId?: string;
|
|
7
|
-
isDefault?: boolean;
|
|
8
|
-
name?: string;
|
|
9
|
-
createdDate?: string;
|
|
10
|
-
modifiedDate?: string;
|
|
11
|
-
createdById?: string;
|
|
12
|
-
modifiedById?: string;
|
|
13
|
-
globalId?: number;
|
|
14
|
-
id?: number;
|
|
15
|
-
isDeleted?: boolean;
|
|
16
|
-
}
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export * from './attachment';
|
|
2
|
-
export * from './autotest';
|
|
3
|
-
export * from './autotestResults';
|
|
4
|
-
export * from './autotestStep';
|
|
5
|
-
export * from './capabilities';
|
|
6
|
-
export * from './client';
|
|
7
|
-
export * from './config';
|
|
8
|
-
export * from './configuration';
|
|
9
|
-
export * from './label';
|
|
10
|
-
export * from './link';
|
|
11
|
-
export * from './outcome';
|
|
12
|
-
export * from './parameters';
|
|
13
|
-
export * from './properties';
|
|
14
|
-
export * from './stepResults';
|
|
15
|
-
export * from './tag';
|
|
16
|
-
export * from './testResult';
|
|
17
|
-
export * from './testRun';
|
|
18
|
-
export * from './workItem';
|
package/dist/types/index.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./attachment"), exports);
|
|
14
|
-
__exportStar(require("./autotest"), exports);
|
|
15
|
-
__exportStar(require("./autotestResults"), exports);
|
|
16
|
-
__exportStar(require("./autotestStep"), exports);
|
|
17
|
-
__exportStar(require("./capabilities"), exports);
|
|
18
|
-
__exportStar(require("./client"), exports);
|
|
19
|
-
__exportStar(require("./config"), exports);
|
|
20
|
-
__exportStar(require("./configuration"), exports);
|
|
21
|
-
__exportStar(require("./label"), exports);
|
|
22
|
-
__exportStar(require("./link"), exports);
|
|
23
|
-
__exportStar(require("./outcome"), exports);
|
|
24
|
-
__exportStar(require("./parameters"), exports);
|
|
25
|
-
__exportStar(require("./properties"), exports);
|
|
26
|
-
__exportStar(require("./stepResults"), exports);
|
|
27
|
-
__exportStar(require("./tag"), exports);
|
|
28
|
-
__exportStar(require("./testResult"), exports);
|
|
29
|
-
__exportStar(require("./testRun"), exports);
|
|
30
|
-
__exportStar(require("./workItem"), exports);
|
package/dist/types/label.d.ts
DELETED
package/dist/types/label.js
DELETED
package/dist/types/link.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export declare type LinkType = 'Related' | 'BlockedBy' | 'Defect' | 'Issue' | 'Requirement' | 'Repository';
|
|
2
|
-
export interface LinkPost {
|
|
3
|
-
title?: string;
|
|
4
|
-
url: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
type?: LinkType;
|
|
7
|
-
hasInfo?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export interface LinkPut {
|
|
10
|
-
id?: string;
|
|
11
|
-
title?: string;
|
|
12
|
-
url: string;
|
|
13
|
-
description?: string;
|
|
14
|
-
type?: LinkType;
|
|
15
|
-
hasInfo?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export interface Link {
|
|
18
|
-
id?: string;
|
|
19
|
-
title?: string;
|
|
20
|
-
url: string;
|
|
21
|
-
description?: string;
|
|
22
|
-
type?: LinkType;
|
|
23
|
-
hasInfo?: boolean;
|
|
24
|
-
}
|
package/dist/types/link.js
DELETED
package/dist/types/outcome.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type OutcomeType = 'Passed' | 'Failed' | 'Pending' | 'Blocked' | 'Skipped';
|
package/dist/types/outcome.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type Parameters = Record<string, string>;
|
package/dist/types/parameters.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type Properties = Record<string, string>;
|
package/dist/types/properties.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AttachmentPut } from './attachment';
|
|
2
|
-
import { OutcomeType } from './outcome';
|
|
3
|
-
import { Parameters } from './parameters';
|
|
4
|
-
export interface AttachmentPutModelAutotestStepResults {
|
|
5
|
-
title?: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
startedOn?: string;
|
|
8
|
-
completedOn?: string;
|
|
9
|
-
duration?: number;
|
|
10
|
-
outcome?: OutcomeType;
|
|
11
|
-
stepResults?: AttachmentPutModelAutotestStepResults[];
|
|
12
|
-
attachments?: AttachmentPut[];
|
|
13
|
-
parameters?: Parameters;
|
|
14
|
-
}
|
package/dist/types/tag.d.ts
DELETED
package/dist/types/tag.js
DELETED
package/dist/types/testPoint.js
DELETED