Skip to content

Commit ea9eaf9

Browse files
committed
feat(discovery): add method getStopwordListStatus
1 parent 9ce784d commit ea9eaf9

File tree

1 file changed

+58
-1
lines changed

1 file changed

+58
-1
lines changed

discovery/v1-generated.ts

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,6 +1350,52 @@ class DiscoveryV1 extends BaseService {
13501350
return this.createRequest(parameters, _callback);
13511351
};
13521352

1353+
/**
1354+
* Get stopword list status.
1355+
*
1356+
* Returns the current status of the stopword list for the specified collection.
1357+
*
1358+
* @param {Object} params - The parameters to send to the service.
1359+
* @param {string} params.environment_id - The ID of the environment.
1360+
* @param {string} params.collection_id - The ID of the collection.
1361+
* @param {Object} [params.headers] - Custom request headers
1362+
* @param {Function} [callback] - The callback that handles the response.
1363+
* @returns {NodeJS.ReadableStream|void}
1364+
*/
1365+
public getStopwordListStatus(params: DiscoveryV1.GetStopwordListStatusParams, callback?: DiscoveryV1.Callback<DiscoveryV1.TokenDictStatusResponse>): NodeJS.ReadableStream | void {
1366+
const _params = extend({}, params);
1367+
const _callback = (callback) ? callback : () => { /* noop */ };
1368+
const requiredParams = ['environment_id', 'collection_id'];
1369+
1370+
const missingParams = getMissingParams(_params, requiredParams);
1371+
if (missingParams) {
1372+
return _callback(missingParams);
1373+
}
1374+
1375+
const path = {
1376+
'environment_id': _params.environment_id,
1377+
'collection_id': _params.collection_id
1378+
};
1379+
1380+
const defaultHeaders = getDefaultHeaders('discovery', 'v1', 'getStopwordListStatus');
1381+
1382+
const parameters = {
1383+
options: {
1384+
url: '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/stopwords',
1385+
method: 'GET',
1386+
path,
1387+
},
1388+
defaultOptions: extend(true, {}, this._options, {
1389+
headers: extend(true, defaultHeaders, {
1390+
'Accept': 'application/json',
1391+
'Content-Type': 'application/json',
1392+
}, _params.headers),
1393+
}),
1394+
};
1395+
1396+
return this.createRequest(parameters, _callback);
1397+
};
1398+
13531399
/**
13541400
* Get tokenization dictionary status.
13551401
*
@@ -4047,6 +4093,15 @@ namespace DiscoveryV1 {
40474093
headers?: Object;
40484094
}
40494095

4096+
/** Parameters for the `getStopwordListStatus` operation. */
4097+
export interface GetStopwordListStatusParams {
4098+
/** The ID of the environment. */
4099+
environment_id: string;
4100+
/** The ID of the collection. */
4101+
collection_id: string;
4102+
headers?: Object;
4103+
}
4104+
40504105
/** Parameters for the `getTokenizationDictionaryStatus` operation. */
40514106
export interface GetTokenizationDictionaryStatusParams {
40524107
/** The ID of the environment. */
@@ -4935,7 +4990,7 @@ namespace DiscoveryV1 {
49354990
export interface DocumentAccepted {
49364991
/** The unique identifier of the ingested document. */
49374992
document_id?: string;
4938-
/** Status of the document in the ingestion process. */
4993+
/** Status of the document in the ingestion process. A status of `processing` is returned for documents that are ingested with a *version* date before `2019-01-01`. The `pending` status is returned for all others. */
49394994
status?: string;
49404995
/** Array of notices produced by the document-ingestion process. */
49414996
notices?: Notice[];
@@ -4949,6 +5004,8 @@ namespace DiscoveryV1 {
49495004
processing?: number;
49505005
/** The number of documents in the collection that failed to be ingested. */
49515006
failed?: number;
5007+
/** The number of documents that have been uploaded to the collection, but have not yet started processing. */
5008+
pending?: number;
49525009
}
49535010

49545011
/** DocumentSnapshot. */

0 commit comments

Comments
 (0)