Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

CloudSearch

import { CloudSearch } from "https://googleapis.deno.dev/v1/cloudsearch:v1.ts";

Cloud Search provides cloud-based search capabilities over Google Workspace data. The Cloud Search API allows indexing of non-Google Workspace data into Cloud Search.

class CloudSearch {
constructor(client?: CredentialsClient, baseUrl?: string);
async debugDatasourcesItemsCheckAccess(
name: string,
req: Principal,
): Promise<CheckAccessResponse>;
async debugDatasourcesItemsSearchByViewUrl(name: string, req: SearchItemsByViewUrlRequest): Promise<SearchItemsByViewUrlResponse>;
async debugDatasourcesItemsUnmappedidsList(parent: string, opts?: DebugDatasourcesItemsUnmappedidsListOptions): Promise<ListUnmappedIdentitiesResponse>;
async debugIdentitysourcesItemsListForunmappedidentity(parent: string, opts?: DebugIdentitysourcesItemsListForunmappedidentityOptions): Promise<ListItemNamesForUnmappedIdentityResponse>;
async debugIdentitysourcesUnmappedidsList(parent: string, opts?: DebugIdentitysourcesUnmappedidsListOptions): Promise<ListUnmappedIdentitiesResponse>;
async indexingDatasourcesDeleteSchema(name: string, opts?: IndexingDatasourcesDeleteSchemaOptions): Promise<Operation>;
async indexingDatasourcesGetSchema(name: string, opts?: IndexingDatasourcesGetSchemaOptions): Promise<Schema>;
async indexingDatasourcesItemsDelete(name: string, opts?: IndexingDatasourcesItemsDeleteOptions): Promise<Operation>;
async indexingDatasourcesItemsDeleteQueueItems(name: string, req: DeleteQueueItemsRequest): Promise<Operation>;
async indexingDatasourcesItemsGet(name: string, opts?: IndexingDatasourcesItemsGetOptions): Promise<Item>;
async indexingDatasourcesItemsIndex(name: string, req: IndexItemRequest): Promise<Operation>;
async indexingDatasourcesItemsList(name: string, opts?: IndexingDatasourcesItemsListOptions): Promise<ListItemsResponse>;
async indexingDatasourcesItemsPoll(name: string, req: PollItemsRequest): Promise<PollItemsResponse>;
async indexingDatasourcesItemsPush(name: string, req: PushItemRequest): Promise<Item>;
async indexingDatasourcesItemsUnreserve(name: string, req: UnreserveItemsRequest): Promise<Operation>;
async indexingDatasourcesItemsUpload(name: string, req: StartUploadItemRequest): Promise<UploadItemRef>;
async indexingDatasourcesUpdateSchema(name: string, req: UpdateSchemaRequest): Promise<Operation>;
async mediaUpload(resourceName: string, req: Media): Promise<Media>;
async operationsGet(name: string): Promise<Operation>;
async operationsLroList(name: string, opts?: OperationsLroListOptions): Promise<ListOperationsResponse>;
async queryRemoveActivity(req: RemoveActivityRequest): Promise<RemoveActivityResponse>;
async querySearch(req: SearchRequest): Promise<SearchResponse>;
async querySourcesList(opts?: QuerySourcesListOptions): Promise<ListQuerySourcesResponse>;
async querySuggest(req: SuggestRequest): Promise<SuggestResponse>;
async settingsDatasourcesCreate(req: DataSource): Promise<Operation>;
async settingsDatasourcesDelete(name: string, opts?: SettingsDatasourcesDeleteOptions): Promise<Operation>;
async settingsDatasourcesGet(name: string, opts?: SettingsDatasourcesGetOptions): Promise<DataSource>;
async settingsDatasourcesList(opts?: SettingsDatasourcesListOptions): Promise<ListDataSourceResponse>;
async settingsDatasourcesPatch(
name: string,
): Promise<Operation>;
async settingsDatasourcesUpdate(name: string, req: UpdateDataSourceRequest): Promise<Operation>;
async settingsGetCustomer(): Promise<CustomerSettings>;
async settingsSearchapplicationsCreate(req: SearchApplication): Promise<Operation>;
async settingsSearchapplicationsDelete(name: string, opts?: SettingsSearchapplicationsDeleteOptions): Promise<Operation>;
async settingsSearchapplicationsGet(name: string, opts?: SettingsSearchapplicationsGetOptions): Promise<SearchApplication>;
async settingsSearchapplicationsList(opts?: SettingsSearchapplicationsListOptions): Promise<ListSearchApplicationsResponse>;
async settingsSearchapplicationsPatch(
name: string,
): Promise<Operation>;
async settingsSearchapplicationsReset(name: string, req: ResetSearchApplicationRequest): Promise<Operation>;
async settingsSearchapplicationsUpdate(
name: string,
): Promise<Operation>;
async settingsUpdateCustomer(req: CustomerSettings, opts?: SettingsUpdateCustomerOptions): Promise<Operation>;
async statsGetIndex(opts?: StatsGetIndexOptions): Promise<GetCustomerIndexStatsResponse>;
async statsGetQuery(opts?: StatsGetQueryOptions): Promise<GetCustomerQueryStatsResponse>;
async statsGetSearchapplication(opts?: StatsGetSearchapplicationOptions): Promise<GetCustomerSearchApplicationStatsResponse>;
async statsGetSession(opts?: StatsGetSessionOptions): Promise<GetCustomerSessionStatsResponse>;
async statsGetUser(opts?: StatsGetUserOptions): Promise<GetCustomerUserStatsResponse>;
async statsIndexDatasourcesGet(name: string, opts?: StatsIndexDatasourcesGetOptions): Promise<GetDataSourceIndexStatsResponse>;
async statsQuerySearchapplicationsGet(name: string, opts?: StatsQuerySearchapplicationsGetOptions): Promise<GetSearchApplicationQueryStatsResponse>;
async statsSessionSearchapplicationsGet(name: string, opts?: StatsSessionSearchapplicationsGetOptions): Promise<GetSearchApplicationSessionStatsResponse>;
async statsUserSearchapplicationsGet(name: string, opts?: StatsUserSearchapplicationsGetOptions): Promise<GetSearchApplicationUserStatsResponse>;
async v1InitializeCustomer(req: InitializeCustomerRequest): Promise<Operation>;
}

