// Copyright 2022 Luca Casonato. All rights reserved. MIT license. /** * Contact Center AI Platform API Client for Deno * ============================================== * * * * Docs: https://cloud.google.com/solutions/contact-center-ai-platform * Source: https://googleapis.deno.dev/v1/contactcenteraiplatform:v1alpha1.ts */ import { auth, CredentialsClient, GoogleAuth, request } from "/_/base@v1/mod.ts"; export { auth, GoogleAuth }; export type { CredentialsClient }; export class ContactCenterAIPlatform { #client: CredentialsClient | undefined; #baseUrl: string; constructor(client?: CredentialsClient, baseUrl: string = "https://contactcenteraiplatform.googleapis.com/") { this.#client = client; this.#baseUrl = baseUrl; } /** * Creates a new ContactCenter in a given project and location. * * @param parent Required. Value for parent. */ async projectsLocationsContactCentersCreate(parent: string, req: ContactCenter, opts: ProjectsLocationsContactCentersCreateOptions = {}): Promise { req = serializeContactCenter(req); const url = new URL(`${this.#baseUrl}v1alpha1/${ parent }/contactCenters`); if (opts.contactCenterId !== undefined) { url.searchParams.append("contactCenterId", String(opts.contactCenterId)); } if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Deletes a single ContactCenter. * * @param name Required. Name of the resource */ async projectsLocationsContactCentersDelete(name: string, opts: ProjectsLocationsContactCentersDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha1/${ name }`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Operation; } /** * Gets details of a single ContactCenter. * * @param name Required. Name of the resource */ async projectsLocationsContactCentersGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1alpha1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeContactCenter(data); } /** * Lists ContactCenters in a given project and location. * * @param parent Required. Parent value for ListContactCentersRequest */ async projectsLocationsContactCentersList(parent: string, opts: ProjectsLocationsContactCentersListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha1/${ parent }/contactCenters`); 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)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListContactCentersResponse(data); } /** * Updates the parameters of a single ContactCenter. * * @param name name of resource */ async projectsLocationsContactCentersPatch(name: string, req: ContactCenter, opts: ProjectsLocationsContactCentersPatchOptions = {}): Promise { req = serializeContactCenter(req); opts = serializeProjectsLocationsContactCentersPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1alpha1/${ name }`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } 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 Operation; } /** * Generates shifts constrained by various parameters. * * @param parent Required. Name of the parent resource associated with the request. Format: projects/{project}/locations/{location} */ async projectsLocationsGenerateShifts(parent: string, req: GenerateShiftsRequest): Promise { req = serializeGenerateShiftsRequest(req); const url = new URL(`${this.#baseUrl}v1alpha1/${ parent }:generateShifts`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Operation; } /** * Gets information about a location. * * @param name Resource name for the location. */ async projectsLocationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1alpha1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Location; } /** * Lists information about the supported locations for this service. This * method can be called in two ways: * **List all public locations:** Use the * path `GET /v1/locations`. * **List project-visible locations:** Use the * path `GET /v1/projects/{project_id}/locations`. This may include public * locations as well as private or other locations specifically visible to the * project. * * @param name The resource that owns the locations collection, if applicable. */ async projectsLocationsList(name: string, opts: ProjectsLocationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha1/${ name }/locations`); if (opts.extraLocationTypes !== undefined) { url.searchParams.append("extraLocationTypes", String(opts.extraLocationTypes)); } 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 ListLocationsResponse; } /** * 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, req: CancelOperationRequest): Promise { const url = new URL(`${this.#baseUrl}v1alpha1/${ name }:cancel`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Empty; } /** * Deletes a long-running operation. This method indicates that the client is * no longer interested in the operation result. It does not cancel the * operation. If the server doesn't support this method, it returns * `google.rpc.Code.UNIMPLEMENTED`. * * @param name The name of the operation resource to be deleted. */ async projectsLocationsOperationsDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1alpha1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. * * @param name The name of the operation resource. */ async projectsLocationsOperationsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1alpha1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Operation; } /** * Lists operations that match the specified filter in the request. If the * server doesn't support this method, it returns `UNIMPLEMENTED`. * * @param name The name of the operation's parent resource. */ async projectsLocationsOperationsList(name: string, opts: ProjectsLocationsOperationsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1alpha1/${ 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)); } if (opts.returnPartialSuccess !== undefined) { url.searchParams.append("returnPartialSuccess", String(opts.returnPartialSuccess)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListOperationsResponse; } /** * Queries the contact center quota, an aggregation over all the projects, * that belongs to the billing account, which the input project belongs to. * * @param parent Required. Parent project resource id. */ async projectsLocationsQueryContactCenterQuota(parent: string): Promise { const url = new URL(`${this.#baseUrl}v1alpha1/${ parent }:queryContactCenterQuota`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ContactCenterQuota; } } /** * Message storing info about the first admin user. Next ID: 3 */ export interface AdminUser { /** * Optional. Last/family name of the first admin user. */ familyName?: string; /** * Optional. First/given name of the first admin user. */ givenName?: string; } /** * The request message for Operations.CancelOperation. */ export interface CancelOperationRequest { } /** * Defines a logical CCAIP component that e.g. “EMAIL”, "CRM". For more * information see go/ccaip-private-path-v2. Each logical component is * associated with a list of service attachments. */ export interface Component { /** * Name of the component. */ name?: string; /** * Associated service attachments. The service attachment names that will be * used for sending private traffic to the CCAIP tenant project. Example * service attachment name: * "projects/${TENANT_PROJECT_ID}/regions/${REGION}/serviceAttachments/ingress-default". */ serviceAttachmentNames?: string[]; } /** * Message describing ContactCenter object */ export interface ContactCenter { /** * Optional. Info about the first admin user, such as given name and family * name. */ adminUser?: AdminUser; /** * Optional. Whether the advanced reporting feature is enabled. */ advancedReportingEnabled?: boolean; /** * Optional. Whether to enable users to be created in the CCAIP-instance * concurrently to having users in Cloud identity */ ccaipManagedUsers?: boolean; /** * Output only. [Output only] Create time stamp */ readonly createTime?: Date; /** * Optional. Critical release channel. */ critical?: Critical; /** * Required. Immutable. At least 2 and max 16 char long, must conform to [RFC * 1035](https://www.ietf.org/rfc/rfc1035.txt). */ customerDomainPrefix?: string; /** * Output only. Timestamp in UTC of when this resource was soft-deleted. */ readonly deleteTime?: Date; /** * Required. A user friendly name for the ContactCenter. */ displayName?: string; /** * Optional. Early release channel. */ early?: Early; /** * Output only. Timestamp in UTC of when this resource is considered expired. */ readonly expireTime?: Date; /** * Optional. Feature configuration to populate the feature flags. */ featureConfig?: FeatureConfig; /** * The configuration of this instance, it is currently immutable once * created. */ instanceConfig?: InstanceConfig; /** * Immutable. The KMS key name to encrypt the user input (`ContactCenter`). */ kmsKey?: string; /** * Labels as key value pairs */ labels?: { [key: string]: string }; /** * name of resource */ name?: string; /** * Optional. Normal release channel. */ normal?: Normal; /** * Optional. VPC-SC related networking configuration. */ privateAccess?: PrivateAccess; /** * Output only. TODO(b/283407860) Deprecate this field. */ readonly privateComponents?: string[]; /** * Output only. Timestamp in UTC of when this resource is going to be * hard-deleted. */ readonly purgeTime?: Date; /** * Output only. UJET release version, unique for each new release. */ readonly releaseVersion?: string; /** * Optional. Params that sets up Google as IdP. */ samlParams?: SAMLParams; /** * Output only. The state of this contact center. */ readonly state?: | "STATE_UNSPECIFIED" | "STATE_DEPLOYING" | "STATE_DEPLOYED" | "STATE_TERMINATING" | "STATE_FAILED" | "STATE_TERMINATING_FAILED" | "STATE_TERMINATED" | "STATE_IN_GRACE_PERIOD" | "STATE_FAILING_OVER" | "STATE_DEGRADED" | "STATE_REPAIRING"; /** * Output only. [Output only] Update time stamp */ readonly updateTime?: Date; /** * Output only. URIs to access the deployed ContactCenters. */ readonly uris?: URIs; /** * Optional. Email address of the first admin user. */ userEmail?: string; } function serializeContactCenter(data: any): ContactCenter { return { ...data, critical: data["critical"] !== undefined ? serializeCritical(data["critical"]) : undefined, }; } function deserializeContactCenter(data: any): ContactCenter { return { ...data, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, critical: data["critical"] !== undefined ? deserializeCritical(data["critical"]) : undefined, deleteTime: data["deleteTime"] !== undefined ? new Date(data["deleteTime"]) : undefined, expireTime: data["expireTime"] !== undefined ? new Date(data["expireTime"]) : undefined, purgeTime: data["purgeTime"] !== undefined ? new Date(data["purgeTime"]) : undefined, updateTime: data["updateTime"] !== undefined ? new Date(data["updateTime"]) : undefined, }; } /** * Represents a quota for contact centers. */ export interface ContactCenterQuota { /** * Deprecated: Use the Quota fields instead. Reflects the count limit of * contact centers on a billing account. */ contactCenterCountLimit?: number; /** * Deprecated: Use the Quota fields instead. Reflects the count sum of * contact centers on a billing account. */ contactCenterCountSum?: number; /** * Quota details per contact center instance type. */ quotas?: Quota[]; } /** * Instances in this Channel will receive updates after all instances in * `Normal` were updated. They also will only be updated outside of their peak * hours. */ export interface Critical { /** * Required. Hours during which the instance should not be updated. */ peakHours?: WeeklySchedule[]; } function serializeCritical(data: any): Critical { return { ...data, peakHours: data["peakHours"] !== undefined ? data["peakHours"].map((item: any) => (serializeWeeklySchedule(item))) : undefined, }; } function deserializeCritical(data: any): Critical { return { ...data, peakHours: data["peakHours"] !== undefined ? data["peakHours"].map((item: any) => (deserializeWeeklySchedule(item))) : undefined, }; } /** * Represents a whole or partial calendar date, such as a birthday. The time of * day and time zone are either specified elsewhere or are insignificant. The * date is relative to the Gregorian Calendar. This can represent one of the * following: * A full date, with non-zero year, month, and day values. * A * month and day, with a zero year (for example, an anniversary). * A year on * its own, with a zero month and a zero day. * A year and month, with a zero * day (for example, a credit card expiration date). Related types: * * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp */ export interface Date { /** * Day of a month. Must be from 1 to 31 and valid for the year and month, or * 0 to specify a year by itself or a year and month where the day isn't * significant. */ day?: number; /** * Month of a year. Must be from 1 to 12, or 0 to specify a year without a * month and day. */ month?: number; /** * Year of the date. Must be from 1 to 9999, or 0 to specify a date without a * year. */ year?: number; } /** * List of dates. */ export interface DateList { /** * Optional. Values in the list. */ values?: Date[]; } /** * Represents civil time (or occasionally physical time). This type can * represent a civil time in one of a few possible ways: * When utc_offset is * set and time_zone is unset: a civil time on a calendar day with a particular * offset from UTC. * When time_zone is set and utc_offset is unset: a civil * time on a calendar day in a particular time zone. * When neither time_zone * nor utc_offset is set: a civil time on a calendar day in local time. The date * is relative to the Proleptic Gregorian Calendar. If year, month, or day are * 0, the DateTime is considered not to have a specific year, month, or day * respectively. This type may also be used to represent a physical time if all * the date and time fields are set and either case of the `time_offset` oneof * is set. Consider using `Timestamp` message for physical time instead. If your * use case also would like to store the user's timezone, that can be done in * another field. This type is more flexible than some applications may want. * Make sure to document and validate your application's limitations. */ export interface DateTime { /** * Optional. Day of month. Must be from 1 to 31 and valid for the year and * month, or 0 if specifying a datetime without a day. */ day?: number; /** * Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults * to 0 (midnight). An API may choose to allow the value "24:00:00" for * scenarios like business closing time. */ hours?: number; /** * Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0. */ minutes?: number; /** * Optional. Month of year. Must be from 1 to 12, or 0 if specifying a * datetime without a month. */ month?: number; /** * Optional. Fractions of seconds in nanoseconds. Must be from 0 to * 999,999,999, defaults to 0. */ nanos?: number; /** * Optional. Seconds of minutes of the time. Must normally be from 0 to 59, * defaults to 0. An API may allow the value 60 if it allows leap-seconds. */ seconds?: number; /** * Time zone. */ timeZone?: TimeZone; /** * UTC offset. Must be whole seconds, between -18 hours and +18 hours. For * example, a UTC offset of -4:00 would be represented as { seconds: -14400 }. */ utcOffset?: number /* Duration */; /** * Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a * datetime without a year. */ year?: number; } function serializeDateTime(data: any): DateTime { return { ...data, utcOffset: data["utcOffset"] !== undefined ? data["utcOffset"] : undefined, }; } function deserializeDateTime(data: any): DateTime { return { ...data, utcOffset: data["utcOffset"] !== undefined ? data["utcOffset"] : undefined, }; } /** * LINT.IfChange First Channel to receive the updates. Meant to dev/test * instances */ export interface Early { } /** * Information about a particular employee for planning purposes. */ export interface EmployeeInfo { /** * Required. Unique ID of this employee. */ id?: string; /** * Optional. A list of unwanted event intervals for this employee. The start * time of the interval must be in the planning horizon. */ unwantedEventIntervals?: UnwantedEventInterval[]; } function serializeEmployeeInfo(data: any): EmployeeInfo { return { ...data, unwantedEventIntervals: data["unwantedEventIntervals"] !== undefined ? data["unwantedEventIntervals"].map((item: any) => (serializeUnwantedEventInterval(item))) : undefined, }; } function deserializeEmployeeInfo(data: any): EmployeeInfo { return { ...data, unwantedEventIntervals: data["unwantedEventIntervals"] !== undefined ? data["unwantedEventIntervals"].map((item: any) => (deserializeUnwantedEventInterval(item))) : undefined, }; } /** * A generic empty message that you can re-use to avoid defining duplicated * empty messages in your APIs. A typical example is to use it as the request or * the response type of an API method. For instance: service Foo { rpc * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } */ export interface Empty { } /** * Template specifying rules for generating a single event that occurs during a * shift. An event may represent a meeting, break, lunch, etc. */ export interface EventTemplate { /** * Required. Fixed duration in minutes of this event. */ durationMinutes?: number; /** * Required. Unique ID of this template. */ id?: string; /** * Optional. Maximum number of minutes after the beginning of a shift that * this event can start. */ maximumMinutesAfterShiftStart?: number; /** * Optional. Minimum number of minutes after the beginning of a shift that * this event can start. */ minimumMinutesAfterShiftStart?: number; /** * Required. The time increment (in minutes) used to generate the set of * possible event start times between `minimum_minutes_after_shift_start` and * `maximum_minutes_after_shift_start`. For example, if the minimum minutes * after shift start are 30, maximum minutes after shift start are 45, and the * start time increment is 5 minutes, the event can take place 30, 35, 40, or * 45 minutes after the start of the shift. */ startTimeIncrementMinutes?: number; } export interface FeatureConfig { /** * Optional. If true - enables the agent desktop feature. Default is false. */ agentDesktopEnabled?: boolean; } /** * Request with constraints for generating shifts. The shifts generated must * adhere to these constraints. */ export interface GenerateShiftsRequest { /** * Optional. Employee information that should be considered when generating * shifts. */ employeeInfo?: EmployeeInfo[]; /** * Required. The solver will generate the maximum number of shifts per shift * template. */ planningHorizon?: PlanningHorizon; /** * Required. Set of shift templates specifying rules for generating shifts. A * shift template can be used for generating multiple shifts. */ shiftTemplates?: ShiftTemplate[]; /** * Required. Parameters for the solver. */ solverConfig?: SolverConfig; /** * Required. All the workforce demands that the generated shifts need to * cover. The planning horizon is defined between the earliest start time and * the latest end time across all the entries. This field cannot be empty. */ workforceDemands?: WorkforceDemandList; } function serializeGenerateShiftsRequest(data: any): GenerateShiftsRequest { return { ...data, employeeInfo: data["employeeInfo"] !== undefined ? data["employeeInfo"].map((item: any) => (serializeEmployeeInfo(item))) : undefined, planningHorizon: data["planningHorizon"] !== undefined ? serializePlanningHorizon(data["planningHorizon"]) : undefined, solverConfig: data["solverConfig"] !== undefined ? serializeSolverConfig(data["solverConfig"]) : undefined, workforceDemands: data["workforceDemands"] !== undefined ? serializeWorkforceDemandList(data["workforceDemands"]) : undefined, }; } function deserializeGenerateShiftsRequest(data: any): GenerateShiftsRequest { return { ...data, employeeInfo: data["employeeInfo"] !== undefined ? data["employeeInfo"].map((item: any) => (deserializeEmployeeInfo(item))) : undefined, planningHorizon: data["planningHorizon"] !== undefined ? deserializePlanningHorizon(data["planningHorizon"]) : undefined, solverConfig: data["solverConfig"] !== undefined ? deserializeSolverConfig(data["solverConfig"]) : undefined, workforceDemands: data["workforceDemands"] !== undefined ? deserializeWorkforceDemandList(data["workforceDemands"]) : undefined, }; } /** * Represents the metadata of the long-running operation. */ export interface GoogleCloudCommonOperationMetadata { /** * Output only. API version used to start the operation. */ readonly apiVersion?: string; /** * Output only. Identifies whether the user has requested cancellation of the * operation. Operations that have been cancelled successfully have * google.longrunning.Operation.error value with a google.rpc.Status.code of * `1`, corresponding to `Code.CANCELLED`. */ readonly cancelRequested?: boolean; /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * Output only. Human-readable status of the operation, if any. */ readonly statusDetail?: string; /** * Output only. Server-defined resource path for the target of the operation. */ readonly target?: string; /** * Output only. Name of the verb executed by the operation. */ readonly verb?: string; } /** * Message storing the instance configuration. */ export interface InstanceConfig { /** * The instance size of this the instance configuration. */ instanceSize?: | "INSTANCE_SIZE_UNSPECIFIED" | "STANDARD_SMALL" | "STANDARD_MEDIUM" | "STANDARD_LARGE" | "STANDARD_XLARGE" | "STANDARD_2XLARGE" | "STANDARD_3XLARGE" | "MULTIREGION_SMALL" | "MULTIREGION_MEDIUM" | "MULTIREGION_LARGE" | "MULTIREGION_XLARGE" | "MULTIREGION_2XLARGE" | "MULTIREGION_3XLARGE" | "DEV_SMALL" | "SANDBOX_SMALL" | "TRIAL_SMALL" | "TIME_LIMITED_TRIAL_SMALL"; } /** * Message for response to listing ContactCenters */ export interface ListContactCentersResponse { /** * The list of ContactCenter */ contactCenters?: ContactCenter[]; /** * A token identifying a page of results the server should return. */ nextPageToken?: string; /** * Locations that could not be reached. */ unreachable?: string[]; } function serializeListContactCentersResponse(data: any): ListContactCentersResponse { return { ...data, contactCenters: data["contactCenters"] !== undefined ? data["contactCenters"].map((item: any) => (serializeContactCenter(item))) : undefined, }; } function deserializeListContactCentersResponse(data: any): ListContactCentersResponse { return { ...data, contactCenters: data["contactCenters"] !== undefined ? data["contactCenters"].map((item: any) => (deserializeContactCenter(item))) : undefined, }; } /** * The response message for Locations.ListLocations. */ export interface ListLocationsResponse { /** * A list of locations that matches the specified filter in the request. */ locations?: Location[]; /** * The standard List next-page token. */ nextPageToken?: string; } /** * The response message for Operations.ListOperations. */ export interface ListOperationsResponse { /** * The standard List next-page token. */ nextPageToken?: string; /** * A list of operations that matches the specified filter in the request. */ operations?: Operation[]; /** * Unordered list. Unreachable resources. Populated when the request sets * `ListOperationsRequest.return_partial_success` and reads across * collections. For example, when attempting to list all resources across all * supported locations. */ unreachable?: string[]; } /** * A resource that represents a Google Cloud location. */ export interface Location { /** * The friendly name for this location, typically a nearby city name. For * example, "Tokyo". */ displayName?: string; /** * Cross-service attributes for the location. For example * {"cloud.googleapis.com/region": "us-east1"} */ labels?: { [key: string]: string }; /** * The canonical id for this location. For example: `"us-east1"`. */ locationId?: string; /** * Service-specific metadata. For example the available capacity at the given * location. */ metadata?: { [key: string]: any }; /** * Resource name for the location, which may vary between implementations. * For example: `"projects/example-project/locations/us-east1"` */ name?: string; } /** * Instances in this Channel will receive updates after all instances in * `Early` were updated + 2 days. */ export interface Normal { } /** * This resource represents a long-running operation that is the result of a * network API call. */ export interface Operation { /** * If the value is `false`, it means the operation is still in progress. If * `true`, the operation is completed, and either `error` or `response` is * available. */ done?: boolean; /** * The error result of the operation in case of failure or cancellation. */ error?: Status; /** * Service-specific metadata associated with the operation. It typically * contains progress information and common metadata such as create time. Some * services might not provide such metadata. Any method that returns a * long-running operation should document the metadata type, if any. */ metadata?: { [key: string]: any }; /** * The server-assigned name, which is only unique within the same service * that originally returns it. If you use the default HTTP mapping, the `name` * should be a resource name ending with `operations/{unique_id}`. */ name?: string; /** * The normal, successful response of the operation. If the original method * returns no data on success, such as `Delete`, the response is * `google.protobuf.Empty`. If the original method is standard * `Get`/`Create`/`Update`, the response should be the resource. For other * methods, the response should have the type `XxxResponse`, where `Xxx` is * the original method name. For example, if the original method name is * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. */ response?: { [key: string]: any }; } /** * Represents the metadata of the long-running operation. */ export interface OperationMetadata { /** * Output only. API version used to start the operation. */ readonly apiVersion?: string; /** * Contact center information for this request */ contactCenter?: ContactCenter; /** * Output only. The time the operation was created. */ readonly createTime?: Date; /** * Output only. The time the operation finished running. */ readonly endTime?: Date; /** * Output only. Identifies whether the user has requested cancellation of the * operation. Operations that have been cancelled successfully have * Operation.error value with a google.rpc.Status.code of 1, corresponding to * `Code.CANCELLED`. */ readonly requestedCancellation?: boolean; /** * Output only. Human-readable status of the operation, if any. */ readonly statusMessage?: string; /** * Output only. Server-defined resource path for the target of the operation. */ readonly target?: string; /** * Output only. Name of the verb executed by the operation. */ readonly verb?: string; } function serializeOperationMetadata(data: any): OperationMetadata { return { ...data, contactCenter: data["contactCenter"] !== undefined ? serializeContactCenter(data["contactCenter"]) : undefined, }; } function deserializeOperationMetadata(data: any): OperationMetadata { return { ...data, contactCenter: data["contactCenter"] !== undefined ? deserializeContactCenter(data["contactCenter"]) : undefined, createTime: data["createTime"] !== undefined ? new Date(data["createTime"]) : undefined, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, }; } /** * Specifies the time interval during which the solver should generate shifts. * The start time must be before the end time. */ export interface PlanningHorizon { /** * Required. End of the time interval for the given demand (exclusive). These * values are read down to the minute; seconds and all smaller units are * ignored. */ endTime?: DateTime; /** * Required. Start of the time interval for the given demand (inclusive). * These values are read down to the minute; seconds and all smaller units are * ignored. */ startTime?: DateTime; } function serializePlanningHorizon(data: any): PlanningHorizon { return { ...data, endTime: data["endTime"] !== undefined ? serializeDateTime(data["endTime"]) : undefined, startTime: data["startTime"] !== undefined ? serializeDateTime(data["startTime"]) : undefined, }; } function deserializePlanningHorizon(data: any): PlanningHorizon { return { ...data, endTime: data["endTime"] !== undefined ? deserializeDateTime(data["endTime"]) : undefined, startTime: data["startTime"] !== undefined ? deserializeDateTime(data["startTime"]) : undefined, }; } /** * Defines ingress and egress private traffic settings for CCAIP instances. */ export interface PrivateAccess { /** * List of egress components that should not be accessed via the Internet. * For more information see go/ccaip-private-path-v2. */ egressSettings?: Component[]; /** * List of ingress components that should not be accessed via the Internet. * For more information see go/ccaip-private-path-v2. */ ingressSettings?: Component[]; /** * Private service connect settings. */ pscSetting?: PscSetting; } /** * Additional options for * ContactCenterAIPlatform#projectsLocationsContactCentersCreate. */ export interface ProjectsLocationsContactCentersCreateOptions { /** * Required. Id of the requesting object If auto-generating Id server-side, * remove this field and contact_center_id from the method_signature of Create * RPC */ contactCenterId?: string; /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for * ContactCenterAIPlatform#projectsLocationsContactCentersDelete. */ export interface ProjectsLocationsContactCentersDeleteOptions { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes after the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; } /** * Additional options for * ContactCenterAIPlatform#projectsLocationsContactCentersList. */ export interface ProjectsLocationsContactCentersListOptions { /** * Filtering results */ filter?: string; /** * Hint for how to order the results */ orderBy?: string; /** * Requested page size. Server may return fewer items than requested. If * unspecified, server will pick an appropriate default. */ pageSize?: number; /** * A token identifying a page of results the server should return. */ pageToken?: string; } /** * Additional options for * ContactCenterAIPlatform#projectsLocationsContactCentersPatch. */ export interface ProjectsLocationsContactCentersPatchOptions { /** * Optional. An optional request ID to identify requests. Specify a unique * request ID so that if you must retry your request, the server will know to * ignore the request if it has already been completed. The server will * guarantee that for at least 60 minutes since the first request. For * example, consider a situation where you make an initial request and the * request times out. If you make the request again with the same request ID, * the server can check if original operation with the same request ID was * received, and if so, will ignore the second request. This prevents clients * from accidentally creating duplicate commitments. The request ID must be a * valid UUID with the exception that zero UUID is not supported * (00000000-0000-0000-0000-000000000000). */ requestId?: string; /** * Required. Field mask is used to specify the fields to be overwritten in * the ContactCenter resource by the update. The fields specified in the * update_mask are relative to the resource, not the full request. A field * will be overwritten if it is in the mask. If the user does not provide a * mask then all fields will be overwritten. */ updateMask?: string /* FieldMask */; } function serializeProjectsLocationsContactCentersPatchOptions(data: any): ProjectsLocationsContactCentersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProjectsLocationsContactCentersPatchOptions(data: any): ProjectsLocationsContactCentersPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for ContactCenterAIPlatform#projectsLocationsList. */ export interface ProjectsLocationsListOptions { /** * Optional. Do not use this field. It is unsupported and is ignored unless * explicitly documented otherwise. This is primarily for internal usage. */ extraLocationTypes?: string; /** * A filter to narrow down results to a preferred subset. The filtering * language accepts strings like `"displayName=tokyo"`, and is documented in * more detail in [AIP-160](https://google.aip.dev/160). */ filter?: string; /** * The maximum number of results to return. If not set, the service selects a * default. */ pageSize?: number; /** * A page token received from the `next_page_token` field in the response. * Send that page token to receive the subsequent page. */ pageToken?: string; } /** * Additional options for * ContactCenterAIPlatform#projectsLocationsOperationsList. */ export interface ProjectsLocationsOperationsListOptions { /** * The standard list filter. */ filter?: string; /** * The standard list page size. */ pageSize?: number; /** * The standard list page token. */ pageToken?: string; /** * When set to `true`, operations that are reachable are returned as normal, * and those that are unreachable are returned in the * ListOperationsResponse.unreachable field. This can only be `true` when * reading across collections. For example, when `parent` is set to * `"projects/example/locations/-"`. This field is not supported by default * and will result in an `UNIMPLEMENTED` error if set unless explicitly * documented otherwise in service or product specific documentation. */ returnPartialSuccess?: boolean; } /** * Private service connect settings. */ export interface PscSetting { /** * The list of project ids that are allowed to send traffic to the service * attachment. This field should be filled only for the ingress components. */ allowedConsumerProjectIds?: string[]; /** * Output only. The CCAIP tenant project ids. */ readonly producerProjectIds?: string[]; } /** * Quota details. */ export interface Quota { /** * Reflects the count limit of contact centers on a billing account. */ contactCenterCountLimit?: number; /** * Reflects the count sum of contact centers on a billing account. */ contactCenterCountSum?: number; /** * Contact center instance type. */ contactCenterInstanceSize?: | "INSTANCE_SIZE_UNSPECIFIED" | "STANDARD_SMALL" | "STANDARD_MEDIUM" | "STANDARD_LARGE" | "STANDARD_XLARGE" | "STANDARD_2XLARGE" | "STANDARD_3XLARGE" | "MULTIREGION_SMALL" | "MULTIREGION_MEDIUM" | "MULTIREGION_LARGE" | "MULTIREGION_XLARGE" | "MULTIREGION_2XLARGE" | "MULTIREGION_3XLARGE" | "DEV_SMALL" | "SANDBOX_SMALL" | "TRIAL_SMALL" | "TIME_LIMITED_TRIAL_SMALL"; } /** * Message storing SAML params to enable Google as IDP. */ export interface SAMLParams { /** * Additional contexts used for authentication. */ authenticationContexts?: | "AUTHENTICATION_CONTEXT_UNSPECIFIED" | "INTERNET_PROTOCOL" | "INTERNET_PROTOCOL_PASSWORD" | "KERBEROS" | "MOBILE_ONE_FACTOR_UNREGISTERED" | "MOBILE_TWO_FACTOR_UNREGISTERED" | "MOBILE_ONE_FACTOR_CONTRACT" | "MOBILE_TWO_FACTOR_CONTRACT" | "PASSWORD" | "PASSWORD_PROTECTED_TRANSPORT" | "PREVIOUS_SESSION" | "PUBLIC_KEY_X509" | "PUBLIC_KEY_PGP" | "PUBLIC_KEY_SPKI" | "PUBLIC_KEY_XML_DIGITAL_SIGNATURE" | "SMARTCARD" | "SMARTCARD_PKI" | "SOFTWARE_PKI" | "TELEPHONY" | "TELEPHONY_NOMADIC" | "TELEPHONY_PERSONALIZED" | "TELEPHONY_AUTHENTICATED" | "SECURE_REMOTE_PASSWORD" | "SSL_TLS_CERTIFICATE_BASED" | "TIME_SYNC_TOKEN"[]; /** * SAML certificate */ certificate?: string; /** * IdP field that maps to the user’s email address */ emailMapping?: string; /** * Entity id URL */ entityId?: string; /** * Single sign-on URL */ ssoUri?: string; /** * Email address of the first admin users. */ userEmail?: string; } /** * Template specifying rules for generating shifts. A shift is a unit of work * that specifies a start time, end time, and may contain events (e.g. lunch, * breaks etc.). Shifts will be assigned to specific dates in the response. */ export interface ShiftTemplate { /** * Optional. A list of specific employee IDs that can be assigned to shifts * generated by this template. If this field is present, there will be * `EmployeeSchedule`s in the response for which the * `EmployeeSchedule.employee_id` field is set to one of the IDs in this list. * The number of employee schedules with an assigned employee ID will be * between `minimum_employee_count` and `maximum_employee_count`. If this * field is empty, between `minimum_employee_count` and * `maximum_employee_count` employees can be assigned to shifts generated by * this template and the employee schedules won't have an assigned employee * ID. Currently, only one assignable employee ID is supported. */ assignableEmployeeIds?: string[]; /** * Optional. Fixed number of days off per week. An employee has a given day * off if they are not assigned to a shift that starts on that day. A week is * 7 days and begins on Sunday. */ daysOffCountPerWeek?: number; /** * Optional. Fixed dates when shifts from this template should not be * generated. */ daysOffDates?: DateList; /** * Required. Fixed duration of a shift generated by this template. */ durationMinutes?: number; /** * Required. Earliest time in the day that a shift can start. This value is * specified with hours and minutes; seconds and nanos are ignored. */ earliestStartTime?: TimeOfDay; /** * Optional. Rules for generating events for each shift. Exactly one event * will be included in each shift for each `EventTemplate` specified. */ eventTemplates?: EventTemplate[]; /** * Required. Unique ID of this template. */ id?: string; /** * Required. Latest time in the day that a shift can start. This value is * specified with hours and minutes; seconds and nanos are ignored. If this * value is less than the `earliest_start_time`, it may imply an overnight * shift. */ latestStartTime?: TimeOfDay; /** * Required. Maximum number of employees that can be assigned to all shifts * generated by this template on working days. */ maximumEmployeeCount?: number; /** * Optional. Minimum number of employees that can be assigned to all shifts * generated by this template on working days. */ minimumEmployeeCount?: number; /** * Optional. Minimum minutes between the end of one event and the start of * the next. */ minimumIntereventGapMinutes?: number; /** * Optional. The time increment (in minutes) used to generate the set of * possible start times between `earliest_start_time` and `latest_start_time`. * For example, if the earliest start time is 8:00, the latest start time is * 8:30, and the start time increment is 10 minutes, then all possible start * times for this shift template are: 8:00, 8:10, 8:20, and 8:30. */ startTimeIncrementMinutes?: number; } /** * Specifies additional parameters for the solver generating shifts. */ export interface SolverConfig { /** * Optional. Maximum time the solver should spend on the problem. If not set, * defaults to 1 minute. The choice of a time limit should depend on the size * of the problem. To give an example, when solving a 7-day instance with 2 * `ShiftTemplates`, each with ~20 possible start times and holding 2 events * with ~30 possible start times, and two days off per week, recommended * values are: <10s for fast solutions (and likely suboptimal), (10s, 300s) * for good quality solutions, and >300s for an exhaustive search. Larger * instances may require longer time limits. This value is not a hard limit * and it does not account for the communication overhead. The expected * latency to solve the problem may slightly exceed this value. */ maximumProcessingDuration?: number /* Duration */; /** * Required. Specifies the type of schedule to generate. */ scheduleType?: | "SCHEDULE_TYPE_UNSPECIFIED" | "SINGLE_SHIFT" | "WEEKLY_WITH_FIXED_EVENTS" | "WEEKLY_WITH_VARIABLE_EVENTS"; } function serializeSolverConfig(data: any): SolverConfig { return { ...data, maximumProcessingDuration: data["maximumProcessingDuration"] !== undefined ? data["maximumProcessingDuration"] : undefined, }; } function deserializeSolverConfig(data: any): SolverConfig { return { ...data, maximumProcessingDuration: data["maximumProcessingDuration"] !== undefined ? data["maximumProcessingDuration"] : undefined, }; } /** * The `Status` type defines a logical error model that is suitable for * different programming environments, including REST APIs and RPC APIs. It is * used by [gRPC](https://github.com/grpc). Each `Status` message contains three * pieces of data: error code, error message, and error details. You can find * out more about this error model and how to work with it in the [API Design * Guide](https://cloud.google.com/apis/design/errors). */ export interface Status { /** * The status code, which should be an enum value of google.rpc.Code. */ code?: number; /** * A list of messages that carry the error details. There is a common set of * message types for APIs to use. */ details?: { [key: string]: any }[]; /** * A developer-facing error message, which should be in English. Any * user-facing error message should be localized and sent in the * google.rpc.Status.details field, or localized by the client. */ message?: string; } /** * Represents a time of day. The date and time zone are either not significant * or are specified elsewhere. An API may choose to allow leap seconds. Related * types are google.type.Date and `google.protobuf.Timestamp`. */ export interface TimeOfDay { /** * Hours of a day in 24 hour format. Must be greater than or equal to 0 and * typically must be less than or equal to 23. An API may choose to allow the * value "24:00:00" for scenarios like business closing time. */ hours?: number; /** * Minutes of an hour. Must be greater than or equal to 0 and less than or * equal to 59. */ minutes?: number; /** * Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 * and less than or equal to 999,999,999. */ nanos?: number; /** * Seconds of a minute. Must be greater than or equal to 0 and typically must * be less than or equal to 59. An API may allow the value 60 if it allows * leap-seconds. */ seconds?: number; } /** * Represents a time zone from the [IANA Time Zone * Database](https://www.iana.org/time-zones). */ export interface TimeZone { /** * IANA Time Zone Database time zone. For example "America/New_York". */ id?: string; /** * Optional. IANA Time Zone Database version number. For example "2019a". */ version?: string; } /** * Specifies a time interval during which the overlap with events (generated * from event templates) should be minimal. */ export interface UnwantedEventInterval { /** * Required. Duration of the event. */ durationMinutes?: number; /** * Required. Start time of the event. */ startTime?: DateTime; } function serializeUnwantedEventInterval(data: any): UnwantedEventInterval { return { ...data, startTime: data["startTime"] !== undefined ? serializeDateTime(data["startTime"]) : undefined, }; } function deserializeUnwantedEventInterval(data: any): UnwantedEventInterval { return { ...data, startTime: data["startTime"] !== undefined ? deserializeDateTime(data["startTime"]) : undefined, }; } /** * Message storing the URIs of the ContactCenter. */ export interface URIs { /** * Chat Bot Uri of the ContactCenter */ chatBotUri?: string; /** * Media Uri of the ContactCenter. */ mediaUri?: string; /** * Root Uri of the ContactCenter. */ rootUri?: string; /** * Virtual Agent Streaming Service Uri of the ContactCenter. */ virtualAgentStreamingServiceUri?: string; } /** * Message representing a weekly schedule. */ export interface WeeklySchedule { /** * Required. Days of the week this schedule applies to. */ days?: | "DAY_OF_WEEK_UNSPECIFIED" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | "SUNDAY"[]; /** * Optional. Duration of the schedule. */ duration?: number /* Duration */; /** * Optional. Daily end time of the schedule. If `end_time` is before * `start_time`, the schedule will be considered as ending on the next day. */ endTime?: TimeOfDay; /** * Required. Daily start time of the schedule. */ startTime?: TimeOfDay; } function serializeWeeklySchedule(data: any): WeeklySchedule { return { ...data, duration: data["duration"] !== undefined ? data["duration"] : undefined, }; } function deserializeWeeklySchedule(data: any): WeeklySchedule { return { ...data, duration: data["duration"] !== undefined ? data["duration"] : undefined, }; } /** * Specifies the number of employees required to cover the demand in the given * time interval. The length of the interval must be strictly positive. */ export interface WorkforceDemand { /** * Optional. Number of employees needed to cover the demand for this * interval. */ employeeCount?: number; /** * Required. End of the time interval for the given demand (exclusive). These * values are read down to the minute; seconds and all smaller units are * ignored. */ endTime?: DateTime; /** * Required. Start of the time interval for the given demand (inclusive). * These values are read down to the minute; seconds and all smaller units are * ignored. */ startTime?: DateTime; } function serializeWorkforceDemand(data: any): WorkforceDemand { return { ...data, endTime: data["endTime"] !== undefined ? serializeDateTime(data["endTime"]) : undefined, startTime: data["startTime"] !== undefined ? serializeDateTime(data["startTime"]) : undefined, }; } function deserializeWorkforceDemand(data: any): WorkforceDemand { return { ...data, endTime: data["endTime"] !== undefined ? deserializeDateTime(data["endTime"]) : undefined, startTime: data["startTime"] !== undefined ? deserializeDateTime(data["startTime"]) : undefined, }; } /** * List of workforce demands. */ export interface WorkforceDemandList { /** * Optional. Values in the list. */ values?: WorkforceDemand[]; } function serializeWorkforceDemandList(data: any): WorkforceDemandList { return { ...data, values: data["values"] !== undefined ? data["values"].map((item: any) => (serializeWorkforceDemand(item))) : undefined, }; } function deserializeWorkforceDemandList(data: any): WorkforceDemandList { return { ...data, values: data["values"] !== undefined ? data["values"].map((item: any) => (deserializeWorkforceDemand(item))) : undefined, }; }