Skip to content

Commit 4ab8d20

Browse files
yoshi-automationmiguelvelezsa
authored andcommitted
feat(analyticsadmin): update the API
#### analyticsadmin:v1alpha The following keys were added: - resources.properties.methods.submitUserDeletion.description - resources.properties.methods.submitUserDeletion.flatPath - resources.properties.methods.submitUserDeletion.httpMethod - resources.properties.methods.submitUserDeletion.id - resources.properties.methods.submitUserDeletion.parameterOrder - resources.properties.methods.submitUserDeletion.parameters.name.description - resources.properties.methods.submitUserDeletion.parameters.name.location - resources.properties.methods.submitUserDeletion.parameters.name.pattern - resources.properties.methods.submitUserDeletion.parameters.name.required - resources.properties.methods.submitUserDeletion.parameters.name.type - resources.properties.methods.submitUserDeletion.path - resources.properties.methods.submitUserDeletion.request.$ref - resources.properties.methods.submitUserDeletion.response.$ref - resources.properties.methods.submitUserDeletion.scopes - schemas.GoogleAnalyticsAdminV1alphaSubmitUserDeletionRequest.description - schemas.GoogleAnalyticsAdminV1alphaSubmitUserDeletionRequest.id - schemas.GoogleAnalyticsAdminV1alphaSubmitUserDeletionRequest.properties.appInstanceId.description - schemas.GoogleAnalyticsAdminV1alphaSubmitUserDeletionRequest.properties.appInstanceId.type - schemas.GoogleAnalyticsAdminV1alphaSubmitUserDeletionRequest.properties.clientId.description - schemas.GoogleAnalyticsAdminV1alphaSubmitUserDeletionRequest.properties.clientId.type - schemas.GoogleAnalyticsAdminV1alphaSubmitUserDeletionRequest.properties.userId.description - schemas.GoogleAnalyticsAdminV1alphaSubmitUserDeletionRequest.properties.userId.type - schemas.GoogleAnalyticsAdminV1alphaSubmitUserDeletionRequest.properties.userProvidedData.description - schemas.GoogleAnalyticsAdminV1alphaSubmitUserDeletionRequest.properties.userProvidedData.type - schemas.GoogleAnalyticsAdminV1alphaSubmitUserDeletionRequest.type - schemas.GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse.description - schemas.GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse.id - schemas.GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse.properties.deletionRequestTime.description - schemas.GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse.properties.deletionRequestTime.format - schemas.GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse.properties.deletionRequestTime.type - schemas.GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse.type
1 parent ce5e547 commit 4ab8d20

File tree

2 files changed

+265
-1
lines changed

2 files changed

+265
-1
lines changed