§Constructors

§
new CloudSearch(client?: CredentialsClient, baseUrl?: string)
[src]

§Methods

§
debugDatasourcesItemsCheckAccess(name: string, req: Principal, opts?: DebugDatasourcesItemsCheckAccessOptions): Promise<CheckAccessResponse>
[src]

Checks whether an item is accessible by specified principal. Principal must be a user; groups and domain values aren't supported. Note: This API requires an admin account to execute.

@param name

Item name, format: datasources/{source_id}/items/{item_id}

§
debugDatasourcesItemsSearchByViewUrl(name: string, req: SearchItemsByViewUrlRequest): Promise<SearchItemsByViewUrlResponse>
[src]

Fetches the item whose viewUrl exactly matches that of the URL provided in the request. Note: This API requires an admin account to execute.

@param name

Source name, format: datasources/{source_id}

§
debugDatasourcesItemsUnmappedidsList(parent: string, opts?: DebugDatasourcesItemsUnmappedidsListOptions): Promise<ListUnmappedIdentitiesResponse>
[src]

List all unmapped identities for a specific item. Note: This API requires an admin account to execute.

@param parent

The name of the item, in the following format: datasources/{source_id}/items/{ID}

§
debugIdentitysourcesItemsListForunmappedidentity(parent: string, opts?: DebugIdentitysourcesItemsListForunmappedidentityOptions): Promise<ListItemNamesForUnmappedIdentityResponse>
[src]

Lists names of items associated with an unmapped identity. Note: This API requires an admin account to execute.

@param parent

The name of the identity source, in the following format: identitysources/{source_id}}

§
debugIdentitysourcesUnmappedidsList(parent: string, opts?: DebugIdentitysourcesUnmappedidsListOptions): Promise<ListUnmappedIdentitiesResponse>
[src]

Lists unmapped user identities for an identity source. Note: This API requires an admin account to execute.

@param parent

The name of the identity source, in the following format: identitysources/{source_id}

§
indexingDatasourcesDeleteSchema(name: string, opts?: IndexingDatasourcesDeleteSchemaOptions): Promise<Operation>
[src]

Deletes the schema of a data source. Note: This API requires an admin or service account to execute.

@param name

The name of the data source to delete Schema. Format: datasources/{source_id}

§
indexingDatasourcesGetSchema(name: string, opts?: IndexingDatasourcesGetSchemaOptions): Promise<Schema>
[src]

Gets the schema of a data source. Note: This API requires an admin or service account to execute.

@param name

The name of the data source to get Schema. Format: datasources/{source_id}

§
indexingDatasourcesItemsDelete(name: string, opts?: IndexingDatasourcesItemsDeleteOptions): Promise<Operation>
[src]

Deletes Item resource for the specified resource name. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.

@param name

Required. The name of the item to delete. Format: datasources/{source_id}/items/{item_id}

§
indexingDatasourcesItemsDeleteQueueItems(name: string, req: DeleteQueueItemsRequest): Promise<Operation>
[src]

Deletes all items in a queue. This method is useful for deleting stale items. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.

@param name

The name of the Data Source to delete items in a queue. Format: datasources/{source_id}

§
indexingDatasourcesItemsGet(name: string, opts?: IndexingDatasourcesItemsGetOptions): Promise<Item>
[src]

Gets Item resource by item name. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.

@param name

The name of the item to get info. Format: datasources/{source_id}/items/{item_id}

§
indexingDatasourcesItemsIndex(name: string, req: IndexItemRequest): Promise<Operation>
[src]

Updates Item ACL, metadata, and content. It will insert the Item if it does not exist. This method does not support partial updates. Fields with no provided values are cleared out in the Cloud Search index. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.

@param name

The name of the Item. Format: datasources/{source_id}/items/{item_id} This is a required field. The maximum length is 1536 characters.

§
indexingDatasourcesItemsList(name: string, opts?: IndexingDatasourcesItemsListOptions): Promise<ListItemsResponse>
[src]

Lists all or a subset of Item resources. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.

@param name

The name of the Data Source to list Items. Format: datasources/{source_id}

§
indexingDatasourcesItemsPoll(name: string, req: PollItemsRequest): Promise<PollItemsResponse>
[src]

Polls for unreserved items from the indexing queue and marks a set as reserved, starting with items that have the oldest timestamp from the highest priority ItemStatus. The priority order is as follows: ERROR MODIFIED NEW_ITEM ACCEPTED Reserving items ensures that polling from other threads cannot create overlapping sets. After handling the reserved items, the client should put items back into the unreserved state, either by calling index, or by calling push with the type REQUEUE. Items automatically become available (unreserved) after 4 hours even if no update or push method is called. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.

@param name

The name of the Data Source to poll items. Format: datasources/{source_id}

§
indexingDatasourcesItemsPush(name: string, req: PushItemRequest): Promise<Item>
[src]

Pushes an item onto a queue for later polling and updating. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.

@param name

The name of the item to push into the indexing queue. Format: datasources/{source_id}/items/{ID} This is a required field. The maximum length is 1536 characters.

§
indexingDatasourcesItemsUnreserve(name: string, req: UnreserveItemsRequest): Promise<Operation>
[src]

Unreserves all items from a queue, making them all eligible to be polled. This method is useful for resetting the indexing queue after a connector has been restarted. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.

@param name

The name of the Data Source to unreserve all items. Format: datasources/{source_id}

§
indexingDatasourcesItemsUpload(name: string, req: StartUploadItemRequest): Promise<UploadItemRef>
[src]

Creates an upload session for uploading item content. For items smaller than 100 KB, it's easier to embed the content inline within an index request. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.

@param name

The name of the Item to start a resumable upload. Format: datasources/{source_id}/items/{item_id}. The maximum length is 1536 bytes.

§
indexingDatasourcesUpdateSchema(name: string, req: UpdateSchemaRequest): Promise<Operation>
[src]

Updates the schema of a data source. This method does not perform incremental updates to the schema. Instead, this method updates the schema by overwriting the entire schema. Note: This API requires an admin or service account to execute.

