@aws-sdk/client-sagemakerjobruntime 3.1059.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.
Files changed (86) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +210 -0
  3. package/dist-cjs/auth/httpAuthSchemeProvider.js +46 -0
  4. package/dist-cjs/endpoint/bdd.js +32 -0
  5. package/dist-cjs/endpoint/endpointResolver.js +18 -0
  6. package/dist-cjs/index.js +201 -0
  7. package/dist-cjs/models/SagemakerJobRuntimeServiceException.js +12 -0
  8. package/dist-cjs/models/errors.js +111 -0
  9. package/dist-cjs/runtimeConfig.browser.js +36 -0
  10. package/dist-cjs/runtimeConfig.js +49 -0
  11. package/dist-cjs/runtimeConfig.native.js +15 -0
  12. package/dist-cjs/runtimeConfig.shared.js +43 -0
  13. package/dist-cjs/schemas/schemas_0.js +155 -0
  14. package/dist-es/SagemakerJobRuntime.js +15 -0
  15. package/dist-es/SagemakerJobRuntimeClient.js +47 -0
  16. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  17. package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
  18. package/dist-es/commands/CompleteRolloutCommand.js +16 -0
  19. package/dist-es/commands/SampleCommand.js +16 -0
  20. package/dist-es/commands/SampleWithResponseStreamCommand.js +16 -0
  21. package/dist-es/commands/UpdateRewardCommand.js +16 -0
  22. package/dist-es/commands/index.js +4 -0
  23. package/dist-es/endpoint/EndpointParameters.js +11 -0
  24. package/dist-es/endpoint/bdd.js +29 -0
  25. package/dist-es/endpoint/endpointResolver.js +14 -0
  26. package/dist-es/extensionConfiguration.js +1 -0
  27. package/dist-es/index.js +8 -0
  28. package/dist-es/models/SagemakerJobRuntimeServiceException.js +8 -0
  29. package/dist-es/models/enums.js +4 -0
  30. package/dist-es/models/errors.js +101 -0
  31. package/dist-es/models/models_0.js +1 -0
  32. package/dist-es/runtimeConfig.browser.js +31 -0
  33. package/dist-es/runtimeConfig.js +44 -0
  34. package/dist-es/runtimeConfig.native.js +11 -0
  35. package/dist-es/runtimeConfig.shared.js +39 -0
  36. package/dist-es/runtimeExtensions.js +9 -0
  37. package/dist-es/schemas/schemas_0.js +152 -0
  38. package/dist-types/SagemakerJobRuntime.d.ts +39 -0
  39. package/dist-types/SagemakerJobRuntimeClient.d.ts +196 -0
  40. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  41. package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
  42. package/dist-types/commands/CompleteRolloutCommand.d.ts +115 -0
  43. package/dist-types/commands/SampleCommand.d.ts +127 -0
  44. package/dist-types/commands/SampleWithResponseStreamCommand.d.ts +131 -0
  45. package/dist-types/commands/UpdateRewardCommand.d.ts +121 -0
  46. package/dist-types/commands/index.d.ts +4 -0
  47. package/dist-types/endpoint/EndpointParameters.d.ts +44 -0
  48. package/dist-types/endpoint/bdd.d.ts +2 -0
  49. package/dist-types/endpoint/endpointResolver.d.ts +8 -0
  50. package/dist-types/extensionConfiguration.d.ts +9 -0
  51. package/dist-types/index.d.ts +17 -0
  52. package/dist-types/models/SagemakerJobRuntimeServiceException.d.ts +14 -0
  53. package/dist-types/models/enums.d.ts +18 -0
  54. package/dist-types/models/errors.d.ts +95 -0
  55. package/dist-types/models/models_0.d.ts +141 -0
  56. package/dist-types/runtimeConfig.browser.d.ts +56 -0
  57. package/dist-types/runtimeConfig.d.ts +56 -0
  58. package/dist-types/runtimeConfig.native.d.ts +55 -0
  59. package/dist-types/runtimeConfig.shared.d.ts +28 -0
  60. package/dist-types/runtimeExtensions.d.ts +17 -0
  61. package/dist-types/schemas/schemas_0.d.ts +28 -0
  62. package/dist-types/ts3.4/SagemakerJobRuntime.d.ts +75 -0
  63. package/dist-types/ts3.4/SagemakerJobRuntimeClient.d.ts +139 -0
  64. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  65. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +47 -0
  66. package/dist-types/ts3.4/commands/CompleteRolloutCommand.d.ts +52 -0
  67. package/dist-types/ts3.4/commands/SampleCommand.d.ts +61 -0
  68. package/dist-types/ts3.4/commands/SampleWithResponseStreamCommand.d.ts +68 -0
  69. package/dist-types/ts3.4/commands/UpdateRewardCommand.d.ts +49 -0
  70. package/dist-types/ts3.4/commands/index.d.ts +4 -0
  71. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +45 -0
  72. package/dist-types/ts3.4/endpoint/bdd.d.ts +2 -0
  73. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  74. package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
  75. package/dist-types/ts3.4/index.d.ts +11 -0
  76. package/dist-types/ts3.4/models/SagemakerJobRuntimeServiceException.d.ts +9 -0
  77. package/dist-types/ts3.4/models/enums.d.ts +6 -0
  78. package/dist-types/ts3.4/models/errors.d.ts +58 -0
  79. package/dist-types/ts3.4/models/models_0.d.ts +34 -0
  80. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +103 -0
  81. package/dist-types/ts3.4/runtimeConfig.d.ts +98 -0
  82. package/dist-types/ts3.4/runtimeConfig.native.d.ts +107 -0
  83. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +33 -0
  84. package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
  85. package/dist-types/ts3.4/schemas/schemas_0.d.ts +27 -0
  86. package/package.json +71 -0