discovery/analyticsadmin-v1alpha.json

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,34 @@
975975
"https://www.googleapis.com/auth/analytics.readonly"
976976
]
977977
},
978+
"submitUserDeletion": {
979+
"description": "Submits a request for user deletion for a property.",
980+
"flatPath": "v1alpha/properties/{propertiesId}:submitUserDeletion",
981+
"httpMethod": "POST",
982+
"id": "analyticsadmin.properties.submitUserDeletion",
983+
"parameterOrder": [
984+
"name"
985+
],
986+
"parameters": {
987+
"name": {
988+
"description": "Required. The name of the property to submit user deletion for.",
989+
"location": "path",
990+
"pattern": "^properties/[^/]+$",
991+
"required": true,
992+
"type": "string"
993+
}
994+
},
995+
"path": "v1alpha/{+name}:submitUserDeletion",
996+
"request": {
997+
"$ref": "GoogleAnalyticsAdminV1alphaSubmitUserDeletionRequest"
998+
},
999+
"response": {
1000+
"$ref": "GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse"
1001+
},
1002+
"scopes": [
1003+
"https://www.googleapis.com/auth/analytics.edit"
1004+
]
1005+
},
9781006
"updateAttributionSettings": {
9791007
"description": "Updates attribution settings on a property.",
9801008
"flatPath": "v1alpha/properties/{propertiesId}/attributionSettings",
@@ -5058,7 +5086,7 @@
50585086
}
50595087
}
50605088
},
5061-
"revision": "20250713",
5089+
"revision": "20250723",
50625090
"rootUrl": "https://analyticsadmin.googleapis.com/",
50635091
"schemas": {
50645092
"GoogleAnalyticsAdminV1alphaAccessBetweenFilter": {
@@ -9127,6 +9155,41 @@
91279155
},
91289156
"type": "object"
91299157
},
9158+
"GoogleAnalyticsAdminV1alphaSubmitUserDeletionRequest": {
9159+
"description": "Request message for SubmitUserDeletion RPC.",
9160+
"id": "GoogleAnalyticsAdminV1alphaSubmitUserDeletionRequest",
9161+
"properties": {
9162+
"appInstanceId": {
9163+
"description": "Firebase [application instance ID](https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.html#getAppInstanceId).",
9164+
"type": "string"
9165+
},
9166+
"clientId": {
9167+
"description": "Google Analytics [client ID](https://support.google.com/analytics/answer/11593727).",
9168+
"type": "string"
9169+
},
9170+
"userId": {
9171+
"description": "Google Analytics [user ID](https://firebase.google.com/docs/analytics/userid).",
9172+
"type": "string"
9173+
},
9174+
"userProvidedData": {
9175+
"description": "[User-provided data](https://support.google.com/analytics/answer/14077171). May contain either one email address or one phone number. Email addresses should be normalized as such: * lowercase * remove periods before @ for gmail.com/googlemail.com addresses * remove all spaces Phone numbers should be normalized as such: * remove all non digit characters * add + prefix",
9176+
"type": "string"
9177+
}
9178+
},
9179+
"type": "object"
9180+
},
9181+
"GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse": {
9182+
"description": "Response message for SubmitUserDeletion RPC.",
9183+
"id": "GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse",
9184+
"properties": {
9185+
"deletionRequestTime": {
9186+
"description": "Marks the moment for which all visitor data before this point should be deleted. This is set to the time at which the deletion request was received.",
9187+
"format": "google-datetime",
9188+
"type": "string"
9189+
}
9190+
},
9191+
"type": "object"
9192+
},
91309193
"GoogleAnalyticsAdminV1alphaSubpropertyEventFilter": {
91319194
"description": "A resource message representing a Google Analytics subproperty event filter.",
91329195
"id": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter",

src/apis/analyticsadmin/v1alpha.ts

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2845,6 +2845,36 @@ export namespace analyticsadmin_v1alpha {
28452845
*/
28462846
postbackWindowTwo?: Schema$GoogleAnalyticsAdminV1alphaPostbackWindow;
28472847
}
2848+
/**
2849+
* Request message for SubmitUserDeletion RPC.
2850+
*/
2851+
export interface Schema$GoogleAnalyticsAdminV1alphaSubmitUserDeletionRequest {
2852+
/**
2853+
* Firebase [application instance ID](https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.html#getAppInstanceId).
2854+
*/
2855+
appInstanceId?: string | null;
2856+
/**
2857+
* Google Analytics [client ID](https://support.google.com/analytics/answer/11593727).
2858+
*/
2859+
clientId?: string | null;
2860+
/**
2861+
* Google Analytics [user ID](https://firebase.google.com/docs/analytics/userid).
2862+
*/
2863+
userId?: string | null;
2864+
/**
2865+
* [User-provided data](https://support.google.com/analytics/answer/14077171). May contain either one email address or one phone number. Email addresses should be normalized as such: * lowercase * remove periods before @ for gmail.com/googlemail.com addresses * remove all spaces Phone numbers should be normalized as such: * remove all non digit characters * add + prefix
2866+
*/
2867+
userProvidedData?: string | null;
2868+
}
2869+
/**
2870+
* Response message for SubmitUserDeletion RPC.
2871+
*/
2872+
export interface Schema$GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse {
2873+
/**
2874+
* Marks the moment for which all visitor data before this point should be deleted. This is set to the time at which the deletion request was received.
2875+
*/
2876+
deletionRequestTime?: string | null;
2877+
}
28482878
/**
28492879
* A resource message representing a Google Analytics subproperty event filter.
28502880
*/
@@ -8101,6 +8131,165 @@ export namespace analyticsadmin_v1alpha {
81018131
}
81028132
}
81038133

