@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 42 lines 1.37 KB
Raw
1 import type * as personalizeruntime from "@distilled.cloud/aws/personalize-runtime";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `personalize:GetRecommendations` — Returns a list of recommended items for a user from a campaign or
7 * domain recommender — the core Personalize serving call. Campaign and
8 * recommender ARNs are chosen at runtime, so the binding takes no
9 * arguments and grants `personalize:GetRecommendations` on `*`.
10 * Provide the implementation with
11 * `Effect.provide(AWS.Personalize.GetRecommendationsHttp)`.
12 *
13 * ### Serving Recommendations
14 * **Example:** Recommend Items for a User
15 * ```typescript
16 * // init
17 * const getRecommendations = yield* Personalize.GetRecommendations();
18 *
19 * const { itemList } = yield* getRecommendations({
20 * campaignArn,
21 * userId: "user-1",
22 * numResults: 10,
23 * });
24 * ```
25 *
26 * @binding
27 */
28 export interface GetRecommendations extends Binding.Service<
29 GetRecommendations,
30 "AWS.Personalize.GetRecommendations",
31 () => Effect.Effect<
32 (
33 request: personalizeruntime.GetRecommendationsRequest,
34 ) => Effect.Effect<
35 personalizeruntime.GetRecommendationsResponse,
36 personalizeruntime.GetRecommendationsError
37 >
38 >
39 > {}
40 export const GetRecommendations = Binding.Service<GetRecommendations>(
41 "AWS.Personalize.GetRecommendations",
42 );