@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 54 lines 1.76 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 BatchGetRecordRequest {
7 /**
8 * The record-identifier values to retrieve from the bound feature group.
9 */
10 RecordIdentifiersValueAsString: string[];
11 /**
12 * Restrict the returned features to this subset (all features by default).
13 */
14 FeatureNames?: string[];
15 /**
16 * Include each record's `ExpiresAt` in the response (`"Enabled"`).
17 */
18 ExpirationTimeResponse?: featurestore.ExpirationTimeResponse;
19 }
20
21 /**
22 * Runtime binding for `sagemaker:BatchGetRecord` — read a batch of records
23 * from a `FeatureGroup`'s online store in one call.
24 *
25 * Bind this operation to a `FeatureGroup` inside a function runtime to get a
26 * callable that automatically scopes the batch identifiers to the bound
27 * feature group. Unknown identifiers are simply absent from `Records` (they
28 * are not errors).
29 * ### Reading Records
30 * **Example:** Batch-Get Records
31 * ```typescript
32 * // init
33 * const batchGetRecord = yield* AWS.SageMaker.BatchGetRecord(featureGroup);
34 *
35 * // runtime
36 * const { Records } = yield* batchGetRecord({
37 * RecordIdentifiersValueAsString: ["user-1", "user-2"],
38 * });
39 * ```
40 *
41 * @binding
42 */
43 export interface BatchGetRecord extends Binding.Service<
44 BatchGetRecord,
45 "AWS.SageMaker.BatchGetRecord",
46 <F extends FeatureGroup>(
47 featureGroup: F,
48 ) => Effect.Effect<
49 (
50 request: BatchGetRecordRequest,
51 ) => Effect.Effect<featurestore.BatchGetRecordResponse, featurestore.BatchGetRecordError>
52 >
53 > {}
54 export const BatchGetRecord = Binding.Service<BatchGetRecord>("AWS.SageMaker.BatchGetRecord");