UNPKG

googleapis

Version:
1,096 lines 284 kB
/// <reference types="node" /> import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common'; import { Readable } from 'stream'; export declare namespace analyticsadmin_v1alpha { export interface Options extends GlobalOptions { version: 'v1alpha'; } interface StandardParameters { /** * Auth client or API Key for the request */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth; /** * V1 error format. */ '$.xgafv'?: string; /** * OAuth access token. */ access_token?: string; /** * Data format for response. */ alt?: string; /** * JSONP */ callback?: string; /** * Selector specifying which fields to include in a partial response. */ fields?: string; /** * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ key?: string; /** * OAuth 2.0 token for the current user. */ oauth_token?: string; /** * Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** * Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** * Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; } /** * Google Analytics Admin API * * * * @example * ```js * const {google} = require('googleapis'); * const analyticsadmin = google.analyticsadmin('v1alpha'); * ``` */ export class Analyticsadmin { context: APIRequestContext; accounts: Resource$Accounts; accountSummaries: Resource$Accountsummaries; properties: Resource$Properties; constructor(options: GlobalOptions, google?: GoogleConfigurable); } /** * A resource message representing a Google Analytics account. */ export interface Schema$GoogleAnalyticsAdminV1alphaAccount { /** * Output only. Time when this account was originally created. */ createTime?: string | null; /** * Output only. Indicates whether this Account is soft-deleted or not. Deleted accounts are excluded from List results unless specifically requested. */ deleted?: boolean | null; /** * Required. Human-readable display name for this account. */ displayName?: string | null; /** * Output only. Resource name of this account. Format: accounts/{account\} Example: "accounts/100" */ name?: string | null; /** * Country of business. Must be a Unicode CLDR region code. */ regionCode?: string | null; /** * Output only. Time when account payload fields were last updated. */ updateTime?: string | null; } /** * A virtual resource representing an overview of an account and all its child GA4 properties. */ export interface Schema$GoogleAnalyticsAdminV1alphaAccountSummary { /** * Resource name of account referred to by this account summary Format: accounts/{account_id\} Example: "accounts/1000" */ account?: string | null; /** * Display name for the account referred to in this account summary. */ displayName?: string | null; /** * Resource name for this account summary. Format: accountSummaries/{account_id\} Example: "accountSummaries/1000" */ name?: string | null; /** * List of summaries for child accounts of this account. */ propertySummaries?: Schema$GoogleAnalyticsAdminV1alphaPropertySummary[]; } /** * A resource message representing a Google Analytics Android app stream. */ export interface Schema$GoogleAnalyticsAdminV1alphaAndroidAppDataStream { /** * Output only. Time when this stream was originally created. */ createTime?: string | null; /** * Human-readable display name for the Data Stream. The max allowed display name length is 255 UTF-16 code units. */ displayName?: string | null; /** * Output only. ID of the corresponding Android app in Firebase, if any. This ID can change if the Android app is deleted and recreated. */ firebaseAppId?: string | null; /** * Output only. Resource name of this Data Stream. Format: properties/{property_id\}/androidAppDataStreams/{stream_id\} Example: "properties/1000/androidAppDataStreams/2000" */ name?: string | null; /** * Immutable. The package name for the app being measured. Example: "com.example.myandroidapp" */ packageName?: string | null; /** * Output only. Time when stream payload fields were last updated. */ updateTime?: string | null; } /** * Read-only resource used to summarize a principal's effective roles. */ export interface Schema$GoogleAnalyticsAdminV1alphaAuditUserLink { /** * Roles directly assigned to this user for this entity. Format: predefinedRoles/read Excludes roles that are inherited from an account (if this is for a property), group, or organization admin role. */ directRoles?: string[] | null; /** * Union of all permissions a user has at this account or property (includes direct permissions, group-inherited permissions, etc.). Format: predefinedRoles/read */ effectiveRoles?: string[] | null; /** * Email address of the linked user */ emailAddress?: string | null; /** * Example format: properties/1234/userLinks/5678 */ name?: string | null; } /** * Request message for AuditUserLinks RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaAuditUserLinksRequest { /** * The maximum number of user links to return. The service may return fewer than this value. If unspecified, at most 1000 user links will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000. */ pageSize?: number | null; /** * A page token, received from a previous `AuditUserLinks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `AuditUserLinks` must match the call that provided the page token. */ pageToken?: string | null; } /** * Response message for AuditUserLinks RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaAuditUserLinksResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string | null; /** * List of AuditUserLinks. These will be ordered stably, but in an arbitrary order. */ userLinks?: Schema$GoogleAnalyticsAdminV1alphaAuditUserLink[]; } /** * Request message for BatchCreateUserLinks RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaBatchCreateUserLinksRequest { /** * Optional. If set, then email the new users notifying them that they've been granted permissions to the resource. Regardless of whether this is set or not, notify_new_user field inside each individual request is ignored. */ notifyNewUsers?: boolean | null; /** * Required. The requests specifying the user links to create. A maximum of 1000 user links can be created in a batch. */ requests?: Schema$GoogleAnalyticsAdminV1alphaCreateUserLinkRequest[]; } /** * Response message for BatchCreateUserLinks RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaBatchCreateUserLinksResponse { /** * The user links created. */ userLinks?: Schema$GoogleAnalyticsAdminV1alphaUserLink[]; } /** * Request message for BatchDeleteUserLinks RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest { /** * Required. The requests specifying the user links to update. A maximum of 1000 user links can be updated in a batch. */ requests?: Schema$GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest[]; } /** * Response message for BatchGetUserLinks RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaBatchGetUserLinksResponse { /** * The requested user links. */ userLinks?: Schema$GoogleAnalyticsAdminV1alphaUserLink[]; } /** * Request message for BatchUpdateUserLinks RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksRequest { /** * Required. The requests specifying the user links to update. A maximum of 1000 user links can be updated in a batch. */ requests?: Schema$GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest[]; } /** * Response message for BatchUpdateUserLinks RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaBatchUpdateUserLinksResponse { /** * The user links updated. */ userLinks?: Schema$GoogleAnalyticsAdminV1alphaUserLink[]; } /** * A description of a change to a single Google Analytics resource. */ export interface Schema$GoogleAnalyticsAdminV1alphaChangeHistoryChange { /** * The type of action that changed this resource. */ action?: string | null; /** * Resource name of the resource whose changes are described by this entry. */ resource?: string | null; /** * Resource contents from after the change was made. If this resource was deleted in this change, this field will be missing. */ resourceAfterChange?: Schema$GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource; /** * Resource contents from before the change was made. If this resource was created in this change, this field will be missing. */ resourceBeforeChange?: Schema$GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource; } /** * A snapshot of a resource as before or after the result of a change in change history. */ export interface Schema$GoogleAnalyticsAdminV1alphaChangeHistoryChangeChangeHistoryResource { /** * A snapshot of an Account resource in change history. */ account?: Schema$GoogleAnalyticsAdminV1alphaAccount; /** * A snapshot of an AndroidAppDataStream resource in change history. */ androidAppDataStream?: Schema$GoogleAnalyticsAdminV1alphaAndroidAppDataStream; /** * A snapshot of a FirebaseLink resource in change history. */ firebaseLink?: Schema$GoogleAnalyticsAdminV1alphaFirebaseLink; /** * A snapshot of a GoogleAdsLink resource in change history. */ googleAdsLink?: Schema$GoogleAnalyticsAdminV1alphaGoogleAdsLink; /** * A snapshot of an IosAppDataStream resource in change history. */ iosAppDataStream?: Schema$GoogleAnalyticsAdminV1alphaIosAppDataStream; /** * A snapshot of a Property resource in change history. */ property?: Schema$GoogleAnalyticsAdminV1alphaProperty; /** * A snapshot of a WebDataStream resource in change history. */ webDataStream?: Schema$GoogleAnalyticsAdminV1alphaWebDataStream; } /** * A set of changes within a Google Analytics account or its child properties that resulted from the same cause. Common causes would be updates made in the Google Analytics UI, changes from customer support, or automatic Google Analytics system changes. */ export interface Schema$GoogleAnalyticsAdminV1alphaChangeHistoryEvent { /** * The type of actor that made this change. */ actorType?: string | null; /** * A list of changes made in this change history event that fit the filters specified in SearchChangeHistoryEventsRequest. */ changes?: Schema$GoogleAnalyticsAdminV1alphaChangeHistoryChange[]; /** * If true, then the list of changes returned was filtered, and does not represent all changes that occurred in this event. */ changesFiltered?: boolean | null; /** * Time when change was made. */ changeTime?: string | null; /** * ID of this change history event. This ID is unique across Google Analytics. */ id?: string | null; /** * Email address of the Google account that made the change. This will be a valid email address if the actor field is set to USER, and empty otherwise. Google accounts that have been deleted will cause an error. */ userActorEmail?: string | null; } /** * Request message for CreateUserLink RPC. Users can have multiple email addresses associated with their Google account, and one of these email addresses is the "primary" email address. Any of the email addresses associated with a Google account may be used for a new UserLink, but the returned UserLink will always contain the "primary" email address. As a result, the input and output email address for this request may differ. */ export interface Schema$GoogleAnalyticsAdminV1alphaCreateUserLinkRequest { /** * Optional. If set, then email the new user notifying them that they've been granted permissions to the resource. */ notifyNewUser?: boolean | null; /** * Required. Example format: accounts/1234 */ parent?: string | null; /** * Required. The user link to create. */ userLink?: Schema$GoogleAnalyticsAdminV1alphaUserLink; } /** * A resource message representing data sharing settings of a Google Analytics account. */ export interface Schema$GoogleAnalyticsAdminV1alphaDataSharingSettings { /** * Output only. Resource name. Format: accounts/{account\}/dataSharingSettings Example: "accounts/1000/dataSharingSettings" */ name?: string | null; /** * Allows any of Google sales to access the data in order to suggest configuration changes to improve results. */ sharingWithGoogleAnySalesEnabled?: boolean | null; /** * Allows Google sales teams that are assigned to the customer to access the data in order to suggest configuration changes to improve results. Sales team restrictions still apply when enabled. */ sharingWithGoogleAssignedSalesEnabled?: boolean | null; /** * Allows Google to use the data to improve other Google products or services. */ sharingWithGoogleProductsEnabled?: boolean | null; /** * Allows Google support to access the data in order to help troubleshoot issues. */ sharingWithGoogleSupportEnabled?: boolean | null; /** * Allows Google to share the data anonymously in aggregate form with others. */ sharingWithOthersEnabled?: boolean | null; } /** * Request message for DeleteUserLink RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaDeleteUserLinkRequest { /** * Required. Example format: accounts/1234/userLinks/5678 */ name?: string | null; } /** * Singleton resource under a WebDataStream, configuring measurement of additional site interactions and content. */ export interface Schema$GoogleAnalyticsAdminV1alphaEnhancedMeasurementSettings { /** * If enabled, capture a file download event each time a link is clicked with a common document, compressed file, application, video, or audio extension. */ fileDownloadsEnabled?: boolean | null; /** * Output only. Resource name of this Data Stream. Format: properties/{property_id\}/webDataStreams/{stream_id\}/enhancedMeasurementSettings Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings" */ name?: string | null; /** * If enabled, capture an outbound click event each time a visitor clicks a link that leads them away from your domain. */ outboundClicksEnabled?: boolean | null; /** * If enabled, capture a page view event each time the website changes the browser history state. */ pageChangesEnabled?: boolean | null; /** * Output only. If enabled, capture a page view event each time a page loads. */ pageLoadsEnabled?: boolean | null; /** * Output only. If enabled, capture a page view event each time a page loads or the website changes the browser history state. */ pageViewsEnabled?: boolean | null; /** * If enabled, capture scroll events each time a visitor gets to the bottom of a page. */ scrollsEnabled?: boolean | null; /** * Required. URL query parameters to interpret as site search parameters. Max length is 1024 characters. Must not be empty. */ searchQueryParameter?: string | null; /** * If enabled, capture a view search results event each time a visitor performs a search on your site (based on a query parameter). */ siteSearchEnabled?: boolean | null; /** * Indicates whether Enhanced Measurement Settings will be used to automatically measure interactions and content on this web stream. Changing this value does not affect the settings themselves, but determines whether they are respected. */ streamEnabled?: boolean | null; /** * Additional URL query parameters. Max length is 1024 characters. */ uriQueryParameter?: string | null; /** * If enabled, capture video play, progress, and complete events as visitors view embedded videos on your site. */ videoEngagementEnabled?: boolean | null; } /** * A link between an GA4 property and a Firebase project. */ export interface Schema$GoogleAnalyticsAdminV1alphaFirebaseLink { /** * Output only. Time when this FirebaseLink was originally created. */ createTime?: string | null; /** * Maximum user access to the GA4 property allowed to admins of the linked Firebase project. */ maximumUserAccess?: string | null; /** * Output only. Example format: properties/1234/firebaseLinks/5678 */ name?: string | null; /** * Immutable. Firebase project resource name. When creating a FirebaseLink, you may provide this resource name using either a project number or project ID. Once this resource has been created, returned FirebaseLinks will always have a project_name that contains a project number. Format: 'projects/{project number\}' Example: 'projects/1234' */ project?: string | null; } /** * Read-only resource with the tag for sending data from a website to a WebDataStream. */ export interface Schema$GoogleAnalyticsAdminV1alphaGlobalSiteTag { /** * Output only. Resource name for this GlobalSiteTag resource. Format: properties/{propertyId\}/globalSiteTag */ name?: string | null; /** * Immutable. JavaScript code snippet to be pasted as the first item into the head tag of every webpage to measure. */ snippet?: string | null; } /** * A link between an GA4 property and a Google Ads account. */ export interface Schema$GoogleAnalyticsAdminV1alphaGoogleAdsLink { /** * Enable personalized advertising features with this integration. Automatically publish my Google Analytics audience lists and Google Analytics remarketing events/parameters to the linked Google Ads account. If this field is not set on create/update it will be defaulted to true. */ adsPersonalizationEnabled?: boolean | null; /** * Output only. If true, this link is for a Google Ads manager account. */ canManageClients?: boolean | null; /** * Output only. Time when this link was originally created. */ createTime?: string | null; /** * Immutable. Google Ads customer ID. */ customerId?: string | null; /** * Output only. Email address of the user that created the link. An empty string will be returned if the email address can't be retrieved. */ emailAddress?: string | null; /** * Output only. Format: properties/{propertyId\}/googleAdsLinks/{googleAdsLinkId\} Note: googleAdsLinkId is not the Google Ads customer ID. */ name?: string | null; /** * Output only. Time when this link was last updated. */ updateTime?: string | null; } /** * A resource message representing a Google Analytics IOS app stream. */ export interface Schema$GoogleAnalyticsAdminV1alphaIosAppDataStream { /** * Required. Immutable. The Apple App Store Bundle ID for the app Example: "com.example.myiosapp" */ bundleId?: string | null; /** * Output only. Time when this stream was originally created. */ createTime?: string | null; /** * Human-readable display name for the Data Stream. The max allowed display name length is 255 UTF-16 code units. */ displayName?: string | null; /** * Output only. ID of the corresponding iOS app in Firebase, if any. This ID can change if the iOS app is deleted and recreated. */ firebaseAppId?: string | null; /** * Output only. Resource name of this Data Stream. Format: properties/{property_id\}/iosAppDataStreams/{stream_id\} Example: "properties/1000/iosAppDataStreams/2000" */ name?: string | null; /** * Output only. Time when stream payload fields were last updated. */ updateTime?: string | null; } /** * Request message for ListAccounts RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaListAccountsResponse { /** * Results that were accessible to the caller. */ accounts?: Schema$GoogleAnalyticsAdminV1alphaAccount[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string | null; } /** * Response message for ListAccountSummaries RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaListAccountSummariesResponse { /** * Account summaries of all accounts the caller has access to. */ accountSummaries?: Schema$GoogleAnalyticsAdminV1alphaAccountSummary[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string | null; } /** * Request message for ListAndroidDataStreams RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaListAndroidAppDataStreamsResponse { /** * Results that matched the filter criteria and were accessible to the caller. */ androidAppDataStreams?: Schema$GoogleAnalyticsAdminV1alphaAndroidAppDataStream[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string | null; } /** * Response message for ListFirebaseLinks RPC */ export interface Schema$GoogleAnalyticsAdminV1alphaListFirebaseLinksResponse { /** * List of FirebaseLinks. This will have at most one value. */ firebaseLinks?: Schema$GoogleAnalyticsAdminV1alphaFirebaseLink[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. Currently, Google Analytics supports only one FirebaseLink per property, so this will never be populated. */ nextPageToken?: string | null; } /** * Response message for ListGoogleAdsLinks RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaListGoogleAdsLinksResponse { /** * List of GoogleAdsLinks. */ googleAdsLinks?: Schema$GoogleAnalyticsAdminV1alphaGoogleAdsLink[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string | null; } /** * Request message for ListIosAppDataStreams RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaListIosAppDataStreamsResponse { /** * Results that matched the filter criteria and were accessible to the caller. */ iosAppDataStreams?: Schema$GoogleAnalyticsAdminV1alphaIosAppDataStream[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string | null; } /** * Response message for ListProperties RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaListPropertiesResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string | null; /** * Results that matched the filter criteria and were accessible to the caller. */ properties?: Schema$GoogleAnalyticsAdminV1alphaProperty[]; } /** * Response message for ListUserLinks RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaListUserLinksResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string | null; /** * List of UserLinks. These will be ordered stably, but in an arbitrary order. */ userLinks?: Schema$GoogleAnalyticsAdminV1alphaUserLink[]; } /** * Request message for ListWebDataStreams RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaListWebDataStreamsResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string | null; /** * Results that matched the filter criteria and were accessible to the caller. */ webDataStreams?: Schema$GoogleAnalyticsAdminV1alphaWebDataStream[]; } /** * A resource message representing a Google Analytics GA4 property. */ export interface Schema$GoogleAnalyticsAdminV1alphaProperty { /** * Output only. Time when the entity was originally created. */ createTime?: string | null; /** * The currency type used in reports involving monetary values. Format: https://en.wikipedia.org/wiki/ISO_4217 Examples: "USD", "EUR", "JPY" */ currencyCode?: string | null; /** * Output only. Indicates whether this Property is soft-deleted or not. Deleted properties are excluded from List results unless specifically requested. */ deleted?: boolean | null; /** * Required. Human-readable display name for this property. The max allowed display name length is 100 UTF-16 code units. */ displayName?: string | null; /** * Industry associated with this property Example: AUTOMOTIVE, FOOD_AND_DRINK */ industryCategory?: string | null; /** * Output only. Resource name of this property. Format: properties/{property_id\} Example: "properties/1000" */ name?: string | null; /** * Immutable. Resource name of this property's logical parent. Note: The Property-Moving UI can be used to change the parent. Format: accounts/{account\} Example: "accounts/100" */ parent?: string | null; /** * Required. Reporting Time Zone, used as the day boundary for reports, regardless of where the data originates. If the time zone honors DST, Analytics will automatically adjust for the changes. NOTE: Changing the time zone only affects data going forward, and is not applied retroactively. Format: https://www.iana.org/time-zones Example: "America/Los_Angeles" */ timeZone?: string | null; /** * Output only. Time when entity payload fields were last updated. */ updateTime?: string | null; } /** * A virtual resource representing metadata for an GA4 property. */ export interface Schema$GoogleAnalyticsAdminV1alphaPropertySummary { /** * Display name for the property referred to in this account summary. */ displayName?: string | null; /** * Resource name of property referred to by this property summary Format: properties/{property_id\} Example: "properties/1000" */ property?: string | null; } /** * Request message for ProvisionAccountTicket RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaProvisionAccountTicketRequest { /** * The account to create. */ account?: Schema$GoogleAnalyticsAdminV1alphaAccount; /** * Redirect URI where the user will be sent after accepting Terms of Service. Must be configured in Developers Console as a Redirect URI */ redirectUri?: string | null; } /** * Response message for ProvisionAccountTicket RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse { /** * The param to be passed in the ToS link. */ accountTicketId?: string | null; } /** * Request message for SearchChangeHistoryEvents RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest { /** * Optional. If set, only return changes that match one or more of these types of actions. */ action?: string[] | null; /** * Optional. If set, only return changes if they are made by a user in this list. */ actorEmail?: string[] | null; /** * Optional. If set, only return changes made after this time (inclusive). */ earliestChangeTime?: string | null; /** * Optional. If set, only return changes made before this time (inclusive). */ latestChangeTime?: string | null; /** * Optional. The maximum number of ChangeHistoryEvent items to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 items will be returned. The maximum value is 200 (higher values will be coerced to the maximum). */ pageSize?: number | null; /** * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `SearchChangeHistoryEvents` must match the call that provided the page token. */ pageToken?: string | null; /** * Optional. Resource name for a child property. If set, only return changes made to this property or its child resources. */ property?: string | null; /** * Optional. If set, only return changes if they are for a resource that matches at least one of these types. */ resourceType?: string[] | null; } /** * Response message for SearchAccounts RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsResponse { /** * Results that were accessible to the caller. */ changeHistoryEvents?: Schema$GoogleAnalyticsAdminV1alphaChangeHistoryEvent[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */ nextPageToken?: string | null; } /** * Request message for UpdateUserLink RPC. */ export interface Schema$GoogleAnalyticsAdminV1alphaUpdateUserLinkRequest { /** * Required. The user link to update. */ userLink?: Schema$GoogleAnalyticsAdminV1alphaUserLink; } /** * A resource message representing a user's permissions on an Account or Property resource. */ export interface Schema$GoogleAnalyticsAdminV1alphaUserLink { /** * Roles directly assigned to this user for this account or property. Valid values: predefinedRoles/read predefinedRoles/collaborate predefinedRoles/edit predefinedRoles/manage-users Excludes roles that are inherited from a higher-level entity, group, or organization admin role. A UserLink that is updated to have an empty list of direct_roles will be deleted. */ directRoles?: string[] | null; /** * Email address of the user to link */ emailAddress?: string | null; /** * Example format: properties/1234/userLinks/5678 */ name?: string | null; } /** * A resource message representing a Google Analytics web stream. */ export interface Schema$GoogleAnalyticsAdminV1alphaWebDataStream { /** * Output only. Time when this stream was originally created. */ createTime?: string | null; /** * Immutable. Domain name of the web app being measured, or empty. Example: "http://www.google.com", "https://www.google.com" */ defaultUri?: string | null; /** * Required. Human-readable display name for the Data Stream. The max allowed display name length is 100 UTF-16 code units. */ displayName?: string | null; /** * Output only. ID of the corresponding web app in Firebase, if any. This ID can change if the web app is deleted and recreated. */ firebaseAppId?: string | null; /** * Output only. Analytics "Measurement ID", without the "G-" prefix. Example: "G-1A2BCD345E" would just be "1A2BCD345E" */ measurementId?: string | null; /** * Output only. Resource name of this Data Stream. Format: properties/{property_id\}/webDataStreams/{stream_id\} Example: "properties/1000/webDataStreams/2000" */ name?: string | null; /** * Output only. Time when stream payload fields were last updated. */ updateTime?: string | null; } /** * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \} The JSON representation for `Empty` is empty JSON object `{\}`. */ export interface Schema$GoogleProtobufEmpty { } export class Resource$Accounts { context: APIRequestContext; userLinks: Resource$Accounts$Userlinks; constructor(context: APIRequestContext); /** * Marks target Account as soft-deleted (ie: "trashed") and returns it. This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI. If the accounts are not restored before the expiration time, the account and all child resources (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found. * @example * ```js * // Before running the sample: * // - Enable the API at: * // https://console.developers.google.com/apis/api/analyticsadmin.googleapis.com * // - Login into gcloud by running: * // `$ gcloud auth application-default login` * // - Install the npm module by running: * // `$ npm install googleapis` * * const {google} = require('googleapis'); * const analyticsadmin = google.analyticsadmin('v1alpha'); * * async function main() { * const auth = new google.auth.GoogleAuth({ * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: ['https://www.googleapis.com/auth/analytics.edit'], * }); * * // Acquire an auth client, and bind it to all future calls * const authClient = await auth.getClient(); * google.options({auth: authClient}); * * // Do the magic * const res = await analyticsadmin.accounts.delete({ * // Required. The name of the Account to soft-delete. Format: accounts/{account\} Example: "accounts/100" * name: 'accounts/my-account', * }); * console.log(res.data); * * // Example response * // {} * } * * main().catch(e => { * console.error(e); * throw e; * }); * * ``` * * @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. */ delete(params: Params$Resource$Accounts$Delete, options: StreamMethodOptions): GaxiosPromise<Readable>; delete(params?: Params$Resource$Accounts$Delete, options?: MethodOptions): GaxiosPromise<Schema$GoogleProtobufEmpty>; delete(params: Params$Resource$Accounts$Delete, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void; delete(params: Params$Resource$Accounts$Delete, options: MethodOptions | BodyResponseCallback<Schema$GoogleProtobufEmpty>, callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void; delete(params: Params$Resource$Accounts$Delete, callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void; delete(callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void; /** * Lookup for a single Account. * @example * ```js * // Before running the sample: * // - Enable the API at: * // https://console.developers.google.com/apis/api/analyticsadmin.googleapis.com * // - Login into gcloud by running: * // `$ gcloud auth application-default login` * // - Install the npm module by running: * // `$ npm install googleapis` * * const {google} = require('googleapis'); * const analyticsadmin = google.analyticsadmin('v1alpha'); * * async function main() { * const auth = new google.auth.GoogleAuth({ * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/analytics.edit', * 'https://www.googleapis.com/auth/analytics.readonly', * ], * }); * * // Acquire an auth client, and bind it to all future calls * const authClient = await auth.getClient(); * google.options({auth: authClient}); * * // Do the magic * const res = await analyticsadmin.accounts.get({ * // Required. The name of the account to lookup. Format: accounts/{account\} Example: "accounts/100" * name: 'accounts/my-account', * }); * console.log(res.data); * * // Example response * // { * // "createTime": "my_createTime", * // "deleted": false, * // "displayName": "my_displayName", * // "name": "my_name", * // "regionCode": "my_regionCode", * // "updateTime": "my_updateTime" * // } * } * * main().catch(e => { * console.error(e); * throw e; * }); * * ``` * * @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$Accounts$Get, options: StreamMethodOptions): GaxiosPromise<Readable>; get(params?: Params$Resource$Accounts$Get, options?: MethodOptions): GaxiosPromise<Schema$GoogleAnalyticsAdminV1alphaAccount>; get(params: Params$Resource$Accounts$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void; get(params: Params$Resource$Accounts$Get, options: MethodOptions | BodyResponseCallback<Schema$GoogleAnalyticsAdminV1alphaAccount>, callback: BodyResponseCallback<Schema$GoogleAnalyticsAdminV1alphaAccount>): void; get(params: Params$Resource$Accounts$Get, callback: BodyResponseCallback<Schema$GoogleAnalyticsAdminV1alphaAccount>): void; get(callback: BodyResponseCallback<Schema$GoogleAnalyticsAdminV1alphaAccount>): void; /** * Get data sharing settings on an account. Data sharing settings are singletons. * @example * ```js * // Before running the sample: * // - Enable the API at: * // https://console.developers.google.com/apis/api/analyticsadmin.googleapis.com * // - Login into gcloud by running: * // `$ gcloud auth application-default login` * // - Install the npm module by running: * // `$ npm install googleapis` * * const {google} = require('googleapis'); * const analyticsadmin = google.analyticsadmin('v1alpha'); * * async function main() { * const auth = new google.auth.GoogleAuth({ * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/analytics.edit', * 'https://www.googleapis.com/auth/analytics.readonly', * ], * }); * * // Acquire an auth client, and bind it to all future calls * const authClient = await auth.getClient(); * google.options({auth: authClient}); * * // Do the magic * const res = await analyticsadmin.accounts.getDataSharingSettings({ * // Required. The name of the settings to lookup. Format: accounts/{account\}/dataSharingSettings Example: "accounts/1000/dataSharingSettings" * name: 'accounts/my-account/dataSharingSettings', * }); * console.log(res.data); * * // Example response * // { * // "name": "my_name", * // "sharingWithGoogleAnySalesEnabled": false, * // "sharingWithGoogleAssignedSalesEnabled": false, * // "sharingWithGoogleProductsEnabled": false, * // "sharingWithGoogleSupportEnabled": false, * // "sharingWithOthersEnabled": false * // } * } * * main().catch(e => { * console.error(e); * throw e; * }); * * ``` * * @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. */ getDataSharingSettings(params: Params$Resource$Accounts$Getdatasharingsettings, options: StreamMethodOptions): GaxiosPromise<Readable>; getDataSharingSettings(params?: Params$Resource$Accounts$Getdatasharingsettings, options?: MethodOptions): GaxiosPromise<Schema$GoogleAnalyticsAdminV1alphaDataSharingSettings>; getDataSharingSettings(params: Params$Resource$Accounts$Getdatasharingsettings, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void; getDataSharingSettings(params: Params$Resource$Accounts$Getdatasharingsettings, options: MethodOptions | BodyResponseCallback<Schema$GoogleAnalyticsAdminV1alphaDataSharingSettings>, callback: BodyResponseCallback<Schema$GoogleAnalyticsAdminV1alphaDataSharingSettings>): void; getDataSharingSettings(params: Params$Resource$Accounts$Getdatasharingsettings, callback: BodyResponseCallback<Schema$GoogleAnalyticsAdminV1alphaDataSharingSettings>): void; getDataSharingSettings(callback: BodyResponseCallback<Schema$GoogleAnalyticsAdminV1alphaDataSharingSettings>): void; /** * Returns all accounts accessible by the caller. Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are found. * @example * ```js * // Before running the sample: * // - Enable the API at: * // https://console.developers.google.com/apis/api/analyticsadmin.googleapis.com * // - Login into gcloud by running: * // `$ gcloud auth application-default login` * // - Install the npm module by running: * // `$ npm install googleapis` * * const {google} = require('googleapis'); * const analyticsadmin = google.analyticsadmin('v1alpha'); * * async function main() { * const auth = new google.auth.GoogleAuth({ * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: [ * 'https://www.googleapis.com/auth/analytics.edit', * 'https://www.googleapis.com/auth/analytics.readonly', * ], * }); * * // Acquire an auth client, and bind it to all future calls * const authClient = await auth.getClient(); * google.options({auth: authClient}); * * // Do the magic * const res = await analyticsadmin.accounts.list({ * // The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum) * pageSize: 'placeholder-value', * // A page token, received from a previous `ListAccounts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAccounts` must match the call that provided the page token. * pageToken: 'placeholder-value', * // Whether to include soft-deleted (ie: "trashed") Accounts in the results. Accounts can be inspected to determine whether they are deleted or not. * showDeleted: 'placeholder-value', * }); * console.log(res.data); * * // Example response * // { * // "accounts": [], * // "nextPageToken": "my_nextPageToken" * // } * } * * main().catch(e => { * console.error(e); * throw e; * }); * * ``` * * @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 v