diff --git a/lib/services/imageSearch/LICENSE.txt b/lib/services/imageSearch/LICENSE.txt index a70e8cf660..5431ba98b9 100644 --- a/lib/services/imageSearch/LICENSE.txt +++ b/lib/services/imageSearch/LICENSE.txt @@ -1,21 +1,21 @@ -The MIT License (MIT) - -Copyright (c) 2018 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +The MIT License (MIT) + +Copyright (c) 2018 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/lib/services/imageSearch/lib/imageSearchAPIClient.d.ts b/lib/services/imageSearch/lib/imageSearchAPIClient.d.ts index cccff03040..c302897849 100644 --- a/lib/services/imageSearch/lib/imageSearchAPIClient.d.ts +++ b/lib/services/imageSearch/lib/imageSearchAPIClient.d.ts @@ -12,6 +12,16 @@ import { ServiceClient, ServiceClientOptions, ServiceClientCredentials } from 'm import * as models from "./models"; import * as operations from "./operations"; +/** + * ImageSearchAPIClientOptions for ImageSearchAPIClient. + */ +declare interface ImageSearchAPIClientOptions extends ServiceClientOptions { + /** + * @property {string} [endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + */ + endpoint?: string; +} + export default class ImageSearchAPIClient extends ServiceClient { /** * @class @@ -20,8 +30,6 @@ export default class ImageSearchAPIClient extends ServiceClient { * * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. * - * @param {string} [baseUri] - The base URI of the service. - * * @param {object} [options] - The parameter options * * @param {Array} [options.filters] - Filters to be added to the request pipeline @@ -31,11 +39,15 @@ export default class ImageSearchAPIClient extends ServiceClient { * * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy * + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). + * */ - constructor(credentials: ServiceClientCredentials, baseUri?: string, options?: ServiceClientOptions); + constructor(credentials: ServiceClientCredentials, options?: ImageSearchAPIClientOptions); credentials: ServiceClientCredentials; + endpoint: string; + // Operation groups imagesOperations: operations.ImagesOperations; } diff --git a/lib/services/imageSearch/lib/imageSearchAPIClient.js b/lib/services/imageSearch/lib/imageSearchAPIClient.js index 36afb827c5..6be5aa1fc3 100644 --- a/lib/services/imageSearch/lib/imageSearchAPIClient.js +++ b/lib/services/imageSearch/lib/imageSearchAPIClient.js @@ -26,14 +26,14 @@ class ImageSearchAPIClient extends ServiceClient { /** * Create a ImageSearchAPIClient. * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. - * @param {string} [baseUri] - The base URI of the service. * @param {object} [options] - The parameter options * @param {Array} [options.filters] - Filters to be added to the request pipeline * @param {object} [options.requestOptions] - Options for the underlying request object * {@link https://github.com/request/request#requestoptions-callback Options doc} * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy + * @param {string} [options.endpoint] - Supported Cognitive Services endpoints (protocol and hostname, for example: "https://westus.api.cognitive.microsoft.com", "https://api.cognitive.microsoft.com"). */ - constructor(credentials, baseUri, options) { + constructor(credentials, options) { if (credentials === null || credentials === undefined) { throw new Error('\'credentials\' cannot be null.'); } @@ -42,14 +42,15 @@ class ImageSearchAPIClient extends ServiceClient { super(credentials, options); - this.baseUri = baseUri; - if (!this.baseUri) { - this.baseUri = 'https://api.cognitive.microsoft.com/bing/v7.0'; - } + this.endpoint = 'https://api.cognitive.microsoft.com'; + this.baseUri = '{Endpoint}/bing/v7.0'; this.credentials = credentials; let packageInfo = this.getPackageJsonInfo(__dirname); this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); + if(options.endpoint !== null && options.endpoint !== undefined) { + this.endpoint = options.endpoint; + } this.imagesOperations = new operations.ImagesOperations(this); this.models = models; msRest.addSerializationMixin(this); diff --git a/lib/services/imageSearch/lib/models/aggregateOffer.js b/lib/services/imageSearch/lib/models/aggregateOffer.js index cb82cb7cad..8d2d7a8434 100644 --- a/lib/services/imageSearch/lib/models/aggregateOffer.js +++ b/lib/services/imageSearch/lib/models/aggregateOffer.js @@ -20,7 +20,7 @@ const models = require('./index'); class AggregateOffer extends models['Offer'] { /** * Create a AggregateOffer. - * @member {array} [offers] A list of offers from merchants that have + * @property {array} [offers] A list of offers from merchants that have * offerings related to the image. */ constructor() { diff --git a/lib/services/imageSearch/lib/models/aggregateRating.js b/lib/services/imageSearch/lib/models/aggregateRating.js index 3726e1d297..b1e311c978 100644 --- a/lib/services/imageSearch/lib/models/aggregateRating.js +++ b/lib/services/imageSearch/lib/models/aggregateRating.js @@ -20,7 +20,7 @@ const models = require('./index'); class AggregateRating extends models['Rating'] { /** * Create a AggregateRating. - * @member {number} [reviewCount] The number of times the recipe has been + * @property {number} [reviewCount] The number of times the recipe has been * rated or reviewed. */ constructor() { diff --git a/lib/services/imageSearch/lib/models/creativeWork.js b/lib/services/imageSearch/lib/models/creativeWork.js index 81456d12ae..237bea3425 100644 --- a/lib/services/imageSearch/lib/models/creativeWork.js +++ b/lib/services/imageSearch/lib/models/creativeWork.js @@ -21,11 +21,11 @@ const models = require('./index'); class CreativeWork extends models['Thing'] { /** * Create a CreativeWork. - * @member {string} [thumbnailUrl] The URL to a thumbnail of the item. - * @member {array} [provider] The source of the creative work. - * @member {string} [datePublished] The date on which the CreativeWork was + * @property {string} [thumbnailUrl] The URL to a thumbnail of the item. + * @property {array} [provider] The source of the creative work. + * @property {string} [datePublished] The date on which the CreativeWork was * published. - * @member {string} [text] Text content of this creative work + * @property {string} [text] Text content of this creative work */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/errorModel.js b/lib/services/imageSearch/lib/models/errorModel.js index 29a10321dd..d827e4885e 100644 --- a/lib/services/imageSearch/lib/models/errorModel.js +++ b/lib/services/imageSearch/lib/models/errorModel.js @@ -17,22 +17,22 @@ class ErrorModel { /** * Create a ErrorModel. - * @member {string} code The error code that identifies the category of + * @property {string} code The error code that identifies the category of * error. Possible values include: 'None', 'ServerError', 'InvalidRequest', * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. * Default value: 'None' . - * @member {string} [subCode] The error code that further helps to identify + * @property {string} [subCode] The error code that further helps to identify * the error. Possible values include: 'UnexpectedError', 'ResourceError', * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional + * @property {string} message A description of the error. + * @property {string} [moreDetails] A description that provides additional * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. + * @property {string} [parameter] The parameter in the request that caused + * the error. + * @property {string} [value] The parameter's value in the request that was + * not valid. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/errorResponse.js b/lib/services/imageSearch/lib/models/errorResponse.js index f24c1e64b3..e37d2932b9 100644 --- a/lib/services/imageSearch/lib/models/errorResponse.js +++ b/lib/services/imageSearch/lib/models/errorResponse.js @@ -20,8 +20,8 @@ const models = require('./index'); class ErrorResponse extends models['Response'] { /** * Create a ErrorResponse. - * @member {array} errors A list of errors that describe the reasons why the - * request failed. + * @property {array} errors A list of errors that describe the reasons why + * the request failed. */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/identifiable.js b/lib/services/imageSearch/lib/models/identifiable.js index 6cc9e3d679..51ceb85de4 100644 --- a/lib/services/imageSearch/lib/models/identifiable.js +++ b/lib/services/imageSearch/lib/models/identifiable.js @@ -20,7 +20,7 @@ const models = require('./index'); class Identifiable extends models['ResponseBase'] { /** * Create a Identifiable. - * @member {string} [id] A String identifier. + * @property {string} [id] A String identifier. */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/imageGallery.js b/lib/services/imageSearch/lib/models/imageGallery.js index 8e24b5b1cd..1a85b99a95 100644 --- a/lib/services/imageSearch/lib/models/imageGallery.js +++ b/lib/services/imageSearch/lib/models/imageGallery.js @@ -20,12 +20,12 @@ const models = require('./index'); class ImageGallery extends models['CollectionPage'] { /** * Create a ImageGallery. - * @member {string} [source] The publisher or social network where the images - * were found. You must attribute the publisher as the source where the - * collection was found. - * @member {number} [imagesCount] The number of related images found in the + * @property {string} [source] The publisher or social network where the + * images were found. You must attribute the publisher as the source where + * the collection was found. + * @property {number} [imagesCount] The number of related images found in the * collection. - * @member {number} [followersCount] The number of users on the social + * @property {number} [followersCount] The number of users on the social * network that follow the creator. */ constructor() { diff --git a/lib/services/imageSearch/lib/models/imageInsights.js b/lib/services/imageSearch/lib/models/imageInsights.js index 6a57409b31..c721fa3471 100644 --- a/lib/services/imageSearch/lib/models/imageInsights.js +++ b/lib/services/imageSearch/lib/models/imageInsights.js @@ -26,123 +26,123 @@ const models = require('./index'); class ImageInsights extends models['Response'] { /** * Create a ImageInsights. - * @member {string} [imageInsightsToken] A token that you use in a subsequent - * call to the Image Search API to get more information about the image. For - * information about using this token, see the insightsToken query parameter. - * This token has the same usage as the token in the Image object. - * @member {object} [bestRepresentativeQuery] The query term that best + * @property {string} [imageInsightsToken] A token that you use in a + * subsequent call to the Image Search API to get more information about the + * image. For information about using this token, see the insightsToken query + * parameter. This token has the same usage as the token in the Image object. + * @property {object} [bestRepresentativeQuery] The query term that best * represents the image. Clicking the link in the Query object, takes the * user to a webpage with more pictures of the image. - * @member {string} [bestRepresentativeQuery.text] The query string. Use this - * string as the query term in a new search request. - * @member {string} [bestRepresentativeQuery.displayText] The display version - * of the query term. This version of the query term may contain special - * characters that highlight the search term found in the query string. The - * string contains the highlighting characters only if the query enabled hit - * highlighting - * @member {string} [bestRepresentativeQuery.webSearchUrl] The URL that takes - * the user to the Bing search results page for the query.Only related search - * results include this field. - * @member {string} [bestRepresentativeQuery.searchLink] The URL that you use - * to get the results of the related search. Before using the URL, you must - * append query parameters as appropriate and include the + * @property {string} [bestRepresentativeQuery.text] The query string. Use + * this string as the query term in a new search request. + * @property {string} [bestRepresentativeQuery.displayText] The display + * version of the query term. This version of the query term may contain + * special characters that highlight the search term found in the query + * string. The string contains the highlighting characters only if the query + * enabled hit highlighting + * @property {string} [bestRepresentativeQuery.webSearchUrl] The URL that + * takes the user to the Bing search results page for the query.Only related + * search results include this field. + * @property {string} [bestRepresentativeQuery.searchLink] The URL that you + * use to get the results of the related search. Before using the URL, you + * must append query parameters as appropriate and include the * Ocp-Apim-Subscription-Key header. Use this URL if you're displaying the * results in your own user interface. Otherwise, use the webSearchUrl URL. - * @member {object} [bestRepresentativeQuery.thumbnail] The URL to a + * @property {object} [bestRepresentativeQuery.thumbnail] The URL to a * thumbnail of a related image. - * @member {object} [bestRepresentativeQuery.thumbnail.thumbnail] The URL to - * a thumbnail of the image - * @member {string} [bestRepresentativeQuery.thumbnail.imageInsightsToken] + * @property {object} [bestRepresentativeQuery.thumbnail.thumbnail] The URL + * to a thumbnail of the image + * @property {string} [bestRepresentativeQuery.thumbnail.imageInsightsToken] * The token that you use in a subsequent call to the Image Search API to get * additional information about the image. For information about using this * token, see the insightsToken query parameter. - * @member {object} [bestRepresentativeQuery.thumbnail.insightsMetadata] A + * @property {object} [bestRepresentativeQuery.thumbnail.insightsMetadata] A * count of the number of websites where you can shop or perform other * actions related to the image. For example, if the image is of an apple * pie, this object includes a count of the number of websites where you can * buy an apple pie. To indicate the number of offers in your UX, include * badging such as a shopping cart icon that contains the count. When the - * user clicks on the icon, use imageInisghtsToken to get the list of + * user clicks on the icon, use imageInsightsToken to get the list of * websites. - * @member {number} + * @property {number} * [bestRepresentativeQuery.thumbnail.insightsMetadata.shoppingSourcesCount] * The number of websites that offer goods of the products seen in the image. - * @member {number} + * @property {number} * [bestRepresentativeQuery.thumbnail.insightsMetadata.recipeSourcesCount] * The number of websites that offer recipes of the food seen in the image. - * @member {object} + * @property {object} * [bestRepresentativeQuery.thumbnail.insightsMetadata.aggregateOffer] A * summary of the online offers of products found in the image. For example, * if the image is of a dress, the offer might identify the lowest price and * the number of offers found. Only visually similar products insights * include this field. The offer includes the following fields: Name, * AggregateRating, OfferCount, and LowPrice. - * @member {array} + * @property {array} * [bestRepresentativeQuery.thumbnail.insightsMetadata.aggregateOffer.offers] * A list of offers from merchants that have offerings related to the image. - * @member {string} [bestRepresentativeQuery.thumbnail.imageId] Unique Id for - * the image - * @member {string} [bestRepresentativeQuery.thumbnail.accentColor] A + * @property {string} [bestRepresentativeQuery.thumbnail.imageId] Unique Id + * for the image + * @property {string} [bestRepresentativeQuery.thumbnail.accentColor] A * three-byte hexadecimal number that represents the color that dominates the * image. Use the color as the temporary background in your client until the * image is loaded. - * @member {string} [bestRepresentativeQuery.thumbnail.visualWords] Visual + * @property {string} [bestRepresentativeQuery.thumbnail.visualWords] Visual * representation of the image. Used for getting more sizes - * @member {object} [imageCaption] The caption to use for the image. - * @member {string} [imageCaption.caption] A caption about the image. - * @member {string} [imageCaption.dataSourceUrl] The URL to the website where - * the caption was found. You must attribute the caption to the source. For - * example, by displaying the domain name from the URL next to the caption - * and using the URL to link to the source website. - * @member {array} [imageCaption.relatedSearches] A list of entities found in - * the caption. Use the contents of the Query object to find the entity in + * @property {object} [imageCaption] The caption to use for the image. + * @property {string} [imageCaption.caption] A caption about the image. + * @property {string} [imageCaption.dataSourceUrl] The URL to the website + * where the caption was found. You must attribute the caption to the source. + * For example, by displaying the domain name from the URL next to the + * caption and using the URL to link to the source website. + * @property {array} [imageCaption.relatedSearches] A list of entities found + * in the caption. Use the contents of the Query object to find the entity in * the caption and create a link. The link takes the user to images of the * entity. - * @member {object} [relatedCollections] A list of links to webpages that + * @property {object} [relatedCollections] A list of links to webpages that * contain related images. - * @member {array} [relatedCollections.value] A list of webpages that contain - * related images. - * @member {object} [pagesIncluding] A list of webpages that contain the + * @property {array} [relatedCollections.value] A list of webpages that + * contain related images. + * @property {object} [pagesIncluding] A list of webpages that contain the * image. To access the webpage, use the URL in the image's hostPageUrl * field. - * @member {array} [pagesIncluding.value] A list of images. - * @member {object} [shoppingSources] A list of merchants that offer items + * @property {array} [pagesIncluding.value] A list of images. + * @property {object} [shoppingSources] A list of merchants that offer items * related to the image. For example, if the image is of an apple pie, the * list contains merchants that are selling apple pies. - * @member {array} [shoppingSources.offers] A list of offers from merchants + * @property {array} [shoppingSources.offers] A list of offers from merchants * that have offerings related to the image. - * @member {object} [relatedSearches] A list of related queries made by + * @property {object} [relatedSearches] A list of related queries made by * others. - * @member {array} [relatedSearches.value] A list of related searches. - * @member {object} [recipes] A list of recipes related to the image. For + * @property {array} [relatedSearches.value] A list of related searches. + * @property {object} [recipes] A list of recipes related to the image. For * example, if the image is of an apple pie, the list contains recipes for * making an apple pie. - * @member {array} [recipes.value] A list of recipes. - * @member {object} [visuallySimilarImages] A list of images that are + * @property {array} [recipes.value] A list of recipes. + * @property {object} [visuallySimilarImages] A list of images that are * visually similar to the original image. For example, if the specified * image is of a sunset over a body of water, the list of similar images are * of a sunset over a body of water. If the specified image is of a person, * similar images might be of the same person or they might be of persons * dressed similarly or in a similar setting. The criteria for similarity * continues to evolve. - * @member {array} [visuallySimilarImages.value] A list of images. - * @member {object} [visuallySimilarProducts] A list of images that contain + * @property {array} [visuallySimilarImages.value] A list of images. + * @property {object} [visuallySimilarProducts] A list of images that contain * products that are visually similar to products found in the original * image. For example, if the specified image contains a dress, the list of * similar images contain a dress. The image provides summary information * about offers that Bing found online for the product. - * @member {array} [visuallySimilarProducts.value] A list of images. - * @member {object} [recognizedEntityGroups] A list of groups that contain + * @property {array} [visuallySimilarProducts.value] A list of images. + * @property {object} [recognizedEntityGroups] A list of groups that contain * images of entities that match the entity found in the specified image. For * example, the response might include images from the general celebrity * group if the entity was recognized in that group. - * @member {array} [recognizedEntityGroups.value] A list of recognized + * @property {array} [recognizedEntityGroups.value] A list of recognized * entities. - * @member {object} [imageTags] A list of characteristics of the content + * @property {object} [imageTags] A list of characteristics of the content * found in the image. For example, if the image is of a person, the tags * might indicate the person's gender and the type of clothes they're * wearing. - * @member {array} [imageTags.value] A list of tags that describe the + * @property {array} [imageTags.value] A list of tags that describe the * characteristics of the content found in the image. For example, if the * image is of a musical artist, the list might include Female, Dress, and * Music to indicate the person is female music artist that's wearing a diff --git a/lib/services/imageSearch/lib/models/imageInsightsImageCaption.js b/lib/services/imageSearch/lib/models/imageInsightsImageCaption.js index f21e949da4..ca642d26fb 100644 --- a/lib/services/imageSearch/lib/models/imageInsightsImageCaption.js +++ b/lib/services/imageSearch/lib/models/imageInsightsImageCaption.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines an image's caption. * @@ -19,12 +17,12 @@ const models = require('./index'); class ImageInsightsImageCaption { /** * Create a ImageInsightsImageCaption. - * @member {string} caption A caption about the image. - * @member {string} dataSourceUrl The URL to the website where the caption + * @property {string} caption A caption about the image. + * @property {string} dataSourceUrl The URL to the website where the caption * was found. You must attribute the caption to the source. For example, by * displaying the domain name from the URL next to the caption and using the * URL to link to the source website. - * @member {array} relatedSearches A list of entities found in the caption. + * @property {array} relatedSearches A list of entities found in the caption. * Use the contents of the Query object to find the entity in the caption and * create a link. The link takes the user to images of the entity. */ diff --git a/lib/services/imageSearch/lib/models/imageObject.js b/lib/services/imageSearch/lib/models/imageObject.js index 4f20534df4..271071eb61 100644 --- a/lib/services/imageSearch/lib/models/imageObject.js +++ b/lib/services/imageSearch/lib/models/imageObject.js @@ -20,35 +20,35 @@ const models = require('./index'); class ImageObject extends models['MediaObject'] { /** * Create a ImageObject. - * @member {object} [thumbnail] The URL to a thumbnail of the image - * @member {string} [imageInsightsToken] The token that you use in a + * @property {object} [thumbnail] The URL to a thumbnail of the image + * @property {string} [imageInsightsToken] The token that you use in a * subsequent call to the Image Search API to get additional information * about the image. For information about using this token, see the * insightsToken query parameter. - * @member {object} [insightsMetadata] A count of the number of websites + * @property {object} [insightsMetadata] A count of the number of websites * where you can shop or perform other actions related to the image. For * example, if the image is of an apple pie, this object includes a count of * the number of websites where you can buy an apple pie. To indicate the * number of offers in your UX, include badging such as a shopping cart icon * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [insightsMetadata.shoppingSourcesCount] The number of + * imageInsightsToken to get the list of websites. + * @property {number} [insightsMetadata.shoppingSourcesCount] The number of * websites that offer goods of the products seen in the image. - * @member {number} [insightsMetadata.recipeSourcesCount] The number of + * @property {number} [insightsMetadata.recipeSourcesCount] The number of * websites that offer recipes of the food seen in the image. - * @member {object} [insightsMetadata.aggregateOffer] A summary of the online - * offers of products found in the image. For example, if the image is of a - * dress, the offer might identify the lowest price and the number of offers - * found. Only visually similar products insights include this field. The - * offer includes the following fields: Name, AggregateRating, OfferCount, - * and LowPrice. - * @member {array} [insightsMetadata.aggregateOffer.offers] A list of offers - * from merchants that have offerings related to the image. - * @member {string} [imageId] Unique Id for the image - * @member {string} [accentColor] A three-byte hexadecimal number that + * @property {object} [insightsMetadata.aggregateOffer] A summary of the + * online offers of products found in the image. For example, if the image is + * of a dress, the offer might identify the lowest price and the number of + * offers found. Only visually similar products insights include this field. + * The offer includes the following fields: Name, AggregateRating, + * OfferCount, and LowPrice. + * @property {array} [insightsMetadata.aggregateOffer.offers] A list of + * offers from merchants that have offerings related to the image. + * @property {string} [imageId] Unique Id for the image + * @property {string} [accentColor] A three-byte hexadecimal number that * represents the color that dominates the image. Use the color as the * temporary background in your client until the image is loaded. - * @member {string} [visualWords] Visual representation of the image. Used + * @property {string} [visualWords] Visual representation of the image. Used * for getting more sizes */ constructor() { diff --git a/lib/services/imageSearch/lib/models/imageTagsModule.js b/lib/services/imageSearch/lib/models/imageTagsModule.js index bbdfc63e55..56869f903f 100644 --- a/lib/services/imageSearch/lib/models/imageTagsModule.js +++ b/lib/services/imageSearch/lib/models/imageTagsModule.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines the characteristics of content found in an image. * @@ -19,10 +17,10 @@ const models = require('./index'); class ImageTagsModule { /** * Create a ImageTagsModule. - * @member {array} value A list of tags that describe the characteristics of - * the content found in the image. For example, if the image is of a musical - * artist, the list might include Female, Dress, and Music to indicate the - * person is female music artist that's wearing a dress. + * @property {array} value A list of tags that describe the characteristics + * of the content found in the image. For example, if the image is of a + * musical artist, the list might include Female, Dress, and Music to + * indicate the person is female music artist that's wearing a dress. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/images.js b/lib/services/imageSearch/lib/models/images.js index 8811ec41ff..c2797b586a 100644 --- a/lib/services/imageSearch/lib/models/images.js +++ b/lib/services/imageSearch/lib/models/images.js @@ -20,21 +20,21 @@ const models = require('./index'); class Images extends models['SearchResultsAnswer'] { /** * Create a Images. - * @member {number} [nextOffset] Used as part of deduping. Tells client the + * @property {number} [nextOffset] Used as part of deduping. Tells client the * next offset that client should use in the next pagination request - * @member {array} value A list of image objects that are relevant to the + * @property {array} value A list of image objects that are relevant to the * query. If there are no results, the List is empty. - * @member {array} [queryExpansions] A list of expanded queries that narrows - * the original query. For example, if the query was Microsoft Surface, the - * expanded queries might be: Microsoft Surface Pro 3, Microsoft Surface RT, - * Microsoft Surface Phone, and Microsoft Surface Hub. - * @member {array} [pivotSuggestions] A list of segments in the original + * @property {array} [queryExpansions] A list of expanded queries that + * narrows the original query. For example, if the query was Microsoft + * Surface, the expanded queries might be: Microsoft Surface Pro 3, Microsoft + * Surface RT, Microsoft Surface Phone, and Microsoft Surface Hub. + * @property {array} [pivotSuggestions] A list of segments in the original * query. For example, if the query was Red Flowers, Bing might segment the * query into Red and Flowers. The Flowers pivot may contain query * suggestions such as Red Peonies and Red Daisies, and the Red pivot may * contain query suggestions such as Green Flowers and Yellow Flowers. - * @member {array} [similarTerms] A list of terms that are similar in meaning - * to the user's query term. + * @property {array} [similarTerms] A list of terms that are similar in + * meaning to the user's query term. */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/imagesImageMetadata.js b/lib/services/imageSearch/lib/models/imagesImageMetadata.js index 76fb1f6b0d..e6bdf5d624 100644 --- a/lib/services/imageSearch/lib/models/imagesImageMetadata.js +++ b/lib/services/imageSearch/lib/models/imagesImageMetadata.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines a count of the number of websites where you can shop or perform * other actions related to the image. @@ -20,16 +18,16 @@ const models = require('./index'); class ImagesImageMetadata { /** * Create a ImagesImageMetadata. - * @member {number} [shoppingSourcesCount] The number of websites that offer - * goods of the products seen in the image. - * @member {number} [recipeSourcesCount] The number of websites that offer + * @property {number} [shoppingSourcesCount] The number of websites that + * offer goods of the products seen in the image. + * @property {number} [recipeSourcesCount] The number of websites that offer * recipes of the food seen in the image. - * @member {object} [aggregateOffer] A summary of the online offers of + * @property {object} [aggregateOffer] A summary of the online offers of * products found in the image. For example, if the image is of a dress, the * offer might identify the lowest price and the number of offers found. Only * visually similar products insights include this field. The offer includes * the following fields: Name, AggregateRating, OfferCount, and LowPrice. - * @member {array} [aggregateOffer.offers] A list of offers from merchants + * @property {array} [aggregateOffer.offers] A list of offers from merchants * that have offerings related to the image. */ constructor() { diff --git a/lib/services/imageSearch/lib/models/imagesModule.js b/lib/services/imageSearch/lib/models/imagesModule.js index 145cb925c0..8e14996955 100644 --- a/lib/services/imageSearch/lib/models/imagesModule.js +++ b/lib/services/imageSearch/lib/models/imagesModule.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines a list of images. * @@ -19,7 +17,7 @@ const models = require('./index'); class ImagesModule { /** * Create a ImagesModule. - * @member {array} [value] A list of images. + * @property {array} [value] A list of images. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/index.d.ts b/lib/services/imageSearch/lib/models/index.d.ts index 5cc18c55cc..2f2a660c5d 100644 --- a/lib/services/imageSearch/lib/models/index.d.ts +++ b/lib/services/imageSearch/lib/models/index.d.ts @@ -1,1103 +1,796 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as moment from "moment"; - /** - * @class - * Initializes a new instance of the ResponseBase class. - * @constructor * Response base - * - * @member {string} _type Polymorphic Discriminator */ export interface ResponseBase { + /** + * Polymorphic Discriminator + */ _type: string; } /** - * @class - * Initializes a new instance of the Identifiable class. - * @constructor * Defines the identity of a resource. - * - * @member {string} [id] A String identifier. */ export interface Identifiable extends ResponseBase { + /** + * A String identifier. + */ readonly id?: string; } /** - * @class - * Initializes a new instance of the Response class. - * @constructor - * Defines a response. All schemas that could be returned at the root of a - * response should inherit from this - * - * @member {string} [readLink] The URL that returns this resource. - * @member {string} [webSearchUrl] The URL To Bing's search result for this - * item. + * Defines a response. All schemas that could be returned at the root of a response should inherit + * from this */ export interface Response extends Identifiable { + /** + * The URL that returns this resource. + */ readonly readLink?: string; + /** + * The URL To Bing's search result for this item. + */ readonly webSearchUrl?: string; } /** - * @class - * Initializes a new instance of the Thing class. - * @constructor * Defines a thing. - * - * @member {string} [name] The name of the thing represented by this object. - * @member {string} [url] The URL to get more information about the thing - * represented by this object. - * @member {object} [image] An image of the item. - * @member {object} [image.thumbnail] The URL to a thumbnail of the image - * @member {string} [image.imageInsightsToken] The token that you use in a - * subsequent call to the Image Search API to get additional information about - * the image. For information about using this token, see the insightsToken - * query parameter. - * @member {object} [image.insightsMetadata] A count of the number of websites - * where you can shop or perform other actions related to the image. For - * example, if the image is of an apple pie, this object includes a count of - * the number of websites where you can buy an apple pie. To indicate the - * number of offers in your UX, include badging such as a shopping cart icon - * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [image.insightsMetadata.shoppingSourcesCount] The number of - * websites that offer goods of the products seen in the image. - * @member {number} [image.insightsMetadata.recipeSourcesCount] The number of - * websites that offer recipes of the food seen in the image. - * @member {object} [image.insightsMetadata.aggregateOffer] A summary of the - * online offers of products found in the image. For example, if the image is - * of a dress, the offer might identify the lowest price and the number of - * offers found. Only visually similar products insights include this field. - * The offer includes the following fields: Name, AggregateRating, OfferCount, - * and LowPrice. - * @member {array} [image.insightsMetadata.aggregateOffer.offers] A list of - * offers from merchants that have offerings related to the image. - * @member {string} [image.imageId] Unique Id for the image - * @member {string} [image.accentColor] A three-byte hexadecimal number that - * represents the color that dominates the image. Use the color as the - * temporary background in your client until the image is loaded. - * @member {string} [image.visualWords] Visual representation of the image. - * Used for getting more sizes - * @member {string} [description] A short description of the item. - * @member {string} [alternateName] An alias for the item - * @member {string} [bingId] An ID that uniquely identifies this item. */ export interface Thing extends Response { + /** + * The name of the thing represented by this object. + */ readonly name?: string; + /** + * The URL to get more information about the thing represented by this object. + */ readonly url?: string; + /** + * An image of the item. + */ readonly image?: ImageObject; + /** + * A short description of the item. + */ readonly description?: string; + /** + * An alias for the item + */ readonly alternateName?: string; + /** + * An ID that uniquely identifies this item. + */ readonly bingId?: string; } /** - * @class - * Initializes a new instance of the Organization class. - * @constructor * Defines an organization. - * */ export interface Organization extends Thing { } /** - * @class - * Initializes a new instance of the PropertiesItem class. - * @constructor * Defines an item. - * - * @member {string} [text] Text representation of an item. - * @member {string} _type Polymorphic Discriminator */ export interface PropertiesItem { + /** + * Text representation of an item. + */ readonly text?: string; + /** + * Polymorphic Discriminator + */ _type: string; } /** - * @class - * Initializes a new instance of the Rating class. - * @constructor * Defines a rating. - * - * @member {number} ratingValue The mean (average) rating. The possible values - * are 1.0 through 5.0. - * @member {number} [bestRating] The highest rated review. The possible values - * are 1.0 through 5.0. */ export interface Rating extends PropertiesItem { + /** + * The mean (average) rating. The possible values are 1.0 through 5.0. + */ ratingValue: number; + /** + * The highest rated review. The possible values are 1.0 through 5.0. + */ readonly bestRating?: number; } /** - * @class - * Initializes a new instance of the AggregateRating class. - * @constructor * Defines the metrics that indicate how well an item was rated by others. - * - * @member {number} [reviewCount] The number of times the recipe has been rated - * or reviewed. */ export interface AggregateRating extends Rating { + /** + * The number of times the recipe has been rated or reviewed. + */ readonly reviewCount?: number; } /** - * @class - * Initializes a new instance of the Offer class. - * @constructor * Defines a merchant's offer. - * - * @member {object} [seller] Seller for this offer - * @member {number} [price] The item's price. - * @member {string} [priceCurrency] The monetary currency. For example, USD. - * Possible values include: 'USD', 'CAD', 'GBP', 'EUR', 'COP', 'JPY', 'CNY', - * 'AUD', 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AWG', 'AZN', - * 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', 'BRL', - * 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', 'CHF', 'CHW', 'CLF', 'CLP', - * 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', - * 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', - * 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', 'ILS', 'IQD', 'IRR', 'ISK', 'JMD', - * 'JOD', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', - * 'LBP', 'LKR', 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', - * 'MOP', 'MRO', 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', - * 'NIO', 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', - * 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', - * 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', 'SZL', 'THB', 'TJS', - * 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', 'UYU', 'UZS', - * 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', 'YER', 'ZAR', 'ZMW'. - * Default value: 'USD' . - * @member {string} [availability] The item's availability. The following are - * the possible values: Discontinued, InStock, InStoreOnly, - * LimitedAvailability, OnlineOnly, OutOfStock, PreOrder, SoldOut. Possible - * values include: 'Discontinued', 'InStock', 'InStoreOnly', - * 'LimitedAvailability', 'OnlineOnly', 'OutOfStock', 'PreOrder', 'SoldOut' - * @member {object} [aggregateRating] An aggregated rating that indicates how - * well the product has been rated by others. - * @member {number} [aggregateRating.reviewCount] The number of times the - * recipe has been rated or reviewed. - * @member {string} [lastUpdated] The last date that the offer was updated. The - * date is in the form YYYY-MM-DD. */ export interface Offer extends Thing { + /** + * Seller for this offer + */ readonly seller?: Organization; + /** + * The item's price. + */ readonly price?: number; + /** + * The monetary currency. For example, USD. Possible values include: 'USD', 'CAD', 'GBP', 'EUR', + * 'COP', 'JPY', 'CNY', 'AUD', 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AWG', + * 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', 'BRL', 'BSD', + * 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', 'CHF', 'CHW', 'CLF', 'CLP', 'COU', 'CRC', 'CUC', + * 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', + * 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', 'ILS', + * 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', + * 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', + * 'MOP', 'MRO', 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', + * 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RSD', + * 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', + * 'STD', 'SYP', 'SZL', 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', + * 'UGX', 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', 'YER', 'ZAR', + * 'ZMW' + */ readonly priceCurrency?: string; + /** + * The item's availability. The following are the possible values: Discontinued, InStock, + * InStoreOnly, LimitedAvailability, OnlineOnly, OutOfStock, PreOrder, SoldOut. Possible values + * include: 'Discontinued', 'InStock', 'InStoreOnly', 'LimitedAvailability', 'OnlineOnly', + * 'OutOfStock', 'PreOrder', 'SoldOut' + */ readonly availability?: string; + /** + * An aggregated rating that indicates how well the product has been rated by others. + */ readonly aggregateRating?: AggregateRating; + /** + * The last date that the offer was updated. The date is in the form YYYY-MM-DD. + */ readonly lastUpdated?: string; } /** - * @class - * Initializes a new instance of the AggregateOffer class. - * @constructor * Defines a list of offers from merchants that are related to the image. - * - * @member {array} [offers] A list of offers from merchants that have offerings - * related to the image. */ export interface AggregateOffer extends Offer { + /** + * A list of offers from merchants that have offerings related to the image. + */ readonly offers?: Offer[]; } /** - * @class - * Initializes a new instance of the ImagesImageMetadata class. - * @constructor - * Defines a count of the number of websites where you can shop or perform - * other actions related to the image. - * - * @member {number} [shoppingSourcesCount] The number of websites that offer - * goods of the products seen in the image. - * @member {number} [recipeSourcesCount] The number of websites that offer - * recipes of the food seen in the image. - * @member {object} [aggregateOffer] A summary of the online offers of products - * found in the image. For example, if the image is of a dress, the offer might - * identify the lowest price and the number of offers found. Only visually - * similar products insights include this field. The offer includes the - * following fields: Name, AggregateRating, OfferCount, and LowPrice. - * @member {array} [aggregateOffer.offers] A list of offers from merchants that - * have offerings related to the image. + * Defines a count of the number of websites where you can shop or perform other actions related to + * the image. */ export interface ImagesImageMetadata { + /** + * The number of websites that offer goods of the products seen in the image. + */ readonly shoppingSourcesCount?: number; + /** + * The number of websites that offer recipes of the food seen in the image. + */ readonly recipeSourcesCount?: number; + /** + * A summary of the online offers of products found in the image. For example, if the image is of + * a dress, the offer might identify the lowest price and the number of offers found. Only + * visually similar products insights include this field. The offer includes the following + * fields: Name, AggregateRating, OfferCount, and LowPrice. + */ readonly aggregateOffer?: AggregateOffer; } /** - * @class - * Initializes a new instance of the CreativeWork class. - * @constructor - * The most generic kind of creative work, including books, movies, - * photographs, software programs, etc. - * - * @member {string} [thumbnailUrl] The URL to a thumbnail of the item. - * @member {array} [provider] The source of the creative work. - * @member {string} [datePublished] The date on which the CreativeWork was - * published. - * @member {string} [text] Text content of this creative work + * The most generic kind of creative work, including books, movies, photographs, software programs, + * etc. */ export interface CreativeWork extends Thing { + /** + * The URL to a thumbnail of the item. + */ readonly thumbnailUrl?: string; + /** + * The source of the creative work. + */ readonly provider?: Thing[]; + /** + * The date on which the CreativeWork was published. + */ readonly datePublished?: string; + /** + * Text content of this creative work + */ readonly text?: string; } /** - * @class - * Initializes a new instance of the MediaObject class. - * @constructor * Defines a media object. - * - * @member {string} [contentUrl] Original URL to retrieve the source (file) for - * the media object (e.g the source URL for the image). - * @member {string} [hostPageUrl] URL of the page that hosts the media object. - * @member {string} [contentSize] Size of the media object content (use format - * "value unit" e.g "1024 B"). - * @member {string} [encodingFormat] Encoding format (e.g mp3, mp4, jpeg, etc). - * @member {string} [hostPageDisplayUrl] Display URL of the page that hosts the - * media object. - * @member {number} [width] The width of the source media object, in pixels. - * @member {number} [height] The height of the source media object, in pixels. */ export interface MediaObject extends CreativeWork { + /** + * Original URL to retrieve the source (file) for the media object (e.g the source URL for the + * image). + */ readonly contentUrl?: string; + /** + * URL of the page that hosts the media object. + */ readonly hostPageUrl?: string; + /** + * Size of the media object content (use format "value unit" e.g "1024 B"). + */ readonly contentSize?: string; + /** + * Encoding format (e.g mp3, mp4, jpeg, etc). + */ readonly encodingFormat?: string; + /** + * Display URL of the page that hosts the media object. + */ readonly hostPageDisplayUrl?: string; + /** + * The width of the source media object, in pixels. + */ readonly width?: number; + /** + * The height of the source media object, in pixels. + */ readonly height?: number; } /** - * @class - * Initializes a new instance of the ImageObject class. - * @constructor * Defines an image - * - * @member {object} [thumbnail] The URL to a thumbnail of the image - * @member {string} [imageInsightsToken] The token that you use in a subsequent - * call to the Image Search API to get additional information about the image. - * For information about using this token, see the insightsToken query - * parameter. - * @member {object} [insightsMetadata] A count of the number of websites where - * you can shop or perform other actions related to the image. For example, if - * the image is of an apple pie, this object includes a count of the number of - * websites where you can buy an apple pie. To indicate the number of offers in - * your UX, include badging such as a shopping cart icon that contains the - * count. When the user clicks on the icon, use imageInisghtsToken to get the - * list of websites. - * @member {number} [insightsMetadata.shoppingSourcesCount] The number of - * websites that offer goods of the products seen in the image. - * @member {number} [insightsMetadata.recipeSourcesCount] The number of - * websites that offer recipes of the food seen in the image. - * @member {object} [insightsMetadata.aggregateOffer] A summary of the online - * offers of products found in the image. For example, if the image is of a - * dress, the offer might identify the lowest price and the number of offers - * found. Only visually similar products insights include this field. The offer - * includes the following fields: Name, AggregateRating, OfferCount, and - * LowPrice. - * @member {array} [insightsMetadata.aggregateOffer.offers] A list of offers - * from merchants that have offerings related to the image. - * @member {string} [imageId] Unique Id for the image - * @member {string} [accentColor] A three-byte hexadecimal number that - * represents the color that dominates the image. Use the color as the - * temporary background in your client until the image is loaded. - * @member {string} [visualWords] Visual representation of the image. Used for - * getting more sizes */ export interface ImageObject extends MediaObject { + /** + * The URL to a thumbnail of the image + */ readonly thumbnail?: ImageObject; + /** + * The token that you use in a subsequent call to the Image Search API to get additional + * information about the image. For information about using this token, see the insightsToken + * query parameter. + */ readonly imageInsightsToken?: string; + /** + * A count of the number of websites where you can shop or perform other actions related to the + * image. For example, if the image is of an apple pie, this object includes a count of the + * number of websites where you can buy an apple pie. To indicate the number of offers in your + * UX, include badging such as a shopping cart icon that contains the count. When the user clicks + * on the icon, use imageInsightsToken to get the list of websites. + */ readonly insightsMetadata?: ImagesImageMetadata; + /** + * Unique Id for the image + */ readonly imageId?: string; + /** + * A three-byte hexadecimal number that represents the color that dominates the image. Use the + * color as the temporary background in your client until the image is loaded. + */ readonly accentColor?: string; + /** + * Visual representation of the image. Used for getting more sizes + */ readonly visualWords?: string; } /** - * @class - * Initializes a new instance of the Query class. - * @constructor * Defines a search query. - * - * @member {string} text The query string. Use this string as the query term in - * a new search request. - * @member {string} [displayText] The display version of the query term. This - * version of the query term may contain special characters that highlight the - * search term found in the query string. The string contains the highlighting - * characters only if the query enabled hit highlighting - * @member {string} [webSearchUrl] The URL that takes the user to the Bing - * search results page for the query.Only related search results include this - * field. - * @member {string} [searchLink] The URL that you use to get the results of the - * related search. Before using the URL, you must append query parameters as - * appropriate and include the Ocp-Apim-Subscription-Key header. Use this URL - * if you're displaying the results in your own user interface. Otherwise, use - * the webSearchUrl URL. - * @member {object} [thumbnail] The URL to a thumbnail of a related image. - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the image - * @member {string} [thumbnail.imageInsightsToken] The token that you use in a - * subsequent call to the Image Search API to get additional information about - * the image. For information about using this token, see the insightsToken - * query parameter. - * @member {object} [thumbnail.insightsMetadata] A count of the number of - * websites where you can shop or perform other actions related to the image. - * For example, if the image is of an apple pie, this object includes a count - * of the number of websites where you can buy an apple pie. To indicate the - * number of offers in your UX, include badging such as a shopping cart icon - * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [thumbnail.insightsMetadata.shoppingSourcesCount] The - * number of websites that offer goods of the products seen in the image. - * @member {number} [thumbnail.insightsMetadata.recipeSourcesCount] The number - * of websites that offer recipes of the food seen in the image. - * @member {object} [thumbnail.insightsMetadata.aggregateOffer] A summary of - * the online offers of products found in the image. For example, if the image - * is of a dress, the offer might identify the lowest price and the number of - * offers found. Only visually similar products insights include this field. - * The offer includes the following fields: Name, AggregateRating, OfferCount, - * and LowPrice. - * @member {array} [thumbnail.insightsMetadata.aggregateOffer.offers] A list of - * offers from merchants that have offerings related to the image. - * @member {string} [thumbnail.imageId] Unique Id for the image - * @member {string} [thumbnail.accentColor] A three-byte hexadecimal number - * that represents the color that dominates the image. Use the color as the - * temporary background in your client until the image is loaded. - * @member {string} [thumbnail.visualWords] Visual representation of the image. - * Used for getting more sizes */ export interface Query { + /** + * The query string. Use this string as the query term in a new search request. + */ text: string; + /** + * The display version of the query term. This version of the query term may contain special + * characters that highlight the search term found in the query string. The string contains the + * highlighting characters only if the query enabled hit highlighting + */ readonly displayText?: string; + /** + * The URL that takes the user to the Bing search results page for the query.Only related search + * results include this field. + */ readonly webSearchUrl?: string; + /** + * The URL that you use to get the results of the related search. Before using the URL, you must + * append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header. Use + * this URL if you're displaying the results in your own user interface. Otherwise, use the + * webSearchUrl URL. + */ readonly searchLink?: string; + /** + * The URL to a thumbnail of a related image. + */ readonly thumbnail?: ImageObject; } /** - * @class - * Initializes a new instance of the PivotSuggestions class. - * @constructor * Defines the pivot segment. - * - * @member {string} pivot The segment from the original query to pivot on. - * @member {array} suggestions A list of suggested queries for the pivot. */ export interface PivotSuggestions { + /** + * The segment from the original query to pivot on. + */ pivot: string; + /** + * A list of suggested queries for the pivot. + */ suggestions: Query[]; } /** - * @class - * Initializes a new instance of the Answer class. - * @constructor * Defines an answer. - * */ export interface Answer extends Response { } /** - * @class - * Initializes a new instance of the SearchResultsAnswer class. - * @constructor * Defines a search result answer. - * - * @member {number} [totalEstimatedMatches] The estimated number of webpages - * that are relevant to the query. Use this number along with the count and - * offset query parameters to page the results. */ export interface SearchResultsAnswer extends Answer { + /** + * The estimated number of webpages that are relevant to the query. Use this number along with + * the count and offset query parameters to page the results. + */ readonly totalEstimatedMatches?: number; } /** - * @class - * Initializes a new instance of the Images class. - * @constructor * Defines an image answer - * - * @member {number} [nextOffset] Used as part of deduping. Tells client the - * next offset that client should use in the next pagination request - * @member {array} value A list of image objects that are relevant to the - * query. If there are no results, the List is empty. - * @member {array} [queryExpansions] A list of expanded queries that narrows - * the original query. For example, if the query was Microsoft Surface, the - * expanded queries might be: Microsoft Surface Pro 3, Microsoft Surface RT, - * Microsoft Surface Phone, and Microsoft Surface Hub. - * @member {array} [pivotSuggestions] A list of segments in the original query. - * For example, if the query was Red Flowers, Bing might segment the query into - * Red and Flowers. The Flowers pivot may contain query suggestions such as Red - * Peonies and Red Daisies, and the Red pivot may contain query suggestions - * such as Green Flowers and Yellow Flowers. - * @member {array} [similarTerms] A list of terms that are similar in meaning - * to the user's query term. */ export interface Images extends SearchResultsAnswer { + /** + * Used as part of deduping. Tells client the next offset that client should use in the next + * pagination request + */ readonly nextOffset?: number; + /** + * A list of image objects that are relevant to the query. If there are no results, the List is + * empty. + */ value: ImageObject[]; + /** + * A list of expanded queries that narrows the original query. For example, if the query was + * Microsoft Surface, the expanded queries might be: Microsoft Surface Pro 3, Microsoft Surface + * RT, Microsoft Surface Phone, and Microsoft Surface Hub. + */ readonly queryExpansions?: Query[]; + /** + * A list of segments in the original query. For example, if the query was Red Flowers, Bing + * might segment the query into Red and Flowers. The Flowers pivot may contain query suggestions + * such as Red Peonies and Red Daisies, and the Red pivot may contain query suggestions such as + * Green Flowers and Yellow Flowers. + */ readonly pivotSuggestions?: PivotSuggestions[]; + /** + * A list of terms that are similar in meaning to the user's query term. + */ readonly similarTerms?: Query[]; } /** - * @class - * Initializes a new instance of the ErrorModel class. - * @constructor * Defines the error that occurred. - * - * @member {string} code The error code that identifies the category of error. - * Possible values include: 'None', 'ServerError', 'InvalidRequest', - * 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. - * Default value: 'None' . - * @member {string} [subCode] The error code that further helps to identify the - * error. Possible values include: 'UnexpectedError', 'ResourceError', - * 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', - * 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', - * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' - * @member {string} message A description of the error. - * @member {string} [moreDetails] A description that provides additional - * information about the error. - * @member {string} [parameter] The parameter in the request that caused the - * error. - * @member {string} [value] The parameter's value in the request that was not - * valid. */ export interface ErrorModel { + /** + * The error code that identifies the category of error. Possible values include: 'None', + * 'ServerError', 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization', + * 'InsufficientAuthorization' + */ code: string; + /** + * The error code that further helps to identify the error. Possible values include: + * 'UnexpectedError', 'ResourceError', 'NotImplemented', 'ParameterMissing', + * 'ParameterInvalidValue', 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', + * 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' + */ readonly subCode?: string; + /** + * A description of the error. + */ message: string; + /** + * A description that provides additional information about the error. + */ readonly moreDetails?: string; + /** + * The parameter in the request that caused the error. + */ readonly parameter?: string; + /** + * The parameter's value in the request that was not valid. + */ readonly value?: string; } /** - * @class - * Initializes a new instance of the ErrorResponse class. - * @constructor * The top-level response that represents a failed request. - * - * @member {array} errors A list of errors that describe the reasons why the - * request failed. */ export interface ErrorResponse extends Response { + /** + * A list of errors that describe the reasons why the request failed. + */ errors: ErrorModel[]; } /** - * @class - * Initializes a new instance of the ImageInsightsImageCaption class. - * @constructor * Defines an image's caption. - * - * @member {string} caption A caption about the image. - * @member {string} dataSourceUrl The URL to the website where the caption was - * found. You must attribute the caption to the source. For example, by - * displaying the domain name from the URL next to the caption and using the - * URL to link to the source website. - * @member {array} relatedSearches A list of entities found in the caption. Use - * the contents of the Query object to find the entity in the caption and - * create a link. The link takes the user to images of the entity. */ export interface ImageInsightsImageCaption { + /** + * A caption about the image. + */ caption: string; + /** + * The URL to the website where the caption was found. You must attribute the caption to the + * source. For example, by displaying the domain name from the URL next to the caption and using + * the URL to link to the source website. + */ dataSourceUrl: string; + /** + * A list of entities found in the caption. Use the contents of the Query object to find the + * entity in the caption and create a link. The link takes the user to images of the entity. + */ relatedSearches: Query[]; } /** - * @class - * Initializes a new instance of the WebPage class. - * @constructor * Defines a webpage that is relevant to the query. - * */ export interface WebPage extends CreativeWork { } /** - * @class - * Initializes a new instance of the CollectionPage class. - * @constructor * Defines a link to a webpage that contains a collection. - * */ export interface CollectionPage extends WebPage { } /** - * @class - * Initializes a new instance of the ImageGallery class. - * @constructor * Defines a link to a webpage that contains a collection of related images. - * - * @member {string} [source] The publisher or social network where the images - * were found. You must attribute the publisher as the source where the - * collection was found. - * @member {number} [imagesCount] The number of related images found in the - * collection. - * @member {number} [followersCount] The number of users on the social network - * that follow the creator. */ export interface ImageGallery extends CollectionPage { + /** + * The publisher or social network where the images were found. You must attribute the publisher + * as the source where the collection was found. + */ readonly source?: string; + /** + * The number of related images found in the collection. + */ readonly imagesCount?: number; + /** + * The number of users on the social network that follow the creator. + */ readonly followersCount?: number; } /** - * @class - * Initializes a new instance of the RelatedCollectionsModule class. - * @constructor * Defines a list of webpages that contain related images. - * - * @member {array} [value] A list of webpages that contain related images. */ export interface RelatedCollectionsModule { + /** + * A list of webpages that contain related images. + */ readonly value?: ImageGallery[]; } /** - * @class - * Initializes a new instance of the ImagesModule class. - * @constructor * Defines a list of images. - * - * @member {array} [value] A list of images. */ export interface ImagesModule { + /** + * A list of images. + */ readonly value?: ImageObject[]; } /** - * @class - * Initializes a new instance of the RelatedSearchesModule class. - * @constructor * Defines a list of related searches. - * - * @member {array} [value] A list of related searches. */ export interface RelatedSearchesModule { + /** + * A list of related searches. + */ readonly value?: Query[]; } /** - * @class - * Initializes a new instance of the Recipe class. - * @constructor * Defines a cooking recipe. - * - * @member {string} [cookTime] The amount of time the food takes to cook. For - * example, PT25M. For information about the time format, see - * http://en.wikipedia.org/wiki/ISO_8601#Durations. - * @member {string} [prepTime] The amount of time required to prepare the - * ingredients. For example, PT15M. For information about the time format, see - * http://en.wikipedia.org/wiki/ISO_8601#Durations. - * @member {string} [totalTime] The total amount of time it takes to prepare - * and cook the recipe. For example, PT45M. For information about the time - * format, see http://en.wikipedia.org/wiki/ISO_8601#Durations. */ export interface Recipe extends CreativeWork { + /** + * The amount of time the food takes to cook. For example, PT25M. For information about the time + * format, see http://en.wikipedia.org/wiki/ISO_8601#Durations. + */ readonly cookTime?: string; + /** + * The amount of time required to prepare the ingredients. For example, PT15M. For information + * about the time format, see http://en.wikipedia.org/wiki/ISO_8601#Durations. + */ readonly prepTime?: string; + /** + * The total amount of time it takes to prepare and cook the recipe. For example, PT45M. For + * information about the time format, see http://en.wikipedia.org/wiki/ISO_8601#Durations. + */ readonly totalTime?: string; } /** - * @class - * Initializes a new instance of the RecipesModule class. - * @constructor * Defines a list of recipes. - * - * @member {array} [value] A list of recipes. */ export interface RecipesModule { + /** + * A list of recipes. + */ readonly value?: Recipe[]; } /** - * @class - * Initializes a new instance of the Intangible class. - * @constructor - * A utility class that serves as the umbrella for a number of 'intangible' - * things such as quantities, structured values, etc. - * + * A utility class that serves as the umbrella for a number of 'intangible' things such as + * quantities, structured values, etc. */ export interface Intangible extends Thing { } -/** - * @class - * Initializes a new instance of the StructuredValue class. - * @constructor - */ export interface StructuredValue extends Intangible { } /** - * @class - * Initializes a new instance of the NormalizedRectangle class. - * @constructor - * Defines a region of an image. The region is defined by the coordinates of - * the top, left corner and bottom, right corner of the region. The coordinates - * are fractional values of the original image's width and height in the range - * 0.0 through 1.0. - * - * @member {number} left The left coordinate. - * @member {number} top The top coordinate - * @member {number} right The right coordinate - * @member {number} bottom The bottom coordinate - */ + * Defines a region of an image. The region is defined by the coordinates of the top, left corner + * and bottom, right corner of the region. The coordinates are fractional values of the original + * image's width and height in the range 0.0 through 1.0. +*/ export interface NormalizedRectangle extends StructuredValue { + /** + * The left coordinate. + */ left: number; + /** + * The top coordinate + */ top: number; + /** + * The right coordinate + */ right: number; + /** + * The bottom coordinate + */ bottom: number; } /** - * @class - * Initializes a new instance of the RecognizedEntity class. - * @constructor * Defines a recognized entity. - * - * @member {object} [entity] The entity that was recognized. The following are - * the possible entity objects: Person - * @member {string} [entity.name] The name of the thing represented by this - * object. - * @member {string} [entity.url] The URL to get more information about the - * thing represented by this object. - * @member {object} [entity.image] An image of the item. - * @member {object} [entity.image.thumbnail] The URL to a thumbnail of the - * image - * @member {string} [entity.image.imageInsightsToken] The token that you use in - * a subsequent call to the Image Search API to get additional information - * about the image. For information about using this token, see the - * insightsToken query parameter. - * @member {object} [entity.image.insightsMetadata] A count of the number of - * websites where you can shop or perform other actions related to the image. - * For example, if the image is of an apple pie, this object includes a count - * of the number of websites where you can buy an apple pie. To indicate the - * number of offers in your UX, include badging such as a shopping cart icon - * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [entity.image.insightsMetadata.shoppingSourcesCount] The - * number of websites that offer goods of the products seen in the image. - * @member {number} [entity.image.insightsMetadata.recipeSourcesCount] The - * number of websites that offer recipes of the food seen in the image. - * @member {object} [entity.image.insightsMetadata.aggregateOffer] A summary of - * the online offers of products found in the image. For example, if the image - * is of a dress, the offer might identify the lowest price and the number of - * offers found. Only visually similar products insights include this field. - * The offer includes the following fields: Name, AggregateRating, OfferCount, - * and LowPrice. - * @member {array} [entity.image.insightsMetadata.aggregateOffer.offers] A list - * of offers from merchants that have offerings related to the image. - * @member {string} [entity.image.imageId] Unique Id for the image - * @member {string} [entity.image.accentColor] A three-byte hexadecimal number - * that represents the color that dominates the image. Use the color as the - * temporary background in your client until the image is loaded. - * @member {string} [entity.image.visualWords] Visual representation of the - * image. Used for getting more sizes - * @member {string} [entity.description] A short description of the item. - * @member {string} [entity.alternateName] An alias for the item - * @member {string} [entity.bingId] An ID that uniquely identifies this item. - * @member {number} [matchConfidence] The confidence that Bing has that the - * entity in the image matches this entity. The confidence ranges from 0.0 - * through 1.0 with 1.0 being very confident. - */ +*/ export interface RecognizedEntity extends Response { + /** + * The entity that was recognized. The following are the possible entity objects: Person + */ readonly entity?: Thing; + /** + * The confidence that Bing has that the entity in the image matches this entity. The confidence + * ranges from 0.0 through 1.0 with 1.0 being very confident. + */ readonly matchConfidence?: number; } /** - * @class - * Initializes a new instance of the RecognizedEntityRegion class. - * @constructor - * Defines a region of the image where an entity was found and a list of - * entities that might match it. - * - * @member {object} [region] A region of the image that contains an entity. The - * values of the rectangle are relative to the width and height of the original - * image and are in the range 0.0 through 1.0. For example, if the image is - * 300x200 and the region's top, left corner is at point (10, 20) and the - * bottom, right corner is at point (290, 150), then the normalized rectangle - * is: Left = 0.0333333333333333, Top = 0.1, Right = 0.9666666666666667, Bottom - * = 0.75. For people, the region represents the person's face. - * @member {number} [region.left] The left coordinate. - * @member {number} [region.top] The top coordinate - * @member {number} [region.right] The right coordinate - * @member {number} [region.bottom] The bottom coordinate - * @member {array} [matchingEntities] A list of entities that Bing believes - * match the entity found in the region. The entities are in descending order - * of confidence (see the matchConfidence field of RecognizedEntity). - */ + * Defines a region of the image where an entity was found and a list of entities that might match + * it. +*/ export interface RecognizedEntityRegion extends Response { + /** + * A region of the image that contains an entity. The values of the rectangle are relative to the + * width and height of the original image and are in the range 0.0 through 1.0. For example, if + * the image is 300x200 and the region's top, left corner is at point (10, 20) and the bottom, + * right corner is at point (290, 150), then the normalized rectangle is: Left = + * 0.0333333333333333, Top = 0.1, Right = 0.9666666666666667, Bottom = 0.75. For people, the + * region represents the person's face. + */ readonly region?: NormalizedRectangle; + /** + * A list of entities that Bing believes match the entity found in the region. The entities are + * in descending order of confidence (see the matchConfidence field of RecognizedEntity). + */ readonly matchingEntities?: RecognizedEntity[]; } /** - * @class - * Initializes a new instance of the RecognizedEntityGroup class. - * @constructor * Defines a group of previously recognized entities. - * - * @member {array} recognizedEntityRegions The regions of the image that - * contain entities. - * @member {string} name The name of the group where images of the entity were - * also found. The following are possible groups. CelebRecognitionAnnotations: - * Similar to CelebrityAnnotations but provides a higher probability of an - * accurate match. CelebrityAnnotations: Contains celebrities such as actors, - * politicians, athletes, and historical figures. - */ +*/ export interface RecognizedEntityGroup { + /** + * The regions of the image that contain entities. + */ recognizedEntityRegions: RecognizedEntityRegion[]; + /** + * The name of the group where images of the entity were also found. The following are possible + * groups. CelebRecognitionAnnotations: Similar to CelebrityAnnotations but provides a higher + * probability of an accurate match. CelebrityAnnotations: Contains celebrities such as actors, + * politicians, athletes, and historical figures. + */ name: string; } /** - * @class - * Initializes a new instance of the RecognizedEntitiesModule class. - * @constructor * Defines a list of previously recognized entities. - * - * @member {array} [value] A list of recognized entities. - */ +*/ export interface RecognizedEntitiesModule { + /** + * A list of recognized entities. + */ readonly value?: RecognizedEntityGroup[]; } /** - * @class - * Initializes a new instance of the InsightsTag class. - * @constructor * Defines a characteristic of the content found in the image. - * - * @member {string} [name] The name of the characteristic. For example, cat, - * kitty, calico cat. - */ +*/ export interface InsightsTag { + /** + * The name of the characteristic. For example, cat, kitty, calico cat. + */ readonly name?: string; } /** - * @class - * Initializes a new instance of the ImageTagsModule class. - * @constructor * Defines the characteristics of content found in an image. - * - * @member {array} value A list of tags that describe the characteristics of - * the content found in the image. For example, if the image is of a musical - * artist, the list might include Female, Dress, and Music to indicate the - * person is female music artist that's wearing a dress. - */ +*/ export interface ImageTagsModule { + /** + * A list of tags that describe the characteristics of the content found in the image. For + * example, if the image is of a musical artist, the list might include Female, Dress, and Music + * to indicate the person is female music artist that's wearing a dress. + */ value: InsightsTag[]; } /** - * @class - * Initializes a new instance of the ImageInsights class. - * @constructor - * The top-level object that the response includes when an image insights - * request succeeds. For information about requesting image insights, see the + * The top-level object that the response includes when an image insights request succeeds. For + * information about requesting image insights, see the * [insightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#insightstoken) - * query parameter. The modules query parameter affects the fields that Bing - * includes in the response. If you set + * query parameter. The modules query parameter affects the fields that Bing includes in the + * response. If you set * [modules](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#modulesrequested) * to only Caption, then this object includes only the imageCaption field. - * - * @member {string} [imageInsightsToken] A token that you use in a subsequent - * call to the Image Search API to get more information about the image. For - * information about using this token, see the insightsToken query parameter. - * This token has the same usage as the token in the Image object. - * @member {object} [bestRepresentativeQuery] The query term that best - * represents the image. Clicking the link in the Query object, takes the user - * to a webpage with more pictures of the image. - * @member {string} [bestRepresentativeQuery.text] The query string. Use this - * string as the query term in a new search request. - * @member {string} [bestRepresentativeQuery.displayText] The display version - * of the query term. This version of the query term may contain special - * characters that highlight the search term found in the query string. The - * string contains the highlighting characters only if the query enabled hit - * highlighting - * @member {string} [bestRepresentativeQuery.webSearchUrl] The URL that takes - * the user to the Bing search results page for the query.Only related search - * results include this field. - * @member {string} [bestRepresentativeQuery.searchLink] The URL that you use - * to get the results of the related search. Before using the URL, you must - * append query parameters as appropriate and include the - * Ocp-Apim-Subscription-Key header. Use this URL if you're displaying the - * results in your own user interface. Otherwise, use the webSearchUrl URL. - * @member {object} [bestRepresentativeQuery.thumbnail] The URL to a thumbnail - * of a related image. - * @member {object} [bestRepresentativeQuery.thumbnail.thumbnail] The URL to a - * thumbnail of the image - * @member {string} [bestRepresentativeQuery.thumbnail.imageInsightsToken] The - * token that you use in a subsequent call to the Image Search API to get - * additional information about the image. For information about using this - * token, see the insightsToken query parameter. - * @member {object} [bestRepresentativeQuery.thumbnail.insightsMetadata] A - * count of the number of websites where you can shop or perform other actions - * related to the image. For example, if the image is of an apple pie, this - * object includes a count of the number of websites where you can buy an apple - * pie. To indicate the number of offers in your UX, include badging such as a - * shopping cart icon that contains the count. When the user clicks on the - * icon, use imageInisghtsToken to get the list of websites. - * @member {number} - * [bestRepresentativeQuery.thumbnail.insightsMetadata.shoppingSourcesCount] - * The number of websites that offer goods of the products seen in the image. - * @member {number} - * [bestRepresentativeQuery.thumbnail.insightsMetadata.recipeSourcesCount] The - * number of websites that offer recipes of the food seen in the image. - * @member {object} - * [bestRepresentativeQuery.thumbnail.insightsMetadata.aggregateOffer] A - * summary of the online offers of products found in the image. For example, if - * the image is of a dress, the offer might identify the lowest price and the - * number of offers found. Only visually similar products insights include this - * field. The offer includes the following fields: Name, AggregateRating, - * OfferCount, and LowPrice. - * @member {array} - * [bestRepresentativeQuery.thumbnail.insightsMetadata.aggregateOffer.offers] A - * list of offers from merchants that have offerings related to the image. - * @member {string} [bestRepresentativeQuery.thumbnail.imageId] Unique Id for - * the image - * @member {string} [bestRepresentativeQuery.thumbnail.accentColor] A - * three-byte hexadecimal number that represents the color that dominates the - * image. Use the color as the temporary background in your client until the - * image is loaded. - * @member {string} [bestRepresentativeQuery.thumbnail.visualWords] Visual - * representation of the image. Used for getting more sizes - * @member {object} [imageCaption] The caption to use for the image. - * @member {string} [imageCaption.caption] A caption about the image. - * @member {string} [imageCaption.dataSourceUrl] The URL to the website where - * the caption was found. You must attribute the caption to the source. For - * example, by displaying the domain name from the URL next to the caption and - * using the URL to link to the source website. - * @member {array} [imageCaption.relatedSearches] A list of entities found in - * the caption. Use the contents of the Query object to find the entity in the - * caption and create a link. The link takes the user to images of the entity. - * @member {object} [relatedCollections] A list of links to webpages that - * contain related images. - * @member {array} [relatedCollections.value] A list of webpages that contain - * related images. - * @member {object} [pagesIncluding] A list of webpages that contain the image. - * To access the webpage, use the URL in the image's hostPageUrl field. - * @member {array} [pagesIncluding.value] A list of images. - * @member {object} [shoppingSources] A list of merchants that offer items - * related to the image. For example, if the image is of an apple pie, the list - * contains merchants that are selling apple pies. - * @member {array} [shoppingSources.offers] A list of offers from merchants - * that have offerings related to the image. - * @member {object} [relatedSearches] A list of related queries made by others. - * @member {array} [relatedSearches.value] A list of related searches. - * @member {object} [recipes] A list of recipes related to the image. For - * example, if the image is of an apple pie, the list contains recipes for - * making an apple pie. - * @member {array} [recipes.value] A list of recipes. - * @member {object} [visuallySimilarImages] A list of images that are visually - * similar to the original image. For example, if the specified image is of a - * sunset over a body of water, the list of similar images are of a sunset over - * a body of water. If the specified image is of a person, similar images might - * be of the same person or they might be of persons dressed similarly or in a - * similar setting. The criteria for similarity continues to evolve. - * @member {array} [visuallySimilarImages.value] A list of images. - * @member {object} [visuallySimilarProducts] A list of images that contain - * products that are visually similar to products found in the original image. - * For example, if the specified image contains a dress, the list of similar - * images contain a dress. The image provides summary information about offers - * that Bing found online for the product. - * @member {array} [visuallySimilarProducts.value] A list of images. - * @member {object} [recognizedEntityGroups] A list of groups that contain - * images of entities that match the entity found in the specified image. For - * example, the response might include images from the general celebrity group - * if the entity was recognized in that group. - * @member {array} [recognizedEntityGroups.value] A list of recognized - * entities. - * @member {object} [imageTags] A list of characteristics of the content found - * in the image. For example, if the image is of a person, the tags might - * indicate the person's gender and the type of clothes they're wearing. - * @member {array} [imageTags.value] A list of tags that describe the - * characteristics of the content found in the image. For example, if the image - * is of a musical artist, the list might include Female, Dress, and Music to - * indicate the person is female music artist that's wearing a dress. - */ +*/ export interface ImageInsights extends Response { + /** + * A token that you use in a subsequent call to the Image Search API to get more information + * about the image. For information about using this token, see the insightsToken query + * parameter. This token has the same usage as the token in the Image object. + */ readonly imageInsightsToken?: string; + /** + * The query term that best represents the image. Clicking the link in the Query object, takes + * the user to a webpage with more pictures of the image. + */ readonly bestRepresentativeQuery?: Query; + /** + * The caption to use for the image. + */ readonly imageCaption?: ImageInsightsImageCaption; + /** + * A list of links to webpages that contain related images. + */ readonly relatedCollections?: RelatedCollectionsModule; + /** + * A list of webpages that contain the image. To access the webpage, use the URL in the image's + * hostPageUrl field. + */ readonly pagesIncluding?: ImagesModule; + /** + * A list of merchants that offer items related to the image. For example, if the image is of an + * apple pie, the list contains merchants that are selling apple pies. + */ readonly shoppingSources?: AggregateOffer; + /** + * A list of related queries made by others. + */ readonly relatedSearches?: RelatedSearchesModule; + /** + * A list of recipes related to the image. For example, if the image is of an apple pie, the list + * contains recipes for making an apple pie. + */ readonly recipes?: RecipesModule; + /** + * A list of images that are visually similar to the original image. For example, if the + * specified image is of a sunset over a body of water, the list of similar images are of a + * sunset over a body of water. If the specified image is of a person, similar images might be of + * the same person or they might be of persons dressed similarly or in a similar setting. The + * criteria for similarity continues to evolve. + */ readonly visuallySimilarImages?: ImagesModule; + /** + * A list of images that contain products that are visually similar to products found in the + * original image. For example, if the specified image contains a dress, the list of similar + * images contain a dress. The image provides summary information about offers that Bing found + * online for the product. + */ readonly visuallySimilarProducts?: ImagesModule; + /** + * A list of groups that contain images of entities that match the entity found in the specified + * image. For example, the response might include images from the general celebrity group if the + * entity was recognized in that group. + */ readonly recognizedEntityGroups?: RecognizedEntitiesModule; + /** + * A list of characteristics of the content found in the image. For example, if the image is of a + * person, the tags might indicate the person's gender and the type of clothes they're wearing. + */ readonly imageTags?: ImageTagsModule; } /** - * @class - * Initializes a new instance of the TrendingImagesTile class. - * @constructor * Defines an image tile. - * - * @member {object} query A query that returns a Bing search results page with - * more images of the subject. For example, if the category is Popular People - * Searches, then the thumbnail is of a popular person. The query would return - * a Bing search results page with more images of that person. - * @member {string} [query.text] The query string. Use this string as the query - * term in a new search request. - * @member {string} [query.displayText] The display version of the query term. - * This version of the query term may contain special characters that highlight - * the search term found in the query string. The string contains the - * highlighting characters only if the query enabled hit highlighting - * @member {string} [query.webSearchUrl] The URL that takes the user to the - * Bing search results page for the query.Only related search results include - * this field. - * @member {string} [query.searchLink] The URL that you use to get the results - * of the related search. Before using the URL, you must append query - * parameters as appropriate and include the Ocp-Apim-Subscription-Key header. - * Use this URL if you're displaying the results in your own user interface. - * Otherwise, use the webSearchUrl URL. - * @member {object} [query.thumbnail] The URL to a thumbnail of a related - * image. - * @member {object} [query.thumbnail.thumbnail] The URL to a thumbnail of the - * image - * @member {string} [query.thumbnail.imageInsightsToken] The token that you use - * in a subsequent call to the Image Search API to get additional information - * about the image. For information about using this token, see the - * insightsToken query parameter. - * @member {object} [query.thumbnail.insightsMetadata] A count of the number of - * websites where you can shop or perform other actions related to the image. - * For example, if the image is of an apple pie, this object includes a count - * of the number of websites where you can buy an apple pie. To indicate the - * number of offers in your UX, include badging such as a shopping cart icon - * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [query.thumbnail.insightsMetadata.shoppingSourcesCount] The - * number of websites that offer goods of the products seen in the image. - * @member {number} [query.thumbnail.insightsMetadata.recipeSourcesCount] The - * number of websites that offer recipes of the food seen in the image. - * @member {object} [query.thumbnail.insightsMetadata.aggregateOffer] A summary - * of the online offers of products found in the image. For example, if the - * image is of a dress, the offer might identify the lowest price and the - * number of offers found. Only visually similar products insights include this - * field. The offer includes the following fields: Name, AggregateRating, - * OfferCount, and LowPrice. - * @member {array} [query.thumbnail.insightsMetadata.aggregateOffer.offers] A - * list of offers from merchants that have offerings related to the image. - * @member {string} [query.thumbnail.imageId] Unique Id for the image - * @member {string} [query.thumbnail.accentColor] A three-byte hexadecimal - * number that represents the color that dominates the image. Use the color as - * the temporary background in your client until the image is loaded. - * @member {string} [query.thumbnail.visualWords] Visual representation of the - * image. Used for getting more sizes - * @member {object} image The image's thumbnail. - * @member {object} [image.thumbnail] The URL to a thumbnail of the image - * @member {string} [image.imageInsightsToken] The token that you use in a - * subsequent call to the Image Search API to get additional information about - * the image. For information about using this token, see the insightsToken - * query parameter. - * @member {object} [image.insightsMetadata] A count of the number of websites - * where you can shop or perform other actions related to the image. For - * example, if the image is of an apple pie, this object includes a count of - * the number of websites where you can buy an apple pie. To indicate the - * number of offers in your UX, include badging such as a shopping cart icon - * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [image.insightsMetadata.shoppingSourcesCount] The number of - * websites that offer goods of the products seen in the image. - * @member {number} [image.insightsMetadata.recipeSourcesCount] The number of - * websites that offer recipes of the food seen in the image. - * @member {object} [image.insightsMetadata.aggregateOffer] A summary of the - * online offers of products found in the image. For example, if the image is - * of a dress, the offer might identify the lowest price and the number of - * offers found. Only visually similar products insights include this field. - * The offer includes the following fields: Name, AggregateRating, OfferCount, - * and LowPrice. - * @member {array} [image.insightsMetadata.aggregateOffer.offers] A list of - * offers from merchants that have offerings related to the image. - * @member {string} [image.imageId] Unique Id for the image - * @member {string} [image.accentColor] A three-byte hexadecimal number that - * represents the color that dominates the image. Use the color as the - * temporary background in your client until the image is loaded. - * @member {string} [image.visualWords] Visual representation of the image. - * Used for getting more sizes - */ +*/ export interface TrendingImagesTile { + /** + * A query that returns a Bing search results page with more images of the subject. For example, + * if the category is Popular People Searches, then the thumbnail is of a popular person. The + * query would return a Bing search results page with more images of that person. + */ query: Query; + /** + * The image's thumbnail. + */ image: ImageObject; } /** - * @class - * Initializes a new instance of the TrendingImagesCategory class. - * @constructor * Defines the category of trending images. - * - * @member {string} title The name of the image category. For example, Popular - * People Searches. - * @member {array} tiles A list of images that are trending in the category. - * Each tile contains an image and a URL that returns more images of the - * subject. For example, if the category is Popular People Searches, the image - * is of a popular person and the URL would return more images of that person. - */ +*/ export interface TrendingImagesCategory { + /** + * The name of the image category. For example, Popular People Searches. + */ title: string; + /** + * A list of images that are trending in the category. Each tile contains an image and a URL that + * returns more images of the subject. For example, if the category is Popular People Searches, + * the image is of a popular person and the URL would return more images of that person. + */ tiles: TrendingImagesTile[]; } /** - * @class - * Initializes a new instance of the TrendingImages class. - * @constructor - * The top-level object that the response includes when a trending images - * request succeeds. - * - * @member {array} categories A list that identifies categories of images and a - * list of trending images in that category. - */ + * The top-level object that the response includes when a trending images request succeeds. +*/ export interface TrendingImages extends Response { + /** + * A list that identifies categories of images and a list of trending images in that category. + */ categories: TrendingImagesCategory[]; } /** - * @class - * Initializes a new instance of the Person class. - * @constructor * Defines a person. - * - * @member {string} [jobTitle] The person's job title. - * @member {string} [twitterProfile] The URL of the person's twitter profile. - */ +*/ export interface Person extends Thing { + /** + * The person's job title. + */ readonly jobTitle?: string; + /** + * The URL of the person's twitter profile. + */ readonly twitterProfile?: string; } diff --git a/lib/services/imageSearch/lib/models/insightsTag.js b/lib/services/imageSearch/lib/models/insightsTag.js index debc36cfdd..18c91036d3 100644 --- a/lib/services/imageSearch/lib/models/insightsTag.js +++ b/lib/services/imageSearch/lib/models/insightsTag.js @@ -17,8 +17,8 @@ class InsightsTag { /** * Create a InsightsTag. - * @member {string} [name] The name of the characteristic. For example, cat, - * kitty, calico cat. + * @property {string} [name] The name of the characteristic. For example, + * cat, kitty, calico cat. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/mediaObject.js b/lib/services/imageSearch/lib/models/mediaObject.js index 2183a24c39..0bf8f14e82 100644 --- a/lib/services/imageSearch/lib/models/mediaObject.js +++ b/lib/services/imageSearch/lib/models/mediaObject.js @@ -20,18 +20,19 @@ const models = require('./index'); class MediaObject extends models['CreativeWork'] { /** * Create a MediaObject. - * @member {string} [contentUrl] Original URL to retrieve the source (file) + * @property {string} [contentUrl] Original URL to retrieve the source (file) * for the media object (e.g the source URL for the image). - * @member {string} [hostPageUrl] URL of the page that hosts the media + * @property {string} [hostPageUrl] URL of the page that hosts the media * object. - * @member {string} [contentSize] Size of the media object content (use + * @property {string} [contentSize] Size of the media object content (use * format "value unit" e.g "1024 B"). - * @member {string} [encodingFormat] Encoding format (e.g mp3, mp4, jpeg, + * @property {string} [encodingFormat] Encoding format (e.g mp3, mp4, jpeg, * etc). - * @member {string} [hostPageDisplayUrl] Display URL of the page that hosts + * @property {string} [hostPageDisplayUrl] Display URL of the page that hosts * the media object. - * @member {number} [width] The width of the source media object, in pixels. - * @member {number} [height] The height of the source media object, in + * @property {number} [width] The width of the source media object, in + * pixels. + * @property {number} [height] The height of the source media object, in * pixels. */ constructor() { diff --git a/lib/services/imageSearch/lib/models/normalizedRectangle.js b/lib/services/imageSearch/lib/models/normalizedRectangle.js index d25af7ae4d..abe9d1e6e8 100644 --- a/lib/services/imageSearch/lib/models/normalizedRectangle.js +++ b/lib/services/imageSearch/lib/models/normalizedRectangle.js @@ -23,10 +23,10 @@ const models = require('./index'); class NormalizedRectangle extends models['StructuredValue'] { /** * Create a NormalizedRectangle. - * @member {number} left The left coordinate. - * @member {number} top The top coordinate - * @member {number} right The right coordinate - * @member {number} bottom The bottom coordinate + * @property {number} left The left coordinate. + * @property {number} top The top coordinate + * @property {number} right The right coordinate + * @property {number} bottom The bottom coordinate */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/offer.js b/lib/services/imageSearch/lib/models/offer.js index 944e328b2f..ca4245350b 100644 --- a/lib/services/imageSearch/lib/models/offer.js +++ b/lib/services/imageSearch/lib/models/offer.js @@ -20,36 +20,36 @@ const models = require('./index'); class Offer extends models['Thing'] { /** * Create a Offer. - * @member {object} [seller] Seller for this offer - * @member {number} [price] The item's price. - * @member {string} [priceCurrency] The monetary currency. For example, USD. - * Possible values include: 'USD', 'CAD', 'GBP', 'EUR', 'COP', 'JPY', 'CNY', - * 'AUD', 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AWG', - * 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', - * 'BOV', 'BRL', 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', 'CHF', - * 'CHW', 'CLF', 'CLP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', - * 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', 'GHS', - * 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', - * 'IDR', 'ILS', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'KES', 'KGS', 'KHR', - * 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', - * 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', - * 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', - * 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', - * 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', - * 'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', 'SZL', - * 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', - * 'UGX', 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', - * 'XPF', 'YER', 'ZAR', 'ZMW'. Default value: 'USD' . - * @member {string} [availability] The item's availability. The following are - * the possible values: Discontinued, InStock, InStoreOnly, + * @property {object} [seller] Seller for this offer + * @property {number} [price] The item's price. + * @property {string} [priceCurrency] The monetary currency. For example, + * USD. Possible values include: 'USD', 'CAD', 'GBP', 'EUR', 'COP', 'JPY', + * 'CNY', 'AUD', 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', + * 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', + * 'BOB', 'BOV', 'BRL', 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', + * 'CHF', 'CHW', 'CLF', 'CLP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', + * 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', + * 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', + * 'HUF', 'IDR', 'ILS', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'KES', 'KGS', + * 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', + * 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', + * 'MRO', 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', + * 'NIO', 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', + * 'PLN', 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', + * 'SDG', 'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', + * 'SZL', 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', + * 'UAH', 'UGX', 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', + * 'XOF', 'XPF', 'YER', 'ZAR', 'ZMW'. Default value: 'USD' . + * @property {string} [availability] The item's availability. The following + * are the possible values: Discontinued, InStock, InStoreOnly, * LimitedAvailability, OnlineOnly, OutOfStock, PreOrder, SoldOut. Possible * values include: 'Discontinued', 'InStock', 'InStoreOnly', * 'LimitedAvailability', 'OnlineOnly', 'OutOfStock', 'PreOrder', 'SoldOut' - * @member {object} [aggregateRating] An aggregated rating that indicates how - * well the product has been rated by others. - * @member {number} [aggregateRating.reviewCount] The number of times the + * @property {object} [aggregateRating] An aggregated rating that indicates + * how well the product has been rated by others. + * @property {number} [aggregateRating.reviewCount] The number of times the * recipe has been rated or reviewed. - * @member {string} [lastUpdated] The last date that the offer was updated. + * @property {string} [lastUpdated] The last date that the offer was updated. * The date is in the form YYYY-MM-DD. */ constructor() { diff --git a/lib/services/imageSearch/lib/models/person.js b/lib/services/imageSearch/lib/models/person.js index e7a51c88cb..7332675608 100644 --- a/lib/services/imageSearch/lib/models/person.js +++ b/lib/services/imageSearch/lib/models/person.js @@ -20,8 +20,9 @@ const models = require('./index'); class Person extends models['Thing'] { /** * Create a Person. - * @member {string} [jobTitle] The person's job title. - * @member {string} [twitterProfile] The URL of the person's twitter profile. + * @property {string} [jobTitle] The person's job title. + * @property {string} [twitterProfile] The URL of the person's twitter + * profile. */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/pivotSuggestions.js b/lib/services/imageSearch/lib/models/pivotSuggestions.js index 11b15a736d..4f592eec0c 100644 --- a/lib/services/imageSearch/lib/models/pivotSuggestions.js +++ b/lib/services/imageSearch/lib/models/pivotSuggestions.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines the pivot segment. * @@ -19,8 +17,8 @@ const models = require('./index'); class PivotSuggestions { /** * Create a PivotSuggestions. - * @member {string} pivot The segment from the original query to pivot on. - * @member {array} suggestions A list of suggested queries for the pivot. + * @property {string} pivot The segment from the original query to pivot on. + * @property {array} suggestions A list of suggested queries for the pivot. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/propertiesItem.js b/lib/services/imageSearch/lib/models/propertiesItem.js index 305d567fbe..f0d4255576 100644 --- a/lib/services/imageSearch/lib/models/propertiesItem.js +++ b/lib/services/imageSearch/lib/models/propertiesItem.js @@ -17,8 +17,8 @@ class PropertiesItem { /** * Create a PropertiesItem. - * @member {string} [text] Text representation of an item. - * @member {string} _type Polymorphic Discriminator + * @property {string} [text] Text representation of an item. + * @property {string} _type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/query.js b/lib/services/imageSearch/lib/models/query.js index 311df82488..9644d94515 100644 --- a/lib/services/imageSearch/lib/models/query.js +++ b/lib/services/imageSearch/lib/models/query.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines a search query. * @@ -19,50 +17,51 @@ const models = require('./index'); class Query { /** * Create a Query. - * @member {string} text The query string. Use this string as the query term - * in a new search request. - * @member {string} [displayText] The display version of the query term. This - * version of the query term may contain special characters that highlight - * the search term found in the query string. The string contains the - * highlighting characters only if the query enabled hit highlighting - * @member {string} [webSearchUrl] The URL that takes the user to the Bing + * @property {string} text The query string. Use this string as the query + * term in a new search request. + * @property {string} [displayText] The display version of the query term. + * This version of the query term may contain special characters that + * highlight the search term found in the query string. The string contains + * the highlighting characters only if the query enabled hit highlighting + * @property {string} [webSearchUrl] The URL that takes the user to the Bing * search results page for the query.Only related search results include this * field. - * @member {string} [searchLink] The URL that you use to get the results of + * @property {string} [searchLink] The URL that you use to get the results of * the related search. Before using the URL, you must append query parameters * as appropriate and include the Ocp-Apim-Subscription-Key header. Use this * URL if you're displaying the results in your own user interface. * Otherwise, use the webSearchUrl URL. - * @member {object} [thumbnail] The URL to a thumbnail of a related image. - * @member {object} [thumbnail.thumbnail] The URL to a thumbnail of the image - * @member {string} [thumbnail.imageInsightsToken] The token that you use in - * a subsequent call to the Image Search API to get additional information + * @property {object} [thumbnail] The URL to a thumbnail of a related image. + * @property {object} [thumbnail.thumbnail] The URL to a thumbnail of the + * image + * @property {string} [thumbnail.imageInsightsToken] The token that you use + * in a subsequent call to the Image Search API to get additional information * about the image. For information about using this token, see the * insightsToken query parameter. - * @member {object} [thumbnail.insightsMetadata] A count of the number of + * @property {object} [thumbnail.insightsMetadata] A count of the number of * websites where you can shop or perform other actions related to the image. * For example, if the image is of an apple pie, this object includes a count * of the number of websites where you can buy an apple pie. To indicate the * number of offers in your UX, include badging such as a shopping cart icon * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [thumbnail.insightsMetadata.shoppingSourcesCount] The + * imageInsightsToken to get the list of websites. + * @property {number} [thumbnail.insightsMetadata.shoppingSourcesCount] The * number of websites that offer goods of the products seen in the image. - * @member {number} [thumbnail.insightsMetadata.recipeSourcesCount] The + * @property {number} [thumbnail.insightsMetadata.recipeSourcesCount] The * number of websites that offer recipes of the food seen in the image. - * @member {object} [thumbnail.insightsMetadata.aggregateOffer] A summary of - * the online offers of products found in the image. For example, if the + * @property {object} [thumbnail.insightsMetadata.aggregateOffer] A summary + * of the online offers of products found in the image. For example, if the * image is of a dress, the offer might identify the lowest price and the * number of offers found. Only visually similar products insights include * this field. The offer includes the following fields: Name, * AggregateRating, OfferCount, and LowPrice. - * @member {array} [thumbnail.insightsMetadata.aggregateOffer.offers] A list - * of offers from merchants that have offerings related to the image. - * @member {string} [thumbnail.imageId] Unique Id for the image - * @member {string} [thumbnail.accentColor] A three-byte hexadecimal number + * @property {array} [thumbnail.insightsMetadata.aggregateOffer.offers] A + * list of offers from merchants that have offerings related to the image. + * @property {string} [thumbnail.imageId] Unique Id for the image + * @property {string} [thumbnail.accentColor] A three-byte hexadecimal number * that represents the color that dominates the image. Use the color as the * temporary background in your client until the image is loaded. - * @member {string} [thumbnail.visualWords] Visual representation of the + * @property {string} [thumbnail.visualWords] Visual representation of the * image. Used for getting more sizes */ constructor() { diff --git a/lib/services/imageSearch/lib/models/rating.js b/lib/services/imageSearch/lib/models/rating.js index d9e3588f00..a253d29c97 100644 --- a/lib/services/imageSearch/lib/models/rating.js +++ b/lib/services/imageSearch/lib/models/rating.js @@ -20,9 +20,9 @@ const models = require('./index'); class Rating extends models['PropertiesItem'] { /** * Create a Rating. - * @member {number} ratingValue The mean (average) rating. The possible + * @property {number} ratingValue The mean (average) rating. The possible * values are 1.0 through 5.0. - * @member {number} [bestRating] The highest rated review. The possible + * @property {number} [bestRating] The highest rated review. The possible * values are 1.0 through 5.0. */ constructor() { diff --git a/lib/services/imageSearch/lib/models/recipe.js b/lib/services/imageSearch/lib/models/recipe.js index 37fc1dce8c..944a218d27 100644 --- a/lib/services/imageSearch/lib/models/recipe.js +++ b/lib/services/imageSearch/lib/models/recipe.js @@ -20,15 +20,15 @@ const models = require('./index'); class Recipe extends models['CreativeWork'] { /** * Create a Recipe. - * @member {string} [cookTime] The amount of time the food takes to cook. For - * example, PT25M. For information about the time format, see + * @property {string} [cookTime] The amount of time the food takes to cook. + * For example, PT25M. For information about the time format, see * http://en.wikipedia.org/wiki/ISO_8601#Durations. - * @member {string} [prepTime] The amount of time required to prepare the + * @property {string} [prepTime] The amount of time required to prepare the * ingredients. For example, PT15M. For information about the time format, * see http://en.wikipedia.org/wiki/ISO_8601#Durations. - * @member {string} [totalTime] The total amount of time it takes to prepare - * and cook the recipe. For example, PT45M. For information about the time - * format, see http://en.wikipedia.org/wiki/ISO_8601#Durations. + * @property {string} [totalTime] The total amount of time it takes to + * prepare and cook the recipe. For example, PT45M. For information about the + * time format, see http://en.wikipedia.org/wiki/ISO_8601#Durations. */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/recipesModule.js b/lib/services/imageSearch/lib/models/recipesModule.js index c80c9f51ea..1144d8c827 100644 --- a/lib/services/imageSearch/lib/models/recipesModule.js +++ b/lib/services/imageSearch/lib/models/recipesModule.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines a list of recipes. * @@ -19,7 +17,7 @@ const models = require('./index'); class RecipesModule { /** * Create a RecipesModule. - * @member {array} [value] A list of recipes. + * @property {array} [value] A list of recipes. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/recognizedEntitiesModule.js b/lib/services/imageSearch/lib/models/recognizedEntitiesModule.js index f1a3b1154a..3d6d1bffc2 100644 --- a/lib/services/imageSearch/lib/models/recognizedEntitiesModule.js +++ b/lib/services/imageSearch/lib/models/recognizedEntitiesModule.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines a list of previously recognized entities. * @@ -19,7 +17,7 @@ const models = require('./index'); class RecognizedEntitiesModule { /** * Create a RecognizedEntitiesModule. - * @member {array} [value] A list of recognized entities. + * @property {array} [value] A list of recognized entities. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/recognizedEntity.js b/lib/services/imageSearch/lib/models/recognizedEntity.js index 59a8d33797..4ad6844079 100644 --- a/lib/services/imageSearch/lib/models/recognizedEntity.js +++ b/lib/services/imageSearch/lib/models/recognizedEntity.js @@ -20,48 +20,49 @@ const models = require('./index'); class RecognizedEntity extends models['Response'] { /** * Create a RecognizedEntity. - * @member {object} [entity] The entity that was recognized. The following + * @property {object} [entity] The entity that was recognized. The following * are the possible entity objects: Person - * @member {string} [entity.name] The name of the thing represented by this + * @property {string} [entity.name] The name of the thing represented by this * object. - * @member {string} [entity.url] The URL to get more information about the + * @property {string} [entity.url] The URL to get more information about the * thing represented by this object. - * @member {object} [entity.image] An image of the item. - * @member {object} [entity.image.thumbnail] The URL to a thumbnail of the + * @property {object} [entity.image] An image of the item. + * @property {object} [entity.image.thumbnail] The URL to a thumbnail of the * image - * @member {string} [entity.image.imageInsightsToken] The token that you use - * in a subsequent call to the Image Search API to get additional information - * about the image. For information about using this token, see the - * insightsToken query parameter. - * @member {object} [entity.image.insightsMetadata] A count of the number of - * websites where you can shop or perform other actions related to the image. - * For example, if the image is of an apple pie, this object includes a count - * of the number of websites where you can buy an apple pie. To indicate the - * number of offers in your UX, include badging such as a shopping cart icon - * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [entity.image.insightsMetadata.shoppingSourcesCount] The - * number of websites that offer goods of the products seen in the image. - * @member {number} [entity.image.insightsMetadata.recipeSourcesCount] The + * @property {string} [entity.image.imageInsightsToken] The token that you + * use in a subsequent call to the Image Search API to get additional + * information about the image. For information about using this token, see + * the insightsToken query parameter. + * @property {object} [entity.image.insightsMetadata] A count of the number + * of websites where you can shop or perform other actions related to the + * image. For example, if the image is of an apple pie, this object includes + * a count of the number of websites where you can buy an apple pie. To + * indicate the number of offers in your UX, include badging such as a + * shopping cart icon that contains the count. When the user clicks on the + * icon, use imageInsightsToken to get the list of websites. + * @property {number} [entity.image.insightsMetadata.shoppingSourcesCount] + * The number of websites that offer goods of the products seen in the image. + * @property {number} [entity.image.insightsMetadata.recipeSourcesCount] The * number of websites that offer recipes of the food seen in the image. - * @member {object} [entity.image.insightsMetadata.aggregateOffer] A summary - * of the online offers of products found in the image. For example, if the - * image is of a dress, the offer might identify the lowest price and the - * number of offers found. Only visually similar products insights include - * this field. The offer includes the following fields: Name, + * @property {object} [entity.image.insightsMetadata.aggregateOffer] A + * summary of the online offers of products found in the image. For example, + * if the image is of a dress, the offer might identify the lowest price and + * the number of offers found. Only visually similar products insights + * include this field. The offer includes the following fields: Name, * AggregateRating, OfferCount, and LowPrice. - * @member {array} [entity.image.insightsMetadata.aggregateOffer.offers] A + * @property {array} [entity.image.insightsMetadata.aggregateOffer.offers] A * list of offers from merchants that have offerings related to the image. - * @member {string} [entity.image.imageId] Unique Id for the image - * @member {string} [entity.image.accentColor] A three-byte hexadecimal + * @property {string} [entity.image.imageId] Unique Id for the image + * @property {string} [entity.image.accentColor] A three-byte hexadecimal * number that represents the color that dominates the image. Use the color * as the temporary background in your client until the image is loaded. - * @member {string} [entity.image.visualWords] Visual representation of the + * @property {string} [entity.image.visualWords] Visual representation of the * image. Used for getting more sizes - * @member {string} [entity.description] A short description of the item. - * @member {string} [entity.alternateName] An alias for the item - * @member {string} [entity.bingId] An ID that uniquely identifies this item. - * @member {number} [matchConfidence] The confidence that Bing has that the + * @property {string} [entity.description] A short description of the item. + * @property {string} [entity.alternateName] An alias for the item + * @property {string} [entity.bingId] An ID that uniquely identifies this + * item. + * @property {number} [matchConfidence] The confidence that Bing has that the * entity in the image matches this entity. The confidence ranges from 0.0 * through 1.0 with 1.0 being very confident. */ diff --git a/lib/services/imageSearch/lib/models/recognizedEntityGroup.js b/lib/services/imageSearch/lib/models/recognizedEntityGroup.js index 41277935d7..290d9f0c7f 100644 --- a/lib/services/imageSearch/lib/models/recognizedEntityGroup.js +++ b/lib/services/imageSearch/lib/models/recognizedEntityGroup.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines a group of previously recognized entities. * @@ -19,9 +17,9 @@ const models = require('./index'); class RecognizedEntityGroup { /** * Create a RecognizedEntityGroup. - * @member {array} recognizedEntityRegions The regions of the image that + * @property {array} recognizedEntityRegions The regions of the image that * contain entities. - * @member {string} name The name of the group where images of the entity + * @property {string} name The name of the group where images of the entity * were also found. The following are possible groups. * CelebRecognitionAnnotations: Similar to CelebrityAnnotations but provides * a higher probability of an accurate match. CelebrityAnnotations: Contains diff --git a/lib/services/imageSearch/lib/models/recognizedEntityRegion.js b/lib/services/imageSearch/lib/models/recognizedEntityRegion.js index 7a2746ec56..475b08b793 100644 --- a/lib/services/imageSearch/lib/models/recognizedEntityRegion.js +++ b/lib/services/imageSearch/lib/models/recognizedEntityRegion.js @@ -21,7 +21,7 @@ const models = require('./index'); class RecognizedEntityRegion extends models['Response'] { /** * Create a RecognizedEntityRegion. - * @member {object} [region] A region of the image that contains an entity. + * @property {object} [region] A region of the image that contains an entity. * The values of the rectangle are relative to the width and height of the * original image and are in the range 0.0 through 1.0. For example, if the * image is 300x200 and the region's top, left corner is at point (10, 20) @@ -29,11 +29,11 @@ class RecognizedEntityRegion extends models['Response'] { * rectangle is: Left = 0.0333333333333333, Top = 0.1, Right = * 0.9666666666666667, Bottom = 0.75. For people, the region represents the * person's face. - * @member {number} [region.left] The left coordinate. - * @member {number} [region.top] The top coordinate - * @member {number} [region.right] The right coordinate - * @member {number} [region.bottom] The bottom coordinate - * @member {array} [matchingEntities] A list of entities that Bing believes + * @property {number} [region.left] The left coordinate. + * @property {number} [region.top] The top coordinate + * @property {number} [region.right] The right coordinate + * @property {number} [region.bottom] The bottom coordinate + * @property {array} [matchingEntities] A list of entities that Bing believes * match the entity found in the region. The entities are in descending order * of confidence (see the matchConfidence field of RecognizedEntity). */ diff --git a/lib/services/imageSearch/lib/models/relatedCollectionsModule.js b/lib/services/imageSearch/lib/models/relatedCollectionsModule.js index e71e528c7a..a5672af172 100644 --- a/lib/services/imageSearch/lib/models/relatedCollectionsModule.js +++ b/lib/services/imageSearch/lib/models/relatedCollectionsModule.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines a list of webpages that contain related images. * @@ -19,7 +17,7 @@ const models = require('./index'); class RelatedCollectionsModule { /** * Create a RelatedCollectionsModule. - * @member {array} [value] A list of webpages that contain related images. + * @property {array} [value] A list of webpages that contain related images. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/relatedSearchesModule.js b/lib/services/imageSearch/lib/models/relatedSearchesModule.js index 82e3452b0d..7d96b49549 100644 --- a/lib/services/imageSearch/lib/models/relatedSearchesModule.js +++ b/lib/services/imageSearch/lib/models/relatedSearchesModule.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines a list of related searches. * @@ -19,7 +17,7 @@ const models = require('./index'); class RelatedSearchesModule { /** * Create a RelatedSearchesModule. - * @member {array} [value] A list of related searches. + * @property {array} [value] A list of related searches. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/response.js b/lib/services/imageSearch/lib/models/response.js index 5f42c01a24..66c19b4195 100644 --- a/lib/services/imageSearch/lib/models/response.js +++ b/lib/services/imageSearch/lib/models/response.js @@ -21,8 +21,8 @@ const models = require('./index'); class Response extends models['Identifiable'] { /** * Create a Response. - * @member {string} [readLink] The URL that returns this resource. - * @member {string} [webSearchUrl] The URL To Bing's search result for this + * @property {string} [readLink] The URL that returns this resource. + * @property {string} [webSearchUrl] The URL To Bing's search result for this * item. */ constructor() { diff --git a/lib/services/imageSearch/lib/models/responseBase.js b/lib/services/imageSearch/lib/models/responseBase.js index 28a5d0d020..902b737a95 100644 --- a/lib/services/imageSearch/lib/models/responseBase.js +++ b/lib/services/imageSearch/lib/models/responseBase.js @@ -17,7 +17,7 @@ class ResponseBase { /** * Create a ResponseBase. - * @member {string} _type Polymorphic Discriminator + * @property {string} _type Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/searchResultsAnswer.js b/lib/services/imageSearch/lib/models/searchResultsAnswer.js index 34d1203a51..76668d1ac4 100644 --- a/lib/services/imageSearch/lib/models/searchResultsAnswer.js +++ b/lib/services/imageSearch/lib/models/searchResultsAnswer.js @@ -20,9 +20,9 @@ const models = require('./index'); class SearchResultsAnswer extends models['Answer'] { /** * Create a SearchResultsAnswer. - * @member {number} [totalEstimatedMatches] The estimated number of webpages - * that are relevant to the query. Use this number along with the count and - * offset query parameters to page the results. + * @property {number} [totalEstimatedMatches] The estimated number of + * webpages that are relevant to the query. Use this number along with the + * count and offset query parameters to page the results. */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/thing.js b/lib/services/imageSearch/lib/models/thing.js index 6deb992b12..e8637edae3 100644 --- a/lib/services/imageSearch/lib/models/thing.js +++ b/lib/services/imageSearch/lib/models/thing.js @@ -20,43 +20,44 @@ const models = require('./index'); class Thing extends models['Response'] { /** * Create a Thing. - * @member {string} [name] The name of the thing represented by this object. - * @member {string} [url] The URL to get more information about the thing + * @property {string} [name] The name of the thing represented by this + * object. + * @property {string} [url] The URL to get more information about the thing * represented by this object. - * @member {object} [image] An image of the item. - * @member {object} [image.thumbnail] The URL to a thumbnail of the image - * @member {string} [image.imageInsightsToken] The token that you use in a + * @property {object} [image] An image of the item. + * @property {object} [image.thumbnail] The URL to a thumbnail of the image + * @property {string} [image.imageInsightsToken] The token that you use in a * subsequent call to the Image Search API to get additional information * about the image. For information about using this token, see the * insightsToken query parameter. - * @member {object} [image.insightsMetadata] A count of the number of + * @property {object} [image.insightsMetadata] A count of the number of * websites where you can shop or perform other actions related to the image. * For example, if the image is of an apple pie, this object includes a count * of the number of websites where you can buy an apple pie. To indicate the * number of offers in your UX, include badging such as a shopping cart icon * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [image.insightsMetadata.shoppingSourcesCount] The number - * of websites that offer goods of the products seen in the image. - * @member {number} [image.insightsMetadata.recipeSourcesCount] The number of - * websites that offer recipes of the food seen in the image. - * @member {object} [image.insightsMetadata.aggregateOffer] A summary of the - * online offers of products found in the image. For example, if the image is - * of a dress, the offer might identify the lowest price and the number of - * offers found. Only visually similar products insights include this field. - * The offer includes the following fields: Name, AggregateRating, - * OfferCount, and LowPrice. - * @member {array} [image.insightsMetadata.aggregateOffer.offers] A list of + * imageInsightsToken to get the list of websites. + * @property {number} [image.insightsMetadata.shoppingSourcesCount] The + * number of websites that offer goods of the products seen in the image. + * @property {number} [image.insightsMetadata.recipeSourcesCount] The number + * of websites that offer recipes of the food seen in the image. + * @property {object} [image.insightsMetadata.aggregateOffer] A summary of + * the online offers of products found in the image. For example, if the + * image is of a dress, the offer might identify the lowest price and the + * number of offers found. Only visually similar products insights include + * this field. The offer includes the following fields: Name, + * AggregateRating, OfferCount, and LowPrice. + * @property {array} [image.insightsMetadata.aggregateOffer.offers] A list of * offers from merchants that have offerings related to the image. - * @member {string} [image.imageId] Unique Id for the image - * @member {string} [image.accentColor] A three-byte hexadecimal number that - * represents the color that dominates the image. Use the color as the + * @property {string} [image.imageId] Unique Id for the image + * @property {string} [image.accentColor] A three-byte hexadecimal number + * that represents the color that dominates the image. Use the color as the * temporary background in your client until the image is loaded. - * @member {string} [image.visualWords] Visual representation of the image. + * @property {string} [image.visualWords] Visual representation of the image. * Used for getting more sizes - * @member {string} [description] A short description of the item. - * @member {string} [alternateName] An alias for the item - * @member {string} [bingId] An ID that uniquely identifies this item. + * @property {string} [description] A short description of the item. + * @property {string} [alternateName] An alias for the item + * @property {string} [bingId] An ID that uniquely identifies this item. */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/trendingImages.js b/lib/services/imageSearch/lib/models/trendingImages.js index cda5439f77..b7b54482cc 100644 --- a/lib/services/imageSearch/lib/models/trendingImages.js +++ b/lib/services/imageSearch/lib/models/trendingImages.js @@ -21,8 +21,8 @@ const models = require('./index'); class TrendingImages extends models['Response'] { /** * Create a TrendingImages. - * @member {array} categories A list that identifies categories of images and - * a list of trending images in that category. + * @property {array} categories A list that identifies categories of images + * and a list of trending images in that category. */ constructor() { super(); diff --git a/lib/services/imageSearch/lib/models/trendingImagesCategory.js b/lib/services/imageSearch/lib/models/trendingImagesCategory.js index 693ec222c8..5c5c015299 100644 --- a/lib/services/imageSearch/lib/models/trendingImagesCategory.js +++ b/lib/services/imageSearch/lib/models/trendingImagesCategory.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines the category of trending images. * @@ -19,13 +17,13 @@ const models = require('./index'); class TrendingImagesCategory { /** * Create a TrendingImagesCategory. - * @member {string} title The name of the image category. For example, + * @property {string} title The name of the image category. For example, * Popular People Searches. - * @member {array} tiles A list of images that are trending in the category. - * Each tile contains an image and a URL that returns more images of the - * subject. For example, if the category is Popular People Searches, the - * image is of a popular person and the URL would return more images of that - * person. + * @property {array} tiles A list of images that are trending in the + * category. Each tile contains an image and a URL that returns more images + * of the subject. For example, if the category is Popular People Searches, + * the image is of a popular person and the URL would return more images of + * that person. */ constructor() { } diff --git a/lib/services/imageSearch/lib/models/trendingImagesTile.js b/lib/services/imageSearch/lib/models/trendingImagesTile.js index de2135b8b5..678ec1e520 100644 --- a/lib/services/imageSearch/lib/models/trendingImagesTile.js +++ b/lib/services/imageSearch/lib/models/trendingImagesTile.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Defines an image tile. * @@ -19,87 +17,87 @@ const models = require('./index'); class TrendingImagesTile { /** * Create a TrendingImagesTile. - * @member {object} query A query that returns a Bing search results page + * @property {object} query A query that returns a Bing search results page * with more images of the subject. For example, if the category is Popular * People Searches, then the thumbnail is of a popular person. The query * would return a Bing search results page with more images of that person. - * @member {string} [query.text] The query string. Use this string as the + * @property {string} [query.text] The query string. Use this string as the * query term in a new search request. - * @member {string} [query.displayText] The display version of the query + * @property {string} [query.displayText] The display version of the query * term. This version of the query term may contain special characters that * highlight the search term found in the query string. The string contains * the highlighting characters only if the query enabled hit highlighting - * @member {string} [query.webSearchUrl] The URL that takes the user to the + * @property {string} [query.webSearchUrl] The URL that takes the user to the * Bing search results page for the query.Only related search results include * this field. - * @member {string} [query.searchLink] The URL that you use to get the + * @property {string} [query.searchLink] The URL that you use to get the * results of the related search. Before using the URL, you must append query * parameters as appropriate and include the Ocp-Apim-Subscription-Key * header. Use this URL if you're displaying the results in your own user * interface. Otherwise, use the webSearchUrl URL. - * @member {object} [query.thumbnail] The URL to a thumbnail of a related + * @property {object} [query.thumbnail] The URL to a thumbnail of a related * image. - * @member {object} [query.thumbnail.thumbnail] The URL to a thumbnail of the - * image - * @member {string} [query.thumbnail.imageInsightsToken] The token that you + * @property {object} [query.thumbnail.thumbnail] The URL to a thumbnail of + * the image + * @property {string} [query.thumbnail.imageInsightsToken] The token that you * use in a subsequent call to the Image Search API to get additional * information about the image. For information about using this token, see * the insightsToken query parameter. - * @member {object} [query.thumbnail.insightsMetadata] A count of the number - * of websites where you can shop or perform other actions related to the - * image. For example, if the image is of an apple pie, this object includes - * a count of the number of websites where you can buy an apple pie. To - * indicate the number of offers in your UX, include badging such as a + * @property {object} [query.thumbnail.insightsMetadata] A count of the + * number of websites where you can shop or perform other actions related to + * the image. For example, if the image is of an apple pie, this object + * includes a count of the number of websites where you can buy an apple pie. + * To indicate the number of offers in your UX, include badging such as a * shopping cart icon that contains the count. When the user clicks on the - * icon, use imageInisghtsToken to get the list of websites. - * @member {number} [query.thumbnail.insightsMetadata.shoppingSourcesCount] + * icon, use imageInsightsToken to get the list of websites. + * @property {number} [query.thumbnail.insightsMetadata.shoppingSourcesCount] * The number of websites that offer goods of the products seen in the image. - * @member {number} [query.thumbnail.insightsMetadata.recipeSourcesCount] The - * number of websites that offer recipes of the food seen in the image. - * @member {object} [query.thumbnail.insightsMetadata.aggregateOffer] A + * @property {number} [query.thumbnail.insightsMetadata.recipeSourcesCount] + * The number of websites that offer recipes of the food seen in the image. + * @property {object} [query.thumbnail.insightsMetadata.aggregateOffer] A * summary of the online offers of products found in the image. For example, * if the image is of a dress, the offer might identify the lowest price and * the number of offers found. Only visually similar products insights * include this field. The offer includes the following fields: Name, * AggregateRating, OfferCount, and LowPrice. - * @member {array} [query.thumbnail.insightsMetadata.aggregateOffer.offers] A - * list of offers from merchants that have offerings related to the image. - * @member {string} [query.thumbnail.imageId] Unique Id for the image - * @member {string} [query.thumbnail.accentColor] A three-byte hexadecimal + * @property {array} [query.thumbnail.insightsMetadata.aggregateOffer.offers] + * A list of offers from merchants that have offerings related to the image. + * @property {string} [query.thumbnail.imageId] Unique Id for the image + * @property {string} [query.thumbnail.accentColor] A three-byte hexadecimal * number that represents the color that dominates the image. Use the color * as the temporary background in your client until the image is loaded. - * @member {string} [query.thumbnail.visualWords] Visual representation of + * @property {string} [query.thumbnail.visualWords] Visual representation of * the image. Used for getting more sizes - * @member {object} image The image's thumbnail. - * @member {object} [image.thumbnail] The URL to a thumbnail of the image - * @member {string} [image.imageInsightsToken] The token that you use in a + * @property {object} image The image's thumbnail. + * @property {object} [image.thumbnail] The URL to a thumbnail of the image + * @property {string} [image.imageInsightsToken] The token that you use in a * subsequent call to the Image Search API to get additional information * about the image. For information about using this token, see the * insightsToken query parameter. - * @member {object} [image.insightsMetadata] A count of the number of + * @property {object} [image.insightsMetadata] A count of the number of * websites where you can shop or perform other actions related to the image. * For example, if the image is of an apple pie, this object includes a count * of the number of websites where you can buy an apple pie. To indicate the * number of offers in your UX, include badging such as a shopping cart icon * that contains the count. When the user clicks on the icon, use - * imageInisghtsToken to get the list of websites. - * @member {number} [image.insightsMetadata.shoppingSourcesCount] The number - * of websites that offer goods of the products seen in the image. - * @member {number} [image.insightsMetadata.recipeSourcesCount] The number of - * websites that offer recipes of the food seen in the image. - * @member {object} [image.insightsMetadata.aggregateOffer] A summary of the - * online offers of products found in the image. For example, if the image is - * of a dress, the offer might identify the lowest price and the number of - * offers found. Only visually similar products insights include this field. - * The offer includes the following fields: Name, AggregateRating, - * OfferCount, and LowPrice. - * @member {array} [image.insightsMetadata.aggregateOffer.offers] A list of + * imageInsightsToken to get the list of websites. + * @property {number} [image.insightsMetadata.shoppingSourcesCount] The + * number of websites that offer goods of the products seen in the image. + * @property {number} [image.insightsMetadata.recipeSourcesCount] The number + * of websites that offer recipes of the food seen in the image. + * @property {object} [image.insightsMetadata.aggregateOffer] A summary of + * the online offers of products found in the image. For example, if the + * image is of a dress, the offer might identify the lowest price and the + * number of offers found. Only visually similar products insights include + * this field. The offer includes the following fields: Name, + * AggregateRating, OfferCount, and LowPrice. + * @property {array} [image.insightsMetadata.aggregateOffer.offers] A list of * offers from merchants that have offerings related to the image. - * @member {string} [image.imageId] Unique Id for the image - * @member {string} [image.accentColor] A three-byte hexadecimal number that - * represents the color that dominates the image. Use the color as the + * @property {string} [image.imageId] Unique Id for the image + * @property {string} [image.accentColor] A three-byte hexadecimal number + * that represents the color that dominates the image. Use the color as the * temporary background in your client until the image is loaded. - * @member {string} [image.visualWords] Visual representation of the image. + * @property {string} [image.visualWords] Visual representation of the image. * Used for getting more sizes */ constructor() { diff --git a/lib/services/imageSearch/lib/operations/imagesOperations.js b/lib/services/imageSearch/lib/operations/imagesOperations.js index 0c8a4cfaee..2b5ca90a59 100644 --- a/lib/services/imageSearch/lib/operations/imagesOperations.js +++ b/lib/services/imageSearch/lib/operations/imagesOperations.js @@ -410,6 +410,9 @@ function _search(query, options, callback) { let xBingApisSDK = 'true'; // Validate try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { throw new Error('acceptLanguage must be of type string.'); } @@ -501,6 +504,7 @@ function _search(query, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'images/search'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); let queryParameters = []; if (aspect !== null && aspect !== undefined) { queryParameters.push('aspect=' + encodeURIComponent(aspect)); @@ -1013,6 +1017,9 @@ function _details(query, options, callback) { let xBingApisSDK = 'true'; // Validate try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { throw new Error('acceptLanguage must be of type string.'); } @@ -1084,6 +1091,7 @@ function _details(query, options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'images/details'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); let queryParameters = []; if (cropBottom !== null && cropBottom !== undefined) { queryParameters.push('cab=' + encodeURIComponent(cropBottom.toString())); @@ -1449,6 +1457,9 @@ function _trending(options, callback) { let xBingApisSDK = 'true'; // Validate try { + if (this.client.endpoint === null || this.client.endpoint === undefined || typeof this.client.endpoint.valueOf() !== 'string') { + throw new Error('this.client.endpoint cannot be null or undefined and it must be of type string.'); + } if (acceptLanguage !== null && acceptLanguage !== undefined && typeof acceptLanguage.valueOf() !== 'string') { throw new Error('acceptLanguage must be of type string.'); } @@ -1483,6 +1494,7 @@ function _trending(options, callback) { // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'images/trending'; + requestUrl = requestUrl.replace('{Endpoint}', this.client.endpoint); let queryParameters = []; if (countryCode !== null && countryCode !== undefined) { queryParameters.push('cc=' + encodeURIComponent(countryCode)); diff --git a/lib/services/imageSearch/package.json b/lib/services/imageSearch/package.json index 2003ac6cd6..5b4b44444d 100644 --- a/lib/services/imageSearch/package.json +++ b/lib/services/imageSearch/package.json @@ -13,12 +13,12 @@ "license": "MIT", "main": "./lib/imageSearchAPIClient.js", "types": "./lib/imageSearchAPIClient.d.ts", - "homepage": "http://github.com/azure/azure-sdk-for-node", + "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/imageSearch", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git" }, "bugs": { - "url": "http://github.com/Azure/azure-sdk-for-node/issues" + "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +}