New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aws-sdk/client-bedrock-agent-runtime

Package Overview
Dependencies
Maintainers
5
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/client-bedrock-agent-runtime - npm Package Compare versions

Comparing version 3.556.0 to 3.560.0

66

dist-es/models/models_0.js

@@ -65,2 +65,16 @@ import { SENSITIVE_STRING } from "@smithy/smithy-client";

}
export const ResponseState = {
FAILURE: "FAILURE",
REPROMPT: "REPROMPT",
};
export var InvocationResultMember;
(function (InvocationResultMember) {
InvocationResultMember.visit = (value, visitor) => {
if (value.apiResult !== undefined)
return visitor.apiResult(value.apiResult);
if (value.functionResult !== undefined)
return visitor.functionResult(value.functionResult);
return visitor._(value.$unknown[0], value.$unknown[1]);
};
})(InvocationResultMember || (InvocationResultMember = {}));
export const RetrievalResultLocationType = {

@@ -81,2 +95,12 @@ S3: "S3",

}
export var InvocationInputMember;
(function (InvocationInputMember) {
InvocationInputMember.visit = (value, visitor) => {
if (value.apiInvocationInput !== undefined)
return visitor.apiInvocationInput(value.apiInvocationInput);
if (value.functionInvocationInput !== undefined)
return visitor.functionInvocationInput(value.functionInvocationInput);
return visitor._(value.$unknown[0], value.$unknown[1]);
};
})(InvocationInputMember || (InvocationInputMember = {}));
export class ServiceQuotaExceededException extends __BaseException {

@@ -200,2 +224,4 @@ constructor(opts) {

return visitor.trace(value.trace);
if (value.returnControl !== undefined)
return visitor.returnControl(value.returnControl);
if (value.internalServerException !== undefined)

@@ -262,2 +288,3 @@ return visitor.internalServerException(value.internalServerException);

...(obj.apiPath && { apiPath: SENSITIVE_STRING }),
...(obj.function && { function: SENSITIVE_STRING }),
});

@@ -268,4 +295,23 @@ export const ActionGroupInvocationOutputFilterSensitiveLog = (obj) => ({

});
export const ApiResultFilterSensitiveLog = (obj) => ({
...obj,
...(obj.apiPath && { apiPath: SENSITIVE_STRING }),
});
export const InvocationResultMemberFilterSensitiveLog = (obj) => {
if (obj.apiResult !== undefined)
return { apiResult: ApiResultFilterSensitiveLog(obj.apiResult) };
if (obj.functionResult !== undefined)
return { functionResult: obj.functionResult };
if (obj.$unknown !== undefined)
return { [obj.$unknown[0]]: "UNKNOWN" };
};
export const SessionStateFilterSensitiveLog = (obj) => ({
...obj,
...(obj.returnControlInvocationResults && {
returnControlInvocationResults: obj.returnControlInvocationResults.map((item) => InvocationResultMemberFilterSensitiveLog(item)),
}),
});
export const InvokeAgentRequestFilterSensitiveLog = (obj) => ({
...obj,
...(obj.sessionState && { sessionState: SessionStateFilterSensitiveLog(obj.sessionState) }),
...(obj.inputText && { inputText: SENSITIVE_STRING }),

@@ -310,2 +356,20 @@ });

});
export const ApiInvocationInputFilterSensitiveLog = (obj) => ({
...obj,
...(obj.apiPath && { apiPath: SENSITIVE_STRING }),
});
export const InvocationInputMemberFilterSensitiveLog = (obj) => {
if (obj.apiInvocationInput !== undefined)
return { apiInvocationInput: ApiInvocationInputFilterSensitiveLog(obj.apiInvocationInput) };
if (obj.functionInvocationInput !== undefined)
return { functionInvocationInput: obj.functionInvocationInput };
if (obj.$unknown !== undefined)
return { [obj.$unknown[0]]: "UNKNOWN" };
};
export const ReturnControlPayloadFilterSensitiveLog = (obj) => ({
...obj,
...(obj.invocationInputs && {
invocationInputs: obj.invocationInputs.map((item) => InvocationInputMemberFilterSensitiveLog(item)),
}),
});
export const FailureTraceFilterSensitiveLog = (obj) => ({

@@ -427,2 +491,4 @@ ...obj,

return { trace: SENSITIVE_STRING };
if (obj.returnControl !== undefined)
return { returnControl: SENSITIVE_STRING };
if (obj.internalServerException !== undefined)

@@ -429,0 +495,0 @@ return { internalServerException: obj.internalServerException };

@@ -276,2 +276,7 @@ import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";

}
if (event["returnControl"] != null) {
return {
returnControl: await de_ReturnControlPayload_event(event["returnControl"], context),
};
}
if (event["internalServerException"] != null) {

@@ -373,2 +378,8 @@ return {

};
const de_ReturnControlPayload_event = async (output, context) => {
const contents = {};
const data = await parseBody(output.body, context);
Object.assign(contents, _json(data));
return contents;
};
const de_ServiceQuotaExceededException_event = async (output, context) => {

@@ -638,2 +649,3 @@ const parsedOutput = {

agentId: __expectString,
agentVersion: __expectString,
sessionId: __expectString,

@@ -640,0 +652,0 @@ trace: (_) => de_Trace(__expectUnion(_), context),

83

dist-types/commands/InvokeAgentCommand.d.ts

@@ -29,3 +29,3 @@ import { Command as $Command } from "@smithy/smithy-client";

/**
* <p>Sends a prompt for the agent to process and respond to.</p>
* <p>Sends a prompt for the agent to process and respond to. Use return control event type for function calling.</p>
* <note>

@@ -45,4 +45,7 @@ * <p>The CLI doesn't support <code>InvokeAgent</code>.</p>

* <li>
* <p>Include attributes for the session or prompt in the <code>sessionState</code> object.</p>
* <p>In the <code>sessionState</code> object, you can include attributes for the session or prompt or parameters returned from the action group.</p>
* </li>
* <li>
* <p>Use return control event type for function calling.</p>
* </li>
* </ul>

@@ -75,2 +78,29 @@ * <p>The response is returned in the <code>bytes</code> field of the <code>chunk</code> object.</p>

* },
* returnControlInvocationResults: [ // ReturnControlInvocationResults
* { // InvocationResultMember Union: only one key present
* apiResult: { // ApiResult
* actionGroup: "STRING_VALUE", // required
* httpMethod: "STRING_VALUE",
* apiPath: "STRING_VALUE",
* responseBody: { // ResponseBody
* "<keys>": { // ContentBody
* body: "STRING_VALUE",
* },
* },
* httpStatusCode: Number("int"),
* responseState: "FAILURE" || "REPROMPT",
* },
* functionResult: { // FunctionResult
* actionGroup: "STRING_VALUE", // required
* function: "STRING_VALUE",
* responseBody: {
* "<keys>": {
* body: "STRING_VALUE",
* },
* },
* responseState: "FAILURE" || "REPROMPT",
* },
* },
* ],
* invocationId: "STRING_VALUE",
* },

@@ -82,3 +112,3 @@ * agentId: "STRING_VALUE", // required

* enableTrace: true || false,
* inputText: "STRING_VALUE", // required
* inputText: "STRING_VALUE",
* };

@@ -127,2 +157,3 @@ * const command = new InvokeAgentCommand(input);

* // sessionId: "STRING_VALUE",
* // agentVersion: "STRING_VALUE",
* // trace: { // Trace Union: only one key present

@@ -185,2 +216,3 @@ * // preProcessingTrace: { // PreProcessingTrace Union: only one key present

* // },
* // function: "STRING_VALUE",
* // },

@@ -273,2 +305,45 @@ * // knowledgeBaseLookupInput: { // KnowledgeBaseLookupInput

* // },
* // returnControl: { // ReturnControlPayload
* // invocationInputs: [ // InvocationInputs
* // { // InvocationInputMember Union: only one key present
* // apiInvocationInput: { // ApiInvocationInput
* // actionGroup: "STRING_VALUE", // required
* // httpMethod: "STRING_VALUE",
* // apiPath: "STRING_VALUE",
* // parameters: [ // ApiParameters
* // { // ApiParameter
* // name: "STRING_VALUE",
* // type: "STRING_VALUE",
* // value: "STRING_VALUE",
* // },
* // ],
* // requestBody: { // ApiRequestBody
* // content: { // ApiContentMap
* // "<keys>": { // PropertyParameters
* // properties: [ // ParameterList
* // {
* // name: "STRING_VALUE",
* // type: "STRING_VALUE",
* // value: "STRING_VALUE",
* // },
* // ],
* // },
* // },
* // },
* // },
* // functionInvocationInput: { // FunctionInvocationInput
* // actionGroup: "STRING_VALUE", // required
* // parameters: [ // FunctionParameters
* // { // FunctionParameter
* // name: "STRING_VALUE",
* // type: "STRING_VALUE",
* // value: "STRING_VALUE",
* // },
* // ],
* // function: "STRING_VALUE",
* // },
* // },
* // ],
* // invocationId: "STRING_VALUE",
* // },
* // internalServerException: { // InternalServerException

@@ -332,3 +407,3 @@ * // message: "STRING_VALUE",

* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
* <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
*

@@ -335,0 +410,0 @@ * @throws {@link ServiceQuotaExceededException} (client fault)

2

dist-types/commands/RetrieveAndGenerateCommand.d.ts

@@ -173,3 +173,3 @@ import { Command as $Command } from "@smithy/smithy-client";

* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
* <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
*

@@ -176,0 +176,0 @@ * @throws {@link ServiceQuotaExceededException} (client fault)

@@ -144,3 +144,3 @@ import { Command as $Command } from "@smithy/smithy-client";

* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
* <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
*

@@ -147,0 +147,0 @@ * @throws {@link ServiceQuotaExceededException} (client fault)

@@ -25,2 +25,3 @@ import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";

requestBody?: RequestBody;
function?: string;
}

@@ -58,5 +59,56 @@ export interface ActionGroupInvocationOutput {

}
export interface ContentBody {
body?: string;
}
export declare const ResponseState: {
readonly FAILURE: "FAILURE";
readonly REPROMPT: "REPROMPT";
};
export type ResponseState = (typeof ResponseState)[keyof typeof ResponseState];
export interface ApiResult {
actionGroup: string | undefined;
httpMethod?: string;
apiPath?: string;
responseBody?: Record<string, ContentBody>;
httpStatusCode?: number;
responseState?: ResponseState;
}
export interface FunctionResult {
actionGroup: string | undefined;
function?: string;
responseBody?: Record<string, ContentBody>;
responseState?: ResponseState;
}
export type InvocationResultMember =
| InvocationResultMember.ApiResultMember
| InvocationResultMember.FunctionResultMember
| InvocationResultMember.$UnknownMember;
export declare namespace InvocationResultMember {
interface ApiResultMember {
apiResult: ApiResult;
functionResult?: never;
$unknown?: never;
}
interface FunctionResultMember {
apiResult?: never;
functionResult: FunctionResult;
$unknown?: never;
}
interface $UnknownMember {
apiResult?: never;
functionResult?: never;
$unknown: [string, any];
}
interface Visitor<T> {
apiResult: (value: ApiResult) => T;
functionResult: (value: FunctionResult) => T;
_: (name: string, value: any) => T;
}
const visit: <T>(value: InvocationResultMember, visitor: Visitor<T>) => T;
}
export interface SessionState {
sessionAttributes?: Record<string, string>;
promptSessionAttributes?: Record<string, string>;
returnControlInvocationResults?: InvocationResultMember[];
invocationId?: string;
}

@@ -70,3 +122,3 @@ export interface InvokeAgentRequest {

enableTrace?: boolean;
inputText: string | undefined;
inputText?: string;
}

@@ -122,2 +174,61 @@ export interface Span {

}
export interface ApiParameter {
name?: string;
type?: string;
value?: string;
}
export interface PropertyParameters {
properties?: Parameter[];
}
export interface ApiRequestBody {
content?: Record<string, PropertyParameters>;
}
export interface ApiInvocationInput {
actionGroup: string | undefined;
httpMethod?: string;
apiPath?: string;
parameters?: ApiParameter[];
requestBody?: ApiRequestBody;
}
export interface FunctionParameter {
name?: string;
type?: string;
value?: string;
}
export interface FunctionInvocationInput {
actionGroup: string | undefined;
parameters?: FunctionParameter[];
function?: string;
}
export type InvocationInputMember =
| InvocationInputMember.ApiInvocationInputMember
| InvocationInputMember.FunctionInvocationInputMember
| InvocationInputMember.$UnknownMember;
export declare namespace InvocationInputMember {
interface ApiInvocationInputMember {
apiInvocationInput: ApiInvocationInput;
functionInvocationInput?: never;
$unknown?: never;
}
interface FunctionInvocationInputMember {
apiInvocationInput?: never;
functionInvocationInput: FunctionInvocationInput;
$unknown?: never;
}
interface $UnknownMember {
apiInvocationInput?: never;
functionInvocationInput?: never;
$unknown: [string, any];
}
interface Visitor<T> {
apiInvocationInput: (value: ApiInvocationInput) => T;
functionInvocationInput: (value: FunctionInvocationInput) => T;
_: (name: string, value: any) => T;
}
const visit: <T>(value: InvocationInputMember, visitor: Visitor<T>) => T;
}
export interface ReturnControlPayload {
invocationInputs?: InvocationInputMember[];
invocationId?: string;
}
export declare class ServiceQuotaExceededException extends __BaseException {

@@ -397,2 +508,3 @@ readonly name: "ServiceQuotaExceededException";

sessionId?: string;
agentVersion?: string;
trace?: Trace;

@@ -415,2 +527,3 @@ }

| ResponseStream.ResourceNotFoundExceptionMember
| ResponseStream.ReturnControlMember
| ResponseStream.ServiceQuotaExceededExceptionMember

@@ -425,2 +538,3 @@ | ResponseStream.ThrottlingExceptionMember

trace?: never;
returnControl?: never;
internalServerException?: never;

@@ -440,2 +554,3 @@ validationException?: never;

trace: TracePart;
returnControl?: never;
internalServerException?: never;

@@ -452,5 +567,21 @@ validationException?: never;

}
interface ReturnControlMember {
chunk?: never;
trace?: never;
returnControl: ReturnControlPayload;
internalServerException?: never;
validationException?: never;
resourceNotFoundException?: never;
serviceQuotaExceededException?: never;
throttlingException?: never;
accessDeniedException?: never;
conflictException?: never;
dependencyFailedException?: never;
badGatewayException?: never;
$unknown?: never;
}
interface InternalServerExceptionMember {
chunk?: never;
trace?: never;
returnControl?: never;
internalServerException: InternalServerException;

@@ -470,2 +601,3 @@ validationException?: never;

trace?: never;
returnControl?: never;
internalServerException?: never;

@@ -485,2 +617,3 @@ validationException: ValidationException;

trace?: never;
returnControl?: never;
internalServerException?: never;

@@ -500,2 +633,3 @@ validationException?: never;

trace?: never;
returnControl?: never;
internalServerException?: never;

@@ -515,2 +649,3 @@ validationException?: never;

trace?: never;
returnControl?: never;
internalServerException?: never;

@@ -530,2 +665,3 @@ validationException?: never;

trace?: never;
returnControl?: never;
internalServerException?: never;

@@ -545,2 +681,3 @@ validationException?: never;

trace?: never;
returnControl?: never;
internalServerException?: never;

@@ -560,2 +697,3 @@ validationException?: never;

trace?: never;
returnControl?: never;
internalServerException?: never;

@@ -575,2 +713,3 @@ validationException?: never;

trace?: never;
returnControl?: never;
internalServerException?: never;

@@ -590,2 +729,3 @@ validationException?: never;

trace?: never;
returnControl?: never;
internalServerException?: never;

@@ -605,2 +745,3 @@ validationException?: never;

trace: (value: TracePart) => T;
returnControl: (value: ReturnControlPayload) => T;
internalServerException: (value: InternalServerException) => T;

@@ -905,2 +1046,7 @@ validationException: (value: ValidationException) => T;

) => any;
export declare const ApiResultFilterSensitiveLog: (obj: ApiResult) => any;
export declare const InvocationResultMemberFilterSensitiveLog: (
obj: InvocationResultMember
) => any;
export declare const SessionStateFilterSensitiveLog: (obj: SessionState) => any;
export declare const InvokeAgentRequestFilterSensitiveLog: (

@@ -927,2 +1073,11 @@ obj: InvokeAgentRequest

export declare const PayloadPartFilterSensitiveLog: (obj: PayloadPart) => any;
export declare const ApiInvocationInputFilterSensitiveLog: (
obj: ApiInvocationInput
) => any;
export declare const InvocationInputMemberFilterSensitiveLog: (
obj: InvocationInputMember
) => any;
export declare const ReturnControlPayloadFilterSensitiveLog: (
obj: ReturnControlPayload
) => any;
export declare const FailureTraceFilterSensitiveLog: (obj: FailureTrace) => any;

@@ -929,0 +1084,0 @@ export declare const KnowledgeBaseLookupInputFilterSensitiveLog: (

{
"name": "@aws-sdk/client-bedrock-agent-runtime",
"description": "AWS SDK for JavaScript Bedrock Agent Runtime Client for Node.js, Browser and React Native",
"version": "3.556.0",
"version": "3.560.0",
"scripts": {

@@ -6,0 +6,0 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc