Skip to content

Commit b8c83e0

Browse files
feat: Add new commute methods in Search APIs feat: Add new histogram type 'publish_time_in_day' feat: Support filtering by requisitionId is ListJobs API (#356)
- [x] Regenerate this pull request now. PiperOrigin-RevId: 391131412 Source-Link: googleapis/googleapis@a6c8dc7 Source-Link: googleapis/googleapis-gen@2a2d7da
1 parent 4ce8922 commit b8c83e0

File tree

8 files changed

+98
-18
lines changed

8 files changed

+98
-18
lines changed

packages/google-cloud-talent/protos/google/cloud/talent/v4/common.proto

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,8 @@ enum HtmlSanitization {
404404
SIMPLE_FORMATTING_ONLY = 2;
405405
}
406406

407-
// Method for commute.
407+
// Method for commute. Walking, biking and wheelchair accessible transit is
408+
// still in the Preview stage.
408409
enum CommuteMethod {
409410
// Commute method isn't specified.
410411
COMMUTE_METHOD_UNSPECIFIED = 0;
@@ -415,6 +416,16 @@ enum CommuteMethod {
415416
// Commute time is calculated based on public transit including bus, metro,
416417
// subway, and so on.
417418
TRANSIT = 2;
419+
420+
// Commute time is calculated based on walking time.
421+
WALKING = 3;
422+
423+
// Commute time is calculated based on biking time.
424+
CYCLING = 4;
425+
426+
// Commute time is calculated based on public transit that is wheelchair
427+
// accessible.
428+
TRANSIT_ACCESSIBLE = 5;
418429
}
419430

420431
// A resource that represents a location with full geographic information.

packages/google-cloud-talent/protos/google/cloud/talent/v4/filters.proto

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ message JobQuery {
131131
// Boolean expressions (AND/OR/NOT) are supported up to 3 levels of
132132
// nesting (for example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100
133133
// comparisons or functions are allowed in the expression. The expression
134-
// must be < 6000 bytes in length.
134+
// must be < 10000 bytes in length.
135135
//
136136
// Sample Query:
137137
// `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND
@@ -196,16 +196,20 @@ message LocationFilter {
196196
// The address name, such as "Mountain View" or "Bay Area".
197197
string address = 1;
198198

199-
// CLDR region code of the country/region of the address. This is used
200-
// to address ambiguity of the user-input location, for example, "Liverpool"
201-
// against "Liverpool, NY, US" or "Liverpool, UK".
199+
// CLDR region code of the country/region. This field may be used in two ways:
202200
//
203-
// Set this field to bias location resolution toward a specific country
204-
// or territory. If this field is not set, application behavior is biased
205-
// toward the United States by default.
201+
// 1) If telecommute preference is not set, this field is used address
202+
// ambiguity of the user-input address. For example, "Liverpool" may refer to
203+
// "Liverpool, NY, US" or "Liverpool, UK". This region code biases the
204+
// address resolution toward a specific country or territory. If this field is
205+
// not set, address resolution is biased toward the United States by default.
206+
//
207+
// 2) If telecommute preference is set to TELECOMMUTE_ALLOWED, the
208+
// telecommute location filter will be limited to the region specified in this
209+
// field. If this field is not set, the telecommute job locations will not be
206210
//
207211
// See
208-
// https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
212+
// https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/territory_information.html
209213
// for details. Example: "CH" for Switzerland.
210214
string region_code = 2;
211215

packages/google-cloud-talent/protos/google/cloud/talent/v4/job.proto

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,15 @@ message Job {
161161
// suggested to group the locations that close to each other in the same job
162162
// for better search experience.
163163
//
164+
// Jobs with multiple addresses must have their addresses with the same
165+
// [LocationType][] to allow location filtering to work properly. (For
166+
// example, a Job with addresses "1600 Amphitheatre Parkway, Mountain View,
167+
// CA, USA" and "London, UK" may not have location filters applied correctly
168+
// at search time since the first is a [LocationType.STREET_ADDRESS][] and the
169+
// second is a [LocationType.LOCALITY][].) If a job needs to have multiple
170+
// addresses, it is suggested to split it into multiple jobs with same
171+
// LocationTypes.
172+
//
164173
// The maximum number of allowed characters is 500.
165174
repeated string addresses = 6;
166175

packages/google-cloud-talent/protos/google/cloud/talent/v4/job_service.proto

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,18 +246,23 @@ message ListJobsRequest {
246246
//
247247
// The fields eligible for filtering are:
248248
//
249-
// * `companyName` (Required)
249+
// * `companyName`
250250
// * `requisitionId`
251251
// * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
252252
// OPEN if no value is specified.
253253
//
254+
// At least one of `companyName` and `requisitionId` must present or an
255+
// INVALID_ARGUMENT error is thrown.
256+
//
254257
// Sample Query:
255258
//
256259
// * companyName = "projects/foo/tenants/bar/companies/baz"
257260
// * companyName = "projects/foo/tenants/bar/companies/baz" AND
258261
// requisitionId = "req-1"
259262
// * companyName = "projects/foo/tenants/bar/companies/baz" AND
260263
// status = "EXPIRED"
264+
// * requisitionId = "req-1"
265+
// * requisitionId = "req-1" AND status = "EXPIRED"
261266
string filter = 2 [(google.api.field_behavior) = REQUIRED];
262267

263268
// The starting point of a query result.
@@ -501,6 +506,9 @@ message SearchJobsRequest {
501506
// "FULL_TIME", "PART_TIME".
502507
// * company_size: histogram by [CompanySize][google.cloud.talent.v4.CompanySize], for example, "SMALL",
503508
// "MEDIUM", "BIG".
509+
// * publish_time_in_day: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
510+
// in days.
511+
// Must specify list of numeric buckets in spec.
504512
// * publish_time_in_month: histogram by the [Job.posting_publish_time][google.cloud.talent.v4.Job.posting_publish_time]
505513
// in months.
506514
// Must specify list of numeric buckets in spec.
@@ -554,7 +562,7 @@ message SearchJobsRequest {
554562
// bucket(100000, MAX)])`
555563
// * `count(string_custom_attribute["some-string-custom-attribute"])`
556564
// * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
557-
// [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
565+
// [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])`
558566
repeated HistogramQuery histogram_queries = 7;
559567

560568
// The desired job attributes returned for jobs in the search response.

packages/google-cloud-talent/protos/protos.d.ts

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-talent/protos/protos.js

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-talent/protos/protos.json

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-talent/src/v4/job_service_client.ts

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,9 @@ export class JobServiceClient {
840840
* "FULL_TIME", "PART_TIME".
841841
* * company_size: histogram by {@link google.cloud.talent.v4.CompanySize|CompanySize}, for example, "SMALL",
842842
* "MEDIUM", "BIG".
843+
* * publish_time_in_day: histogram by the {@link google.cloud.talent.v4.Job.posting_publish_time|Job.posting_publish_time}
844+
* in days.
845+
* Must specify list of numeric buckets in spec.
843846
* * publish_time_in_month: histogram by the {@link google.cloud.talent.v4.Job.posting_publish_time|Job.posting_publish_time}
844847
* in months.
845848
* Must specify list of numeric buckets in spec.
@@ -893,7 +896,7 @@ export class JobServiceClient {
893896
* bucket(100000, MAX)])`
894897
* * `count(string_custom_attribute["some-string-custom-attribute"])`
895898
* * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
896-
* [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
899+
* [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])`
897900
* @param {google.cloud.talent.v4.JobView} request.jobView
898901
* The desired job attributes returned for jobs in the search response.
899902
* Defaults to {@link google.cloud.talent.v4.JobView.JOB_VIEW_SMALL|JobView.JOB_VIEW_SMALL} if no value is specified.
@@ -1149,6 +1152,9 @@ export class JobServiceClient {
11491152
* "FULL_TIME", "PART_TIME".
11501153
* * company_size: histogram by {@link google.cloud.talent.v4.CompanySize|CompanySize}, for example, "SMALL",
11511154
* "MEDIUM", "BIG".
1155+
* * publish_time_in_day: histogram by the {@link google.cloud.talent.v4.Job.posting_publish_time|Job.posting_publish_time}
1156+
* in days.
1157+
* Must specify list of numeric buckets in spec.
11521158
* * publish_time_in_month: histogram by the {@link google.cloud.talent.v4.Job.posting_publish_time|Job.posting_publish_time}
11531159
* in months.
11541160
* Must specify list of numeric buckets in spec.
@@ -1202,7 +1208,7 @@ export class JobServiceClient {
12021208
* bucket(100000, MAX)])`
12031209
* * `count(string_custom_attribute["some-string-custom-attribute"])`
12041210
* * `count(numeric_custom_attribute["some-numeric-custom-attribute"],
1205-
* [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative"])`
1211+
* [bucket(MIN, 0, "negative"), bucket(0, MAX, "non-negative")])`
12061212
* @param {google.cloud.talent.v4.JobView} request.jobView
12071213
* The desired job attributes returned for jobs in the search response.
12081214
* Defaults to {@link google.cloud.talent.v4.JobView.JOB_VIEW_SMALL|JobView.JOB_VIEW_SMALL} if no value is specified.
@@ -1865,18 +1871,23 @@ export class JobServiceClient {
18651871
*
18661872
* The fields eligible for filtering are:
18671873
*
1868-
* * `companyName` (Required)
1874+
* * `companyName`
18691875
* * `requisitionId`
18701876
* * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
18711877
* OPEN if no value is specified.
18721878
*
1879+
* At least one of `companyName` and `requisitionId` must present or an
1880+
* INVALID_ARGUMENT error is thrown.
1881+
*
18731882
* Sample Query:
18741883
*
18751884
* * companyName = "projects/foo/tenants/bar/companies/baz"
18761885
* * companyName = "projects/foo/tenants/bar/companies/baz" AND
18771886
* requisitionId = "req-1"
18781887
* * companyName = "projects/foo/tenants/bar/companies/baz" AND
18791888
* status = "EXPIRED"
1889+
* * requisitionId = "req-1"
1890+
* * requisitionId = "req-1" AND status = "EXPIRED"
18801891
* @param {string} request.pageToken
18811892
* The starting point of a query result.
18821893
* @param {number} request.pageSize
@@ -1959,18 +1970,23 @@ export class JobServiceClient {
19591970
*
19601971
* The fields eligible for filtering are:
19611972
*
1962-
* * `companyName` (Required)
1973+
* * `companyName`
19631974
* * `requisitionId`
19641975
* * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
19651976
* OPEN if no value is specified.
19661977
*
1978+
* At least one of `companyName` and `requisitionId` must present or an
1979+
* INVALID_ARGUMENT error is thrown.
1980+
*
19671981
* Sample Query:
19681982
*
19691983
* * companyName = "projects/foo/tenants/bar/companies/baz"
19701984
* * companyName = "projects/foo/tenants/bar/companies/baz" AND
19711985
* requisitionId = "req-1"
19721986
* * companyName = "projects/foo/tenants/bar/companies/baz" AND
19731987
* status = "EXPIRED"
1988+
* * requisitionId = "req-1"
1989+
* * requisitionId = "req-1" AND status = "EXPIRED"
19741990
* @param {string} request.pageToken
19751991
* The starting point of a query result.
19761992
* @param {number} request.pageSize
@@ -2035,18 +2051,23 @@ export class JobServiceClient {
20352051
*
20362052
* The fields eligible for filtering are:
20372053
*
2038-
* * `companyName` (Required)
2054+
* * `companyName`
20392055
* * `requisitionId`
20402056
* * `status` Available values: OPEN, EXPIRED, ALL. Defaults to
20412057
* OPEN if no value is specified.
20422058
*
2059+
* At least one of `companyName` and `requisitionId` must present or an
2060+
* INVALID_ARGUMENT error is thrown.
2061+
*
20432062
* Sample Query:
20442063
*
20452064
* * companyName = "projects/foo/tenants/bar/companies/baz"
20462065
* * companyName = "projects/foo/tenants/bar/companies/baz" AND
20472066
* requisitionId = "req-1"
20482067
* * companyName = "projects/foo/tenants/bar/companies/baz" AND
20492068
* status = "EXPIRED"
2069+
* * requisitionId = "req-1"
2070+
* * requisitionId = "req-1" AND status = "EXPIRED"
20502071
* @param {string} request.pageToken
20512072
* The starting point of a query result.
20522073
* @param {number} request.pageSize

0 commit comments

Comments
 (0)