@aws-sdk/client-cloudsearch-domain 3.315.0 → 3.316.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,52 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CloudSearchDomain = void 0;
4
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
4
5
  const CloudSearchDomainClient_1 = require("./CloudSearchDomainClient");
5
6
  const SearchCommand_1 = require("./commands/SearchCommand");
6
7
  const SuggestCommand_1 = require("./commands/SuggestCommand");
7
8
  const UploadDocumentsCommand_1 = require("./commands/UploadDocumentsCommand");
9
+ const commands = {
10
+ SearchCommand: SearchCommand_1.SearchCommand,
11
+ SuggestCommand: SuggestCommand_1.SuggestCommand,
12
+ UploadDocumentsCommand: UploadDocumentsCommand_1.UploadDocumentsCommand,
13
+ };
8
14
  class CloudSearchDomain extends CloudSearchDomainClient_1.CloudSearchDomainClient {
9
- search(args, optionsOrCb, cb) {
10
- const command = new SearchCommand_1.SearchCommand(args);
11
- if (typeof optionsOrCb === "function") {
12
- this.send(command, optionsOrCb);
13
- }
14
- else if (typeof cb === "function") {
15
- if (typeof optionsOrCb !== "object")
16
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
17
- this.send(command, optionsOrCb || {}, cb);
18
- }
19
- else {
20
- return this.send(command, optionsOrCb);
21
- }
22
- }
23
- suggest(args, optionsOrCb, cb) {
24
- const command = new SuggestCommand_1.SuggestCommand(args);
25
- if (typeof optionsOrCb === "function") {
26
- this.send(command, optionsOrCb);
27
- }
28
- else if (typeof cb === "function") {
29
- if (typeof optionsOrCb !== "object")
30
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
31
- this.send(command, optionsOrCb || {}, cb);
32
- }
33
- else {
34
- return this.send(command, optionsOrCb);
35
- }
36
- }
37
- uploadDocuments(args, optionsOrCb, cb) {
38
- const command = new UploadDocumentsCommand_1.UploadDocumentsCommand(args);
39
- if (typeof optionsOrCb === "function") {
40
- this.send(command, optionsOrCb);
41
- }
42
- else if (typeof cb === "function") {
43
- if (typeof optionsOrCb !== "object")
44
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
45
- this.send(command, optionsOrCb || {}, cb);
46
- }
47
- else {
48
- return this.send(command, optionsOrCb);
49
- }
50
- }
51
15
  }
52
16
  exports.CloudSearchDomain = CloudSearchDomain;
17
+ (0, smithy_client_1.createAggregatedClient)(commands, CloudSearchDomain);
@@ -1,48 +1,13 @@
1
+ import { createAggregatedClient } from "@aws-sdk/smithy-client";
1
2
  import { CloudSearchDomainClient } from "./CloudSearchDomainClient";
2
3
  import { SearchCommand } from "./commands/SearchCommand";
3
4
  import { SuggestCommand } from "./commands/SuggestCommand";
4
5
  import { UploadDocumentsCommand, } from "./commands/UploadDocumentsCommand";
6
+ const commands = {
7
+ SearchCommand,
8
+ SuggestCommand,
9
+ UploadDocumentsCommand,
10
+ };
5
11
  export class CloudSearchDomain extends CloudSearchDomainClient {
6
- search(args, optionsOrCb, cb) {
7
- const command = new SearchCommand(args);
8
- if (typeof optionsOrCb === "function") {
9
- this.send(command, optionsOrCb);
10
- }
11
- else if (typeof cb === "function") {
12
- if (typeof optionsOrCb !== "object")
13
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
14
- this.send(command, optionsOrCb || {}, cb);
15
- }
16
- else {
17
- return this.send(command, optionsOrCb);
18
- }
19
- }
20
- suggest(args, optionsOrCb, cb) {
21
- const command = new SuggestCommand(args);
22
- if (typeof optionsOrCb === "function") {
23
- this.send(command, optionsOrCb);
24
- }
25
- else if (typeof cb === "function") {
26
- if (typeof optionsOrCb !== "object")
27
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
28
- this.send(command, optionsOrCb || {}, cb);
29
- }
30
- else {
31
- return this.send(command, optionsOrCb);
32
- }
33
- }
34
- uploadDocuments(args, optionsOrCb, cb) {
35
- const command = new UploadDocumentsCommand(args);
36
- if (typeof optionsOrCb === "function") {
37
- this.send(command, optionsOrCb);
38
- }
39
- else if (typeof cb === "function") {
40
- if (typeof optionsOrCb !== "object")
41
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
42
- this.send(command, optionsOrCb || {}, cb);
43
- }
44
- else {
45
- return this.send(command, optionsOrCb);
46
- }
47
- }
48
12
  }