@param name

The name of the data source to update Schema. Format: datasources/{source_id}

§
mediaUpload(resourceName: string, req: Media): Promise<Media>
[src]

Uploads media for indexing. The upload endpoint supports direct and resumable upload protocols and is intended for large items that can not be inlined during index requests. To index large content: 1. Call indexing.datasources.items.upload with the item name to begin an upload session and retrieve the UploadItemRef. 1. Call media.upload to upload the content, as a streaming request, using the same resource name from the UploadItemRef from step 1. 1. Call indexing.datasources.items.index to index the item. Populate the ItemContent with the UploadItemRef from step 1. For additional information, see Create a content connector using the REST API. Note: This API requires a service account to execute.

@param resourceName

Name of the media that is being downloaded. See ReadRequest.resource_name.

§
operationsGet(name: string): Promise<Operation>
[src]

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

@param name

The name of the operation resource.

§
operationsLroList(name: string, opts?: OperationsLroListOptions): Promise<ListOperationsResponse>
[src]

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.

@param name

The name of the operation's parent resource.

§
queryRemoveActivity(req: RemoveActivityRequest): Promise<RemoveActivityResponse>
[src]

Provides functionality to remove logged activity for a user. Currently to be used only for Chat 1p clients Note: This API requires a standard end user account to execute. A service account can't perform Remove Activity requests directly; to use a service account to perform queries, set up Google Workspace domain-wide delegation of authority.

§
querySearch(req: SearchRequest): Promise<SearchResponse>
[src]

The Cloud Search Query API provides the search method, which returns the most relevant results from a user query. The results can come from Google Workspace apps, such as Gmail or Google Drive, or they can come from data that you have indexed from a third party. Note: This API requires a standard end user account to execute. A service account can't perform Query API requests directly; to use a service account to perform queries, set up Google Workspace domain-wide delegation of authority.

§
querySourcesList(opts?: QuerySourcesListOptions): Promise<ListQuerySourcesResponse>
[src]

Returns list of sources that user can use for Search and Suggest APIs. Note: This API requires a standard end user account to execute. A service account can't perform Query API requests directly; to use a service account to perform queries, set up Google Workspace domain-wide delegation of authority.

§
querySuggest(req: SuggestRequest): Promise<SuggestResponse>
[src]

Provides suggestions for autocompleting the query. Note: This API requires a standard end user account to execute. A service account can't perform Query API requests directly; to use a service account to perform queries, set up Google Workspace domain-wide delegation of authority.

§
settingsDatasourcesCreate(req: DataSource): Promise<Operation>
[src]

Creates a datasource. Note: This API requires an admin account to execute.

§
settingsDatasourcesDelete(name: string, opts?: SettingsDatasourcesDeleteOptions): Promise<Operation>
[src]

Deletes a datasource. Note: This API requires an admin account to execute.

@param name

The name of the datasource. Format: datasources/{source_id}.

§
settingsDatasourcesGet(name: string, opts?: SettingsDatasourcesGetOptions): Promise<DataSource>
[src]

Gets a datasource. Note: This API requires an admin account to execute.

@param name

The name of the datasource resource. Format: datasources/{source_id}.

§
settingsDatasourcesList(opts?: SettingsDatasourcesListOptions): Promise<ListDataSourceResponse>
[src]

Lists datasources. Note: This API requires an admin account to execute.

§
settingsDatasourcesPatch(name: string, req: DataSource, opts?: SettingsDatasourcesPatchOptions): Promise<Operation>
[src]

Updates a datasource. Note: This API requires an admin account to execute.

@param name

The name of the datasource resource. Format: datasources/{source_id}. The name is ignored when creating a datasource.

§
settingsDatasourcesUpdate(name: string, req: UpdateDataSourceRequest): Promise<Operation>
[src]

Updates a datasource. Note: This API requires an admin account to execute.

@param name

The name of the datasource resource. Format: datasources/{source_id}. The name is ignored when creating a datasource.

§
settingsGetCustomer(): Promise<CustomerSettings>
[src]

Get customer settings. Note: This API requires an admin account to execute.

