@autifyhq/autify-sdk 0.18.0 → 0.20.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosRequestConfig } from "axios";
|
|
2
|
-
import { AccessPoint, CapabilityOption, CreateAccessPointRequest, CreateAccessPointResult, CreateUrlReplacementRequest, DeleteAccessPointRequest, DescribeResult200Response, ExecuteScenariosRequest, ExecuteScenariosResult, ExecuteSchedule200Response, ExecuteScheduleRequest, Scenario, TestPlanResult, UpdateUrlReplacementRequest, UrlReplacement } from "./openapi";
|
|
2
|
+
import { AccessPoint, CapabilityOption, CreateAccessPointRequest, CreateAccessPointResult, CreateTestPlanVariableRequest, CreateUrlReplacementRequest, DeleteAccessPointRequest, DescribeResult200Response, ExecuteScenariosRequest, ExecuteScenariosResult, ExecuteSchedule200Response, ExecuteScheduleRequest, ProjectInfo, Scenario, TestPlanResult, TestPlanVariable, UpdateTestPlanVariableRequest, UpdateUrlReplacementRequest, UrlReplacement, UsedCredits } from "./openapi";
|
|
3
3
|
export { BASE_PATH as WEB_BASE_PATH } from "./openapi/base";
|
|
4
4
|
type Options = Readonly<{
|
|
5
5
|
basePath?: string;
|
|
@@ -48,17 +48,41 @@ export declare class WebClient {
|
|
|
48
48
|
* @memberof CapabilityApi
|
|
49
49
|
*/
|
|
50
50
|
listCapabilities(projectId: number, os?: string, browser?: string, deviceType?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CapabilityOption[], any>>;
|
|
51
|
+
private readonly creditApi;
|
|
52
|
+
/**
|
|
53
|
+
* Get the number of credits used in the project\\ \\ Notes:\\ This endpoint works only for organizations on credit-based plans. It always returns 0 for `credits_consumed` and `credit_consumption_event_count` if your organization is on a run-based plan.
|
|
54
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/credits
|
|
55
|
+
* @param {string} [dateFrom] The date to start counting used credits from.\\ If not specified, the date will be set to 1 week ago.\\ Up to 90 days in advance can be specified. If the specified date is more than 90 days in the past, the date will be set to 90 days ago.\\ Date must follow the format YYYY-MM-DD (example: \"2023-09-21\").
|
|
56
|
+
* @param {string} [dateTo] The date to end counting used credits from.\\ If not specified, the date will be set to today.\\ Date must follow the format YYYY-MM-DD (example: \"2023-09-28\").
|
|
57
|
+
* @param {number} [scenarioId] The scenario ID to filter used credits by.
|
|
58
|
+
* @param {number} [testPlanId] The test plan ID to filter used credits by.
|
|
59
|
+
* @param {number} [userId] The user ID that executed tests to filter used credits by.
|
|
60
|
+
* @param {*} [options] Override http request option.
|
|
61
|
+
* @throws {RequiredError}
|
|
62
|
+
* @memberof CreditApi
|
|
63
|
+
*/
|
|
64
|
+
getCreditUsage(projectId: number, dateFrom?: string, dateTo?: string, scenarioId?: number, testPlanId?: number, userId?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UsedCredits, any>>;
|
|
65
|
+
private readonly projectApi;
|
|
66
|
+
/**
|
|
67
|
+
* Get project information.
|
|
68
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/project_info
|
|
69
|
+
* @param {*} [options] Override http request option.
|
|
70
|
+
* @throws {RequiredError}
|
|
71
|
+
* @memberof ProjectApi
|
|
72
|
+
*/
|
|
73
|
+
getProjectInfo(projectId: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ProjectInfo, any>>;
|
|
51
74
|
private readonly resultApi;
|
|
52
75
|
/**
|
|
53
76
|
* Get a test result.
|
|
54
77
|
* @summary Get a test result.
|
|
55
78
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/results/4
|
|
56
79
|
* @param {number} resultId For example, 4 for the following URL: https://app.autify.com/projects/1/results/4
|
|
80
|
+
* @param {boolean} [getDetails] The flag to get details of the test case result.
|
|
57
81
|
* @param {*} [options] Override http request option.
|
|
58
82
|
* @throws {RequiredError}
|
|
59
83
|
* @memberof ResultApi
|
|
60
84
|
*/
|
|
61
|
-
describeResult(projectId: number, resultId: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DescribeResult200Response, any>>;
|
|
85
|
+
describeResult(projectId: number, resultId: number, getDetails?: boolean, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DescribeResult200Response, any>>;
|
|
62
86
|
/**
|
|
63
87
|
* List test results.
|
|
64
88
|
* @summary List test results.
|
|
@@ -110,6 +134,43 @@ export declare class WebClient {
|
|
|
110
134
|
* @memberof ScheduleApi
|
|
111
135
|
*/
|
|
112
136
|
executeSchedule(scheduleId: number, executeScheduleRequest?: ExecuteScheduleRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ExecuteSchedule200Response, any>>;
|
|
137
|
+
private readonly testPlanVariableApi;
|
|
138
|
+
/**
|
|
139
|
+
* Create a new variable for the test plan
|
|
140
|
+
* @param {number} testPlanId For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15
|
|
141
|
+
* @param {CreateTestPlanVariableRequest} createTestPlanVariableRequest The new variable key and default value to use in the test plan
|
|
142
|
+
* @param {*} [options] Override http request option.
|
|
143
|
+
* @throws {RequiredError}
|
|
144
|
+
* @memberof TestPlanVariableApi
|
|
145
|
+
*/
|
|
146
|
+
createTestPlanVariable(testPlanId: number, createTestPlanVariableRequest: CreateTestPlanVariableRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<TestPlanVariable, any>>;
|
|
147
|
+
/**
|
|
148
|
+
* Delete an existing test plan variable for the test plan
|
|
149
|
+
* @param {number} testPlanId For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15/
|
|
150
|
+
* @param {number} testPlanVariableId test_plan_variable id
|
|
151
|
+
* @param {*} [options] Override http request option.
|
|
152
|
+
* @throws {RequiredError}
|
|
153
|
+
* @memberof TestPlanVariableApi
|
|
154
|
+
*/
|
|
155
|
+
deleteTestPlanVariable(testPlanId: number, testPlanVariableId: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>;
|
|
156
|
+
/**
|
|
157
|
+
* List the test plan\'s variables
|
|
158
|
+
* @param {number} testPlanId For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15
|
|
159
|
+
* @param {*} [options] Override http request option.
|
|
160
|
+
* @throws {RequiredError}
|
|
161
|
+
* @memberof TestPlanVariableApi
|
|
162
|
+
*/
|
|
163
|
+
listTestPlanVariable(testPlanId: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<TestPlanVariable[], any>>;
|
|
164
|
+
/**
|
|
165
|
+
* Update a url replacement for the test plan
|
|
166
|
+
* @param {number} testPlanId For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15
|
|
167
|
+
* @param {number} testPlanVariableId test_plan_variable id
|
|
168
|
+
* @param {UpdateTestPlanVariableRequest} updateTestPlanVariableRequest The variable\'s new key and/or default_value\'s value to register
|
|
169
|
+
* @param {*} [options] Override http request option.
|
|
170
|
+
* @throws {RequiredError}
|
|
171
|
+
* @memberof TestPlanVariableApi
|
|
172
|
+
*/
|
|
173
|
+
updateTestPlanVariable(testPlanId: number, testPlanVariableId: number, updateTestPlanVariableRequest: UpdateTestPlanVariableRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<TestPlanVariable, any>>;
|
|
113
174
|
private readonly urlReplacementApi;
|
|
114
175
|
/**
|
|
115
176
|
* Create a new url replacement for the test plan
|
|
@@ -38,9 +38,12 @@ class WebClient {
|
|
|
38
38
|
});
|
|
39
39
|
this.autifyConnectApi = new openapi_1.AutifyConnectApi(configuration);
|
|
40
40
|
this.capabilityApi = new openapi_1.CapabilityApi(configuration);
|
|
41
|
+
this.creditApi = new openapi_1.CreditApi(configuration);
|
|
42
|
+
this.projectApi = new openapi_1.ProjectApi(configuration);
|
|
41
43
|
this.resultApi = new openapi_1.ResultApi(configuration);
|
|
42
44
|
this.scenarioApi = new openapi_1.ScenarioApi(configuration);
|
|
43
45
|
this.scheduleApi = new openapi_1.ScheduleApi(configuration);
|
|
46
|
+
this.testPlanVariableApi = new openapi_1.TestPlanVariableApi(configuration);
|
|
44
47
|
this.urlReplacementApi = new openapi_1.UrlReplacementApi(configuration);
|
|
45
48
|
}
|
|
46
49
|
/**
|
|
@@ -89,17 +92,43 @@ class WebClient {
|
|
|
89
92
|
listCapabilities(projectId, os, browser, deviceType, options) {
|
|
90
93
|
return this.capabilityApi.listCapabilities(projectId, os, browser, deviceType, options);
|
|
91
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* Get the number of credits used in the project\\ \\ Notes:\\ This endpoint works only for organizations on credit-based plans. It always returns 0 for `credits_consumed` and `credit_consumption_event_count` if your organization is on a run-based plan.
|
|
97
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/credits
|
|
98
|
+
* @param {string} [dateFrom] The date to start counting used credits from.\\ If not specified, the date will be set to 1 week ago.\\ Up to 90 days in advance can be specified. If the specified date is more than 90 days in the past, the date will be set to 90 days ago.\\ Date must follow the format YYYY-MM-DD (example: \"2023-09-21\").
|
|
99
|
+
* @param {string} [dateTo] The date to end counting used credits from.\\ If not specified, the date will be set to today.\\ Date must follow the format YYYY-MM-DD (example: \"2023-09-28\").
|
|
100
|
+
* @param {number} [scenarioId] The scenario ID to filter used credits by.
|
|
101
|
+
* @param {number} [testPlanId] The test plan ID to filter used credits by.
|
|
102
|
+
* @param {number} [userId] The user ID that executed tests to filter used credits by.
|
|
103
|
+
* @param {*} [options] Override http request option.
|
|
104
|
+
* @throws {RequiredError}
|
|
105
|
+
* @memberof CreditApi
|
|
106
|
+
*/
|
|
107
|
+
getCreditUsage(projectId, dateFrom, dateTo, scenarioId, testPlanId, userId, options) {
|
|
108
|
+
return this.creditApi.getCreditUsage(projectId, dateFrom, dateTo, scenarioId, testPlanId, userId, options);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Get project information.
|
|
112
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/project_info
|
|
113
|
+
* @param {*} [options] Override http request option.
|
|
114
|
+
* @throws {RequiredError}
|
|
115
|
+
* @memberof ProjectApi
|
|
116
|
+
*/
|
|
117
|
+
getProjectInfo(projectId, options) {
|
|
118
|
+
return this.projectApi.getProjectInfo(projectId, options);
|
|
119
|
+
}
|
|
92
120
|
/**
|
|
93
121
|
* Get a test result.
|
|
94
122
|
* @summary Get a test result.
|
|
95
123
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/results/4
|
|
96
124
|
* @param {number} resultId For example, 4 for the following URL: https://app.autify.com/projects/1/results/4
|
|
125
|
+
* @param {boolean} [getDetails] The flag to get details of the test case result.
|
|
97
126
|
* @param {*} [options] Override http request option.
|
|
98
127
|
* @throws {RequiredError}
|
|
99
128
|
* @memberof ResultApi
|
|
100
129
|
*/
|
|
101
|
-
describeResult(projectId, resultId, options) {
|
|
102
|
-
return this.resultApi.describeResult(projectId, resultId, options);
|
|
130
|
+
describeResult(projectId, resultId, getDetails, options) {
|
|
131
|
+
return this.resultApi.describeResult(projectId, resultId, getDetails, options);
|
|
103
132
|
}
|
|
104
133
|
/**
|
|
105
134
|
* List test results.
|
|
@@ -160,6 +189,50 @@ class WebClient {
|
|
|
160
189
|
executeSchedule(scheduleId, executeScheduleRequest, options) {
|
|
161
190
|
return this.scheduleApi.executeSchedule(scheduleId, executeScheduleRequest, options);
|
|
162
191
|
}
|
|
192
|
+
/**
|
|
193
|
+
* Create a new variable for the test plan
|
|
194
|
+
* @param {number} testPlanId For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15
|
|
195
|
+
* @param {CreateTestPlanVariableRequest} createTestPlanVariableRequest The new variable key and default value to use in the test plan
|
|
196
|
+
* @param {*} [options] Override http request option.
|
|
197
|
+
* @throws {RequiredError}
|
|
198
|
+
* @memberof TestPlanVariableApi
|
|
199
|
+
*/
|
|
200
|
+
createTestPlanVariable(testPlanId, createTestPlanVariableRequest, options) {
|
|
201
|
+
return this.testPlanVariableApi.createTestPlanVariable(testPlanId, createTestPlanVariableRequest, options);
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Delete an existing test plan variable for the test plan
|
|
205
|
+
* @param {number} testPlanId For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15/
|
|
206
|
+
* @param {number} testPlanVariableId test_plan_variable id
|
|
207
|
+
* @param {*} [options] Override http request option.
|
|
208
|
+
* @throws {RequiredError}
|
|
209
|
+
* @memberof TestPlanVariableApi
|
|
210
|
+
*/
|
|
211
|
+
deleteTestPlanVariable(testPlanId, testPlanVariableId, options) {
|
|
212
|
+
return this.testPlanVariableApi.deleteTestPlanVariable(testPlanId, testPlanVariableId, options);
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* List the test plan\'s variables
|
|
216
|
+
* @param {number} testPlanId For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15
|
|
217
|
+
* @param {*} [options] Override http request option.
|
|
218
|
+
* @throws {RequiredError}
|
|
219
|
+
* @memberof TestPlanVariableApi
|
|
220
|
+
*/
|
|
221
|
+
listTestPlanVariable(testPlanId, options) {
|
|
222
|
+
return this.testPlanVariableApi.listTestPlanVariable(testPlanId, options);
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Update a url replacement for the test plan
|
|
226
|
+
* @param {number} testPlanId For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15
|
|
227
|
+
* @param {number} testPlanVariableId test_plan_variable id
|
|
228
|
+
* @param {UpdateTestPlanVariableRequest} updateTestPlanVariableRequest The variable\'s new key and/or default_value\'s value to register
|
|
229
|
+
* @param {*} [options] Override http request option.
|
|
230
|
+
* @throws {RequiredError}
|
|
231
|
+
* @memberof TestPlanVariableApi
|
|
232
|
+
*/
|
|
233
|
+
updateTestPlanVariable(testPlanId, testPlanVariableId, updateTestPlanVariableRequest, options) {
|
|
234
|
+
return this.testPlanVariableApi.updateTestPlanVariable(testPlanId, testPlanVariableId, updateTestPlanVariableRequest, options);
|
|
235
|
+
}
|
|
163
236
|
/**
|
|
164
237
|
* Create a new url replacement for the test plan
|
|
165
238
|
* @param {number} testPlanId For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15
|