googleapis
Version:
Google APIs Client Library for Node.js
1,054 lines • 171 kB
TypeScript
/**
* Copyright 2019 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.
*/
import { OAuth2Client, JWT, Compute, UserRefreshClient } from 'google-auth-library';
import { GoogleConfigurable, MethodOptions, GlobalOptions, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { GaxiosPromise } from 'gaxios';
export declare namespace cloudsearch_v1 {
interface Options extends GlobalOptions {
version: 'v1';
}
interface StandardParameters {
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* Cloud Search API
*
* Cloud Search provides cloud-based search capabilities over G Suite data. The Cloud Search API allows indexing of non-G Suite data into Cloud Search.
*
* @example
* const {google} = require('googleapis');
* const cloudsearch = google.cloudsearch('v1');
*
* @namespace cloudsearch
* @type {Function}
* @version v1
* @variation v1
* @param {object=} options Options for Cloudsearch
*/
class Cloudsearch {
context: APIRequestContext;
debug: Resource$Debug;
indexing: Resource$Indexing;
media: Resource$Media;
operations: Resource$Operations;
query: Resource$Query;
settings: Resource$Settings;
stats: Resource$Stats;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* Used to provide a search operator for boolean properties. This is optional. Search operators let users restrict the query to specific fields relevant to the type of item being searched.
*/
interface Schema$BooleanOperatorOptions {
/**
* Indicates the operator name required in the query in order to isolate the boolean property. For example, if operatorName is *closed* and the property's name is *isClosed*, then queries like *closed:<value>* will show results only where the value of the property named *isClosed* matches *<value>*. By contrast, a search that uses the same *<value>* without an operator will return all items where *<value>* matches the value of any String properties or text within the content field for the item. The operator name can only contain lowercase letters (a-z). The maximum length is 32 characters.
*/
operatorName?: string;
}
/**
* Options for boolean properties.
*/
interface Schema$BooleanPropertyOptions {
/**
* If set, describes how the boolean should be used as a search operator.
*/
operatorOptions?: Schema$BooleanOperatorOptions;
}
interface Schema$CheckAccessResponse {
/**
* Returns true if principal has access. Returns false otherwise.
*/
hasAccess?: boolean;
}
interface Schema$CompositeFilter {
/**
* The logic operator of the sub filter.
*/
logicOperator?: string;
/**
* Sub filters.
*/
subFilters?: Schema$Filter[];
}
/**
* Aggregation of items by status code as of the specified date.
*/
interface Schema$CustomerIndexStats {
/**
* Date for which statistics were calculated.
*/
date?: Schema$Date;
/**
* Number of items aggregrated by status code.
*/
itemCountByStatus?: Schema$ItemCountByStatus[];
}
/**
* Datasource is a logical namespace for items to be indexed. All items must belong to a datasource. This is the prerequisite before items can be indexed into Cloud Search.
*/
interface Schema$DataSource {
/**
* If true, Indexing API rejects any modification calls to this datasource such as create, update, and delete. Disabling this does not imply halting process of previously accepted data.
*/
disableModifications?: boolean;
/**
* Disable serving any search or assist results.
*/
disableServing?: boolean;
/**
* Required. Display name of the datasource The maximum length is 300 characters.
*/
displayName?: string;
/**
* List of service accounts that have indexing access.
*/
indexingServiceAccounts?: string[];
/**
* This field restricts visibility to items at the datasource level. Items within the datasource are restricted to the union of users and groups included in this field. Note that, this does not ensure access to a specific item, as users need to have ACL permissions on the contained items. This ensures a high level access on the entire datasource, and that the individual items are not shared outside this visibility.
*/
itemsVisibility?: Schema$GSuitePrincipal[];
/**
* Name of the datasource resource. Format: datasources/{source_id}. <br />The name is ignored when creating a datasource.
*/
name?: string;
/**
* IDs of the Long Running Operations (LROs) currently running for this schema.
*/
operationIds?: string[];
/**
* A short name or alias for the source. This value will be used to match the 'source' operator. For example, if the short name is *&lt;value&gt;* then queries like *source:&lt;value&gt;* will only return results for this source. The value must be unique across all datasources. The value must only contain alphanumeric characters (a-zA-Z0-9). The value cannot start with 'google' and cannot be one of the following: mail, gmail, docs, drive, groups, sites, calendar, hangouts, gplus, keep, people, teams. Its maximum length is 32 characters.
*/
shortName?: string;
}
/**
* Aggregation of items by status code as of the specified date.
*/
interface Schema$DataSourceIndexStats {
/**
* Date for which index stats were calculated. If the date of request is not the current date then stats calculated on the next day are returned. Stats are calculated close to mid night in this case. If date of request is current date, then real time stats are returned.
*/
date?: Schema$Date;
/**
* Number of items aggregrated by status code.
*/
itemCountByStatus?: Schema$ItemCountByStatus[];
}
/**
* Restriction on Datasource.
*/
interface Schema$DataSourceRestriction {
/**
* Filter options restricting the results. If multiple filters are present, they are grouped by object type before joining. Filters with the same object type are joined conjunctively, then the resulting expressions are joined disjunctively. The maximum number of elements is 20. NOTE: Suggest API supports only few filters at the moment: "objecttype", "type" and "mimetype". For now, schema specific filters cannot be used to filter suggestions.
*/
filterOptions?: Schema$FilterOptions[];
/**
* The source of restriction.
*/
source?: Schema$Source;
}
/**
* Represents a whole calendar date, for example a date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date between the year 1 and 9999.
*/
interface Schema$Date {
/**
* Day of month. Must be from 1 to 31 and valid for the year and month.
*/
day?: number;
/**
* Month of date. Must be from 1 to 12.
*/
month?: number;
/**
* Year of date. Must be from 1 to 9999.
*/
year?: number;
}
/**
* Optional. Provides a search operator for date properties. Search operators let users restrict the query to specific fields relevant to the type of item being searched.
*/
interface Schema$DateOperatorOptions {
/**
* Indicates the operator name required in the query in order to isolate the date property using the greater-than operator. For example, if greaterThanOperatorName is *closedafter* and the property's name is *closeDate*, then queries like *closedafter:&lt;value&gt;* will show results only where the value of the property named *closeDate* is later than *&lt;value&gt;*. The operator name can only contain lowercase letters (a-z). The maximum length is 32 characters.
*/
greaterThanOperatorName?: string;
/**
* Indicates the operator name required in the query in order to isolate the date property using the less-than operator. For example, if lessThanOperatorName is *closedbefore* and the property's name is *closeDate*, then queries like *closedbefore:&lt;value&gt;* will show results only where the value of the property named *closeDate* is earlier than *&lt;value&gt;*. The operator name can only contain lowercase letters (a-z). The maximum length is 32 characters.
*/
lessThanOperatorName?: string;
/**
* Indicates the actual string required in the query in order to isolate the date property. For example, suppose an issue tracking schema object has a property named *closeDate* that specifies an operator with an operatorName of *closedon*. For searches on that data, queries like *closedon:&lt;value&gt;* will show results only where the value of the *closeDate* property matches *&lt;value&gt;*. By contrast, a search that uses the same *&lt;value&gt;* without an operator will return all items where *&lt;value&gt;* matches the value of any String properties or text within the content field for the indexed datasource. The operator name can only contain lowercase letters (a-z). The maximum length is 32 characters.
*/
operatorName?: string;
}
/**
* Options for date properties.
*/
interface Schema$DatePropertyOptions {
/**
* If set, describes how the date should be used as a search operator.
*/
operatorOptions?: Schema$DateOperatorOptions;
}
/**
* List of date values.
*/
interface Schema$DateValues {
values?: Schema$Date[];
}
/**
* Shared request debug options for all cloudsearch RPC methods.
*/
interface Schema$DebugOptions {
/**
* If you are asked by Google to help with debugging, set this field. Otherwise, ignore this field.
*/
enableDebugging?: boolean;
}
interface Schema$DeleteQueueItemsRequest {
/**
* Name of connector making this call. <br />Format: datasources/{source_id}/connectors/{ID}
*/
connectorName?: string;
/**
* Common debug options.
*/
debugOptions?: Schema$DebugOptions;
/**
* Name of a queue to delete items from.
*/
queue?: string;
}
/**
* A reference to a top-level property within the object that should be displayed in search results. The values of the chosen properties will be displayed in the search results along with the dislpay label for that property if one is specified. If a display label is not specified, only the values will be shown.
*/
interface Schema$DisplayedProperty {
/**
* The name of the top-level property as defined in a property definition for the object. If the name is not a defined property in the schema, an error will be given when attempting to update the schema.
*/
propertyName?: string;
}
/**
* Used to provide a search operator for double properties. This is optional. Search operators let users restrict the query to specific fields relevant to the type of item being searched.
*/
interface Schema$DoubleOperatorOptions {
/**
* Indicates the operator name required in the query in order to use the double property in sorting or as a facet. The operator name can only contain lowercase letters (a-z). The maximum length is 32 characters.
*/
operatorName?: string;
}
/**
* Options for double properties.
*/
interface Schema$DoublePropertyOptions {
/**
* If set, describes how the double should be used as a search operator.
*/
operatorOptions?: Schema$DoubleOperatorOptions;
}
/**
* List of double values.
*/
interface Schema$DoubleValues {
values?: number[];
}
/**
* Drive follow-up search restricts (e.g. "followup:suggestions").
*/
interface Schema$DriveFollowUpRestrict {
type?: string;
}
/**
* Drive location search restricts (e.g. "is:starred").
*/
interface Schema$DriveLocationRestrict {
type?: string;
}
/**
* Drive mime-type search restricts (e.g. "type:pdf").
*/
interface Schema$DriveMimeTypeRestrict {
type?: string;
}
/**
* The time span search restrict (e.g. "after:2017-09-11 before:2017-09-12").
*/
interface Schema$DriveTimeSpanRestrict {
type?: string;
}
/**
* A person's email address.
*/
interface Schema$EmailAddress {
/**
* The email address.
*/
emailAddress?: string;
}
/**
* Used to provide a search operator for enum properties. This is optional. Search operators let users restrict the query to specific fields relevant to the type of item being searched. For example, if you provide no operator for a *priority* enum property with possible values *p0* and *p1*, a query that contains the term *p0* will return items that have *p0* as the value of the *priority* property, as well as any items that contain the string *p0* in other fields. If you provide an operator name for the enum, such as *priority*, then search users can use that operator to refine results to only items that have *p0* as this property's value, with the query *priority:p0*.
*/
interface Schema$EnumOperatorOptions {
/**
* Indicates the operator name required in the query in order to isolate the enum property. For example, if operatorName is *priority* and the property's name is *priorityVal*, then queries like *priority:&lt;value&gt;* will show results only where the value of the property named *priorityVal* matches *&lt;value&gt;*. By contrast, a search that uses the same *&lt;value&gt;* without an operator will return all items where *&lt;value&gt;* matches the value of any String properties or text within the content field for the item. The operator name can only contain lowercase letters (a-z). The maximum length is 32 characters.
*/
operatorName?: string;
}
/**
* Options for enum properties, which allow you to define a restricted set of strings to match user queries, set rankings for those string values, and define an operator name to be paired with those strings so that users can narrow results to only items with a specific value. For example, for items in a request tracking system with priority information, you could define *p0* as an allowable enum value and tie this enum to the operator name *priority* so that search users could add *priority:p0* to their query to restrict the set of results to only those items indexed with the value *p0*.
*/
interface Schema$EnumPropertyOptions {
/**
* If set, describes how the enum should be used as a search operator.
*/
operatorOptions?: Schema$EnumOperatorOptions;
/**
* Used to specify the ordered ranking for the enumeration that determines how the integer values provided in the possible EnumValuePairs are used to rank results. If specified, integer values must be provided for all possible EnumValuePair values given for this property. Can only be used if isRepeatable is false.
*/
orderedRanking?: string;
/**
* The list of possible values for the enumeration property. All EnumValuePairs must provide a string value. If you specify an integer value for one EnumValuePair, then all possible EnumValuePairs must provide an integer value. Both the string value and integer value must be unique over all possible values. Once set, possible values cannot be removed or modified. If you supply an ordered ranking and think you might insert additional enum values in the future, leave gaps in the initial integer values to allow adding a value in between previously registered values. The maximum number of elements is 100.
*/
possibleValues?: Schema$EnumValuePair[];
}
/**
* The enumeration value pair defines two things: a required string value and an optional integer value. The string value defines the necessary query term required to retrieve that item, such as *p0* for a priority item. The integer value determines the ranking of that string value relative to other enumerated values for the same property. For example, you might associate *p0* with *0* and define another enum pair such as *p1* and *1*. You must use the integer value in combination with ordered ranking to set the ranking of a given value relative to other enumerated values for the same property name. Here, a ranking order of DESCENDING for *priority* properties results in a ranking boost for items indexed with a value of *p0* compared to items indexed with a value of *p1*. Without a specified ranking order, the integer value has no effect on item ranking.
*/
interface Schema$EnumValuePair {
/**
* The integer value of the EnumValuePair which must be non-negative. Optional.
*/
integerValue?: number;
/**
* The string value of the EnumValuePair. The maximum length is 32 characters.
*/
stringValue?: string;
}
/**
* List of enum values.
*/
interface Schema$EnumValues {
/**
* The maximum allowable length for string values is 32 characters.
*/
values?: string[];
}
/**
* Error information about the response.
*/
interface Schema$ErrorInfo {
errorMessages?: Schema$ErrorMessage[];
}
/**
* Error message per source response.
*/
interface Schema$ErrorMessage {
errorMessage?: string;
source?: Schema$Source;
}
/**
* A bucket in a facet is the basic unit of operation. A bucket can comprise either a single value OR a contiguous range of values, depending on the type of the field bucketed. FacetBucket is currently used only for returning the response object.
*/
interface Schema$FacetBucket {
/**
* Number of results that match the bucket value. Counts are only returned for searches when count accuracy is ensured. Can be empty.
*/
count?: number;
/**
* Percent of results that match the bucket value. This value is between (0-100]. Percentages are returned for all searches, but are an estimate. Because percentages are always returned, you should render percentages instead of counts.
*/
percentage?: number;
value?: Schema$Value;
}
/**
* Specifies operators to return facet results for. There will be one FacetResult for every source_name/object_type/operator_name combination.
*/
interface Schema$FacetOptions {
/**
* Maximum number of facet buckets that should be returned for this facet. Defaults to 10. Maximum value is 100.
*/
numFacetBuckets?: number;
/**
* If object_type is set, only those objects of that type will be used to compute facets. If empty, then all objects will be used to compute facets.
*/
objectType?: string;
/**
* Name of the operator chosen for faceting. @see cloudsearch.SchemaPropertyOptions
*/
operatorName?: string;
/**
* Source name to facet on. Format: datasources/{source_id} If empty, all data sources will be used.
*/
sourceName?: string;
}
/**
* Source specific facet response
*/
interface Schema$FacetResult {
/**
* FacetBuckets for values in response containing at least a single result.
*/
buckets?: Schema$FacetBucket[];
/**
* Object type for which facet results are returned. Can be empty.
*/
objectType?: string;
/**
* Name of the operator chosen for faceting. @see cloudsearch.SchemaPropertyOptions
*/
operatorName?: string;
/**
* Source name for which facet results are returned. Will not be empty.
*/
sourceName?: string;
}
interface Schema$FieldViolation {
/**
* Description of the error.
*/
description?: string;
/**
* Path of field with violation.
*/
field?: string;
}
/**
* A generic way of expressing filters in a query, which supports two approaches: <br/><br/> **1. Setting a ValueFilter.** The name must match an operator_name defined in the schema for your data source. <br/> **2. Setting a CompositeFilter.** The filters are evaluated using the logical operator. The top-level operators can only be either an AND or a NOT. AND can appear only at the top-most level. OR can appear only under a top-level AND.
*/
interface Schema$Filter {
compositeFilter?: Schema$CompositeFilter;
valueFilter?: Schema$ValueFilter;
}
/**
* Filter options to be applied on query.
*/
interface Schema$FilterOptions {
/**
* Generic filter to restrict the search, such as `lang:en`, `site:xyz`.
*/
filter?: Schema$Filter;
/**
* If object_type is set, only objects of that type are returned. This should correspond to the name of the object that was registered within the definition of schema. The maximum length is 256 characters.
*/
objectType?: string;
}
/**
* Indicates which freshness property to use when adjusting search ranking for an item. Fresher, more recent dates indicate higher quality. Use the freshness option property that best works with your data. For fileshare documents, last modified time is most relevant. For calendar event data, the time when the event occurs is a more relevant freshness indicator. In this way, calendar events that occur closer to the time of the search query are considered higher quality and ranked accordingly.
*/
interface Schema$FreshnessOptions {
/**
* The duration after which an object should be considered stale. The default value is 180 days (in seconds).
*/
freshnessDuration?: string;
/**
* This property indicates the freshness level of the object in the index. If set, this property must be a top-level property within the property definitions and it must be a timestamp type or date type. Otherwise, the Indexing API uses updateTime as the freshness indicator. The maximum length is 256 characters. When a property is used to calculate fresheness, the value defaults to 2 years from the current time.
*/
freshnessProperty?: string;
}
interface Schema$GetCustomerIndexStatsResponse {
/**
* Summary of indexed item counts, one for each day in the requested range.
*/
stats?: Schema$CustomerIndexStats[];
}
interface Schema$GetDataSourceIndexStatsResponse {
/**
* Summary of indexed item counts, one for each day in the requested range.
*/
stats?: Schema$DataSourceIndexStats[];
}
/**
* Gmail Action restricts (i.e. read/replied/snoozed).
*/
interface Schema$GmailActionRestrict {
type?: string;
}
/**
* Gmail Attachment restricts (i.e. has:attachment, has:drive, filename:pdf).
*/
interface Schema$GmailAttachmentRestrict {
type?: string;
}
/**
* Gmail Folder restricts (i.e. in Drafts/Sent/Chats/User Generated Labels).
*/
interface Schema$GmailFolderRestrict {
type?: string;
}
/**
* Gmail Intelligent restricts (i.e. smartlabels, important).
*/
interface Schema$GmailIntelligentRestrict {
type?: string;
}
/**
* Gmail Time restricts (i.e. received today, this week).
*/
interface Schema$GmailTimeRestrict {
type?: string;
}
interface Schema$GSuitePrincipal {
/**
* This principal represents all users of the G Suite domain of the customer.
*/
gsuiteDomain?: boolean;
/**
* This principal references a G Suite group account
*/
gsuiteGroupEmail?: string;
/**
* This principal references a G Suite user account
*/
gsuiteUserEmail?: string;
}
/**
* Used to provide a search operator for html properties. This is optional. Search operators let users restrict the query to specific fields relevant to the type of item being searched.
*/
interface Schema$HtmlOperatorOptions {
/**
* Indicates the operator name required in the query in order to isolate the html property. For example, if operatorName is *subject* and the property's name is *subjectLine*, then queries like *subject:&lt;value&gt;* will show results only where the value of the property named *subjectLine* matches *&lt;value&gt;*. By contrast, a search that uses the same *&lt;value&gt;* without an operator will return all items where *&lt;value&gt;* matches the value of any html properties or text within the content field for the item. The operator name can only contain lowercase letters (a-z). The maximum length is 32 characters.
*/
operatorName?: string;
}
/**
* Options for html properties.
*/
interface Schema$HtmlPropertyOptions {
/**
* If set, describes how the property should be used as a search operator.
*/
operatorOptions?: Schema$HtmlOperatorOptions;
/**
* Indicates the search quality importance of the tokens within the field when used for retrieval. Can only be set to DEFAULT or NONE.
*/
retrievalImportance?: Schema$RetrievalImportance;
}
/**
* List of html values.
*/
interface Schema$HtmlValues {
/**
* The maximum allowable length for html values is 2048 characters.
*/
values?: string[];
}
interface Schema$IndexItemOptions {
/**
* Specifies if the index request should allow gsuite principals that do not exist or are deleted in the index request.
*/
allowUnknownGsuitePrincipals?: boolean;
}
interface Schema$IndexItemRequest {
/**
* Name of connector making this call. <br />Format: datasources/{source_id}/connectors/{ID}
*/
connectorName?: string;
/**
* Common debug options.
*/
debugOptions?: Schema$DebugOptions;
indexItemOptions?: Schema$IndexItemOptions;
/**
* Name of the item. Format: datasources/{source_id}/items/{item_id}
*/
item?: Schema$Item;
/**
* Required. The RequestMode for this request.
*/
mode?: string;
}
/**
* Used to provide a search operator for integer properties. This is optional. Search operators let users restrict the query to specific fields relevant to the type of item being searched.
*/
interface Schema$IntegerOperatorOptions {
/**
* Indicates the operator name required in the query in order to isolate the integer property using the greater-than operator. For example, if greaterThanOperatorName is *priorityabove* and the property's name is *priorityVal*, then queries like *priorityabove:&lt;value&gt;* will show results only where the value of the property named *priorityVal* is greater than *&lt;value&gt;*. The operator name can only contain lowercase letters (a-z). The maximum length is 32 characters.
*/
greaterThanOperatorName?: string;
/**
* Indicates the operator name required in the query in order to isolate the integer property using the less-than operator. For example, if lessThanOperatorName is *prioritybelow* and the property's name is *priorityVal*, then queries like *prioritybelow:&lt;value&gt;* will show results only where the value of the property named *priorityVal* is less than *&lt;value&gt;*. The operator name can only contain lowercase letters (a-z). The maximum length is 32 characters.
*/
lessThanOperatorName?: string;
/**
* Indicates the operator name required in the query in order to isolate the integer property. For example, if operatorName is *priority* and the property's name is *priorityVal*, then queries like *priority:&lt;value&gt;* will show results only where the value of the property named *priorityVal* matches *&lt;value&gt;*. By contrast, a search that uses the same *&lt;value&gt;* without an operator will return all items where *&lt;value&gt;* matches the value of any String properties or text within the content field for the item. The operator name can only contain lowercase letters (a-z). The maximum length is 32 characters.
*/
operatorName?: string;
}
/**
* Options for integer properties.
*/
interface Schema$IntegerPropertyOptions {
/**
* The maximum value of the property. The minimum and maximum values for the property are used to rank results according to the ordered ranking. Indexing requests with values greater than the maximum are accepted and ranked with the same weight as items indexed with the maximum value.
*/
maximumValue?: string;
/**
* The minimum value of the property. The minimum and maximum values for the property are used to rank results according to the ordered ranking. Indexing requests with values less than the minimum are accepted and ranked with the same weight as items indexed with the minimum value.
*/
minimumValue?: string;
/**
* If set, describes how the integer should be used as a search operator.
*/
operatorOptions?: Schema$IntegerOperatorOptions;
/**
* Used to specify the ordered ranking for the integer. Can only be used if isRepeatable is false.
*/
orderedRanking?: string;
}
/**
* List of integer values.
*/
interface Schema$IntegerValues {
values?: string[];
}
/**
* Represents an interaction between a user and an item.
*/
interface Schema$Interaction {
/**
* The time when the user acted on the item. If multiple actions of the same type exist for a single user, only the most recent action is recorded.
*/
interactionTime?: string;
/**
* The user that acted on the item.
*/
principal?: Schema$Principal;
type?: string;
}
/**
* Represents a single object that is an item in the search index, such as a file, folder, or a database record.
*/
interface Schema$Item {
/**
* Access control list for this item.
*/
acl?: Schema$ItemAcl;
/**
* Item content to be indexed and made text searchable.
*/
content?: Schema$ItemContent;
/**
* Type for this item.
*/
itemType?: string;
/**
* Metadata information.
*/
metadata?: Schema$ItemMetadata;
/**
* Name of the Item. Format: datasources/{source_id}/items/{item_id} <br />This is a required field. The maximum length is 1536 characters.
*/
name?: string;
/**
* Additional state connector can store for this item. The maximum length is 10000 bytes.
*/
payload?: string;
/**
* Queue this item belongs to. The maximum length is 100 characters.
*/
queue?: string;
/**
* Status of the item. Output only field.
*/
status?: Schema$ItemStatus;
/**
* The structured data for the item that should conform to a registered object definition in the schema for the data source.
*/
structuredData?: Schema$ItemStructuredData;
/**
* Required. The indexing system stores the version from the datasource as a byte string and compares the Item version in the index to the version of the queued Item using lexical ordering. <br /><br /> Cloud Search Indexing won't index or delete any queued item with a version value that is less than or equal to the version of the currently indexed item. The maximum length for this field is 1024 bytes.
*/
version?: string;
}
/**
* Access control list information for the item. For more information see https://developers.google.com/cloud-search/docs/guides/index-your-data#acls
*/
interface Schema$ItemAcl {
/**
* Sets the type of access rules to apply when an item inherits its ACL from a parent. This should always be set in tandem with the inheritAclFrom field. Also, when the inheritAclFrom field is set, this field should be set to a valid AclInheritanceType.
*/
aclInheritanceType?: string;
/**
* List of principals who are explicitly denied access to the item in search results. While principals are denied access by default, use denied readers to handle exceptions and override the list allowed readers. The maximum number of elements is 100.
*/
deniedReaders?: Schema$Principal[];
/**
* Name of the item to inherit the Access Permission List (ACL) from. Note: ACL inheritance *only* provides access permissions to child items and does not define structural relationships, nor does it provide convenient ways to delete large groups of items. Deleting an ACL parent from the index only alters the access permissions of child items that reference the parent in the inheritAclFrom field. The item is still in the index, but may not visible in search results. By contrast, deletion of a container item also deletes all items that reference the container via the containerName field. The maximum length for this field is 1536 characters.
*/
inheritAclFrom?: string;
/**
* Optional. List of owners for the item. This field has no bearing on document access permissions. It does, however, offer a slight ranking boosts items where the querying user is an owner. The maximum number of elements is 5.
*/
owners?: Schema$Principal[];
/**
* List of principals who are allowed to see the item in search results. Optional if inheriting permissions from another item or if the item is not intended to be visible, such as virtual containers. The maximum number of elements is 1000.
*/
readers?: Schema$Principal[];
}
/**
* Content of an item to be indexed and surfaced by Cloud Search.
*/
interface Schema$ItemContent {
/**
* Upload reference ID of a previously uploaded content via write method.
*/
contentDataRef?: Schema$UploadItemRef;
contentFormat?: string;
/**
* Hashing info calculated and provided by the API client for content. Can be used with the items.push method to calculate modified state. The maximum length is 2048 characters.
*/
hash?: string;
/**
* Content that is supplied inlined within the update method. The maximum length is 102400 bytes (100 KiB).
*/
inlineContent?: string;
}
interface Schema$ItemCountByStatus {
/**
* Number of items matching the status code.
*/
count?: string;
/**
* Status of the items.
*/
statusCode?: string;
}
/**
* Available metadata fields for the item.
*/
interface Schema$ItemMetadata {
/**
* The name of the container for this item. Deletion of the container item leads to automatic deletion of this item. Note: ACLs are not inherited from a container item. To provide ACL inheritance for an item, use the inheritAclFrom field. The maximum length is 1536 characters.
*/
containerName?: string;
/**
* The BCP-47 language code for the item, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. The maximum length is 32 characters.
*/
contentLanguage?: string;
/**
* The time when the item was created in the source repository.
*/
createTime?: string;
/**
* Hashing value provided by the API caller. This can be used with the items.push method to calculate modified state. The maximum length is 2048 characters.
*/
hash?: string;
/**
* A list of interactions for the item. Interactions are used to improve Search quality, but are not exposed to end users. The maximum number of elements is 1000.
*/
interactions?: Schema$Interaction[];
/**
* Additional keywords or phrases that should match the item. Used internally for user generated content. The maximum number of elements is 100. The maximum length is 8192 characters.
*/
keywords?: string[];
/**
* The original mime-type of ItemContent.content in the source repository. The maximum length is 256 characters.
*/
mimeType?: string;
/**
* The type of the item. This should correspond to the name of an object definition in the schema registered for the data source. For example, if the schema for the data source contains an object definition with name 'document', then item indexing requests for objects of that type should set objectType to 'document'. The maximum length is 256 characters.
*/
objectType?: string;
/**
* Additional search quality metadata of the item
*/
searchQualityMetadata?: Schema$SearchQualityMetadata;
/**
* Link to the source repository serving the data. &#83;earch results apply this link to the title. The maximum length is 2048 characters.
*/
sourceRepositoryUrl?: string;
/**
* The title of the item. If given, this will be the displayed title of the Search result. The maximum length is 2048 characters.
*/
title?: string;
/**
* The time when the item was last modified in the source repository.
*/
updateTime?: string;
}
/**
* This contains item's status and any errors.
*/
interface Schema$ItemStatus {
/**
* Status code.
*/
code?: string;
/**
* Error details in case the item is in ERROR state.
*/
processingErrors?: Schema$ProcessingError[];
/**
* Repository error reported by connector.
*/
repositoryErrors?: Schema$RepositoryError[];
}
/**
* Available structured data fields for the item.
*/
interface Schema$ItemStructuredData {
/**
* Hashing value provided by the API caller. This can be used with the items.push method to calculate modified state. The maximum length is 2048 characters.
*/
hash?: string;
/**
* The structured data object that should conform to a registered object definition in the schema for the data source.
*/
object?: Schema$StructuredDataObject;
}
interface Schema$ListDataSourceResponse {
/**
* Token to retrieve the next page of results, or empty if there are no more results in the list.
*/
nextPageToken?: string;
sources?: Schema$DataSource[];
}
interface Schema$ListItemNamesForUnmappedIdentityResponse {
itemNames?: string[];
/**
* Token to retrieve the next page of results, or empty if there are no more results in the list.
*/
nextPageToken?: string;
}
interface Schema$ListItemsResponse {
items?: Schema$Item[];
/**
* Token to retrieve the next page of results, or empty if there are no more results in the list.
*/
nextPageToken?: string;
}
/**
* List sources response.
*/
interface Schema$ListQuerySourcesResponse {
nextPageToken?: string;
sources?: Schema$QuerySource[];
}
interface Schema$ListSearchApplicationsResponse {
/**
* Token to retrieve the next page of results, or empty if there are no more results in the list.
*/
nextPageToken?: string;
searchApplications?: Schema$SearchApplication[];
}
interface Schema$ListUnmappedIdentitiesResponse {
/**
* Token to retrieve the next page of results, or empty if there are no more results in the list.
*/
nextPageToken?: string;
unmappedIdentities?: Schema$UnmappedIdentity[];
}
/**
* Matched range of a snippet [start, end).
*/
interface Schema$MatchRange {
/**
* End of the match in the snippet.
*/
end?: number;
/**
* Starting position of the match in the snippet.
*/
start?: number;
}
/**
* Media resource.
*/
interface Schema$Media {
/**
* Name of the media resource.
*/
resourceName?: string;
}
/**
* Metadata of a matched search result.
*/
interface Schema$Metadata {
/**
* The creation time for this document or object in the search result.
*/
createTime?: string;
/**
* Options that specify how to display a structured data search result.
*/
displayOptions?: Schema$ResultDisplayMetadata;
/**
* Indexed fields in structured data, returned as a generic named property.
*/
fields?: Schema$NamedProperty[];
/**
* Mime type of the search result.
*/
mimeType?: string;
/**
* Object type of the search result.
*/
objectType?: string;
/**
* Owner (usually creator) of the document or object of the search result.
*/
owner?: Schema$Person;
/**
* The named source for the result, such as Gmail.
*/
source?: Schema$Source;
/**
* The last modified date for the object in the search result. If not set in the item, the value returned here is empty. When `updateTime` is used for calculating freshness and is not set, this value defaults to 2 years from the current time.
*/
updateTime?: string;
}
/**
* A metaline is a list of properties that are displayed along with the search result to provide context.
*/
interface Schema$Metaline {
/**
* The list of displayed properties for the metaline. The maxiumum number of properties is 5.
*/
properties?: Schema$DisplayedProperty[];
}
/**
* A person's name.
*/
interface Schema$Name {
/**
* The read-only display name formatted according to the locale specified by the viewer's account or the <code>Accept-Language</code> HTTP header.
*/
displayName?: string;
}
/**
* A typed name-value pair for structured data. The type of the value should be the same as the registered type for the `name` property in the object definition of `objectType`.
*/
interface Schema$NamedProperty {
booleanValue?: boolean;
dateValues?: Schema$DateValues;
doubleValues?: Schema$DoubleValues;
enumValues?: Schema$EnumValues;
htmlValues?: Schema$HtmlValues;
integerValues?: Schema$IntegerValues;
/**
* The name of the property. This name should correspond to the name of the property that was registered for object definition in the schema. The maximum allowable length for this property is 256 characters.
*/
name?: string;
objectValues?: Schema$ObjectValues;
textValues?: Schema$TextValues;
timestampValues?: Schema$TimestampValues;
}
/**
* The definition for an object within a data source.
*/
interface Schema$ObjectDefinition {
/**
* Name for the object, which then defines its type. Item indexing requests should set the objectType field equal to this value. For example, if *name* is *Document*, then indexing requests for items of type Document should set objectType equal to *Document*. Each object definition must be uniquely named within a schema. The name must start with a letter and can only contain letters (A-Z, a-z) or numbers (0-9). The maximum length is 256 characters.
*/
name?: string;
/**
* The optional object-specific options.
*/
options?: Schema$ObjectOptions;
/**
* The property definitions for the object. The maximum number of elements is 1000.
*/
propertyDefinitions?: Schema$PropertyDefinition[];
}
/**
* The display options for an object.
*/
interface Schema$ObjectDisplayOptions {
/**
* Defines the properties that will be displayed in the metalines of the search results. The property values will be displayed in the order given here. If a property holds multiple values, all of the values will be diplayed before the next properties. For this reason, it is a good practice to specify singular properties before repeated properties in this list. All of the properties must set is_returnable to true. The maximum number of metalines is 3.
*/
metalines?: Schema$Metaline[];
/**
* The user friendly label to display in the search result to inidicate the type of the item. This is OPTIONAL; if not given, an object label will not be displayed on the context line of the search results. The maximum length is 32 characters.
*/
objectDisplayLabel?: string;
}
/**
* The options for an object.
*/
interface Schema$ObjectOptions {
/**
* Options that determine how the object is displayed in the Cloud Search results page.
*/
displayOptions?: Schema$ObjectDisplayOptions;
/**
* The freshness options for an object.
*/
freshnessOptions?: Schema$FreshnessOptions;
}
/**
* Options for object properties.
*/
interface Schema$ObjectPropertyOptions {
/**
* The properties of the sub-object. These properties represent a nested object. For example, if this property represents a postal address, the subobjectProperties might be named *street*, *city*, and *state*. The maximum number of elements is 1000.
*/
subobjectProperties?: Schema$PropertyDefinition[];
}
/**
* List of object values.
*/
interface Schema$ObjectValues {
values?: Schema$StructuredDataObject[];
}
/**
* This resource represents a long-running operation that is the result of a network API call.
*/
interface Schema$Operation {
/**
* If the value is `false`, it means the operation is still in p