@aws-sdk/client-bedrock-agent-runtime 3.504.0 → 3.509.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +5 -91
- package/dist-es/protocols/Aws_restJson1.js +4 -90
- package/package.json +3 -3
package/dist-cjs/index.js
CHANGED
|
@@ -700,7 +700,7 @@ var se_RetrieveAndGenerateCommand = /* @__PURE__ */ __name(async (input, context
|
|
|
700
700
|
}, "se_RetrieveAndGenerateCommand");
|
|
701
701
|
var de_InvokeAgentCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
702
702
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
703
|
-
return
|
|
703
|
+
return de_CommandError(output, context);
|
|
704
704
|
}
|
|
705
705
|
const contents = (0, import_smithy_client.map)({
|
|
706
706
|
$metadata: deserializeMetadata(output),
|
|
@@ -711,52 +711,9 @@ var de_InvokeAgentCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
711
711
|
contents.completion = de_ResponseStream(data, context);
|
|
712
712
|
return contents;
|
|
713
713
|
}, "de_InvokeAgentCommand");
|
|
714
|
-
var de_InvokeAgentCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
715
|
-
const parsedOutput = {
|
|
716
|
-
...output,
|
|
717
|
-
body: await parseErrorBody(output.body, context)
|
|
718
|
-
};
|
|
719
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
720
|
-
switch (errorCode) {
|
|
721
|
-
case "AccessDeniedException":
|
|
722
|
-
case "com.amazonaws.bedrockagentruntime#AccessDeniedException":
|
|
723
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
724
|
-
case "BadGatewayException":
|
|
725
|
-
case "com.amazonaws.bedrockagentruntime#BadGatewayException":
|
|
726
|
-
throw await de_BadGatewayExceptionRes(parsedOutput, context);
|
|
727
|
-
case "ConflictException":
|
|
728
|
-
case "com.amazonaws.bedrockagentruntime#ConflictException":
|
|
729
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
730
|
-
case "DependencyFailedException":
|
|
731
|
-
case "com.amazonaws.bedrockagentruntime#DependencyFailedException":
|
|
732
|
-
throw await de_DependencyFailedExceptionRes(parsedOutput, context);
|
|
733
|
-
case "InternalServerException":
|
|
734
|
-
case "com.amazonaws.bedrockagentruntime#InternalServerException":
|
|
735
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
736
|
-
case "ResourceNotFoundException":
|
|
737
|
-
case "com.amazonaws.bedrockagentruntime#ResourceNotFoundException":
|
|
738
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
739
|
-
case "ServiceQuotaExceededException":
|
|
740
|
-
case "com.amazonaws.bedrockagentruntime#ServiceQuotaExceededException":
|
|
741
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
742
|
-
case "ThrottlingException":
|
|
743
|
-
case "com.amazonaws.bedrockagentruntime#ThrottlingException":
|
|
744
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
745
|
-
case "ValidationException":
|
|
746
|
-
case "com.amazonaws.bedrockagentruntime#ValidationException":
|
|
747
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
748
|
-
default:
|
|
749
|
-
const parsedBody = parsedOutput.body;
|
|
750
|
-
return throwDefaultError({
|
|
751
|
-
output,
|
|
752
|
-
parsedBody,
|
|
753
|
-
errorCode
|
|
754
|
-
});
|
|
755
|
-
}
|
|
756
|
-
}, "de_InvokeAgentCommandError");
|
|
757
714
|
var de_RetrieveCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
758
715
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
759
|
-
return
|
|
716
|
+
return de_CommandError(output, context);
|
|
760
717
|
}
|
|
761
718
|
const contents = (0, import_smithy_client.map)({
|
|
762
719
|
$metadata: deserializeMetadata(output)
|
|
@@ -769,52 +726,9 @@ var de_RetrieveCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
769
726
|
Object.assign(contents, doc);
|
|
770
727
|
return contents;
|
|
771
728
|
}, "de_RetrieveCommand");
|
|
772
|
-
var de_RetrieveCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
773
|
-
const parsedOutput = {
|
|
774
|
-
...output,
|
|
775
|
-
body: await parseErrorBody(output.body, context)
|
|
776
|
-
};
|
|
777
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
778
|
-
switch (errorCode) {
|
|
779
|
-
case "AccessDeniedException":
|
|
780
|
-
case "com.amazonaws.bedrockagentruntime#AccessDeniedException":
|
|
781
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
782
|
-
case "BadGatewayException":
|
|
783
|
-
case "com.amazonaws.bedrockagentruntime#BadGatewayException":
|
|
784
|
-
throw await de_BadGatewayExceptionRes(parsedOutput, context);
|
|
785
|
-
case "ConflictException":
|
|
786
|
-
case "com.amazonaws.bedrockagentruntime#ConflictException":
|
|
787
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
788
|
-
case "DependencyFailedException":
|
|
789
|
-
case "com.amazonaws.bedrockagentruntime#DependencyFailedException":
|
|
790
|
-
throw await de_DependencyFailedExceptionRes(parsedOutput, context);
|
|
791
|
-
case "InternalServerException":
|
|
792
|
-
case "com.amazonaws.bedrockagentruntime#InternalServerException":
|
|
793
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
794
|
-
case "ResourceNotFoundException":
|
|
795
|
-
case "com.amazonaws.bedrockagentruntime#ResourceNotFoundException":
|
|
796
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
797
|
-
case "ServiceQuotaExceededException":
|
|
798
|
-
case "com.amazonaws.bedrockagentruntime#ServiceQuotaExceededException":
|
|
799
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
800
|
-
case "ThrottlingException":
|
|
801
|
-
case "com.amazonaws.bedrockagentruntime#ThrottlingException":
|
|
802
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
803
|
-
case "ValidationException":
|
|
804
|
-
case "com.amazonaws.bedrockagentruntime#ValidationException":
|
|
805
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
806
|
-
default:
|
|
807
|
-
const parsedBody = parsedOutput.body;
|
|
808
|
-
return throwDefaultError({
|
|
809
|
-
output,
|
|
810
|
-
parsedBody,
|
|
811
|
-
errorCode
|
|
812
|
-
});
|
|
813
|
-
}
|
|
814
|
-
}, "de_RetrieveCommandError");
|
|
815
729
|
var de_RetrieveAndGenerateCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
816
730
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
817
|
-
return
|
|
731
|
+
return de_CommandError(output, context);
|
|
818
732
|
}
|
|
819
733
|
const contents = (0, import_smithy_client.map)({
|
|
820
734
|
$metadata: deserializeMetadata(output)
|
|
@@ -828,7 +742,7 @@ var de_RetrieveAndGenerateCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
828
742
|
Object.assign(contents, doc);
|
|
829
743
|
return contents;
|
|
830
744
|
}, "de_RetrieveAndGenerateCommand");
|
|
831
|
-
var
|
|
745
|
+
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
832
746
|
const parsedOutput = {
|
|
833
747
|
...output,
|
|
834
748
|
body: await parseErrorBody(output.body, context)
|
|
@@ -870,7 +784,7 @@ var de_RetrieveAndGenerateCommandError = /* @__PURE__ */ __name(async (output, c
|
|
|
870
784
|
errorCode
|
|
871
785
|
});
|
|
872
786
|
}
|
|
873
|
-
}, "
|
|
787
|
+
}, "de_CommandError");
|
|
874
788
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(BedrockAgentRuntimeServiceException);
|
|
875
789
|
var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
876
790
|
const contents = (0, import_smithy_client.map)({});
|
|
@@ -56,7 +56,7 @@ export const se_RetrieveAndGenerateCommand = async (input, context) => {
|
|
|
56
56
|
};
|
|
57
57
|
export const de_InvokeAgentCommand = async (output, context) => {
|
|
58
58
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
59
|
-
return
|
|
59
|
+
return de_CommandError(output, context);
|
|
60
60
|
}
|
|
61
61
|
const contents = map({
|
|
62
62
|
$metadata: deserializeMetadata(output),
|
|
@@ -67,52 +67,9 @@ export const de_InvokeAgentCommand = async (output, context) => {
|
|
|
67
67
|
contents.completion = de_ResponseStream(data, context);
|
|
68
68
|
return contents;
|
|
69
69
|
};
|
|
70
|
-
const de_InvokeAgentCommandError = async (output, context) => {
|
|
71
|
-
const parsedOutput = {
|
|
72
|
-
...output,
|
|
73
|
-
body: await parseErrorBody(output.body, context),
|
|
74
|
-
};
|
|
75
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
76
|
-
switch (errorCode) {
|
|
77
|
-
case "AccessDeniedException":
|
|
78
|
-
case "com.amazonaws.bedrockagentruntime#AccessDeniedException":
|
|
79
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
80
|
-
case "BadGatewayException":
|
|
81
|
-
case "com.amazonaws.bedrockagentruntime#BadGatewayException":
|
|
82
|
-
throw await de_BadGatewayExceptionRes(parsedOutput, context);
|
|
83
|
-
case "ConflictException":
|
|
84
|
-
case "com.amazonaws.bedrockagentruntime#ConflictException":
|
|
85
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
86
|
-
case "DependencyFailedException":
|
|
87
|
-
case "com.amazonaws.bedrockagentruntime#DependencyFailedException":
|
|
88
|
-
throw await de_DependencyFailedExceptionRes(parsedOutput, context);
|
|
89
|
-
case "InternalServerException":
|
|
90
|
-
case "com.amazonaws.bedrockagentruntime#InternalServerException":
|
|
91
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
92
|
-
case "ResourceNotFoundException":
|
|
93
|
-
case "com.amazonaws.bedrockagentruntime#ResourceNotFoundException":
|
|
94
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
95
|
-
case "ServiceQuotaExceededException":
|
|
96
|
-
case "com.amazonaws.bedrockagentruntime#ServiceQuotaExceededException":
|
|
97
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
98
|
-
case "ThrottlingException":
|
|
99
|
-
case "com.amazonaws.bedrockagentruntime#ThrottlingException":
|
|
100
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
101
|
-
case "ValidationException":
|
|
102
|
-
case "com.amazonaws.bedrockagentruntime#ValidationException":
|
|
103
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
104
|
-
default:
|
|
105
|
-
const parsedBody = parsedOutput.body;
|
|
106
|
-
return throwDefaultError({
|
|
107
|
-
output,
|
|
108
|
-
parsedBody,
|
|
109
|
-
errorCode,
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
70
|
export const de_RetrieveCommand = async (output, context) => {
|
|
114
71
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
115
|
-
return
|
|
72
|
+
return de_CommandError(output, context);
|
|
116
73
|
}
|
|
117
74
|
const contents = map({
|
|
118
75
|
$metadata: deserializeMetadata(output),
|
|
@@ -125,52 +82,9 @@ export const de_RetrieveCommand = async (output, context) => {
|
|
|
125
82
|
Object.assign(contents, doc);
|
|
126
83
|
return contents;
|
|
127
84
|
};
|
|
128
|
-
const de_RetrieveCommandError = async (output, context) => {
|
|
129
|
-
const parsedOutput = {
|
|
130
|
-
...output,
|
|
131
|
-
body: await parseErrorBody(output.body, context),
|
|
132
|
-
};
|
|
133
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
134
|
-
switch (errorCode) {
|
|
135
|
-
case "AccessDeniedException":
|
|
136
|
-
case "com.amazonaws.bedrockagentruntime#AccessDeniedException":
|
|
137
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
138
|
-
case "BadGatewayException":
|
|
139
|
-
case "com.amazonaws.bedrockagentruntime#BadGatewayException":
|
|
140
|
-
throw await de_BadGatewayExceptionRes(parsedOutput, context);
|
|
141
|
-
case "ConflictException":
|
|
142
|
-
case "com.amazonaws.bedrockagentruntime#ConflictException":
|
|
143
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
144
|
-
case "DependencyFailedException":
|
|
145
|
-
case "com.amazonaws.bedrockagentruntime#DependencyFailedException":
|
|
146
|
-
throw await de_DependencyFailedExceptionRes(parsedOutput, context);
|
|
147
|
-
case "InternalServerException":
|
|
148
|
-
case "com.amazonaws.bedrockagentruntime#InternalServerException":
|
|
149
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
150
|
-
case "ResourceNotFoundException":
|
|
151
|
-
case "com.amazonaws.bedrockagentruntime#ResourceNotFoundException":
|
|
152
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
153
|
-
case "ServiceQuotaExceededException":
|
|
154
|
-
case "com.amazonaws.bedrockagentruntime#ServiceQuotaExceededException":
|
|
155
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
156
|
-
case "ThrottlingException":
|
|
157
|
-
case "com.amazonaws.bedrockagentruntime#ThrottlingException":
|
|
158
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
159
|
-
case "ValidationException":
|
|
160
|
-
case "com.amazonaws.bedrockagentruntime#ValidationException":
|
|
161
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
162
|
-
default:
|
|
163
|
-
const parsedBody = parsedOutput.body;
|
|
164
|
-
return throwDefaultError({
|
|
165
|
-
output,
|
|
166
|
-
parsedBody,
|
|
167
|
-
errorCode,
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
85
|
export const de_RetrieveAndGenerateCommand = async (output, context) => {
|
|
172
86
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
173
|
-
return
|
|
87
|
+
return de_CommandError(output, context);
|
|
174
88
|
}
|
|
175
89
|
const contents = map({
|
|
176
90
|
$metadata: deserializeMetadata(output),
|
|
@@ -184,7 +98,7 @@ export const de_RetrieveAndGenerateCommand = async (output, context) => {
|
|
|
184
98
|
Object.assign(contents, doc);
|
|
185
99
|
return contents;
|
|
186
100
|
};
|
|
187
|
-
const
|
|
101
|
+
const de_CommandError = async (output, context) => {
|
|
188
102
|
const parsedOutput = {
|
|
189
103
|
...output,
|
|
190
104
|
body: await parseErrorBody(output.body, context),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-bedrock-agent-runtime",
|
|
3
3
|
"description": "AWS SDK for JavaScript Bedrock Agent Runtime Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.509.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-agent-runtime",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.507.0",
|
|
24
24
|
"@aws-sdk/core": "3.496.0",
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.509.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.502.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.502.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.502.0",
|