File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import {
1212} from "@aws-sdk/client-bedrock-agentcore" ;
1313import type { RuntimeInvokeRequest } from "../handlers/runtime/types" ;
1414import { CoreClient } from "./index" ;
15- import type { ClientConfig , RuntimeFetch } from "./types" ;
15+ import type { ClientConfig , CoreFetch } from "./types" ;
1616import { toClientConfig } from "./utils" ;
1717import { createSilentLogger } from "../testing" ;
1818
@@ -52,7 +52,7 @@ async function resolveRuntimeApplicationHeaders(
5252 return headers ;
5353}
5454
55- function customJwtCore ( fetch : RuntimeFetch , endpoint = "https://runtime.test" ) : CoreClient {
55+ function customJwtCore ( fetch : CoreFetch , endpoint = "https://runtime.test" ) : CoreClient {
5656 return new CoreClient ( {
5757 createControlClient : fakeControl ,
5858 createDataClient : ( config ) =>
Original file line number Diff line number Diff line change @@ -7,10 +7,10 @@ import { RuntimeClient } from "./runtime";
77import type {
88 AwsClients ,
99 ClientConfig ,
10+ CoreFetch ,
1011 CreateControlClient ,
1112 CreateDataClient ,
1213 CreateIamClient ,
13- RuntimeFetch ,
1414} from "./types" ;
1515import type { Logger } from "../logging" ;
1616import type { ProjectManager } from "../handlers/project/types" ;
@@ -19,18 +19,18 @@ import { FsProjectManager } from "./project";
1919export type {
2020 AwsClients ,
2121 ClientConfig ,
22+ CoreFetch ,
2223 CreateControlClient ,
2324 CreateDataClient ,
2425 CreateIamClient ,
25- RuntimeFetch ,
2626} from "./types" ;
2727
2828type CoreClientConfig = {
2929 createControlClient : CreateControlClient ;
3030 createDataClient : CreateDataClient ;
3131 createIamClient : CreateIamClient ;
3232 logger : Logger ;
33- fetch ?: RuntimeFetch ;
33+ fetch ?: CoreFetch ;
3434} ;
3535
3636// CoreClient is the single entry point to the Bedrock AgentCore APIs. It owns the
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import type {
1616 RuntimeInvokeRequest ,
1717 RuntimeInvokeResponse ,
1818} from "../handlers/runtime/types" ;
19- import type { AwsClients , CoreOptions , RuntimeFetch } from "./types" ;
19+ import type { AwsClients , CoreFetch , CoreOptions } from "./types" ;
2020import { abortable } from "./abortable" ;
2121import { toClientConfig } from "./utils" ;
2222
@@ -25,7 +25,7 @@ async function* emptyBody(): AsyncGenerator<Uint8Array> {}
2525export class RuntimeClient implements CoreRuntimeClient {
2626 constructor (
2727 private readonly clients : AwsClients ,
28- private readonly fetch : RuntimeFetch ,
28+ private readonly fetch : CoreFetch ,
2929 ) { }
3030
3131 async invokeRuntime (
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export interface ClientConfig {
2525export type CreateControlClient = ( config : ClientConfig ) => BedrockAgentCoreControlClient ;
2626export type CreateDataClient = ( config : ClientConfig ) => BedrockAgentCoreClient ;
2727export type CreateIamClient = ( config : ClientConfig ) => IAMClient ;
28- export type RuntimeFetch = (
28+ export type CoreFetch = (
2929 ...args : Parameters < typeof globalThis . fetch >
3030) => ReturnType < typeof globalThis . fetch > ;
3131
You can’t perform that action at this time.
0 commit comments