@@ -2845,6 +2845,36 @@ export namespace analyticsadmin_v1alpha {
2845
2845
*/
2846
2846
postbackWindowTwo?: Schema$GoogleAnalyticsAdminV1alphaPostbackWindow;
2847
2847
}
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
+ }
2848
2878
/**
2849
2879
* A resource message representing a Google Analytics subproperty event filter.
2850
2880
*/
@@ -8101,6 +8131,165 @@ export namespace analyticsadmin_v1alpha {
8101
8131
}
8102
8132
}
8103
8133
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
+
8104
8293
/**
8105
8294
* Updates attribution settings on a property.
8106
8295
* @example
@@ -8704,6 +8893,18 @@ export namespace analyticsadmin_v1alpha {
8704
8893
*/
8705
8894
requestBody?: Schema$GoogleAnalyticsAdminV1alphaRunAccessReportRequest;
8706
8895
}
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
+ }
8707
8908
export interface Params$Resource$Properties$Updateattributionsettings
8708
8909
extends StandardParameters {
8709
8910
/**
0 commit comments