v4beta1/doc/google/cloud/talent/v4beta1/doc_event.js

// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Note: this file is purely for documentation. Any contents are not expected
// to be loaded as the JS file.

/**
 * An event issued when an end user interacts with the application that
 * implements Cloud Talent Solution. Providing this information improves the
 * quality of results for the API clients, enabling the
 * service to perform optimally. The number of events sent must be consistent
 * with other calls, such as job searches, issued to the service by the client.
 *
 * @property {string} requestId
 *   Strongly recommended for the best service experience.
 *
 *   A unique ID generated in the API responses. It can be found in
 *   ResponseMetadata.request_id.
 *
 * @property {string} eventId
 *   Required. A unique identifier, generated by the client application.
 *
 * @property {Object} createTime
 *   Required. The timestamp of the event.
 *
 *   This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp}
 *
 * @property {Object} jobEvent
 *   An event issued when a job seeker interacts with the application that
 *   implements Cloud Talent Solution.
 *
 *   This object should have the same structure as [JobEvent]{@link google.cloud.talent.v4beta1.JobEvent}
 *
 * @property {Object} profileEvent
 *   An event issued when a profile searcher interacts with the application
 *   that implements Cloud Talent Solution.
 *
 *   This object should have the same structure as [ProfileEvent]{@link google.cloud.talent.v4beta1.ProfileEvent}
 *
 * @property {string} eventNotes
 *   Notes about the event provided by recruiters or other users, for example,
 *   feedback on why a profile was bookmarked.
 *
 * @typedef ClientEvent
 * @memberof google.cloud.talent.v4beta1
 * @see [google.cloud.talent.v4beta1.ClientEvent definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/talent/v4beta1/event.proto}
 */
const ClientEvent = {
  // This is for documentation. Actual contents will be loaded by gRPC.
};

/**
 * An event issued when a job seeker interacts with the application that
 * implements Cloud Talent Solution.
 *
 * @property {number} type
 *   Required. The type of the event (see JobEventType).
 *
 *   The number should be among the values of [JobEventType]{@link google.cloud.talent.v4beta1.JobEventType}
 *
 * @property {string[]} jobs
 *   Required. The job name(s) associated with this event.
 *   For example, if this is an impression event,
 *   this field contains the identifiers of all jobs shown to the job seeker.
 *   If this was a view event, this field contains the
 *   identifier of the viewed job.
 *
 *   The format is
 *   "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
 *   example, "projects/foo/tenants/bar/jobs/baz".
 *
 * @property {string} profile
 *   The profile name associated with this client event.
 *
 *   The format is
 *   "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}",
 *   for example, "projects/foo/tenants/bar/profiles/baz".
 *
 * @typedef JobEvent
 * @memberof google.cloud.talent.v4beta1
 * @see [google.cloud.talent.v4beta1.JobEvent definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/talent/v4beta1/event.proto}
 */
