diff --git a/discovery/androidpublisher-v3.json b/discovery/androidpublisher-v3.json index 3b93baa3a0..6547f58a5e 100644 --- a/discovery/androidpublisher-v3.json +++ b/discovery/androidpublisher-v3.json @@ -105,6 +105,35 @@ "protocol": "rest", "resources": { "applications": { + "methods": { + "dataSafety": { + "description": "Writes the Safety Labels declaration of an app.", + "flatPath": "androidpublisher/v3/applications/{packageName}/dataSafety", + "httpMethod": "POST", + "id": "androidpublisher.applications.dataSafety", + "parameterOrder": [ + "packageName" + ], + "parameters": { + "packageName": { + "description": "Required. Package name of the app.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "androidpublisher/v3/applications/{packageName}/dataSafety", + "request": { + "$ref": "SafetyLabelsUpdateRequest" + }, + "response": { + "$ref": "SafetyLabelsUpdateResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/androidpublisher" + ] + } + }, "resources": { "deviceTierConfigs": { "methods": { @@ -211,6 +240,172 @@ } } }, + "apprecovery": { + "methods": { + "addTargeting": { + "description": "Incrementally update targeting for a recovery action. Note that only the criteria selected during the creation of recovery action can be expanded.", + "flatPath": "androidpublisher/v3/applications/{packageName}/appRecoveries/{appRecoveryId}:addTargeting", + "httpMethod": "POST", + "id": "androidpublisher.apprecovery.addTargeting", + "parameterOrder": [ + "packageName", + "appRecoveryId" + ], + "parameters": { + "appRecoveryId": { + "description": "Required. ID corresponding to the app recovery action.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "packageName": { + "description": "Required. Package name of the app for which recovery action is to be updated.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "androidpublisher/v3/applications/{packageName}/appRecoveries/{appRecoveryId}:addTargeting", + "request": { + "$ref": "AddTargetingRequest" + }, + "response": { + "$ref": "AddTargetingResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/androidpublisher" + ] + }, + "appRecoveries": { + "description": "List all app recovery action resources associated with a particular package name and app version.", + "flatPath": "androidpublisher/v3/applications/{packageName}/appRecoveries", + "httpMethod": "POST", + "id": "androidpublisher.apprecovery.appRecoveries", + "parameterOrder": [ + "packageName" + ], + "parameters": { + "packageName": { + "description": "Required. Package name of the app for which list of recovery actions is requested.", + "location": "path", + "required": true, + "type": "string" + }, + "versionCode": { + "description": "Required. Version code targeted by the list of recovery actions.", + "format": "int64", + "location": "query", + "type": "string" + } + }, + "path": "androidpublisher/v3/applications/{packageName}/appRecoveries", + "response": { + "$ref": "ListAppRecoveriesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/androidpublisher" + ] + }, + "cancel": { + "description": "Cancel an already executing app recovery action. Note that this action changes status of the recovery action to CANCELED.", + "flatPath": "androidpublisher/v3/applications/{packageName}/appRecoveries/{appRecoveryId}:cancel", + "httpMethod": "POST", + "id": "androidpublisher.apprecovery.cancel", + "parameterOrder": [ + "packageName", + "appRecoveryId" + ], + "parameters": { + "appRecoveryId": { + "description": "Required. ID corresponding to the app recovery action.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "packageName": { + "description": "Required. Package name of the app for which recovery action cancellation is requested.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "androidpublisher/v3/applications/{packageName}/appRecoveries/{appRecoveryId}:cancel", + "request": { + "$ref": "CancelAppRecoveryRequest" + }, + "response": { + "$ref": "CancelAppRecoveryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/androidpublisher" + ] + }, + "create": { + "description": "Create an app recovery action with recovery status as DRAFT. Note that this action does not execute the recovery action.", + "flatPath": "androidpublisher/v3/applications/{packageName}/appRecoveries", + "httpMethod": "POST", + "id": "androidpublisher.apprecovery.create", + "parameterOrder": [ + "packageName" + ], + "parameters": { + "packageName": { + "description": "Required. Package name of the app on which recovery action is performed.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "androidpublisher/v3/applications/{packageName}/appRecoveries", + "request": { + "$ref": "CreateDraftAppRecoveryRequest" + }, + "response": { + "$ref": "AppRecoveryAction" + }, + "scopes": [ + "https://www.googleapis.com/auth/androidpublisher" + ] + }, + "deploy": { + "description": "Deploy an already created app recovery action with recovery status DRAFT. Note that this action activates the recovery action for all targeted users and changes its status to ACTIVE.", + "flatPath": "androidpublisher/v3/applications/{packageName}/appRecoveries/{appRecoveryId}:deploy", + "httpMethod": "POST", + "id": "androidpublisher.apprecovery.deploy", + "parameterOrder": [ + "packageName", + "appRecoveryId" + ], + "parameters": { + "appRecoveryId": { + "description": "Required. ID corresponding to the app recovery action to deploy.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "packageName": { + "description": "Required. Package name of the app for which recovery action is deployed.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "androidpublisher/v3/applications/{packageName}/appRecoveries/{appRecoveryId}:deploy", + "request": { + "$ref": "DeployAppRecoveryRequest" + }, + "response": { + "$ref": "DeployAppRecoveryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/androidpublisher" + ] + } + } + }, "edits": { "methods": { "commit": { @@ -4028,6 +4223,40 @@ "scopes": [ "https://www.googleapis.com/auth/androidpublisher" ] + }, + "revoke": { + "description": "Revoke a subscription purchase for the user.", + "flatPath": "androidpublisher/v3/applications/{packageName}/purchases/subscriptionsv2/tokens/{token}:revoke", + "httpMethod": "POST", + "id": "androidpublisher.purchases.subscriptionsv2.revoke", + "parameterOrder": [ + "packageName", + "token" + ], + "parameters": { + "packageName": { + "description": "Required. The package of the application for which this subscription was purchased (for example, 'com.some.thing').", + "location": "path", + "required": true, + "type": "string" + }, + "token": { + "description": "Required. The token provided to the user's device when the subscription was purchased.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "androidpublisher/v3/applications/{packageName}/purchases/subscriptionsv2/tokens/{token}:revoke", + "request": { + "$ref": "RevokeSubscriptionPurchaseRequest" + }, + "response": { + "$ref": "RevokeSubscriptionPurchaseResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/androidpublisher" + ] } } }, @@ -4495,7 +4724,7 @@ } } }, - "revision": "20231213", + "revision": "20240131", "rootUrl": "https://androidpublisher.googleapis.com/", "schemas": { "Abi": { @@ -4629,6 +4858,49 @@ }, "type": "object" }, + "AddTargetingRequest": { + "description": "Request message for AddTargeting.", + "id": "AddTargetingRequest", + "properties": { + "targetingUpdate": { + "$ref": "TargetingUpdate", + "description": "Specifies targeting updates such as regions, android sdk versions etc." + } + }, + "type": "object" + }, + "AddTargetingResponse": { + "description": "Response message for AddTargeting.", + "id": "AddTargetingResponse", + "properties": {}, + "type": "object" + }, + "AllUsers": { + "description": "Object representation to describe all set of users.", + "id": "AllUsers", + "properties": { + "isAllUsersRequested": { + "description": "Required. Set to true if all set of users are needed.", + "type": "boolean" + } + }, + "type": "object" + }, + "AndroidSdks": { + "description": "Android api level targeting data for app recovery action targeting.", + "id": "AndroidSdks", + "properties": { + "sdkLevels": { + "description": "Android api levels of devices targeted by recovery action. See https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels for different api levels in android.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "Apk": { "description": "Information about an APK. The resource for ApksService.", "id": "Apk", @@ -4820,6 +5092,94 @@ }, "type": "object" }, + "AppRecoveryAction": { + "description": "Information about an app recovery action.", + "id": "AppRecoveryAction", + "properties": { + "appRecoveryId": { + "description": "ID corresponding to the app recovery action.", + "format": "int64", + "type": "string" + }, + "cancelTime": { + "description": "Timestamp of when the app recovery action is canceled by the developer. Only set if the recovery action has been canceled.", + "format": "google-datetime", + "type": "string" + }, + "createTime": { + "description": "Timestamp of when the app recovery action is created by the developer. It is always set after creation of the recovery action.", + "format": "google-datetime", + "type": "string" + }, + "deployTime": { + "description": "Timestamp of when the app recovery action is deployed to the users. Only set if the recovery action has been deployed.", + "format": "google-datetime", + "type": "string" + }, + "lastUpdateTime": { + "description": "Timestamp of when the developer last updated recovery action. In case the action is cancelled, it corresponds to cancellation time. It is always set after creation of the recovery action.", + "format": "google-datetime", + "type": "string" + }, + "remoteInAppUpdateData": { + "$ref": "RemoteInAppUpdateData", + "description": "Data about the remote in-app update action such as such as recovered user base, recoverable user base etc. Set only if the recovery action type is Remote In-App Update." + }, + "status": { + "description": "The status of the recovery action.", + "enum": [ + "RECOVERY_STATUS_UNSPECIFIED", + "RECOVERY_STATUS_ACTIVE", + "RECOVERY_STATUS_CANCELED", + "RECOVERY_STATUS_DRAFT" + ], + "enumDescriptions": [ + "RecoveryStatus is unspecified.", + "The app recovery action has not been canceled since it has been created.", + "The recovery action has been canceled. The action cannot be resumed.", + "The recovery action is in the draft state and has not yet been deployed to users." + ], + "type": "string" + }, + "targeting": { + "$ref": "Targeting", + "description": "Specifies targeting criteria for the recovery action such as regions, android sdk versions, app versions etc." + } + }, + "type": "object" + }, + "AppVersionList": { + "description": "Data format for a list of app versions. Only one app version is supported for now.", + "id": "AppVersionList", + "properties": { + "versionCodes": { + "description": "List of app version codes.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "AppVersionRange": { + "description": "Data format for a continuous range of app versions.", + "id": "AppVersionRange", + "properties": { + "versionCodeEnd": { + "description": "Highest app version in the range, inclusive.", + "format": "int64", + "type": "string" + }, + "versionCodeStart": { + "description": "Lowest app version in the range, inclusive.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "ArchiveSubscriptionRequest": { "description": "Request message for ArchiveSubscription.", "id": "ArchiveSubscriptionRequest", @@ -5210,6 +5570,18 @@ }, "type": "object" }, + "CancelAppRecoveryRequest": { + "description": "Request message for CancelAppRecovery.", + "id": "CancelAppRecoveryRequest", + "properties": {}, + "type": "object" + }, + "CancelAppRecoveryResponse": { + "description": "Response message for CancelAppRecovery.", + "id": "CancelAppRecoveryResponse", + "properties": {}, + "type": "object" + }, "CancelSurveyResult": { "description": "Result of the cancel survey when the subscription was canceled by the user.", "id": "CancelSurveyResult", @@ -5360,6 +5732,21 @@ }, "type": "object" }, + "CreateDraftAppRecoveryRequest": { + "description": "Request message for CreateDraftAppRecovery.", + "id": "CreateDraftAppRecoveryRequest", + "properties": { + "remoteInAppUpdate": { + "$ref": "RemoteInAppUpdate", + "description": "Action type is remote in-app update. As a consequence of this action, a downloadable recovery module is also created for testing purposes." + }, + "targeting": { + "$ref": "Targeting", + "description": "Specifies targeting criteria for the recovery action such as regions, android sdk versions, app versions etc." + } + }, + "type": "object" + }, "DeactivateBasePlanRequest": { "description": "Request message for DeactivateBasePlan.", "id": "DeactivateBasePlanRequest", @@ -5473,6 +5860,18 @@ }, "type": "object" }, + "DeployAppRecoveryRequest": { + "description": "Request message for DeployAppRecovery.", + "id": "DeployAppRecoveryRequest", + "properties": {}, + "type": "object" + }, + "DeployAppRecoveryResponse": { + "description": "Response message for DeployAppRecovery.", + "id": "DeployAppRecoveryResponse", + "properties": {}, + "type": "object" + }, "DeveloperComment": { "description": "Developer entry from conversation between user and developer.", "id": "DeveloperComment", @@ -6041,6 +6440,13 @@ }, "type": "array" }, + "generatedRecoveryModules": { + "description": "Generated recovery apks for recovery actions signed with a key corresponding to certificate_sha256_hash. This includes all generated recovery APKs, also those in draft or cancelled state. This field is not set if no recovery actions were created for this signing key.", + "items": { + "$ref": "GeneratedRecoveryApk" + }, + "type": "array" + }, "generatedSplitApks": { "description": "List of generated split APKs, signed with a key corresponding to certificate_sha256_hash.", "items": { @@ -6090,6 +6496,42 @@ }, "type": "object" }, + "GeneratedRecoveryApk": { + "description": "Download metadata for an app recovery module.", + "id": "GeneratedRecoveryApk", + "properties": { + "downloadId": { + "description": "Download ID, which uniquely identifies the APK to download. Should be supplied to `generatedapks.download` method.", + "type": "string" + }, + "moduleName": { + "description": "Name of the module which recovery apk belongs to.", + "type": "string" + }, + "recoveryId": { + "description": "ID of the recovery action.", + "format": "int64", + "type": "string" + }, + "recoveryStatus": { + "description": "The status of the recovery action corresponding to the recovery apk.", + "enum": [ + "RECOVERY_STATUS_UNSPECIFIED", + "RECOVERY_STATUS_ACTIVE", + "RECOVERY_STATUS_CANCELED", + "RECOVERY_STATUS_DRAFT" + ], + "enumDescriptions": [ + "RecoveryStatus is unspecified.", + "The app recovery action has not been canceled since it has been created.", + "The recovery action has been canceled. The action cannot be resumed.", + "The recovery action is in the draft state and has not yet been deployed to users." + ], + "type": "string" + } + }, + "type": "object" + }, "GeneratedSplitApk": { "description": "Download metadata for a split APK.", "id": "GeneratedSplitApk", @@ -6621,6 +7063,20 @@ }, "type": "object" }, + "ListAppRecoveriesResponse": { + "description": "Response message for ListAppRecoveries. -- api-linter: core::0158::response-next-page-token-field=disabled", + "id": "ListAppRecoveriesResponse", + "properties": { + "recoveryActions": { + "description": "List of recovery actions associated with the requested package name.", + "items": { + "$ref": "AppRecoveryAction" + }, + "type": "array" + } + }, + "type": "object" + }, "ListDeviceTierConfigsResponse": { "description": "Response listing existing device tier configs.", "id": "ListDeviceTierConfigsResponse", @@ -7447,6 +7903,20 @@ }, "type": "object" }, + "Regions": { + "description": "Region targeting data for app recovery action targeting.", + "id": "Regions", + "properties": { + "regionCode": { + "description": "Regions targeted by the recovery action. Region codes are ISO 3166 Alpha-2 country codes. For example, US stands for United States of America. See https://www.iso.org/iso-3166-country-codes.html for the complete list of country codes.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "RegionsVersion": { "description": "The version of the available regions being used for the specified resource.", "id": "RegionsVersion", @@ -7458,6 +7928,53 @@ }, "type": "object" }, + "RemoteInAppUpdate": { + "description": "Object representation for Remote in-app update action type.", + "id": "RemoteInAppUpdate", + "properties": { + "isRemoteInAppUpdateRequested": { + "description": "Required. Set to true if Remote In-App Update action type is needed.", + "type": "boolean" + } + }, + "type": "object" + }, + "RemoteInAppUpdateData": { + "description": "Data related to Remote In-App Update action such as recovered user count, affected user count etc.", + "id": "RemoteInAppUpdateData", + "properties": { + "remoteAppUpdateDataPerBundle": { + "description": "Data related to the recovery action at bundle level.", + "items": { + "$ref": "RemoteInAppUpdateDataPerBundle" + }, + "type": "array" + } + }, + "type": "object" + }, + "RemoteInAppUpdateDataPerBundle": { + "description": "Data related to the recovery action at bundle level.", + "id": "RemoteInAppUpdateDataPerBundle", + "properties": { + "recoveredDeviceCount": { + "description": "Total number of devices which have been rescued.", + "format": "int64", + "type": "string" + }, + "totalDeviceCount": { + "description": "Total number of devices affected by this recovery action associated with bundle of the app.", + "format": "int64", + "type": "string" + }, + "versionCode": { + "description": "Version Code corresponding to the target bundle.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "ReplacementCancellation": { "description": "Information specific to cancellations caused by subscription replacement.", "id": "ReplacementCancellation", @@ -7545,6 +8062,57 @@ }, "type": "object" }, + "RevocationContext": { + "description": "Revocation context of the purchases.subscriptionsv2.revoke API.", + "id": "RevocationContext", + "properties": { + "proratedRefund": { + "$ref": "RevocationContextProratedRefund", + "description": "Optional. Used when users should be refunded a prorated amount they paid for their subscription based on the amount of time remaining in a subscription." + } + }, + "type": "object" + }, + "RevocationContextProratedRefund": { + "description": "Used to determine if the refund type in the RevocationContext is a prorated refund.", + "id": "RevocationContextProratedRefund", + "properties": {}, + "type": "object" + }, + "RevokeSubscriptionPurchaseRequest": { + "description": "Request for the purchases.subscriptionsv2.revoke API.", + "id": "RevokeSubscriptionPurchaseRequest", + "properties": { + "revocationContext": { + "$ref": "RevocationContext", + "description": "Required. Additional details around the subscription revocation." + } + }, + "type": "object" + }, + "RevokeSubscriptionPurchaseResponse": { + "description": "Response for the purchases.subscriptionsv2.revoke API.", + "id": "RevokeSubscriptionPurchaseResponse", + "properties": {}, + "type": "object" + }, + "SafetyLabelsUpdateRequest": { + "description": "Request to update Safety Labels of an app.", + "id": "SafetyLabelsUpdateRequest", + "properties": { + "safetyLabels": { + "description": "Required. Contents of the CSV file containing Data Safety responses. For the format of this file, see the Help Center documentation at https://support.google.com/googleplay/android-developer/answer/10787469?hl=en#zippy=%2Cunderstand-the-csv-format To download an up to date template, follow the steps at https://support.google.com/googleplay/android-developer/answer/10787469?hl=en#zippy=%2Cexport-to-a-csv-file", + "type": "string" + } + }, + "type": "object" + }, + "SafetyLabelsUpdateResponse": { + "description": "Response for SafetyLabelsUpdate rpc.", + "id": "SafetyLabelsUpdateResponse", + "properties": {}, + "type": "object" + }, "ScreenDensity": { "description": "Represents a screen density.", "id": "ScreenDensity", @@ -8362,6 +8930,33 @@ "properties": {}, "type": "object" }, + "Targeting": { + "description": "Targeting details for a recovery action such as regions, android sdk levels, app versions etc.", + "id": "Targeting", + "properties": { + "allUsers": { + "$ref": "AllUsers", + "description": "All users are targeted." + }, + "androidSdks": { + "$ref": "AndroidSdks", + "description": "Targeting is based on android api levels of devices." + }, + "regions": { + "$ref": "Regions", + "description": "Targeting is based on the user account region." + }, + "versionList": { + "$ref": "AppVersionList", + "description": "Target version codes as a list." + }, + "versionRange": { + "$ref": "AppVersionRange", + "description": "Target version codes as a range." + } + }, + "type": "object" + }, "TargetingInfo": { "description": "Targeting information about the generated apks.", "id": "TargetingInfo", @@ -8398,6 +8993,25 @@ }, "type": "object" }, + "TargetingUpdate": { + "description": "Update type for targeting. Note it is always a subset Targeting.", + "id": "TargetingUpdate", + "properties": { + "allUsers": { + "$ref": "AllUsers", + "description": "All users are targeted." + }, + "androidSdks": { + "$ref": "AndroidSdks", + "description": "Additional android sdk levels are targeted by the recovery action." + }, + "regions": { + "$ref": "Regions", + "description": "Additional regions are targeted by the recovery action." + } + }, + "type": "object" + }, "TestPurchase": { "description": "Whether this subscription purchase is a test purchase.", "id": "TestPurchase", diff --git a/src/apis/androidpublisher/v3.ts b/src/apis/androidpublisher/v3.ts index 7704dbb46a..9a29bd986f 100644 --- a/src/apis/androidpublisher/v3.ts +++ b/src/apis/androidpublisher/v3.ts @@ -113,6 +113,7 @@ export namespace androidpublisher_v3 { export class Androidpublisher { context: APIRequestContext; applications: Resource$Applications; + apprecovery: Resource$Apprecovery; edits: Resource$Edits; externaltransactions: Resource$Externaltransactions; generatedapks: Resource$Generatedapks; @@ -133,6 +134,7 @@ export namespace androidpublisher_v3 { }; this.applications = new Resource$Applications(this.context); + this.apprecovery = new Resource$Apprecovery(this.context); this.edits = new Resource$Edits(this.context); this.externaltransactions = new Resource$Externaltransactions( this.context @@ -228,6 +230,37 @@ export namespace androidpublisher_v3 { */ productId?: string | null; } + /** + * Request message for AddTargeting. + */ + export interface Schema$AddTargetingRequest { + /** + * Specifies targeting updates such as regions, android sdk versions etc. + */ + targetingUpdate?: Schema$TargetingUpdate; + } + /** + * Response message for AddTargeting. + */ + export interface Schema$AddTargetingResponse {} + /** + * Object representation to describe all set of users. + */ + export interface Schema$AllUsers { + /** + * Required. Set to true if all set of users are needed. + */ + isAllUsersRequested?: boolean | null; + } + /** + * Android api level targeting data for app recovery action targeting. + */ + export interface Schema$AndroidSdks { + /** + * Android api levels of devices targeted by recovery action. See https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels for different api levels in android. + */ + sdkLevels?: string[] | null; + } /** * Information about an APK. The resource for ApksService. */ @@ -390,6 +423,65 @@ export namespace androidpublisher_v3 { */ id?: string | null; } + /** + * Information about an app recovery action. + */ + export interface Schema$AppRecoveryAction { + /** + * ID corresponding to the app recovery action. + */ + appRecoveryId?: string | null; + /** + * Timestamp of when the app recovery action is canceled by the developer. Only set if the recovery action has been canceled. + */ + cancelTime?: string | null; + /** + * Timestamp of when the app recovery action is created by the developer. It is always set after creation of the recovery action. + */ + createTime?: string | null; + /** + * Timestamp of when the app recovery action is deployed to the users. Only set if the recovery action has been deployed. + */ + deployTime?: string | null; + /** + * Timestamp of when the developer last updated recovery action. In case the action is cancelled, it corresponds to cancellation time. It is always set after creation of the recovery action. + */ + lastUpdateTime?: string | null; + /** + * Data about the remote in-app update action such as such as recovered user base, recoverable user base etc. Set only if the recovery action type is Remote In-App Update. + */ + remoteInAppUpdateData?: Schema$RemoteInAppUpdateData; + /** + * The status of the recovery action. + */ + status?: string | null; + /** + * Specifies targeting criteria for the recovery action such as regions, android sdk versions, app versions etc. + */ + targeting?: Schema$Targeting; + } + /** + * Data format for a list of app versions. Only one app version is supported for now. + */ + export interface Schema$AppVersionList { + /** + * List of app version codes. + */ + versionCodes?: string[] | null; + } + /** + * Data format for a continuous range of app versions. + */ + export interface Schema$AppVersionRange { + /** + * Highest app version in the range, inclusive. + */ + versionCodeEnd?: string | null; + /** + * Lowest app version in the range, inclusive. + */ + versionCodeStart?: string | null; + } /** * Request message for ArchiveSubscription. */ @@ -639,6 +731,14 @@ export namespace androidpublisher_v3 { */ kind?: string | null; } + /** + * Request message for CancelAppRecovery. + */ + export interface Schema$CancelAppRecoveryRequest {} + /** + * Response message for CancelAppRecovery. + */ + export interface Schema$CancelAppRecoveryResponse {} /** * Information specific to a subscription in canceled state. */ @@ -751,6 +851,19 @@ export namespace androidpublisher_v3 { */ includeRestOfWorld?: boolean | null; } + /** + * Request message for CreateDraftAppRecovery. + */ + export interface Schema$CreateDraftAppRecoveryRequest { + /** + * Action type is remote in-app update. As a consequence of this action, a downloadable recovery module is also created for testing purposes. + */ + remoteInAppUpdate?: Schema$RemoteInAppUpdate; + /** + * Specifies targeting criteria for the recovery action such as regions, android sdk versions, app versions etc. + */ + targeting?: Schema$Targeting; + } /** * Request message for DeactivateBasePlan. */ @@ -824,6 +937,14 @@ export namespace androidpublisher_v3 { */ deobfuscationFile?: Schema$DeobfuscationFile; } + /** + * Request message for DeployAppRecovery. + */ + export interface Schema$DeployAppRecoveryRequest {} + /** + * Response message for DeployAppRecovery. + */ + export interface Schema$DeployAppRecoveryResponse {} /** * Developer entry from conversation between user and developer. */ @@ -1248,6 +1369,10 @@ export namespace androidpublisher_v3 { * List of asset pack slices which will be served for this app bundle, signed with a key corresponding to certificate_sha256_hash. */ generatedAssetPackSlices?: Schema$GeneratedAssetPackSlice[]; + /** + * Generated recovery apks for recovery actions signed with a key corresponding to certificate_sha256_hash. This includes all generated recovery APKs, also those in draft or cancelled state. This field is not set if no recovery actions were created for this signing key. + */ + generatedRecoveryModules?: Schema$GeneratedRecoveryApk[]; /** * List of generated split APKs, signed with a key corresponding to certificate_sha256_hash. */ @@ -1286,6 +1411,27 @@ export namespace androidpublisher_v3 { */ version?: string | null; } + /** + * Download metadata for an app recovery module. + */ + export interface Schema$GeneratedRecoveryApk { + /** + * Download ID, which uniquely identifies the APK to download. Should be supplied to `generatedapks.download` method. + */ + downloadId?: string | null; + /** + * Name of the module which recovery apk belongs to. + */ + moduleName?: string | null; + /** + * ID of the recovery action. + */ + recoveryId?: string | null; + /** + * The status of the recovery action corresponding to the recovery apk. + */ + recoveryStatus?: string | null; + } /** * Download metadata for a split APK. */ @@ -1643,6 +1789,15 @@ export namespace androidpublisher_v3 { */ value?: string[] | null; } + /** + * Response message for ListAppRecoveries. -- api-linter: core::0158::response-next-page-token-field=disabled + */ + export interface Schema$ListAppRecoveriesResponse { + /** + * List of recovery actions associated with the requested package name. + */ + recoveryActions?: Schema$AppRecoveryAction[]; + } /** * Response listing existing device tier configs. */ @@ -2237,6 +2392,15 @@ export namespace androidpublisher_v3 { */ taxTier?: string | null; } + /** + * Region targeting data for app recovery action targeting. + */ + export interface Schema$Regions { + /** + * Regions targeted by the recovery action. Region codes are ISO 3166 Alpha-2 country codes. For example, US stands for United States of America. See https://www.iso.org/iso-3166-country-codes.html for the complete list of country codes. + */ + regionCode?: string[] | null; + } /** * The version of the available regions being used for the specified resource. */ @@ -2246,6 +2410,41 @@ export namespace androidpublisher_v3 { */ version?: string | null; } + /** + * Object representation for Remote in-app update action type. + */ + export interface Schema$RemoteInAppUpdate { + /** + * Required. Set to true if Remote In-App Update action type is needed. + */ + isRemoteInAppUpdateRequested?: boolean | null; + } + /** + * Data related to Remote In-App Update action such as recovered user count, affected user count etc. + */ + export interface Schema$RemoteInAppUpdateData { + /** + * Data related to the recovery action at bundle level. + */ + remoteAppUpdateDataPerBundle?: Schema$RemoteInAppUpdateDataPerBundle[]; + } + /** + * Data related to the recovery action at bundle level. + */ + export interface Schema$RemoteInAppUpdateDataPerBundle { + /** + * Total number of devices which have been rescued. + */ + recoveredDeviceCount?: string | null; + /** + * Total number of devices affected by this recovery action associated with bundle of the app. + */ + totalDeviceCount?: string | null; + /** + * Version Code corresponding to the target bundle. + */ + versionCode?: string | null; + } /** * Information specific to cancellations caused by subscription replacement. */ @@ -2315,6 +2514,45 @@ export namespace androidpublisher_v3 { */ result?: Schema$ReviewReplyResult; } + /** + * Revocation context of the purchases.subscriptionsv2.revoke API. + */ + export interface Schema$RevocationContext { + /** + * Optional. Used when users should be refunded a prorated amount they paid for their subscription based on the amount of time remaining in a subscription. + */ + proratedRefund?: Schema$RevocationContextProratedRefund; + } + /** + * Used to determine if the refund type in the RevocationContext is a prorated refund. + */ + export interface Schema$RevocationContextProratedRefund {} + /** + * Request for the purchases.subscriptionsv2.revoke API. + */ + export interface Schema$RevokeSubscriptionPurchaseRequest { + /** + * Required. Additional details around the subscription revocation. + */ + revocationContext?: Schema$RevocationContext; + } + /** + * Response for the purchases.subscriptionsv2.revoke API. + */ + export interface Schema$RevokeSubscriptionPurchaseResponse {} + /** + * Request to update Safety Labels of an app. + */ + export interface Schema$SafetyLabelsUpdateRequest { + /** + * Required. Contents of the CSV file containing Data Safety responses. For the format of this file, see the Help Center documentation at https://support.google.com/googleplay/android-developer/answer/10787469?hl=en#zippy=%2Cunderstand-the-csv-format To download an up to date template, follow the steps at https://support.google.com/googleplay/android-developer/answer/10787469?hl=en#zippy=%2Cexport-to-a-csv-file + */ + safetyLabels?: string | null; + } + /** + * Response for SafetyLabelsUpdate rpc. + */ + export interface Schema$SafetyLabelsUpdateResponse {} /** * Represents a screen density. */ @@ -2908,6 +3146,31 @@ export namespace androidpublisher_v3 { * Information specific to cancellations initiated by Google system. */ export interface Schema$SystemInitiatedCancellation {} + /** + * Targeting details for a recovery action such as regions, android sdk levels, app versions etc. + */ + export interface Schema$Targeting { + /** + * All users are targeted. + */ + allUsers?: Schema$AllUsers; + /** + * Targeting is based on android api levels of devices. + */ + androidSdks?: Schema$AndroidSdks; + /** + * Targeting is based on the user account region. + */ + regions?: Schema$Regions; + /** + * Target version codes as a list. + */ + versionList?: Schema$AppVersionList; + /** + * Target version codes as a range. + */ + versionRange?: Schema$AppVersionRange; + } /** * Targeting information about the generated apks. */ @@ -2934,6 +3197,23 @@ export namespace androidpublisher_v3 { */ specificSubscriptionInApp?: string | null; } + /** + * Update type for targeting. Note it is always a subset Targeting. + */ + export interface Schema$TargetingUpdate { + /** + * All users are targeted. + */ + allUsers?: Schema$AllUsers; + /** + * Additional android sdk levels are targeted by the recovery action. + */ + androidSdks?: Schema$AndroidSdks; + /** + * Additional regions are targeted by the recovery action. + */ + regions?: Schema$Regions; + } /** * The testers of an app. The resource for TestersService. Note: while it is possible in the Play Console UI to add testers via email lists, email lists are not supported by this resource. */ @@ -3424,6 +3704,114 @@ export namespace androidpublisher_v3 { this.context ); } + + /** + * Writes the Safety Labels declaration of an app. + * + * @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. + */ + dataSafety( + params: Params$Resource$Applications$Datasafety, + options: StreamMethodOptions + ): GaxiosPromise; + dataSafety( + params?: Params$Resource$Applications$Datasafety, + options?: MethodOptions + ): GaxiosPromise; + dataSafety( + params: Params$Resource$Applications$Datasafety, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + dataSafety( + params: Params$Resource$Applications$Datasafety, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + dataSafety( + params: Params$Resource$Applications$Datasafety, + callback: BodyResponseCallback + ): void; + dataSafety( + callback: BodyResponseCallback + ): void; + dataSafety( + paramsOrCallback?: + | Params$Resource$Applications$Datasafety + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Applications$Datasafety; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Applications$Datasafety; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://androidpublisher.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/androidpublisher/v3/applications/{packageName}/dataSafety' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['packageName'], + pathParams: ['packageName'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + } + + export interface Params$Resource$Applications$Datasafety + extends StandardParameters { + /** + * Required. Package name of the app. + */ + packageName?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$SafetyLabelsUpdateRequest; } export class Resource$Applications$Devicetierconfigs { @@ -3433,57 +3821,577 @@ export namespace androidpublisher_v3 { } /** - * Creates a new device tier config for an app. + * Creates a new device tier config for an app. + * + * @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. + */ + create( + params: Params$Resource$Applications$Devicetierconfigs$Create, + options: StreamMethodOptions + ): GaxiosPromise; + create( + params?: Params$Resource$Applications$Devicetierconfigs$Create, + options?: MethodOptions + ): GaxiosPromise; + create( + params: Params$Resource$Applications$Devicetierconfigs$Create, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Applications$Devicetierconfigs$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + create( + params: Params$Resource$Applications$Devicetierconfigs$Create, + callback: BodyResponseCallback + ): void; + create(callback: BodyResponseCallback): void; + create( + paramsOrCallback?: + | Params$Resource$Applications$Devicetierconfigs$Create + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Applications$Devicetierconfigs$Create; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Applications$Devicetierconfigs$Create; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://androidpublisher.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/androidpublisher/v3/applications/{packageName}/deviceTierConfigs' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['packageName'], + pathParams: ['packageName'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns a particular device tier config. + * + * @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. + */ + get( + params: Params$Resource$Applications$Devicetierconfigs$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Applications$Devicetierconfigs$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Applications$Devicetierconfigs$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Applications$Devicetierconfigs$Get, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Applications$Devicetierconfigs$Get, + callback: BodyResponseCallback + ): void; + get(callback: BodyResponseCallback): void; + get( + paramsOrCallback?: + | Params$Resource$Applications$Devicetierconfigs$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Applications$Devicetierconfigs$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Applications$Devicetierconfigs$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://androidpublisher.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/androidpublisher/v3/applications/{packageName}/deviceTierConfigs/{deviceTierConfigId}' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['packageName', 'deviceTierConfigId'], + pathParams: ['deviceTierConfigId', 'packageName'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Returns created device tier configs, ordered by descending creation time. + * + * @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. + */ + list( + params: Params$Resource$Applications$Devicetierconfigs$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Applications$Devicetierconfigs$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Applications$Devicetierconfigs$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Applications$Devicetierconfigs$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Applications$Devicetierconfigs$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Applications$Devicetierconfigs$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Applications$Devicetierconfigs$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Applications$Devicetierconfigs$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://androidpublisher.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/androidpublisher/v3/applications/{packageName}/deviceTierConfigs' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['packageName'], + pathParams: ['packageName'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Applications$Devicetierconfigs$Create + extends StandardParameters { + /** + * Whether the service should accept device IDs that are unknown to Play's device catalog. + */ + allowUnknownDevices?: boolean; + /** + * Package name of the app. + */ + packageName?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$DeviceTierConfig; + } + export interface Params$Resource$Applications$Devicetierconfigs$Get + extends StandardParameters { + /** + * Required. Id of an existing device tier config. + */ + deviceTierConfigId?: string; + /** + * Package name of the app. + */ + packageName?: string; + } + export interface Params$Resource$Applications$Devicetierconfigs$List + extends StandardParameters { + /** + * Package name of the app. + */ + packageName?: string; + /** + * The maximum number of device tier configs to return. The service may return fewer than this value. If unspecified, at most 10 device tier configs will be returned. The maximum value for this field is 100; values above 100 will be coerced to 100. Device tier configs will be ordered by descending creation time. + */ + pageSize?: number; + /** + * A page token, received from a previous `ListDeviceTierConfigs` call. Provide this to retrieve the subsequent page. + */ + pageToken?: string; + } + + export class Resource$Apprecovery { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Incrementally update targeting for a recovery action. Note that only the criteria selected during the creation of recovery action can be expanded. + * + * @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. + */ + addTargeting( + params: Params$Resource$Apprecovery$Addtargeting, + options: StreamMethodOptions + ): GaxiosPromise; + addTargeting( + params?: Params$Resource$Apprecovery$Addtargeting, + options?: MethodOptions + ): GaxiosPromise; + addTargeting( + params: Params$Resource$Apprecovery$Addtargeting, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + addTargeting( + params: Params$Resource$Apprecovery$Addtargeting, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + addTargeting( + params: Params$Resource$Apprecovery$Addtargeting, + callback: BodyResponseCallback + ): void; + addTargeting( + callback: BodyResponseCallback + ): void; + addTargeting( + paramsOrCallback?: + | Params$Resource$Apprecovery$Addtargeting + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Apprecovery$Addtargeting; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Apprecovery$Addtargeting; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://androidpublisher.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/androidpublisher/v3/applications/{packageName}/appRecoveries/{appRecoveryId}:addTargeting' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['packageName', 'appRecoveryId'], + pathParams: ['appRecoveryId', 'packageName'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * List all app recovery action resources associated with a particular package name and app version. + * + * @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. + */ + appRecoveries( + params: Params$Resource$Apprecovery$Apprecoveries, + options: StreamMethodOptions + ): GaxiosPromise; + appRecoveries( + params?: Params$Resource$Apprecovery$Apprecoveries, + options?: MethodOptions + ): GaxiosPromise; + appRecoveries( + params: Params$Resource$Apprecovery$Apprecoveries, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + appRecoveries( + params: Params$Resource$Apprecovery$Apprecoveries, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + appRecoveries( + params: Params$Resource$Apprecovery$Apprecoveries, + callback: BodyResponseCallback + ): void; + appRecoveries( + callback: BodyResponseCallback + ): void; + appRecoveries( + paramsOrCallback?: + | Params$Resource$Apprecovery$Apprecoveries + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Apprecovery$Apprecoveries; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Apprecovery$Apprecoveries; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://androidpublisher.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/androidpublisher/v3/applications/{packageName}/appRecoveries' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['packageName'], + pathParams: ['packageName'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Cancel an already executing app recovery action. Note that this action changes status of the recovery action to CANCELED. * * @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. */ - create( - params: Params$Resource$Applications$Devicetierconfigs$Create, + cancel( + params: Params$Resource$Apprecovery$Cancel, options: StreamMethodOptions ): GaxiosPromise; - create( - params?: Params$Resource$Applications$Devicetierconfigs$Create, + cancel( + params?: Params$Resource$Apprecovery$Cancel, options?: MethodOptions - ): GaxiosPromise; - create( - params: Params$Resource$Applications$Devicetierconfigs$Create, + ): GaxiosPromise; + cancel( + params: Params$Resource$Apprecovery$Cancel, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Applications$Devicetierconfigs$Create, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + cancel( + params: Params$Resource$Apprecovery$Cancel, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - create( - params: Params$Resource$Applications$Devicetierconfigs$Create, - callback: BodyResponseCallback + cancel( + params: Params$Resource$Apprecovery$Cancel, + callback: BodyResponseCallback ): void; - create(callback: BodyResponseCallback): void; - create( + cancel( + callback: BodyResponseCallback + ): void; + cancel( paramsOrCallback?: - | Params$Resource$Applications$Devicetierconfigs$Create - | BodyResponseCallback + | Params$Resource$Apprecovery$Cancel + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Applications$Devicetierconfigs$Create; + {}) as Params$Resource$Apprecovery$Cancel; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Applications$Devicetierconfigs$Create; + params = {} as Params$Resource$Apprecovery$Cancel; options = {}; } @@ -3499,79 +4407,82 @@ export namespace androidpublisher_v3 { { url: ( rootUrl + - '/androidpublisher/v3/applications/{packageName}/deviceTierConfigs' + '/androidpublisher/v3/applications/{packageName}/appRecoveries/{appRecoveryId}:cancel' ).replace(/([^:]\/)\/+/g, '$1'), method: 'POST', }, options ), params, - requiredParams: ['packageName'], - pathParams: ['packageName'], + requiredParams: ['packageName', 'appRecoveryId'], + pathParams: ['appRecoveryId', 'packageName'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Returns a particular device tier config. + * Create an app recovery action with recovery status as DRAFT. Note that this action does not execute the recovery action. * * @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. */ - get( - params: Params$Resource$Applications$Devicetierconfigs$Get, + create( + params: Params$Resource$Apprecovery$Create, options: StreamMethodOptions ): GaxiosPromise; - get( - params?: Params$Resource$Applications$Devicetierconfigs$Get, + create( + params?: Params$Resource$Apprecovery$Create, options?: MethodOptions - ): GaxiosPromise; - get( - params: Params$Resource$Applications$Devicetierconfigs$Get, + ): GaxiosPromise; + create( + params: Params$Resource$Apprecovery$Create, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Applications$Devicetierconfigs$Get, - options: MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback + create( + params: Params$Resource$Apprecovery$Create, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback ): void; - get( - params: Params$Resource$Applications$Devicetierconfigs$Get, - callback: BodyResponseCallback + create( + params: Params$Resource$Apprecovery$Create, + callback: BodyResponseCallback ): void; - get(callback: BodyResponseCallback): void; - get( + create(callback: BodyResponseCallback): void; + create( paramsOrCallback?: - | Params$Resource$Applications$Devicetierconfigs$Get - | BodyResponseCallback + | Params$Resource$Apprecovery$Create + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback - ): void | GaxiosPromise | GaxiosPromise { + ): + | void + | GaxiosPromise + | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Applications$Devicetierconfigs$Get; + {}) as Params$Resource$Apprecovery$Create; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Applications$Devicetierconfigs$Get; + params = {} as Params$Resource$Apprecovery$Create; options = {}; } @@ -3587,86 +4498,86 @@ export namespace androidpublisher_v3 { { url: ( rootUrl + - '/androidpublisher/v3/applications/{packageName}/deviceTierConfigs/{deviceTierConfigId}' + '/androidpublisher/v3/applications/{packageName}/appRecoveries' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['packageName', 'deviceTierConfigId'], - pathParams: ['deviceTierConfigId', 'packageName'], + requiredParams: ['packageName'], + pathParams: ['packageName'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest(parameters); } } /** - * Returns created device tier configs, ordered by descending creation time. + * Deploy an already created app recovery action with recovery status DRAFT. Note that this action activates the recovery action for all targeted users and changes its status to ACTIVE. * * @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. */ - list( - params: Params$Resource$Applications$Devicetierconfigs$List, + deploy( + params: Params$Resource$Apprecovery$Deploy, options: StreamMethodOptions ): GaxiosPromise; - list( - params?: Params$Resource$Applications$Devicetierconfigs$List, + deploy( + params?: Params$Resource$Apprecovery$Deploy, options?: MethodOptions - ): GaxiosPromise; - list( - params: Params$Resource$Applications$Devicetierconfigs$List, + ): GaxiosPromise; + deploy( + params: Params$Resource$Apprecovery$Deploy, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Applications$Devicetierconfigs$List, + deploy( + params: Params$Resource$Apprecovery$Deploy, options: | MethodOptions - | BodyResponseCallback, - callback: BodyResponseCallback + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - list( - params: Params$Resource$Applications$Devicetierconfigs$List, - callback: BodyResponseCallback + deploy( + params: Params$Resource$Apprecovery$Deploy, + callback: BodyResponseCallback ): void; - list( - callback: BodyResponseCallback + deploy( + callback: BodyResponseCallback ): void; - list( + deploy( paramsOrCallback?: - | Params$Resource$Applications$Devicetierconfigs$List - | BodyResponseCallback + | Params$Resource$Apprecovery$Deploy + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Applications$Devicetierconfigs$List; + {}) as Params$Resource$Apprecovery$Deploy; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Applications$Devicetierconfigs$List; + params = {} as Params$Resource$Apprecovery$Deploy; options = {}; } @@ -3682,71 +4593,98 @@ export namespace androidpublisher_v3 { { url: ( rootUrl + - '/androidpublisher/v3/applications/{packageName}/deviceTierConfigs' + '/androidpublisher/v3/applications/{packageName}/appRecoveries/{appRecoveryId}:deploy' ).replace(/([^:]\/)\/+/g, '$1'), - method: 'GET', + method: 'POST', }, options ), params, - requiredParams: ['packageName'], - pathParams: ['packageName'], + requiredParams: ['packageName', 'appRecoveryId'], + pathParams: ['appRecoveryId', 'packageName'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest( - parameters - ); + return createAPIRequest(parameters); } } } - export interface Params$Resource$Applications$Devicetierconfigs$Create + export interface Params$Resource$Apprecovery$Addtargeting extends StandardParameters { /** - * Whether the service should accept device IDs that are unknown to Play's device catalog. + * Required. ID corresponding to the app recovery action. */ - allowUnknownDevices?: boolean; + appRecoveryId?: string; /** - * Package name of the app. + * Required. Package name of the app for which recovery action is to be updated. */ packageName?: string; /** * Request body metadata */ - requestBody?: Schema$DeviceTierConfig; + requestBody?: Schema$AddTargetingRequest; } - export interface Params$Resource$Applications$Devicetierconfigs$Get + export interface Params$Resource$Apprecovery$Apprecoveries extends StandardParameters { /** - * Required. Id of an existing device tier config. + * Required. Package name of the app for which list of recovery actions is requested. */ - deviceTierConfigId?: string; + packageName?: string; /** - * Package name of the app. + * Required. Version code targeted by the list of recovery actions. + */ + versionCode?: string; + } + export interface Params$Resource$Apprecovery$Cancel + extends StandardParameters { + /** + * Required. ID corresponding to the app recovery action. + */ + appRecoveryId?: string; + /** + * Required. Package name of the app for which recovery action cancellation is requested. */ packageName?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$CancelAppRecoveryRequest; } - export interface Params$Resource$Applications$Devicetierconfigs$List + export interface Params$Resource$Apprecovery$Create extends StandardParameters { /** - * Package name of the app. + * Required. Package name of the app on which recovery action is performed. */ packageName?: string; + /** - * The maximum number of device tier configs to return. The service may return fewer than this value. If unspecified, at most 10 device tier configs will be returned. The maximum value for this field is 100; values above 100 will be coerced to 100. Device tier configs will be ordered by descending creation time. + * Request body metadata */ - pageSize?: number; + requestBody?: Schema$CreateDraftAppRecoveryRequest; + } + export interface Params$Resource$Apprecovery$Deploy + extends StandardParameters { /** - * A page token, received from a previous `ListDeviceTierConfigs` call. Provide this to retrieve the subsequent page. + * Required. ID corresponding to the app recovery action to deploy. */ - pageToken?: string; + appRecoveryId?: string; + /** + * Required. Package name of the app for which recovery action is deployed. + */ + packageName?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$DeployAppRecoveryRequest; } export class Resource$Edits { @@ -14037,6 +14975,103 @@ export namespace androidpublisher_v3 { return createAPIRequest(parameters); } } + + /** + * Revoke a subscription purchase for the user. + * + * @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. + */ + revoke( + params: Params$Resource$Purchases$Subscriptionsv2$Revoke, + options: StreamMethodOptions + ): GaxiosPromise; + revoke( + params?: Params$Resource$Purchases$Subscriptionsv2$Revoke, + options?: MethodOptions + ): GaxiosPromise; + revoke( + params: Params$Resource$Purchases$Subscriptionsv2$Revoke, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + revoke( + params: Params$Resource$Purchases$Subscriptionsv2$Revoke, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + revoke( + params: Params$Resource$Purchases$Subscriptionsv2$Revoke, + callback: BodyResponseCallback + ): void; + revoke( + callback: BodyResponseCallback + ): void; + revoke( + paramsOrCallback?: + | Params$Resource$Purchases$Subscriptionsv2$Revoke + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Purchases$Subscriptionsv2$Revoke; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Purchases$Subscriptionsv2$Revoke; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://androidpublisher.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + + '/androidpublisher/v3/applications/{packageName}/purchases/subscriptionsv2/tokens/{token}:revoke' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['packageName', 'token'], + pathParams: ['packageName', 'token'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } } export interface Params$Resource$Purchases$Subscriptionsv2$Get @@ -14050,6 +15085,22 @@ export namespace androidpublisher_v3 { */ token?: string; } + export interface Params$Resource$Purchases$Subscriptionsv2$Revoke + extends StandardParameters { + /** + * Required. The package of the application for which this subscription was purchased (for example, 'com.some.thing'). + */ + packageName?: string; + /** + * Required. The token provided to the user's device when the subscription was purchased. + */ + token?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RevokeSubscriptionPurchaseRequest; + } export class Resource$Purchases$Voidedpurchases { context: APIRequestContext;