@@ -0,0 +1,201 @@
1
+ 'use strict';
2
+
3
+ var client$1 = require('@aws-sdk/core/client');
4
+ var core = require('@smithy/core');
5
+ var client = require('@smithy/core/client');
6
+ var config = require('@smithy/core/config');
7
+ var endpoints = require('@smithy/core/endpoints');
8
+ var protocols = require('@smithy/core/protocols');
9
+ var retry = require('@smithy/core/retry');
10
+ var schema = require('@smithy/core/schema');
11
+ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
12
+ var runtimeConfig = require('./runtimeConfig');
13
+ var schemas_0 = require('./schemas/schemas_0');
14
+ var errors = require('./models/errors');
15
+ var SagemakerJobRuntimeServiceException = require('./models/SagemakerJobRuntimeServiceException');
16
+
17
+ const resolveClientEndpointParameters = (options) => {
18
+ return Object.assign(options, {
19
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
20
+ defaultSigningName: "sagemaker",
21
+ });
22
+ };
23
+ const commonParams = {
24
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
25
+ Endpoint: { type: "builtInParams", name: "endpoint" },
26
+ Region: { type: "builtInParams", name: "region" },
27
+ };
28
+
29
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
30
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
31
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
32
+ let _credentials = runtimeConfig.credentials;
33
+ return {
34
+ setHttpAuthScheme(httpAuthScheme) {
35
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
36
+ if (index === -1) {
37
+ _httpAuthSchemes.push(httpAuthScheme);
38
+ }
39
+ else {
40
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
41
+ }
42
+ },
43
+ httpAuthSchemes() {
44
+ return _httpAuthSchemes;
45
+ },
46
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
47
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
48
+ },
49
+ httpAuthSchemeProvider() {
50
+ return _httpAuthSchemeProvider;
51
+ },
52
+ setCredentials(credentials) {
53
+ _credentials = credentials;
54
+ },
55
+ credentials() {
56
+ return _credentials;
57
+ },
58
+ };
59
+ };
60
+ const resolveHttpAuthRuntimeConfig = (config) => {
61
+ return {
62
+ httpAuthSchemes: config.httpAuthSchemes(),
63
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
64
+ credentials: config.credentials(),
65
+ };
66
+ };
67
+
68
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
69
+ const extensionConfiguration = Object.assign(client$1.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
70
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
71
+ return Object.assign(runtimeConfig, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
72
+ };
73
+
74
+ class SagemakerJobRuntimeClient extends client.Client {
75
+ config;
76
+ constructor(...[configuration]) {
77
+ const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
78
+ super(_config_0);
79
+ this.initConfig = _config_0;
80
+ const _config_1 = resolveClientEndpointParameters(_config_0);
81
+ const _config_2 = client$1.resolveUserAgentConfig(_config_1);
82
+ const _config_3 = retry.resolveRetryConfig(_config_2);
83
+ const _config_4 = config.resolveRegionConfig(_config_3);
84
+ const _config_5 = client$1.resolveHostHeaderConfig(_config_4);
85
+ const _config_6 = endpoints.resolveEndpointConfig(_config_5);
86
+ const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
87
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
88
+ this.config = _config_8;
89
+ this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
90
+ this.middlewareStack.use(client$1.getUserAgentPlugin(this.config));
91
+ this.middlewareStack.use(retry.getRetryPlugin(this.config));
92
+ this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));
93
+ this.middlewareStack.use(client$1.getHostHeaderPlugin(this.config));
94
+ this.middlewareStack.use(client$1.getLoggerPlugin(this.config));
95
+ this.middlewareStack.use(client$1.getRecursionDetectionPlugin(this.config));
96
+ this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
97
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSagemakerJobRuntimeHttpAuthSchemeParametersProvider,
98
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
99
+ "aws.auth#sigv4": config.credentials,
100
+ }),
101
+ }));
102
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
103
+ }
104
+ destroy() {
105
+ super.destroy();
106
+ }
107
+ }
108
+
109
+ class CompleteRolloutCommand extends client.Command
110
+ .classBuilder()
111
+ .ep(commonParams)
112
+ .m(function (Command, cs, config, o) {
113
+ return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
114
+ })
115
+ .s("AgenticRFTRuntimeService", "CompleteRollout", {})
116
+ .n("SagemakerJobRuntimeClient", "CompleteRolloutCommand")
117
+ .sc(schemas_0.CompleteRollout$)
118
+ .build() {
119
+ }
120
+
121
+ class SampleCommand extends client.Command
122
+ .classBuilder()
123
+ .ep(commonParams)
124
+ .m(function (Command, cs, config, o) {
125
+ return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
126
+ })
127
+ .s("AgenticRFTRuntimeService", "Sample", {})
128
+ .n("SagemakerJobRuntimeClient", "SampleCommand")
129
+ .sc(schemas_0.Sample$)
130
+ .build() {
131
+ }
132
+
133
+ class SampleWithResponseStreamCommand extends client.Command
134
+ .classBuilder()
135
+ .ep(commonParams)
136
+ .m(function (Command, cs, config, o) {
137
+ return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
138
+ })
139
+ .s("AgenticRFTRuntimeService", "SampleWithResponseStream", {})
140
+ .n("SagemakerJobRuntimeClient", "SampleWithResponseStreamCommand")
141
+ .sc(schemas_0.SampleWithResponseStream$)
142
+ .build() {
143
+ }
144
+
145
+ class UpdateRewardCommand extends client.Command
146
+ .classBuilder()
147
+ .ep(commonParams)
148
+ .m(function (Command, cs, config, o) {
149
+ return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
150
+ })
151
+ .s("AgenticRFTRuntimeService", "UpdateReward", {})
152
+ .n("SagemakerJobRuntimeClient", "UpdateRewardCommand")
153
+ .sc(schemas_0.UpdateReward$)
154
+ .build() {
155
+ }
156
+
157
+ const commands = {
158
+ CompleteRolloutCommand,
159
+ SampleCommand,
160
+ SampleWithResponseStreamCommand,
161
+ UpdateRewardCommand,
162
+ };
163
+ class SagemakerJobRuntime extends SagemakerJobRuntimeClient {
164
+ }
165
+ client.createAggregatedClient(commands, SagemakerJobRuntime);
166
+
167
+ const CompletionStatus = {
168
+ FAILED: "failed",
169
+ READY: "ready",
170
+ };
171
+
172
+ exports.$Command = client.Command;
173
+ exports.__Client = client.Client;
174
+ exports.SagemakerJobRuntimeServiceException = SagemakerJobRuntimeServiceException.SagemakerJobRuntimeServiceException;
175
+ exports.CompleteRolloutCommand = CompleteRolloutCommand;
176
+ exports.CompletionStatus = CompletionStatus;
177
+ exports.SagemakerJobRuntime = SagemakerJobRuntime;
178
+ exports.SagemakerJobRuntimeClient = SagemakerJobRuntimeClient;
179
+ exports.SampleCommand = SampleCommand;
180
+ exports.SampleWithResponseStreamCommand = SampleWithResponseStreamCommand;
181
+ exports.UpdateRewardCommand = UpdateRewardCommand;
182
+ Object.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&
183
+ !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
184
+ Object.defineProperty(exports, '__proto__', {
185
+ enumerable: true,
186
+ value: schemas_0['__proto__']
187
+ });
188
+
189
+ Object.keys(schemas_0).forEach(function (k) {
190
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];
191
+ });
192
+ Object.prototype.hasOwnProperty.call(errors, '__proto__') &&
193
+ !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
194
+ Object.defineProperty(exports, '__proto__', {
195
+ enumerable: true,
196
+ value: errors['__proto__']
197
+ });
198
+
199
+ Object.keys(errors).forEach(function (k) {
200
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];
201
+ });
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SagemakerJobRuntimeServiceException = exports.__ServiceException = void 0;
4
+ const client_1 = require("@smithy/core/client");
5
+ Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return client_1.ServiceException; } });
6
+ class SagemakerJobRuntimeServiceException extends client_1.ServiceException {
7
+ constructor(options) {
8
+ super(options);
9
+ Object.setPrototypeOf(this, SagemakerJobRuntimeServiceException.prototype);
10
+ }
11
+ }
12
+ exports.SagemakerJobRuntimeServiceException = SagemakerJobRuntimeServiceException;
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ValidationException = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.InternalServiceError = exports.ConflictException = exports.AccessDeniedException = void 0;
4
+ const SagemakerJobRuntimeServiceException_1 = require("./SagemakerJobRuntimeServiceException");
5
+ class AccessDeniedException extends SagemakerJobRuntimeServiceException_1.SagemakerJobRuntimeServiceException {
6
+ name = "AccessDeniedException";
7
+ $fault = "client";
8
+ Message;
9
+ constructor(opts) {
10
+ super({
11
+ name: "AccessDeniedException",
12
+ $fault: "client",
13
+ ...opts,
14
+ });
15
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
16
+ this.Message = opts.Message;
17
+ }
18
+ }
19
+ exports.AccessDeniedException = AccessDeniedException;
20
+ class ConflictException extends SagemakerJobRuntimeServiceException_1.SagemakerJobRuntimeServiceException {
21
+ name = "ConflictException";
22
+ $fault = "client";
23
+ Message;
24
+ constructor(opts) {
25
+ super({
26
+ name: "ConflictException",
27
+ $fault: "client",
28
+ ...opts,
29
+ });
30
+ Object.setPrototypeOf(this, ConflictException.prototype);
31
+ this.Message = opts.Message;
32
+ }
33
+ }
34
+ exports.ConflictException = ConflictException;
35
+ class InternalServiceError extends SagemakerJobRuntimeServiceException_1.SagemakerJobRuntimeServiceException {
36
+ name = "InternalServiceError";
37
+ $fault = "server";
38
+ $retryable = {};
39
+ Message;
40
+ constructor(opts) {
41
+ super({
42
+ name: "InternalServiceError",
43
+ $fault: "server",
44
+ ...opts,
45
+ });
46
+ Object.setPrototypeOf(this, InternalServiceError.prototype);
47
+ this.Message = opts.Message;
48
+ }
49
+ }
50
+ exports.InternalServiceError = InternalServiceError;
51
+ class ResourceNotFoundException extends SagemakerJobRuntimeServiceException_1.SagemakerJobRuntimeServiceException {
52
+ name = "ResourceNotFoundException";
53
+ $fault = "client";
54
+ Message;
55
+ constructor(opts) {
56
+ super({
57
+ name: "ResourceNotFoundException",
58
+ $fault: "client",
59
+ ...opts,
60
+ });
61
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
62
+ this.Message = opts.Message;
63
+ }
64
+ }
65
+ exports.ResourceNotFoundException = ResourceNotFoundException;
66
+ class ServiceQuotaExceededException extends SagemakerJobRuntimeServiceException_1.SagemakerJobRuntimeServiceException {
67
+ name = "ServiceQuotaExceededException";
68
+ $fault = "client";
69
+ Message;
70
+ constructor(opts) {
71
+ super({
72
+ name: "ServiceQuotaExceededException",
73
+ $fault: "client",
74
+ ...opts,
75
+ });
76
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
77
+ this.Message = opts.Message;
78
+ }
79
+ }
80
+ exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
81
+ class ThrottlingException extends SagemakerJobRuntimeServiceException_1.SagemakerJobRuntimeServiceException {
82
+ name = "ThrottlingException";
83
+ $fault = "client";
84
+ $retryable = {};
85
+ Message;
86
+ constructor(opts) {
87
+ super({
88
+ name: "ThrottlingException",
89
+ $fault: "client",
90
+ ...opts,
91
+ });
92
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
93
+ this.Message = opts.Message;
94
+ }
95
+ }
96
+ exports.ThrottlingException = ThrottlingException;
97
+ class ValidationException extends SagemakerJobRuntimeServiceException_1.SagemakerJobRuntimeServiceException {
98
+ name = "ValidationException";
99
+ $fault = "client";
100
+ Message;
101
+ constructor(opts) {
102
+ super({
103
+ name: "ValidationException",
104
+ $fault: "client",
105
+ ...opts,
106
+ });
107
+ Object.setPrototypeOf(this, ValidationException.prototype);
108
+ this.Message = opts.Message;
109
+ }
110
+ }
111
+ exports.ValidationException = ValidationException;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const sha256_browser_1 = require("@aws-crypto/sha256-browser");
7
+ const client_1 = require("@aws-sdk/core/client");
8
+ const client_2 = require("@smithy/core/client");
9
+ const config_1 = require("@smithy/core/config");
10
+ const retry_1 = require("@smithy/core/retry");
11
+ const serde_1 = require("@smithy/core/serde");
12
+ const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
13
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
14
+ const getRuntimeConfig = (config) => {
15
+ const defaultsMode = (0, config_1.resolveDefaultsModeConfig)(config);
16
+ const defaultConfigProvider = () => defaultsMode().then(client_2.loadConfigsForDefaultMode);
17
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
18
+ return {
19
+ ...clientSharedValues,
20
+ ...config,
21
+ runtime: "browser",
22
+ defaultsMode,
23
+ bodyLengthChecker: config?.bodyLengthChecker ?? serde_1.calculateBodyLength,
24
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
25
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, client_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
26
+ maxAttempts: config?.maxAttempts ?? retry_1.DEFAULT_MAX_ATTEMPTS,
27
+ region: config?.region ?? (0, client_2.invalidProvider)("Region is missing"),
28
+ requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
29
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || retry_1.DEFAULT_RETRY_MODE),
30
+ sha256: config?.sha256 ?? sha256_browser_1.Sha256,
31
+ streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
32
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
33
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_1.DEFAULT_USE_FIPS_ENDPOINT)),
34
+ };
35
+ };
36
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const client_1 = require("@aws-sdk/core/client");
7
+ const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
8
+ const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
9
+ const client_2 = require("@smithy/core/client");
10
+ const config_1 = require("@smithy/core/config");
11
+ const retry_1 = require("@smithy/core/retry");
12
+ const serde_1 = require("@smithy/core/serde");
13
+ const node_http_handler_1 = require("@smithy/node-http-handler");
14
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
15
+ const getRuntimeConfig = (config) => {
16
+ (0, client_2.emitWarningIfUnsupportedVersion)(process.version);
17
+ const defaultsMode = (0, config_1.resolveDefaultsModeConfig)(config);
18
+ const defaultConfigProvider = () => defaultsMode().then(client_2.loadConfigsForDefaultMode);
19
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
20
+ (0, client_1.emitWarningIfUnsupportedVersion)(process.version);
21
+ const loaderConfig = {
22
+ profile: config?.profile,
23
+ logger: clientSharedValues.logger,
24
+ };
25
+ return {
26
+ ...clientSharedValues,
27
+ ...config,
28
+ runtime: "node",
29
+ defaultsMode,
30
+ authSchemePreference: config?.authSchemePreference ?? (0, config_1.loadConfig)(httpAuthSchemes_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
31
+ bodyLengthChecker: config?.bodyLengthChecker ?? serde_1.calculateBodyLength,
32
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
33
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, client_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
34
+ maxAttempts: config?.maxAttempts ?? (0, config_1.loadConfig)(retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
35
+ region: config?.region ?? (0, config_1.loadConfig)(config_1.NODE_REGION_CONFIG_OPTIONS, { ...config_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
36
+ requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
37
+ retryMode: config?.retryMode ??
38
+ (0, config_1.loadConfig)({
39
+ ...retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
40
+ default: async () => (await defaultConfigProvider()).retryMode || retry_1.DEFAULT_RETRY_MODE,
41
+ }, config),
42
+ sha256: config?.sha256 ?? serde_1.Hash.bind(null, "sha256"),
43
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
44
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, config_1.loadConfig)(config_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
45
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, config_1.loadConfig)(config_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
46
+ userAgentAppId: config?.userAgentAppId ?? (0, config_1.loadConfig)(client_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
47
+ };
48
+ };
49
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const sha256_js_1 = require("@aws-crypto/sha256-js");
5
+ const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
6
+ const getRuntimeConfig = (config) => {
7
+ const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
8
+ return {
9
+ ...browserDefaults,
10
+ ...config,
11
+ runtime: "react-native",
12
+ sha256: config?.sha256 ?? sha256_js_1.Sha256,
13
+ };
14
+ };
15
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
5
+ const protocols_1 = require("@aws-sdk/core/protocols");
6
+ const client_1 = require("@smithy/core/client");
7
+ const protocols_2 = require("@smithy/core/protocols");
8
+ const serde_1 = require("@smithy/core/serde");
9
+ const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
10
+ const endpointResolver_1 = require("./endpoint/endpointResolver");
11
+ const schemas_0_1 = require("./schemas/schemas_0");
12
+ const getRuntimeConfig = (config) => {
13
+ return {
14
+ apiVersion: "2026-02-01",
15
+ base64Decoder: config?.base64Decoder ?? serde_1.fromBase64,
16
+ base64Encoder: config?.base64Encoder ?? serde_1.toBase64,
17
+ disableHostPrefix: config?.disableHostPrefix ?? false,
18
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
19
+ extensions: config?.extensions ?? [],
20
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSagemakerJobRuntimeHttpAuthSchemeProvider,
21
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
22
+ {
23
+ schemeId: "aws.auth#sigv4",
24
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
25
+ signer: new httpAuthSchemes_1.AwsSdkSigV4Signer(),
26
+ },
27
+ ],
28
+ logger: config?.logger ?? new client_1.NoOpLogger(),
29
+ protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol,
30
+ protocolSettings: config?.protocolSettings ?? {
31
+ defaultNamespace: "com.amazonaws.sagemakerjobruntime",
32
+ errorTypeRegistries: schemas_0_1.errorTypeRegistries,
33
+ version: "2026-02-01",
34
+ serviceTarget: "AgenticRFTRuntimeService",
35
+ },
36
+ sdkStreamMixin: config?.sdkStreamMixin ?? serde_1.sdkStreamMixin,
37
+ serviceId: config?.serviceId ?? "SagemakerJobRuntime",
38
+ urlParser: config?.urlParser ?? protocols_2.parseUrl,
39
+ utf8Decoder: config?.utf8Decoder ?? serde_1.fromUtf8,
40
+ utf8Encoder: config?.utf8Encoder ?? serde_1.toUtf8,
41
+ };
42
+ };
43
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateReward$ = exports.SampleWithResponseStream$ = exports.Sample$ = exports.CompleteRollout$ = exports.UpdateRewardResponse$ = exports.UpdateRewardRequest$ = exports.SampleWithResponseStreamResponse$ = exports.SampleWithResponseStreamRequest$ = exports.SampleResponse$ = exports.SampleRequest$ = exports.CompleteRolloutResponse$ = exports.CompleteRolloutRequest$ = exports.errorTypeRegistries = exports.ValidationException$ = exports.ThrottlingException$ = exports.ServiceQuotaExceededException$ = exports.ResourceNotFoundException$ = exports.InternalServiceError$ = exports.ConflictException$ = exports.AccessDeniedException$ = exports.SagemakerJobRuntimeServiceException$ = void 0;
4
+ const _ADE = "AccessDeniedException";
5
+ const _B = "Body";
6
+ const _CE = "ConflictException";
7
+ const _CR = "CompleteRollout";
8
+ const _CRR = "CompleteRolloutRequest";
9
+ const _CRRo = "CompleteRolloutResponse";
10
+ const _CT = "ClientToken";
11
+ const _CT_ = "Content-Type";
12
+ const _CTo = "ContentType";
13
+ const _IRB = "InferenceRequestBody";
14
+ const _IRBn = "InferenceResponseBody";
15
+ const _ISE = "InternalServiceError";
16
+ const _JA = "JobArn";
17
+ const _M = "Message";
18
+ const _R = "Rewards";
19
+ const _RNFE = "ResourceNotFoundException";
20
+ const _RS = "ResponseStream";
21
+ const _S = "Status";
22
+ const _SQEE = "ServiceQuotaExceededException";
23
+ const _SR = "SampleRequest";
24
+ const _SRa = "SampleResponse";
25
+ const _SWRS = "SampleWithResponseStream";
26
+ const _SWRSR = "SampleWithResponseStreamRequest";
27
+ const _SWRSRa = "SampleWithResponseStreamResponse";
28
+ const _Sa = "Sample";
29
+ const _TE = "ThrottlingException";
30
+ const _TI = "TrajectoryId";
31
+ const _UR = "UpdateReward";
32
+ const _URR = "UpdateRewardRequest";
33
+ const _URRp = "UpdateRewardResponse";
34
+ const _VE = "ValidationException";
35
+ const _XASJA = "X-Amzn-SageMaker-Job-Arn";
36
+ const _XASTI = "X-Amzn-SageMaker-Trajectory-Id";
37
+ const _c = "client";
38
+ const _e = "error";
39
+ const _h = "http";
40
+ const _hE = "httpError";
41
+ const _hH = "httpHeader";
42
+ const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sagemakerjobruntime";
43
+ const _se = "server";
44
+ const _sen = "sensitive";
45
+ const _st = "streaming";
46
+ const n0 = "com.amazonaws.sagemakerjobruntime";
47
+ const schema_1 = require("@smithy/core/schema");
48
+ const errors_1 = require("../models/errors");
49
+ const SagemakerJobRuntimeServiceException_1 = require("../models/SagemakerJobRuntimeServiceException");
50
+ const _s_registry = schema_1.TypeRegistry.for(_s);
51
+ exports.SagemakerJobRuntimeServiceException$ = [-3, _s, "SagemakerJobRuntimeServiceException", 0, [], []];
52
+ _s_registry.registerError(exports.SagemakerJobRuntimeServiceException$, SagemakerJobRuntimeServiceException_1.SagemakerJobRuntimeServiceException);
53
+ const n0_registry = schema_1.TypeRegistry.for(n0);
54
+ exports.AccessDeniedException$ = [-3, n0, _ADE,
55
+ { [_e]: _c, [_hE]: 403 },
56
+ [_M],
57
+ [0], 1
58
+ ];
59
+ n0_registry.registerError(exports.AccessDeniedException$, errors_1.AccessDeniedException);
60
+ exports.ConflictException$ = [-3, n0, _CE,
61
+ { [_e]: _c, [_hE]: 409 },
62
+ [_M],
63
+ [0], 1
64
+ ];
65
+ n0_registry.registerError(exports.ConflictException$, errors_1.ConflictException);
66
+ exports.InternalServiceError$ = [-3, n0, _ISE,
67
+ { [_e]: _se, [_hE]: 500 },
68
+ [_M],
69
+ [0], 1
70
+ ];
71
+ n0_registry.registerError(exports.InternalServiceError$, errors_1.InternalServiceError);
72
+ exports.ResourceNotFoundException$ = [-3, n0, _RNFE,
73
+ { [_e]: _c, [_hE]: 404 },
74
+ [_M],
75
+ [0], 1
76
+ ];
77
+ n0_registry.registerError(exports.ResourceNotFoundException$, errors_1.ResourceNotFoundException);
78
+ exports.ServiceQuotaExceededException$ = [-3, n0, _SQEE,
79
+ { [_e]: _c, [_hE]: 402 },
80
+ [_M],
81
+ [0], 1
82
+ ];
83
+ n0_registry.registerError(exports.ServiceQuotaExceededException$, errors_1.ServiceQuotaExceededException);
84
+ exports.ThrottlingException$ = [-3, n0, _TE,
85
+ { [_e]: _c, [_hE]: 429 },
86
+ [_M],
87
+ [0], 1
88
+ ];
89
+ n0_registry.registerError(exports.ThrottlingException$, errors_1.ThrottlingException);
90
+ exports.ValidationException$ = [-3, n0, _VE,
91
+ { [_e]: _c, [_hE]: 400 },
92
+ [_M],
93
+ [0], 1
94
+ ];
95
+ n0_registry.registerError(exports.ValidationException$, errors_1.ValidationException);
96
+ exports.errorTypeRegistries = [
97
+ _s_registry,
98
+ n0_registry,
99
+ ];
100
+ var InferenceRequestBody = [0, n0, _IRB, 8, 21];
101
+ var InferenceResponseBody = [0, n0, _IRBn, 8, 21];
102
+ var ResponseStream = [0, n0, _RS, { [_sen]: 1, [_st]: 1 }, 42];
103
+ exports.CompleteRolloutRequest$ = [3, n0, _CRR,
104
+ 0,
105
+ [_JA, _TI, _S, _CT],
106
+ [[0, { [_hH]: _XASJA }], 0, 0, [0, 4]], 2
107
+ ];
108
+ exports.CompleteRolloutResponse$ = [3, n0, _CRRo,
109
+ 0,
110
+ [],
111
+ []
112
+ ];
113
+ exports.SampleRequest$ = [3, n0, _SR,
114
+ 0,
115
+ [_JA, _TI, _B],
116
+ [[0, { [_hH]: _XASJA }], [0, { [_hH]: _XASTI }], [() => InferenceRequestBody, 16]], 3
117
+ ];
118
+ exports.SampleResponse$ = [3, n0, _SRa,
119
+ 0,
120
+ [_B, _CTo],
121
+ [[() => InferenceResponseBody, 16], [0, { [_hH]: _CT_ }]], 1
122
+ ];
123
+ exports.SampleWithResponseStreamRequest$ = [3, n0, _SWRSR,
124
+ 0,
125
+ [_JA, _TI, _B],
126
+ [[0, { [_hH]: _XASJA }], [0, { [_hH]: _XASTI }], [() => InferenceRequestBody, 16]], 3
127
+ ];
128
+ exports.SampleWithResponseStreamResponse$ = [3, n0, _SWRSRa,
129
+ 0,
130
+ [_B, _CTo],
131
+ [[() => ResponseStream, 16], [0, { [_hH]: _CT_ }]], 1
132
+ ];
133
+ exports.UpdateRewardRequest$ = [3, n0, _URR,
134
+ 0,
135
+ [_JA, _TI, _R, _CT],
136
+ [[0, { [_hH]: _XASJA }], 0, 64 | 1, [0, 4]], 3
137
+ ];
138
+ exports.UpdateRewardResponse$ = [3, n0, _URRp,
139
+ 0,
140
+ [],
141
+ []
142
+ ];
143
+ var DoubleList = 64 | 1;
144
+ exports.CompleteRollout$ = [9, n0, _CR,
145
+ { [_h]: ["POST", "/complete-rollout", 200] }, () => exports.CompleteRolloutRequest$, () => exports.CompleteRolloutResponse$
146
+ ];
147
+ exports.Sample$ = [9, n0, _Sa,
148
+ { [_h]: ["POST", "/sample", 200] }, () => exports.SampleRequest$, () => exports.SampleResponse$
149
+ ];
150
+ exports.SampleWithResponseStream$ = [9, n0, _SWRS,
151
+ { [_h]: ["POST", "/sample-with-response-stream", 200] }, () => exports.SampleWithResponseStreamRequest$, () => exports.SampleWithResponseStreamResponse$
152
+ ];
153
+ exports.UpdateReward$ = [9, n0, _UR,
154
+ { [_h]: ["POST", "/update-reward", 200] }, () => exports.UpdateRewardRequest$, () => exports.UpdateRewardResponse$
155
+ ];
@@ -0,0 +1,15 @@
1
+ import { createAggregatedClient } from "@smithy/core/client";
2
+ import { CompleteRolloutCommand, } from "./commands/CompleteRolloutCommand";
3
+ import { SampleCommand } from "./commands/SampleCommand";
4
+ import { SampleWithResponseStreamCommand, } from "./commands/SampleWithResponseStreamCommand";
5
+ import { UpdateRewardCommand, } from "./commands/UpdateRewardCommand";
6
+ import { SagemakerJobRuntimeClient } from "./SagemakerJobRuntimeClient";
7
+ const commands = {
8
+ CompleteRolloutCommand,
9
+ SampleCommand,
10
+ SampleWithResponseStreamCommand,
11
+ UpdateRewardCommand,
12
+ };
13
+ export class SagemakerJobRuntime extends SagemakerJobRuntimeClient {
14
+ }
15
+ createAggregatedClient(commands, SagemakerJobRuntime);