const JobEvent = {
  // This is for documentation. Actual contents will be loaded by gRPC.

  /**
   * An enumeration of an event attributed to the behavior of the end user,
   * such as a job seeker.
   *
   * @enum {number}
   * @memberof google.cloud.talent.v4beta1
   */
  JobEventType: {

    /**
     * The event is unspecified by other provided values.
     */
    JOB_EVENT_TYPE_UNSPECIFIED: 0,

    /**
     * The job seeker or other entity interacting with the service has
     * had a job rendered in their view, such as in a list of search results in
     * a compressed or clipped format. This event is typically associated with
     * the viewing of a jobs list on a single page by a job seeker.
     */
    IMPRESSION: 1,

    /**
     * The job seeker, or other entity interacting with the service, has
     * viewed the details of a job, including the full description. This
     * event doesn't apply to the viewing a snippet of a job appearing as a
     * part of the job search results. Viewing a snippet is associated with an
     * impression).
     */
    VIEW: 2,

    /**
     * The job seeker or other entity interacting with the service
     * performed an action to view a job and was redirected to a different
     * website for job.
     */
    VIEW_REDIRECT: 3,

    /**
     * The job seeker or other entity interacting with the service
     * began the process or demonstrated the intention of applying for a job.
     */
    APPLICATION_START: 4,

    /**
     * The job seeker or other entity interacting with the service
     * submitted an application for a job.
     */
    APPLICATION_FINISH: 5,

    /**
     * The job seeker or other entity interacting with the service
     * submitted an application for a job with a single click without
     * entering information. If a job seeker performs this action, send only
     * this event to the service. Do not also send
     * JobEventType.APPLICATION_START or JobEventType.APPLICATION_FINISH
     * events.
     */
    APPLICATION_QUICK_SUBMISSION: 6,

    /**
     * The job seeker or other entity interacting with the service
     * performed an action to apply to a job and was redirected to a different
     * website to complete the application.
     */
    APPLICATION_REDIRECT: 7,

    /**
     * The job seeker or other entity interacting with the service began the
     * process or demonstrated the intention of applying for a job from the
     * search results page without viewing the details of the job posting.
     * If sending this event, JobEventType.VIEW event shouldn't be sent.
     */
    APPLICATION_START_FROM_SEARCH: 8,

    /**
     * The job seeker, or other entity interacting with the service, performs an
     * action with a single click from the search results page to apply to a job
     * (without viewing the details of the job posting), and is redirected
     * to a different website to complete the application. If a candidate
     * performs this action, send only this event to the service. Do not also
     * send JobEventType.APPLICATION_START,
     * JobEventType.APPLICATION_FINISH or JobEventType.VIEW events.
     */
    APPLICATION_REDIRECT_FROM_SEARCH: 9,

    /**
     * This event should be used when a company submits an application
     * on behalf of a job seeker. This event is intended for use by staffing
     * agencies attempting to place candidates.
     */
    APPLICATION_COMPANY_SUBMIT: 10,

    /**
     * The job seeker or other entity interacting with the service demonstrated
     * an interest in a job by bookmarking or saving it.
     */
    BOOKMARK: 11,

    /**
     * The job seeker or other entity interacting with the service was
     * sent a notification, such as an email alert or device notification,
     * containing one or more jobs listings generated by the service.
     */
    NOTIFICATION: 12,

    /**
     * The job seeker or other entity interacting with the service was
     * employed by the hiring entity (employer). Send this event
     * only if the job seeker was hired through an application that was
     * initiated by a search conducted through the Cloud Talent Solution
     * service.
     */
    HIRED: 13,

    /**
     * A recruiter or staffing agency submitted an application on behalf of the
     * candidate after interacting with the service to identify a suitable job
     * posting.
     */
    SENT_CV: 14,

    /**
     * The entity interacting with the service (for example, the job seeker),
     * was granted an initial interview by the hiring entity (employer). This
     * event should only be sent if the job seeker was granted an interview as
     * part of an application that was initiated by a search conducted through /
     * recommendation provided by the Cloud Talent Solution service.
     */
    INTERVIEW_GRANTED: 15
  }
};

/**
 * An event issued when a profile searcher interacts with the application
 * that implements Cloud Talent Solution.
 *
 * @property {number} type
 *   Required. Type of event.
 *
 *   The number should be among the values of [ProfileEventType]{@link google.cloud.talent.v4beta1.ProfileEventType}
 *
 * @property {string[]} profiles
 *   Required. The profile name(s) associated with this client event.
 *
 *   The format is
 *   "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}",
 *   for example, "projects/foo/tenants/bar/profiles/baz".
 *
 * @property {string[]} jobs
 *   The job name(s) associated with this client event. Leave it
 *   empty if the event isn't associated with a job.
 *
 *   The format is
 *   "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}", for
 *   example, "projects/foo/tenants/bar/jobs/baz".
 *
 * @typedef ProfileEvent
 * @memberof google.cloud.talent.v4beta1
 * @see [google.cloud.talent.v4beta1.ProfileEvent definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/cloud/talent/v4beta1/event.proto}
 */
const ProfileEvent = {
  // This is for documentation. Actual contents will be loaded by gRPC.

  /**
   * The enum represents types of client events for a candidate profile.
   *
   * @enum {number}
   * @memberof google.cloud.talent.v4beta1
   */
  ProfileEventType: {

    /**
     * Default value.
     */
    PROFILE_EVENT_TYPE_UNSPECIFIED: 0,

    /**
     * Send this event when a ProfileEvent.profiles was sent as a part of
     * a result set for a CTS API call and was rendered in the end user's UI
     * (that is, the ProfileEvent.recruiter).
     */
    IMPRESSION: 1,

    /**
     * The VIEW event records the action of a candidate's profile being
     * viewed by an end user. This is critical to tracking product metrics and
     * should be sent for every profile VIEW that happens in your system,
     * whether the event is associated with an API call (for example, a
     * recruiter making a request for a result set and clicking on a profile)
     * or not (a recruiter using the system to view profile details without
     * making a request).
     *
     * For a VIEW events associated with API calls, the
     * ClientEvent.request_id should be populated.  If the VIEW is not
     * associated with an API call, request_id should
     * not be populated.
     *
     * This event requires a valid recruiter and one valid ID in profiles.
     */
    VIEW: 2,

    /**
     * The profile is bookmarked.
     */
    BOOKMARK: 3
  }
};