Socket
Socket
Sign inDemoInstall

@google-cloud/discoveryengine

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/discoveryengine - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto

5

build/src/v1beta/document_service_client_config.json

@@ -73,2 +73,7 @@ {

"retry_params_name": "e6a9f61a856ca7c2128ab9550ca4fb9e97c77876"
},
"PurgeDocuments": {
"timeout_millis": 30000,
"retry_codes_name": "unavailable",
"retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
}

@@ -75,0 +80,0 @@ }

@@ -323,2 +323,65 @@ /// <reference types="node" />

/**
* Permanently deletes all selected
* {@link google.cloud.discoveryengine.v1beta.Document|Document}s in a branch.
*
* This process is asynchronous. Depending on the number of
* {@link google.cloud.discoveryengine.v1beta.Document|Document}s to be deleted,
* this operation can take hours to complete. Before the delete operation
* completes, some {@link google.cloud.discoveryengine.v1beta.Document|Document}s
* might still be returned by
* {@link google.cloud.discoveryengine.v1beta.DocumentService.GetDocument|DocumentService.GetDocument}
* or
* {@link google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments|DocumentService.ListDocuments}.
*
* To get a list of the
* {@link google.cloud.discoveryengine.v1beta.Document|Document}s to be deleted,
* set
* {@link google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.force|PurgeDocumentsRequest.force}
* to false.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent resource name, such as
* `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
* @param {string} request.filter
* Required. Filter matching documents to purge. Only currently supported
* value is
* `*` (all items).
* @param {boolean} request.force
* Actually performs the purge. If `force` is set to false, return the
* expected purge count without deleting any documents.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example <caption>include:samples/generated/v1beta/document_service.purge_documents.js</caption>
* region_tag:discoveryengine_v1beta_generated_DocumentService_PurgeDocuments_async
*/
purgeDocuments(request?: protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse, protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;
purgeDocuments(request: protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse, protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
purgeDocuments(request: protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest, callback: Callback<LROperation<protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse, protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `purgeDocuments()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example <caption>include:samples/generated/v1beta/document_service.purge_documents.js</caption>
* region_tag:discoveryengine_v1beta_generated_DocumentService_PurgeDocuments_async
*/
checkPurgeDocumentsProgress(name: string): Promise<LROperation<protos.google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse, protos.google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata>>;
/**
* Gets a list of {@link google.cloud.discoveryengine.v1beta.Document|Document}s.

@@ -325,0 +388,0 @@ *

@@ -226,4 +226,7 @@ "use strict";

const importDocumentsMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata');
const purgeDocumentsResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse');
const purgeDocumentsMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata');
this.descriptors.longrunning = {
importDocuments: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importDocumentsResponse.decode.bind(importDocumentsResponse), importDocumentsMetadata.decode.bind(importDocumentsMetadata)),
purgeDocuments: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeDocumentsResponse.decode.bind(purgeDocumentsResponse), purgeDocumentsMetadata.decode.bind(purgeDocumentsMetadata)),
};

@@ -271,2 +274,3 @@ // Put together the default options sent with requests.

'importDocuments',
'purgeDocuments',
];

@@ -455,2 +459,41 @@ for (const methodName of documentServiceStubMethods) {

}
purgeDocuments(request, optionsOrCallback, callback) {
var _a;
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
});
this.initialize();
return this.innerApiCalls.purgeDocuments(request, options, callback);
}
/**
* Check the status of the long running operation returned by `purgeDocuments()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example <caption>include:samples/generated/v1beta/document_service.purge_documents.js</caption>
* region_tag:discoveryengine_v1beta_generated_DocumentService_PurgeDocuments_async
*/
async checkPurgeDocumentsProgress(name) {
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
const [operation] = await this.operationsClient.getOperation(request);
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.purgeDocuments, this._gaxModule.createDefaultBackoffSettings());
return decodeOperation;
}
listDocuments(request, optionsOrCallback, callback) {

@@ -457,0 +500,0 @@ var _a;

# Changelog
## [0.6.0](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v0.5.0...discoveryengine-v0.6.0) (2023-05-04)
### Features
* [discoveryengine] add document purge API ([#4219](https://github.com/googleapis/google-cloud-node/issues/4219)) ([454fa79](https://github.com/googleapis/google-cloud-node/commit/454fa7943ddf664bc54a67e654d7e8a39ea55fed))
## [0.5.0](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v0.4.1...discoveryengine-v0.5.0) (2023-04-24)

@@ -4,0 +11,0 @@

14

package.json
{
"name": "@google-cloud/discoveryengine",
"version": "0.5.0",
"version": "0.6.0",
"description": "Discovery Engine API client for Node.js",

@@ -34,3 +34,3 @@ "repository": {

"clean": "gts clean",
"compile": "tsc -p . && cp -r protos build/ && minifyProtoJson",
"compile": "tsc -p . && cp -r protos build/",
"compile-protos": "compileProtos src",

@@ -43,6 +43,7 @@ "docs": "jsdoc -c .jsdoc.js",

"prepare": "npm run compile-protos && npm run compile",
"system-test": "npm run compile && c8 mocha build/system-test",
"test": "c8 mocha build/test",
"samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test",
"prelint": "cd samples; npm link ../; npm i"
"prelint": "cd samples; npm link ../; npm i",
"postpack": "minifyProtoJson",
"samples-test": "cd samples/ && npm link ../ && npm i && npm test",
"system-test": "c8 mocha build/system-test",
"test": "c8 mocha build/test"
},

@@ -62,2 +63,3 @@ "dependencies": {

"linkinator": "^4.0.0",
"long": "^5.2.3",
"mocha": "^9.2.2",

@@ -64,0 +66,0 @@ "null-loader": "^4.0.1",

@@ -134,2 +134,3 @@ [//]: # "This README.md file is auto-generated, all changes to this file will be lost."

| Document_service.list_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.list_documents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.list_documents.js,samples/README.md) |
| Document_service.purge_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.purge_documents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.purge_documents.js,samples/README.md) |
| Document_service.update_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.update_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.update_document.js,samples/README.md) |

@@ -136,0 +137,0 @@ | Recommendation_service.recommend | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/recommendation_service.recommend.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/recommendation_service.recommend.js,samples/README.md) |

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc