@aws-sdk/client-bedrock-runtime 3.987.0 → 3.989.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 +29 -1843
- package/dist-cjs/models/BedrockRuntimeServiceException.js +12 -0
- package/dist-cjs/models/errors.js +169 -0
- package/dist-cjs/runtimeConfig.shared.js +2 -0
- package/dist-cjs/schemas/schemas_0.js +1500 -0
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-es/schemas/schemas_0.js +93 -87
- package/dist-types/schemas/schemas_0.d.ts +19 -12
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +14 -12
- package/package.json +15 -15
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BedrockRuntimeServiceException = exports.__ServiceException = void 0;
|
|
4
|
+
const smithy_client_1 = require("@smithy/smithy-client");
|
|
5
|
+
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
|
|
6
|
+
class BedrockRuntimeServiceException extends smithy_client_1.ServiceException {
|
|
7
|
+
constructor(options) {
|
|
8
|
+
super(options);
|
|
9
|
+
Object.setPrototypeOf(this, BedrockRuntimeServiceException.prototype);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.BedrockRuntimeServiceException = BedrockRuntimeServiceException;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModelStreamErrorException = exports.ModelTimeoutException = exports.ModelNotReadyException = exports.ModelErrorException = exports.ServiceUnavailableException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.ConflictException = exports.ValidationException = exports.ThrottlingException = exports.InternalServerException = exports.AccessDeniedException = void 0;
|
|
4
|
+
const BedrockRuntimeServiceException_1 = require("./BedrockRuntimeServiceException");
|
|
5
|
+
class AccessDeniedException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
|
|
6
|
+
name = "AccessDeniedException";
|
|
7
|
+
$fault = "client";
|
|
8
|
+
constructor(opts) {
|
|
9
|
+
super({
|
|
10
|
+
name: "AccessDeniedException",
|
|
11
|
+
$fault: "client",
|
|
12
|
+
...opts,
|
|
13
|
+
});
|
|
14
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.AccessDeniedException = AccessDeniedException;
|
|
18
|
+
class InternalServerException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
|
|
19
|
+
name = "InternalServerException";
|
|
20
|
+
$fault = "server";
|
|
21
|
+
constructor(opts) {
|
|
22
|
+
super({
|
|
23
|
+
name: "InternalServerException",
|
|
24
|
+
$fault: "server",
|
|
25
|
+
...opts,
|
|
26
|
+
});
|
|
27
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.InternalServerException = InternalServerException;
|
|
31
|
+
class ThrottlingException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
|
|
32
|
+
name = "ThrottlingException";
|
|
33
|
+
$fault = "client";
|
|
34
|
+
constructor(opts) {
|
|
35
|
+
super({
|
|
36
|
+
name: "ThrottlingException",
|
|
37
|
+
$fault: "client",
|
|
38
|
+
...opts,
|
|
39
|
+
});
|
|
40
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.ThrottlingException = ThrottlingException;
|
|
44
|
+
class ValidationException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
|
|
45
|
+
name = "ValidationException";
|
|
46
|
+
$fault = "client";
|
|
47
|
+
constructor(opts) {
|
|
48
|
+
super({
|
|
49
|
+
name: "ValidationException",
|
|
50
|
+
$fault: "client",
|
|
51
|
+
...opts,
|
|
52
|
+
});
|
|
53
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.ValidationException = ValidationException;
|
|
57
|
+
class ConflictException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
|
|
58
|
+
name = "ConflictException";
|
|
59
|
+
$fault = "client";
|
|
60
|
+
constructor(opts) {
|
|
61
|
+
super({
|
|
62
|
+
name: "ConflictException",
|
|
63
|
+
$fault: "client",
|
|
64
|
+
...opts,
|
|
65
|
+
});
|
|
66
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.ConflictException = ConflictException;
|
|
70
|
+
class ResourceNotFoundException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
|
|
71
|
+
name = "ResourceNotFoundException";
|
|
72
|
+
$fault = "client";
|
|
73
|
+
constructor(opts) {
|
|
74
|
+
super({
|
|
75
|
+
name: "ResourceNotFoundException",
|
|
76
|
+
$fault: "client",
|
|
77
|
+
...opts,
|
|
78
|
+
});
|
|
79
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
83
|
+
class ServiceQuotaExceededException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
|
|
84
|
+
name = "ServiceQuotaExceededException";
|
|
85
|
+
$fault = "client";
|
|
86
|
+
constructor(opts) {
|
|
87
|
+
super({
|
|
88
|
+
name: "ServiceQuotaExceededException",
|
|
89
|
+
$fault: "client",
|
|
90
|
+
...opts,
|
|
91
|
+
});
|
|
92
|
+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
|
|
96
|
+
class ServiceUnavailableException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
|
|
97
|
+
name = "ServiceUnavailableException";
|
|
98
|
+
$fault = "server";
|
|
99
|
+
constructor(opts) {
|
|
100
|
+
super({
|
|
101
|
+
name: "ServiceUnavailableException",
|
|
102
|
+
$fault: "server",
|
|
103
|
+
...opts,
|
|
104
|
+
});
|
|
105
|
+
Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
exports.ServiceUnavailableException = ServiceUnavailableException;
|
|
109
|
+
class ModelErrorException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
|
|
110
|
+
name = "ModelErrorException";
|
|
111
|
+
$fault = "client";
|
|
112
|
+
originalStatusCode;
|
|
113
|
+
resourceName;
|
|
114
|
+
constructor(opts) {
|
|
115
|
+
super({
|
|
116
|
+
name: "ModelErrorException",
|
|
117
|
+
$fault: "client",
|
|
118
|
+
...opts,
|
|
119
|
+
});
|
|
120
|
+
Object.setPrototypeOf(this, ModelErrorException.prototype);
|
|
121
|
+
this.originalStatusCode = opts.originalStatusCode;
|
|
122
|
+
this.resourceName = opts.resourceName;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
exports.ModelErrorException = ModelErrorException;
|
|
126
|
+
class ModelNotReadyException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
|
|
127
|
+
name = "ModelNotReadyException";
|
|
128
|
+
$fault = "client";
|
|
129
|
+
$retryable = {};
|
|
130
|
+
constructor(opts) {
|
|
131
|
+
super({
|
|
132
|
+
name: "ModelNotReadyException",
|
|
133
|
+
$fault: "client",
|
|
134
|
+
...opts,
|
|
135
|
+
});
|
|
136
|
+
Object.setPrototypeOf(this, ModelNotReadyException.prototype);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
exports.ModelNotReadyException = ModelNotReadyException;
|
|
140
|
+
class ModelTimeoutException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
|
|
141
|
+
name = "ModelTimeoutException";
|
|
142
|
+
$fault = "client";
|
|
143
|
+
constructor(opts) {
|
|
144
|
+
super({
|
|
145
|
+
name: "ModelTimeoutException",
|
|
146
|
+
$fault: "client",
|
|
147
|
+
...opts,
|
|
148
|
+
});
|
|
149
|
+
Object.setPrototypeOf(this, ModelTimeoutException.prototype);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
exports.ModelTimeoutException = ModelTimeoutException;
|
|
153
|
+
class ModelStreamErrorException extends BedrockRuntimeServiceException_1.BedrockRuntimeServiceException {
|
|
154
|
+
name = "ModelStreamErrorException";
|
|
155
|
+
$fault = "client";
|
|
156
|
+
originalStatusCode;
|
|
157
|
+
originalMessage;
|
|
158
|
+
constructor(opts) {
|
|
159
|
+
super({
|
|
160
|
+
name: "ModelStreamErrorException",
|
|
161
|
+
$fault: "client",
|
|
162
|
+
...opts,
|
|
163
|
+
});
|
|
164
|
+
Object.setPrototypeOf(this, ModelStreamErrorException.prototype);
|
|
165
|
+
this.originalStatusCode = opts.originalStatusCode;
|
|
166
|
+
this.originalMessage = opts.originalMessage;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
exports.ModelStreamErrorException = ModelStreamErrorException;
|
|
@@ -10,6 +10,7 @@ const util_base64_1 = require("@smithy/util-base64");
|
|
|
10
10
|
const util_utf8_1 = require("@smithy/util-utf8");
|
|
11
11
|
const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
|
|
12
12
|
const endpointResolver_1 = require("./endpoint/endpointResolver");
|
|
13
|
+
const schemas_0_1 = require("./schemas/schemas_0");
|
|
13
14
|
const getRuntimeConfig = (config) => {
|
|
14
15
|
return {
|
|
15
16
|
apiVersion: "2023-09-30",
|
|
@@ -35,6 +36,7 @@ const getRuntimeConfig = (config) => {
|
|
|
35
36
|
protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
|
|
36
37
|
protocolSettings: config?.protocolSettings ?? {
|
|
37
38
|
defaultNamespace: "com.amazonaws.bedrockruntime",
|
|
39
|
+
errorTypeRegistries: schemas_0_1.errorTypeRegistries,
|
|
38
40
|
version: "2023-09-30",
|
|
39
41
|
serviceTarget: "AmazonBedrockFrontendService",
|
|
40
42
|
},
|