Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

feat: allow users to disable spell check in search requests #183

Merged
merged 4 commits into from
Jun 3, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Prev Previous commit
Next Next commit
feat: allow users to disable spell check in search requests
feat: allow users to add labels in search requests
docs: deprecate indexable/searchable on the product level custom attributes
docs: keep the API doc up-to-date with recent changes

PiperOrigin-RevId: 452193046

Source-Link: googleapis/googleapis@4e0282f

Source-Link: https://github.com/googleapis/googleapis-gen/commit/3fa3c84e3da8c8e604e129c141367dd0926878f3
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2ZhM2M4NGUzZGE4YzhlNjA0ZTEyOWMxNDEzNjdkZDA5MjY4NzhmMyJ9
  • Loading branch information
gcf-owl-bot[bot] committed Jun 1, 2022
commit b7e0fe9b6491e8ccc38c3d63663040c69cc1bbd9
7 changes: 7 additions & 0 deletions owl-bot-staging/v2/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**/node_modules
**/.coverage
build/
docs/
protos/
system-test/
samples/generated/
3 changes: 3 additions & 0 deletions owl-bot-staging/v2/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./node_modules/gts"
}
14 changes: 14 additions & 0 deletions owl-bot-staging/v2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
**/*.log
**/node_modules
.coverage
coverage
.nyc_output
docs/
out/
build/
system-test/secrets.js
system-test/*key.json
*.lock
.DS_Store
package-lock.json
__pycache__
55 changes: 55 additions & 0 deletions owl-bot-staging/v2/.jsdoc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Copyright 2022 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.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

'use strict';

module.exports = {
opts: {
readme: './README.md',
package: './package.json',
template: './node_modules/jsdoc-fresh',
recurse: true,
verbose: true,
destination: './docs/'
},
plugins: [
'plugins/markdown',
'jsdoc-region-tag'
],
source: {
excludePattern: '(^|\\/|\\\\)[._]',
include: [
'build/src',
'protos'
],
includePattern: '\\.js$'
},
templates: {
copyright: 'Copyright 2022 Google LLC',
includeDate: false,
sourceFiles: false,
systemName: '@google-cloud/retail',
theme: 'lumen',
default: {
outputSourceFiles: false
}
},
markdown: {
idInHeadings: true
}
};
33 changes: 33 additions & 0 deletions owl-bot-staging/v2/.mocharc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright 2022 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.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

const config = {
"enable-source-maps": true,
"throw-deprecation": true,
"timeout": 10000
}
if (process.env.MOCHA_THROW_DEPRECATION === 'false') {
delete config['throw-deprecation'];
}
if (process.env.MOCHA_REPORTER) {
config.reporter = process.env.MOCHA_REPORTER;
}
if (process.env.MOCHA_REPORTER_OUTPUT) {
config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`;
}
module.exports = config
22 changes: 22 additions & 0 deletions owl-bot-staging/v2/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright 2022 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.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **


module.exports = {
...require('gts/.prettierrc.json')
}
1 change: 1 addition & 0 deletions owl-bot-staging/v2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Retail: Nodejs Client
16 changes: 16 additions & 0 deletions owl-bot-staging/v2/linkinator.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"recurse": true,
"skip": [
"https://codecov.io/gh/googleapis/",
"www.googleapis.com",
"img.shields.io",
"https://console.cloud.google.com/cloudshell",
"https://support.google.com"
],
"silent": true,
"concurrency": 5,
"retry": true,
"retryErrors": true,
"retryErrorsCount": 5,
"retryErrorsJitter": 3000
}
69 changes: 69 additions & 0 deletions owl-bot-staging/v2/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"name": "@google-cloud/retail",
"version": "0.1.0",
"description": "Retail client for Node.js",
"repository": "googleapis/nodejs-retail",
"license": "Apache-2.0",
"author": "Google LLC",
"main": "build/src/index.js",
"files": [
"build/src",
"build/protos"
],
"keywords": [
"google apis client",
"google api client",
"google apis",
"google api",
"google",
"google cloud platform",
"google cloud",
"cloud",
"google retail",
"retail",
"catalog service",
"completion service",
"prediction service",
"product service",
"search service",
"user event service"
],
"scripts": {
"clean": "gts clean",
"compile": "tsc -p . && cp -r protos build/",
"compile-protos": "compileProtos src",
"docs": "jsdoc -c .jsdoc.js",
"predocs-test": "npm run docs",
"docs-test": "linkinator docs",
"fix": "gts fix",
"lint": "gts check",
"prepare": "npm run compile-protos && npm run compile",
"system-test": "c8 mocha build/system-test",
"test": "c8 mocha build/test"
},
"dependencies": {
"google-gax": "^2.29.4"
},
"devDependencies": {
"@types/mocha": "^9.1.0",
"@types/node": "^16.0.0",
"@types/sinon": "^10.0.8",
"c8": "^7.11.0",
"gts": "^3.1.0",
"jsdoc": "^3.6.7",
"jsdoc-fresh": "^1.1.1",
"jsdoc-region-tag": "^1.3.1",
"linkinator": "^3.0.0",
"mocha": "^9.1.4",
"null-loader": "^4.0.1",
"pack-n-play": "^1.0.0-2",
"sinon": "^13.0.0",
"ts-loader": "^9.2.6",
"typescript": "^4.5.5",
"webpack": "^5.67.0",
"webpack-cli": "^4.9.1"
},
"engines": {
"node": ">=v10.24.0"
}
}
110 changes: 110 additions & 0 deletions owl-bot-staging/v2/protos/google/cloud/retail/v2/catalog.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
// Copyright 2021 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
//
// http://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.

syntax = "proto3";

package google.cloud.retail.v2;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";

option csharp_namespace = "Google.Cloud.Retail.V2";
option go_package = "google.golang.org/genproto/googleapis/cloud/retail/v2;retail";
option java_multiple_files = true;
option java_outer_classname = "CatalogProto";
option java_package = "com.google.cloud.retail.v2";
option objc_class_prefix = "RETAIL";
option php_namespace = "Google\\Cloud\\Retail\\V2";
option ruby_package = "Google::Cloud::Retail::V2";

// Configures what level the product should be uploaded with regards to
// how users will be send events and how predictions will be made.
message ProductLevelConfig {
// The type of [Product][google.cloud.retail.v2.Product]s allowed to be
// ingested into the catalog. Acceptable values are:
//
// * `primary` (default): You can ingest
// [Product][google.cloud.retail.v2.Product]s of all types. When
// ingesting a [Product][google.cloud.retail.v2.Product], its type will
// default to
// [Product.Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] if
// unset.
// * `variant` (incompatible with Retail Search): You can only
// ingest
// [Product.Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]
// [Product][google.cloud.retail.v2.Product]s. This means
// [Product.primary_product_id][google.cloud.retail.v2.Product.primary_product_id]
// cannot be empty.
//
// If this field is set to an invalid value other than these, an
// INVALID_ARGUMENT error is returned.
//
// If this field is `variant` and
// [merchant_center_product_id_field][google.cloud.retail.v2.ProductLevelConfig.merchant_center_product_id_field]
// is `itemGroupId`, an INVALID_ARGUMENT error is returned.
//
// See [Product
// levels](https://cloud.google.com/retail/docs/catalog#product-levels)
// for more details.
string ingestion_product_type = 1;

// Which field of [Merchant Center
// Product](/bigquery-transfer/docs/merchant-center-products-schema) should be
// imported as [Product.id][google.cloud.retail.v2.Product.id]. Acceptable
// values are:
//
// * `offerId` (default): Import `offerId` as the product ID.
// * `itemGroupId`: Import `itemGroupId` as the product ID. Notice that Retail
// API will choose one item from the ones with the same `itemGroupId`, and
// use it to represent the item group.
//
// If this field is set to an invalid value other than these, an
// INVALID_ARGUMENT error is returned.
//
// If this field is `itemGroupId` and
// [ingestion_product_type][google.cloud.retail.v2.ProductLevelConfig.ingestion_product_type]
// is `variant`, an INVALID_ARGUMENT error is returned.
//
// See [Product
// levels](https://cloud.google.com/retail/docs/catalog#product-levels)
// for more details.
string merchant_center_product_id_field = 2;
}

// The catalog configuration.
message Catalog {
option (google.api.resource) = {
type: "retail.googleapis.com/Catalog"
pattern: "projects/{project}/locations/{location}/catalogs/{catalog}"
};

// Required. Immutable. The fully qualified resource name of the catalog.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];

// Required. Immutable. The catalog display name.
//
// This field must be a UTF-8 encoded string with a length limit of 128
// characters. Otherwise, an INVALID_ARGUMENT error is returned.
string display_name = 2 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];

// Required. The product level configuration.
ProductLevelConfig product_level_config = 4
[(google.api.field_behavior) = REQUIRED];
}
Loading