From 8488ea738ea6b28849ee2d208fc9c8ddc7896ecf Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Wed, 9 Oct 2024 01:36:03 +0000 Subject: [PATCH] feat(firebaseappdistribution): update the API #### firebaseappdistribution:v1alpha The following keys were added: - resources.projects.resources.apps.resources.releases.resources.tests.methods.cancel.description - resources.projects.resources.apps.resources.releases.resources.tests.methods.cancel.flatPath - resources.projects.resources.apps.resources.releases.resources.tests.methods.cancel.httpMethod - resources.projects.resources.apps.resources.releases.resources.tests.methods.cancel.id - resources.projects.resources.apps.resources.releases.resources.tests.methods.cancel.parameterOrder - resources.projects.resources.apps.resources.releases.resources.tests.methods.cancel.parameters.name.description - resources.projects.resources.apps.resources.releases.resources.tests.methods.cancel.parameters.name.location - resources.projects.resources.apps.resources.releases.resources.tests.methods.cancel.parameters.name.pattern - resources.projects.resources.apps.resources.releases.resources.tests.methods.cancel.parameters.name.required - resources.projects.resources.apps.resources.releases.resources.tests.methods.cancel.parameters.name.type - resources.projects.resources.apps.resources.releases.resources.tests.methods.cancel.path - resources.projects.resources.apps.resources.releases.resources.tests.methods.cancel.response.$ref - resources.projects.resources.apps.resources.releases.resources.tests.methods.cancel.scopes - schemas.GoogleFirebaseAppdistroV1alphaCancelReleaseTestResponse.description - schemas.GoogleFirebaseAppdistroV1alphaCancelReleaseTestResponse.id - schemas.GoogleFirebaseAppdistroV1alphaCancelReleaseTestResponse.type - schemas.GoogleFirebaseAppdistroV1alphaReleaseTest.properties.testState.description - schemas.GoogleFirebaseAppdistroV1alphaReleaseTest.properties.testState.enum - schemas.GoogleFirebaseAppdistroV1alphaReleaseTest.properties.testState.enumDescriptions - schemas.GoogleFirebaseAppdistroV1alphaReleaseTest.properties.testState.readOnly - schemas.GoogleFirebaseAppdistroV1alphaReleaseTest.properties.testState.type The following keys were changed: - resources.projects.resources.apps.resources.releases.resources.tests.methods.create.parameters.releaseTestId.description - schemas.GoogleFirebaseAppdistroV1alphaDeviceExecution.properties.failedReason.enum - schemas.GoogleFirebaseAppdistroV1alphaDeviceExecution.properties.failedReason.enumDescriptions --- .../firebaseappdistribution-v1alpha.json | 60 ++++++++- src/apis/firebaseappdistribution/v1alpha.ts | 115 +++++++++++++++++- 2 files changed, 170 insertions(+), 5 deletions(-) diff --git a/discovery/firebaseappdistribution-v1alpha.json b/discovery/firebaseappdistribution-v1alpha.json index daaa28613f..2b53fa39bb 100644 --- a/discovery/firebaseappdistribution-v1alpha.json +++ b/discovery/firebaseappdistribution-v1alpha.json @@ -448,6 +448,31 @@ "resources": { "tests": { "methods": { + "cancel": { + "description": "Abort automated test run on release.", + "flatPath": "v1alpha/projects/{projectsId}/apps/{appsId}/releases/{releasesId}/tests/{testsId}:cancel", + "httpMethod": "GET", + "id": "firebaseappdistribution.projects.apps.releases.tests.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the release test resource. Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}/tests/{test_id}`", + "location": "path", + "pattern": "^projects/[^/]+/apps/[^/]+/releases/[^/]+/tests/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:cancel", + "response": { + "$ref": "GoogleFirebaseAppdistroV1alphaCancelReleaseTestResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "create": { "description": "Run automated test(s) on release.", "flatPath": "v1alpha/projects/{projectsId}/apps/{appsId}/releases/{releasesId}/tests", @@ -465,7 +490,7 @@ "type": "string" }, "releaseTestId": { - "description": "Optional. The ID to use for the test, which will become the final component of the tests's resource name. This value should be 4-63 characters, and valid characters are /a-z-/. If it is not provided one will be automatically generated.", + "description": "Optional. The ID to use for the test, which will become the final component of the test's resource name. This value should be 4-63 characters, and valid characters are /a-z-/. If it is not provided one will be automatically generated.", "location": "query", "type": "string" } @@ -585,7 +610,7 @@ } } }, - "revision": "20240726", + "revision": "20241004", "rootUrl": "https://firebaseappdistribution.googleapis.com/", "schemas": { "AndroidxCrawlerOutputPoint": { @@ -874,6 +899,12 @@ }, "type": "object" }, + "GoogleFirebaseAppdistroV1alphaCancelReleaseTestResponse": { + "description": "The (empty) response message for `CancelReleaseTest`.", + "id": "GoogleFirebaseAppdistroV1alphaCancelReleaseTestResponse", + "properties": {}, + "type": "object" + }, "GoogleFirebaseAppdistroV1alphaCreateReleaseNotesRequest": { "id": "GoogleFirebaseAppdistroV1alphaCreateReleaseNotesRequest", "properties": { @@ -943,7 +974,8 @@ "NOT_INSTALLED", "UNABLE_TO_CRAWL", "DEVICE_OUT_OF_MEMORY", - "FAILED_AI_STEP" + "FAILED_AI_STEP", + "TIMED_OUT" ], "enumDescriptions": [ "Reason unspecified.", @@ -951,7 +983,8 @@ "If an app is not installed and thus no test can be run with the app. This might be caused by trying to run a test on an unsupported platform.", "If the app could not be crawled (possibly because the app did not start).", "If the device ran out of memory during the test.", - "At least one AI step failed." + "At least one AI step failed.", + "The crawl reached the time limit before the test could be completed." ], "readOnly": true, "type": "string" @@ -1438,6 +1471,25 @@ "name": { "description": "The name of the release test resource. Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}/tests/{test_id}`", "type": "string" + }, + "testState": { + "description": "Output only. The state of the release test.", + "enum": [ + "TEST_STATE_UNSPECIFIED", + "IN_PROGRESS", + "PASSED", + "FAILED", + "INCONCLUSIVE" + ], + "enumDescriptions": [ + "Test state unspecified.", + "The test is in progress.", + "The test has passed.", + "The test has failed.", + "The test was inconclusive." + ], + "readOnly": true, + "type": "string" } }, "type": "object" diff --git a/src/apis/firebaseappdistribution/v1alpha.ts b/src/apis/firebaseappdistribution/v1alpha.ts index e593203bcc..fb0c304da1 100644 --- a/src/apis/firebaseappdistribution/v1alpha.ts +++ b/src/apis/firebaseappdistribution/v1alpha.ts @@ -257,6 +257,10 @@ export namespace firebaseappdistribution_v1alpha { */ screenshot?: Schema$GoogleFirebaseAppdistroV1alphaScreenshot; } + /** + * The (empty) response message for `CancelReleaseTest`. + */ + export interface Schema$GoogleFirebaseAppdistroV1alphaCancelReleaseTestResponse {} export interface Schema$GoogleFirebaseAppdistroV1alphaCreateReleaseNotesRequest { /** * The actual release notes body from the user @@ -581,6 +585,10 @@ export namespace firebaseappdistribution_v1alpha { * The name of the release test resource. Format: `projects/{project_number\}/apps/{app_id\}/releases/{release_id\}/tests/{test_id\}` */ name?: string | null; + /** + * Output only. The state of the release test. + */ + testState?: string | null; } /** * Configuration for Robo crawler @@ -1941,6 +1949,104 @@ export namespace firebaseappdistribution_v1alpha { this.context = context; } + /** + * Abort automated test run on release. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + cancel( + params: Params$Resource$Projects$Apps$Releases$Tests$Cancel, + options: StreamMethodOptions + ): GaxiosPromise; + cancel( + params?: Params$Resource$Projects$Apps$Releases$Tests$Cancel, + options?: MethodOptions + ): GaxiosPromise; + cancel( + params: Params$Resource$Projects$Apps$Releases$Tests$Cancel, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Apps$Releases$Tests$Cancel, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + cancel( + params: Params$Resource$Projects$Apps$Releases$Tests$Cancel, + callback: BodyResponseCallback + ): void; + cancel( + callback: BodyResponseCallback + ): void; + cancel( + paramsOrCallback?: + | Params$Resource$Projects$Apps$Releases$Tests$Cancel + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Apps$Releases$Tests$Cancel; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Projects$Apps$Releases$Tests$Cancel; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://firebaseappdistribution.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1alpha/{+name}:cancel').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + apiVersion: '', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + /** * Run automated test(s) on release. * @@ -2233,6 +2339,13 @@ export namespace firebaseappdistribution_v1alpha { } } + export interface Params$Resource$Projects$Apps$Releases$Tests$Cancel + extends StandardParameters { + /** + * Required. The name of the release test resource. Format: `projects/{project_number\}/apps/{app_id\}/releases/{release_id\}/tests/{test_id\}` + */ + name?: string; + } export interface Params$Resource$Projects$Apps$Releases$Tests$Create extends StandardParameters { /** @@ -2240,7 +2353,7 @@ export namespace firebaseappdistribution_v1alpha { */ parent?: string; /** - * Optional. The ID to use for the test, which will become the final component of the tests's resource name. This value should be 4-63 characters, and valid characters are /a-z-/. If it is not provided one will be automatically generated. + * Optional. The ID to use for the test, which will become the final component of the test's resource name. This value should be 4-63 characters, and valid characters are /a-z-/. If it is not provided one will be automatically generated. */ releaseTestId?: string;