8134+
/**
8135+
* Submits a request for user deletion for a property.
8136+
* @example
8137+
* ```js
8138+
* // Before running the sample:
8139+
* // - Enable the API at:
8140+
* // https://console.developers.google.com/apis/api/analyticsadmin.googleapis.com
8141+
* // - Login into gcloud by running:
8142+
* // ```sh
8143+
* // $ gcloud auth application-default login
8144+
* // ```
8145+
* // - Install the npm module by running:
8146+
* // ```sh
8147+
* // $ npm install googleapis
8148+
* // ```
8149+
*
8150+
* const {google} = require('googleapis');
8151+
* const analyticsadmin = google.analyticsadmin('v1alpha');
8152+
*
8153+
* async function main() {
8154+
* const auth = new google.auth.GoogleAuth({
8155+
* // Scopes can be specified either as an array or as a single, space-delimited string.
8156+
* scopes: ['https://www.googleapis.com/auth/analytics.edit'],
8157+
* });
8158+
*
8159+
* // Acquire an auth client, and bind it to all future calls
8160+
* const authClient = await auth.getClient();
8161+
* google.options({auth: authClient});
8162+
*
8163+
* // Do the magic
8164+
* const res = await analyticsadmin.properties.submitUserDeletion({
8165+
* // Required. The name of the property to submit user deletion for.
8166+
* name: 'properties/my-propertie',
8167+
*
8168+
* // Request body metadata
8169+
* requestBody: {
8170+
* // request body parameters
8171+
* // {
8172+
* // "appInstanceId": "my_appInstanceId",
8173+
* // "clientId": "my_clientId",
8174+
* // "userId": "my_userId",
8175+
* // "userProvidedData": "my_userProvidedData"
8176+
* // }
8177+
* },
8178+
* });
8179+
* console.log(res.data);
8180+
*
8181+
* // Example response
8182+
* // {
8183+
* // "deletionRequestTime": "my_deletionRequestTime"
8184+
* // }
8185+
* }
8186+
*
8187+
* main().catch(e => {
8188+
* console.error(e);
8189+
* throw e;
8190+
* });
8191+
*
8192+
* ```
8193+
*
8194+
* @param params - Parameters for request
8195+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
8196+
* @param callback - Optional callback that handles the response.
8197+
* @returns A promise if used with async/await, or void if used with a callback.
8198+
*/
8199+
submitUserDeletion(
8200+
params: Params$Resource$Properties$Submituserdeletion,
8201+
options: StreamMethodOptions
8202+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
8203+
submitUserDeletion(
8204+
params?: Params$Resource$Properties$Submituserdeletion,
8205+
options?: MethodOptions
8206+
): Promise<
8207+
GaxiosResponseWithHTTP2<Schema$GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse>
8208+
>;
8209+
submitUserDeletion(
8210+
params: Params$Resource$Properties$Submituserdeletion,
8211+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
8212+
callback: BodyResponseCallback<Readable>
8213+
): void;
8214+
submitUserDeletion(
8215+
params: Params$Resource$Properties$Submituserdeletion,
8216+
options:
8217+
| MethodOptions
8218+
| BodyResponseCallback<Schema$GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse>,
8219+
callback: BodyResponseCallback<Schema$GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse>
8220+
): void;
8221+
submitUserDeletion(
8222+
params: Params$Resource$Properties$Submituserdeletion,
8223+
callback: BodyResponseCallback<Schema$GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse>
8224+
): void;
8225+
submitUserDeletion(
8226+
callback: BodyResponseCallback<Schema$GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse>
8227+
): void;
8228+
submitUserDeletion(
8229+
paramsOrCallback?:
8230+
| Params$Resource$Properties$Submituserdeletion
8231+
| BodyResponseCallback<Schema$GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse>
8232+
| BodyResponseCallback<Readable>,
8233+
optionsOrCallback?:
8234+
| MethodOptions
8235+
| StreamMethodOptions
8236+
| BodyResponseCallback<Schema$GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse>
8237+
| BodyResponseCallback<Readable>,
8238+
callback?:
8239+
| BodyResponseCallback<Schema$GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse>
8240+
| BodyResponseCallback<Readable>
8241+
):
8242+
| void
8243+
| Promise<
8244+
GaxiosResponseWithHTTP2<Schema$GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse>
8245+
>
8246+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
8247+
let params = (paramsOrCallback ||
8248+
{}) as Params$Resource$Properties$Submituserdeletion;
8249+
let options = (optionsOrCallback || {}) as MethodOptions;
8250+
8251+
if (typeof paramsOrCallback === 'function') {
8252+
callback = paramsOrCallback;
8253+
params = {} as Params$Resource$Properties$Submituserdeletion;
8254+
options = {};
8255+
}
8256+
8257+
if (typeof optionsOrCallback === 'function') {
8258+
callback = optionsOrCallback;
8259+
options = {};
8260+
}
8261+
8262+
const rootUrl =
8263+
options.rootUrl || 'https://analyticsadmin.googleapis.com/';
8264+
const parameters = {
8265+
options: Object.assign(
8266+
{
8267+
url: (rootUrl + '/v1alpha/{+name}:submitUserDeletion').replace(
8268+
/([^:]\/)\/+/g,
8269+
'$1'
8270+
),
8271+
method: 'POST',
8272+
apiVersion: '',
8273+
},
8274+
options
8275+
),
8276+
params,
8277+
requiredParams: ['name'],
8278+
pathParams: ['name'],
8279+
context: this.context,
8280+
};
8281+
if (callback) {
8282+
createAPIRequest<Schema$GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse>(
8283+
parameters,
8284+
callback as BodyResponseCallback<unknown>
8285+
);
8286+
} else {
8287+
return createAPIRequest<Schema$GoogleAnalyticsAdminV1alphaSubmitUserDeletionResponse>(
8288+
parameters
8289+
);
8290+
}
8291+
}
8292+
81048293
/**
81058294
* Updates attribution settings on a property.
81068295
* @example
@@ -8704,6 +8893,18 @@ export namespace analyticsadmin_v1alpha {
87048893
*/
87058894
requestBody?: Schema$GoogleAnalyticsAdminV1alphaRunAccessReportRequest;
87068895
}
8896+
export interface Params$Resource$Properties$Submituserdeletion
8897+
extends StandardParameters {
8898+
/**
8899+
* Required. The name of the property to submit user deletion for.
8900+
*/
8901+
name?: string;
8902+
8903+
/**
8904+
* Request body metadata
8905+
*/
8906+
requestBody?: Schema$GoogleAnalyticsAdminV1alphaSubmitUserDeletionRequest;
8907+
}
87078908
export interface Params$Resource$Properties$Updateattributionsettings
87088909
extends StandardParameters {
87098910
/**

0 commit comments

Comments
 (0)