// Copyright 2022 Luca Casonato. All rights reserved. MIT license. /** * Checks API Client for Deno * ========================== * * The Checks API contains powerful and easy-to-use privacy and compliance APIs that interact with the Checks product and its underlying technology. * * Docs: https://developers.google.com/checks * Source: https://googleapis.deno.dev/v1/checks:v1alpha.ts */ import { auth, CredentialsClient, GoogleAuth, request } from "/_/base@v1/mod.ts"; export { auth, GoogleAuth }; export type { CredentialsClient }; /** * The Checks API contains powerful and easy-to-use privacy and compliance APIs * that interact with the Checks product and its underlying technology. */ export class Checks { #client: CredentialsClient | undefined; #baseUrl: string; constructor(client?: CredentialsClient, baseUrl: string = "https://checks.googleapis.com/") { this.#client = client; this.#baseUrl = baseUrl; } /** * Gets an app. * * @param name Required. Resource name of the app. Example: `accounts/123/apps/456` */ async accountsAppsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleChecksAccountV1alphaApp; } /** * Lists the apps under the given account. * * @param parent Required. The parent account. Example: `accounts/123` */ async accountsAppsList(parent: string, opts: AccountsAppsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ parent }/apps`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleChecksAccountV1alphaListAppsResponse; } /** * Starts asynchronous cancellation on a long-running operation. The server * makes a best effort to cancel the operation, but success is not guaranteed. * If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or * other methods to check whether the cancellation succeeded or whether the * operation completed despite cancellation. On successful cancellation, the * operation is not deleted; instead, it becomes an operation with an * Operation.error value with a google.rpc.Status.code of `1`, corresponding * to `Code.CANCELLED`. * * @param name The name of the operation resource to be cancelled. */ async accountsAppsOperationsCancel(name: string, req: CancelOperationRequest): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }:cancel`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Empty; } /** * Deletes a long-running operation. This method indicates that the client is * no longer interested in the operation result. It does not cancel the * operation. If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. * * @param name The name of the operation resource to be deleted. */ async accountsAppsOperationsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async accountsAppsOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Operation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async accountsAppsOperationsList(name: string, opts: AccountsAppsOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }/operations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListOperationsResponse; } /** * Waits until the specified long-running operation is done or reaches at * most a specified timeout, returning the latest state. If the operation is * already done, the latest state is immediately returned. If the timeout * specified is greater than the default HTTP/RPC timeout, the HTTP/RPC * timeout is used. If the server does not support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort * basis. It may return the latest state before the specified timeout * (including immediately), meaning even an immediate response is no guarantee * that the operation is done. * * @param name The name of the operation resource to wait on. */ async accountsAppsOperationsWait(name: string, req: WaitOperationRequest): Promise { req = serializeWaitOperationRequest(req); const url = new URL(`${this.#baseUrl}v1alpha/${ name }:wait`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Gets a report. By default, only the name and results_uri fields are * returned. You can include other fields by listing them in the `fields` URL * query parameter. For example, `?fields=name,checks` will return the name * and checks fields. * * @param name Required. Resource name of the report. Example: `accounts/123/apps/456/reports/789` */ async accountsAppsReportsGet(name: string, opts: AccountsAppsReportsGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); if (opts.checksFilter !== undefined) { url.searchParams.append("checksFilter", String(opts.checksFilter)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleChecksReportV1alphaReport(data); } /** * Lists reports for the specified app. By default, only the name and * results_uri fields are returned. You can include other fields by listing * them in the `fields` URL query parameter. For example, * `?fields=reports(name,checks)` will return the name and checks fields. * * @param parent Required. Resource name of the app. Example: `accounts/123/apps/456` */ async accountsAppsReportsList(parent: string, opts: AccountsAppsReportsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ parent }/reports`); if (opts.checksFilter !== undefined) { url.searchParams.append("checksFilter", String(opts.checksFilter)); } if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleChecksReportV1alphaListReportsResponse(data); } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async accountsReposOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Operation; } /** * Uploads the results of local Code Compliance analysis and generates a scan * of privacy issues. Returns a google.longrunning.Operation containing * analysis and findings. * * @param parent Required. Resource name of the repo. Example: `accounts/123/repos/456` */ async accountsReposScansGenerate(parent: string, req: GoogleChecksRepoScanV1alphaGenerateScanRequest): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ parent }/scans:generate`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Gets a repo scan. By default, only the name and results_uri fields are * returned. You can include other fields by listing them in the `fields` URL * query parameter. For example, `?fields=name,sources` will return the name * and sources fields. * * @param name Required. Resource name of the repo scan. Example: `accounts/123/repos/456/scans/789` */ async accountsReposScansGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleChecksRepoScanV1alphaRepoScan; } /** * Lists repo scans for the specified repo. * * @param parent Required. Resource name of the repo. Example: `accounts/123/repos/456` */ async accountsReposScansList(parent: string, opts: AccountsReposScansListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ parent }/scans`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleChecksRepoScanV1alphaListRepoScansResponse; } /** * Analyze a piece of content with the provided set of policies. * */ async aisafetyClassifyContent(req: GoogleChecksAisafetyV1alphaClassifyContentRequest): Promise { const url = new URL(`${this.#baseUrl}v1alpha/aisafety:classifyContent`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleChecksAisafetyV1alphaClassifyContentResponse; } /** * Analyzes the uploaded app bundle and returns a * google.longrunning.Operation containing the generated Report. ## Example * (upload only) Send a regular POST request with the header * `X-Goog-Upload-Protocol: raw`. ``` POST * https://checks.googleapis.com/upload/v1alpha/{parent=accounts/*\/apps/*}/reports:analyzeUpload * HTTP/1.1 X-Goog-Upload-Protocol: raw Content-Length: Content-Type: * application/octet-stream ``` ## Example (upload with metadata) Send a * multipart POST request where the first body part contains the metadata JSON * and the second body part contains the binary upload. Include the header * `X-Goog-Upload-Protocol: multipart`. ``` POST * https://checks.googleapis.com/upload/v1alpha/{parent=accounts/*\/apps/*}/reports:analyzeUpload * HTTP/1.1 X-Goog-Upload-Protocol: multipart Content-Length: ? Content-Type: * multipart/related; boundary=BOUNDARY --BOUNDARY Content-Type: * application/json * {"code_reference_id":"db5bcc20f94055fb5bc08cbb9b0e7a5530308786"} --BOUNDARY * --BOUNDARY-- ``` *Note:* Metadata-only requests are not supported. * * @param parent Required. Resource name of the app. Example: `accounts/123/apps/456` */ async mediaUpload(parent: string, req: GoogleChecksReportV1alphaAnalyzeUploadRequest): Promise { const url = new URL(`${this.#baseUrl}v1alpha/${ parent }/reports:analyzeUpload`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } } /** * Additional options for Checks#accountsAppsList. */ export interface AccountsAppsListOptions { /** * Optional. The maximum number of results to return. The server may further * constrain the maximum number of results returned in a single page. If * unspecified, the server will decide the number of results to be returned. */ pageSize?: number; /** * Optional. A page token received from a previous `ListApps` call. Provide * this to retrieve the subsequent page. */ pageToken?: string; } /** * Additional options for Checks#accountsAppsOperationsList. */ export interface AccountsAppsOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; } /** * Additional options for Checks#accountsAppsReportsGet. */ export interface AccountsAppsReportsGetOptions { /** * Optional. An [AIP-160](https://google.aip.dev/160) filter string to filter * checks within the report. Only checks that match the filter string are * included in the response. Example: `state = FAILED` */ checksFilter?: string; } /** * Additional options for Checks#accountsAppsReportsList. */ export interface AccountsAppsReportsListOptions { /** * Optional. An [AIP-160](https://google.aip.dev/160) filter string to filter * checks within reports. Only checks that match the filter string are * included in the response. Example: `state = FAILED` */ checksFilter?: string; /** * Optional. An [AIP-160](https://google.aip.dev/160) filter string to filter * reports. Example: `appBundle.releaseType = PRE_RELEASE` */ filter?: string; /** * Optional. The maximum number of reports to return. If unspecified, at most * 10 reports will be returned. The maximum value is 50; values above 50 will * be coerced to 50. */ pageSize?: number; /** * Optional. A page token received from a previous `ListReports` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters provided to `ListReports` must match the call that provided the * page token. */ pageToken?: string; } /** * Additional options for Checks#accountsReposScansList. */ export interface AccountsReposScansListOptions { /** * Optional. An [AIP-160](https://google.aip.dev/160) filter string to filter * repo scans. Example: `scmMetadata.branch = main` */ filter?: string; /** * Optional. The maximum number of repo scans to return. If unspecified, at * most 10 repo scans will be returned. The maximum value is 50; values above * 50 will be coerced to 50. */ pageSize?: number; /** * Optional. A page token received from a previous `ListRepoScans` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters provided to `ListRepoScans` must match the call that provided * the page token. */ pageToken?: string; } /** * The request message for Operations.CancelOperation. */ export interface CancelOperationRequest { } /** * 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); } */ export interface Empty { } /** * Represents an app in Checks. */ export interface GoogleChecksAccountV1alphaApp { /** * The resource name of the app. Example: `accounts/123/apps/456` */ name?: string; /** * The app's title. */ title?: string; } /** * The response message for AccountService.ListApps. */ export interface GoogleChecksAccountV1alphaListAppsResponse { /** * The apps. */ apps?: GoogleChecksAccountV1alphaApp[]; /** * 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; } /** * Request proto for ClassifyContent RPC. */ export interface GoogleChecksAisafetyV1alphaClassifyContentRequest { /** * Optional. Version of the classifier to use. If not specified, the latest * version will be used. */ classifierVersion?: | "CLASSIFIER_VERSION_UNSPECIFIED" | "STABLE" | "LATEST"; /** * Optional. Context about the input that will be used to help on the * classification. */ context?: GoogleChecksAisafetyV1alphaClassifyContentRequestContext; /** * Required. Content to be classified. */ input?: GoogleChecksAisafetyV1alphaClassifyContentRequestInputContent; /** * Required. List of policies to classify against. */ policies?: GoogleChecksAisafetyV1alphaClassifyContentRequestPolicyConfig[]; } /** * Context about the input that will be used to help on the classification. */ export interface GoogleChecksAisafetyV1alphaClassifyContentRequestContext { /** * Optional. Prompt that generated the model response. */ prompt?: string; } /** * Content to be classified. */ export interface GoogleChecksAisafetyV1alphaClassifyContentRequestInputContent { /** * Content in text format. */ textInput?: GoogleChecksAisafetyV1alphaTextInput; } /** * List of policies to classify against. */ export interface GoogleChecksAisafetyV1alphaClassifyContentRequestPolicyConfig { /** * Required. Type of the policy. */ policyType?: | "POLICY_TYPE_UNSPECIFIED" | "DANGEROUS_CONTENT" | "PII_SOLICITING_RECITING" | "HARASSMENT" | "SEXUALLY_EXPLICIT" | "HATE_SPEECH" | "MEDICAL_INFO" | "VIOLENCE_AND_GORE" | "OBSCENITY_AND_PROFANITY"; /** * Optional. Score threshold to use when deciding if the content is violative * or non-violative. If not specified, the default 0.5 threshold for the * policy will be used. */ threshold?: number; } /** * Response proto for ClassifyContent RPC. */ export interface GoogleChecksAisafetyV1alphaClassifyContentResponse { /** * Results of the classification for each policy. */ policyResults?: GoogleChecksAisafetyV1alphaClassifyContentResponsePolicyResult[]; } /** * Result for one policy against the corresponding input. */ export interface GoogleChecksAisafetyV1alphaClassifyContentResponsePolicyResult { /** * Type of the policy. */ policyType?: | "POLICY_TYPE_UNSPECIFIED" | "DANGEROUS_CONTENT" | "PII_SOLICITING_RECITING" | "HARASSMENT" | "SEXUALLY_EXPLICIT" | "HATE_SPEECH" | "MEDICAL_INFO" | "VIOLENCE_AND_GORE" | "OBSCENITY_AND_PROFANITY"; /** * Final score for the results of this policy. */ score?: number; /** * Result of the classification for the policy. */ violationResult?: | "VIOLATION_RESULT_UNSPECIFIED" | "VIOLATIVE" | "NON_VIOLATIVE" | "CLASSIFICATION_ERROR"; } /** * Text input to be classified. */ export interface GoogleChecksAisafetyV1alphaTextInput { /** * Actual piece of text to be classified. */ content?: string; /** * Optional. Language of the text in ISO 639-1 format. If the language is * invalid or not specified, the system will try to detect it. */ languageCode?: string; } /** * The request message for ReportService.AnalyzeUpload. */ export interface GoogleChecksReportV1alphaAnalyzeUploadRequest { /** * Optional. The type of the uploaded app binary. If not provided, the server * assumes APK file for Android and IPA file for iOS. */ appBinaryFileType?: | "APP_BINARY_FILE_TYPE_UNSPECIFIED" | "ANDROID_APK" | "ANDROID_AAB" | "IOS_IPA"; /** * Optional. Git commit hash or changelist number associated with the upload. */ codeReferenceId?: string; } /** * Information about the analyzed app bundle. */ export interface GoogleChecksReportV1alphaAppBundle { /** * Unique id of the bundle. For example: "com.google.Gmail". */ bundleId?: string; /** * Git commit hash or changelist number associated with the release. */ codeReferenceId?: string; /** * Identifies the type of release. */ releaseType?: | "APP_BUNDLE_RELEASE_TYPE_UNSPECIFIED" | "PUBLIC" | "PRE_RELEASE"; /** * The user-visible version of the bundle such as the Android `versionName` * or iOS `CFBundleShortVersionString`. For example: "7.21.1". */ version?: string; /** * The version used throughout the operating system and store to identify the * build such as the Android `versionCode` or iOS `CFBundleVersion`. */ versionId?: string; } /** * A check that was run on your app. */ export interface GoogleChecksReportV1alphaCheck { /** * Regulations and policies that serve as the legal basis for the check. */ citations?: GoogleChecksReportV1alphaCheckCitation[]; /** * Evidence that substantiates the check result. */ evidence?: GoogleChecksReportV1alphaCheckEvidence; /** * Regions that are impacted by the check. For more info, see * https://google.aip.dev/143#countries-and-regions. */ regionCodes?: string[]; /** * The urgency or risk level of the check. */ severity?: | "CHECK_SEVERITY_UNSPECIFIED" | "PRIORITY" | "POTENTIAL" | "OPPORTUNITY"; /** * The result after running the check. */ state?: | "CHECK_STATE_UNSPECIFIED" | "PASSED" | "FAILED" | "UNCHECKED"; /** * Additional information about the check state in relation to past reports. */ stateMetadata?: GoogleChecksReportV1alphaCheckStateMetadata; /** * The type of check that was run. A type will only appear once in a report's * list of checks. */ type?: | "CHECK_TYPE_UNSPECIFIED" | "STORE_LISTING_PRIVACY_POLICY_LINK_PRESENT" | "PRIVACY_POLICY_UPDATE_DATE_RECENT" | "PRIVACY_POLICY_GDPR_GENERAL_RULES" | "PRIVACY_POLICY_CCPA_GENERAL_RULES" | "PRIVACY_POLICY_COLLECTION_CATEGORIES_DATA_NOTICE" | "PRIVACY_POLICY_PROCESSING_PURPOSE_DATA_NOTICE" | "PRIVACY_POLICY_SHARING_CATEGORIES_DATA_NOTICE" | "PRIVACY_POLICY_DATA_RETENTION_NOTICE" | "PRIVACY_POLICY_CONTACT_DETAILS_NOTICE" | "PRIVACY_POLICY_CHILDREN_GENERAL_RULES" | "PRIVACY_POLICY_DATA_TYPE_PHONE_NUMBER" | "PRIVACY_POLICY_DATA_TYPE_USER_ACCOUNT_INFO" | "PRIVACY_POLICY_DATA_TYPE_PRECISE_LOCATION" | "PRIVACY_POLICY_DATA_TYPE_DEVICE_ID" | "PRIVACY_POLICY_DATA_TYPE_APPS_ON_DEVICE" | "PRIVACY_POLICY_DATA_TYPE_CONTACTS" | "PRIVACY_POLICY_DATA_TYPE_TEXT_MESSAGES" | "PRIVACY_POLICY_DATA_TYPE_PII" | "PRIVACY_POLICY_DATA_TYPE_PII_CATEGORIES" | "PRIVACY_POLICY_DATA_TYPE_HEALTH_AND_BIOMETRIC" | "PRIVACY_POLICY_BRAZIL_LGPD_GENERAL_RULES" | "PRIVACY_POLICY_VIRGINIA_VCDPA_GENERAL_RULES" | "PRIVACY_POLICY_AFFILIATION_MENTION" | "PRIVACY_POLICY_RIGHT_TO_DELETE_NOTICE" | "PRIVACY_POLICY_RIGHT_TO_ACCESS_NOTICE" | "PRIVACY_POLICY_RIGHT_TO_RECTIFICATION_NOTICE" | "PRIVACY_POLICY_RIGHT_TO_KNOW_ABOUT_SELLING_NOTICE" | "PRIVACY_POLICY_RIGHT_TO_KNOW_ABOUT_SHARING_NOTICE" | "PRIVACY_POLICY_RIGHT_TO_OPT_OUT_FROM_SELLING_NOTICE" | "PRIVACY_POLICY_METHOD_TO_OPT_OUT_FROM_SELLING_OR_SHARING_NOTICE" | "PRIVACY_POLICY_DATA_CONTROLLER_IDENTITY" | "PRIVACY_POLICY_DPO_CONTACT_DETAILS" | "PRIVACY_POLICY_RIGHT_TO_LODGE_A_COMPLAINT" | "PRIVACY_POLICY_LEGAL_BASIS" | "PRIVACY_POLICY_CHILDREN_INFO_COLLECTION" | "PRIVACY_POLICY_CHILDREN_INFO_USAGE_PURPOSES" | "PRIVACY_POLICY_CHILDREN_INFO_DISCLOSURE_PRACTICES" | "PRIVACY_POLICY_CHILDREN_INFO_PUBLICITY" | "PRIVACY_POLICY_PARENTS_METHOD_OF_INFO_DELETION" | "PRIVACY_POLICY_PARENTS_METHOD_TO_INFO_REVIEW" | "PRIVACY_POLICY_PARENTS_METHOD_TO_STOP_FURTHER_INFO_COLLECTION_USE" | "PRIVACY_POLICY_PARENTS_RIGHT_TO_INFO_DELETION" | "PRIVACY_POLICY_PARENTS_RIGHT_TO_INFO_REVIEW" | "PRIVACY_POLICY_PARENTS_RIGHT_TO_STOP_FURTHER_INFO_COLLECTION_USE" | "PRIVACY_POLICY_PSL_APPROXIMATE_LOCATION" | "PRIVACY_POLICY_PSL_PRECISE_LOCATION" | "PRIVACY_POLICY_PSL_NAME" | "PRIVACY_POLICY_PSL_EMAIL_ADDRESS" | "PRIVACY_POLICY_PSL_USER_IDENTIFIERS" | "PRIVACY_POLICY_PSL_ADDRESS" | "PRIVACY_POLICY_PSL_PHONE_NUMBER" | "PRIVACY_POLICY_PSL_RACE_AND_ETHNICITY" | "PRIVACY_POLICY_PSL_CREDIT_SCORE" | "PRIVACY_POLICY_PSL_PURCHASE_HISTORY" | "PRIVACY_POLICY_PSL_HEALTH_INFO" | "PRIVACY_POLICY_PSL_FITNESS_INFO" | "PRIVACY_POLICY_PSL_EMAIL_MESSAGES" | "PRIVACY_POLICY_PSL_TEXT_MESSAGES" | "PRIVACY_POLICY_PSL_PHOTOS" | "PRIVACY_POLICY_PSL_VIDEOS" | "PRIVACY_POLICY_PSL_MUSIC_FILES" | "PRIVACY_POLICY_PSL_VOICE_OR_SOUND_RECORDINGS" | "PRIVACY_POLICY_PSL_FILES_AND_DOCS" | "PRIVACY_POLICY_PSL_CALENDAR_EVENTS" | "PRIVACY_POLICY_PSL_CONTACTS" | "PRIVACY_POLICY_PSL_APP_INTERACTIONS" | "PRIVACY_POLICY_PSL_IN_APP_SEARCH_HISTORY" | "PRIVACY_POLICY_PSL_WEB_BROWSING_HISTORY" | "PRIVACY_POLICY_PSL_INSTALLED_APPS" | "PRIVACY_POLICY_PSL_CRASH_LOGS" | "PRIVACY_POLICY_PSL_DIAGNOSTICS" | "PRIVACY_POLICY_PSL_DEVICE_OR_OTHER_IDS" | "DATA_MONITORING_NEW_ENDPOINT" | "DATA_MONITORING_NEW_PERMISSION" | "DATA_MONITORING_NEW_DATA_TYPE" | "DATA_MONITORING_NEW_SDK" | "DATA_MONITORING_ENCRYPTION" | "DATA_MONITORING_NEW_DATA_TYPE_VERSION_DIFF" | "DATA_MONITORING_NEW_ENDPOINT_VERSION_DIFF" | "DATA_MONITORING_NEW_PERMISSION_VERSION_DIFF" | "DATA_MONITORING_NEW_SDK_VERSION_DIFF" | "DATA_MONITORING_SDKS_DENYLIST_VIOLATION" | "DATA_MONITORING_PERMISSIONS_DENYLIST_VIOLATION" | "DATA_MONITORING_ENDPOINTS_DENYLIST_VIOLATION" | "DATA_MONITORING_OUTDATED_SDK_VERSION" | "DATA_MONITORING_CRITICAL_SDK_ISSUE" | "PRIVACY_POLICY_DATA_TYPE_SENSITIVE_INFO" | "DATA_MONITORING_PII_LOGCAT_LEAK" | "DATA_MONITORING_MINIMIZE_PERMISSION_MEDIA" | "DATA_MONITORING_MINIMIZE_PERMISSION_CAMERA" | "DATA_MONITORING_MINIMIZE_PERMISSION_DOCUMENTS"; } function serializeGoogleChecksReportV1alphaCheck(data: any): GoogleChecksReportV1alphaCheck { return { ...data, stateMetadata: data["stateMetadata"] !== undefined ? serializeGoogleChecksReportV1alphaCheckStateMetadata(data["stateMetadata"]) : undefined, }; } function deserializeGoogleChecksReportV1alphaCheck(data: any): GoogleChecksReportV1alphaCheck { return { ...data, stateMetadata: data["stateMetadata"] !== undefined ? deserializeGoogleChecksReportV1alphaCheckStateMetadata(data["stateMetadata"]) : undefined, }; } /** * Regulation or policy that serves as the legal basis for the check. */ export interface GoogleChecksReportV1alphaCheckCitation { /** * Citation type. */ type?: | "CITATION_TYPE_UNSPECIFIED" | "COPPA" | "GDPR" | "FERPA" | "CAL_OPPA" | "CCPA" | "SOPIPA" | "LGPD" | "CPRA" | "VCDPA" | "GOOGLE_PLAY_POLICY" | "APP_STORE_POLICY" | "CPA" | "CTDPA" | "UCPA" | "PIPEDA" | "ALBERTA_PIPA" | "QUEBEC_ACT" | "QUEBEC_BILL_64" | "CHINA_PIPL" | "SOUTH_KOREA_PIPA" | "SOUTH_AFRICA_POPIA" | "JAPAN_APPI" | "INDIA_DPDPA" | "OCPA" | "TDPSA" | "MCDPA"; } /** * Evidence concerning data security. */ export interface GoogleChecksReportV1alphaCheckDataSecurityEvidence { /** * Evidence related to data in transit. */ dataInTransitInfo?: GoogleChecksReportV1alphaCheckDataSecurityEvidenceDataInTransitInfo[]; } /** * Evidence related to data in transit detected in your app. */ export interface GoogleChecksReportV1alphaCheckDataSecurityEvidenceDataInTransitInfo { /** * The URL contacted by your app. This includes the protocol, domain, and URL * parameters. */ uri?: string; } /** * Evidence concerning a data type that was found in your app. */ export interface GoogleChecksReportV1alphaCheckDataTypeEvidence { /** * The data type that was found in your app. */ dataType?: | "DATA_TYPE_UNSPECIFIED" | "DATA_TYPE_APPROXIMATE_LOCATION" | "DATA_TYPE_PRECISE_LOCATION" | "DATA_TYPE_PERSONAL_NAME" | "DATA_TYPE_EMAIL_ADDRESS" | "DATA_TYPE_USER_IDS" | "DATA_TYPE_PHYSICAL_ADDRESS" | "DATA_TYPE_PHONE_NUMBER" | "DATA_TYPE_RACE_AND_ETHNICITY" | "DATA_TYPE_POLITICAL_OR_RELIGIOUS_BELIEFS" | "DATA_TYPE_SEXUAL_ORIENTATION" | "DATA_TYPE_OTHER_PERSONAL_INFO" | "DATA_TYPE_PAYMENT_INFO" | "DATA_TYPE_PURCHASE_HISTORY" | "DATA_TYPE_CREDIT_SCORE" | "DATA_TYPE_OTHER_FINANCIAL_INFO" | "DATA_TYPE_HEALTH_INFO" | "DATA_TYPE_FITNESS_INFO" | "DATA_TYPE_EMAILS" | "DATA_TYPE_TEXT_MESSAGES" | "DATA_TYPE_OTHER_IN_APP_MESSAGES" | "DATA_TYPE_PHOTOS" | "DATA_TYPE_VIDEOS" | "DATA_TYPE_VOICE_OR_SOUND_RECORDINGS" | "DATA_TYPE_MUSIC_FILES" | "DATA_TYPE_OTHER_AUDIO_FILES" | "DATA_TYPE_FILES_AND_DOCS" | "DATA_TYPE_CALENDAR_EVENTS" | "DATA_TYPE_CONTACTS" | "DATA_TYPE_APP_INTERACTIONS" | "DATA_TYPE_IN_APP_SEARCH_HISTORY" | "DATA_TYPE_INSTALLED_APPS" | "DATA_TYPE_OTHER_USER_GENERATED_CONTENT" | "DATA_TYPE_OTHER_ACTIONS" | "DATA_TYPE_WEB_BROWSING_HISTORY" | "DATA_TYPE_CRASH_LOGS" | "DATA_TYPE_PERFORMANCE_DIAGNOSTICS" | "DATA_TYPE_OTHER_APP_PERFORMANCE_DATA" | "DATA_TYPE_DEVICE_OR_OTHER_IDS"; /** * Evidence collected about the data type. */ dataTypeEvidence?: GoogleChecksReportV1alphaDataTypeEvidence; } /** * Evidence concerning an endpoint that was contacted by your app. */ export interface GoogleChecksReportV1alphaCheckEndpointEvidence { /** * The endpoint that was contacted by your app. */ endpoint?: GoogleChecksReportV1alphaEndpoint; } /** * Evidence collected from endpoint restriction violation analysis. */ export interface GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidence { /** * Endpoints in violation. */ endpointDetails?: GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidenceEndpointDetails[]; } /** * Details of the endpoint in violation. */ export interface GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidenceEndpointDetails { /** * The endpoint in violation. */ endpoint?: GoogleChecksReportV1alphaEndpoint; } /** * Evidence for a check. */ export interface GoogleChecksReportV1alphaCheckEvidence { /** * Evidence concerning data security. */ dataSecurity?: GoogleChecksReportV1alphaCheckDataSecurityEvidence; /** * Evidence concerning data types found in your app. */ dataTypes?: GoogleChecksReportV1alphaCheckDataTypeEvidence[]; /** * Evidence collected from endpoint restriction violation analysis. */ endpointRestrictionViolations?: GoogleChecksReportV1alphaCheckEndpointRestrictionViolationEvidence[]; /** * Evidence concerning endpoints that were contacted by your app. */ endpoints?: GoogleChecksReportV1alphaCheckEndpointEvidence[]; /** * Evidence collected from permission restriction violation analysis. */ permissionRestrictionViolations?: GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidence[]; /** * Evidence concerning permissions that were found in your app. */ permissions?: GoogleChecksReportV1alphaCheckPermissionEvidence[]; /** * Evidence collected from your privacy policy(s). */ privacyPolicyTexts?: GoogleChecksReportV1alphaCheckPrivacyPolicyTextEvidence[]; /** * Evidence concerning SDK issues. */ sdkIssues?: GoogleChecksReportV1alphaCheckSdkIssueEvidence[]; /** * Evidence collected from SDK restriction violation analysis. */ sdkRestrictionViolations?: GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidence[]; /** * Evidence concerning SDKs that were found in your app. */ sdks?: GoogleChecksReportV1alphaCheckSdkEvidence[]; } /** * Evidence concerning a permission that was found in your app. */ export interface GoogleChecksReportV1alphaCheckPermissionEvidence { /** * The permission that was found in your app. */ permission?: GoogleChecksReportV1alphaPermission; } /** * Evidence collected from permission restriction violation analysis. */ export interface GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidence { /** * Permissions in violation. */ permissionDetails?: GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidencePermissionDetails[]; } /** * Details of the permission in violation. */ export interface GoogleChecksReportV1alphaCheckPermissionRestrictionViolationEvidencePermissionDetails { /** * The permission in violation. */ permission?: GoogleChecksReportV1alphaPermission; } /** * Evidence collected from your privacy policy(s). */ export interface GoogleChecksReportV1alphaCheckPrivacyPolicyTextEvidence { /** * The privacy policy fragment that was used during the check. */ policyFragment?: GoogleChecksReportV1alphaPolicyFragment; } /** * Evidence conerning an SDK that was found in your app. */ export interface GoogleChecksReportV1alphaCheckSdkEvidence { /** * The SDK that was found in your app. */ sdk?: GoogleChecksReportV1alphaSdk; } /** * Evidence concerning an SDK issue. */ export interface GoogleChecksReportV1alphaCheckSdkIssueEvidence { /** * The SDK with an issue. */ sdk?: GoogleChecksReportV1alphaSdk; /** * The SDK version. */ sdkVersion?: string; } /** * Evidence collected from SDK restriction violation analysis. */ export interface GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidence { /** * SDKs in violation. */ sdkDetails?: GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidenceSdkDetails[]; } /** * Details of the SDK in violation. */ export interface GoogleChecksReportV1alphaCheckSdkRestrictionViolationEvidenceSdkDetails { /** * The SDK in violation. */ sdk?: GoogleChecksReportV1alphaSdk; } /** * Additional information about the check state in relation to past reports. */ export interface GoogleChecksReportV1alphaCheckStateMetadata { /** * Indicators related to the check state. */ badges?: | "CHECK_STATE_BADGE_UNSPECIFIED" | "NEWLY_FAILING" | "RECENTLY_FAILING" | "RESOLVED"[]; /** * The time when the check first started failing. */ firstFailingTime?: Date; /** * The last time the check failed. */ lastFailingTime?: Date; } function serializeGoogleChecksReportV1alphaCheckStateMetadata(data: any): GoogleChecksReportV1alphaCheckStateMetadata { return { ...data, firstFailingTime: data["firstFailingTime"] !== undefined ? data["firstFailingTime"].toISOString() : undefined, lastFailingTime: data["lastFailingTime"] !== undefined ? data["lastFailingTime"].toISOString() : undefined, }; } function deserializeGoogleChecksReportV1alphaCheckStateMetadata(data: any): GoogleChecksReportV1alphaCheckStateMetadata { return { ...data, firstFailingTime: data["firstFailingTime"] !== undefined ? new Date(data["firstFailingTime"]) : undefined, lastFailingTime: data["lastFailingTime"] !== undefined ? new Date(data["lastFailingTime"]) : undefined, }; } /** * Represents the data monitoring section of the report. */ export interface GoogleChecksReportV1alphaDataMonitoring { /** * Data types that your app shares or collects. */ dataTypes?: GoogleChecksReportV1alphaDataMonitoringDataTypeResult[]; /** * Endpoints that were found by dynamic analysis of your app. */ endpoints?: GoogleChecksReportV1alphaDataMonitoringEndpointResult[]; /** * Permissions that your app uses. */ permissions?: GoogleChecksReportV1alphaDataMonitoringPermissionResult[]; /** * SDKs that your app uses. */ sdks?: GoogleChecksReportV1alphaDataMonitoringSdkResult[]; } function serializeGoogleChecksReportV1alphaDataMonitoring(data: any): GoogleChecksReportV1alphaDataMonitoring { return { ...data, dataTypes: data["dataTypes"] !== undefined ? data["dataTypes"].map((item: any) => (serializeGoogleChecksReportV1alphaDataMonitoringDataTypeResult(item))) : undefined, endpoints: data["endpoints"] !== undefined ? data["endpoints"].map((item: any) => (serializeGoogleChecksReportV1alphaDataMonitoringEndpointResult(item))) : undefined, permissions: data["permissions"] !== undefined ? data["permissions"].map((item: any) => (serializeGoogleChecksReportV1alphaDataMonitoringPermissionResult(item))) : undefined, sdks: data["sdks"] !== undefined ? data["sdks"].map((item: any) => (serializeGoogleChecksReportV1alphaDataMonitoringSdkResult(item))) : undefined, }; } function deserializeGoogleChecksReportV1alphaDataMonitoring(data: any): GoogleChecksReportV1alphaDataMonitoring { return { ...data, dataTypes: data["dataTypes"] !== undefined ? data["dataTypes"].map((item: any) => (deserializeGoogleChecksReportV1alphaDataMonitoringDataTypeResult(item))) : undefined, endpoints: data["endpoints"] !== undefined ? data["endpoints"].map((item: any) => (deserializeGoogleChecksReportV1alphaDataMonitoringEndpointResult(item))) : undefined, permissions: data["permissions"] !== undefined ? data["permissions"].map((item: any) => (deserializeGoogleChecksReportV1alphaDataMonitoringPermissionResult(item))) : undefined, sdks: data["sdks"] !== undefined ? data["sdks"].map((item: any) => (deserializeGoogleChecksReportV1alphaDataMonitoringSdkResult(item))) : undefined, }; } /** * Information about a data type that was found in your app. */ export interface GoogleChecksReportV1alphaDataMonitoringDataTypeResult { /** * The data type that was shared or collected by your app. */ dataType?: | "DATA_TYPE_UNSPECIFIED" | "DATA_TYPE_APPROXIMATE_LOCATION" | "DATA_TYPE_PRECISE_LOCATION" | "DATA_TYPE_PERSONAL_NAME" | "DATA_TYPE_EMAIL_ADDRESS" | "DATA_TYPE_USER_IDS" | "DATA_TYPE_PHYSICAL_ADDRESS" | "DATA_TYPE_PHONE_NUMBER" | "DATA_TYPE_RACE_AND_ETHNICITY" | "DATA_TYPE_POLITICAL_OR_RELIGIOUS_BELIEFS" | "DATA_TYPE_SEXUAL_ORIENTATION" | "DATA_TYPE_OTHER_PERSONAL_INFO" | "DATA_TYPE_PAYMENT_INFO" | "DATA_TYPE_PURCHASE_HISTORY" | "DATA_TYPE_CREDIT_SCORE" | "DATA_TYPE_OTHER_FINANCIAL_INFO" | "DATA_TYPE_HEALTH_INFO" | "DATA_TYPE_FITNESS_INFO" | "DATA_TYPE_EMAILS" | "DATA_TYPE_TEXT_MESSAGES" | "DATA_TYPE_OTHER_IN_APP_MESSAGES" | "DATA_TYPE_PHOTOS" | "DATA_TYPE_VIDEOS" | "DATA_TYPE_VOICE_OR_SOUND_RECORDINGS" | "DATA_TYPE_MUSIC_FILES" | "DATA_TYPE_OTHER_AUDIO_FILES" | "DATA_TYPE_FILES_AND_DOCS" | "DATA_TYPE_CALENDAR_EVENTS" | "DATA_TYPE_CONTACTS" | "DATA_TYPE_APP_INTERACTIONS" | "DATA_TYPE_IN_APP_SEARCH_HISTORY" | "DATA_TYPE_INSTALLED_APPS" | "DATA_TYPE_OTHER_USER_GENERATED_CONTENT" | "DATA_TYPE_OTHER_ACTIONS" | "DATA_TYPE_WEB_BROWSING_HISTORY" | "DATA_TYPE_CRASH_LOGS" | "DATA_TYPE_PERFORMANCE_DIAGNOSTICS" | "DATA_TYPE_OTHER_APP_PERFORMANCE_DATA" | "DATA_TYPE_DEVICE_OR_OTHER_IDS"; /** * Evidence collected about the data type. */ dataTypeEvidence?: GoogleChecksReportV1alphaDataTypeEvidence; /** * Metadata about the result. */ metadata?: GoogleChecksReportV1alphaDataMonitoringResultMetadata; } function serializeGoogleChecksReportV1alphaDataMonitoringDataTypeResult(data: any): GoogleChecksReportV1alphaDataMonitoringDataTypeResult { return { ...data, metadata: data["metadata"] !== undefined ? serializeGoogleChecksReportV1alphaDataMonitoringResultMetadata(data["metadata"]) : undefined, }; } function deserializeGoogleChecksReportV1alphaDataMonitoringDataTypeResult(data: any): GoogleChecksReportV1alphaDataMonitoringDataTypeResult { return { ...data, metadata: data["metadata"] !== undefined ? deserializeGoogleChecksReportV1alphaDataMonitoringResultMetadata(data["metadata"]) : undefined, }; } /** * Information about an endpoint that was contacted by your app. */ export interface GoogleChecksReportV1alphaDataMonitoringEndpointResult { /** * The endpoint that was contacted by your app. */ endpoint?: GoogleChecksReportV1alphaEndpoint; /** * The number of times this endpoint was contacted by your app. */ hitCount?: number; /** * Metadata about the result. */ metadata?: GoogleChecksReportV1alphaDataMonitoringResultMetadata; } function serializeGoogleChecksReportV1alphaDataMonitoringEndpointResult(data: any): GoogleChecksReportV1alphaDataMonitoringEndpointResult { return { ...data, metadata: data["metadata"] !== undefined ? serializeGoogleChecksReportV1alphaDataMonitoringResultMetadata(data["metadata"]) : undefined, }; } function deserializeGoogleChecksReportV1alphaDataMonitoringEndpointResult(data: any): GoogleChecksReportV1alphaDataMonitoringEndpointResult { return { ...data, metadata: data["metadata"] !== undefined ? deserializeGoogleChecksReportV1alphaDataMonitoringResultMetadata(data["metadata"]) : undefined, }; } /** * Information about a permission that was found in your app. */ export interface GoogleChecksReportV1alphaDataMonitoringPermissionResult { /** * Metadata about the result. */ metadata?: GoogleChecksReportV1alphaDataMonitoringResultMetadata; /** * The permission that was found in your app. */ permission?: GoogleChecksReportV1alphaPermission; } function serializeGoogleChecksReportV1alphaDataMonitoringPermissionResult(data: any): GoogleChecksReportV1alphaDataMonitoringPermissionResult { return { ...data, metadata: data["metadata"] !== undefined ? serializeGoogleChecksReportV1alphaDataMonitoringResultMetadata(data["metadata"]) : undefined, }; } function deserializeGoogleChecksReportV1alphaDataMonitoringPermissionResult(data: any): GoogleChecksReportV1alphaDataMonitoringPermissionResult { return { ...data, metadata: data["metadata"] !== undefined ? deserializeGoogleChecksReportV1alphaDataMonitoringResultMetadata(data["metadata"]) : undefined, }; } /** * Information about a data monitoring result. */ export interface GoogleChecksReportV1alphaDataMonitoringResultMetadata { /** * Badges that apply to this result. */ badges?: | "DATA_MONITORING_RESULT_BADGE_UNSPECIFIED" | "NEW"[]; /** * The timestamp when this result was first detected within the last 8 weeks. * If not set, it wasn't detected within the last 8 weeks. */ firstDetectedTime?: Date; /** * Your app's version name when this result was last detected within the last * 8 weeks. If not set, it wasn't detected within the last 8 weeks. */ lastDetectedAppVersion?: string; /** * The timestamp when this result was last detected within the last 8 weeks. * If not set, it wasn't detected within the last 8 weeks. */ lastDetectedTime?: Date; } function serializeGoogleChecksReportV1alphaDataMonitoringResultMetadata(data: any): GoogleChecksReportV1alphaDataMonitoringResultMetadata { return { ...data, firstDetectedTime: data["firstDetectedTime"] !== undefined ? data["firstDetectedTime"].toISOString() : undefined, lastDetectedTime: data["lastDetectedTime"] !== undefined ? data["lastDetectedTime"].toISOString() : undefined, }; } function deserializeGoogleChecksReportV1alphaDataMonitoringResultMetadata(data: any): GoogleChecksReportV1alphaDataMonitoringResultMetadata { return { ...data, firstDetectedTime: data["firstDetectedTime"] !== undefined ? new Date(data["firstDetectedTime"]) : undefined, lastDetectedTime: data["lastDetectedTime"] !== undefined ? new Date(data["lastDetectedTime"]) : undefined, }; } /** * Information about an SDK that was found in your app. */ export interface GoogleChecksReportV1alphaDataMonitoringSdkResult { /** * Metadata about the result. */ metadata?: GoogleChecksReportV1alphaDataMonitoringResultMetadata; /** * The SDK that was found in your app. */ sdk?: GoogleChecksReportV1alphaSdk; } function serializeGoogleChecksReportV1alphaDataMonitoringSdkResult(data: any): GoogleChecksReportV1alphaDataMonitoringSdkResult { return { ...data, metadata: data["metadata"] !== undefined ? serializeGoogleChecksReportV1alphaDataMonitoringResultMetadata(data["metadata"]) : undefined, }; } function deserializeGoogleChecksReportV1alphaDataMonitoringSdkResult(data: any): GoogleChecksReportV1alphaDataMonitoringSdkResult { return { ...data, metadata: data["metadata"] !== undefined ? deserializeGoogleChecksReportV1alphaDataMonitoringResultMetadata(data["metadata"]) : undefined, }; } /** * Evidence based on an endpoint that data was sent to. */ export interface GoogleChecksReportV1alphaDataTypeEndpointEvidence { /** * Set of SDKs that are attributed to the exfiltration. */ attributedSdks?: GoogleChecksReportV1alphaDataTypeEndpointEvidenceAttributedSdk[]; /** * Endpoints the data type was sent to. */ endpointDetails?: GoogleChecksReportV1alphaDataTypeEndpointEvidenceEndpointDetails[]; /** * Type of data that was exfiltrated. */ exfiltratedDataType?: | "EXFILTRATED_DATA_TYPE_UNSPECIFIED" | "EXFILTRATED_DATA_TYPE_PHONE_NUMBER" | "EXFILTRATED_DATA_TYPE_PRECISE_LOCATION" | "EXFILTRATED_DATA_TYPE_CONTACT_NAME" | "EXFILTRATED_DATA_TYPE_CONTACT_EMAIL" | "EXFILTRATED_DATA_TYPE_CONTACT_PHONE_NUMBER" | "EXFILTRATED_DATA_TYPE_INCOMING_TEXT_NUMBER" | "EXFILTRATED_DATA_TYPE_INCOMING_TEXT_MESSAGE" | "EXFILTRATED_DATA_TYPE_OUTGOING_TEXT_NUMBER" | "EXFILTRATED_DATA_TYPE_OUTGOING_TEXT_MESSAGE" | "EXFILTRATED_DATA_TYPE_ADVERTISING_ID" | "EXFILTRATED_DATA_TYPE_ANDROID_ID" | "EXFILTRATED_DATA_TYPE_IMEI" | "EXFILTRATED_DATA_TYPE_IMSI" | "EXFILTRATED_DATA_TYPE_SIM_SERIAL_NUMBER" | "EXFILTRATED_DATA_TYPE_SSID" | "EXFILTRATED_DATA_TYPE_ACCOUNT" | "EXFILTRATED_DATA_TYPE_EXTERNAL_ACCOUNT" | "EXFILTRATED_DATA_TYPE_INSTALLED_PACKAGES"; } /** * Details of SDK that is attributed to the exfiltration. */ export interface GoogleChecksReportV1alphaDataTypeEndpointEvidenceAttributedSdk { /** * SDK that is attributed to the exfiltration. */ sdk?: GoogleChecksReportV1alphaSdk; } /** * Details of the endpoint the data type was sent to. */ export interface GoogleChecksReportV1alphaDataTypeEndpointEvidenceEndpointDetails { /** * Endpoint the data type was sent to. */ endpoint?: GoogleChecksReportV1alphaEndpoint; } /** * Evidence collected about a data type. */ export interface GoogleChecksReportV1alphaDataTypeEvidence { /** * List of endpoints the data type was sent to. */ endpoints?: GoogleChecksReportV1alphaDataTypeEndpointEvidence[]; /** * List of included permissions that imply collection of the data type. */ permissions?: GoogleChecksReportV1alphaDataTypePermissionEvidence[]; /** * List of privacy policy texts that imply collection of the data type. */ privacyPolicyTexts?: GoogleChecksReportV1alphaDataTypePrivacyPolicyTextEvidence[]; } /** * Evidence based on the inclusion of a permission. */ export interface GoogleChecksReportV1alphaDataTypePermissionEvidence { /** * Permission declared by your app. */ permission?: GoogleChecksReportV1alphaPermission; } /** * Evidence based on information from the privacy policy. */ export interface GoogleChecksReportV1alphaDataTypePrivacyPolicyTextEvidence { /** * The privacy policy fragment that implies collection of the data type. */ policyFragment?: GoogleChecksReportV1alphaPolicyFragment; } /** * Information about an endpoint. */ export interface GoogleChecksReportV1alphaEndpoint { /** * Domain name (e.g. ads.google.com). */ domain?: string; } /** * The response message for ReportService.ListReports. */ export interface GoogleChecksReportV1alphaListReportsResponse { /** * 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; /** * The reports for the specified app. */ reports?: GoogleChecksReportV1alphaReport[]; } function serializeGoogleChecksReportV1alphaListReportsResponse(data: any): GoogleChecksReportV1alphaListReportsResponse { return { ...data, reports: data["reports"] !== undefined ? data["reports"].map((item: any) => (serializeGoogleChecksReportV1alphaReport(item))) : undefined, }; } function deserializeGoogleChecksReportV1alphaListReportsResponse(data: any): GoogleChecksReportV1alphaListReportsResponse { return { ...data, reports: data["reports"] !== undefined ? data["reports"].map((item: any) => (deserializeGoogleChecksReportV1alphaReport(item))) : undefined, }; } /** * Information about a permission. */ export interface GoogleChecksReportV1alphaPermission { /** * Permission identifier. */ id?: string; } /** * Information about a policy fragment. */ export interface GoogleChecksReportV1alphaPolicyFragment { /** * HTML content. */ htmlContent?: string; /** * Policy URL. */ sourceUri?: string; } /** * Privacy report. */ export interface GoogleChecksReportV1alphaReport { /** * Information about the analyzed app bundle. */ appBundle?: GoogleChecksReportV1alphaAppBundle; /** * List of checks that were run on the app bundle. */ checks?: GoogleChecksReportV1alphaCheck[]; /** * Information related to data monitoring. */ dataMonitoring?: GoogleChecksReportV1alphaDataMonitoring; /** * Resource name of the report. */ name?: string; /** * A URL to view results. */ resultsUri?: string; } function serializeGoogleChecksReportV1alphaReport(data: any): GoogleChecksReportV1alphaReport { return { ...data, checks: data["checks"] !== undefined ? data["checks"].map((item: any) => (serializeGoogleChecksReportV1alphaCheck(item))) : undefined, dataMonitoring: data["dataMonitoring"] !== undefined ? serializeGoogleChecksReportV1alphaDataMonitoring(data["dataMonitoring"]) : undefined, }; } function deserializeGoogleChecksReportV1alphaReport(data: any): GoogleChecksReportV1alphaReport { return { ...data, checks: data["checks"] !== undefined ? data["checks"].map((item: any) => (deserializeGoogleChecksReportV1alphaCheck(item))) : undefined, dataMonitoring: data["dataMonitoring"] !== undefined ? deserializeGoogleChecksReportV1alphaDataMonitoring(data["dataMonitoring"]) : undefined, }; } /** * Information about an SDK. */ export interface GoogleChecksReportV1alphaSdk { /** * SDK identifier. */ id?: string; } /** * The results of a Code Compliance CLI analysis. */ export interface GoogleChecksRepoScanV1alphaCliAnalysis { /** * Optional. Requested code scans resulting from preliminary CLI analysis. */ codeScans?: GoogleChecksRepoScanV1alphaCodeScan[]; /** * Optional. Data sources detected in the scan. */ sources?: GoogleChecksRepoScanV1alphaSource[]; } /** * Source code attribution. */ export interface GoogleChecksRepoScanV1alphaCodeAttribution { /** * Optional. Code excerpt where the source was detected along with * surrounding code. */ codeExcerpt?: string; /** * Required. Line number (1-based). */ lineNumber?: number; /** * Required. Path of the file. */ path?: string; /** * Optional. Start line number of the code excerpt (1-based). */ startLineNumber?: number; } /** * A requested analysis of source code. Contains the source code and processing * state. */ export interface GoogleChecksRepoScanV1alphaCodeScan { /** * Optional. Data type classification requests. */ dataTypeClassifications?: GoogleChecksRepoScanV1alphaCodeScanDataTypeClassification[]; /** * Required. Source code to analyze. */ sourceCode?: GoogleChecksRepoScanV1alphaSourceCode; } /** * A request to classify data types. */ export interface GoogleChecksRepoScanV1alphaCodeScanDataTypeClassification { /** * Required. Candidate data type. */ dataType?: | "DATA_TYPE_UNSPECIFIED" | "DATA_TYPE_APPROXIMATE_LOCATION" | "DATA_TYPE_PRECISE_LOCATION" | "DATA_TYPE_PERSONAL_NAME" | "DATA_TYPE_EMAIL_ADDRESS" | "DATA_TYPE_USER_IDS" | "DATA_TYPE_PHYSICAL_ADDRESS" | "DATA_TYPE_PHONE_NUMBER" | "DATA_TYPE_RACE_AND_ETHNICITY" | "DATA_TYPE_POLITICAL_OR_RELIGIOUS_BELIEFS" | "DATA_TYPE_SEXUAL_ORIENTATION" | "DATA_TYPE_OTHER_PERSONAL_INFO" | "DATA_TYPE_PAYMENT_INFO" | "DATA_TYPE_PURCHASE_HISTORY" | "DATA_TYPE_CREDIT_SCORE" | "DATA_TYPE_OTHER_FINANCIAL_INFO" | "DATA_TYPE_HEALTH_INFO" | "DATA_TYPE_FITNESS_INFO" | "DATA_TYPE_EMAILS" | "DATA_TYPE_TEXT_MESSAGES" | "DATA_TYPE_OTHER_IN_APP_MESSAGES" | "DATA_TYPE_PHOTOS" | "DATA_TYPE_VIDEOS" | "DATA_TYPE_VOICE_OR_SOUND_RECORDINGS" | "DATA_TYPE_MUSIC_FILES" | "DATA_TYPE_OTHER_AUDIO_FILES" | "DATA_TYPE_FILES_AND_DOCS" | "DATA_TYPE_CALENDAR_EVENTS" | "DATA_TYPE_CONTACTS" | "DATA_TYPE_APP_INTERACTIONS" | "DATA_TYPE_IN_APP_SEARCH_HISTORY" | "DATA_TYPE_INSTALLED_APPS" | "DATA_TYPE_OTHER_USER_GENERATED_CONTENT" | "DATA_TYPE_OTHER_ACTIONS" | "DATA_TYPE_WEB_BROWSING_HISTORY" | "DATA_TYPE_CRASH_LOGS" | "DATA_TYPE_PERFORMANCE_DIAGNOSTICS" | "DATA_TYPE_OTHER_APP_PERFORMANCE_DATA" | "DATA_TYPE_DEVICE_OR_OTHER_IDS"; /** * Required. Line number (1-based). */ lineNumber?: number; } /** * The request message for RepoScanService.GenerateScan. */ export interface GoogleChecksRepoScanV1alphaGenerateScanRequest { /** * Required. CLI analysis results. */ cliAnalysis?: GoogleChecksRepoScanV1alphaCliAnalysis; /** * Required. CLI version. */ cliVersion?: string; /** * Required. Local scan path. */ localScanPath?: string; /** * Required. SCM metadata. */ scmMetadata?: GoogleChecksRepoScanV1alphaScmMetadata; } /** * The response message for RepoScanService.ListRepoScans. */ export interface GoogleChecksRepoScanV1alphaListRepoScansResponse { /** * 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; /** * The repo scans for the specified app. */ repoScans?: GoogleChecksRepoScanV1alphaRepoScan[]; } /** * Pull request info. */ export interface GoogleChecksRepoScanV1alphaPullRequest { /** * Required. For PR analysis, we compare against the most recent scan of the * base branch to highlight new issues. */ baseBranch?: string; /** * Required. This can be supplied by the user or parsed automatically from * predefined CI environment variables. */ prNumber?: string; } /** * Repo scan. */ export interface GoogleChecksRepoScanV1alphaRepoScan { /** * CLI version. */ cliVersion?: string; /** * Local scan path. */ localScanPath?: string; /** * Identifier. Resource name of the scan. */ name?: string; /** * A URL to view results. */ resultsUri?: string; /** * SCM metadata. */ scmMetadata?: GoogleChecksRepoScanV1alphaScmMetadata; /** * Data sources detected. */ sources?: GoogleChecksRepoScanV1alphaSource[]; } /** * SCM metadata. */ export interface GoogleChecksRepoScanV1alphaScmMetadata { /** * Required. Branch name. */ branch?: string; /** * Optional. Contains info about the associated pull request. This is only * populated for pull request scans. */ pullRequest?: GoogleChecksRepoScanV1alphaPullRequest; /** * Required. Git remote URL. */ remoteUri?: string; /** * Required. Revision ID, e.g. Git commit hash. */ revisionId?: string; } /** * Represents a data source finding. */ export interface GoogleChecksRepoScanV1alphaSource { /** * Optional. Source code attribution for the finding. */ codeAttribution?: GoogleChecksRepoScanV1alphaCodeAttribution; /** * Required. Data type. */ dataType?: | "DATA_TYPE_UNSPECIFIED" | "DATA_TYPE_APPROXIMATE_LOCATION" | "DATA_TYPE_PRECISE_LOCATION" | "DATA_TYPE_PERSONAL_NAME" | "DATA_TYPE_EMAIL_ADDRESS" | "DATA_TYPE_USER_IDS" | "DATA_TYPE_PHYSICAL_ADDRESS" | "DATA_TYPE_PHONE_NUMBER" | "DATA_TYPE_RACE_AND_ETHNICITY" | "DATA_TYPE_POLITICAL_OR_RELIGIOUS_BELIEFS" | "DATA_TYPE_SEXUAL_ORIENTATION" | "DATA_TYPE_OTHER_PERSONAL_INFO" | "DATA_TYPE_PAYMENT_INFO" | "DATA_TYPE_PURCHASE_HISTORY" | "DATA_TYPE_CREDIT_SCORE" | "DATA_TYPE_OTHER_FINANCIAL_INFO" | "DATA_TYPE_HEALTH_INFO" | "DATA_TYPE_FITNESS_INFO" | "DATA_TYPE_EMAILS" | "DATA_TYPE_TEXT_MESSAGES" | "DATA_TYPE_OTHER_IN_APP_MESSAGES" | "DATA_TYPE_PHOTOS" | "DATA_TYPE_VIDEOS" | "DATA_TYPE_VOICE_OR_SOUND_RECORDINGS" | "DATA_TYPE_MUSIC_FILES" | "DATA_TYPE_OTHER_AUDIO_FILES" | "DATA_TYPE_FILES_AND_DOCS" | "DATA_TYPE_CALENDAR_EVENTS" | "DATA_TYPE_CONTACTS" | "DATA_TYPE_APP_INTERACTIONS" | "DATA_TYPE_IN_APP_SEARCH_HISTORY" | "DATA_TYPE_INSTALLED_APPS" | "DATA_TYPE_OTHER_USER_GENERATED_CONTENT" | "DATA_TYPE_OTHER_ACTIONS" | "DATA_TYPE_WEB_BROWSING_HISTORY" | "DATA_TYPE_CRASH_LOGS" | "DATA_TYPE_PERFORMANCE_DIAGNOSTICS" | "DATA_TYPE_OTHER_APP_PERFORMANCE_DATA" | "DATA_TYPE_DEVICE_OR_OTHER_IDS"; /** * Optional. Whether the finding was marked as a false positive. */ falsePositive?: boolean; } /** * Contains source code from a repo. */ export interface GoogleChecksRepoScanV1alphaSourceCode { /** * Required. Source code. */ code?: string; /** * Required. End line number (1-based). */ endLine?: number; /** * Required. Path of the file. */ path?: string; /** * Required. Start line number (1-based). */ startLine?: number; } /** * The response message for Operations.ListOperations. */ export interface ListOperationsResponse { /** * The standard List next-page token. */ nextPageToken?: string; /** * A list of operations that matches the specified filter in the request. */ operations?: Operation[]; } /** * This resource represents a long-running operation that is the result of a * network API call. */ export interface Operation { /** * If the value is `false`, it means the operation is still in progress. If * `true`, the operation is completed, and either `error` or `response` is * available. */ done?: boolean; /** * The error result of the operation in case of failure or cancellation. */ error?: Status; /** * Service-specific metadata associated with the operation. It typically * contains progress information and common metadata such as create time. Some * services might not provide such metadata. Any method that returns a * long-running operation should document the metadata type, if any. */ metadata?: { [key: string]: any }; /** * The server-assigned name, which is only unique within the same service * that originally returns it. If you use the default HTTP mapping, the `name` * should be a resource name ending with `operations/{unique_id}`. */ name?: string; /** * The normal, successful response of the operation. If the original method * returns no data on success, such as `Delete`, the response is * `google.protobuf.Empty`. If the original method is standard * `Get`/`Create`/`Update`, the response should be the resource. For other * methods, the response should have the type `XxxResponse`, where `Xxx` is * the original method name. For example, if the original method name is * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. */ response?: { [key: string]: any }; } /** * The `Status` type defines a logical error model that is suitable for * different programming environments, including REST APIs and RPC APIs. It is * used by [gRPC](https://github.com/grpc). Each `Status` message contains three * pieces of data: error code, error message, and error details. You can find * out more about this error model and how to work with it in the [API Design * Guide](https://cloud.google.com/apis/design/errors). */ export interface Status { /** * The status code, which should be an enum value of google.rpc.Code. */ code?: number; /** * A list of messages that carry the error details. There is a common set of * message types for APIs to use. */ details?: { [key: string]: any }[]; /** * A developer-facing error message, which should be in English. Any * user-facing error message should be localized and sent in the * google.rpc.Status.details field, or localized by the client. */ message?: string; } /** * The request message for Operations.WaitOperation. */ export interface WaitOperationRequest { /** * The maximum duration to wait before timing out. If left blank, the wait * will be at most the time permitted by the underlying HTTP/RPC protocol. If * RPC context deadline is also specified, the shorter one will be used. */ timeout?: number /* Duration */; } function serializeWaitOperationRequest(data: any): WaitOperationRequest { return { ...data, timeout: data["timeout"] !== undefined ? data["timeout"] : undefined, }; } function deserializeWaitOperationRequest(data: any): WaitOperationRequest { return { ...data, timeout: data["timeout"] !== undefined ? data["timeout"] : undefined, }; }