@aws-sdk/client-personalize-runtime 3.34.0 → 3.37.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.
Files changed (104) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/{dist/cjs → dist-cjs}/PersonalizeRuntime.js +1 -5
  3. package/{dist/cjs → dist-cjs}/PersonalizeRuntimeClient.js +8 -17
  4. package/{dist/cjs → dist-cjs}/commands/GetPersonalizedRankingCommand.js +2 -32
  5. package/dist-cjs/commands/GetRecommendationsCommand.js +36 -0
  6. package/{dist/cjs → dist-cjs}/endpoints.js +1 -2
  7. package/{dist/cjs → dist-cjs}/index.js +0 -1
  8. package/{dist/cjs → dist-cjs}/models/index.js +0 -1
  9. package/{dist/cjs → dist-cjs}/models/models_0.js +0 -22
  10. package/{dist/cjs → dist-cjs}/protocols/Aws_restJson1.js +2 -8
  11. package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +1 -5
  12. package/{dist/cjs → dist-cjs}/runtimeConfig.js +1 -5
  13. package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -4
  14. package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -5
  15. package/{dist/es → dist-es}/PersonalizeRuntime.js +1 -2
  16. package/{dist/es → dist-es}/PersonalizeRuntimeClient.js +1 -2
  17. package/{dist/es → dist-es}/commands/GetPersonalizedRankingCommand.js +2 -3
  18. package/{dist/es → dist-es}/commands/GetRecommendationsCommand.js +2 -3
  19. package/{dist/es → dist-es}/endpoints.js +1 -2
  20. package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
  21. package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
  22. package/{dist/es → dist-es}/models/models_0.js +0 -1
  23. package/{dist/es → dist-es}/protocols/Aws_restJson1.js +0 -1
  24. package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -2
  25. package/{dist/es → dist-es}/runtimeConfig.js +1 -2
  26. package/{dist/es → dist-es}/runtimeConfig.native.js +0 -1
  27. package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -2
  28. package/{dist/types → dist-types}/PersonalizeRuntime.d.ts +2 -2
  29. package/{dist/types → dist-types}/PersonalizeRuntimeClient.d.ts +3 -3
  30. package/{dist/types → dist-types}/commands/GetPersonalizedRankingCommand.d.ts +3 -3
  31. package/{dist/types → dist-types}/commands/GetRecommendationsCommand.d.ts +3 -3
  32. package/{dist/types → dist-types}/endpoints.d.ts +0 -0
  33. package/{index.ts → dist-types/index.d.ts} +0 -0
  34. package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
  35. package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
  36. package/{dist/types → dist-types}/protocols/Aws_restJson1.d.ts +2 -2
  37. package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +0 -0
  38. package/{dist/types → dist-types}/runtimeConfig.d.ts +1 -1
  39. package/{dist/types → dist-types}/runtimeConfig.native.d.ts +0 -0
  40. package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
  41. package/{dist/types → dist-types}/ts3.4/PersonalizeRuntime.d.ts +5 -30
  42. package/dist-types/ts3.4/PersonalizeRuntimeClient.d.ts +69 -0
  43. package/dist-types/ts3.4/commands/GetPersonalizedRankingCommand.d.ts +17 -0
  44. package/dist-types/ts3.4/commands/GetRecommendationsCommand.d.ts +17 -0
  45. package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
  46. package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
  47. package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
  48. package/dist-types/ts3.4/models/models_0.d.ts +98 -0
  49. package/{dist/types → dist-types}/ts3.4/protocols/Aws_restJson1.d.ts +2 -2
  50. package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -3
  51. package/{dist/types → dist-types}/ts3.4/runtimeConfig.d.ts +2 -4
  52. package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -3
  53. package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +1 -3
  54. package/package.json +45 -42
  55. package/PersonalizeRuntime.ts +0 -100
  56. package/PersonalizeRuntimeClient.ts +0 -240
  57. package/commands/GetPersonalizedRankingCommand.ts +0 -103
  58. package/commands/GetRecommendationsCommand.ts +0 -112
  59. package/dist/cjs/PersonalizeRuntime.js.map +0 -1
  60. package/dist/cjs/PersonalizeRuntimeClient.js.map +0 -1
  61. package/dist/cjs/commands/GetPersonalizedRankingCommand.js.map +0 -1
  62. package/dist/cjs/commands/GetRecommendationsCommand.js +0 -75
  63. package/dist/cjs/commands/GetRecommendationsCommand.js.map +0 -1
  64. package/dist/cjs/endpoints.js.map +0 -1
  65. package/dist/cjs/index.js.map +0 -1
  66. package/dist/cjs/models/index.js.map +0 -1
  67. package/dist/cjs/models/models_0.js.map +0 -1
  68. package/dist/cjs/package.json +0 -91
  69. package/dist/cjs/protocols/Aws_restJson1.js.map +0 -1
  70. package/dist/cjs/runtimeConfig.browser.js.map +0 -1
  71. package/dist/cjs/runtimeConfig.js.map +0 -1
  72. package/dist/cjs/runtimeConfig.native.js.map +0 -1
  73. package/dist/cjs/runtimeConfig.shared.js.map +0 -1
  74. package/dist/es/PersonalizeRuntime.js.map +0 -1
  75. package/dist/es/PersonalizeRuntimeClient.js.map +0 -1
  76. package/dist/es/commands/GetPersonalizedRankingCommand.js.map +0 -1
  77. package/dist/es/commands/GetRecommendationsCommand.js.map +0 -1
  78. package/dist/es/endpoints.js.map +0 -1
  79. package/dist/es/index.js +0 -6
  80. package/dist/es/index.js.map +0 -1
  81. package/dist/es/models/index.js +0 -2
  82. package/dist/es/models/index.js.map +0 -1
  83. package/dist/es/models/models_0.js.map +0 -1
  84. package/dist/es/package.json +0 -91
  85. package/dist/es/protocols/Aws_restJson1.js.map +0 -1
  86. package/dist/es/runtimeConfig.browser.js.map +0 -1
  87. package/dist/es/runtimeConfig.js.map +0 -1
  88. package/dist/es/runtimeConfig.native.js.map +0 -1
  89. package/dist/es/runtimeConfig.shared.js.map +0 -1
  90. package/dist/types/ts3.4/PersonalizeRuntimeClient.d.ts +0 -134
  91. package/dist/types/ts3.4/commands/GetPersonalizedRankingCommand.d.ts +0 -40
  92. package/dist/types/ts3.4/commands/GetRecommendationsCommand.d.ts +0 -49
  93. package/dist/types/ts3.4/models/models_0.d.ts +0 -190
  94. package/endpoints.ts +0 -57
  95. package/jest.config.js +0 -4
  96. package/models/models_0.ts +0 -229
  97. package/protocols/Aws_restJson1.ts +0 -372
  98. package/runtimeConfig.browser.ts +0 -40
  99. package/runtimeConfig.native.ts +0 -16
  100. package/runtimeConfig.shared.ts +0 -16
  101. package/runtimeConfig.ts +0 -45
  102. package/tsconfig.es.json +0 -10
  103. package/tsconfig.json +0 -31
  104. package/tsconfig.types.json +0 -8
