@aws-sdk/client-taxsettings 3.928.0 → 3.929.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +950 -862
- package/dist-cjs/runtimeConfig.shared.js +2 -0
- package/dist-es/TaxSettingsClient.js +2 -0
- package/dist-es/commands/BatchDeleteTaxRegistrationCommand.js +3 -10
- package/dist-es/commands/BatchGetTaxExemptionsCommand.js +3 -9
- package/dist-es/commands/BatchPutTaxRegistrationCommand.js +3 -10
- package/dist-es/commands/DeleteSupplementalTaxRegistrationCommand.js +3 -9
- package/dist-es/commands/DeleteTaxRegistrationCommand.js +3 -9
- package/dist-es/commands/GetTaxExemptionTypesCommand.js +3 -9
- package/dist-es/commands/GetTaxInheritanceCommand.js +3 -9
- package/dist-es/commands/GetTaxRegistrationCommand.js +3 -10
- package/dist-es/commands/GetTaxRegistrationDocumentCommand.js +3 -9
- package/dist-es/commands/ListSupplementalTaxRegistrationsCommand.js +3 -10
- package/dist-es/commands/ListTaxExemptionsCommand.js +3 -9
- package/dist-es/commands/ListTaxRegistrationsCommand.js +3 -10
- package/dist-es/commands/PutSupplementalTaxRegistrationCommand.js +3 -10
- package/dist-es/commands/PutTaxExemptionCommand.js +3 -9
- package/dist-es/commands/PutTaxInheritanceCommand.js +3 -9
- package/dist-es/commands/PutTaxRegistrationCommand.js +3 -10
- package/dist-es/models/models_0.js +0 -64
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-es/schemas/schemas_0.js +898 -0
- package/dist-types/TaxSettingsClient.d.ts +10 -1
- package/dist-types/models/models_0.d.ts +0 -68
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +120 -0
- package/dist-types/ts3.4/TaxSettingsClient.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +0 -51
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +127 -0
- package/package.json +2 -2
- package/dist-es/protocols/Aws_restJson1.js +0 -650
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -146
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -197
|
@@ -1,650 +0,0 @@
|
|
|
1
|
-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
-
import { requestBuilder as rb } from "@smithy/core";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { AccessDeniedException, AttachmentUploadException, CaseCreationLimitExceededException, ConflictException, InternalServerException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
|
|
5
|
-
import { TaxSettingsServiceException as __BaseException } from "../models/TaxSettingsServiceException";
|
|
6
|
-
export const se_BatchDeleteTaxRegistrationCommand = async (input, context) => {
|
|
7
|
-
const b = rb(input, context);
|
|
8
|
-
const headers = {
|
|
9
|
-
"content-type": "application/json",
|
|
10
|
-
};
|
|
11
|
-
b.bp("/BatchDeleteTaxRegistration");
|
|
12
|
-
let body;
|
|
13
|
-
body = JSON.stringify(take(input, {
|
|
14
|
-
accountIds: (_) => _json(_),
|
|
15
|
-
}));
|
|
16
|
-
b.m("POST").h(headers).b(body);
|
|
17
|
-
return b.build();
|
|
18
|
-
};
|
|
19
|
-
export const se_BatchGetTaxExemptionsCommand = async (input, context) => {
|
|
20
|
-
const b = rb(input, context);
|
|
21
|
-
const headers = {
|
|
22
|
-
"content-type": "application/json",
|
|
23
|
-
};
|
|
24
|
-
b.bp("/BatchGetTaxExemptions");
|
|
25
|
-
let body;
|
|
26
|
-
body = JSON.stringify(take(input, {
|
|
27
|
-
accountIds: (_) => _json(_),
|
|
28
|
-
}));
|
|
29
|
-
b.m("POST").h(headers).b(body);
|
|
30
|
-
return b.build();
|
|
31
|
-
};
|
|
32
|
-
export const se_BatchPutTaxRegistrationCommand = async (input, context) => {
|
|
33
|
-
const b = rb(input, context);
|
|
34
|
-
const headers = {
|
|
35
|
-
"content-type": "application/json",
|
|
36
|
-
};
|
|
37
|
-
b.bp("/BatchPutTaxRegistration");
|
|
38
|
-
let body;
|
|
39
|
-
body = JSON.stringify(take(input, {
|
|
40
|
-
accountIds: (_) => _json(_),
|
|
41
|
-
taxRegistrationEntry: (_) => se_TaxRegistrationEntry(_, context),
|
|
42
|
-
}));
|
|
43
|
-
b.m("POST").h(headers).b(body);
|
|
44
|
-
return b.build();
|
|
45
|
-
};
|
|
46
|
-
export const se_DeleteSupplementalTaxRegistrationCommand = async (input, context) => {
|
|
47
|
-
const b = rb(input, context);
|
|
48
|
-
const headers = {
|
|
49
|
-
"content-type": "application/json",
|
|
50
|
-
};
|
|
51
|
-
b.bp("/DeleteSupplementalTaxRegistration");
|
|
52
|
-
let body;
|
|
53
|
-
body = JSON.stringify(take(input, {
|
|
54
|
-
authorityId: [],
|
|
55
|
-
}));
|
|
56
|
-
b.m("POST").h(headers).b(body);
|
|
57
|
-
return b.build();
|
|
58
|
-
};
|
|
59
|
-
export const se_DeleteTaxRegistrationCommand = async (input, context) => {
|
|
60
|
-
const b = rb(input, context);
|
|
61
|
-
const headers = {
|
|
62
|
-
"content-type": "application/json",
|
|
63
|
-
};
|
|
64
|
-
b.bp("/DeleteTaxRegistration");
|
|
65
|
-
let body;
|
|
66
|
-
body = JSON.stringify(take(input, {
|
|
67
|
-
accountId: [],
|
|
68
|
-
}));
|
|
69
|
-
b.m("POST").h(headers).b(body);
|
|
70
|
-
return b.build();
|
|
71
|
-
};
|
|
72
|
-
export const se_GetTaxExemptionTypesCommand = async (input, context) => {
|
|
73
|
-
const b = rb(input, context);
|
|
74
|
-
const headers = {};
|
|
75
|
-
b.bp("/GetTaxExemptionTypes");
|
|
76
|
-
let body;
|
|
77
|
-
b.m("POST").h(headers).b(body);
|
|
78
|
-
return b.build();
|
|
79
|
-
};
|
|
80
|
-
export const se_GetTaxInheritanceCommand = async (input, context) => {
|
|
81
|
-
const b = rb(input, context);
|
|
82
|
-
const headers = {};
|
|
83
|
-
b.bp("/GetTaxInheritance");
|
|
84
|
-
let body;
|
|
85
|
-
b.m("POST").h(headers).b(body);
|
|
86
|
-
return b.build();
|
|
87
|
-
};
|
|
88
|
-
export const se_GetTaxRegistrationCommand = async (input, context) => {
|
|
89
|
-
const b = rb(input, context);
|
|
90
|
-
const headers = {
|
|
91
|
-
"content-type": "application/json",
|
|
92
|
-
};
|
|
93
|
-
b.bp("/GetTaxRegistration");
|
|
94
|
-
let body;
|
|
95
|
-
body = JSON.stringify(take(input, {
|
|
96
|
-
accountId: [],
|
|
97
|
-
}));
|
|
98
|
-
b.m("POST").h(headers).b(body);
|
|
99
|
-
return b.build();
|
|
100
|
-
};
|
|
101
|
-
export const se_GetTaxRegistrationDocumentCommand = async (input, context) => {
|
|
102
|
-
const b = rb(input, context);
|
|
103
|
-
const headers = {
|
|
104
|
-
"content-type": "application/json",
|
|
105
|
-
};
|
|
106
|
-
b.bp("/GetTaxRegistrationDocument");
|
|
107
|
-
let body;
|
|
108
|
-
body = JSON.stringify(take(input, {
|
|
109
|
-
destinationS3Location: (_) => _json(_),
|
|
110
|
-
taxDocumentMetadata: (_) => _json(_),
|
|
111
|
-
}));
|
|
112
|
-
b.m("POST").h(headers).b(body);
|
|
113
|
-
return b.build();
|
|
114
|
-
};
|
|
115
|
-
export const se_ListSupplementalTaxRegistrationsCommand = async (input, context) => {
|
|
116
|
-
const b = rb(input, context);
|
|
117
|
-
const headers = {
|
|
118
|
-
"content-type": "application/json",
|
|
119
|
-
};
|
|
120
|
-
b.bp("/ListSupplementalTaxRegistrations");
|
|
121
|
-
let body;
|
|
122
|
-
body = JSON.stringify(take(input, {
|
|
123
|
-
maxResults: [],
|
|
124
|
-
nextToken: [],
|
|
125
|
-
}));
|
|
126
|
-
b.m("POST").h(headers).b(body);
|
|
127
|
-
return b.build();
|
|
128
|
-
};
|
|
129
|
-
export const se_ListTaxExemptionsCommand = async (input, context) => {
|
|
130
|
-
const b = rb(input, context);
|
|
131
|
-
const headers = {
|
|
132
|
-
"content-type": "application/json",
|
|
133
|
-
};
|
|
134
|
-
b.bp("/ListTaxExemptions");
|
|
135
|
-
let body;
|
|
136
|
-
body = JSON.stringify(take(input, {
|
|
137
|
-
maxResults: [],
|
|
138
|
-
nextToken: [],
|
|
139
|
-
}));
|
|
140
|
-
b.m("POST").h(headers).b(body);
|
|
141
|
-
return b.build();
|
|
142
|
-
};
|
|
143
|
-
export const se_ListTaxRegistrationsCommand = async (input, context) => {
|
|
144
|
-
const b = rb(input, context);
|
|
145
|
-
const headers = {
|
|
146
|
-
"content-type": "application/json",
|
|
147
|
-
};
|
|
148
|
-
b.bp("/ListTaxRegistrations");
|
|
149
|
-
let body;
|
|
150
|
-
body = JSON.stringify(take(input, {
|
|
151
|
-
maxResults: [],
|
|
152
|
-
nextToken: [],
|
|
153
|
-
}));
|
|
154
|
-
b.m("POST").h(headers).b(body);
|
|
155
|
-
return b.build();
|
|
156
|
-
};
|
|
157
|
-
export const se_PutSupplementalTaxRegistrationCommand = async (input, context) => {
|
|
158
|
-
const b = rb(input, context);
|
|
159
|
-
const headers = {
|
|
160
|
-
"content-type": "application/json",
|
|
161
|
-
};
|
|
162
|
-
b.bp("/PutSupplementalTaxRegistration");
|
|
163
|
-
let body;
|
|
164
|
-
body = JSON.stringify(take(input, {
|
|
165
|
-
taxRegistrationEntry: (_) => _json(_),
|
|
166
|
-
}));
|
|
167
|
-
b.m("POST").h(headers).b(body);
|
|
168
|
-
return b.build();
|
|
169
|
-
};
|
|
170
|
-
export const se_PutTaxExemptionCommand = async (input, context) => {
|
|
171
|
-
const b = rb(input, context);
|
|
172
|
-
const headers = {
|
|
173
|
-
"content-type": "application/json",
|
|
174
|
-
};
|
|
175
|
-
b.bp("/PutTaxExemption");
|
|
176
|
-
let body;
|
|
177
|
-
body = JSON.stringify(take(input, {
|
|
178
|
-
accountIds: (_) => _json(_),
|
|
179
|
-
authority: (_) => _json(_),
|
|
180
|
-
exemptionCertificate: (_) => se_ExemptionCertificate(_, context),
|
|
181
|
-
exemptionType: [],
|
|
182
|
-
}));
|
|
183
|
-
b.m("POST").h(headers).b(body);
|
|
184
|
-
return b.build();
|
|
185
|
-
};
|
|
186
|
-
export const se_PutTaxInheritanceCommand = async (input, context) => {
|
|
187
|
-
const b = rb(input, context);
|
|
188
|
-
const headers = {
|
|
189
|
-
"content-type": "application/json",
|
|
190
|
-
};
|
|
191
|
-
b.bp("/PutTaxInheritance");
|
|
192
|
-
let body;
|
|
193
|
-
body = JSON.stringify(take(input, {
|
|
194
|
-
heritageStatus: [],
|
|
195
|
-
}));
|
|
196
|
-
b.m("POST").h(headers).b(body);
|
|
197
|
-
return b.build();
|
|
198
|
-
};
|
|
199
|
-
export const se_PutTaxRegistrationCommand = async (input, context) => {
|
|
200
|
-
const b = rb(input, context);
|
|
201
|
-
const headers = {
|
|
202
|
-
"content-type": "application/json",
|
|
203
|
-
};
|
|
204
|
-
b.bp("/PutTaxRegistration");
|
|
205
|
-
let body;
|
|
206
|
-
body = JSON.stringify(take(input, {
|
|
207
|
-
accountId: [],
|
|
208
|
-
taxRegistrationEntry: (_) => se_TaxRegistrationEntry(_, context),
|
|
209
|
-
}));
|
|
210
|
-
b.m("POST").h(headers).b(body);
|
|
211
|
-
return b.build();
|
|
212
|
-
};
|
|
213
|
-
export const de_BatchDeleteTaxRegistrationCommand = async (output, context) => {
|
|
214
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
215
|
-
return de_CommandError(output, context);
|
|
216
|
-
}
|
|
217
|
-
const contents = map({
|
|
218
|
-
$metadata: deserializeMetadata(output),
|
|
219
|
-
});
|
|
220
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
221
|
-
const doc = take(data, {
|
|
222
|
-
errors: _json,
|
|
223
|
-
});
|
|
224
|
-
Object.assign(contents, doc);
|
|
225
|
-
return contents;
|
|
226
|
-
};
|
|
227
|
-
export const de_BatchGetTaxExemptionsCommand = async (output, context) => {
|
|
228
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
229
|
-
return de_CommandError(output, context);
|
|
230
|
-
}
|
|
231
|
-
const contents = map({
|
|
232
|
-
$metadata: deserializeMetadata(output),
|
|
233
|
-
});
|
|
234
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
235
|
-
const doc = take(data, {
|
|
236
|
-
failedAccounts: _json,
|
|
237
|
-
taxExemptionDetailsMap: (_) => de_TaxExemptionDetailsMap(_, context),
|
|
238
|
-
});
|
|
239
|
-
Object.assign(contents, doc);
|
|
240
|
-
return contents;
|
|
241
|
-
};
|
|
242
|
-
export const de_BatchPutTaxRegistrationCommand = async (output, context) => {
|
|
243
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
244
|
-
return de_CommandError(output, context);
|
|
245
|
-
}
|
|
246
|
-
const contents = map({
|
|
247
|
-
$metadata: deserializeMetadata(output),
|
|
248
|
-
});
|
|
249
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
250
|
-
const doc = take(data, {
|
|
251
|
-
errors: _json,
|
|
252
|
-
status: __expectString,
|
|
253
|
-
});
|
|
254
|
-
Object.assign(contents, doc);
|
|
255
|
-
return contents;
|
|
256
|
-
};
|
|
257
|
-
export const de_DeleteSupplementalTaxRegistrationCommand = async (output, context) => {
|
|
258
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
259
|
-
return de_CommandError(output, context);
|
|
260
|
-
}
|
|
261
|
-
const contents = map({
|
|
262
|
-
$metadata: deserializeMetadata(output),
|
|
263
|
-
});
|
|
264
|
-
await collectBody(output.body, context);
|
|
265
|
-
return contents;
|
|
266
|
-
};
|
|
267
|
-
export const de_DeleteTaxRegistrationCommand = async (output, context) => {
|
|
268
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
269
|
-
return de_CommandError(output, context);
|
|
270
|
-
}
|
|
271
|
-
const contents = map({
|
|
272
|
-
$metadata: deserializeMetadata(output),
|
|
273
|
-
});
|
|
274
|
-
await collectBody(output.body, context);
|
|
275
|
-
return contents;
|
|
276
|
-
};
|
|
277
|
-
export const de_GetTaxExemptionTypesCommand = async (output, context) => {
|
|
278
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
279
|
-
return de_CommandError(output, context);
|
|
280
|
-
}
|
|
281
|
-
const contents = map({
|
|
282
|
-
$metadata: deserializeMetadata(output),
|
|
283
|
-
});
|
|
284
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
285
|
-
const doc = take(data, {
|
|
286
|
-
taxExemptionTypes: _json,
|
|
287
|
-
});
|
|
288
|
-
Object.assign(contents, doc);
|
|
289
|
-
return contents;
|
|
290
|
-
};
|
|
291
|
-
export const de_GetTaxInheritanceCommand = async (output, context) => {
|
|
292
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
293
|
-
return de_CommandError(output, context);
|
|
294
|
-
}
|
|
295
|
-
const contents = map({
|
|
296
|
-
$metadata: deserializeMetadata(output),
|
|
297
|
-
});
|
|
298
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
299
|
-
const doc = take(data, {
|
|
300
|
-
heritageStatus: __expectString,
|
|
301
|
-
});
|
|
302
|
-
Object.assign(contents, doc);
|
|
303
|
-
return contents;
|
|
304
|
-
};
|
|
305
|
-
export const de_GetTaxRegistrationCommand = async (output, context) => {
|
|
306
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
307
|
-
return de_CommandError(output, context);
|
|
308
|
-
}
|
|
309
|
-
const contents = map({
|
|
310
|
-
$metadata: deserializeMetadata(output),
|
|
311
|
-
});
|
|
312
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
313
|
-
const doc = take(data, {
|
|
314
|
-
taxRegistration: _json,
|
|
315
|
-
});
|
|
316
|
-
Object.assign(contents, doc);
|
|
317
|
-
return contents;
|
|
318
|
-
};
|
|
319
|
-
export const de_GetTaxRegistrationDocumentCommand = async (output, context) => {
|
|
320
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
321
|
-
return de_CommandError(output, context);
|
|
322
|
-
}
|
|
323
|
-
const contents = map({
|
|
324
|
-
$metadata: deserializeMetadata(output),
|
|
325
|
-
});
|
|
326
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
327
|
-
const doc = take(data, {
|
|
328
|
-
destinationFilePath: __expectString,
|
|
329
|
-
presignedS3Url: __expectString,
|
|
330
|
-
});
|
|
331
|
-
Object.assign(contents, doc);
|
|
332
|
-
return contents;
|
|
333
|
-
};
|
|
334
|
-
export const de_ListSupplementalTaxRegistrationsCommand = async (output, context) => {
|
|
335
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
336
|
-
return de_CommandError(output, context);
|
|
337
|
-
}
|
|
338
|
-
const contents = map({
|
|
339
|
-
$metadata: deserializeMetadata(output),
|
|
340
|
-
});
|
|
341
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
342
|
-
const doc = take(data, {
|
|
343
|
-
nextToken: __expectString,
|
|
344
|
-
taxRegistrations: _json,
|
|
345
|
-
});
|
|
346
|
-
Object.assign(contents, doc);
|
|
347
|
-
return contents;
|
|
348
|
-
};
|
|
349
|
-
export const de_ListTaxExemptionsCommand = async (output, context) => {
|
|
350
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
351
|
-
return de_CommandError(output, context);
|
|
352
|
-
}
|
|
353
|
-
const contents = map({
|
|
354
|
-
$metadata: deserializeMetadata(output),
|
|
355
|
-
});
|
|
356
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
357
|
-
const doc = take(data, {
|
|
358
|
-
nextToken: __expectString,
|
|
359
|
-
taxExemptionDetailsMap: (_) => de_TaxExemptionDetailsMap(_, context),
|
|
360
|
-
});
|
|
361
|
-
Object.assign(contents, doc);
|
|
362
|
-
return contents;
|
|
363
|
-
};
|
|
364
|
-
export const de_ListTaxRegistrationsCommand = async (output, context) => {
|
|
365
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
366
|
-
return de_CommandError(output, context);
|
|
367
|
-
}
|
|
368
|
-
const contents = map({
|
|
369
|
-
$metadata: deserializeMetadata(output),
|
|
370
|
-
});
|
|
371
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
372
|
-
const doc = take(data, {
|
|
373
|
-
accountDetails: _json,
|
|
374
|
-
nextToken: __expectString,
|
|
375
|
-
});
|
|
376
|
-
Object.assign(contents, doc);
|
|
377
|
-
return contents;
|
|
378
|
-
};
|
|
379
|
-
export const de_PutSupplementalTaxRegistrationCommand = async (output, context) => {
|
|
380
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
381
|
-
return de_CommandError(output, context);
|
|
382
|
-
}
|
|
383
|
-
const contents = map({
|
|
384
|
-
$metadata: deserializeMetadata(output),
|
|
385
|
-
});
|
|
386
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
387
|
-
const doc = take(data, {
|
|
388
|
-
authorityId: __expectString,
|
|
389
|
-
status: __expectString,
|
|
390
|
-
});
|
|
391
|
-
Object.assign(contents, doc);
|
|
392
|
-
return contents;
|
|
393
|
-
};
|
|
394
|
-
export const de_PutTaxExemptionCommand = async (output, context) => {
|
|
395
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
396
|
-
return de_CommandError(output, context);
|
|
397
|
-
}
|
|
398
|
-
const contents = map({
|
|
399
|
-
$metadata: deserializeMetadata(output),
|
|
400
|
-
});
|
|
401
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
402
|
-
const doc = take(data, {
|
|
403
|
-
caseId: __expectString,
|
|
404
|
-
});
|
|
405
|
-
Object.assign(contents, doc);
|
|
406
|
-
return contents;
|
|
407
|
-
};
|
|
408
|
-
export const de_PutTaxInheritanceCommand = async (output, context) => {
|
|
409
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
410
|
-
return de_CommandError(output, context);
|
|
411
|
-
}
|
|
412
|
-
const contents = map({
|
|
413
|
-
$metadata: deserializeMetadata(output),
|
|
414
|
-
});
|
|
415
|
-
await collectBody(output.body, context);
|
|
416
|
-
return contents;
|
|
417
|
-
};
|
|
418
|
-
export const de_PutTaxRegistrationCommand = async (output, context) => {
|
|
419
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
420
|
-
return de_CommandError(output, context);
|
|
421
|
-
}
|
|
422
|
-
const contents = map({
|
|
423
|
-
$metadata: deserializeMetadata(output),
|
|
424
|
-
});
|
|
425
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
426
|
-
const doc = take(data, {
|
|
427
|
-
status: __expectString,
|
|
428
|
-
});
|
|
429
|
-
Object.assign(contents, doc);
|
|
430
|
-
return contents;
|
|
431
|
-
};
|
|
432
|
-
const de_CommandError = async (output, context) => {
|
|
433
|
-
const parsedOutput = {
|
|
434
|
-
...output,
|
|
435
|
-
body: await parseErrorBody(output.body, context),
|
|
436
|
-
};
|
|
437
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
438
|
-
switch (errorCode) {
|
|
439
|
-
case "ConflictException":
|
|
440
|
-
case "com.amazonaws.taxsettings#ConflictException":
|
|
441
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
442
|
-
case "InternalServerException":
|
|
443
|
-
case "com.amazonaws.taxsettings#InternalServerException":
|
|
444
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
445
|
-
case "ValidationException":
|
|
446
|
-
case "com.amazonaws.taxsettings#ValidationException":
|
|
447
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
448
|
-
case "ResourceNotFoundException":
|
|
449
|
-
case "com.amazonaws.taxsettings#ResourceNotFoundException":
|
|
450
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
451
|
-
case "AccessDeniedException":
|
|
452
|
-
case "com.amazonaws.taxsettings#AccessDeniedException":
|
|
453
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
454
|
-
case "AttachmentUploadException":
|
|
455
|
-
case "com.amazonaws.taxsettings#AttachmentUploadException":
|
|
456
|
-
throw await de_AttachmentUploadExceptionRes(parsedOutput, context);
|
|
457
|
-
case "CaseCreationLimitExceededException":
|
|
458
|
-
case "com.amazonaws.taxsettings#CaseCreationLimitExceededException":
|
|
459
|
-
throw await de_CaseCreationLimitExceededExceptionRes(parsedOutput, context);
|
|
460
|
-
default:
|
|
461
|
-
const parsedBody = parsedOutput.body;
|
|
462
|
-
return throwDefaultError({
|
|
463
|
-
output,
|
|
464
|
-
parsedBody,
|
|
465
|
-
errorCode,
|
|
466
|
-
});
|
|
467
|
-
}
|
|
468
|
-
};
|
|
469
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
470
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
471
|
-
const contents = map({});
|
|
472
|
-
const data = parsedOutput.body;
|
|
473
|
-
const doc = take(data, {
|
|
474
|
-
message: __expectString,
|
|
475
|
-
});
|
|
476
|
-
Object.assign(contents, doc);
|
|
477
|
-
const exception = new AccessDeniedException({
|
|
478
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
479
|
-
...contents,
|
|
480
|
-
});
|
|
481
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
482
|
-
};
|
|
483
|
-
const de_AttachmentUploadExceptionRes = async (parsedOutput, context) => {
|
|
484
|
-
const contents = map({});
|
|
485
|
-
const data = parsedOutput.body;
|
|
486
|
-
const doc = take(data, {
|
|
487
|
-
message: __expectString,
|
|
488
|
-
});
|
|
489
|
-
Object.assign(contents, doc);
|
|
490
|
-
const exception = new AttachmentUploadException({
|
|
491
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
492
|
-
...contents,
|
|
493
|
-
});
|
|
494
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
495
|
-
};
|
|
496
|
-
const de_CaseCreationLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
497
|
-
const contents = map({});
|
|
498
|
-
const data = parsedOutput.body;
|
|
499
|
-
const doc = take(data, {
|
|
500
|
-
message: __expectString,
|
|
501
|
-
});
|
|
502
|
-
Object.assign(contents, doc);
|
|
503
|
-
const exception = new CaseCreationLimitExceededException({
|
|
504
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
505
|
-
...contents,
|
|
506
|
-
});
|
|
507
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
508
|
-
};
|
|
509
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
510
|
-
const contents = map({});
|
|
511
|
-
const data = parsedOutput.body;
|
|
512
|
-
const doc = take(data, {
|
|
513
|
-
errorCode: __expectString,
|
|
514
|
-
message: __expectString,
|
|
515
|
-
});
|
|
516
|
-
Object.assign(contents, doc);
|
|
517
|
-
const exception = new ConflictException({
|
|
518
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
519
|
-
...contents,
|
|
520
|
-
});
|
|
521
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
522
|
-
};
|
|
523
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
524
|
-
const contents = map({});
|
|
525
|
-
const data = parsedOutput.body;
|
|
526
|
-
const doc = take(data, {
|
|
527
|
-
errorCode: __expectString,
|
|
528
|
-
message: __expectString,
|
|
529
|
-
});
|
|
530
|
-
Object.assign(contents, doc);
|
|
531
|
-
const exception = new InternalServerException({
|
|
532
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
533
|
-
...contents,
|
|
534
|
-
});
|
|
535
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
536
|
-
};
|
|
537
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
538
|
-
const contents = map({});
|
|
539
|
-
const data = parsedOutput.body;
|
|
540
|
-
const doc = take(data, {
|
|
541
|
-
errorCode: __expectString,
|
|
542
|
-
message: __expectString,
|
|
543
|
-
});
|
|
544
|
-
Object.assign(contents, doc);
|
|
545
|
-
const exception = new ResourceNotFoundException({
|
|
546
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
547
|
-
...contents,
|
|
548
|
-
});
|
|
549
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
550
|
-
};
|
|
551
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
552
|
-
const contents = map({});
|
|
553
|
-
const data = parsedOutput.body;
|
|
554
|
-
const doc = take(data, {
|
|
555
|
-
errorCode: __expectString,
|
|
556
|
-
fieldList: _json,
|
|
557
|
-
message: __expectString,
|
|
558
|
-
});
|
|
559
|
-
Object.assign(contents, doc);
|
|
560
|
-
const exception = new ValidationException({
|
|
561
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
562
|
-
...contents,
|
|
563
|
-
});
|
|
564
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
565
|
-
};
|
|
566
|
-
const se_ExemptionCertificate = (input, context) => {
|
|
567
|
-
return take(input, {
|
|
568
|
-
documentFile: context.base64Encoder,
|
|
569
|
-
documentName: [],
|
|
570
|
-
});
|
|
571
|
-
};
|
|
572
|
-
const se_TaxRegistrationDocFile = (input, context) => {
|
|
573
|
-
return take(input, {
|
|
574
|
-
fileContent: context.base64Encoder,
|
|
575
|
-
fileName: [],
|
|
576
|
-
});
|
|
577
|
-
};
|
|
578
|
-
const se_TaxRegistrationDocument = (input, context) => {
|
|
579
|
-
return take(input, {
|
|
580
|
-
file: (_) => se_TaxRegistrationDocFile(_, context),
|
|
581
|
-
s3Location: _json,
|
|
582
|
-
});
|
|
583
|
-
};
|
|
584
|
-
const se_TaxRegistrationDocuments = (input, context) => {
|
|
585
|
-
return input
|
|
586
|
-
.filter((e) => e != null)
|
|
587
|
-
.map((entry) => {
|
|
588
|
-
return se_TaxRegistrationDocument(entry, context);
|
|
589
|
-
});
|
|
590
|
-
};
|
|
591
|
-
const se_TaxRegistrationEntry = (input, context) => {
|
|
592
|
-
return take(input, {
|
|
593
|
-
additionalTaxInformation: _json,
|
|
594
|
-
certifiedEmailId: [],
|
|
595
|
-
legalAddress: _json,
|
|
596
|
-
legalName: [],
|
|
597
|
-
registrationId: [],
|
|
598
|
-
registrationType: [],
|
|
599
|
-
sector: [],
|
|
600
|
-
verificationDetails: (_) => se_VerificationDetails(_, context),
|
|
601
|
-
});
|
|
602
|
-
};
|
|
603
|
-
const se_VerificationDetails = (input, context) => {
|
|
604
|
-
return take(input, {
|
|
605
|
-
dateOfBirth: [],
|
|
606
|
-
taxRegistrationDocuments: (_) => se_TaxRegistrationDocuments(_, context),
|
|
607
|
-
});
|
|
608
|
-
};
|
|
609
|
-
const de_TaxExemption = (output, context) => {
|
|
610
|
-
return take(output, {
|
|
611
|
-
authority: _json,
|
|
612
|
-
effectiveDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
613
|
-
expirationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
614
|
-
status: __expectString,
|
|
615
|
-
systemEffectiveDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
616
|
-
taxExemptionType: _json,
|
|
617
|
-
});
|
|
618
|
-
};
|
|
619
|
-
const de_TaxExemptionDetails = (output, context) => {
|
|
620
|
-
return take(output, {
|
|
621
|
-
heritageObtainedDetails: __expectBoolean,
|
|
622
|
-
heritageObtainedParentEntity: __expectString,
|
|
623
|
-
heritageObtainedReason: __expectString,
|
|
624
|
-
taxExemptions: (_) => de_TaxExemptions(_, context),
|
|
625
|
-
});
|
|
626
|
-
};
|
|
627
|
-
const de_TaxExemptionDetailsMap = (output, context) => {
|
|
628
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
629
|
-
if (value === null) {
|
|
630
|
-
return acc;
|
|
631
|
-
}
|
|
632
|
-
acc[key] = de_TaxExemptionDetails(value, context);
|
|
633
|
-
return acc;
|
|
634
|
-
}, {});
|
|
635
|
-
};
|
|
636
|
-
const de_TaxExemptions = (output, context) => {
|
|
637
|
-
const retVal = (output || [])
|
|
638
|
-
.filter((e) => e != null)
|
|
639
|
-
.map((entry) => {
|
|
640
|
-
return de_TaxExemption(entry, context);
|
|
641
|
-
});
|
|
642
|
-
return retVal;
|
|
643
|
-
};
|
|
644
|
-
const deserializeMetadata = (output) => ({
|
|
645
|
-
httpStatusCode: output.statusCode,
|
|
646
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
647
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
648
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
649
|
-
});
|
|
650
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|