@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.
- package/dist-cjs/Users.js +15 -0
- package/dist-cjs/UsersClient.js +19 -0
- package/dist-cjs/commands/BatchGetUsersPbxLinkDataCommand.js +41 -0
- package/dist-cjs/commands/BatchGetUsersStreamLinkDataCommand.js +41 -0
- package/dist-cjs/commands/index.js +5 -0
- package/dist-cjs/extensionConfiguration.js +2 -0
- package/dist-cjs/index.js +10 -0
- package/dist-cjs/models/UsersServiceException.js +12 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +17 -0
- package/dist-cjs/protocols/Aws_restJson1.js +184 -0
- package/dist-cjs/runtimeConfig.browser.js +28 -0
- package/dist-cjs/runtimeConfig.js +32 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +19 -0
- package/dist-cjs/runtimeExtensions.js +19 -0
- package/dist-es/Users.js +11 -0
- package/dist-es/UsersClient.js +15 -0
- package/dist-es/commands/BatchGetUsersPbxLinkDataCommand.js +37 -0
- package/dist-es/commands/BatchGetUsersStreamLinkDataCommand.js +37 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +5 -0
- package/dist-es/models/UsersServiceException.js +8 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +13 -0
- package/dist-es/protocols/Aws_restJson1.js +177 -0
- package/dist-es/runtimeConfig.browser.js +24 -0
- package/dist-es/runtimeConfig.js +28 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +15 -0
- package/dist-es/runtimeExtensions.js +15 -0
- package/dist-types/Users.d.ts +23 -0
- package/dist-types/UsersClient.d.ts +135 -0
- package/dist-types/commands/BatchGetUsersPbxLinkDataCommand.d.ts +82 -0
- package/dist-types/commands/BatchGetUsersStreamLinkDataCommand.d.ts +92 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +7 -0
- package/dist-types/index.d.ts +5 -0
- package/dist-types/models/UsersServiceException.d.ts +13 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +65 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +20 -0
- package/dist-types/runtimeConfig.browser.d.ts +27 -0
- package/dist-types/runtimeConfig.d.ts +27 -0
- package/dist-types/runtimeConfig.native.d.ts +26 -0
- package/dist-types/runtimeConfig.shared.d.ts +15 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/package.json +76 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { UsersServiceException as __BaseException } from "../models/UsersServiceException";
|
|
2
|
+
import { ValidationException } from "../models/models_0";
|
|
3
|
+
import { HttpRequest as __HttpRequest, } from "@smithy/protocol-http";
|
|
4
|
+
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
|
+
export const se_BatchGetUsersPbxLinkDataCommand = async (input, context) => {
|
|
6
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
|
+
const headers = {
|
|
8
|
+
'content-type': 'application/json',
|
|
9
|
+
};
|
|
10
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v2/users/BatchGetUsersPbxLinkData";
|
|
11
|
+
let body;
|
|
12
|
+
body = JSON.stringify(take(input, {
|
|
13
|
+
'id': _ => _json(_),
|
|
14
|
+
}));
|
|
15
|
+
return new __HttpRequest({
|
|
16
|
+
protocol,
|
|
17
|
+
hostname,
|
|
18
|
+
port,
|
|
19
|
+
method: "POST",
|
|
20
|
+
headers,
|
|
21
|
+
path: resolvedPath,
|
|
22
|
+
body,
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
export const se_BatchGetUsersStreamLinkDataCommand = async (input, context) => {
|
|
26
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
27
|
+
const headers = {
|
|
28
|
+
'content-type': 'application/json',
|
|
29
|
+
};
|
|
30
|
+
let resolvedPath = `${basePath?.endsWith('/') ? basePath.slice(0, -1) : (basePath || '')}` + "/v1/users/BatchGetUsersStreamLinkData";
|
|
31
|
+
let body;
|
|
32
|
+
body = JSON.stringify(take(input, {
|
|
33
|
+
'id': _ => _json(_),
|
|
34
|
+
}));
|
|
35
|
+
return new __HttpRequest({
|
|
36
|
+
protocol,
|
|
37
|
+
hostname,
|
|
38
|
+
port,
|
|
39
|
+
method: "POST",
|
|
40
|
+
headers,
|
|
41
|
+
path: resolvedPath,
|
|
42
|
+
body,
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
export const de_BatchGetUsersPbxLinkDataCommand = async (output, context) => {
|
|
46
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
47
|
+
return de_BatchGetUsersPbxLinkDataCommandError(output, context);
|
|
48
|
+
}
|
|
49
|
+
const contents = map({
|
|
50
|
+
$metadata: deserializeMetadata(output),
|
|
51
|
+
});
|
|
52
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
53
|
+
const doc = take(data, {
|
|
54
|
+
'users': _json,
|
|
55
|
+
});
|
|
56
|
+
Object.assign(contents, doc);
|
|
57
|
+
return contents;
|
|
58
|
+
};
|
|
59
|
+
const de_BatchGetUsersPbxLinkDataCommandError = async (output, context) => {
|
|
60
|
+
const parsedOutput = {
|
|
61
|
+
...output,
|
|
62
|
+
body: await parseErrorBody(output.body, context)
|
|
63
|
+
};
|
|
64
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
65
|
+
switch (errorCode) {
|
|
66
|
+
case "ValidationException":
|
|
67
|
+
case "smithy.framework#ValidationException":
|
|
68
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
69
|
+
default:
|
|
70
|
+
const parsedBody = parsedOutput.body;
|
|
71
|
+
return throwDefaultError({
|
|
72
|
+
output,
|
|
73
|
+
parsedBody,
|
|
74
|
+
errorCode
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
export const de_BatchGetUsersStreamLinkDataCommand = async (output, context) => {
|
|
79
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
80
|
+
return de_BatchGetUsersStreamLinkDataCommandError(output, context);
|
|
81
|
+
}
|
|
82
|
+
const contents = map({
|
|
83
|
+
$metadata: deserializeMetadata(output),
|
|
84
|
+
});
|
|
85
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
86
|
+
const doc = take(data, {
|
|
87
|
+
'users': _json,
|
|
88
|
+
});
|
|
89
|
+
Object.assign(contents, doc);
|
|
90
|
+
return contents;
|
|
91
|
+
};
|
|
92
|
+
const de_BatchGetUsersStreamLinkDataCommandError = async (output, context) => {
|
|
93
|
+
const parsedOutput = {
|
|
94
|
+
...output,
|
|
95
|
+
body: await parseErrorBody(output.body, context)
|
|
96
|
+
};
|
|
97
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
98
|
+
switch (errorCode) {
|
|
99
|
+
case "ValidationException":
|
|
100
|
+
case "smithy.framework#ValidationException":
|
|
101
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
102
|
+
default:
|
|
103
|
+
const parsedBody = parsedOutput.body;
|
|
104
|
+
return throwDefaultError({
|
|
105
|
+
output,
|
|
106
|
+
parsedBody,
|
|
107
|
+
errorCode
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
112
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
113
|
+
const contents = map({});
|
|
114
|
+
const data = parsedOutput.body;
|
|
115
|
+
const doc = take(data, {
|
|
116
|
+
'message': __expectString,
|
|
117
|
+
});
|
|
118
|
+
Object.assign(contents, doc);
|
|
119
|
+
const exception = new ValidationException({
|
|
120
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
121
|
+
...contents
|
|
122
|
+
});
|
|
123
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
124
|
+
};
|
|
125
|
+
const deserializeMetadata = (output) => ({
|
|
126
|
+
httpStatusCode: output.statusCode,
|
|
127
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
128
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
129
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
130
|
+
});
|
|
131
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then(body => context.utf8Encoder(body));
|
|
132
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
133
|
+
value !== null &&
|
|
134
|
+
value !== "" &&
|
|
135
|
+
(!Object.getOwnPropertyNames(value).includes("length") ||
|
|
136
|
+
value.length != 0) &&
|
|
137
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
138
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then(encoded => {
|
|
139
|
+
if (encoded.length) {
|
|
140
|
+
return JSON.parse(encoded);
|
|
141
|
+
}
|
|
142
|
+
return {};
|
|
143
|
+
});
|
|
144
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
145
|
+
const value = await parseBody(errorBody, context);
|
|
146
|
+
value.message = value.message ?? value.Message;
|
|
147
|
+
return value;
|
|
148
|
+
};
|
|
149
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
150
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
151
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
152
|
+
let cleanValue = rawValue;
|
|
153
|
+
if (typeof cleanValue === "number") {
|
|
154
|
+
cleanValue = cleanValue.toString();
|
|
155
|
+
}
|
|
156
|
+
if (cleanValue.indexOf(",") >= 0) {
|
|
157
|
+
cleanValue = cleanValue.split(",")[0];
|
|
158
|
+
}
|
|
159
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
160
|
+
cleanValue = cleanValue.split(":")[0];
|
|
161
|
+
}
|
|
162
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
163
|
+
cleanValue = cleanValue.split("#")[1];
|
|
164
|
+
}
|
|
165
|
+
return cleanValue;
|
|
166
|
+
};
|
|
167
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
168
|
+
if (headerKey !== undefined) {
|
|
169
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
170
|
+
}
|
|
171
|
+
if (data.code !== undefined) {
|
|
172
|
+
return sanitizeErrorCode(data.code);
|
|
173
|
+
}
|
|
174
|
+
if (data["__type"] !== undefined) {
|
|
175
|
+
return sanitizeErrorCode(data["__type"]);
|
|
176
|
+
}
|
|
177
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
2
|
+
import { FetchHttpHandler as RequestHandler, streamCollector, } from "@smithy/fetch-http-handler";
|
|
3
|
+
import { calculateBodyLength } from "@smithy/util-body-length-browser";
|
|
4
|
+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE, } from "@smithy/util-retry";
|
|
5
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
6
|
+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
7
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
|
|
8
|
+
export const getRuntimeConfig = (config) => {
|
|
9
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
10
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
11
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
12
|
+
return {
|
|
13
|
+
...clientSharedValues,
|
|
14
|
+
...config,
|
|
15
|
+
runtime: "browser",
|
|
16
|
+
defaultsMode,
|
|
17
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
18
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
19
|
+
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
|
20
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
21
|
+
sha256: config?.sha256 ?? Sha256,
|
|
22
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Hash } from "@smithy/hash-node";
|
|
2
|
+
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/middleware-retry";
|
|
3
|
+
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
|
|
4
|
+
import { NodeHttpHandler as RequestHandler, streamCollector, } from "@smithy/node-http-handler";
|
|
5
|
+
import { calculateBodyLength } from "@smithy/util-body-length-node";
|
|
6
|
+
import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
|
|
7
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
8
|
+
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
9
|
+
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
|
|
10
|
+
import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client";
|
|
11
|
+
export const getRuntimeConfig = (config) => {
|
|
12
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
13
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
14
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
15
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
+
return {
|
|
17
|
+
...clientSharedValues,
|
|
18
|
+
...config,
|
|
19
|
+
runtime: "node",
|
|
20
|
+
defaultsMode,
|
|
21
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
22
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
23
|
+
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
|
24
|
+
retryMode: config?.retryMode ?? loadNodeConfig({ ...NODE_RETRY_MODE_CONFIG_OPTIONS, default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, }),
|
|
25
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
26
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
2
|
+
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
3
|
+
export const getRuntimeConfig = (config) => {
|
|
4
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
5
|
+
return {
|
|
6
|
+
...browserDefaults,
|
|
7
|
+
...config,
|
|
8
|
+
runtime: "react-native",
|
|
9
|
+
sha256: config?.sha256 ?? Sha256,
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NoOpLogger } from "@smithy/smithy-client";
|
|
2
|
+
import { parseUrl } from "@smithy/url-parser";
|
|
3
|
+
import { fromBase64, toBase64, } from "@smithy/util-base64";
|
|
4
|
+
import { fromUtf8, toUtf8, } from "@smithy/util-utf8";
|
|
5
|
+
export const getRuntimeConfig = (config) => ({
|
|
6
|
+
apiVersion: "2018-05-10",
|
|
7
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
8
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
9
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
10
|
+
extensions: config?.extensions ?? [],
|
|
11
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
12
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
13
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
14
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
15
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, } from "@smithy/protocol-http";
|
|
2
|
+
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, } from "@smithy/smithy-client";
|
|
3
|
+
const asPartial = (t) => t;
|
|
4
|
+
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
5
|
+
const extensionConfiguration = {
|
|
6
|
+
...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
|
|
7
|
+
...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
|
|
8
|
+
};
|
|
9
|
+
extensions.forEach(extension => extension.configure(extensionConfiguration));
|
|
10
|
+
return {
|
|
11
|
+
...runtimeConfig,
|
|
12
|
+
...resolveDefaultRuntimeConfig(extensionConfiguration),
|
|
13
|
+
...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { UsersClient } from "./UsersClient";
|
|
2
|
+
import { BatchGetUsersPbxLinkDataCommandInput, BatchGetUsersPbxLinkDataCommandOutput } from "./commands/BatchGetUsersPbxLinkDataCommand";
|
|
3
|
+
import { BatchGetUsersStreamLinkDataCommandInput, BatchGetUsersStreamLinkDataCommandOutput } from "./commands/BatchGetUsersStreamLinkDataCommand";
|
|
4
|
+
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
5
|
+
export interface Users {
|
|
6
|
+
/**
|
|
7
|
+
* @see {@link BatchGetUsersPbxLinkDataCommand}
|
|
8
|
+
*/
|
|
9
|
+
batchGetUsersPbxLinkData(args: BatchGetUsersPbxLinkDataCommandInput, options?: __HttpHandlerOptions): Promise<BatchGetUsersPbxLinkDataCommandOutput>;
|
|
10
|
+
batchGetUsersPbxLinkData(args: BatchGetUsersPbxLinkDataCommandInput, cb: (err: any, data?: BatchGetUsersPbxLinkDataCommandOutput) => void): void;
|
|
11
|
+
batchGetUsersPbxLinkData(args: BatchGetUsersPbxLinkDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchGetUsersPbxLinkDataCommandOutput) => void): void;
|
|
12
|
+
/**
|
|
13
|
+
* @see {@link BatchGetUsersStreamLinkDataCommand}
|
|
14
|
+
*/
|
|
15
|
+
batchGetUsersStreamLinkData(args: BatchGetUsersStreamLinkDataCommandInput, options?: __HttpHandlerOptions): Promise<BatchGetUsersStreamLinkDataCommandOutput>;
|
|
16
|
+
batchGetUsersStreamLinkData(args: BatchGetUsersStreamLinkDataCommandInput, cb: (err: any, data?: BatchGetUsersStreamLinkDataCommandOutput) => void): void;
|
|
17
|
+
batchGetUsersStreamLinkData(args: BatchGetUsersStreamLinkDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchGetUsersStreamLinkDataCommandOutput) => void): void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export declare class Users extends UsersClient implements Users {
|
|
23
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { BatchGetUsersPbxLinkDataCommandInput, BatchGetUsersPbxLinkDataCommandOutput } from "./commands/BatchGetUsersPbxLinkDataCommand";
|
|
2
|
+
import { BatchGetUsersStreamLinkDataCommandInput, BatchGetUsersStreamLinkDataCommandOutput } from "./commands/BatchGetUsersStreamLinkDataCommand";
|
|
3
|
+
import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
4
|
+
import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
|
|
5
|
+
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
|
|
6
|
+
import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser } from "@smithy/types";
|
|
7
|
+
export { __Client };
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export type ServiceInputTypes = BatchGetUsersPbxLinkDataCommandInput | BatchGetUsersStreamLinkDataCommandInput;
|
|
12
|
+
/**
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export type ServiceOutputTypes = BatchGetUsersPbxLinkDataCommandOutput | BatchGetUsersStreamLinkDataCommandOutput;
|
|
16
|
+
/**
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
20
|
+
/**
|
|
21
|
+
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
|
|
22
|
+
*/
|
|
23
|
+
requestHandler?: __HttpHandler;
|
|
24
|
+
/**
|
|
25
|
+
* A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface
|
|
26
|
+
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
sha256?: __ChecksumConstructor | __HashConstructor;
|
|
30
|
+
/**
|
|
31
|
+
* The function that will be used to convert strings into HTTP endpoints.
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
urlParser?: __UrlParser;
|
|
35
|
+
/**
|
|
36
|
+
* A function that can calculate the length of a request body.
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
bodyLengthChecker?: __BodyLengthCalculator;
|
|
40
|
+
/**
|
|
41
|
+
* A function that converts a stream into an array of bytes.
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
streamCollector?: __StreamCollector;
|
|
45
|
+
/**
|
|
46
|
+
* The function that will be used to convert a base64-encoded string to a byte array.
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
base64Decoder?: __Decoder;
|
|
50
|
+
/**
|
|
51
|
+
* The function that will be used to convert binary data to a base64-encoded string.
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
base64Encoder?: __Encoder;
|
|
55
|
+
/**
|
|
56
|
+
* The function that will be used to convert a UTF8-encoded string to a byte array.
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
utf8Decoder?: __Decoder;
|
|
60
|
+
/**
|
|
61
|
+
* The function that will be used to convert binary data to a UTF-8 encoded string.
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
utf8Encoder?: __Encoder;
|
|
65
|
+
/**
|
|
66
|
+
* The runtime environment.
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
runtime?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Disable dynamically changing the endpoint of the client based on the hostPrefix
|
|
72
|
+
* trait of an operation.
|
|
73
|
+
*/
|
|
74
|
+
disableHostPrefix?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Value for how many times a request will be made at most in case of retry.
|
|
77
|
+
*/
|
|
78
|
+
maxAttempts?: number | __Provider<number>;
|
|
79
|
+
/**
|
|
80
|
+
* Specifies which retry algorithm to use.
|
|
81
|
+
* @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/
|
|
82
|
+
*
|
|
83
|
+
*/
|
|
84
|
+
retryMode?: string | __Provider<string>;
|
|
85
|
+
/**
|
|
86
|
+
* Optional logger for logging debug/info/warn/error.
|
|
87
|
+
*/
|
|
88
|
+
logger?: __Logger;
|
|
89
|
+
/**
|
|
90
|
+
* Optional extensions
|
|
91
|
+
*/
|
|
92
|
+
extensions?: RuntimeExtension[];
|
|
93
|
+
/**
|
|
94
|
+
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
95
|
+
*/
|
|
96
|
+
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* @public
|
|
100
|
+
*/
|
|
101
|
+
export type UsersClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults;
|
|
102
|
+
/**
|
|
103
|
+
* @public
|
|
104
|
+
*
|
|
105
|
+
* The configuration interface of UsersClient class constructor that set the region, credentials and other options.
|
|
106
|
+
*/
|
|
107
|
+
export interface UsersClientConfig extends UsersClientConfigType {
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
export type UsersClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig;
|
|
113
|
+
/**
|
|
114
|
+
* @public
|
|
115
|
+
*
|
|
116
|
+
* The resolved configuration interface of UsersClient class. This is resolved and normalized from the {@link UsersClientConfig | constructor configuration interface}.
|
|
117
|
+
*/
|
|
118
|
+
export interface UsersClientResolvedConfig extends UsersClientResolvedConfigType {
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* @public
|
|
122
|
+
*/
|
|
123
|
+
export declare class UsersClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, UsersClientResolvedConfig> {
|
|
124
|
+
/**
|
|
125
|
+
* The resolved configuration of UsersClient class. This is resolved and normalized from the {@link UsersClientConfig | constructor configuration interface}.
|
|
126
|
+
*/
|
|
127
|
+
readonly config: UsersClientResolvedConfig;
|
|
128
|
+
constructor(...[configuration]: __CheckOptionalClientConfig<UsersClientConfig>);
|
|
129
|
+
/**
|
|
130
|
+
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
131
|
+
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
132
|
+
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
133
|
+
*/
|
|
134
|
+
destroy(): void;
|
|
135
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { ServiceInputTypes, ServiceOutputTypes, UsersClientResolvedConfig } from "../UsersClient";
|
|
2
|
+
import { BatchGetUsersPbxLinkDataInput, BatchGetUsersPbxLinkDataOutput } from "../models/models_0";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { Handler, MiddlewareStack, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export { __MetadataBearer, $Command };
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
*
|
|
12
|
+
* The input for {@link BatchGetUsersPbxLinkDataCommand}.
|
|
13
|
+
*/
|
|
14
|
+
export interface BatchGetUsersPbxLinkDataCommandInput extends BatchGetUsersPbxLinkDataInput {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @public
|
|
18
|
+
*
|
|
19
|
+
* The output of {@link BatchGetUsersPbxLinkDataCommand}.
|
|
20
|
+
*/
|
|
21
|
+
export interface BatchGetUsersPbxLinkDataCommandOutput extends BatchGetUsersPbxLinkDataOutput, __MetadataBearer {
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @public
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
28
|
+
* ```javascript
|
|
29
|
+
* import { UsersClient, BatchGetUsersPbxLinkDataCommand } from "@wildix/xbees-users-client"; // ES Modules import
|
|
30
|
+
* // const { UsersClient, BatchGetUsersPbxLinkDataCommand } = require("@wildix/xbees-users-client"); // CommonJS import
|
|
31
|
+
* const client = new UsersClient(config);
|
|
32
|
+
* const input = { // BatchGetUsersPbxLinkDataInput
|
|
33
|
+
* id: [ // BatchUsersIdList // required
|
|
34
|
+
* "STRING_VALUE",
|
|
35
|
+
* ],
|
|
36
|
+
* };
|
|
37
|
+
* const command = new BatchGetUsersPbxLinkDataCommand(input);
|
|
38
|
+
* const response = await client.send(command);
|
|
39
|
+
* // { // BatchGetUsersPbxLinkDataOutput
|
|
40
|
+
* // users: [ // PbxLinkDataList // required
|
|
41
|
+
* // { // PbxLinkData
|
|
42
|
+
* // id: "STRING_VALUE", // required
|
|
43
|
+
* // company: "STRING_VALUE", // required
|
|
44
|
+
* // domain: "STRING_VALUE",
|
|
45
|
+
* // email: "STRING_VALUE",
|
|
46
|
+
* // },
|
|
47
|
+
* // ],
|
|
48
|
+
* // };
|
|
49
|
+
*
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @param BatchGetUsersPbxLinkDataCommandInput - {@link BatchGetUsersPbxLinkDataCommandInput}
|
|
53
|
+
* @returns {@link BatchGetUsersPbxLinkDataCommandOutput}
|
|
54
|
+
* @see {@link BatchGetUsersPbxLinkDataCommandInput} for command's `input` shape.
|
|
55
|
+
* @see {@link BatchGetUsersPbxLinkDataCommandOutput} for command's `response` shape.
|
|
56
|
+
* @see {@link UsersClientResolvedConfig | config} for UsersClient's `config` shape.
|
|
57
|
+
*
|
|
58
|
+
* @throws {@link ValidationException} (client fault)
|
|
59
|
+
*
|
|
60
|
+
* @throws {@link UsersServiceException}
|
|
61
|
+
* <p>Base exception class for all service exceptions from Users service.</p>
|
|
62
|
+
*
|
|
63
|
+
*/
|
|
64
|
+
export declare class BatchGetUsersPbxLinkDataCommand extends $Command<BatchGetUsersPbxLinkDataCommandInput, BatchGetUsersPbxLinkDataCommandOutput, UsersClientResolvedConfig> {
|
|
65
|
+
readonly input: BatchGetUsersPbxLinkDataCommandInput;
|
|
66
|
+
/**
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
constructor(input: BatchGetUsersPbxLinkDataCommandInput);
|
|
70
|
+
/**
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: UsersClientResolvedConfig, options?: __HttpHandlerOptions): Handler<BatchGetUsersPbxLinkDataCommandInput, BatchGetUsersPbxLinkDataCommandOutput>;
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
private serialize;
|
|
78
|
+
/**
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
|
+
private deserialize;
|
|
82
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { ServiceInputTypes, ServiceOutputTypes, UsersClientResolvedConfig } from "../UsersClient";
|
|
2
|
+
import { BatchGetUsersStreamLinkDataInput, BatchGetUsersStreamLinkDataOutput } from "../models/models_0";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { Handler, MiddlewareStack, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export { __MetadataBearer, $Command };
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
*
|
|
12
|
+
* The input for {@link BatchGetUsersStreamLinkDataCommand}.
|
|
13
|
+
*/
|
|
14
|
+
export interface BatchGetUsersStreamLinkDataCommandInput extends BatchGetUsersStreamLinkDataInput {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @public
|
|
18
|
+
*
|
|
19
|
+
* The output of {@link BatchGetUsersStreamLinkDataCommand}.
|
|
20
|
+
*/
|
|
21
|
+
export interface BatchGetUsersStreamLinkDataCommandOutput extends BatchGetUsersStreamLinkDataOutput, __MetadataBearer {
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @public
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
28
|
+
* ```javascript
|
|
29
|
+
* import { UsersClient, BatchGetUsersStreamLinkDataCommand } from "@wildix/xbees-users-client"; // ES Modules import
|
|
30
|
+
* // const { UsersClient, BatchGetUsersStreamLinkDataCommand } = require("@wildix/xbees-users-client"); // CommonJS import
|
|
31
|
+
* const client = new UsersClient(config);
|
|
32
|
+
* const input = { // BatchGetUsersStreamLinkDataInput
|
|
33
|
+
* id: [ // BatchUsersIdList // required
|
|
34
|
+
* "STRING_VALUE",
|
|
35
|
+
* ],
|
|
36
|
+
* };
|
|
37
|
+
* const command = new BatchGetUsersStreamLinkDataCommand(input);
|
|
38
|
+
* const response = await client.send(command);
|
|
39
|
+
* // { // BatchGetUsersStreamLinkDataOutput
|
|
40
|
+
* // users: { // BatchGetUsersStreamLinkDataResponseMap // required
|
|
41
|
+
* // "<keys>": { // StreamLinkData
|
|
42
|
+
* // id: "STRING_VALUE", // required
|
|
43
|
+
* // email: "STRING_VALUE",
|
|
44
|
+
* // phone: "STRING_VALUE",
|
|
45
|
+
* // name: "STRING_VALUE",
|
|
46
|
+
* // picture: "STRING_VALUE",
|
|
47
|
+
* // company: "STRING_VALUE",
|
|
48
|
+
* // pbxExtension: "STRING_VALUE",
|
|
49
|
+
* // pbxSerial: "STRING_VALUE",
|
|
50
|
+
* // pbxDomain: "STRING_VALUE",
|
|
51
|
+
* // pbxPort: "STRING_VALUE",
|
|
52
|
+
* // pbxUserId: "STRING_VALUE",
|
|
53
|
+
* // pbxUpdatedAt: "STRING_VALUE",
|
|
54
|
+
* // locale: "STRING_VALUE",
|
|
55
|
+
* // timeZone: "STRING_VALUE",
|
|
56
|
+
* // },
|
|
57
|
+
* // },
|
|
58
|
+
* // };
|
|
59
|
+
*
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @param BatchGetUsersStreamLinkDataCommandInput - {@link BatchGetUsersStreamLinkDataCommandInput}
|
|
63
|
+
* @returns {@link BatchGetUsersStreamLinkDataCommandOutput}
|
|
64
|
+
* @see {@link BatchGetUsersStreamLinkDataCommandInput} for command's `input` shape.
|
|
65
|
+
* @see {@link BatchGetUsersStreamLinkDataCommandOutput} for command's `response` shape.
|
|
66
|
+
* @see {@link UsersClientResolvedConfig | config} for UsersClient's `config` shape.
|
|
67
|
+
*
|
|
68
|
+
* @throws {@link ValidationException} (client fault)
|
|
69
|
+
*
|
|
70
|
+
* @throws {@link UsersServiceException}
|
|
71
|
+
* <p>Base exception class for all service exceptions from Users service.</p>
|
|
72
|
+
*
|
|
73
|
+
*/
|
|
74
|
+
export declare class BatchGetUsersStreamLinkDataCommand extends $Command<BatchGetUsersStreamLinkDataCommandInput, BatchGetUsersStreamLinkDataCommandOutput, UsersClientResolvedConfig> {
|
|
75
|
+
readonly input: BatchGetUsersStreamLinkDataCommandInput;
|
|
76
|
+
/**
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
constructor(input: BatchGetUsersStreamLinkDataCommandInput);
|
|
80
|
+
/**
|
|
81
|
+
* @internal
|
|
82
|
+
*/
|
|
83
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: UsersClientResolvedConfig, options?: __HttpHandlerOptions): Handler<BatchGetUsersStreamLinkDataCommandInput, BatchGetUsersStreamLinkDataCommandOutput>;
|
|
84
|
+
/**
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
private serialize;
|
|
88
|
+
/**
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
private deserialize;
|
|
92
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
|
|
2
|
+
import { DefaultExtensionConfiguration } from "@smithy/types";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export interface UsersExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration {
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@smithy/smithy-client";
|
|
2
|
+
export { __ServiceException, __ServiceExceptionOptions };
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*
|
|
6
|
+
* Base exception class for all service exceptions from Users service.
|
|
7
|
+
*/
|
|
8
|
+
export declare class UsersServiceException extends __ServiceException {
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
constructor(options: __ServiceExceptionOptions);
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./models_0";
|