@@ -1,7 +1,7 @@
1
- import { PersonalizeRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PersonalizeRuntimeClient";
2
- import { GetRecommendationsRequest, GetRecommendationsResponse } from "../models/models_0";
3
1
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { Handler, MiddlewareStack, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer } from "@aws-sdk/types";
2
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { GetRecommendationsRequest, GetRecommendationsResponse } from "../models/models_0";
4
+ import { PersonalizeRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PersonalizeRuntimeClient";
5
5
  export interface GetRecommendationsCommandInput extends GetRecommendationsRequest {
6
6
  }
7
7
  export interface GetRecommendationsCommandOutput extends GetRecommendationsResponse, __MetadataBearer {
File without changes
File without changes
File without changes
@@ -1,7 +1,7 @@
1
- import { GetPersonalizedRankingCommandInput, GetPersonalizedRankingCommandOutput } from "../commands/GetPersonalizedRankingCommand";
2
- import { GetRecommendationsCommandInput, GetRecommendationsCommandOutput } from "../commands/GetRecommendationsCommand";
3
1
  import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
4
2
  import { SerdeContext as __SerdeContext } from "@aws-sdk/types";
3
+ import { GetPersonalizedRankingCommandInput, GetPersonalizedRankingCommandOutput } from "../commands/GetPersonalizedRankingCommand";
4
+ import { GetRecommendationsCommandInput, GetRecommendationsCommandOutput } from "../commands/GetRecommendationsCommand";
5
5
  export declare const serializeAws_restJson1GetPersonalizedRankingCommand: (input: GetPersonalizedRankingCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
6
6
  export declare const serializeAws_restJson1GetRecommendationsCommand: (input: GetRecommendationsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
7
7
  export declare const deserializeAws_restJson1GetPersonalizedRankingCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetPersonalizedRankingCommandOutput>;
@@ -8,7 +8,7 @@ export declare const getRuntimeConfig: (config: PersonalizeRuntimeClientConfig)
8
8
  base64Decoder: import("@aws-sdk/types").Decoder;
9
9
  base64Encoder: import("@aws-sdk/types").Encoder;
10
10
  bodyLengthChecker: (body: any) => number | undefined;
11
- credentialDefaultProvider: import("@aws-sdk/client-sts/dist/types/defaultStsRoleAssumers").DefaultCredentialProvider;
11
+ credentialDefaultProvider: import("@aws-sdk/client-sts/dist-types/defaultStsRoleAssumers").DefaultCredentialProvider;
12
12
  defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
13
13
  maxAttempts: number | import("@aws-sdk/types").Provider<number>;
14
14
  region: string | import("@aws-sdk/types").Provider<string>;
@@ -1,39 +1,14 @@
1
- import { PersonalizeRuntimeClient } from "./PersonalizeRuntimeClient";
1
+ import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
2
2
  import { GetPersonalizedRankingCommandInput, GetPersonalizedRankingCommandOutput } from "./commands/GetPersonalizedRankingCommand";
3
3
  import { GetRecommendationsCommandInput, GetRecommendationsCommandOutput } from "./commands/GetRecommendationsCommand";
4
- import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
5
- /**
6
- * <p></p>
7
- */
4
+ import { PersonalizeRuntimeClient } from "./PersonalizeRuntimeClient";
5
+
8
6
  export declare class PersonalizeRuntime extends PersonalizeRuntimeClient {
9
- /**
10
- * <p>Re-ranks a list of recommended items for the given user. The first item in the list is
11
- * deemed the most likely item to be of interest to the user.</p>
12
- * <note>
13
- * <p>The solution backing the campaign must have been created using a recipe of type
14
- * PERSONALIZED_RANKING.</p>
15
- * </note>
16
- */
7
+
17
8
  getPersonalizedRanking(args: GetPersonalizedRankingCommandInput, options?: __HttpHandlerOptions): Promise<GetPersonalizedRankingCommandOutput>;
18
9
  getPersonalizedRanking(args: GetPersonalizedRankingCommandInput, cb: (err: any, data?: GetPersonalizedRankingCommandOutput) => void): void;
19
10
  getPersonalizedRanking(args: GetPersonalizedRankingCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPersonalizedRankingCommandOutput) => void): void;
20
- /**
21
- * <p>Returns a list of recommended items. The required input depends on the recipe type used to
22
- * create the solution backing the campaign, as follows:</p>
23
- * <ul>
24
- * <li>
25
- * <p>RELATED_ITEMS - <code>itemId</code> required, <code>userId</code> not used</p>
26
- * </li>
27
- * <li>
28
- * <p>USER_PERSONALIZATION - <code>itemId</code> optional, <code>userId</code>
29
- * required</p>
30
- * </li>
31
- * </ul>
32
- * <note>
33
- * <p>Campaigns that are backed by a solution created using a recipe of type
34
- * PERSONALIZED_RANKING use the API.</p>
35
- * </note>
36
- */
11
+
37
12
  getRecommendations(args: GetRecommendationsCommandInput, options?: __HttpHandlerOptions): Promise<GetRecommendationsCommandOutput>;
38
13
  getRecommendations(args: GetRecommendationsCommandInput, cb: (err: any, data?: GetRecommendationsCommandOutput) => void): void;
39
14
  getRecommendations(args: GetRecommendationsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetRecommendationsCommandOutput) => void): void;
@@ -0,0 +1,69 @@
1
+ import { EndpointsInputConfig, EndpointsResolvedConfig, RegionInputConfig, RegionResolvedConfig } from "@aws-sdk/config-resolver";
2
+ import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
3
+ import { RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry";
4
+ import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
5
+ import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
6
+ import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
7
+ import { Client as __Client, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
8
+ import { Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
9
+ import { GetPersonalizedRankingCommandInput, GetPersonalizedRankingCommandOutput } from "./commands/GetPersonalizedRankingCommand";
10
+ import { GetRecommendationsCommandInput, GetRecommendationsCommandOutput } from "./commands/GetRecommendationsCommand";
11
+ export declare type ServiceInputTypes = GetPersonalizedRankingCommandInput | GetRecommendationsCommandInput;
12
+ export declare type ServiceOutputTypes = GetPersonalizedRankingCommandOutput | GetRecommendationsCommandOutput;
13
+ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
14
+
15
+ requestHandler?: __HttpHandler;
16
+
17
+ sha256?: __HashConstructor;
18
+
19
+ urlParser?: __UrlParser;
20
+
21
+ bodyLengthChecker?: (body: any) => number | undefined;
22
+
23
+ streamCollector?: __StreamCollector;
24
+
25
+ base64Decoder?: __Decoder;
26
+
27
+ base64Encoder?: __Encoder;
28
+
29
+ utf8Decoder?: __Decoder;
30
+
31
+ utf8Encoder?: __Encoder;
32
+
33
+ runtime?: string;
34
+
35
+ disableHostPrefix?: boolean;
36
+
37
+ maxAttempts?: number | __Provider<number>;
38
+
39
+ retryMode?: string | __Provider<string>;
40
+
41
+ logger?: __Logger;
42
+
43
+ serviceId?: string;
44
+
45
+ region?: string | __Provider<string>;
46
+
47
+ credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
48
+
49
+ regionInfoProvider?: RegionInfoProvider;
50
+
51
+ defaultUserAgentProvider?: Provider<__UserAgent>;
52
+ }
53
+ declare type PersonalizeRuntimeClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointsInputConfig & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig;
54
+
55
+ export interface PersonalizeRuntimeClientConfig extends PersonalizeRuntimeClientConfigType {
56
+ }
57
+ declare type PersonalizeRuntimeClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RegionResolvedConfig & EndpointsResolvedConfig & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig;
58
+
59
+ export interface PersonalizeRuntimeClientResolvedConfig extends PersonalizeRuntimeClientResolvedConfigType {
60
+ }
61
+
62
+ export declare class PersonalizeRuntimeClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, PersonalizeRuntimeClientResolvedConfig> {
63
+
64
+ readonly config: PersonalizeRuntimeClientResolvedConfig;
65
+ constructor(configuration: PersonalizeRuntimeClientConfig);
66
+
67
+ destroy(): void;
68
+ }
69
+ export {};
@@ -0,0 +1,17 @@
1
+ import { Command as $Command } from "@aws-sdk/smithy-client";
2
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { GetPersonalizedRankingRequest, GetPersonalizedRankingResponse } from "../models/models_0";
4
+ import { PersonalizeRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PersonalizeRuntimeClient";
5
+ export interface GetPersonalizedRankingCommandInput extends GetPersonalizedRankingRequest {
6
+ }
7
+ export interface GetPersonalizedRankingCommandOutput extends GetPersonalizedRankingResponse, __MetadataBearer {
8
+ }
9
+
10
+ export declare class GetPersonalizedRankingCommand extends $Command<GetPersonalizedRankingCommandInput, GetPersonalizedRankingCommandOutput, PersonalizeRuntimeClientResolvedConfig> {
11
+ readonly input: GetPersonalizedRankingCommandInput;
12
+ constructor(input: GetPersonalizedRankingCommandInput);
13
+
14
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: PersonalizeRuntimeClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetPersonalizedRankingCommandInput, GetPersonalizedRankingCommandOutput>;
15
+ private serialize;
16
+ private deserialize;
17
+ }
@@ -0,0 +1,17 @@
1
+ import { Command as $Command } from "@aws-sdk/smithy-client";
2
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { GetRecommendationsRequest, GetRecommendationsResponse } from "../models/models_0";
4
+ import { PersonalizeRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PersonalizeRuntimeClient";
5
+ export interface GetRecommendationsCommandInput extends GetRecommendationsRequest {
6
+ }
7
+ export interface GetRecommendationsCommandOutput extends GetRecommendationsResponse, __MetadataBearer {
8
+ }
9
+
10
+ export declare class GetRecommendationsCommand extends $Command<GetRecommendationsCommandInput, GetRecommendationsCommandOutput, PersonalizeRuntimeClientResolvedConfig> {
11
+ readonly input: GetRecommendationsCommandInput;
12
+ constructor(input: GetRecommendationsCommandInput);
13
+
14
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: PersonalizeRuntimeClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetRecommendationsCommandInput, GetRecommendationsCommandOutput>;
15
+ private serialize;
16
+ private deserialize;
17
+ }
File without changes
File without changes
@@ -0,0 +1,98 @@
1
+ import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types";
2
+ export interface GetPersonalizedRankingRequest {
3
+
4
+ campaignArn: string | undefined;
5
+
6
+ inputList: string[] | undefined;
7
+
8
+ userId: string | undefined;
9
+
10
+ context?: {
11
+ [key: string]: string;
12
+ };
13
+
14
+ filterArn?: string;
15
+
16
+ filterValues?: {
17
+ [key: string]: string;
18
+ };
19
+ }
20
+ export declare namespace GetPersonalizedRankingRequest {
21
+
22
+ const filterSensitiveLog: (obj: GetPersonalizedRankingRequest) => any;
23
+ }
24
+
25
+ export interface PredictedItem {
26
+
27
+ itemId?: string;
28
+
29
+ score?: number;
30
+ }
31
+ export declare namespace PredictedItem {
32
+
33
+ const filterSensitiveLog: (obj: PredictedItem) => any;
34
+ }
35
+ export interface GetPersonalizedRankingResponse {
36
+
37
+ personalizedRanking?: PredictedItem[];
38
+
39
+ recommendationId?: string;
40
+ }
41
+ export declare namespace GetPersonalizedRankingResponse {
42
+
43
+ const filterSensitiveLog: (obj: GetPersonalizedRankingResponse) => any;
44
+ }
45
+
46
+ export interface InvalidInputException extends __SmithyException, $MetadataBearer {
47
+ name: "InvalidInputException";
48
+ $fault: "client";
49
+ message?: string;
50
+ }
51
+ export declare namespace InvalidInputException {
52
+
53
+ const filterSensitiveLog: (obj: InvalidInputException) => any;
54
+ }
55
+
56
+ export interface ResourceNotFoundException extends __SmithyException, $MetadataBearer {
57
+ name: "ResourceNotFoundException";
58
+ $fault: "client";
59
+ message?: string;
60
+ }
61
+ export declare namespace ResourceNotFoundException {
62
+
63
+ const filterSensitiveLog: (obj: ResourceNotFoundException) => any;
64
+ }
65
+ export interface GetRecommendationsRequest {
66
+
67
+ campaignArn: string | undefined;
68
+
69
+ itemId?: string;
70
+
71
+ userId?: string;
72
+
73
+ numResults?: number;
74
+
75
+ context?: {
76
+ [key: string]: string;
77
+ };
78
+
79
+ filterArn?: string;
80
+
81
+ filterValues?: {
82
+ [key: string]: string;
83
+ };
84
+ }
85
+ export declare namespace GetRecommendationsRequest {
86
+
87
+ const filterSensitiveLog: (obj: GetRecommendationsRequest) => any;
88
+ }
89
+ export interface GetRecommendationsResponse {
90
+
91
+ itemList?: PredictedItem[];
92
+
93
+ recommendationId?: string;
94
+ }
95
+ export declare namespace GetRecommendationsResponse {
96
+
97
+ const filterSensitiveLog: (obj: GetRecommendationsResponse) => any;
98
+ }
@@ -1,7 +1,7 @@
1
- import { GetPersonalizedRankingCommandInput, GetPersonalizedRankingCommandOutput } from "../commands/GetPersonalizedRankingCommand";
2
- import { GetRecommendationsCommandInput, GetRecommendationsCommandOutput } from "../commands/GetRecommendationsCommand";
3
1
  import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
4
2
  import { SerdeContext as __SerdeContext } from "@aws-sdk/types";
3
+ import { GetPersonalizedRankingCommandInput, GetPersonalizedRankingCommandOutput } from "../commands/GetPersonalizedRankingCommand";
4
+ import { GetRecommendationsCommandInput, GetRecommendationsCommandOutput } from "../commands/GetRecommendationsCommand";
5
5
  export declare const serializeAws_restJson1GetPersonalizedRankingCommand: (input: GetPersonalizedRankingCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
6
6
  export declare const serializeAws_restJson1GetRecommendationsCommand: (input: GetRecommendationsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
7
7
  export declare const deserializeAws_restJson1GetPersonalizedRankingCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetPersonalizedRankingCommandOutput>;
@@ -1,8 +1,6 @@
1
1
  import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler";
2
2
  import { PersonalizeRuntimeClientConfig } from "./PersonalizeRuntimeClient";
3
- /**
4
- * @internal
5
- */
3
+
6
4
  export declare const getRuntimeConfig: (config: PersonalizeRuntimeClientConfig) => {
7
5
  runtime: string;
8
6
  base64Decoder: import("@aws-sdk/types").Decoder;
@@ -1,14 +1,12 @@
1
1
  import { NodeHttpHandler } from "@aws-sdk/node-http-handler";
2
2
  import { PersonalizeRuntimeClientConfig } from "./PersonalizeRuntimeClient";
3
- /**
4
- * @internal
5
- */
3
+
6
4
  export declare const getRuntimeConfig: (config: PersonalizeRuntimeClientConfig) => {
7
5
  runtime: string;
8
6
  base64Decoder: import("@aws-sdk/types").Decoder;
9
7
  base64Encoder: import("@aws-sdk/types").Encoder;
10
8
  bodyLengthChecker: (body: any) => number | undefined;
11
- credentialDefaultProvider: import("@aws-sdk/client-sts/dist/types/defaultStsRoleAssumers").DefaultCredentialProvider;
9
+ credentialDefaultProvider: import("@aws-sdk/client-sts/dist-types/defaultStsRoleAssumers").DefaultCredentialProvider;
12
10
  defaultUserAgentProvider: import("@aws-sdk/types").Provider<import("@aws-sdk/types").UserAgent>;
13
11
  maxAttempts: number | import("@aws-sdk/types").Provider<number>;
14
12
  region: string | import("@aws-sdk/types").Provider<string>;
@@ -1,7 +1,5 @@
1
1
  import { PersonalizeRuntimeClientConfig } from "./PersonalizeRuntimeClient";
2
- /**
3
- * @internal
4
- */
2
+
5
3
  export declare const getRuntimeConfig: (config: PersonalizeRuntimeClientConfig) => {
6
4
  runtime: string;
7
5
  sha256: import("@aws-sdk/types").HashConstructor;
@@ -1,8 +1,6 @@
1
1
  import { Logger as __Logger } from "@aws-sdk/types";
2
2
  import { PersonalizeRuntimeClientConfig } from "./PersonalizeRuntimeClient";
3
- /**
4
- * @internal
5
- */
3
+
6
4
  export declare const getRuntimeConfig: (config: PersonalizeRuntimeClientConfig) => {
7
5
  apiVersion: string;
8
6
  disableHostPrefix: boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-personalize-runtime",
3
3
  "description": "AWS SDK for JavaScript Personalize Runtime Client for Node.js, Browser and React Native",
4
- "version": "3.34.0",
4
+ "version": "3.37.0",
5
5
  "scripts": {
6
6
  "build": "yarn build:cjs && yarn build:es && yarn build:types",
7
7
  "build:cjs": "tsc -p tsconfig.json",
@@ -11,54 +11,48 @@
11
11
  "clean": "yarn clean:dist && yarn clean:docs",
12
12
  "clean:dist": "rimraf ./dist",
13
13
  "clean:docs": "rimraf ./docs",
14
- "downlevel-dts": "downlevel-dts dist/types dist/types/ts3.4",
14
+ "downlevel-dts": "downlevel-dts dist-types dist-types/ts3.4",
15
15
  "test": "exit 0"
16
16
  },
17
- "main": "./dist/cjs/index.js",
18
- "types": "./dist/types/index.d.ts",
19
- "module": "./dist/es/index.js",
20
- "browser": {
21
- "./runtimeConfig": "./runtimeConfig.browser"
22
- },
23
- "react-native": {
24
- "./runtimeConfig": "./runtimeConfig.native"
25
- },
17
+ "main": "./dist-cjs/index.js",
18
+ "types": "./dist-types/index.d.ts",
19
+ "module": "./dist-es/index.js",
26
20
  "sideEffects": false,
27
21
  "dependencies": {
28
22
  "@aws-crypto/sha256-browser": "^1.0.0",
29
23
  "@aws-crypto/sha256-js": "^1.0.0",
30
- "@aws-sdk/client-sts": "3.34.0",
31
- "@aws-sdk/config-resolver": "3.34.0",
32
- "@aws-sdk/credential-provider-node": "3.34.0",
33
- "@aws-sdk/fetch-http-handler": "3.34.0",
34
- "@aws-sdk/hash-node": "3.34.0",
35
- "@aws-sdk/invalid-dependency": "3.34.0",
36
- "@aws-sdk/middleware-content-length": "3.34.0",
37
- "@aws-sdk/middleware-host-header": "3.34.0",
38
- "@aws-sdk/middleware-logger": "3.34.0",
39
- "@aws-sdk/middleware-retry": "3.34.0",
40
- "@aws-sdk/middleware-serde": "3.34.0",
41
- "@aws-sdk/middleware-signing": "3.34.0",
42
- "@aws-sdk/middleware-stack": "3.34.0",
43
- "@aws-sdk/middleware-user-agent": "3.34.0",
44
- "@aws-sdk/node-config-provider": "3.34.0",
45
- "@aws-sdk/node-http-handler": "3.34.0",
46
- "@aws-sdk/protocol-http": "3.34.0",
47
- "@aws-sdk/smithy-client": "3.34.0",
48
- "@aws-sdk/types": "3.34.0",
49
- "@aws-sdk/url-parser": "3.34.0",
50
- "@aws-sdk/util-base64-browser": "3.34.0",
51
- "@aws-sdk/util-base64-node": "3.34.0",
52
- "@aws-sdk/util-body-length-browser": "3.34.0",
53
- "@aws-sdk/util-body-length-node": "3.34.0",
54
- "@aws-sdk/util-user-agent-browser": "3.34.0",
55
- "@aws-sdk/util-user-agent-node": "3.34.0",
56
- "@aws-sdk/util-utf8-browser": "3.34.0",
57
- "@aws-sdk/util-utf8-node": "3.34.0",
24
+ "@aws-sdk/client-sts": "3.37.0",
25
+ "@aws-sdk/config-resolver": "3.37.0",
26
+ "@aws-sdk/credential-provider-node": "3.37.0",
27
+ "@aws-sdk/fetch-http-handler": "3.37.0",
28
+ "@aws-sdk/hash-node": "3.37.0",
29
+ "@aws-sdk/invalid-dependency": "3.37.0",
30
+ "@aws-sdk/middleware-content-length": "3.37.0",
31
+ "@aws-sdk/middleware-host-header": "3.37.0",
32
+ "@aws-sdk/middleware-logger": "3.37.0",
33
+ "@aws-sdk/middleware-retry": "3.37.0",
34
+ "@aws-sdk/middleware-serde": "3.37.0",
35
+ "@aws-sdk/middleware-signing": "3.37.0",
36
+ "@aws-sdk/middleware-stack": "3.37.0",
37
+ "@aws-sdk/middleware-user-agent": "3.37.0",
38
+ "@aws-sdk/node-config-provider": "3.37.0",
39
+ "@aws-sdk/node-http-handler": "3.37.0",
40
+ "@aws-sdk/protocol-http": "3.37.0",
41
+ "@aws-sdk/smithy-client": "3.37.0",
42
+ "@aws-sdk/types": "3.37.0",
43
+ "@aws-sdk/url-parser": "3.37.0",
44
+ "@aws-sdk/util-base64-browser": "3.37.0",
45
+ "@aws-sdk/util-base64-node": "3.37.0",
46
+ "@aws-sdk/util-body-length-browser": "3.37.0",
47
+ "@aws-sdk/util-body-length-node": "3.37.0",
48
+ "@aws-sdk/util-user-agent-browser": "3.37.0",
49
+ "@aws-sdk/util-user-agent-node": "3.37.0",
50
+ "@aws-sdk/util-utf8-browser": "3.37.0",
51
+ "@aws-sdk/util-utf8-node": "3.37.0",
58
52
  "tslib": "^2.3.0"
59
53
  },
60
54
  "devDependencies": {
61
- "@aws-sdk/client-documentation-generator": "3.34.0",
55
+ "@aws-sdk/client-documentation-generator": "3.37.0",
62
56
  "@types/node": "^12.7.5",
63
57
  "downlevel-dts": "0.7.0",
64
58
  "jest": "^26.1.0",
@@ -72,16 +66,25 @@
72
66
  },
73
67
  "typesVersions": {
74
68
  "<4.0": {
75
- "dist/types/*": [
76
- "dist/types/ts3.4/*"
69
+ "dist-types/*": [
70
+ "dist-types/ts3.4/*"
77
71
  ]
78
72
  }
79
73
  },
74
+ "files": [
75
+ "dist-*"
76
+ ],
80
77
  "author": {
81
78
  "name": "AWS SDK for JavaScript Team",
82
79
  "url": "https://aws.amazon.com/javascript/"
83
80
  },
84
81
  "license": "Apache-2.0",
82
+ "browser": {
83
+ "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
84
+ },
85
+ "react-native": {
86
+ "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
87
+ },
85
88
  "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-personalize-runtime",
86
89
  "repository": {
87
90
  "type": "git",
@@ -1,100 +0,0 @@
1
- import { PersonalizeRuntimeClient } from "./PersonalizeRuntimeClient";
2
- import {
3
- GetPersonalizedRankingCommand,
4
- GetPersonalizedRankingCommandInput,
5
- GetPersonalizedRankingCommandOutput,
6
- } from "./commands/GetPersonalizedRankingCommand";
7
- import {
8
- GetRecommendationsCommand,
9
- GetRecommendationsCommandInput,
10
- GetRecommendationsCommandOutput,
11
- } from "./commands/GetRecommendationsCommand";
12
- import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
13
-
14
- /**
15
- * <p></p>
16
- */
17
- export class PersonalizeRuntime extends PersonalizeRuntimeClient {
18
- /**
19
- * <p>Re-ranks a list of recommended items for the given user. The first item in the list is
20
- * deemed the most likely item to be of interest to the user.</p>
21
- * <note>
22
- * <p>The solution backing the campaign must have been created using a recipe of type
23
- * PERSONALIZED_RANKING.</p>
24
- * </note>
25
- */
26
- public getPersonalizedRanking(
27
- args: GetPersonalizedRankingCommandInput,
28
- options?: __HttpHandlerOptions
29
- ): Promise<GetPersonalizedRankingCommandOutput>;
30
- public getPersonalizedRanking(
31
- args: GetPersonalizedRankingCommandInput,
32
- cb: (err: any, data?: GetPersonalizedRankingCommandOutput) => void
33
- ): void;
34
- public getPersonalizedRanking(
35
- args: GetPersonalizedRankingCommandInput,
36
- options: __HttpHandlerOptions,
37
- cb: (err: any, data?: GetPersonalizedRankingCommandOutput) => void
38
- ): void;
39
- public getPersonalizedRanking(
40
- args: GetPersonalizedRankingCommandInput,
41
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetPersonalizedRankingCommandOutput) => void),
42
- cb?: (err: any, data?: GetPersonalizedRankingCommandOutput) => void
43
- ): Promise<GetPersonalizedRankingCommandOutput> | void {
44
- const command = new GetPersonalizedRankingCommand(args);
45
- if (typeof optionsOrCb === "function") {
46
- this.send(command, optionsOrCb);
47
- } else if (typeof cb === "function") {
48
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
49
- this.send(command, optionsOrCb || {}, cb);
50
- } else {
51
- return this.send(command, optionsOrCb);
52
- }
53
- }
54
-
55
- /**
56
- * <p>Returns a list of recommended items. The required input depends on the recipe type used to
57
- * create the solution backing the campaign, as follows:</p>
58
- * <ul>
59
- * <li>
60
- * <p>RELATED_ITEMS - <code>itemId</code> required, <code>userId</code> not used</p>
61
- * </li>
62
- * <li>
63
- * <p>USER_PERSONALIZATION - <code>itemId</code> optional, <code>userId</code>
64
- * required</p>
65
- * </li>
66
- * </ul>
67
- * <note>
68
- * <p>Campaigns that are backed by a solution created using a recipe of type
69
- * PERSONALIZED_RANKING use the API.</p>
70
- * </note>
71
- */
72
- public getRecommendations(
73
- args: GetRecommendationsCommandInput,
74
- options?: __HttpHandlerOptions
75
- ): Promise<GetRecommendationsCommandOutput>;
76
- public getRecommendations(
77
- args: GetRecommendationsCommandInput,
78
- cb: (err: any, data?: GetRecommendationsCommandOutput) => void
79
- ): void;
80
- public getRecommendations(
81
- args: GetRecommendationsCommandInput,
82
- options: __HttpHandlerOptions,
83
- cb: (err: any, data?: GetRecommendationsCommandOutput) => void
84
- ): void;
85
- public getRecommendations(
86
- args: GetRecommendationsCommandInput,
87
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetRecommendationsCommandOutput) => void),
88
- cb?: (err: any, data?: GetRecommendationsCommandOutput) => void
89
- ): Promise<GetRecommendationsCommandOutput> | void {
90
- const command = new GetRecommendationsCommand(args);
91
- if (typeof optionsOrCb === "function") {
92
- this.send(command, optionsOrCb);
93
- } else if (typeof cb === "function") {
94
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
95
- this.send(command, optionsOrCb || {}, cb);
96
- } else {
97
- return this.send(command, optionsOrCb);
98
- }
99
- }
100
- }