// Copyright 2022 Luca Casonato. All rights reserved. MIT license. /** * Contact Center AI Insights API Client for Deno * ============================================== * * * * Docs: https://cloud.google.com/contact-center/insights/docs * Source: https://googleapis.deno.dev/v1/contactcenterinsights:v1.ts */ import { auth, CredentialsClient, GoogleAuth, request } from "/_/base@v1/mod.ts"; export { auth, GoogleAuth }; export type { CredentialsClient }; export class ContactCenterInsights { #client: CredentialsClient | undefined; #baseUrl: string; constructor(client?: CredentialsClient, baseUrl: string = "https://contactcenterinsights.googleapis.com/") { this.#client = client; this.#baseUrl = baseUrl; } /** * Creates a analysis rule. * * @param parent Required. The parent resource of the analysis rule. Required. The location to create a analysis rule for. Format: `projects//locations/` or `projects//locations/` */ async projectsLocationsAnalysisRulesCreate(parent: string, req: GoogleCloudContactcenterinsightsV1AnalysisRule): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/analysisRules`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudContactcenterinsightsV1AnalysisRule; } /** * Deletes a analysis rule. * * @param name Required. The name of the analysis rule to delete. */ async projectsLocationsAnalysisRulesDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Get a analysis rule. * * @param name Required. The name of the AnalysisRule to get. */ async projectsLocationsAnalysisRulesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudContactcenterinsightsV1AnalysisRule; } /** * Lists analysis rules. * * @param parent Required. The parent resource of the analysis rules. */ async projectsLocationsAnalysisRulesList(parent: string, opts: ProjectsLocationsAnalysisRulesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/analysisRules`); 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 GoogleCloudContactcenterinsightsV1ListAnalysisRulesResponse; } /** * Updates a analysis rule. * * @param name Identifier. The resource name of the analysis rule. Format: projects/{project}/locations/{location}/analysisRules/{analysis_rule} */ async projectsLocationsAnalysisRulesPatch(name: string, req: GoogleCloudContactcenterinsightsV1AnalysisRule, opts: ProjectsLocationsAnalysisRulesPatchOptions = {}): Promise { opts = serializeProjectsLocationsAnalysisRulesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudContactcenterinsightsV1AnalysisRule; } /** * Gets conversation statistics. * * @param location Required. The location of the conversations. */ async projectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStats(location: string, opts: ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ location }:calculateStats`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudContactcenterinsightsV1CalculateStatsResponse(data); } /** * Query metrics. * * @param location Required. The location of the data. "projects/{project}/locations/{location}" */ async projectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetrics(location: string, req: GoogleCloudContactcenterinsightsV1QueryMetricsRequest): Promise { req = serializeGoogleCloudContactcenterinsightsV1QueryMetricsRequest(req); const url = new URL(`${this.#baseUrl}v1/${ location }:queryMetrics`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Download feedback labels in bulk. * * @param parent Required. The parent resource for new feedback labels. */ async projectsLocationsBulkDownloadFeedbackLabels(parent: string, req: GoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequest): Promise { req = serializeGoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }:bulkDownloadFeedbackLabels`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Upload feedback labels in bulk. * * @param parent Required. The parent resource for new feedback labels. */ async projectsLocationsBulkUploadFeedbackLabels(parent: string, req: GoogleCloudContactcenterinsightsV1BulkUploadFeedbackLabelsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }:bulkUploadFeedbackLabels`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Creates an analysis. The long running operation is done when the analysis * has completed. * * @param parent Required. The parent resource of the analysis. */ async projectsLocationsConversationsAnalysesCreate(parent: string, req: GoogleCloudContactcenterinsightsV1Analysis): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/analyses`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Deletes an analysis. * * @param name Required. The name of the analysis to delete. */ async projectsLocationsConversationsAnalysesDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Gets an analysis. * * @param name Required. The name of the analysis to get. */ async projectsLocationsConversationsAnalysesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudContactcenterinsightsV1Analysis; } /** * Lists analyses. * * @param parent Required. The parent resource of the analyses. */ async projectsLocationsConversationsAnalysesList(parent: string, opts: ProjectsLocationsConversationsAnalysesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/analyses`); 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 GoogleCloudContactcenterinsightsV1ListAnalysesResponse; } /** * Analyzes multiple conversations in a single request. * * @param parent Required. The parent resource to create analyses in. */ async projectsLocationsConversationsBulkAnalyze(parent: string, req: GoogleCloudContactcenterinsightsV1BulkAnalyzeConversationsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/conversations:bulkAnalyze`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Deletes multiple conversations in a single request. * * @param parent Required. The parent resource to delete conversations from. Format: projects/{project}/locations/{location} */ async projectsLocationsConversationsBulkDelete(parent: string, req: GoogleCloudContactcenterinsightsV1BulkDeleteConversationsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/conversations:bulkDelete`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Gets conversation statistics. * * @param location Required. The location of the conversations. */ async projectsLocationsConversationsCalculateStats(location: string, opts: ProjectsLocationsConversationsCalculateStatsOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ location }/conversations:calculateStats`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudContactcenterinsightsV1CalculateStatsResponse(data); } /** * Creates a conversation. Note that this method does not support audio * transcription or redaction. Use `conversations.upload` instead. * * @param parent Required. The parent resource of the conversation. */ async projectsLocationsConversationsCreate(parent: string, req: GoogleCloudContactcenterinsightsV1Conversation, opts: ProjectsLocationsConversationsCreateOptions = {}): Promise { req = serializeGoogleCloudContactcenterinsightsV1Conversation(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/conversations`); if (opts.conversationId !== undefined) { url.searchParams.append("conversationId", String(opts.conversationId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudContactcenterinsightsV1Conversation(data); } /** * Deletes a conversation. * * @param name Required. The name of the conversation to delete. */ async projectsLocationsConversationsDelete(name: string, opts: ProjectsLocationsConversationsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Create feedback label. * * @param parent Required. The parent resource of the feedback label. */ async projectsLocationsConversationsFeedbackLabelsCreate(parent: string, req: GoogleCloudContactcenterinsightsV1FeedbackLabel, opts: ProjectsLocationsConversationsFeedbackLabelsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/feedbackLabels`); if (opts.feedbackLabelId !== undefined) { url.searchParams.append("feedbackLabelId", String(opts.feedbackLabelId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudContactcenterinsightsV1FeedbackLabel; } /** * Delete feedback label. * * @param name Required. The name of the feedback label to delete. */ async projectsLocationsConversationsFeedbackLabelsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Get feedback label. * * @param name Required. The name of the feedback label to get. */ async projectsLocationsConversationsFeedbackLabelsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudContactcenterinsightsV1FeedbackLabel; } /** * List feedback labels. * * @param parent Required. The parent resource of the feedback labels. */ async projectsLocationsConversationsFeedbackLabelsList(parent: string, opts: ProjectsLocationsConversationsFeedbackLabelsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/feedbackLabels`); 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 GoogleCloudContactcenterinsightsV1ListFeedbackLabelsResponse; } /** * Update feedback label. * * @param name Immutable. Resource name of the FeedbackLabel. Format: projects/{project}/locations/{location}/conversations/{conversation}/feedbackLabels/{feedback_label} */ async projectsLocationsConversationsFeedbackLabelsPatch(name: string, req: GoogleCloudContactcenterinsightsV1FeedbackLabel, opts: ProjectsLocationsConversationsFeedbackLabelsPatchOptions = {}): Promise { opts = serializeProjectsLocationsConversationsFeedbackLabelsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudContactcenterinsightsV1FeedbackLabel; } /** * Gets a conversation. * * @param name Required. The name of the conversation to get. */ async projectsLocationsConversationsGet(name: string, opts: ProjectsLocationsConversationsGetOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudContactcenterinsightsV1Conversation(data); } /** * Imports conversations and processes them according to the user's * configuration. * * @param parent Required. The parent resource for new conversations. */ async projectsLocationsConversationsIngest(parent: string, req: GoogleCloudContactcenterinsightsV1IngestConversationsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/conversations:ingest`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Lists conversations. * * @param parent Required. The parent resource of the conversation. */ async projectsLocationsConversationsList(parent: string, opts: ProjectsLocationsConversationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/conversations`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.orderBy !== undefined) { url.searchParams.append("orderBy", String(opts.orderBy)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudContactcenterinsightsV1ListConversationsResponse(data); } /** * Updates a conversation. * * @param name Immutable. The resource name of the conversation. Format: projects/{project}/locations/{location}/conversations/{conversation} */ async projectsLocationsConversationsPatch(name: string, req: GoogleCloudContactcenterinsightsV1Conversation, opts: ProjectsLocationsConversationsPatchOptions = {}): Promise { req = serializeGoogleCloudContactcenterinsightsV1Conversation(req); opts = serializeProjectsLocationsConversationsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudContactcenterinsightsV1Conversation(data); } /** * Create a long-running conversation upload operation. This method differs * from `CreateConversation` by allowing audio transcription and optional DLP * redaction. * * @param parent Required. The parent resource of the conversation. */ async projectsLocationsConversationsUpload(parent: string, req: GoogleCloudContactcenterinsightsV1UploadConversationRequest): Promise { req = serializeGoogleCloudContactcenterinsightsV1UploadConversationRequest(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/conversations:upload`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Initializes a location-level encryption key specification. An error will * result if the location has resources already created before the * initialization. After the encryption specification is initialized at a * location, it is immutable and all newly created resources under the * location will be encrypted with the existing specification. * * @param name Immutable. The resource name of the encryption key specification resource. Format: projects/{project}/locations/{location}/encryptionSpec */ async projectsLocationsEncryptionSpecInitialize(name: string, req: GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:initialize`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Gets location-level encryption key specification. * * @param name Required. The name of the encryption spec resource to get. */ async projectsLocationsGetEncryptionSpec(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudContactcenterinsightsV1EncryptionSpec; } /** * Gets project-level settings. * * @param name Required. The name of the settings resource to get. */ async projectsLocationsGetSettings(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudContactcenterinsightsV1Settings(data); } /** * Export insights data to a destination defined in the request body. * * @param parent Required. The parent resource to export data from. */ async projectsLocationsInsightsdataExport(parent: string, req: GoogleCloudContactcenterinsightsV1ExportInsightsDataRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/insightsdata:export`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Gets an issue model's statistics. * * @param issueModel Required. The resource name of the issue model to query against. */ async projectsLocationsIssueModelsCalculateIssueModelStats(issueModel: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ issueModel }:calculateIssueModelStats`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudContactcenterinsightsV1CalculateIssueModelStatsResponse(data); } /** * Creates an issue model. * * @param parent Required. The parent resource of the issue model. */ async projectsLocationsIssueModelsCreate(parent: string, req: GoogleCloudContactcenterinsightsV1IssueModel): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/issueModels`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Deletes an issue model. * * @param name Required. The name of the issue model to delete. */ async projectsLocationsIssueModelsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleLongrunningOperation; } /** * Deploys an issue model. Returns an error if a model is already deployed. * An issue model can only be used in analysis after it has been deployed. * * @param name Required. The issue model to deploy. */ async projectsLocationsIssueModelsDeploy(name: string, req: GoogleCloudContactcenterinsightsV1DeployIssueModelRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:deploy`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Exports an issue model to the provided destination. * * @param name Required. The issue model to export. */ async projectsLocationsIssueModelsExport(name: string, req: GoogleCloudContactcenterinsightsV1ExportIssueModelRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:export`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Gets an issue model. * * @param name Required. The name of the issue model to get. */ async projectsLocationsIssueModelsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudContactcenterinsightsV1IssueModel; } /** * Imports an issue model from a Cloud Storage bucket. * * @param parent Required. The parent resource of the issue model. */ async projectsLocationsIssueModelsImport(parent: string, req: GoogleCloudContactcenterinsightsV1ImportIssueModelRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/issueModels:import`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Deletes an issue. * * @param name Required. The name of the issue to delete. */ async projectsLocationsIssueModelsIssuesDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Gets an issue. * * @param name Required. The name of the issue to get. */ async projectsLocationsIssueModelsIssuesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudContactcenterinsightsV1Issue; } /** * Lists issues. * * @param parent Required. The parent resource of the issue. */ async projectsLocationsIssueModelsIssuesList(parent: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/issues`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudContactcenterinsightsV1ListIssuesResponse; } /** * Updates an issue. * * @param name Immutable. The resource name of the issue. Format: projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} */ async projectsLocationsIssueModelsIssuesPatch(name: string, req: GoogleCloudContactcenterinsightsV1Issue, opts: ProjectsLocationsIssueModelsIssuesPatchOptions = {}): Promise { opts = serializeProjectsLocationsIssueModelsIssuesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudContactcenterinsightsV1Issue; } /** * Lists issue models. * * @param parent Required. The parent resource of the issue model. */ async projectsLocationsIssueModelsList(parent: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/issueModels`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudContactcenterinsightsV1ListIssueModelsResponse; } /** * Updates an issue model. * * @param name Immutable. The resource name of the issue model. Format: projects/{project}/locations/{location}/issueModels/{issue_model} */ async projectsLocationsIssueModelsPatch(name: string, req: GoogleCloudContactcenterinsightsV1IssueModel, opts: ProjectsLocationsIssueModelsPatchOptions = {}): Promise { opts = serializeProjectsLocationsIssueModelsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudContactcenterinsightsV1IssueModel; } /** * Undeploys an issue model. An issue model can not be used in analysis after * it has been undeployed. * * @param name Required. The issue model to undeploy. */ async projectsLocationsIssueModelsUndeploy(name: string, req: GoogleCloudContactcenterinsightsV1UndeployIssueModelRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:undeploy`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * List all feedback labels by project number. * * @param parent Required. The parent resource of all feedback labels per project. */ async projectsLocationsListAllFeedbackLabels(parent: string, opts: ProjectsLocationsListAllFeedbackLabelsOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }:listAllFeedbackLabels`); 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 GoogleCloudContactcenterinsightsV1ListAllFeedbackLabelsResponse; } /** * 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 projectsLocationsOperationsCancel(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:cancel`); const data = await request(url.href, { client: this.#client, method: "POST", }); return data as GoogleProtobufEmpty; } /** * 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 projectsLocationsOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleLongrunningOperation; } /** * 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 projectsLocationsOperationsList(name: string, opts: ProjectsLocationsOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ 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 GoogleLongrunningListOperationsResponse; } /** * Creates a phrase matcher. * * @param parent Required. The parent resource of the phrase matcher. Required. The location to create a phrase matcher for. Format: `projects//locations/` or `projects//locations/` */ async projectsLocationsPhraseMatchersCreate(parent: string, req: GoogleCloudContactcenterinsightsV1PhraseMatcher): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/phraseMatchers`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudContactcenterinsightsV1PhraseMatcher; } /** * Deletes a phrase matcher. * * @param name Required. The name of the phrase matcher to delete. */ async projectsLocationsPhraseMatchersDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Gets a phrase matcher. * * @param name Required. The name of the phrase matcher to get. */ async projectsLocationsPhraseMatchersGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudContactcenterinsightsV1PhraseMatcher; } /** * Lists phrase matchers. * * @param parent Required. The parent resource of the phrase matcher. */ async projectsLocationsPhraseMatchersList(parent: string, opts: ProjectsLocationsPhraseMatchersListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/phraseMatchers`); 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 GoogleCloudContactcenterinsightsV1ListPhraseMatchersResponse; } /** * Updates a phrase matcher. * * @param name The resource name of the phrase matcher. Format: projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} */ async projectsLocationsPhraseMatchersPatch(name: string, req: GoogleCloudContactcenterinsightsV1PhraseMatcher, opts: ProjectsLocationsPhraseMatchersPatchOptions = {}): Promise { opts = serializeProjectsLocationsPhraseMatchersPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudContactcenterinsightsV1PhraseMatcher; } /** * Create a QaScorecard. * * @param parent Required. The parent resource of the QaScorecard. */ async projectsLocationsQaScorecardsCreate(parent: string, req: GoogleCloudContactcenterinsightsV1QaScorecard, opts: ProjectsLocationsQaScorecardsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/qaScorecards`); if (opts.qaScorecardId !== undefined) { url.searchParams.append("qaScorecardId", String(opts.qaScorecardId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudContactcenterinsightsV1QaScorecard; } /** * Deletes a QaScorecard. * * @param name Required. The name of the QaScorecard to delete. */ async projectsLocationsQaScorecardsDelete(name: string, opts: ProjectsLocationsQaScorecardsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Gets a QaScorecard. * * @param name Required. The name of the QaScorecard to get. */ async projectsLocationsQaScorecardsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudContactcenterinsightsV1QaScorecard; } /** * Lists QaScorecards. * * @param parent Required. The parent resource of the scorecards. */ async projectsLocationsQaScorecardsList(parent: string, opts: ProjectsLocationsQaScorecardsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/qaScorecards`); 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 GoogleCloudContactcenterinsightsV1ListQaScorecardsResponse; } /** * Updates a QaScorecard. * * @param name Identifier. The scorecard name. Format: projects/{project}/locations/{location}/qaScorecards/{qa_scorecard} */ async projectsLocationsQaScorecardsPatch(name: string, req: GoogleCloudContactcenterinsightsV1QaScorecard, opts: ProjectsLocationsQaScorecardsPatchOptions = {}): Promise { opts = serializeProjectsLocationsQaScorecardsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudContactcenterinsightsV1QaScorecard; } /** * Creates a QaScorecardRevision. * * @param parent Required. The parent resource of the QaScorecardRevision. */ async projectsLocationsQaScorecardsRevisionsCreate(parent: string, req: GoogleCloudContactcenterinsightsV1QaScorecardRevision, opts: ProjectsLocationsQaScorecardsRevisionsCreateOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/revisions`); if (opts.qaScorecardRevisionId !== undefined) { url.searchParams.append("qaScorecardRevisionId", String(opts.qaScorecardRevisionId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudContactcenterinsightsV1QaScorecardRevision; } /** * Deletes a QaScorecardRevision. * * @param name Required. The name of the QaScorecardRevision to delete. */ async projectsLocationsQaScorecardsRevisionsDelete(name: string, opts: ProjectsLocationsQaScorecardsRevisionsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Deploy a QaScorecardRevision. * * @param name Required. The name of the QaScorecardRevision to deploy. */ async projectsLocationsQaScorecardsRevisionsDeploy(name: string, req: GoogleCloudContactcenterinsightsV1DeployQaScorecardRevisionRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:deploy`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudContactcenterinsightsV1QaScorecardRevision; } /** * Gets a QaScorecardRevision. * * @param name Required. The name of the QaScorecardRevision to get. */ async projectsLocationsQaScorecardsRevisionsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudContactcenterinsightsV1QaScorecardRevision; } /** * Lists all revisions under the parent QaScorecard. * * @param parent Required. The parent resource of the scorecard revisions. To list all revisions of all scorecards, substitute the QaScorecard ID with a '-' character. */ async projectsLocationsQaScorecardsRevisionsList(parent: string, opts: ProjectsLocationsQaScorecardsRevisionsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/revisions`); 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 GoogleCloudContactcenterinsightsV1ListQaScorecardRevisionsResponse; } /** * Create a QaQuestion. * * @param parent Required. The parent resource of the QaQuestion. */ async projectsLocationsQaScorecardsRevisionsQaQuestionsCreate(parent: string, req: GoogleCloudContactcenterinsightsV1QaQuestion, opts: ProjectsLocationsQaScorecardsRevisionsQaQuestionsCreateOptions = {}): Promise { req = serializeGoogleCloudContactcenterinsightsV1QaQuestion(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/qaQuestions`); if (opts.qaQuestionId !== undefined) { url.searchParams.append("qaQuestionId", String(opts.qaQuestionId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeGoogleCloudContactcenterinsightsV1QaQuestion(data); } /** * Deletes a QaQuestion. * * @param name Required. The name of the QaQuestion to delete. */ async projectsLocationsQaScorecardsRevisionsQaQuestionsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Gets a QaQuestion. * * @param name Required. The name of the QaQuestion to get. */ async projectsLocationsQaScorecardsRevisionsQaQuestionsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeGoogleCloudContactcenterinsightsV1QaQuestion(data); } /** * Lists QaQuestions. * * @param parent Required. The parent resource of the questions. */ async projectsLocationsQaScorecardsRevisionsQaQuestionsList(parent: string, opts: ProjectsLocationsQaScorecardsRevisionsQaQuestionsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/qaQuestions`); 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 deserializeGoogleCloudContactcenterinsightsV1ListQaQuestionsResponse(data); } /** * Updates a QaQuestion. * * @param name Identifier. The resource name of the question. Format: projects/{project}/locations/{location}/qaScorecards/{qa_scorecard}/revisions/{revision}/qaQuestions/{qa_question} */ async projectsLocationsQaScorecardsRevisionsQaQuestionsPatch(name: string, req: GoogleCloudContactcenterinsightsV1QaQuestion, opts: ProjectsLocationsQaScorecardsRevisionsQaQuestionsPatchOptions = {}): Promise { req = serializeGoogleCloudContactcenterinsightsV1QaQuestion(req); opts = serializeProjectsLocationsQaScorecardsRevisionsQaQuestionsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudContactcenterinsightsV1QaQuestion(data); } /** * Fine tune one or more QaModels. * * @param parent Required. The parent resource for new fine tuning job instance. */ async projectsLocationsQaScorecardsRevisionsTuneQaScorecardRevision(parent: string, req: GoogleCloudContactcenterinsightsV1TuneQaScorecardRevisionRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }:tuneQaScorecardRevision`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Undeploy a QaScorecardRevision. * * @param name Required. The name of the QaScorecardRevision to undeploy. */ async projectsLocationsQaScorecardsRevisionsUndeploy(name: string, req: GoogleCloudContactcenterinsightsV1UndeployQaScorecardRevisionRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }:undeploy`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudContactcenterinsightsV1QaScorecardRevision; } /** * Query metrics. * * @param location Required. The location of the data. "projects/{project}/locations/{location}" */ async projectsLocationsQueryMetrics(location: string, req: GoogleCloudContactcenterinsightsV1QueryMetricsRequest): Promise { req = serializeGoogleCloudContactcenterinsightsV1QueryMetricsRequest(req); const url = new URL(`${this.#baseUrl}v1/${ location }:queryMetrics`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleLongrunningOperation; } /** * Updates project-level settings. * * @param name Immutable. The resource name of the settings resource. Format: projects/{project}/locations/{location}/settings */ async projectsLocationsUpdateSettings(name: string, req: GoogleCloudContactcenterinsightsV1Settings, opts: ProjectsLocationsUpdateSettingsOptions = {}): Promise { req = serializeGoogleCloudContactcenterinsightsV1Settings(req); opts = serializeProjectsLocationsUpdateSettingsOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeGoogleCloudContactcenterinsightsV1Settings(data); } /** * Creates a view. * * @param parent Required. The parent resource of the view. Required. The location to create a view for. Format: `projects//locations/` or `projects//locations/` */ async projectsLocationsViewsCreate(parent: string, req: GoogleCloudContactcenterinsightsV1View): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/views`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as GoogleCloudContactcenterinsightsV1View; } /** * Deletes a view. * * @param name Required. The name of the view to delete. */ async projectsLocationsViewsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as GoogleProtobufEmpty; } /** * Gets a view. * * @param name Required. The name of the view to get. */ async projectsLocationsViewsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GoogleCloudContactcenterinsightsV1View; } /** * Lists views. * * @param parent Required. The parent resource of the views. */ async projectsLocationsViewsList(parent: string, opts: ProjectsLocationsViewsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/views`); 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 GoogleCloudContactcenterinsightsV1ListViewsResponse; } /** * Updates a view. * * @param name Immutable. The resource name of the view. Format: projects/{project}/locations/{location}/views/{view} */ async projectsLocationsViewsPatch(name: string, req: GoogleCloudContactcenterinsightsV1View, opts: ProjectsLocationsViewsPatchOptions = {}): Promise { opts = serializeProjectsLocationsViewsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as GoogleCloudContactcenterinsightsV1View; } } /** * The analysis resource. */ export interface GoogleCloudContactcenterinsightsV1alpha1Analysis { /** * Output only. The result of the analysis, which is populated when the * analysis finishes. */ readonly analysisResult?: GoogleCloudContactcenterinsightsV1alpha1AnalysisResult; /** * To select the annotators to run and the phrase matchers to use (if any). * If not specified, all annotators will be run. */ annotatorSelector?: GoogleCloudContactcenterinsightsV1alpha1AnnotatorSelector; /** * Output only. The time at which the analysis was created, which occurs when * the long-running operation completes. */ readonly createTime?: Date; /** * Immutable. The resource name of the analysis. Format: * projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis} */ name?: string; /** * Output only. The time at which the analysis was requested. */ readonly requestTime?: Date; } /** * The result of an analysis. */ export interface GoogleCloudContactcenterinsightsV1alpha1AnalysisResult { /** * Call-specific metadata created by the analysis. */ callAnalysisMetadata?: GoogleCloudContactcenterinsightsV1alpha1AnalysisResultCallAnalysisMetadata; /** * The time at which the analysis ended. */ endTime?: Date; } function serializeGoogleCloudContactcenterinsightsV1alpha1AnalysisResult(data: any): GoogleCloudContactcenterinsightsV1alpha1AnalysisResult { return { ...data, callAnalysisMetadata: data["callAnalysisMetadata"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1alpha1AnalysisResultCallAnalysisMetadata(data["callAnalysisMetadata"]) : undefined, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1AnalysisResult(data: any): GoogleCloudContactcenterinsightsV1alpha1AnalysisResult { return { ...data, callAnalysisMetadata: data["callAnalysisMetadata"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1alpha1AnalysisResultCallAnalysisMetadata(data["callAnalysisMetadata"]) : undefined, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, }; } /** * Call-specific metadata created during analysis. */ export interface GoogleCloudContactcenterinsightsV1alpha1AnalysisResultCallAnalysisMetadata { /** * A list of call annotations that apply to this call. */ annotations?: GoogleCloudContactcenterinsightsV1alpha1CallAnnotation[]; /** * All the entities in the call. */ entities?: { [key: string]: GoogleCloudContactcenterinsightsV1alpha1Entity }; /** * All the matched intents in the call. */ intents?: { [key: string]: GoogleCloudContactcenterinsightsV1alpha1Intent }; /** * Overall conversation-level issue modeling result. */ issueModelResult?: GoogleCloudContactcenterinsightsV1alpha1IssueModelResult; /** * All the matched phrase matchers in the call. */ phraseMatchers?: { [key: string]: GoogleCloudContactcenterinsightsV1alpha1PhraseMatchData }; /** * Results of scoring QaScorecards. */ qaScorecardResults?: GoogleCloudContactcenterinsightsV1alpha1QaScorecardResult[]; /** * Overall conversation-level sentiment for each channel of the call. */ sentiments?: GoogleCloudContactcenterinsightsV1alpha1ConversationLevelSentiment[]; /** * Overall conversation-level silence during the call. */ silence?: GoogleCloudContactcenterinsightsV1alpha1ConversationLevelSilence; } function serializeGoogleCloudContactcenterinsightsV1alpha1AnalysisResultCallAnalysisMetadata(data: any): GoogleCloudContactcenterinsightsV1alpha1AnalysisResultCallAnalysisMetadata { return { ...data, silence: data["silence"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1alpha1ConversationLevelSilence(data["silence"]) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1AnalysisResultCallAnalysisMetadata(data: any): GoogleCloudContactcenterinsightsV1alpha1AnalysisResultCallAnalysisMetadata { return { ...data, silence: data["silence"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1alpha1ConversationLevelSilence(data["silence"]) : undefined, }; } /** * A point in a conversation that marks the start or the end of an annotation. */ export interface GoogleCloudContactcenterinsightsV1alpha1AnnotationBoundary { /** * The index in the sequence of transcribed pieces of the conversation where * the boundary is located. This index starts at zero. */ transcriptIndex?: number; /** * The word index of this boundary with respect to the first word in the * transcript piece. This index starts at zero. */ wordIndex?: number; } /** * Selector of all available annotators and phrase matchers to run. */ export interface GoogleCloudContactcenterinsightsV1alpha1AnnotatorSelector { /** * The issue model to run. If not provided, the most recently deployed topic * model will be used. The provided issue model will only be used for * inference if the issue model is deployed and if run_issue_model_annotator * is set to true. If more than one issue model is provided, only the first * provided issue model will be used for inference. */ issueModels?: string[]; /** * The list of phrase matchers to run. If not provided, all active phrase * matchers will be used. If inactive phrase matchers are provided, they will * not be used. Phrase matchers will be run only if * run_phrase_matcher_annotator is set to true. Format: * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} */ phraseMatchers?: string[]; /** * Configuration for the QA annotator. */ qaConfig?: GoogleCloudContactcenterinsightsV1alpha1AnnotatorSelectorQaConfig; /** * Whether to run the entity annotator. */ runEntityAnnotator?: boolean; /** * Whether to run the intent annotator. */ runIntentAnnotator?: boolean; /** * Whether to run the interruption annotator. */ runInterruptionAnnotator?: boolean; /** * Whether to run the issue model annotator. A model should have already been * deployed for this to take effect. */ runIssueModelAnnotator?: boolean; /** * Whether to run the active phrase matcher annotator(s). */ runPhraseMatcherAnnotator?: boolean; /** * Whether to run the QA annotator. */ runQaAnnotator?: boolean; /** * Whether to run the sentiment annotator. */ runSentimentAnnotator?: boolean; /** * Whether to run the silence annotator. */ runSilenceAnnotator?: boolean; /** * Whether to run the summarization annotator. */ runSummarizationAnnotator?: boolean; /** * Configuration for the summarization annotator. */ summarizationConfig?: GoogleCloudContactcenterinsightsV1alpha1AnnotatorSelectorSummarizationConfig; } /** * Configuration for the QA feature. */ export interface GoogleCloudContactcenterinsightsV1alpha1AnnotatorSelectorQaConfig { /** * A manual list of scorecards to score. */ scorecardList?: GoogleCloudContactcenterinsightsV1alpha1AnnotatorSelectorQaConfigScorecardList; } /** * Container for a list of scorecards. */ export interface GoogleCloudContactcenterinsightsV1alpha1AnnotatorSelectorQaConfigScorecardList { /** * List of QaScorecardRevisions. */ qaScorecardRevisions?: string[]; } /** * Configuration for summarization. */ export interface GoogleCloudContactcenterinsightsV1alpha1AnnotatorSelectorSummarizationConfig { /** * Resource name of the Dialogflow conversation profile. Format: * projects/{project}/locations/{location}/conversationProfiles/{conversation_profile} */ conversationProfile?: string; /** * Default summarization model to be used. */ summarizationModel?: | "SUMMARIZATION_MODEL_UNSPECIFIED" | "BASELINE_MODEL" | "BASELINE_MODEL_V2_0"; } /** * The feedback that the customer has about a certain answer in the * conversation. */ export interface GoogleCloudContactcenterinsightsV1alpha1AnswerFeedback { /** * Indicates whether an answer or item was clicked by the human agent. */ clicked?: boolean; /** * The correctness level of an answer. */ correctnessLevel?: | "CORRECTNESS_LEVEL_UNSPECIFIED" | "NOT_CORRECT" | "PARTIALLY_CORRECT" | "FULLY_CORRECT"; /** * Indicates whether an answer or item was displayed to the human agent in * the agent desktop UI. */ displayed?: boolean; } /** * Agent Assist Article Suggestion data. */ export interface GoogleCloudContactcenterinsightsV1alpha1ArticleSuggestionData { /** * The system's confidence score that this article is a good match for this * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely * certain). */ confidenceScore?: number; /** * Map that contains metadata about the Article Suggestion and the document * that it originates from. */ metadata?: { [key: string]: string }; /** * The name of the answer record. Format: * projects/{project}/locations/{location}/answerRecords/{answer_record} */ queryRecord?: string; /** * The knowledge document that this answer was extracted from. Format: * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document} */ source?: string; /** * Article title. */ title?: string; /** * Article URI. */ uri?: string; } /** * The metadata for a bulk analyze conversations operation. */ export interface GoogleCloudContactcenterinsightsV1alpha1BulkAnalyzeConversationsMetadata { /** * The number of requested analyses that have completed successfully so far. */ completedAnalysesCount?: number; /** * The time the operation was created. */ createTime?: Date; /** * The time the operation finished running. */ endTime?: Date; /** * The number of requested analyses that have failed so far. */ failedAnalysesCount?: number; /** * Output only. Partial errors during bulk analyze operation that might cause * the operation output to be incomplete. */ readonly partialErrors?: GoogleRpcStatus[]; /** * The original request for bulk analyze. */ request?: GoogleCloudContactcenterinsightsV1alpha1BulkAnalyzeConversationsRequest; /** * Total number of analyses requested. Computed by the number of * conversations returned by `filter` multiplied by `analysis_percentage` in * the request. */ totalRequestedAnalysesCount?: number; } function serializeGoogleCloudContactcenterinsightsV1alpha1BulkAnalyzeConversationsMetadata(data: any): GoogleCloudContactcenterinsightsV1alpha1BulkAnalyzeConversationsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1BulkAnalyzeConversationsMetadata(data: any): GoogleCloudContactcenterinsightsV1alpha1BulkAnalyzeConversationsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, }; } /** * The request to analyze conversations in bulk. */ export interface GoogleCloudContactcenterinsightsV1alpha1BulkAnalyzeConversationsRequest { /** * Required. Percentage of selected conversation to analyze, between [0, * 100]. */ analysisPercentage?: number; /** * To select the annotators to run and the phrase matchers to use (if any). * If not specified, all annotators will be run. */ annotatorSelector?: GoogleCloudContactcenterinsightsV1alpha1AnnotatorSelector; /** * Required. Filter used to select the subset of conversations to analyze. */ filter?: string; /** * Required. The parent resource to create analyses in. */ parent?: string; } /** * The response for a bulk analyze conversations operation. */ export interface GoogleCloudContactcenterinsightsV1alpha1BulkAnalyzeConversationsResponse { /** * Count of failed analyses. */ failedAnalysisCount?: number; /** * Count of successful analyses. */ successfulAnalysisCount?: number; } /** * The metadata for a bulk delete conversations operation. */ export interface GoogleCloudContactcenterinsightsV1alpha1BulkDeleteConversationsMetadata { /** * The time the operation was created. */ createTime?: Date; /** * The time the operation finished running. */ endTime?: Date; /** * Partial errors during bulk delete conversations operation that might cause * the operation output to be incomplete. */ partialErrors?: GoogleRpcStatus[]; /** * The original request for bulk delete. */ request?: GoogleCloudContactcenterinsightsV1alpha1BulkDeleteConversationsRequest; } function serializeGoogleCloudContactcenterinsightsV1alpha1BulkDeleteConversationsMetadata(data: any): GoogleCloudContactcenterinsightsV1alpha1BulkDeleteConversationsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1BulkDeleteConversationsMetadata(data: any): GoogleCloudContactcenterinsightsV1alpha1BulkDeleteConversationsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, }; } /** * The request to delete conversations in bulk. */ export interface GoogleCloudContactcenterinsightsV1alpha1BulkDeleteConversationsRequest { /** * Filter used to select the subset of conversations to delete. */ filter?: string; /** * If set to true, all of this conversation's analyses will also be deleted. * Otherwise, the request will only succeed if the conversation has no * analyses. */ force?: boolean; /** * Maximum number of conversations to delete. */ maxDeleteCount?: number; /** * Required. The parent resource to delete conversations from. Format: * projects/{project}/locations/{location} */ parent?: string; } /** * The response for a bulk delete conversations operation. */ export interface GoogleCloudContactcenterinsightsV1alpha1BulkDeleteConversationsResponse { } /** * A piece of metadata that applies to a window of a call. */ export interface GoogleCloudContactcenterinsightsV1alpha1CallAnnotation { /** * The boundary in the conversation where the annotation ends, inclusive. */ annotationEndBoundary?: GoogleCloudContactcenterinsightsV1alpha1AnnotationBoundary; /** * The boundary in the conversation where the annotation starts, inclusive. */ annotationStartBoundary?: GoogleCloudContactcenterinsightsV1alpha1AnnotationBoundary; /** * The channel of the audio where the annotation occurs. For single-channel * audio, this field is not populated. */ channelTag?: number; /** * Data specifying an entity mention. */ entityMentionData?: GoogleCloudContactcenterinsightsV1alpha1EntityMentionData; /** * Data specifying a hold. */ holdData?: GoogleCloudContactcenterinsightsV1alpha1HoldData; /** * Data specifying an intent match. */ intentMatchData?: GoogleCloudContactcenterinsightsV1alpha1IntentMatchData; /** * Data specifying an interruption. */ interruptionData?: GoogleCloudContactcenterinsightsV1alpha1InterruptionData; /** * Data specifying an issue match. */ issueMatchData?: GoogleCloudContactcenterinsightsV1alpha1IssueMatchData; /** * Data specifying a phrase match. */ phraseMatchData?: GoogleCloudContactcenterinsightsV1alpha1PhraseMatchData; /** * Data specifying sentiment. */ sentimentData?: GoogleCloudContactcenterinsightsV1alpha1SentimentData; /** * Data specifying silence. */ silenceData?: GoogleCloudContactcenterinsightsV1alpha1SilenceData; } /** * The conversation resource. */ export interface GoogleCloudContactcenterinsightsV1alpha1Conversation { /** * An opaque, user-specified string representing the human agent who handled * the conversation. */ agentId?: string; /** * Call-specific metadata. */ callMetadata?: GoogleCloudContactcenterinsightsV1alpha1ConversationCallMetadata; /** * Output only. The time at which the conversation was created. */ readonly createTime?: Date; /** * The source of the audio and transcription for the conversation. */ dataSource?: GoogleCloudContactcenterinsightsV1alpha1ConversationDataSource; /** * Output only. All the matched Dialogflow intents in the call. The key * corresponds to a Dialogflow intent, format: * projects/{project}/agent/{agent}/intents/{intent} */ readonly dialogflowIntents?: { [key: string]: GoogleCloudContactcenterinsightsV1alpha1DialogflowIntent }; /** * Output only. The duration of the conversation. */ readonly duration?: number /* Duration */; /** * The time at which this conversation should expire. After this time, the * conversation data and any associated analyses will be deleted. */ expireTime?: Date; /** * A map for the user to specify any custom fields. A maximum of 100 labels * per conversation is allowed, with a maximum of 256 characters per entry. */ labels?: { [key: string]: string }; /** * A user-specified language code for the conversation. */ languageCode?: string; /** * Output only. The conversation's latest analysis, if one exists. */ readonly latestAnalysis?: GoogleCloudContactcenterinsightsV1alpha1Analysis; /** * Output only. Latest summary of the conversation. */ readonly latestSummary?: GoogleCloudContactcenterinsightsV1alpha1ConversationSummarizationSuggestionData; /** * Immutable. The conversation medium, if unspecified will default to * PHONE_CALL. */ medium?: | "MEDIUM_UNSPECIFIED" | "PHONE_CALL" | "CHAT"; /** * Input only. JSON metadata encoded as a string. This field is primarily * used by Insights integrations with various telphony systems and must be in * one of Insight's supported formats. */ metadataJson?: string; /** * Immutable. The resource name of the conversation. Format: * projects/{project}/locations/{location}/conversations/{conversation} */ name?: string; /** * Obfuscated user ID which the customer sent to us. */ obfuscatedUserId?: string; /** * Conversation metadata related to quality management. */ qualityMetadata?: GoogleCloudContactcenterinsightsV1alpha1ConversationQualityMetadata; /** * Output only. The annotations that were generated during the customer and * agent interaction. */ readonly runtimeAnnotations?: GoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotation[]; /** * The time at which the conversation started. */ startTime?: Date; /** * Output only. The conversation transcript. */ readonly transcript?: GoogleCloudContactcenterinsightsV1alpha1ConversationTranscript; /** * Input only. The TTL for this resource. If specified, then this TTL will be * used to calculate the expire time. */ ttl?: number /* Duration */; /** * Output only. The number of turns in the conversation. */ readonly turnCount?: number; /** * Output only. The most recent time at which the conversation was updated. */ readonly updateTime?: Date; } function serializeGoogleCloudContactcenterinsightsV1alpha1Conversation(data: any): GoogleCloudContactcenterinsightsV1alpha1Conversation { return { ...data, expireTime: data["expireTime"] !== undefined ? data["expireTime"].toISOString() : undefined, qualityMetadata: data["qualityMetadata"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1alpha1ConversationQualityMetadata(data["qualityMetadata"]) : undefined, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, ttl: data["ttl"] !== undefined ? data["ttl"] : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1Conversation(data: any): GoogleCloudContactcenterinsightsV1alpha1Conversation { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, duration: data["duration"] !== undefined ? data["duration"] : undefined, expireTime: data["expireTime"] !== undefined ? new Date(data["expireTime"]) : undefined, qualityMetadata: data["qualityMetadata"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1alpha1ConversationQualityMetadata(data["qualityMetadata"]) : undefined, runtimeAnnotations: data["runtimeAnnotations"] !== undefined ? data["runtimeAnnotations"].map((item: any) => (deserializeGoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotation(item))) : undefined, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, transcript: data["transcript"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1alpha1ConversationTranscript(data["transcript"]) : undefined, ttl: data["ttl"] !== undefined ? data["ttl"] : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Call-specific metadata. */ export interface GoogleCloudContactcenterinsightsV1alpha1ConversationCallMetadata { /** * The audio channel that contains the agent. */ agentChannel?: number; /** * The audio channel that contains the customer. */ customerChannel?: number; } /** * The conversation source, which is a combination of transcript and audio. */ export interface GoogleCloudContactcenterinsightsV1alpha1ConversationDataSource { /** * The source when the conversation comes from Dialogflow. */ dialogflowSource?: GoogleCloudContactcenterinsightsV1alpha1DialogflowSource; /** * A Cloud Storage location specification for the audio and transcript. */ gcsSource?: GoogleCloudContactcenterinsightsV1alpha1GcsSource; } /** * One channel of conversation-level sentiment data. */ export interface GoogleCloudContactcenterinsightsV1alpha1ConversationLevelSentiment { /** * The channel of the audio that the data applies to. */ channelTag?: number; /** * Data specifying sentiment. */ sentimentData?: GoogleCloudContactcenterinsightsV1alpha1SentimentData; } /** * Conversation-level silence data. */ export interface GoogleCloudContactcenterinsightsV1alpha1ConversationLevelSilence { /** * Amount of time calculated to be in silence. */ silenceDuration?: number /* Duration */; /** * Percentage of the total conversation spent in silence. */ silencePercentage?: number; } function serializeGoogleCloudContactcenterinsightsV1alpha1ConversationLevelSilence(data: any): GoogleCloudContactcenterinsightsV1alpha1ConversationLevelSilence { return { ...data, silenceDuration: data["silenceDuration"] !== undefined ? data["silenceDuration"] : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1ConversationLevelSilence(data: any): GoogleCloudContactcenterinsightsV1alpha1ConversationLevelSilence { return { ...data, silenceDuration: data["silenceDuration"] !== undefined ? data["silenceDuration"] : undefined, }; } /** * The call participant speaking for a given utterance. */ export interface GoogleCloudContactcenterinsightsV1alpha1ConversationParticipant { /** * Deprecated. Use `dialogflow_participant_name` instead. The name of the * Dialogflow participant. Format: * projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} */ dialogflowParticipant?: string; /** * The name of the participant provided by Dialogflow. Format: * projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} */ dialogflowParticipantName?: string; /** * Obfuscated user ID from Dialogflow. */ obfuscatedExternalUserId?: string; /** * The role of the participant. */ role?: | "ROLE_UNSPECIFIED" | "HUMAN_AGENT" | "AUTOMATED_AGENT" | "END_USER" | "ANY_AGENT"; /** * A user-specified ID representing the participant. */ userId?: string; } /** * Conversation metadata related to quality management. */ export interface GoogleCloudContactcenterinsightsV1alpha1ConversationQualityMetadata { /** * Information about agents involved in the call. */ agentInfo?: GoogleCloudContactcenterinsightsV1alpha1ConversationQualityMetadataAgentInfo[]; /** * An arbitrary integer value indicating the customer's satisfaction rating. */ customerSatisfactionRating?: number; /** * An arbitrary string value specifying the menu path the customer took. */ menuPath?: string; /** * The amount of time the customer waited to connect with an agent. */ waitDuration?: number /* Duration */; } function serializeGoogleCloudContactcenterinsightsV1alpha1ConversationQualityMetadata(data: any): GoogleCloudContactcenterinsightsV1alpha1ConversationQualityMetadata { return { ...data, waitDuration: data["waitDuration"] !== undefined ? data["waitDuration"] : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1ConversationQualityMetadata(data: any): GoogleCloudContactcenterinsightsV1alpha1ConversationQualityMetadata { return { ...data, waitDuration: data["waitDuration"] !== undefined ? data["waitDuration"] : undefined, }; } /** * Information about an agent involved in the conversation. */ export interface GoogleCloudContactcenterinsightsV1alpha1ConversationQualityMetadataAgentInfo { /** * A user-specified string representing the agent. */ agentId?: string; /** * The agent type, e.g. HUMAN_AGENT. */ agentType?: | "ROLE_UNSPECIFIED" | "HUMAN_AGENT" | "AUTOMATED_AGENT" | "END_USER" | "ANY_AGENT"; /** * The agent's name. */ displayName?: string; /** * A user-provided string indicating the outcome of the agent's segment of * the call. */ dispositionCode?: string; /** * The agent's location. */ location?: string; /** * A user-specified string representing the agent's team. Deprecated in favor * of the `teams` field. */ team?: string; /** * User-specified strings representing the agent's teams. */ teams?: string[]; } /** * Conversation summarization suggestion data. */ export interface GoogleCloudContactcenterinsightsV1alpha1ConversationSummarizationSuggestionData { /** * The name of the answer record. Format: * projects/{project}/locations/{location}/answerRecords/{answer_record} */ answerRecord?: string; /** * The confidence score of the summarization. */ confidence?: number; /** * The name of the model that generates this summary. Format: * projects/{project}/locations/{location}/conversationModels/{conversation_model} */ conversationModel?: string; /** * A map that contains metadata about the summarization and the document from * which it originates. */ metadata?: { [key: string]: string }; /** * The summarization content that is concatenated into one string. */ text?: string; /** * The summarization content that is divided into sections. The key is the * section's name and the value is the section's content. There is no specific * format for the key or value. */ textSections?: { [key: string]: string }; } /** * A message representing the transcript of a conversation. */ export interface GoogleCloudContactcenterinsightsV1alpha1ConversationTranscript { /** * A list of sequential transcript segments that comprise the conversation. */ transcriptSegments?: GoogleCloudContactcenterinsightsV1alpha1ConversationTranscriptTranscriptSegment[]; } function serializeGoogleCloudContactcenterinsightsV1alpha1ConversationTranscript(data: any): GoogleCloudContactcenterinsightsV1alpha1ConversationTranscript { return { ...data, transcriptSegments: data["transcriptSegments"] !== undefined ? data["transcriptSegments"].map((item: any) => (serializeGoogleCloudContactcenterinsightsV1alpha1ConversationTranscriptTranscriptSegment(item))) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1ConversationTranscript(data: any): GoogleCloudContactcenterinsightsV1alpha1ConversationTranscript { return { ...data, transcriptSegments: data["transcriptSegments"] !== undefined ? data["transcriptSegments"].map((item: any) => (deserializeGoogleCloudContactcenterinsightsV1alpha1ConversationTranscriptTranscriptSegment(item))) : undefined, }; } /** * A segment of a full transcript. */ export interface GoogleCloudContactcenterinsightsV1alpha1ConversationTranscriptTranscriptSegment { /** * For conversations derived from multi-channel audio, this is the channel * number corresponding to the audio from that channel. For audioChannelCount * = N, its output values can range from '1' to 'N'. A channel tag of 0 * indicates that the audio is mono. */ channelTag?: number; /** * A confidence estimate between 0.0 and 1.0 of the fidelity of this segment. * A default value of 0.0 indicates that the value is unset. */ confidence?: number; /** * CCAI metadata relating to the current transcript segment. */ dialogflowSegmentMetadata?: GoogleCloudContactcenterinsightsV1alpha1ConversationTranscriptTranscriptSegmentDialogflowSegmentMetadata; /** * The language code of this segment as a * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. * Example: "en-US". */ languageCode?: string; /** * The time that the message occurred, if provided. */ messageTime?: Date; /** * The participant of this segment. */ segmentParticipant?: GoogleCloudContactcenterinsightsV1alpha1ConversationParticipant; /** * The sentiment for this transcript segment. */ sentiment?: GoogleCloudContactcenterinsightsV1alpha1SentimentData; /** * The text of this segment. */ text?: string; /** * A list of the word-specific information for each word in the segment. */ words?: GoogleCloudContactcenterinsightsV1alpha1ConversationTranscriptTranscriptSegmentWordInfo[]; } function serializeGoogleCloudContactcenterinsightsV1alpha1ConversationTranscriptTranscriptSegment(data: any): GoogleCloudContactcenterinsightsV1alpha1ConversationTranscriptTranscriptSegment { return { ...data, messageTime: data["messageTime"] !== undefined ? data["messageTime"].toISOString() : undefined, words: data["words"] !== undefined ? data["words"].map((item: any) => (serializeGoogleCloudContactcenterinsightsV1alpha1ConversationTranscriptTranscriptSegmentWordInfo(item))) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1ConversationTranscriptTranscriptSegment(data: any): GoogleCloudContactcenterinsightsV1alpha1ConversationTranscriptTranscriptSegment { return { ...data, messageTime: data["messageTime"] !== undefined ? new Date(data["messageTime"]) : undefined, words: data["words"] !== undefined ? data["words"].map((item: any) => (deserializeGoogleCloudContactcenterinsightsV1alpha1ConversationTranscriptTranscriptSegmentWordInfo(item))) : undefined, }; } /** * Metadata from Dialogflow relating to the current transcript segment. */ export interface GoogleCloudContactcenterinsightsV1alpha1ConversationTranscriptTranscriptSegmentDialogflowSegmentMetadata { /** * Whether the transcript segment was covered under the configured smart * reply allowlist in Agent Assist. */ smartReplyAllowlistCovered?: boolean; } /** * Word-level info for words in a transcript. */ export interface GoogleCloudContactcenterinsightsV1alpha1ConversationTranscriptTranscriptSegmentWordInfo { /** * A confidence estimate between 0.0 and 1.0 of the fidelity of this word. A * default value of 0.0 indicates that the value is unset. */ confidence?: number; /** * Time offset of the end of this word relative to the beginning of the total * conversation. */ endOffset?: number /* Duration */; /** * Time offset of the start of this word relative to the beginning of the * total conversation. */ startOffset?: number /* Duration */; /** * The word itself. Includes punctuation marks that surround the word. */ word?: string; } function serializeGoogleCloudContactcenterinsightsV1alpha1ConversationTranscriptTranscriptSegmentWordInfo(data: any): GoogleCloudContactcenterinsightsV1alpha1ConversationTranscriptTranscriptSegmentWordInfo { return { ...data, endOffset: data["endOffset"] !== undefined ? data["endOffset"] : undefined, startOffset: data["startOffset"] !== undefined ? data["startOffset"] : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1ConversationTranscriptTranscriptSegmentWordInfo(data: any): GoogleCloudContactcenterinsightsV1alpha1ConversationTranscriptTranscriptSegmentWordInfo { return { ...data, endOffset: data["endOffset"] !== undefined ? data["endOffset"] : undefined, startOffset: data["startOffset"] !== undefined ? data["startOffset"] : undefined, }; } /** * Metadata for a create analysis operation. */ export interface GoogleCloudContactcenterinsightsV1alpha1CreateAnalysisOperationMetadata { /** * Output only. The annotator selector used for the analysis (if any). */ readonly annotatorSelector?: GoogleCloudContactcenterinsightsV1alpha1AnnotatorSelector; /** * Output only. The Conversation that this Analysis Operation belongs to. */ readonly conversation?: string; /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; } /** * Metadata for creating an issue model. */ export interface GoogleCloudContactcenterinsightsV1alpha1CreateIssueModelMetadata { /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * The original request for creation. */ request?: GoogleCloudContactcenterinsightsV1alpha1CreateIssueModelRequest; } /** * The request to create an issue model. */ export interface GoogleCloudContactcenterinsightsV1alpha1CreateIssueModelRequest { /** * Required. The issue model to create. */ issueModel?: GoogleCloudContactcenterinsightsV1alpha1IssueModel; /** * Required. The parent resource of the issue model. */ parent?: string; } /** * Metadata for deleting an issue model. */ export interface GoogleCloudContactcenterinsightsV1alpha1DeleteIssueModelMetadata { /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * The original request for deletion. */ request?: GoogleCloudContactcenterinsightsV1alpha1DeleteIssueModelRequest; } /** * The request to delete an issue model. */ export interface GoogleCloudContactcenterinsightsV1alpha1DeleteIssueModelRequest { /** * Required. The name of the issue model to delete. */ name?: string; } /** * Metadata for deploying an issue model. */ export interface GoogleCloudContactcenterinsightsV1alpha1DeployIssueModelMetadata { /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * The original request for deployment. */ request?: GoogleCloudContactcenterinsightsV1alpha1DeployIssueModelRequest; } /** * The request to deploy an issue model. */ export interface GoogleCloudContactcenterinsightsV1alpha1DeployIssueModelRequest { /** * Required. The issue model to deploy. */ name?: string; } /** * The response to deploy an issue model. */ export interface GoogleCloudContactcenterinsightsV1alpha1DeployIssueModelResponse { } /** * The data for a Dialogflow intent. Represents a detected intent in the * conversation, e.g. MAKES_PROMISE. */ export interface GoogleCloudContactcenterinsightsV1alpha1DialogflowIntent { /** * The human-readable name of the intent. */ displayName?: string; } /** * Dialogflow interaction data. */ export interface GoogleCloudContactcenterinsightsV1alpha1DialogflowInteractionData { /** * The confidence of the match ranging from 0.0 (completely uncertain) to 1.0 * (completely certain). */ confidence?: number; /** * The Dialogflow intent resource path. Format: * projects/{project}/agent/{agent}/intents/{intent} */ dialogflowIntentId?: string; } /** * A Dialogflow source of conversation data. */ export interface GoogleCloudContactcenterinsightsV1alpha1DialogflowSource { /** * Cloud Storage URI that points to a file that contains the conversation * audio. */ audioUri?: string; /** * Output only. The name of the Dialogflow conversation that this * conversation resource is derived from. Format: * projects/{project}/locations/{location}/conversations/{conversation} */ readonly dialogflowConversation?: string; } /** * A dimension determines the grouping key for the query. In SQL terms, these * would be part of both the "SELECT" and "GROUP BY" clauses. */ export interface GoogleCloudContactcenterinsightsV1alpha1Dimension { /** * Output only. Metadata about the agent dimension. */ readonly agentDimensionMetadata?: GoogleCloudContactcenterinsightsV1alpha1DimensionAgentDimensionMetadata; /** * The key of the dimension. */ dimensionKey?: | "DIMENSION_KEY_UNSPECIFIED" | "ISSUE" | "AGENT" | "AGENT_TEAM" | "QA_QUESTION_ID" | "QA_QUESTION_ANSWER_VALUE" | "CONVERSATION_PROFILE_ID"; /** * Output only. Metadata about the issue dimension. */ readonly issueDimensionMetadata?: GoogleCloudContactcenterinsightsV1alpha1DimensionIssueDimensionMetadata; /** * Output only. Metadata about the QA question-answer dimension. */ readonly qaQuestionAnswerDimensionMetadata?: GoogleCloudContactcenterinsightsV1alpha1DimensionQaQuestionAnswerDimensionMetadata; /** * Output only. Metadata about the QA question dimension. */ readonly qaQuestionDimensionMetadata?: GoogleCloudContactcenterinsightsV1alpha1DimensionQaQuestionDimensionMetadata; } /** * Metadata about the agent dimension. */ export interface GoogleCloudContactcenterinsightsV1alpha1DimensionAgentDimensionMetadata { /** * Optional. The agent's name */ agentDisplayName?: string; /** * Optional. A user-specified string representing the agent. */ agentId?: string; /** * Optional. A user-specified string representing the agent's team. */ agentTeam?: string; } /** * Metadata about the issue dimension. */ export interface GoogleCloudContactcenterinsightsV1alpha1DimensionIssueDimensionMetadata { /** * The issue display name. */ issueDisplayName?: string; /** * The issue ID. */ issueId?: string; /** * The parent issue model ID. */ issueModelId?: string; } /** * Metadata about the QA question-answer dimension. This is useful for showing * the answer distribution for questions for a given scorecard. */ export interface GoogleCloudContactcenterinsightsV1alpha1DimensionQaQuestionAnswerDimensionMetadata { /** * Optional. The full body of the question. */ answerValue?: string; /** * Optional. The QA question ID. */ qaQuestionId?: string; /** * Optional. The QA scorecard ID. */ qaScorecardId?: string; /** * Optional. The full body of the question. */ questionBody?: string; } /** * Metadata about the QA question dimension. */ export interface GoogleCloudContactcenterinsightsV1alpha1DimensionQaQuestionDimensionMetadata { /** * Optional. The QA question ID. */ qaQuestionId?: string; /** * Optional. The QA scorecard ID. */ qaScorecardId?: string; /** * Optional. The full body of the question. */ questionBody?: string; } /** * A customer-managed encryption key specification that can be applied to all * created resources (e.g. `Conversation`). */ export interface GoogleCloudContactcenterinsightsV1alpha1EncryptionSpec { /** * Required. The name of customer-managed encryption key that is used to * secure a resource and its sub-resources. If empty, the resource is secured * by our default encryption key. Only the key in the same location as this * resource is allowed to be used for encryption. Format: * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}` */ kmsKey?: string; /** * Immutable. The resource name of the encryption key specification resource. * Format: projects/{project}/locations/{location}/encryptionSpec */ name?: string; } /** * The data for an entity annotation. Represents a phrase in the conversation * that is a known entity, such as a person, an organization, or location. */ export interface GoogleCloudContactcenterinsightsV1alpha1Entity { /** * The representative name for the entity. */ displayName?: string; /** * Metadata associated with the entity. For most entity types, the metadata * is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if * they are available. For the metadata associated with other entity types, * see the Type table below. */ metadata?: { [key: string]: string }; /** * The salience score associated with the entity in the [0, 1.0] range. The * salience score for an entity provides information about the importance or * centrality of that entity to the entire document text. Scores closer to 0 * are less salient, while scores closer to 1.0 are highly salient. */ salience?: number; /** * The aggregate sentiment expressed for this entity in the conversation. */ sentiment?: GoogleCloudContactcenterinsightsV1alpha1SentimentData; /** * The entity type. */ type?: | "TYPE_UNSPECIFIED" | "PERSON" | "LOCATION" | "ORGANIZATION" | "EVENT" | "WORK_OF_ART" | "CONSUMER_GOOD" | "OTHER" | "PHONE_NUMBER" | "ADDRESS" | "DATE" | "NUMBER" | "PRICE"; } /** * The data for an entity mention annotation. This represents a mention of an * `Entity` in the conversation. */ export interface GoogleCloudContactcenterinsightsV1alpha1EntityMentionData { /** * The key of this entity in conversation entities. Can be used to retrieve * the exact `Entity` this mention is attached to. */ entityUniqueId?: string; /** * Sentiment expressed for this mention of the entity. */ sentiment?: GoogleCloudContactcenterinsightsV1alpha1SentimentData; /** * The type of the entity mention. */ type?: | "MENTION_TYPE_UNSPECIFIED" | "PROPER" | "COMMON"; } /** * Metadata for an export insights operation. */ export interface GoogleCloudContactcenterinsightsV1alpha1ExportInsightsDataMetadata { /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * Partial errors during export operation that might cause the operation * output to be incomplete. */ partialErrors?: GoogleRpcStatus[]; /** * The original request for export. */ request?: GoogleCloudContactcenterinsightsV1alpha1ExportInsightsDataRequest; } /** * The request to export insights. */ export interface GoogleCloudContactcenterinsightsV1alpha1ExportInsightsDataRequest { /** * Specified if sink is a BigQuery table. */ bigQueryDestination?: GoogleCloudContactcenterinsightsV1alpha1ExportInsightsDataRequestBigQueryDestination; /** * A filter to reduce results to a specific subset. Useful for exporting * conversations with specific properties. */ filter?: string; /** * A fully qualified KMS key name for BigQuery tables protected by CMEK. * Format: * projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version} */ kmsKey?: string; /** * Required. The parent resource to export data from. */ parent?: string; /** * Options for what to do if the destination table already exists. */ writeDisposition?: | "WRITE_DISPOSITION_UNSPECIFIED" | "WRITE_TRUNCATE" | "WRITE_APPEND"; } /** * A BigQuery Table Reference. */ export interface GoogleCloudContactcenterinsightsV1alpha1ExportInsightsDataRequestBigQueryDestination { /** * Required. The name of the BigQuery dataset that the snapshot result should * be exported to. If this dataset does not exist, the export call returns an * INVALID_ARGUMENT error. */ dataset?: string; /** * A project ID or number. If specified, then export will attempt to write * data to this project instead of the resource project. Otherwise, the * resource project will be used. */ projectId?: string; /** * The BigQuery table name to which the insights data should be written. If * this table does not exist, the export call returns an INVALID_ARGUMENT * error. */ table?: string; } /** * Response for an export insights operation. */ export interface GoogleCloudContactcenterinsightsV1alpha1ExportInsightsDataResponse { } /** * Metadata used for export issue model. */ export interface GoogleCloudContactcenterinsightsV1alpha1ExportIssueModelMetadata { /** * The time the operation was created. */ createTime?: Date; /** * The time the operation finished running. */ endTime?: Date; /** * The original export request. */ request?: GoogleCloudContactcenterinsightsV1alpha1ExportIssueModelRequest; } function serializeGoogleCloudContactcenterinsightsV1alpha1ExportIssueModelMetadata(data: any): GoogleCloudContactcenterinsightsV1alpha1ExportIssueModelMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1ExportIssueModelMetadata(data: any): GoogleCloudContactcenterinsightsV1alpha1ExportIssueModelMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, }; } /** * Request to export an issue model. */ export interface GoogleCloudContactcenterinsightsV1alpha1ExportIssueModelRequest { /** * Google Cloud Storage URI to export the issue model to. */ gcsDestination?: GoogleCloudContactcenterinsightsV1alpha1ExportIssueModelRequestGcsDestination; /** * Required. The issue model to export. */ name?: string; } /** * Google Cloud Storage Object URI to save the issue model to. */ export interface GoogleCloudContactcenterinsightsV1alpha1ExportIssueModelRequestGcsDestination { /** * Required. Format: `gs:///` */ objectUri?: string; } /** * Response from export issue model */ export interface GoogleCloudContactcenterinsightsV1alpha1ExportIssueModelResponse { } /** * Agent Assist frequently-asked-question answer data. */ export interface GoogleCloudContactcenterinsightsV1alpha1FaqAnswerData { /** * The piece of text from the `source` knowledge base document. */ answer?: string; /** * The system's confidence score that this answer is a good match for this * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely * certain). */ confidenceScore?: number; /** * Map that contains metadata about the FAQ answer and the document that it * originates from. */ metadata?: { [key: string]: string }; /** * The name of the answer record. Format: * projects/{project}/locations/{location}/answerRecords/{answer_record} */ queryRecord?: string; /** * The corresponding FAQ question. */ question?: string; /** * The knowledge document that this answer was extracted from. Format: * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}. */ source?: string; } /** * Represents a conversation, resource, and label provided by the user. */ export interface GoogleCloudContactcenterinsightsV1alpha1FeedbackLabel { /** * Output only. Create time of the label. */ readonly createTime?: Date; /** * String label. */ label?: string; /** * Resource name of the resource to be labeled. */ labeledResource?: string; /** * Immutable. Resource name of the FeedbackLabel. Format: * projects/{project}/locations/{location}/conversations/{conversation}/feedbackLabels/{feedback_label} */ name?: string; /** * QaAnswer label. */ qaAnswerLabel?: GoogleCloudContactcenterinsightsV1alpha1QaAnswerAnswerValue; /** * Output only. Update time of the label. */ readonly updateTime?: Date; } /** * A Cloud Storage source of conversation data. */ export interface GoogleCloudContactcenterinsightsV1alpha1GcsSource { /** * Cloud Storage URI that points to a file that contains the conversation * audio. */ audioUri?: string; /** * Immutable. Cloud Storage URI that points to a file that contains the * conversation transcript. */ transcriptUri?: string; } /** * The data for a hold annotation. */ export interface GoogleCloudContactcenterinsightsV1alpha1HoldData { } /** * Metadata used for import issue model. */ export interface GoogleCloudContactcenterinsightsV1alpha1ImportIssueModelMetadata { /** * The time the operation was created. */ createTime?: Date; /** * The time the operation finished running. */ endTime?: Date; /** * The original import request. */ request?: GoogleCloudContactcenterinsightsV1alpha1ImportIssueModelRequest; } function serializeGoogleCloudContactcenterinsightsV1alpha1ImportIssueModelMetadata(data: any): GoogleCloudContactcenterinsightsV1alpha1ImportIssueModelMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1ImportIssueModelMetadata(data: any): GoogleCloudContactcenterinsightsV1alpha1ImportIssueModelMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, }; } /** * Request to import an issue model. */ export interface GoogleCloudContactcenterinsightsV1alpha1ImportIssueModelRequest { /** * Optional. If set to true, will create an issue model from the imported * file with randomly generated IDs for the issue model and corresponding * issues. Otherwise, replaces an existing model with the same ID as the file. */ createNewModel?: boolean; /** * Google Cloud Storage source message. */ gcsSource?: GoogleCloudContactcenterinsightsV1alpha1ImportIssueModelRequestGcsSource; /** * Required. The parent resource of the issue model. */ parent?: string; } /** * Google Cloud Storage Object URI to get the issue model file from. */ export interface GoogleCloudContactcenterinsightsV1alpha1ImportIssueModelRequestGcsSource { /** * Required. Format: `gs:///` */ objectUri?: string; } /** * Response from import issue model */ export interface GoogleCloudContactcenterinsightsV1alpha1ImportIssueModelResponse { } /** * The metadata for an IngestConversations operation. */ export interface GoogleCloudContactcenterinsightsV1alpha1IngestConversationsMetadata { /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * Output only. Statistics for IngestConversations operation. */ readonly ingestConversationsStats?: GoogleCloudContactcenterinsightsV1alpha1IngestConversationsMetadataIngestConversationsStats; /** * Output only. Partial errors during ingest operation that might cause the * operation output to be incomplete. */ readonly partialErrors?: GoogleRpcStatus[]; /** * Output only. The original request for ingest. */ readonly request?: GoogleCloudContactcenterinsightsV1alpha1IngestConversationsRequest; } /** * Statistics for IngestConversations operation. */ export interface GoogleCloudContactcenterinsightsV1alpha1IngestConversationsMetadataIngestConversationsStats { /** * Output only. The number of objects skipped because another conversation * with the same transcript uri had already been ingested. */ readonly duplicatesSkippedCount?: number; /** * Output only. The number of objects which were unable to be ingested due to * errors. The errors are populated in the partial_errors field. */ readonly failedIngestCount?: number; /** * Output only. The number of objects processed during the ingest operation. */ readonly processedObjectCount?: number; /** * Output only. The number of new conversations added during this ingest * operation. */ readonly successfulIngestCount?: number; } /** * The request to ingest conversations. */ export interface GoogleCloudContactcenterinsightsV1alpha1IngestConversationsRequest { /** * Configuration that applies to all conversations. */ conversationConfig?: GoogleCloudContactcenterinsightsV1alpha1IngestConversationsRequestConversationConfig; /** * A cloud storage bucket source. Note that any previously ingested objects * from the source will be skipped to avoid duplication. */ gcsSource?: GoogleCloudContactcenterinsightsV1alpha1IngestConversationsRequestGcsSource; /** * Required. The parent resource for new conversations. */ parent?: string; /** * Optional. DLP settings for transcript redaction. Optional, will default to * the config specified in Settings. */ redactionConfig?: GoogleCloudContactcenterinsightsV1alpha1RedactionConfig; /** * Optional. If set, this fields indicates the number of objects to ingest * from the Cloud Storage bucket. If empty, the entire bucket will be * ingested. Unless they are first deleted, conversations produced through * sampling won't be ingested by subsequent ingest requests. */ sampleSize?: number; /** * Optional. Default Speech-to-Text configuration. Optional, will default to * the config specified in Settings. */ speechConfig?: GoogleCloudContactcenterinsightsV1alpha1SpeechConfig; /** * Configuration for when `source` contains conversation transcripts. */ transcriptObjectConfig?: GoogleCloudContactcenterinsightsV1alpha1IngestConversationsRequestTranscriptObjectConfig; } /** * Configuration that applies to all conversations. */ export interface GoogleCloudContactcenterinsightsV1alpha1IngestConversationsRequestConversationConfig { /** * Optional. Indicates which of the channels, 1 or 2, contains the agent. * Note that this must be set for conversations to be properly displayed and * analyzed. */ agentChannel?: number; /** * Optional. An opaque, user-specified string representing a human agent who * handled all conversations in the import. Note that this will be overridden * if per-conversation metadata is provided through the `metadata_bucket_uri`. */ agentId?: string; /** * Optional. Indicates which of the channels, 1 or 2, contains the agent. * Note that this must be set for conversations to be properly displayed and * analyzed. */ customerChannel?: number; } /** * Configuration for Cloud Storage bucket sources. */ export interface GoogleCloudContactcenterinsightsV1alpha1IngestConversationsRequestGcsSource { /** * Optional. Specifies the type of the objects in `bucket_uri`. */ bucketObjectType?: | "BUCKET_OBJECT_TYPE_UNSPECIFIED" | "TRANSCRIPT" | "AUDIO"; /** * Required. The Cloud Storage bucket containing source objects. */ bucketUri?: string; /** * Optional. Custom keys to extract as conversation labels from metadata * files in `metadata_bucket_uri`. Keys not included in this field will be * ignored. Note that there is a limit of 100 labels per conversation. */ customMetadataKeys?: string[]; /** * Optional. The Cloud Storage path to the conversation metadata. Note that: * [1] Metadata files are expected to be in JSON format. [2] Metadata and * source files (transcripts or audio) must be in separate buckets. [3] A * source file and its corresponding metadata file must share the same name to * be properly ingested, E.g. `gs://bucket/audio/conversation1.mp3` and * `gs://bucket/metadata/conversation1.json`. */ metadataBucketUri?: string; } /** * Configuration for processing transcript objects. */ export interface GoogleCloudContactcenterinsightsV1alpha1IngestConversationsRequestTranscriptObjectConfig { /** * Required. The medium transcript objects represent. */ medium?: | "MEDIUM_UNSPECIFIED" | "PHONE_CALL" | "CHAT"; } /** * The response to an IngestConversations operation. */ export interface GoogleCloudContactcenterinsightsV1alpha1IngestConversationsResponse { } /** * Metadata for initializing a location-level encryption specification. */ export interface GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecMetadata { /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * Partial errors during initializing operation that might cause the * operation output to be incomplete. */ partialErrors?: GoogleRpcStatus[]; /** * Output only. The original request for initialization. */ readonly request?: GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecRequest; } /** * The request to initialize a location-level encryption specification. */ export interface GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecRequest { /** * Required. The encryption spec used for CMEK encryption. It is required * that the kms key is in the same region as the endpoint. The same key will * be used for all provisioned resources, if encryption is available. If the * `kms_key_name` field is left empty, no encryption will be enforced. */ encryptionSpec?: GoogleCloudContactcenterinsightsV1alpha1EncryptionSpec; } /** * The response to initialize a location-level encryption specification. */ export interface GoogleCloudContactcenterinsightsV1alpha1InitializeEncryptionSpecResponse { } /** * The data for an intent. Represents a detected intent in the conversation, * for example MAKES_PROMISE. */ export interface GoogleCloudContactcenterinsightsV1alpha1Intent { /** * The human-readable name of the intent. */ displayName?: string; /** * The unique identifier of the intent. */ id?: string; } /** * The data for an intent match. Represents an intent match for a text segment * in the conversation. A text segment can be part of a sentence, a complete * sentence, or an utterance with multiple sentences. */ export interface GoogleCloudContactcenterinsightsV1alpha1IntentMatchData { /** * The id of the matched intent. Can be used to retrieve the corresponding * intent information. */ intentUniqueId?: string; } /** * The data for an interruption annotation. */ export interface GoogleCloudContactcenterinsightsV1alpha1InterruptionData { } /** * Information about the issue. */ export interface GoogleCloudContactcenterinsightsV1alpha1IssueAssignment { /** * Immutable. Display name of the assigned issue. This field is set at time * of analyis and immutable since then. */ displayName?: string; /** * Resource name of the assigned issue. */ issue?: string; /** * Score indicating the likelihood of the issue assignment. currently bounded * on [0,1]. */ score?: number; } /** * The data for an issue match annotation. */ export interface GoogleCloudContactcenterinsightsV1alpha1IssueMatchData { /** * Information about the issue's assignment. */ issueAssignment?: GoogleCloudContactcenterinsightsV1alpha1IssueAssignment; } /** * The issue model resource. */ export interface GoogleCloudContactcenterinsightsV1alpha1IssueModel { /** * Output only. The time at which this issue model was created. */ readonly createTime?: Date; /** * The representative name for the issue model. */ displayName?: string; /** * Configs for the input data that used to create the issue model. */ inputDataConfig?: GoogleCloudContactcenterinsightsV1alpha1IssueModelInputDataConfig; /** * Output only. Number of issues in this issue model. */ readonly issueCount?: bigint; /** * Language of the model. */ languageCode?: string; /** * Type of the model. */ modelType?: | "MODEL_TYPE_UNSPECIFIED" | "TYPE_V1" | "TYPE_V2"; /** * Immutable. The resource name of the issue model. Format: * projects/{project}/locations/{location}/issueModels/{issue_model} */ name?: string; /** * Output only. State of the model. */ readonly state?: | "STATE_UNSPECIFIED" | "UNDEPLOYED" | "DEPLOYING" | "DEPLOYED" | "UNDEPLOYING" | "DELETING"; /** * Output only. Immutable. The issue model's label statistics on its training * data. */ readonly trainingStats?: GoogleCloudContactcenterinsightsV1alpha1IssueModelLabelStats; /** * Output only. The most recent time at which the issue model was updated. */ readonly updateTime?: Date; } /** * Configs for the input data used to create the issue model. */ export interface GoogleCloudContactcenterinsightsV1alpha1IssueModelInputDataConfig { /** * A filter to reduce the conversations used for training the model to a * specific subset. */ filter?: string; /** * Medium of conversations used in training data. This field is being * deprecated. To specify the medium to be used in training a new issue model, * set the `medium` field on `filter`. */ medium?: | "MEDIUM_UNSPECIFIED" | "PHONE_CALL" | "CHAT"; /** * Output only. Number of conversations used in training. Output only. */ readonly trainingConversationsCount?: bigint; } /** * Aggregated statistics about an issue model. */ export interface GoogleCloudContactcenterinsightsV1alpha1IssueModelLabelStats { /** * Number of conversations the issue model has analyzed at this point in * time. */ analyzedConversationsCount?: bigint; /** * Statistics on each issue. Key is the issue's resource name. */ issueStats?: { [key: string]: GoogleCloudContactcenterinsightsV1alpha1IssueModelLabelStatsIssueStats }; /** * Number of analyzed conversations for which no issue was applicable at this * point in time. */ unclassifiedConversationsCount?: bigint; } function serializeGoogleCloudContactcenterinsightsV1alpha1IssueModelLabelStats(data: any): GoogleCloudContactcenterinsightsV1alpha1IssueModelLabelStats { return { ...data, analyzedConversationsCount: data["analyzedConversationsCount"] !== undefined ? String(data["analyzedConversationsCount"]) : undefined, issueStats: data["issueStats"] !== undefined ? Object.fromEntries(Object.entries(data["issueStats"]).map(([k, v]: [string, any]) => ([k, serializeGoogleCloudContactcenterinsightsV1alpha1IssueModelLabelStatsIssueStats(v)]))) : undefined, unclassifiedConversationsCount: data["unclassifiedConversationsCount"] !== undefined ? String(data["unclassifiedConversationsCount"]) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1IssueModelLabelStats(data: any): GoogleCloudContactcenterinsightsV1alpha1IssueModelLabelStats { return { ...data, analyzedConversationsCount: data["analyzedConversationsCount"] !== undefined ? BigInt(data["analyzedConversationsCount"]) : undefined, issueStats: data["issueStats"] !== undefined ? Object.fromEntries(Object.entries(data["issueStats"]).map(([k, v]: [string, any]) => ([k, deserializeGoogleCloudContactcenterinsightsV1alpha1IssueModelLabelStatsIssueStats(v)]))) : undefined, unclassifiedConversationsCount: data["unclassifiedConversationsCount"] !== undefined ? BigInt(data["unclassifiedConversationsCount"]) : undefined, }; } /** * Aggregated statistics about an issue. */ export interface GoogleCloudContactcenterinsightsV1alpha1IssueModelLabelStatsIssueStats { /** * Display name of the issue. */ displayName?: string; /** * Issue resource. Format: * projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} */ issue?: string; /** * Number of conversations attached to the issue at this point in time. */ labeledConversationsCount?: bigint; } function serializeGoogleCloudContactcenterinsightsV1alpha1IssueModelLabelStatsIssueStats(data: any): GoogleCloudContactcenterinsightsV1alpha1IssueModelLabelStatsIssueStats { return { ...data, labeledConversationsCount: data["labeledConversationsCount"] !== undefined ? String(data["labeledConversationsCount"]) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1IssueModelLabelStatsIssueStats(data: any): GoogleCloudContactcenterinsightsV1alpha1IssueModelLabelStatsIssueStats { return { ...data, labeledConversationsCount: data["labeledConversationsCount"] !== undefined ? BigInt(data["labeledConversationsCount"]) : undefined, }; } /** * Issue Modeling result on a conversation. */ export interface GoogleCloudContactcenterinsightsV1alpha1IssueModelResult { /** * Issue model that generates the result. Format: * projects/{project}/locations/{location}/issueModels/{issue_model} */ issueModel?: string; /** * All the matched issues. */ issues?: GoogleCloudContactcenterinsightsV1alpha1IssueAssignment[]; } /** * The response for listing all feedback labels. */ export interface GoogleCloudContactcenterinsightsV1alpha1ListAllFeedbackLabelsResponse { /** * The feedback labels that match the request. */ feedbackLabels?: GoogleCloudContactcenterinsightsV1alpha1FeedbackLabel[]; /** * 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 response for listing feedback labels. */ export interface GoogleCloudContactcenterinsightsV1alpha1ListFeedbackLabelsResponse { /** * The feedback labels that match the request. */ feedbackLabels?: GoogleCloudContactcenterinsightsV1alpha1FeedbackLabel[]; /** * The next page token. */ nextPageToken?: string; } /** * The data for a matched phrase matcher. Represents information identifying a * phrase matcher for a given match. */ export interface GoogleCloudContactcenterinsightsV1alpha1PhraseMatchData { /** * The human-readable name of the phrase matcher. */ displayName?: string; /** * The unique identifier (the resource name) of the phrase matcher. */ phraseMatcher?: string; } /** * An answer to a QaQuestion. */ export interface GoogleCloudContactcenterinsightsV1alpha1QaAnswer { /** * List of all individual answers given to the question. */ answerSources?: GoogleCloudContactcenterinsightsV1alpha1QaAnswerAnswerSource[]; /** * The main answer value, incorporating any manual edits if they exist. */ answerValue?: GoogleCloudContactcenterinsightsV1alpha1QaAnswerAnswerValue; /** * The conversation the answer applies to. */ conversation?: string; /** * The QaQuestion answered by this answer. */ qaQuestion?: string; /** * Question text. E.g., "Did the agent greet the customer?" */ questionBody?: string; /** * User-defined list of arbitrary tags. Matches the value from * QaScorecard.ScorecardQuestion.tags. Used for grouping/organization and for * weighting the score of each answer. */ tags?: string[]; } /** * A question may have multiple answers from varying sources, one of which * becomes the "main" answer above. AnswerSource represents each individual * answer. */ export interface GoogleCloudContactcenterinsightsV1alpha1QaAnswerAnswerSource { /** * The answer value from this source. */ answerValue?: GoogleCloudContactcenterinsightsV1alpha1QaAnswerAnswerValue; /** * What created the answer. */ sourceType?: | "SOURCE_TYPE_UNSPECIFIED" | "SYSTEM_GENERATED" | "MANUAL_EDIT"; } /** * Message for holding the value of a QaAnswer. QaQuestion.AnswerChoice defines * the possible answer values for a question. */ export interface GoogleCloudContactcenterinsightsV1alpha1QaAnswerAnswerValue { /** * Boolean value. */ boolValue?: boolean; /** * A short string used as an identifier. Matches the value used in * QaQuestion.AnswerChoice.key. */ key?: string; /** * A value of "Not Applicable (N/A)". Should only ever be `true`. */ naValue?: boolean; /** * Output only. Normalized score of the questions. Calculated as score / * potential_score. */ readonly normalizedScore?: number; /** * Numerical value. */ numValue?: number; /** * Output only. The maximum potential score of the question. */ readonly potentialScore?: number; /** * Output only. Numerical score of the answer. */ readonly score?: number; /** * String value. */ strValue?: string; } /** * The results of scoring a single conversation against a QaScorecard. Contains * a collection of QaAnswers and aggregate score. */ export interface GoogleCloudContactcenterinsightsV1alpha1QaScorecardResult { /** * ID of the agent that handled the conversation. */ agentId?: string; /** * The conversation scored by this result. */ conversation?: string; /** * Output only. The timestamp that the revision was created. */ readonly createTime?: Date; /** * Identifier. The name of the scorecard result. Format: * projects/{project}/locations/{location}/qaScorecardResults/{qa_scorecard_result} */ name?: string; /** * The normalized score, which is the score divided by the potential score. * Any manual edits are included if they exist. */ normalizedScore?: number; /** * The maximum potential overall score of the scorecard. Any questions * answered using `na_value` are excluded from this calculation. */ potentialScore?: number; /** * Set of QaAnswers represented in the result. */ qaAnswers?: GoogleCloudContactcenterinsightsV1alpha1QaAnswer[]; /** * The QaScorecardRevision scored by this result. */ qaScorecardRevision?: string; /** * Collection of tags and their scores. */ qaTagResults?: GoogleCloudContactcenterinsightsV1alpha1QaScorecardResultQaTagResult[]; /** * The overall numerical score of the result, incorporating any manual edits * if they exist. */ score?: number; /** * List of all individual score sets. */ scoreSources?: GoogleCloudContactcenterinsightsV1alpha1QaScorecardResultScoreSource[]; } /** * Tags and their corresponding results. */ export interface GoogleCloudContactcenterinsightsV1alpha1QaScorecardResultQaTagResult { /** * The normalized score the tag applies to. */ normalizedScore?: number; /** * The potential score the tag applies to. */ potentialScore?: number; /** * The score the tag applies to. */ score?: number; /** * The tag the score applies to. */ tag?: string; } /** * A scorecard result may have multiple sets of scores from varying sources, * one of which becomes the "main" answer above. A ScoreSource represents each * individual set of scores. */ export interface GoogleCloudContactcenterinsightsV1alpha1QaScorecardResultScoreSource { /** * The normalized score, which is the score divided by the potential score. */ normalizedScore?: number; /** * The maximum potential overall score of the scorecard. Any questions * answered using `na_value` are excluded from this calculation. */ potentialScore?: number; /** * Collection of tags and their scores. */ qaTagResults?: GoogleCloudContactcenterinsightsV1alpha1QaScorecardResultQaTagResult[]; /** * The overall numerical score of the result. */ score?: number; /** * What created the score. */ sourceType?: | "SOURCE_TYPE_UNSPECIFIED" | "SYSTEM_GENERATED_ONLY" | "INCLUDES_MANUAL_EDITS"; } /** * The metadata from querying metrics. */ export interface GoogleCloudContactcenterinsightsV1alpha1QueryMetricsMetadata { } /** * The response for querying metrics. */ export interface GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponse { /** * Required. The location of the data. * "projects/{project}/locations/{location}" */ location?: string; /** * The macro average slice contains aggregated averages across the selected * dimension. i.e. if group_by agent is specified this field will contain the * average across all agents. This field is only populated if the request * specifies a Dimension. */ macroAverageSlice?: GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSlice; /** * A slice contains a total and (if the request specified a time granularity) * a time series of metric values. Each slice contains a unique combination of * the cardinality of dimensions from the request. */ slices?: GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSlice[]; /** * The metrics last update time. */ updateTime?: Date; } function serializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponse(data: any): GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponse { return { ...data, macroAverageSlice: data["macroAverageSlice"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSlice(data["macroAverageSlice"]) : undefined, slices: data["slices"] !== undefined ? data["slices"].map((item: any) => (serializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSlice(item))) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponse(data: any): GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponse { return { ...data, macroAverageSlice: data["macroAverageSlice"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSlice(data["macroAverageSlice"]) : undefined, slices: data["slices"] !== undefined ? data["slices"].map((item: any) => (deserializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSlice(item))) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * A slice contains a total and (if the request specified a time granularity) a * time series of metric values. Each slice contains a unique combination of the * cardinality of dimensions from the request. For example, if the request * specifies a single ISSUE dimension and it has a cardinality of 2 (i.e. the * data used to compute the metrics has 2 issues in total), the response will * have 2 slices: * Slice 1 -> dimensions=[Issue 1] * Slice 2 -> * dimensions=[Issue 2] */ export interface GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSlice { /** * A unique combination of dimensions that this slice represents. */ dimensions?: GoogleCloudContactcenterinsightsV1alpha1Dimension[]; /** * A time series of metric values. This is only populated if the request * specifies a time granularity other than NONE. */ timeSeries?: GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceTimeSeries; /** * The total metric value. The interval of this data point is [starting * create time, ending create time) from the request. */ total?: GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPoint; } function serializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSlice(data: any): GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSlice { return { ...data, timeSeries: data["timeSeries"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceTimeSeries(data["timeSeries"]) : undefined, total: data["total"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPoint(data["total"]) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSlice(data: any): GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSlice { return { ...data, timeSeries: data["timeSeries"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceTimeSeries(data["timeSeries"]) : undefined, total: data["total"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPoint(data["total"]) : undefined, }; } /** * A data point contains the metric values mapped to an interval. */ export interface GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPoint { /** * The measure related to conversations. */ conversationMeasure?: GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPointConversationMeasure; /** * The interval that this data point represents. * If this is the total data * point, the interval is [starting create time, ending create time) from the * request. * If this a data point from the time series, the interval is * [time, time + time granularity from the request). */ interval?: GoogleTypeInterval; } function serializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPoint(data: any): GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPoint { return { ...data, conversationMeasure: data["conversationMeasure"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPointConversationMeasure(data["conversationMeasure"]) : undefined, interval: data["interval"] !== undefined ? serializeGoogleTypeInterval(data["interval"]) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPoint(data: any): GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPoint { return { ...data, conversationMeasure: data["conversationMeasure"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPointConversationMeasure(data["conversationMeasure"]) : undefined, interval: data["interval"] !== undefined ? deserializeGoogleTypeInterval(data["interval"]) : undefined, }; } /** * The measure related to conversations. */ export interface GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPointConversationMeasure { /** * The average agent's sentiment score. */ averageAgentSentimentScore?: number; /** * The average client's sentiment score. */ averageClientSentimentScore?: number; /** * The average customer satisfaction rating. */ averageCustomerSatisfactionRating?: number; /** * The average duration. */ averageDuration?: number /* Duration */; /** * Average QA normalized score. Will exclude 0's in average calculation. */ averageQaNormalizedScore?: number; /** * Average QA normalized score averaged for questions averaged across all * revisions of the parent scorecard. Will be only populated if the request * specifies a dimension of QA_QUESTION_ID. */ averageQaQuestionNormalizedScore?: number; /** * The average silence percentage. */ averageSilencePercentage?: number; /** * The average turn count. */ averageTurnCount?: number; /** * The conversation count. */ conversationCount?: number; /** * Average QA normalized score for all the tags. */ qaTagScores?: GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPointConversationMeasureQaTagScore[]; } function serializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPointConversationMeasure(data: any): GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPointConversationMeasure { return { ...data, averageDuration: data["averageDuration"] !== undefined ? data["averageDuration"] : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPointConversationMeasure(data: any): GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPointConversationMeasure { return { ...data, averageDuration: data["averageDuration"] !== undefined ? data["averageDuration"] : undefined, }; } /** * Average QA normalized score for the tag. */ export interface GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPointConversationMeasureQaTagScore { /** * Average tag normalized score per tag. */ averageTagNormalizedScore?: number; /** * Tag name. */ tag?: string; } /** * A time series of metric values. */ export interface GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceTimeSeries { /** * The data points that make up the time series . */ dataPoints?: GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPoint[]; } function serializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceTimeSeries(data: any): GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceTimeSeries { return { ...data, dataPoints: data["dataPoints"] !== undefined ? data["dataPoints"].map((item: any) => (serializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPoint(item))) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceTimeSeries(data: any): GoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceTimeSeries { return { ...data, dataPoints: data["dataPoints"] !== undefined ? data["dataPoints"].map((item: any) => (deserializeGoogleCloudContactcenterinsightsV1alpha1QueryMetricsResponseSliceDataPoint(item))) : undefined, }; } /** * DLP resources used for redaction while ingesting conversations. DLP settings * are applied to conversations ingested from the `UploadConversation` and * `IngestConversations` endpoints, including conversation coming from CCAI * Platform. They are not applied to conversations ingested from the * `CreateConversation` endpoint or the Dialogflow / Agent Assist runtime * integrations. When using Dialogflow / Agent Assist runtime integrations, * redaction should be performed in Dialogflow / Agent Assist. */ export interface GoogleCloudContactcenterinsightsV1alpha1RedactionConfig { /** * The fully-qualified DLP deidentify template resource name. Format: * `projects/{project}/deidentifyTemplates/{template}` */ deidentifyTemplate?: string; /** * The fully-qualified DLP inspect template resource name. Format: * `projects/{project}/locations/{location}/inspectTemplates/{template}` */ inspectTemplate?: string; } /** * An annotation that was generated during the customer and agent interaction. */ export interface GoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotation { /** * The unique identifier of the annotation. Format: * projects/{project}/locations/{location}/conversationDatasets/{dataset}/conversationDataItems/{data_item}/conversationAnnotations/{annotation} */ annotationId?: string; /** * The feedback that the customer has about the answer in `data`. */ answerFeedback?: GoogleCloudContactcenterinsightsV1alpha1AnswerFeedback; /** * Agent Assist Article Suggestion data. */ articleSuggestion?: GoogleCloudContactcenterinsightsV1alpha1ArticleSuggestionData; /** * Conversation summarization suggestion data. */ conversationSummarizationSuggestion?: GoogleCloudContactcenterinsightsV1alpha1ConversationSummarizationSuggestionData; /** * The time at which this annotation was created. */ createTime?: Date; /** * Dialogflow interaction data. */ dialogflowInteraction?: GoogleCloudContactcenterinsightsV1alpha1DialogflowInteractionData; /** * The boundary in the conversation where the annotation ends, inclusive. */ endBoundary?: GoogleCloudContactcenterinsightsV1alpha1AnnotationBoundary; /** * Agent Assist FAQ answer data. */ faqAnswer?: GoogleCloudContactcenterinsightsV1alpha1FaqAnswerData; /** * Agent Assist Smart Compose suggestion data. */ smartComposeSuggestion?: GoogleCloudContactcenterinsightsV1alpha1SmartComposeSuggestionData; /** * Agent Assist Smart Reply data. */ smartReply?: GoogleCloudContactcenterinsightsV1alpha1SmartReplyData; /** * The boundary in the conversation where the annotation starts, inclusive. */ startBoundary?: GoogleCloudContactcenterinsightsV1alpha1AnnotationBoundary; /** * Explicit input used for generating the answer */ userInput?: GoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotationUserInput; } function serializeGoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotation(data: any): GoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotation { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotation(data: any): GoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotation { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, }; } /** * Explicit input used for generating the answer */ export interface GoogleCloudContactcenterinsightsV1alpha1RuntimeAnnotationUserInput { /** * The resource name of associated generator. Format: * `projects//locations//generators/` */ generatorName?: string; /** * Query text. Article Search uses this to store the input query used to * generate the search results. */ query?: string; /** * Query source for the answer. */ querySource?: | "QUERY_SOURCE_UNSPECIFIED" | "AGENT_QUERY" | "SUGGESTED_QUERY"; } /** * The data for a sentiment annotation. */ export interface GoogleCloudContactcenterinsightsV1alpha1SentimentData { /** * A non-negative number from 0 to infinity which represents the abolute * magnitude of sentiment regardless of score. */ magnitude?: number; /** * The sentiment score between -1.0 (negative) and 1.0 (positive). */ score?: number; } /** * The data for a silence annotation. */ export interface GoogleCloudContactcenterinsightsV1alpha1SilenceData { } /** * Agent Assist Smart Compose suggestion data. */ export interface GoogleCloudContactcenterinsightsV1alpha1SmartComposeSuggestionData { /** * The system's confidence score that this suggestion is a good match for * this conversation, ranging from 0.0 (completely uncertain) to 1.0 * (completely certain). */ confidenceScore?: number; /** * Map that contains metadata about the Smart Compose suggestion and the * document from which it originates. */ metadata?: { [key: string]: string }; /** * The name of the answer record. Format: * projects/{project}/locations/{location}/answerRecords/{answer_record} */ queryRecord?: string; /** * The content of the suggestion. */ suggestion?: string; } /** * Agent Assist Smart Reply data. */ export interface GoogleCloudContactcenterinsightsV1alpha1SmartReplyData { /** * The system's confidence score that this reply is a good match for this * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely * certain). */ confidenceScore?: number; /** * Map that contains metadata about the Smart Reply and the document from * which it originates. */ metadata?: { [key: string]: string }; /** * The name of the answer record. Format: * projects/{project}/locations/{location}/answerRecords/{answer_record} */ queryRecord?: string; /** * The content of the reply. */ reply?: string; } /** * Speech-to-Text configuration. Speech-to-Text settings are applied to * conversations ingested from the `UploadConversation` and * `IngestConversations` endpoints, including conversation coming from CCAI * Platform. They are not applied to conversations ingested from the * `CreateConversation` endpoint. */ export interface GoogleCloudContactcenterinsightsV1alpha1SpeechConfig { /** * The fully-qualified Speech Recognizer resource name. Format: * `projects/{project_id}/locations/{location}/recognizer/{recognizer}` */ speechRecognizer?: string; } /** * Metadata for undeploying an issue model. */ export interface GoogleCloudContactcenterinsightsV1alpha1UndeployIssueModelMetadata { /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * The original request for undeployment. */ request?: GoogleCloudContactcenterinsightsV1alpha1UndeployIssueModelRequest; } /** * The request to undeploy an issue model. */ export interface GoogleCloudContactcenterinsightsV1alpha1UndeployIssueModelRequest { /** * Required. The issue model to undeploy. */ name?: string; } /** * The response to undeploy an issue model. */ export interface GoogleCloudContactcenterinsightsV1alpha1UndeployIssueModelResponse { } /** * The metadata for an `UploadConversation` operation. */ export interface GoogleCloudContactcenterinsightsV1alpha1UploadConversationMetadata { /** * Output only. The operation name for a successfully created analysis * operation, if any. */ readonly analysisOperation?: string; /** * Output only. The redaction config applied to the uploaded conversation. */ readonly appliedRedactionConfig?: GoogleCloudContactcenterinsightsV1alpha1RedactionConfig; /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * Output only. The original request. */ readonly request?: GoogleCloudContactcenterinsightsV1alpha1UploadConversationRequest; } /** * Request to upload a conversation. */ export interface GoogleCloudContactcenterinsightsV1alpha1UploadConversationRequest { /** * Required. The conversation resource to create. */ conversation?: GoogleCloudContactcenterinsightsV1alpha1Conversation; /** * Optional. A unique ID for the new conversation. This ID will become the * final component of the conversation's resource name. If no ID is specified, * a server-generated ID will be used. This value should be 4-64 characters * and must match the regular expression `^[a-z0-9-]{4,64}$`. Valid characters * are `a-z-` */ conversationId?: string; /** * Required. The parent resource of the conversation. */ parent?: string; /** * Optional. DLP settings for transcript redaction. Will default to the * config specified in Settings. */ redactionConfig?: GoogleCloudContactcenterinsightsV1alpha1RedactionConfig; /** * Optional. Speech-to-Text configuration. Will default to the config * specified in Settings. */ speechConfig?: GoogleCloudContactcenterinsightsV1alpha1SpeechConfig; } function serializeGoogleCloudContactcenterinsightsV1alpha1UploadConversationRequest(data: any): GoogleCloudContactcenterinsightsV1alpha1UploadConversationRequest { return { ...data, conversation: data["conversation"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1alpha1Conversation(data["conversation"]) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1alpha1UploadConversationRequest(data: any): GoogleCloudContactcenterinsightsV1alpha1UploadConversationRequest { return { ...data, conversation: data["conversation"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1alpha1Conversation(data["conversation"]) : undefined, }; } /** * The analysis resource. */ export interface GoogleCloudContactcenterinsightsV1Analysis { /** * Output only. The result of the analysis, which is populated when the * analysis finishes. */ readonly analysisResult?: GoogleCloudContactcenterinsightsV1AnalysisResult; /** * To select the annotators to run and the phrase matchers to use (if any). * If not specified, all annotators will be run. */ annotatorSelector?: GoogleCloudContactcenterinsightsV1AnnotatorSelector; /** * Output only. The time at which the analysis was created, which occurs when * the long-running operation completes. */ readonly createTime?: Date; /** * Immutable. The resource name of the analysis. Format: * projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis} */ name?: string; /** * Output only. The time at which the analysis was requested. */ readonly requestTime?: Date; } /** * The result of an analysis. */ export interface GoogleCloudContactcenterinsightsV1AnalysisResult { /** * Call-specific metadata created by the analysis. */ callAnalysisMetadata?: GoogleCloudContactcenterinsightsV1AnalysisResultCallAnalysisMetadata; /** * The time at which the analysis ended. */ endTime?: Date; } function serializeGoogleCloudContactcenterinsightsV1AnalysisResult(data: any): GoogleCloudContactcenterinsightsV1AnalysisResult { return { ...data, callAnalysisMetadata: data["callAnalysisMetadata"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1AnalysisResultCallAnalysisMetadata(data["callAnalysisMetadata"]) : undefined, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1AnalysisResult(data: any): GoogleCloudContactcenterinsightsV1AnalysisResult { return { ...data, callAnalysisMetadata: data["callAnalysisMetadata"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1AnalysisResultCallAnalysisMetadata(data["callAnalysisMetadata"]) : undefined, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, }; } /** * Call-specific metadata created during analysis. */ export interface GoogleCloudContactcenterinsightsV1AnalysisResultCallAnalysisMetadata { /** * A list of call annotations that apply to this call. */ annotations?: GoogleCloudContactcenterinsightsV1CallAnnotation[]; /** * All the entities in the call. */ entities?: { [key: string]: GoogleCloudContactcenterinsightsV1Entity }; /** * All the matched intents in the call. */ intents?: { [key: string]: GoogleCloudContactcenterinsightsV1Intent }; /** * Overall conversation-level issue modeling result. */ issueModelResult?: GoogleCloudContactcenterinsightsV1IssueModelResult; /** * All the matched phrase matchers in the call. */ phraseMatchers?: { [key: string]: GoogleCloudContactcenterinsightsV1PhraseMatchData }; /** * Results of scoring QaScorecards. */ qaScorecardResults?: GoogleCloudContactcenterinsightsV1QaScorecardResult[]; /** * Overall conversation-level sentiment for each channel of the call. */ sentiments?: GoogleCloudContactcenterinsightsV1ConversationLevelSentiment[]; /** * Overall conversation-level silence during the call. */ silence?: GoogleCloudContactcenterinsightsV1ConversationLevelSilence; } function serializeGoogleCloudContactcenterinsightsV1AnalysisResultCallAnalysisMetadata(data: any): GoogleCloudContactcenterinsightsV1AnalysisResultCallAnalysisMetadata { return { ...data, silence: data["silence"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1ConversationLevelSilence(data["silence"]) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1AnalysisResultCallAnalysisMetadata(data: any): GoogleCloudContactcenterinsightsV1AnalysisResultCallAnalysisMetadata { return { ...data, silence: data["silence"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1ConversationLevelSilence(data["silence"]) : undefined, }; } /** * The CCAI Insights project wide analysis rule. This rule will be applied to * all conversations that match the filter defined in the rule. For a * conversation matches the filter, the annotators specified in the rule will be * run. If a conversation matches multiple rules, a union of all the annotators * will be run. One project can have multiple analysis rules. */ export interface GoogleCloudContactcenterinsightsV1AnalysisRule { /** * If true, apply this rule to conversations. Otherwise, this rule is * inactive and saved as a draft. */ active?: boolean; /** * Percentage of conversations that we should apply this analysis setting * automatically, between [0, 1]. For example, 0.1 means 10%. Conversations * are sampled in a determenestic way. The original runtime_percentage & * upload percentage will be replaced by defining filters on the conversation. */ analysisPercentage?: number; /** * Selector of annotators to run and the phrase matchers to use for * conversations that matches the conversation_filter. If not specified, NO * annotators will be run. */ annotatorSelector?: GoogleCloudContactcenterinsightsV1AnnotatorSelector; /** * Filter for the conversations that should apply this analysis rule. An * empty filter means this analysis rule applies to all conversations. */ conversationFilter?: string; /** * Output only. The time at which this analysis rule was created. */ readonly createTime?: Date; /** * Display Name of the analysis rule. */ displayName?: string; /** * Identifier. The resource name of the analysis rule. Format: * projects/{project}/locations/{location}/analysisRules/{analysis_rule} */ name?: string; /** * Output only. The most recent time at which this analysis rule was updated. */ readonly updateTime?: Date; } /** * A point in a conversation that marks the start or the end of an annotation. */ export interface GoogleCloudContactcenterinsightsV1AnnotationBoundary { /** * The index in the sequence of transcribed pieces of the conversation where * the boundary is located. This index starts at zero. */ transcriptIndex?: number; /** * The word index of this boundary with respect to the first word in the * transcript piece. This index starts at zero. */ wordIndex?: number; } /** * Selector of all available annotators and phrase matchers to run. */ export interface GoogleCloudContactcenterinsightsV1AnnotatorSelector { /** * The issue model to run. If not provided, the most recently deployed topic * model will be used. The provided issue model will only be used for * inference if the issue model is deployed and if run_issue_model_annotator * is set to true. If more than one issue model is provided, only the first * provided issue model will be used for inference. */ issueModels?: string[]; /** * The list of phrase matchers to run. If not provided, all active phrase * matchers will be used. If inactive phrase matchers are provided, they will * not be used. Phrase matchers will be run only if * run_phrase_matcher_annotator is set to true. Format: * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} */ phraseMatchers?: string[]; /** * Configuration for the QA annotator. */ qaConfig?: GoogleCloudContactcenterinsightsV1AnnotatorSelectorQaConfig; /** * Whether to run the entity annotator. */ runEntityAnnotator?: boolean; /** * Whether to run the intent annotator. */ runIntentAnnotator?: boolean; /** * Whether to run the interruption annotator. */ runInterruptionAnnotator?: boolean; /** * Whether to run the issue model annotator. A model should have already been * deployed for this to take effect. */ runIssueModelAnnotator?: boolean; /** * Whether to run the active phrase matcher annotator(s). */ runPhraseMatcherAnnotator?: boolean; /** * Whether to run the QA annotator. */ runQaAnnotator?: boolean; /** * Whether to run the sentiment annotator. */ runSentimentAnnotator?: boolean; /** * Whether to run the silence annotator. */ runSilenceAnnotator?: boolean; /** * Whether to run the summarization annotator. */ runSummarizationAnnotator?: boolean; /** * Configuration for the summarization annotator. */ summarizationConfig?: GoogleCloudContactcenterinsightsV1AnnotatorSelectorSummarizationConfig; } /** * Configuration for the QA feature. */ export interface GoogleCloudContactcenterinsightsV1AnnotatorSelectorQaConfig { /** * A manual list of scorecards to score. */ scorecardList?: GoogleCloudContactcenterinsightsV1AnnotatorSelectorQaConfigScorecardList; } /** * Container for a list of scorecards. */ export interface GoogleCloudContactcenterinsightsV1AnnotatorSelectorQaConfigScorecardList { /** * List of QaScorecardRevisions. */ qaScorecardRevisions?: string[]; } /** * Configuration for summarization. */ export interface GoogleCloudContactcenterinsightsV1AnnotatorSelectorSummarizationConfig { /** * Resource name of the Dialogflow conversation profile. Format: * projects/{project}/locations/{location}/conversationProfiles/{conversation_profile} */ conversationProfile?: string; /** * Default summarization model to be used. */ summarizationModel?: | "SUMMARIZATION_MODEL_UNSPECIFIED" | "BASELINE_MODEL" | "BASELINE_MODEL_V2_0"; } /** * The feedback that the customer has about a certain answer in the * conversation. */ export interface GoogleCloudContactcenterinsightsV1AnswerFeedback { /** * Indicates whether an answer or item was clicked by the human agent. */ clicked?: boolean; /** * The correctness level of an answer. */ correctnessLevel?: | "CORRECTNESS_LEVEL_UNSPECIFIED" | "NOT_CORRECT" | "PARTIALLY_CORRECT" | "FULLY_CORRECT"; /** * Indicates whether an answer or item was displayed to the human agent in * the agent desktop UI. */ displayed?: boolean; } /** * Agent Assist Article Suggestion data. */ export interface GoogleCloudContactcenterinsightsV1ArticleSuggestionData { /** * The system's confidence score that this article is a good match for this * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely * certain). */ confidenceScore?: number; /** * Map that contains metadata about the Article Suggestion and the document * that it originates from. */ metadata?: { [key: string]: string }; /** * The name of the answer record. Format: * projects/{project}/locations/{location}/answerRecords/{answer_record} */ queryRecord?: string; /** * The knowledge document that this answer was extracted from. Format: * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document} */ source?: string; /** * Article title. */ title?: string; /** * Article URI. */ uri?: string; } /** * The metadata for a bulk analyze conversations operation. */ export interface GoogleCloudContactcenterinsightsV1BulkAnalyzeConversationsMetadata { /** * The number of requested analyses that have completed successfully so far. */ completedAnalysesCount?: number; /** * The time the operation was created. */ createTime?: Date; /** * The time the operation finished running. */ endTime?: Date; /** * The number of requested analyses that have failed so far. */ failedAnalysesCount?: number; /** * Output only. Partial errors during bulk analyze operation that might cause * the operation output to be incomplete. */ readonly partialErrors?: GoogleRpcStatus[]; /** * The original request for bulk analyze. */ request?: GoogleCloudContactcenterinsightsV1BulkAnalyzeConversationsRequest; /** * Total number of analyses requested. Computed by the number of * conversations returned by `filter` multiplied by `analysis_percentage` in * the request. */ totalRequestedAnalysesCount?: number; } function serializeGoogleCloudContactcenterinsightsV1BulkAnalyzeConversationsMetadata(data: any): GoogleCloudContactcenterinsightsV1BulkAnalyzeConversationsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1BulkAnalyzeConversationsMetadata(data: any): GoogleCloudContactcenterinsightsV1BulkAnalyzeConversationsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, }; } /** * The request to analyze conversations in bulk. */ export interface GoogleCloudContactcenterinsightsV1BulkAnalyzeConversationsRequest { /** * Required. Percentage of selected conversation to analyze, between [0, * 100]. */ analysisPercentage?: number; /** * To select the annotators to run and the phrase matchers to use (if any). * If not specified, all annotators will be run. */ annotatorSelector?: GoogleCloudContactcenterinsightsV1AnnotatorSelector; /** * Required. Filter used to select the subset of conversations to analyze. */ filter?: string; /** * Required. The parent resource to create analyses in. */ parent?: string; } /** * The response for a bulk analyze conversations operation. */ export interface GoogleCloudContactcenterinsightsV1BulkAnalyzeConversationsResponse { /** * Count of failed analyses. */ failedAnalysisCount?: number; /** * Count of successful analyses. */ successfulAnalysisCount?: number; } /** * The metadata for a bulk delete conversations operation. */ export interface GoogleCloudContactcenterinsightsV1BulkDeleteConversationsMetadata { /** * The time the operation was created. */ createTime?: Date; /** * The time the operation finished running. */ endTime?: Date; /** * Partial errors during bulk delete conversations operation that might cause * the operation output to be incomplete. */ partialErrors?: GoogleRpcStatus[]; /** * The original request for bulk delete. */ request?: GoogleCloudContactcenterinsightsV1BulkDeleteConversationsRequest; } function serializeGoogleCloudContactcenterinsightsV1BulkDeleteConversationsMetadata(data: any): GoogleCloudContactcenterinsightsV1BulkDeleteConversationsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1BulkDeleteConversationsMetadata(data: any): GoogleCloudContactcenterinsightsV1BulkDeleteConversationsMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, }; } /** * The request to delete conversations in bulk. */ export interface GoogleCloudContactcenterinsightsV1BulkDeleteConversationsRequest { /** * Filter used to select the subset of conversations to delete. */ filter?: string; /** * If set to true, all of this conversation's analyses will also be deleted. * Otherwise, the request will only succeed if the conversation has no * analyses. */ force?: boolean; /** * Maximum number of conversations to delete. */ maxDeleteCount?: number; /** * Required. The parent resource to delete conversations from. Format: * projects/{project}/locations/{location} */ parent?: string; } /** * The response for a bulk delete conversations operation. */ export interface GoogleCloudContactcenterinsightsV1BulkDeleteConversationsResponse { } /** * Metadata for the BulkDownloadFeedbackLabel endpoint. */ export interface GoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsMetadata { /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. Statistics for BulkDownloadFeedbackLabels operation. */ readonly downloadStats?: GoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsMetadataDownloadStats; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * Partial errors during ingest operation that might cause the operation * output to be incomplete. */ partialErrors?: GoogleRpcStatus[]; /** * Output only. The original request for download. */ readonly request?: GoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequest; } /** * Statistics for BulkDownloadFeedbackLabels operation. */ export interface GoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsMetadataDownloadStats { /** * Output only. Full name of the files written to Cloud storage. */ readonly fileNames?: string[]; /** * The number of objects processed during the download operation. */ processedObjectCount?: number; /** * The number of new feedback labels downloaded during this operation. * Different from "processed" because some labels might not be downloaded * because an error. */ successfulDownloadCount?: number; /** * Total number of files written to the provided Cloud Storage bucket. */ totalFilesWritten?: number; } /** * Request for the BulkDownloadFeedbackLabel endpoint. */ export interface GoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequest { /** * Optional. Filter parent conversations to download feedback labels for. * When specified, the feedback labels will be downloaded for the * conversations that match the filter. If `template_qa_scorecard_id` is set, * all the conversations that match the filter will be paired with the * questions under the scorecard for labeling. */ conversationFilter?: string; /** * Optional. The type of feedback labels that will be downloaded. */ feedbackLabelType?: | "FEEDBACK_LABEL_TYPE_UNSPECIFIED" | "QUALITY_AI" | "TOPIC_MODELING"; /** * Optional. A filter to reduce results to a specific subset. Supports * disjunctions (OR) and conjunctions (AND). Supported fields: * * `issue_model_id` * `qa_question_id` * `qa_scorecard_id` * `min_create_time` * * `max_create_time` * `min_update_time` * `max_update_time` * * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING */ filter?: string; /** * A cloud storage bucket destination. */ gcsDestination?: GoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequestGcsDestination; /** * Optional. Limits the maximum number of feedback labels that will be * downloaded. The first `N` feedback labels will be downloaded. */ maxDownloadCount?: number; /** * Required. The parent resource for new feedback labels. */ parent?: string; /** * Optional. If set, a template for labeling conversations and scorecard * questions will be created from the conversation_filter and the questions * under the scorecard(s). The feedback label `filter` will be ignored. */ templateQaScorecardId?: string[]; } function serializeGoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequest(data: any): GoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequest { return { ...data, gcsDestination: data["gcsDestination"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequestGcsDestination(data["gcsDestination"]) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequest(data: any): GoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequest { return { ...data, gcsDestination: data["gcsDestination"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequestGcsDestination(data["gcsDestination"]) : undefined, }; } /** * Google Cloud Storage Object details to write the feedback labels to. */ export interface GoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequestGcsDestination { /** * Optional. Add whitespace to the JSON file. Makes easier to read, but * increases file size. Only applicable for JSON format. */ addWhitespace?: boolean; /** * Optional. Always print fields with no presence. This is useful for * printing fields that are not set, like implicit 0 value or empty * lists/maps. Only applicable for JSON format. */ alwaysPrintEmptyFields?: boolean; /** * Required. File format in which the labels will be exported. */ format?: | "FORMAT_UNSPECIFIED" | "CSV" | "JSON"; /** * Required. The Google Cloud Storage URI to write the feedback labels to. * The file name will be used as a prefix for the files written to the bucket * if the output needs to be split across multiple files, otherwise it will be * used as is. The file extension will be appended to the file name based on * the format selected. E.g. `gs://bucket_name/object_uri_prefix` */ objectUri?: string; /** * Optional. The number of records per file. Applicable for either format. */ recordsPerFileCount?: bigint; } function serializeGoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequestGcsDestination(data: any): GoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequestGcsDestination { return { ...data, recordsPerFileCount: data["recordsPerFileCount"] !== undefined ? String(data["recordsPerFileCount"]) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequestGcsDestination(data: any): GoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsRequestGcsDestination { return { ...data, recordsPerFileCount: data["recordsPerFileCount"] !== undefined ? BigInt(data["recordsPerFileCount"]) : undefined, }; } /** * Response for the BulkDownloadFeedbackLabel endpoint. */ export interface GoogleCloudContactcenterinsightsV1BulkDownloadFeedbackLabelsResponse { } /** * The request for bulk uploading feedback labels. */ export interface GoogleCloudContactcenterinsightsV1BulkUploadFeedbackLabelsRequest { /** * A cloud storage bucket source. */ gcsSource?: GoogleCloudContactcenterinsightsV1BulkUploadFeedbackLabelsRequestGcsSource; /** * Optional. If set, upload will not happen and the labels will be validated. * If not set, then default behavior will be to upload the labels after * validation is complete. */ validateOnly?: boolean; } /** * Google Cloud Storage Object details to get the feedback label file from. */ export interface GoogleCloudContactcenterinsightsV1BulkUploadFeedbackLabelsRequestGcsSource { /** * Required. File format which will be ingested. */ format?: | "FORMAT_UNSPECIFIED" | "CSV" | "JSON"; /** * Required. The Google Cloud Storage URI of the file to import. Format: * `gs://bucket_name/object_name` */ objectUri?: string; } /** * Response of querying an issue model's statistics. */ export interface GoogleCloudContactcenterinsightsV1CalculateIssueModelStatsResponse { /** * The latest label statistics for the queried issue model. Includes results * on both training data and data labeled after deployment. */ currentStats?: GoogleCloudContactcenterinsightsV1IssueModelLabelStats; } function serializeGoogleCloudContactcenterinsightsV1CalculateIssueModelStatsResponse(data: any): GoogleCloudContactcenterinsightsV1CalculateIssueModelStatsResponse { return { ...data, currentStats: data["currentStats"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1IssueModelLabelStats(data["currentStats"]) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1CalculateIssueModelStatsResponse(data: any): GoogleCloudContactcenterinsightsV1CalculateIssueModelStatsResponse { return { ...data, currentStats: data["currentStats"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1IssueModelLabelStats(data["currentStats"]) : undefined, }; } /** * The response for calculating conversation statistics. */ export interface GoogleCloudContactcenterinsightsV1CalculateStatsResponse { /** * The average duration of all conversations. The average is calculated using * only conversations that have a time duration. */ averageDuration?: number /* Duration */; /** * The average number of turns per conversation. */ averageTurnCount?: number; /** * The total number of conversations. */ conversationCount?: number; /** * A time series representing the count of conversations created over time * that match that requested filter criteria. */ conversationCountTimeSeries?: GoogleCloudContactcenterinsightsV1CalculateStatsResponseTimeSeries; /** * A map associating each custom highlighter resource name with its * respective number of matches in the set of conversations. */ customHighlighterMatches?: { [key: string]: number }; /** * A map associating each issue resource name with its respective number of * matches in the set of conversations. Key has the format: * `projects//locations//issueModels//issues/` Deprecated, use * `issue_matches_stats` field instead. */ issueMatches?: { [key: string]: number }; /** * A map associating each issue resource name with its respective number of * matches in the set of conversations. Key has the format: * `projects//locations//issueModels//issues/` */ issueMatchesStats?: { [key: string]: GoogleCloudContactcenterinsightsV1IssueModelLabelStatsIssueStats }; /** * A map associating each smart highlighter display name with its respective * number of matches in the set of conversations. */ smartHighlighterMatches?: { [key: string]: number }; } function serializeGoogleCloudContactcenterinsightsV1CalculateStatsResponse(data: any): GoogleCloudContactcenterinsightsV1CalculateStatsResponse { return { ...data, averageDuration: data["averageDuration"] !== undefined ? data["averageDuration"] : undefined, conversationCountTimeSeries: data["conversationCountTimeSeries"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1CalculateStatsResponseTimeSeries(data["conversationCountTimeSeries"]) : undefined, issueMatchesStats: data["issueMatchesStats"] !== undefined ? Object.fromEntries(Object.entries(data["issueMatchesStats"]).map(([k, v]: [string, any]) => ([k, serializeGoogleCloudContactcenterinsightsV1IssueModelLabelStatsIssueStats(v)]))) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1CalculateStatsResponse(data: any): GoogleCloudContactcenterinsightsV1CalculateStatsResponse { return { ...data, averageDuration: data["averageDuration"] !== undefined ? data["averageDuration"] : undefined, conversationCountTimeSeries: data["conversationCountTimeSeries"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1CalculateStatsResponseTimeSeries(data["conversationCountTimeSeries"]) : undefined, issueMatchesStats: data["issueMatchesStats"] !== undefined ? Object.fromEntries(Object.entries(data["issueMatchesStats"]).map(([k, v]: [string, any]) => ([k, deserializeGoogleCloudContactcenterinsightsV1IssueModelLabelStatsIssueStats(v)]))) : undefined, }; } /** * A time series representing conversations over time. */ export interface GoogleCloudContactcenterinsightsV1CalculateStatsResponseTimeSeries { /** * The duration of each interval. */ intervalDuration?: number /* Duration */; /** * An ordered list of intervals from earliest to latest, where each interval * represents the number of conversations that transpired during the time * window. */ points?: GoogleCloudContactcenterinsightsV1CalculateStatsResponseTimeSeriesInterval[]; } function serializeGoogleCloudContactcenterinsightsV1CalculateStatsResponseTimeSeries(data: any): GoogleCloudContactcenterinsightsV1CalculateStatsResponseTimeSeries { return { ...data, intervalDuration: data["intervalDuration"] !== undefined ? data["intervalDuration"] : undefined, points: data["points"] !== undefined ? data["points"].map((item: any) => (serializeGoogleCloudContactcenterinsightsV1CalculateStatsResponseTimeSeriesInterval(item))) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1CalculateStatsResponseTimeSeries(data: any): GoogleCloudContactcenterinsightsV1CalculateStatsResponseTimeSeries { return { ...data, intervalDuration: data["intervalDuration"] !== undefined ? data["intervalDuration"] : undefined, points: data["points"] !== undefined ? data["points"].map((item: any) => (deserializeGoogleCloudContactcenterinsightsV1CalculateStatsResponseTimeSeriesInterval(item))) : undefined, }; } /** * A single interval in a time series. */ export interface GoogleCloudContactcenterinsightsV1CalculateStatsResponseTimeSeriesInterval { /** * The number of conversations created in this interval. */ conversationCount?: number; /** * The start time of this interval. */ startTime?: Date; } function serializeGoogleCloudContactcenterinsightsV1CalculateStatsResponseTimeSeriesInterval(data: any): GoogleCloudContactcenterinsightsV1CalculateStatsResponseTimeSeriesInterval { return { ...data, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1CalculateStatsResponseTimeSeriesInterval(data: any): GoogleCloudContactcenterinsightsV1CalculateStatsResponseTimeSeriesInterval { return { ...data, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, }; } /** * A piece of metadata that applies to a window of a call. */ export interface GoogleCloudContactcenterinsightsV1CallAnnotation { /** * The boundary in the conversation where the annotation ends, inclusive. */ annotationEndBoundary?: GoogleCloudContactcenterinsightsV1AnnotationBoundary; /** * The boundary in the conversation where the annotation starts, inclusive. */ annotationStartBoundary?: GoogleCloudContactcenterinsightsV1AnnotationBoundary; /** * The channel of the audio where the annotation occurs. For single-channel * audio, this field is not populated. */ channelTag?: number; /** * Data specifying an entity mention. */ entityMentionData?: GoogleCloudContactcenterinsightsV1EntityMentionData; /** * Data specifying a hold. */ holdData?: GoogleCloudContactcenterinsightsV1HoldData; /** * Data specifying an intent match. */ intentMatchData?: GoogleCloudContactcenterinsightsV1IntentMatchData; /** * Data specifying an interruption. */ interruptionData?: GoogleCloudContactcenterinsightsV1InterruptionData; /** * Data specifying an issue match. */ issueMatchData?: GoogleCloudContactcenterinsightsV1IssueMatchData; /** * Data specifying a phrase match. */ phraseMatchData?: GoogleCloudContactcenterinsightsV1PhraseMatchData; /** * Data specifying sentiment. */ sentimentData?: GoogleCloudContactcenterinsightsV1SentimentData; /** * Data specifying silence. */ silenceData?: GoogleCloudContactcenterinsightsV1SilenceData; } /** * The conversation resource. */ export interface GoogleCloudContactcenterinsightsV1Conversation { /** * An opaque, user-specified string representing the human agent who handled * the conversation. */ agentId?: string; /** * Call-specific metadata. */ callMetadata?: GoogleCloudContactcenterinsightsV1ConversationCallMetadata; /** * Output only. The time at which the conversation was created. */ readonly createTime?: Date; /** * The source of the audio and transcription for the conversation. */ dataSource?: GoogleCloudContactcenterinsightsV1ConversationDataSource; /** * Output only. All the matched Dialogflow intents in the call. The key * corresponds to a Dialogflow intent, format: * projects/{project}/agent/{agent}/intents/{intent} */ readonly dialogflowIntents?: { [key: string]: GoogleCloudContactcenterinsightsV1DialogflowIntent }; /** * Output only. The duration of the conversation. */ readonly duration?: number /* Duration */; /** * The time at which this conversation should expire. After this time, the * conversation data and any associated analyses will be deleted. */ expireTime?: Date; /** * A map for the user to specify any custom fields. A maximum of 100 labels * per conversation is allowed, with a maximum of 256 characters per entry. */ labels?: { [key: string]: string }; /** * A user-specified language code for the conversation. */ languageCode?: string; /** * Output only. The conversation's latest analysis, if one exists. */ readonly latestAnalysis?: GoogleCloudContactcenterinsightsV1Analysis; /** * Output only. Latest summary of the conversation. */ readonly latestSummary?: GoogleCloudContactcenterinsightsV1ConversationSummarizationSuggestionData; /** * Immutable. The conversation medium, if unspecified will default to * PHONE_CALL. */ medium?: | "MEDIUM_UNSPECIFIED" | "PHONE_CALL" | "CHAT"; /** * Input only. JSON metadata encoded as a string. This field is primarily * used by Insights integrations with various telphony systems and must be in * one of Insight's supported formats. */ metadataJson?: string; /** * Immutable. The resource name of the conversation. Format: * projects/{project}/locations/{location}/conversations/{conversation} */ name?: string; /** * Obfuscated user ID which the customer sent to us. */ obfuscatedUserId?: string; /** * Conversation metadata related to quality management. */ qualityMetadata?: GoogleCloudContactcenterinsightsV1ConversationQualityMetadata; /** * Output only. The annotations that were generated during the customer and * agent interaction. */ readonly runtimeAnnotations?: GoogleCloudContactcenterinsightsV1RuntimeAnnotation[]; /** * The time at which the conversation started. */ startTime?: Date; /** * Output only. The conversation transcript. */ readonly transcript?: GoogleCloudContactcenterinsightsV1ConversationTranscript; /** * Input only. The TTL for this resource. If specified, then this TTL will be * used to calculate the expire time. */ ttl?: number /* Duration */; /** * Output only. The number of turns in the conversation. */ readonly turnCount?: number; /** * Output only. The most recent time at which the conversation was updated. */ readonly updateTime?: Date; } function serializeGoogleCloudContactcenterinsightsV1Conversation(data: any): GoogleCloudContactcenterinsightsV1Conversation { return { ...data, expireTime: data["expireTime"] !== undefined ? data["expireTime"].toISOString() : undefined, qualityMetadata: data["qualityMetadata"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1ConversationQualityMetadata(data["qualityMetadata"]) : undefined, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, ttl: data["ttl"] !== undefined ? data["ttl"] : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1Conversation(data: any): GoogleCloudContactcenterinsightsV1Conversation { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, duration: data["duration"] !== undefined ? data["duration"] : undefined, expireTime: data["expireTime"] !== undefined ? new Date(data["expireTime"]) : undefined, qualityMetadata: data["qualityMetadata"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1ConversationQualityMetadata(data["qualityMetadata"]) : undefined, runtimeAnnotations: data["runtimeAnnotations"] !== undefined ? data["runtimeAnnotations"].map((item: any) => (deserializeGoogleCloudContactcenterinsightsV1RuntimeAnnotation(item))) : undefined, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, transcript: data["transcript"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1ConversationTranscript(data["transcript"]) : undefined, ttl: data["ttl"] !== undefined ? data["ttl"] : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Call-specific metadata. */ export interface GoogleCloudContactcenterinsightsV1ConversationCallMetadata { /** * The audio channel that contains the agent. */ agentChannel?: number; /** * The audio channel that contains the customer. */ customerChannel?: number; } /** * The conversation source, which is a combination of transcript and audio. */ export interface GoogleCloudContactcenterinsightsV1ConversationDataSource { /** * The source when the conversation comes from Dialogflow. */ dialogflowSource?: GoogleCloudContactcenterinsightsV1DialogflowSource; /** * A Cloud Storage location specification for the audio and transcript. */ gcsSource?: GoogleCloudContactcenterinsightsV1GcsSource; } /** * One channel of conversation-level sentiment data. */ export interface GoogleCloudContactcenterinsightsV1ConversationLevelSentiment { /** * The channel of the audio that the data applies to. */ channelTag?: number; /** * Data specifying sentiment. */ sentimentData?: GoogleCloudContactcenterinsightsV1SentimentData; } /** * Conversation-level silence data. */ export interface GoogleCloudContactcenterinsightsV1ConversationLevelSilence { /** * Amount of time calculated to be in silence. */ silenceDuration?: number /* Duration */; /** * Percentage of the total conversation spent in silence. */ silencePercentage?: number; } function serializeGoogleCloudContactcenterinsightsV1ConversationLevelSilence(data: any): GoogleCloudContactcenterinsightsV1ConversationLevelSilence { return { ...data, silenceDuration: data["silenceDuration"] !== undefined ? data["silenceDuration"] : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1ConversationLevelSilence(data: any): GoogleCloudContactcenterinsightsV1ConversationLevelSilence { return { ...data, silenceDuration: data["silenceDuration"] !== undefined ? data["silenceDuration"] : undefined, }; } /** * The call participant speaking for a given utterance. */ export interface GoogleCloudContactcenterinsightsV1ConversationParticipant { /** * Deprecated. Use `dialogflow_participant_name` instead. The name of the * Dialogflow participant. Format: * projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} */ dialogflowParticipant?: string; /** * The name of the participant provided by Dialogflow. Format: * projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant} */ dialogflowParticipantName?: string; /** * Obfuscated user ID from Dialogflow. */ obfuscatedExternalUserId?: string; /** * The role of the participant. */ role?: | "ROLE_UNSPECIFIED" | "HUMAN_AGENT" | "AUTOMATED_AGENT" | "END_USER" | "ANY_AGENT"; /** * A user-specified ID representing the participant. */ userId?: string; } /** * Conversation metadata related to quality management. */ export interface GoogleCloudContactcenterinsightsV1ConversationQualityMetadata { /** * Information about agents involved in the call. */ agentInfo?: GoogleCloudContactcenterinsightsV1ConversationQualityMetadataAgentInfo[]; /** * An arbitrary integer value indicating the customer's satisfaction rating. */ customerSatisfactionRating?: number; /** * An arbitrary string value specifying the menu path the customer took. */ menuPath?: string; /** * The amount of time the customer waited to connect with an agent. */ waitDuration?: number /* Duration */; } function serializeGoogleCloudContactcenterinsightsV1ConversationQualityMetadata(data: any): GoogleCloudContactcenterinsightsV1ConversationQualityMetadata { return { ...data, waitDuration: data["waitDuration"] !== undefined ? data["waitDuration"] : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1ConversationQualityMetadata(data: any): GoogleCloudContactcenterinsightsV1ConversationQualityMetadata { return { ...data, waitDuration: data["waitDuration"] !== undefined ? data["waitDuration"] : undefined, }; } /** * Information about an agent involved in the conversation. */ export interface GoogleCloudContactcenterinsightsV1ConversationQualityMetadataAgentInfo { /** * A user-specified string representing the agent. */ agentId?: string; /** * The agent type, e.g. HUMAN_AGENT. */ agentType?: | "ROLE_UNSPECIFIED" | "HUMAN_AGENT" | "AUTOMATED_AGENT" | "END_USER" | "ANY_AGENT"; /** * The agent's name. */ displayName?: string; /** * A user-provided string indicating the outcome of the agent's segment of * the call. */ dispositionCode?: string; /** * The agent's location. */ location?: string; /** * A user-specified string representing the agent's team. Deprecated in favor * of the `teams` field. */ team?: string; /** * User-specified strings representing the agent's teams. */ teams?: string[]; } /** * Conversation summarization suggestion data. */ export interface GoogleCloudContactcenterinsightsV1ConversationSummarizationSuggestionData { /** * The name of the answer record. Format: * projects/{project}/locations/{location}/answerRecords/{answer_record} */ answerRecord?: string; /** * The confidence score of the summarization. */ confidence?: number; /** * The name of the model that generates this summary. Format: * projects/{project}/locations/{location}/conversationModels/{conversation_model} */ conversationModel?: string; /** * A map that contains metadata about the summarization and the document from * which it originates. */ metadata?: { [key: string]: string }; /** * The summarization content that is concatenated into one string. */ text?: string; /** * The summarization content that is divided into sections. The key is the * section's name and the value is the section's content. There is no specific * format for the key or value. */ textSections?: { [key: string]: string }; } /** * A message representing the transcript of a conversation. */ export interface GoogleCloudContactcenterinsightsV1ConversationTranscript { /** * A list of sequential transcript segments that comprise the conversation. */ transcriptSegments?: GoogleCloudContactcenterinsightsV1ConversationTranscriptTranscriptSegment[]; } function serializeGoogleCloudContactcenterinsightsV1ConversationTranscript(data: any): GoogleCloudContactcenterinsightsV1ConversationTranscript { return { ...data, transcriptSegments: data["transcriptSegments"] !== undefined ? data["transcriptSegments"].map((item: any) => (serializeGoogleCloudContactcenterinsightsV1ConversationTranscriptTranscriptSegment(item))) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1ConversationTranscript(data: any): GoogleCloudContactcenterinsightsV1ConversationTranscript { return { ...data, transcriptSegments: data["transcriptSegments"] !== undefined ? data["transcriptSegments"].map((item: any) => (deserializeGoogleCloudContactcenterinsightsV1ConversationTranscriptTranscriptSegment(item))) : undefined, }; } /** * A segment of a full transcript. */ export interface GoogleCloudContactcenterinsightsV1ConversationTranscriptTranscriptSegment { /** * For conversations derived from multi-channel audio, this is the channel * number corresponding to the audio from that channel. For audioChannelCount * = N, its output values can range from '1' to 'N'. A channel tag of 0 * indicates that the audio is mono. */ channelTag?: number; /** * A confidence estimate between 0.0 and 1.0 of the fidelity of this segment. * A default value of 0.0 indicates that the value is unset. */ confidence?: number; /** * CCAI metadata relating to the current transcript segment. */ dialogflowSegmentMetadata?: GoogleCloudContactcenterinsightsV1ConversationTranscriptTranscriptSegmentDialogflowSegmentMetadata; /** * The language code of this segment as a * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. * Example: "en-US". */ languageCode?: string; /** * The time that the message occurred, if provided. */ messageTime?: Date; /** * The participant of this segment. */ segmentParticipant?: GoogleCloudContactcenterinsightsV1ConversationParticipant; /** * The sentiment for this transcript segment. */ sentiment?: GoogleCloudContactcenterinsightsV1SentimentData; /** * The text of this segment. */ text?: string; /** * A list of the word-specific information for each word in the segment. */ words?: GoogleCloudContactcenterinsightsV1ConversationTranscriptTranscriptSegmentWordInfo[]; } function serializeGoogleCloudContactcenterinsightsV1ConversationTranscriptTranscriptSegment(data: any): GoogleCloudContactcenterinsightsV1ConversationTranscriptTranscriptSegment { return { ...data, messageTime: data["messageTime"] !== undefined ? data["messageTime"].toISOString() : undefined, words: data["words"] !== undefined ? data["words"].map((item: any) => (serializeGoogleCloudContactcenterinsightsV1ConversationTranscriptTranscriptSegmentWordInfo(item))) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1ConversationTranscriptTranscriptSegment(data: any): GoogleCloudContactcenterinsightsV1ConversationTranscriptTranscriptSegment { return { ...data, messageTime: data["messageTime"] !== undefined ? new Date(data["messageTime"]) : undefined, words: data["words"] !== undefined ? data["words"].map((item: any) => (deserializeGoogleCloudContactcenterinsightsV1ConversationTranscriptTranscriptSegmentWordInfo(item))) : undefined, }; } /** * Metadata from Dialogflow relating to the current transcript segment. */ export interface GoogleCloudContactcenterinsightsV1ConversationTranscriptTranscriptSegmentDialogflowSegmentMetadata { /** * Whether the transcript segment was covered under the configured smart * reply allowlist in Agent Assist. */ smartReplyAllowlistCovered?: boolean; } /** * Word-level info for words in a transcript. */ export interface GoogleCloudContactcenterinsightsV1ConversationTranscriptTranscriptSegmentWordInfo { /** * A confidence estimate between 0.0 and 1.0 of the fidelity of this word. A * default value of 0.0 indicates that the value is unset. */ confidence?: number; /** * Time offset of the end of this word relative to the beginning of the total * conversation. */ endOffset?: number /* Duration */; /** * Time offset of the start of this word relative to the beginning of the * total conversation. */ startOffset?: number /* Duration */; /** * The word itself. Includes punctuation marks that surround the word. */ word?: string; } function serializeGoogleCloudContactcenterinsightsV1ConversationTranscriptTranscriptSegmentWordInfo(data: any): GoogleCloudContactcenterinsightsV1ConversationTranscriptTranscriptSegmentWordInfo { return { ...data, endOffset: data["endOffset"] !== undefined ? data["endOffset"] : undefined, startOffset: data["startOffset"] !== undefined ? data["startOffset"] : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1ConversationTranscriptTranscriptSegmentWordInfo(data: any): GoogleCloudContactcenterinsightsV1ConversationTranscriptTranscriptSegmentWordInfo { return { ...data, endOffset: data["endOffset"] !== undefined ? data["endOffset"] : undefined, startOffset: data["startOffset"] !== undefined ? data["startOffset"] : undefined, }; } /** * Metadata for a create analysis operation. */ export interface GoogleCloudContactcenterinsightsV1CreateAnalysisOperationMetadata { /** * Output only. The annotator selector used for the analysis (if any). */ readonly annotatorSelector?: GoogleCloudContactcenterinsightsV1AnnotatorSelector; /** * Output only. The Conversation that this Analysis Operation belongs to. */ readonly conversation?: string; /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; } /** * Metadata for creating an issue model. */ export interface GoogleCloudContactcenterinsightsV1CreateIssueModelMetadata { /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * The original request for creation. */ request?: GoogleCloudContactcenterinsightsV1CreateIssueModelRequest; } /** * The request to create an issue model. */ export interface GoogleCloudContactcenterinsightsV1CreateIssueModelRequest { /** * Required. The issue model to create. */ issueModel?: GoogleCloudContactcenterinsightsV1IssueModel; /** * Required. The parent resource of the issue model. */ parent?: string; } /** * Metadata for deleting an issue model. */ export interface GoogleCloudContactcenterinsightsV1DeleteIssueModelMetadata { /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * The original request for deletion. */ request?: GoogleCloudContactcenterinsightsV1DeleteIssueModelRequest; } /** * The request to delete an issue model. */ export interface GoogleCloudContactcenterinsightsV1DeleteIssueModelRequest { /** * Required. The name of the issue model to delete. */ name?: string; } /** * Metadata for deploying an issue model. */ export interface GoogleCloudContactcenterinsightsV1DeployIssueModelMetadata { /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * The original request for deployment. */ request?: GoogleCloudContactcenterinsightsV1DeployIssueModelRequest; } /** * The request to deploy an issue model. */ export interface GoogleCloudContactcenterinsightsV1DeployIssueModelRequest { /** * Required. The issue model to deploy. */ name?: string; } /** * The response to deploy an issue model. */ export interface GoogleCloudContactcenterinsightsV1DeployIssueModelResponse { } /** * The request to deploy a QaScorecardRevision */ export interface GoogleCloudContactcenterinsightsV1DeployQaScorecardRevisionRequest { } /** * The data for a Dialogflow intent. Represents a detected intent in the * conversation, e.g. MAKES_PROMISE. */ export interface GoogleCloudContactcenterinsightsV1DialogflowIntent { /** * The human-readable name of the intent. */ displayName?: string; } /** * Dialogflow interaction data. */ export interface GoogleCloudContactcenterinsightsV1DialogflowInteractionData { /** * The confidence of the match ranging from 0.0 (completely uncertain) to 1.0 * (completely certain). */ confidence?: number; /** * The Dialogflow intent resource path. Format: * projects/{project}/agent/{agent}/intents/{intent} */ dialogflowIntentId?: string; } /** * A Dialogflow source of conversation data. */ export interface GoogleCloudContactcenterinsightsV1DialogflowSource { /** * Cloud Storage URI that points to a file that contains the conversation * audio. */ audioUri?: string; /** * Output only. The name of the Dialogflow conversation that this * conversation resource is derived from. Format: * projects/{project}/locations/{location}/conversations/{conversation} */ readonly dialogflowConversation?: string; } /** * A dimension determines the grouping key for the query. In SQL terms, these * would be part of both the "SELECT" and "GROUP BY" clauses. */ export interface GoogleCloudContactcenterinsightsV1Dimension { /** * Output only. Metadata about the agent dimension. */ readonly agentDimensionMetadata?: GoogleCloudContactcenterinsightsV1DimensionAgentDimensionMetadata; /** * The key of the dimension. */ dimensionKey?: | "DIMENSION_KEY_UNSPECIFIED" | "ISSUE" | "AGENT" | "AGENT_TEAM" | "QA_QUESTION_ID" | "QA_QUESTION_ANSWER_VALUE" | "CONVERSATION_PROFILE_ID"; /** * Output only. Metadata about the issue dimension. */ readonly issueDimensionMetadata?: GoogleCloudContactcenterinsightsV1DimensionIssueDimensionMetadata; /** * Output only. Metadata about the QA question-answer dimension. */ readonly qaQuestionAnswerDimensionMetadata?: GoogleCloudContactcenterinsightsV1DimensionQaQuestionAnswerDimensionMetadata; /** * Output only. Metadata about the QA question dimension. */ readonly qaQuestionDimensionMetadata?: GoogleCloudContactcenterinsightsV1DimensionQaQuestionDimensionMetadata; } /** * Metadata about the agent dimension. */ export interface GoogleCloudContactcenterinsightsV1DimensionAgentDimensionMetadata { /** * Optional. The agent's name */ agentDisplayName?: string; /** * Optional. A user-specified string representing the agent. */ agentId?: string; /** * Optional. A user-specified string representing the agent's team. */ agentTeam?: string; } /** * Metadata about the issue dimension. */ export interface GoogleCloudContactcenterinsightsV1DimensionIssueDimensionMetadata { /** * The issue display name. */ issueDisplayName?: string; /** * The issue ID. */ issueId?: string; /** * The parent issue model ID. */ issueModelId?: string; } /** * Metadata about the QA question-answer dimension. This is useful for showing * the answer distribution for questions for a given scorecard. */ export interface GoogleCloudContactcenterinsightsV1DimensionQaQuestionAnswerDimensionMetadata { /** * Optional. The full body of the question. */ answerValue?: string; /** * Optional. The QA question ID. */ qaQuestionId?: string; /** * Optional. The QA scorecard ID. */ qaScorecardId?: string; /** * Optional. The full body of the question. */ questionBody?: string; } /** * Metadata about the QA question dimension. */ export interface GoogleCloudContactcenterinsightsV1DimensionQaQuestionDimensionMetadata { /** * Optional. The QA question ID. */ qaQuestionId?: string; /** * Optional. The QA scorecard ID. */ qaScorecardId?: string; /** * Optional. The full body of the question. */ questionBody?: string; } /** * A customer-managed encryption key specification that can be applied to all * created resources (e.g. `Conversation`). */ export interface GoogleCloudContactcenterinsightsV1EncryptionSpec { /** * Required. The name of customer-managed encryption key that is used to * secure a resource and its sub-resources. If empty, the resource is secured * by our default encryption key. Only the key in the same location as this * resource is allowed to be used for encryption. Format: * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}` */ kmsKey?: string; /** * Immutable. The resource name of the encryption key specification resource. * Format: projects/{project}/locations/{location}/encryptionSpec */ name?: string; } /** * The data for an entity annotation. Represents a phrase in the conversation * that is a known entity, such as a person, an organization, or location. */ export interface GoogleCloudContactcenterinsightsV1Entity { /** * The representative name for the entity. */ displayName?: string; /** * Metadata associated with the entity. For most entity types, the metadata * is a Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`), if * they are available. For the metadata associated with other entity types, * see the Type table below. */ metadata?: { [key: string]: string }; /** * The salience score associated with the entity in the [0, 1.0] range. The * salience score for an entity provides information about the importance or * centrality of that entity to the entire document text. Scores closer to 0 * are less salient, while scores closer to 1.0 are highly salient. */ salience?: number; /** * The aggregate sentiment expressed for this entity in the conversation. */ sentiment?: GoogleCloudContactcenterinsightsV1SentimentData; /** * The entity type. */ type?: | "TYPE_UNSPECIFIED" | "PERSON" | "LOCATION" | "ORGANIZATION" | "EVENT" | "WORK_OF_ART" | "CONSUMER_GOOD" | "OTHER" | "PHONE_NUMBER" | "ADDRESS" | "DATE" | "NUMBER" | "PRICE"; } /** * The data for an entity mention annotation. This represents a mention of an * `Entity` in the conversation. */ export interface GoogleCloudContactcenterinsightsV1EntityMentionData { /** * The key of this entity in conversation entities. Can be used to retrieve * the exact `Entity` this mention is attached to. */ entityUniqueId?: string; /** * Sentiment expressed for this mention of the entity. */ sentiment?: GoogleCloudContactcenterinsightsV1SentimentData; /** * The type of the entity mention. */ type?: | "MENTION_TYPE_UNSPECIFIED" | "PROPER" | "COMMON"; } /** * Exact match configuration. */ export interface GoogleCloudContactcenterinsightsV1ExactMatchConfig { /** * Whether to consider case sensitivity when performing an exact match. */ caseSensitive?: boolean; } /** * Metadata for an export insights operation. */ export interface GoogleCloudContactcenterinsightsV1ExportInsightsDataMetadata { /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * Partial errors during export operation that might cause the operation * output to be incomplete. */ partialErrors?: GoogleRpcStatus[]; /** * The original request for export. */ request?: GoogleCloudContactcenterinsightsV1ExportInsightsDataRequest; } /** * The request to export insights. */ export interface GoogleCloudContactcenterinsightsV1ExportInsightsDataRequest { /** * Specified if sink is a BigQuery table. */ bigQueryDestination?: GoogleCloudContactcenterinsightsV1ExportInsightsDataRequestBigQueryDestination; /** * A filter to reduce results to a specific subset. Useful for exporting * conversations with specific properties. */ filter?: string; /** * A fully qualified KMS key name for BigQuery tables protected by CMEK. * Format: * projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version} */ kmsKey?: string; /** * Required. The parent resource to export data from. */ parent?: string; /** * Options for what to do if the destination table already exists. */ writeDisposition?: | "WRITE_DISPOSITION_UNSPECIFIED" | "WRITE_TRUNCATE" | "WRITE_APPEND"; } /** * A BigQuery Table Reference. */ export interface GoogleCloudContactcenterinsightsV1ExportInsightsDataRequestBigQueryDestination { /** * Required. The name of the BigQuery dataset that the snapshot result should * be exported to. If this dataset does not exist, the export call returns an * INVALID_ARGUMENT error. */ dataset?: string; /** * A project ID or number. If specified, then export will attempt to write * data to this project instead of the resource project. Otherwise, the * resource project will be used. */ projectId?: string; /** * The BigQuery table name to which the insights data should be written. If * this table does not exist, the export call returns an INVALID_ARGUMENT * error. */ table?: string; } /** * Response for an export insights operation. */ export interface GoogleCloudContactcenterinsightsV1ExportInsightsDataResponse { } /** * Metadata used for export issue model. */ export interface GoogleCloudContactcenterinsightsV1ExportIssueModelMetadata { /** * The time the operation was created. */ createTime?: Date; /** * The time the operation finished running. */ endTime?: Date; /** * The original export request. */ request?: GoogleCloudContactcenterinsightsV1ExportIssueModelRequest; } function serializeGoogleCloudContactcenterinsightsV1ExportIssueModelMetadata(data: any): GoogleCloudContactcenterinsightsV1ExportIssueModelMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1ExportIssueModelMetadata(data: any): GoogleCloudContactcenterinsightsV1ExportIssueModelMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, }; } /** * Request to export an issue model. */ export interface GoogleCloudContactcenterinsightsV1ExportIssueModelRequest { /** * Google Cloud Storage URI to export the issue model to. */ gcsDestination?: GoogleCloudContactcenterinsightsV1ExportIssueModelRequestGcsDestination; /** * Required. The issue model to export. */ name?: string; } /** * Google Cloud Storage Object URI to save the issue model to. */ export interface GoogleCloudContactcenterinsightsV1ExportIssueModelRequestGcsDestination { /** * Required. Format: `gs:///` */ objectUri?: string; } /** * Response from export issue model */ export interface GoogleCloudContactcenterinsightsV1ExportIssueModelResponse { } /** * Agent Assist frequently-asked-question answer data. */ export interface GoogleCloudContactcenterinsightsV1FaqAnswerData { /** * The piece of text from the `source` knowledge base document. */ answer?: string; /** * The system's confidence score that this answer is a good match for this * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely * certain). */ confidenceScore?: number; /** * Map that contains metadata about the FAQ answer and the document that it * originates from. */ metadata?: { [key: string]: string }; /** * The name of the answer record. Format: * projects/{project}/locations/{location}/answerRecords/{answer_record} */ queryRecord?: string; /** * The corresponding FAQ question. */ question?: string; /** * The knowledge document that this answer was extracted from. Format: * projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}. */ source?: string; } /** * Represents a conversation, resource, and label provided by the user. */ export interface GoogleCloudContactcenterinsightsV1FeedbackLabel { /** * Output only. Create time of the label. */ readonly createTime?: Date; /** * String label. */ label?: string; /** * Resource name of the resource to be labeled. */ labeledResource?: string; /** * Immutable. Resource name of the FeedbackLabel. Format: * projects/{project}/locations/{location}/conversations/{conversation}/feedbackLabels/{feedback_label} */ name?: string; /** * QaAnswer label. */ qaAnswerLabel?: GoogleCloudContactcenterinsightsV1QaAnswerAnswerValue; /** * Output only. Update time of the label. */ readonly updateTime?: Date; } /** * A Cloud Storage source of conversation data. */ export interface GoogleCloudContactcenterinsightsV1GcsSource { /** * Cloud Storage URI that points to a file that contains the conversation * audio. */ audioUri?: string; /** * Immutable. Cloud Storage URI that points to a file that contains the * conversation transcript. */ transcriptUri?: string; } /** * The data for a hold annotation. */ export interface GoogleCloudContactcenterinsightsV1HoldData { } /** * Metadata used for import issue model. */ export interface GoogleCloudContactcenterinsightsV1ImportIssueModelMetadata { /** * The time the operation was created. */ createTime?: Date; /** * The time the operation finished running. */ endTime?: Date; /** * The original import request. */ request?: GoogleCloudContactcenterinsightsV1ImportIssueModelRequest; } function serializeGoogleCloudContactcenterinsightsV1ImportIssueModelMetadata(data: any): GoogleCloudContactcenterinsightsV1ImportIssueModelMetadata { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1ImportIssueModelMetadata(data: any): GoogleCloudContactcenterinsightsV1ImportIssueModelMetadata { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, }; } /** * Request to import an issue model. */ export interface GoogleCloudContactcenterinsightsV1ImportIssueModelRequest { /** * Optional. If set to true, will create an issue model from the imported * file with randomly generated IDs for the issue model and corresponding * issues. Otherwise, replaces an existing model with the same ID as the file. */ createNewModel?: boolean; /** * Google Cloud Storage source message. */ gcsSource?: GoogleCloudContactcenterinsightsV1ImportIssueModelRequestGcsSource; /** * Required. The parent resource of the issue model. */ parent?: string; } /** * Google Cloud Storage Object URI to get the issue model file from. */ export interface GoogleCloudContactcenterinsightsV1ImportIssueModelRequestGcsSource { /** * Required. Format: `gs:///` */ objectUri?: string; } /** * Response from import issue model */ export interface GoogleCloudContactcenterinsightsV1ImportIssueModelResponse { } /** * The metadata for an IngestConversations operation. */ export interface GoogleCloudContactcenterinsightsV1IngestConversationsMetadata { /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * Output only. Statistics for IngestConversations operation. */ readonly ingestConversationsStats?: GoogleCloudContactcenterinsightsV1IngestConversationsMetadataIngestConversationsStats; /** * Output only. Partial errors during ingest operation that might cause the * operation output to be incomplete. */ readonly partialErrors?: GoogleRpcStatus[]; /** * Output only. The original request for ingest. */ readonly request?: GoogleCloudContactcenterinsightsV1IngestConversationsRequest; } /** * Statistics for IngestConversations operation. */ export interface GoogleCloudContactcenterinsightsV1IngestConversationsMetadataIngestConversationsStats { /** * Output only. The number of objects skipped because another conversation * with the same transcript uri had already been ingested. */ readonly duplicatesSkippedCount?: number; /** * Output only. The number of objects which were unable to be ingested due to * errors. The errors are populated in the partial_errors field. */ readonly failedIngestCount?: number; /** * Output only. The number of objects processed during the ingest operation. */ readonly processedObjectCount?: number; /** * Output only. The number of new conversations added during this ingest * operation. */ readonly successfulIngestCount?: number; } /** * The request to ingest conversations. */ export interface GoogleCloudContactcenterinsightsV1IngestConversationsRequest { /** * Configuration that applies to all conversations. */ conversationConfig?: GoogleCloudContactcenterinsightsV1IngestConversationsRequestConversationConfig; /** * A cloud storage bucket source. Note that any previously ingested objects * from the source will be skipped to avoid duplication. */ gcsSource?: GoogleCloudContactcenterinsightsV1IngestConversationsRequestGcsSource; /** * Required. The parent resource for new conversations. */ parent?: string; /** * Optional. DLP settings for transcript redaction. Optional, will default to * the config specified in Settings. */ redactionConfig?: GoogleCloudContactcenterinsightsV1RedactionConfig; /** * Optional. If set, this fields indicates the number of objects to ingest * from the Cloud Storage bucket. If empty, the entire bucket will be * ingested. Unless they are first deleted, conversations produced through * sampling won't be ingested by subsequent ingest requests. */ sampleSize?: number; /** * Optional. Default Speech-to-Text configuration. Optional, will default to * the config specified in Settings. */ speechConfig?: GoogleCloudContactcenterinsightsV1SpeechConfig; /** * Configuration for when `source` contains conversation transcripts. */ transcriptObjectConfig?: GoogleCloudContactcenterinsightsV1IngestConversationsRequestTranscriptObjectConfig; } /** * Configuration that applies to all conversations. */ export interface GoogleCloudContactcenterinsightsV1IngestConversationsRequestConversationConfig { /** * Optional. Indicates which of the channels, 1 or 2, contains the agent. * Note that this must be set for conversations to be properly displayed and * analyzed. */ agentChannel?: number; /** * Optional. An opaque, user-specified string representing a human agent who * handled all conversations in the import. Note that this will be overridden * if per-conversation metadata is provided through the `metadata_bucket_uri`. */ agentId?: string; /** * Optional. Indicates which of the channels, 1 or 2, contains the agent. * Note that this must be set for conversations to be properly displayed and * analyzed. */ customerChannel?: number; } /** * Configuration for Cloud Storage bucket sources. */ export interface GoogleCloudContactcenterinsightsV1IngestConversationsRequestGcsSource { /** * Optional. Specifies the type of the objects in `bucket_uri`. */ bucketObjectType?: | "BUCKET_OBJECT_TYPE_UNSPECIFIED" | "TRANSCRIPT" | "AUDIO"; /** * Required. The Cloud Storage bucket containing source objects. */ bucketUri?: string; /** * Optional. Custom keys to extract as conversation labels from metadata * files in `metadata_bucket_uri`. Keys not included in this field will be * ignored. Note that there is a limit of 100 labels per conversation. */ customMetadataKeys?: string[]; /** * Optional. The Cloud Storage path to the conversation metadata. Note that: * [1] Metadata files are expected to be in JSON format. [2] Metadata and * source files (transcripts or audio) must be in separate buckets. [3] A * source file and its corresponding metadata file must share the same name to * be properly ingested, E.g. `gs://bucket/audio/conversation1.mp3` and * `gs://bucket/metadata/conversation1.json`. */ metadataBucketUri?: string; } /** * Configuration for processing transcript objects. */ export interface GoogleCloudContactcenterinsightsV1IngestConversationsRequestTranscriptObjectConfig { /** * Required. The medium transcript objects represent. */ medium?: | "MEDIUM_UNSPECIFIED" | "PHONE_CALL" | "CHAT"; } /** * The response to an IngestConversations operation. */ export interface GoogleCloudContactcenterinsightsV1IngestConversationsResponse { } /** * Metadata for initializing a location-level encryption specification. */ export interface GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecMetadata { /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * Partial errors during initializing operation that might cause the * operation output to be incomplete. */ partialErrors?: GoogleRpcStatus[]; /** * Output only. The original request for initialization. */ readonly request?: GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecRequest; } /** * The request to initialize a location-level encryption specification. */ export interface GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecRequest { /** * Required. The encryption spec used for CMEK encryption. It is required * that the kms key is in the same region as the endpoint. The same key will * be used for all provisioned resources, if encryption is available. If the * `kms_key_name` field is left empty, no encryption will be enforced. */ encryptionSpec?: GoogleCloudContactcenterinsightsV1EncryptionSpec; } /** * The response to initialize a location-level encryption specification. */ export interface GoogleCloudContactcenterinsightsV1InitializeEncryptionSpecResponse { } /** * The data for an intent. Represents a detected intent in the conversation, * for example MAKES_PROMISE. */ export interface GoogleCloudContactcenterinsightsV1Intent { /** * The human-readable name of the intent. */ displayName?: string; /** * The unique identifier of the intent. */ id?: string; } /** * The data for an intent match. Represents an intent match for a text segment * in the conversation. A text segment can be part of a sentence, a complete * sentence, or an utterance with multiple sentences. */ export interface GoogleCloudContactcenterinsightsV1IntentMatchData { /** * The id of the matched intent. Can be used to retrieve the corresponding * intent information. */ intentUniqueId?: string; } /** * The data for an interruption annotation. */ export interface GoogleCloudContactcenterinsightsV1InterruptionData { } /** * The issue resource. */ export interface GoogleCloudContactcenterinsightsV1Issue { /** * Output only. The time at which this issue was created. */ readonly createTime?: Date; /** * Representative description of the issue. */ displayDescription?: string; /** * The representative name for the issue. */ displayName?: string; /** * Immutable. The resource name of the issue. Format: * projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} */ name?: string; /** * Output only. Resource names of the sample representative utterances that * match to this issue. */ readonly sampleUtterances?: string[]; /** * Output only. The most recent time that this issue was updated. */ readonly updateTime?: Date; } /** * Information about the issue. */ export interface GoogleCloudContactcenterinsightsV1IssueAssignment { /** * Immutable. Display name of the assigned issue. This field is set at time * of analyis and immutable since then. */ displayName?: string; /** * Resource name of the assigned issue. */ issue?: string; /** * Score indicating the likelihood of the issue assignment. currently bounded * on [0,1]. */ score?: number; } /** * The data for an issue match annotation. */ export interface GoogleCloudContactcenterinsightsV1IssueMatchData { /** * Information about the issue's assignment. */ issueAssignment?: GoogleCloudContactcenterinsightsV1IssueAssignment; } /** * The issue model resource. */ export interface GoogleCloudContactcenterinsightsV1IssueModel { /** * Output only. The time at which this issue model was created. */ readonly createTime?: Date; /** * The representative name for the issue model. */ displayName?: string; /** * Configs for the input data that used to create the issue model. */ inputDataConfig?: GoogleCloudContactcenterinsightsV1IssueModelInputDataConfig; /** * Output only. Number of issues in this issue model. */ readonly issueCount?: bigint; /** * Language of the model. */ languageCode?: string; /** * Type of the model. */ modelType?: | "MODEL_TYPE_UNSPECIFIED" | "TYPE_V1" | "TYPE_V2"; /** * Immutable. The resource name of the issue model. Format: * projects/{project}/locations/{location}/issueModels/{issue_model} */ name?: string; /** * Output only. State of the model. */ readonly state?: | "STATE_UNSPECIFIED" | "UNDEPLOYED" | "DEPLOYING" | "DEPLOYED" | "UNDEPLOYING" | "DELETING"; /** * Output only. Immutable. The issue model's label statistics on its training * data. */ readonly trainingStats?: GoogleCloudContactcenterinsightsV1IssueModelLabelStats; /** * Output only. The most recent time at which the issue model was updated. */ readonly updateTime?: Date; } /** * Configs for the input data used to create the issue model. */ export interface GoogleCloudContactcenterinsightsV1IssueModelInputDataConfig { /** * A filter to reduce the conversations used for training the model to a * specific subset. */ filter?: string; /** * Medium of conversations used in training data. This field is being * deprecated. To specify the medium to be used in training a new issue model, * set the `medium` field on `filter`. */ medium?: | "MEDIUM_UNSPECIFIED" | "PHONE_CALL" | "CHAT"; /** * Output only. Number of conversations used in training. Output only. */ readonly trainingConversationsCount?: bigint; } /** * Aggregated statistics about an issue model. */ export interface GoogleCloudContactcenterinsightsV1IssueModelLabelStats { /** * Number of conversations the issue model has analyzed at this point in * time. */ analyzedConversationsCount?: bigint; /** * Statistics on each issue. Key is the issue's resource name. */ issueStats?: { [key: string]: GoogleCloudContactcenterinsightsV1IssueModelLabelStatsIssueStats }; /** * Number of analyzed conversations for which no issue was applicable at this * point in time. */ unclassifiedConversationsCount?: bigint; } function serializeGoogleCloudContactcenterinsightsV1IssueModelLabelStats(data: any): GoogleCloudContactcenterinsightsV1IssueModelLabelStats { return { ...data, analyzedConversationsCount: data["analyzedConversationsCount"] !== undefined ? String(data["analyzedConversationsCount"]) : undefined, issueStats: data["issueStats"] !== undefined ? Object.fromEntries(Object.entries(data["issueStats"]).map(([k, v]: [string, any]) => ([k, serializeGoogleCloudContactcenterinsightsV1IssueModelLabelStatsIssueStats(v)]))) : undefined, unclassifiedConversationsCount: data["unclassifiedConversationsCount"] !== undefined ? String(data["unclassifiedConversationsCount"]) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1IssueModelLabelStats(data: any): GoogleCloudContactcenterinsightsV1IssueModelLabelStats { return { ...data, analyzedConversationsCount: data["analyzedConversationsCount"] !== undefined ? BigInt(data["analyzedConversationsCount"]) : undefined, issueStats: data["issueStats"] !== undefined ? Object.fromEntries(Object.entries(data["issueStats"]).map(([k, v]: [string, any]) => ([k, deserializeGoogleCloudContactcenterinsightsV1IssueModelLabelStatsIssueStats(v)]))) : undefined, unclassifiedConversationsCount: data["unclassifiedConversationsCount"] !== undefined ? BigInt(data["unclassifiedConversationsCount"]) : undefined, }; } /** * Aggregated statistics about an issue. */ export interface GoogleCloudContactcenterinsightsV1IssueModelLabelStatsIssueStats { /** * Display name of the issue. */ displayName?: string; /** * Issue resource. Format: * projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue} */ issue?: string; /** * Number of conversations attached to the issue at this point in time. */ labeledConversationsCount?: bigint; } function serializeGoogleCloudContactcenterinsightsV1IssueModelLabelStatsIssueStats(data: any): GoogleCloudContactcenterinsightsV1IssueModelLabelStatsIssueStats { return { ...data, labeledConversationsCount: data["labeledConversationsCount"] !== undefined ? String(data["labeledConversationsCount"]) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1IssueModelLabelStatsIssueStats(data: any): GoogleCloudContactcenterinsightsV1IssueModelLabelStatsIssueStats { return { ...data, labeledConversationsCount: data["labeledConversationsCount"] !== undefined ? BigInt(data["labeledConversationsCount"]) : undefined, }; } /** * Issue Modeling result on a conversation. */ export interface GoogleCloudContactcenterinsightsV1IssueModelResult { /** * Issue model that generates the result. Format: * projects/{project}/locations/{location}/issueModels/{issue_model} */ issueModel?: string; /** * All the matched issues. */ issues?: GoogleCloudContactcenterinsightsV1IssueAssignment[]; } /** * The response for listing all feedback labels. */ export interface GoogleCloudContactcenterinsightsV1ListAllFeedbackLabelsResponse { /** * The feedback labels that match the request. */ feedbackLabels?: GoogleCloudContactcenterinsightsV1FeedbackLabel[]; /** * 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 response to list analyses. */ export interface GoogleCloudContactcenterinsightsV1ListAnalysesResponse { /** * The analyses that match the request. */ analyses?: GoogleCloudContactcenterinsightsV1Analysis[]; /** * 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 response of listing views. */ export interface GoogleCloudContactcenterinsightsV1ListAnalysisRulesResponse { /** * The analysis_rule that match the request. */ analysisRules?: GoogleCloudContactcenterinsightsV1AnalysisRule[]; /** * 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 response of listing conversations. */ export interface GoogleCloudContactcenterinsightsV1ListConversationsResponse { /** * The conversations that match the request. */ conversations?: GoogleCloudContactcenterinsightsV1Conversation[]; /** * A token which can be sent as `page_token` to retrieve the next page. If * this field is set, it means there is another page available. If it is not * set, it means no other pages are available. */ nextPageToken?: string; } function serializeGoogleCloudContactcenterinsightsV1ListConversationsResponse(data: any): GoogleCloudContactcenterinsightsV1ListConversationsResponse { return { ...data, conversations: data["conversations"] !== undefined ? data["conversations"].map((item: any) => (serializeGoogleCloudContactcenterinsightsV1Conversation(item))) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1ListConversationsResponse(data: any): GoogleCloudContactcenterinsightsV1ListConversationsResponse { return { ...data, conversations: data["conversations"] !== undefined ? data["conversations"].map((item: any) => (deserializeGoogleCloudContactcenterinsightsV1Conversation(item))) : undefined, }; } /** * The response for listing feedback labels. */ export interface GoogleCloudContactcenterinsightsV1ListFeedbackLabelsResponse { /** * The feedback labels that match the request. */ feedbackLabels?: GoogleCloudContactcenterinsightsV1FeedbackLabel[]; /** * The next page token. */ nextPageToken?: string; } /** * The response of listing issue models. */ export interface GoogleCloudContactcenterinsightsV1ListIssueModelsResponse { /** * The issue models that match the request. */ issueModels?: GoogleCloudContactcenterinsightsV1IssueModel[]; } /** * The response of listing issues. */ export interface GoogleCloudContactcenterinsightsV1ListIssuesResponse { /** * The issues that match the request. */ issues?: GoogleCloudContactcenterinsightsV1Issue[]; } /** * The response of listing phrase matchers. */ export interface GoogleCloudContactcenterinsightsV1ListPhraseMatchersResponse { /** * 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 phrase matchers that match the request. */ phraseMatchers?: GoogleCloudContactcenterinsightsV1PhraseMatcher[]; } /** * The response from a ListQaQuestions request. */ export interface GoogleCloudContactcenterinsightsV1ListQaQuestionsResponse { /** * 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 QaQuestions under the parent. */ qaQuestions?: GoogleCloudContactcenterinsightsV1QaQuestion[]; } function serializeGoogleCloudContactcenterinsightsV1ListQaQuestionsResponse(data: any): GoogleCloudContactcenterinsightsV1ListQaQuestionsResponse { return { ...data, qaQuestions: data["qaQuestions"] !== undefined ? data["qaQuestions"].map((item: any) => (serializeGoogleCloudContactcenterinsightsV1QaQuestion(item))) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1ListQaQuestionsResponse(data: any): GoogleCloudContactcenterinsightsV1ListQaQuestionsResponse { return { ...data, qaQuestions: data["qaQuestions"] !== undefined ? data["qaQuestions"].map((item: any) => (deserializeGoogleCloudContactcenterinsightsV1QaQuestion(item))) : undefined, }; } /** * The response from a ListQaScorecardRevisions request. */ export interface GoogleCloudContactcenterinsightsV1ListQaScorecardRevisionsResponse { /** * 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 QaScorecards under the parent. */ qaScorecardRevisions?: GoogleCloudContactcenterinsightsV1QaScorecardRevision[]; } /** * The response from a ListQaScorecards request. */ export interface GoogleCloudContactcenterinsightsV1ListQaScorecardsResponse { /** * 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 QaScorecards under the parent. */ qaScorecards?: GoogleCloudContactcenterinsightsV1QaScorecard[]; } /** * The response of listing views. */ export interface GoogleCloudContactcenterinsightsV1ListViewsResponse { /** * 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 views that match the request. */ views?: GoogleCloudContactcenterinsightsV1View[]; } /** * The data for a matched phrase matcher. Represents information identifying a * phrase matcher for a given match. */ export interface GoogleCloudContactcenterinsightsV1PhraseMatchData { /** * The human-readable name of the phrase matcher. */ displayName?: string; /** * The unique identifier (the resource name) of the phrase matcher. */ phraseMatcher?: string; } /** * The phrase matcher resource. */ export interface GoogleCloudContactcenterinsightsV1PhraseMatcher { /** * Output only. The most recent time at which the activation status was * updated. */ readonly activationUpdateTime?: Date; /** * Applies the phrase matcher only when it is active. */ active?: boolean; /** * The human-readable name of the phrase matcher. */ displayName?: string; /** * The resource name of the phrase matcher. Format: * projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} */ name?: string; /** * A list of phase match rule groups that are included in this matcher. */ phraseMatchRuleGroups?: GoogleCloudContactcenterinsightsV1PhraseMatchRuleGroup[]; /** * Output only. The timestamp of when the revision was created. It is also * the create time when a new matcher is added. */ readonly revisionCreateTime?: Date; /** * Output only. Immutable. The revision ID of the phrase matcher. A new * revision is committed whenever the matcher is changed, except when it is * activated or deactivated. A server generated random ID will be used. * Example: locations/global/phraseMatchers/my-first-matcher@1234567 */ readonly revisionId?: string; /** * The role whose utterances the phrase matcher should be matched against. If * the role is ROLE_UNSPECIFIED it will be matched against any utterances in * the transcript. */ roleMatch?: | "ROLE_UNSPECIFIED" | "HUMAN_AGENT" | "AUTOMATED_AGENT" | "END_USER" | "ANY_AGENT"; /** * Required. The type of this phrase matcher. */ type?: | "PHRASE_MATCHER_TYPE_UNSPECIFIED" | "ALL_OF" | "ANY_OF"; /** * Output only. The most recent time at which the phrase matcher was updated. */ readonly updateTime?: Date; /** * The customized version tag to use for the phrase matcher. If not * specified, it will default to `revision_id`. */ versionTag?: string; } /** * The data for a phrase match rule. */ export interface GoogleCloudContactcenterinsightsV1PhraseMatchRule { /** * Provides additional information about the rule that specifies how to apply * the rule. */ config?: GoogleCloudContactcenterinsightsV1PhraseMatchRuleConfig; /** * Specifies whether the phrase must be missing from the transcript segment * or present in the transcript segment. */ negated?: boolean; /** * Required. The phrase to be matched. */ query?: string; } /** * Configuration information of a phrase match rule. */ export interface GoogleCloudContactcenterinsightsV1PhraseMatchRuleConfig { /** * The configuration for the exact match rule. */ exactMatchConfig?: GoogleCloudContactcenterinsightsV1ExactMatchConfig; } /** * A message representing a rule in the phrase matcher. */ export interface GoogleCloudContactcenterinsightsV1PhraseMatchRuleGroup { /** * A list of phrase match rules that are included in this group. */ phraseMatchRules?: GoogleCloudContactcenterinsightsV1PhraseMatchRule[]; /** * Required. The type of this phrase match rule group. */ type?: | "PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED" | "ALL_OF" | "ANY_OF"; } /** * An answer to a QaQuestion. */ export interface GoogleCloudContactcenterinsightsV1QaAnswer { /** * List of all individual answers given to the question. */ answerSources?: GoogleCloudContactcenterinsightsV1QaAnswerAnswerSource[]; /** * The main answer value, incorporating any manual edits if they exist. */ answerValue?: GoogleCloudContactcenterinsightsV1QaAnswerAnswerValue; /** * The conversation the answer applies to. */ conversation?: string; /** * The QaQuestion answered by this answer. */ qaQuestion?: string; /** * Question text. E.g., "Did the agent greet the customer?" */ questionBody?: string; /** * User-defined list of arbitrary tags. Matches the value from * QaScorecard.ScorecardQuestion.tags. Used for grouping/organization and for * weighting the score of each answer. */ tags?: string[]; } /** * A question may have multiple answers from varying sources, one of which * becomes the "main" answer above. AnswerSource represents each individual * answer. */ export interface GoogleCloudContactcenterinsightsV1QaAnswerAnswerSource { /** * The answer value from this source. */ answerValue?: GoogleCloudContactcenterinsightsV1QaAnswerAnswerValue; /** * What created the answer. */ sourceType?: | "SOURCE_TYPE_UNSPECIFIED" | "SYSTEM_GENERATED" | "MANUAL_EDIT"; } /** * Message for holding the value of a QaAnswer. QaQuestion.AnswerChoice defines * the possible answer values for a question. */ export interface GoogleCloudContactcenterinsightsV1QaAnswerAnswerValue { /** * Boolean value. */ boolValue?: boolean; /** * A short string used as an identifier. Matches the value used in * QaQuestion.AnswerChoice.key. */ key?: string; /** * A value of "Not Applicable (N/A)". Should only ever be `true`. */ naValue?: boolean; /** * Output only. Normalized score of the questions. Calculated as score / * potential_score. */ readonly normalizedScore?: number; /** * Numerical value. */ numValue?: number; /** * Output only. The maximum potential score of the question. */ readonly potentialScore?: number; /** * Output only. Numerical score of the answer. */ readonly score?: number; /** * String value. */ strValue?: string; } /** * A single question to be scored by the Insights QA feature. */ export interface GoogleCloudContactcenterinsightsV1QaQuestion { /** * Short, descriptive string, used in the UI where it's not practical to * display the full question body. E.g., "Greeting". */ abbreviation?: string; /** * A list of valid answers to the question, which the LLM must choose from. */ answerChoices?: GoogleCloudContactcenterinsightsV1QaQuestionAnswerChoice[]; /** * Instructions describing how to determine the answer. */ answerInstructions?: string; /** * Output only. The time at which this question was created. */ readonly createTime?: Date; /** * Metrics of the underlying tuned LLM over a holdout/test set while fine * tuning the underlying LLM for the given question. This field will only be * populated if and only if the question is part of a scorecard revision that * has been tuned. */ metrics?: GoogleCloudContactcenterinsightsV1QaQuestionMetrics; /** * Identifier. The resource name of the question. Format: * projects/{project}/locations/{location}/qaScorecards/{qa_scorecard}/revisions/{revision}/qaQuestions/{qa_question} */ name?: string; /** * Defines the order of the question within its parent scorecard revision. */ order?: number; /** * Question text. E.g., "Did the agent greet the customer?" */ questionBody?: string; /** * User-defined list of arbitrary tags for the question. Used for * grouping/organization and for weighting the score of each question. */ tags?: string[]; /** * Metadata about the tuning operation for the question.This field will only * be populated if and only if the question is part of a scorecard revision * that has been tuned. */ tuningMetadata?: GoogleCloudContactcenterinsightsV1QaQuestionTuningMetadata; /** * Output only. The most recent time at which the question was updated. */ readonly updateTime?: Date; } function serializeGoogleCloudContactcenterinsightsV1QaQuestion(data: any): GoogleCloudContactcenterinsightsV1QaQuestion { return { ...data, tuningMetadata: data["tuningMetadata"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1QaQuestionTuningMetadata(data["tuningMetadata"]) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1QaQuestion(data: any): GoogleCloudContactcenterinsightsV1QaQuestion { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, tuningMetadata: data["tuningMetadata"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1QaQuestionTuningMetadata(data["tuningMetadata"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Message representing a possible answer to the question. */ export interface GoogleCloudContactcenterinsightsV1QaQuestionAnswerChoice { /** * Boolean value. */ boolValue?: boolean; /** * A short string used as an identifier. */ key?: string; /** * A value of "Not Applicable (N/A)". If provided, this field may only be set * to `true`. If a question receives this answer, it will be excluded from any * score calculations. */ naValue?: boolean; /** * Numerical value. */ numValue?: number; /** * Numerical score of the answer, used for generating the overall score of a * QaScorecardResult. If the answer uses na_value, this field is unused. */ score?: number; /** * String value. */ strValue?: string; } /** * A wrapper representing metrics calculated against a test-set on a LLM that * was fine tuned for this question. */ export interface GoogleCloudContactcenterinsightsV1QaQuestionMetrics { /** * Output only. Accuracy of the model. Measures the percentage of correct * answers the model gave on the test set. */ readonly accuracy?: number; } /** * Metadata about the tuning operation for the question. Will only be set if a * scorecard containing this question has been tuned. */ export interface GoogleCloudContactcenterinsightsV1QaQuestionTuningMetadata { /** * A list of any applicable data validation warnings about the question's * feedback labels. */ datasetValidationWarnings?: | "DATASET_VALIDATION_WARNING_UNSPECIFIED" | "TOO_MANY_INVALID_FEEDBACK_LABELS" | "INSUFFICIENT_FEEDBACK_LABELS" | "INSUFFICIENT_FEEDBACK_LABELS_PER_ANSWER" | "ALL_FEEDBACK_LABELS_HAVE_THE_SAME_ANSWER"[]; /** * Total number of valid labels provided for the question at the time of * tuining. */ totalValidLabelCount?: bigint; /** * Error status of the tuning operation for the question. Will only be set if * the tuning operation failed. */ tuningError?: string; } function serializeGoogleCloudContactcenterinsightsV1QaQuestionTuningMetadata(data: any): GoogleCloudContactcenterinsightsV1QaQuestionTuningMetadata { return { ...data, totalValidLabelCount: data["totalValidLabelCount"] !== undefined ? String(data["totalValidLabelCount"]) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1QaQuestionTuningMetadata(data: any): GoogleCloudContactcenterinsightsV1QaQuestionTuningMetadata { return { ...data, totalValidLabelCount: data["totalValidLabelCount"] !== undefined ? BigInt(data["totalValidLabelCount"]) : undefined, }; } /** * A QaScorecard represents a collection of questions to be scored during * analysis. */ export interface GoogleCloudContactcenterinsightsV1QaScorecard { /** * Output only. The time at which this scorecard was created. */ readonly createTime?: Date; /** * A text description explaining the intent of the scorecard. */ description?: string; /** * The user-specified display name of the scorecard. */ displayName?: string; /** * Identifier. The scorecard name. Format: * projects/{project}/locations/{location}/qaScorecards/{qa_scorecard} */ name?: string; /** * Output only. The most recent time at which the scorecard was updated. */ readonly updateTime?: Date; } /** * The results of scoring a single conversation against a QaScorecard. Contains * a collection of QaAnswers and aggregate score. */ export interface GoogleCloudContactcenterinsightsV1QaScorecardResult { /** * ID of the agent that handled the conversation. */ agentId?: string; /** * The conversation scored by this result. */ conversation?: string; /** * Output only. The timestamp that the revision was created. */ readonly createTime?: Date; /** * Identifier. The name of the scorecard result. Format: * projects/{project}/locations/{location}/qaScorecardResults/{qa_scorecard_result} */ name?: string; /** * The normalized score, which is the score divided by the potential score. * Any manual edits are included if they exist. */ normalizedScore?: number; /** * The maximum potential overall score of the scorecard. Any questions * answered using `na_value` are excluded from this calculation. */ potentialScore?: number; /** * Set of QaAnswers represented in the result. */ qaAnswers?: GoogleCloudContactcenterinsightsV1QaAnswer[]; /** * The QaScorecardRevision scored by this result. */ qaScorecardRevision?: string; /** * Collection of tags and their scores. */ qaTagResults?: GoogleCloudContactcenterinsightsV1QaScorecardResultQaTagResult[]; /** * The overall numerical score of the result, incorporating any manual edits * if they exist. */ score?: number; /** * List of all individual score sets. */ scoreSources?: GoogleCloudContactcenterinsightsV1QaScorecardResultScoreSource[]; } /** * Tags and their corresponding results. */ export interface GoogleCloudContactcenterinsightsV1QaScorecardResultQaTagResult { /** * The normalized score the tag applies to. */ normalizedScore?: number; /** * The potential score the tag applies to. */ potentialScore?: number; /** * The score the tag applies to. */ score?: number; /** * The tag the score applies to. */ tag?: string; } /** * A scorecard result may have multiple sets of scores from varying sources, * one of which becomes the "main" answer above. A ScoreSource represents each * individual set of scores. */ export interface GoogleCloudContactcenterinsightsV1QaScorecardResultScoreSource { /** * The normalized score, which is the score divided by the potential score. */ normalizedScore?: number; /** * The maximum potential overall score of the scorecard. Any questions * answered using `na_value` are excluded from this calculation. */ potentialScore?: number; /** * Collection of tags and their scores. */ qaTagResults?: GoogleCloudContactcenterinsightsV1QaScorecardResultQaTagResult[]; /** * The overall numerical score of the result. */ score?: number; /** * What created the score. */ sourceType?: | "SOURCE_TYPE_UNSPECIFIED" | "SYSTEM_GENERATED_ONLY" | "INCLUDES_MANUAL_EDITS"; } /** * A revision of a QaScorecard. Modifying published scorecard fields would * invalidate existing scorecard results — the questions may have changed, or * the score weighting will make existing scores impossible to understand. So * changes must create a new revision, rather than modifying the existing * resource. */ export interface GoogleCloudContactcenterinsightsV1QaScorecardRevision { /** * Output only. Alternative IDs for this revision of the scorecard, e.g., * `latest`. */ readonly alternateIds?: string[]; /** * Output only. The timestamp that the revision was created. */ readonly createTime?: Date; /** * Identifier. The name of the scorecard revision. Format: * projects/{project}/locations/{location}/qaScorecards/{qa_scorecard}/revisions/{revision} */ name?: string; /** * The snapshot of the scorecard at the time of this revision's creation. */ snapshot?: GoogleCloudContactcenterinsightsV1QaScorecard; /** * Output only. State of the scorecard revision, indicating whether it's * ready to be used in analysis. */ readonly state?: | "STATE_UNSPECIFIED" | "EDITABLE" | "TRAINING" | "TRAINING_FAILED" | "READY" | "DELETING" | "TRAINING_CANCELLED"; } /** * The metadata from querying metrics. */ export interface GoogleCloudContactcenterinsightsV1QueryMetricsMetadata { } /** * The request for querying metrics. */ export interface GoogleCloudContactcenterinsightsV1QueryMetricsRequest { /** * The dimensions that determine the grouping key for the query. Defaults to * no dimension if this field is unspecified. If a dimension is specified, its * key must also be specified. Each dimension's key must be unique. If a time * granularity is also specified, metric values in the dimension will be * bucketed by this granularity. Up to one dimension is supported for now. */ dimensions?: GoogleCloudContactcenterinsightsV1Dimension[]; /** * Required. Filter to select a subset of conversations to compute the * metrics. Must specify a window of the conversation create time to compute * the metrics. The returned metrics will be from the range [DATE(starting * create time), DATE(ending create time)). */ filter?: string; /** * Measures to return. Defaults to all measures if this field is unspecified. * A valid mask should traverse from the `measure` field from the response. * For example, a path from a measure mask to get the conversation count is * "conversation_measure.count". */ measureMask?: string /* FieldMask */; /** * The time granularity of each data point in the time series. Defaults to * NONE if this field is unspecified. */ timeGranularity?: | "TIME_GRANULARITY_UNSPECIFIED" | "NONE" | "DAILY" | "HOURLY" | "PER_MINUTE" | "PER_5_MINUTES" | "MONTHLY"; } function serializeGoogleCloudContactcenterinsightsV1QueryMetricsRequest(data: any): GoogleCloudContactcenterinsightsV1QueryMetricsRequest { return { ...data, measureMask: data["measureMask"] !== undefined ? data["measureMask"] : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1QueryMetricsRequest(data: any): GoogleCloudContactcenterinsightsV1QueryMetricsRequest { return { ...data, measureMask: data["measureMask"] !== undefined ? data["measureMask"] : undefined, }; } /** * The response for querying metrics. */ export interface GoogleCloudContactcenterinsightsV1QueryMetricsResponse { /** * Required. The location of the data. * "projects/{project}/locations/{location}" */ location?: string; /** * The macro average slice contains aggregated averages across the selected * dimension. i.e. if group_by agent is specified this field will contain the * average across all agents. This field is only populated if the request * specifies a Dimension. */ macroAverageSlice?: GoogleCloudContactcenterinsightsV1QueryMetricsResponseSlice; /** * A slice contains a total and (if the request specified a time granularity) * a time series of metric values. Each slice contains a unique combination of * the cardinality of dimensions from the request. */ slices?: GoogleCloudContactcenterinsightsV1QueryMetricsResponseSlice[]; /** * The metrics last update time. */ updateTime?: Date; } function serializeGoogleCloudContactcenterinsightsV1QueryMetricsResponse(data: any): GoogleCloudContactcenterinsightsV1QueryMetricsResponse { return { ...data, macroAverageSlice: data["macroAverageSlice"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSlice(data["macroAverageSlice"]) : undefined, slices: data["slices"] !== undefined ? data["slices"].map((item: any) => (serializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSlice(item))) : undefined, updateTime: data["updateTime"] !== undefined ? data["updateTime"].toISOString() : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1QueryMetricsResponse(data: any): GoogleCloudContactcenterinsightsV1QueryMetricsResponse { return { ...data, macroAverageSlice: data["macroAverageSlice"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSlice(data["macroAverageSlice"]) : undefined, slices: data["slices"] !== undefined ? data["slices"].map((item: any) => (deserializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSlice(item))) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * A slice contains a total and (if the request specified a time granularity) a * time series of metric values. Each slice contains a unique combination of the * cardinality of dimensions from the request. For example, if the request * specifies a single ISSUE dimension and it has a cardinality of 2 (i.e. the * data used to compute the metrics has 2 issues in total), the response will * have 2 slices: * Slice 1 -> dimensions=[Issue 1] * Slice 2 -> * dimensions=[Issue 2] */ export interface GoogleCloudContactcenterinsightsV1QueryMetricsResponseSlice { /** * A unique combination of dimensions that this slice represents. */ dimensions?: GoogleCloudContactcenterinsightsV1Dimension[]; /** * A time series of metric values. This is only populated if the request * specifies a time granularity other than NONE. */ timeSeries?: GoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceTimeSeries; /** * The total metric value. The interval of this data point is [starting * create time, ending create time) from the request. */ total?: GoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPoint; } function serializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSlice(data: any): GoogleCloudContactcenterinsightsV1QueryMetricsResponseSlice { return { ...data, timeSeries: data["timeSeries"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceTimeSeries(data["timeSeries"]) : undefined, total: data["total"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPoint(data["total"]) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSlice(data: any): GoogleCloudContactcenterinsightsV1QueryMetricsResponseSlice { return { ...data, timeSeries: data["timeSeries"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceTimeSeries(data["timeSeries"]) : undefined, total: data["total"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPoint(data["total"]) : undefined, }; } /** * A data point contains the metric values mapped to an interval. */ export interface GoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPoint { /** * The measure related to conversations. */ conversationMeasure?: GoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPointConversationMeasure; /** * The interval that this data point represents. * If this is the total data * point, the interval is [starting create time, ending create time) from the * request. * If this a data point from the time series, the interval is * [time, time + time granularity from the request). */ interval?: GoogleTypeInterval; } function serializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPoint(data: any): GoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPoint { return { ...data, conversationMeasure: data["conversationMeasure"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPointConversationMeasure(data["conversationMeasure"]) : undefined, interval: data["interval"] !== undefined ? serializeGoogleTypeInterval(data["interval"]) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPoint(data: any): GoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPoint { return { ...data, conversationMeasure: data["conversationMeasure"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPointConversationMeasure(data["conversationMeasure"]) : undefined, interval: data["interval"] !== undefined ? deserializeGoogleTypeInterval(data["interval"]) : undefined, }; } /** * The measure related to conversations. */ export interface GoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPointConversationMeasure { /** * The average agent's sentiment score. */ averageAgentSentimentScore?: number; /** * The average client's sentiment score. */ averageClientSentimentScore?: number; /** * The average customer satisfaction rating. */ averageCustomerSatisfactionRating?: number; /** * The average duration. */ averageDuration?: number /* Duration */; /** * Average QA normalized score. Will exclude 0's in average calculation. */ averageQaNormalizedScore?: number; /** * Average QA normalized score averaged for questions averaged across all * revisions of the parent scorecard. Will be only populated if the request * specifies a dimension of QA_QUESTION_ID. */ averageQaQuestionNormalizedScore?: number; /** * The average silence percentage. */ averageSilencePercentage?: number; /** * The average turn count. */ averageTurnCount?: number; /** * The conversation count. */ conversationCount?: number; /** * Average QA normalized score for all the tags. */ qaTagScores?: GoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPointConversationMeasureQaTagScore[]; } function serializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPointConversationMeasure(data: any): GoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPointConversationMeasure { return { ...data, averageDuration: data["averageDuration"] !== undefined ? data["averageDuration"] : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPointConversationMeasure(data: any): GoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPointConversationMeasure { return { ...data, averageDuration: data["averageDuration"] !== undefined ? data["averageDuration"] : undefined, }; } /** * Average QA normalized score for the tag. */ export interface GoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPointConversationMeasureQaTagScore { /** * Average tag normalized score per tag. */ averageTagNormalizedScore?: number; /** * Tag name. */ tag?: string; } /** * A time series of metric values. */ export interface GoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceTimeSeries { /** * The data points that make up the time series . */ dataPoints?: GoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPoint[]; } function serializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceTimeSeries(data: any): GoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceTimeSeries { return { ...data, dataPoints: data["dataPoints"] !== undefined ? data["dataPoints"].map((item: any) => (serializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPoint(item))) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceTimeSeries(data: any): GoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceTimeSeries { return { ...data, dataPoints: data["dataPoints"] !== undefined ? data["dataPoints"].map((item: any) => (deserializeGoogleCloudContactcenterinsightsV1QueryMetricsResponseSliceDataPoint(item))) : undefined, }; } /** * DLP resources used for redaction while ingesting conversations. DLP settings * are applied to conversations ingested from the `UploadConversation` and * `IngestConversations` endpoints, including conversation coming from CCAI * Platform. They are not applied to conversations ingested from the * `CreateConversation` endpoint or the Dialogflow / Agent Assist runtime * integrations. When using Dialogflow / Agent Assist runtime integrations, * redaction should be performed in Dialogflow / Agent Assist. */ export interface GoogleCloudContactcenterinsightsV1RedactionConfig { /** * The fully-qualified DLP deidentify template resource name. Format: * `projects/{project}/deidentifyTemplates/{template}` */ deidentifyTemplate?: string; /** * The fully-qualified DLP inspect template resource name. Format: * `projects/{project}/locations/{location}/inspectTemplates/{template}` */ inspectTemplate?: string; } /** * An annotation that was generated during the customer and agent interaction. */ export interface GoogleCloudContactcenterinsightsV1RuntimeAnnotation { /** * The unique identifier of the annotation. Format: * projects/{project}/locations/{location}/conversationDatasets/{dataset}/conversationDataItems/{data_item}/conversationAnnotations/{annotation} */ annotationId?: string; /** * The feedback that the customer has about the answer in `data`. */ answerFeedback?: GoogleCloudContactcenterinsightsV1AnswerFeedback; /** * Agent Assist Article Suggestion data. */ articleSuggestion?: GoogleCloudContactcenterinsightsV1ArticleSuggestionData; /** * Conversation summarization suggestion data. */ conversationSummarizationSuggestion?: GoogleCloudContactcenterinsightsV1ConversationSummarizationSuggestionData; /** * The time at which this annotation was created. */ createTime?: Date; /** * Dialogflow interaction data. */ dialogflowInteraction?: GoogleCloudContactcenterinsightsV1DialogflowInteractionData; /** * The boundary in the conversation where the annotation ends, inclusive. */ endBoundary?: GoogleCloudContactcenterinsightsV1AnnotationBoundary; /** * Agent Assist FAQ answer data. */ faqAnswer?: GoogleCloudContactcenterinsightsV1FaqAnswerData; /** * Agent Assist Smart Compose suggestion data. */ smartComposeSuggestion?: GoogleCloudContactcenterinsightsV1SmartComposeSuggestionData; /** * Agent Assist Smart Reply data. */ smartReply?: GoogleCloudContactcenterinsightsV1SmartReplyData; /** * The boundary in the conversation where the annotation starts, inclusive. */ startBoundary?: GoogleCloudContactcenterinsightsV1AnnotationBoundary; /** * Explicit input used for generating the answer */ userInput?: GoogleCloudContactcenterinsightsV1RuntimeAnnotationUserInput; } function serializeGoogleCloudContactcenterinsightsV1RuntimeAnnotation(data: any): GoogleCloudContactcenterinsightsV1RuntimeAnnotation { return { ...data, createTime: data["createTime"] !== undefined ? data["createTime"].toISOString() : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1RuntimeAnnotation(data: any): GoogleCloudContactcenterinsightsV1RuntimeAnnotation { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, }; } /** * Explicit input used for generating the answer */ export interface GoogleCloudContactcenterinsightsV1RuntimeAnnotationUserInput { /** * The resource name of associated generator. Format: * `projects//locations//generators/` */ generatorName?: string; /** * Query text. Article Search uses this to store the input query used to * generate the search results. */ query?: string; /** * Query source for the answer. */ querySource?: | "QUERY_SOURCE_UNSPECIFIED" | "AGENT_QUERY" | "SUGGESTED_QUERY"; } /** * The data for a sentiment annotation. */ export interface GoogleCloudContactcenterinsightsV1SentimentData { /** * A non-negative number from 0 to infinity which represents the abolute * magnitude of sentiment regardless of score. */ magnitude?: number; /** * The sentiment score between -1.0 (negative) and 1.0 (positive). */ score?: number; } /** * The CCAI Insights project wide settings. Use these settings to configure the * behavior of Insights. View these settings with * [`getsettings`](https://cloud.google.com/contact-center/insights/docs/reference/rest/v1/projects.locations/getSettings) * and change the settings with * [`updateSettings`](https://cloud.google.com/contact-center/insights/docs/reference/rest/v1/projects.locations/updateSettings). */ export interface GoogleCloudContactcenterinsightsV1Settings { /** * Default analysis settings. */ analysisConfig?: GoogleCloudContactcenterinsightsV1SettingsAnalysisConfig; /** * The default TTL for newly-created conversations. If a conversation has a * specified expiration, that value will be used instead. Changing this value * will not change the expiration of existing conversations. Conversations * with no expire time persist until they are deleted. */ conversationTtl?: number /* Duration */; /** * Output only. The time at which the settings was created. */ readonly createTime?: Date; /** * A language code to be applied to each transcript segment unless the * segment already specifies a language code. Language code defaults to * "en-US" if it is neither specified on the segment nor here. */ languageCode?: string; /** * Immutable. The resource name of the settings resource. Format: * projects/{project}/locations/{location}/settings */ name?: string; /** * A map that maps a notification trigger to a Pub/Sub topic. Each time a * specified trigger occurs, Insights will notify the corresponding Pub/Sub * topic. Keys are notification triggers. Supported keys are: * * "all-triggers": Notify each time any of the supported triggers occurs. * * "create-analysis": Notify each time an analysis is created. * * "create-conversation": Notify each time a conversation is created. * * "export-insights-data": Notify each time an export is complete. * * "ingest-conversations": Notify each time an IngestConversations LRO is * complete. * "update-conversation": Notify each time a conversation is * updated via UpdateConversation. * "upload-conversation": Notify when an * UploadConversation LRO is complete. Values are Pub/Sub topics. The format * of each Pub/Sub topic is: projects/{project}/topics/{topic} */ pubsubNotificationSettings?: { [key: string]: string }; /** * Default DLP redaction resources to be applied while ingesting * conversations. This applies to conversations ingested from the * `UploadConversation` and `IngestConversations` endpoints, including * conversations coming from CCAI Platform. */ redactionConfig?: GoogleCloudContactcenterinsightsV1RedactionConfig; /** * Optional. Default Speech-to-Text resources to use while ingesting audio * files. Optional, CCAI Insights will create a default if not provided. This * applies to conversations ingested from the `UploadConversation` and * `IngestConversations` endpoints, including conversations coming from CCAI * Platform. */ speechConfig?: GoogleCloudContactcenterinsightsV1SpeechConfig; /** * Output only. The time at which the settings were last updated. */ readonly updateTime?: Date; } function serializeGoogleCloudContactcenterinsightsV1Settings(data: any): GoogleCloudContactcenterinsightsV1Settings { return { ...data, conversationTtl: data["conversationTtl"] !== undefined ? data["conversationTtl"] : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1Settings(data: any): GoogleCloudContactcenterinsightsV1Settings { return { ...data, conversationTtl: data["conversationTtl"] !== undefined ? data["conversationTtl"] : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Default configuration when creating Analyses in Insights. */ export interface GoogleCloudContactcenterinsightsV1SettingsAnalysisConfig { /** * To select the annotators to run and the phrase matchers to use (if any). * If not specified, all annotators will be run. */ annotatorSelector?: GoogleCloudContactcenterinsightsV1AnnotatorSelector; /** * Percentage of conversations created using Dialogflow runtime integration * to analyze automatically, between [0, 100]. */ runtimeIntegrationAnalysisPercentage?: number; /** * Percentage of conversations created using the UploadConversation endpoint * to analyze automatically, between [0, 100]. */ uploadConversationAnalysisPercentage?: number; } /** * The data for a silence annotation. */ export interface GoogleCloudContactcenterinsightsV1SilenceData { } /** * Agent Assist Smart Compose suggestion data. */ export interface GoogleCloudContactcenterinsightsV1SmartComposeSuggestionData { /** * The system's confidence score that this suggestion is a good match for * this conversation, ranging from 0.0 (completely uncertain) to 1.0 * (completely certain). */ confidenceScore?: number; /** * Map that contains metadata about the Smart Compose suggestion and the * document from which it originates. */ metadata?: { [key: string]: string }; /** * The name of the answer record. Format: * projects/{project}/locations/{location}/answerRecords/{answer_record} */ queryRecord?: string; /** * The content of the suggestion. */ suggestion?: string; } /** * Agent Assist Smart Reply data. */ export interface GoogleCloudContactcenterinsightsV1SmartReplyData { /** * The system's confidence score that this reply is a good match for this * conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely * certain). */ confidenceScore?: number; /** * Map that contains metadata about the Smart Reply and the document from * which it originates. */ metadata?: { [key: string]: string }; /** * The name of the answer record. Format: * projects/{project}/locations/{location}/answerRecords/{answer_record} */ queryRecord?: string; /** * The content of the reply. */ reply?: string; } /** * Speech-to-Text configuration. Speech-to-Text settings are applied to * conversations ingested from the `UploadConversation` and * `IngestConversations` endpoints, including conversation coming from CCAI * Platform. They are not applied to conversations ingested from the * `CreateConversation` endpoint. */ export interface GoogleCloudContactcenterinsightsV1SpeechConfig { /** * The fully-qualified Speech Recognizer resource name. Format: * `projects/{project_id}/locations/{location}/recognizer/{recognizer}` */ speechRecognizer?: string; } /** * Request for TuneQaScorecardRevision endpoint. */ export interface GoogleCloudContactcenterinsightsV1TuneQaScorecardRevisionRequest { /** * Required. Filter for selecting the feedback labels that needs to be used * for training. This filter can be used to limit the feedback labels used for * tuning to a feedback labels created or updated for a specific time-window * etc. */ filter?: string; /** * Optional. Run in validate only mode, no fine tuning will actually run. * Data quality validations like training data distributions will run. Even * when set to false, the data quality validations will still run but once the * validations complete we will proceed with the fine tune, if applicable. */ validateOnly?: boolean; } /** * Metadata for undeploying an issue model. */ export interface GoogleCloudContactcenterinsightsV1UndeployIssueModelMetadata { /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * The original request for undeployment. */ request?: GoogleCloudContactcenterinsightsV1UndeployIssueModelRequest; } /** * The request to undeploy an issue model. */ export interface GoogleCloudContactcenterinsightsV1UndeployIssueModelRequest { /** * Required. The issue model to undeploy. */ name?: string; } /** * The response to undeploy an issue model. */ export interface GoogleCloudContactcenterinsightsV1UndeployIssueModelResponse { } /** * The request to undeploy a QaScorecardRevision */ export interface GoogleCloudContactcenterinsightsV1UndeployQaScorecardRevisionRequest { } /** * The metadata for an `UploadConversation` operation. */ export interface GoogleCloudContactcenterinsightsV1UploadConversationMetadata { /** * Output only. The operation name for a successfully created analysis * operation, if any. */ readonly analysisOperation?: string; /** * Output only. The redaction config applied to the uploaded conversation. */ readonly appliedRedactionConfig?: GoogleCloudContactcenterinsightsV1RedactionConfig; /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * Output only. The original request. */ readonly request?: GoogleCloudContactcenterinsightsV1UploadConversationRequest; } /** * Request to upload a conversation. */ export interface GoogleCloudContactcenterinsightsV1UploadConversationRequest { /** * Required. The conversation resource to create. */ conversation?: GoogleCloudContactcenterinsightsV1Conversation; /** * Optional. A unique ID for the new conversation. This ID will become the * final component of the conversation's resource name. If no ID is specified, * a server-generated ID will be used. This value should be 4-64 characters * and must match the regular expression `^[a-z0-9-]{4,64}$`. Valid characters * are `a-z-` */ conversationId?: string; /** * Required. The parent resource of the conversation. */ parent?: string; /** * Optional. DLP settings for transcript redaction. Will default to the * config specified in Settings. */ redactionConfig?: GoogleCloudContactcenterinsightsV1RedactionConfig; /** * Optional. Speech-to-Text configuration. Will default to the config * specified in Settings. */ speechConfig?: GoogleCloudContactcenterinsightsV1SpeechConfig; } function serializeGoogleCloudContactcenterinsightsV1UploadConversationRequest(data: any): GoogleCloudContactcenterinsightsV1UploadConversationRequest { return { ...data, conversation: data["conversation"] !== undefined ? serializeGoogleCloudContactcenterinsightsV1Conversation(data["conversation"]) : undefined, }; } function deserializeGoogleCloudContactcenterinsightsV1UploadConversationRequest(data: any): GoogleCloudContactcenterinsightsV1UploadConversationRequest { return { ...data, conversation: data["conversation"] !== undefined ? deserializeGoogleCloudContactcenterinsightsV1Conversation(data["conversation"]) : undefined, }; } /** * The View resource. */ export interface GoogleCloudContactcenterinsightsV1View { /** * Output only. The time at which this view was created. */ readonly createTime?: Date; /** * The human-readable display name of the view. */ displayName?: string; /** * Immutable. The resource name of the view. Format: * projects/{project}/locations/{location}/views/{view} */ name?: string; /** * Output only. The most recent time at which the view was updated. */ readonly updateTime?: Date; /** * String with specific view properties, must be non-empty. */ value?: string; } /** * The response message for Operations.ListOperations. */ export interface GoogleLongrunningListOperationsResponse { /** * The standard List next-page token. */ nextPageToken?: string; /** * A list of operations that matches the specified filter in the request. */ operations?: GoogleLongrunningOperation[]; } /** * This resource represents a long-running operation that is the result of a * network API call. */ export interface GoogleLongrunningOperation { /** * 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?: GoogleRpcStatus; /** * 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 }; } /** * 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 GoogleProtobufEmpty { } /** * 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 GoogleRpcStatus { /** * 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; } /** * Represents a time interval, encoded as a Timestamp start (inclusive) and a * Timestamp end (exclusive). The start must be less than or equal to the end. * When the start equals the end, the interval is empty (matches no time). When * both start and end are unspecified, the interval matches any time. */ export interface GoogleTypeInterval { /** * Optional. Exclusive end of the interval. If specified, a Timestamp * matching this interval will have to be before the end. */ endTime?: Date; /** * Optional. Inclusive start of the interval. If specified, a Timestamp * matching this interval will have to be the same or after the start. */ startTime?: Date; } function serializeGoogleTypeInterval(data: any): GoogleTypeInterval { return { ...data, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, }; } function deserializeGoogleTypeInterval(data: any): GoogleTypeInterval { return { ...data, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, }; } /** * Additional options for * ContactCenterInsights#projectsLocationsAnalysisRulesList. */ export interface ProjectsLocationsAnalysisRulesListOptions { /** * Optional. The maximum number of analysis rule to return in the response. * If this value is zero, the service will select a default size. A call may * return fewer objects than requested. A non-empty `next_page_token` in the * response indicates that more data is available. */ pageSize?: number; /** * Optional. The value returned by the last `ListAnalysisRulesResponse`; * indicates that this is a continuation of a prior `ListAnalysisRules` call * and the system should return the next page of data. */ pageToken?: string; } /** * Additional options for * ContactCenterInsights#projectsLocationsAnalysisRulesPatch. */ export interface ProjectsLocationsAnalysisRulesPatchOptions { /** * Optional. The list of fields to be updated. If the update_mask is not * provided, the update will be applied to all fields. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsAnalysisRulesPatchOptions(data: any): ProjectsLocationsAnalysisRulesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsAnalysisRulesPatchOptions(data: any): ProjectsLocationsAnalysisRulesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * ContactCenterInsights#projectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStats. */ export interface ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsOptions { /** * A filter to reduce results to a specific subset. This field is useful for * getting statistics about conversations with specific properties. */ filter?: string; } /** * Additional options for * ContactCenterInsights#projectsLocationsConversationsAnalysesList. */ export interface ProjectsLocationsConversationsAnalysesListOptions { /** * A filter to reduce results to a specific subset. Useful for querying * conversations with specific properties. */ filter?: string; /** * The maximum number of analyses to return in the response. If this value is * zero, the service will select a default size. A call might return fewer * objects than requested. A non-empty `next_page_token` in the response * indicates that more data is available. */ pageSize?: number; /** * The value returned by the last `ListAnalysesResponse`; indicates that this * is a continuation of a prior `ListAnalyses` call and the system should * return the next page of data. */ pageToken?: string; } /** * Additional options for * ContactCenterInsights#projectsLocationsConversationsCalculateStats. */ export interface ProjectsLocationsConversationsCalculateStatsOptions { /** * A filter to reduce results to a specific subset. This field is useful for * getting statistics about conversations with specific properties. */ filter?: string; } /** * Additional options for * ContactCenterInsights#projectsLocationsConversationsCreate. */ export interface ProjectsLocationsConversationsCreateOptions { /** * A unique ID for the new conversation. This ID will become the final * component of the conversation's resource name. If no ID is specified, a * server-generated ID will be used. This value should be 4-64 characters and * must match the regular expression `^[a-z0-9-]{4,64}$`. Valid characters are * `a-z-` */ conversationId?: string; } /** * Additional options for * ContactCenterInsights#projectsLocationsConversationsDelete. */ export interface ProjectsLocationsConversationsDeleteOptions { /** * If set to true, all of this conversation's analyses will also be deleted. * Otherwise, the request will only succeed if the conversation has no * analyses. */ force?: boolean; } /** * Additional options for * ContactCenterInsights#projectsLocationsConversationsFeedbackLabelsCreate. */ export interface ProjectsLocationsConversationsFeedbackLabelsCreateOptions { /** * Optional. The ID of the feedback label to create. If one is not specified * it will be generated by the server. */ feedbackLabelId?: string; } /** * Additional options for * ContactCenterInsights#projectsLocationsConversationsFeedbackLabelsList. */ export interface ProjectsLocationsConversationsFeedbackLabelsListOptions { /** * Optional. A filter to reduce results to a specific subset. Supports * disjunctions (OR) and conjunctions (AND). Automatically sorts by * conversation ID. To sort by all feedback labels in a project see * ListAllFeedbackLabels. Supported fields: * `issue_model_id` * * `qa_question_id` * `qa_scorecard_id` * `min_create_time` * * `max_create_time` * `min_update_time` * `max_update_time` * * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING */ filter?: string; /** * Optional. The maximum number of feedback labels to return in the response. * A valid page size ranges from 0 to 100,000 inclusive. If the page size is * zero or unspecified, a default page size of 100 will be chosen. Note that a * call might return fewer results than the requested page size. */ pageSize?: number; /** * Optional. The value returned by the last `ListFeedbackLabelsResponse`. * This value indicates that this is a continuation of a prior * `ListFeedbackLabels` call and that the system should return the next page * of data. */ pageToken?: string; } /** * Additional options for * ContactCenterInsights#projectsLocationsConversationsFeedbackLabelsPatch. */ export interface ProjectsLocationsConversationsFeedbackLabelsPatchOptions { /** * Required. The list of fields to be updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsConversationsFeedbackLabelsPatchOptions(data: any): ProjectsLocationsConversationsFeedbackLabelsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsConversationsFeedbackLabelsPatchOptions(data: any): ProjectsLocationsConversationsFeedbackLabelsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * ContactCenterInsights#projectsLocationsConversationsGet. */ export interface ProjectsLocationsConversationsGetOptions { /** * The level of details of the conversation. Default is `FULL`. */ view?: | "CONVERSATION_VIEW_UNSPECIFIED" | "FULL" | "BASIC"; } /** * Additional options for * ContactCenterInsights#projectsLocationsConversationsList. */ export interface ProjectsLocationsConversationsListOptions { /** * A filter to reduce results to a specific subset. Useful for querying * conversations with specific properties. */ filter?: string; /** * Optional. The attribute by which to order conversations in the response. * If empty, conversations will be ordered by descending creation time. * Supported values are one of the following: * create_time * * customer_satisfaction_rating * duration * latest_analysis * start_time * * turn_count The default sort order is ascending. To specify order, append * `asc` or `desc` (`create_time desc`). For more details, see [Google AIPs * Ordering](https://google.aip.dev/132#ordering). */ orderBy?: string; /** * The maximum number of conversations to return in the response. A valid * page size ranges from 0 to 100,000 inclusive. If the page size is zero or * unspecified, a default page size of 100 will be chosen. Note that a call * might return fewer results than the requested page size. */ pageSize?: number; /** * The value returned by the last `ListConversationsResponse`. This value * indicates that this is a continuation of a prior `ListConversations` call * and that the system should return the next page of data. */ pageToken?: string; /** * The level of details of the conversation. Default is `BASIC`. */ view?: | "CONVERSATION_VIEW_UNSPECIFIED" | "FULL" | "BASIC"; } /** * Additional options for * ContactCenterInsights#projectsLocationsConversationsPatch. */ export interface ProjectsLocationsConversationsPatchOptions { /** * The list of fields to be updated. All possible fields can be updated by * passing `*`, or a subset of the following updateable fields can be * provided: * `agent_id` * `language_code` * `labels` * `metadata` * * `quality_metadata` * `call_metadata` * `start_time` * `expire_time` or * `ttl` * `data_source.gcs_source.audio_uri` or * `data_source.dialogflow_source.audio_uri` */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsConversationsPatchOptions(data: any): ProjectsLocationsConversationsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsConversationsPatchOptions(data: any): ProjectsLocationsConversationsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * ContactCenterInsights#projectsLocationsIssueModelsIssuesPatch. */ export interface ProjectsLocationsIssueModelsIssuesPatchOptions { /** * The list of fields to be updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsIssueModelsIssuesPatchOptions(data: any): ProjectsLocationsIssueModelsIssuesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsIssueModelsIssuesPatchOptions(data: any): ProjectsLocationsIssueModelsIssuesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * ContactCenterInsights#projectsLocationsIssueModelsPatch. */ export interface ProjectsLocationsIssueModelsPatchOptions { /** * The list of fields to be updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsIssueModelsPatchOptions(data: any): ProjectsLocationsIssueModelsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsIssueModelsPatchOptions(data: any): ProjectsLocationsIssueModelsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * ContactCenterInsights#projectsLocationsListAllFeedbackLabels. */ export interface ProjectsLocationsListAllFeedbackLabelsOptions { /** * Optional. A filter to reduce results to a specific subset in the entire * project. Supports disjunctions (OR) and conjunctions (AND). Supported * fields: * `issue_model_id` * `qa_question_id` * `min_create_time` * * `max_create_time` * `min_update_time` * `max_update_time` * * `feedback_label_type`: QUALITY_AI, TOPIC_MODELING */ filter?: string; /** * Optional. The maximum number of feedback labels to return in the response. * A valid page size ranges from 0 to 100,000 inclusive. If the page size is * zero or unspecified, a default page size of 100 will be chosen. Note that a * call might return fewer results than the requested page size. */ pageSize?: number; /** * Optional. The value returned by the last `ListAllFeedbackLabelsResponse`. * This value indicates that this is a continuation of a prior * `ListAllFeedbackLabels` call and that the system should return the next * page of data. */ pageToken?: string; } /** * Additional options for * ContactCenterInsights#projectsLocationsOperationsList. */ export interface ProjectsLocationsOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; } /** * Additional options for * ContactCenterInsights#projectsLocationsPhraseMatchersList. */ export interface ProjectsLocationsPhraseMatchersListOptions { /** * A filter to reduce results to a specific subset. Useful for querying * phrase matchers with specific properties. */ filter?: string; /** * The maximum number of phrase matchers to return in the response. If this * value is zero, the service will select a default size. A call might return * fewer objects than requested. A non-empty `next_page_token` in the response * indicates that more data is available. */ pageSize?: number; /** * The value returned by the last `ListPhraseMatchersResponse`. This value * indicates that this is a continuation of a prior `ListPhraseMatchers` call * and that the system should return the next page of data. */ pageToken?: string; } /** * Additional options for * ContactCenterInsights#projectsLocationsPhraseMatchersPatch. */ export interface ProjectsLocationsPhraseMatchersPatchOptions { /** * The list of fields to be updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsPhraseMatchersPatchOptions(data: any): ProjectsLocationsPhraseMatchersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsPhraseMatchersPatchOptions(data: any): ProjectsLocationsPhraseMatchersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * ContactCenterInsights#projectsLocationsQaScorecardsCreate. */ export interface ProjectsLocationsQaScorecardsCreateOptions { /** * Optional. A unique ID for the new QaScorecard. This ID will become the * final component of the QaScorecard's resource name. If no ID is specified, * a server-generated ID will be used. This value should be 4-64 characters * and must match the regular expression `^[a-z0-9-]{4,64}$`. Valid characters * are `a-z-`. */ qaScorecardId?: string; } /** * Additional options for * ContactCenterInsights#projectsLocationsQaScorecardsDelete. */ export interface ProjectsLocationsQaScorecardsDeleteOptions { /** * Optional. If set to true, all of this QaScorecard's child resources will * also be deleted. Otherwise, the request will only succeed if it has none. */ force?: boolean; } /** * Additional options for * ContactCenterInsights#projectsLocationsQaScorecardsList. */ export interface ProjectsLocationsQaScorecardsListOptions { /** * Optional. The maximum number of scorecards to return in the response. If * the value is zero, the service will select a default size. A call might * return fewer objects than requested. A non-empty `next_page_token` in the * response indicates that more data is available. */ pageSize?: number; /** * Optional. The value returned by the last `ListQaScorecardsResponse`. This * value indicates that this is a continuation of a prior `ListQaScorecards` * call and that the system should return the next page of data. */ pageToken?: string; } /** * Additional options for * ContactCenterInsights#projectsLocationsQaScorecardsPatch. */ export interface ProjectsLocationsQaScorecardsPatchOptions { /** * Required. The list of fields to be updated. All possible fields can be * updated by passing `*`, or a subset of the following updateable fields can * be provided: * `description` * `display_name` */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsQaScorecardsPatchOptions(data: any): ProjectsLocationsQaScorecardsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsQaScorecardsPatchOptions(data: any): ProjectsLocationsQaScorecardsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * ContactCenterInsights#projectsLocationsQaScorecardsRevisionsCreate. */ export interface ProjectsLocationsQaScorecardsRevisionsCreateOptions { /** * Optional. A unique ID for the new QaScorecardRevision. This ID will become * the final component of the QaScorecardRevision's resource name. If no ID is * specified, a server-generated ID will be used. This value should be 4-64 * characters and must match the regular expression `^[a-z0-9-]{4,64}$`. Valid * characters are `a-z-`. */ qaScorecardRevisionId?: string; } /** * Additional options for * ContactCenterInsights#projectsLocationsQaScorecardsRevisionsDelete. */ export interface ProjectsLocationsQaScorecardsRevisionsDeleteOptions { /** * Optional. If set to true, all of this QaScorecardRevision's child * resources will also be deleted. Otherwise, the request will only succeed if * it has none. */ force?: boolean; } /** * Additional options for * ContactCenterInsights#projectsLocationsQaScorecardsRevisionsList. */ export interface ProjectsLocationsQaScorecardsRevisionsListOptions { /** * Optional. A filter to reduce results to a specific subset. Useful for * querying scorecard revisions with specific properties. */ filter?: string; /** * Optional. The maximum number of scorecard revisions to return in the * response. If the value is zero, the service will select a default size. A * call might return fewer objects than requested. A non-empty * `next_page_token` in the response indicates that more data is available. */ pageSize?: number; /** * Optional. The value returned by the last * `ListQaScorecardRevisionsResponse`. This value indicates that this is a * continuation of a prior `ListQaScorecardRevisions` call and that the system * should return the next page of data. */ pageToken?: string; } /** * Additional options for * ContactCenterInsights#projectsLocationsQaScorecardsRevisionsQaQuestionsCreate. */ export interface ProjectsLocationsQaScorecardsRevisionsQaQuestionsCreateOptions { /** * Optional. A unique ID for the new question. This ID will become the final * component of the question's resource name. If no ID is specified, a * server-generated ID will be used. This value should be 4-64 characters and * must match the regular expression `^[a-z0-9-]{4,64}$`. Valid characters are * `a-z-`. */ qaQuestionId?: string; } /** * Additional options for * ContactCenterInsights#projectsLocationsQaScorecardsRevisionsQaQuestionsList. */ export interface ProjectsLocationsQaScorecardsRevisionsQaQuestionsListOptions { /** * Optional. The maximum number of questions to return in the response. If * the value is zero, the service will select a default size. A call might * return fewer objects than requested. A non-empty `next_page_token` in the * response indicates that more data is available. */ pageSize?: number; /** * Optional. The value returned by the last `ListQaQuestionsResponse`. This * value indicates that this is a continuation of a prior `ListQaQuestions` * call and that the system should return the next page of data. */ pageToken?: string; } /** * Additional options for * ContactCenterInsights#projectsLocationsQaScorecardsRevisionsQaQuestionsPatch. */ export interface ProjectsLocationsQaScorecardsRevisionsQaQuestionsPatchOptions { /** * Required. The list of fields to be updated. All possible fields can be * updated by passing `*`, or a subset of the following updateable fields can * be provided: * `abbreviation` * `answer_choices` * `answer_instructions` * * `order` * `question_body` * `tags` */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsQaScorecardsRevisionsQaQuestionsPatchOptions(data: any): ProjectsLocationsQaScorecardsRevisionsQaQuestionsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsQaScorecardsRevisionsQaQuestionsPatchOptions(data: any): ProjectsLocationsQaScorecardsRevisionsQaQuestionsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * ContactCenterInsights#projectsLocationsUpdateSettings. */ export interface ProjectsLocationsUpdateSettingsOptions { /** * Required. The list of fields to be updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsUpdateSettingsOptions(data: any): ProjectsLocationsUpdateSettingsOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsUpdateSettingsOptions(data: any): ProjectsLocationsUpdateSettingsOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for ContactCenterInsights#projectsLocationsViewsList. */ export interface ProjectsLocationsViewsListOptions { /** * The maximum number of views to return in the response. If this value is * zero, the service will select a default size. A call may return fewer * objects than requested. A non-empty `next_page_token` in the response * indicates that more data is available. */ pageSize?: number; /** * The value returned by the last `ListViewsResponse`; indicates that this is * a continuation of a prior `ListViews` call and the system should return the * next page of data. */ pageToken?: string; } /** * Additional options for ContactCenterInsights#projectsLocationsViewsPatch. */ export interface ProjectsLocationsViewsPatchOptions { /** * The list of fields to be updated. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsViewsPatchOptions(data: any): ProjectsLocationsViewsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsViewsPatchOptions(data: any): ProjectsLocationsViewsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; }