1 | import {Request} from '../lib/request';
|
2 | import {Response} from '../lib/response';
|
3 | import {AWSError} from '../lib/error';
|
4 | import {Service} from '../lib/service';
|
5 | import {ServiceConfigurationOptions} from '../lib/service';
|
6 | import {ConfigBase as Config} from '../lib/config';
|
7 | interface Blob {}
|
8 | declare class PersonalizeRuntime extends Service {
|
9 | |
10 |
|
11 |
|
12 | constructor(options?: PersonalizeRuntime.Types.ClientConfiguration)
|
13 | config: Config & PersonalizeRuntime.Types.ClientConfiguration;
|
14 | /**
|
15 | * Re-ranks a list of recommended items for the given user. The first item in the list is deemed the most likely item to be of interest to the user. The solution backing the campaign must have been created using a recipe of type PERSONALIZED_RANKING.
|
16 | */
|
17 | getPersonalizedRanking(params: PersonalizeRuntime.Types.GetPersonalizedRankingRequest, callback?: (err: AWSError, data: PersonalizeRuntime.Types.GetPersonalizedRankingResponse) => void): Request<PersonalizeRuntime.Types.GetPersonalizedRankingResponse, AWSError>;
|
18 | /**
|
19 | * Re-ranks a list of recommended items for the given user. The first item in the list is deemed the most likely item to be of interest to the user. The solution backing the campaign must have been created using a recipe of type PERSONALIZED_RANKING.
|
20 | */
|
21 | getPersonalizedRanking(callback?: (err: AWSError, data: PersonalizeRuntime.Types.GetPersonalizedRankingResponse) => void): Request<PersonalizeRuntime.Types.GetPersonalizedRankingResponse, AWSError>;
|
22 | /**
|
23 | * Returns a list of recommended items. The required input depends on the recipe type used to create the solution backing the campaign, as follows: RELATED_ITEMS - itemId required, userId not used USER_PERSONALIZATION - itemId optional, userId required Campaigns that are backed by a solution created using a recipe of type PERSONALIZED_RANKING use the API.
|
24 | */
|
25 | getRecommendations(params: PersonalizeRuntime.Types.GetRecommendationsRequest, callback?: (err: AWSError, data: PersonalizeRuntime.Types.GetRecommendationsResponse) => void): Request<PersonalizeRuntime.Types.GetRecommendationsResponse, AWSError>;
|
26 | /**
|
27 | * Returns a list of recommended items. The required input depends on the recipe type used to create the solution backing the campaign, as follows: RELATED_ITEMS - itemId required, userId not used USER_PERSONALIZATION - itemId optional, userId required Campaigns that are backed by a solution created using a recipe of type PERSONALIZED_RANKING use the API.
|
28 | */
|
29 | getRecommendations(callback?: (err: AWSError, data: PersonalizeRuntime.Types.GetRecommendationsResponse) => void): Request<PersonalizeRuntime.Types.GetRecommendationsResponse, AWSError>;
|
30 | }
|
31 | declare namespace PersonalizeRuntime {
|
32 | export type Arn = string;
|
33 | export interface GetPersonalizedRankingRequest {
|
34 | |
35 |
|
36 |
|
37 | campaignArn: Arn;
|
38 | |
39 |
|
40 |
|
41 | inputList: InputList;
|
42 | |
43 |
|
44 |
|
45 | userId: UserID;
|
46 | }
|
47 | export interface GetPersonalizedRankingResponse {
|
48 | |
49 |
|
50 |
|
51 | personalizedRanking?: ItemList;
|
52 | }
|
53 | export interface GetRecommendationsRequest {
|
54 | |
55 |
|
56 |
|
57 | campaignArn: Arn;
|
58 | |
59 |
|
60 |
|
61 | itemId?: ItemID;
|
62 | |
63 |
|
64 |
|
65 | userId?: UserID;
|
66 | |
67 |
|
68 |
|
69 | numResults?: NumResults;
|
70 | }
|
71 | export interface GetRecommendationsResponse {
|
72 | |
73 |
|
74 |
|
75 | itemList?: ItemList;
|
76 | }
|
77 | export type InputList = ItemID[];
|
78 | export type ItemID = string;
|
79 | export type ItemList = PredictedItem[];
|
80 | export type NumResults = number;
|
81 | export interface PredictedItem {
|
82 | |
83 |
|
84 |
|
85 | itemId?: ItemID;
|
86 | }
|
87 | export type UserID = string;
|
88 | |
89 |
|
90 |
|
91 | export type apiVersion = "2018-05-22"|"latest"|string;
|
92 | export interface ClientApiVersions {
|
93 | |
94 |
|
95 |
|
96 | apiVersion?: apiVersion;
|
97 | }
|
98 | export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
|
99 | |
100 |
|
101 |
|
102 | export import Types = PersonalizeRuntime;
|
103 | }
|
104 | export = PersonalizeRuntime;
|