13
+ createAggregatedClient(commands, CloudSearchDomain);
@@ -3,47 +3,32 @@ import { CloudSearchDomainClient } from "./CloudSearchDomainClient";
3
3
  import { SearchCommandInput, SearchCommandOutput } from "./commands/SearchCommand";
4
4
  import { SuggestCommandInput, SuggestCommandOutput } from "./commands/SuggestCommand";
5
5
  import { UploadDocumentsCommandInput, UploadDocumentsCommandOutput } from "./commands/UploadDocumentsCommand";
6
- /**
7
- * @public
8
- * <p>You use the AmazonCloudSearch2013 API to upload documents to a search domain and search those documents. </p>
9
- *
10
- * <p>The endpoints for submitting <code>UploadDocuments</code>, <code>Search</code>, and <code>Suggest</code> requests are domain-specific. To get the endpoints for your domain, use the Amazon CloudSearch configuration service <code>DescribeDomains</code> action. The domain endpoints are also displayed on the domain dashboard in the Amazon CloudSearch console. You submit suggest requests to the search endpoint. </p>
11
- * <p>For more information, see the <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide">Amazon CloudSearch Developer Guide</a>.</p>
12
- */
13
- export declare class CloudSearchDomain extends CloudSearchDomainClient {
6
+ export interface CloudSearchDomain {
14
7
  /**
15
- * @public
16
- * <p>Retrieves a list of documents that match the specified search criteria. How you specify the search criteria depends on which query parser you use. Amazon CloudSearch supports four query parsers:</p>
17
- * <ul>
18
- * <li><code>simple</code>: search all <code>text</code> and <code>text-array</code> fields for the specified string. Search for phrases, individual terms, and prefixes. </li>
19
- * <li><code>structured</code>: search specific fields, construct compound queries using Boolean operators, and use advanced features such as term boosting and proximity searching.</li>
20
- * <li><code>lucene</code>: specify search criteria using the Apache Lucene query parser syntax.</li>
21
- * <li><code>dismax</code>: specify search criteria using the simplified subset of the Apache Lucene query parser syntax defined by the DisMax query parser.</li>
22
- * </ul>
23
- * <p>For more information, see <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching.html">Searching Your Data</a> in the <i>Amazon CloudSearch Developer Guide</i>.</p>
24
- * <p>The endpoint for submitting <code>Search</code> requests is domain-specific. You submit search requests to a domain's search endpoint. To get the search endpoint for your domain, use the Amazon CloudSearch configuration service <code>DescribeDomains</code> action. A domain's endpoints are also displayed on the domain dashboard in the Amazon CloudSearch console. </p>
8
+ * @see {@link SearchCommand}
25
9
  */
26
10
  search(args: SearchCommandInput, options?: __HttpHandlerOptions): Promise<SearchCommandOutput>;
27
11
  search(args: SearchCommandInput, cb: (err: any, data?: SearchCommandOutput) => void): void;
28
12
  search(args: SearchCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SearchCommandOutput) => void): void;
29
13
  /**
30
- * @public
31
- * <p>Retrieves autocomplete suggestions for a partial query string. You can use suggestions enable you to display likely matches before users finish typing. In Amazon CloudSearch, suggestions are based on the contents of a particular text field. When you request suggestions, Amazon CloudSearch finds all of the documents whose values in the suggester field start with the specified query string. The beginning of the field must match the query string to be considered a match. </p>
32
- * <p>For more information about configuring suggesters and retrieving suggestions, see <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html">Getting Suggestions</a> in the <i>Amazon CloudSearch Developer Guide</i>. </p>
33
- *
34
- * <p>The endpoint for submitting <code>Suggest</code> requests is domain-specific. You submit suggest requests to a domain's search endpoint. To get the search endpoint for your domain, use the Amazon CloudSearch configuration service <code>DescribeDomains</code> action. A domain's endpoints are also displayed on the domain dashboard in the Amazon CloudSearch console. </p>
14
+ * @see {@link SuggestCommand}
35
15
  */
36
16
  suggest(args: SuggestCommandInput, options?: __HttpHandlerOptions): Promise<SuggestCommandOutput>;
37
17
  suggest(args: SuggestCommandInput, cb: (err: any, data?: SuggestCommandOutput) => void): void;
38
18
  suggest(args: SuggestCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SuggestCommandOutput) => void): void;
