@aws-sdk/client-personalize-events 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.PersonalizeEvents = void 0;
4
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
4
5
  const PutEventsCommand_1 = require("./commands/PutEventsCommand");
5
6
  const PutItemsCommand_1 = require("./commands/PutItemsCommand");
6
7
  const PutUsersCommand_1 = require("./commands/PutUsersCommand");
7
8
  const PersonalizeEventsClient_1 = require("./PersonalizeEventsClient");
9
+ const commands = {
10
+ PutEventsCommand: PutEventsCommand_1.PutEventsCommand,
11
+ PutItemsCommand: PutItemsCommand_1.PutItemsCommand,
12
+ PutUsersCommand: PutUsersCommand_1.PutUsersCommand,
13
+ };
8
14
  class PersonalizeEvents extends PersonalizeEventsClient_1.PersonalizeEventsClient {
9
- putEvents(args, optionsOrCb, cb) {
10
- const command = new PutEventsCommand_1.PutEventsCommand(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
- putItems(args, optionsOrCb, cb) {
24
- const command = new PutItemsCommand_1.PutItemsCommand(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
- putUsers(args, optionsOrCb, cb) {
38
- const command = new PutUsersCommand_1.PutUsersCommand(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.PersonalizeEvents = PersonalizeEvents;
17
+ (0, smithy_client_1.createAggregatedClient)(commands, PersonalizeEvents);
@@ -1,48 +1,13 @@
1
+ import { createAggregatedClient } from "@aws-sdk/smithy-client";
1
2
  import { PutEventsCommand } from "./commands/PutEventsCommand";
2
3
  import { PutItemsCommand } from "./commands/PutItemsCommand";
3
4
  import { PutUsersCommand } from "./commands/PutUsersCommand";
4
5
  import { PersonalizeEventsClient } from "./PersonalizeEventsClient";
6
+ const commands = {
7
+ PutEventsCommand,
8
+ PutItemsCommand,
9
+ PutUsersCommand,
10
+ };
5
11
  export class PersonalizeEvents extends PersonalizeEventsClient {
6
- putEvents(args, optionsOrCb, cb) {
7
- const command = new PutEventsCommand(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
- putItems(args, optionsOrCb, cb) {
21
- const command = new PutItemsCommand(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
- putUsers(args, optionsOrCb, cb) {
35
- const command = new PutUsersCommand(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, PersonalizeEvents);
@@ -3,36 +3,31 @@ import { PutEventsCommandInput, PutEventsCommandOutput } from "./commands/PutEve
3
3
  import { PutItemsCommandInput, PutItemsCommandOutput } from "./commands/PutItemsCommand";
4
4
  import { PutUsersCommandInput, PutUsersCommandOutput } from "./commands/PutUsersCommand";
5
5
  import { PersonalizeEventsClient } from "./PersonalizeEventsClient";
6
- /**
7
- * @public
8
- * <p>Amazon Personalize can consume real-time user event data, such as <i>stream</i> or <i>click</i> data, and use
9
- * it for model training either alone or combined with historical data. For more information see
10
- * <a href="https://docs.aws.amazon.com/personalize/latest/dg/recording-events.html">Recording Events</a>.</p>
11
- */
12
- export declare class PersonalizeEvents extends PersonalizeEventsClient {
6
+ export interface PersonalizeEvents {
13
7
  /**
14
- * @public
15
- * <p>Records user interaction event data. For more information see
16
- * <a href="https://docs.aws.amazon.com/personalize/latest/dg/recording-events.html">Recording Events</a>.</p>
8
+ * @see {@link PutEventsCommand}
17
9
  */
18
10
  putEvents(args: PutEventsCommandInput, options?: __HttpHandlerOptions): Promise<PutEventsCommandOutput>;
19
11
  putEvents(args: PutEventsCommandInput, cb: (err: any, data?: PutEventsCommandOutput) => void): void;
20
12
  putEvents(args: PutEventsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutEventsCommandOutput) => void): void;
21
13
  /**
22
- * @public
23
- * <p>Adds one or more items to an Items dataset. For more information see
24
- * <a href="https://docs.aws.amazon.com/personalize/latest/dg/importing-items.html">Importing Items Incrementally</a>.
25
- * </p>
14
+ * @see {@link PutItemsCommand}
26
15
  */
27
16
  putItems(args: PutItemsCommandInput, options?: __HttpHandlerOptions): Promise<PutItemsCommandOutput>;
28
17
  putItems(args: PutItemsCommandInput, cb: (err: any, data?: PutItemsCommandOutput) => void): void;
29
18
  putItems(args: PutItemsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutItemsCommandOutput) => void): void;
30
19
  /**
31
- * @public
32
- * <p>Adds one or more users to a Users dataset. For more information see
33
- * <a href="https://docs.aws.amazon.com/personalize/latest/dg/importing-users.html">Importing Users Incrementally</a>.</p>
20
+ * @see {@link PutUsersCommand}
34
21
  */
35
22
  putUsers(args: PutUsersCommandInput, options?: __HttpHandlerOptions): Promise<PutUsersCommandOutput>;
36
23
  putUsers(args: PutUsersCommandInput, cb: (err: any, data?: PutUsersCommandOutput) => void): void;
37
24
  putUsers(args: PutUsersCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutUsersCommandOutput) => void): void;
38
25
  }
26
+ /**
27
+ * @public
28
+ * <p>Amazon Personalize can consume real-time user event data, such as <i>stream</i> or <i>click</i> data, and use
29
+ * it for model training either alone or combined with historical data. For more information see
30
+ * <a href="https://docs.aws.amazon.com/personalize/latest/dg/recording-events.html">Recording Events</a>.</p>
31
+ */
32
+ export declare class PersonalizeEvents extends PersonalizeEventsClient implements PersonalizeEvents {
33
+ }
@@ -12,7 +12,7 @@ import {
12
12
  PutUsersCommandOutput,
13
13
  } from "./commands/PutUsersCommand";
14
14
  import { PersonalizeEventsClient } from "./PersonalizeEventsClient";
15
- export declare class PersonalizeEvents extends PersonalizeEventsClient {
15
+ export interface PersonalizeEvents {
16
16
  putEvents(
17
17
  args: PutEventsCommandInput,
18
18
  options?: __HttpHandlerOptions
@@ -53,3 +53,6 @@ export declare class PersonalizeEvents extends PersonalizeEventsClient {
53
53
  cb: (err: any, data?: PutUsersCommandOutput) => void
54
54
  ): void;
55
55
  }
56
+ export declare class PersonalizeEvents
57
+ extends PersonalizeEventsClient
58
+ implements PersonalizeEvents {}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-personalize-events",
3
3
  "description": "AWS SDK for JavaScript Personalize Events 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",