@aws-sdk/client-account 3.131.0 → 3.136.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist-cjs/Account.js +30 -0
- package/dist-cjs/commands/GetContactInformationCommand.js +36 -0
- package/dist-cjs/commands/PutContactInformationCommand.js +36 -0
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/models/models_0.js +43 -1
- package/dist-cjs/protocols/Aws_restJson1.js +171 -1
- package/dist-es/Account.js +30 -0
- package/dist-es/commands/GetContactInformationCommand.js +39 -0
- package/dist-es/commands/PutContactInformationCommand.js +39 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/models_0.js +20 -0
- package/dist-es/protocols/Aws_restJson1.js +205 -0
- package/dist-types/Account.d.ts +38 -2
- package/dist-types/AccountClient.d.ts +4 -2
- package/dist-types/commands/DeleteAlternateContactCommand.d.ts +6 -0
- package/dist-types/commands/GetAlternateContactCommand.d.ts +7 -1
- package/dist-types/commands/GetContactInformationCommand.d.ts +37 -0
- package/dist-types/commands/PutAlternateContactCommand.d.ts +7 -1
- package/dist-types/commands/PutContactInformationCommand.d.ts +37 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +133 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +6 -0
- package/dist-types/ts3.4/Account.d.ts +10 -0
- package/dist-types/ts3.4/AccountClient.d.ts +4 -2
- package/dist-types/ts3.4/commands/GetContactInformationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/PutContactInformationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/models/models_0.d.ts +57 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.136.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.135.0...v3.136.0) (2022-07-22)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **client-account:** This release enables customers to manage the primary contact information for their AWS accounts. For more information, see https://docs.aws.amazon.com/accounts/latest/reference/API_Operations.html ([f456886](https://github.com/aws/aws-sdk-js-v3/commit/f4568862de4e51d2a4d318d4fc5eba8f1fcaffad))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.131.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.130.0...v3.131.0) (2022-07-15)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @aws-sdk/client-account
|
package/dist-cjs/Account.js
CHANGED
|
@@ -4,7 +4,9 @@ exports.Account = void 0;
|
|
|
4
4
|
const AccountClient_1 = require("./AccountClient");
|
|
5
5
|
const DeleteAlternateContactCommand_1 = require("./commands/DeleteAlternateContactCommand");
|
|
6
6
|
const GetAlternateContactCommand_1 = require("./commands/GetAlternateContactCommand");
|
|
7
|
+
const GetContactInformationCommand_1 = require("./commands/GetContactInformationCommand");
|
|
7
8
|
const PutAlternateContactCommand_1 = require("./commands/PutAlternateContactCommand");
|
|
9
|
+
const PutContactInformationCommand_1 = require("./commands/PutContactInformationCommand");
|
|
8
10
|
class Account extends AccountClient_1.AccountClient {
|
|
9
11
|
deleteAlternateContact(args, optionsOrCb, cb) {
|
|
10
12
|
const command = new DeleteAlternateContactCommand_1.DeleteAlternateContactCommand(args);
|
|
@@ -34,6 +36,20 @@ class Account extends AccountClient_1.AccountClient {
|
|
|
34
36
|
return this.send(command, optionsOrCb);
|
|
35
37
|
}
|
|
36
38
|
}
|
|
39
|
+
getContactInformation(args, optionsOrCb, cb) {
|
|
40
|
+
const command = new GetContactInformationCommand_1.GetContactInformationCommand(args);
|
|
41
|
+
if (typeof optionsOrCb === "function") {
|
|
42
|
+
this.send(command, optionsOrCb);
|
|
43
|
+
}
|
|
44
|
+
else if (typeof cb === "function") {
|
|
45
|
+
if (typeof optionsOrCb !== "object")
|
|
46
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
47
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
return this.send(command, optionsOrCb);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
37
53
|
putAlternateContact(args, optionsOrCb, cb) {
|
|
38
54
|
const command = new PutAlternateContactCommand_1.PutAlternateContactCommand(args);
|
|
39
55
|
if (typeof optionsOrCb === "function") {
|
|
@@ -48,5 +64,19 @@ class Account extends AccountClient_1.AccountClient {
|
|
|
48
64
|
return this.send(command, optionsOrCb);
|
|
49
65
|
}
|
|
50
66
|
}
|
|
67
|
+
putContactInformation(args, optionsOrCb, cb) {
|
|
68
|
+
const command = new PutContactInformationCommand_1.PutContactInformationCommand(args);
|
|
69
|
+
if (typeof optionsOrCb === "function") {
|
|
70
|
+
this.send(command, optionsOrCb);
|
|
71
|
+
}
|
|
72
|
+
else if (typeof cb === "function") {
|
|
73
|
+
if (typeof optionsOrCb !== "object")
|
|
74
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
75
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
return this.send(command, optionsOrCb);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
51
81
|
}
|
|
52
82
|
exports.Account = Account;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetContactInformationCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const models_0_1 = require("../models/models_0");
|
|
7
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
8
|
+
class GetContactInformationCommand extends smithy_client_1.Command {
|
|
9
|
+
constructor(input) {
|
|
10
|
+
super();
|
|
11
|
+
this.input = input;
|
|
12
|
+
}
|
|
13
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
15
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
const { logger } = configuration;
|
|
17
|
+
const clientName = "AccountClient";
|
|
18
|
+
const commandName = "GetContactInformationCommand";
|
|
19
|
+
const handlerExecutionContext = {
|
|
20
|
+
logger,
|
|
21
|
+
clientName,
|
|
22
|
+
commandName,
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.GetContactInformationRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.GetContactInformationResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
const { requestHandler } = configuration;
|
|
27
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
28
|
+
}
|
|
29
|
+
serialize(input, context) {
|
|
30
|
+
return (0, Aws_restJson1_1.serializeAws_restJson1GetContactInformationCommand)(input, context);
|
|
31
|
+
}
|
|
32
|
+
deserialize(output, context) {
|
|
33
|
+
return (0, Aws_restJson1_1.deserializeAws_restJson1GetContactInformationCommand)(output, context);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.GetContactInformationCommand = GetContactInformationCommand;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PutContactInformationCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const models_0_1 = require("../models/models_0");
|
|
7
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
8
|
+
class PutContactInformationCommand extends smithy_client_1.Command {
|
|
9
|
+
constructor(input) {
|
|
10
|
+
super();
|
|
11
|
+
this.input = input;
|
|
12
|
+
}
|
|
13
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
15
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
const { logger } = configuration;
|
|
17
|
+
const clientName = "AccountClient";
|
|
18
|
+
const commandName = "PutContactInformationCommand";
|
|
19
|
+
const handlerExecutionContext = {
|
|
20
|
+
logger,
|
|
21
|
+
clientName,
|
|
22
|
+
commandName,
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.PutContactInformationRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: (output) => output,
|
|
25
|
+
};
|
|
26
|
+
const { requestHandler } = configuration;
|
|
27
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
28
|
+
}
|
|
29
|
+
serialize(input, context) {
|
|
30
|
+
return (0, Aws_restJson1_1.serializeAws_restJson1PutContactInformationCommand)(input, context);
|
|
31
|
+
}
|
|
32
|
+
deserialize(output, context) {
|
|
33
|
+
return (0, Aws_restJson1_1.deserializeAws_restJson1PutContactInformationCommand)(output, context);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.PutContactInformationCommand = PutContactInformationCommand;
|
|
@@ -3,4 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./DeleteAlternateContactCommand"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./GetAlternateContactCommand"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./GetContactInformationCommand"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./PutAlternateContactCommand"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./PutContactInformationCommand"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PutAlternateContactRequest = exports.GetAlternateContactResponse = exports.AlternateContact = exports.GetAlternateContactRequest = exports.ValidationException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.InternalServerException = exports.DeleteAlternateContactRequest = exports.AlternateContactType = exports.AccessDeniedException = void 0;
|
|
3
|
+
exports.PutContactInformationRequest = exports.GetContactInformationResponse = exports.ContactInformation = exports.GetContactInformationRequest = exports.PutAlternateContactRequest = exports.GetAlternateContactResponse = exports.AlternateContact = exports.GetAlternateContactRequest = exports.ValidationException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.InternalServerException = exports.DeleteAlternateContactRequest = exports.AlternateContactType = exports.AccessDeniedException = void 0;
|
|
4
4
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
5
5
|
const AccountServiceException_1 = require("./AccountServiceException");
|
|
6
6
|
class AccessDeniedException extends AccountServiceException_1.AccountServiceException {
|
|
@@ -117,3 +117,45 @@ var PutAlternateContactRequest;
|
|
|
117
117
|
...(obj.PhoneNumber && { PhoneNumber: smithy_client_1.SENSITIVE_STRING }),
|
|
118
118
|
});
|
|
119
119
|
})(PutAlternateContactRequest = exports.PutAlternateContactRequest || (exports.PutAlternateContactRequest = {}));
|
|
120
|
+
var GetContactInformationRequest;
|
|
121
|
+
(function (GetContactInformationRequest) {
|
|
122
|
+
GetContactInformationRequest.filterSensitiveLog = (obj) => ({
|
|
123
|
+
...obj,
|
|
124
|
+
});
|
|
125
|
+
})(GetContactInformationRequest = exports.GetContactInformationRequest || (exports.GetContactInformationRequest = {}));
|
|
126
|
+
var ContactInformation;
|
|
127
|
+
(function (ContactInformation) {
|
|
128
|
+
ContactInformation.filterSensitiveLog = (obj) => ({
|
|
129
|
+
...obj,
|
|
130
|
+
...(obj.FullName && { FullName: smithy_client_1.SENSITIVE_STRING }),
|
|
131
|
+
...(obj.AddressLine1 && { AddressLine1: smithy_client_1.SENSITIVE_STRING }),
|
|
132
|
+
...(obj.AddressLine2 && { AddressLine2: smithy_client_1.SENSITIVE_STRING }),
|
|
133
|
+
...(obj.AddressLine3 && { AddressLine3: smithy_client_1.SENSITIVE_STRING }),
|
|
134
|
+
...(obj.City && { City: smithy_client_1.SENSITIVE_STRING }),
|
|
135
|
+
...(obj.StateOrRegion && { StateOrRegion: smithy_client_1.SENSITIVE_STRING }),
|
|
136
|
+
...(obj.DistrictOrCounty && { DistrictOrCounty: smithy_client_1.SENSITIVE_STRING }),
|
|
137
|
+
...(obj.PostalCode && { PostalCode: smithy_client_1.SENSITIVE_STRING }),
|
|
138
|
+
...(obj.CountryCode && { CountryCode: smithy_client_1.SENSITIVE_STRING }),
|
|
139
|
+
...(obj.PhoneNumber && { PhoneNumber: smithy_client_1.SENSITIVE_STRING }),
|
|
140
|
+
...(obj.CompanyName && { CompanyName: smithy_client_1.SENSITIVE_STRING }),
|
|
141
|
+
...(obj.WebsiteUrl && { WebsiteUrl: smithy_client_1.SENSITIVE_STRING }),
|
|
142
|
+
});
|
|
143
|
+
})(ContactInformation = exports.ContactInformation || (exports.ContactInformation = {}));
|
|
144
|
+
var GetContactInformationResponse;
|
|
145
|
+
(function (GetContactInformationResponse) {
|
|
146
|
+
GetContactInformationResponse.filterSensitiveLog = (obj) => ({
|
|
147
|
+
...obj,
|
|
148
|
+
...(obj.ContactInformation && {
|
|
149
|
+
ContactInformation: ContactInformation.filterSensitiveLog(obj.ContactInformation),
|
|
150
|
+
}),
|
|
151
|
+
});
|
|
152
|
+
})(GetContactInformationResponse = exports.GetContactInformationResponse || (exports.GetContactInformationResponse = {}));
|
|
153
|
+
var PutContactInformationRequest;
|
|
154
|
+
(function (PutContactInformationRequest) {
|
|
155
|
+
PutContactInformationRequest.filterSensitiveLog = (obj) => ({
|
|
156
|
+
...obj,
|
|
157
|
+
...(obj.ContactInformation && {
|
|
158
|
+
ContactInformation: ContactInformation.filterSensitiveLog(obj.ContactInformation),
|
|
159
|
+
}),
|
|
160
|
+
});
|
|
161
|
+
})(PutContactInformationRequest = exports.PutContactInformationRequest || (exports.PutContactInformationRequest = {}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeAws_restJson1PutAlternateContactCommand = exports.deserializeAws_restJson1GetAlternateContactCommand = exports.deserializeAws_restJson1DeleteAlternateContactCommand = exports.serializeAws_restJson1PutAlternateContactCommand = exports.serializeAws_restJson1GetAlternateContactCommand = exports.serializeAws_restJson1DeleteAlternateContactCommand = void 0;
|
|
3
|
+
exports.deserializeAws_restJson1PutContactInformationCommand = exports.deserializeAws_restJson1PutAlternateContactCommand = exports.deserializeAws_restJson1GetContactInformationCommand = exports.deserializeAws_restJson1GetAlternateContactCommand = exports.deserializeAws_restJson1DeleteAlternateContactCommand = exports.serializeAws_restJson1PutContactInformationCommand = exports.serializeAws_restJson1PutAlternateContactCommand = exports.serializeAws_restJson1GetContactInformationCommand = exports.serializeAws_restJson1GetAlternateContactCommand = exports.serializeAws_restJson1DeleteAlternateContactCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const AccountServiceException_1 = require("../models/AccountServiceException");
|
|
@@ -49,6 +49,27 @@ const serializeAws_restJson1GetAlternateContactCommand = async (input, context)
|
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
51
|
exports.serializeAws_restJson1GetAlternateContactCommand = serializeAws_restJson1GetAlternateContactCommand;
|
|
52
|
+
const serializeAws_restJson1GetContactInformationCommand = async (input, context) => {
|
|
53
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
54
|
+
const headers = {
|
|
55
|
+
"content-type": "application/json",
|
|
56
|
+
};
|
|
57
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/getContactInformation";
|
|
58
|
+
let body;
|
|
59
|
+
body = JSON.stringify({
|
|
60
|
+
...(input.AccountId != null && { AccountId: input.AccountId }),
|
|
61
|
+
});
|
|
62
|
+
return new protocol_http_1.HttpRequest({
|
|
63
|
+
protocol,
|
|
64
|
+
hostname,
|
|
65
|
+
port,
|
|
66
|
+
method: "POST",
|
|
67
|
+
headers,
|
|
68
|
+
path: resolvedPath,
|
|
69
|
+
body,
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
exports.serializeAws_restJson1GetContactInformationCommand = serializeAws_restJson1GetContactInformationCommand;
|
|
52
73
|
const serializeAws_restJson1PutAlternateContactCommand = async (input, context) => {
|
|
53
74
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
54
75
|
const headers = {
|
|
@@ -75,6 +96,30 @@ const serializeAws_restJson1PutAlternateContactCommand = async (input, context)
|
|
|
75
96
|
});
|
|
76
97
|
};
|
|
77
98
|
exports.serializeAws_restJson1PutAlternateContactCommand = serializeAws_restJson1PutAlternateContactCommand;
|
|
99
|
+
const serializeAws_restJson1PutContactInformationCommand = async (input, context) => {
|
|
100
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
101
|
+
const headers = {
|
|
102
|
+
"content-type": "application/json",
|
|
103
|
+
};
|
|
104
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/putContactInformation";
|
|
105
|
+
let body;
|
|
106
|
+
body = JSON.stringify({
|
|
107
|
+
...(input.AccountId != null && { AccountId: input.AccountId }),
|
|
108
|
+
...(input.ContactInformation != null && {
|
|
109
|
+
ContactInformation: serializeAws_restJson1ContactInformation(input.ContactInformation, context),
|
|
110
|
+
}),
|
|
111
|
+
});
|
|
112
|
+
return new protocol_http_1.HttpRequest({
|
|
113
|
+
protocol,
|
|
114
|
+
hostname,
|
|
115
|
+
port,
|
|
116
|
+
method: "POST",
|
|
117
|
+
headers,
|
|
118
|
+
path: resolvedPath,
|
|
119
|
+
body,
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
exports.serializeAws_restJson1PutContactInformationCommand = serializeAws_restJson1PutContactInformationCommand;
|
|
78
123
|
const deserializeAws_restJson1DeleteAlternateContactCommand = async (output, context) => {
|
|
79
124
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
80
125
|
return deserializeAws_restJson1DeleteAlternateContactCommandError(output, context);
|
|
@@ -171,6 +216,56 @@ const deserializeAws_restJson1GetAlternateContactCommandError = async (output, c
|
|
|
171
216
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
172
217
|
}
|
|
173
218
|
};
|
|
219
|
+
const deserializeAws_restJson1GetContactInformationCommand = async (output, context) => {
|
|
220
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
221
|
+
return deserializeAws_restJson1GetContactInformationCommandError(output, context);
|
|
222
|
+
}
|
|
223
|
+
const contents = {
|
|
224
|
+
$metadata: deserializeMetadata(output),
|
|
225
|
+
ContactInformation: undefined,
|
|
226
|
+
};
|
|
227
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
228
|
+
if (data.ContactInformation !== undefined && data.ContactInformation !== null) {
|
|
229
|
+
contents.ContactInformation = deserializeAws_restJson1ContactInformation(data.ContactInformation, context);
|
|
230
|
+
}
|
|
231
|
+
return Promise.resolve(contents);
|
|
232
|
+
};
|
|
233
|
+
exports.deserializeAws_restJson1GetContactInformationCommand = deserializeAws_restJson1GetContactInformationCommand;
|
|
234
|
+
const deserializeAws_restJson1GetContactInformationCommandError = async (output, context) => {
|
|
235
|
+
const parsedOutput = {
|
|
236
|
+
...output,
|
|
237
|
+
body: await parseBody(output.body, context),
|
|
238
|
+
};
|
|
239
|
+
let response;
|
|
240
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
241
|
+
switch (errorCode) {
|
|
242
|
+
case "AccessDeniedException":
|
|
243
|
+
case "com.amazonaws.account#AccessDeniedException":
|
|
244
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
245
|
+
case "InternalServerException":
|
|
246
|
+
case "com.amazonaws.account#InternalServerException":
|
|
247
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
248
|
+
case "ResourceNotFoundException":
|
|
249
|
+
case "com.amazonaws.account#ResourceNotFoundException":
|
|
250
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
251
|
+
case "TooManyRequestsException":
|
|
252
|
+
case "com.amazonaws.account#TooManyRequestsException":
|
|
253
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
254
|
+
case "ValidationException":
|
|
255
|
+
case "com.amazonaws.account#ValidationException":
|
|
256
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
257
|
+
default:
|
|
258
|
+
const parsedBody = parsedOutput.body;
|
|
259
|
+
const $metadata = deserializeMetadata(output);
|
|
260
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
261
|
+
response = new AccountServiceException_1.AccountServiceException({
|
|
262
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
263
|
+
$fault: "client",
|
|
264
|
+
$metadata,
|
|
265
|
+
});
|
|
266
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
267
|
+
}
|
|
268
|
+
};
|
|
174
269
|
const deserializeAws_restJson1PutAlternateContactCommand = async (output, context) => {
|
|
175
270
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
176
271
|
return deserializeAws_restJson1PutAlternateContactCommandError(output, context);
|
|
@@ -214,6 +309,49 @@ const deserializeAws_restJson1PutAlternateContactCommandError = async (output, c
|
|
|
214
309
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
215
310
|
}
|
|
216
311
|
};
|
|
312
|
+
const deserializeAws_restJson1PutContactInformationCommand = async (output, context) => {
|
|
313
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
314
|
+
return deserializeAws_restJson1PutContactInformationCommandError(output, context);
|
|
315
|
+
}
|
|
316
|
+
const contents = {
|
|
317
|
+
$metadata: deserializeMetadata(output),
|
|
318
|
+
};
|
|
319
|
+
await collectBody(output.body, context);
|
|
320
|
+
return Promise.resolve(contents);
|
|
321
|
+
};
|
|
322
|
+
exports.deserializeAws_restJson1PutContactInformationCommand = deserializeAws_restJson1PutContactInformationCommand;
|
|
323
|
+
const deserializeAws_restJson1PutContactInformationCommandError = async (output, context) => {
|
|
324
|
+
const parsedOutput = {
|
|
325
|
+
...output,
|
|
326
|
+
body: await parseBody(output.body, context),
|
|
327
|
+
};
|
|
328
|
+
let response;
|
|
329
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
330
|
+
switch (errorCode) {
|
|
331
|
+
case "AccessDeniedException":
|
|
332
|
+
case "com.amazonaws.account#AccessDeniedException":
|
|
333
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
334
|
+
case "InternalServerException":
|
|
335
|
+
case "com.amazonaws.account#InternalServerException":
|
|
336
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
337
|
+
case "TooManyRequestsException":
|
|
338
|
+
case "com.amazonaws.account#TooManyRequestsException":
|
|
339
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
340
|
+
case "ValidationException":
|
|
341
|
+
case "com.amazonaws.account#ValidationException":
|
|
342
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
343
|
+
default:
|
|
344
|
+
const parsedBody = parsedOutput.body;
|
|
345
|
+
const $metadata = deserializeMetadata(output);
|
|
346
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
347
|
+
response = new AccountServiceException_1.AccountServiceException({
|
|
348
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
349
|
+
$fault: "client",
|
|
350
|
+
$metadata,
|
|
351
|
+
});
|
|
352
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
353
|
+
}
|
|
354
|
+
};
|
|
217
355
|
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
218
356
|
const contents = {};
|
|
219
357
|
const data = parsedOutput.body;
|
|
@@ -274,6 +412,22 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
|
|
|
274
412
|
});
|
|
275
413
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
276
414
|
};
|
|
415
|
+
const serializeAws_restJson1ContactInformation = (input, context) => {
|
|
416
|
+
return {
|
|
417
|
+
...(input.AddressLine1 != null && { AddressLine1: input.AddressLine1 }),
|
|
418
|
+
...(input.AddressLine2 != null && { AddressLine2: input.AddressLine2 }),
|
|
419
|
+
...(input.AddressLine3 != null && { AddressLine3: input.AddressLine3 }),
|
|
420
|
+
...(input.City != null && { City: input.City }),
|
|
421
|
+
...(input.CompanyName != null && { CompanyName: input.CompanyName }),
|
|
422
|
+
...(input.CountryCode != null && { CountryCode: input.CountryCode }),
|
|
423
|
+
...(input.DistrictOrCounty != null && { DistrictOrCounty: input.DistrictOrCounty }),
|
|
424
|
+
...(input.FullName != null && { FullName: input.FullName }),
|
|
425
|
+
...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }),
|
|
426
|
+
...(input.PostalCode != null && { PostalCode: input.PostalCode }),
|
|
427
|
+
...(input.StateOrRegion != null && { StateOrRegion: input.StateOrRegion }),
|
|
428
|
+
...(input.WebsiteUrl != null && { WebsiteUrl: input.WebsiteUrl }),
|
|
429
|
+
};
|
|
430
|
+
};
|
|
277
431
|
const deserializeAws_restJson1AlternateContact = (output, context) => {
|
|
278
432
|
return {
|
|
279
433
|
AlternateContactType: (0, smithy_client_1.expectString)(output.AlternateContactType),
|
|
@@ -283,6 +437,22 @@ const deserializeAws_restJson1AlternateContact = (output, context) => {
|
|
|
283
437
|
Title: (0, smithy_client_1.expectString)(output.Title),
|
|
284
438
|
};
|
|
285
439
|
};
|
|
440
|
+
const deserializeAws_restJson1ContactInformation = (output, context) => {
|
|
441
|
+
return {
|
|
442
|
+
AddressLine1: (0, smithy_client_1.expectString)(output.AddressLine1),
|
|
443
|
+
AddressLine2: (0, smithy_client_1.expectString)(output.AddressLine2),
|
|
444
|
+
AddressLine3: (0, smithy_client_1.expectString)(output.AddressLine3),
|
|
445
|
+
City: (0, smithy_client_1.expectString)(output.City),
|
|
446
|
+
CompanyName: (0, smithy_client_1.expectString)(output.CompanyName),
|
|
447
|
+
CountryCode: (0, smithy_client_1.expectString)(output.CountryCode),
|
|
448
|
+
DistrictOrCounty: (0, smithy_client_1.expectString)(output.DistrictOrCounty),
|
|
449
|
+
FullName: (0, smithy_client_1.expectString)(output.FullName),
|
|
450
|
+
PhoneNumber: (0, smithy_client_1.expectString)(output.PhoneNumber),
|
|
451
|
+
PostalCode: (0, smithy_client_1.expectString)(output.PostalCode),
|
|
452
|
+
StateOrRegion: (0, smithy_client_1.expectString)(output.StateOrRegion),
|
|
453
|
+
WebsiteUrl: (0, smithy_client_1.expectString)(output.WebsiteUrl),
|
|
454
|
+
};
|
|
455
|
+
};
|
|
286
456
|
const deserializeMetadata = (output) => {
|
|
287
457
|
var _a;
|
|
288
458
|
return ({
|
package/dist-es/Account.js
CHANGED
|
@@ -2,7 +2,9 @@ import { __extends } from "tslib";
|
|
|
2
2
|
import { AccountClient } from "./AccountClient";
|
|
3
3
|
import { DeleteAlternateContactCommand, } from "./commands/DeleteAlternateContactCommand";
|
|
4
4
|
import { GetAlternateContactCommand, } from "./commands/GetAlternateContactCommand";
|
|
5
|
+
import { GetContactInformationCommand, } from "./commands/GetContactInformationCommand";
|
|
5
6
|
import { PutAlternateContactCommand, } from "./commands/PutAlternateContactCommand";
|
|
7
|
+
import { PutContactInformationCommand, } from "./commands/PutContactInformationCommand";
|
|
6
8
|
var Account = (function (_super) {
|
|
7
9
|
__extends(Account, _super);
|
|
8
10
|
function Account() {
|
|
@@ -36,6 +38,20 @@ var Account = (function (_super) {
|
|
|
36
38
|
return this.send(command, optionsOrCb);
|
|
37
39
|
}
|
|
38
40
|
};
|
|
41
|
+
Account.prototype.getContactInformation = function (args, optionsOrCb, cb) {
|
|
42
|
+
var command = new GetContactInformationCommand(args);
|
|
43
|
+
if (typeof optionsOrCb === "function") {
|
|
44
|
+
this.send(command, optionsOrCb);
|
|
45
|
+
}
|
|
46
|
+
else if (typeof cb === "function") {
|
|
47
|
+
if (typeof optionsOrCb !== "object")
|
|
48
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
49
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
return this.send(command, optionsOrCb);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
39
55
|
Account.prototype.putAlternateContact = function (args, optionsOrCb, cb) {
|
|
40
56
|
var command = new PutAlternateContactCommand(args);
|
|
41
57
|
if (typeof optionsOrCb === "function") {
|
|
@@ -50,6 +66,20 @@ var Account = (function (_super) {
|
|
|
50
66
|
return this.send(command, optionsOrCb);
|
|
51
67
|
}
|
|
52
68
|
};
|
|
69
|
+
Account.prototype.putContactInformation = function (args, optionsOrCb, cb) {
|
|
70
|
+
var command = new PutContactInformationCommand(args);
|
|
71
|
+
if (typeof optionsOrCb === "function") {
|
|
72
|
+
this.send(command, optionsOrCb);
|
|
73
|
+
}
|
|
74
|
+
else if (typeof cb === "function") {
|
|
75
|
+
if (typeof optionsOrCb !== "object")
|
|
76
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
77
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
return this.send(command, optionsOrCb);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
53
83
|
return Account;
|
|
54
84
|
}(AccountClient));
|
|
55
85
|
export { Account };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { GetContactInformationRequest, GetContactInformationResponse } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_restJson1GetContactInformationCommand, serializeAws_restJson1GetContactInformationCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
var GetContactInformationCommand = (function (_super) {
|
|
7
|
+
__extends(GetContactInformationCommand, _super);
|
|
8
|
+
function GetContactInformationCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
GetContactInformationCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
var logger = configuration.logger;
|
|
17
|
+
var clientName = "AccountClient";
|
|
18
|
+
var commandName = "GetContactInformationCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
23
|
+
inputFilterSensitiveLog: GetContactInformationRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: GetContactInformationResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
GetContactInformationCommand.prototype.serialize = function (input, context) {
|
|
32
|
+
return serializeAws_restJson1GetContactInformationCommand(input, context);
|
|
33
|
+
};
|
|
34
|
+
GetContactInformationCommand.prototype.deserialize = function (output, context) {
|
|
35
|
+
return deserializeAws_restJson1GetContactInformationCommand(output, context);
|
|
36
|
+
};
|
|
37
|
+
return GetContactInformationCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { GetContactInformationCommand };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { PutContactInformationRequest } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_restJson1PutContactInformationCommand, serializeAws_restJson1PutContactInformationCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
var PutContactInformationCommand = (function (_super) {
|
|
7
|
+
__extends(PutContactInformationCommand, _super);
|
|
8
|
+
function PutContactInformationCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
PutContactInformationCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
var logger = configuration.logger;
|
|
17
|
+
var clientName = "AccountClient";
|
|
18
|
+
var commandName = "PutContactInformationCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
23
|
+
inputFilterSensitiveLog: PutContactInformationRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: function (output) { return output; },
|
|
25
|
+
};
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
PutContactInformationCommand.prototype.serialize = function (input, context) {
|
|
32
|
+
return serializeAws_restJson1PutContactInformationCommand(input, context);
|
|
33
|
+
};
|
|
34
|
+
PutContactInformationCommand.prototype.deserialize = function (output, context) {
|
|
35
|
+
return deserializeAws_restJson1PutContactInformationCommand(output, context);
|
|
36
|
+
};
|
|
37
|
+
return PutContactInformationCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { PutContactInformationCommand };
|
|
@@ -91,3 +91,23 @@ export var PutAlternateContactRequest;
|
|
|
91
91
|
(function (PutAlternateContactRequest) {
|
|
92
92
|
PutAlternateContactRequest.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign(__assign(__assign({}, obj), (obj.Name && { Name: SENSITIVE_STRING })), (obj.Title && { Title: SENSITIVE_STRING })), (obj.EmailAddress && { EmailAddress: SENSITIVE_STRING })), (obj.PhoneNumber && { PhoneNumber: SENSITIVE_STRING }))); };
|
|
93
93
|
})(PutAlternateContactRequest || (PutAlternateContactRequest = {}));
|
|
94
|
+
export var GetContactInformationRequest;
|
|
95
|
+
(function (GetContactInformationRequest) {
|
|
96
|
+
GetContactInformationRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
97
|
+
})(GetContactInformationRequest || (GetContactInformationRequest = {}));
|
|
98
|
+
export var ContactInformation;
|
|
99
|
+
(function (ContactInformation) {
|
|
100
|
+
ContactInformation.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, obj), (obj.FullName && { FullName: SENSITIVE_STRING })), (obj.AddressLine1 && { AddressLine1: SENSITIVE_STRING })), (obj.AddressLine2 && { AddressLine2: SENSITIVE_STRING })), (obj.AddressLine3 && { AddressLine3: SENSITIVE_STRING })), (obj.City && { City: SENSITIVE_STRING })), (obj.StateOrRegion && { StateOrRegion: SENSITIVE_STRING })), (obj.DistrictOrCounty && { DistrictOrCounty: SENSITIVE_STRING })), (obj.PostalCode && { PostalCode: SENSITIVE_STRING })), (obj.CountryCode && { CountryCode: SENSITIVE_STRING })), (obj.PhoneNumber && { PhoneNumber: SENSITIVE_STRING })), (obj.CompanyName && { CompanyName: SENSITIVE_STRING })), (obj.WebsiteUrl && { WebsiteUrl: SENSITIVE_STRING }))); };
|
|
101
|
+
})(ContactInformation || (ContactInformation = {}));
|
|
102
|
+
export var GetContactInformationResponse;
|
|
103
|
+
(function (GetContactInformationResponse) {
|
|
104
|
+
GetContactInformationResponse.filterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.ContactInformation && {
|
|
105
|
+
ContactInformation: ContactInformation.filterSensitiveLog(obj.ContactInformation),
|
|
106
|
+
}))); };
|
|
107
|
+
})(GetContactInformationResponse || (GetContactInformationResponse = {}));
|
|
108
|
+
export var PutContactInformationRequest;
|
|
109
|
+
(function (PutContactInformationRequest) {
|
|
110
|
+
PutContactInformationRequest.filterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.ContactInformation && {
|
|
111
|
+
ContactInformation: ContactInformation.filterSensitiveLog(obj.ContactInformation),
|
|
112
|
+
}))); };
|
|
113
|
+
})(PutContactInformationRequest || (PutContactInformationRequest = {}));
|