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

main
ts 53 lines 1.88 KB
Raw
1 import type * as appflow from "@distilled.cloud/aws/appflow";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { ConnectorProfile } from "./ConnectorProfile.ts";
5
6 export interface ResetConnectorMetadataCacheRequest extends Omit<
7 appflow.ResetConnectorMetadataCacheRequest,
8 "connectorProfileName"
9 > {}
10
11 /**
12 * Runtime binding for `appflow:ResetConnectorMetadataCache`.
13 *
14 * Bind this operation to a {@link ConnectorProfile} in the function's init
15 * phase to get a callable that clears AppFlow's cached entity metadata for
16 * the profile, so the next `ListConnectorEntities` /
17 * `DescribeConnectorEntity` call fetches fresh metadata from the connected
18 * application. The connector profile name is injected automatically and
19 * `appflow:ResetConnectorMetadataCache` is granted on the profile. Provide
20 * the implementation with
21 * `Effect.provide(AWS.AppFlow.ResetConnectorMetadataCacheHttp)`.
22 * ### Discovering Connector Entities
23 * **Example:** Refresh Cached Entity Metadata
24 * ```typescript
25 * // init — bind the operation to the connector profile
26 * const resetConnectorMetadataCache =
27 * yield* AWS.AppFlow.ResetConnectorMetadataCache(profile);
28 *
29 * // runtime — drop the cache before re-listing entities
30 * yield* resetConnectorMetadataCache();
31 * const fresh = yield* listConnectorEntities();
32 * ```
33 *
34 * @binding
35 */
36 export interface ResetConnectorMetadataCache extends Binding.Service<
37 ResetConnectorMetadataCache,
38 "AWS.AppFlow.ResetConnectorMetadataCache",
39 (
40 profile: ConnectorProfile,
41 ) => Effect.Effect<
42 (
43 request?: ResetConnectorMetadataCacheRequest,
44 ) => Effect.Effect<
45 appflow.ResetConnectorMetadataCacheResponse,
46 appflow.ResetConnectorMetadataCacheError
47 >
48 >
49 > {}
50
51 export const ResetConnectorMetadataCache = Binding.Service<ResetConnectorMetadataCache>(
52 "AWS.AppFlow.ResetConnectorMetadataCache",
53 );