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

main
ts 40 lines 1.33 KB
Raw
1 import type * as featurestore from "@distilled.cloud/aws/sagemaker-featurestore-runtime";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { FeatureGroup } from "./FeatureGroup.ts";
5
6 export interface GetRecordRequest extends Omit<featurestore.GetRecordRequest, "FeatureGroupName"> {}
7
8 /**
9 * Runtime binding for `sagemaker:GetRecord` — read the latest record for an
10 * identifier from a `FeatureGroup`'s online store.
11 *
12 * Bind this operation to a `FeatureGroup` inside a function runtime to get a
13 * callable that automatically injects the feature group name. If no record
14 * exists for the identifier, the response's `Record` is empty.
15 * ### Reading Records
16 * **Example:** Get a Record
17 * ```typescript
18 * // init
19 * const getRecord = yield* AWS.SageMaker.GetRecord(featureGroup);
20 *
21 * // runtime
22 * const { Record } = yield* getRecord({
23 * RecordIdentifierValueAsString: "user-123",
24 * });
25 * ```
26 *
27 * @binding
28 */
29 export interface GetRecord extends Binding.Service<
30 GetRecord,
31 "AWS.SageMaker.GetRecord",
32 <F extends FeatureGroup>(
33 featureGroup: F,
34 ) => Effect.Effect<
35 (
36 request: GetRecordRequest,
37 ) => Effect.Effect<featurestore.GetRecordResponse, featurestore.GetRecordError>
38 >
39 > {}
40 export const GetRecord = Binding.Service<GetRecord>("AWS.SageMaker.GetRecord");