@aws-sdk/client-invoicing 3.703.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +293 -0
  3. package/dist-cjs/Invoicing.js +29 -0
  4. package/dist-cjs/InvoicingClient.js +50 -0
  5. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  6. package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
  7. package/dist-cjs/commands/BatchGetInvoiceProfileCommand.js +27 -0
  8. package/dist-cjs/commands/CreateInvoiceUnitCommand.js +26 -0
  9. package/dist-cjs/commands/DeleteInvoiceUnitCommand.js +26 -0
  10. package/dist-cjs/commands/GetInvoiceUnitCommand.js +26 -0
  11. package/dist-cjs/commands/ListInvoiceUnitsCommand.js +26 -0
  12. package/dist-cjs/commands/ListTagsForResourceCommand.js +26 -0
  13. package/dist-cjs/commands/TagResourceCommand.js +26 -0
  14. package/dist-cjs/commands/UntagResourceCommand.js +26 -0
  15. package/dist-cjs/commands/UpdateInvoiceUnitCommand.js +26 -0
  16. package/dist-cjs/commands/index.js +12 -0
  17. package/dist-cjs/endpoint/EndpointParameters.js +16 -0
  18. package/dist-cjs/endpoint/endpointResolver.js +18 -0
  19. package/dist-cjs/endpoint/ruleset.js +7 -0
  20. package/dist-cjs/extensionConfiguration.js +2 -0
  21. package/dist-cjs/index.js +11 -0
  22. package/dist-cjs/models/InvoicingServiceException.js +12 -0
  23. package/dist-cjs/models/index.js +4 -0
  24. package/dist-cjs/models/models_0.js +121 -0
  25. package/dist-cjs/pagination/Interfaces.js +2 -0
  26. package/dist-cjs/pagination/ListInvoiceUnitsPaginator.js +7 -0
  27. package/dist-cjs/pagination/index.js +5 -0
  28. package/dist-cjs/protocols/Aws_json1_0.js +367 -0
  29. package/dist-cjs/runtimeConfig.browser.js +39 -0
  30. package/dist-cjs/runtimeConfig.js +50 -0
  31. package/dist-cjs/runtimeConfig.native.js +15 -0
  32. package/dist-cjs/runtimeConfig.shared.js +34 -0
  33. package/dist-cjs/runtimeExtensions.js +25 -0
  34. package/dist-es/Invoicing.js +25 -0
  35. package/dist-es/InvoicingClient.js +46 -0
  36. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  37. package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
  38. package/dist-es/commands/BatchGetInvoiceProfileCommand.js +23 -0
  39. package/dist-es/commands/CreateInvoiceUnitCommand.js +22 -0
  40. package/dist-es/commands/DeleteInvoiceUnitCommand.js +22 -0
  41. package/dist-es/commands/GetInvoiceUnitCommand.js +22 -0
  42. package/dist-es/commands/ListInvoiceUnitsCommand.js +22 -0
  43. package/dist-es/commands/ListTagsForResourceCommand.js +22 -0
  44. package/dist-es/commands/TagResourceCommand.js +22 -0
  45. package/dist-es/commands/UntagResourceCommand.js +22 -0
  46. package/dist-es/commands/UpdateInvoiceUnitCommand.js +22 -0
  47. package/dist-es/commands/index.js +9 -0
  48. package/dist-es/endpoint/EndpointParameters.js +12 -0
  49. package/dist-es/endpoint/endpointResolver.js +14 -0
  50. package/dist-es/endpoint/ruleset.js +4 -0
  51. package/dist-es/extensionConfiguration.js +1 -0
  52. package/dist-es/index.js +6 -0
  53. package/dist-es/models/InvoicingServiceException.js +8 -0
  54. package/dist-es/models/index.js +1 -0
  55. package/dist-es/models/models_0.js +109 -0
  56. package/dist-es/pagination/Interfaces.js +1 -0
  57. package/dist-es/pagination/ListInvoiceUnitsPaginator.js +4 -0
  58. package/dist-es/pagination/index.js +2 -0
  59. package/dist-es/protocols/Aws_json1_0.js +346 -0
  60. package/dist-es/runtimeConfig.browser.js +34 -0
  61. package/dist-es/runtimeConfig.js +45 -0
  62. package/dist-es/runtimeConfig.native.js +11 -0
  63. package/dist-es/runtimeConfig.shared.js +30 -0
  64. package/dist-es/runtimeExtensions.js +21 -0
  65. package/dist-types/Invoicing.d.ts +90 -0
  66. package/dist-types/InvoicingClient.d.ts +194 -0
  67. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  68. package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
  69. package/dist-types/commands/BatchGetInvoiceProfileCommand.d.ts +111 -0
  70. package/dist-types/commands/CreateInvoiceUnitCommand.d.ts +100 -0
  71. package/dist-types/commands/DeleteInvoiceUnitCommand.d.ts +91 -0
  72. package/dist-types/commands/GetInvoiceUnitCommand.d.ts +101 -0
  73. package/dist-types/commands/ListInvoiceUnitsCommand.d.ts +114 -0
  74. package/dist-types/commands/ListTagsForResourceCommand.d.ts +96 -0
  75. package/dist-types/commands/TagResourceCommand.d.ts +99 -0
  76. package/dist-types/commands/UntagResourceCommand.d.ts +93 -0
  77. package/dist-types/commands/UpdateInvoiceUnitCommand.d.ts +97 -0
  78. package/dist-types/commands/index.d.ts +9 -0
  79. package/dist-types/endpoint/EndpointParameters.d.ts +34 -0
  80. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  81. package/dist-types/endpoint/ruleset.d.ts +2 -0
  82. package/dist-types/extensionConfiguration.d.ts +9 -0
  83. package/dist-types/index.d.ts +30 -0
  84. package/dist-types/models/InvoicingServiceException.d.ts +14 -0
  85. package/dist-types/models/index.d.ts +1 -0
  86. package/dist-types/models/models_0.d.ts +742 -0
  87. package/dist-types/pagination/Interfaces.d.ts +8 -0
  88. package/dist-types/pagination/ListInvoiceUnitsPaginator.d.ts +7 -0
  89. package/dist-types/pagination/index.d.ts +2 -0
  90. package/dist-types/protocols/Aws_json1_0.d.ts +83 -0
  91. package/dist-types/runtimeConfig.browser.d.ts +48 -0
  92. package/dist-types/runtimeConfig.d.ts +48 -0
  93. package/dist-types/runtimeConfig.native.d.ts +47 -0
  94. package/dist-types/runtimeConfig.shared.d.ts +21 -0
  95. package/dist-types/runtimeExtensions.d.ts +17 -0
  96. package/dist-types/ts3.4/Invoicing.d.ts +159 -0
  97. package/dist-types/ts3.4/InvoicingClient.d.ts +172 -0
  98. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  99. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
  100. package/dist-types/ts3.4/commands/BatchGetInvoiceProfileCommand.d.ts +51 -0
  101. package/dist-types/ts3.4/commands/CreateInvoiceUnitCommand.d.ts +51 -0
  102. package/dist-types/ts3.4/commands/DeleteInvoiceUnitCommand.d.ts +51 -0
  103. package/dist-types/ts3.4/commands/GetInvoiceUnitCommand.d.ts +50 -0
  104. package/dist-types/ts3.4/commands/ListInvoiceUnitsCommand.d.ts +50 -0
  105. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +51 -0
  106. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +47 -0
  107. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +50 -0
  108. package/dist-types/ts3.4/commands/UpdateInvoiceUnitCommand.d.ts +51 -0
  109. package/dist-types/ts3.4/commands/index.d.ts +9 -0
  110. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +45 -0
  111. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  112. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  113. package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
  114. package/dist-types/ts3.4/index.d.ts +9 -0
  115. package/dist-types/ts3.4/models/InvoicingServiceException.d.ts +9 -0
  116. package/dist-types/ts3.4/models/index.d.ts +1 -0
  117. package/dist-types/ts3.4/models/models_0.d.ts +192 -0
  118. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  119. package/dist-types/ts3.4/pagination/ListInvoiceUnitsPaginator.d.ts +11 -0
  120. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  121. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +113 -0
  122. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +93 -0
  123. package/dist-types/ts3.4/runtimeConfig.d.ts +94 -0
  124. package/dist-types/ts3.4/runtimeConfig.native.d.ts +87 -0
  125. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +21 -0
  126. package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
  127. package/package.json +101 -0