39
19
  /**
40
- * @public
41
- * <p>Posts a batch of documents to a search domain for indexing. A document batch is a collection of add and delete operations that represent the documents you want to add, update, or delete from your domain. Batches can be described in either JSON or XML. Each item that you want Amazon CloudSearch to return as a search result (such as a product) is represented as a document. Every document has a unique ID and one or more fields that contain the data that you want to search and return in results. Individual documents cannot contain more than 1 MB of data. The entire batch cannot exceed 5 MB. To get the best possible upload performance, group add and delete operations in batches that are close the 5 MB limit. Submitting a large volume of single-document batches can overload a domain's document service. </p>
42
- * <p>The endpoint for submitting <code>UploadDocuments</code> requests is domain-specific. To get the document endpoint for your domain, use the Amazon CloudSearch configuration service <code>DescribeDomains</code> action. A domain's endpoints are also displayed on the domain dashboard in the Amazon CloudSearch console. </p>
43
- * <p>For more information about formatting your data for Amazon CloudSearch, see <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/preparing-data.html">Preparing Your Data</a> in the <i>Amazon CloudSearch Developer Guide</i>.
44
- * For more information about uploading data for indexing, see <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/uploading-data.html">Uploading Data</a> in the <i>Amazon CloudSearch Developer Guide</i>. </p>
20
+ * @see {@link UploadDocumentsCommand}
45
21
  */
46
22
  uploadDocuments(args: UploadDocumentsCommandInput, options?: __HttpHandlerOptions): Promise<UploadDocumentsCommandOutput>;
47
23
  uploadDocuments(args: UploadDocumentsCommandInput, cb: (err: any, data?: UploadDocumentsCommandOutput) => void): void;
48
24
  uploadDocuments(args: UploadDocumentsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UploadDocumentsCommandOutput) => void): void;
49
25
  }
26
+ /**
27
+ * @public
28
+ * <p>You use the AmazonCloudSearch2013 API to upload documents to a search domain and search those documents. </p>
29
+ *
30
+ * <p>The endpoints for submitting <code>UploadDocuments</code>, <code>Search</code>, and <code>Suggest</code> requests are domain-specific. To get the endpoints for your domain, use the Amazon CloudSearch configuration service <code>DescribeDomains</code> action. The domain endpoints are also displayed on the domain dashboard in the Amazon CloudSearch console. You submit suggest requests to the search endpoint. </p>
31
+ * <p>For more information, see the <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide">Amazon CloudSearch Developer Guide</a>.</p>
32
+ */
33
+ export declare class CloudSearchDomain extends CloudSearchDomainClient implements CloudSearchDomain {
34
+ }
@@ -12,7 +12,7 @@ import {
12
12
  UploadDocumentsCommandInput,
13
13
  UploadDocumentsCommandOutput,
14
14
  } from "./commands/UploadDocumentsCommand";
15
- export declare class CloudSearchDomain extends CloudSearchDomainClient {
15
+ export interface CloudSearchDomain {
16
16
  search(
17
17
  args: SearchCommandInput,
18
18
  options?: __HttpHandlerOptions
@@ -53,3 +53,6 @@ export declare class CloudSearchDomain extends CloudSearchDomainClient {
53
53
  cb: (err: any, data?: UploadDocumentsCommandOutput) => void
54
54
  ): void;
55
55
  }
56
+ export declare class CloudSearchDomain
57
+ extends CloudSearchDomainClient
58
+ implements CloudSearchDomain {}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-cloudsearch-domain",
3
3
  "description": "AWS SDK for JavaScript Cloudsearch Domain Client for Node.js, Browser and React Native",
4
- "version": "3.315.0",
4
+ "version": "3.316.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -21,9 +21,9 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.315.0",
24
+ "@aws-sdk/client-sts": "3.316.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
- "@aws-sdk/credential-provider-node": "3.315.0",
26
+ "@aws-sdk/credential-provider-node": "3.316.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.310.0",
28
28
  "@aws-sdk/hash-node": "3.310.0",
29
29
  "@aws-sdk/invalid-dependency": "3.310.0",
@@ -40,14 +40,14 @@
40
40
  "@aws-sdk/node-config-provider": "3.310.0",
41
41
  "@aws-sdk/node-http-handler": "3.310.0",
42
42
  "@aws-sdk/protocol-http": "3.310.0",
43
- "@aws-sdk/smithy-client": "3.315.0",
43
+ "@aws-sdk/smithy-client": "3.316.0",
44
44
  "@aws-sdk/types": "3.310.0",
45
45
  "@aws-sdk/url-parser": "3.310.0",
46
46
  "@aws-sdk/util-base64": "3.310.0",
47
47
  "@aws-sdk/util-body-length-browser": "3.310.0",
48
48
  "@aws-sdk/util-body-length-node": "3.310.0",
49
- "@aws-sdk/util-defaults-mode-browser": "3.315.0",
50
- "@aws-sdk/util-defaults-mode-node": "3.315.0",
49
+ "@aws-sdk/util-defaults-mode-browser": "3.316.0",
50
+ "@aws-sdk/util-defaults-mode-node": "3.316.0",
51
51
  "@aws-sdk/util-endpoints": "3.310.0",
52
52
  "@aws-sdk/util-retry": "3.310.0",
53
53
  "@aws-sdk/util-user-agent-browser": "3.310.0",