@autifyhq/autify-sdk 0.1.1 → 0.4.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/dist/generated/mobile/client.d.ts +24 -1
- package/dist/generated/mobile/client.js +27 -0
- package/dist/generated/mobile/openapi/api.d.ts +393 -0
- package/dist/generated/mobile/openapi/api.js +218 -1
- package/dist/generated/web/client.d.ts +22 -3
- package/dist/generated/web/client.js +23 -0
- package/dist/generated/web/openapi/api.d.ts +261 -13
- package/dist/generated/web/openapi/api.js +201 -1
- package/package.json +2 -2
|
@@ -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,
|
|
2
|
+
import { CapabilityOption, CreateAccessPointRequest, CreateAccessPointResult, CreateUrlReplacementRequest, DeleteAccessPointRequest, 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;
|
|
@@ -8,6 +8,25 @@ declare type Options = Readonly<{
|
|
|
8
8
|
export declare class WebClient {
|
|
9
9
|
readonly version: string;
|
|
10
10
|
constructor(accessToken: string, { basePath, userAgent }?: Options);
|
|
11
|
+
private readonly autifyConnectApi;
|
|
12
|
+
/**
|
|
13
|
+
* You can generate a new access point by passing in its name.
|
|
14
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
15
|
+
* @param {CreateAccessPointRequest} createAccessPointRequest The name of the access point to be created
|
|
16
|
+
* @param {*} [options] Override http request option.
|
|
17
|
+
* @throws {RequiredError}
|
|
18
|
+
* @memberof AutifyConnectApi
|
|
19
|
+
*/
|
|
20
|
+
createAccessPoint(projectId: number, createAccessPointRequest: CreateAccessPointRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateAccessPointResult, any>>;
|
|
21
|
+
/**
|
|
22
|
+
* You can delete an access point by passing in its name.
|
|
23
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
24
|
+
* @param {DeleteAccessPointRequest} deleteAccessPointRequest The name of the access point to be deleted
|
|
25
|
+
* @param {*} [options] Override http request option.
|
|
26
|
+
* @throws {RequiredError}
|
|
27
|
+
* @memberof AutifyConnectApi
|
|
28
|
+
*/
|
|
29
|
+
deleteAccessPoint(projectId: number, deleteAccessPointRequest: DeleteAccessPointRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
|
|
11
30
|
private readonly capabilityApi;
|
|
12
31
|
/**
|
|
13
32
|
* List available Capabilities.
|
|
@@ -50,7 +69,7 @@ export declare class WebClient {
|
|
|
50
69
|
* @throws {RequiredError}
|
|
51
70
|
* @memberof ScenarioApi
|
|
52
71
|
*/
|
|
53
|
-
describeScenario(projectId: number, scenarioId: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<
|
|
72
|
+
describeScenario(projectId: number, scenarioId: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Scenario, any>>;
|
|
54
73
|
/**
|
|
55
74
|
* You can execute any scenarios in your workspace using any execution environments (which is called \"capabilities\" here).
|
|
56
75
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
@@ -68,7 +87,7 @@ export declare class WebClient {
|
|
|
68
87
|
* @throws {RequiredError}
|
|
69
88
|
* @memberof ScenarioApi
|
|
70
89
|
*/
|
|
71
|
-
listScenarios(projectId: number, page?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<
|
|
90
|
+
listScenarios(projectId: number, page?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Scenario[], any>>;
|
|
72
91
|
private readonly scheduleApi;
|
|
73
92
|
/**
|
|
74
93
|
* Run a test plan. (Note: \"Schedule\" is called as \"TestPlan\" now.)
|
|
@@ -33,12 +33,35 @@ class WebClient {
|
|
|
33
33
|
formDataCtor: CustomFormData,
|
|
34
34
|
baseOptions,
|
|
35
35
|
});
|
|
36
|
+
this.autifyConnectApi = new openapi_1.AutifyConnectApi(configuration);
|
|
36
37
|
this.capabilityApi = new openapi_1.CapabilityApi(configuration);
|
|
37
38
|
this.resultApi = new openapi_1.ResultApi(configuration);
|
|
38
39
|
this.scenarioApi = new openapi_1.ScenarioApi(configuration);
|
|
39
40
|
this.scheduleApi = new openapi_1.ScheduleApi(configuration);
|
|
40
41
|
this.urlReplacementApi = new openapi_1.UrlReplacementApi(configuration);
|
|
41
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* You can generate a new access point by passing in its name.
|
|
45
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
46
|
+
* @param {CreateAccessPointRequest} createAccessPointRequest The name of the access point to be created
|
|
47
|
+
* @param {*} [options] Override http request option.
|
|
48
|
+
* @throws {RequiredError}
|
|
49
|
+
* @memberof AutifyConnectApi
|
|
50
|
+
*/
|
|
51
|
+
createAccessPoint(projectId, createAccessPointRequest, options) {
|
|
52
|
+
return this.autifyConnectApi.createAccessPoint(projectId, createAccessPointRequest, options);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* You can delete an access point by passing in its name.
|
|
56
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
57
|
+
* @param {DeleteAccessPointRequest} deleteAccessPointRequest The name of the access point to be deleted
|
|
58
|
+
* @param {*} [options] Override http request option.
|
|
59
|
+
* @throws {RequiredError}
|
|
60
|
+
* @memberof AutifyConnectApi
|
|
61
|
+
*/
|
|
62
|
+
deleteAccessPoint(projectId, deleteAccessPointRequest, options) {
|
|
63
|
+
return this.autifyConnectApi.deleteAccessPoint(projectId, deleteAccessPointRequest, options);
|
|
64
|
+
}
|
|
42
65
|
/**
|
|
43
66
|
* List available Capabilities.
|
|
44
67
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/capabilities
|