@@ -0,0 +1,346 @@
1
+ import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
+ import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
4
+ import { InvoicingServiceException as __BaseException } from "../models/InvoicingServiceException";
5
+ import { AccessDeniedException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
+ export const se_BatchGetInvoiceProfileCommand = async (input, context) => {
7
+ const headers = sharedHeaders("BatchGetInvoiceProfile");
8
+ let body;
9
+ body = JSON.stringify(_json(input));
10
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
+ };
12
+ export const se_CreateInvoiceUnitCommand = async (input, context) => {
13
+ const headers = sharedHeaders("CreateInvoiceUnit");
14
+ let body;
15
+ body = JSON.stringify(_json(input));
16
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
+ };
18
+ export const se_DeleteInvoiceUnitCommand = async (input, context) => {
19
+ const headers = sharedHeaders("DeleteInvoiceUnit");
20
+ let body;
21
+ body = JSON.stringify(_json(input));
22
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
+ };
24
+ export const se_GetInvoiceUnitCommand = async (input, context) => {
25
+ const headers = sharedHeaders("GetInvoiceUnit");
26
+ let body;
27
+ body = JSON.stringify(se_GetInvoiceUnitRequest(input, context));
28
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
+ };
30
+ export const se_ListInvoiceUnitsCommand = async (input, context) => {
31
+ const headers = sharedHeaders("ListInvoiceUnits");
32
+ let body;
33
+ body = JSON.stringify(se_ListInvoiceUnitsRequest(input, context));
34
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
+ };
36
+ export const se_ListTagsForResourceCommand = async (input, context) => {
37
+ const headers = sharedHeaders("ListTagsForResource");
38
+ let body;
39
+ body = JSON.stringify(_json(input));
40
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
+ };
42
+ export const se_TagResourceCommand = async (input, context) => {
43
+ const headers = sharedHeaders("TagResource");
44
+ let body;
45
+ body = JSON.stringify(_json(input));
46
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
+ };
48
+ export const se_UntagResourceCommand = async (input, context) => {
49
+ const headers = sharedHeaders("UntagResource");
50
+ let body;
51
+ body = JSON.stringify(_json(input));
52
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
53
+ };
54
+ export const se_UpdateInvoiceUnitCommand = async (input, context) => {
55
+ const headers = sharedHeaders("UpdateInvoiceUnit");
56
+ let body;
57
+ body = JSON.stringify(_json(input));
58
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
+ };
60
+ export const de_BatchGetInvoiceProfileCommand = async (output, context) => {
61
+ if (output.statusCode >= 300) {
62
+ return de_CommandError(output, context);
63
+ }
64
+ const data = await parseBody(output.body, context);
65
+ let contents = {};
66
+ contents = _json(data);
67
+ const response = {
68
+ $metadata: deserializeMetadata(output),
69
+ ...contents,
70
+ };
71
+ return response;
72
+ };
73
+ export const de_CreateInvoiceUnitCommand = async (output, context) => {
74
+ if (output.statusCode >= 300) {
75
+ return de_CommandError(output, context);
76
+ }
77
+ const data = await parseBody(output.body, context);
78
+ let contents = {};
79
+ contents = _json(data);
80
+ const response = {
81
+ $metadata: deserializeMetadata(output),
82
+ ...contents,
83
+ };
84
+ return response;
85
+ };
86
+ export const de_DeleteInvoiceUnitCommand = async (output, context) => {
87
+ if (output.statusCode >= 300) {
88
+ return de_CommandError(output, context);
89
+ }
90
+ const data = await parseBody(output.body, context);
91
+ let contents = {};
92
+ contents = _json(data);
93
+ const response = {
94
+ $metadata: deserializeMetadata(output),
95
+ ...contents,
96
+ };
97
+ return response;
98
+ };
99
+ export const de_GetInvoiceUnitCommand = async (output, context) => {
100
+ if (output.statusCode >= 300) {
101
+ return de_CommandError(output, context);
102
+ }
103
+ const data = await parseBody(output.body, context);
104
+ let contents = {};
105
+ contents = de_GetInvoiceUnitResponse(data, context);
106
+ const response = {
107
+ $metadata: deserializeMetadata(output),
108
+ ...contents,
109
+ };
110
+ return response;
111
+ };
112
+ export const de_ListInvoiceUnitsCommand = async (output, context) => {
113
+ if (output.statusCode >= 300) {
114
+ return de_CommandError(output, context);
115
+ }
116
+ const data = await parseBody(output.body, context);
117
+ let contents = {};
118
+ contents = de_ListInvoiceUnitsResponse(data, context);
119
+ const response = {
120
+ $metadata: deserializeMetadata(output),
121
+ ...contents,
122
+ };
123
+ return response;
124
+ };
125
+ export const de_ListTagsForResourceCommand = async (output, context) => {
126
+ if (output.statusCode >= 300) {
127
+ return de_CommandError(output, context);
128
+ }
129
+ const data = await parseBody(output.body, context);
130
+ let contents = {};
131
+ contents = _json(data);
132
+ const response = {
133
+ $metadata: deserializeMetadata(output),
134
+ ...contents,
135
+ };
136
+ return response;
137
+ };
138
+ export const de_TagResourceCommand = async (output, context) => {
139
+ if (output.statusCode >= 300) {
140
+ return de_CommandError(output, context);
141
+ }
142
+ const data = await parseBody(output.body, context);
143
+ let contents = {};
144
+ contents = _json(data);
145
+ const response = {
146
+ $metadata: deserializeMetadata(output),
147
+ ...contents,
148
+ };
149
+ return response;
150
+ };
151
+ export const de_UntagResourceCommand = async (output, context) => {
152
+ if (output.statusCode >= 300) {
153
+ return de_CommandError(output, context);
154
+ }
155
+ const data = await parseBody(output.body, context);
156
+ let contents = {};
157
+ contents = _json(data);
158
+ const response = {
159
+ $metadata: deserializeMetadata(output),
160
+ ...contents,
161
+ };
162
+ return response;
163
+ };
164
+ export const de_UpdateInvoiceUnitCommand = async (output, context) => {
165
+ if (output.statusCode >= 300) {
166
+ return de_CommandError(output, context);
167
+ }
168
+ const data = await parseBody(output.body, context);
169
+ let contents = {};
170
+ contents = _json(data);
171
+ const response = {
172
+ $metadata: deserializeMetadata(output),
173
+ ...contents,
174
+ };
175
+ return response;
176
+ };
177
+ const de_CommandError = async (output, context) => {
178
+ const parsedOutput = {
179
+ ...output,
180
+ body: await parseErrorBody(output.body, context),
181
+ };
182
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
183
+ switch (errorCode) {
184
+ case "AccessDeniedException":
185
+ case "com.amazonaws.invoicing#AccessDeniedException":
186
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
187
+ case "InternalServerException":
188
+ case "com.amazonaws.invoicing#InternalServerException":
189
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
190
+ case "ResourceNotFoundException":
191
+ case "com.amazonaws.invoicing#ResourceNotFoundException":
192
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
193
+ case "ThrottlingException":
194
+ case "com.amazonaws.invoicing#ThrottlingException":
195
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
196
+ case "ValidationException":
197
+ case "com.amazonaws.invoicing#ValidationException":
198
+ throw await de_ValidationExceptionRes(parsedOutput, context);
199
+ case "ServiceQuotaExceededException":
200
+ case "com.amazonaws.invoicing#ServiceQuotaExceededException":
201
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
202
+ default:
203
+ const parsedBody = parsedOutput.body;
204
+ return throwDefaultError({
205
+ output,
206
+ parsedBody,
207
+ errorCode,
208
+ });
209
+ }
210
+ };
211
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
212
+ const body = parsedOutput.body;
213
+ const deserialized = _json(body);
214
+ const exception = new AccessDeniedException({
215
+ $metadata: deserializeMetadata(parsedOutput),
216
+ ...deserialized,
217
+ });
218
+ return __decorateServiceException(exception, body);
219
+ };
220
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
221
+ const body = parsedOutput.body;
222
+ const deserialized = _json(body);
223
+ const exception = new InternalServerException({
224
+ $metadata: deserializeMetadata(parsedOutput),
225
+ ...deserialized,
226
+ });
227
+ return __decorateServiceException(exception, body);
228
+ };
229
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
230
+ const body = parsedOutput.body;
231
+ const deserialized = _json(body);
232
+ const exception = new ResourceNotFoundException({
233
+ $metadata: deserializeMetadata(parsedOutput),
234
+ ...deserialized,
235
+ });
236
+ return __decorateServiceException(exception, body);
237
+ };
238
+ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
239
+ const body = parsedOutput.body;
240
+ const deserialized = _json(body);
241
+ const exception = new ServiceQuotaExceededException({
242
+ $metadata: deserializeMetadata(parsedOutput),
243
+ ...deserialized,
244
+ });
245
+ return __decorateServiceException(exception, body);
246
+ };
247
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
248
+ const body = parsedOutput.body;
249
+ const deserialized = _json(body);
250
+ const exception = new ThrottlingException({
251
+ $metadata: deserializeMetadata(parsedOutput),
252
+ ...deserialized,
253
+ });
254
+ return __decorateServiceException(exception, body);
255
+ };
256
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
257
+ const body = parsedOutput.body;
258
+ const deserialized = _json(body);
259
+ const exception = new ValidationException({
260
+ $metadata: deserializeMetadata(parsedOutput),
261
+ ...deserialized,
262
+ });
263
+ return __decorateServiceException(exception, body);
264
+ };
265
+ const se_GetInvoiceUnitRequest = (input, context) => {
266
+ return take(input, {
267
+ AsOf: (_) => _.getTime() / 1000,
268
+ InvoiceUnitArn: [],
269
+ });
270
+ };
271
+ const se_ListInvoiceUnitsRequest = (input, context) => {
272
+ return take(input, {
273
+ AsOf: (_) => _.getTime() / 1000,
274
+ Filters: _json,
275
+ MaxResults: [],
276
+ NextToken: [],
277
+ });
278
+ };
279
+ const de_GetInvoiceUnitResponse = (output, context) => {
280
+ return take(output, {
281
+ Description: __expectString,
282
+ InvoiceReceiver: __expectString,
283
+ InvoiceUnitArn: __expectString,
284
+ LastModified: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
285
+ Name: __expectString,
286
+ Rule: _json,
287
+ TaxInheritanceDisabled: __expectBoolean,
288
+ });
289
+ };
290
+ const de_InvoiceUnit = (output, context) => {
291
+ return take(output, {
292
+ Description: __expectString,
293
+ InvoiceReceiver: __expectString,
294
+ InvoiceUnitArn: __expectString,
295
+ LastModified: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
296
+ Name: __expectString,
297
+ Rule: _json,
298
+ TaxInheritanceDisabled: __expectBoolean,
299
+ });
300
+ };
301
+ const de_InvoiceUnits = (output, context) => {
302
+ const retVal = (output || [])
303
+ .filter((e) => e != null)
304
+ .map((entry) => {
305
+ return de_InvoiceUnit(entry, context);
306
+ });
307
+ return retVal;
308
+ };
309
+ const de_ListInvoiceUnitsResponse = (output, context) => {
310
+ return take(output, {
311
+ InvoiceUnits: (_) => de_InvoiceUnits(_, context),
312
+ NextToken: __expectString,
313
+ });
314
+ };
315
+ const deserializeMetadata = (output) => ({
316
+ httpStatusCode: output.statusCode,
317
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
318
+ extendedRequestId: output.headers["x-amz-id-2"],
319
+ cfId: output.headers["x-amz-cf-id"],
320
+ });
321
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
322
+ const throwDefaultError = withBaseException(__BaseException);
323
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
324
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
325
+ const contents = {
326
+ protocol,
327
+ hostname,
328
+ port,
329
+ method: "POST",
330
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
331
+ headers,
332
+ };
333
+ if (resolvedHostname !== undefined) {
334
+ contents.hostname = resolvedHostname;
335
+ }
336
+ if (body !== undefined) {
337
+ contents.body = body;
338
+ }
339
+ return new __HttpRequest(contents);
340
+ };
341
+ function sharedHeaders(operation) {
342
+ return {
343
+ "content-type": "application/x-amz-json-1.0",
344
+ "x-amz-target": `Invoicing.${operation}`,
345
+ };
346
+ }
@@ -0,0 +1,34 @@
1
+ import packageInfo from "../package.json";
2
+ import { Sha256 } from "@aws-crypto/sha256-browser";
3
+ import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
4
+ import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
5
+ import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
6
+ import { invalidProvider } from "@smithy/invalid-dependency";
7
+ import { calculateBodyLength } from "@smithy/util-body-length-browser";
8
+ import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
9
+ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
10
+ import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
11
+ import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
12
+ export const getRuntimeConfig = (config) => {
13
+ const defaultsMode = resolveDefaultsModeConfig(config);
14
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
15
+ const clientSharedValues = getSharedRuntimeConfig(config);
16
+ return {
17
+ ...clientSharedValues,
18
+ ...config,
19
+ runtime: "browser",
20
+ defaultsMode,
21
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
22
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
23
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
24
+ createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
25
+ maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
26
+ region: config?.region ?? invalidProvider("Region is missing"),
27
+ requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
28
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
29
+ sha256: config?.sha256 ?? Sha256,
30
+ streamCollector: config?.streamCollector ?? streamCollector,
31
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
32
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
33
+ };
34
+ };
@@ -0,0 +1,45 @@
1
+ import packageInfo from "../package.json";
2
+ import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
3
+ import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
4
+ import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-node";
5
+ import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
6
+ import { Hash } from "@smithy/hash-node";
7
+ import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
8
+ import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
9
+ import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
10
+ import { calculateBodyLength } from "@smithy/util-body-length-node";
11
+ import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
12
+ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
13
+ import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
14
+ import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
15
+ import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client";
16
+ export const getRuntimeConfig = (config) => {
17
+ emitWarningIfUnsupportedVersion(process.version);
18
+ const defaultsMode = resolveDefaultsModeConfig(config);
19
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
20
+ const clientSharedValues = getSharedRuntimeConfig(config);
21
+ awsCheckVersion(process.version);
22
+ return {
23
+ ...clientSharedValues,
24
+ ...config,
25
+ runtime: "node",
26
+ defaultsMode,
27
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
28
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
29
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
30
+ createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
31
+ maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
32
+ region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
33
+ requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
34
+ retryMode: config?.retryMode ??
35
+ loadNodeConfig({
36
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
37
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
38
+ }),
39
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
40
+ streamCollector: config?.streamCollector ?? streamCollector,
41
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
42
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
43
+ userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS),
44
+ };
45
+ };
@@ -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,30 @@
1
+ import { AwsSdkSigV4Signer } from "@aws-sdk/core";
2
+ import { NoOpLogger } from "@smithy/smithy-client";
3
+ import { parseUrl } from "@smithy/url-parser";
4
+ import { fromBase64, toBase64 } from "@smithy/util-base64";
5
+ import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
6
+ import { defaultInvoicingHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
7
+ import { defaultEndpointResolver } from "./endpoint/endpointResolver";
8
+ export const getRuntimeConfig = (config) => {
9
+ return {
10
+ apiVersion: "2024-12-01",
11
+ base64Decoder: config?.base64Decoder ?? fromBase64,
12
+ base64Encoder: config?.base64Encoder ?? toBase64,
13
+ disableHostPrefix: config?.disableHostPrefix ?? false,
14
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
15
+ extensions: config?.extensions ?? [],
16
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultInvoicingHttpAuthSchemeProvider,
17
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
18
+ {
19
+ schemeId: "aws.auth#sigv4",
20
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
21
+ signer: new AwsSdkSigV4Signer(),
22
+ },
23
+ ],
24
+ logger: config?.logger ?? new NoOpLogger(),
25
+ serviceId: config?.serviceId ?? "Invoicing",
26
+ urlParser: config?.urlParser ?? parseUrl,
27
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
28
+ utf8Encoder: config?.utf8Encoder ?? toUtf8,
29
+ };
30
+ };
@@ -0,0 +1,21 @@
1
+ import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
2
+ import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
3
+ import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
4
+ import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
5
+ const asPartial = (t) => t;
6
+ export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
7
+ const extensionConfiguration = {
8
+ ...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)),
9
+ ...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
10
+ ...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
11
+ ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)),
12
+ };
13
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
14
+ return {
15
+ ...runtimeConfig,
16
+ ...resolveAwsRegionExtensionConfiguration(extensionConfiguration),
17
+ ...resolveDefaultRuntimeConfig(extensionConfiguration),
18
+ ...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
19
+ ...resolveHttpAuthRuntimeConfig(extensionConfiguration),
20
+ };
21
+ };
@@ -0,0 +1,90 @@
1
+ import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
2
+ import { BatchGetInvoiceProfileCommandInput, BatchGetInvoiceProfileCommandOutput } from "./commands/BatchGetInvoiceProfileCommand";
3
+ import { CreateInvoiceUnitCommandInput, CreateInvoiceUnitCommandOutput } from "./commands/CreateInvoiceUnitCommand";
4
+ import { DeleteInvoiceUnitCommandInput, DeleteInvoiceUnitCommandOutput } from "./commands/DeleteInvoiceUnitCommand";
5
+ import { GetInvoiceUnitCommandInput, GetInvoiceUnitCommandOutput } from "./commands/GetInvoiceUnitCommand";
6
+ import { ListInvoiceUnitsCommandInput, ListInvoiceUnitsCommandOutput } from "./commands/ListInvoiceUnitsCommand";
7
+ import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
8
+ import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
9
+ import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
10
+ import { UpdateInvoiceUnitCommandInput, UpdateInvoiceUnitCommandOutput } from "./commands/UpdateInvoiceUnitCommand";
11
+ import { InvoicingClient } from "./InvoicingClient";
12
+ export interface Invoicing {
13
+ /**
14
+ * @see {@link BatchGetInvoiceProfileCommand}
15
+ */
16
+ batchGetInvoiceProfile(args: BatchGetInvoiceProfileCommandInput, options?: __HttpHandlerOptions): Promise<BatchGetInvoiceProfileCommandOutput>;
17
+ batchGetInvoiceProfile(args: BatchGetInvoiceProfileCommandInput, cb: (err: any, data?: BatchGetInvoiceProfileCommandOutput) => void): void;
18
+ batchGetInvoiceProfile(args: BatchGetInvoiceProfileCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchGetInvoiceProfileCommandOutput) => void): void;
19
+ /**
20
+ * @see {@link CreateInvoiceUnitCommand}
21
+ */
22
+ createInvoiceUnit(args: CreateInvoiceUnitCommandInput, options?: __HttpHandlerOptions): Promise<CreateInvoiceUnitCommandOutput>;
23
+ createInvoiceUnit(args: CreateInvoiceUnitCommandInput, cb: (err: any, data?: CreateInvoiceUnitCommandOutput) => void): void;
24
+ createInvoiceUnit(args: CreateInvoiceUnitCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateInvoiceUnitCommandOutput) => void): void;
25
+ /**
26
+ * @see {@link DeleteInvoiceUnitCommand}
27
+ */
28
+ deleteInvoiceUnit(args: DeleteInvoiceUnitCommandInput, options?: __HttpHandlerOptions): Promise<DeleteInvoiceUnitCommandOutput>;
29
+ deleteInvoiceUnit(args: DeleteInvoiceUnitCommandInput, cb: (err: any, data?: DeleteInvoiceUnitCommandOutput) => void): void;
30
+ deleteInvoiceUnit(args: DeleteInvoiceUnitCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteInvoiceUnitCommandOutput) => void): void;
31
+ /**
32
+ * @see {@link GetInvoiceUnitCommand}
33
+ */
34
+ getInvoiceUnit(args: GetInvoiceUnitCommandInput, options?: __HttpHandlerOptions): Promise<GetInvoiceUnitCommandOutput>;
35
+ getInvoiceUnit(args: GetInvoiceUnitCommandInput, cb: (err: any, data?: GetInvoiceUnitCommandOutput) => void): void;
36
+ getInvoiceUnit(args: GetInvoiceUnitCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetInvoiceUnitCommandOutput) => void): void;
37
+ /**
38
+ * @see {@link ListInvoiceUnitsCommand}
39
+ */
40
+ listInvoiceUnits(): Promise<ListInvoiceUnitsCommandOutput>;
41
+ listInvoiceUnits(args: ListInvoiceUnitsCommandInput, options?: __HttpHandlerOptions): Promise<ListInvoiceUnitsCommandOutput>;
42
+ listInvoiceUnits(args: ListInvoiceUnitsCommandInput, cb: (err: any, data?: ListInvoiceUnitsCommandOutput) => void): void;
43
+ listInvoiceUnits(args: ListInvoiceUnitsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListInvoiceUnitsCommandOutput) => void): void;
44
+ /**
45
+ * @see {@link ListTagsForResourceCommand}
46
+ */
47
+ listTagsForResource(args: ListTagsForResourceCommandInput, options?: __HttpHandlerOptions): Promise<ListTagsForResourceCommandOutput>;
48
+ listTagsForResource(args: ListTagsForResourceCommandInput, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
49
+ listTagsForResource(args: ListTagsForResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
50
+ /**
51
+ * @see {@link TagResourceCommand}
52
+ */
53
+ tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise<TagResourceCommandOutput>;
54
+ tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
55
+ tagResource(args: TagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
56
+ /**
57
+ * @see {@link UntagResourceCommand}
58
+ */
59
+ untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise<UntagResourceCommandOutput>;
60
+ untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
61
+ untagResource(args: UntagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
62
+ /**
63
+ * @see {@link UpdateInvoiceUnitCommand}
64
+ */
65
+ updateInvoiceUnit(args: UpdateInvoiceUnitCommandInput, options?: __HttpHandlerOptions): Promise<UpdateInvoiceUnitCommandOutput>;
66
+ updateInvoiceUnit(args: UpdateInvoiceUnitCommandInput, cb: (err: any, data?: UpdateInvoiceUnitCommandOutput) => void): void;
67
+ updateInvoiceUnit(args: UpdateInvoiceUnitCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateInvoiceUnitCommandOutput) => void): void;
68
+ }
69
+ /**
70
+ * <p>
71
+ * <b>Amazon Web Services Invoice Configuration</b>
72
+ * </p>
73
+ * <p>You can use Amazon Web Services Invoice Configuration APIs to programmatically create,
74
+ * update, delete, get, and list invoice units. You can also programmatically fetch the
75
+ * information of the invoice receiver. For example, business legal name, address, and invoicing
76
+ * contacts. </p>
77
+ * <p>You can use Amazon Web Services Invoice Configuration to receive separate Amazon Web Services invoices based your organizational needs. By using Amazon Web Services Invoice Configuration, you can configure invoice units that are groups of Amazon Web Services accounts that represent your business entities, and receive separate invoices for each business entity. You can also assign a unique member or payer account as the invoice receiver for each invoice unit. As you create new accounts within your Organizations using Amazon Web Services Invoice Configuration APIs, you can automate the creation of new invoice units and subsequently automate the addition of new accounts to your invoice units.</p>
78
+ * <p>Service endpoint</p>
79
+ * <p>You can use the following endpoints for Amazon Web Services Invoice Configuration:</p>
80
+ * <ul>
81
+ * <li>
82
+ * <p>
83
+ * <code>https://invoicing.us-east-1.api.aws</code>
84
+ * </p>
85
+ * </li>
86
+ * </ul>
87
+ * @public
88
+ */
89
+ export declare class Invoicing extends InvoicingClient implements Invoicing {
90
+ }