@autifyhq/autify-sdk 0.1.0 → 0.3.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 { RunTestPlan201Response, RunTestPlanRequest, UploadBuild201Response } from "./openapi";
2
+ import { DescribeTestResult200Response, ListTestResults200Response, RunTestPlan201Response, RunTestPlanRequest, UploadBuild201Response } from "./openapi";
3
3
  export { BASE_PATH as MOBILE_BASE_PATH } from "./openapi/base";
4
4
  declare type Options = Readonly<{
5
5
  basePath?: string;
@@ -30,4 +30,27 @@ export declare class MobileClient {
30
30
  * @memberof TestPlansApi
31
31
  */
32
32
  runTestPlan(testPlanId: string, runTestPlanRequest: RunTestPlanRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<RunTestPlan201Response, any>>;
33
+ private readonly testResultsApi;
34
+ /**
35
+ * Get a test result.
36
+ * @summary Get a test result
37
+ * @param {string} projectId ID of the project from which the test results will be obtained.
38
+ * @param {string} id Test Result ID.
39
+ * @param {*} [options] Override http request option.
40
+ * @throws {RequiredError}
41
+ * @memberof TestResultsApi
42
+ */
43
+ describeTestResult(projectId: string, id: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DescribeTestResult200Response, any>>;
44
+ /**
45
+ * List test results.
46
+ * @summary List test results
47
+ * @param {string} projectId ID of the project from which the list of test results will be retrieved.
48
+ * @param {number} [page] Page number to be retrieved.
49
+ * @param {number} [perPage] Number of test results per page.
50
+ * @param {string} [testPlanId] ID of the test plan.
51
+ * @param {*} [options] Override http request option.
52
+ * @throws {RequiredError}
53
+ * @memberof TestResultsApi
54
+ */
55
+ listTestResults(projectId: string, page?: number, perPage?: number, testPlanId?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListTestResults200Response, any>>;
33
56
  }
@@ -35,6 +35,7 @@ class MobileClient {
35
35
  });
36
36
  this.buildsApi = new openapi_1.BuildsApi(configuration);
37
37
  this.testPlansApi = new openapi_1.TestPlansApi(configuration);
38
+ this.testResultsApi = new openapi_1.TestResultsApi(configuration);
38
39
  }
39
40
  /**
40
41
  * Upload the build file.
@@ -60,5 +61,31 @@ class MobileClient {
60
61
  runTestPlan(testPlanId, runTestPlanRequest, options) {
61
62
  return this.testPlansApi.runTestPlan(testPlanId, runTestPlanRequest, options);
62
63
  }
64
+ /**
65
+ * Get a test result.
66
+ * @summary Get a test result
67
+ * @param {string} projectId ID of the project from which the test results will be obtained.
68
+ * @param {string} id Test Result ID.
69
+ * @param {*} [options] Override http request option.
70
+ * @throws {RequiredError}
71
+ * @memberof TestResultsApi
72
+ */
73
+ describeTestResult(projectId, id, options) {
74
+ return this.testResultsApi.describeTestResult(projectId, id, options);
75
+ }
76
+ /**
77
+ * List test results.
78
+ * @summary List test results
79
+ * @param {string} projectId ID of the project from which the list of test results will be retrieved.
80
+ * @param {number} [page] Page number to be retrieved.
81
+ * @param {number} [perPage] Number of test results per page.
82
+ * @param {string} [testPlanId] ID of the test plan.
83
+ * @param {*} [options] Override http request option.
84
+ * @throws {RequiredError}
85
+ * @memberof TestResultsApi
86
+ */
87
+ listTestResults(projectId, page, perPage, testPlanId, options) {
88
+ return this.testResultsApi.listTestResults(projectId, page, perPage, testPlanId, options);
89
+ }
63
90
  }
64
91
  exports.MobileClient = MobileClient;
@@ -12,6 +12,291 @@
12
12
  import { Configuration } from "./configuration";
13
13
  import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from "axios";
14
14
  import { RequestArgs, BaseAPI } from "./base";
15
+ /**
16
+ *
17
+ * @export
18
+ * @interface DescribeTestResult200Response
19
+ */
20
+ export interface DescribeTestResult200Response {
21
+ /**
22
+ *
23
+ * @type {string}
24
+ * @memberof DescribeTestResult200Response
25
+ */
26
+ id?: string;
27
+ /**
28
+ *
29
+ * @type {string}
30
+ * @memberof DescribeTestResult200Response
31
+ */
32
+ status?: string;
33
+ /**
34
+ *
35
+ * @type {number}
36
+ * @memberof DescribeTestResult200Response
37
+ */
38
+ duration?: number | null;
39
+ /**
40
+ *
41
+ * @type {string}
42
+ * @memberof DescribeTestResult200Response
43
+ */
44
+ started_at?: string | null;
45
+ /**
46
+ *
47
+ * @type {string}
48
+ * @memberof DescribeTestResult200Response
49
+ */
50
+ finished_at?: string | null;
51
+ /**
52
+ *
53
+ * @type {string}
54
+ * @memberof DescribeTestResult200Response
55
+ */
56
+ created_at?: string;
57
+ /**
58
+ *
59
+ * @type {string}
60
+ * @memberof DescribeTestResult200Response
61
+ */
62
+ updated_at?: string;
63
+ /**
64
+ *
65
+ * @type {ListTestResults200ResponseDataInnerTestPlan}
66
+ * @memberof DescribeTestResult200Response
67
+ */
68
+ test_plan?: ListTestResults200ResponseDataInnerTestPlan;
69
+ /**
70
+ *
71
+ * @type {Array<DescribeTestResult200ResponseTestCaseResultsInner>}
72
+ * @memberof DescribeTestResult200Response
73
+ */
74
+ test_case_results?: Array<DescribeTestResult200ResponseTestCaseResultsInner>;
75
+ }
76
+ /**
77
+ *
78
+ * @export
79
+ * @interface DescribeTestResult200ResponseTestCaseResultsInner
80
+ */
81
+ export interface DescribeTestResult200ResponseTestCaseResultsInner {
82
+ /**
83
+ *
84
+ * @type {string}
85
+ * @memberof DescribeTestResult200ResponseTestCaseResultsInner
86
+ */
87
+ id?: string;
88
+ /**
89
+ *
90
+ * @type {string}
91
+ * @memberof DescribeTestResult200ResponseTestCaseResultsInner
92
+ */
93
+ status?: string;
94
+ /**
95
+ *
96
+ * @type {number}
97
+ * @memberof DescribeTestResult200ResponseTestCaseResultsInner
98
+ */
99
+ duration?: number | null;
100
+ /**
101
+ *
102
+ * @type {DescribeTestResult200ResponseTestCaseResultsInnerTestCase}
103
+ * @memberof DescribeTestResult200ResponseTestCaseResultsInner
104
+ */
105
+ test_case?: DescribeTestResult200ResponseTestCaseResultsInnerTestCase;
106
+ }
107
+ /**
108
+ *
109
+ * @export
110
+ * @interface DescribeTestResult200ResponseTestCaseResultsInnerTestCase
111
+ */
112
+ export interface DescribeTestResult200ResponseTestCaseResultsInnerTestCase {
113
+ /**
114
+ *
115
+ * @type {Array<DescribeTestResult200ResponseTestCaseResultsInnerTestCaseEnvironmentVariablesInner>}
116
+ * @memberof DescribeTestResult200ResponseTestCaseResultsInnerTestCase
117
+ */
118
+ environment_variables?: Array<DescribeTestResult200ResponseTestCaseResultsInnerTestCaseEnvironmentVariablesInner>;
119
+ /**
120
+ *
121
+ * @type {DescribeTestResult200ResponseTestCaseResultsInnerTestCaseBuild}
122
+ * @memberof DescribeTestResult200ResponseTestCaseResultsInnerTestCase
123
+ */
124
+ build?: DescribeTestResult200ResponseTestCaseResultsInnerTestCaseBuild;
125
+ /**
126
+ *
127
+ * @type {DescribeTestResult200ResponseTestCaseResultsInnerTestCaseCapability}
128
+ * @memberof DescribeTestResult200ResponseTestCaseResultsInnerTestCase
129
+ */
130
+ capability?: DescribeTestResult200ResponseTestCaseResultsInnerTestCaseCapability;
131
+ }
132
+ /**
133
+ *
134
+ * @export
135
+ * @interface DescribeTestResult200ResponseTestCaseResultsInnerTestCaseBuild
136
+ */
137
+ export interface DescribeTestResult200ResponseTestCaseResultsInnerTestCaseBuild {
138
+ /**
139
+ *
140
+ * @type {string}
141
+ * @memberof DescribeTestResult200ResponseTestCaseResultsInnerTestCaseBuild
142
+ */
143
+ id?: string;
144
+ }
145
+ /**
146
+ *
147
+ * @export
148
+ * @interface DescribeTestResult200ResponseTestCaseResultsInnerTestCaseCapability
149
+ */
150
+ export interface DescribeTestResult200ResponseTestCaseResultsInnerTestCaseCapability {
151
+ /**
152
+ *
153
+ * @type {string}
154
+ * @memberof DescribeTestResult200ResponseTestCaseResultsInnerTestCaseCapability
155
+ */
156
+ os?: string;
157
+ /**
158
+ *
159
+ * @type {string}
160
+ * @memberof DescribeTestResult200ResponseTestCaseResultsInnerTestCaseCapability
161
+ */
162
+ os_version?: string;
163
+ /**
164
+ *
165
+ * @type {string}
166
+ * @memberof DescribeTestResult200ResponseTestCaseResultsInnerTestCaseCapability
167
+ */
168
+ device?: string;
169
+ }
170
+ /**
171
+ *
172
+ * @export
173
+ * @interface DescribeTestResult200ResponseTestCaseResultsInnerTestCaseEnvironmentVariablesInner
174
+ */
175
+ export interface DescribeTestResult200ResponseTestCaseResultsInnerTestCaseEnvironmentVariablesInner {
176
+ /**
177
+ *
178
+ * @type {string}
179
+ * @memberof DescribeTestResult200ResponseTestCaseResultsInnerTestCaseEnvironmentVariablesInner
180
+ */
181
+ key?: string;
182
+ /**
183
+ *
184
+ * @type {string}
185
+ * @memberof DescribeTestResult200ResponseTestCaseResultsInnerTestCaseEnvironmentVariablesInner
186
+ */
187
+ name?: string;
188
+ /**
189
+ *
190
+ * @type {string}
191
+ * @memberof DescribeTestResult200ResponseTestCaseResultsInnerTestCaseEnvironmentVariablesInner
192
+ */
193
+ value?: string;
194
+ }
195
+ /**
196
+ *
197
+ * @export
198
+ * @interface ListTestResults200Response
199
+ */
200
+ export interface ListTestResults200Response {
201
+ /**
202
+ *
203
+ * @type {number}
204
+ * @memberof ListTestResults200Response
205
+ */
206
+ total?: number;
207
+ /**
208
+ *
209
+ * @type {Array<ListTestResults200ResponseDataInner>}
210
+ * @memberof ListTestResults200Response
211
+ */
212
+ data?: Array<ListTestResults200ResponseDataInner>;
213
+ }
214
+ /**
215
+ *
216
+ * @export
217
+ * @interface ListTestResults200ResponseDataInner
218
+ */
219
+ export interface ListTestResults200ResponseDataInner {
220
+ /**
221
+ *
222
+ * @type {string}
223
+ * @memberof ListTestResults200ResponseDataInner
224
+ */
225
+ id?: string;
226
+ /**
227
+ *
228
+ * @type {string}
229
+ * @memberof ListTestResults200ResponseDataInner
230
+ */
231
+ status?: string;
232
+ /**
233
+ *
234
+ * @type {number}
235
+ * @memberof ListTestResults200ResponseDataInner
236
+ */
237
+ duration?: number | null;
238
+ /**
239
+ *
240
+ * @type {string}
241
+ * @memberof ListTestResults200ResponseDataInner
242
+ */
243
+ started_at?: string | null;
244
+ /**
245
+ *
246
+ * @type {string}
247
+ * @memberof ListTestResults200ResponseDataInner
248
+ */
249
+ finished_at?: string | null;
250
+ /**
251
+ *
252
+ * @type {string}
253
+ * @memberof ListTestResults200ResponseDataInner
254
+ */
255
+ created_at?: string;
256
+ /**
257
+ *
258
+ * @type {string}
259
+ * @memberof ListTestResults200ResponseDataInner
260
+ */
261
+ updated_at?: string;
262
+ /**
263
+ *
264
+ * @type {ListTestResults200ResponseDataInnerTestPlan}
265
+ * @memberof ListTestResults200ResponseDataInner
266
+ */
267
+ test_plan?: ListTestResults200ResponseDataInnerTestPlan;
268
+ }
269
+ /**
270
+ *
271
+ * @export
272
+ * @interface ListTestResults200ResponseDataInnerTestPlan
273
+ */
274
+ export interface ListTestResults200ResponseDataInnerTestPlan {
275
+ /**
276
+ *
277
+ * @type {string}
278
+ * @memberof ListTestResults200ResponseDataInnerTestPlan
279
+ */
280
+ id?: string;
281
+ /**
282
+ *
283
+ * @type {string}
284
+ * @memberof ListTestResults200ResponseDataInnerTestPlan
285
+ */
286
+ name?: string;
287
+ /**
288
+ *
289
+ * @type {string}
290
+ * @memberof ListTestResults200ResponseDataInnerTestPlan
291
+ */
292
+ created_at?: string;
293
+ /**
294
+ *
295
+ * @type {string}
296
+ * @memberof ListTestResults200ResponseDataInnerTestPlan
297
+ */
298
+ updated_at?: string;
299
+ }
15
300
  /**
16
301
  *
17
302
  * @export
@@ -314,3 +599,111 @@ export declare class TestPlansApi extends BaseAPI {
314
599
  */
315
600
  runTestPlan(testPlanId: string, runTestPlanRequest: RunTestPlanRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<RunTestPlan201Response, any>>;
316
601
  }
602
+ /**
603
+ * TestResultsApi - axios parameter creator
604
+ * @export
605
+ */
606
+ export declare const TestResultsApiAxiosParamCreator: (configuration?: Configuration) => {
607
+ /**
608
+ * Get a test result.
609
+ * @summary Get a test result
610
+ * @param {string} projectId ID of the project from which the test results will be obtained.
611
+ * @param {string} id Test Result ID.
612
+ * @param {*} [options] Override http request option.
613
+ * @throws {RequiredError}
614
+ */
615
+ describeTestResult: (projectId: string, id: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
616
+ /**
617
+ * List test results.
618
+ * @summary List test results
619
+ * @param {string} projectId ID of the project from which the list of test results will be retrieved.
620
+ * @param {number} [page] Page number to be retrieved.
621
+ * @param {number} [perPage] Number of test results per page.
622
+ * @param {string} [testPlanId] ID of the test plan.
623
+ * @param {*} [options] Override http request option.
624
+ * @throws {RequiredError}
625
+ */
626
+ listTestResults: (projectId: string, page?: number, perPage?: number, testPlanId?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
627
+ };
628
+ /**
629
+ * TestResultsApi - functional programming interface
630
+ * @export
631
+ */
632
+ export declare const TestResultsApiFp: (configuration?: Configuration) => {
633
+ /**
634
+ * Get a test result.
635
+ * @summary Get a test result
636
+ * @param {string} projectId ID of the project from which the test results will be obtained.
637
+ * @param {string} id Test Result ID.
638
+ * @param {*} [options] Override http request option.
639
+ * @throws {RequiredError}
640
+ */
641
+ describeTestResult(projectId: string, id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DescribeTestResult200Response>>;
642
+ /**
643
+ * List test results.
644
+ * @summary List test results
645
+ * @param {string} projectId ID of the project from which the list of test results will be retrieved.
646
+ * @param {number} [page] Page number to be retrieved.
647
+ * @param {number} [perPage] Number of test results per page.
648
+ * @param {string} [testPlanId] ID of the test plan.
649
+ * @param {*} [options] Override http request option.
650
+ * @throws {RequiredError}
651
+ */
652
+ listTestResults(projectId: string, page?: number, perPage?: number, testPlanId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListTestResults200Response>>;
653
+ };
654
+ /**
655
+ * TestResultsApi - factory interface
656
+ * @export
657
+ */
658
+ export declare const TestResultsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
659
+ /**
660
+ * Get a test result.
661
+ * @summary Get a test result
662
+ * @param {string} projectId ID of the project from which the test results will be obtained.
663
+ * @param {string} id Test Result ID.
664
+ * @param {*} [options] Override http request option.
665
+ * @throws {RequiredError}
666
+ */
667
+ describeTestResult(projectId: string, id: string, options?: any): AxiosPromise<DescribeTestResult200Response>;
668
+ /**
669
+ * List test results.
670
+ * @summary List test results
671
+ * @param {string} projectId ID of the project from which the list of test results will be retrieved.
672
+ * @param {number} [page] Page number to be retrieved.
673
+ * @param {number} [perPage] Number of test results per page.
674
+ * @param {string} [testPlanId] ID of the test plan.
675
+ * @param {*} [options] Override http request option.
676
+ * @throws {RequiredError}
677
+ */
678
+ listTestResults(projectId: string, page?: number, perPage?: number, testPlanId?: string, options?: any): AxiosPromise<ListTestResults200Response>;
679
+ };
680
+ /**
681
+ * TestResultsApi - object-oriented interface
682
+ * @export
683
+ * @class TestResultsApi
684
+ * @extends {BaseAPI}
685
+ */
686
+ export declare class TestResultsApi extends BaseAPI {
687
+ /**
688
+ * Get a test result.
689
+ * @summary Get a test result
690
+ * @param {string} projectId ID of the project from which the test results will be obtained.
691
+ * @param {string} id Test Result ID.
692
+ * @param {*} [options] Override http request option.
693
+ * @throws {RequiredError}
694
+ * @memberof TestResultsApi
695
+ */
696
+ describeTestResult(projectId: string, id: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DescribeTestResult200Response, any>>;
697
+ /**
698
+ * List test results.
699
+ * @summary List test results
700
+ * @param {string} projectId ID of the project from which the list of test results will be retrieved.
701
+ * @param {number} [page] Page number to be retrieved.
702
+ * @param {number} [perPage] Number of test results per page.
703
+ * @param {string} [testPlanId] ID of the test plan.
704
+ * @param {*} [options] Override http request option.
705
+ * @throws {RequiredError}
706
+ * @memberof TestResultsApi
707
+ */
708
+ listTestResults(projectId: string, page?: number, perPage?: number, testPlanId?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListTestResults200Response, any>>;
709
+ }
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.TestPlansApi = exports.TestPlansApiFactory = exports.TestPlansApiFp = exports.TestPlansApiAxiosParamCreator = exports.BuildsApi = exports.BuildsApiFactory = exports.BuildsApiFp = exports.BuildsApiAxiosParamCreator = void 0;
16
+ exports.TestResultsApi = exports.TestResultsApiFactory = exports.TestResultsApiFp = exports.TestResultsApiAxiosParamCreator = exports.TestPlansApi = exports.TestPlansApiFactory = exports.TestPlansApiFp = exports.TestPlansApiAxiosParamCreator = exports.BuildsApi = exports.BuildsApiFactory = exports.BuildsApiFp = exports.BuildsApiAxiosParamCreator = void 0;
17
17
  const tslib_1 = require("tslib");
18
18
  const axios_1 = tslib_1.__importDefault(require("axios"));
19
19
  // URLSearchParams not necessarily used
@@ -275,3 +275,220 @@ class TestPlansApi extends base_1.BaseAPI {
275
275
  }
276
276
  }
277
277
  exports.TestPlansApi = TestPlansApi;
278
+ /**
279
+ * TestResultsApi - axios parameter creator
280
+ * @export
281
+ */
282
+ const TestResultsApiAxiosParamCreator = function (configuration) {
283
+ return {
284
+ /**
285
+ * Get a test result.
286
+ * @summary Get a test result
287
+ * @param {string} projectId ID of the project from which the test results will be obtained.
288
+ * @param {string} id Test Result ID.
289
+ * @param {*} [options] Override http request option.
290
+ * @throws {RequiredError}
291
+ */
292
+ describeTestResult: async (projectId, id, options = {}) => {
293
+ // verify required parameter 'projectId' is not null or undefined
294
+ (0, common_1.assertParamExists)("describeTestResult", "projectId", projectId);
295
+ // verify required parameter 'id' is not null or undefined
296
+ (0, common_1.assertParamExists)("describeTestResult", "id", id);
297
+ const localVarPath = `/projects/{project_id}/results/{id}`
298
+ .replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
299
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
300
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
301
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
302
+ let baseOptions;
303
+ if (configuration) {
304
+ baseOptions = configuration.baseOptions;
305
+ }
306
+ const localVarRequestOptions = {
307
+ method: "GET",
308
+ ...baseOptions,
309
+ ...options,
310
+ };
311
+ const localVarHeaderParameter = {};
312
+ const localVarQueryParameter = {};
313
+ // authentication bearerAuth required
314
+ // http bearer authentication required
315
+ await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
316
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
317
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
318
+ localVarRequestOptions.headers = {
319
+ ...localVarHeaderParameter,
320
+ ...headersFromBaseOptions,
321
+ ...options.headers,
322
+ };
323
+ return {
324
+ url: (0, common_1.toPathString)(localVarUrlObj),
325
+ options: localVarRequestOptions,
326
+ };
327
+ },
328
+ /**
329
+ * List test results.
330
+ * @summary List test results
331
+ * @param {string} projectId ID of the project from which the list of test results will be retrieved.
332
+ * @param {number} [page] Page number to be retrieved.
333
+ * @param {number} [perPage] Number of test results per page.
334
+ * @param {string} [testPlanId] ID of the test plan.
335
+ * @param {*} [options] Override http request option.
336
+ * @throws {RequiredError}
337
+ */
338
+ listTestResults: async (projectId, page, perPage, testPlanId, options = {}) => {
339
+ // verify required parameter 'projectId' is not null or undefined
340
+ (0, common_1.assertParamExists)("listTestResults", "projectId", projectId);
341
+ const localVarPath = `/projects/{project_id}/results`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
342
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
343
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
344
+ let baseOptions;
345
+ if (configuration) {
346
+ baseOptions = configuration.baseOptions;
347
+ }
348
+ const localVarRequestOptions = {
349
+ method: "GET",
350
+ ...baseOptions,
351
+ ...options,
352
+ };
353
+ const localVarHeaderParameter = {};
354
+ const localVarQueryParameter = {};
355
+ // authentication bearerAuth required
356
+ // http bearer authentication required
357
+ await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
358
+ if (page !== undefined) {
359
+ localVarQueryParameter["page"] = page;
360
+ }
361
+ if (perPage !== undefined) {
362
+ localVarQueryParameter["per_page"] = perPage;
363
+ }
364
+ if (testPlanId !== undefined) {
365
+ localVarQueryParameter["test_plan_id"] = testPlanId;
366
+ }
367
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
368
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
369
+ localVarRequestOptions.headers = {
370
+ ...localVarHeaderParameter,
371
+ ...headersFromBaseOptions,
372
+ ...options.headers,
373
+ };
374
+ return {
375
+ url: (0, common_1.toPathString)(localVarUrlObj),
376
+ options: localVarRequestOptions,
377
+ };
378
+ },
379
+ };
380
+ };
381
+ exports.TestResultsApiAxiosParamCreator = TestResultsApiAxiosParamCreator;
382
+ /**
383
+ * TestResultsApi - functional programming interface
384
+ * @export
385
+ */
386
+ const TestResultsApiFp = function (configuration) {
387
+ const localVarAxiosParamCreator = (0, exports.TestResultsApiAxiosParamCreator)(configuration);
388
+ return {
389
+ /**
390
+ * Get a test result.
391
+ * @summary Get a test result
392
+ * @param {string} projectId ID of the project from which the test results will be obtained.
393
+ * @param {string} id Test Result ID.
394
+ * @param {*} [options] Override http request option.
395
+ * @throws {RequiredError}
396
+ */
397
+ async describeTestResult(projectId, id, options) {
398
+ const localVarAxiosArgs = await localVarAxiosParamCreator.describeTestResult(projectId, id, options);
399
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
400
+ },
401
+ /**
402
+ * List test results.
403
+ * @summary List test results
404
+ * @param {string} projectId ID of the project from which the list of test results will be retrieved.
405
+ * @param {number} [page] Page number to be retrieved.
406
+ * @param {number} [perPage] Number of test results per page.
407
+ * @param {string} [testPlanId] ID of the test plan.
408
+ * @param {*} [options] Override http request option.
409
+ * @throws {RequiredError}
410
+ */
411
+ async listTestResults(projectId, page, perPage, testPlanId, options) {
412
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listTestResults(projectId, page, perPage, testPlanId, options);
413
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
414
+ },
415
+ };
416
+ };
417
+ exports.TestResultsApiFp = TestResultsApiFp;
418
+ /**
419
+ * TestResultsApi - factory interface
420
+ * @export
421
+ */
422
+ const TestResultsApiFactory = function (configuration, basePath, axios) {
423
+ const localVarFp = (0, exports.TestResultsApiFp)(configuration);
424
+ return {
425
+ /**
426
+ * Get a test result.
427
+ * @summary Get a test result
428
+ * @param {string} projectId ID of the project from which the test results will be obtained.
429
+ * @param {string} id Test Result ID.
430
+ * @param {*} [options] Override http request option.
431
+ * @throws {RequiredError}
432
+ */
433
+ describeTestResult(projectId, id, options) {
434
+ return localVarFp
435
+ .describeTestResult(projectId, id, options)
436
+ .then((request) => request(axios, basePath));
437
+ },
438
+ /**
439
+ * List test results.
440
+ * @summary List test results
441
+ * @param {string} projectId ID of the project from which the list of test results will be retrieved.
442
+ * @param {number} [page] Page number to be retrieved.
443
+ * @param {number} [perPage] Number of test results per page.
444
+ * @param {string} [testPlanId] ID of the test plan.
445
+ * @param {*} [options] Override http request option.
446
+ * @throws {RequiredError}
447
+ */
448
+ listTestResults(projectId, page, perPage, testPlanId, options) {
449
+ return localVarFp
450
+ .listTestResults(projectId, page, perPage, testPlanId, options)
451
+ .then((request) => request(axios, basePath));
452
+ },
453
+ };
454
+ };
455
+ exports.TestResultsApiFactory = TestResultsApiFactory;
456
+ /**
457
+ * TestResultsApi - object-oriented interface
458
+ * @export
459
+ * @class TestResultsApi
460
+ * @extends {BaseAPI}
461
+ */
462
+ class TestResultsApi extends base_1.BaseAPI {
463
+ /**
464
+ * Get a test result.
465
+ * @summary Get a test result
466
+ * @param {string} projectId ID of the project from which the test results will be obtained.
467
+ * @param {string} id Test Result ID.
468
+ * @param {*} [options] Override http request option.
469
+ * @throws {RequiredError}
470
+ * @memberof TestResultsApi
471
+ */
472
+ describeTestResult(projectId, id, options) {
473
+ return (0, exports.TestResultsApiFp)(this.configuration)
474
+ .describeTestResult(projectId, id, options)
475
+ .then((request) => request(this.axios, this.basePath));
476
+ }
477
+ /**
478
+ * List test results.
479
+ * @summary List test results
480
+ * @param {string} projectId ID of the project from which the list of test results will be retrieved.
481
+ * @param {number} [page] Page number to be retrieved.
482
+ * @param {number} [perPage] Number of test results per page.
483
+ * @param {string} [testPlanId] ID of the test plan.
484
+ * @param {*} [options] Override http request option.
485
+ * @throws {RequiredError}
486
+ * @memberof TestResultsApi
487
+ */
488
+ listTestResults(projectId, page, perPage, testPlanId, options) {
489
+ return (0, exports.TestResultsApiFp)(this.configuration)
490
+ .listTestResults(projectId, page, perPage, testPlanId, options)
491
+ .then((request) => request(this.axios, this.basePath));
492
+ }
493
+ }
494
+ exports.TestResultsApi = TestResultsApi;
@@ -1,5 +1,5 @@
1
1
  import { AxiosRequestConfig } from "axios";
2
- import { CapabilityOption, CreateUrlReplacementRequest, DescribeResult200Response, ExecuteScenariosRequest, ExecuteScenariosResult, ExecuteSchedule200Response, Story, TestPlanResult, UpdateUrlReplacementRequest, UrlReplacement } from "./openapi";
2
+ import { CapabilityOption, CreateUrlReplacementRequest, DescribeResult200Response, ExecuteScenariosRequest, ExecuteScenariosResult, ExecuteSchedule200Response, Scenario, TestPlanResult, UpdateUrlReplacementRequest, UrlReplacement } from "./openapi";
3
3
  export { BASE_PATH as WEB_BASE_PATH } from "./openapi/base";
4
4
  declare type Options = Readonly<{
5
5
  basePath?: string;
@@ -50,7 +50,7 @@ export declare class WebClient {
50
50
  * @throws {RequiredError}
51
51
  * @memberof ScenarioApi
52
52
  */
53
- describeScenario(projectId: number, scenarioId: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Story, any>>;
53
+ describeScenario(projectId: number, scenarioId: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Scenario, any>>;
54
54
  /**
55
55
  * You can execute any scenarios in your workspace using any execution environments (which is called \"capabilities\" here).
56
56
  * @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
@@ -68,7 +68,7 @@ export declare class WebClient {
68
68
  * @throws {RequiredError}
69
69
  * @memberof ScenarioApi
70
70
  */
71
- listScenarios(projectId: number, page?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Story[], any>>;
71
+ listScenarios(projectId: number, page?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Scenario[], any>>;
72
72
  private readonly scheduleApi;
73
73
  /**
74
74
  * Run a test plan. (Note: \"Schedule\" is called as \"TestPlan\" now.)
@@ -209,6 +209,7 @@ export declare const DescribeResult200ResponseStatusEnum: {
209
209
  readonly Passed: "passed";
210
210
  readonly Failed: "failed";
211
211
  readonly Skipped: "skipped";
212
+ readonly InternalError: "internal_error";
212
213
  };
213
214
  export declare type DescribeResult200ResponseStatusEnum = typeof DescribeResult200ResponseStatusEnum[keyof typeof DescribeResult200ResponseStatusEnum];
214
215
  /**
@@ -367,12 +368,31 @@ export interface ExecuteScenariosRequest {
367
368
  * @memberof ExecuteScenariosRequest
368
369
  */
369
370
  scenarios: Array<ExecuteScenariosRequestScenariosInner>;
371
+ /**
372
+ *
373
+ * @type {ExecuteScenariosRequestAutifyConnect}
374
+ * @memberof ExecuteScenariosRequest
375
+ */
376
+ autify_connect?: ExecuteScenariosRequestAutifyConnect;
370
377
  }
371
378
  export declare const ExecuteScenariosRequestExecutionTypeEnum: {
372
379
  readonly Parallel: "parallel";
373
380
  readonly Sequential: "sequential";
374
381
  };
375
382
  export declare type ExecuteScenariosRequestExecutionTypeEnum = typeof ExecuteScenariosRequestExecutionTypeEnum[keyof typeof ExecuteScenariosRequestExecutionTypeEnum];
383
+ /**
384
+ *
385
+ * @export
386
+ * @interface ExecuteScenariosRequestAutifyConnect
387
+ */
388
+ export interface ExecuteScenariosRequestAutifyConnect {
389
+ /**
390
+ *
391
+ * @type {string}
392
+ * @memberof ExecuteScenariosRequestAutifyConnect
393
+ */
394
+ name: string;
395
+ }
376
396
  /**
377
397
  *
378
398
  * @export
@@ -585,37 +605,37 @@ export interface Label {
585
605
  /**
586
606
  *
587
607
  * @export
588
- * @interface Story
608
+ * @interface Scenario
589
609
  */
590
- export interface Story {
610
+ export interface Scenario {
591
611
  /**
592
612
  *
593
613
  * @type {number}
594
- * @memberof Story
614
+ * @memberof Scenario
595
615
  */
596
616
  id?: number;
597
617
  /**
598
618
  *
599
619
  * @type {string}
600
- * @memberof Story
620
+ * @memberof Scenario
601
621
  */
602
622
  name?: string;
603
623
  /**
604
624
  *
605
625
  * @type {string}
606
- * @memberof Story
626
+ * @memberof Scenario
607
627
  */
608
628
  created_at?: string;
609
629
  /**
610
630
  *
611
631
  * @type {string}
612
- * @memberof Story
632
+ * @memberof Scenario
613
633
  */
614
634
  updated_at?: string;
615
635
  /**
616
636
  *
617
637
  * @type {Array<Label>}
618
- * @memberof Story
638
+ * @memberof Scenario
619
639
  */
620
640
  labels?: Array<Label>;
621
641
  }
@@ -692,6 +712,7 @@ export declare const TestCaseResultStatusEnum: {
692
712
  readonly Passed: "passed";
693
713
  readonly Failed: "failed";
694
714
  readonly Skipped: "skipped";
715
+ readonly InternalError: "internal_error";
695
716
  };
696
717
  export declare type TestCaseResultStatusEnum = typeof TestCaseResultStatusEnum[keyof typeof TestCaseResultStatusEnum];
697
718
  /**
@@ -768,6 +789,7 @@ export declare const TestPlanCapabilityResultStatusEnum: {
768
789
  readonly Passed: "passed";
769
790
  readonly Failed: "failed";
770
791
  readonly Skipped: "skipped";
792
+ readonly InternalError: "internal_error";
771
793
  };
772
794
  export declare type TestPlanCapabilityResultStatusEnum = typeof TestPlanCapabilityResultStatusEnum[keyof typeof TestPlanCapabilityResultStatusEnum];
773
795
  /**
@@ -831,6 +853,7 @@ export declare const TestPlanResultStatusEnum: {
831
853
  readonly Passed: "passed";
832
854
  readonly Failed: "failed";
833
855
  readonly Skipped: "skipped";
856
+ readonly InternalError: "internal_error";
834
857
  };
835
858
  export declare type TestPlanResultStatusEnum = typeof TestPlanResultStatusEnum[keyof typeof TestPlanResultStatusEnum];
836
859
  /**
@@ -1104,7 +1127,7 @@ export declare const ScenarioApiFp: (configuration?: Configuration) => {
1104
1127
  * @param {*} [options] Override http request option.
1105
1128
  * @throws {RequiredError}
1106
1129
  */
1107
- describeScenario(projectId: number, scenarioId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Story>>;
1130
+ describeScenario(projectId: number, scenarioId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Scenario>>;
1108
1131
  /**
1109
1132
  * You can execute any scenarios in your workspace using any execution environments (which is called \"capabilities\" here).
1110
1133
  * @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
@@ -1120,7 +1143,7 @@ export declare const ScenarioApiFp: (configuration?: Configuration) => {
1120
1143
  * @param {*} [options] Override http request option.
1121
1144
  * @throws {RequiredError}
1122
1145
  */
1123
- listScenarios(projectId: number, page?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Story>>>;
1146
+ listScenarios(projectId: number, page?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Scenario>>>;
1124
1147
  };
1125
1148
  /**
1126
1149
  * ScenarioApi - factory interface
@@ -1134,7 +1157,7 @@ export declare const ScenarioApiFactory: (configuration?: Configuration, basePat
1134
1157
  * @param {*} [options] Override http request option.
1135
1158
  * @throws {RequiredError}
1136
1159
  */
1137
- describeScenario(projectId: number, scenarioId: number, options?: any): AxiosPromise<Story>;
1160
+ describeScenario(projectId: number, scenarioId: number, options?: any): AxiosPromise<Scenario>;
1138
1161
  /**
1139
1162
  * You can execute any scenarios in your workspace using any execution environments (which is called \"capabilities\" here).
1140
1163
  * @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
@@ -1150,7 +1173,7 @@ export declare const ScenarioApiFactory: (configuration?: Configuration, basePat
1150
1173
  * @param {*} [options] Override http request option.
1151
1174
  * @throws {RequiredError}
1152
1175
  */
1153
- listScenarios(projectId: number, page?: number, options?: any): AxiosPromise<Array<Story>>;
1176
+ listScenarios(projectId: number, page?: number, options?: any): AxiosPromise<Array<Scenario>>;
1154
1177
  };
1155
1178
  /**
1156
1179
  * ScenarioApi - object-oriented interface
@@ -1167,7 +1190,7 @@ export declare class ScenarioApi extends BaseAPI {
1167
1190
  * @throws {RequiredError}
1168
1191
  * @memberof ScenarioApi
1169
1192
  */
1170
- describeScenario(projectId: number, scenarioId: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Story, any>>;
1193
+ describeScenario(projectId: number, scenarioId: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Scenario, any>>;
1171
1194
  /**
1172
1195
  * You can execute any scenarios in your workspace using any execution environments (which is called \"capabilities\" here).
1173
1196
  * @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
@@ -1185,7 +1208,7 @@ export declare class ScenarioApi extends BaseAPI {
1185
1208
  * @throws {RequiredError}
1186
1209
  * @memberof ScenarioApi
1187
1210
  */
1188
- listScenarios(projectId: number, page?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Story[], any>>;
1211
+ listScenarios(projectId: number, page?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Scenario[], any>>;
1189
1212
  }
1190
1213
  /**
1191
1214
  * ScheduleApi - axios parameter creator
@@ -31,6 +31,7 @@ exports.DescribeResult200ResponseStatusEnum = {
31
31
  Passed: "passed",
32
32
  Failed: "failed",
33
33
  Skipped: "skipped",
34
+ InternalError: "internal_error",
34
35
  };
35
36
  exports.ExecuteScenariosRequestExecutionTypeEnum = {
36
37
  Parallel: "parallel",
@@ -42,6 +43,7 @@ exports.TestCaseResultStatusEnum = {
42
43
  Passed: "passed",
43
44
  Failed: "failed",
44
45
  Skipped: "skipped",
46
+ InternalError: "internal_error",
45
47
  };
46
48
  exports.TestPlanCapabilityResultStatusEnum = {
47
49
  Waiting: "waiting",
@@ -49,6 +51,7 @@ exports.TestPlanCapabilityResultStatusEnum = {
49
51
  Passed: "passed",
50
52
  Failed: "failed",
51
53
  Skipped: "skipped",
54
+ InternalError: "internal_error",
52
55
  };
53
56
  exports.TestPlanResultStatusEnum = {
54
57
  Waiting: "waiting",
@@ -56,6 +59,7 @@ exports.TestPlanResultStatusEnum = {
56
59
  Passed: "passed",
57
60
  Failed: "failed",
58
61
  Skipped: "skipped",
62
+ InternalError: "internal_error",
59
63
  };
60
64
  /**
61
65
  * CapabilityApi - axios parameter creator
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autifyhq/autify-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Autify SDK for JavaScript",
5
5
  "author": "Autify",
6
6
  "homepage": "https://github.com/autifyhq/autify-sdk-js",