§
settingsSearchapplicationsCreate(req: SearchApplication): Promise<Operation>
[src]

Creates a search application. Note: This API requires an admin account to execute.

§
settingsSearchapplicationsDelete(name: string, opts?: SettingsSearchapplicationsDeleteOptions): Promise<Operation>
[src]

Deletes a search application. Note: This API requires an admin account to execute.

@param name

The name of the search application to be deleted. Format: applications/{application_id}.

§
settingsSearchapplicationsGet(name: string, opts?: SettingsSearchapplicationsGetOptions): Promise<SearchApplication>
[src]

Gets the specified search application. Note: This API requires an admin account to execute.

@param name

The name of the search application. Format: searchapplications/{application_id}.

§
settingsSearchapplicationsList(opts?: SettingsSearchapplicationsListOptions): Promise<ListSearchApplicationsResponse>
[src]

Lists all search applications. Note: This API requires an admin account to execute.

§
settingsSearchapplicationsPatch(name: string, req: SearchApplication, opts?: SettingsSearchapplicationsPatchOptions): Promise<Operation>
[src]

Updates a search application. Note: This API requires an admin account to execute.

@param name

The name of the Search Application. Format: searchapplications/{application_id}.

§
settingsSearchapplicationsReset(name: string, req: ResetSearchApplicationRequest): Promise<Operation>
[src]

Resets a search application to default settings. This will return an empty response. Note: This API requires an admin account to execute.

@param name

The name of the search application to be reset. Format: applications/{application_id}.

§
settingsSearchapplicationsUpdate(name: string, req: SearchApplication, opts?: SettingsSearchapplicationsUpdateOptions): Promise<Operation>
[src]

Updates a search application. Note: This API requires an admin account to execute.

@param name

The name of the Search Application. Format: searchapplications/{application_id}.

§
settingsUpdateCustomer(req: CustomerSettings, opts?: SettingsUpdateCustomerOptions): Promise<Operation>
[src]

Update customer settings. Note: This API requires an admin account to execute.

§

Gets indexed item statistics aggreggated across all data sources. This API only returns statistics for previous dates; it doesn't return statistics for the current day. Note: This API requires a standard end user account to execute.

§

Get the query statistics for customer. Note: This API requires a standard end user account to execute.

§

Get search application stats for customer. Note: This API requires a standard end user account to execute.

§

Get the # of search sessions, % of successful sessions with a click query statistics for customer. Note: This API requires a standard end user account to execute.

§

Get the users statistics for customer. Note: This API requires a standard end user account to execute.

§
statsIndexDatasourcesGet(name: string, opts?: StatsIndexDatasourcesGetOptions): Promise<GetDataSourceIndexStatsResponse>
[src]

Gets indexed item statistics for a single data source. Note: This API requires a standard end user account to execute.

@param name

The resource id of the data source to retrieve statistics for, in the following format: "datasources/{source_id}"

§
statsQuerySearchapplicationsGet(name: string, opts?: StatsQuerySearchapplicationsGetOptions): Promise<GetSearchApplicationQueryStatsResponse>
[src]

Get the query statistics for search application. Note: This API requires a standard end user account to execute.

@param name

The resource id of the search application query stats, in the following format: searchapplications/{application_id}

§
statsSessionSearchapplicationsGet(name: string, opts?: StatsSessionSearchapplicationsGetOptions): Promise<GetSearchApplicationSessionStatsResponse>
[src]

Get the # of search sessions, % of successful sessions with a click query statistics for search application. Note: This API requires a standard end user account to execute.

@param name

The resource id of the search application session stats, in the following format: searchapplications/{application_id}

§
statsUserSearchapplicationsGet(name: string, opts?: StatsUserSearchapplicationsGetOptions): Promise<GetSearchApplicationUserStatsResponse>
[src]

Get the users statistics for search application. Note: This API requires a standard end user account to execute.

@param name

The resource id of the search application session stats, in the following format: searchapplications/{application_id}

§
v1InitializeCustomer(req: InitializeCustomerRequest): Promise<Operation>
[src]

Enables third party support in Google Cloud Search. Note: This API requires an admin account to execute.