@wildix/xbees-users-client 1.0.1

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 (49) hide show
  1. package/dist-cjs/Users.js +15 -0
  2. package/dist-cjs/UsersClient.js +19 -0
  3. package/dist-cjs/commands/BatchGetUsersPbxLinkDataCommand.js +41 -0
  4. package/dist-cjs/commands/BatchGetUsersStreamLinkDataCommand.js +41 -0
  5. package/dist-cjs/commands/index.js +5 -0
  6. package/dist-cjs/extensionConfiguration.js +2 -0
  7. package/dist-cjs/index.js +10 -0
  8. package/dist-cjs/models/UsersServiceException.js +12 -0
  9. package/dist-cjs/models/index.js +4 -0
  10. package/dist-cjs/models/models_0.js +17 -0
  11. package/dist-cjs/protocols/Aws_restJson1.js +184 -0
  12. package/dist-cjs/runtimeConfig.browser.js +28 -0
  13. package/dist-cjs/runtimeConfig.js +32 -0
  14. package/dist-cjs/runtimeConfig.native.js +15 -0
  15. package/dist-cjs/runtimeConfig.shared.js +19 -0
  16. package/dist-cjs/runtimeExtensions.js +19 -0
  17. package/dist-es/Users.js +11 -0
  18. package/dist-es/UsersClient.js +15 -0
  19. package/dist-es/commands/BatchGetUsersPbxLinkDataCommand.js +37 -0
  20. package/dist-es/commands/BatchGetUsersStreamLinkDataCommand.js +37 -0
  21. package/dist-es/commands/index.js +2 -0
  22. package/dist-es/extensionConfiguration.js +1 -0
  23. package/dist-es/index.js +5 -0
  24. package/dist-es/models/UsersServiceException.js +8 -0
  25. package/dist-es/models/index.js +1 -0
  26. package/dist-es/models/models_0.js +13 -0
  27. package/dist-es/protocols/Aws_restJson1.js +177 -0
  28. package/dist-es/runtimeConfig.browser.js +24 -0
  29. package/dist-es/runtimeConfig.js +28 -0
  30. package/dist-es/runtimeConfig.native.js +11 -0
  31. package/dist-es/runtimeConfig.shared.js +15 -0
  32. package/dist-es/runtimeExtensions.js +15 -0
  33. package/dist-types/Users.d.ts +23 -0
  34. package/dist-types/UsersClient.d.ts +135 -0
  35. package/dist-types/commands/BatchGetUsersPbxLinkDataCommand.d.ts +82 -0
  36. package/dist-types/commands/BatchGetUsersStreamLinkDataCommand.d.ts +92 -0
  37. package/dist-types/commands/index.d.ts +2 -0
  38. package/dist-types/extensionConfiguration.d.ts +7 -0
  39. package/dist-types/index.d.ts +5 -0
  40. package/dist-types/models/UsersServiceException.d.ts +13 -0
  41. package/dist-types/models/index.d.ts +1 -0
  42. package/dist-types/models/models_0.d.ts +65 -0
  43. package/dist-types/protocols/Aws_restJson1.d.ts +20 -0
  44. package/dist-types/runtimeConfig.browser.d.ts +27 -0
  45. package/dist-types/runtimeConfig.d.ts +27 -0
  46. package/dist-types/runtimeConfig.native.d.ts +26 -0
  47. package/dist-types/runtimeConfig.shared.d.ts +15 -0
  48. package/dist-types/runtimeExtensions.d.ts +17 -0
  49. package/package.json +76 -0
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Users = void 0;
4
+ const UsersClient_1 = require("./UsersClient");
5
+ const BatchGetUsersPbxLinkDataCommand_1 = require("./commands/BatchGetUsersPbxLinkDataCommand");
6
+ const BatchGetUsersStreamLinkDataCommand_1 = require("./commands/BatchGetUsersStreamLinkDataCommand");
7
+ const smithy_client_1 = require("@smithy/smithy-client");
8
+ const commands = {
9
+ BatchGetUsersPbxLinkDataCommand: BatchGetUsersPbxLinkDataCommand_1.BatchGetUsersPbxLinkDataCommand,
10
+ BatchGetUsersStreamLinkDataCommand: BatchGetUsersStreamLinkDataCommand_1.BatchGetUsersStreamLinkDataCommand,
11
+ };
12
+ class Users extends UsersClient_1.UsersClient {
13
+ }
14
+ exports.Users = Users;
15
+ (0, smithy_client_1.createAggregatedClient)(commands, Users);
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UsersClient = exports.__Client = void 0;
4
+ const runtimeConfig_1 = require("./runtimeConfig");
5
+ const runtimeExtensions_1 = require("./runtimeExtensions");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
8
+ class UsersClient extends smithy_client_1.Client {
9
+ constructor(...[configuration]) {
10
+ let _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
11
+ let _config_1 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_0, configuration?.extensions || []);
12
+ super(_config_1);
13
+ this.config = _config_1;
14
+ }
15
+ destroy() {
16
+ super.destroy();
17
+ }
18
+ }
19
+ exports.UsersClient = UsersClient;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BatchGetUsersPbxLinkDataCommand = exports.$Command = void 0;
4
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const types_1 = require("@smithy/types");
9
+ class BatchGetUsersPbxLinkDataCommand extends smithy_client_1.Command {
10
+ constructor(input) {
11
+ super();
12
+ this.input = input;
13
+ }
14
+ resolveMiddleware(clientStack, configuration, options) {
15
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
16
+ const stack = clientStack.concat(this.middlewareStack);
17
+ const { logger } = configuration;
18
+ const clientName = "UsersClient";
19
+ const commandName = "BatchGetUsersPbxLinkDataCommand";
20
+ const handlerExecutionContext = {
21
+ logger,
22
+ clientName,
23
+ commandName,
24
+ inputFilterSensitiveLog: (_) => _,
25
+ outputFilterSensitiveLog: (_) => _,
26
+ [types_1.SMITHY_CONTEXT_KEY]: {
27
+ service: "Users",
28
+ operation: "BatchGetUsersPbxLinkData",
29
+ },
30
+ };
31
+ const { requestHandler } = configuration;
32
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
33
+ }
34
+ serialize(input, context) {
35
+ return (0, Aws_restJson1_1.se_BatchGetUsersPbxLinkDataCommand)(input, context);
36
+ }
37
+ deserialize(output, context) {
38
+ return (0, Aws_restJson1_1.de_BatchGetUsersPbxLinkDataCommand)(output, context);
39
+ }
40
+ }
41
+ exports.BatchGetUsersPbxLinkDataCommand = BatchGetUsersPbxLinkDataCommand;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BatchGetUsersStreamLinkDataCommand = exports.$Command = void 0;
4
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const types_1 = require("@smithy/types");
9
+ class BatchGetUsersStreamLinkDataCommand extends smithy_client_1.Command {
10
+ constructor(input) {
11
+ super();
12
+ this.input = input;
13
+ }
14
+ resolveMiddleware(clientStack, configuration, options) {
15
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
16
+ const stack = clientStack.concat(this.middlewareStack);
17
+ const { logger } = configuration;
18
+ const clientName = "UsersClient";
19
+ const commandName = "BatchGetUsersStreamLinkDataCommand";
20
+ const handlerExecutionContext = {
21
+ logger,
22
+ clientName,
23
+ commandName,
24
+ inputFilterSensitiveLog: (_) => _,
25
+ outputFilterSensitiveLog: (_) => _,
26
+ [types_1.SMITHY_CONTEXT_KEY]: {
27
+ service: "Users",
28
+ operation: "BatchGetUsersStreamLinkData",
29
+ },
30
+ };
31
+ const { requestHandler } = configuration;
32
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
33
+ }
34
+ serialize(input, context) {
35
+ return (0, Aws_restJson1_1.se_BatchGetUsersStreamLinkDataCommand)(input, context);
36
+ }
37
+ deserialize(output, context) {
38
+ return (0, Aws_restJson1_1.de_BatchGetUsersStreamLinkDataCommand)(output, context);
39
+ }
40
+ }
41
+ exports.BatchGetUsersStreamLinkDataCommand = BatchGetUsersStreamLinkDataCommand;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./BatchGetUsersPbxLinkDataCommand"), exports);
5
+ tslib_1.__exportStar(require("./BatchGetUsersStreamLinkDataCommand"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UsersServiceException = void 0;
4
+ const tslib_1 = require("tslib");
5
+ tslib_1.__exportStar(require("./UsersClient"), exports);
6
+ tslib_1.__exportStar(require("./Users"), exports);
7
+ tslib_1.__exportStar(require("./commands"), exports);
8
+ tslib_1.__exportStar(require("./models"), exports);
9
+ var UsersServiceException_1 = require("./models/UsersServiceException");
10
+ Object.defineProperty(exports, "UsersServiceException", { enumerable: true, get: function () { return UsersServiceException_1.UsersServiceException; } });
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UsersServiceException = 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 UsersServiceException extends smithy_client_1.ServiceException {
7
+ constructor(options) {
8
+ super(options);
9
+ Object.setPrototypeOf(this, UsersServiceException.prototype);
10
+ }
11
+ }
12
+ exports.UsersServiceException = UsersServiceException;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./models_0"), exports);
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ValidationException = void 0;
4
+ const UsersServiceException_1 = require("./UsersServiceException");
5
+ class ValidationException extends UsersServiceException_1.UsersServiceException {
6
+ constructor(opts) {
7
+ super({
8
+ name: "ValidationException",
9
+ $fault: "client",
10
+ ...opts
11
+ });
12
+ this.name = "ValidationException";
13
+ this.$fault = "client";
14
+ Object.setPrototypeOf(this, ValidationException.prototype);
15
+ }
16
+ }
17
+ exports.ValidationException = ValidationException;
@@ -0,0 +1,184 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.de_BatchGetUsersStreamLinkDataCommand = exports.de_BatchGetUsersPbxLinkDataCommand = exports.se_BatchGetUsersStreamLinkDataCommand = exports.se_BatchGetUsersPbxLinkDataCommand = void 0;
4
+ const UsersServiceException_1 = require("../models/UsersServiceException");
5
+ const models_0_1 = require("../models/models_0");
6
+ const protocol_http_1 = require("@smithy/protocol-http");
7
+ const smithy_client_1 = require("@smithy/smithy-client");
8
+ const se_BatchGetUsersPbxLinkDataCommand = async (input, context) => {
9
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const headers = {
11
+ 'content-type': 'application/json',
12
+ };
13
+ let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/users/BatchGetUsersPbxLinkData";
14
+ let body;
15
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
16
+ 'id': _ => (0, smithy_client_1._json)(_),
17
+ }));
18
+ return new protocol_http_1.HttpRequest({
19
+ protocol,
20
+ hostname,
21
+ port,
22
+ method: "POST",
23
+ headers,
24
+ path: resolvedPath,
25
+ body,
26
+ });
27
+ };
28
+ exports.se_BatchGetUsersPbxLinkDataCommand = se_BatchGetUsersPbxLinkDataCommand;
29
+ const se_BatchGetUsersStreamLinkDataCommand = async (input, context) => {
30
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
31
+ const headers = {
32
+ 'content-type': 'application/json',
33
+ };
34
+ let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v1/users/BatchGetUsersStreamLinkData";
35
+ let body;
36
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
37
+ 'id': _ => (0, smithy_client_1._json)(_),
38
+ }));
39
+ return new protocol_http_1.HttpRequest({
40
+ protocol,
41
+ hostname,
42
+ port,
43
+ method: "POST",
44
+ headers,
45
+ path: resolvedPath,
46
+ body,
47
+ });
48
+ };
49
+ exports.se_BatchGetUsersStreamLinkDataCommand = se_BatchGetUsersStreamLinkDataCommand;
50
+ const de_BatchGetUsersPbxLinkDataCommand = async (output, context) => {
51
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
52
+ return de_BatchGetUsersPbxLinkDataCommandError(output, context);
53
+ }
54
+ const contents = (0, smithy_client_1.map)({
55
+ $metadata: deserializeMetadata(output),
56
+ });
57
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
58
+ const doc = (0, smithy_client_1.take)(data, {
59
+ 'users': smithy_client_1._json,
60
+ });
61
+ Object.assign(contents, doc);
62
+ return contents;
63
+ };
64
+ exports.de_BatchGetUsersPbxLinkDataCommand = de_BatchGetUsersPbxLinkDataCommand;
65
+ const de_BatchGetUsersPbxLinkDataCommandError = async (output, context) => {
66
+ const parsedOutput = {
67
+ ...output,
68
+ body: await parseErrorBody(output.body, context)
69
+ };
70
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
71
+ switch (errorCode) {
72
+ case "ValidationException":
73
+ case "smithy.framework#ValidationException":
74
+ throw await de_ValidationExceptionRes(parsedOutput, context);
75
+ default:
76
+ const parsedBody = parsedOutput.body;
77
+ return throwDefaultError({
78
+ output,
79
+ parsedBody,
80
+ errorCode
81
+ });
82
+ }
83
+ };
84
+ const de_BatchGetUsersStreamLinkDataCommand = async (output, context) => {
85
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
86
+ return de_BatchGetUsersStreamLinkDataCommandError(output, context);
87
+ }
88
+ const contents = (0, smithy_client_1.map)({
89
+ $metadata: deserializeMetadata(output),
90
+ });
91
+ const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await parseBody(output.body, context))), "body");
92
+ const doc = (0, smithy_client_1.take)(data, {
93
+ 'users': smithy_client_1._json,
94
+ });
95
+ Object.assign(contents, doc);
96
+ return contents;
97
+ };
98
+ exports.de_BatchGetUsersStreamLinkDataCommand = de_BatchGetUsersStreamLinkDataCommand;
99
+ const de_BatchGetUsersStreamLinkDataCommandError = async (output, context) => {
100
+ const parsedOutput = {
101
+ ...output,
102
+ body: await parseErrorBody(output.body, context)
103
+ };
104
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
105
+ switch (errorCode) {
106
+ case "ValidationException":
107
+ case "smithy.framework#ValidationException":
108
+ throw await de_ValidationExceptionRes(parsedOutput, context);
109
+ default:
110
+ const parsedBody = parsedOutput.body;
111
+ return throwDefaultError({
112
+ output,
113
+ parsedBody,
114
+ errorCode
115
+ });
116
+ }
117
+ };
118
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(UsersServiceException_1.UsersServiceException);
119
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
120
+ const contents = (0, smithy_client_1.map)({});
121
+ const data = parsedOutput.body;
122
+ const doc = (0, smithy_client_1.take)(data, {
123
+ 'message': smithy_client_1.expectString,
124
+ });
125
+ Object.assign(contents, doc);
126
+ const exception = new models_0_1.ValidationException({
127
+ $metadata: deserializeMetadata(parsedOutput),
128
+ ...contents
129
+ });
130
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
131
+ };
132
+ const deserializeMetadata = (output) => ({
133
+ httpStatusCode: output.statusCode,
134
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
135
+ extendedRequestId: output.headers["x-amz-id-2"],
136
+ cfId: output.headers["x-amz-cf-id"],
137
+ });
138
+ const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
139
+ const isSerializableHeaderValue = (value) => value !== undefined &&
140
+ value !== null &&
141
+ value !== "" &&
142
+ (!Object.getOwnPropertyNames(value).includes("length") ||
143
+ value.length != 0) &&
144
+ (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
145
+ const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
146
+ if (encoded.length) {
147
+ return JSON.parse(encoded);
148
+ }
149
+ return {};
150
+ });
151
+ const parseErrorBody = async (errorBody, context) => {
152
+ const value = await parseBody(errorBody, context);
153
+ value.message = value.message ?? value.Message;
154
+ return value;
155
+ };
156
+ const loadRestJsonErrorCode = (output, data) => {
157
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
158
+ const sanitizeErrorCode = (rawValue) => {
159
+ let cleanValue = rawValue;
160
+ if (typeof cleanValue === "number") {
161
+ cleanValue = cleanValue.toString();
162
+ }
163
+ if (cleanValue.indexOf(",") >= 0) {
164
+ cleanValue = cleanValue.split(",")[0];
165
+ }
166
+ if (cleanValue.indexOf(":") >= 0) {
167
+ cleanValue = cleanValue.split(":")[0];
168
+ }
169
+ if (cleanValue.indexOf("#") >= 0) {
170
+ cleanValue = cleanValue.split("#")[1];
171
+ }
172
+ return cleanValue;
173
+ };
174
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
175
+ if (headerKey !== undefined) {
176
+ return sanitizeErrorCode(output.headers[headerKey]);
177
+ }
178
+ if (data.code !== undefined) {
179
+ return sanitizeErrorCode(data.code);
180
+ }
181
+ if (data["__type"] !== undefined) {
182
+ return sanitizeErrorCode(data["__type"]);
183
+ }
184
+ };
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const sha256_browser_1 = require("@aws-crypto/sha256-browser");
5
+ const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
6
+ const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
7
+ const util_retry_1 = require("@smithy/util-retry");
8
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
9
+ const smithy_client_1 = require("@smithy/smithy-client");
10
+ const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
11
+ const getRuntimeConfig = (config) => {
12
+ const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
13
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
14
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
15
+ return {
16
+ ...clientSharedValues,
17
+ ...config,
18
+ runtime: "browser",
19
+ defaultsMode,
20
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
21
+ maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
22
+ requestHandler: config?.requestHandler ?? new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
23
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
24
+ sha256: config?.sha256 ?? sha256_browser_1.Sha256,
25
+ streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
26
+ };
27
+ };
28
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const hash_node_1 = require("@smithy/hash-node");
5
+ const middleware_retry_1 = require("@smithy/middleware-retry");
6
+ const node_config_provider_1 = require("@smithy/node-config-provider");
7
+ const node_http_handler_1 = require("@smithy/node-http-handler");
8
+ const util_body_length_node_1 = require("@smithy/util-body-length-node");
9
+ const util_retry_1 = require("@smithy/util-retry");
10
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
11
+ const smithy_client_1 = require("@smithy/smithy-client");
12
+ const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
13
+ const smithy_client_2 = require("@smithy/smithy-client");
14
+ const getRuntimeConfig = (config) => {
15
+ (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
16
+ const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
17
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
18
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
19
+ return {
20
+ ...clientSharedValues,
21
+ ...config,
22
+ runtime: "node",
23
+ defaultsMode,
24
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
25
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
26
+ requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
27
+ retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, }),
28
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
29
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
30
+ };
31
+ };
32
+ 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,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const smithy_client_1 = require("@smithy/smithy-client");
5
+ const url_parser_1 = require("@smithy/url-parser");
6
+ const util_base64_1 = require("@smithy/util-base64");
7
+ const util_utf8_1 = require("@smithy/util-utf8");
8
+ const getRuntimeConfig = (config) => ({
9
+ apiVersion: "2018-05-10",
10
+ base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
11
+ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
12
+ disableHostPrefix: config?.disableHostPrefix ?? false,
13
+ extensions: config?.extensions ?? [],
14
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
15
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
16
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
17
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
18
+ });
19
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveRuntimeExtensions = void 0;
4
+ const protocol_http_1 = require("@smithy/protocol-http");
5
+ const smithy_client_1 = require("@smithy/smithy-client");
6
+ const asPartial = (t) => t;
7
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
8
+ const extensionConfiguration = {
9
+ ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
10
+ ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
11
+ };
12
+ extensions.forEach(extension => extension.configure(extensionConfiguration));
13
+ return {
14
+ ...runtimeConfig,
15
+ ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
16
+ ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
17
+ };
18
+ };
19
+ exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
@@ -0,0 +1,11 @@
1
+ import { UsersClient, } from "./UsersClient";
2
+ import { BatchGetUsersPbxLinkDataCommand, } from "./commands/BatchGetUsersPbxLinkDataCommand";
3
+ import { BatchGetUsersStreamLinkDataCommand, } from "./commands/BatchGetUsersStreamLinkDataCommand";
4
+ import { createAggregatedClient } from "@smithy/smithy-client";
5
+ const commands = {
6
+ BatchGetUsersPbxLinkDataCommand,
7
+ BatchGetUsersStreamLinkDataCommand,
8
+ };
9
+ export class Users extends UsersClient {
10
+ }
11
+ createAggregatedClient(commands, Users);
@@ -0,0 +1,15 @@
1
+ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
2
+ import { resolveRuntimeExtensions, } from "./runtimeExtensions";
3
+ import { Client as __Client, } from "@smithy/smithy-client";
4
+ export { __Client };
5
+ export class UsersClient extends __Client {
6
+ constructor(...[configuration]) {
7
+ let _config_0 = __getRuntimeConfig(configuration || {});
8
+ let _config_1 = resolveRuntimeExtensions(_config_0, configuration?.extensions || []);
9
+ super(_config_1);
10
+ this.config = _config_1;
11
+ }
12
+ destroy() {
13
+ super.destroy();
14
+ }
15
+ }
@@ -0,0 +1,37 @@
1
+ import { de_BatchGetUsersPbxLinkDataCommand, se_BatchGetUsersPbxLinkDataCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ export { $Command };
6
+ export class BatchGetUsersPbxLinkDataCommand extends $Command {
7
+ constructor(input) {
8
+ super();
9
+ this.input = input;
10
+ }
11
+ resolveMiddleware(clientStack, configuration, options) {
12
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
13
+ const stack = clientStack.concat(this.middlewareStack);
14
+ const { logger } = configuration;
15
+ const clientName = "UsersClient";
16
+ const commandName = "BatchGetUsersPbxLinkDataCommand";
17
+ const handlerExecutionContext = {
18
+ logger,
19
+ clientName,
20
+ commandName,
21
+ inputFilterSensitiveLog: (_) => _,
22
+ outputFilterSensitiveLog: (_) => _,
23
+ [SMITHY_CONTEXT_KEY]: {
24
+ service: "Users",
25
+ operation: "BatchGetUsersPbxLinkData",
26
+ },
27
+ };
28
+ const { requestHandler } = configuration;
29
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
30
+ }
31
+ serialize(input, context) {
32
+ return se_BatchGetUsersPbxLinkDataCommand(input, context);
33
+ }
34
+ deserialize(output, context) {
35
+ return de_BatchGetUsersPbxLinkDataCommand(output, context);
36
+ }
37
+ }
@@ -0,0 +1,37 @@
1
+ import { de_BatchGetUsersStreamLinkDataCommand, se_BatchGetUsersStreamLinkDataCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ export { $Command };
6
+ export class BatchGetUsersStreamLinkDataCommand extends $Command {
7
+ constructor(input) {
8
+ super();
9
+ this.input = input;
10
+ }
11
+ resolveMiddleware(clientStack, configuration, options) {
12
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
13
+ const stack = clientStack.concat(this.middlewareStack);
14
+ const { logger } = configuration;
15
+ const clientName = "UsersClient";
16
+ const commandName = "BatchGetUsersStreamLinkDataCommand";
17
+ const handlerExecutionContext = {
18
+ logger,
19
+ clientName,
20
+ commandName,
21
+ inputFilterSensitiveLog: (_) => _,
22
+ outputFilterSensitiveLog: (_) => _,
23
+ [SMITHY_CONTEXT_KEY]: {
24
+ service: "Users",
25
+ operation: "BatchGetUsersStreamLinkData",
26
+ },
27
+ };
28
+ const { requestHandler } = configuration;
29
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
30
+ }
31
+ serialize(input, context) {
32
+ return se_BatchGetUsersStreamLinkDataCommand(input, context);
33
+ }
34
+ deserialize(output, context) {
35
+ return de_BatchGetUsersStreamLinkDataCommand(output, context);
36
+ }
37
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./BatchGetUsersPbxLinkDataCommand";
2
+ export * from "./BatchGetUsersStreamLinkDataCommand";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from "./UsersClient";
2
+ export * from "./Users";
3
+ export * from "./commands";
4
+ export * from "./models";
5
+ export { UsersServiceException } from "./models/UsersServiceException";
@@ -0,0 +1,8 @@
1
+ import { ServiceException as __ServiceException, } from "@smithy/smithy-client";
2
+ export { __ServiceException };
3
+ export class UsersServiceException extends __ServiceException {
4
+ constructor(options) {
5
+ super(options);
6
+ Object.setPrototypeOf(this, UsersServiceException.prototype);
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ export * from "./models_0";
@@ -0,0 +1,13 @@
1
+ import { UsersServiceException as __BaseException } from "./UsersServiceException";
2
+ export class ValidationException extends __BaseException {
3
+ constructor(opts) {
4
+ super({
5
+ name: "ValidationException",
6
+ $fault: "client",
7
+ ...opts
8
+ });
9
+ this.name = "ValidationException";
10
+ this.$fault = "client";
11
+ Object.setPrototypeOf(this, ValidationException.prototype);
12
+ }
13
+ }